summaryrefslogtreecommitdiff
path: root/src/item.c
diff options
context:
space:
mode:
authororoborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-05-28 19:25:15 +0000
committeroroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-05-28 19:25:15 +0000
commite5120505b21ff38dc25efcad129a440bbfa9996d (patch)
tree583e0683fb1f71f65bb81b0fcdf2e71587e1fe46 /src/item.c
parentc94fd664bba352732bf0e5c9a77e709b49f1aa4f (diff)
- zrychlenie hry, bez toho aby sa menila rychlost hlavneho casovaca
- oprava chyby v ID managery - ID manager spravuje ID-y pre vsetky objekty git-svn-id: http://opensvn.csie.org/tuxanci_ng@55 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/item.c')
-rw-r--r--src/item.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/item.c b/src/item.c
index 801a979..63e7890 100644
--- a/src/item.c
+++ b/src/item.c
@@ -31,7 +31,6 @@ static SDL_Surface *g_item[ITEM_COUNT];
#endif
static bool_t isItemInit = FALSE;
-static list_t *listID;
bool_t isItemInicialized()
{
@@ -59,7 +58,7 @@ void initItem()
g_item[BONUS_4X] = addImageData("item.bonus.4x.png", IMAGE_ALPHA, "item_4x_speed", IMAGE_GROUP_BASE);
g_item[BONUS_HIDDEN] = addImageData("item.bonus.hidden.png", IMAGE_ALPHA, "item_hidden_speed", IMAGE_GROUP_BASE);
#endif
- listID = newListID();
+
isItemInit = TRUE;
}
@@ -72,7 +71,7 @@ item_t* newItem(int x, int y, int type, int author_id)
new->type = type;
- new->id = getNewID(listID);
+ new->id = getNewID();
new->x = x;
new->y = y;
new->frame = 0;
@@ -153,7 +152,7 @@ item_t* getItemID(list_t *listItem, int id)
void replaceItemID(item_t *item, int id)
{
- replaceID(listID, item->id, id);
+ replaceID(item->id, id);
item->id = id;
}
@@ -620,12 +619,11 @@ void eventGiveTuxListItem(tux_t *tux, list_t *listItem)
void destroyItem(item_t *p)
{
assert( p != NULL );
- delID(listID, p->id);
+ delID(p->id);
free(p);
}
void quitItem()
{
- destroyListID(listID);
isItemInit = FALSE;
}