Changeset 104


Ignore:
Timestamp:
Aug 14, 2010, 11:15:37 PM (10 years ago)
Author:
sam
Message:

Do not tick destroyed objects.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ticker.cpp

    r101 r104  
    7676    for (int i = 0; i < Asset::GROUP_COUNT; i++)
    7777        for (Asset *a = data->list[i]; a; a = a->next)
    78             a->TickGame(delta_time);
     78            if (!a->destroy)
     79                a->TickGame(delta_time);
    7980}
    8081
     
    8485    for (int i = 0; i < Asset::GROUP_COUNT; i++)
    8586        for (Asset *a = data->list[i]; a; a = a->next)
    86             a->TickRender(delta_time);
     87            if (!a->destroy)
     88                a->TickRender(delta_time);
    8789}
    8890
  • trunk/src/tileset.h

    r100 r104  
    77// The TileSet class
    88// -----------------
    9 // A TileSet contains the information necesary to blit tiles to the game
    10 // screen.
     9// A TileSet is a collection of tiles stored in a texture. Texture uploading
     10// and freeing is done in the render tick method. When the refcount drops to
     11// zero, the texture is freed.
    1112//
    1213
Note: See TracChangeset for help on using the changeset viewer.