Add soldiers

This commit is contained in:
2024-01-23 20:31:23 +01:00
parent 777ebeadc4
commit 07d1852fb9
9 changed files with 313 additions and 36 deletions

View File

@@ -482,6 +482,89 @@ typedef enum AnimType {
ANIM_NONE = -1,
} AnimType;
static EntityType getTileEntity(BzTileID tile) {
switch (tile) {
case 27:
case 28:
case 29:
case 30:
case 31:
case 32:
case 33:
case 34:
case 35:
case 36:
return ENTITY_WORKER;
case 539:
case 540:
case 541:
case 542:
case 543:
case 544:
case 545:
case 546:
case 547:
case 548:
return ENTITY_SOLDIER;
case 1051:
case 1052:
case 1053:
case 1054:
case 1055:
case 1056:
case 1057:
case 1058:
case 1059:
case 1060:
return ENTITY_WARRIOR;
case 1563:
case 1564:
case 1565:
case 1566:
case 1567:
case 1568:
case 1569:
case 1570:
case 1571:
case 1572:
return ENTITY_MAGE;
case 2075:
case 2076:
case 2077:
case 2078:
case 2079:
case 2080:
case 2081:
case 2082:
case 2083:
case 2084:
return ENTITY_ORC;
case 2587:
case 2588:
case 2589:
case 2590:
case 2591:
case 2592:
case 2593:
case 2594:
case 2595:
case 2596:
return ENTITY_GOBLIN;
case 7424:
return ENTITY_WOOD;
case 7425:
return ENTITY_STONE;
case 7426:
return ENTITY_APPLE;
case 7427:
return ENTITY_GOLD;
case 7428:
return ENTITY_POP;
default:
return ENTITY_COUNT;
}
}
static BzTileID getEntityTile(EntityType type) {
switch (type) {
case ENTITY_WORKER: return 27;
@@ -813,6 +896,7 @@ static Rectangle getTextureRect(BzTileID tile) {
case 2596:
base.width *= 1;
base.height *= 2;
base.y -= 16;
break;
default: break;
}