Mercurial > hg > Members > koba > t_dandy
view StateList.c @ 55:2c33aa6a4a37
debug global_alloc.but new bugs appear
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 28 Jan 2011 19:05:00 +0900 |
parents | 3acdeb3dc3e8 |
children | a80422eb44a9 |
line wrap: on
line source
#include "Character.h" #include "Character_state.h" #include "Func.h" #include "StateList.h" StateList state_list[LIST_NUM]; int GetStateNum(int task_num) { int num = task_num % LIST_NUM; return num; } static void SetTaskState(int task_num, CHARACTER *(state)(CHARACTER *chara), const char *name) { int num = GetStateNum(task_num); state_list[num].state = state; state_list[num].name = name; } void initStateList() { SetTaskState(DELETE_CHARA, delete_chara, "delete_chara"); SetTaskState(STATE0, chara_state0, "chara_state0"); SetTaskState(STATE1, chara_state1, "chara_state1"); SetTaskState(STATE2, chara_state2, "chara_state2"); SetTaskState(STATE3, chara_state3, "chara_state3"); SetTaskState(STATE4, chara_state4, "chara_state4"); SetTaskState(STATE5, chara_state5, "chara_state5"); SetTaskState(STATE6, chara_state6, "chara_state6"); SetTaskState(STATE6, chara_state7, "chara_state7"); SetTaskState(STATE6, chara_state8, "chara_state8"); SetTaskState(STATE6, chara_state9, "chara_state9"); SetTaskState(STATE6, chara_state10, "chara_state10"); SetTaskState(STATE6, chara_state11, "chara_state11"); SetTaskState(STATE6, chara_state12, "chara_state12"); SetTaskState(STATE7, chara_state13, "chara_state13"); SetTaskState(STATE20, chara_state20, "chara_state20"); SetTaskState(STATE20, chara_state21, "chara_state21"); SetTaskState(STATE20, chara_state22, "chara_state22"); SetTaskState(STATE20, chara_state23, "chara_state23"); SetTaskState(STATE20, chara_state24, "chara_state24"); SetTaskState(STATE20, chara_state25, "chara_state25"); SetTaskState(STATE20, chara_state26, "chara_state26"); SetTaskState(STATE20, chara_state27, "chara_state27"); SetTaskState(STATE20, chara_state28, "chara_state28"); SetTaskState(STATE20, chara_state29, "chara_state29"); SetTaskState(STATE20, chara_state30, "chara_state30"); SetTaskState(STATE20, chara_state31, "chara_state31"); SetTaskState(STATE20, chara_state32, "chara_state32"); SetTaskState(STATE20, chara_state33, "chara_state33"); SetTaskState(STATE20, chara_state34, "chara_state34"); SetTaskState(STATE20, chara_state35, "chara_state35"); SetTaskState(STATE20, chara_state40, "chara_state40"); SetTaskState(STATE20, chara_state41, "chara_state41"); SetTaskState(STATE400, chara_state400, "chara_state400"); SetTaskState(STATE400, chara_state401, "chara_state401"); SetTaskState(STATE400, chara_state402, "chara_state402"); SetTaskState(STATE410, chara_state410, "chara_state410"); SetTaskState(STATE411, chara_state411, "chara_state411"); SetTaskState(STATE500, chara_state500, "chara_state500"); SetTaskState(STATE501, chara_state501, "chara_state501"); SetTaskState(STATE600, chara_state600, "chara_state600"); SetTaskState(STATE601, chara_state601, "chara_state601"); SetTaskState(STATE602, chara_state602, "chara_state602"); }