#include <obstacle.h>
Collaboration diagram for Obstacle_t:
Data Fields | |
SDL_Rect | loc |
The location of the obstacle in game coordinates. | |
RenderItem | ri |
The data used by the rendering system to draw the obstacle. |
Screen and game coordinates are kept separate in order to allow a scaled version of the game to be displayed.
Definition at line 32 of file obstacle.h.
SDL_Rect Obstacle_t::loc |
The location of the obstacle in game coordinates.
These coordinates do not include a subpixel position.
Definition at line 46 of file obstacle.h.
Referenced by HandleObstacle(), IsCollidingObstacle(), MakeBuffers(), and ObstacleInit().
The data used by the rendering system to draw the obstacle.
The coordinates used in ri are screen coordinates and not game coordinates; they should not be used in game play code and need to be kept in sync with the game coorinates. The only times the coordinates should need to be synchronized are when the obstacles are first created, and if the obstacles move on the battle field (but they shouldn't).
Definition at line 41 of file obstacle.h.
Referenced by ObstacleInit(), and ObstacleUninit().