00001 #include "stdlib.h"
00002 #include "animations.h"
00003 #include "resources/resources.h"
00004
00005 Animation animations[ANIM_COUNT];
00006
00007 #define ADD_ANIM(NAME, file) file,
00008
00009 static char* animfiles[ANIM_COUNT] = {
00010 "",
00011 #include "animations.inc"
00012 };
00013
00014 #undef ADD_ANIM
00015
00016 void initAnimations(void) {
00017 Tokenizer tokens;
00018 for (int i = 1; i < ANIM_COUNT; i++) {
00019 char *fname = resFindResource(animfiles[i]);
00020
00021 tokens.Open(fname);
00022 animations[i].Load(tokens);
00023 tokens.Close();
00024
00025 free(fname);
00026 }
00027 }