Changeset - r14281:b6400ec20242
[Not reviewed]
master
0 1 0
frosch - 15 years ago 2010-01-17 01:22:43
frosch@openttd.org
(svn r18843) -Codechange: Only NewGRF supplied spritelayouts use SPRITE_MODIFIER_CUSTOM_SPRITE, so no extra tests needed.
1 file changed with 2 insertions and 10 deletions:
0 comments (0 inline, 0 general)
src/sprite.cpp
Show inline comments
 
@@ -36,11 +36,7 @@ void DrawCommonTileSeq(const TileInfo *t
 
		/* Stop drawing sprite sequence once we meet a sprite that doesn't have to be opaque */
 
		if (IsInvisibilitySet(to) && !HasBit(image, SPRITE_MODIFIER_OPAQUE)) return;
 

	
 
		if (newgrf_offset == 0 || !HasBit(image, SPRITE_MODIFIER_CUSTOM_SPRITE)) {
 
			image += orig_offset;
 
		} else {
 
			image += newgrf_offset;
 
		}
 
		image += (HasBit(image, SPRITE_MODIFIER_CUSTOM_SPRITE) ? newgrf_offset : orig_offset);
 

	
 
		SpriteID pal = SpriteLayoutPaletteTransform(image, dtss->image.pal, default_palette);
 

	
 
@@ -75,11 +71,7 @@ void DrawCommonTileSeqInGUI(int x, int y
 

	
 
	foreach_draw_tile_seq(dtss, dts->seq) {
 
		SpriteID image = dtss->image.sprite;
 
		if (newgrf_offset == 0 || !HasBit(image, SPRITE_MODIFIER_CUSTOM_SPRITE)) {
 
			image += orig_offset;
 
		} else {
 
			image += newgrf_offset;
 
		}
 
		image += (HasBit(image, SPRITE_MODIFIER_CUSTOM_SPRITE) ? newgrf_offset : orig_offset);
 

	
 
		SpriteID pal = SpriteLayoutPaletteTransform(image, dtss->image.pal, default_palette);
 

	
0 comments (0 inline, 0 general)