diff --git a/config/GMPE01_00/symbols.txt b/config/GMPE01_00/symbols.txt index f5df7bf8..ac3a0cdd 100644 --- a/config/GMPE01_00/symbols.txt +++ b/config/GMPE01_00/symbols.txt @@ -4932,27 +4932,27 @@ lbl_8012F020 = .data:0x8012F020; // type:object size:0x94 lbl_8012F0B4 = .data:0x8012F0B4; // type:object size:0x11 data:string lbl_8012F0C5 = .data:0x8012F0C5; // type:object size:0x3A lbl_8012F0FF = .data:0x8012F0FF; // type:object size:0x31 -seqInfo = .data:0x8012F130; // type:object size:0x1DC scope:local +seqInfoTbl = .data:0x8012F130; // type:object size:0x1DC scope:local seqType2SprTbl = .data:0x8012F30C; // type:object size:0x18 scope:local -seqTypeTbl = .data:0x8012F324; // type:object size:0x12 scope:local +mgSeqTypeTbl = .data:0x8012F324; // type:object size:0x12 scope:local lbl_8012F336 = .data:0x8012F336; // type:object size:0x53 scope:local data:string lbl_8012F389 = .data:0x8012F389; // type:object size:0x9 scope:local data:string lbl_8012F392 = .data:0x8012F392; // type:object size:0x9 scope:local data:string seqFontAlphaTbl = .data:0x8012F39B; // type:object size:0x35 scope:local data:string seqFontKanaTbl = .data:0x8012F3D0; // type:object size:0x52 scope:local data:string seqFontNumTbl = .data:0x8012F422; // type:object size:0xB scope:local data:string -lbl_8012F430 = .data:0x8012F430; // type:object size:0x14 -wordTbl = .data:0x8012F444; // type:object size:0x18 scope:local +letterBufTbl = .data:0x8012F430; // type:object size:0x14 scope:local +wordMgTbl = .data:0x8012F444; // type:object size:0x18 scope:local letterBattleOfs = .data:0x8012F45C; // type:object size:0x40 scope:local letter2vs2Ofs = .data:0x8012F49C; // type:object size:0x1C scope:local letterBowserOfs = .data:0x8012F4B8; // type:object size:0x38 scope:local -lbl_8012F4F0 = .data:0x8012F4F0; // type:object size:0xA data:string -charNameTbl = .data:0x8012F4FC; // type:object size:0x78 scope:local -lbl_8012F574 = .data:0x8012F574; // type:object size:0xA data:string -winStrTbl = .data:0x8012F580; // type:object size:0x18 scope:local +charMKoopaNameE = .data:0x8012F4F0; // type:object size:0xA scope:local data:string +winCharNameTbl = .data:0x8012F4FC; // type:object size:0x78 scope:local +wordChampionE = .data:0x8012F574; // type:object size:0xA scope:local data:string +winWordTbl = .data:0x8012F580; // type:object size:0x18 scope:local winPosOfs = .data:0x8012F598; // type:object size:0x50 scope:local practiceTbl = .data:0x8012F5E8; // type:object size:0xAC scope:local -practiceData = .data:0x8012F694; // type:object size:0xC scope:local +practicePosYTbl = .data:0x8012F694; // type:object size:0xC scope:local seqFXTbl = .data:0x8012F6A0; // type:object size:0xF0 scope:local lbl_8012F790 = .data:0x8012F790; // type:object size:0x15 data:string lbl_8012F7A5 = .data:0x8012F7A5; // type:object size:0x10 data:string @@ -5136,7 +5136,7 @@ lbl_801311C4 = .data:0x801311C4; // type:object size:0x24 VolumeTable = .data:0x801311E8; // type:object size:0x100 scope:local lbl_801312E8 = .data:0x801312E8; // type:object size:0x4D lbl_80131335 = .data:0x80131335; // type:object size:0x1B -MGInfoTable = .data:0x80131350; // type:object size:0xE00 data:2byte +mgInfoTbl = .data:0x80131350; // type:object size:0xE00 data:2byte lbl_80132150 = .data:0x80132150; // type:object size:0x40 lbl_80132190 = .data:0x80132190; // type:object size:0xC data:string lbl_8013219C = .data:0x8013219C; // type:object size:0xC data:string @@ -5521,7 +5521,7 @@ CZoomM = .bss:0x801901A0; // type:object size:0x40 omDLLinfoTbl = .bss:0x801901E0; // type:object size:0x50 sndFXBuf = .bss:0x80190230; // type:object size:0x200 scope:local charVoiceGroupStat = .bss:0x80190430; // type:object size:0x20 scope:local -seqStat = .bss:0x80190450; // type:object size:0x400 scope:local data:4byte +seqWorkData = .bss:0x80190450; // type:object size:0x400 scope:local data:4byte seqMaxTime = .bss:0x80190850; // type:object size:0x10 scope:local data:2byte esprite = .bss:0x80190860; // type:object size:0x600 data:2byte espanim = .bss:0x80190E60; // type:object size:0x1200 data:4byte @@ -5783,49 +5783,49 @@ lbl_801D34A4 = .sdata:0x801D34A4; // type:object size:0xC lbl_801D34B0 = .sdata:0x801D34B0; // type:object size:0x1 lbl_801D34B1 = .sdata:0x801D34B1; // type:object size:0x7 mgSeqInitF = .sdata:0x801D34B8; // type:object size:0x4 data:4byte -lbl_801D34BC = .sdata:0x801D34BC; // type:object size:0x7 data:string -lbl_801D34C3 = .sdata:0x801D34C3; // type:object size:0x3 data:byte -lbl_801D34C6 = .sdata:0x801D34C6; // type:object size:0x6 -lbl_801D34CC = .sdata:0x801D34CC; // type:object size:0x8 -lbl_801D34D4 = .sdata:0x801D34D4; // type:object size:0x6 -lbl_801D34DA = .sdata:0x801D34DA; // type:object size:0x8 data:string -lbl_801D34E2 = .sdata:0x801D34E2; // type:object size:0x6 data:string -lbl_801D34E8 = .sdata:0x801D34E8; // type:object size:0x4 -lbl_801D34EC = .sdata:0x801D34EC; // type:object size:0x6 data:string -lbl_801D34F2 = .sdata:0x801D34F2; // type:object size:0x6 -lbl_801D34F8 = .sdata:0x801D34F8; // type:object size:0x6 data:string -lbl_801D34FE = .sdata:0x801D34FE; // type:object size:0x5 -lbl_801D3503 = .sdata:0x801D3503; // type:object size:0x6 data:string -lbl_801D3509 = .sdata:0x801D3509; // type:object size:0x5 -lbl_801D350E = .sdata:0x801D350E; // type:object size:0x6 data:string -lbl_801D3514 = .sdata:0x801D3514; // type:object size:0x4 -lbl_801D3518 = .sdata:0x801D3518; // type:object size:0x6 data:string -lbl_801D351E = .sdata:0x801D351E; // type:object size:0x6 -lbl_801D3524 = .sdata:0x801D3524; // type:object size:0x5 data:string -lbl_801D3529 = .sdata:0x801D3529; // type:object size:0x7 -lbl_801D3530 = .sdata:0x801D3530; // type:object size:0x6 data:string -lbl_801D3536 = .sdata:0x801D3536; // type:object size:0x7 -lbl_801D353D = .sdata:0x801D353D; // type:object size:0x8 data:string -lbl_801D3545 = .sdata:0x801D3545; // type:object size:0x5 -lbl_801D354A = .sdata:0x801D354A; // type:object size:0x7 data:string -lbl_801D3551 = .sdata:0x801D3551; // type:object size:0x6 -lbl_801D3557 = .sdata:0x801D3557; // type:object size:0x5 data:string -lbl_801D355C = .sdata:0x801D355C; // type:object size:0x5 -lbl_801D3561 = .sdata:0x801D3561; // type:object size:0x8 data:string -lbl_801D3569 = .sdata:0x801D3569; // type:object size:0x4 -lbl_801D356D = .sdata:0x801D356D; // type:object size:0x4 data:string -lbl_801D3571 = .sdata:0x801D3571; // type:object size:0x5 -lbl_801D3576 = .sdata:0x801D3576; // type:object size:0x6 data:string -lbl_801D357C = .sdata:0x801D357C; // type:object size:0x7 -lbl_801D3583 = .sdata:0x801D3583; // type:object size:0x6 -lbl_801D3589 = .sdata:0x801D3589; // type:object size:0x7 data:string -lbl_801D3590 = .sdata:0x801D3590; // type:object size:0x3 -lbl_801D3593 = .sdata:0x801D3593; // type:object size:0x5 data:string -lbl_801D3598 = .sdata:0x801D3598; // type:object size:0x6 -lbl_801D359E = .sdata:0x801D359E; // type:object size:0x5 data:string -lbl_801D35A3 = .sdata:0x801D35A3; // type:object size:0x7 -lbl_801D35AA = .sdata:0x801D35AA; // type:object size:0x6 -lbl_801D35B0 = .sdata:0x801D35B0; // type:object size:0x6 data:string +wordStartE = .sdata:0x801D34BC; // type:object size:0x7 scope:local data:string +punctTbl = .sdata:0x801D34C3; // type:object size:0x3 scope:local data:byte +wordStartJ = .sdata:0x801D34C6; // type:object size:0x6 scope:local +wordFinishJ = .sdata:0x801D34CC; // type:object size:0x8 scope:local +wordDrawJ = .sdata:0x801D34D4; // type:object size:0x6 scope:local +wordFinishE = .sdata:0x801D34DA; // type:object size:0x8 scope:local data:string +wordDrawE = .sdata:0x801D34E2; // type:object size:0x6 scope:local data:string +charMarioNameJ = .sdata:0x801D34E8; // type:object size:0x4 scope:local +charMarioNameE = .sdata:0x801D34EC; // type:object size:0x6 scope:local data:string +charLuigiNameJ = .sdata:0x801D34F2; // type:object size:0x6 scope:local +charLuigiNameE = .sdata:0x801D34F8; // type:object size:0x6 scope:local data:string +charPeachNameJ = .sdata:0x801D34FE; // type:object size:0x5 scope:local +charPeachNameE = .sdata:0x801D3503; // type:object size:0x6 scope:local data:string +charYoshiNameJ = .sdata:0x801D3509; // type:object size:0x5 scope:local +charYoshiNameE = .sdata:0x801D350E; // type:object size:0x6 scope:local data:string +charWarioNameJ = .sdata:0x801D3514; // type:object size:0x4 scope:local +charWarioNameE = .sdata:0x801D3518; // type:object size:0x6 scope:local data:string +charDonkeyNameJ = .sdata:0x801D351E; // type:object size:0x6 scope:local +charDonkeyNameE = .sdata:0x801D3524; // type:object size:0x5 scope:local data:string +charDaisyNameJ = .sdata:0x801D3529; // type:object size:0x7 scope:local +charDaisyNameE = .sdata:0x801D3530; // type:object size:0x6 scope:local data:string +charWaluigiNameJ = .sdata:0x801D3536; // type:object size:0x7 scope:local +charWaluigiNameE = .sdata:0x801D353D; // type:object size:0x8 scope:local data:string +charKoopaNameJ = .sdata:0x801D3545; // type:object size:0x5 scope:local +charKoopaNameE = .sdata:0x801D354A; // type:object size:0x7 scope:local data:string +charKinopioNameJ = .sdata:0x801D3551; // type:object size:0x6 scope:local +charKinopioNameE = .sdata:0x801D3557; // type:object size:0x5 scope:local data:string +charHeihoNameJ = .sdata:0x801D355C; // type:object size:0x5 scope:local +charHeihoNameE = .sdata:0x801D3561; // type:object size:0x8 scope:local data:string +charTeresaNameJ = .sdata:0x801D3569; // type:object size:0x4 scope:local +charTeresaNameE = .sdata:0x801D356D; // type:object size:0x4 scope:local data:string +charNoko2NameJ = .sdata:0x801D3571; // type:object size:0x5 scope:local +charNoko2NameE = .sdata:0x801D3576; // type:object size:0x6 scope:local data:string +charMKoopaNameJ = .sdata:0x801D357C; // type:object size:0x7 scope:local +charKuriboNameJ = .sdata:0x801D3583; // type:object size:0x6 scope:local +charKuriboNameJ = .sdata:0x801D3589; // type:object size:0x7 scope:local data:string +wordWinJ = .sdata:0x801D3590; // type:object size:0x3 scope:local +wordWinE = .sdata:0x801D3593; // type:object size:0x5 scope:local data:string +wordLoseJ = .sdata:0x801D3598; // type:object size:0x6 scope:local +wordLoseE = .sdata:0x801D359E; // type:object size:0x5 scope:local data:string +wordChampionJ = .sdata:0x801D35A3; // type:object size:0x7 scope:local +wordPauseJ = .sdata:0x801D35AA; // type:object size:0x6 scope:local +wordPauseE = .sdata:0x801D35B0; // type:object size:0x6 scope:local data:string pauseStrTbl = .sdata:0x801D35B8; // type:object size:0x8 scope:local lbl_801D35C0 = .sdata:0x801D35C0; // type:object size:0x8 lbl_801D35C8 = .sdata:0x801D35C8; // type:object size:0x8 diff --git a/src/game/main.c b/src/game/main.c index 7fe5b41f..a528b60e 100644 --- a/src/game/main.c +++ b/src/game/main.c @@ -115,7 +115,7 @@ void HuSysVWaitSet(s16 vcount) minimumVcountf = vcount; } -s16 HuSysVWaitGet(void) +s16 HuSysVWaitGet(s16 param) { return (s16) minimumVcount; } diff --git a/src/game/minigame_seq.c b/src/game/minigame_seq.c new file mode 100644 index 00000000..d3ecb1cd --- /dev/null +++ b/src/game/minigame_seq.c @@ -0,0 +1,311 @@ +#include "game/armem.h" +#include "game/sprite.h" +#include "game/process.h" +#include "game/gamework_data.h" +#include "game/hsfman.h" + +#include "stdarg.h" + +extern s16 HuSysVWaitGet(s16 param); + +typedef struct seq_work SeqWork; + +typedef int (*SeqUpdateFunc)(SeqWork *work); +typedef int (*SeqInitFunc)(SeqWork *work, va_list params); + +typedef struct seq_work { + SeqUpdateFunc update; + char *data; + float x; + float y; + float scale_x; + float scale_y; + float unk_18; + float work_float[2]; + float unk_24; + s16 time; + s16 time_max; + s16 work_s16[4]; + s16 param[2]; + s16 type; + s16 sprite_grp[16]; + s16 sprite[16]; + u8 seq_no; + u8 stat; + u8 unk_7C; + u8 unk_7D; +} SeqWork; + +typedef struct seq_info { + SeqInitFunc init; + SeqUpdateFunc update; + float x; + float y; + float scale_x; + float scale_y; + s32 time_max; +} SeqInfo; + +static int SeqInitTimer(SeqWork *work, va_list params); +static int SeqUpdateTimer(SeqWork *work); + +static int SeqInitType2(SeqWork *work, va_list params); +static int SeqUpdateType2(SeqWork *work); + +static int SeqInitMGBasic(SeqWork *work, va_list params); +static int SeqUpdateMGBasic(SeqWork *work); +static int SeqInitMGCommon(SeqWork *work, va_list params); +static int SeqUpdateMG1vs3(SeqWork *work); +static int SeqUpdateMGBattle(SeqWork *work); +static int SeqUpdateMGStory(SeqWork *work); +static int SeqUpdateMG2vs2(SeqWork *work); +static int SeqUpdateMGBowser(SeqWork *work); + +static int SeqInitWin(SeqWork *work, va_list params); +static int SeqUpdateWin(SeqWork *work); +static int SeqInitDraw(SeqWork *work, va_list params); +static int SeqUpdateDraw(SeqWork *work); +static int SeqInitRecord(SeqWork *work, va_list params); +static int SeqUpdateRecord(SeqWork *work); + +static int SeqInitFlip(SeqWork *work, va_list params); +static int SeqUpdateFlip(SeqWork *work); + +s32 mgSeqInitF = -1; + +static SeqInfo seqInfoTbl[] = { + { NULL, NULL, 292.0f, 240.0f, 1.0f, 1.0f, 60 }, + { SeqInitTimer, SeqUpdateTimer, 292.0f, 64.0f, 1.0f, 1.0f, 60 }, + { SeqInitType2, SeqUpdateType2, 292.0f, 240.0f, 0.5f, 0.5f, 60 }, + { SeqInitMGBasic, SeqUpdateMGBasic, 292.0f, 240.0f, 1.0f, 1.0f, 180 }, + { SeqInitMGCommon, SeqUpdateMG1vs3, 292.0f, 240.0f, 1.0f, 1.0f, 180 }, + { SeqInitWin, SeqUpdateWin, 292.0f, 240.0f, 1.0f, 1.0f, 180 }, + { SeqInitMGCommon, SeqUpdateMGBattle, 292.0f, 240.0f, 1.0f, 1.0f, 180 }, + { SeqInitMGCommon, SeqUpdateMGStory, 292.0f, 240.0f, 1.0f, 1.0f, 180 }, + { SeqInitMGBasic, SeqUpdateMGBasic, 292.0f, 240.0f, 1.0f, 1.0f, 180 }, + { SeqInitMGCommon, SeqUpdateMG2vs2, 292.0f, 240.0f, 1.0f, 1.0f, 180 }, + { SeqInitFlip, SeqUpdateFlip, 292.0f, 240.0f, 1.0f, 1.0f, 180 }, + { SeqInitMGCommon, SeqUpdateMGBowser, 292.0f, 240.0f, 1.0f, 1.0f, 180 }, + { SeqInitWin, SeqUpdateWin, 292.0f, 240.0f, 1.0f, 1.0f, 180 }, + { SeqInitDraw, SeqUpdateDraw, 292.0f, 240.0f, 1.0f, 1.0f, 60 }, + { SeqInitRecord, SeqUpdateRecord, 292.0f, 240.0f, 1.0f, 1.0f, 180 }, + { NULL, NULL, 292.0f, 240.0f, 1.0f, 1.0f, 60 }, + { NULL, NULL, 292.0f, 240.0f, 1.0f, 1.0f, 60 }, +}; + +static s32 seqType2SprTbl[6] = { + 0, 0, 0, 0, 0, 0 +}; + +static s16 mgSeqTypeTbl[9] = { + 8, + 4, + 9, + 11, + 6, + 10, + 7, + 11, + 7 +}; + +static char lbl_8012F336[] = { + 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, + 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0xC0, + 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, + 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, + 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, + 0xD9, 0xDA, 0xDB, 0xDC, 0xA6, 0xDD, 0xA7, 0xA8, + 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB6, + 0xB7, 0xB8, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, + 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xCA, 0xCB, 0xCC, + 0xCD, 0xCE, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0x21, + 0x3F, 0xB0, 0x00 +}; + +static char lbl_8012F389[] = "x first\n"; +static char lbl_8012F392[] = "y first\n"; + +static char seqFontAlphaTbl[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; + +static char seqFontKanaTbl[] = { + 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, + 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, 0xBF, 0xC0, + 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, + 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, + 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, + 0xD9, 0xDA, 0xDB, 0xDC, 0xA6, 0xDD, 0xA7, 0xA8, + 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB6, + 0xB7, 0xB8, 0xB9, 0xBA, 0xBB, 0xBC, 0xBD, 0xBE, + 0xBF, 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xCA, 0xCB, + 0xCC, 0xCD, 0xCE, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, + 0xB0, 0x00 +}; + +static char seqFontNumTbl[] = "0123456789"; + + +static s32 *letterBufTbl[5] = { }; + +static char wordStartE[] = "START!"; + +static char punctTbl[] = "!?"; + +static char wordStartJ[] = { + 0xBD, 0xC0, 0xB0, 0xC4, 0x21, 0x00 +}; + +static char wordFinishJ[] = { + 0xCC, 0xA8, 0xC6, 0xAF, 0xBC, 0xAD, 0x21, 0x00 +}; + +static char wordDrawJ[] = { + 0xCB, 0xB7, 0xDC, 0xB9, 0x21, 0x00 +}; + +static char wordFinishE[] = "FINISH!"; +static char wordDrawE[] = "DRAW!"; + +static char *wordMgTbl[6] = { + wordStartJ, wordFinishJ, wordDrawJ, + wordStartE, wordFinishE, wordDrawE, +}; + +static s16 seqMaxTime[8]; +static SeqWork seqWorkData[8]; + +static s16 seqTimer; +static u8 seqDoneF; +u8 lbl_801D3D94; +static s16 seqSpeed; +static s16 seqPauseF; +static s32 seqRecordVal; +static s32 pauseWaitF; +static s32 pauseExitF; +static s32 pauseActiveF; +static Process *pauseProcess; +static s32 seqLanguage; + +void fn_80036BC8(void); + + +void MGSeqInit(void) +{ + int i; + SeqWork *work; + work = &seqWorkData[0]; + for(i=8; i!=0; i--, work++) { + work->seq_no = 0; + work->data = NULL; + } + seqPauseF = 0; + seqDoneF = 0; + lbl_801D3D94 = 0; + seqTimer = 30; + HuAR_DVDtoARAM(MAKE_DIR_NUM(DATADIR_GAMEMES)); + HuAR_DVDtoARAM(MAKE_DIR_NUM(DATADIR_MGCONST)); + while(HuARDMACheck()); + fn_80036BC8(); + mgSeqInitF = -1; + seqLanguage = GWLanguageGet(); +} + +void MGSeqMain(void) +{ + SeqInfo *info; + s32 i; + s32 j; + s32 alive_flag; + u8 stat; + SeqWork *work; + + seqSpeed = HuSysVWaitGet(seqSpeed); + if(Hu3DPauseF) { + return; + } + alive_flag = 0; + stat = 0; + work = &seqWorkData[0]; + for(i=0; i<8; i++, work++) { + if(work->stat == 0) { + continue; + } + if(work->update) { + alive_flag = work->update(work); + } else { + info = &seqInfoTbl[work->seq_no]; + if(work->seq_no != 0 && NULL != info->update) { + alive_flag = info->update(work); + } + } + if(!alive_flag) { + work->stat = 0; + if(!lbl_801D3D94) { + for(j=0; j<8; j++) { + if(seqWorkData[j].stat) { + break; + } + } + } + if(!work->data) { + HuMemDirectFree(work->data); + work->data = NULL; + } + } + stat |= work->stat; + } + if(!stat || stat & 0x4) { + if(seqTimer > 0) { + seqTimer -= seqSpeed; + } + } +} + +static s16 CreateSeq(u8 seq_no, va_list params) +{ + SeqWork *work; + SeqInfo *info; + int i; + int temp; + work = seqWorkData; + info = &seqInfoTbl[seq_no]; + for(i=0; i<8; i++, work++) { + if(work->stat == 0) { + break; + } + } + if(i >= 8) { + return -1; + } + work->stat |= 0x1; + if(work->data) { + HuMemDirectFree(work->data); + } + work->data = NULL; + work->seq_no = (s32)seq_no; + work->time = 0; + work->x = info->x; + work->y = info->y; + work->scale_x = info->scale_x; + work->scale_y = info->scale_y; + work->unk_18 = 0.0f; + work->unk_7D = 255; + work->time_max = info->time_max; + work->work_s16[0] = work->work_s16[1] = work->work_s16[2] = work->work_s16[3] = 0; + work->work_float[0] = work->work_float[1] = 0.0f; + work->param[0] = work->param[1] = 0; + for(temp=0; temp<16; temp++) { + work->sprite[temp] = work->sprite_grp[temp] = -1; + } + if(NULL != info->init) { + temp = info->init(work, params); + if(temp == 0) { + work->stat = 0; + return -1; + } + } + { + seqTimer = 30; + return i; + } +}