diff options
author | celestar <celestar@openttd.org> | 2005-07-28 09:17:32 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2005-07-28 09:17:32 +0000 |
commit | 04f4d8237b879e3bb7c61a84cfbb5146cd408111 (patch) | |
tree | e279dbeda45e111fee0148b401cba8615f3adaec /table | |
parent | 139f0c95ca77b7c28510e92c3230495f88806cd9 (diff) | |
download | openttd-04f4d8237b879e3bb7c61a84cfbb5146cd408111.tar.xz |
(svn r2736) -Codechange: De-mystified GfxDrawFillRect a bit, and used enums from table/sprites.h. You can now change the number of bits used for sprites and switches in the SpriteSetup enum and the rest should work automagically. Can be used to increase the number of active sprites to 2^19 in case there are no colortables (recolor sprites) in any newgrf. We should possibly move the the colortables to an own list, but how to detect them in a newgrf.
Diffstat (limited to 'table')
-rw-r--r-- | table/sprites.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/table/sprites.h b/table/sprites.h index 421ad74ce..82426efcb 100644 --- a/table/sprites.h +++ b/table/sprites.h @@ -984,6 +984,12 @@ enum Modifiers { PALETTE_MODIFIER_TRANSPARENT = 1 << TRANSPARENT_BIT, ///this bit is set when a recoloring process is in action PALETTE_MODIFIER_COLOR = 1 << RECOLOR_BIT, + + //This is used for the GfxFillRect function + ///Used to draw a "grey out" rectangle. @see GfxFillRect + PALETTE_MODIFIER_GREYOUT = 1 << TRANSPARENT_BIT, + ///Set when a colortable mode is used. @see GfxFillRect + USE_COLORTABLE = 1 << RECOLOR_BIT, }; /** Masks needed for sprite operations. @@ -997,6 +1003,8 @@ enum SpriteMasks { SPRITE_MASK = MAX_SPRITES, ///The mask for the auxiliary sprite (the one that takes care of recoloring) PALETTE_SPRITE_MASK = ((1 << PALETTE_SPRITE_WIDTH) - 1) << PALETTE_SPRITE_START, + ///Mask for the auxiliary sprites if it is locate in the LSBs + COLORTABLE_MASK = (1 << PALETTE_SPRITE_WIDTH) - 1 }; assert_compile( (1 << TRANSPARENT_BIT & SPRITE_MASK) == 0 ); |