Uzebox / uzebox

A retro-minimalist game console engine for the ATMega644
http://uzebox.org
126 stars 43 forks source link

gconvert: Tile defines #57

Closed flaviozavan closed 8 years ago

flaviozavan commented 8 years ago

It works similar to maps. For example, adding this section to the xml:

<defines>
<define def-name="SKY_TILE" left="0" top="10"/>
<define def-name="ARROW_TILE" left="10" top="0"/>
<define def-name="PAINTED_TILE" left="11" top="0"/>
<define def-name="PERIOD_TILE" left="14" top="0"/>
<define def-name="HIT_TILE" left="3" top="10"/>
<define def-name="NON_FIRE_TILE" left="1" top="11"/>
<define def-name="FIRE_TILE" left="2" top="11"/>
<define def-name="CRACK_TILE" left="3" top="11"/>
<define def-name="T_TILE" left="0" top="13"/>
<define def-name="B_TILE" left="1" top="13"/>
<define def-name="L_TILE" left="2" top="13"/>
<define def-name="R_TILE" left="3" top="13"/>
<define def-name="TL_TILE" left="4" top="13"/>
<define def-name="BL_TILE" left="5" top="13"/>
<define def-name="BR_TILE" left="6" top="13"/>
<define def-name="TR_TILE" left="7" top="13"/>
<define def-name="NO_TILE" left="8" top="13"/>
<define def-name="ABOUT_TILE" left="2" top="20"/>
<define def-name="CAT_TILE" left="0" top="21"/>
<define def-name="RED_BALL_TILE" left="1" top="21"/>
<define def-name="GREEN_BALL_TILE" left="2" top="21"/>
<define def-name="BLOCK_TILE" left="0" top="22"/>
<define def-name="BLOODY_BLOCK_TILE" left="1" top="22"/>
</defines>

Will result in:

#define SKY_TILE 187
#define ARROW_TILE 10
#define PAINTED_TILE 11
#define PERIOD_TILE 14
#define HIT_TILE 189
#define NON_FIRE_TILE 190
#define FIRE_TILE 191
#define CRACK_TILE 192
#define T_TILE 193
#define B_TILE 194
#define L_TILE 195
#define R_TILE 196
#define TL_TILE 197
#define BL_TILE 198
#define BR_TILE 199
#define TR_TILE 200
#define NO_TILE 201
#define ABOUT_TILE 240
#define CAT_TILE 241
#define RED_BALL_TILE 242
#define GREEN_BALL_TILE 243
#define BLOCK_TILE 244
#define BLOODY_BLOCK_TILE 244