Obstacle_t Struct Reference

The representation of impassible objects in the game world. More...

#include <obstacle.h>

Collaboration diagram for Obstacle_t:

Collaboration graph
[legend]

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.

Detailed Description

The representation of impassible objects in the game world.

Screen and game coordinates are kept separate in order to allow a scaled version of the game to be displayed.

Author:
Jeff Jackowski

Definition at line 32 of file obstacle.h.


Field Documentation

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().

RenderItem Obstacle_t::ri

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().


The documentation for this struct was generated from the following file:
Generated on Mon May 28 04:41:44 2007 for Retro Tank Super Attack by  doxygen 1.5.2