mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 20:12:30 +01:00
rename Script to ScriptInstance
This commit is contained in:
parent
46c2016bf1
commit
e39d02e55e
@ -158,7 +158,7 @@ typedef struct Trigger {
|
|||||||
/* 0x08 */ s32 colliderID;
|
/* 0x08 */ s32 colliderID;
|
||||||
/* 0x0C */ UNK_FUN_PTR(functionHandler);
|
/* 0x0C */ UNK_FUN_PTR(functionHandler);
|
||||||
/* 0x10 */ Bytecode* scriptStart;
|
/* 0x10 */ Bytecode* scriptStart;
|
||||||
/* 0x14 */ struct Script* runningScript;
|
/* 0x14 */ struct ScriptInstance* runningScript;
|
||||||
/* 0x18 */ s32 priority;
|
/* 0x18 */ s32 priority;
|
||||||
/* 0x1C */ s32 scriptVars[3];
|
/* 0x1C */ s32 scriptVars[3];
|
||||||
/* 0x28 */ char unk_28[12];
|
/* 0x28 */ char unk_28[12];
|
||||||
@ -181,12 +181,12 @@ typedef struct Enemy {
|
|||||||
/* 0x28 */ Bytecode* hitBytecode;
|
/* 0x28 */ Bytecode* hitBytecode;
|
||||||
/* 0x2C */ Bytecode* auxBytecode;
|
/* 0x2C */ Bytecode* auxBytecode;
|
||||||
/* 0x30 */ Bytecode* defeatBytecode;
|
/* 0x30 */ Bytecode* defeatBytecode;
|
||||||
/* 0x34 */ struct Script* initScript;
|
/* 0x34 */ struct ScriptInstance* initScript;
|
||||||
/* 0x38 */ struct Script* interactScript;
|
/* 0x38 */ struct ScriptInstance* interactScript;
|
||||||
/* 0x3C */ struct Script* aiScript;
|
/* 0x3C */ struct ScriptInstance* aiScript;
|
||||||
/* 0x40 */ struct Script* hitScript;
|
/* 0x40 */ struct ScriptInstance* hitScript;
|
||||||
/* 0x44 */ struct Script* auxScript;
|
/* 0x44 */ struct ScriptInstance* auxScript;
|
||||||
/* 0x48 */ struct Script* defeatScript;
|
/* 0x48 */ struct ScriptInstance* defeatScript;
|
||||||
/* 0x4C */ s32 initScriptID;
|
/* 0x4C */ s32 initScriptID;
|
||||||
/* 0x50 */ s32 interactScriptID;
|
/* 0x50 */ s32 interactScriptID;
|
||||||
/* 0x54 */ s32 aiScriptID;
|
/* 0x54 */ s32 aiScriptID;
|
||||||
@ -221,7 +221,7 @@ typedef struct StaticNpcSettings {
|
|||||||
/* 0x2A */ s16 unkFlags;
|
/* 0x2A */ s16 unkFlags;
|
||||||
} StaticNpcSettings; // size = 0x2C
|
} StaticNpcSettings; // size = 0x2C
|
||||||
|
|
||||||
typedef struct Script {
|
typedef struct ScriptInstance {
|
||||||
/* 0x000 */ u8 state;
|
/* 0x000 */ u8 state;
|
||||||
/* 0x001 */ u8 currentArgc;
|
/* 0x001 */ u8 currentArgc;
|
||||||
/* 0x002 */ u8 currentOpcode;
|
/* 0x002 */ u8 currentOpcode;
|
||||||
@ -235,9 +235,9 @@ typedef struct Script {
|
|||||||
/* 0x010 */ u8 labelIndices[16];
|
/* 0x010 */ u8 labelIndices[16];
|
||||||
/* 0x020 */ UNK_PTR labelPositions[16];
|
/* 0x020 */ UNK_PTR labelPositions[16];
|
||||||
/* 0x060 */ s32 deleted; /* set to zero in KillScript when malloc'd */
|
/* 0x060 */ s32 deleted; /* set to zero in KillScript when malloc'd */
|
||||||
/* 0x064 */ struct Script* blockingParent; /* parent? */
|
/* 0x064 */ struct ScriptInstance* blockingParent; /* parent? */
|
||||||
/* 0x068 */ struct Script* childScript;
|
/* 0x068 */ struct ScriptInstance* childScript;
|
||||||
/* 0x06C */ struct Script* parentScript; /* brother? */
|
/* 0x06C */ struct ScriptInstance* parentScript; /* brother? */
|
||||||
/* 0x070 */ s32 functionTemp[4];
|
/* 0x070 */ s32 functionTemp[4];
|
||||||
/* 0x080 */ UNK_PTR callFunction;
|
/* 0x080 */ UNK_PTR callFunction;
|
||||||
/* 0x084 */ s32 varTable[16];
|
/* 0x084 */ s32 varTable[16];
|
||||||
@ -258,7 +258,7 @@ typedef struct Script {
|
|||||||
/* 0x15C */ Bytecode* ptrFirstLine;
|
/* 0x15C */ Bytecode* ptrFirstLine;
|
||||||
/* 0x160 */ Bytecode* ptrSavedPosition;
|
/* 0x160 */ Bytecode* ptrSavedPosition;
|
||||||
/* 0x164 */ Bytecode* ptrCurrentLine;
|
/* 0x164 */ Bytecode* ptrCurrentLine;
|
||||||
} Script; // size = 0x168
|
} ScriptInstance; // size = 0x168
|
||||||
|
|
||||||
typedef struct Entity {
|
typedef struct Entity {
|
||||||
/* 0x00 */ s32 flags;
|
/* 0x00 */ s32 flags;
|
||||||
@ -521,9 +521,9 @@ typedef struct BattleStatus {
|
|||||||
/* 0x0B1 */ char unk_B1[3];
|
/* 0x0B1 */ char unk_B1[3];
|
||||||
/* 0x0B4 */ UNK_FUN_PTR(preUpdateCallback);
|
/* 0x0B4 */ UNK_FUN_PTR(preUpdateCallback);
|
||||||
/* 0x0B8 */ char unk_B8[4];
|
/* 0x0B8 */ char unk_B8[4];
|
||||||
/* 0x0BC */ struct Script* controlScript; /* control handed over to this when changing partners, maybe general? */
|
/* 0x0BC */ struct ScriptInstance* controlScript; /* control handed over to this when changing partners, maybe general? */
|
||||||
/* 0x0C0 */ s32 controlScriptID;
|
/* 0x0C0 */ s32 controlScriptID;
|
||||||
/* 0x0C4 */ struct Script* camMovementScript;
|
/* 0x0C4 */ struct ScriptInstance* camMovementScript;
|
||||||
/* 0x0C8 */ s32 camMovementScriptID;
|
/* 0x0C8 */ s32 camMovementScriptID;
|
||||||
/* 0x0CC */ char unk_CC[12];
|
/* 0x0CC */ char unk_CC[12];
|
||||||
/* 0x0D8 */ struct Actor* playerActor;
|
/* 0x0D8 */ struct Actor* playerActor;
|
||||||
@ -1182,10 +1182,10 @@ typedef struct Actor {
|
|||||||
/* 0x1C4 */ Bytecode* takeTurnCode;
|
/* 0x1C4 */ Bytecode* takeTurnCode;
|
||||||
/* 0x1C8 */ Bytecode* onHitCode;
|
/* 0x1C8 */ Bytecode* onHitCode;
|
||||||
/* 0x1CC */ Bytecode* onTurnChangeCode;
|
/* 0x1CC */ Bytecode* onTurnChangeCode;
|
||||||
/* 0x1D0 */ struct Script* idleScript;
|
/* 0x1D0 */ struct ScriptInstance* idleScript;
|
||||||
/* 0x1D4 */ struct Script* takeTurnScript;
|
/* 0x1D4 */ struct ScriptInstance* takeTurnScript;
|
||||||
/* 0x1D8 */ struct Script* onHitScript;
|
/* 0x1D8 */ struct ScriptInstance* onHitScript;
|
||||||
/* 0x1DC */ struct Script* onTurnChangeScript;
|
/* 0x1DC */ struct ScriptInstance* onTurnChangeScript;
|
||||||
/* 0x1E0 */ s32 idleScriptID;
|
/* 0x1E0 */ s32 idleScriptID;
|
||||||
/* 0x1E4 */ s32 takeTurnID;
|
/* 0x1E4 */ s32 takeTurnID;
|
||||||
/* 0x1E8 */ s32 onHitID;
|
/* 0x1E8 */ s32 onHitID;
|
||||||
|
@ -9,11 +9,11 @@ void osCleanupThread(void);
|
|||||||
|
|
||||||
void clone_model(u16 srcModelID, u16 newModelID);
|
void clone_model(u16 srcModelID, u16 newModelID);
|
||||||
void update_collider_transform(s16 colliderID);
|
void update_collider_transform(s16 colliderID);
|
||||||
s32 get_variable(Script* script, Bytecode var);
|
s32 get_variable(ScriptInstance* script, Bytecode var);
|
||||||
s32 set_variable(Script* script, Bytecode var, s32 value);
|
s32 set_variable(ScriptInstance* script, Bytecode var, s32 value);
|
||||||
f32 get_float_variable(Script* script, Bytecode var);
|
f32 get_float_variable(ScriptInstance* script, Bytecode var);
|
||||||
f32 set_float_variable(Script* script, Bytecode var, f32 value);
|
f32 set_float_variable(ScriptInstance* script, Bytecode var, f32 value);
|
||||||
void set_script_timescale(Script* script, f32 timescale);
|
void set_script_timescale(ScriptInstance* script, f32 timescale);
|
||||||
f32 sin_deg(f32 x);
|
f32 sin_deg(f32 x);
|
||||||
f32 cos_deg(f32 x);
|
f32 cos_deg(f32 x);
|
||||||
f32 atan2(f32 startX, f32 startZ, f32 endX, f32 endZ);
|
f32 atan2(f32 startX, f32 startZ, f32 endX, f32 endZ);
|
||||||
@ -34,7 +34,7 @@ f32 update_lerp(Easing easing, f32 start, f32 end, s32 elapsed, s32 duration);
|
|||||||
|
|
||||||
Npc* get_npc_safe(NpcId npcId);
|
Npc* get_npc_safe(NpcId npcId);
|
||||||
Npc* get_npc_unsafe(NpcId npcId);
|
Npc* get_npc_unsafe(NpcId npcId);
|
||||||
Npc* resolve_npc(Script* script, NpcId npcIdOrPtr);
|
Npc* resolve_npc(ScriptInstance* script, NpcId npcIdOrPtr);
|
||||||
|
|
||||||
f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by);
|
f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by);
|
||||||
f32 dist3D(f32 ax, f32 ay, f32 az, f32 bx, f32 by, f32 bz);
|
f32 dist3D(f32 ax, f32 ay, f32 az, f32 bx, f32 by, f32 bz);
|
||||||
|
@ -11,9 +11,9 @@ extern PlayerStatus gPlayerStatus;
|
|||||||
extern GameStatus* gGameStatusPtr[1];
|
extern GameStatus* gGameStatusPtr[1];
|
||||||
extern Item gItemTable[364];
|
extern Item gItemTable[364];
|
||||||
|
|
||||||
extern Script* gWorldScriptList[128];
|
extern ScriptInstance* gWorldScriptList[128];
|
||||||
extern Script* gBattleScriptList[128];
|
extern ScriptInstance* gBattleScriptList[128];
|
||||||
extern Script** gCurrentScriptListPtr[128];
|
extern ScriptInstance** gCurrentScriptListPtr[128];
|
||||||
|
|
||||||
extern f32 gGlobalTimeSpace;
|
extern f32 gGlobalTimeSpace;
|
||||||
|
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
INCLUDE_ASM(code_1f580_len_1940, SetEncounterStatusFlags);
|
INCLUDE_ASM(code_1f580_len_1940, SetEncounterStatusFlags);
|
||||||
|
|
||||||
s32 LoadDemoBattle(Script* script) {
|
s32 LoadDemoBattle(ScriptInstance* script) {
|
||||||
load_demo_battle(get_variable(script, *script->ptrReadPos));
|
load_demo_battle(get_variable(script, *script->ptrReadPos));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ???
|
// ???
|
||||||
s32 func_80044290(Script* script) {
|
s32 func_80044290(ScriptInstance* script) {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ INCLUDE_ASM(code_1f580_len_1940, RemoveEncounter);
|
|||||||
|
|
||||||
INCLUDE_ASM(code_1f580_len_1940, GetBattleOutcome);
|
INCLUDE_ASM(code_1f580_len_1940, GetBattleOutcome);
|
||||||
|
|
||||||
s32 GetOwnerEncountered(Script* script) {
|
s32 GetOwnerEncountered(ScriptInstance* script) {
|
||||||
set_variable(script, *script->ptrReadPos, script->ownerActorID->encountered);
|
set_variable(script, *script->ptrReadPos, script->ownerActorID->encountered);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
@ -29,12 +29,12 @@ INCLUDE_ASM(code_1f580_len_1940, DoNpcDefeat);
|
|||||||
|
|
||||||
INCLUDE_ASM(code_1f580_len_1940, start_battle);
|
INCLUDE_ASM(code_1f580_len_1940, start_battle);
|
||||||
|
|
||||||
s32 StartBattle(Script* script) {
|
s32 StartBattle(ScriptInstance* script) {
|
||||||
start_battle(script, -1);
|
start_battle(script, -1);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 StartBattleWith(Script* script) {
|
s32 StartBattleWith(ScriptInstance* script) {
|
||||||
start_battle(script, get_variable(script, *script->ptrReadPos));
|
start_battle(script, get_variable(script, *script->ptrReadPos));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -75,14 +75,14 @@ INCLUDE_ASM(code_1f580_len_1940, GetNpcVar);
|
|||||||
|
|
||||||
INCLUDE_ASM(code_1f580_len_1940, SetSelfRotation);
|
INCLUDE_ASM(code_1f580_len_1940, SetSelfRotation);
|
||||||
|
|
||||||
s32 SetSelfEnemyFlags(Script* script) {
|
s32 SetSelfEnemyFlags(ScriptInstance* script) {
|
||||||
script->ownerActorID->flags = *script->ptrReadPos;
|
script->ownerActorID->flags = *script->ptrReadPos;
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(code_1f580_len_1940, SetSelfEnemyFlagBits);
|
INCLUDE_ASM(code_1f580_len_1940, SetSelfEnemyFlagBits);
|
||||||
|
|
||||||
s32 GetSelfNpcID(Script* script) {
|
s32 GetSelfNpcID(ScriptInstance* script) {
|
||||||
set_variable(script, *script->ptrReadPos, script->ownerActorID->npcID);
|
set_variable(script, *script->ptrReadPos, script->ownerActorID->npcID);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
@ -393,7 +393,7 @@ void func_800E96C8(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 ShowCoinCounter(Script* script) {
|
s32 ShowCoinCounter(ScriptInstance* script) {
|
||||||
if (get_variable(script, *script->ptrReadPos)) {
|
if (get_variable(script, *script->ptrReadPos)) {
|
||||||
show_coin_counter();
|
show_coin_counter();
|
||||||
} else {
|
} else {
|
||||||
|
@ -50,7 +50,7 @@ INCLUDE_ASM(code_e79b0_len_1920, kill_script);
|
|||||||
|
|
||||||
void* kill_script_by_ID(s32 id) {
|
void* kill_script_by_ID(s32 id) {
|
||||||
s32 i;
|
s32 i;
|
||||||
Script* scriptContextPtr;
|
ScriptInstance* scriptContextPtr;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
||||||
scriptContextPtr = (*gCurrentScriptListPtr)[i];
|
scriptContextPtr = (*gCurrentScriptListPtr)[i];
|
||||||
@ -62,7 +62,7 @@ void* kill_script_by_ID(s32 id) {
|
|||||||
|
|
||||||
s32 kill_all_scripts(void) {
|
s32 kill_all_scripts(void) {
|
||||||
s32 i;
|
s32 i;
|
||||||
Script* scriptContextPtr;
|
ScriptInstance* scriptContextPtr;
|
||||||
|
|
||||||
for(i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
for(i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
||||||
scriptContextPtr = (*gCurrentScriptListPtr)[i];
|
scriptContextPtr = (*gCurrentScriptListPtr)[i];
|
||||||
@ -75,7 +75,7 @@ s32 kill_all_scripts(void) {
|
|||||||
|
|
||||||
s32 does_script_exist(s32 id) {
|
s32 does_script_exist(s32 id) {
|
||||||
s32 i;
|
s32 i;
|
||||||
Script* scriptContextPtr;
|
ScriptInstance* scriptContextPtr;
|
||||||
|
|
||||||
for(i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
for(i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
||||||
scriptContextPtr = (*gCurrentScriptListPtr)[i];
|
scriptContextPtr = (*gCurrentScriptListPtr)[i];
|
||||||
@ -86,7 +86,7 @@ s32 does_script_exist(s32 id) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 does_script_exist_by_ref(Script* script) {
|
s32 does_script_exist_by_ref(ScriptInstance* script) {
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
for(i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
for(i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
||||||
@ -97,11 +97,11 @@ s32 does_script_exist_by_ref(Script* script) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_script_priority(Script* script, s8 priority) {
|
void set_script_priority(ScriptInstance* script, s8 priority) {
|
||||||
script->priority = priority;
|
script->priority = priority;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_script_timescale(Script* script, f32 timeScale) {
|
void set_script_timescale(ScriptInstance* script, f32 timeScale) {
|
||||||
script->timeScale = timeScale * gGlobalTimeSpace;
|
script->timeScale = timeScale * gGlobalTimeSpace;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ f32 get_global_timespace(void) {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void set_script_group(Script* script, s8 groupFlags) {
|
void set_script_group(ScriptInstance* script, s8 groupFlags) {
|
||||||
script->groupFlags = groupFlags;
|
script->groupFlags = groupFlags;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,10 +130,10 @@ INCLUDE_ASM(code_e79b0_len_1920, bind_trigger);
|
|||||||
|
|
||||||
INCLUDE_ASM(code_e79b0_len_1920, bind_trigger_1);
|
INCLUDE_ASM(code_e79b0_len_1920, bind_trigger_1);
|
||||||
|
|
||||||
void suspend_group_script(Script* script, s32 groupFlags) {
|
void suspend_group_script(ScriptInstance* script, s32 groupFlags) {
|
||||||
int i;
|
int i;
|
||||||
Script* scriptContextPtr;
|
ScriptInstance* scriptContextPtr;
|
||||||
Script* childScript = script->childScript;
|
ScriptInstance* childScript = script->childScript;
|
||||||
|
|
||||||
if (childScript != NULL) {
|
if (childScript != NULL) {
|
||||||
suspend_group_script(childScript, groupFlags);
|
suspend_group_script(childScript, groupFlags);
|
||||||
@ -151,10 +151,10 @@ void suspend_group_script(Script* script, s32 groupFlags) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void resume_group_script(Script* script, s32 groupFlags) {
|
void resume_group_script(ScriptInstance* script, s32 groupFlags) {
|
||||||
int i;
|
int i;
|
||||||
Script* scriptContextPtr;
|
ScriptInstance* scriptContextPtr;
|
||||||
Script* childScript = script->childScript;
|
ScriptInstance* childScript = script->childScript;
|
||||||
|
|
||||||
if (childScript != NULL) {
|
if (childScript != NULL) {
|
||||||
resume_group_script(childScript, groupFlags);
|
resume_group_script(childScript, groupFlags);
|
||||||
@ -174,7 +174,7 @@ void resume_group_script(Script* script, s32 groupFlags) {
|
|||||||
|
|
||||||
s32 suspend_all_script(s32 id) {
|
s32 suspend_all_script(s32 id) {
|
||||||
s32 i;
|
s32 i;
|
||||||
Script* scriptContextPtr;
|
ScriptInstance* scriptContextPtr;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
||||||
scriptContextPtr = (*gCurrentScriptListPtr)[i];
|
scriptContextPtr = (*gCurrentScriptListPtr)[i];
|
||||||
@ -186,7 +186,7 @@ s32 suspend_all_script(s32 id) {
|
|||||||
|
|
||||||
s32 resume_all_script(s32 id) {
|
s32 resume_all_script(s32 id) {
|
||||||
s32 i;
|
s32 i;
|
||||||
Script* scriptContextPtr;
|
ScriptInstance* scriptContextPtr;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
||||||
scriptContextPtr = (*gCurrentScriptListPtr)[i];
|
scriptContextPtr = (*gCurrentScriptListPtr)[i];
|
||||||
@ -198,7 +198,7 @@ s32 resume_all_script(s32 id) {
|
|||||||
|
|
||||||
void suspend_group_script_index(s32 id, s32 groupFlags) {
|
void suspend_group_script_index(s32 id, s32 groupFlags) {
|
||||||
s32 i;
|
s32 i;
|
||||||
Script* scriptContextPtr;
|
ScriptInstance* scriptContextPtr;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
||||||
scriptContextPtr = (*gCurrentScriptListPtr)[i];
|
scriptContextPtr = (*gCurrentScriptListPtr)[i];
|
||||||
@ -210,7 +210,7 @@ void suspend_group_script_index(s32 id, s32 groupFlags) {
|
|||||||
|
|
||||||
void resume_group_script_index(s32 id, s32 groupFlags) {
|
void resume_group_script_index(s32 id, s32 groupFlags) {
|
||||||
s32 i;
|
s32 i;
|
||||||
Script* scriptContextPtr;
|
ScriptInstance* scriptContextPtr;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
||||||
scriptContextPtr = (*gCurrentScriptListPtr)[i];
|
scriptContextPtr = (*gCurrentScriptListPtr)[i];
|
||||||
@ -222,7 +222,7 @@ void resume_group_script_index(s32 id, s32 groupFlags) {
|
|||||||
|
|
||||||
s32 suspend_all_group(s32 groupFlags) {
|
s32 suspend_all_group(s32 groupFlags) {
|
||||||
s32 i;
|
s32 i;
|
||||||
Script* scriptContextPtr;
|
ScriptInstance* scriptContextPtr;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
||||||
scriptContextPtr = (*gCurrentScriptListPtr)[i];
|
scriptContextPtr = (*gCurrentScriptListPtr)[i];
|
||||||
@ -234,7 +234,7 @@ s32 suspend_all_group(s32 groupFlags) {
|
|||||||
|
|
||||||
s32 resume_all_group(s32 groupFlags) {
|
s32 resume_all_group(s32 groupFlags) {
|
||||||
s32 i;
|
s32 i;
|
||||||
Script* scriptContextPtr;
|
ScriptInstance* scriptContextPtr;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
||||||
scriptContextPtr = (*gCurrentScriptListPtr)[i];
|
scriptContextPtr = (*gCurrentScriptListPtr)[i];
|
||||||
@ -247,7 +247,7 @@ s32 resume_all_group(s32 groupFlags) {
|
|||||||
|
|
||||||
void suspend_group_others(s32 script, s32 groupFlags) {
|
void suspend_group_others(s32 script, s32 groupFlags) {
|
||||||
s32 i;
|
s32 i;
|
||||||
Script* scriptContextPtr;
|
ScriptInstance* scriptContextPtr;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
||||||
scriptContextPtr = (*gCurrentScriptListPtr)[i];
|
scriptContextPtr = (*gCurrentScriptListPtr)[i];
|
||||||
@ -259,7 +259,7 @@ void suspend_group_others(s32 script, s32 groupFlags) {
|
|||||||
|
|
||||||
void resume_group_others(s32 script, s32 groupFlags) {
|
void resume_group_others(s32 script, s32 groupFlags) {
|
||||||
s32 i;
|
s32 i;
|
||||||
Script* scriptContextPtr;
|
ScriptInstance* scriptContextPtr;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
||||||
scriptContextPtr = (*gCurrentScriptListPtr)[i];
|
scriptContextPtr = (*gCurrentScriptListPtr)[i];
|
||||||
@ -269,13 +269,13 @@ void resume_group_others(s32 script, s32 groupFlags) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Script* get_script_by_index(s32 index) {
|
ScriptInstance* get_script_by_index(s32 index) {
|
||||||
return (*gCurrentScriptListPtr)[index];
|
return (*gCurrentScriptListPtr)[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
Script* get_script_by_id(s32 id) {
|
ScriptInstance* get_script_by_id(s32 id) {
|
||||||
s32 i;
|
s32 i;
|
||||||
Script* scriptContextPtr;
|
ScriptInstance* scriptContextPtr;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
||||||
if ((*gCurrentScriptListPtr)[i] != NULL) {
|
if ((*gCurrentScriptListPtr)[i] != NULL) {
|
||||||
@ -288,10 +288,10 @@ Script* get_script_by_id(s32 id) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_script_flags(Script* script, s32 flags) {
|
void set_script_flags(ScriptInstance* script, s32 flags) {
|
||||||
int i;
|
int i;
|
||||||
Script* scriptContextPtr;
|
ScriptInstance* scriptContextPtr;
|
||||||
Script* childScript = script->childScript;
|
ScriptInstance* childScript = script->childScript;
|
||||||
|
|
||||||
script->state |= flags;
|
script->state |= flags;
|
||||||
if (childScript != NULL) {
|
if (childScript != NULL) {
|
||||||
|
@ -13,16 +13,16 @@ INCLUDE_ASM(code_e92d0_len_5da0, float_to_fixed_var);
|
|||||||
return (s32)(arg0 * (f32)1024.0f) + -230000000;
|
return (s32)(arg0 * (f32)1024.0f) + -230000000;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
s32 si_handle_return(Script* script) {
|
s32 si_handle_return(ScriptInstance* script) {
|
||||||
kill_script(script);
|
kill_script(script);
|
||||||
return 255;
|
return 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 si_handle_label(Script* script) {
|
s32 si_handle_label(ScriptInstance* script) {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 si_handle_goto(Script* script) {
|
s32 si_handle_goto(ScriptInstance* script) {
|
||||||
script->ptrNextLine = si_goto_label(script, get_variable(script, *script->ptrReadPos));
|
script->ptrNextLine = si_goto_label(script, get_variable(script, *script->ptrReadPos));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
@ -31,7 +31,7 @@ INCLUDE_ASM(code_e92d0_len_5da0, si_handle_Loop);
|
|||||||
|
|
||||||
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_end_loop);
|
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_end_loop);
|
||||||
|
|
||||||
s32 si_handle_break_loop(Script* script) {
|
s32 si_handle_break_loop(ScriptInstance* script) {
|
||||||
if (script->loopDepth < 0) {
|
if (script->loopDepth < 0) {
|
||||||
while (1) {}; // todo INF_LOOP
|
while (1) {}; // todo INF_LOOP
|
||||||
}
|
}
|
||||||
@ -56,7 +56,7 @@ INCLUDE_ASM(code_e92d0_len_5da0, si_handle_if_less_equal);
|
|||||||
|
|
||||||
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_if_greater_equal);
|
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_if_greater_equal);
|
||||||
|
|
||||||
s32 si_handle_if_AND(Script* script) {
|
s32 si_handle_if_AND(ScriptInstance* script) {
|
||||||
s32 var1;
|
s32 var1;
|
||||||
s32 *ptrReadPos = script->ptrReadPos;
|
s32 *ptrReadPos = script->ptrReadPos;
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ s32 si_handle_if_AND(Script* script) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//INCLUDE_ASM(code_e92d0_len_5da0, si_handle_if_not_AND);
|
//INCLUDE_ASM(code_e92d0_len_5da0, si_handle_if_not_AND);
|
||||||
s32 si_handle_if_not_AND(Script* script) {
|
s32 si_handle_if_not_AND(ScriptInstance* script) {
|
||||||
s32 var1;
|
s32 var1;
|
||||||
s32 *ptrReadPos = script->ptrReadPos;
|
s32 *ptrReadPos = script->ptrReadPos;
|
||||||
|
|
||||||
@ -85,12 +85,12 @@ s32 si_handle_if_not_AND(Script* script) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 si_handle_else(Script* script) {
|
s32 si_handle_else(ScriptInstance* script) {
|
||||||
script->ptrNextLine = si_skip_else(script);
|
script->ptrNextLine = si_skip_else(script);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 si_handle_end_if(Script* script) {
|
s32 si_handle_end_if(ScriptInstance* script) {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -133,7 +133,7 @@ INCLUDE_ASM(code_e92d0_len_5da0, si_handle_case_equal_AND);
|
|||||||
|
|
||||||
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_end_case_group);
|
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_end_case_group);
|
||||||
|
|
||||||
s32 si_handle_break_case(Script* script) {
|
s32 si_handle_break_case(ScriptInstance* script) {
|
||||||
if (script->switchDepth < 0) {
|
if (script->switchDepth < 0) {
|
||||||
while (1) {}; //todo INF_LOOP
|
while (1) {}; //todo INF_LOOP
|
||||||
}
|
}
|
||||||
@ -141,7 +141,7 @@ s32 si_handle_break_case(Script* script) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 si_handle_end_switch(Script* script) {
|
s32 si_handle_end_switch(ScriptInstance* script) {
|
||||||
s32 switchDepth = script->switchDepth;
|
s32 switchDepth = script->switchDepth;
|
||||||
|
|
||||||
if (switchDepth < 0) {
|
if (switchDepth < 0) {
|
||||||
@ -154,7 +154,7 @@ s32 si_handle_end_switch(Script* script) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 si_handle_set_var(Script* script) {
|
s32 si_handle_set_var(ScriptInstance* script) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
s32 curPtrReadPos = ptrReadPos[0];
|
s32 curPtrReadPos = ptrReadPos[0];
|
||||||
|
|
||||||
@ -162,12 +162,12 @@ s32 si_handle_set_var(Script* script) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 si_handle_set_const(Script* script) {
|
s32 si_handle_set_const(ScriptInstance* script) {
|
||||||
set_variable(script, *script->ptrReadPos, script->ptrReadPos[1]);
|
set_variable(script, *script->ptrReadPos, script->ptrReadPos[1]);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 si_handle_set_float(Script* script) {
|
s32 si_handle_set_float(ScriptInstance* script) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
s32 curPtrReadPos = ptrReadPos[0];
|
s32 curPtrReadPos = ptrReadPos[0];
|
||||||
|
|
||||||
@ -193,17 +193,17 @@ INCLUDE_ASM(code_e92d0_len_5da0, si_handle_multiplyF);
|
|||||||
|
|
||||||
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_divideF);
|
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_divideF);
|
||||||
|
|
||||||
s32 si_handle_set_int_buffer_ptr(Script* script) {
|
s32 si_handle_set_int_buffer_ptr(ScriptInstance* script) {
|
||||||
script->buffer = get_variable(script, *script->ptrReadPos);
|
script->buffer = get_variable(script, *script->ptrReadPos);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 si_handle_set_float_buffer_ptr(Script* script) {
|
s32 si_handle_set_float_buffer_ptr(ScriptInstance* script) {
|
||||||
script->buffer = get_variable(script, *script->ptrReadPos);
|
script->buffer = get_variable(script, *script->ptrReadPos);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 si_handle_get_1_word(Script* script) {
|
s32 si_handle_get_1_word(ScriptInstance* script) {
|
||||||
s32 ptrReadPos = *script->ptrReadPos;
|
s32 ptrReadPos = *script->ptrReadPos;
|
||||||
s32 buffer = *script->buffer++;
|
s32 buffer = *script->buffer++;
|
||||||
|
|
||||||
@ -217,7 +217,7 @@ INCLUDE_ASM(code_e92d0_len_5da0, si_handle_get_3_word);
|
|||||||
|
|
||||||
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_get_4_word);
|
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_get_4_word);
|
||||||
|
|
||||||
s32 si_handle_get_Nth_word(Script* script) {
|
s32 si_handle_get_Nth_word(ScriptInstance* script) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
s32 curPtrReadPos = ptrReadPos[0];
|
s32 curPtrReadPos = ptrReadPos[0];
|
||||||
|
|
||||||
@ -235,12 +235,12 @@ INCLUDE_ASM(code_e92d0_len_5da0, si_handle_get_4_float);
|
|||||||
|
|
||||||
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_get_Nth_float);
|
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_get_Nth_float);
|
||||||
|
|
||||||
s32 si_handle_set_array(Script* script) {
|
s32 si_handle_set_array(ScriptInstance* script) {
|
||||||
script->array = get_variable(script, *script->ptrReadPos);
|
script->array = get_variable(script, *script->ptrReadPos);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 si_handle_set_flag_array(Script* script) {
|
s32 si_handle_set_flag_array(ScriptInstance* script) {
|
||||||
script->flagArray = get_variable(script, *script->ptrReadPos);
|
script->flagArray = get_variable(script, *script->ptrReadPos);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
@ -250,7 +250,7 @@ INCLUDE_ASM(code_e92d0_len_5da0, si_handle_allocate_array);
|
|||||||
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_AND);
|
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_AND);
|
||||||
|
|
||||||
//INCLUDE_ASM(code_e92d0_len_5da0, si_handle_AND_const);
|
//INCLUDE_ASM(code_e92d0_len_5da0, si_handle_AND_const);
|
||||||
s32 si_handle_AND_const(Script* script) {
|
s32 si_handle_AND_const(ScriptInstance* script) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
// todo ???
|
// todo ???
|
||||||
s32 temp_s0 = ptrReadPos[0];
|
s32 temp_s0 = ptrReadPos[0];
|
||||||
@ -265,7 +265,7 @@ s32 si_handle_AND_const(Script* script) {
|
|||||||
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_OR);
|
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_OR);
|
||||||
|
|
||||||
//INCLUDE_ASM(code_e92d0_len_5da0, si_handle_OR_const);
|
//INCLUDE_ASM(code_e92d0_len_5da0, si_handle_OR_const);
|
||||||
s32 si_handle_OR_const(Script* script) {
|
s32 si_handle_OR_const(ScriptInstance* script) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
// todo ???
|
// todo ???
|
||||||
s32 temp_s0 = ptrReadPos[0];
|
s32 temp_s0 = ptrReadPos[0];
|
||||||
@ -283,13 +283,13 @@ INCLUDE_ASM(code_e92d0_len_5da0, si_handle_exec1);
|
|||||||
|
|
||||||
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_exec2);
|
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_exec2);
|
||||||
|
|
||||||
s32 si_handle_exec_wait(Script* script) {
|
s32 si_handle_exec_wait(ScriptInstance* script) {
|
||||||
start_child_script(script, get_variable(script, *script->ptrReadPos), 0);
|
start_child_script(script, get_variable(script, *script->ptrReadPos), 0);
|
||||||
script->currentOpcode = 0;
|
script->currentOpcode = 0;
|
||||||
return 0xFF;
|
return 0xFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 si_handle_jump(Script* script) {
|
s32 si_handle_jump(ScriptInstance* script) {
|
||||||
script->ptrFirstLine = get_variable(script, *script->ptrReadPos);
|
script->ptrFirstLine = get_variable(script, *script->ptrReadPos);
|
||||||
restart_script(script);
|
restart_script(script);
|
||||||
return 2;
|
return 2;
|
||||||
@ -299,62 +299,62 @@ INCLUDE_ASM(code_e92d0_len_5da0, _bound_script_trigger_handler);
|
|||||||
|
|
||||||
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_bind);
|
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_bind);
|
||||||
|
|
||||||
s32 DeleteTrigger(Script* script) {
|
s32 DeleteTrigger(ScriptInstance* script) {
|
||||||
delete_trigger(get_variable(script, *script->ptrReadPos));
|
delete_trigger(get_variable(script, *script->ptrReadPos));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 si_handle_unbind(Script* script) {
|
s32 si_handle_unbind(ScriptInstance* script) {
|
||||||
delete_trigger(script->ownerID);
|
delete_trigger(script->ownerID);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 si_handle_kill(Script* script) {
|
s32 si_handle_kill(ScriptInstance* script) {
|
||||||
kill_script_by_ID(get_variable(script, *script->ptrReadPos));
|
kill_script_by_ID(get_variable(script, *script->ptrReadPos));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 si_handle_set_priority(Script* script) {
|
s32 si_handle_set_priority(ScriptInstance* script) {
|
||||||
set_script_priority(script, get_variable(script, *script->ptrReadPos));
|
set_script_priority(script, get_variable(script, *script->ptrReadPos));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 si_handle_set_timescale(Script* script) {
|
s32 si_handle_set_timescale(ScriptInstance* script) {
|
||||||
set_script_timescale(script, get_float_variable(script, *script->ptrReadPos));
|
set_script_timescale(script, get_float_variable(script, *script->ptrReadPos));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 si_handle_set_group(Script* script) {
|
s32 si_handle_set_group(ScriptInstance* script) {
|
||||||
set_script_group(script, get_variable(script, *script->ptrReadPos));
|
set_script_group(script, get_variable(script, *script->ptrReadPos));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 si_handle_suspend_all(Script* script) {
|
s32 si_handle_suspend_all(ScriptInstance* script) {
|
||||||
suspend_all_group(get_variable(script, *script->ptrReadPos));
|
suspend_all_group(get_variable(script, *script->ptrReadPos));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 si_handle_resume_all(Script* script) {
|
s32 si_handle_resume_all(ScriptInstance* script) {
|
||||||
resume_all_group(get_variable(script, *script->ptrReadPos));
|
resume_all_group(get_variable(script, *script->ptrReadPos));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 si_handle_suspend_others(Script* script) {
|
s32 si_handle_suspend_others(ScriptInstance* script) {
|
||||||
suspend_group_others(script, get_variable(script, *script->ptrReadPos));
|
suspend_group_others(script, get_variable(script, *script->ptrReadPos));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 si_handle_resume_others(Script* script) {
|
s32 si_handle_resume_others(ScriptInstance* script) {
|
||||||
resume_group_others(script, get_variable(script, *script->ptrReadPos));
|
resume_group_others(script, get_variable(script, *script->ptrReadPos));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 si_handle_suspend(Script* script) {
|
s32 si_handle_suspend(ScriptInstance* script) {
|
||||||
suspend_all_script(get_variable(script, *script->ptrReadPos));
|
suspend_all_script(get_variable(script, *script->ptrReadPos));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 si_handle_resume(Script* script) {
|
s32 si_handle_resume(ScriptInstance* script) {
|
||||||
resume_all_script(get_variable(script, *script->ptrReadPos));
|
resume_all_script(get_variable(script, *script->ptrReadPos));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
@ -365,34 +365,34 @@ INCLUDE_ASM(code_e92d0_len_5da0, si_handle_bind_lock);
|
|||||||
|
|
||||||
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_thread);
|
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_thread);
|
||||||
|
|
||||||
s32 si_handle_end_thread(Script* script) {
|
s32 si_handle_end_thread(ScriptInstance* script) {
|
||||||
kill_script(script);
|
kill_script(script);
|
||||||
return 255;
|
return 255;
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_child_thread);
|
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_child_thread);
|
||||||
|
|
||||||
s32 si_handle_end_child_thread(Script* script) {
|
s32 si_handle_end_child_thread(ScriptInstance* script) {
|
||||||
kill_script(script);
|
kill_script(script);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_802C6E14(Script* script) {
|
s32 func_802C6E14(ScriptInstance* script) {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_print_debug_var);
|
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_print_debug_var);
|
||||||
|
|
||||||
s32 func_802C739C(Script* script) {
|
s32 func_802C739C(ScriptInstance* script) {
|
||||||
script->ptrSavedPosition = *script->ptrReadPos;
|
script->ptrSavedPosition = *script->ptrReadPos;
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_802C73B0(Script* script) {
|
s32 func_802C73B0(ScriptInstance* script) {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_802C73B8(Script* script) {
|
s32 func_802C73B8(ScriptInstance* script) {
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
for (i = 0; i < ARRAY_COUNT(gCurrentScriptListPtr); i++) {
|
||||||
@ -407,17 +407,17 @@ INCLUDE_ASM(code_e92d0_len_5da0, si_execute_next_command);
|
|||||||
|
|
||||||
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_end);
|
INCLUDE_ASM(code_e92d0_len_5da0, si_handle_end);
|
||||||
|
|
||||||
s32 INCLUDE_ASM(code_e92d0_len_5da0, get_variable, Script* script, Bytecode var);
|
s32 INCLUDE_ASM(code_e92d0_len_5da0, get_variable, ScriptInstance* script, Bytecode var);
|
||||||
|
|
||||||
INCLUDE_ASM(code_e92d0_len_5da0, get_variable_index);
|
INCLUDE_ASM(code_e92d0_len_5da0, get_variable_index);
|
||||||
|
|
||||||
INCLUDE_ASM(code_e92d0_len_5da0, get_variable_index_alt);
|
INCLUDE_ASM(code_e92d0_len_5da0, get_variable_index_alt);
|
||||||
|
|
||||||
s32 INCLUDE_ASM(code_e92d0_len_5da0, set_variable, Script* script, Bytecode var, s32 value);
|
s32 INCLUDE_ASM(code_e92d0_len_5da0, set_variable, ScriptInstance* script, Bytecode var, s32 value);
|
||||||
|
|
||||||
f32 INCLUDE_ASM(code_e92d0_len_5da0, get_float_variable, Script* script, Bytecode var);
|
f32 INCLUDE_ASM(code_e92d0_len_5da0, get_float_variable, ScriptInstance* script, Bytecode var);
|
||||||
|
|
||||||
f32 INCLUDE_ASM(code_e92d0_len_5da0, set_float_variable, Script* script, Bytecode var, f32 value);
|
f32 INCLUDE_ASM(code_e92d0_len_5da0, set_float_variable, ScriptInstance* script, Bytecode var, f32 value);
|
||||||
|
|
||||||
INCLUDE_ASM(code_e92d0_len_5da0, si_goto_label);
|
INCLUDE_ASM(code_e92d0_len_5da0, si_goto_label);
|
||||||
|
|
||||||
@ -439,7 +439,7 @@ INCLUDE_ASM(code_e92d0_len_5da0, ScaleModel);
|
|||||||
|
|
||||||
INCLUDE_ASM(code_e92d0_len_5da0, GetModelIndex);
|
INCLUDE_ASM(code_e92d0_len_5da0, GetModelIndex);
|
||||||
|
|
||||||
s32 CloneModel(Script* script) {
|
s32 CloneModel(ScriptInstance* script) {
|
||||||
s32* thisPos = script->ptrReadPos;
|
s32* thisPos = script->ptrReadPos;
|
||||||
s32 srcModelID = get_variable(script, *thisPos++);
|
s32 srcModelID = get_variable(script, *thisPos++);
|
||||||
s32 newModelID = get_variable(script, *thisPos++);
|
s32 newModelID = get_variable(script, *thisPos++);
|
||||||
@ -484,7 +484,7 @@ INCLUDE_ASM(code_e92d0_len_5da0, GetColliderCenter);
|
|||||||
|
|
||||||
INCLUDE_ASM(code_e92d0_len_5da0, ParentColliderToModel);
|
INCLUDE_ASM(code_e92d0_len_5da0, ParentColliderToModel);
|
||||||
|
|
||||||
s32 UpdateColliderTransform(Script* script) {
|
s32 UpdateColliderTransform(ScriptInstance* script) {
|
||||||
update_collider_transform(get_variable(script, *script->ptrReadPos));
|
update_collider_transform(get_variable(script, *script->ptrReadPos));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
@ -493,32 +493,32 @@ INCLUDE_ASM(code_e92d0_len_5da0, func_802CA1B8);
|
|||||||
|
|
||||||
INCLUDE_ASM(code_e92d0_len_5da0, goto_map);
|
INCLUDE_ASM(code_e92d0_len_5da0, goto_map);
|
||||||
|
|
||||||
s32 GotoMap(Script* script) {
|
s32 GotoMap(ScriptInstance* script) {
|
||||||
goto_map(script, 0);
|
goto_map(script, 0);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 GotoMapSpecial(Script* script) {
|
s32 GotoMapSpecial(ScriptInstance* script) {
|
||||||
goto_map(script, 1);
|
goto_map(script, 1);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 GotoMapByID(Script* script) {
|
s32 GotoMapByID(ScriptInstance* script) {
|
||||||
goto_map(script, 2);
|
goto_map(script, 2);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 GetEntryID(Script* script) {
|
s32 GetEntryID(ScriptInstance* script) {
|
||||||
set_variable(script, *script->ptrReadPos, (*gGameStatusPtr)->entryID);
|
set_variable(script, *script->ptrReadPos, (*gGameStatusPtr)->entryID);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 GetMapID(Script* script, s32 initialCall) {
|
s32 GetMapID(ScriptInstance* script, s32 initialCall) {
|
||||||
set_variable(script, *script->ptrReadPos, (*gGameStatusPtr)->mapID);
|
set_variable(script, *script->ptrReadPos, (*gGameStatusPtr)->mapID);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 GetLoadType(Script* script, s32 initialCall) {
|
s32 GetLoadType(ScriptInstance* script, s32 initialCall) {
|
||||||
set_variable(script, *script->ptrReadPos, (*gGameStatusPtr)->loadType != 0);
|
set_variable(script, *script->ptrReadPos, (*gGameStatusPtr)->loadType != 0);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
Npc* resolve_npc(Script* script, NpcId npcIdOrPtr) {
|
Npc* resolve_npc(ScriptInstance* script, NpcId npcIdOrPtr) {
|
||||||
if (npcIdOrPtr == NpcId_SELF) {
|
if (npcIdOrPtr == NpcId_SELF) {
|
||||||
return get_npc_safe(script->ownerID);
|
return get_npc_safe(script->ownerID);
|
||||||
} else if (npcIdOrPtr >= -270000000) {
|
} else if (npcIdOrPtr >= -270000000) {
|
||||||
@ -12,7 +12,7 @@ Npc* resolve_npc(Script* script, NpcId npcIdOrPtr) {
|
|||||||
|
|
||||||
INCLUDE_ASM(code_f2470_len_27f0, set_npc_animation);
|
INCLUDE_ASM(code_f2470_len_27f0, set_npc_animation);
|
||||||
|
|
||||||
s32 DeleteNpc(Script* script, s32 initialCall) {
|
s32 DeleteNpc(ScriptInstance* script, s32 initialCall) {
|
||||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||||
Npc* npcPtr = get_npc_unsafe(get_variable(script, *ptrReadPos++));
|
Npc* npcPtr = get_npc_unsafe(get_variable(script, *ptrReadPos++));
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ s32 DeleteNpc(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 GetNpcPointer(Script* script, s32 initialCall) {
|
s32 GetNpcPointer(ScriptInstance* script, s32 initialCall) {
|
||||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||||
NpcId npcID = get_variable(script, *ptrReadPos++);
|
NpcId npcID = get_variable(script, *ptrReadPos++);
|
||||||
Bytecode varNPC = *ptrReadPos++;
|
Bytecode varNPC = *ptrReadPos++;
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
s32 SpeakToPlayer(Script* script, s32 initialCall) {
|
s32 SpeakToPlayer(ScriptInstance* script, s32 initialCall) {
|
||||||
return _show_message(script, initialCall, 0);
|
return _show_message(script, initialCall, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 EndSpeech(Script* script, s32 initialCall) {
|
s32 EndSpeech(ScriptInstance* script, s32 initialCall) {
|
||||||
return _show_message(script, initialCall, 1);
|
return _show_message(script, initialCall, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 ContinueSpeech(Script* script, s32 initialCall) {
|
s32 ContinueSpeech(ScriptInstance* script, s32 initialCall) {
|
||||||
return _show_message(script, initialCall, 2);
|
return _show_message(script, initialCall, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 SpeakToNpc(Script* script, s32 initialCall) {
|
s32 SpeakToNpc(ScriptInstance* script, s32 initialCall) {
|
||||||
return _show_message(script, initialCall, 3);
|
return _show_message(script, initialCall, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,27 +28,27 @@ INCLUDE_ASM(code_f4c60_len_4300, SwitchMessage);
|
|||||||
|
|
||||||
INCLUDE_ASM(code_f4c60_len_4300, ShowChoice);
|
INCLUDE_ASM(code_f4c60_len_4300, ShowChoice);
|
||||||
|
|
||||||
s32 CloseChoice(Script* script, s32 initialCall) {
|
s32 CloseChoice(ScriptInstance* script, s32 initialCall) {
|
||||||
close_message(D_802DB268);
|
close_message(D_802DB268);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 CancelMessage(Script* script, s32 initialCall) {
|
s32 CancelMessage(ScriptInstance* script, s32 initialCall) {
|
||||||
cancel_message(gCurrentPrintContext);
|
cancel_message(gCurrentPrintContext);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 CancelMessageAndBlock(Script* script, s32 initialCall) {
|
s32 CancelMessageAndBlock(ScriptInstance* script, s32 initialCall) {
|
||||||
cancel_message(gCurrentPrintContext);
|
cancel_message(gCurrentPrintContext);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 SetMessageImages(Script* script, s32 initialCall) {
|
s32 SetMessageImages(ScriptInstance* script, s32 initialCall) {
|
||||||
set_message_images(*script->ptrReadPos);
|
set_message_images(*script->ptrReadPos);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_802D0C94(Script* script, s32 initialCall) {
|
s32 func_802D0C94(ScriptInstance* script, s32 initialCall) {
|
||||||
if (get_variable(script, *script->ptrReadPos) == 0) {
|
if (get_variable(script, *script->ptrReadPos) == 0) {
|
||||||
D_8009A650[0] |= 0x10;
|
D_8009A650[0] |= 0x10;
|
||||||
} else {
|
} else {
|
||||||
@ -57,7 +57,7 @@ s32 func_802D0C94(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 SetMessageString(Script* script, s32 initialCall) {
|
s32 SetMessageString(ScriptInstance* script, s32 initialCall) {
|
||||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||||
Bytecode string = get_variable(script, *ptrReadPos++);
|
Bytecode string = get_variable(script, *ptrReadPos++);
|
||||||
Bytecode index = get_variable(script, *ptrReadPos++);
|
Bytecode index = get_variable(script, *ptrReadPos++);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
s32 MakeLerp(Script* script, s32 initialCall) {
|
s32 MakeLerp(ScriptInstance* script, s32 initialCall) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
|
|
||||||
script->varTable[0xC] = get_variable(script, *ptrReadPos++); // start
|
script->varTable[0xC] = get_variable(script, *ptrReadPos++); // start
|
||||||
@ -12,7 +12,7 @@ s32 MakeLerp(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 UpdateLerp(Script* script, s32 initialCall) {
|
s32 UpdateLerp(ScriptInstance* script, s32 initialCall) {
|
||||||
script->varTable[0x0] = (s32) update_lerp(
|
script->varTable[0x0] = (s32) update_lerp(
|
||||||
script->varTable[0xB],
|
script->varTable[0xB],
|
||||||
script->varTable[0xC],
|
script->varTable[0xC],
|
||||||
@ -31,7 +31,7 @@ s32 UpdateLerp(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 RandInt(Script* script, s32 initialCall) {
|
s32 RandInt(ScriptInstance* script, s32 initialCall) {
|
||||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||||
|
|
||||||
s32 max = get_variable(script, *ptrReadPos++);
|
s32 max = get_variable(script, *ptrReadPos++);
|
||||||
@ -42,7 +42,7 @@ s32 RandInt(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 GetAngleBetweenNPCs(Script* script, s32 initialCall) {
|
s32 GetAngleBetweenNPCs(ScriptInstance* script, s32 initialCall) {
|
||||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||||
|
|
||||||
NpcId aID = get_variable(script, *ptrReadPos++);
|
NpcId aID = get_variable(script, *ptrReadPos++);
|
||||||
@ -56,7 +56,7 @@ s32 GetAngleBetweenNPCs(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 GetAngleToNPC(Script* script, s32 initialCall) {
|
s32 GetAngleToNPC(ScriptInstance* script, s32 initialCall) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ s32 GetAngleToNPC(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 GetAngleToPlayer(Script* script, s32 initialCall) {
|
s32 GetAngleToPlayer(ScriptInstance* script, s32 initialCall) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ s32 GetAngleToPlayer(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 AwaitPlayerApproach(Script* script, s32 initialCall) {
|
s32 AwaitPlayerApproach(ScriptInstance* script, s32 initialCall) {
|
||||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ s32 AwaitPlayerApproach(Script* script, s32 initialCall) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 IsPlayerWithin(Script* script, s32 initialCall) {
|
s32 IsPlayerWithin(ScriptInstance* script, s32 initialCall) {
|
||||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
|
|
||||||
@ -141,7 +141,7 @@ s32 IsPlayerWithin(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 AwaitPlayerLeave(Script* script, s32 initialCall) {
|
s32 AwaitPlayerLeave(ScriptInstance* script, s32 initialCall) {
|
||||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
|
|
||||||
@ -169,7 +169,7 @@ s32 AwaitPlayerLeave(Script* script, s32 initialCall) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 AddVectorPolar(Script* script, s32 initialCall) {
|
s32 AddVectorPolar(ScriptInstance* script, s32 initialCall) {
|
||||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||||
|
|
||||||
Bytecode xVar = *ptrReadPos++;
|
Bytecode xVar = *ptrReadPos++;
|
||||||
@ -236,7 +236,7 @@ s32 func_802D4CC4(script_context* script, s32 initialCall) {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
s32 func_802D4D18(Script* script, s32 initialCall) {
|
s32 func_802D4D18(ScriptInstance* script, s32 initialCall) {
|
||||||
s32 value = get_float_variable(script, *script->ptrReadPos);
|
s32 value = get_float_variable(script, *script->ptrReadPos);
|
||||||
|
|
||||||
func_80137E4C(0, 0, 0xC, 0x14);
|
func_80137E4C(0, 0, 0xC, 0x14);
|
||||||
@ -246,7 +246,7 @@ s32 func_802D4D18(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_802D4D88(Script* script, s32 initialCall) {
|
s32 func_802D4D88(ScriptInstance* script, s32 initialCall) {
|
||||||
func_80137D88(0xC, 0);
|
func_80137D88(0xC, 0);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
@ -259,7 +259,7 @@ INCLUDE_ASM(code_f8f60_len_1560, LoadPath);
|
|||||||
|
|
||||||
INCLUDE_ASM(code_f8f60_len_1560, GetNextPathPos);
|
INCLUDE_ASM(code_f8f60_len_1560, GetNextPathPos);
|
||||||
|
|
||||||
s32 GetDist2D(Script* script, s32 initialCall) {
|
s32 GetDist2D(ScriptInstance* script, s32 initialCall) {
|
||||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||||
|
|
||||||
Bytecode outVar = *ptrReadPos++;
|
Bytecode outVar = *ptrReadPos++;
|
||||||
@ -273,12 +273,12 @@ s32 GetDist2D(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_802D5830(Script* script, s32 initialCall) {
|
s32 func_802D5830(ScriptInstance* script, s32 initialCall) {
|
||||||
func_80027088(get_variable(script, *script->ptrReadPos));
|
func_80027088(get_variable(script, *script->ptrReadPos));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_802D585C(Script* script, s32 initialCall) {
|
s32 func_802D585C(ScriptInstance* script, s32 initialCall) {
|
||||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||||
s32 setMode = get_variable(script, *ptrReadPos++);
|
s32 setMode = get_variable(script, *ptrReadPos++);
|
||||||
s32 flags = get_variable(script, *ptrReadPos++);
|
s32 flags = get_variable(script, *ptrReadPos++);
|
||||||
@ -294,7 +294,7 @@ s32 func_802D585C(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 SetValueByRef(Script* script, s32 initialCall) {
|
s32 SetValueByRef(ScriptInstance* script, s32 initialCall) {
|
||||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||||
|
|
||||||
s32 dest = get_variable(script, *ptrReadPos++); /* Reference */
|
s32 dest = get_variable(script, *ptrReadPos++); /* Reference */
|
||||||
@ -304,7 +304,7 @@ s32 SetValueByRef(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 GetValueByRef(Script* script, s32 initialCall) {
|
s32 GetValueByRef(ScriptInstance* script, s32 initialCall) {
|
||||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||||
|
|
||||||
s32 src = get_variable(script, *ptrReadPos++); /* Reference */
|
s32 src = get_variable(script, *ptrReadPos++); /* Reference */
|
||||||
@ -315,7 +315,7 @@ s32 GetValueByRef(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 EnableStatusMenu(Script* script, s32 initialCall) {
|
s32 EnableStatusMenu(ScriptInstance* script, s32 initialCall) {
|
||||||
if (get_variable(script, *script->ptrReadPos) != 0) {
|
if (get_variable(script, *script->ptrReadPos) != 0) {
|
||||||
decrement_status_menu_disabled();
|
decrement_status_menu_disabled();
|
||||||
} else {
|
} else {
|
||||||
@ -325,7 +325,7 @@ s32 EnableStatusMenu(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 ShowStatusMenu(Script* script, s32 initialCall) {
|
s32 ShowStatusMenu(ScriptInstance* script, s32 initialCall) {
|
||||||
if (get_variable(script, *script->ptrReadPos) != 0) {
|
if (get_variable(script, *script->ptrReadPos) != 0) {
|
||||||
status_menu_enable_ignore_changes();
|
status_menu_enable_ignore_changes();
|
||||||
func_800E97B8();
|
func_800E97B8();
|
||||||
@ -336,7 +336,7 @@ s32 ShowStatusMenu(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 SetGameMode(Script* script, s32 initialCall) {
|
s32 SetGameMode(ScriptInstance* script, s32 initialCall) {
|
||||||
set_game_mode(
|
set_game_mode(
|
||||||
// Clear upper half
|
// Clear upper half
|
||||||
(get_variable(script, *script->ptrReadPos) << 0x10) >> 0x10
|
(get_variable(script, *script->ptrReadPos) << 0x10) >> 0x10
|
||||||
@ -344,7 +344,7 @@ s32 SetGameMode(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 ClampAngleInt(Script* script, s32 initialCall) {
|
s32 ClampAngleInt(ScriptInstance* script, s32 initialCall) {
|
||||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||||
|
|
||||||
set_variable(script, *ptrReadPos, clamp_angle(get_variable(script, *ptrReadPos)));
|
set_variable(script, *ptrReadPos, clamp_angle(get_variable(script, *ptrReadPos)));
|
||||||
@ -352,7 +352,7 @@ s32 ClampAngleInt(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 ClampAngleFloat(Script* script, s32 initialCall) {
|
s32 ClampAngleFloat(ScriptInstance* script, s32 initialCall) {
|
||||||
Bytecode* ptrReadPos = script->ptrReadPos;
|
Bytecode* ptrReadPos = script->ptrReadPos;
|
||||||
|
|
||||||
set_float_variable(script, *ptrReadPos, clamp_angle(get_float_variable(script, *ptrReadPos)));
|
set_float_variable(script, *ptrReadPos, clamp_angle(get_float_variable(script, *ptrReadPos)));
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
INCLUDE_ASM(code_fa4c0_len_3bf0, func_802D5B10);
|
INCLUDE_ASM(code_fa4c0_len_3bf0, func_802D5B10);
|
||||||
|
|
||||||
s32 FadeOutMusic(Script* script, s32 initialCall) {
|
s32 FadeOutMusic(ScriptInstance* script, s32 initialCall) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
s32 itemID = get_variable(script, *ptrReadPos++);
|
s32 itemID = get_variable(script, *ptrReadPos++);
|
||||||
s32* ptrNextPos = ptrReadPos++;
|
s32* ptrNextPos = ptrReadPos++;
|
||||||
@ -10,7 +10,7 @@ s32 FadeOutMusic(Script* script, s32 initialCall) {
|
|||||||
return (set_music_track(itemID, -1, 0, get_variable(script, *ptrNextPos++), 8) != 0) * 2;
|
return (set_music_track(itemID, -1, 0, get_variable(script, *ptrNextPos++), 8) != 0) * 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 SetMusicTrack(Script* script, s32 initialCall) {
|
s32 SetMusicTrack(ScriptInstance* script, s32 initialCall) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
s32 musicPlayer = get_variable(script, *ptrReadPos++);
|
s32 musicPlayer = get_variable(script, *ptrReadPos++);
|
||||||
s32 songID = get_variable(script, *ptrReadPos++);
|
s32 songID = get_variable(script, *ptrReadPos++);
|
||||||
@ -22,14 +22,14 @@ s32 SetMusicTrack(Script* script, s32 initialCall) {
|
|||||||
|
|
||||||
INCLUDE_ASM(code_fa4c0_len_3bf0, FadeInMusic);
|
INCLUDE_ASM(code_fa4c0_len_3bf0, FadeInMusic);
|
||||||
|
|
||||||
s32 PlayAmbientSounds(Script* script, s32 initialCall) {
|
s32 PlayAmbientSounds(ScriptInstance* script, s32 initialCall) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
s32 soundID = get_variable(script, *ptrReadPos++);
|
s32 soundID = get_variable(script, *ptrReadPos++);
|
||||||
|
|
||||||
return (play_ambient_sounds(soundID, 0xFA) != 0) * 2;
|
return (play_ambient_sounds(soundID, 0xFA) != 0) * 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 PlaySound(Script* script, s32 initialCall) {
|
s32 PlaySound(ScriptInstance* script, s32 initialCall) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
s32 soundID = get_variable(script, *ptrReadPos++);
|
s32 soundID = get_variable(script, *ptrReadPos++);
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ s32 PlaySound(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_802D617C(Script* script, s32 initialCall) {
|
s32 func_802D617C(ScriptInstance* script, s32 initialCall) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
s32 soundID = get_variable(script, *ptrReadPos++);
|
s32 soundID = get_variable(script, *ptrReadPos++);
|
||||||
s32 value2 = get_variable(script, *ptrReadPos++);
|
s32 value2 = get_variable(script, *ptrReadPos++);
|
||||||
@ -46,7 +46,7 @@ s32 func_802D617C(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 PlaySoundAt(Script* script, s32 initialCall) {
|
s32 PlaySoundAt(ScriptInstance* script, s32 initialCall) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
s32 soundID = get_variable(script, *ptrReadPos++);
|
s32 soundID = get_variable(script, *ptrReadPos++);
|
||||||
s32 value2 = get_variable(script, *ptrReadPos++);
|
s32 value2 = get_variable(script, *ptrReadPos++);
|
||||||
@ -58,28 +58,28 @@ s32 PlaySoundAt(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 StopSound(Script* script, s32 initialCall) {
|
s32 StopSound(ScriptInstance* script, s32 initialCall) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
|
|
||||||
stop_sound(get_variable(script, *ptrReadPos++));
|
stop_sound(get_variable(script, *ptrReadPos++));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_802D62E4(Script* script, s32 initialCall) {
|
s32 func_802D62E4(ScriptInstance* script, s32 initialCall) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
|
|
||||||
func_80149A6C(get_variable(script, *ptrReadPos++), 1);
|
func_80149A6C(get_variable(script, *ptrReadPos++), 1);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 UseDoorSounds(Script* script, s32 initialCall) {
|
s32 UseDoorSounds(ScriptInstance* script, s32 initialCall) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
|
|
||||||
gCurrentDoorSoundsSet = get_variable(script, *ptrReadPos++);
|
gCurrentDoorSoundsSet = get_variable(script, *ptrReadPos++);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_802D6340(Script* script, s32 initialCall) {
|
s32 func_802D6340(ScriptInstance* script, s32 initialCall) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
|
|
||||||
D_80151308 = get_variable(script, *ptrReadPos++);
|
D_80151308 = get_variable(script, *ptrReadPos++);
|
||||||
@ -88,7 +88,7 @@ s32 func_802D6340(Script* script, s32 initialCall) {
|
|||||||
|
|
||||||
INCLUDE_ASM(code_fa4c0_len_3bf0, PlaySoundAtF);
|
INCLUDE_ASM(code_fa4c0_len_3bf0, PlaySoundAtF);
|
||||||
|
|
||||||
s32 RemoveKeyItemAt(Script* script, s32 initialCall) {
|
s32 RemoveKeyItemAt(ScriptInstance* script, s32 initialCall) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
s32 index = get_variable(script, *ptrReadPos++);
|
s32 index = get_variable(script, *ptrReadPos++);
|
||||||
s16* ptrKeyItems = (s16 *) &gPlayerData.keyItems;
|
s16* ptrKeyItems = (s16 *) &gPlayerData.keyItems;
|
||||||
@ -97,7 +97,7 @@ s32 RemoveKeyItemAt(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 RemoveItemAt(Script* script, s32 initialCall) {
|
s32 RemoveItemAt(ScriptInstance* script, s32 initialCall) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
s32 index = get_variable(script, *ptrReadPos++);
|
s32 index = get_variable(script, *ptrReadPos++);
|
||||||
s16* ptrInvItems = (s16 *) &gPlayerData.invItems;
|
s16* ptrInvItems = (s16 *) &gPlayerData.invItems;
|
||||||
@ -107,7 +107,7 @@ s32 RemoveItemAt(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 AddKeyItem(Script* script, s32 initialCall) {
|
s32 AddKeyItem(ScriptInstance* script, s32 initialCall) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
s32 value = *ptrReadPos++;
|
s32 value = *ptrReadPos++;
|
||||||
PlayerData* playerData = &gPlayerData;
|
PlayerData* playerData = &gPlayerData;
|
||||||
@ -139,7 +139,7 @@ s32 func_802D6954(void) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 HasKeyItem(Script* script, s32 initialCall) {
|
s32 HasKeyItem(ScriptInstance* script, s32 initialCall) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
s32 itemID = get_variable(script, *ptrReadPos++);
|
s32 itemID = get_variable(script, *ptrReadPos++);
|
||||||
s32 value = *ptrReadPos++;
|
s32 value = *ptrReadPos++;
|
||||||
@ -155,7 +155,7 @@ s32 HasKeyItem(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 FindKeyItem(Script* script, s32 initialCall) {
|
s32 FindKeyItem(ScriptInstance* script, s32 initialCall) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
s32 itemID = get_variable(script, *ptrReadPos++);
|
s32 itemID = get_variable(script, *ptrReadPos++);
|
||||||
s32 value = *ptrReadPos++;
|
s32 value = *ptrReadPos++;
|
||||||
@ -178,7 +178,7 @@ s32 FindKeyItem(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 AddItem(Script* script, s32 initialCall) {
|
s32 AddItem(ScriptInstance* script, s32 initialCall) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
s32 itemID = get_variable(script, *ptrReadPos++);
|
s32 itemID = get_variable(script, *ptrReadPos++);
|
||||||
s32* ptrNextPos = (s32 *) *ptrReadPos++;
|
s32* ptrNextPos = (s32 *) *ptrReadPos++;
|
||||||
@ -187,12 +187,12 @@ s32 AddItem(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_802D6AF0(Script* script, s32 initialCall) {
|
s32 func_802D6AF0(ScriptInstance* script, s32 initialCall) {
|
||||||
set_variable(script, *script->ptrReadPos, 0);
|
set_variable(script, *script->ptrReadPos, 0);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 FindItem(Script* script, s32 initialCall) {
|
s32 FindItem(ScriptInstance* script, s32 initialCall) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
s32 itemID = get_variable(script, *ptrReadPos++);
|
s32 itemID = get_variable(script, *ptrReadPos++);
|
||||||
s32 value = *ptrReadPos++;
|
s32 value = *ptrReadPos++;
|
||||||
@ -215,7 +215,7 @@ s32 FindItem(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 RemoveItem(Script* script, s32 initialCall) {
|
s32 RemoveItem(ScriptInstance* script, s32 initialCall) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
s32 itemID = get_variable(script, *ptrReadPos++);
|
s32 itemID = get_variable(script, *ptrReadPos++);
|
||||||
s32 value = *ptrReadPos++;
|
s32 value = *ptrReadPos++;
|
||||||
@ -245,14 +245,14 @@ s32 RemoveItem(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 CountFortressKeys(Script* script, s32 initialCall) {
|
s32 CountFortressKeys(ScriptInstance* script, s32 initialCall) {
|
||||||
s32 outVar = *script->ptrReadPos;
|
s32 outVar = *script->ptrReadPos;
|
||||||
|
|
||||||
set_variable(script, outVar, get_fortress_key_count());
|
set_variable(script, outVar, get_fortress_key_count());
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 RemoveFortressKeys(Script* script, s32 initialCall) {
|
s32 RemoveFortressKeys(ScriptInstance* script, s32 initialCall) {
|
||||||
s32 num = get_variable(script, *script->ptrReadPos);
|
s32 num = get_variable(script, *script->ptrReadPos);
|
||||||
|
|
||||||
subtract_fortress_keys(num);
|
subtract_fortress_keys(num);
|
||||||
@ -281,7 +281,7 @@ s32 DropItemEntityB(script_context* script, s32 initialCall) {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
s32 RemoveItemEntity(Script* script, s32 initialCall) {
|
s32 RemoveItemEntity(ScriptInstance* script, s32 initialCall) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
s32 itemEntityIndex = get_variable(script, *ptrReadPos++);
|
s32 itemEntityIndex = get_variable(script, *ptrReadPos++);
|
||||||
|
|
||||||
@ -289,7 +289,7 @@ s32 RemoveItemEntity(Script* script, s32 initialCall) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 AddBadge(Script* script, s32 initialCall) {
|
s32 AddBadge(ScriptInstance* script, s32 initialCall) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
s32 itemID = get_variable(script, *ptrReadPos++);
|
s32 itemID = get_variable(script, *ptrReadPos++);
|
||||||
s32* ptrNextPos = (s32 *) *ptrReadPos++;
|
s32* ptrNextPos = (s32 *) *ptrReadPos++;
|
||||||
@ -300,7 +300,7 @@ s32 AddBadge(Script* script, s32 initialCall) {
|
|||||||
|
|
||||||
INCLUDE_ASM(code_fa4c0_len_3bf0, RemoveBadge);
|
INCLUDE_ASM(code_fa4c0_len_3bf0, RemoveBadge);
|
||||||
|
|
||||||
s32 SetItemPos(Script* script, s32 initialCall) {
|
s32 SetItemPos(ScriptInstance* script, s32 initialCall) {
|
||||||
s32* ptrReadPos = script->ptrReadPos;
|
s32* ptrReadPos = script->ptrReadPos;
|
||||||
ItemEntity* ptrItemEntity;
|
ItemEntity* ptrItemEntity;
|
||||||
s32 itemEntityIndex;
|
s32 itemEntityIndex;
|
||||||
@ -320,17 +320,17 @@ s32 SetItemPos(Script* script, s32 initialCall) {
|
|||||||
|
|
||||||
INCLUDE_ASM(code_fa4c0_len_3bf0, SetItemFlags);
|
INCLUDE_ASM(code_fa4c0_len_3bf0, SetItemFlags);
|
||||||
|
|
||||||
s32 AddCoin(Script* script, s32 initialCall) {
|
s32 AddCoin(ScriptInstance* script, s32 initialCall) {
|
||||||
script->varTable[0] = add_coins(get_variable(script, *script->ptrReadPos));
|
script->varTable[0] = add_coins(get_variable(script, *script->ptrReadPos));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 AddStarPoints(Script* script, s32 initialCall) {
|
s32 AddStarPoints(ScriptInstance* script, s32 initialCall) {
|
||||||
script->varTable[0] = add_star_points(get_variable(script, *script->ptrReadPos));
|
script->varTable[0] = add_star_points(get_variable(script, *script->ptrReadPos));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 AddStarPieces(Script* script, s32 initialCall) {
|
s32 AddStarPieces(ScriptInstance* script, s32 initialCall) {
|
||||||
script->varTable[0] = add_star_pieces(get_variable(script, *script->ptrReadPos));
|
script->varTable[0] = add_star_pieces(get_variable(script, *script->ptrReadPos));
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
INCLUDE_ASM(code_fe0b0_len_5a0, SetSpriteShading);
|
INCLUDE_ASM(code_fe0b0_len_5a0, SetSpriteShading);
|
||||||
|
|
||||||
s32 EnableSpriteShading(Script* script) {
|
s32 EnableSpriteShading(ScriptInstance* script) {
|
||||||
if (get_variable(script, *script->ptrReadPos) != 0) {
|
if (get_variable(script, *script->ptrReadPos) != 0) {
|
||||||
*D_80151328 |= 1;
|
*D_80151328 |= 1;
|
||||||
} else {
|
} else {
|
||||||
@ -11,27 +11,27 @@ s32 EnableSpriteShading(Script* script) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 getDemoState(Script* script) {
|
s32 getDemoState(ScriptInstance* script) {
|
||||||
set_variable(script, *script->ptrReadPos, (*gGameStatusPtr)->demoState);
|
set_variable(script, *script->ptrReadPos, (*gGameStatusPtr)->demoState);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 DemoPressButton(Script* script) {
|
s32 DemoPressButton(ScriptInstance* script) {
|
||||||
(*gGameStatusPtr)->demoButtonInput |= get_variable(script, *script->ptrReadPos);
|
(*gGameStatusPtr)->demoButtonInput |= get_variable(script, *script->ptrReadPos);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 DemoReleaseButton(Script* script) {
|
s32 DemoReleaseButton(ScriptInstance* script) {
|
||||||
(*gGameStatusPtr)->demoButtonInput &= ~get_variable(script, *script->ptrReadPos);
|
(*gGameStatusPtr)->demoButtonInput &= ~get_variable(script, *script->ptrReadPos);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 DemoSetButtons(Script* script) {
|
s32 DemoSetButtons(ScriptInstance* script) {
|
||||||
(*gGameStatusPtr)->demoButtonInput = get_variable(script, *script->ptrReadPos);
|
(*gGameStatusPtr)->demoButtonInput = get_variable(script, *script->ptrReadPos);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 DemoJoystickRadial(Script* script) {
|
s32 DemoJoystickRadial(ScriptInstance* script) {
|
||||||
f32 a;
|
f32 a;
|
||||||
f32 b;
|
f32 b;
|
||||||
s32* thisPos = script->ptrReadPos;
|
s32* thisPos = script->ptrReadPos;
|
||||||
@ -45,7 +45,7 @@ s32 DemoJoystickRadial(Script* script) {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 DemoJoystickXY(Script* script) {
|
s32 DemoJoystickXY(ScriptInstance* script) {
|
||||||
f32 x;
|
f32 x;
|
||||||
f32 y;
|
f32 y;
|
||||||
s32* thisPos = script->ptrReadPos;
|
s32* thisPos = script->ptrReadPos;
|
||||||
|
Loading…
Reference in New Issue
Block a user