diff options
author | belugas <belugas@openttd.org> | 2006-03-24 18:16:39 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2006-03-24 18:16:39 +0000 |
commit | 26a5b628656eb0fb134553d14c6c884bc53eacf4 (patch) | |
tree | 0b28a6b60c9227ace9353683266a32927594287b /table | |
parent | 74853e619a34f481d141b586a5b2c94fe474b5a0 (diff) | |
download | openttd-26a5b628656eb0fb134553d14c6c884bc53eacf4.tar.xz |
(svn r4092) CodeChange : Named sprites instead of magic numbers plus create/use helper macro/enum for recoloring scheme
Diffstat (limited to 'table')
-rw-r--r-- | table/sprites.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/table/sprites.h b/table/sprites.h index 1de54ba40..34fda3f64 100644 --- a/table/sprites.h +++ b/table/sprites.h @@ -700,6 +700,9 @@ enum Sprites { SPR_FLAG_VEH_STOPPED = 3090, SPR_FLAG_VEH_RUNNING = 3091, + SPR_VEH_BUS_SW_VIEW = 3097, + SPR_VEH_BUS_SIDE_VIEW = 3098, + /* Rotor sprite numbers */ SPR_ROTOR_STOPPED = 3901, SPR_ROTOR_MOVING_1 = 3902, @@ -1133,6 +1136,10 @@ assert_compile( (1 << RECOLOR_BIT & PALETTE_SPRITE_MASK) == 0 ); assert_compile( (PALETTE_SPRITE_MASK & SPRITE_MASK) == 0 ); assert_compile( SPRITE_WIDTH + PALETTE_SPRITE_WIDTH <= 30 ); +enum Recoloring { + PALETTE_RECOLOR_START = 0x307, +}; + #define PALETTE_RECOLOR_SPRITE(a) (a << PALETTE_SPRITE_START | PALETTE_MODIFIER_COLOR) enum PaletteSprites { //note: these numbers are already the modified once the renderer needs. @@ -1149,8 +1156,8 @@ enum PaletteSprites { //use this if you add stuff to the value, so that the resulting color //is not a fixed value. //NOTE THAT THE SWITCH 0x8000 is NOT present in _TO_COLORS yet! - PALETTE_TO_COLORS = 0x307 << PALETTE_SPRITE_START, - PALETTE_TO_DARK_BLUE = PALETTE_RECOLOR_SPRITE(0x307), + PALETTE_TO_COLORS = PALETTE_RECOLOR_START << PALETTE_SPRITE_START, + PALETTE_TO_DARK_BLUE = PALETTE_RECOLOR_SPRITE(PALETTE_RECOLOR_START), PALETTE_TO_PALE_GREEN = PALETTE_RECOLOR_SPRITE(0x308), PALETTE_TO_PINK = PALETTE_RECOLOR_SPRITE(0x309), PALETTE_TO_YELLOW = PALETTE_RECOLOR_SPRITE(0x30A), |