mirror of
https://github.com/pmret/papermario.git
synced 2024-11-09 12:32:38 +01:00
replaced commented out with if-0s (#529)
* replaced commented out with if-0s * remove commented out map funcs * ifdef non-matching * use NON_EQUIVALENT instead
This commit is contained in:
parent
38249a8967
commit
fa892a40de
45
src/190B20.c
45
src/190B20.c
@ -1997,29 +1997,32 @@ void remove_player_buffs(s32 buffs) {
|
|||||||
|
|
||||||
INCLUDE_ASM(s32, "190B20", btl_update_ko_status);
|
INCLUDE_ASM(s32, "190B20", btl_update_ko_status);
|
||||||
|
|
||||||
|
#ifdef NON_EQUIVALENT
|
||||||
|
extern s32 D_80293970;
|
||||||
|
|
||||||
|
void btl_appendGfx_prim_quad(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s16 arg4, s16 arg5, s16 arg6, s16 arg7) {
|
||||||
|
gDPPipeSync(gMasterGfxPos++);
|
||||||
|
gSPDisplayList(gMasterGfxPos++, &D_80293970);
|
||||||
|
|
||||||
|
if ((arg3 & 0xFF) == 0xFF) {
|
||||||
|
gDPSetRenderMode(gMasterGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
||||||
|
gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, PRIMITIVE, 0, 0, 0, 1, 0, 0, 0, PRIMITIVE, 0, 0, 0, 1);
|
||||||
|
} else {
|
||||||
|
gDPSetRenderMode(gMasterGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
|
||||||
|
gDPSetCombineMode(gMasterGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
|
||||||
|
}
|
||||||
|
|
||||||
|
gDPSetPrimColor(gMasterGfxPos++, 0, 0, arg0, arg1, arg2, arg3);
|
||||||
|
gDPFillRectangle(gMasterGfxPos++, arg4, arg5, arg6, arg7);
|
||||||
|
gDPPipeSync(gMasterGfxPos++);
|
||||||
|
|
||||||
|
gDPSetRenderMode(gMasterGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2);
|
||||||
|
gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
||||||
|
}
|
||||||
|
#else
|
||||||
void btl_appendGfx_prim_quad(u8 arg0, u8 arg1, u8 arg2, u8 arg3, u16 arg4, u16 arg5, u16 arg6, u16 arg7);
|
void btl_appendGfx_prim_quad(u8 arg0, u8 arg1, u8 arg2, u8 arg3, u16 arg4, u16 arg5, u16 arg6, u16 arg7);
|
||||||
INCLUDE_ASM(s32, "190B20", btl_appendGfx_prim_quad, u8 arg0, u8 arg1, u8 arg2, u8 arg3, u16 arg4, u16 arg5, u16 arg6, u16 arg7);
|
INCLUDE_ASM(s32, "190B20", btl_appendGfx_prim_quad, u8 arg0, u8 arg1, u8 arg2, u8 arg3, u16 arg4, u16 arg5, u16 arg6, u16 arg7);
|
||||||
// extern s32 D_80293970;
|
#endif
|
||||||
|
|
||||||
// void btl_appendGfx_prim_quad(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s16 arg4, s16 arg5, s16 arg6, s16 arg7) {
|
|
||||||
// gDPPipeSync(gMasterGfxPos++);
|
|
||||||
// gSPDisplayList(gMasterGfxPos++, &D_80293970);
|
|
||||||
|
|
||||||
// if ((arg3 & 0xFF) == 0xFF) {
|
|
||||||
// gDPSetRenderMode(gMasterGfxPos++, G_RM_OPA_SURF, G_RM_OPA_SURF2);
|
|
||||||
// gDPSetCombineLERP(gMasterGfxPos++, 0, 0, 0, PRIMITIVE, 0, 0, 0, 1, 0, 0, 0, PRIMITIVE, 0, 0, 0, 1);
|
|
||||||
// } else {
|
|
||||||
// gDPSetRenderMode(gMasterGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
|
|
||||||
// gDPSetCombineMode(gMasterGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// gDPSetPrimColor(gMasterGfxPos++, 0, 0, arg0, arg1, arg2, arg3);
|
|
||||||
// gDPFillRectangle(gMasterGfxPos++, arg4, arg5, arg6, arg7);
|
|
||||||
// gDPPipeSync(gMasterGfxPos++);
|
|
||||||
|
|
||||||
// gDPSetRenderMode(gMasterGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2);
|
|
||||||
// gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
|
|
||||||
// }
|
|
||||||
|
|
||||||
void btl_draw_prim_quad(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7) {
|
void btl_draw_prim_quad(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7) {
|
||||||
u16 new_var = arg4 + arg6;
|
u16 new_var = arg4 + arg6;
|
||||||
|
30
src/sprite.c
30
src/sprite.c
@ -84,21 +84,23 @@ PlayerSpriteSet spr_playerSpriteSets[] = {
|
|||||||
/* Peach */ { 6, 0x900, 0x00003C00 },
|
/* Peach */ { 6, 0x900, 0x00003C00 },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef NON_EQUIVALENT
|
||||||
|
extern s32* gSpriteHeapPtr;
|
||||||
|
extern s32** D_802DFE44;
|
||||||
|
extern s32* D_802DFE9C;
|
||||||
|
|
||||||
|
void spr_init_quad_cache(void) {
|
||||||
|
s32 i;
|
||||||
|
s32* phi_v0;
|
||||||
|
D_802DFE44 = _heap_malloc(&gSpriteHeapPtr, 0x580);
|
||||||
|
|
||||||
|
for (i = 21; i >= 0; i--) {
|
||||||
|
D_802DFE44[i] = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
INCLUDE_ASM(s32, "sprite", spr_init_quad_cache);
|
INCLUDE_ASM(s32, "sprite", spr_init_quad_cache);
|
||||||
|
#endif
|
||||||
// extern s32* gSpriteHeapPtr;
|
|
||||||
// extern s32** D_802DFE44;
|
|
||||||
// extern s32* D_802DFE9C;
|
|
||||||
|
|
||||||
// void spr_init_quad_cache(void) {
|
|
||||||
// s32 i;
|
|
||||||
// s32* phi_v0;
|
|
||||||
// D_802DFE44 = _heap_malloc(&gSpriteHeapPtr, 0x580);
|
|
||||||
|
|
||||||
// for (i = 21; i >= 0; i--) {
|
|
||||||
// D_802DFE44[i] = -1;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "sprite", spr_get_cached_quad);
|
INCLUDE_ASM(s32, "sprite", spr_get_cached_quad);
|
||||||
|
|
||||||
|
@ -1,25 +1,6 @@
|
|||||||
#include "hos_00.h"
|
#include "hos_00.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_hos/hos_00/A0C4E0", func_802407F0_A0C4E0);
|
INCLUDE_ASM(s32, "world/area_hos/hos_00/A0C4E0", func_802407F0_A0C4E0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802407F0_A0C4E0)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80242970_A0E660) == NULL) {
|
|
||||||
N(D_80242970_A0E660) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80242970_A0E660)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80242970_A0E660)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80242970_A0E660));
|
|
||||||
N(D_80242970_A0E660) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -11,17 +11,6 @@ INCLUDE_ASM(s32, "world/area_hos/hos_02/A17210", func_802411A0_A173C0);
|
|||||||
#include "world/common/UnkNpcAIFunc2.inc.c"
|
#include "world/common/UnkNpcAIFunc2.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_hos/hos_02/A17210", func_80241C44_A17E64);
|
INCLUDE_ASM(s32, "world/area_hos/hos_02/A17210", func_80241C44_A17E64);
|
||||||
/*
|
|
||||||
void N(func_80241C44_A17E64)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
|
|
||||||
npc->pos.y += N(D_80244490_A1A6B0)[npc->duration++];
|
|
||||||
if (npc->duration >= 5) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc14.inc.c"
|
#include "world/common/UnkNpcAIFunc14.inc.c"
|
||||||
|
|
||||||
@ -32,67 +21,6 @@ void N(func_80241C44_A17E64)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
|||||||
#include "world/common/UnkFunc5.inc.c"
|
#include "world/common/UnkFunc5.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_hos/hos_02/A17210", func_802422FC_A1851C);
|
INCLUDE_ASM(s32, "world/area_hos/hos_02/A17210", func_802422FC_A1851C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802422FC_A1851C)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* aiSettings = evt_get_variable(script, *args);
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->wander.detectShape;
|
|
||||||
territory.pointX = enemy->territory->wander.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->wander.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->wander.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->wander.detectSizeZ;
|
|
||||||
territory.unk_18 = 120.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(func_802421D8_A183F8)(npc, enemy, script, aiSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
npc->unk_AB = -2;
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
if (enemy->unk_B4 != 0) {
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
N(hos_02_UnkNpcAIFunc23)(script, aiSettings, territoryPtr);
|
|
||||||
case 1:
|
|
||||||
N(func_802411A0_A173C0)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, aiSettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_80241888_A17AA8)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(UnkNpcAIFunc2)(script, aiSettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(func_80241C44_A17E64)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc14)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 13:
|
|
||||||
N(UnkNpcAIFunc3)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(func_80241E48_A18068)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc13.inc.c"
|
#include "world/common/UnkNpcAIFunc13.inc.c"
|
||||||
|
|
||||||
|
@ -3,11 +3,5 @@
|
|||||||
INCLUDE_ASM(s32, "world/area_hos/hos_04/A27AA0", func_80240BD0_A27AA0);
|
INCLUDE_ASM(s32, "world/area_hos/hos_04/A27AA0", func_80240BD0_A27AA0);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_hos/hos_04/A27AA0", func_80240E40_A27D10);
|
INCLUDE_ASM(s32, "world/area_hos/hos_04/A27AA0", func_80240E40_A27D10);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240E40_A27D10)(Evt* script, s32 isInitialCall) {
|
|
||||||
switch_to_partner(evt_get_variable(script, *script->ptrReadPos));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_hos/hos_04/A27AA0", func_80240E6C_A27D3C);
|
INCLUDE_ASM(s32, "world/area_hos/hos_04/A27AA0", func_80240E6C_A27D3C);
|
||||||
|
@ -3,11 +3,5 @@
|
|||||||
INCLUDE_ASM(s32, "world/area_hos/hos_05/A2EC30", func_802449F0_A2EC30);
|
INCLUDE_ASM(s32, "world/area_hos/hos_05/A2EC30", func_802449F0_A2EC30);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_hos/hos_05/A2EC30", func_80244C60_A2EEA0);
|
INCLUDE_ASM(s32, "world/area_hos/hos_05/A2EC30", func_80244C60_A2EEA0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80244C60_A2EEA0)(Evt* script, s32 isInitialCall) {
|
|
||||||
switch_to_partner(evt_get_variable(script, *script->ptrReadPos));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_hos/hos_05/A2EC30", func_80244C8C_A2EECC);
|
INCLUDE_ASM(s32, "world/area_hos/hos_05/A2EC30", func_80244C8C_A2EECC);
|
||||||
|
@ -1,25 +1,6 @@
|
|||||||
#include "hos_06.h"
|
#include "hos_06.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_hos/hos_06/A397F0", func_80240310_A397F0);
|
INCLUDE_ASM(s32, "world/area_hos/hos_06/A397F0", func_80240310_A397F0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240310_A397F0)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80242C08_A3C0E8) == NULL) {
|
|
||||||
N(D_80242C08_A3C0E8) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80242C08_A3C0E8)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80242C08_A3C0E8)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80242C08_A3C0E8));
|
|
||||||
N(D_80242C08_A3C0E8) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define NAMESPACE dup2_hos_06
|
#define NAMESPACE dup2_hos_06
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
@ -32,79 +13,18 @@ ApiStatus N(func_80240310_A397F0)(Evt* script, s32 isInitialCall) {
|
|||||||
#define NAMESPACE hos_06
|
#define NAMESPACE hos_06
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_hos/hos_06/A397F0", func_80240654_A39B34);
|
INCLUDE_ASM(s32, "world/area_hos/hos_06/A397F0", func_80240654_A39B34);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240654_A39B34)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_80242C6C_A3C14C) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_80242C6C_A3C14C)) {
|
|
||||||
N(D_80242C6C_A3C14C) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_80242C70_A3C150));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_hos/hos_06/A397F0", func_802406A8_A39B88);
|
INCLUDE_ASM(s32, "world/area_hos/hos_06/A397F0", func_802406A8_A39B88);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802406A8_A39B88)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_80242C70_A3C150) = evt_get_variable(script, *args);
|
|
||||||
N(D_80242C6C_A3C14C) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_hos/hos_06/A397F0", func_802406E0_A39BC0);
|
INCLUDE_ASM(s32, "world/area_hos/hos_06/A397F0", func_802406E0_A39BC0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802406E0_A39BC0)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/SetManyVars.inc.c"
|
#include "world/common/SetManyVars.inc.c"
|
||||||
|
|
||||||
#include "world/common/UnkYawFunc.inc.c"
|
#include "world/common/UnkYawFunc.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_hos/hos_06/A397F0", func_802409F8_A39ED8);
|
INCLUDE_ASM(s32, "world/area_hos/hos_06/A397F0", func_802409F8_A39ED8);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802409F8_A39ED8)(Evt *script, s32 isInitialCall) {
|
|
||||||
Npc *npc = get_npc_unsafe(script->varTable[2]);
|
|
||||||
|
|
||||||
D_8024E1B4 = npc->currentAnim;
|
|
||||||
npc->currentAnim = script->varTable[4];
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_hos/hos_06/A397F0", func_80240A3C_A39F1C);
|
INCLUDE_ASM(s32, "world/area_hos/hos_06/A397F0", func_80240A3C_A39F1C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240A3C_A39F1C)(Evt *script, s32 isInitialCall) {
|
|
||||||
get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_hos/hos_06/A397F0", func_80240A68_A39F48);
|
INCLUDE_ASM(s32, "world/area_hos/hos_06/A397F0", func_80240A68_A39F48);
|
||||||
|
|
||||||
|
@ -5,77 +5,12 @@
|
|||||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_hos/hos_06/A3A230", func_80240F7C_A3A45C);
|
INCLUDE_ASM(s32, "world/area_hos/hos_06/A3A230", func_80240F7C_A3A45C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240F7C_A3A45C)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_802445D0_A3DAB0) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_802445D0_A3DAB0)) {
|
|
||||||
N(D_802445D0_A3DAB0) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_802445D4_A3DAB4));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_hos/hos_06/A3A230", func_80240FD0_A3A4B0);
|
INCLUDE_ASM(s32, "world/area_hos/hos_06/A3A230", func_80240FD0_A3A4B0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240FD0_A3A4B0)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_802445D4_A3DAB4) = evt_get_variable(script, *args);
|
|
||||||
N(D_802445D0_A3DAB0) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_hos/hos_06/A3A230", func_80241008_A3A4E8);
|
INCLUDE_ASM(s32, "world/area_hos/hos_06/A3A230", func_80241008_A3A4E8);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241008_A3A4E8)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_hos/hos_06/A3A230", func_802410A4_A3A584);
|
INCLUDE_ASM(s32, "world/area_hos/hos_06/A3A230", func_802410A4_A3A584);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802410A4_A3A584)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_8024476C_A3DC4C) == NULL) {
|
|
||||||
N(D_8024476C_A3DC4C) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_8024476C_A3DC4C)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_8024476C_A3DC4C)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_8024476C_A3DC4C));
|
|
||||||
N(D_8024476C_A3DC4C) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -1,25 +1,6 @@
|
|||||||
#include "hos_06.h"
|
#include "hos_06.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_hos/hos_06/A3B4B0", func_80241FD0_A3B4B0);
|
INCLUDE_ASM(s32, "world/area_hos/hos_06/A3B4B0", func_80241FD0_A3B4B0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241FD0_A3B4B0)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80245E80_A3F360) == NULL) {
|
|
||||||
N(D_80245E80_A3F360) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80245E80_A3F360)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80245E80_A3F360)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80245E80_A3F360));
|
|
||||||
N(D_80245E80_A3F360) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define NAMESPACE dup_hos_06
|
#define NAMESPACE dup_hos_06
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
@ -4,25 +4,6 @@ static char* N(exit_str_0) = "isk_08";
|
|||||||
static char* N(exit_str_1) = "";
|
static char* N(exit_str_1) = "";
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_isk/isk_09/9864E0", func_80240000_9864E0);
|
INCLUDE_ASM(s32, "world/area_isk/isk_09/9864E0", func_80240000_9864E0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240000_9864E0)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_802406F0_986BD0) == NULL) {
|
|
||||||
N(D_802406F0_986BD0) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_802406F0_986BD0)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_802406F0_986BD0)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_802406F0_986BD0));
|
|
||||||
N(D_802406F0_986BD0) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -10,12 +10,6 @@ static char* N(exit_str_3) = "";
|
|||||||
#include "world/common/UnkFunc17.inc.c"
|
#include "world/common/UnkFunc17.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_isk/isk_10/988B60", func_8024003C_988B9C);
|
INCLUDE_ASM(s32, "world/area_isk/isk_10/988B60", func_8024003C_988B9C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_8024003C_988B9C)(Evt* script, s32 isInitialCall) {
|
|
||||||
switch_to_partner(evt_get_variable(script, *script->ptrReadPos));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkFunc18.inc.c"
|
#include "world/common/UnkFunc18.inc.c"
|
||||||
|
|
||||||
@ -34,134 +28,6 @@ INCLUDE_ASM(s32, "world/area_isk/isk_10/988B60", func_802401CC_988D2C);
|
|||||||
#include "world/common/UnkFunc22.inc.c"
|
#include "world/common/UnkFunc22.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_isk/isk_10/988B60", func_80240600_989160);
|
INCLUDE_ASM(s32, "world/area_isk/isk_10/988B60", func_80240600_989160);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240600_989160)(Evt *script, s32 isInitialCall) {
|
|
||||||
Bytecode *args = script->ptrReadPos;
|
|
||||||
Npc* npc = get_npc_safe(-4);
|
|
||||||
f32 sinTheta, cosTheta;
|
|
||||||
s32 i;
|
|
||||||
f32 var;
|
|
||||||
N(UserData)* userDataPtr;
|
|
||||||
N(UserData)* scriptPtr;
|
|
||||||
f32 save, save2;
|
|
||||||
|
|
||||||
sin_cos_deg(gCameras[gCurrentCameraID].currentYaw, &sinTheta, &cosTheta);
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
script->userData = (N(UserData)*)general_heap_malloc(0x68);
|
|
||||||
scriptPtr = (N(UserData)*)script->userData;
|
|
||||||
|
|
||||||
scriptPtr->unk_5C = get_entity_by_index(evt_get_variable(script, *args));
|
|
||||||
|
|
||||||
for (i = 0, userDataPtr = scriptPtr; i < 3; i++) {
|
|
||||||
userDataPtr->unk_08[i] = playFX_51(0, scriptPtr->unk_5C->position.x, scriptPtr->unk_5C->position.y + 12.5f, scriptPtr->unk_5C->position.z, 1.0f, -1);
|
|
||||||
save = 0.0f;
|
|
||||||
userDataPtr->unk_2C[i] = save;
|
|
||||||
userDataPtr->unk_20[i] = save;
|
|
||||||
userDataPtr->unk_14[i] = save;
|
|
||||||
userDataPtr->unk_50[i] = save;
|
|
||||||
userDataPtr->unk_44[i] = save;
|
|
||||||
userDataPtr->unk_38[i] = save;
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr->unk_00 = 0;
|
|
||||||
scriptPtr->unk_04 = 0;
|
|
||||||
scriptPtr->unk_60 = 0;
|
|
||||||
scriptPtr->unk_64 = 0;
|
|
||||||
|
|
||||||
userDataPtr = scriptPtr;
|
|
||||||
for (i = 0, save = 50.0f; i < 3; i++) {
|
|
||||||
var = 0;
|
|
||||||
add_vec2D_polar(&var, &scriptPtr->unk_44[i], save, N(D_80241158_989CB8)[i]);
|
|
||||||
userDataPtr->unk_38[i] = cosTheta * var;
|
|
||||||
userDataPtr->unk_50[i] = sinTheta * var;
|
|
||||||
userDataPtr->unk_38[i] = npc->pos.x - (scriptPtr->unk_5C->position.x + userDataPtr->unk_38[i]);
|
|
||||||
userDataPtr->unk_44[i] = npc->pos.y - (scriptPtr->unk_5C->position.y + userDataPtr->unk_44[i]);
|
|
||||||
userDataPtr->unk_50[i] = npc->pos.z - (scriptPtr->unk_5C->position.z + userDataPtr->unk_50[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr = (N(UserData)*)script->userData;
|
|
||||||
switch (scriptPtr->unk_00) {
|
|
||||||
case 0:
|
|
||||||
save = update_lerp(5, 0.0f, 50.0f, scriptPtr->unk_60, 0x14);
|
|
||||||
save2 = 0.0f;
|
|
||||||
for (i = 0; i < 3; i++) {
|
|
||||||
scriptPtr->unk_20[i] = save2;
|
|
||||||
var = save2;
|
|
||||||
add_vec2D_polar(&var, &scriptPtr->unk_20[i], save, N(D_80241158_989CB8)[i]);
|
|
||||||
scriptPtr->unk_14[i] = cosTheta * var;
|
|
||||||
scriptPtr->unk_2C[i] = sinTheta * var;
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr->unk_60++;
|
|
||||||
if (scriptPtr->unk_60 >= 0x15) {
|
|
||||||
scriptPtr->unk_00 = 1;
|
|
||||||
scriptPtr->unk_60 = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
save = 50.0f;
|
|
||||||
save2 = 0.0f;
|
|
||||||
for (i = 0; i < 3; i++) {
|
|
||||||
scriptPtr->unk_20[i] = save2;
|
|
||||||
var = save2;
|
|
||||||
add_vec2D_polar(&var, &scriptPtr->unk_20[i], save, N(D_80241158_989CB8)[i]);
|
|
||||||
scriptPtr->unk_14[i] = cosTheta * var;
|
|
||||||
scriptPtr->unk_2C[i] = sinTheta * var;
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr->unk_60++;
|
|
||||||
if (scriptPtr->unk_60 >= 0x10) {
|
|
||||||
scriptPtr->unk_60 = 0xF;
|
|
||||||
scriptPtr->unk_00 = 2;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
scriptPtr->unk_60++;
|
|
||||||
if (scriptPtr->unk_60 >= 0x1F) {
|
|
||||||
for (i = 0, userDataPtr = scriptPtr; i < 3; i++) {
|
|
||||||
userDataPtr->unk_08[i]->flags |= 0x10;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (scriptPtr->unk_04) {
|
|
||||||
case 0:
|
|
||||||
scriptPtr->unk_64++;
|
|
||||||
if (scriptPtr->unk_64 >= 0x10) {
|
|
||||||
scriptPtr->unk_04 = 1;
|
|
||||||
scriptPtr->unk_64 = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
for (i = 0, userDataPtr = scriptPtr; i < 3; i++) {
|
|
||||||
userDataPtr->unk_14[i] = userDataPtr->unk_14[i] + update_lerp(1, 0.0f, userDataPtr->unk_38[i], scriptPtr->unk_64, 0x14);
|
|
||||||
userDataPtr->unk_20[i] = userDataPtr->unk_20[i] + update_lerp(1, 0.0f, userDataPtr->unk_44[i], scriptPtr->unk_64, 0x14);
|
|
||||||
userDataPtr->unk_2C[i] = userDataPtr->unk_2C[i] + update_lerp(1, 0.0f, userDataPtr->unk_50[i], scriptPtr->unk_64, 0x14);
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr->unk_64++;
|
|
||||||
if (scriptPtr->unk_64 >= 0x15) {
|
|
||||||
scriptPtr->unk_04 = 2;
|
|
||||||
scriptPtr->unk_64 = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0, userDataPtr = scriptPtr; i < 3; i++) {
|
|
||||||
((EffectInstanceData*)userDataPtr->unk_08[i]->unk_0C)->rotation.x = userDataPtr->unk_14[i];
|
|
||||||
((EffectInstanceData*)userDataPtr->unk_08[i]->unk_0C)->rotation.y = userDataPtr->unk_20[i];
|
|
||||||
((EffectInstanceData*)userDataPtr->unk_08[i]->unk_0C)->rotation.z = userDataPtr->unk_2C[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkFunc23.inc.c"
|
#include "world/common/UnkFunc23.inc.c"
|
||||||
|
|
||||||
|
@ -4,25 +4,6 @@ static char* N(exit_str_0) = "iwa_10";
|
|||||||
static char* N(exit_str_1) = "iwa_01";
|
static char* N(exit_str_1) = "iwa_01";
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_iwa/iwa_00/90CC40", func_80240000_90CC40);
|
INCLUDE_ASM(s32, "world/area_iwa/iwa_00/90CC40", func_80240000_90CC40);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240000_90CC40)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80240FF8_90DC38) == NULL) {
|
|
||||||
N(D_80240FF8_90DC38) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80240FF8_90DC38)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80240FF8_90DC38)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80240FF8_90DC38));
|
|
||||||
N(D_80240FF8_90DC38) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -45,26 +45,6 @@ INCLUDE_ASM(s32, "world/area_iwa/iwa_01/90FBD0", func_802422C4_911974);
|
|||||||
#include "world/common/UnkNpcAIFunc18.inc.c"
|
#include "world/common/UnkNpcAIFunc18.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_iwa/iwa_01/90FBD0", func_80242498_911B48);
|
INCLUDE_ASM(s32, "world/area_iwa/iwa_01/90FBD0", func_80242498_911B48);
|
||||||
/*
|
|
||||||
void N(func_80242498_911B48)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc *npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
s32 var;
|
|
||||||
|
|
||||||
if (script->functionTemp[1] <= 0) {
|
|
||||||
script->functionTemp[1] = aiSettings->unk_14;
|
|
||||||
if (func_800490B4(territory, enemy, aiSettings->alertRadius * 0.85, aiSettings->unk_10.f, 0)) {
|
|
||||||
npc->currentAnim = enemy->animList[9];
|
|
||||||
fx_emote(0, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 15, &var);
|
|
||||||
ai_enemy_play_sound(npc, 0x2F4, 0x200000);
|
|
||||||
npc->duration = 12;
|
|
||||||
script->functionTemp[0] = 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
script->functionTemp[1]--;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc21.inc.c"
|
#include "world/common/UnkNpcAIFunc21.inc.c"
|
||||||
|
|
||||||
@ -77,55 +57,10 @@ void N(func_80242498_911B48)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
|||||||
#include "world/common/UnkNpcAIFunc16.inc.c"
|
#include "world/common/UnkNpcAIFunc16.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_iwa/iwa_01/90FBD0", func_80242958_912008);
|
INCLUDE_ASM(s32, "world/area_iwa/iwa_01/90FBD0", func_80242958_912008);
|
||||||
/*
|
|
||||||
void N(func_80242958_912008)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc *npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
PlayerStatus** playerStatus = &gPlayerStatusPtr;
|
|
||||||
|
|
||||||
npc->yaw = atan2(npc->pos.x, npc->pos.z, (*playerStatus)->position.x, (*playerStatus)->position.z);
|
|
||||||
if (npc->duration % 3 == 0) {
|
|
||||||
fx_walk(2, npc->pos.x, npc->pos.y, npc->pos.z + 2.0f, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
npc->duration--;
|
|
||||||
if (npc->duration <= 0) {
|
|
||||||
playerStatus = &gPlayerStatusPtr;
|
|
||||||
|
|
||||||
enemy->unk_10.x = npc->pos.x;
|
|
||||||
enemy->unk_10.y = npc->pos.y;
|
|
||||||
enemy->unk_10.z = npc->pos.z;
|
|
||||||
enemy->unk_07 = 1;
|
|
||||||
npc->moveSpeed = aiSettings->chaseSpeed;
|
|
||||||
npc->duration = dist2D(npc->pos.x, npc->pos.z, (*playerStatus)->position.x, (*playerStatus)->position.z) / npc->moveSpeed + 0.9;
|
|
||||||
if (npc->duration < 15) {
|
|
||||||
npc->duration = 15;
|
|
||||||
}
|
|
||||||
script->functionTemp[0] = 0x16;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkFunc10.inc.c"
|
#include "world/common/UnkFunc10.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_iwa/iwa_01/90FBD0", func_80242C48_9122F8);
|
INCLUDE_ASM(s32, "world/area_iwa/iwa_01/90FBD0", func_80242C48_9122F8);
|
||||||
/*
|
|
||||||
void N(func_80242C48_9122F8)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc *npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
|
|
||||||
npc->duration--;
|
|
||||||
if (npc->duration <= 0) {
|
|
||||||
npc->currentAnim = enemy->animList[1];
|
|
||||||
if (enemy->territory->wander.moveSpeedOverride < 0) {
|
|
||||||
npc->moveSpeed = aiSettings->moveSpeed;
|
|
||||||
} else {
|
|
||||||
npc->moveSpeed = enemy->territory->wander.moveSpeedOverride / 32767.0;
|
|
||||||
}
|
|
||||||
script->functionTemp[0] = 0x29;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkFunc9.inc.c"
|
#include "world/common/UnkFunc9.inc.c"
|
||||||
|
|
||||||
|
@ -8,26 +8,6 @@ INCLUDE_ASM(s32, "world/area_iwa/iwa_02/915D70", func_80240000_915D70);
|
|||||||
#include "world/common/UnkNpcAIFunc18.inc.c"
|
#include "world/common/UnkNpcAIFunc18.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_iwa/iwa_02/915D70", func_802401D4_915F44);
|
INCLUDE_ASM(s32, "world/area_iwa/iwa_02/915D70", func_802401D4_915F44);
|
||||||
/*
|
|
||||||
void N(func_802401D4_915F44)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc *npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
s32 var;
|
|
||||||
|
|
||||||
if (script->functionTemp[1] <= 0) {
|
|
||||||
script->functionTemp[1] = aiSettings->unk_14;
|
|
||||||
if (func_800490B4(territory, enemy, aiSettings->alertRadius * 0.85, aiSettings->unk_10.f, 0)) {
|
|
||||||
npc->currentAnim = enemy->animList[9];
|
|
||||||
fx_emote(0, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 15, &var);
|
|
||||||
ai_enemy_play_sound(npc, 0x2F4, 0x200000);
|
|
||||||
npc->duration = 12;
|
|
||||||
script->functionTemp[0] = 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
script->functionTemp[1]--;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc21.inc.c"
|
#include "world/common/UnkNpcAIFunc21.inc.c"
|
||||||
|
|
||||||
@ -40,55 +20,10 @@ void N(func_802401D4_915F44)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
|||||||
#include "world/common/UnkNpcAIFunc16.inc.c"
|
#include "world/common/UnkNpcAIFunc16.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_iwa/iwa_02/915D70", func_80240694_916404);
|
INCLUDE_ASM(s32, "world/area_iwa/iwa_02/915D70", func_80240694_916404);
|
||||||
/*
|
|
||||||
void N(func_80240694_916404)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc *npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
PlayerStatus** playerStatus = &gPlayerStatusPtr;
|
|
||||||
|
|
||||||
npc->yaw = atan2(npc->pos.x, npc->pos.z, (*playerStatus)->position.x, (*playerStatus)->position.z);
|
|
||||||
if (npc->duration % 3 == 0) {
|
|
||||||
fx_walk(2, npc->pos.x, npc->pos.y, npc->pos.z + 2.0f, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
npc->duration--;
|
|
||||||
if (npc->duration <= 0) {
|
|
||||||
playerStatus = &gPlayerStatusPtr;
|
|
||||||
|
|
||||||
enemy->unk_10.x = npc->pos.x;
|
|
||||||
enemy->unk_10.y = npc->pos.y;
|
|
||||||
enemy->unk_10.z = npc->pos.z;
|
|
||||||
enemy->unk_07 = 1;
|
|
||||||
npc->moveSpeed = aiSettings->chaseSpeed;
|
|
||||||
npc->duration = dist2D(npc->pos.x, npc->pos.z, (*playerStatus)->position.x, (*playerStatus)->position.z) / npc->moveSpeed + 0.9;
|
|
||||||
if (npc->duration < 15) {
|
|
||||||
npc->duration = 15;
|
|
||||||
}
|
|
||||||
script->functionTemp[0] = 0x16;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkFunc10.inc.c"
|
#include "world/common/UnkFunc10.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_iwa/iwa_02/915D70", func_80240984_9166F4);
|
INCLUDE_ASM(s32, "world/area_iwa/iwa_02/915D70", func_80240984_9166F4);
|
||||||
/*
|
|
||||||
void N(func_80240984_9166F4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc *npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
|
|
||||||
npc->duration--;
|
|
||||||
if (npc->duration <= 0) {
|
|
||||||
npc->currentAnim = enemy->animList[1];
|
|
||||||
if (enemy->territory->wander.moveSpeedOverride < 0) {
|
|
||||||
npc->moveSpeed = aiSettings->moveSpeed;
|
|
||||||
} else {
|
|
||||||
npc->moveSpeed = enemy->territory->wander.moveSpeedOverride / 32767.0;
|
|
||||||
}
|
|
||||||
script->functionTemp[0] = 0x29;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkFunc9.inc.c"
|
#include "world/common/UnkFunc9.inc.c"
|
||||||
|
|
||||||
@ -101,24 +36,5 @@ void N(func_80240984_9166F4)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
|||||||
INCLUDE_ASM(s32, "world/area_iwa/iwa_02/915D70", func_80240C90_916A00);
|
INCLUDE_ASM(s32, "world/area_iwa/iwa_02/915D70", func_80240C90_916A00);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_iwa/iwa_02/915D70", func_80240FE0_916D50);
|
INCLUDE_ASM(s32, "world/area_iwa/iwa_02/915D70", func_80240FE0_916D50);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240FE0_916D50)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80241DA8_917B18) == NULL) {
|
|
||||||
N(D_80241DA8_917B18) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80241DA8_917B18)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80241DA8_917B18)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80241DA8_917B18));
|
|
||||||
N(D_80241DA8_917B18) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
@ -4,25 +4,6 @@ static char* N(exit_str_0) = "iwa_01";
|
|||||||
static char* N(exit_str_1) = "";
|
static char* N(exit_str_1) = "";
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_iwa/iwa_03/918BB0", func_80240000_918BB0);
|
INCLUDE_ASM(s32, "world/area_iwa/iwa_03/918BB0", func_80240000_918BB0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240000_918BB0)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80241530_91A0E0) == NULL) {
|
|
||||||
N(D_80241530_91A0E0) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80241530_91A0E0)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80241530_91A0E0)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80241530_91A0E0));
|
|
||||||
N(D_80241530_91A0E0) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -5,26 +5,6 @@ INCLUDE_ASM(s32, "world/area_iwa/iwa_03/918EF0", func_80240340_918EF0);
|
|||||||
#include "world/common/UnkNpcAIFunc18.inc.c"
|
#include "world/common/UnkNpcAIFunc18.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_iwa/iwa_03/918EF0", func_80240514_9190C4);
|
INCLUDE_ASM(s32, "world/area_iwa/iwa_03/918EF0", func_80240514_9190C4);
|
||||||
/*
|
|
||||||
void N(func_80240514_9190C4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc *npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
s32 var;
|
|
||||||
|
|
||||||
if (script->functionTemp[1] <= 0) {
|
|
||||||
script->functionTemp[1] = aiSettings->unk_14;
|
|
||||||
if (func_800490B4(territory, enemy, aiSettings->alertRadius * 0.85, aiSettings->unk_10.f, 0)) {
|
|
||||||
npc->currentAnim = enemy->animList[9];
|
|
||||||
fx_emote(0, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 15, &var);
|
|
||||||
ai_enemy_play_sound(npc, 0x2F4, 0x200000);
|
|
||||||
npc->duration = 12;
|
|
||||||
script->functionTemp[0] = 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
script->functionTemp[1]--;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc21.inc.c"
|
#include "world/common/UnkNpcAIFunc21.inc.c"
|
||||||
|
|
||||||
@ -37,55 +17,10 @@ void N(func_80240514_9190C4)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
|||||||
#include "world/common/UnkNpcAIFunc16.inc.c"
|
#include "world/common/UnkNpcAIFunc16.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_iwa/iwa_03/918EF0", func_802409D4_919584);
|
INCLUDE_ASM(s32, "world/area_iwa/iwa_03/918EF0", func_802409D4_919584);
|
||||||
/*
|
|
||||||
void N(func_802409D4_919584)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc *npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
PlayerStatus** playerStatus = &gPlayerStatusPtr;
|
|
||||||
|
|
||||||
npc->yaw = atan2(npc->pos.x, npc->pos.z, (*playerStatus)->position.x, (*playerStatus)->position.z);
|
|
||||||
if (npc->duration % 3 == 0) {
|
|
||||||
fx_walk(2, npc->pos.x, npc->pos.y, npc->pos.z + 2.0f, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
npc->duration--;
|
|
||||||
if (npc->duration <= 0) {
|
|
||||||
playerStatus = &gPlayerStatusPtr;
|
|
||||||
|
|
||||||
enemy->unk_10.x = npc->pos.x;
|
|
||||||
enemy->unk_10.y = npc->pos.y;
|
|
||||||
enemy->unk_10.z = npc->pos.z;
|
|
||||||
enemy->unk_07 = 1;
|
|
||||||
npc->moveSpeed = aiSettings->chaseSpeed;
|
|
||||||
npc->duration = dist2D(npc->pos.x, npc->pos.z, (*playerStatus)->position.x, (*playerStatus)->position.z) / npc->moveSpeed + 0.9;
|
|
||||||
if (npc->duration < 15) {
|
|
||||||
npc->duration = 15;
|
|
||||||
}
|
|
||||||
script->functionTemp[0] = 0x16;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkFunc10.inc.c"
|
#include "world/common/UnkFunc10.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_iwa/iwa_03/918EF0", func_80240CC4_919874);
|
INCLUDE_ASM(s32, "world/area_iwa/iwa_03/918EF0", func_80240CC4_919874);
|
||||||
/*
|
|
||||||
void N(func_80240CC4_919874)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc *npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
|
|
||||||
npc->duration--;
|
|
||||||
if (npc->duration <= 0) {
|
|
||||||
npc->currentAnim = enemy->animList[1];
|
|
||||||
if (enemy->territory->wander.moveSpeedOverride < 0) {
|
|
||||||
npc->moveSpeed = aiSettings->moveSpeed;
|
|
||||||
} else {
|
|
||||||
npc->moveSpeed = enemy->territory->wander.moveSpeedOverride / 32767.0;
|
|
||||||
}
|
|
||||||
script->functionTemp[0] = 0x29;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkFunc9.inc.c"
|
#include "world/common/UnkFunc9.inc.c"
|
||||||
|
|
||||||
|
@ -10,26 +10,6 @@ INCLUDE_ASM(s32, "world/area_iwa/iwa_04/91B8E0", func_80240080_91B960);
|
|||||||
#include "world/common/UnkNpcAIFunc18.inc.c"
|
#include "world/common/UnkNpcAIFunc18.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_iwa/iwa_04/91B8E0", func_80240254_91BB34);
|
INCLUDE_ASM(s32, "world/area_iwa/iwa_04/91B8E0", func_80240254_91BB34);
|
||||||
/*
|
|
||||||
void N(func_80240254_91BB34)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc *npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
s32 var;
|
|
||||||
|
|
||||||
if (script->functionTemp[1] <= 0) {
|
|
||||||
script->functionTemp[1] = aiSettings->unk_14;
|
|
||||||
if (func_800490B4(territory, enemy, aiSettings->alertRadius * 0.85, aiSettings->unk_10.f, 0)) {
|
|
||||||
npc->currentAnim = enemy->animList[9];
|
|
||||||
fx_emote(0, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 15, &var);
|
|
||||||
ai_enemy_play_sound(npc, 0x2F4, 0x200000);
|
|
||||||
npc->duration = 12;
|
|
||||||
script->functionTemp[0] = 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
script->functionTemp[1]--;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc21.inc.c"
|
#include "world/common/UnkNpcAIFunc21.inc.c"
|
||||||
|
|
||||||
@ -42,55 +22,10 @@ void N(func_80240254_91BB34)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
|||||||
#include "world/common/UnkNpcAIFunc16.inc.c"
|
#include "world/common/UnkNpcAIFunc16.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_iwa/iwa_04/91B8E0", func_80240714_91BFF4);
|
INCLUDE_ASM(s32, "world/area_iwa/iwa_04/91B8E0", func_80240714_91BFF4);
|
||||||
/*
|
|
||||||
void N(func_80240714_91BFF4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc *npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
PlayerStatus** playerStatus = &gPlayerStatusPtr;
|
|
||||||
|
|
||||||
npc->yaw = atan2(npc->pos.x, npc->pos.z, (*playerStatus)->position.x, (*playerStatus)->position.z);
|
|
||||||
if (npc->duration % 3 == 0) {
|
|
||||||
fx_walk(2, npc->pos.x, npc->pos.y, npc->pos.z + 2.0f, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
npc->duration--;
|
|
||||||
if (npc->duration <= 0) {
|
|
||||||
playerStatus = &gPlayerStatusPtr;
|
|
||||||
|
|
||||||
enemy->unk_10.x = npc->pos.x;
|
|
||||||
enemy->unk_10.y = npc->pos.y;
|
|
||||||
enemy->unk_10.z = npc->pos.z;
|
|
||||||
enemy->unk_07 = 1;
|
|
||||||
npc->moveSpeed = aiSettings->chaseSpeed;
|
|
||||||
npc->duration = dist2D(npc->pos.x, npc->pos.z, (*playerStatus)->position.x, (*playerStatus)->position.z) / npc->moveSpeed + 0.9;
|
|
||||||
if (npc->duration < 15) {
|
|
||||||
npc->duration = 15;
|
|
||||||
}
|
|
||||||
script->functionTemp[0] = 0x16;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkFunc10.inc.c"
|
#include "world/common/UnkFunc10.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_iwa/iwa_04/91B8E0", func_80240A04_91C2E4);
|
INCLUDE_ASM(s32, "world/area_iwa/iwa_04/91B8E0", func_80240A04_91C2E4);
|
||||||
/*
|
|
||||||
void N(func_80240A04_91C2E4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc *npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
|
|
||||||
npc->duration--;
|
|
||||||
if (npc->duration <= 0) {
|
|
||||||
npc->currentAnim = enemy->animList[1];
|
|
||||||
if (enemy->territory->wander.moveSpeedOverride < 0) {
|
|
||||||
npc->moveSpeed = aiSettings->moveSpeed;
|
|
||||||
} else {
|
|
||||||
npc->moveSpeed = enemy->territory->wander.moveSpeedOverride / 32767.0;
|
|
||||||
}
|
|
||||||
script->functionTemp[0] = 0x29;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkFunc9.inc.c"
|
#include "world/common/UnkFunc9.inc.c"
|
||||||
|
|
||||||
|
@ -1,24 +1,5 @@
|
|||||||
#include "iwa_10.h"
|
#include "iwa_10.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91E5B0", func_80240040_91E5B0);
|
INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91E5B0", func_80240040_91E5B0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240040_91E5B0)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80241DD0_920340) == NULL) {
|
|
||||||
N(D_80241DD0_920340) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80241DD0_920340)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80241DD0_920340)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80241DD0_920340));
|
|
||||||
N(D_80241DD0_920340) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
@ -7,12 +7,6 @@
|
|||||||
#include "world/common/UnkFunc17.inc.c"
|
#include "world/common/UnkFunc17.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91E6D0", func_8024032C_91E89C);
|
INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91E6D0", func_8024032C_91E89C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_8024032C_91E89C)(Evt* script, s32 isInitialCall) {
|
|
||||||
switch_to_partner(evt_get_variable(script, *script->ptrReadPos));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkFunc18.inc.c"
|
#include "world/common/UnkFunc18.inc.c"
|
||||||
|
|
||||||
@ -31,134 +25,6 @@ INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91E6D0", func_802404BC_91EA2C);
|
|||||||
#include "world/common/UnkFunc22.inc.c"
|
#include "world/common/UnkFunc22.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91E6D0", func_802408F0_91EE60);
|
INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91E6D0", func_802408F0_91EE60);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802408F0_91EE60)(Evt *script, s32 isInitialCall) {
|
|
||||||
Bytecode *args = script->ptrReadPos;
|
|
||||||
Npc* npc = get_npc_safe(-4);
|
|
||||||
f32 sinTheta, cosTheta;
|
|
||||||
s32 i;
|
|
||||||
f32 var;
|
|
||||||
N(UserData)* userDataPtr;
|
|
||||||
N(UserData)* scriptPtr;
|
|
||||||
f32 save, save2;
|
|
||||||
|
|
||||||
sin_cos_deg(gCameras[gCurrentCameraID].currentYaw, &sinTheta, &cosTheta);
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
script->userData = (N(UserData)*)general_heap_malloc(0x68);
|
|
||||||
scriptPtr = (N(UserData)*)script->userData;
|
|
||||||
|
|
||||||
scriptPtr->unk_5C = get_entity_by_index(evt_get_variable(script, *args));
|
|
||||||
|
|
||||||
for (i = 0, userDataPtr = scriptPtr; i < 3; i++) {
|
|
||||||
userDataPtr->unk_08[i] = playFX_51(0, scriptPtr->unk_5C->position.x, scriptPtr->unk_5C->position.y + 12.5f, scriptPtr->unk_5C->position.z, 1.0f, -1);
|
|
||||||
save = 0.0f;
|
|
||||||
userDataPtr->unk_2C[i] = save;
|
|
||||||
userDataPtr->unk_20[i] = save;
|
|
||||||
userDataPtr->unk_14[i] = save;
|
|
||||||
userDataPtr->unk_50[i] = save;
|
|
||||||
userDataPtr->unk_44[i] = save;
|
|
||||||
userDataPtr->unk_38[i] = save;
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr->unk_00 = 0;
|
|
||||||
scriptPtr->unk_04 = 0;
|
|
||||||
scriptPtr->unk_60 = 0;
|
|
||||||
scriptPtr->unk_64 = 0;
|
|
||||||
|
|
||||||
userDataPtr = scriptPtr;
|
|
||||||
for (i = 0, save = 50.0f; i < 3; i++) {
|
|
||||||
var = 0;
|
|
||||||
add_vec2D_polar(&var, &scriptPtr->unk_44[i], save, N(D_80245AB8_924028)[i]);
|
|
||||||
userDataPtr->unk_38[i] = cosTheta * var;
|
|
||||||
userDataPtr->unk_50[i] = sinTheta * var;
|
|
||||||
userDataPtr->unk_38[i] = npc->pos.x - (scriptPtr->unk_5C->position.x + userDataPtr->unk_38[i]);
|
|
||||||
userDataPtr->unk_44[i] = npc->pos.y - (scriptPtr->unk_5C->position.y + userDataPtr->unk_44[i]);
|
|
||||||
userDataPtr->unk_50[i] = npc->pos.z - (scriptPtr->unk_5C->position.z + userDataPtr->unk_50[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr = (N(UserData)*)script->userData;
|
|
||||||
switch (scriptPtr->unk_00) {
|
|
||||||
case 0:
|
|
||||||
save = update_lerp(5, 0.0f, 50.0f, scriptPtr->unk_60, 0x14);
|
|
||||||
save2 = 0.0f;
|
|
||||||
for (i = 0; i < 3; i++) {
|
|
||||||
scriptPtr->unk_20[i] = save2;
|
|
||||||
var = save2;
|
|
||||||
add_vec2D_polar(&var, &scriptPtr->unk_20[i], save, N(D_80245AB8_924028)[i]);
|
|
||||||
scriptPtr->unk_14[i] = cosTheta * var;
|
|
||||||
scriptPtr->unk_2C[i] = sinTheta * var;
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr->unk_60++;
|
|
||||||
if (scriptPtr->unk_60 >= 0x15) {
|
|
||||||
scriptPtr->unk_00 = 1;
|
|
||||||
scriptPtr->unk_60 = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
save = 50.0f;
|
|
||||||
save2 = 0.0f;
|
|
||||||
for (i = 0; i < 3; i++) {
|
|
||||||
scriptPtr->unk_20[i] = save2;
|
|
||||||
var = save2;
|
|
||||||
add_vec2D_polar(&var, &scriptPtr->unk_20[i], save, N(D_80245AB8_924028)[i]);
|
|
||||||
scriptPtr->unk_14[i] = cosTheta * var;
|
|
||||||
scriptPtr->unk_2C[i] = sinTheta * var;
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr->unk_60++;
|
|
||||||
if (scriptPtr->unk_60 >= 0x10) {
|
|
||||||
scriptPtr->unk_60 = 0xF;
|
|
||||||
scriptPtr->unk_00 = 2;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
scriptPtr->unk_60++;
|
|
||||||
if (scriptPtr->unk_60 >= 0x1F) {
|
|
||||||
for (i = 0, userDataPtr = scriptPtr; i < 3; i++) {
|
|
||||||
userDataPtr->unk_08[i]->flags |= 0x10;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (scriptPtr->unk_04) {
|
|
||||||
case 0:
|
|
||||||
scriptPtr->unk_64++;
|
|
||||||
if (scriptPtr->unk_64 >= 0x10) {
|
|
||||||
scriptPtr->unk_04 = 1;
|
|
||||||
scriptPtr->unk_64 = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
for (i = 0, userDataPtr = scriptPtr; i < 3; i++) {
|
|
||||||
userDataPtr->unk_14[i] = userDataPtr->unk_14[i] + update_lerp(1, 0.0f, userDataPtr->unk_38[i], scriptPtr->unk_64, 0x14);
|
|
||||||
userDataPtr->unk_20[i] = userDataPtr->unk_20[i] + update_lerp(1, 0.0f, userDataPtr->unk_44[i], scriptPtr->unk_64, 0x14);
|
|
||||||
userDataPtr->unk_2C[i] = userDataPtr->unk_2C[i] + update_lerp(1, 0.0f, userDataPtr->unk_50[i], scriptPtr->unk_64, 0x14);
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr->unk_64++;
|
|
||||||
if (scriptPtr->unk_64 >= 0x15) {
|
|
||||||
scriptPtr->unk_04 = 2;
|
|
||||||
scriptPtr->unk_64 = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0, userDataPtr = scriptPtr; i < 3; i++) {
|
|
||||||
((EffectInstanceData*)userDataPtr->unk_08[i]->unk_0C)->rotation.x = userDataPtr->unk_14[i];
|
|
||||||
((EffectInstanceData*)userDataPtr->unk_08[i]->unk_0C)->rotation.y = userDataPtr->unk_20[i];
|
|
||||||
((EffectInstanceData*)userDataPtr->unk_08[i]->unk_0C)->rotation.z = userDataPtr->unk_2C[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkFunc23.inc.c"
|
#include "world/common/UnkFunc23.inc.c"
|
||||||
|
|
||||||
|
@ -7,53 +7,7 @@
|
|||||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91F5A0", func_802413E0_91F950);
|
INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91F5A0", func_802413E0_91F950);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802413E0_91F950)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_8024626C_9247DC) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_8024626C_9247DC)) {
|
|
||||||
N(D_8024626C_9247DC) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_80246270_9247E0));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91F5A0", func_80241434_91F9A4);
|
INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91F5A0", func_80241434_91F9A4);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241434_91F9A4)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_80246270_9247E0) = evt_get_variable(script, *args);
|
|
||||||
N(D_8024626C_9247DC) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91F5A0", func_8024146C_91F9DC);
|
INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91F5A0", func_8024146C_91F9DC);
|
||||||
/*
|
|
||||||
ApiStatus N(func_8024146C_91F9DC)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
@ -10,25 +10,6 @@ INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_8024030C_B2084C);
|
|||||||
INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_80240340_B20880);
|
INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_80240340_B20880);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_802403F4_B20934);
|
INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_802403F4_B20934);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802403F4_B20934)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_802423C8_B22908) == NULL) {
|
|
||||||
N(D_802423C8_B22908) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_802423C8_B22908)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_802423C8_B22908)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_802423C8_B22908));
|
|
||||||
N(D_802423C8_B22908) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
@ -37,79 +18,18 @@ ApiStatus N(func_802403F4_B20934)(Evt* script, s32 isInitialCall) {
|
|||||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_80240738_B20C78);
|
INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_80240738_B20C78);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240738_B20C78)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_8024242C_B2296C) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_8024242C_B2296C)) {
|
|
||||||
N(D_8024242C_B2296C) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_80242430_B22970));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_8024078C_B20CCC);
|
INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_8024078C_B20CCC);
|
||||||
/*
|
|
||||||
ApiStatus N(func_8024078C_B20CCC)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_80242430_B22970) = evt_get_variable(script, *args);
|
|
||||||
N(D_8024242C_B2296C) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_802407C4_B20D04);
|
INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_802407C4_B20D04);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802407C4_B20D04)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/SetManyVars.inc.c"
|
#include "world/common/SetManyVars.inc.c"
|
||||||
|
|
||||||
#include "world/common/UnkYawFunc.inc.c"
|
#include "world/common/UnkYawFunc.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_80240ADC_B2101C);
|
INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_80240ADC_B2101C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240ADC_B2101C)(Evt *script, s32 isInitialCall) {
|
|
||||||
Npc *npc = get_npc_unsafe(script->varTable[2]);
|
|
||||||
|
|
||||||
D_8024E1B4 = npc->currentAnim;
|
|
||||||
npc->currentAnim = script->varTable[4];
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_80240B20_B21060);
|
INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_80240B20_B21060);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240B20_B21060)(Evt *script, s32 isInitialCall) {
|
|
||||||
get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_80240B4C_B2108C);
|
INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_80240B4C_B2108C);
|
||||||
|
|
||||||
|
@ -1,25 +1,6 @@
|
|||||||
#include "jan_04.h"
|
#include "jan_04.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_jan/jan_04/B44AC0", func_80240350_B44AC0);
|
INCLUDE_ASM(s32, "world/area_jan/jan_04/B44AC0", func_80240350_B44AC0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240350_B44AC0)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80241800_B45F70) == NULL) {
|
|
||||||
N(D_80241800_B45F70) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80241800_B45F70)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80241800_B45F70)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80241800_B45F70));
|
|
||||||
N(D_80241800_B45F70) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -6,9 +6,8 @@
|
|||||||
|
|
||||||
#include "world/common/GetEntityPosition.inc.c"
|
#include "world/common/GetEntityPosition.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_jan/jan_04/B451F0", func_80240BE8_B45358);
|
|
||||||
// Can't get this to match because the const array above is in "discarded section .data"
|
// Can't get this to match because the const array above is in "discarded section .data"
|
||||||
/*
|
#ifdef NON_EQUIVALENT
|
||||||
ApiStatus func_80240BE8_B45358(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80240BE8_B45358(Evt* script, s32 isInitialCall) {
|
||||||
Entity* entity = get_entity_by_index(script->varTable[10]);
|
Entity* entity = get_entity_by_index(script->varTable[10]);
|
||||||
|
|
||||||
@ -28,7 +27,10 @@ ApiStatus func_80240BE8_B45358(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
return ApiStatus_BLOCK;
|
return ApiStatus_BLOCK;
|
||||||
}
|
}
|
||||||
*/
|
#else
|
||||||
|
INCLUDE_ASM(s32, "world/area_jan/jan_04/B451F0", func_80240BE8_B45358);
|
||||||
|
#endif
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_jan/jan_04/B451F0", func_80240D0C_B4547C);
|
INCLUDE_ASM(s32, "world/area_jan/jan_04/B451F0", func_80240D0C_B4547C);
|
||||||
|
|
||||||
#define NAMESPACE dup_jan_04
|
#define NAMESPACE dup_jan_04
|
||||||
|
@ -1,14 +1,3 @@
|
|||||||
#include "jan_06.h"
|
#include "jan_06.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_jan/jan_06/B52B40", func_80240310_B52B40);
|
INCLUDE_ASM(s32, "world/area_jan/jan_06/B52B40", func_80240310_B52B40);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240310_B52B40)(Evt *script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
script->functionTemp[0] = evt_get_variable(script, *args++);
|
|
||||||
script->functionTemp[1] = evt_get_variable(script, *args++);
|
|
||||||
script->functionTemp[2] = evt_get_variable(script, *args++);
|
|
||||||
sfx_adjust_env_sound_pos(0x194, 0, script->functionTemp[0], script->functionTemp[1], script->functionTemp[2]);
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
@ -5,12 +5,6 @@
|
|||||||
#include "world/common/UnkFunc17.inc.c"
|
#include "world/common/UnkFunc17.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_jan/jan_08/B5E910", func_8024069C_B5E94C);
|
INCLUDE_ASM(s32, "world/area_jan/jan_08/B5E910", func_8024069C_B5E94C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_8024069C_B5E94C)(Evt* script, s32 isInitialCall) {
|
|
||||||
switch_to_partner(evt_get_variable(script, *script->ptrReadPos));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkFunc18.inc.c"
|
#include "world/common/UnkFunc18.inc.c"
|
||||||
|
|
||||||
@ -29,134 +23,6 @@ INCLUDE_ASM(s32, "world/area_jan/jan_08/B5E910", func_8024082C_B5EADC);
|
|||||||
#include "world/common/UnkFunc22.inc.c"
|
#include "world/common/UnkFunc22.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_jan/jan_08/B5E910", func_80240C60_B5EF10);
|
INCLUDE_ASM(s32, "world/area_jan/jan_08/B5E910", func_80240C60_B5EF10);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240C60_B5EF10)(Evt *script, s32 isInitialCall) {
|
|
||||||
Bytecode *args = script->ptrReadPos;
|
|
||||||
Npc* npc = get_npc_safe(-4);
|
|
||||||
f32 sinTheta, cosTheta;
|
|
||||||
s32 i;
|
|
||||||
f32 var;
|
|
||||||
N(UserData)* userDataPtr;
|
|
||||||
N(UserData)* scriptPtr;
|
|
||||||
f32 save, save2;
|
|
||||||
|
|
||||||
sin_cos_deg(gCameras[gCurrentCameraID].currentYaw, &sinTheta, &cosTheta);
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
script->userData = (N(UserData)*)general_heap_malloc(0x68);
|
|
||||||
scriptPtr = (N(UserData)*)script->userData;
|
|
||||||
|
|
||||||
scriptPtr->unk_5C = get_entity_by_index(evt_get_variable(script, *args));
|
|
||||||
|
|
||||||
for (i = 0, userDataPtr = scriptPtr; i < 3; i++) {
|
|
||||||
userDataPtr->unk_08[i] = playFX_51(0, scriptPtr->unk_5C->position.x, scriptPtr->unk_5C->position.y + 12.5f, scriptPtr->unk_5C->position.z, 1.0f, -1);
|
|
||||||
save = 0.0f;
|
|
||||||
userDataPtr->unk_2C[i] = save;
|
|
||||||
userDataPtr->unk_20[i] = save;
|
|
||||||
userDataPtr->unk_14[i] = save;
|
|
||||||
userDataPtr->unk_50[i] = save;
|
|
||||||
userDataPtr->unk_44[i] = save;
|
|
||||||
userDataPtr->unk_38[i] = save;
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr->unk_00 = 0;
|
|
||||||
scriptPtr->unk_04 = 0;
|
|
||||||
scriptPtr->unk_60 = 0;
|
|
||||||
scriptPtr->unk_64 = 0;
|
|
||||||
|
|
||||||
userDataPtr = scriptPtr;
|
|
||||||
for (i = 0, save = 50.0f; i < 3; i++) {
|
|
||||||
var = 0;
|
|
||||||
add_vec2D_polar(&var, &scriptPtr->unk_44[i], save, N(D_80243E58_B62108)[i]);
|
|
||||||
userDataPtr->unk_38[i] = cosTheta * var;
|
|
||||||
userDataPtr->unk_50[i] = sinTheta * var;
|
|
||||||
userDataPtr->unk_38[i] = npc->pos.x - (scriptPtr->unk_5C->position.x + userDataPtr->unk_38[i]);
|
|
||||||
userDataPtr->unk_44[i] = npc->pos.y - (scriptPtr->unk_5C->position.y + userDataPtr->unk_44[i]);
|
|
||||||
userDataPtr->unk_50[i] = npc->pos.z - (scriptPtr->unk_5C->position.z + userDataPtr->unk_50[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr = (N(UserData)*)script->userData;
|
|
||||||
switch (scriptPtr->unk_00) {
|
|
||||||
case 0:
|
|
||||||
save = update_lerp(5, 0.0f, 50.0f, scriptPtr->unk_60, 0x14);
|
|
||||||
save2 = 0.0f;
|
|
||||||
for (i = 0; i < 3; i++) {
|
|
||||||
scriptPtr->unk_20[i] = save2;
|
|
||||||
var = save2;
|
|
||||||
add_vec2D_polar(&var, &scriptPtr->unk_20[i], save, N(D_80243E58_B62108)[i]);
|
|
||||||
scriptPtr->unk_14[i] = cosTheta * var;
|
|
||||||
scriptPtr->unk_2C[i] = sinTheta * var;
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr->unk_60++;
|
|
||||||
if (scriptPtr->unk_60 >= 0x15) {
|
|
||||||
scriptPtr->unk_00 = 1;
|
|
||||||
scriptPtr->unk_60 = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
save = 50.0f;
|
|
||||||
save2 = 0.0f;
|
|
||||||
for (i = 0; i < 3; i++) {
|
|
||||||
scriptPtr->unk_20[i] = save2;
|
|
||||||
var = save2;
|
|
||||||
add_vec2D_polar(&var, &scriptPtr->unk_20[i], save, N(D_80243E58_B62108)[i]);
|
|
||||||
scriptPtr->unk_14[i] = cosTheta * var;
|
|
||||||
scriptPtr->unk_2C[i] = sinTheta * var;
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr->unk_60++;
|
|
||||||
if (scriptPtr->unk_60 >= 0x10) {
|
|
||||||
scriptPtr->unk_60 = 0xF;
|
|
||||||
scriptPtr->unk_00 = 2;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
scriptPtr->unk_60++;
|
|
||||||
if (scriptPtr->unk_60 >= 0x1F) {
|
|
||||||
for (i = 0, userDataPtr = scriptPtr; i < 3; i++) {
|
|
||||||
userDataPtr->unk_08[i]->flags |= 0x10;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (scriptPtr->unk_04) {
|
|
||||||
case 0:
|
|
||||||
scriptPtr->unk_64++;
|
|
||||||
if (scriptPtr->unk_64 >= 0x10) {
|
|
||||||
scriptPtr->unk_04 = 1;
|
|
||||||
scriptPtr->unk_64 = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
for (i = 0, userDataPtr = scriptPtr; i < 3; i++) {
|
|
||||||
userDataPtr->unk_14[i] = userDataPtr->unk_14[i] + update_lerp(1, 0.0f, userDataPtr->unk_38[i], scriptPtr->unk_64, 0x14);
|
|
||||||
userDataPtr->unk_20[i] = userDataPtr->unk_20[i] + update_lerp(1, 0.0f, userDataPtr->unk_44[i], scriptPtr->unk_64, 0x14);
|
|
||||||
userDataPtr->unk_2C[i] = userDataPtr->unk_2C[i] + update_lerp(1, 0.0f, userDataPtr->unk_50[i], scriptPtr->unk_64, 0x14);
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr->unk_64++;
|
|
||||||
if (scriptPtr->unk_64 >= 0x15) {
|
|
||||||
scriptPtr->unk_04 = 2;
|
|
||||||
scriptPtr->unk_64 = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0, userDataPtr = scriptPtr; i < 3; i++) {
|
|
||||||
((EffectInstanceData*)userDataPtr->unk_08[i]->unk_0C)->rotation.x = userDataPtr->unk_14[i];
|
|
||||||
((EffectInstanceData*)userDataPtr->unk_08[i]->unk_0C)->rotation.y = userDataPtr->unk_20[i];
|
|
||||||
((EffectInstanceData*)userDataPtr->unk_08[i]->unk_0C)->rotation.z = userDataPtr->unk_2C[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkFunc23.inc.c"
|
#include "world/common/UnkFunc23.inc.c"
|
||||||
|
|
||||||
|
@ -28,112 +28,8 @@ static char* N(exit_str_3) = "";
|
|||||||
#include "world/common/UnkFunc16.inc.c"
|
#include "world/common/UnkFunc16.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_jan/jan_22/B84180", func_80240B94_B84D14);
|
INCLUDE_ASM(s32, "world/area_jan/jan_22/B84180", func_80240B94_B84D14);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240B94_B84D14)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* npcAISettings = (NpcAISettings*)evt_get_variable(script, *args++);
|
|
||||||
f32 posX, posY, posZ, posW;
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->patrol.detectShape;
|
|
||||||
territory.pointX = enemy->territory->patrol.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->patrol.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->patrol.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->patrol.detectSizeZ;
|
|
||||||
territory.unk_18 = 65.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall || enemy->unk_B0 & 4) {
|
|
||||||
script->functionTemp[0] = 0;
|
|
||||||
npc->duration = 0;
|
|
||||||
npc->currentAnim = enemy->animList[0];
|
|
||||||
npc->flags &= ~0x800;
|
|
||||||
if (!enemy->territory->patrol.isFlying) {
|
|
||||||
npc->flags = (npc->flags | 0x200) & ~8;
|
|
||||||
} else {
|
|
||||||
npc->flags = (npc->flags & ~0x200) | 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
script->functionTemp[0] = 99;
|
|
||||||
script->functionTemp[1] = 0;
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
} else if (enemy->flags & ENEMY_FLAGS_40000000) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
enemy->flags &= ~ENEMY_FLAGS_40000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
posX = npc->pos.x;
|
|
||||||
posY = npc->pos.y + npc->collisionHeight;
|
|
||||||
posZ = npc->pos.z;
|
|
||||||
posW = 100.0f;
|
|
||||||
|
|
||||||
if (npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW)) {
|
|
||||||
npc->pos.y = posY;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc24.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_80240158_B842D8)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, npcAISettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_802404C0_B84640)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
#include "world/common/UnkNpcAIFunc25.inc.c"
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(NpcJumpFunc2)(script, npcAISettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(NpcJumpFunc)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc13)(script, npcAISettings, territoryPtr);
|
|
||||||
case 13:
|
|
||||||
N(func_8024094C_B84ACC)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(UnkNpcDurationFlagFunc)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 15:
|
|
||||||
N(func_80240AD4_B84C54)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 99:
|
|
||||||
func_8004A73C(script);
|
|
||||||
}
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_jan/jan_22/B84180", func_80240E90_B85010);
|
INCLUDE_ASM(s32, "world/area_jan/jan_22/B84180", func_80240E90_B85010);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240E90_B85010)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_802425BC_B8673C) == NULL) {
|
|
||||||
N(D_802425BC_B8673C) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_802425BC_B8673C)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_802425BC_B8673C)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_802425BC_B8673C));
|
|
||||||
N(D_802425BC_B8673C) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -23,91 +23,6 @@
|
|||||||
#include "world/common/UnkFunc16.inc.c"
|
#include "world/common/UnkFunc16.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kkj/kkj_00/ABB340", func_80240C44_ABBED4);
|
INCLUDE_ASM(s32, "world/area_kkj/kkj_00/ABB340", func_80240C44_ABBED4);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240C44_ABBED4)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* npcAISettings = (NpcAISettings*)evt_get_variable(script, *args++);
|
|
||||||
f32 posX, posY, posZ, posW;
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->patrol.detectShape;
|
|
||||||
territory.pointX = enemy->territory->patrol.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->patrol.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->patrol.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->patrol.detectSizeZ;
|
|
||||||
territory.unk_18 = 65.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall || enemy->unk_B0 & 4) {
|
|
||||||
script->functionTemp[0] = 0;
|
|
||||||
npc->duration = 0;
|
|
||||||
npc->currentAnim = enemy->animList[0];
|
|
||||||
npc->flags &= ~0x800;
|
|
||||||
if (!enemy->territory->patrol.isFlying) {
|
|
||||||
npc->flags = (npc->flags | 0x200) & ~8;
|
|
||||||
} else {
|
|
||||||
npc->flags = (npc->flags & ~0x200) | 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
script->functionTemp[0] = 99;
|
|
||||||
script->functionTemp[1] = 0;
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
} else if (enemy->flags & ENEMY_FLAGS_40000000) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
enemy->flags &= ~ENEMY_FLAGS_40000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
posX = npc->pos.x;
|
|
||||||
posY = npc->pos.y + npc->collisionHeight;
|
|
||||||
posZ = npc->pos.z;
|
|
||||||
posW = 100.0f;
|
|
||||||
|
|
||||||
if (npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW)) {
|
|
||||||
npc->pos.y = posY;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc24.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_80240208_ABB498)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, npcAISettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_80240570_ABB800)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
#include "world/common/UnkNpcAIFunc25.inc.c"
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(NpcJumpFunc2)(script, npcAISettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(NpcJumpFunc)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc13)(script, npcAISettings, territoryPtr);
|
|
||||||
case 13:
|
|
||||||
N(func_802409FC_ABBC8C)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(UnkNpcDurationFlagFunc)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 15:
|
|
||||||
N(func_80240B84_ABBE14)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 99:
|
|
||||||
func_8004A73C(script);
|
|
||||||
}
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
static char* N(exit_str) = "end_00";
|
static char* N(exit_str) = "end_00";
|
||||||
|
|
||||||
|
@ -28,88 +28,3 @@ static char* N(exit_str_3) = "";
|
|||||||
#include "world/common/UnkFunc16.inc.c"
|
#include "world/common/UnkFunc16.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kkj/kkj_01/AC5170", func_80240B94_AC5D04);
|
INCLUDE_ASM(s32, "world/area_kkj/kkj_01/AC5170", func_80240B94_AC5D04);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240B94_AC5D04)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* npcAISettings = (NpcAISettings*)evt_get_variable(script, *args++);
|
|
||||||
f32 posX, posY, posZ, posW;
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->patrol.detectShape;
|
|
||||||
territory.pointX = enemy->territory->patrol.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->patrol.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->patrol.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->patrol.detectSizeZ;
|
|
||||||
territory.unk_18 = 65.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall || enemy->unk_B0 & 4) {
|
|
||||||
script->functionTemp[0] = 0;
|
|
||||||
npc->duration = 0;
|
|
||||||
npc->currentAnim = enemy->animList[0];
|
|
||||||
npc->flags &= ~0x800;
|
|
||||||
if (!enemy->territory->patrol.isFlying) {
|
|
||||||
npc->flags = (npc->flags | 0x200) & ~8;
|
|
||||||
} else {
|
|
||||||
npc->flags = (npc->flags & ~0x200) | 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
script->functionTemp[0] = 99;
|
|
||||||
script->functionTemp[1] = 0;
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
} else if (enemy->flags & ENEMY_FLAGS_40000000) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
enemy->flags &= ~ENEMY_FLAGS_40000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
posX = npc->pos.x;
|
|
||||||
posY = npc->pos.y + npc->collisionHeight;
|
|
||||||
posZ = npc->pos.z;
|
|
||||||
posW = 100.0f;
|
|
||||||
|
|
||||||
if (npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW)) {
|
|
||||||
npc->pos.y = posY;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc24.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_80240158_AC52C8)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, npcAISettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_802404C0_AC5630)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
#include "world/common/UnkNpcAIFunc25.inc.c"
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(NpcJumpFunc2)(script, npcAISettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(NpcJumpFunc)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc13)(script, npcAISettings, territoryPtr);
|
|
||||||
case 13:
|
|
||||||
N(func_8024094C_AC5ABC)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(UnkNpcDurationFlagFunc)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 15:
|
|
||||||
N(func_80240AD4_AC5C44)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 99:
|
|
||||||
func_8004A73C(script);
|
|
||||||
}
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
@ -4,25 +4,6 @@ static char* N(exit_str_0) = "kkj_11";
|
|||||||
static char* N(exit_str_1) = "";
|
static char* N(exit_str_1) = "";
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kkj/kkj_17/AF1C60", func_80240000_AF1C60);
|
INCLUDE_ASM(s32, "world/area_kkj/kkj_17/AF1C60", func_80240000_AF1C60);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240000_AF1C60)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_802408C0_AF2520) == NULL) {
|
|
||||||
N(D_802408C0_AF2520) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_802408C0_AF2520)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_802408C0_AF2520)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_802408C0_AF2520));
|
|
||||||
N(D_802408C0_AF2520) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -5,78 +5,12 @@
|
|||||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kkj/kkj_18/AF2FE0", func_8024056C_AF320C);
|
INCLUDE_ASM(s32, "world/area_kkj/kkj_18/AF2FE0", func_8024056C_AF320C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_8024056C_AF320C)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_80241F10_AF4BB0) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_80241F10_AF4BB0)) {
|
|
||||||
N(D_80241F10_AF4BB0) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_80241F14_AF4BB4));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kkj/kkj_18/AF2FE0", func_802405C0_AF3260);
|
INCLUDE_ASM(s32, "world/area_kkj/kkj_18/AF2FE0", func_802405C0_AF3260);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802405C0_AF3260)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_80241F14_AF4BB4) = evt_get_variable(script, *args);
|
|
||||||
N(D_80241F10_AF4BB0) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kkj/kkj_18/AF2FE0", func_802405F8_AF3298);
|
INCLUDE_ASM(s32, "world/area_kkj/kkj_18/AF2FE0", func_802405F8_AF3298);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802405F8_AF3298)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kkj/kkj_18/AF2FE0", func_80240694_AF3334);
|
INCLUDE_ASM(s32, "world/area_kkj/kkj_18/AF2FE0", func_80240694_AF3334);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240694_AF3334)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kkj/kkj_18/AF2FE0", func_80240730_AF33D0);
|
INCLUDE_ASM(s32, "world/area_kkj/kkj_18/AF2FE0", func_80240730_AF33D0);
|
||||||
|
|
||||||
|
@ -5,78 +5,12 @@
|
|||||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kkj/kkj_19/AF7C00", func_802404DC_AF7E2C);
|
INCLUDE_ASM(s32, "world/area_kkj/kkj_19/AF7C00", func_802404DC_AF7E2C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802404DC_AF7E2C)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_80241B10_AF9460) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_80241B10_AF9460)) {
|
|
||||||
N(D_80241B10_AF9460) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_80241B14_AF9464));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kkj/kkj_19/AF7C00", func_80240530_AF7E80);
|
INCLUDE_ASM(s32, "world/area_kkj/kkj_19/AF7C00", func_80240530_AF7E80);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240530_AF7E80)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_80241B14_AF9464) = evt_get_variable(script, *args);
|
|
||||||
N(D_80241B10_AF9460) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kkj/kkj_19/AF7C00", func_80240568_AF7EB8);
|
INCLUDE_ASM(s32, "world/area_kkj/kkj_19/AF7C00", func_80240568_AF7EB8);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240568_AF7EB8)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kkj/kkj_19/AF7C00", func_80240604_AF7F54);
|
INCLUDE_ASM(s32, "world/area_kkj/kkj_19/AF7C00", func_80240604_AF7F54);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240604_AF7F54)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kkj/kkj_19/AF7C00", func_802406A0_AF7FF0);
|
INCLUDE_ASM(s32, "world/area_kkj/kkj_19/AF7C00", func_802406A0_AF7FF0);
|
||||||
|
|
||||||
|
@ -4,25 +4,6 @@ static char* N(exit_str_0) = "kkj_10";
|
|||||||
static char* N(exit_str_1) = "";
|
static char* N(exit_str_1) = "";
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDB40", func_80240000_AFDB40);
|
INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDB40", func_80240000_AFDB40);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240000_AFDB40)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80240880_AFE3C0) == NULL) {
|
|
||||||
N(D_80240880_AFE3C0) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80240880_AFE3C0)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80240880_AFE3C0)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80240880_AFE3C0));
|
|
||||||
N(D_80240880_AFE3C0) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -1,21 +1,3 @@
|
|||||||
#include "kmr_02.h"
|
#include "kmr_02.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B3A10", func_802439A0_8B3A10);
|
INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B3A10", func_802439A0_8B3A10);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802439A0_8B3A10)(Evt *script, s32 isInitialCall) {
|
|
||||||
s32 var;
|
|
||||||
void* temp_s0 = load_asset_by_name("party_pokopi", &var);
|
|
||||||
|
|
||||||
decode_yay0(temp_s0, N(D_80247B00));
|
|
||||||
general_heap_free(temp_s0);
|
|
||||||
|
|
||||||
N(D_8024BA90).unk_00 = N(D_80247D00);
|
|
||||||
N(D_8024BA90).unk_08 = 0x96;
|
|
||||||
N(D_8024BA90).unk_0A = 0x69;
|
|
||||||
N(D_8024BA90).unk_0C = 2;
|
|
||||||
N(D_8024BA90).unk_04 = N(D_80247B00);
|
|
||||||
N(D_8024BA90).unk_10 = 1;
|
|
||||||
set_message_images(&N(D_8024BA90));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
@ -7,25 +7,6 @@
|
|||||||
#define NAMESPACE kmr_04
|
#define NAMESPACE kmr_04
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kmr/kmr_04/8CA960", func_802402C8_8CABC8);
|
INCLUDE_ASM(s32, "world/area_kmr/kmr_04/8CA960", func_802402C8_8CABC8);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802402C8_8CABC8)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_802429F4_8CD2F4) == NULL) {
|
|
||||||
N(D_802429F4_8CD2F4) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_802429F4_8CD2F4)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_802429F4_8CD2F4)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_802429F4_8CD2F4));
|
|
||||||
N(D_802429F4_8CD2F4) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -14,17 +14,6 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_05/8CE070", func_802401B0_8CE220);
|
|||||||
#include "world/common/UnkNpcAIFunc2.inc.c"
|
#include "world/common/UnkNpcAIFunc2.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kmr/kmr_05/8CE070", func_80240C54_8CECC4);
|
INCLUDE_ASM(s32, "world/area_kmr/kmr_05/8CE070", func_80240C54_8CECC4);
|
||||||
/*
|
|
||||||
void N(func_80240C54_8CECC4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
|
|
||||||
npc->pos.y += N(D_80241B2C_8CFB9C)[npc->duration++];
|
|
||||||
if (npc->duration >= 5) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc14.inc.c"
|
#include "world/common/UnkNpcAIFunc14.inc.c"
|
||||||
|
|
||||||
|
@ -14,17 +14,6 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_06/8D1510", func_802401B0_8D16C0);
|
|||||||
#include "world/common/UnkNpcAIFunc2.inc.c"
|
#include "world/common/UnkNpcAIFunc2.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kmr/kmr_06/8D1510", func_80240C54_8D2164);
|
INCLUDE_ASM(s32, "world/area_kmr/kmr_06/8D1510", func_80240C54_8D2164);
|
||||||
/*
|
|
||||||
void N(func_80240C54_8D2164)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
|
|
||||||
npc->pos.y += N(D_802420BC_8D35CC)[npc->duration++];
|
|
||||||
if (npc->duration >= 5) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc14.inc.c"
|
#include "world/common/UnkNpcAIFunc14.inc.c"
|
||||||
|
|
||||||
|
@ -37,17 +37,4 @@ ApiStatus func_80240A6C_8D482C(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
INCLUDE_ASM(s32, "world/area_kmr/kmr_07/8D3DC0", func_80240A6C_8D482C);
|
INCLUDE_ASM(s32, "world/area_kmr/kmr_07/8D3DC0", func_80240A6C_8D482C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240A6C_8D482C)(void) {
|
|
||||||
Entity* entity = get_entity_by_index(evt_get_variable(NULL, 0xFD050F80));
|
|
||||||
|
|
||||||
if (entity == NULL) {
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
|
|
||||||
play_model_animation(entity->virtualModelIndex, &D_000001E4);
|
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -14,17 +14,6 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_09/8D5E00", func_802401B0_8D5FB0);
|
|||||||
#include "world/common/UnkNpcAIFunc2.inc.c"
|
#include "world/common/UnkNpcAIFunc2.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kmr/kmr_09/8D5E00", func_80240C54_8D6A54);
|
INCLUDE_ASM(s32, "world/area_kmr/kmr_09/8D5E00", func_80240C54_8D6A54);
|
||||||
/*
|
|
||||||
void N(func_80240C54_8D6A54)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
|
|
||||||
npc->pos.y += N(D_8024186C_8D766C)[npc->duration++];
|
|
||||||
if (npc->duration >= 5) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc14.inc.c"
|
#include "world/common/UnkNpcAIFunc14.inc.c"
|
||||||
|
|
||||||
@ -35,67 +24,6 @@ void N(func_80240C54_8D6A54)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
|||||||
#include "world/common/UnkFunc5.inc.c"
|
#include "world/common/UnkFunc5.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kmr/kmr_09/8D5E00", func_8024130C_8D710C);
|
INCLUDE_ASM(s32, "world/area_kmr/kmr_09/8D5E00", func_8024130C_8D710C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_8024130C_8D710C)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* aiSettings = evt_get_variable(script, *args);
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->wander.detectShape;
|
|
||||||
territory.pointX = enemy->territory->wander.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->wander.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->wander.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->wander.detectSizeZ;
|
|
||||||
territory.unk_18 = 120.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(func_802411E8_8D6FE8)(npc, enemy, script, aiSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
npc->unk_AB = -2;
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
if (enemy->unk_B4 != 0) {
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc23.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_802401B0_8D5FB0)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, aiSettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_80240898_8D6698)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(UnkNpcAIFunc2)(script, aiSettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(func_80240C54_8D6A54)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc14)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 13:
|
|
||||||
N(UnkNpcAIFunc3)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(func_80240E58_8D6C58)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
ApiStatus func_802414F8_8D72F8(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802414F8_8D72F8(Evt* script, s32 isInitialCall) {
|
||||||
script->varTable[0] = get_enemy_safe(2);
|
script->varTable[0] = get_enemy_safe(2);
|
||||||
|
@ -4,25 +4,6 @@ static char* N(exit_str_0) = "kmr_11";
|
|||||||
static char* N(exit_str_1) = "mac_00";
|
static char* N(exit_str_1) = "mac_00";
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kmr/kmr_10/8D84D0", func_80240000_8D84D0);
|
INCLUDE_ASM(s32, "world/area_kmr/kmr_10/8D84D0", func_80240000_8D84D0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240000_8D84D0)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80240C20_8D90F0) == NULL) {
|
|
||||||
N(D_80240C20_8D90F0) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80240C20_8D90F0)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80240C20_8D90F0)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80240C20_8D90F0));
|
|
||||||
N(D_80240C20_8D90F0) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -1,25 +1,6 @@
|
|||||||
#include "kmr_20.h"
|
#include "kmr_20.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED440", func_80241620_8ED440);
|
INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED440", func_80241620_8ED440);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241620_8ED440)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_8024A908_8F6728) == NULL) {
|
|
||||||
N(D_8024A908_8F6728) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_8024A908_8F6728)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_8024A908_8F6728)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_8024A908_8F6728));
|
|
||||||
N(D_8024A908_8F6728) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -1,25 +1,6 @@
|
|||||||
#include "kpa_14.h"
|
#include "kpa_14.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kpa/kpa_14/A57830", func_80240380_A57830);
|
INCLUDE_ASM(s32, "world/area_kpa/kpa_14/A57830", func_80240380_A57830);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240380_A57830)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80241900_A58DB0) == NULL) {
|
|
||||||
N(D_80241900_A58DB0) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80241900_A58DB0)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80241900_A58DB0)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80241900_A58DB0));
|
|
||||||
N(D_80241900_A58DB0) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -1,25 +1,6 @@
|
|||||||
#include "kpa_15.h"
|
#include "kpa_15.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kpa/kpa_15/A596A0", func_80240310_A596A0);
|
INCLUDE_ASM(s32, "world/area_kpa/kpa_15/A596A0", func_80240310_A596A0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240310_A596A0)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80240AA0_A59E30) == NULL) {
|
|
||||||
N(D_80240AA0_A59E30) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80240AA0_A59E30)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80240AA0_A59E30)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80240AA0_A59E30));
|
|
||||||
N(D_80240AA0_A59E30) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -5,75 +5,9 @@
|
|||||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kpa/kpa_81/A78510", func_8024027C_A7873C);
|
INCLUDE_ASM(s32, "world/area_kpa/kpa_81/A78510", func_8024027C_A7873C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_8024027C_A7873C)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_80240D98_A79258) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_80240D98_A79258)) {
|
|
||||||
N(D_80240D98_A79258) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_80240D9C_A7925C));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kpa/kpa_81/A78510", func_802402D0_A78790);
|
INCLUDE_ASM(s32, "world/area_kpa/kpa_81/A78510", func_802402D0_A78790);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802402D0_A78790)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_80240D9C_A7925C) = evt_get_variable(script, *args);
|
|
||||||
N(D_80240D98_A79258) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kpa/kpa_81/A78510", func_80240308_A787C8);
|
INCLUDE_ASM(s32, "world/area_kpa/kpa_81/A78510", func_80240308_A787C8);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240308_A787C8)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kpa/kpa_81/A78510", func_802403A4_A78864);
|
INCLUDE_ASM(s32, "world/area_kpa/kpa_81/A78510", func_802403A4_A78864);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802403A4_A78864)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
@ -5,75 +5,9 @@
|
|||||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kpa/kpa_82/A7A550", func_8024027C_A7A77C);
|
INCLUDE_ASM(s32, "world/area_kpa/kpa_82/A7A550", func_8024027C_A7A77C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_8024027C_A7A77C)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_80240C20_A7B120) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_80240C20_A7B120)) {
|
|
||||||
N(D_80240C20_A7B120) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_80240C24_A7B124));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kpa/kpa_82/A7A550", func_802402D0_A7A7D0);
|
INCLUDE_ASM(s32, "world/area_kpa/kpa_82/A7A550", func_802402D0_A7A7D0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802402D0_A7A7D0)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_80240C24_A7B124) = evt_get_variable(script, *args);
|
|
||||||
N(D_80240C20_A7B120) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kpa/kpa_82/A7A550", func_80240308_A7A808);
|
INCLUDE_ASM(s32, "world/area_kpa/kpa_82/A7A550", func_80240308_A7A808);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240308_A7A808)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kpa/kpa_82/A7A550", func_802403A4_A7A8A4);
|
INCLUDE_ASM(s32, "world/area_kpa/kpa_82/A7A550", func_802403A4_A7A8A4);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802403A4_A7A8A4)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
@ -26,91 +26,6 @@ static char* N(exit_str_1) = "";
|
|||||||
#include "world/common/UnkFunc16.inc.c"
|
#include "world/common/UnkFunc16.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_80240B94_A875E4);
|
INCLUDE_ASM(s32, "world/area_kpa/kpa_91/A86A50", func_80240B94_A875E4);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240B94_A875E4)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* npcAISettings = (NpcAISettings*)evt_get_variable(script, *args++);
|
|
||||||
f32 posX, posY, posZ, posW;
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->patrol.detectShape;
|
|
||||||
territory.pointX = enemy->territory->patrol.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->patrol.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->patrol.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->patrol.detectSizeZ;
|
|
||||||
territory.unk_18 = 65.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall || enemy->unk_B0 & 4) {
|
|
||||||
script->functionTemp[0] = 0;
|
|
||||||
npc->duration = 0;
|
|
||||||
npc->currentAnim = enemy->animList[0];
|
|
||||||
npc->flags &= ~0x800;
|
|
||||||
if (!enemy->territory->patrol.isFlying) {
|
|
||||||
npc->flags = (npc->flags | 0x200) & ~8;
|
|
||||||
} else {
|
|
||||||
npc->flags = (npc->flags & ~0x200) | 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
script->functionTemp[0] = 99;
|
|
||||||
script->functionTemp[1] = 0;
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
} else if (enemy->flags & ENEMY_FLAGS_40000000) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
enemy->flags &= ~ENEMY_FLAGS_40000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
posX = npc->pos.x;
|
|
||||||
posY = npc->pos.y + npc->collisionHeight;
|
|
||||||
posZ = npc->pos.z;
|
|
||||||
posW = 100.0f;
|
|
||||||
|
|
||||||
if (npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW)) {
|
|
||||||
npc->pos.y = posY;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc24.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_80240158_A86BA8)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, npcAISettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_802404C0_A86F10)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
#include "world/common/UnkNpcAIFunc25.inc.c"
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(NpcJumpFunc2)(script, npcAISettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(NpcJumpFunc)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc13)(script, npcAISettings, territoryPtr);
|
|
||||||
case 13:
|
|
||||||
N(func_8024094C_A8739C)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(UnkNpcDurationFlagFunc)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 15:
|
|
||||||
N(func_80240AD4_A87524)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 99:
|
|
||||||
func_8004A73C(script);
|
|
||||||
}
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/set_script_owner_npc_anim.inc.c"
|
#include "world/common/set_script_owner_npc_anim.inc.c"
|
||||||
|
|
||||||
|
@ -23,91 +23,6 @@
|
|||||||
#include "world/common/UnkFunc16.inc.c"
|
#include "world/common/UnkFunc16.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_80240C74_A8D6F4);
|
INCLUDE_ASM(s32, "world/area_kpa/kpa_95/A8CB60", func_80240C74_A8D6F4);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240C74_A8D6F4)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* npcAISettings = (NpcAISettings*)evt_get_variable(script, *args++);
|
|
||||||
f32 posX, posY, posZ, posW;
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->patrol.detectShape;
|
|
||||||
territory.pointX = enemy->territory->patrol.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->patrol.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->patrol.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->patrol.detectSizeZ;
|
|
||||||
territory.unk_18 = 65.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall || enemy->unk_B0 & 4) {
|
|
||||||
script->functionTemp[0] = 0;
|
|
||||||
npc->duration = 0;
|
|
||||||
npc->currentAnim = enemy->animList[0];
|
|
||||||
npc->flags &= ~0x800;
|
|
||||||
if (!enemy->territory->patrol.isFlying) {
|
|
||||||
npc->flags = (npc->flags | 0x200) & ~8;
|
|
||||||
} else {
|
|
||||||
npc->flags = (npc->flags & ~0x200) | 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
script->functionTemp[0] = 99;
|
|
||||||
script->functionTemp[1] = 0;
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
} else if (enemy->flags & ENEMY_FLAGS_40000000) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
enemy->flags &= ~ENEMY_FLAGS_40000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
posX = npc->pos.x;
|
|
||||||
posY = npc->pos.y + npc->collisionHeight;
|
|
||||||
posZ = npc->pos.z;
|
|
||||||
posW = 100.0f;
|
|
||||||
|
|
||||||
if (npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW)) {
|
|
||||||
npc->pos.y = posY;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc24.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_80240238_A8CCB8)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, npcAISettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_802405A0_A8D020)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
#include "world/common/UnkNpcAIFunc25.inc.c"
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(NpcJumpFunc2)(script, npcAISettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(NpcJumpFunc)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc13)(script, npcAISettings, territoryPtr);
|
|
||||||
case 13:
|
|
||||||
N(func_80240A2C_A8D4AC)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(UnkNpcDurationFlagFunc)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 15:
|
|
||||||
N(func_80240BB4_A8D634)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 99:
|
|
||||||
func_8004A73C(script);
|
|
||||||
}
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/set_script_owner_npc_anim.inc.c"
|
#include "world/common/set_script_owner_npc_anim.inc.c"
|
||||||
|
|
||||||
|
@ -11,17 +11,6 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_80240690_C5ADD0);
|
|||||||
#include "world/common/UnkNpcAIFunc2.inc.c"
|
#include "world/common/UnkNpcAIFunc2.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_80241134_C5B874);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_80241134_C5B874);
|
||||||
/*
|
|
||||||
void N(func_80241134_C5B874)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
|
|
||||||
npc->pos.y += N(D_80244900_C5F040)[npc->duration++];
|
|
||||||
if (npc->duration >= 5) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc14.inc.c"
|
#include "world/common/UnkNpcAIFunc14.inc.c"
|
||||||
|
|
||||||
@ -32,67 +21,6 @@ void N(func_80241134_C5B874)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
|||||||
#include "world/common/UnkFunc5.inc.c"
|
#include "world/common/UnkFunc5.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_802417EC_C5BF2C);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_802417EC_C5BF2C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802417EC_C5BF2C)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* aiSettings = evt_get_variable(script, *args);
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->wander.detectShape;
|
|
||||||
territory.pointX = enemy->territory->wander.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->wander.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->wander.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->wander.detectSizeZ;
|
|
||||||
territory.unk_18 = 120.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(func_802416C8_C5BE08)(npc, enemy, script, aiSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
npc->unk_AB = -2;
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
if (enemy->unk_B4 != 0) {
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc23.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_80240690_C5ADD0)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, aiSettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_80240D78_C5B4B8)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(UnkNpcAIFunc2)(script, aiSettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(func_80241134_C5B874)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc14)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 13:
|
|
||||||
N(UnkNpcAIFunc3)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(func_80241338_C5BA78)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc13.inc.c"
|
#include "world/common/UnkNpcAIFunc13.inc.c"
|
||||||
|
|
||||||
@ -102,90 +30,10 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_80241B08_C5C248);
|
|||||||
#include "world/common/UnkFunc45.inc.c"
|
#include "world/common/UnkFunc45.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_80241DE4_C5C524);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_80241DE4_C5C524);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241DE4_C5C524)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* aiSettings = evt_get_variable(script, *args);
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->wander.detectShape;
|
|
||||||
territory.pointX = enemy->territory->wander.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->wander.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->wander.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->wander.detectSizeZ;
|
|
||||||
territory.unk_18 = 120.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(func_802416C8_C5BE08)(npc, enemy, script, aiSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
npc->unk_AB = -2;
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
if (enemy->unk_B4 != 0) {
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc23.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_80240690_C5ADD0)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, aiSettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_80240D78_C5B4B8)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(UnkNpcAIFunc2)(script, aiSettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(func_80241134_C5B874)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc13)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 13:
|
|
||||||
N(func_80241B08_C5C248)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(UnkFunc45)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
static char* N(exit_str_0) = "kzn_02";
|
static char* N(exit_str_0) = "kzn_02";
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_80241FCC_C5C70C);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_80241FCC_C5C70C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241FCC_C5C70C)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80244A10_C5F150) == NULL) {
|
|
||||||
N(D_80244A10_C5F150) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80244A10_C5F150)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80244A10_C5F150)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80244A10_C5F150));
|
|
||||||
N(D_80244A10_C5F150) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
@ -194,76 +42,15 @@ ApiStatus N(func_80241FCC_C5C70C)(Evt* script, s32 isInitialCall) {
|
|||||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_80242310_C5CA50);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_80242310_C5CA50);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80242310_C5CA50)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_80244A74_C5F1B4) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_80244A74_C5F1B4)) {
|
|
||||||
N(D_80244A74_C5F1B4) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_80244A78_C5F1B8));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_80242364_C5CAA4);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_80242364_C5CAA4);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80242364_C5CAA4)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_80244A78_C5F1B8) = evt_get_variable(script, *args);
|
|
||||||
N(D_80244A74_C5F1B4) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_8024239C_C5CADC);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_8024239C_C5CADC);
|
||||||
/*
|
|
||||||
ApiStatus N(func_8024239C_C5CADC)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/SetManyVars.inc.c"
|
#include "world/common/SetManyVars.inc.c"
|
||||||
|
|
||||||
#include "world/common/UnkYawFunc.inc.c"
|
#include "world/common/UnkYawFunc.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_802426B4_C5CDF4);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_802426B4_C5CDF4);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802426B4_C5CDF4)(Evt *script, s32 isInitialCall) {
|
|
||||||
Npc *npc = get_npc_unsafe(script->varTable[2]);
|
|
||||||
|
|
||||||
D_8024E1B4 = npc->currentAnim;
|
|
||||||
npc->currentAnim = script->varTable[4];
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_802426F8_C5CE38);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_802426F8_C5CE38);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802426F8_C5CE38)(Evt *script, s32 isInitialCall) {
|
|
||||||
get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
@ -43,25 +43,6 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_80241630_C62340);
|
|||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_8024234C_C6305C);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_8024234C_C6305C);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_8024259C_C632AC);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_8024259C_C632AC);
|
||||||
/*
|
|
||||||
ApiStatus N(func_8024259C_C632AC)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_802441A0_C64EB0) == NULL) {
|
|
||||||
N(D_802441A0_C64EB0) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_802441A0_C64EB0)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_802441A0_C64EB0)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_802441A0_C64EB0));
|
|
||||||
N(D_802441A0_C64EB0) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
@ -70,76 +51,15 @@ ApiStatus N(func_8024259C_C632AC)(Evt* script, s32 isInitialCall) {
|
|||||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_802428E0_C635F0);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_802428E0_C635F0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802428E0_C635F0)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_80244204_C64F14) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_80244204_C64F14)) {
|
|
||||||
N(D_80244204_C64F14) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_80244208_C64F18));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_80242934_C63644);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_80242934_C63644);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80242934_C63644)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_80244208_C64F18) = evt_get_variable(script, *args);
|
|
||||||
N(D_80244204_C64F14) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_8024296C_C6367C);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_8024296C_C6367C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_8024296C_C6367C)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/SetManyVars.inc.c"
|
#include "world/common/SetManyVars.inc.c"
|
||||||
|
|
||||||
#include "world/common/UnkYawFunc.inc.c"
|
#include "world/common/UnkYawFunc.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_80242C84_C63994);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_80242C84_C63994);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80242C84_C63994)(Evt *script, s32 isInitialCall) {
|
|
||||||
Npc *npc = get_npc_unsafe(script->varTable[2]);
|
|
||||||
|
|
||||||
D_8024E1B4 = npc->currentAnim;
|
|
||||||
npc->currentAnim = script->varTable[4];
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_80242CC8_C639D8);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_80242CC8_C639D8);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80242CC8_C639D8)(Evt *script, s32 isInitialCall) {
|
|
||||||
get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
@ -5,12 +5,6 @@
|
|||||||
#include "world/common/UnkFunc17.inc.c"
|
#include "world/common/UnkFunc17.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_04/C68440", func_8024034C_C6847C);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_04/C68440", func_8024034C_C6847C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_8024034C_C6847C)(Evt* script, s32 isInitialCall) {
|
|
||||||
switch_to_partner(evt_get_variable(script, *script->ptrReadPos));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkFunc18.inc.c"
|
#include "world/common/UnkFunc18.inc.c"
|
||||||
|
|
||||||
@ -29,134 +23,6 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_04/C68440", func_802404DC_C6860C);
|
|||||||
#include "world/common/UnkFunc22.inc.c"
|
#include "world/common/UnkFunc22.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_04/C68440", func_80240910_C68A40);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_04/C68440", func_80240910_C68A40);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240910_C68A40)(Evt *script, s32 isInitialCall) {
|
|
||||||
Bytecode *args = script->ptrReadPos;
|
|
||||||
Npc* npc = get_npc_safe(-4);
|
|
||||||
f32 sinTheta, cosTheta;
|
|
||||||
s32 i;
|
|
||||||
f32 var;
|
|
||||||
N(UserData)* userDataPtr;
|
|
||||||
N(UserData)* scriptPtr;
|
|
||||||
f32 save, save2;
|
|
||||||
|
|
||||||
sin_cos_deg(gCameras[gCurrentCameraID].currentYaw, &sinTheta, &cosTheta);
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
script->userData = (N(UserData)*)general_heap_malloc(0x68);
|
|
||||||
scriptPtr = (N(UserData)*)script->userData;
|
|
||||||
|
|
||||||
scriptPtr->unk_5C = get_entity_by_index(evt_get_variable(script, *args));
|
|
||||||
|
|
||||||
for (i = 0, userDataPtr = scriptPtr; i < 3; i++) {
|
|
||||||
userDataPtr->unk_08[i] = playFX_51(0, scriptPtr->unk_5C->position.x, scriptPtr->unk_5C->position.y + 12.5f, scriptPtr->unk_5C->position.z, 1.0f, -1);
|
|
||||||
save = 0.0f;
|
|
||||||
userDataPtr->unk_2C[i] = save;
|
|
||||||
userDataPtr->unk_20[i] = save;
|
|
||||||
userDataPtr->unk_14[i] = save;
|
|
||||||
userDataPtr->unk_50[i] = save;
|
|
||||||
userDataPtr->unk_44[i] = save;
|
|
||||||
userDataPtr->unk_38[i] = save;
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr->unk_00 = 0;
|
|
||||||
scriptPtr->unk_04 = 0;
|
|
||||||
scriptPtr->unk_60 = 0;
|
|
||||||
scriptPtr->unk_64 = 0;
|
|
||||||
|
|
||||||
userDataPtr = scriptPtr;
|
|
||||||
for (i = 0, save = 50.0f; i < 3; i++) {
|
|
||||||
var = 0;
|
|
||||||
add_vec2D_polar(&var, &scriptPtr->unk_44[i], save, N(D_80241C98_C69DC8)[i]);
|
|
||||||
userDataPtr->unk_38[i] = cosTheta * var;
|
|
||||||
userDataPtr->unk_50[i] = sinTheta * var;
|
|
||||||
userDataPtr->unk_38[i] = npc->pos.x - (scriptPtr->unk_5C->position.x + userDataPtr->unk_38[i]);
|
|
||||||
userDataPtr->unk_44[i] = npc->pos.y - (scriptPtr->unk_5C->position.y + userDataPtr->unk_44[i]);
|
|
||||||
userDataPtr->unk_50[i] = npc->pos.z - (scriptPtr->unk_5C->position.z + userDataPtr->unk_50[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr = (N(UserData)*)script->userData;
|
|
||||||
switch (scriptPtr->unk_00) {
|
|
||||||
case 0:
|
|
||||||
save = update_lerp(5, 0.0f, 50.0f, scriptPtr->unk_60, 0x14);
|
|
||||||
save2 = 0.0f;
|
|
||||||
for (i = 0; i < 3; i++) {
|
|
||||||
scriptPtr->unk_20[i] = save2;
|
|
||||||
var = save2;
|
|
||||||
add_vec2D_polar(&var, &scriptPtr->unk_20[i], save, N(D_80241C98_C69DC8)[i]);
|
|
||||||
scriptPtr->unk_14[i] = cosTheta * var;
|
|
||||||
scriptPtr->unk_2C[i] = sinTheta * var;
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr->unk_60++;
|
|
||||||
if (scriptPtr->unk_60 >= 0x15) {
|
|
||||||
scriptPtr->unk_00 = 1;
|
|
||||||
scriptPtr->unk_60 = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
save = 50.0f;
|
|
||||||
save2 = 0.0f;
|
|
||||||
for (i = 0; i < 3; i++) {
|
|
||||||
scriptPtr->unk_20[i] = save2;
|
|
||||||
var = save2;
|
|
||||||
add_vec2D_polar(&var, &scriptPtr->unk_20[i], save, N(D_80241C98_C69DC8)[i]);
|
|
||||||
scriptPtr->unk_14[i] = cosTheta * var;
|
|
||||||
scriptPtr->unk_2C[i] = sinTheta * var;
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr->unk_60++;
|
|
||||||
if (scriptPtr->unk_60 >= 0x10) {
|
|
||||||
scriptPtr->unk_60 = 0xF;
|
|
||||||
scriptPtr->unk_00 = 2;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
scriptPtr->unk_60++;
|
|
||||||
if (scriptPtr->unk_60 >= 0x1F) {
|
|
||||||
for (i = 0, userDataPtr = scriptPtr; i < 3; i++) {
|
|
||||||
userDataPtr->unk_08[i]->flags |= 0x10;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (scriptPtr->unk_04) {
|
|
||||||
case 0:
|
|
||||||
scriptPtr->unk_64++;
|
|
||||||
if (scriptPtr->unk_64 >= 0x10) {
|
|
||||||
scriptPtr->unk_04 = 1;
|
|
||||||
scriptPtr->unk_64 = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
for (i = 0, userDataPtr = scriptPtr; i < 3; i++) {
|
|
||||||
userDataPtr->unk_14[i] = userDataPtr->unk_14[i] + update_lerp(1, 0.0f, userDataPtr->unk_38[i], scriptPtr->unk_64, 0x14);
|
|
||||||
userDataPtr->unk_20[i] = userDataPtr->unk_20[i] + update_lerp(1, 0.0f, userDataPtr->unk_44[i], scriptPtr->unk_64, 0x14);
|
|
||||||
userDataPtr->unk_2C[i] = userDataPtr->unk_2C[i] + update_lerp(1, 0.0f, userDataPtr->unk_50[i], scriptPtr->unk_64, 0x14);
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr->unk_64++;
|
|
||||||
if (scriptPtr->unk_64 >= 0x15) {
|
|
||||||
scriptPtr->unk_04 = 2;
|
|
||||||
scriptPtr->unk_64 = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0, userDataPtr = scriptPtr; i < 3; i++) {
|
|
||||||
((EffectInstanceData*)userDataPtr->unk_08[i]->unk_0C)->rotation.x = userDataPtr->unk_14[i];
|
|
||||||
((EffectInstanceData*)userDataPtr->unk_08[i]->unk_0C)->rotation.y = userDataPtr->unk_20[i];
|
|
||||||
((EffectInstanceData*)userDataPtr->unk_08[i]->unk_0C)->rotation.z = userDataPtr->unk_2C[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkFunc23.inc.c"
|
#include "world/common/UnkFunc23.inc.c"
|
||||||
|
|
||||||
|
@ -15,17 +15,6 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_07/C6EA50", func_802409D0_C6ED00);
|
|||||||
#include "world/common/UnkNpcAIFunc2.inc.c"
|
#include "world/common/UnkNpcAIFunc2.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_07/C6EA50", func_80241474_C6F7A4);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_07/C6EA50", func_80241474_C6F7A4);
|
||||||
/*
|
|
||||||
void N(func_80241474_C6F7A4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
|
|
||||||
npc->pos.y += N(D_80242B90_C70EC0)[npc->duration++];
|
|
||||||
if (npc->duration >= 5) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc14.inc.c"
|
#include "world/common/UnkNpcAIFunc14.inc.c"
|
||||||
|
|
||||||
@ -36,67 +25,6 @@ void N(func_80241474_C6F7A4)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
|||||||
#include "world/common/UnkFunc5.inc.c"
|
#include "world/common/UnkFunc5.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_07/C6EA50", func_80241B2C_C6FE5C);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_07/C6EA50", func_80241B2C_C6FE5C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241B2C_C6FE5C)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* aiSettings = evt_get_variable(script, *args);
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->wander.detectShape;
|
|
||||||
territory.pointX = enemy->territory->wander.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->wander.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->wander.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->wander.detectSizeZ;
|
|
||||||
territory.unk_18 = 120.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(func_80241A08_C6FD38)(npc, enemy, script, aiSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
npc->unk_AB = -2;
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
if (enemy->unk_B4 != 0) {
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc23.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_802409D0_C6ED00)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, aiSettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_802410B8_C6F3E8)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(UnkNpcAIFunc2)(script, aiSettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(func_80241474_C6F7A4)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc14)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 13:
|
|
||||||
N(UnkNpcAIFunc3)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(func_80241678_C6F9A8)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc13.inc.c"
|
#include "world/common/UnkNpcAIFunc13.inc.c"
|
||||||
|
|
||||||
|
@ -1,25 +1,6 @@
|
|||||||
#include "kzn_08.h"
|
#include "kzn_08.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_08/C71C10", func_80240790_C71C10);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_08/C71C10", func_80240790_C71C10);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240790_C71C10)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80244BB0_C76030) == NULL) {
|
|
||||||
N(D_80244BB0_C76030) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80244BB0_C76030)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80244BB0_C76030)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80244BB0_C76030));
|
|
||||||
N(D_80244BB0_C76030) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -11,17 +11,6 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_08/C71ED0", func_80240C00_C72080);
|
|||||||
#include "world/common/UnkNpcAIFunc2.inc.c"
|
#include "world/common/UnkNpcAIFunc2.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_08/C71ED0", func_802416A4_C72B24);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_08/C71ED0", func_802416A4_C72B24);
|
||||||
/*
|
|
||||||
void N(func_802416A4_C72B24)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
|
|
||||||
npc->pos.y += N(D_80244DA0_C76220)[npc->duration++];
|
|
||||||
if (npc->duration >= 5) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc14.inc.c"
|
#include "world/common/UnkNpcAIFunc14.inc.c"
|
||||||
|
|
||||||
@ -32,67 +21,6 @@ void N(func_802416A4_C72B24)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
|||||||
#include "world/common/UnkFunc5.inc.c"
|
#include "world/common/UnkFunc5.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_08/C71ED0", func_80241D5C_C731DC);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_08/C71ED0", func_80241D5C_C731DC);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241D5C_C731DC)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* aiSettings = evt_get_variable(script, *args);
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->wander.detectShape;
|
|
||||||
territory.pointX = enemy->territory->wander.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->wander.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->wander.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->wander.detectSizeZ;
|
|
||||||
territory.unk_18 = 120.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(func_80241C38_C730B8)(npc, enemy, script, aiSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
npc->unk_AB = -2;
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
if (enemy->unk_B4 != 0) {
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc23.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_80240C00_C72080)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, aiSettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_802412E8_C72768)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(UnkNpcAIFunc2)(script, aiSettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(func_802416A4_C72B24)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc14)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 13:
|
|
||||||
N(UnkNpcAIFunc3)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(func_802418A8_C72D28)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc13.inc.c"
|
#include "world/common/UnkNpcAIFunc13.inc.c"
|
||||||
|
|
||||||
@ -102,67 +30,6 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_08/C71ED0", func_80242078_C734F8);
|
|||||||
#include "world/common/UnkFunc45.inc.c"
|
#include "world/common/UnkFunc45.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_08/C71ED0", func_80242354_C737D4);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_08/C71ED0", func_80242354_C737D4);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80242354_C737D4)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* aiSettings = evt_get_variable(script, *args);
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->wander.detectShape;
|
|
||||||
territory.pointX = enemy->territory->wander.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->wander.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->wander.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->wander.detectSizeZ;
|
|
||||||
territory.unk_18 = 120.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(func_80241C38_C730B8)(npc, enemy, script, aiSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
npc->unk_AB = -2;
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
if (enemy->unk_B4 != 0) {
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc23.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_80240C00_C72080)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, aiSettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_802412E8_C72768)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(UnkNpcAIFunc2)(script, aiSettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(func_802416A4_C72B24)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc13)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 13:
|
|
||||||
N(func_80242078_C734F8)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(UnkFunc45)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc6.inc.c"
|
#include "world/common/UnkNpcAIFunc6.inc.c"
|
||||||
|
|
||||||
|
@ -8,12 +8,6 @@ static char* N(exit_str_1) = "kzn_10";
|
|||||||
#include "world/common/UnkFunc17.inc.c"
|
#include "world/common/UnkFunc17.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C76CE0", func_8024003C_C76D1C);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C76CE0", func_8024003C_C76D1C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_8024003C_C76D1C)(Evt* script, s32 isInitialCall) {
|
|
||||||
switch_to_partner(evt_get_variable(script, *script->ptrReadPos));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkFunc18.inc.c"
|
#include "world/common/UnkFunc18.inc.c"
|
||||||
|
|
||||||
@ -32,134 +26,6 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C76CE0", func_802401CC_C76EAC);
|
|||||||
#include "world/common/UnkFunc22.inc.c"
|
#include "world/common/UnkFunc22.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C76CE0", func_80240600_C772E0);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C76CE0", func_80240600_C772E0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240600_C772E0)(Evt *script, s32 isInitialCall) {
|
|
||||||
Bytecode *args = script->ptrReadPos;
|
|
||||||
Npc* npc = get_npc_safe(-4);
|
|
||||||
f32 sinTheta, cosTheta;
|
|
||||||
s32 i;
|
|
||||||
f32 var;
|
|
||||||
N(UserData)* userDataPtr;
|
|
||||||
N(UserData)* scriptPtr;
|
|
||||||
f32 save, save2;
|
|
||||||
|
|
||||||
sin_cos_deg(gCameras[gCurrentCameraID].currentYaw, &sinTheta, &cosTheta);
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
script->userData = (N(UserData)*)general_heap_malloc(0x68);
|
|
||||||
scriptPtr = (N(UserData)*)script->userData;
|
|
||||||
|
|
||||||
scriptPtr->unk_5C = get_entity_by_index(evt_get_variable(script, *args));
|
|
||||||
|
|
||||||
for (i = 0, userDataPtr = scriptPtr; i < 3; i++) {
|
|
||||||
userDataPtr->unk_08[i] = playFX_51(0, scriptPtr->unk_5C->position.x, scriptPtr->unk_5C->position.y + 12.5f, scriptPtr->unk_5C->position.z, 1.0f, -1);
|
|
||||||
save = 0.0f;
|
|
||||||
userDataPtr->unk_2C[i] = save;
|
|
||||||
userDataPtr->unk_20[i] = save;
|
|
||||||
userDataPtr->unk_14[i] = save;
|
|
||||||
userDataPtr->unk_50[i] = save;
|
|
||||||
userDataPtr->unk_44[i] = save;
|
|
||||||
userDataPtr->unk_38[i] = save;
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr->unk_00 = 0;
|
|
||||||
scriptPtr->unk_04 = 0;
|
|
||||||
scriptPtr->unk_60 = 0;
|
|
||||||
scriptPtr->unk_64 = 0;
|
|
||||||
|
|
||||||
userDataPtr = scriptPtr;
|
|
||||||
for (i = 0, save = 50.0f; i < 3; i++) {
|
|
||||||
var = 0;
|
|
||||||
add_vec2D_polar(&var, &scriptPtr->unk_44[i], save, N(D_80243D58_C7AA38)[i]);
|
|
||||||
userDataPtr->unk_38[i] = cosTheta * var;
|
|
||||||
userDataPtr->unk_50[i] = sinTheta * var;
|
|
||||||
userDataPtr->unk_38[i] = npc->pos.x - (scriptPtr->unk_5C->position.x + userDataPtr->unk_38[i]);
|
|
||||||
userDataPtr->unk_44[i] = npc->pos.y - (scriptPtr->unk_5C->position.y + userDataPtr->unk_44[i]);
|
|
||||||
userDataPtr->unk_50[i] = npc->pos.z - (scriptPtr->unk_5C->position.z + userDataPtr->unk_50[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr = (N(UserData)*)script->userData;
|
|
||||||
switch (scriptPtr->unk_00) {
|
|
||||||
case 0:
|
|
||||||
save = update_lerp(5, 0.0f, 50.0f, scriptPtr->unk_60, 0x14);
|
|
||||||
save2 = 0.0f;
|
|
||||||
for (i = 0; i < 3; i++) {
|
|
||||||
scriptPtr->unk_20[i] = save2;
|
|
||||||
var = save2;
|
|
||||||
add_vec2D_polar(&var, &scriptPtr->unk_20[i], save, N(D_80243D58_C7AA38)[i]);
|
|
||||||
scriptPtr->unk_14[i] = cosTheta * var;
|
|
||||||
scriptPtr->unk_2C[i] = sinTheta * var;
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr->unk_60++;
|
|
||||||
if (scriptPtr->unk_60 >= 0x15) {
|
|
||||||
scriptPtr->unk_00 = 1;
|
|
||||||
scriptPtr->unk_60 = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
save = 50.0f;
|
|
||||||
save2 = 0.0f;
|
|
||||||
for (i = 0; i < 3; i++) {
|
|
||||||
scriptPtr->unk_20[i] = save2;
|
|
||||||
var = save2;
|
|
||||||
add_vec2D_polar(&var, &scriptPtr->unk_20[i], save, N(D_80243D58_C7AA38)[i]);
|
|
||||||
scriptPtr->unk_14[i] = cosTheta * var;
|
|
||||||
scriptPtr->unk_2C[i] = sinTheta * var;
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr->unk_60++;
|
|
||||||
if (scriptPtr->unk_60 >= 0x10) {
|
|
||||||
scriptPtr->unk_60 = 0xF;
|
|
||||||
scriptPtr->unk_00 = 2;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
scriptPtr->unk_60++;
|
|
||||||
if (scriptPtr->unk_60 >= 0x1F) {
|
|
||||||
for (i = 0, userDataPtr = scriptPtr; i < 3; i++) {
|
|
||||||
userDataPtr->unk_08[i]->flags |= 0x10;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (scriptPtr->unk_04) {
|
|
||||||
case 0:
|
|
||||||
scriptPtr->unk_64++;
|
|
||||||
if (scriptPtr->unk_64 >= 0x10) {
|
|
||||||
scriptPtr->unk_04 = 1;
|
|
||||||
scriptPtr->unk_64 = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
for (i = 0, userDataPtr = scriptPtr; i < 3; i++) {
|
|
||||||
userDataPtr->unk_14[i] = userDataPtr->unk_14[i] + update_lerp(1, 0.0f, userDataPtr->unk_38[i], scriptPtr->unk_64, 0x14);
|
|
||||||
userDataPtr->unk_20[i] = userDataPtr->unk_20[i] + update_lerp(1, 0.0f, userDataPtr->unk_44[i], scriptPtr->unk_64, 0x14);
|
|
||||||
userDataPtr->unk_2C[i] = userDataPtr->unk_2C[i] + update_lerp(1, 0.0f, userDataPtr->unk_50[i], scriptPtr->unk_64, 0x14);
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr->unk_64++;
|
|
||||||
if (scriptPtr->unk_64 >= 0x15) {
|
|
||||||
scriptPtr->unk_04 = 2;
|
|
||||||
scriptPtr->unk_64 = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0, userDataPtr = scriptPtr; i < 3; i++) {
|
|
||||||
((EffectInstanceData*)userDataPtr->unk_08[i]->unk_0C)->rotation.x = userDataPtr->unk_14[i];
|
|
||||||
((EffectInstanceData*)userDataPtr->unk_08[i]->unk_0C)->rotation.y = userDataPtr->unk_20[i];
|
|
||||||
((EffectInstanceData*)userDataPtr->unk_08[i]->unk_0C)->rotation.z = userDataPtr->unk_2C[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkFunc23.inc.c"
|
#include "world/common/UnkFunc23.inc.c"
|
||||||
|
|
||||||
|
@ -43,25 +43,6 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_80242D58_C79A38);
|
|||||||
#include "world/common/AwaitPlayerNearNpc.inc.c"
|
#include "world/common/AwaitPlayerNearNpc.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_802432AC_C79F8C);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_802432AC_C79F8C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802432AC_C79F8C)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80245250_C7BF30) == NULL) {
|
|
||||||
N(D_80245250_C7BF30) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80245250_C7BF30)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80245250_C7BF30)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80245250_C7BF30));
|
|
||||||
N(D_80245250_C7BF30) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
@ -70,76 +51,15 @@ ApiStatus N(func_802432AC_C79F8C)(Evt* script, s32 isInitialCall) {
|
|||||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_802435F0_C7A2D0);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_802435F0_C7A2D0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802435F0_C7A2D0)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_802452B4_C7BF94) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_802452B4_C7BF94)) {
|
|
||||||
N(D_802452B4_C7BF94) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_802452B8_C7BF98));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_80243644_C7A324);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_80243644_C7A324);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80243644_C7A324)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_802452B8_C7BF98) = evt_get_variable(script, *args);
|
|
||||||
N(D_802452B4_C7BF94) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_8024367C_C7A35C);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_8024367C_C7A35C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_8024367C_C7A35C)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/SetManyVars.inc.c"
|
#include "world/common/SetManyVars.inc.c"
|
||||||
|
|
||||||
#include "world/common/UnkYawFunc.inc.c"
|
#include "world/common/UnkYawFunc.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_80243994_C7A674);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_80243994_C7A674);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80243994_C7A674)(Evt *script, s32 isInitialCall) {
|
|
||||||
Npc *npc = get_npc_unsafe(script->varTable[2]);
|
|
||||||
|
|
||||||
D_8024E1B4 = npc->currentAnim;
|
|
||||||
npc->currentAnim = script->varTable[4];
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_802439D8_C7A6B8);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_802439D8_C7A6B8);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802439D8_C7A6B8)(Evt *script, s32 isInitialCall) {
|
|
||||||
get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
@ -11,17 +11,6 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_11/C80600", func_80240610_C807B0);
|
|||||||
#include "world/common/UnkNpcAIFunc2.inc.c"
|
#include "world/common/UnkNpcAIFunc2.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_11/C80600", func_802410B4_C81254);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_11/C80600", func_802410B4_C81254);
|
||||||
/*
|
|
||||||
void N(func_802410B4_C81254)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
|
|
||||||
npc->pos.y += N(D_802436D0_C83870)[npc->duration++];
|
|
||||||
if (npc->duration >= 5) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc14.inc.c"
|
#include "world/common/UnkNpcAIFunc14.inc.c"
|
||||||
|
|
||||||
@ -32,67 +21,6 @@ void N(func_802410B4_C81254)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
|||||||
#include "world/common/UnkFunc5.inc.c"
|
#include "world/common/UnkFunc5.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_11/C80600", func_8024176C_C8190C);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_11/C80600", func_8024176C_C8190C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_8024176C_C8190C)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* aiSettings = evt_get_variable(script, *args);
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->wander.detectShape;
|
|
||||||
territory.pointX = enemy->territory->wander.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->wander.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->wander.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->wander.detectSizeZ;
|
|
||||||
territory.unk_18 = 120.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(func_80241648_C817E8)(npc, enemy, script, aiSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
npc->unk_AB = -2;
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
if (enemy->unk_B4 != 0) {
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc23.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_80240610_C807B0)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, aiSettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_80240CF8_C80E98)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(UnkNpcAIFunc2)(script, aiSettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(func_802410B4_C81254)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc14)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 13:
|
|
||||||
N(UnkNpcAIFunc3)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(func_802412B8_C81458)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc13.inc.c"
|
#include "world/common/UnkNpcAIFunc13.inc.c"
|
||||||
|
|
||||||
@ -102,67 +30,6 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_11/C80600", func_80241A88_C81C28);
|
|||||||
#include "world/common/UnkFunc45.inc.c"
|
#include "world/common/UnkFunc45.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_11/C80600", func_80241D64_C81F04);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_11/C80600", func_80241D64_C81F04);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241D64_C81F04)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* aiSettings = evt_get_variable(script, *args);
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->wander.detectShape;
|
|
||||||
territory.pointX = enemy->territory->wander.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->wander.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->wander.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->wander.detectSizeZ;
|
|
||||||
territory.unk_18 = 120.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(func_80241648_C817E8)(npc, enemy, script, aiSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
npc->unk_AB = -2;
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
if (enemy->unk_B4 != 0) {
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc23.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_80240610_C807B0)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, aiSettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_80240CF8_C80E98)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(UnkNpcAIFunc2)(script, aiSettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(func_802410B4_C81254)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc13)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 13:
|
|
||||||
N(func_80241A88_C81C28)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(UnkFunc45)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_11/C80600", func_80241F4C_C820EC);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_11/C80600", func_80241F4C_C820EC);
|
||||||
|
|
||||||
|
@ -43,25 +43,6 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_80242048_C87AF8);
|
|||||||
#include "world/common/AwaitPlayerNearNpc.inc.c"
|
#include "world/common/AwaitPlayerNearNpc.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_8024259C_C8804C);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_8024259C_C8804C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_8024259C_C8804C)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80244074_C89B24) == NULL) {
|
|
||||||
N(D_80244074_C89B24) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80244074_C89B24)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80244074_C89B24)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80244074_C89B24));
|
|
||||||
N(D_80244074_C89B24) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
@ -70,76 +51,15 @@ ApiStatus N(func_8024259C_C8804C)(Evt* script, s32 isInitialCall) {
|
|||||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_802428E0_C88390);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_802428E0_C88390);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802428E0_C88390)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_802440D8_C89B88) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_802440D8_C89B88)) {
|
|
||||||
N(D_802440D8_C89B88) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_802440DC_C89B8C));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_80242934_C883E4);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_80242934_C883E4);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80242934_C883E4)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_802440DC_C89B8C) = evt_get_variable(script, *args);
|
|
||||||
N(D_802440D8_C89B88) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_8024296C_C8841C);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_8024296C_C8841C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_8024296C_C8841C)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/SetManyVars.inc.c"
|
#include "world/common/SetManyVars.inc.c"
|
||||||
|
|
||||||
#include "world/common/UnkYawFunc.inc.c"
|
#include "world/common/UnkYawFunc.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_80242C84_C88734);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_80242C84_C88734);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80242C84_C88734)(Evt *script, s32 isInitialCall) {
|
|
||||||
Npc *npc = get_npc_unsafe(script->varTable[2]);
|
|
||||||
|
|
||||||
D_8024E1B4 = npc->currentAnim;
|
|
||||||
npc->currentAnim = script->varTable[4];
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_80242CC8_C88778);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_80242CC8_C88778);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80242CC8_C88778)(Evt *script, s32 isInitialCall) {
|
|
||||||
get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
@ -27,25 +27,6 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_802413FC_C8EFAC);
|
|||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_8024140C_C8EFBC);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_8024140C_C8EFBC);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_80241468_C8F018);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_80241468_C8F018);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241468_C8F018)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80243D74_C91924) == NULL) {
|
|
||||||
N(D_80243D74_C91924) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80243D74_C91924)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80243D74_C91924)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80243D74_C91924));
|
|
||||||
N(D_80243D74_C91924) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
@ -54,78 +35,17 @@ ApiStatus N(func_80241468_C8F018)(Evt* script, s32 isInitialCall) {
|
|||||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_802417AC_C8F35C);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_802417AC_C8F35C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802417AC_C8F35C)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_80243DD8_C91988) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_80243DD8_C91988)) {
|
|
||||||
N(D_80243DD8_C91988) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_80243DDC_C9198C));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_80241800_C8F3B0);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_80241800_C8F3B0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241800_C8F3B0)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_80243DDC_C9198C) = evt_get_variable(script, *args);
|
|
||||||
N(D_80243DD8_C91988) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_80241838_C8F3E8);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_80241838_C8F3E8);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241838_C8F3E8)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/SetManyVars.inc.c"
|
#include "world/common/SetManyVars.inc.c"
|
||||||
|
|
||||||
#include "world/common/UnkYawFunc.inc.c"
|
#include "world/common/UnkYawFunc.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_80241B50_C8F700);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_80241B50_C8F700);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241B50_C8F700)(Evt *script, s32 isInitialCall) {
|
|
||||||
Npc *npc = get_npc_unsafe(script->varTable[2]);
|
|
||||||
|
|
||||||
D_8024E1B4 = npc->currentAnim;
|
|
||||||
npc->currentAnim = script->varTable[4];
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_80241B94_C8F744);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_80241B94_C8F744);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241B94_C8F744)(Evt *script, s32 isInitialCall) {
|
|
||||||
get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_80241BC0_C8F770);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_80241BC0_C8F770);
|
||||||
|
@ -1,25 +1,6 @@
|
|||||||
#include "kzn_20.h"
|
#include "kzn_20.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_20/C96240", func_80240310_C96240);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_20/C96240", func_80240310_C96240);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240310_C96240)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80241780_C976B0) == NULL) {
|
|
||||||
N(D_80241780_C976B0) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80241780_C976B0)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80241780_C976B0)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80241780_C976B0));
|
|
||||||
N(D_80241780_C976B0) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
@ -28,79 +9,18 @@ ApiStatus N(func_80240310_C96240)(Evt* script, s32 isInitialCall) {
|
|||||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_20/C96240", func_80240654_C96584);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_20/C96240", func_80240654_C96584);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240654_C96584)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_802417E4_C97714) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_802417E4_C97714)) {
|
|
||||||
N(D_802417E4_C97714) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_802417E8_C97718));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_20/C96240", func_802406A8_C965D8);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_20/C96240", func_802406A8_C965D8);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802406A8_C965D8)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_802417E8_C97718) = evt_get_variable(script, *args);
|
|
||||||
N(D_802417E4_C97714) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_20/C96240", func_802406E0_C96610);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_20/C96240", func_802406E0_C96610);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802406E0_C96610)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/SetManyVars.inc.c"
|
#include "world/common/SetManyVars.inc.c"
|
||||||
|
|
||||||
#include "world/common/UnkYawFunc.inc.c"
|
#include "world/common/UnkYawFunc.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_20/C96240", func_802409F8_C96928);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_20/C96240", func_802409F8_C96928);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802409F8_C96928)(Evt *script, s32 isInitialCall) {
|
|
||||||
Npc *npc = get_npc_unsafe(script->varTable[2]);
|
|
||||||
|
|
||||||
D_8024E1B4 = npc->currentAnim;
|
|
||||||
npc->currentAnim = script->varTable[4];
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_20/C96240", func_80240A3C_C9696C);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_20/C96240", func_80240A3C_C9696C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240A3C_C9696C)(Evt *script, s32 isInitialCall) {
|
|
||||||
get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_20/C96240", func_80240A68_C96998);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_20/C96240", func_80240A68_C96998);
|
||||||
|
|
||||||
|
@ -23,114 +23,10 @@
|
|||||||
#include "world/common/UnkFunc16.inc.c"
|
#include "world/common/UnkFunc16.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/mac_00/7ED280", func_80243104_7EDE14);
|
INCLUDE_ASM(s32, "world/area_mac/mac_00/7ED280", func_80243104_7EDE14);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80243104_7EDE14)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* npcAISettings = (NpcAISettings*)evt_get_variable(script, *args++);
|
|
||||||
f32 posX, posY, posZ, posW;
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->patrol.detectShape;
|
|
||||||
territory.pointX = enemy->territory->patrol.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->patrol.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->patrol.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->patrol.detectSizeZ;
|
|
||||||
territory.unk_18 = 65.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall || enemy->unk_B0 & 4) {
|
|
||||||
script->functionTemp[0] = 0;
|
|
||||||
npc->duration = 0;
|
|
||||||
npc->currentAnim = enemy->animList[0];
|
|
||||||
npc->flags &= ~0x800;
|
|
||||||
if (!enemy->territory->patrol.isFlying) {
|
|
||||||
npc->flags = (npc->flags | 0x200) & ~8;
|
|
||||||
} else {
|
|
||||||
npc->flags = (npc->flags & ~0x200) | 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
script->functionTemp[0] = 99;
|
|
||||||
script->functionTemp[1] = 0;
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
} else if (enemy->flags & ENEMY_FLAGS_40000000) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
enemy->flags &= ~ENEMY_FLAGS_40000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
posX = npc->pos.x;
|
|
||||||
posY = npc->pos.y + npc->collisionHeight;
|
|
||||||
posZ = npc->pos.z;
|
|
||||||
posW = 100.0f;
|
|
||||||
|
|
||||||
if (npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW)) {
|
|
||||||
npc->pos.y = posY;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc24.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_802426C8_7ED3D8)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, npcAISettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_80242A30_7ED740)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
#include "world/common/UnkNpcAIFunc25.inc.c"
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(NpcJumpFunc2)(script, npcAISettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(NpcJumpFunc)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc13)(script, npcAISettings, territoryPtr);
|
|
||||||
case 13:
|
|
||||||
N(func_80242EBC_7EDBCC)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(UnkNpcDurationFlagFunc)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 15:
|
|
||||||
N(func_80243044_7EDD54)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 99:
|
|
||||||
func_8004A73C(script);
|
|
||||||
}
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
static char* N(exit_str_0) = "mac_01";
|
static char* N(exit_str_0) = "mac_01";
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/mac_00/7ED280", func_80243400_7EE110);
|
INCLUDE_ASM(s32, "world/area_mac/mac_00/7ED280", func_80243400_7EE110);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80243400_7EE110)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_8024ECE8_7F99F8) == NULL) {
|
|
||||||
N(D_8024ECE8_7F99F8) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_8024ECE8_7F99F8)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_8024ECE8_7F99F8)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_8024ECE8_7F99F8));
|
|
||||||
N(D_8024ECE8_7F99F8) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define NAMESPACE dup_mac_00
|
#define NAMESPACE dup_mac_00
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
@ -145,56 +41,10 @@ ApiStatus N(func_80243400_7EE110)(Evt* script, s32 isInitialCall) {
|
|||||||
#define NAMESPACE mac_00
|
#define NAMESPACE mac_00
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/mac_00/7ED280", func_80243744_7EE454);
|
INCLUDE_ASM(s32, "world/area_mac/mac_00/7ED280", func_80243744_7EE454);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80243744_7EE454)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_8024ED4C_7F9A5C) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_8024ED4C_7F9A5C)) {
|
|
||||||
N(D_8024ED4C_7F9A5C) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_8024ED50_7F9A60));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/mac_00/7ED280", func_80243798_7EE4A8);
|
INCLUDE_ASM(s32, "world/area_mac/mac_00/7ED280", func_80243798_7EE4A8);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80243798_7EE4A8)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_8024ED50_7F9A60) = evt_get_variable(script, *args);
|
|
||||||
N(D_8024ED4C_7F9A5C) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/mac_00/7ED280", func_802437D0_7EE4E0);
|
INCLUDE_ASM(s32, "world/area_mac/mac_00/7ED280", func_802437D0_7EE4E0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802437D0_7EE4E0)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define NAMESPACE dup_mac_00
|
#define NAMESPACE dup_mac_00
|
||||||
#include "world/common/SetManyVars.inc.c"
|
#include "world/common/SetManyVars.inc.c"
|
||||||
@ -205,20 +55,5 @@ ApiStatus N(func_802437D0_7EE4E0)(Evt* script, s32 isInitialCall) {
|
|||||||
#define NAMESPACE mac_00
|
#define NAMESPACE mac_00
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/mac_00/7ED280", func_80243AE8_7EE7F8);
|
INCLUDE_ASM(s32, "world/area_mac/mac_00/7ED280", func_80243AE8_7EE7F8);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80243AE8_7EE7F8)(Evt *script, s32 isInitialCall) {
|
|
||||||
Npc *npc = get_npc_unsafe(script->varTable[2]);
|
|
||||||
|
|
||||||
D_8024E1B4 = npc->currentAnim;
|
|
||||||
npc->currentAnim = script->varTable[4];
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/mac_00/7ED280", func_80243B2C_7EE83C);
|
INCLUDE_ASM(s32, "world/area_mac/mac_00/7ED280", func_80243B2C_7EE83C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80243B2C_7EE83C)(Evt *script, s32 isInitialCall) {
|
|
||||||
get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
@ -76,11 +76,6 @@ INCLUDE_ASM(s32, "world/area_mac/machi/7E73A0", func_80240000_7E73A0);
|
|||||||
#include "world/common/UnkFunc36.inc.c"
|
#include "world/common/UnkFunc36.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/machi/7E73A0", func_80240038_7E73D8);
|
INCLUDE_ASM(s32, "world/area_mac/machi/7E73A0", func_80240038_7E73D8);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240038_7E73D8)(Evt *script, s32 isInitialCall) {
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/machi/7E73A0", func_80240040_7E73E0);
|
INCLUDE_ASM(s32, "world/area_mac/machi/7E73A0", func_80240040_7E73E0);
|
||||||
|
|
||||||
|
@ -40,90 +40,5 @@ static char* N(exit_str_3) = "";
|
|||||||
#include "world/common/UnkFunc16.inc.c"
|
#include "world/common/UnkFunc16.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mgm/mgm_00/E0E7A0", func_80240E74_E0F614);
|
INCLUDE_ASM(s32, "world/area_mgm/mgm_00/E0E7A0", func_80240E74_E0F614);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240E74_E0F614)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* npcAISettings = (NpcAISettings*)evt_get_variable(script, *args++);
|
|
||||||
f32 posX, posY, posZ, posW;
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->patrol.detectShape;
|
|
||||||
territory.pointX = enemy->territory->patrol.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->patrol.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->patrol.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->patrol.detectSizeZ;
|
|
||||||
territory.unk_18 = 65.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall || enemy->unk_B0 & 4) {
|
|
||||||
script->functionTemp[0] = 0;
|
|
||||||
npc->duration = 0;
|
|
||||||
npc->currentAnim = enemy->animList[0];
|
|
||||||
npc->flags &= ~0x800;
|
|
||||||
if (!enemy->territory->patrol.isFlying) {
|
|
||||||
npc->flags = (npc->flags | 0x200) & ~8;
|
|
||||||
} else {
|
|
||||||
npc->flags = (npc->flags & ~0x200) | 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
script->functionTemp[0] = 99;
|
|
||||||
script->functionTemp[1] = 0;
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
} else if (enemy->flags & ENEMY_FLAGS_40000000) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
enemy->flags &= ~ENEMY_FLAGS_40000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
posX = npc->pos.x;
|
|
||||||
posY = npc->pos.y + npc->collisionHeight;
|
|
||||||
posZ = npc->pos.z;
|
|
||||||
posW = 100.0f;
|
|
||||||
|
|
||||||
if (npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW)) {
|
|
||||||
npc->pos.y = posY;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc24.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_80240438_E0EBD8)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, npcAISettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_802407A0_E0EF40)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
#include "world/common/UnkNpcAIFunc25.inc.c"
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(NpcJumpFunc2)(script, npcAISettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(NpcJumpFunc)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc13)(script, npcAISettings, territoryPtr);
|
|
||||||
case 13:
|
|
||||||
N(func_80240C2C_E0F3CC)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(UnkNpcDurationFlagFunc)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 15:
|
|
||||||
N(func_80240DB4_E0F554)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 99:
|
|
||||||
func_8004A73C(script);
|
|
||||||
}
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mgm/mgm_00/E0E7A0", func_80241170_E0F910);
|
INCLUDE_ASM(s32, "world/area_mgm/mgm_00/E0E7A0", func_80241170_E0F910);
|
||||||
|
@ -21,53 +21,7 @@ INCLUDE_ASM(s32, "world/area_mim/mim_02/B97C70", func_80240C60_B98860);
|
|||||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mim/mim_02/B97C70", func_802410B0_B98CB0);
|
INCLUDE_ASM(s32, "world/area_mim/mim_02/B97C70", func_802410B0_B98CB0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802410B0_B98CB0)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_802416AC_B992AC) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_802416AC_B992AC)) {
|
|
||||||
N(D_802416AC_B992AC) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_802416B0_B992B0));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mim/mim_02/B97C70", func_80241104_B98D04);
|
INCLUDE_ASM(s32, "world/area_mim/mim_02/B97C70", func_80241104_B98D04);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241104_B98D04)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_802416B0_B992B0) = evt_get_variable(script, *args);
|
|
||||||
N(D_802416AC_B992AC) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mim/mim_02/B97C70", func_8024113C_B98D3C);
|
INCLUDE_ASM(s32, "world/area_mim/mim_02/B97C70", func_8024113C_B98D3C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_8024113C_B98D3C)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
@ -17,24 +17,5 @@ INCLUDE_ASM(s32, "world/area_mim/mim_04/B9DB60", func_80240AAC_B9E40C);
|
|||||||
INCLUDE_ASM(s32, "world/area_mim/mim_04/B9DB60", func_80240DF0_B9E750);
|
INCLUDE_ASM(s32, "world/area_mim/mim_04/B9DB60", func_80240DF0_B9E750);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mim/mim_04/B9DB60", func_80241014_B9E974);
|
INCLUDE_ASM(s32, "world/area_mim/mim_04/B9DB60", func_80241014_B9E974);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241014_B9E974)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80242614_B9FF74) == NULL) {
|
|
||||||
N(D_80242614_B9FF74) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80242614_B9FF74)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80242614_B9FF74)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80242614_B9FF74));
|
|
||||||
N(D_80242614_B9FF74) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
@ -18,17 +18,6 @@ INCLUDE_ASM(s32, "world/area_mim/mim_08/BAD940", func_80240250_BADB90);
|
|||||||
#include "world/common/UnkNpcAIFunc2.inc.c"
|
#include "world/common/UnkNpcAIFunc2.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mim/mim_08/BAD940", func_80240CF4_BAE634);
|
INCLUDE_ASM(s32, "world/area_mim/mim_08/BAD940", func_80240CF4_BAE634);
|
||||||
/*
|
|
||||||
void N(func_80240CF4_BAE634)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
|
|
||||||
npc->pos.y += N(D_802443C0_BB1D00)[npc->duration++];
|
|
||||||
if (npc->duration >= 5) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc14.inc.c"
|
#include "world/common/UnkNpcAIFunc14.inc.c"
|
||||||
|
|
||||||
@ -39,67 +28,6 @@ void N(func_80240CF4_BAE634)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
|||||||
#include "world/common/UnkFunc5.inc.c"
|
#include "world/common/UnkFunc5.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mim/mim_08/BAD940", func_802413AC_BAECEC);
|
INCLUDE_ASM(s32, "world/area_mim/mim_08/BAD940", func_802413AC_BAECEC);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802413AC_BAECEC)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* aiSettings = evt_get_variable(script, *args);
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->wander.detectShape;
|
|
||||||
territory.pointX = enemy->territory->wander.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->wander.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->wander.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->wander.detectSizeZ;
|
|
||||||
territory.unk_18 = 120.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(func_80241288_BAEBC8)(npc, enemy, script, aiSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
npc->unk_AB = -2;
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
if (enemy->unk_B4 != 0) {
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc23.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_80240250_BADB90)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, aiSettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_80240938_BAE278)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(UnkNpcAIFunc2)(script, aiSettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(func_80240CF4_BAE634)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc14)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 13:
|
|
||||||
N(UnkNpcAIFunc3)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(func_80240EF8_BAE838)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc6.inc.c"
|
#include "world/common/UnkNpcAIFunc6.inc.c"
|
||||||
|
|
||||||
|
@ -6,14 +6,6 @@ static char* N(exit_str_2) = "kmr_22";
|
|||||||
static char* N(exit_str_3) = "";
|
static char* N(exit_str_3) = "";
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mim/mim_10/BB59E0", func_80240000_BB59E0);
|
INCLUDE_ASM(s32, "world/area_mim/mim_10/BB59E0", func_80240000_BB59E0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240000_BB59E0)(Evt *script, s32 isInitialCall) {
|
|
||||||
if (gPlayerStatus.position.y >= -210.0f) {
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mim/mim_10/BB59E0", func_80240030_BB5A10);
|
INCLUDE_ASM(s32, "world/area_mim/mim_10/BB59E0", func_80240030_BB5A10);
|
||||||
|
|
||||||
|
@ -18,25 +18,6 @@ static char* N(exit_str_3) = "";
|
|||||||
#include "world/common/SomeXYZFunc2.inc.c"
|
#include "world/common/SomeXYZFunc2.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7020", func_802402E0_9D7300);
|
INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7020", func_802402E0_9D7300);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802402E0_9D7300)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_802453D0_9DC3F0) == NULL) {
|
|
||||||
N(D_802453D0_9DC3F0) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_802453D0_9DC3F0)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_802453D0_9DC3F0)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_802453D0_9DC3F0));
|
|
||||||
N(D_802453D0_9DC3F0) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define NAMESPACE dup_nok_02
|
#define NAMESPACE dup_nok_02
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
@ -51,53 +32,7 @@ ApiStatus N(func_802402E0_9D7300)(Evt* script, s32 isInitialCall) {
|
|||||||
#define NAMESPACE nok_02
|
#define NAMESPACE nok_02
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7020", func_80240624_9D7644);
|
INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7020", func_80240624_9D7644);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240624_9D7644)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_80245434_9DC454) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_80245434_9DC454)) {
|
|
||||||
N(D_80245434_9DC454) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_80245438_9DC458));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7020", func_80240678_9D7698);
|
INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7020", func_80240678_9D7698);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240678_9D7698)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_80245438_9DC458) = evt_get_variable(script, *args);
|
|
||||||
N(D_80245434_9DC454) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7020", func_802406B0_9D76D0);
|
INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7020", func_802406B0_9D76D0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802406B0_9D76D0)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
@ -11,99 +11,14 @@ INCLUDE_ASM(s32, "world/area_nok/nok_02/9DA8F0", func_802438D0_9DA8F0);
|
|||||||
#define NAMESPACE nok_02
|
#define NAMESPACE nok_02
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_nok/nok_02/9DA8F0", func_80243BEC_9DAC0C);
|
INCLUDE_ASM(s32, "world/area_nok/nok_02/9DA8F0", func_80243BEC_9DAC0C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80243BEC_9DAC0C)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_80252400_9E9420) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_80252400_9E9420)) {
|
|
||||||
N(D_80252400_9E9420) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_80252404_9E9424));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_nok/nok_02/9DA8F0", func_80243C40_9DAC60);
|
INCLUDE_ASM(s32, "world/area_nok/nok_02/9DA8F0", func_80243C40_9DAC60);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80243C40_9DAC60)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_80252404_9E9424) = evt_get_variable(script, *args);
|
|
||||||
N(D_80252400_9E9420) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_nok/nok_02/9DA8F0", func_80243C78_9DAC98);
|
INCLUDE_ASM(s32, "world/area_nok/nok_02/9DA8F0", func_80243C78_9DAC98);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80243C78_9DAC98)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_nok/nok_02/9DA8F0", func_80243D14_9DAD34);
|
INCLUDE_ASM(s32, "world/area_nok/nok_02/9DA8F0", func_80243D14_9DAD34);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80243D14_9DAD34)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_nok/nok_02/9DA8F0", func_80243DB0_9DADD0);
|
INCLUDE_ASM(s32, "world/area_nok/nok_02/9DA8F0", func_80243DB0_9DADD0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80243DB0_9DADD0)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80252720_9E9740) == NULL) {
|
|
||||||
N(D_80252720_9E9740) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80252720_9E9740)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80252720_9E9740)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80252720_9E9740));
|
|
||||||
N(D_80252720_9E9740) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define NAMESPACE dup2_nok_02
|
#define NAMESPACE dup2_nok_02
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
@ -24,17 +24,6 @@ INCLUDE_ASM(s32, "world/area_nok/nok_11/9F4A40", func_80240984_9F53C4);
|
|||||||
#include "world/common/UnkNpcAIFunc2.inc.c"
|
#include "world/common/UnkNpcAIFunc2.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_nok/nok_11/9F4A40", func_80241428_9F5E68);
|
INCLUDE_ASM(s32, "world/area_nok/nok_11/9F4A40", func_80241428_9F5E68);
|
||||||
/*
|
|
||||||
void N(func_80241428_9F5E68)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
|
|
||||||
npc->pos.y += N(D_80242888_9F72C8)[npc->duration++];
|
|
||||||
if (npc->duration >= 5) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc14.inc.c"
|
#include "world/common/UnkNpcAIFunc14.inc.c"
|
||||||
|
|
||||||
@ -45,67 +34,6 @@ void N(func_80241428_9F5E68)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
|||||||
#include "world/common/UnkFunc5.inc.c"
|
#include "world/common/UnkFunc5.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_nok/nok_11/9F4A40", func_80241AE0_9F6520);
|
INCLUDE_ASM(s32, "world/area_nok/nok_11/9F4A40", func_80241AE0_9F6520);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241AE0_9F6520)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* aiSettings = evt_get_variable(script, *args);
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->wander.detectShape;
|
|
||||||
territory.pointX = enemy->territory->wander.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->wander.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->wander.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->wander.detectSizeZ;
|
|
||||||
territory.unk_18 = 120.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(func_802419BC_9F63FC)(npc, enemy, script, aiSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
npc->unk_AB = -2;
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
if (enemy->unk_B4 != 0) {
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc23.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_80240984_9F53C4)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, aiSettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_8024106C_9F5AAC)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(UnkNpcAIFunc2)(script, aiSettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(func_80241428_9F5E68)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc14)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 13:
|
|
||||||
N(UnkNpcAIFunc3)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(func_8024162C_9F606C)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/foliage.inc.c"
|
#include "world/common/foliage.inc.c"
|
||||||
|
|
||||||
|
@ -33,91 +33,6 @@ INCLUDE_ASM(s32, "world/area_nok/nok_12/9FAD60", func_80240904_9FB0F4);
|
|||||||
#include "world/common/UnkFunc16.inc.c"
|
#include "world/common/UnkFunc16.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_nok/nok_12/9FAD60", func_802418D8_9FC0C8);
|
INCLUDE_ASM(s32, "world/area_nok/nok_12/9FAD60", func_802418D8_9FC0C8);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802418D8_9FC0C8)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* npcAISettings = (NpcAISettings*)evt_get_variable(script, *args++);
|
|
||||||
f32 posX, posY, posZ, posW;
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->patrol.detectShape;
|
|
||||||
territory.pointX = enemy->territory->patrol.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->patrol.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->patrol.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->patrol.detectSizeZ;
|
|
||||||
territory.unk_18 = 65.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall || enemy->unk_B0 & 4) {
|
|
||||||
script->functionTemp[0] = 0;
|
|
||||||
npc->duration = 0;
|
|
||||||
npc->currentAnim = enemy->animList[0];
|
|
||||||
npc->flags &= ~0x800;
|
|
||||||
if (!enemy->territory->patrol.isFlying) {
|
|
||||||
npc->flags = (npc->flags | 0x200) & ~8;
|
|
||||||
} else {
|
|
||||||
npc->flags = (npc->flags & ~0x200) | 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
script->functionTemp[0] = 99;
|
|
||||||
script->functionTemp[1] = 0;
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
} else if (enemy->flags & ENEMY_FLAGS_40000000) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
enemy->flags &= ~ENEMY_FLAGS_40000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
posX = npc->pos.x;
|
|
||||||
posY = npc->pos.y + npc->collisionHeight;
|
|
||||||
posZ = npc->pos.z;
|
|
||||||
posW = 100.0f;
|
|
||||||
|
|
||||||
if (npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW)) {
|
|
||||||
npc->pos.y = posY;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc24.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_80240E9C_9FB68C)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, npcAISettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_80241204_9FB9F4)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
#include "world/common/UnkNpcAIFunc25.inc.c"
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(NpcJumpFunc2)(script, npcAISettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(NpcJumpFunc)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc13)(script, npcAISettings, territoryPtr);
|
|
||||||
case 13:
|
|
||||||
N(func_80241690_9FBE80)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(UnkNpcDurationFlagFunc)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 15:
|
|
||||||
N(func_80241818_9FC008)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 99:
|
|
||||||
func_8004A73C(script);
|
|
||||||
}
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_nok/nok_12/9FAD60", func_80241BD4_9FC3C4);
|
INCLUDE_ASM(s32, "world/area_nok/nok_12/9FAD60", func_80241BD4_9FC3C4);
|
||||||
|
|
||||||
|
@ -21,17 +21,6 @@ INCLUDE_ASM(s32, "world/area_nok/nok_14/A02A00", func_80240B44_A03384);
|
|||||||
#include "world/common/UnkNpcAIFunc2.inc.c"
|
#include "world/common/UnkNpcAIFunc2.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_nok/nok_14/A02A00", func_802415E8_A03E28);
|
INCLUDE_ASM(s32, "world/area_nok/nok_14/A02A00", func_802415E8_A03E28);
|
||||||
/*
|
|
||||||
void N(func_802415E8_A03E28)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
|
|
||||||
npc->pos.y += N(D_80243A18_A06258)[npc->duration++];
|
|
||||||
if (npc->duration >= 5) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc14.inc.c"
|
#include "world/common/UnkNpcAIFunc14.inc.c"
|
||||||
|
|
||||||
@ -42,67 +31,6 @@ void N(func_802415E8_A03E28)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
|||||||
#include "world/common/UnkFunc5.inc.c"
|
#include "world/common/UnkFunc5.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_nok/nok_14/A02A00", func_80241CA0_A044E0);
|
INCLUDE_ASM(s32, "world/area_nok/nok_14/A02A00", func_80241CA0_A044E0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241CA0_A044E0)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* aiSettings = evt_get_variable(script, *args);
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->wander.detectShape;
|
|
||||||
territory.pointX = enemy->territory->wander.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->wander.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->wander.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->wander.detectSizeZ;
|
|
||||||
territory.unk_18 = 120.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(func_80241B7C_A043BC)(npc, enemy, script, aiSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
npc->unk_AB = -2;
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
if (enemy->unk_B4 != 0) {
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc23.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_80240B44_A03384)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, aiSettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_8024122C_A03A6C)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(UnkNpcAIFunc2)(script, aiSettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(func_802415E8_A03E28)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc14)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 13:
|
|
||||||
N(UnkNpcAIFunc3)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(func_802417EC_A0402C)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_nok/nok_14/A02A00", func_80241E8C_A046CC);
|
INCLUDE_ASM(s32, "world/area_nok/nok_14/A02A00", func_80241E8C_A046CC);
|
||||||
|
|
||||||
|
@ -38,17 +38,6 @@ INCLUDE_ASM(s32, "world/area_nok/nok_15/A06F00", func_80240C64_A07B64);
|
|||||||
#include "world/common/UnkNpcAIFunc2.inc.c"
|
#include "world/common/UnkNpcAIFunc2.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_nok/nok_15/A06F00", func_80241708_A08608);
|
INCLUDE_ASM(s32, "world/area_nok/nok_15/A06F00", func_80241708_A08608);
|
||||||
/*
|
|
||||||
void N(func_80241708_A08608)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
|
|
||||||
npc->pos.y += N(D_80243D5C_A0AC5C)[npc->duration++];
|
|
||||||
if (npc->duration >= 5) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc14.inc.c"
|
#include "world/common/UnkNpcAIFunc14.inc.c"
|
||||||
|
|
||||||
@ -59,67 +48,6 @@ void N(func_80241708_A08608)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
|||||||
#include "world/common/UnkFunc5.inc.c"
|
#include "world/common/UnkFunc5.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_nok/nok_15/A06F00", func_80241DC0_A08CC0);
|
INCLUDE_ASM(s32, "world/area_nok/nok_15/A06F00", func_80241DC0_A08CC0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241DC0_A08CC0)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* aiSettings = evt_get_variable(script, *args);
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->wander.detectShape;
|
|
||||||
territory.pointX = enemy->territory->wander.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->wander.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->wander.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->wander.detectSizeZ;
|
|
||||||
territory.unk_18 = 120.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(func_80241C9C_A08B9C)(npc, enemy, script, aiSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
npc->unk_AB = -2;
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
if (enemy->unk_B4 != 0) {
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc23.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_80240C64_A07B64)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, aiSettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_8024134C_A0824C)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(UnkNpcAIFunc2)(script, aiSettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(func_80241708_A08608)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc14)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 13:
|
|
||||||
N(UnkNpcAIFunc3)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(func_8024190C_A0880C)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_nok/nok_15/A06F00", func_80241FAC_A08EAC);
|
INCLUDE_ASM(s32, "world/area_nok/nok_15/A06F00", func_80241FAC_A08EAC);
|
||||||
|
|
||||||
|
@ -1,25 +1,6 @@
|
|||||||
#include "obk_01.h"
|
#include "obk_01.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD980", func_802407E0_BBD980);
|
INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD980", func_802407E0_BBD980);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802407E0_BBD980)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_802440F0_BC1290) == NULL) {
|
|
||||||
N(D_802440F0_BC1290) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_802440F0_BC1290)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_802440F0_BC1290)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_802440F0_BC1290));
|
|
||||||
N(D_802440F0_BC1290) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
@ -28,79 +9,18 @@ ApiStatus N(func_802407E0_BBD980)(Evt* script, s32 isInitialCall) {
|
|||||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD980", func_80240B24_BBDCC4);
|
INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD980", func_80240B24_BBDCC4);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240B24_BBDCC4)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_80244154_BC12F4) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_80244154_BC12F4)) {
|
|
||||||
N(D_80244154_BC12F4) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_80244158_BC12F8));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD980", func_80240B78_BBDD18);
|
INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD980", func_80240B78_BBDD18);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240B78_BBDD18)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_80244158_BC12F8) = evt_get_variable(script, *args);
|
|
||||||
N(D_80244154_BC12F4) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD980", func_80240BB0_BBDD50);
|
INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD980", func_80240BB0_BBDD50);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240BB0_BBDD50)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/SetManyVars.inc.c"
|
#include "world/common/SetManyVars.inc.c"
|
||||||
|
|
||||||
#include "world/common/UnkYawFunc.inc.c"
|
#include "world/common/UnkYawFunc.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD980", func_80240EC8_BBE068);
|
INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD980", func_80240EC8_BBE068);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240EC8_BBE068)(Evt *script, s32 isInitialCall) {
|
|
||||||
Npc *npc = get_npc_unsafe(script->varTable[2]);
|
|
||||||
|
|
||||||
D_8024E1B4 = npc->currentAnim;
|
|
||||||
npc->currentAnim = script->varTable[4];
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD980", func_80240F0C_BBE0AC);
|
INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD980", func_80240F0C_BBE0AC);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240F0C_BBE0AC)(Evt *script, s32 isInitialCall) {
|
|
||||||
get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD980", func_80240F38_BBE0D8);
|
INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD980", func_80240F38_BBE0D8);
|
||||||
|
|
||||||
|
@ -1,25 +1,6 @@
|
|||||||
#include "obk_03.h"
|
#include "obk_03.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_03/BC43F0", func_80240170_BC43F0);
|
INCLUDE_ASM(s32, "world/area_obk/obk_03/BC43F0", func_80240170_BC43F0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240170_BC43F0)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80242ECC_BC714C) == NULL) {
|
|
||||||
N(D_80242ECC_BC714C) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80242ECC_BC714C)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80242ECC_BC714C)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80242ECC_BC714C));
|
|
||||||
N(D_80242ECC_BC714C) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
@ -28,76 +9,15 @@ ApiStatus N(func_80240170_BC43F0)(Evt* script, s32 isInitialCall) {
|
|||||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_03/BC43F0", func_802404B4_BC4734);
|
INCLUDE_ASM(s32, "world/area_obk/obk_03/BC43F0", func_802404B4_BC4734);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802404B4_BC4734)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_80242F30_BC71B0) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_80242F30_BC71B0)) {
|
|
||||||
N(D_80242F30_BC71B0) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_80242F34_BC71B4));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_03/BC43F0", func_80240508_BC4788);
|
INCLUDE_ASM(s32, "world/area_obk/obk_03/BC43F0", func_80240508_BC4788);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240508_BC4788)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_80242F34_BC71B4) = evt_get_variable(script, *args);
|
|
||||||
N(D_80242F30_BC71B0) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_03/BC43F0", func_80240540_BC47C0);
|
INCLUDE_ASM(s32, "world/area_obk/obk_03/BC43F0", func_80240540_BC47C0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240540_BC47C0)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/SetManyVars.inc.c"
|
#include "world/common/SetManyVars.inc.c"
|
||||||
|
|
||||||
#include "world/common/UnkYawFunc.inc.c"
|
#include "world/common/UnkYawFunc.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_03/BC43F0", func_80240858_BC4AD8);
|
INCLUDE_ASM(s32, "world/area_obk/obk_03/BC43F0", func_80240858_BC4AD8);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240858_BC4AD8)(Evt *script, s32 isInitialCall) {
|
|
||||||
Npc *npc = get_npc_unsafe(script->varTable[2]);
|
|
||||||
|
|
||||||
D_8024E1B4 = npc->currentAnim;
|
|
||||||
npc->currentAnim = script->varTable[4];
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_03/BC43F0", func_8024089C_BC4B1C);
|
INCLUDE_ASM(s32, "world/area_obk/obk_03/BC43F0", func_8024089C_BC4B1C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_8024089C_BC4B1C)(Evt *script, s32 isInitialCall) {
|
|
||||||
get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
@ -21,25 +21,6 @@ INCLUDE_ASM(s32, "world/area_obk/obk_04/BC7EB0", func_80240624_BC8484);
|
|||||||
INCLUDE_ASM(s32, "world/area_obk/obk_04/BC7EB0", func_80240910_BC8770);
|
INCLUDE_ASM(s32, "world/area_obk/obk_04/BC7EB0", func_80240910_BC8770);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_04/BC7EB0", func_80240940_BC87A0);
|
INCLUDE_ASM(s32, "world/area_obk/obk_04/BC7EB0", func_80240940_BC87A0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240940_BC87A0)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80243A10_BCB870) == NULL) {
|
|
||||||
N(D_80243A10_BCB870) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80243A10_BCB870)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80243A10_BCB870)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80243A10_BCB870));
|
|
||||||
N(D_80243A10_BCB870) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -4,25 +4,6 @@ static char* N(exit_str_0) = "obk_01";
|
|||||||
static char* N(exit_str_1) = "";
|
static char* N(exit_str_1) = "";
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_07/BCEBF0", func_80240000_BCEBF0);
|
INCLUDE_ASM(s32, "world/area_obk/obk_07/BCEBF0", func_80240000_BCEBF0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240000_BCEBF0)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80241FB0_BD0BA0) == NULL) {
|
|
||||||
N(D_80241FB0_BD0BA0) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80241FB0_BD0BA0)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80241FB0_BD0BA0)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80241FB0_BD0BA0));
|
|
||||||
N(D_80241FB0_BD0BA0) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -3,21 +3,3 @@
|
|||||||
static char* N(exit_str_0) = "obk_01\0";
|
static char* N(exit_str_0) = "obk_01\0";
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_09/BDAB00", func_80240350_BDAB00);
|
INCLUDE_ASM(s32, "world/area_obk/obk_09/BDAB00", func_80240350_BDAB00);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240350_BDAB00)(Evt *script, s32 isInitialCall) {
|
|
||||||
s32 var;
|
|
||||||
void* temp_s0 = load_asset_by_name("party_pokopi", &var);
|
|
||||||
|
|
||||||
decode_yay0(temp_s0, N(D_80247B00));
|
|
||||||
general_heap_free(temp_s0);
|
|
||||||
|
|
||||||
N(D_8024BA90).unk_00 = N(D_80247D00);
|
|
||||||
N(D_8024BA90).unk_08 = 0x96;
|
|
||||||
N(D_8024BA90).unk_0A = 0x69;
|
|
||||||
N(D_8024BA90).unk_0C = 2;
|
|
||||||
N(D_8024BA90).unk_04 = N(D_80247B00);
|
|
||||||
N(D_8024BA90).unk_10 = 1;
|
|
||||||
set_message_images(&N(D_8024BA90));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
@ -3,159 +3,9 @@
|
|||||||
static char* N(exit_str_0) = "omo_13";
|
static char* N(exit_str_0) = "omo_13";
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_01/D9B150", func_80240260_D9B150);
|
INCLUDE_ASM(s32, "world/area_omo/omo_01/D9B150", func_80240260_D9B150);
|
||||||
/*
|
|
||||||
void N(func_80240260_D9B150)(Evt *script, NpcAISettings *npcAISettings, EnemyTerritoryThing *territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
|
|
||||||
f32 temp_f0;
|
|
||||||
f32 temp_f20;
|
|
||||||
f64 temp_f2;
|
|
||||||
f32 phi_f22;
|
|
||||||
f32 phi_f24;
|
|
||||||
f32 phi_f26;
|
|
||||||
s32 phi_s3;
|
|
||||||
|
|
||||||
f32 subroutine_arg8;
|
|
||||||
f32 subroutine_arg9;
|
|
||||||
f32 subroutine_argA;
|
|
||||||
f32 subroutine_argB;
|
|
||||||
f32 subroutine_argC;
|
|
||||||
f32 subroutine_argD;
|
|
||||||
f32 subroutine_argE;
|
|
||||||
f32 subroutine_argF;
|
|
||||||
f32 subroutine_arg10;
|
|
||||||
|
|
||||||
npc->duration = npcAISettings->unk_20 / 2 + rand_int(npcAISettings->unk_20 / 2 + 1);
|
|
||||||
npc->currentAnim = enemy->animList[3];
|
|
||||||
npc->moveSpeed = npcAISettings->chaseSpeed;
|
|
||||||
phi_s3 = FALSE;
|
|
||||||
|
|
||||||
temp_f20 = clamp_angle(atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z) + 180.0f);
|
|
||||||
temp_f0 = get_clamped_angle_diff(npc->yaw, temp_f20);
|
|
||||||
if (npcAISettings->unk_1C.s < fabsf(temp_f0)) {
|
|
||||||
temp_f20 = npc->yaw;
|
|
||||||
if (temp_f0 < 0.0f) {
|
|
||||||
temp_f20 += -npcAISettings->unk_1C.s;
|
|
||||||
} else {
|
|
||||||
temp_f20 += npcAISettings->unk_1C.s;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
npc->yaw = clamp_angle(temp_f20);
|
|
||||||
|
|
||||||
subroutine_arg8 = npc->pos.x;
|
|
||||||
subroutine_arg9 = npc->pos.y;
|
|
||||||
subroutine_argA = npc->pos.z;
|
|
||||||
|
|
||||||
temp_f20 = clamp_angle(atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z) + 180.0f);
|
|
||||||
phi_f22 = 0.0f;
|
|
||||||
phi_f24 = 0.0f;
|
|
||||||
phi_f26 = 0.0f;
|
|
||||||
|
|
||||||
if (npc_test_move_simple_without_slipping(npc->unk_80, &subroutine_arg8, &subroutine_arg9, &subroutine_argA, npc->moveSpeed * 4.5, temp_f20, npc->collisionHeight, npc->collisionRadius) != 0) {
|
|
||||||
phi_f22 = dist2D(npc->pos.x, npc->pos.z, subroutine_arg8, subroutine_argA);
|
|
||||||
|
|
||||||
subroutine_argB = npc->pos.x;
|
|
||||||
subroutine_argC = npc->pos.y;
|
|
||||||
subroutine_argD = npc->pos.z;
|
|
||||||
|
|
||||||
if (npc_test_move_simple_without_slipping(npc->unk_80, &subroutine_argB, &subroutine_argC, &subroutine_argD, npc->moveSpeed * 4.5, clamp_angle(temp_f20 + 35.0f), npc->collisionHeight, npc->collisionRadius) != 0) {
|
|
||||||
phi_f24 = dist2D(npc->pos.x, npc->pos.z, subroutine_argB, subroutine_argD);
|
|
||||||
}
|
|
||||||
|
|
||||||
subroutine_argE = npc->pos.x;
|
|
||||||
subroutine_argF = npc->pos.y;
|
|
||||||
subroutine_arg10 = npc->pos.z;
|
|
||||||
|
|
||||||
if (npc_test_move_simple_without_slipping(npc->unk_80, &subroutine_argE, &subroutine_argF, &subroutine_arg10, npc->moveSpeed * 4.5, clamp_angle(temp_f20 - 35.0f), npc->collisionHeight, npc->collisionRadius) != 0) {
|
|
||||||
phi_f26 = dist2D(npc->pos.x, npc->pos.z, subroutine_argE, subroutine_arg10);
|
|
||||||
}
|
|
||||||
|
|
||||||
dist2D(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z);
|
|
||||||
|
|
||||||
if ((phi_f22 < npc->moveSpeed * 1.5) && (phi_f24 < npc->moveSpeed * 1.5) && (phi_f26 < npc->moveSpeed * 1.5) &&
|
|
||||||
(func_800490B4(territory, enemy, npcAISettings->alertRadius, npcAISettings->unk_10.f, 0) != 0)) {
|
|
||||||
phi_s3 = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!phi_s3) {
|
|
||||||
if ((phi_f24 < phi_f22) && (phi_f26 < phi_f24)) {
|
|
||||||
temp_f20 = atan2(npc->pos.x, npc->pos.z, subroutine_arg8, subroutine_argA);
|
|
||||||
} else if ((phi_f24 < phi_f22) && (phi_f24 < phi_f26)) {
|
|
||||||
temp_f20 = atan2(npc->pos.x, npc->pos.z, subroutine_arg8, subroutine_argA);
|
|
||||||
} else if ((phi_f22 < phi_f24) && (phi_f26 < phi_f22)) {
|
|
||||||
temp_f20 = atan2(npc->pos.x, npc->pos.z, subroutine_argB, subroutine_argD);
|
|
||||||
} else if ((phi_f26 < phi_f24) && (phi_f22 < phi_f26)) {
|
|
||||||
temp_f20 = atan2(npc->pos.x, npc->pos.z, subroutine_argB, subroutine_argD);
|
|
||||||
} else if ((phi_f22 < phi_f26) && (phi_f24 < phi_f22)) {
|
|
||||||
temp_f20 = atan2(npc->pos.x, npc->pos.z, subroutine_argE, subroutine_arg10);
|
|
||||||
} else if ((phi_f24 < phi_f26) && (phi_f22 < phi_f24)) {
|
|
||||||
temp_f20 = atan2(npc->pos.x, npc->pos.z, subroutine_argE, subroutine_arg10);
|
|
||||||
}
|
|
||||||
|
|
||||||
temp_f0 = get_clamped_angle_diff(npc->yaw, temp_f20);
|
|
||||||
if (npcAISettings->unk_1C.s < fabsf(temp_f0)) {
|
|
||||||
temp_f20 = npc->yaw;
|
|
||||||
if (temp_f0 < 0.0f) {
|
|
||||||
temp_f20 += -npcAISettings->unk_1C.s;
|
|
||||||
} else {
|
|
||||||
temp_f20 += npcAISettings->unk_1C.s;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
npc->yaw = clamp_angle(temp_f20);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (phi_s3) {
|
|
||||||
npc->duration = 0xA;
|
|
||||||
npc->currentAnim = enemy->animList[8];
|
|
||||||
}
|
|
||||||
script->functionTemp[0] = 0xD;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_01/D9B150", func_80240844_D9B734);
|
INCLUDE_ASM(s32, "world/area_omo/omo_01/D9B150", func_80240844_D9B734);
|
||||||
/*
|
|
||||||
void N(func_80240844_D9B734)(Evt *script, NpcAISettings *npcAISettings, EnemyTerritoryThing *territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc *npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
s32 var;
|
|
||||||
|
|
||||||
if (func_800490B4(territory, enemy, npcAISettings->chaseRadius, npcAISettings->unk_28.f, 1) == 0) {
|
|
||||||
fx_emote(2, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 0xF, &var);
|
|
||||||
npc->currentAnim = enemy->animList[0];
|
|
||||||
npc->duration = 25;
|
|
||||||
script->functionTemp[0] = 14;
|
|
||||||
} else {
|
|
||||||
if (npc->currentAnim != enemy->animList[8]) {
|
|
||||||
if (npc->moveSpeed < 4.0) {
|
|
||||||
func_8003D660(npc, 0);
|
|
||||||
} else {
|
|
||||||
func_8003D660(npc, 1);
|
|
||||||
}
|
|
||||||
npc_move_heading(npc, npc->moveSpeed, npc->yaw);
|
|
||||||
}
|
|
||||||
if (npc->duration > 0) {
|
|
||||||
npc->duration--;
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_01/D9B150", func_802409A8_D9B898);
|
INCLUDE_ASM(s32, "world/area_omo/omo_01/D9B150", func_802409A8_D9B898);
|
||||||
/*
|
|
||||||
void N(func_802409A8_D9B898)(Evt *script, NpcAISettings *npcAISettings, EnemyTerritoryThing *territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc *npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
|
|
||||||
npc->duration--;
|
|
||||||
if (npc->duration == 0) {
|
|
||||||
script->functionTemp[0] = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_01/D9B150", func_802409EC_D9B8DC);
|
INCLUDE_ASM(s32, "world/area_omo/omo_01/D9B150", func_802409EC_D9B8DC);
|
||||||
|
@ -4,25 +4,6 @@ static char* N(exit_str_0) = "omo_03";
|
|||||||
static char* N(exit_str_1) = "";
|
static char* N(exit_str_1) = "";
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_04/DAD400", func_80240000_DAD400);
|
INCLUDE_ASM(s32, "world/area_omo/omo_04/DAD400", func_80240000_DAD400);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240000_DAD400)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80242630_DAFA30) == NULL) {
|
|
||||||
N(D_80242630_DAFA30) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80242630_DAFA30)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80242630_DAFA30)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80242630_DAFA30));
|
|
||||||
N(D_80242630_DAFA30) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
@ -47,17 +28,6 @@ INCLUDE_ASM(s32, "world/area_omo/omo_04/DAD400", func_80240550_DAD950);
|
|||||||
#include "world/common/UnkNpcAIFunc2.inc.c"
|
#include "world/common/UnkNpcAIFunc2.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_04/DAD400", func_80240FF4_DAE3F4);
|
INCLUDE_ASM(s32, "world/area_omo/omo_04/DAD400", func_80240FF4_DAE3F4);
|
||||||
/*
|
|
||||||
void N(func_80240FF4_DAE3F4)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
|
|
||||||
npc->pos.y += N(D_80242EF0_DB02F0)[npc->duration++];
|
|
||||||
if (npc->duration >= 5) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc14.inc.c"
|
#include "world/common/UnkNpcAIFunc14.inc.c"
|
||||||
|
|
||||||
@ -68,67 +38,6 @@ void N(func_80240FF4_DAE3F4)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
|||||||
#include "world/common/UnkFunc5.inc.c"
|
#include "world/common/UnkFunc5.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_04/DAD400", func_802416AC_DAEAAC);
|
INCLUDE_ASM(s32, "world/area_omo/omo_04/DAD400", func_802416AC_DAEAAC);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802416AC_DAEAAC)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* aiSettings = evt_get_variable(script, *args);
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->wander.detectShape;
|
|
||||||
territory.pointX = enemy->territory->wander.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->wander.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->wander.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->wander.detectSizeZ;
|
|
||||||
territory.unk_18 = 120.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(func_80241588_DAE988)(npc, enemy, script, aiSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
npc->unk_AB = -2;
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
if (enemy->unk_B4 != 0) {
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc23.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_80240550_DAD950)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, aiSettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_80240C38_DAE038)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(UnkNpcAIFunc2)(script, aiSettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(func_80240FF4_DAE3F4)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc14)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 13:
|
|
||||||
N(UnkNpcAIFunc3)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(func_802411F8_DAE5F8)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_04/DAD400", func_80241898_DAEC98);
|
INCLUDE_ASM(s32, "world/area_omo/omo_04/DAD400", func_80241898_DAEC98);
|
||||||
|
|
||||||
|
@ -30,17 +30,6 @@ INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_80240C04_DB2EC4);
|
|||||||
#include "world/common/UnkNpcAIFunc2.inc.c"
|
#include "world/common/UnkNpcAIFunc2.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_802416A8_DB3968);
|
INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_802416A8_DB3968);
|
||||||
/*
|
|
||||||
void N(func_802416A8_DB3968)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
|
|
||||||
npc->pos.y += N(D_80242F88_DB5248)[npc->duration++];
|
|
||||||
if (npc->duration >= 5) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc14.inc.c"
|
#include "world/common/UnkNpcAIFunc14.inc.c"
|
||||||
|
|
||||||
@ -51,138 +40,19 @@ void N(func_802416A8_DB3968)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
|||||||
#include "world/common/UnkFunc5.inc.c"
|
#include "world/common/UnkFunc5.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_80241D60_DB4020);
|
INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_80241D60_DB4020);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241D60_DB4020)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* aiSettings = evt_get_variable(script, *args);
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->wander.detectShape;
|
|
||||||
territory.pointX = enemy->territory->wander.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->wander.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->wander.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->wander.detectSizeZ;
|
|
||||||
territory.unk_18 = 120.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(func_80241C3C_DB3EFC)(npc, enemy, script, aiSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
npc->unk_AB = -2;
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
if (enemy->unk_B4 != 0) {
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc23.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_80240C04_DB2EC4)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, aiSettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_802412EC_DB35AC)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(UnkNpcAIFunc2)(script, aiSettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(func_802416A8_DB3968)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc14)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 13:
|
|
||||||
N(UnkNpcAIFunc3)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(func_802418AC_DB3B6C)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetNpcCollisionHeight.inc.c"
|
#include "world/common/GetNpcCollisionHeight.inc.c"
|
||||||
|
|
||||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_80242178_DB4438);
|
INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_80242178_DB4438);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80242178_DB4438)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_80243098_DB5358) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_80243098_DB5358)) {
|
|
||||||
N(D_80243098_DB5358) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_8024309C_DB535C));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_802421CC_DB448C);
|
INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_802421CC_DB448C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802421CC_DB448C)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_8024309C_DB535C) = evt_get_variable(script, *args);
|
|
||||||
N(D_80243098_DB5358) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_80242204_DB44C4);
|
INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_80242204_DB44C4);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80242204_DB44C4)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_802422A0_DB4560);
|
INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_802422A0_DB4560);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_80242328_DB45E8);
|
INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_80242328_DB45E8);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_802423C8_DB4688);
|
INCLUDE_ASM(s32, "world/area_omo/omo_05/DB22C0", func_802423C8_DB4688);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802423C8_DB4688)(Evt *script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
for (i = 0; i <= 90; i++) {
|
|
||||||
N(D_802457C0)[i] = 128 + i;
|
|
||||||
}
|
|
||||||
|
|
||||||
N(D_8024592C) = 0;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
@ -1,25 +1,6 @@
|
|||||||
#include "omo_06.h"
|
#include "omo_06.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_06/DB8180", func_80240870_DB8180);
|
INCLUDE_ASM(s32, "world/area_omo/omo_06/DB8180", func_80240870_DB8180);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240870_DB8180)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_802456C0_DBCFD0) == NULL) {
|
|
||||||
N(D_802456C0_DBCFD0) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_802456C0_DBCFD0)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_802456C0_DBCFD0)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_802456C0_DBCFD0));
|
|
||||||
N(D_802456C0_DBCFD0) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -36,91 +36,6 @@ INCLUDE_ASM(s32, "world/area_omo/omo_07/DBD2B0", func_80240238_DBD4E8);
|
|||||||
#include "world/common/UnkFunc16.inc.c"
|
#include "world/common/UnkFunc16.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_07/DBD2B0", func_80241100_DBE3B0);
|
INCLUDE_ASM(s32, "world/area_omo/omo_07/DBD2B0", func_80241100_DBE3B0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241100_DBE3B0)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* npcAISettings = (NpcAISettings*)evt_get_variable(script, *args++);
|
|
||||||
f32 posX, posY, posZ, posW;
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->patrol.detectShape;
|
|
||||||
territory.pointX = enemy->territory->patrol.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->patrol.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->patrol.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->patrol.detectSizeZ;
|
|
||||||
territory.unk_18 = 65.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall || enemy->unk_B0 & 4) {
|
|
||||||
script->functionTemp[0] = 0;
|
|
||||||
npc->duration = 0;
|
|
||||||
npc->currentAnim = enemy->animList[0];
|
|
||||||
npc->flags &= ~0x800;
|
|
||||||
if (!enemy->territory->patrol.isFlying) {
|
|
||||||
npc->flags = (npc->flags | 0x200) & ~8;
|
|
||||||
} else {
|
|
||||||
npc->flags = (npc->flags & ~0x200) | 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
script->functionTemp[0] = 99;
|
|
||||||
script->functionTemp[1] = 0;
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
} else if (enemy->flags & ENEMY_FLAGS_40000000) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
enemy->flags &= ~ENEMY_FLAGS_40000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
posX = npc->pos.x;
|
|
||||||
posY = npc->pos.y + npc->collisionHeight;
|
|
||||||
posZ = npc->pos.z;
|
|
||||||
posW = 100.0f;
|
|
||||||
|
|
||||||
if (npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW)) {
|
|
||||||
npc->pos.y = posY;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc24.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_802406C4_DBD974)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, npcAISettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_80240A2C_DBDCDC)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
#include "world/common/UnkNpcAIFunc25.inc.c"
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(NpcJumpFunc2)(script, npcAISettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(NpcJumpFunc)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc13)(script, npcAISettings, territoryPtr);
|
|
||||||
case 13:
|
|
||||||
N(func_80240EB8_DBE168)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(UnkNpcDurationFlagFunc)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 15:
|
|
||||||
N(func_80241040_DBE2F0)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 99:
|
|
||||||
func_8004A73C(script);
|
|
||||||
}
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_07/DBD2B0", func_802413FC_DBE6AC);
|
INCLUDE_ASM(s32, "world/area_omo/omo_07/DBD2B0", func_802413FC_DBE6AC);
|
||||||
|
|
||||||
@ -147,17 +62,6 @@ INCLUDE_ASM(s32, "world/area_omo/omo_07/DBD2B0", func_80241B28_DBEDD8);
|
|||||||
#include "world/common/UnkNpcAIFunc2.inc.c"
|
#include "world/common/UnkNpcAIFunc2.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_07/DBD2B0", func_802425CC_DBF87C);
|
INCLUDE_ASM(s32, "world/area_omo/omo_07/DBD2B0", func_802425CC_DBF87C);
|
||||||
/*
|
|
||||||
void N(func_802425CC_DBF87C)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
|
|
||||||
npc->pos.y += N(D_80243A14_DC0CC4)[npc->duration++];
|
|
||||||
if (npc->duration >= 5) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc14.inc.c"
|
#include "world/common/UnkNpcAIFunc14.inc.c"
|
||||||
|
|
||||||
@ -168,67 +72,6 @@ void N(func_802425CC_DBF87C)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
|||||||
#include "world/common/UnkFunc5.inc.c"
|
#include "world/common/UnkFunc5.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_07/DBD2B0", func_80242C84_DBFF34);
|
INCLUDE_ASM(s32, "world/area_omo/omo_07/DBD2B0", func_80242C84_DBFF34);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80242C84_DBFF34)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* aiSettings = evt_get_variable(script, *args);
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->wander.detectShape;
|
|
||||||
territory.pointX = enemy->territory->wander.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->wander.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->wander.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->wander.detectSizeZ;
|
|
||||||
territory.unk_18 = 120.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(func_80242B60_DBFE10)(npc, enemy, script, aiSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
npc->unk_AB = -2;
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
if (enemy->unk_B4 != 0) {
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc23.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_80241B28_DBEDD8)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
dup_UnkNpcAIFunc1(script, aiSettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_80242210_DBF4C0)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(UnkNpcAIFunc2)(script, aiSettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(func_802425CC_DBF87C)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc14)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 13:
|
|
||||||
N(UnkNpcAIFunc3)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(func_802427D0_DBFA80)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
static char* N(exit_str_2) = "omo_07";
|
static char* N(exit_str_2) = "omo_07";
|
||||||
|
|
||||||
|
@ -1,25 +1,6 @@
|
|||||||
#include "omo_07.h"
|
#include "omo_07.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_07/DC01D0", func_80242F20_DC01D0);
|
INCLUDE_ASM(s32, "world/area_omo/omo_07/DC01D0", func_80242F20_DC01D0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80242F20_DC01D0)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80245E00_DC30B0) == NULL) {
|
|
||||||
N(D_80245E00_DC30B0) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80245E00_DC30B0)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80245E00_DC30B0)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80245E00_DC30B0));
|
|
||||||
N(D_80245E00_DC30B0) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -1,25 +1,6 @@
|
|||||||
#include "omo_09.h"
|
#include "omo_09.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_09/DCD3F0", func_80240720_DCD3F0);
|
INCLUDE_ASM(s32, "world/area_omo/omo_09/DCD3F0", func_80240720_DCD3F0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240720_DCD3F0)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80247010_DD3CE0) == NULL) {
|
|
||||||
N(D_80247010_DD3CE0) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80247010_DD3CE0)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80247010_DD3CE0)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80247010_DD3CE0));
|
|
||||||
N(D_80247010_DD3CE0) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -33,91 +33,6 @@ INCLUDE_ASM(s32, "world/area_omo/omo_09/DCD6B0", func_80240C18_DCD8E8);
|
|||||||
#include "world/common/UnkFunc16.inc.c"
|
#include "world/common/UnkFunc16.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_09/DCD6B0", func_80241AE0_DCE7B0);
|
INCLUDE_ASM(s32, "world/area_omo/omo_09/DCD6B0", func_80241AE0_DCE7B0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241AE0_DCE7B0)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* npcAISettings = (NpcAISettings*)evt_get_variable(script, *args++);
|
|
||||||
f32 posX, posY, posZ, posW;
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->patrol.detectShape;
|
|
||||||
territory.pointX = enemy->territory->patrol.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->patrol.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->patrol.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->patrol.detectSizeZ;
|
|
||||||
territory.unk_18 = 65.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall || enemy->unk_B0 & 4) {
|
|
||||||
script->functionTemp[0] = 0;
|
|
||||||
npc->duration = 0;
|
|
||||||
npc->currentAnim = enemy->animList[0];
|
|
||||||
npc->flags &= ~0x800;
|
|
||||||
if (!enemy->territory->patrol.isFlying) {
|
|
||||||
npc->flags = (npc->flags | 0x200) & ~8;
|
|
||||||
} else {
|
|
||||||
npc->flags = (npc->flags & ~0x200) | 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
script->functionTemp[0] = 99;
|
|
||||||
script->functionTemp[1] = 0;
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
} else if (enemy->flags & ENEMY_FLAGS_40000000) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
enemy->flags &= ~ENEMY_FLAGS_40000000;
|
|
||||||
}
|
|
||||||
|
|
||||||
posX = npc->pos.x;
|
|
||||||
posY = npc->pos.y + npc->collisionHeight;
|
|
||||||
posZ = npc->pos.z;
|
|
||||||
posW = 100.0f;
|
|
||||||
|
|
||||||
if (npc_raycast_down_sides(npc->unk_80, &posX, &posY, &posZ, &posW)) {
|
|
||||||
npc->pos.y = posY;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc24.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_802410A4_DCDD74)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, npcAISettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_8024140C_DCE0DC)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
#include "world/common/UnkNpcAIFunc25.inc.c"
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(NpcJumpFunc2)(script, npcAISettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(NpcJumpFunc)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc13)(script, npcAISettings, territoryPtr);
|
|
||||||
case 13:
|
|
||||||
N(func_80241898_DCE568)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(UnkNpcDurationFlagFunc)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 15:
|
|
||||||
N(func_80241A20_DCE6F0)(script, npcAISettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 99:
|
|
||||||
func_8004A73C(script);
|
|
||||||
}
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_09/DCD6B0", func_80241DDC_DCEAAC);
|
INCLUDE_ASM(s32, "world/area_omo/omo_09/DCD6B0", func_80241DDC_DCEAAC);
|
||||||
|
|
||||||
|
@ -5,12 +5,6 @@
|
|||||||
#include "world/common/UnkFunc17.inc.c"
|
#include "world/common/UnkFunc17.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_11/DDCFC0", func_802407CC_DDCFFC);
|
INCLUDE_ASM(s32, "world/area_omo/omo_11/DDCFC0", func_802407CC_DDCFFC);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802407CC_DDCFFC)(Evt* script, s32 isInitialCall) {
|
|
||||||
switch_to_partner(evt_get_variable(script, *script->ptrReadPos));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkFunc18.inc.c"
|
#include "world/common/UnkFunc18.inc.c"
|
||||||
|
|
||||||
@ -29,134 +23,6 @@ INCLUDE_ASM(s32, "world/area_omo/omo_11/DDCFC0", func_8024095C_DDD18C);
|
|||||||
#include "world/common/UnkFunc22.inc.c"
|
#include "world/common/UnkFunc22.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_11/DDCFC0", func_80240D90_DDD5C0);
|
INCLUDE_ASM(s32, "world/area_omo/omo_11/DDCFC0", func_80240D90_DDD5C0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240D90_DDD5C0)(Evt *script, s32 isInitialCall) {
|
|
||||||
Bytecode *args = script->ptrReadPos;
|
|
||||||
Npc* npc = get_npc_safe(-4);
|
|
||||||
f32 sinTheta, cosTheta;
|
|
||||||
s32 i;
|
|
||||||
f32 var;
|
|
||||||
N(UserData)* userDataPtr;
|
|
||||||
N(UserData)* scriptPtr;
|
|
||||||
f32 save, save2;
|
|
||||||
|
|
||||||
sin_cos_deg(gCameras[gCurrentCameraID].currentYaw, &sinTheta, &cosTheta);
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
script->userData = (N(UserData)*)general_heap_malloc(0x68);
|
|
||||||
scriptPtr = (N(UserData)*)script->userData;
|
|
||||||
|
|
||||||
scriptPtr->unk_5C = get_entity_by_index(evt_get_variable(script, *args));
|
|
||||||
|
|
||||||
for (i = 0, userDataPtr = scriptPtr; i < 3; i++) {
|
|
||||||
userDataPtr->unk_08[i] = playFX_51(0, scriptPtr->unk_5C->position.x, scriptPtr->unk_5C->position.y + 12.5f, scriptPtr->unk_5C->position.z, 1.0f, -1);
|
|
||||||
save = 0.0f;
|
|
||||||
userDataPtr->unk_2C[i] = save;
|
|
||||||
userDataPtr->unk_20[i] = save;
|
|
||||||
userDataPtr->unk_14[i] = save;
|
|
||||||
userDataPtr->unk_50[i] = save;
|
|
||||||
userDataPtr->unk_44[i] = save;
|
|
||||||
userDataPtr->unk_38[i] = save;
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr->unk_00 = 0;
|
|
||||||
scriptPtr->unk_04 = 0;
|
|
||||||
scriptPtr->unk_60 = 0;
|
|
||||||
scriptPtr->unk_64 = 0;
|
|
||||||
|
|
||||||
userDataPtr = scriptPtr;
|
|
||||||
for (i = 0, save = 50.0f; i < 3; i++) {
|
|
||||||
var = 0;
|
|
||||||
add_vec2D_polar(&var, &scriptPtr->unk_44[i], save, N(D_80241E98_DDE6C8)[i]);
|
|
||||||
userDataPtr->unk_38[i] = cosTheta * var;
|
|
||||||
userDataPtr->unk_50[i] = sinTheta * var;
|
|
||||||
userDataPtr->unk_38[i] = npc->pos.x - (scriptPtr->unk_5C->position.x + userDataPtr->unk_38[i]);
|
|
||||||
userDataPtr->unk_44[i] = npc->pos.y - (scriptPtr->unk_5C->position.y + userDataPtr->unk_44[i]);
|
|
||||||
userDataPtr->unk_50[i] = npc->pos.z - (scriptPtr->unk_5C->position.z + userDataPtr->unk_50[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr = (N(UserData)*)script->userData;
|
|
||||||
switch (scriptPtr->unk_00) {
|
|
||||||
case 0:
|
|
||||||
save = update_lerp(5, 0.0f, 50.0f, scriptPtr->unk_60, 0x14);
|
|
||||||
save2 = 0.0f;
|
|
||||||
for (i = 0; i < 3; i++) {
|
|
||||||
scriptPtr->unk_20[i] = save2;
|
|
||||||
var = save2;
|
|
||||||
add_vec2D_polar(&var, &scriptPtr->unk_20[i], save, N(D_80241E98_DDE6C8)[i]);
|
|
||||||
scriptPtr->unk_14[i] = cosTheta * var;
|
|
||||||
scriptPtr->unk_2C[i] = sinTheta * var;
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr->unk_60++;
|
|
||||||
if (scriptPtr->unk_60 >= 0x15) {
|
|
||||||
scriptPtr->unk_00 = 1;
|
|
||||||
scriptPtr->unk_60 = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
save = 50.0f;
|
|
||||||
save2 = 0.0f;
|
|
||||||
for (i = 0; i < 3; i++) {
|
|
||||||
scriptPtr->unk_20[i] = save2;
|
|
||||||
var = save2;
|
|
||||||
add_vec2D_polar(&var, &scriptPtr->unk_20[i], save, N(D_80241E98_DDE6C8)[i]);
|
|
||||||
scriptPtr->unk_14[i] = cosTheta * var;
|
|
||||||
scriptPtr->unk_2C[i] = sinTheta * var;
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr->unk_60++;
|
|
||||||
if (scriptPtr->unk_60 >= 0x10) {
|
|
||||||
scriptPtr->unk_60 = 0xF;
|
|
||||||
scriptPtr->unk_00 = 2;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
scriptPtr->unk_60++;
|
|
||||||
if (scriptPtr->unk_60 >= 0x1F) {
|
|
||||||
for (i = 0, userDataPtr = scriptPtr; i < 3; i++) {
|
|
||||||
userDataPtr->unk_08[i]->flags |= 0x10;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (scriptPtr->unk_04) {
|
|
||||||
case 0:
|
|
||||||
scriptPtr->unk_64++;
|
|
||||||
if (scriptPtr->unk_64 >= 0x10) {
|
|
||||||
scriptPtr->unk_04 = 1;
|
|
||||||
scriptPtr->unk_64 = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
for (i = 0, userDataPtr = scriptPtr; i < 3; i++) {
|
|
||||||
userDataPtr->unk_14[i] = userDataPtr->unk_14[i] + update_lerp(1, 0.0f, userDataPtr->unk_38[i], scriptPtr->unk_64, 0x14);
|
|
||||||
userDataPtr->unk_20[i] = userDataPtr->unk_20[i] + update_lerp(1, 0.0f, userDataPtr->unk_44[i], scriptPtr->unk_64, 0x14);
|
|
||||||
userDataPtr->unk_2C[i] = userDataPtr->unk_2C[i] + update_lerp(1, 0.0f, userDataPtr->unk_50[i], scriptPtr->unk_64, 0x14);
|
|
||||||
}
|
|
||||||
|
|
||||||
scriptPtr->unk_64++;
|
|
||||||
if (scriptPtr->unk_64 >= 0x15) {
|
|
||||||
scriptPtr->unk_04 = 2;
|
|
||||||
scriptPtr->unk_64 = 0;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0, userDataPtr = scriptPtr; i < 3; i++) {
|
|
||||||
((EffectInstanceData*)userDataPtr->unk_08[i]->unk_0C)->rotation.x = userDataPtr->unk_14[i];
|
|
||||||
((EffectInstanceData*)userDataPtr->unk_08[i]->unk_0C)->rotation.y = userDataPtr->unk_20[i];
|
|
||||||
((EffectInstanceData*)userDataPtr->unk_08[i]->unk_0C)->rotation.z = userDataPtr->unk_2C[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkFunc23.inc.c"
|
#include "world/common/UnkFunc23.inc.c"
|
||||||
|
|
||||||
|
@ -21,55 +21,9 @@ INCLUDE_ASM(s32, "world/area_omo/omo_13/DE2710", func_80240A00_DE2E90);
|
|||||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_13/DE2710", func_80240F00_DE3390);
|
INCLUDE_ASM(s32, "world/area_omo/omo_13/DE2710", func_80240F00_DE3390);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240F00_DE3390)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_80241C04_DE4094) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_80241C04_DE4094)) {
|
|
||||||
N(D_80241C04_DE4094) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_80241C08_DE4098));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_13/DE2710", func_80240F54_DE33E4);
|
INCLUDE_ASM(s32, "world/area_omo/omo_13/DE2710", func_80240F54_DE33E4);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240F54_DE33E4)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_80241C08_DE4098) = evt_get_variable(script, *args);
|
|
||||||
N(D_80241C04_DE4094) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_13/DE2710", func_80240F8C_DE341C);
|
INCLUDE_ASM(s32, "world/area_omo/omo_13/DE2710", func_80240F8C_DE341C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240F8C_DE341C)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_13/DE2710", func_80241028_DE34B8);
|
INCLUDE_ASM(s32, "world/area_omo/omo_13/DE2710", func_80241028_DE34B8);
|
||||||
|
@ -1,25 +1,6 @@
|
|||||||
#include "omo_13.h"
|
#include "omo_13.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_13/DE36C0", func_80241230_DE36C0);
|
INCLUDE_ASM(s32, "world/area_omo/omo_13/DE36C0", func_80241230_DE36C0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241230_DE36C0)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80242C70_DE5100) == NULL) {
|
|
||||||
N(D_80242C70_DE5100) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80242C70_DE5100)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80242C70_DE5100)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80242C70_DE5100));
|
|
||||||
N(D_80242C70_DE5100) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -27,17 +27,6 @@ INCLUDE_ASM(s32, "world/area_omo/omo_17/DEF400", func_80241164_DF0004);
|
|||||||
#include "world/common/UnkNpcAIFunc2.inc.c"
|
#include "world/common/UnkNpcAIFunc2.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_17/DEF400", func_80241C08_DF0AA8);
|
INCLUDE_ASM(s32, "world/area_omo/omo_17/DEF400", func_80241C08_DF0AA8);
|
||||||
/*
|
|
||||||
void N(func_80241C08_DF0AA8)(Evt* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
|
|
||||||
npc->pos.y += N(D_80246184_DF5024)[npc->duration++];
|
|
||||||
if (npc->duration >= 5) {
|
|
||||||
script->functionTemp[0] = 12;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/UnkNpcAIFunc14.inc.c"
|
#include "world/common/UnkNpcAIFunc14.inc.c"
|
||||||
|
|
||||||
@ -48,67 +37,6 @@ void N(func_80241C08_DF0AA8)(Evt* script, NpcAISettings* aiSettings, EnemyTerrit
|
|||||||
#include "world/common/UnkFunc5.inc.c"
|
#include "world/common/UnkFunc5.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_17/DEF400", func_802422C0_DF1160);
|
INCLUDE_ASM(s32, "world/area_omo/omo_17/DEF400", func_802422C0_DF1160);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802422C0_DF1160)(Evt* script, s32 isInitialCall) {
|
|
||||||
Enemy* enemy = script->owner1.enemy;
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
|
||||||
EnemyTerritoryThing territory;
|
|
||||||
EnemyTerritoryThing* territoryPtr = &territory;
|
|
||||||
NpcAISettings* aiSettings = evt_get_variable(script, *args);
|
|
||||||
|
|
||||||
territory.unk_00 = 0;
|
|
||||||
territory.shape = enemy->territory->wander.detectShape;
|
|
||||||
territory.pointX = enemy->territory->wander.detect.x;
|
|
||||||
territory.pointZ = enemy->territory->wander.detect.z;
|
|
||||||
territory.sizeX = enemy->territory->wander.detectSizeX;
|
|
||||||
territory.sizeZ = enemy->territory->wander.detectSizeZ;
|
|
||||||
territory.unk_18 = 120.0f;
|
|
||||||
territory.unk_1C = 0;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(func_8024219C_DF103C)(npc, enemy, script, aiSettings);
|
|
||||||
}
|
|
||||||
|
|
||||||
npc->unk_AB = -2;
|
|
||||||
|
|
||||||
if (enemy->unk_B0 & 4) {
|
|
||||||
if (enemy->unk_B4 != 0) {
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
enemy->unk_B0 &= ~4;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
|
||||||
case 0:
|
|
||||||
#include "world/common/UnkNpcAIFunc23.inc.c"
|
|
||||||
case 1:
|
|
||||||
N(func_80241164_DF0004)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
N(UnkNpcAIFunc1)(script, aiSettings, territoryPtr);
|
|
||||||
case 3:
|
|
||||||
N(func_8024184C_DF06EC)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
N(UnkNpcAIFunc2)(script, aiSettings, territoryPtr);
|
|
||||||
case 11:
|
|
||||||
N(func_80241C08_DF0AA8)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
N(UnkNpcAIFunc14)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 13:
|
|
||||||
N(UnkNpcAIFunc3)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
N(func_80241E0C_DF0CAC)(script, aiSettings, territoryPtr);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_17/DEF400", func_802424AC_DF134C);
|
INCLUDE_ASM(s32, "world/area_omo/omo_17/DEF400", func_802424AC_DF134C);
|
||||||
|
|
||||||
|
@ -1,25 +1,6 @@
|
|||||||
#include "osr_01.h"
|
#include "osr_01.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_osr/osr_01/AB0350", func_80240360_AB0350);
|
INCLUDE_ASM(s32, "world/area_osr/osr_01/AB0350", func_80240360_AB0350);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240360_AB0350)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_802411B8_AB11A8) == NULL) {
|
|
||||||
N(D_802411B8_AB11A8) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_802411B8_AB11A8)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_802411B8_AB11A8)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_802411B8_AB11A8));
|
|
||||||
N(D_802411B8_AB11A8) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
@ -28,76 +9,15 @@ ApiStatus N(func_80240360_AB0350)(Evt* script, s32 isInitialCall) {
|
|||||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_osr/osr_01/AB0350", func_802406A4_AB0694);
|
INCLUDE_ASM(s32, "world/area_osr/osr_01/AB0350", func_802406A4_AB0694);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802406A4_AB0694)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_8024121C_AB120C) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_8024121C_AB120C)) {
|
|
||||||
N(D_8024121C_AB120C) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_80241220_AB1210));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_osr/osr_01/AB0350", func_802406F8_AB06E8);
|
INCLUDE_ASM(s32, "world/area_osr/osr_01/AB0350", func_802406F8_AB06E8);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802406F8_AB06E8)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_80241220_AB1210) = evt_get_variable(script, *args);
|
|
||||||
N(D_8024121C_AB120C) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_osr/osr_01/AB0350", func_80240730_AB0720);
|
INCLUDE_ASM(s32, "world/area_osr/osr_01/AB0350", func_80240730_AB0720);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240730_AB0720)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/SetManyVars.inc.c"
|
#include "world/common/SetManyVars.inc.c"
|
||||||
|
|
||||||
#include "world/common/UnkYawFunc.inc.c"
|
#include "world/common/UnkYawFunc.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_osr/osr_01/AB0350", func_80240A48_AB0A38);
|
INCLUDE_ASM(s32, "world/area_osr/osr_01/AB0350", func_80240A48_AB0A38);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240A48_AB0A38)(Evt *script, s32 isInitialCall) {
|
|
||||||
Npc *npc = get_npc_unsafe(script->varTable[2]);
|
|
||||||
|
|
||||||
D_8024E1B4 = npc->currentAnim;
|
|
||||||
npc->currentAnim = script->varTable[4];
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_osr/osr_01/AB0350", func_80240A8C_AB0A7C);
|
INCLUDE_ASM(s32, "world/area_osr/osr_01/AB0350", func_80240A8C_AB0A7C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240A8C_AB0A7C)(Evt *script, s32 isInitialCall) {
|
|
||||||
get_npc_unsafe(script->varTable[2])->currentAnim = D_8024E1B4;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
@ -14,78 +14,12 @@ ApiStatus func_80240F60_D4DFA0(Evt* script, s32 isInitialCall) {
|
|||||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_01/D4D060", func_802411AC_D4E1EC);
|
INCLUDE_ASM(s32, "world/area_pra/pra_01/D4D060", func_802411AC_D4E1EC);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802411AC_D4E1EC)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_80241F94_D4EFD4) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_80241F94_D4EFD4)) {
|
|
||||||
N(D_80241F94_D4EFD4) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_80241F98_D4EFD8));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_01/D4D060", func_80241200_D4E240);
|
INCLUDE_ASM(s32, "world/area_pra/pra_01/D4D060", func_80241200_D4E240);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241200_D4E240)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_80241F98_D4EFD8) = evt_get_variable(script, *args);
|
|
||||||
N(D_80241F94_D4EFD4) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_01/D4D060", func_80241238_D4E278);
|
INCLUDE_ASM(s32, "world/area_pra/pra_01/D4D060", func_80241238_D4E278);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241238_D4E278)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_01/D4D060", func_802412D4_D4E314);
|
INCLUDE_ASM(s32, "world/area_pra/pra_01/D4D060", func_802412D4_D4E314);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802412D4_D4E314)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
ApiStatus PostChapter7StatUpdate(Evt* script, s32 isInitialCall) {
|
ApiStatus PostChapter7StatUpdate(Evt* script, s32 isInitialCall) {
|
||||||
PlayerData* playerData = &gPlayerData;
|
PlayerData* playerData = &gPlayerData;
|
||||||
|
@ -7,78 +7,12 @@
|
|||||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_02/D50010", func_8024114C_D5113C);
|
INCLUDE_ASM(s32, "world/area_pra/pra_02/D50010", func_8024114C_D5113C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_8024114C_D5113C)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_80242ACC_D52ABC) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_80242ACC_D52ABC)) {
|
|
||||||
N(D_80242ACC_D52ABC) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_80242AD0_D52AC0));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_02/D50010", func_802411A0_D51190);
|
INCLUDE_ASM(s32, "world/area_pra/pra_02/D50010", func_802411A0_D51190);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802411A0_D51190)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_80242AD0_D52AC0) = evt_get_variable(script, *args);
|
|
||||||
N(D_80242ACC_D52ABC) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_02/D50010", func_802411D8_D511C8);
|
INCLUDE_ASM(s32, "world/area_pra/pra_02/D50010", func_802411D8_D511C8);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802411D8_D511C8)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_02/D50010", func_80241274_D51264);
|
INCLUDE_ASM(s32, "world/area_pra/pra_02/D50010", func_80241274_D51264);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241274_D51264)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/SetEntityPositionF.inc.c"
|
#include "world/common/SetEntityPositionF.inc.c"
|
||||||
|
|
||||||
|
@ -3,25 +3,6 @@
|
|||||||
#include "world/common/reflection.inc.c"
|
#include "world/common/reflection.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_05/D55BD0", func_80240F20_D56AD0);
|
INCLUDE_ASM(s32, "world/area_pra/pra_05/D55BD0", func_80240F20_D56AD0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240F20_D56AD0)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80241680_D57230) == NULL) {
|
|
||||||
N(D_80241680_D57230) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80241680_D57230)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80241680_D57230)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80241680_D57230));
|
|
||||||
N(D_80241680_D57230) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -7,78 +7,12 @@
|
|||||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_09/D588B0", func_8024114C_D599DC);
|
INCLUDE_ASM(s32, "world/area_pra/pra_09/D588B0", func_8024114C_D599DC);
|
||||||
/*
|
|
||||||
ApiStatus N(func_8024114C_D599DC)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_80241D98_D5A628) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_80241D98_D5A628)) {
|
|
||||||
N(D_80241D98_D5A628) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_80241D9C_D5A62C));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_09/D588B0", func_802411A0_D59A30);
|
INCLUDE_ASM(s32, "world/area_pra/pra_09/D588B0", func_802411A0_D59A30);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802411A0_D59A30)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_80241D9C_D5A62C) = evt_get_variable(script, *args);
|
|
||||||
N(D_80241D98_D5A628) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_09/D588B0", func_802411D8_D59A68);
|
INCLUDE_ASM(s32, "world/area_pra/pra_09/D588B0", func_802411D8_D59A68);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802411D8_D59A68)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_09/D588B0", func_80241274_D59B04);
|
INCLUDE_ASM(s32, "world/area_pra/pra_09/D588B0", func_80241274_D59B04);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241274_D59B04)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_09/D588B0", func_80241310_D59BA0);
|
INCLUDE_ASM(s32, "world/area_pra/pra_09/D588B0", func_80241310_D59BA0);
|
||||||
|
|
||||||
|
@ -3,25 +3,6 @@
|
|||||||
#include "world/common/reflection.inc.c"
|
#include "world/common/reflection.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_11/D61520", func_80240F20_D62420);
|
INCLUDE_ASM(s32, "world/area_pra/pra_11/D61520", func_80240F20_D62420);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240F20_D62420)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80241610_D62B10) == NULL) {
|
|
||||||
N(D_80241610_D62B10) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80241610_D62B10)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80241610_D62B10)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80241610_D62B10));
|
|
||||||
N(D_80241610_D62B10) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -5,25 +5,6 @@ INCLUDE_ASM(s32, "world/area_pra/pra_12/D62D10", func_80240000_D62D10);
|
|||||||
#include "world/common/reflection.inc.c"
|
#include "world/common/reflection.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_12/D62D10", func_80240F50_D63C60);
|
INCLUDE_ASM(s32, "world/area_pra/pra_12/D62D10", func_80240F50_D63C60);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240F50_D63C60)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_802416B0_D643C0) == NULL) {
|
|
||||||
N(D_802416B0_D643C0) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_802416B0_D643C0)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_802416B0_D643C0)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_802416B0_D643C0));
|
|
||||||
N(D_802416B0_D643C0) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -7,88 +7,16 @@
|
|||||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_13/D64600", func_8024114C_D6572C);
|
INCLUDE_ASM(s32, "world/area_pra/pra_13/D64600", func_8024114C_D6572C);
|
||||||
/*
|
|
||||||
ApiStatus N(func_8024114C_D6572C)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_802422CC_D668AC) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_802422CC_D668AC)) {
|
|
||||||
N(D_802422CC_D668AC) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_802422D0_D668B0));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_13/D64600", func_802411A0_D65780);
|
INCLUDE_ASM(s32, "world/area_pra/pra_13/D64600", func_802411A0_D65780);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802411A0_D65780)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_802422D0_D668B0) = evt_get_variable(script, *args);
|
|
||||||
N(D_802422CC_D668AC) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_13/D64600", func_802411D8_D657B8);
|
INCLUDE_ASM(s32, "world/area_pra/pra_13/D64600", func_802411D8_D657B8);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802411D8_D657B8)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_13/D64600", func_80241274_D65854);
|
INCLUDE_ASM(s32, "world/area_pra/pra_13/D64600", func_80241274_D65854);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241274_D65854)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_13/D64600", func_80241310_D658F0);
|
INCLUDE_ASM(s32, "world/area_pra/pra_13/D64600", func_80241310_D658F0);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_13/D64600", func_802413A4_D65984);
|
INCLUDE_ASM(s32, "world/area_pra/pra_13/D64600", func_802413A4_D65984);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802413A4_D65984)(Evt* script, s32 isInitialCall) {
|
|
||||||
switch_to_partner(evt_get_variable(script, *script->ptrReadPos));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_13/D64600", func_802413D0_D659B0);
|
INCLUDE_ASM(s32, "world/area_pra/pra_13/D64600", func_802413D0_D659B0);
|
||||||
|
|
||||||
|
@ -3,25 +3,6 @@
|
|||||||
#include "world/common/reflection.inc.c"
|
#include "world/common/reflection.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_14/D67D20", func_80240F20_D68C20);
|
INCLUDE_ASM(s32, "world/area_pra/pra_14/D67D20", func_80240F20_D68C20);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240F20_D68C20)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80241930_D69630) == NULL) {
|
|
||||||
N(D_80241930_D69630) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80241930_D69630)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80241930_D69630)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80241930_D69630));
|
|
||||||
N(D_80241930_D69630) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -7,78 +7,12 @@
|
|||||||
#include "world/common/AddPlayerHandsOffset.inc.c"
|
#include "world/common/AddPlayerHandsOffset.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_19/D6E9D0", func_8024114C_D6FAFC);
|
INCLUDE_ASM(s32, "world/area_pra/pra_19/D6E9D0", func_8024114C_D6FAFC);
|
||||||
/*
|
|
||||||
ApiStatus N(func_8024114C_D6FAFC)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
if (isInitialCall) {
|
|
||||||
N(D_8024219C_D70B4C) = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (N(D_8024219C_D70B4C)) {
|
|
||||||
N(D_8024219C_D70B4C) = FALSE;
|
|
||||||
evt_set_variable(script, *args, N(D_802421A0_D70B50));
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_19/D6E9D0", func_802411A0_D6FB50);
|
INCLUDE_ASM(s32, "world/area_pra/pra_19/D6E9D0", func_802411A0_D6FB50);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802411A0_D6FB50)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
|
|
||||||
N(D_802421A0_D70B50) = evt_get_variable(script, *args);
|
|
||||||
N(D_8024219C_D70B4C) = TRUE;
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_19/D6E9D0", func_802411D8_D6FB88);
|
INCLUDE_ASM(s32, "world/area_pra/pra_19/D6E9D0", func_802411D8_D6FB88);
|
||||||
/*
|
|
||||||
ApiStatus N(func_802411D8_D6FB88)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_19/D6E9D0", func_80241274_D6FC24);
|
INCLUDE_ASM(s32, "world/area_pra/pra_19/D6E9D0", func_80241274_D6FC24);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80241274_D6FC24)(Evt* script, s32 isInitialCall) {
|
|
||||||
Bytecode* args = script->ptrReadPos;
|
|
||||||
s32* ptr = evt_get_variable(script, *args);
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (ptr != NULL) {
|
|
||||||
for (i = 0; ptr[i] != 0; i++) {
|
|
||||||
N(D_80244A20)[i] = ptr[i];
|
|
||||||
}
|
|
||||||
N(D_80244A20)[i] = 0;
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 0x70; i++) {
|
|
||||||
N(D_80244A20)[i] = i + 16;
|
|
||||||
N(D_80244A20)[112] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_19/D6E9D0", func_80241310_D6FCC0);
|
INCLUDE_ASM(s32, "world/area_pra/pra_19/D6E9D0", func_80241310_D6FCC0);
|
||||||
|
|
||||||
|
@ -5,25 +5,6 @@ INCLUDE_ASM(s32, "world/area_pra/pra_27/D799F0", func_80240000_D799F0);
|
|||||||
#include "world/common/reflection.inc.c"
|
#include "world/common/reflection.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_27/D799F0", func_80240F50_D7A940);
|
INCLUDE_ASM(s32, "world/area_pra/pra_27/D799F0", func_80240F50_D7A940);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240F50_D7A940)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80241690_D7B080) == NULL) {
|
|
||||||
N(D_80241690_D7B080) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80241690_D7B080)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80241690_D7B080)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80241690_D7B080));
|
|
||||||
N(D_80241690_D7B080) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
@ -5,25 +5,6 @@ INCLUDE_ASM(s32, "world/area_pra/pra_28/D7B2A0", func_80240000_D7B2A0);
|
|||||||
#include "world/common/reflection.inc.c"
|
#include "world/common/reflection.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_pra/pra_28/D7B2A0", func_80240F50_D7C1F0);
|
INCLUDE_ASM(s32, "world/area_pra/pra_28/D7B2A0", func_80240F50_D7C1F0);
|
||||||
/*
|
|
||||||
ApiStatus N(func_80240F50_D7C1F0)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
|
|
||||||
if (N(D_80241690_D7C930) == NULL) {
|
|
||||||
N(D_80241690_D7C930) = heap_malloc(16 * sizeof(s32));
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
N(D_80241690_D7C930)[i] = script->varTable[i];
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
for (i = 0; i < 16; i++) {
|
|
||||||
script->varTable[i] = N(D_80241690_D7C930)[i];
|
|
||||||
}
|
|
||||||
heap_free(N(D_80241690_D7C930));
|
|
||||||
N(D_80241690_D7C930) = NULL;
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "world/common/GetItemName.inc.c"
|
#include "world/common/GetItemName.inc.c"
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user