projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
a first implementation of doors to switch between sectors
[supertux.git]
/
src
/
badguy.cpp
diff --git
a/src/badguy.cpp
b/src/badguy.cpp
index
97913c7
..
cfdc7ac
100644
(file)
--- a/
src/badguy.cpp
+++ b/
src/badguy.cpp
@@
-984,19
+984,14
@@
BadGuy::draw(DrawingContext& context)
if(sprite == 0)
return;
if(sprite == 0)
return;
- sprite->draw(context, Vector(base.x, base.y), LAYER_OBJECTS);
-#if 0
- Sprite* sprite = (dir == LEFT) ? sprite_left : sprite_right;
if(dying == DYING_FALLING && physic.get_velocity_y() < 0)
if(dying == DYING_FALLING && physic.get_velocity_y() < 0)
- sprite->draw(
viewport.world2screen(Vector(base.x, base.y)), SD_
VERTICAL_FLIP);
+ sprite->draw(
context, Vector(base.x, base.y), LAYER_OBJECTS,
VERTICAL_FLIP);
else
else
- sprite->draw(viewport.world2screen(Vector(base.x, base.y)));
-#endif
+ sprite->draw(context, Vector(base.x, base.y), LAYER_OBJECTS);
- float scroll_x = context.get_translation().x;
- float scroll_y = context.get_translation().y;
if(debug_mode)
if(debug_mode)
- fillrect(base.x - scroll_x, base.y - scroll_y, base.width, base.height, 75,0,75, 150);
+ context.draw_filled_rect(Vector(base.x, base.y),
+ Vector(base.width, base.height), Color(75,0,75, 150), LAYER_OBJECTS+1);
}
void
}
void