Add particles!

This commit is contained in:
2024-01-29 20:01:36 +01:00
parent a633c9cbdf
commit df581dcb9d
14 changed files with 354 additions and 2 deletions

View File

@@ -34,6 +34,45 @@ static OwnerType getOwnerType(BzTileID tile) {
}
}
typedef enum ParticleType {
PARTICLE_NONE = -1,
PARTICLE_CIRCLE,
PARTICLE_SMALL_SQUARE,
PARTICLE_SQUARE,
PARTICLE_COUNT,
} ParticleType;
static BzTileID getParticleTypeTile(ParticleType type) {
switch (type) {
case PARTICLE_SQUARE: return 1559;
case PARTICLE_CIRCLE: return 1560;
case PARTICLE_SMALL_SQUARE: return 1561;
default: return -1;
}
}
static ParticleType getParticleType(BzTileID tile) {
switch (tile) {
case 1559:
return PARTICLE_SQUARE;
case 1560:
return PARTICLE_CIRCLE;
case 1561:
return PARTICLE_SMALL_SQUARE;
default:
return PARTICLE_COUNT;
}
}
static const char *getParticleTypeStr(ParticleType type) {
switch (type) {
case PARTICLE_SQUARE: return "square";
case PARTICLE_CIRCLE: return "circle";
case PARTICLE_SMALL_SQUARE: return "small_square";
default: return NULL;
}
}
typedef enum TerrainType {
TERRAIN_NONE = -1,
TERRAIN_GOLD_ORE,