diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-02-01 22:59:06 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-02-01 22:59:06 +0000 |
| commit | 6d4e1eae16b84918009625a866104ec26a234277 (patch) | |
| tree | a340a8a547a60c9f63c8dfafe8909242f9c9bbd8 /src/arena.c | |
nahranie tarballu tuxanci-ng na SVN server
Dusan Durech ( Oroborus )
git-svn-id: http://opensvn.csie.org/tuxanci_ng@1 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/arena.c')
| -rw-r--r-- | src/arena.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/arena.c b/src/arena.c new file mode 100644 index 0000000..320a697 --- /dev/null +++ b/src/arena.c @@ -0,0 +1,37 @@ + +#include <stdlib.h> +#include <assert.h> +#include <string.h> + +#include "arena.h" +#include "list.h" +#include "tux.h" +#include "shot.h" +#include "wall.h" +#include "item.h" + +arena_t* newArena() +{ + arena_t *new; + new = malloc( sizeof(arena_t) ); + + new->background = NULL; + strcpy(new->music, ""); + + new->listTux = newList(); + new->listShot = newList(); + new->listWall = newList(); + new->listItem = newList(); + + return new; +} + +void destroyArena(arena_t *p) +{ + destroyListItem(p->listTux, destroyTux); + destroyListItem(p->listShot, destroyShot); + destroyListItem(p->listWall, destroyWall); + destroyListItem(p->listItem, destroyItem); + + free(p); +} |