summaryrefslogtreecommitdiff
path: root/SpriteObjects.cpp
diff options
context:
space:
mode:
authorJapa2011-03-05 17:07:51 +0000
committerJapa2011-03-05 17:07:51 +0000
commitfcb3c1858a749013fc56c0f31ae6e604cbab97e5 (patch)
tree5a49219f72a3887ea7384524a87b036f580fded4 /SpriteObjects.cpp
parent189820b91ca21ed7da4e8063be0c932bbfc92e8f (diff)
downloadstonesense-fcb3c1858a749013fc56c0f31ae6e604cbab97e5.tar.gz
stonesense-fcb3c1858a749013fc56c0f31ae6e604cbab97e5.tar.bz2
stonesense-fcb3c1858a749013fc56c0f31ae6e604cbab97e5.tar.xz
Fixed some color stuff arising from allegro's shift to premultiplied alpha.
Diffstat (limited to 'SpriteObjects.cpp')
-rw-r--r--SpriteObjects.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/SpriteObjects.cpp b/SpriteObjects.cpp
index a63e861..ddd38a5 100644
--- a/SpriteObjects.cpp
+++ b/SpriteObjects.cpp
@@ -676,9 +676,9 @@ void c_sprite::draw_world_offset(int x, int y, int z, Block * b, int tileoffset,
if(chop && ( halftile == HALFTILECHOP))
{
if(fileindex < 0)
- al_draw_tinted_bitmap_region(defaultsheet, shade_color, sheetx, sheety+WALL_CUTOFF_HEIGHT, spritewidth, spriteheight-WALL_CUTOFF_HEIGHT, drawx + offset_x + offset_user_x, drawy + offset_user_y + (offset_y - WALLHEIGHT)+WALL_CUTOFF_HEIGHT, 0);
+ al_draw_tinted_bitmap_region(defaultsheet, premultiply(shade_color), sheetx, sheety+WALL_CUTOFF_HEIGHT, spritewidth, spriteheight-WALL_CUTOFF_HEIGHT, drawx + offset_x + offset_user_x, drawy + offset_user_y + (offset_y - WALLHEIGHT)+WALL_CUTOFF_HEIGHT, 0);
else
- al_draw_tinted_bitmap_region(getImgFile(fileindex), shade_color, sheetx, (sheety)+WALL_CUTOFF_HEIGHT, spritewidth, spriteheight-WALL_CUTOFF_HEIGHT, drawx + offset_x + offset_user_x, drawy + offset_user_y + (offset_y - WALLHEIGHT)+WALL_CUTOFF_HEIGHT, 0);
+ al_draw_tinted_bitmap_region(getImgFile(fileindex), premultiply(shade_color), sheetx, (sheety)+WALL_CUTOFF_HEIGHT, spritewidth, spriteheight-WALL_CUTOFF_HEIGHT, drawx + offset_x + offset_user_x, drawy + offset_user_y + (offset_y - WALLHEIGHT)+WALL_CUTOFF_HEIGHT, 0);
//draw cut-off floor thing
al_draw_bitmap_region(IMGObjectSheet,
TILEWIDTH * SPRITEFLOOR_CUTOFF, 0,
@@ -690,9 +690,9 @@ void c_sprite::draw_world_offset(int x, int y, int z, Block * b, int tileoffset,
if((isoutline == OUTLINENONE) || ((isoutline == OUTLINERIGHT) && (b->depthBorderNorth)) || ((isoutline == OUTLINELEFT) && (b->depthBorderWest)) || ((isoutline == OUTLINEBOTTOM) && (b->depthBorderDown)))
{
if(fileindex < 0)
- al_draw_tinted_bitmap_region(defaultsheet, shade_color, sheetx, sheety, spritewidth, spriteheight, drawx + offset_x + offset_user_x, drawy + offset_user_y + (offset_y - WALLHEIGHT), 0);
+ al_draw_tinted_bitmap_region(defaultsheet, premultiply(shade_color), sheetx, sheety, spritewidth, spriteheight, drawx + offset_x + offset_user_x, drawy + offset_user_y + (offset_y - WALLHEIGHT), 0);
else
- al_draw_tinted_bitmap_region(getImgFile(fileindex), shade_color, sheetx, sheety, spritewidth, spriteheight, drawx + offset_x + offset_user_x, drawy + offset_user_y + (offset_y - WALLHEIGHT), 0);
+ al_draw_tinted_bitmap_region(getImgFile(fileindex), premultiply(shade_color), sheetx, sheety, spritewidth, spriteheight, drawx + offset_x + offset_user_x, drawy + offset_user_y + (offset_y - WALLHEIGHT), 0);
}
if(needoutline)
{