Browse Source

Make Entity variable members private.

legacy
Sam Hocevar sam 14 years ago
parent
commit
1ae1693d52
3 changed files with 7 additions and 5 deletions
  1. +5
    -3
      src/entity.h
  2. +1
    -1
      src/font.cpp
  3. +1
    -1
      src/tileset.cpp

+ 5
- 3
src/entity.h View File

@@ -32,13 +32,11 @@ protected:
virtual ~Entity();

virtual char const *GetName();
inline int IsDestroying() { return destroy; }

virtual void TickGame(float deltams);
virtual void TickDraw(float deltams);

Entity *gamenext, *drawnext, *autonext;
int ref, autorelease, destroy;

enum
{
GAMEGROUP_BEFORE = 0,
@@ -75,6 +73,10 @@ protected:
}
state;
#endif

private:
Entity *gamenext, *drawnext, *autonext;
int ref, autorelease, destroy;
};

#endif // __DH_ENTITY_H__


+ 1
- 1
src/font.cpp View File

@@ -84,7 +84,7 @@ void Font::TickDraw(float deltams)
{
Entity::TickDraw(deltams);

if (destroy)
if (IsDestroying())
{
if (data->img)
SDL_FreeSurface(data->img);


+ 1
- 1
src/tileset.cpp View File

@@ -103,7 +103,7 @@ void TileSet::TickDraw(float deltams)
{
Entity::TickDraw(deltams);

if (destroy)
if (IsDestroying())
{
if (data->img)
SDL_FreeSurface(data->img);


Loading…
Cancel
Save