X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fobject%2Fgameobjs.cpp;h=e863be38ca4704f779e3d669119a7faf440d1066;hb=864c93e01ec366f730b3ebad08d5c52d6a9363b6;hp=bce0f212340e7efb8538ca73120940ef21e78434;hpb=ef57479f613b900b73eba8e8f4d026aae0de25cc;p=supertux.git diff --git a/src/object/gameobjs.cpp b/src/object/gameobjs.cpp index bce0f2123..e863be38c 100644 --- a/src/object/gameobjs.cpp +++ b/src/object/gameobjs.cpp @@ -24,17 +24,17 @@ #include #include -#include "app/globals.h" #include "tile.h" #include "tile_manager.h" -#include "gameloop.h" +#include "game_session.h" #include "gameobjs.h" -#include "special/sprite_manager.h" +#include "sprite/sprite_manager.h" #include "resources.h" #include "sector.h" #include "tilemap.h" #include "video/drawing_context.h" #include "camera.h" +#include "main.h" BouncyCoin::BouncyCoin(const Vector& pos) : position(pos) @@ -222,8 +222,8 @@ Particles::action(float elapsed_time) (*i)->vel.x += accel.x * elapsed_time; (*i)->vel.y += accel.y * elapsed_time; - if((*i)->pos.x < camera.x || (*i)->pos.x > screen->w + camera.x || - (*i)->pos.y < camera.y || (*i)->pos.y > screen->h + camera.y) { + if((*i)->pos.x < camera.x || (*i)->pos.x > SCREEN_WIDTH + camera.x || + (*i)->pos.y < camera.y || (*i)->pos.y > SCREEN_HEIGHT + camera.y) { delete (*i); i = particles.erase(i); } else {