From ed86c3d818e8f61b2fe5cf7344a6db556ad87a34 Mon Sep 17 00:00:00 2001 From: belugas Date: Fri, 24 Mar 2006 18:16:39 +0000 Subject: (svn r4092) CodeChange : Named sprites instead of magic numbers plus create/use helper macro/enum for recoloring scheme --- table/sprites.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'table') 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), -- cgit v1.2.3-54-g00ecf