Add cursors

This commit is contained in:
2024-01-28 15:58:20 +01:00
parent d0ad91d5b2
commit 6ee46da8ab
6 changed files with 318 additions and 117 deletions

View File

@@ -37,6 +37,8 @@ static OwnerType getOwnerType(BzTileID tile) {
typedef enum TerrainType {
TERRAIN_NONE = -1,
TERRAIN_GOLD_ORE,
TERRAIN_WHEAT_0,
TERRAIN_WHEAT_1,
TERRAIN_COUNT,
} TerrainType;
@@ -792,25 +794,22 @@ static AnimationFrame entityGetAnimationFrame(EntityType entity, AnimType type,
typedef enum ItemType {
ITEM_NONE = -1,
ITEM_ARROW,
ITEM_AXE,
ITEM_BATTLEAXE,
ITEM_BATTLEHAMMER,
ITEM_BOW,
ITEM_CUTLASS,
ITEM_DAGGER,
ITEM_FORK,
ITEM_GREATEAXE,
ITEM_GREATSWORD,
ITEM_HAMMER,
ITEM_IRON_SHIELD,
ITEM_JAVLIN,
ITEM_MACE,
ITEM_PICKAXE,
ITEM_SHIELD,
ITEM_SPEAR,
ITEM_STAFF,
ITEM_SWORD,
ITEM_SYTHE,
ITEM_TRIDENT,
ITEM_WOOD_SHIELD,
ITEM_COUNT,
} ItemType;
@@ -825,18 +824,15 @@ static BzTileID getItemTile(ItemType type) {
case ITEM_SHIELD: return 7937;
case ITEM_IRON_SHIELD: return 7938;
case ITEM_BOW: return 7939;
case ITEM_JAVLIN: return 7942;
case ITEM_ARROW: return 7943;
case ITEM_SWORD: return 8192;
case ITEM_GREATSWORD: return 8193;
case ITEM_CUTLASS: return 8194;
case ITEM_BATTLEAXE: return 8195;
case ITEM_GREATEAXE: return 8196;
case ITEM_SYTHE: return 8197;
case ITEM_MACE: return 8198;
case ITEM_BATTLEHAMMER: return 8199;
case ITEM_SPEAR: return 8200;
case ITEM_TRIDENT: return 8201;
case ITEM_SYTHE: return 8448;
case ITEM_HAMMER: return 8450;
case ITEM_SPEAR: return 8451;
case ITEM_FORK: return 8452;
default: return -1;
}
}
@@ -1661,6 +1657,10 @@ static bool hasItemHandlePoint(BzTile tile) {
case 8199:
case 8200:
case 8201:
case 8448:
case 8450:
case 8451:
case 8452:
return true;
default: return false;
}
@@ -1686,6 +1686,10 @@ static Vector2 getItemHandlePoint(BzTile tile) {
case 8199: return (Vector2) {5, 11};
case 8200: return (Vector2) {4, 12};
case 8201: return (Vector2) {4, 12};
case 8448: return (Vector2) {6, 9};
case 8450: return (Vector2) {5, 11};
case 8451: return (Vector2) {4, 12};
case 8452: return (Vector2) {4, 12};
default: return (Vector2) {0.0f, 0.0f};
}
}
@@ -1703,6 +1707,8 @@ static bool hasEntityHitBoxRec(BzTile tile) {
case 5891:
case 6146:
case 6147:
case 6400:
case 6401:
case 6402:
case 6403:
case 6656:
@@ -1728,6 +1734,8 @@ static Rectangle getEntityHitBoxRec(BzTile tile) {
case 5891: return (Rectangle) {6, 2, 4, 10};
case 6146: return (Rectangle) {6, 2, 4, 10};
case 6147: return (Rectangle) {6, 2, 4, 10};
case 6400: return (Rectangle) {4, 2, 8, 10};
case 6401: return (Rectangle) {4, 2, 8, 10};
case 6402: return (Rectangle) {6, 2, 4, 10};
case 6403: return (Rectangle) {6, 2, 4, 10};
case 6656: return (Rectangle) {6, 2, 4, 10};