mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 00:42:34 +01:00
Fix many compiler & linker warnings (#281)
* fix ld warnings * fix NpcSettings warn * get_screen_coords * various * bloop * update INSTALL.md for versioned baseroms
This commit is contained in:
parent
df646f1d30
commit
683d0857ff
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -6,10 +6,11 @@
|
||||
"-std=gnu89",
|
||||
"-Iinclude",
|
||||
"-Iinclude/PR",
|
||||
"-Ibuild/include",
|
||||
"-Iver/current/build/include",
|
||||
"-Isrc",
|
||||
"-D_LANGUAGE_C",
|
||||
"-DSCRIPT(...)={}",
|
||||
"-Wall"
|
||||
],
|
||||
"clang-tidy.blacklist": [
|
||||
"include/PR",
|
||||
|
@ -23,7 +23,12 @@ Install build dependencies:
|
||||
./install.sh
|
||||
```
|
||||
|
||||
Copy an unmodified Paper Mario (USA) ROM (sha1: `3837f44cda784b466c9a2d99df70d77c322b97a0`) into the root directory of the repository with the name `baserom.z64`. If you're using WSL, you can enter the Linux filesystem by opening `\\wsl$` in File Explorer; e.g. `\\wsl$\Ubuntu\home\<your username>\papermario`.
|
||||
Copy baseroms into the following places (at least 1 is required):
|
||||
|
||||
* `ver/us/baserom.z64` (sha1: `3837f44cda784b466c9a2d99df70d77c322b97a0`)
|
||||
* `ver/jp/baserom.z64` (sha1: `b9cca3ff260b9ff427d981626b82f96de73586d3`)
|
||||
|
||||
(If you're using WSL, you can enter the Linux filesystem by opening `\\wsl$` in File Explorer; e.g. `\\wsl$\Ubuntu\home\<your username>\papermario`.)
|
||||
|
||||
Configure the build and extract assets from the base ROM:
|
||||
```sh
|
||||
|
@ -11,6 +11,8 @@ struct ScriptInstance;
|
||||
|
||||
typedef ApiStatus(*ApiFunc)(struct ScriptInstance*, s32);
|
||||
|
||||
typedef Bytecode Script[0];
|
||||
|
||||
typedef struct {
|
||||
u8 r, g, b, a;
|
||||
} Color_RGBA8;
|
||||
@ -244,7 +246,7 @@ typedef struct Trigger {
|
||||
/* 0x04 */ s32 params1;
|
||||
/* 0x08 */ s32 params2;
|
||||
/* 0x0C */ UNK_FUN_PTR(functionHandler);
|
||||
/* 0x10 */ Bytecode* scriptStart;
|
||||
/* 0x10 */ Script* scriptSource;
|
||||
/* 0x14 */ struct ScriptInstance* runningScript;
|
||||
/* 0x18 */ s32 priority;
|
||||
/* 0x1C */ s32 scriptVars[3];
|
||||
@ -1416,10 +1418,10 @@ typedef struct Actor {
|
||||
/* 0x1BA */ char unk_1BA[2];
|
||||
/* 0x1BC */ u8 hpFraction; /* used to render HP bar */
|
||||
/* 0x1BD */ char unk_1BD[3];
|
||||
/* 0x1C0 */ Bytecode* idleCode;
|
||||
/* 0x1C4 */ Bytecode* takeTurnCode;
|
||||
/* 0x1C8 */ Bytecode* onHitCode;
|
||||
/* 0x1CC */ Bytecode* onTurnChangeCode;
|
||||
/* 0x1C0 */ Script* idleScriptSource;
|
||||
/* 0x1C4 */ Script* takeTurnScriptSource;
|
||||
/* 0x1C8 */ Script* onHitScriptSource;
|
||||
/* 0x1CC */ Script* onTurnChanceScriptSource;
|
||||
/* 0x1D0 */ struct ScriptInstance* idleScript;
|
||||
/* 0x1D4 */ struct ScriptInstance* takeTurnScript;
|
||||
/* 0x1D8 */ struct ScriptInstance* onHitScript;
|
||||
@ -1878,7 +1880,7 @@ typedef struct EntityModel {
|
||||
/* 0x10 */ s32* cmdListReadPos;
|
||||
/* 0x14 */ Gfx* displayList;
|
||||
/* 0x18 */ Matrix4s transform;
|
||||
/* 0x58 */ s32 cmdListSavedPos;
|
||||
/* 0x58 */ s32* cmdListSavedPos;
|
||||
/* 0x5C */ Vtx* vertexArray;
|
||||
/* 0x60 */ UNK_FUN_PTR(fpSetupGfxCallback);
|
||||
/* 0x64 */ s32 setupGfxCallbackArg0;
|
||||
|
@ -20,9 +20,9 @@ void osCleanupThread(void);
|
||||
void func_80070A90(s32, f32, f32, f32);
|
||||
void func_80070AF0(s32, f32, f32, f32);
|
||||
|
||||
s32 heap_malloc(s32 size);
|
||||
void* heap_malloc(s32 size);
|
||||
HeapNode* _heap_create(s32* addr, u32 size);
|
||||
s32 dma_copy(s32 romStart, s32 romEnd, void* vramDest);
|
||||
s32 dma_copy(Addr romStart, Addr romEnd, void* vramDest);
|
||||
|
||||
s32 get_global_byte(s32 index);
|
||||
s32 get_global_flag(s32 index);
|
||||
@ -83,8 +83,7 @@ void func_800706D0(s32, f32, f32, f32);
|
||||
// Text
|
||||
PrintContext* load_string(s32 stringID, s32* a1);
|
||||
|
||||
// TODO: out types are s32 not f32
|
||||
void get_screen_coords(Cam camID, f32 x, f32 y, f32 z, f32* outX, f32* outY, f32* outZ);
|
||||
void get_screen_coords(Cam camID, f32 x, f32 y, f32 z, s32* screenX, s32* screenY, s32* screenZ);
|
||||
|
||||
void parent_collider_to_model(s32 colliderID, s16 modelIndex);
|
||||
void clone_model(u16 srcModelID, u16 newModelID);
|
||||
@ -194,8 +193,8 @@ void set_background_color_blend(u8 r, u8 g, u8 b, u8 a);
|
||||
void set_partner_tether_distance(f32);
|
||||
s32 does_script_exist(s32 id);
|
||||
s32 does_script_exist_by_ref(ScriptInstance* script);
|
||||
ScriptInstance* start_script(Bytecode* initialLine, s32 priority, s32 initialState);
|
||||
ScriptInstance* start_script_in_group(Bytecode* initialLine, u8 priority, u8 initialState, u8 groupFlags);
|
||||
ScriptInstance* start_script(Script* source, s32 priority, s32 initialState);
|
||||
ScriptInstance* start_script_in_group(Script* source, u8 priority, u8 initialState, u8 groupFlags);
|
||||
|
||||
void set_animation_rate(ActorID actorID, s32 partIndex, f32 rate);
|
||||
void func_8011B7C0(u16, s32, s32);
|
||||
@ -220,7 +219,7 @@ s32 make_item_entity_nodelay(s32 itemID, f32 x, f32 y, f32 z, ItemSpawnMode item
|
||||
void set_item_entity_flags(s32 itemEntityIndex, s32 flag);
|
||||
|
||||
s32 create_dynamic_entity_frontUI(void (*updateFunc)(void), void (*drawFunc)(void));
|
||||
s32 get_dynamic_entity(s32 arg0);
|
||||
DynamicEntity* get_dynamic_entity(s32 idx);
|
||||
|
||||
void set_cam_viewport(s16 id, s16 x, s16 y, s16 width, s16 height);
|
||||
|
||||
|
@ -182,7 +182,7 @@ typedef struct StaticNpc {
|
||||
/* 0x004 */ NpcSettings* settings;
|
||||
/* 0x008 */ Vec3f pos;
|
||||
/* 0x014 */ s32 flags;
|
||||
/* 0x018 */ Bytecode* init;
|
||||
/* 0x018 */ Script* init;
|
||||
/* 0x01C */ char unk_1C[8];
|
||||
/* 0x024 */ s32 yaw;
|
||||
/* 0x028 */ s8 dropFlags;
|
||||
@ -253,12 +253,12 @@ typedef struct Enemy {
|
||||
/* 0x10 */ Vec3s unk_10;
|
||||
/* 0x16 */ char unk_16[2];
|
||||
/* 0x18 */ struct NpcSettings* npcSettings;
|
||||
/* 0x1C */ Bytecode* initBytecode;
|
||||
/* 0x20 */ Bytecode* interactBytecode;
|
||||
/* 0x24 */ Bytecode* aiBytecode;
|
||||
/* 0x28 */ Bytecode* hitBytecode;
|
||||
/* 0x2C */ Bytecode* auxBytecode;
|
||||
/* 0x30 */ Bytecode* defeatBytecode;
|
||||
/* 0x1C */ Script* initBytecode;
|
||||
/* 0x20 */ Script* interactBytecode;
|
||||
/* 0x24 */ Script* aiBytecode;
|
||||
/* 0x28 */ Script* hitBytecode;
|
||||
/* 0x2C */ Script* auxBytecode;
|
||||
/* 0x30 */ Script* defeatBytecode;
|
||||
/* 0x34 */ struct ScriptInstance* initScript;
|
||||
/* 0x38 */ struct ScriptInstance* interactScript;
|
||||
/* 0x3C */ struct ScriptInstance* aiScript;
|
||||
@ -296,7 +296,7 @@ typedef struct {
|
||||
/* 0x08 */ BattleID battle;
|
||||
} NpcGroupList[]; // size = 0x0C
|
||||
|
||||
#define NPC_GROUP(npcs, battle) { sizeof(npcs) / sizeof(StaticNpc), &npcs, battle }
|
||||
#define NPC_GROUP(npcs, battle) { sizeof(npcs) / sizeof(StaticNpc), (StaticNpc*) &npcs, battle }
|
||||
|
||||
Enemy* get_enemy(NpcID npcId);
|
||||
MapConfig* get_current_map_header(void);
|
||||
@ -304,7 +304,7 @@ MapConfig* get_current_map_header(void);
|
||||
s32 func_800490B4(EnemyTerritoryThing* arg0, Enemy* arg1, f32 arg2, f32 arg3, s32 arg4);
|
||||
|
||||
/// Zero-terminated.
|
||||
Area gAreas[29];
|
||||
extern Area gAreas[29];
|
||||
|
||||
/// Lists the songs that are forced to use the variation determined by `map.songVariation & 1`.
|
||||
/// @see bgm_get_map_default_variation
|
||||
|
@ -4,8 +4,6 @@
|
||||
#include "common_structs.h"
|
||||
#include "si.h"
|
||||
|
||||
typedef Bytecode Script[0];
|
||||
|
||||
ApiStatus FadeBackgroundToBlack(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus UnfadeBackgroundFromBlack(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus GetCamLookAtObjVector(ScriptInstance* script, s32 isInitialCall);
|
||||
@ -270,7 +268,6 @@ ApiStatus IsStartingConversation(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus func_802D5830(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus func_802D3474(ScriptInstance* script, s32 isInitialCall);
|
||||
|
||||
ApiStatus func_802D3474(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus func_802D3624(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus func_802D36E0(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus func_802D38EC(ScriptInstance* script, s32 isInitialCall);
|
||||
|
@ -157,7 +157,7 @@ extern s32 D_802A3838;
|
||||
extern s32 gPauseMenuHeldButtons;
|
||||
extern s32 gPauseMenuPressedButtons;
|
||||
extern s32 gPauseMenuCurrentDescString;
|
||||
extern Bytecode* gPauseMenuCurrentDescIconScript;
|
||||
extern s32* gPauseMenuCurrentDescIconScript;
|
||||
extern s8 gPauseMenuCurrentTab;
|
||||
extern s32 gPauseMenuCommonIconIDs[8];
|
||||
extern s32 gPauseMenuTabIconIDs[6];
|
||||
@ -309,7 +309,7 @@ extern UNK_TYPE D_0A000800;
|
||||
extern UNK_TYPE D_0A000808;
|
||||
|
||||
// Scripts
|
||||
extern Bytecode* SCRIPT_NpcDefeat;
|
||||
extern Script* SCRIPT_NpcDefeat;
|
||||
extern Script ShakeCam1;
|
||||
extern Script ShakeCamX;
|
||||
|
||||
|
@ -138,7 +138,7 @@ void func_802E8D74(Entity* entity) {
|
||||
}
|
||||
|
||||
void func_802E8E10(Entity* entity) {
|
||||
Bytecode* triggerScriptStart = ((Trigger*)entity->dataBuf)->scriptStart;
|
||||
Bytecode* triggerScriptStart = ((Trigger*)entity->dataBuf)->scriptSource;
|
||||
|
||||
gOverrideFlags &= ~0x40;
|
||||
entity->boundScript = triggerScriptStart;
|
||||
|
@ -7,11 +7,11 @@ void gfxRetrace_Callback(s32);
|
||||
void gfxPreNMI_Callback(void);
|
||||
void gfx_task_main(void);
|
||||
|
||||
extern s32* D_80073E00;
|
||||
extern s32 D_80073E04;
|
||||
extern s32 D_80073E00;
|
||||
extern u16* D_80073E04;
|
||||
extern s16 D_80073E08;
|
||||
extern s16 D_80073E0A;
|
||||
extern s32* D_8009A680;
|
||||
extern u16* D_8009A680;
|
||||
extern OSViMode _osViModeNtscLan1;
|
||||
extern OSViMode _osViModeMPalLan1;
|
||||
|
||||
@ -35,7 +35,7 @@ void boot_main(void) {
|
||||
func_8002D160();
|
||||
func_802B2000();
|
||||
func_802B203C();
|
||||
nuGfxFuncSet(gfxRetrace_Callback);
|
||||
nuGfxFuncSet((NUGfxFunc) gfxRetrace_Callback);
|
||||
nuGfxPreNMIFuncSet(gfxPreNMI_Callback);
|
||||
{
|
||||
// Required to match
|
||||
@ -54,8 +54,8 @@ void gfxRetrace_Callback(s32 arg0) {
|
||||
if (*temp_80073E00 == 1) {
|
||||
nuGfxTaskAllEndWait();
|
||||
if (arg0 == 0) {
|
||||
void* fb = osViGetCurrentFramebuffer();
|
||||
s32* temp_8009A680 = &D_8009A680;
|
||||
u16* fb = (u16*) osViGetCurrentFramebuffer();
|
||||
u16** temp_8009A680 = &D_8009A680;
|
||||
|
||||
temp_8009A680[2] = fb;
|
||||
temp_8009A680[1] = fb;
|
||||
|
@ -8,7 +8,7 @@ extern s32 gSpeakingActorIdleAnim;
|
||||
extern Actor* gSpeakingActor;
|
||||
extern ActorPart* gSpeakingActorPart;
|
||||
|
||||
void clamp_printer_coords(PrintContext* printer, f32 x, f32 y);
|
||||
void clamp_printer_coords(PrintContext* printer, s32 x, s32 y);
|
||||
|
||||
ApiStatus ActorSpeak(ScriptInstance* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
@ -21,7 +21,7 @@ ApiStatus ActorSpeak(ScriptInstance* script, s32 isInitialCall) {
|
||||
s32 anim;
|
||||
|
||||
f32 headX, headY, headZ;
|
||||
f32 screenX, screenY, screenZ;
|
||||
s32 screenX, screenY, screenZ;
|
||||
s32 stringID2;
|
||||
|
||||
if (isInitialCall) {
|
||||
|
40
src/1A5830.c
40
src/1A5830.c
@ -39,11 +39,11 @@ void dispatch_event_actor(Actor* actor, Event event) {
|
||||
ScriptInstance* onHitScript = actor->onHitScript;
|
||||
ScriptID onHitID = actor->onHitID;
|
||||
|
||||
if (actor->onHitCode != NULL) {
|
||||
if (actor->onHitScriptSource != NULL) {
|
||||
ScriptInstance* newScript;
|
||||
|
||||
actor->lastEventType = event;
|
||||
newScript = start_script(actor->onHitCode, 0xA, 0x20);
|
||||
newScript = start_script(actor->onHitScriptSource, 0xA, 0x20);
|
||||
actor->onHitScript = newScript;
|
||||
actor->onHitID = newScript->id;
|
||||
newScript->owner1.actorID = actor->actorID;
|
||||
@ -77,14 +77,14 @@ s32 dispatch_damage_event_actor_1(Actor* actor, s32 damageAmount, s32 event) {
|
||||
ApiStatus BindTakeTurn(ScriptInstance* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
ActorID actorID = get_variable(script, *args++);
|
||||
s32 var1;
|
||||
Script* takeTurnScript;
|
||||
|
||||
if (actorID == ACTOR_SELF) {
|
||||
actorID = script->owner1.actorID;
|
||||
}
|
||||
|
||||
var1 = get_variable(script, *args++);
|
||||
get_actor(actorID)->takeTurnCode = var1;
|
||||
takeTurnScript = (Script*) get_variable(script, *args++);
|
||||
get_actor(actorID)->takeTurnScriptSource = takeTurnScript;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ ApiStatus ResumeTakeTurn(ScriptInstance* script, s32 isInitialCall) {
|
||||
ApiStatus BindIdle(ScriptInstance* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
ActorID actorID = get_variable(script, *args++);
|
||||
Bytecode* idleCode;
|
||||
Script* idleCode;
|
||||
Actor* actor;
|
||||
ScriptInstance* newScriptContext;
|
||||
|
||||
@ -125,7 +125,7 @@ ApiStatus BindIdle(ScriptInstance* script, s32 isInitialCall) {
|
||||
actorID = script->owner1.actorID;
|
||||
}
|
||||
|
||||
idleCode = get_variable(script, *args++);
|
||||
idleCode = (Script*) get_variable(script, *args++);
|
||||
actor = get_actor(actorID);
|
||||
|
||||
if (actor->idleScript != 0) {
|
||||
@ -133,7 +133,7 @@ ApiStatus BindIdle(ScriptInstance* script, s32 isInitialCall) {
|
||||
actor->idleScript = 0;
|
||||
}
|
||||
|
||||
actor->idleCode = idleCode;
|
||||
actor->idleScriptSource = idleCode;
|
||||
newScriptContext = start_script(idleCode, 10, 0);
|
||||
actor->idleScript = newScriptContext;
|
||||
actor->idleScriptID = newScriptContext->id;
|
||||
@ -175,28 +175,28 @@ ApiStatus EnableIdleScript(ScriptInstance* script, s32 isInitialCall) {
|
||||
ApiStatus BindHandleEvent(ScriptInstance* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
ActorID actorID = get_variable(script, *args++);
|
||||
s32 var1;
|
||||
Script* var1;
|
||||
|
||||
if (actorID == ACTOR_SELF) {
|
||||
actorID = script->owner1.actorID;
|
||||
}
|
||||
|
||||
var1 = get_variable(script, *args++);
|
||||
get_actor(actorID)->onHitCode = var1;
|
||||
var1 = (Script*) get_variable(script, *args++);
|
||||
get_actor(actorID)->onHitScriptSource = var1;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
ApiStatus BindNextTurn(ScriptInstance* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
ActorID actorID = get_variable(script, *args++);
|
||||
s32 var1;
|
||||
Script* var1;
|
||||
|
||||
if (actorID == ACTOR_SELF) {
|
||||
actorID = script->owner1.actorID;
|
||||
}
|
||||
|
||||
var1 = get_variable(script, *args++);
|
||||
get_actor(actorID)->onTurnChangeCode = var1;
|
||||
var1 = (Script*) get_variable(script, *args++);
|
||||
get_actor(actorID)->onTurnChanceScriptSource = var1;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
||||
@ -339,14 +339,14 @@ ApiStatus SetDefenseTable(ScriptInstance* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
ActorID actorID = get_variable(script, *args++);
|
||||
s32 partIndex;
|
||||
s32 var2;
|
||||
u32* var2;
|
||||
|
||||
if (actorID == ACTOR_SELF) {
|
||||
actorID = script->owner1.actorID;
|
||||
}
|
||||
|
||||
partIndex = get_variable(script, *args++);
|
||||
var2 = get_variable(script, *args++);
|
||||
var2 = (u32*) get_variable(script, *args++);
|
||||
get_actor_part(get_actor(actorID), partIndex)->defenseTable = var2;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
@ -354,13 +354,13 @@ ApiStatus SetDefenseTable(ScriptInstance* script, s32 isInitialCall) {
|
||||
ApiStatus SetStatusTable(ScriptInstance* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
ActorID actorID = get_variable(script, *args++);
|
||||
s32 var1;
|
||||
u32* var1;
|
||||
|
||||
if (actorID == ACTOR_SELF) {
|
||||
actorID = script->owner1.actorID;
|
||||
}
|
||||
|
||||
var1 = get_variable(script, *args++);
|
||||
var1 = (u32*) get_variable(script, *args++);
|
||||
get_actor(actorID)->statusTable = var1;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
@ -369,14 +369,14 @@ ApiStatus SetIdleAnimations(ScriptInstance* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
ActorID actorID = get_variable(script, *args++);
|
||||
s32 partIndex;
|
||||
s32 var2;
|
||||
u32* var2;
|
||||
|
||||
if (actorID == ACTOR_SELF) {
|
||||
actorID = script->owner1.actorID;
|
||||
}
|
||||
|
||||
partIndex = get_variable(script, *args++);
|
||||
var2 = get_variable(script, *args++);
|
||||
var2 = (u32*) get_variable(script, *args++);
|
||||
get_actor_part(get_actor(actorID), partIndex)->idleAnimations = var2;
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ void dispatch_event_partner(s32 lastEventType) {
|
||||
ScriptInstance* script;
|
||||
|
||||
partnerActor->lastEventType = lastEventType;
|
||||
script = start_script(partnerActor->onHitCode, 10, 0x20);
|
||||
script = start_script(partnerActor->onHitScriptSource, 10, 0x20);
|
||||
partnerActor->onHitScript = script;
|
||||
partnerActor->onHitID = script->id;
|
||||
script->owner1.actorID = ACTOR_PARTNER;
|
||||
@ -32,7 +32,7 @@ void dispatch_event_partner_continue_turn(s8 lastEventType) {
|
||||
ScriptInstance* script;
|
||||
|
||||
partnerActor->lastEventType = lastEventType;
|
||||
script = start_script(partnerActor->onHitCode, 10, 0x20);
|
||||
script = start_script(partnerActor->onHitScriptSource, 10, 0x20);
|
||||
partnerActor->onHitScript = script;
|
||||
partnerActor->onHitID = script->id;
|
||||
script->owner1.actorID = ACTOR_PARTNER;
|
||||
|
@ -6,6 +6,8 @@
|
||||
u16 D_80074260 = 0;
|
||||
s32 D_80074264 = 0;
|
||||
|
||||
void reset_max_rumble_duration(void);
|
||||
|
||||
void poll_rumble(void) {
|
||||
nuContRmbCheck(0);
|
||||
nuContRmbModeSet(0, 2);
|
||||
|
@ -58,7 +58,7 @@ f32 length2D(f32 x, f32 y) {
|
||||
|
||||
HeapNode* _heap_create(s32* addr, u32 size) {
|
||||
if (size < 32) {
|
||||
return (HeapNode*) - 1;
|
||||
return (HeapNode*) -1;
|
||||
} else {
|
||||
HeapNode* heapNode = ALIGN16((s32)addr);
|
||||
|
||||
@ -131,7 +131,7 @@ void copy_matrix(Matrix4f src, Matrix4f dest) {
|
||||
bcopy(src, dest, sizeof(Matrix4f));
|
||||
}
|
||||
|
||||
s32 dma_copy(s32 romStart, s32 romEnd, void* vramDest) {
|
||||
s32 dma_copy(Addr romStart, Addr romEnd, void* vramDest) {
|
||||
u32 length = romEnd - romStart;
|
||||
s32 i;
|
||||
|
||||
|
@ -19,7 +19,7 @@ void get_cam_viewport(s32 camID, u16* x, u16* y, u16* width, u16* height) {
|
||||
*y = CAM(camID)->viewportStartY;
|
||||
}
|
||||
|
||||
INCLUDE_ASM(void, "8800", get_screen_coords, Cam camID, f32 x, f32 y, f32 z, f32* outX, f32* outY, f32* outZ);
|
||||
INCLUDE_ASM(void, "8800", get_screen_coords, Cam camID, f32 x, f32 y, f32 z, s32* screenX, s32* screenY, s32* screenZ);
|
||||
|
||||
s32 func_8002E754(s32 camID, s32 x, s32 y) {
|
||||
s32 startX = CAM(camID)->viewportStartX;
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
s32 func_802B7000_2(void) {
|
||||
Temp8010EBB0* something = &D_8010EBB0;
|
||||
ActionState* actionState = gPlayerActionState;
|
||||
ActionState actionState = gPlayerActionState;
|
||||
|
||||
if (actionState != ACTION_STATE_USE_TWEESTER) {
|
||||
if (something->unk_00 != 1 || (something->unk_03 != 9 && something->unk_03 != 4)) {
|
||||
|
@ -4,6 +4,6 @@
|
||||
#include "common.h"
|
||||
#include "battle/battle.h"
|
||||
|
||||
ActorDesc goomba;
|
||||
extern ActorDesc goomba;
|
||||
|
||||
#endif
|
||||
|
@ -2,6 +2,9 @@
|
||||
#include "ld_addrs.h"
|
||||
#include "battle.h"
|
||||
|
||||
extern BattleList area_kmr_part_1_battles;
|
||||
extern StageList area_kmr_part_1_stages;
|
||||
|
||||
const s32 D_80099E40[] = {
|
||||
/* 0x75240 */ 0x00010202, 0x03030303, 0x04040404, 0x04040404,
|
||||
/* 0x75250 */ 0x05050505, 0x05050505, 0x05050505, 0x05050505,
|
||||
@ -78,9 +81,6 @@ const s32 D_8009A140[] = {
|
||||
/* 0x75630 */ 0x08080808, 0x08080808, 0x08080808, 0x08080808,
|
||||
};
|
||||
|
||||
BattleList area_kmr_part_1_battles;
|
||||
StageList area_kmr_part_1_stages;
|
||||
|
||||
BattleArea gBattleAreas[0x30] = {
|
||||
{
|
||||
AREA(area_kmr_part_1),
|
||||
|
@ -12,12 +12,12 @@ struct N(tempStc) {
|
||||
s32 unk_04;
|
||||
} N(tempStc);
|
||||
|
||||
s32 N(D_802A227C_72D82C)[8];
|
||||
s32 N(D_802A229C_72D84C)[8];
|
||||
extern s32 N(D_802A227C_72D82C)[8];
|
||||
extern s32 N(D_802A229C_72D84C)[8];
|
||||
|
||||
extern Script N(UseItemWithEffect);
|
||||
|
||||
ApiStatus N(func_802A13E4_72C994)(ScriptInstance *script, s32 isInitialCall);
|
||||
ApiStatus N(func_802A188C_72CE3C)(ScriptInstance *script, s32 isInitialCall);
|
||||
|
||||
Script N(UseItemWithEffect);
|
||||
|
||||
#endif
|
||||
|
19
src/entity.c
19
src/entity.c
@ -14,6 +14,7 @@ extern s32 entity_fog_dist_min;
|
||||
extern s32 entity_fog_dist_max;
|
||||
|
||||
s32 step_entity_model_commandlist(EntityModel* entityModel);
|
||||
void free_entity_model_by_ref(EntityModel* entityModel);
|
||||
|
||||
void clear_entity_models(void) {
|
||||
s32 i;
|
||||
@ -83,7 +84,7 @@ s32 load_entity_model(s32* cmdList) {
|
||||
newEntityModel->nextFrameTime = 1.0f;
|
||||
newEntityModel->timeScale = 1.0f;
|
||||
if (cmdList == NULL) {
|
||||
newEntityModel->cmdListReadPos = &D_8014C260;
|
||||
newEntityModel->cmdListReadPos = D_8014C260;
|
||||
}
|
||||
newEntityModel->vertexArray = NULL;
|
||||
newEntityModel->fpSetupGfxCallback = NULL;
|
||||
@ -125,7 +126,7 @@ s32 ALT_load_entity_model(s32* cmdList) {
|
||||
newEntityModel->nextFrameTime = 1.0f;
|
||||
newEntityModel->timeScale = 1.0f;
|
||||
if (cmdList == NULL) {
|
||||
newEntityModel->cmdListReadPos = &D_8014C260;
|
||||
newEntityModel->cmdListReadPos = D_8014C260;
|
||||
}
|
||||
newEntityModel->vertexArray = NULL;
|
||||
newEntityModel->fpSetupGfxCallback = NULL;
|
||||
@ -167,8 +168,8 @@ s32 step_entity_model_commandlist(EntityModel* entityModel) {
|
||||
free_entity_model_by_ref(entityModel);
|
||||
return 1;
|
||||
case 1: // set display list ptr
|
||||
entityModel->nextFrameTime = *curPos++;
|
||||
entityModel->displayList = *curPos++;
|
||||
entityModel->nextFrameTime = (f32) *curPos++;
|
||||
entityModel->displayList = (Gfx*) *curPos++;
|
||||
entityModel->cmdListReadPos = curPos;
|
||||
break;
|
||||
case 2: // restore saved position
|
||||
@ -203,7 +204,7 @@ s32 step_entity_model_commandlist(EntityModel* entityModel) {
|
||||
}
|
||||
|
||||
void make_entity_model_mtx_flipZ(Matrix4f mtx) {
|
||||
guMtxIdentF(*mtx);
|
||||
guMtxIdentF(mtx);
|
||||
mtx[0][0] = 1.0f;
|
||||
mtx[1][1] = 1.0f;
|
||||
mtx[2][2] = -1.0f;
|
||||
@ -229,7 +230,7 @@ void set_entity_model_render_command_list(s32 idx, u32* commandList) {
|
||||
if (entityModel != NULL && entityModel->flags) {
|
||||
phi_a1 = commandList;
|
||||
if (commandList == NULL) {
|
||||
phi_a1 = &D_8014C260;
|
||||
phi_a1 = D_8014C260;
|
||||
}
|
||||
entityModel->cmdListReadPos = phi_a1;
|
||||
entityModel->cmdListSavedPos = phi_a1;
|
||||
@ -363,9 +364,9 @@ void clear_dynamic_entity_list(void) {
|
||||
|
||||
void init_dynamic_entity_list(void) {
|
||||
if (!gGameStatusPtr->isBattle) {
|
||||
gCurrentDynamicEntityListPtr = gWorldDynamicEntityList;
|
||||
gCurrentDynamicEntityListPtr = &gWorldDynamicEntityList;
|
||||
} else {
|
||||
gCurrentDynamicEntityListPtr = gBattleDynamicEntityList;
|
||||
gCurrentDynamicEntityListPtr = &gBattleDynamicEntityList;
|
||||
}
|
||||
}
|
||||
|
||||
@ -525,6 +526,6 @@ void free_dynamic_entity(s32 idx) {
|
||||
}
|
||||
}
|
||||
|
||||
s32 get_dynamic_entity(s32 idx) {
|
||||
DynamicEntity* get_dynamic_entity(s32 idx) {
|
||||
return (*gCurrentDynamicEntityListPtr)[idx & ~0x800];
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ ApiStatus RemoveEffect(ScriptInstance* script, s32 isInitialCall) {
|
||||
|
||||
ApiStatus func_802D7B10(ScriptInstance* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32* ptrValue = get_variable(script, *args++);
|
||||
s32* ptrValue = (s32*) get_variable(script, *args++);
|
||||
|
||||
*ptrValue |= 0x10;
|
||||
return ApiStatus_DONE2;
|
||||
@ -47,7 +47,7 @@ ApiStatus func_802D7B10(ScriptInstance* script, s32 isInitialCall) {
|
||||
|
||||
ApiStatus func_802D7B44(ScriptInstance* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32* ptrValue = get_variable(script, *args++);
|
||||
s32** ptrValue = (s32**) get_variable(script, *args++);
|
||||
s32* ptrTemp = ptrValue[3];
|
||||
|
||||
ptrTemp[5] = 10;
|
||||
@ -56,7 +56,7 @@ ApiStatus func_802D7B44(ScriptInstance* script, s32 isInitialCall) {
|
||||
|
||||
ApiStatus func_802D7B74(ScriptInstance* script, s32 isInitialCall) {
|
||||
Bytecode* args = script->ptrReadPos;
|
||||
s32* ptrValue = get_variable(script, *args++);
|
||||
s32** ptrValue = (s32**) get_variable(script, *args++);
|
||||
s32* ptrTemp = ptrValue[3];
|
||||
|
||||
ptrTemp[12] = 5;
|
||||
@ -71,7 +71,7 @@ ApiStatus func_802D7BA4(ScriptInstance* script, s32 isInitialCall) {
|
||||
s32 var5 = script->varTable[5];
|
||||
s32 var6 = script->varTable[6];
|
||||
s32 temp;
|
||||
s32 t0;
|
||||
f32 t0;
|
||||
f32 t1;
|
||||
|
||||
if (isInitialCall) {
|
||||
|
@ -38,13 +38,13 @@ ApiStatus RotateModel(ScriptInstance* script, s32 isInitialCall) {
|
||||
Model* model = get_model_from_list_index(modelListIndex);
|
||||
|
||||
if ((model->flags & 0x400) == 0) {
|
||||
guRotateF(&model->transformMatrix, a, x, y, z);
|
||||
guRotateF(model->transformMatrix, a, x, y, z);
|
||||
model->flags |= 0x1400;
|
||||
} else {
|
||||
Matrix4f mtx;
|
||||
|
||||
guRotateF(&mtx, a, x, y, z);
|
||||
guMtxCatF(&mtx, &model->transformMatrix, &model->transformMatrix);
|
||||
guRotateF(mtx, a, x, y, z);
|
||||
guMtxCatF(mtx, model->transformMatrix, model->transformMatrix);
|
||||
}
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
|
@ -152,7 +152,7 @@ void func_802C3390(ScriptInstance* script) {
|
||||
suspend_all_group(arg);
|
||||
}
|
||||
|
||||
ScriptInstance* start_script(Bytecode* initialLine, s32 priority, s32 initialState) {
|
||||
ScriptInstance* start_script(Script* source, s32 priority, s32 initialState) {
|
||||
ScriptInstance* newScript;
|
||||
s32 curScriptIndex;
|
||||
s32 scriptListCount;
|
||||
@ -172,9 +172,9 @@ ScriptInstance* start_script(Bytecode* initialLine, s32 priority, s32 initialSta
|
||||
newScript->state = initialState | 1;
|
||||
newScript->currentOpcode = 0;
|
||||
newScript->priority = priority;
|
||||
newScript->ptrNextLine = initialLine;
|
||||
newScript->ptrFirstLine = initialLine;
|
||||
newScript->ptrCurrentLine = initialLine;
|
||||
newScript->ptrNextLine = source;
|
||||
newScript->ptrFirstLine = source;
|
||||
newScript->ptrCurrentLine = source;
|
||||
newScript->userData = NULL;
|
||||
newScript->blockingParent = NULL;
|
||||
newScript->childScript = NULL;
|
||||
@ -216,7 +216,7 @@ ScriptInstance* start_script(Bytecode* initialLine, s32 priority, s32 initialSta
|
||||
return newScript;
|
||||
}
|
||||
|
||||
ScriptInstance* start_script_in_group(Bytecode* initialLine, u8 priority, u8 initialState, u8 groupFlags) {
|
||||
ScriptInstance* start_script_in_group(Script* source, u8 priority, u8 initialState, u8 groupFlags) {
|
||||
ScriptInstance* newScript;
|
||||
s32 scriptListCount;
|
||||
s32 i;
|
||||
@ -244,9 +244,9 @@ ScriptInstance* start_script_in_group(Bytecode* initialLine, u8 priority, u8 ini
|
||||
newScript->currentOpcode = 0;
|
||||
newScript->priority = priority;
|
||||
newScript->id = gStaticScriptCounter++;
|
||||
newScript->ptrNextLine = initialLine;
|
||||
newScript->ptrFirstLine = initialLine;
|
||||
newScript->ptrCurrentLine = initialLine;
|
||||
newScript->ptrNextLine = source;
|
||||
newScript->ptrFirstLine = source;
|
||||
newScript->ptrCurrentLine = source;
|
||||
newScript->userData = 0;
|
||||
newScript->blockingParent = 0;
|
||||
newScript->childScript = 0;
|
||||
@ -555,7 +555,7 @@ Trigger* bind_trigger(Bytecode* script, s32 flags, s32 triggerFlagIndex, s32 tri
|
||||
def.inputArg3 = arg6;
|
||||
|
||||
trigger = create_trigger(&def);
|
||||
trigger->scriptStart = script;
|
||||
trigger->scriptSource = script;
|
||||
trigger->runningScript = NULL;
|
||||
trigger->priority = priority;
|
||||
trigger->scriptVars[0] = triggerVar0;
|
||||
|
@ -965,7 +965,7 @@ s32 _bound_script_trigger_handler(Trigger* trigger) {
|
||||
ScriptInstance* script;
|
||||
|
||||
if (trigger->runningScript == NULL) {
|
||||
scriptStart = trigger->scriptStart;
|
||||
scriptStart = trigger->scriptSource;
|
||||
if (is_trigger_bound(trigger, scriptStart)) {
|
||||
return 0;
|
||||
}
|
||||
@ -1005,7 +1005,7 @@ ApiStatus si_handle_bind_trigger(ScriptInstance* script) {
|
||||
def.function = _bound_script_trigger_handler;
|
||||
|
||||
trigger = create_trigger(&def);
|
||||
trigger->scriptStart = triggerScript;
|
||||
trigger->scriptSource = triggerScript;
|
||||
trigger->runningScript = NULL;
|
||||
trigger->priority = script->priority;
|
||||
trigger->scriptVars[0] = get_variable(script, script->varTable[0]);
|
||||
@ -1090,7 +1090,7 @@ ApiStatus si_handle_does_script_exist(ScriptInstance* script) {
|
||||
|
||||
void si_standard_trigger_executor(Trigger* trigger) {
|
||||
if (trigger->runningScript == NULL) {
|
||||
ScriptInstance* newScript = start_script(trigger->scriptStart, trigger->priority, 0x20);
|
||||
ScriptInstance* newScript = start_script(trigger->scriptSource, trigger->priority, 0x20);
|
||||
trigger->runningScript = newScript;
|
||||
trigger->runningScriptID = newScript->id;
|
||||
newScript->varTable[0] = trigger->scriptVars[0];
|
||||
@ -1125,7 +1125,7 @@ ApiStatus si_handle_bind_lock(ScriptInstance* script) {
|
||||
def.inputArg3 = a5;
|
||||
|
||||
trigger = create_trigger(&def);
|
||||
trigger->scriptStart = triggerScript;
|
||||
trigger->scriptSource = triggerScript;
|
||||
trigger->runningScript = NULL;
|
||||
trigger->priority = script->priority;
|
||||
trigger->scriptVars[0] = get_variable(script, script->varTable[0]);
|
||||
|
@ -7,7 +7,7 @@ HeapNode* general_heap_create(void) {
|
||||
return _heap_create(&D_802FB800, 0x54000);
|
||||
}
|
||||
|
||||
s32 general_heap_malloc(s32 size) {
|
||||
void* general_heap_malloc(s32 size) {
|
||||
return _heap_malloc(&D_802FB800, size);
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ s32 func_8002ACDC(void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 heap_malloc(s32 size) {
|
||||
void* heap_malloc(s32 size) {
|
||||
if (gGameStatusPtr->isBattle == 0) {
|
||||
return general_heap_malloc(size);
|
||||
} else {
|
||||
@ -54,7 +54,7 @@ s32 collision_heap_create(void) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 collision_heap_malloc(s32 size) {
|
||||
void* collision_heap_malloc(s32 size) {
|
||||
if (!gGameStatusPtr->isBattle) {
|
||||
return _heap_malloc(&D_80268000, size);
|
||||
} else {
|
@ -1,6 +1,6 @@
|
||||
#include "common.h"
|
||||
|
||||
extern s32* D_80073DE0;
|
||||
extern s32 D_80073DE0;
|
||||
|
||||
INCLUDE_ASM(s32, "1370", func_80025F70);
|
||||
|
||||
|
10
src/sprite.c
10
src/sprite.c
@ -152,11 +152,11 @@ void spr_transform_point(s32 rotX, s32 rotY, s32 rotZ, f32 inX, f32 inY, f32 inZ
|
||||
Matrix4f mtx, mtx2;
|
||||
f32 f1, f2, f3, f4, f5, f6, f7, f8, f9;
|
||||
|
||||
guRotateF(&mtx, rotY, 0.0f, 1.0f, 0.0f);
|
||||
guRotateF(&mtx2, rotZ, 0.0f, 0.0f, 1.0f);
|
||||
guMtxCatF(&mtx2, &mtx, &mtx);
|
||||
guRotateF(&mtx2, rotX, 1.0f, 0.0f, 0.0f);
|
||||
guMtxCatF(&mtx2, &mtx, &mtx);
|
||||
guRotateF(mtx, rotY, 0.0f, 1.0f, 0.0f);
|
||||
guRotateF(mtx2, rotZ, 0.0f, 0.0f, 1.0f);
|
||||
guMtxCatF(mtx2, mtx, mtx);
|
||||
guRotateF(mtx2, rotX, 1.0f, 0.0f, 0.0f);
|
||||
guMtxCatF(mtx2, mtx, mtx);
|
||||
|
||||
f1 = (mtx[0][0] * inX);
|
||||
f2 = (mtx[1][0] * inY);
|
||||
|
@ -5,6 +5,8 @@ void input_to_move_vector(f32* angle, f32* magnitude);
|
||||
s32 check_input_jump(void);
|
||||
s32 check_input_hammer(void);
|
||||
|
||||
void func_802B61E4_E23444(void);
|
||||
|
||||
NpcAnimID world_action_idle_peachAnims[] = {
|
||||
0x000A0001, // Idle
|
||||
|
||||
|
@ -6,11 +6,9 @@
|
||||
|
||||
s32 func_800493EC(Enemy* enemy, s32 arg1, f32 arg2, f32 arg3);
|
||||
ApiStatus N(func_80240C90_BDDE40)(ScriptInstance *script, s32 isInitialCall);
|
||||
|
||||
Script N(main);
|
||||
Script N(80241040);
|
||||
NpcGroupList N(npcGroupList_80241A9C);
|
||||
Script N(makeEntities);
|
||||
ApiStatus N(func_80240C90_BDDE40)(ScriptInstance *script, s32 isInitialCall);
|
||||
|
||||
extern s16 gCurrentCamID;
|
||||
extern Script N(main);
|
||||
extern Script N(80241040);
|
||||
extern NpcGroupList N(npcGroupList_80241A9C);
|
||||
extern Script N(makeEntities);
|
||||
|
@ -61,8 +61,8 @@ NpcSettings N(npcSettings_80241420) = {
|
||||
.height = 20,
|
||||
.radius = 23,
|
||||
.ai = &N(npcAI_80241400),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 12,
|
||||
};
|
||||
|
||||
@ -88,8 +88,8 @@ NpcSettings N(npcSettings_802414A0) = {
|
||||
.height = 24,
|
||||
.radius = 24,
|
||||
.ai = &N(npcAI_8024147C),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 15,
|
||||
};
|
||||
|
||||
|
@ -2,16 +2,16 @@
|
||||
#include "message_ids.h"
|
||||
|
||||
EntryList N(entryList) = {
|
||||
{ -585.0f, 60.0f, 150.0f, 90.0f },
|
||||
{ 880.0f, 320.0f, 150.0f, 270.0f },
|
||||
{ -585.0f, 60.0f, 150.0f, 90.0f },
|
||||
{ 880.0f, 320.0f, 150.0f, 270.0f },
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.background = &gBackgroundImage,
|
||||
.tattle = MSG_arn_02_tattle,
|
||||
.tattle = { MSG_arn_02_tattle },
|
||||
};
|
||||
|
||||
Script N(80241040) = SCRIPT({
|
||||
|
@ -10,14 +10,14 @@ ApiStatus N(func_80241648_BE03D8)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_80241680_BE0410)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802415F4_BE0384)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_8024113C_BDFECC)(ScriptInstance* script, s32 isInitialCall);
|
||||
|
||||
Script N(main);
|
||||
Script N(80241780);
|
||||
NpcGroupList N(npcGroupList_80244740);
|
||||
NpcGroupList N(npcGroupList_80244788);
|
||||
Script N(makeEntities);
|
||||
ApiStatus N(func_8024113C_BDFECC)(ScriptInstance *script, s32 isInitialCall);
|
||||
ApiStatus N(AddPlayerHandsOffset)(ScriptInstance *script, s32 isInitialCall);
|
||||
ApiStatus N(func_80241648_BE03D8)(ScriptInstance *script, s32 isInitialCall);
|
||||
ApiStatus N(func_80241680_BE0410)(ScriptInstance *script, s32 isInitialCall);
|
||||
ApiStatus N(func_802415F4_BE0384)(ScriptInstance *script, s32 isInitialCall);
|
||||
|
||||
extern Script N(main);
|
||||
extern Script N(80241780);
|
||||
extern NpcGroupList N(npcGroupList_80244740);
|
||||
extern NpcGroupList N(npcGroupList_80244788);
|
||||
extern Script N(makeEntities);
|
||||
|
@ -91,9 +91,7 @@ NpcSettings N(npcSettings_80241C3C) = {
|
||||
.level = 99,
|
||||
};
|
||||
|
||||
s32 N(D_80241C68_BE09F8) = {
|
||||
0x00000000,
|
||||
};
|
||||
s32* N(D_80241C68_BE09F8) = NULL;
|
||||
|
||||
Script N(80241C6C) = SCRIPT({
|
||||
ShowGotItem(SI_VAR(0), 1, 0);
|
||||
@ -138,9 +136,9 @@ Script N(80241CD4) = SCRIPT({
|
||||
});
|
||||
|
||||
Script N(80241E18) = {
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_80241680_BE0410), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_BIND_PADLOCK, N(80241CD4), 0x10, 0, D_80244A20, 0, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, N(func_802415F4_BE0384), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_CALL, (Bytecode) N(func_80241680_BE0410), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_BIND_PADLOCK, (Bytecode) N(80241CD4), 0x10, 0, (Bytecode) D_80244A20, 0, 1),
|
||||
SI_CMD(ScriptOpcode_CALL, (Bytecode) N(func_802415F4_BE0384), SI_VAR(0)),
|
||||
SI_CMD(ScriptOpcode_RETURN),
|
||||
SI_CMD(ScriptOpcode_END)
|
||||
};
|
||||
@ -1208,6 +1206,7 @@ ApiStatus N(func_8024113C_BDFECC)(ScriptInstance* script, s32 isInitialCall) {
|
||||
return ApiStatus_BLOCK;
|
||||
}
|
||||
|
||||
/// Pushes/pops script local variables to D_80241C68_BE09F8
|
||||
ApiStatus N(func_802412B0_BE0040)(ScriptInstance* script, s32 isInitialCall) {
|
||||
s32** ptr = &N(D_80241C68_BE09F8);
|
||||
s32 i;
|
||||
@ -1215,7 +1214,7 @@ ApiStatus N(func_802412B0_BE0040)(ScriptInstance* script, s32 isInitialCall) {
|
||||
|
||||
if (*ptr == NULL) {
|
||||
i = heap_malloc(16 * sizeof(s32));
|
||||
*ptr = i;
|
||||
*ptr = (s32*) i;
|
||||
for (i = 0, test = *ptr; i < 16; i++) {
|
||||
*test++ = script->varTable[i];
|
||||
}
|
||||
|
@ -6,11 +6,11 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.background = &gBackgroundImage,
|
||||
.tattle = MSG_arn_03_tattle,
|
||||
.tattle = { MSG_arn_03_tattle },
|
||||
};
|
||||
|
||||
Script N(80241780) = SCRIPT({
|
||||
|
@ -51,8 +51,8 @@ NpcSettings N(npcSettings_802436B0) = {
|
||||
.height = 20,
|
||||
.radius = 23,
|
||||
.ai = &N(npcAI_80243690),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 12,
|
||||
};
|
||||
|
||||
@ -86,8 +86,8 @@ NpcSettings N(npcSettings_80243794) = {
|
||||
.height = 18,
|
||||
.radius = 20,
|
||||
.ai = &N(npcAI_80243724),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 12,
|
||||
.unk_2A = 1,
|
||||
};
|
||||
@ -114,8 +114,8 @@ NpcSettings N(npcSettings_80243814) = {
|
||||
.height = 24,
|
||||
.radius = 24,
|
||||
.ai = &N(npcAI_802437F0),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 15,
|
||||
};
|
||||
|
||||
|
@ -7,11 +7,11 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.background = &gBackgroundImage,
|
||||
.tattle = MSG_arn_04_tattle,
|
||||
.tattle = { MSG_arn_04_tattle },
|
||||
};
|
||||
|
||||
Script N(802433D0) = SCRIPT({
|
||||
|
@ -10,9 +10,9 @@ ApiStatus N(func_802412C8_BE8EA8)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802412B0_BE8E90)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_8024113C_BE8D1C)(ScriptInstance* script, s32 isInitialCall);
|
||||
|
||||
Script N(makeEntities);
|
||||
Script N(main);
|
||||
Script N(80241360);
|
||||
Script N(802441FC);
|
||||
NpcGroupList N(npcGroupList_80244FC8);
|
||||
NpcGroupList N(npcGroupList_80244FA4);
|
||||
extern Script N(makeEntities);
|
||||
extern Script N(main);
|
||||
extern Script N(80241360);
|
||||
extern Script N(802441FC);
|
||||
extern NpcGroupList N(npcGroupList_80244FC8);
|
||||
extern NpcGroupList N(npcGroupList_80244FA4);
|
||||
|
@ -61,8 +61,8 @@ static s32 N(pad_16A8)[] = {
|
||||
NpcSettings N(npcSettings_802416B0) = {
|
||||
.height = 90,
|
||||
.radius = 65,
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 13,
|
||||
};
|
||||
|
||||
@ -807,7 +807,7 @@ StaticNpc N(npcGroup_802443AC) = {
|
||||
NPC_ANIM(world_tubba, Palette_00, Anim_0),
|
||||
NPC_ANIM(world_tubba, Palette_00, Anim_0),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_80244390),
|
||||
.extraAnimations = N(extraAnimationList_80244390),
|
||||
};
|
||||
|
||||
Script N(idle_8024459C) = SCRIPT({
|
||||
|
@ -7,11 +7,11 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.background = &gBackgroundImage,
|
||||
.tattle = MSG_arn_05_tattle,
|
||||
.tattle = { MSG_arn_05_tattle },
|
||||
};
|
||||
|
||||
Script N(80241360) = SCRIPT({
|
||||
|
@ -4,30 +4,6 @@
|
||||
|
||||
#define NAMESPACE arn_07
|
||||
|
||||
ApiStatus N(func_80240000_BECDF0)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_8024004C_BECE3C)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802401AC_BECF9C)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802405BC_BED3AC)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802405FC_BED3EC)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_80240708_BED4F8)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_80240800_BED5F0)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_80241C5C_BEEA4C)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(SetEntityFlags100000)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(GetEntityPosition)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus PostChapter3StatUpdate(ScriptInstance* script, s32 isInitialCall);
|
||||
|
||||
Script N(exitSingleDoor_802428D4);
|
||||
NpcGroupList N(npcGroupList_8024787C);
|
||||
NpcGroupList N(npcGroupList_802478B8);
|
||||
NpcGroupList N(npcGroupList_802478E8);
|
||||
Script N(80243790);
|
||||
Script N(802437AC);
|
||||
Script N(802439B0);
|
||||
Script N(80242048);
|
||||
Script N(80241F10);
|
||||
Script N(main);
|
||||
Script N(makeEntities);
|
||||
|
||||
enum {
|
||||
NPC_TUBBAS_HEART,
|
||||
NPC_WORLD_TUBBA,
|
||||
@ -44,3 +20,27 @@ enum {
|
||||
NPC_PARAGOOMBA2,
|
||||
NPC_WORLD_SKOLAR,
|
||||
};
|
||||
|
||||
ApiStatus N(func_80240000_BECDF0)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_8024004C_BECE3C)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802401AC_BECF9C)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802405BC_BED3AC)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802405FC_BED3EC)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_80240708_BED4F8)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_80240800_BED5F0)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_80241C5C_BEEA4C)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(SetEntityFlags100000)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(GetEntityPosition)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus PostChapter3StatUpdate(ScriptInstance* script, s32 isInitialCall);
|
||||
|
||||
extern Script N(exitSingleDoor_802428D4);
|
||||
extern NpcGroupList N(npcGroupList_8024787C);
|
||||
extern NpcGroupList N(npcGroupList_802478B8);
|
||||
extern NpcGroupList N(npcGroupList_802478E8);
|
||||
extern Script N(80243790);
|
||||
extern Script N(802437AC);
|
||||
extern Script N(802439B0);
|
||||
extern Script N(80242048);
|
||||
extern Script N(80241F10);
|
||||
extern Script N(main);
|
||||
extern Script N(makeEntities);
|
||||
|
@ -115,8 +115,8 @@ NpcSettings N(npcSettings_80243C78) = {
|
||||
.height = 18,
|
||||
.radius = 20,
|
||||
.ai = &N(npcAI_80243C08),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 12,
|
||||
.unk_2A = 1,
|
||||
};
|
||||
@ -140,8 +140,8 @@ NpcSettings N(npcSettings_80243CC4) = {
|
||||
NpcSettings N(npcSettings_80243CF0) = {
|
||||
.height = 90,
|
||||
.radius = 65,
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 13,
|
||||
};
|
||||
|
||||
@ -715,7 +715,7 @@ StaticNpc N(npcGroup_80245D0C)[] = {
|
||||
NPC_ANIM(world_tubba, Palette_00, Anim_0),
|
||||
NPC_ANIM(world_tubba, Palette_00, Anim_0),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_802451D4),
|
||||
.extraAnimations = N(extraAnimationList_802451D4),
|
||||
},
|
||||
{
|
||||
.id = NPC_TUBBAS_HEART,
|
||||
@ -777,7 +777,7 @@ StaticNpc N(npcGroup_802460EC)[] = {
|
||||
NPC_ANIM(boo, Palette_01, Anim_3),
|
||||
NPC_ANIM(boo, Palette_01, Anim_3),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_80245200),
|
||||
.extraAnimations = N(extraAnimationList_80245200),
|
||||
},
|
||||
{
|
||||
.id = NPC_BOO1,
|
||||
@ -807,7 +807,7 @@ StaticNpc N(npcGroup_802460EC)[] = {
|
||||
NPC_ANIM(boo, Palette_01, Anim_3),
|
||||
NPC_ANIM(boo, Palette_01, Anim_3),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_80245200),
|
||||
.extraAnimations = N(extraAnimationList_80245200),
|
||||
},
|
||||
{
|
||||
.id = NPC_BOO2,
|
||||
@ -837,7 +837,7 @@ StaticNpc N(npcGroup_802460EC)[] = {
|
||||
NPC_ANIM(boo, Palette_01, Anim_3),
|
||||
NPC_ANIM(boo, Palette_01, Anim_3),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_80245200),
|
||||
.extraAnimations = N(extraAnimationList_80245200),
|
||||
},
|
||||
{
|
||||
.id = NPC_BOO3,
|
||||
@ -867,7 +867,7 @@ StaticNpc N(npcGroup_802460EC)[] = {
|
||||
NPC_ANIM(boo, Palette_01, Anim_3),
|
||||
NPC_ANIM(boo, Palette_01, Anim_3),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_80245200),
|
||||
.extraAnimations = N(extraAnimationList_80245200),
|
||||
},
|
||||
{
|
||||
.id = NPC_BOO4,
|
||||
@ -897,7 +897,7 @@ StaticNpc N(npcGroup_802460EC)[] = {
|
||||
NPC_ANIM(boo, Palette_00, Anim_3),
|
||||
NPC_ANIM(boo, Palette_00, Anim_3),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_802451F8),
|
||||
.extraAnimations = N(extraAnimationList_802451F8),
|
||||
},
|
||||
{
|
||||
.id = NPC_BOO5,
|
||||
@ -927,7 +927,7 @@ StaticNpc N(npcGroup_802460EC)[] = {
|
||||
NPC_ANIM(boo, Palette_00, Anim_3),
|
||||
NPC_ANIM(boo, Palette_00, Anim_3),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_802451F8),
|
||||
.extraAnimations = N(extraAnimationList_802451F8),
|
||||
},
|
||||
};
|
||||
|
||||
@ -989,7 +989,7 @@ StaticNpc N(npcGroup_80246E7C) = {
|
||||
NPC_ANIM(bootler, Palette_00, Anim_7),
|
||||
NPC_ANIM(bootler, Palette_00, Anim_8),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_80245208),
|
||||
.extraAnimations = N(extraAnimationList_80245208),
|
||||
};
|
||||
|
||||
Script N(init_8024706C) = SCRIPT({
|
||||
|
@ -9,11 +9,11 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.background = &gBackgroundImage,
|
||||
.tattle = MSG_arn_07_tattle,
|
||||
.tattle = { MSG_arn_07_tattle },
|
||||
};
|
||||
|
||||
Script N(80241F10) = SCRIPT({
|
||||
|
@ -14,10 +14,10 @@ ApiStatus N(func_802400D4_BF4874)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802400F4_BF4894)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_8024019C_BF493C)(ScriptInstance* script, s32 isInitialCall);
|
||||
|
||||
NpcGroupList N(npcGroupList_80241828);
|
||||
Script N(80240B50);
|
||||
Script N(80240BA0);
|
||||
Script N(8024118C);
|
||||
Script N(80240300);
|
||||
Script N(main);
|
||||
Script N(makeEntities);
|
||||
extern NpcGroupList N(npcGroupList_80241828);
|
||||
extern Script N(80240B50);
|
||||
extern Script N(80240BA0);
|
||||
extern Script N(8024118C);
|
||||
extern Script N(80240300);
|
||||
extern Script N(main);
|
||||
extern Script N(makeEntities);
|
||||
|
@ -8,10 +8,10 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.tattle = MSG_arn_08_tattle,
|
||||
.tattle = { MSG_arn_08_tattle },
|
||||
};
|
||||
|
||||
Script N(80240300) = SCRIPT({
|
||||
|
@ -7,9 +7,9 @@
|
||||
ApiStatus func_802D2484(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_80240000_BF6060)(ScriptInstance *script, s32 isInitialCall);
|
||||
|
||||
Script N(main);
|
||||
Script N(802400A0);
|
||||
NpcGroupList N(npcGroupList_80240974);
|
||||
Script N(makeEntities);
|
||||
Script N(802404D0);
|
||||
extern Script N(main);
|
||||
extern Script N(802400A0);
|
||||
extern NpcGroupList N(npcGroupList_80240974);
|
||||
extern Script N(makeEntities);
|
||||
extern Script N(802404D0);
|
||||
|
||||
|
@ -7,10 +7,10 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.tattle = MSG_arn_09_tattle,
|
||||
.tattle = { MSG_arn_09_tattle },
|
||||
};
|
||||
|
||||
Script N(802400A0) = SCRIPT({
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#define NAMESPACE arn_10
|
||||
|
||||
Script N(main);
|
||||
Script N(80240060);
|
||||
NpcGroupList N(npcGroupList_80240BB8);
|
||||
Script N(makeEntities);
|
||||
extern Script N(main);
|
||||
extern Script N(80240060);
|
||||
extern NpcGroupList N(npcGroupList_80240BB8);
|
||||
extern Script N(makeEntities);
|
||||
|
@ -106,8 +106,8 @@ NpcSettings N(npcSettings_802404CC) = {
|
||||
.height = 20,
|
||||
.radius = 23,
|
||||
.ai = &N(npcAI_802404AC),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 12,
|
||||
};
|
||||
|
||||
|
@ -7,10 +7,10 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.tattle = MSG_arn_10_tattle,
|
||||
.tattle = { MSG_arn_10_tattle },
|
||||
};
|
||||
|
||||
Script N(80240060) = SCRIPT({
|
||||
|
@ -4,6 +4,6 @@
|
||||
|
||||
#define NAMESPACE arn_11
|
||||
|
||||
Script N(main);
|
||||
Script N(80240050);
|
||||
NpcGroupList N(npcGroupList_802410DC);
|
||||
extern Script N(main);
|
||||
extern Script N(80240050);
|
||||
extern NpcGroupList N(npcGroupList_802410DC);
|
||||
|
@ -6,10 +6,10 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.tattle = MSG_arn_11_tattle,
|
||||
.tattle = { MSG_arn_11_tattle },
|
||||
};
|
||||
|
||||
Script N(80240050) = SCRIPT({
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#define NAMESPACE arn_12
|
||||
|
||||
Script N(main);
|
||||
Script N(80240060);
|
||||
NpcGroupList N(npcGroupList_80240BBC);
|
||||
Script N(makeEntities);
|
||||
extern Script N(main);
|
||||
extern Script N(80240060);
|
||||
extern NpcGroupList N(npcGroupList_80240BBC);
|
||||
extern Script N(makeEntities);
|
||||
|
@ -105,8 +105,8 @@ NpcSettings N(npcSettings_802404BC) = {
|
||||
.height = 20,
|
||||
.radius = 23,
|
||||
.ai = &N(npcAI_8024049C),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 12,
|
||||
};
|
||||
|
||||
|
@ -7,10 +7,10 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.tattle = MSG_arn_12_tattle,
|
||||
.tattle = { MSG_arn_12_tattle },
|
||||
};
|
||||
|
||||
Script N(80240060) = SCRIPT({
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#define NAMESPACE arn_13
|
||||
|
||||
Script N(main);
|
||||
Script N(80240060);
|
||||
NpcGroupList N(npcGroupList_80240BCC);
|
||||
Script N(makeEntities);
|
||||
extern Script N(main);
|
||||
extern Script N(80240060);
|
||||
extern NpcGroupList N(npcGroupList_80240BCC);
|
||||
extern Script N(makeEntities);
|
||||
|
@ -106,8 +106,8 @@ NpcSettings N(npcSettings_802404CC) = {
|
||||
.height = 20,
|
||||
.radius = 23,
|
||||
.ai = &N(npcAI_802404AC),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 12,
|
||||
};
|
||||
|
||||
|
@ -7,10 +7,10 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.tattle = MSG_arn_13_tattle,
|
||||
.tattle = { MSG_arn_13_tattle },
|
||||
};
|
||||
|
||||
Script N(80240060) = SCRIPT({
|
||||
|
@ -14,11 +14,11 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.background = &gBackgroundImage,
|
||||
.tattle = MSG_dgb_00_tattle,
|
||||
.tattle = { MSG_dgb_00_tattle },
|
||||
};
|
||||
|
||||
Script N(80240110) = SCRIPT({
|
||||
|
@ -4,12 +4,13 @@
|
||||
#define NAMESPACE dgb_00
|
||||
|
||||
ApiStatus N(func_80240060_BFA100)(ScriptInstance* script, s32 isInitialCall);
|
||||
NpcGroupList N(npcGroupList_802436EC);
|
||||
NpcGroupList N(npcGroupList_80243740);
|
||||
Script N(80240F50);
|
||||
Script N(8024103C);
|
||||
Script N(802413F4);
|
||||
Script N(80241AA0);
|
||||
Script N(80242B84);
|
||||
Script N(main);
|
||||
Script N(makeEntities);
|
||||
|
||||
extern NpcGroupList N(npcGroupList_802436EC);
|
||||
extern NpcGroupList N(npcGroupList_80243740);
|
||||
extern Script N(80240F50);
|
||||
extern Script N(8024103C);
|
||||
extern Script N(802413F4);
|
||||
extern Script N(80241AA0);
|
||||
extern Script N(80242B84);
|
||||
extern Script N(main);
|
||||
extern Script N(makeEntities);
|
||||
|
@ -14,10 +14,10 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.tattle = MSG_dgb_01_tattle,
|
||||
.tattle = { MSG_dgb_01_tattle },
|
||||
};
|
||||
|
||||
Script N(802434A0) = SCRIPT({
|
||||
@ -1341,16 +1341,16 @@ NpcSettings N(npcSettings_802452E8) = {
|
||||
.height = 90,
|
||||
.radius = 65,
|
||||
.ai = &N(npcAI_802452C8),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 13,
|
||||
};
|
||||
|
||||
NpcSettings N(npcSettings_80245314) = {
|
||||
.height = 90,
|
||||
.radius = 65,
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 13,
|
||||
};
|
||||
|
||||
@ -2009,7 +2009,7 @@ StaticNpc N(npcGroup_80246880) = {
|
||||
NPC_ANIM(world_tubba, Palette_00, Anim_0),
|
||||
NPC_ANIM(world_tubba, Palette_00, Anim_0),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_80246850),
|
||||
.extraAnimations = N(extraAnimationList_80246850),
|
||||
};
|
||||
|
||||
StaticNpc N(npcGroup_80246A70) = {
|
||||
@ -2048,7 +2048,7 @@ StaticNpc N(npcGroup_80246A70) = {
|
||||
NPC_ANIM(world_tubba, Palette_00, Anim_7),
|
||||
},
|
||||
.unk_1E0 = { 00, 00, 00, 02, 00, 00, 00, 00},
|
||||
.extraAnimations = &N(extraAnimationList_80246850),
|
||||
.extraAnimations = N(extraAnimationList_80246850),
|
||||
};
|
||||
|
||||
StaticNpc N(npcGroup_80246C60) = {
|
||||
@ -2087,7 +2087,7 @@ StaticNpc N(npcGroup_80246C60) = {
|
||||
NPC_ANIM(world_tubba, Palette_00, Anim_7),
|
||||
},
|
||||
.unk_1E0 = { 00, 00, 00, 02, 00, 00, 00, 00},
|
||||
.extraAnimations = &N(extraAnimationList_80246850),
|
||||
.extraAnimations = N(extraAnimationList_80246850),
|
||||
};
|
||||
|
||||
NpcGroupList N(npcGroupList_80246E50) = {
|
||||
|
@ -12,10 +12,8 @@ enum {
|
||||
};
|
||||
|
||||
ApiStatus func_802CCCB0(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus func_802D2B6C(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus func_802CD348(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus func_802CD3C0(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus func_80045838(ScriptInstance* script, s32 isInitialCall);
|
||||
|
||||
ApiStatus N(func_80240000_BFD880)(void);
|
||||
ApiStatus N(GetEntityPosition)(ScriptInstance* script, s32 isInitialCall);
|
||||
@ -24,13 +22,13 @@ ApiStatus N(UnkFunc1)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802422B0_BFFB30)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_802430C0_C00940)(ScriptInstance* script, s32 isInitialCall);
|
||||
|
||||
Script N(802449C4);
|
||||
Script N(80244AD0);
|
||||
Script N(main);
|
||||
Script N(makeEntities);
|
||||
Script N(D_80252F4C_C107CC);
|
||||
Script N(D_802539A0_C11220);
|
||||
NpcGroupList N(npcGroupList_80246E50);
|
||||
NpcGroupList N(npcGroupList_80246ED4);
|
||||
NpcGroupList N(npcGroupList_80246E8C);
|
||||
NpcGroupList N(npcGroupList_80246F1C);
|
||||
extern Script N(802449C4);
|
||||
extern Script N(80244AD0);
|
||||
extern Script N(main);
|
||||
extern Script N(makeEntities);
|
||||
extern Script N(D_80252F4C_C107CC);
|
||||
extern Script N(D_802539A0_C11220);
|
||||
extern NpcGroupList N(npcGroupList_80246E50);
|
||||
extern NpcGroupList N(npcGroupList_80246ED4);
|
||||
extern NpcGroupList N(npcGroupList_80246E8C);
|
||||
extern NpcGroupList N(npcGroupList_80246F1C);
|
||||
|
@ -20,8 +20,8 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.tattle = 0x1900C2,
|
||||
};
|
||||
@ -213,8 +213,8 @@ NpcSettings N(npcSettings_80241C3C) = {
|
||||
.height = 36,
|
||||
.radius = 34,
|
||||
.ai = &N(npcAI_80241BCC),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 13,
|
||||
};
|
||||
|
||||
@ -245,8 +245,8 @@ NpcSettings N(npcSettings_80241D08) = {
|
||||
.height = 36,
|
||||
.radius = 34,
|
||||
.ai = &N(npcAI_80241C98),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 13,
|
||||
};
|
||||
|
||||
@ -306,7 +306,7 @@ StaticNpc N(npcGroup_80241E08)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.unk_1E0 = { 00, 00, 00, 02, 00, 00, 00, 00},
|
||||
.extraAnimations = &N(extraAnimationList_80241B6C),
|
||||
.extraAnimations = N(extraAnimationList_80241B6C),
|
||||
},
|
||||
{
|
||||
.id = NPC_WORLD_CLUBBA1,
|
||||
@ -335,7 +335,7 @@ StaticNpc N(npcGroup_80241E08)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_80241B94),
|
||||
.extraAnimations = N(extraAnimationList_80241B94),
|
||||
},
|
||||
};
|
||||
|
||||
@ -403,7 +403,7 @@ StaticNpc N(npcGroup_802421E8)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_80241B94),
|
||||
.extraAnimations = N(extraAnimationList_80241B94),
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -24,10 +24,10 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.tattle = MSG_dgb_03_tattle,
|
||||
.tattle = { MSG_dgb_03_tattle },
|
||||
};
|
||||
|
||||
Script N(80242870) = SCRIPT({
|
||||
@ -430,8 +430,8 @@ NpcSettings N(npcSettings_80243AFC) = {
|
||||
.height = 36,
|
||||
.radius = 34,
|
||||
.ai = &N(npcAI_80243A8C),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 13,
|
||||
};
|
||||
|
||||
@ -462,8 +462,8 @@ NpcSettings N(npcSettings_80243BC8) = {
|
||||
.height = 36,
|
||||
.radius = 34,
|
||||
.ai = &N(npcAI_80243B58),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 13,
|
||||
};
|
||||
|
||||
@ -494,8 +494,8 @@ NpcSettings N(npcSettings_80243C94) = {
|
||||
.height = 36,
|
||||
.radius = 34,
|
||||
.ai = &N(npcAI_80243C24),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 13,
|
||||
};
|
||||
|
||||
@ -590,7 +590,7 @@ StaticNpc N(npcGroup_80243DE8)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_80243A54),
|
||||
.extraAnimations = N(extraAnimationList_80243A54),
|
||||
},
|
||||
};
|
||||
|
||||
@ -658,7 +658,7 @@ StaticNpc N(npcGroup_802441C8)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_80243A54),
|
||||
.extraAnimations = N(extraAnimationList_80243A54),
|
||||
},
|
||||
};
|
||||
|
||||
@ -727,7 +727,7 @@ StaticNpc N(npcGroup_802445A8)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_80243A54),
|
||||
.extraAnimations = N(extraAnimationList_80243A54),
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -12,8 +12,8 @@ ApiStatus N(func_80242480_C33960)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(SetEntityFlags100000)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(GetEntityPosition)(ScriptInstance* script, s32 isInitialCall);
|
||||
|
||||
NpcGroupList N(npcGroupList_80244988);
|
||||
Script N(80243608);
|
||||
Script N(80243740);
|
||||
Script N(main);
|
||||
Script N(makeEntities);
|
||||
extern NpcGroupList N(npcGroupList_80244988);
|
||||
extern Script N(80243608);
|
||||
extern Script N(80243740);
|
||||
extern Script N(main);
|
||||
extern Script N(makeEntities);
|
||||
|
@ -16,10 +16,10 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.tattle = MSG_dgb_04_tattle,
|
||||
.tattle = { MSG_dgb_04_tattle },
|
||||
};
|
||||
|
||||
Script N(80243170) = SCRIPT({
|
||||
|
@ -17,10 +17,10 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.tattle = MSG_dgb_05_tattle,
|
||||
.tattle = { MSG_dgb_05_tattle },
|
||||
};
|
||||
|
||||
Script N(802414E0) = SCRIPT({
|
||||
@ -167,8 +167,8 @@ NpcSettings N(npcSettings_80241A4C) = {
|
||||
.height = 36,
|
||||
.radius = 34,
|
||||
.ai = &N(npcAI_802419DC),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 13,
|
||||
};
|
||||
|
||||
@ -256,7 +256,7 @@ StaticNpc N(npcGroup_80241B4C)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_802419A4),
|
||||
.extraAnimations = N(extraAnimationList_802419A4),
|
||||
},
|
||||
};
|
||||
|
||||
@ -324,7 +324,7 @@ StaticNpc N(npcGroup_80241F2C)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_802419A4),
|
||||
.extraAnimations = N(extraAnimationList_802419A4),
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -12,10 +12,10 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.tattle = MSG_dgb_06_tattle,
|
||||
.tattle = { MSG_dgb_06_tattle },
|
||||
};
|
||||
|
||||
Script N(80240320) = SCRIPT({
|
||||
|
@ -16,10 +16,10 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.tattle = MSG_dgb_07_tattle,
|
||||
.tattle = { MSG_dgb_07_tattle },
|
||||
};
|
||||
|
||||
Script N(80241490) = SCRIPT({
|
||||
@ -154,8 +154,8 @@ NpcSettings N(npcSettings_8024197C) = {
|
||||
.height = 36,
|
||||
.radius = 34,
|
||||
.ai = &N(npcAI_8024190C),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 13,
|
||||
};
|
||||
|
||||
@ -215,7 +215,7 @@ StaticNpc N(npcGroup_80241A7C)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.unk_1E0 = { 00, 00, 00, 02, 00, 00, 00, 00},
|
||||
.extraAnimations = &N(extraAnimationList_802418AC),
|
||||
.extraAnimations = N(extraAnimationList_802418AC),
|
||||
},
|
||||
{
|
||||
.id = NPC_WORLD_CLUBBA1,
|
||||
@ -244,7 +244,7 @@ StaticNpc N(npcGroup_80241A7C)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_802418D4),
|
||||
.extraAnimations = N(extraAnimationList_802418D4),
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -26,10 +26,10 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.tattle = MSG_dgb_08_tattle,
|
||||
.tattle = { MSG_dgb_08_tattle },
|
||||
};
|
||||
|
||||
Script N(80243CF0) = SCRIPT({
|
||||
@ -148,16 +148,16 @@ NpcSettings N(npcSettings_80244150) = {
|
||||
.height = 90,
|
||||
.radius = 65,
|
||||
.ai = &N(80244130),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 13,
|
||||
};
|
||||
|
||||
NpcSettings N(npcSettings_8024417C) = {
|
||||
.height = 90,
|
||||
.radius = 65,
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 13,
|
||||
};
|
||||
|
||||
@ -229,8 +229,8 @@ NpcSettings N(npcSettings_80244360) = {
|
||||
.height = 36,
|
||||
.radius = 34,
|
||||
.ai = &N(npcAI_802442F0),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 13,
|
||||
};
|
||||
|
||||
@ -560,7 +560,7 @@ StaticNpc N(npcGroup_80245290)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.unk_1E0 = { 00, 00, 00, 02, 00, 00, 00, 00},
|
||||
.extraAnimations = &N(extraAnimationList_80244290),
|
||||
.extraAnimations = N(extraAnimationList_80244290),
|
||||
},
|
||||
{
|
||||
.id = NPC_WORLD_CLUBBA1,
|
||||
@ -589,7 +589,7 @@ StaticNpc N(npcGroup_80245290)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_802442B8),
|
||||
.extraAnimations = N(extraAnimationList_802442B8),
|
||||
},
|
||||
};
|
||||
|
||||
@ -629,7 +629,7 @@ StaticNpc N(npcGroup_80245670)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.unk_1E0 = { 00, 00, 00, 02, 00, 00, 00, 00},
|
||||
.extraAnimations = &N(extraAnimationList_80244290),
|
||||
.extraAnimations = N(extraAnimationList_80244290),
|
||||
},
|
||||
{
|
||||
.id = NPC_WORLD_CLUBBA3,
|
||||
@ -658,7 +658,7 @@ StaticNpc N(npcGroup_80245670)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_802442B8),
|
||||
.extraAnimations = N(extraAnimationList_802442B8),
|
||||
},
|
||||
};
|
||||
|
||||
@ -698,7 +698,7 @@ StaticNpc N(npcGroup_80245A50)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.unk_1E0 = { 00, 00, 00, 03, 00, 00, 00, 00},
|
||||
.extraAnimations = &N(extraAnimationList_80244290),
|
||||
.extraAnimations = N(extraAnimationList_80244290),
|
||||
},
|
||||
{
|
||||
.id = NPC_WORLD_CLUBBA5,
|
||||
@ -727,7 +727,7 @@ StaticNpc N(npcGroup_80245A50)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_802442B8),
|
||||
.extraAnimations = N(extraAnimationList_802442B8),
|
||||
},
|
||||
};
|
||||
|
||||
@ -923,7 +923,7 @@ StaticNpc N(npcGroup_80246768) = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.unk_1E0 = { 00, 00, 00, 02, 00, 00, 00, 00},
|
||||
.extraAnimations = &N(extraAnimationList_80244290),
|
||||
.extraAnimations = N(extraAnimationList_80244290),
|
||||
};
|
||||
|
||||
NpcGroupList N(npcGroupList_80246958) = {
|
||||
|
@ -22,10 +22,10 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.tattle = MSG_dgb_09_tattle,
|
||||
.tattle = { MSG_dgb_09_tattle },
|
||||
};
|
||||
|
||||
Script N(80243880) = SCRIPT({
|
||||
@ -243,8 +243,8 @@ NpcSettings N(npcSettings_8024418C) = {
|
||||
.height = 36,
|
||||
.radius = 34,
|
||||
.ai = &N(npcAI_8024411C),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 13,
|
||||
};
|
||||
|
||||
@ -275,8 +275,8 @@ NpcSettings N(npcSettings_80244258) = {
|
||||
.height = 36,
|
||||
.radius = 34,
|
||||
.ai = &N(npcAI_802441E8),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 13,
|
||||
};
|
||||
|
||||
@ -450,7 +450,7 @@ StaticNpc N(npcGroup_80244920)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.unk_1E0 = { 00, 00, 00, 02, 00, 00, 00, 00},
|
||||
.extraAnimations = &N(extraAnimationList_802440BC),
|
||||
.extraAnimations = N(extraAnimationList_802440BC),
|
||||
},
|
||||
{
|
||||
.id = NPC_WORLD_CLUBBA1,
|
||||
@ -479,7 +479,7 @@ StaticNpc N(npcGroup_80244920)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_802440E4),
|
||||
.extraAnimations = N(extraAnimationList_802440E4),
|
||||
},
|
||||
};
|
||||
|
||||
@ -528,7 +528,7 @@ StaticNpc N(npcGroup_80244D6C)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.unk_1E0 = { 00, 00, 00, 02, 00, 00, 00, 00},
|
||||
.extraAnimations = &N(extraAnimationList_802440BC),
|
||||
.extraAnimations = N(extraAnimationList_802440BC),
|
||||
},
|
||||
{
|
||||
.id = NPC_WORLD_CLUBBA3,
|
||||
@ -557,7 +557,7 @@ StaticNpc N(npcGroup_80244D6C)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_802440E4),
|
||||
.extraAnimations = N(extraAnimationList_802440E4),
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -7,10 +7,10 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.tattle = MSG_dgb_10_tattle,
|
||||
.tattle = { MSG_dgb_10_tattle },
|
||||
};
|
||||
|
||||
Script N(80240250) = SCRIPT({
|
||||
|
@ -11,10 +11,10 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.tattle = MSG_dgb_11_tattle,
|
||||
.tattle = { MSG_dgb_11_tattle },
|
||||
};
|
||||
|
||||
Script N(802400D0) = SCRIPT({
|
||||
|
@ -6,10 +6,10 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.tattle = MSG_dgb_12_tattle,
|
||||
.tattle = { MSG_dgb_12_tattle },
|
||||
};
|
||||
|
||||
Script N(80240310) = SCRIPT({
|
||||
|
@ -6,10 +6,10 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.tattle = MSG_dgb_13_tattle,
|
||||
.tattle = { MSG_dgb_13_tattle },
|
||||
};
|
||||
|
||||
Script N(80240050) = SCRIPT({
|
||||
|
@ -7,10 +7,10 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.tattle = MSG_dgb_14_tattle,
|
||||
.tattle = { MSG_dgb_14_tattle },
|
||||
};
|
||||
|
||||
Script N(80240060) = SCRIPT({
|
||||
|
@ -15,10 +15,10 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.tattle = MSG_dgb_15_tattle,
|
||||
.tattle = { MSG_dgb_15_tattle },
|
||||
};
|
||||
|
||||
Script N(802418E0) = SCRIPT({
|
||||
@ -210,8 +210,8 @@ s32 N(unk_missing_80242100)[] = {
|
||||
NpcSettings N(npcSettings_8024212C) = {
|
||||
.height = 90,
|
||||
.radius = 65,
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 13,
|
||||
};
|
||||
|
||||
|
@ -25,10 +25,10 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.tattle = MSG_dgb_16_tattle,
|
||||
.tattle = { MSG_dgb_16_tattle },
|
||||
};
|
||||
|
||||
Script N(80241480) = SCRIPT({
|
||||
@ -170,8 +170,8 @@ NpcSettings N(npcSettings_8024194C) = {
|
||||
.height = 36,
|
||||
.radius = 34,
|
||||
.ai = &N(npcAI_802418DC),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 13,
|
||||
};
|
||||
|
||||
@ -231,7 +231,7 @@ StaticNpc N(npcGroup_80241A4C)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.unk_1E0 = { 00, 00, 00, 02, 00, 00, 00, 00},
|
||||
.extraAnimations = &N(extraAnimationList_8024187C),
|
||||
.extraAnimations = N(extraAnimationList_8024187C),
|
||||
},
|
||||
{
|
||||
.id = NPC_WORLD_CLUBBA1,
|
||||
@ -260,7 +260,7 @@ StaticNpc N(npcGroup_80241A4C)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_802418A4),
|
||||
.extraAnimations = N(extraAnimationList_802418A4),
|
||||
},
|
||||
};
|
||||
|
||||
@ -328,7 +328,7 @@ StaticNpc N(npcGroup_80241E2C)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_802418A4),
|
||||
.extraAnimations = N(extraAnimationList_802418A4),
|
||||
},
|
||||
};
|
||||
|
||||
@ -396,7 +396,7 @@ StaticNpc N(npcGroup_8024220C)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_802418A4),
|
||||
.extraAnimations = N(extraAnimationList_802418A4),
|
||||
},
|
||||
};
|
||||
|
||||
@ -464,7 +464,7 @@ StaticNpc N(npcGroup_802425EC)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_802418A4),
|
||||
.extraAnimations = N(extraAnimationList_802418A4),
|
||||
},
|
||||
};
|
||||
|
||||
@ -532,7 +532,7 @@ StaticNpc N(npcGroup_802429CC)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_802418A4),
|
||||
.extraAnimations = N(extraAnimationList_802418A4),
|
||||
},
|
||||
};
|
||||
|
||||
@ -600,7 +600,7 @@ StaticNpc N(npcGroup_80242DAC)[] = {
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
NPC_ANIM(world_clubba, Palette_00, Anim_2),
|
||||
},
|
||||
.extraAnimations = &N(extraAnimationList_802418A4),
|
||||
.extraAnimations = N(extraAnimationList_802418A4),
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -6,6 +6,6 @@
|
||||
ApiStatus N(func_80240E20_C53360)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(update_starpoints_display_C528FC)(ScriptInstance* script, s32 isInitialCall);
|
||||
|
||||
NpcGroupList N(npcGroupList_8024318C);
|
||||
Script N(80241780);
|
||||
Script N(main);
|
||||
extern NpcGroupList N(npcGroupList_8024318C);
|
||||
extern Script N(80241780);
|
||||
extern Script N(main);
|
||||
|
@ -7,10 +7,10 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.tattle = MSG_dgb_17_tattle,
|
||||
.tattle = { MSG_dgb_17_tattle },
|
||||
};
|
||||
|
||||
Script N(80240060) = SCRIPT({
|
||||
|
@ -3,5 +3,5 @@
|
||||
|
||||
#define NAMESPACE dgb_17
|
||||
|
||||
Script N(main);
|
||||
Script N(makeEntities);
|
||||
extern Script N(main);
|
||||
extern Script N(makeEntities);
|
||||
|
@ -18,10 +18,10 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.tattle = 0x1900D2,
|
||||
.tattle = { MSG_dgb_18_tattle },
|
||||
};
|
||||
|
||||
Script N(802412C0) = SCRIPT({
|
||||
@ -107,16 +107,16 @@ NpcSettings N(npcSettings_802415D0) = {
|
||||
.height = 90,
|
||||
.radius = 65,
|
||||
.ai = &N(802415B0),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 13,
|
||||
};
|
||||
|
||||
NpcSettings N(npcSettings_802415FC) = {
|
||||
.height = 90,
|
||||
.radius = 65,
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 13,
|
||||
};
|
||||
|
||||
|
@ -6,9 +6,9 @@
|
||||
ApiStatus N(UnkFunc1)(ScriptInstance* script, s32 isInitialCall);
|
||||
ApiStatus N(func_80240B94_C56AD4)(ScriptInstance* script, s32 isInitialCall);
|
||||
|
||||
NpcGroupList N(npcGroupList_802436B4);
|
||||
Script N(main);
|
||||
Script N(makeEntities);
|
||||
Script N(npcAI_80242834);
|
||||
extern NpcGroupList N(npcGroupList_802436B4);
|
||||
extern Script N(main);
|
||||
extern Script N(makeEntities);
|
||||
extern Script N(npcAI_80242834);
|
||||
|
||||
s32 N(D_802436E0_C59620);
|
||||
extern s32 N(D_802436E0_C59620);
|
||||
|
@ -56,11 +56,11 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.background = &gBackgroundImage,
|
||||
.tattle = MSG_kmr_03_tattle,
|
||||
.tattle = { MSG_kmr_03_tattle },
|
||||
};
|
||||
|
||||
Script N(802406C0) = SCRIPT({
|
||||
|
@ -10,7 +10,7 @@ Script N(BindExits) = SCRIPT({
|
||||
bind N(ExitEast) to TRIGGER_FLOOR_ABOVE 3; // deili2
|
||||
});
|
||||
|
||||
Script N(Main) = SCRIPT({
|
||||
Script N(main) = SCRIPT({
|
||||
WORLD_LOCATION = LOCATION_GOOMBA_ROAD;
|
||||
SetSpriteShading(-1);
|
||||
SetCamPerspective(0, 3, 25, 16, 4096);
|
||||
|
@ -7,11 +7,11 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(Main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.background = &gBackgroundImage,
|
||||
.tattle = MSG_kmr_12_tattle,
|
||||
.tattle = { MSG_kmr_12_tattle },
|
||||
};
|
||||
|
||||
Script N(PlayMusic) = SCRIPT({
|
||||
|
@ -9,11 +9,11 @@
|
||||
#define GetGoomba N(GetGoomba)
|
||||
ApiStatus GetGoomba(ScriptInstance* script, s32 isInitialCall);
|
||||
|
||||
MapConfig N(config);
|
||||
extern MapConfig N(config);
|
||||
|
||||
Script N(Main);
|
||||
Script N(PlayMusic);
|
||||
Script N(MakeEntities);
|
||||
Script N(ReadWestSign);
|
||||
extern Script N(main);
|
||||
extern Script N(PlayMusic);
|
||||
extern Script N(MakeEntities);
|
||||
extern Script N(ReadWestSign);
|
||||
|
||||
NpcGroupList N(npcGroupList);
|
||||
extern NpcGroupList N(npcGroupList);
|
||||
|
@ -14,11 +14,11 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.background = &gBackgroundImage,
|
||||
.tattle = MSG_sbk_00_tattle,
|
||||
.tattle = { MSG_sbk_00_tattle },
|
||||
};
|
||||
|
||||
Script N(exitWalk_802400E0) = EXIT_WALK_SCRIPT(60, 1, "sbk_01", 0);
|
||||
|
@ -25,8 +25,8 @@ NpcSettings N(npcSettings_8024035C) = {
|
||||
.height = 72,
|
||||
.radius = 15,
|
||||
.ai = &N(npcAI_80240330),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 9,
|
||||
};
|
||||
|
||||
|
@ -3,9 +3,6 @@
|
||||
|
||||
#include "world/common/SpawnSunEffect.inc.c"
|
||||
|
||||
Script N(main);
|
||||
NpcGroupList N(npcGroupList_802407D8);
|
||||
|
||||
EntryList N(entryList) = {
|
||||
{ -475.0f, 0.0f, 0.0f, 90.0f },
|
||||
{ 475.0f, 0.0f, 0.0f, 270.0f },
|
||||
@ -14,11 +11,11 @@ EntryList N(entryList) = {
|
||||
};
|
||||
|
||||
MapConfig N(config) = {
|
||||
.main = N(main),
|
||||
.entryList = N(entryList),
|
||||
.main = &N(main),
|
||||
.entryList = &N(entryList),
|
||||
.entryCount = ENTRY_COUNT(N(entryList)),
|
||||
.background = &gBackgroundImage,
|
||||
.tattle = MSG_sbk_01_tattle,
|
||||
.tattle = { MSG_sbk_01_tattle },
|
||||
};
|
||||
|
||||
Script N(exitWalk_802400E0) = EXIT_WALK_SCRIPT(60, 0, "sbk_00", 1);
|
||||
|
@ -25,8 +25,8 @@ NpcSettings N(npcSettings_802403CC) = {
|
||||
.height = 72,
|
||||
.radius = 15,
|
||||
.ai = &N(npcAI_802403A0),
|
||||
.onHit = EnemyNpcHit,
|
||||
.onDefeat = EnemyNpcDefeat,
|
||||
.onHit = &EnemyNpcHit,
|
||||
.onDefeat = &EnemyNpcDefeat,
|
||||
.level = 9,
|
||||
};
|
||||
|
||||
|
@ -2,3 +2,6 @@
|
||||
#include "map.h"
|
||||
|
||||
#define NAMESPACE sbk_01
|
||||
|
||||
extern Script N(main);
|
||||
extern NpcGroupList N(npcGroupList_802407D8);
|
||||
|
@ -1,8 +1,10 @@
|
||||
#include "common.h"
|
||||
#include "map.h"
|
||||
|
||||
// TODO: name these; they are bush-related
|
||||
|
||||
void N(SomeMatrixOperation)(Matrix4f mtx, f32 arg1, f32 arg2, f32 arg3) {
|
||||
guMtxIdentF(*mtx);
|
||||
guMtxIdentF(mtx);
|
||||
mtx[1][0] = arg1 * arg2;
|
||||
mtx[1][1] = 1.0f;
|
||||
mtx[1][2] = arg1 * arg3;
|
||||
@ -20,15 +22,15 @@ ApiStatus N(SomeMatrixOperation2)(ScriptInstance* script, s32 isInitialCall) {
|
||||
|
||||
if (!(model->flags & 0x400)) {
|
||||
guTranslateF(model->transformMatrix, 0.0f, temp_f22, 0.0f);
|
||||
N(SomeMatrixOperation)(&mtx, temp_f28, temp_f26, temp_f24);
|
||||
N(SomeMatrixOperation)(mtx, temp_f28, temp_f26, temp_f24);
|
||||
guMtxCatF(mtx, model->transformMatrix, model->transformMatrix);
|
||||
guTranslateF(&mtx, 0.0f, -temp_f22, 0.0f);
|
||||
guTranslateF(mtx, 0.0f, -temp_f22, 0.0f);
|
||||
guMtxCatF(mtx, model->transformMatrix, model->transformMatrix);
|
||||
model->flags |= 0x1400;
|
||||
} else {
|
||||
guTranslateF(mtx, 0.0f, temp_f22, 0.0f);
|
||||
guMtxCatF(mtx, model->transformMatrix, model->transformMatrix);
|
||||
N(SomeMatrixOperation)(&mtx, temp_f28, temp_f26, temp_f24);
|
||||
N(SomeMatrixOperation)(mtx, temp_f28, temp_f26, temp_f24);
|
||||
guMtxCatF(mtx, model->transformMatrix, model->transformMatrix);
|
||||
guTranslateF(mtx, 0.0f, -temp_f22, 0.0f);
|
||||
guMtxCatF(mtx, model->transformMatrix, model->transformMatrix);
|
||||
|
@ -8,7 +8,7 @@ ApiStatus N(UnkFunc20)(ScriptInstance *script, s32 isInitialCall) {
|
||||
s32 si_var = *args++;
|
||||
Effect* effect = func_80071750(0, entity->position.x, entity->position.y + 12.5f, entity->position.z, 0.7f, 0);
|
||||
|
||||
set_variable(script, si_var, effect);
|
||||
set_variable(script, si_var, (s32) effect);
|
||||
|
||||
return ApiStatus_DONE2;
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ ApiStatus N(UnkMusicFunc)(ScriptInstance* script, s32 isInitialCall) {
|
||||
script->functionTemp[2].s = ((s32*)(script->functionTemp[0].s))[5];
|
||||
}
|
||||
|
||||
something = script->functionTemp[0].s;
|
||||
something = (X32*) script->functionTemp[0].s;
|
||||
|
||||
if (get_variable(script, script->functionTemp[2].s)) {
|
||||
if (script->functionTemp[1].s != 2) {
|
||||
|
@ -1,12 +1,12 @@
|
||||
#include "common.h"
|
||||
#include "map.h"
|
||||
|
||||
void N(UnkNpcAIFunc11)(ScriptInstance* script, NpcAISettings* aiSettings, s32 arg2) {
|
||||
void N(UnkNpcAIFunc11)(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* arg2) {
|
||||
Enemy* enemy = script->owner1.enemy;
|
||||
Npc* npc = get_npc_unsafe(enemy->npcID);
|
||||
|
||||
if (func_800490B4(arg2, enemy, aiSettings->chaseSpeed, aiSettings->unk_1C.f, 1) == 0) {
|
||||
s32* something;
|
||||
s32 something;
|
||||
|
||||
fx_emote(2, npc, 0.0f, npc->collisionHeight, 1.0f, 2.0f, -20.0f, 0xF, &something);
|
||||
npc->currentAnim = enemy->animList[0];
|
||||
|
@ -111,7 +111,7 @@ void N(reflection_setup_wall)(void) {
|
||||
|
||||
renderTaskPtr->renderMode = renderMode;
|
||||
renderTaskPtr->appendGfxArg = playerStatus;
|
||||
renderTaskPtr->appendGfx = N(reflection_render_wall);
|
||||
renderTaskPtr->appendGfx = (void (*)(void *)) N(reflection_render_wall);
|
||||
renderTaskPtr->distance = -screenZ;
|
||||
queue_render_task(renderTaskPtr);
|
||||
}
|
||||
@ -189,7 +189,7 @@ void N(reflection_setup_floor)(void) {
|
||||
renderTaskPtr->renderMode = renderMode;
|
||||
renderTaskPtr->appendGfxArg = playerStatus;
|
||||
renderTaskPtr->distance = -screenZ;
|
||||
renderTaskPtr->appendGfx = !(playerStatus->flags & 0x20000) ? N(reflection_render_floor) : N(reflection_render_floor_fancy);
|
||||
renderTaskPtr->appendGfx = (void (*)(void *)) (!(playerStatus->flags & 0x20000) ? N(reflection_render_floor) : N(reflection_render_floor_fancy));
|
||||
queue_render_task(renderTaskPtr);
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ def disassemble(bytes, midx, symbol_map={}, comments=True, romstart=0):
|
||||
|
||||
bytes.seek(pos)
|
||||
script_text = disasm_script.ScriptDisassembler(bytes, name, symbol_map, romstart, INCLUDES_NEEDED, INCLUDED).disassemble()
|
||||
|
||||
|
||||
if try_replace and "exitWalk" in name:
|
||||
script_text = script_text.splitlines()
|
||||
walkDistance = exitIdx = map_ = entryIdx = ""
|
||||
@ -128,7 +128,7 @@ def disassemble(bytes, midx, symbol_map={}, comments=True, romstart=0):
|
||||
tmp_out = f"NpcSettings {name} = {{\n"
|
||||
npcSettings = bytes.read(struct["length"])
|
||||
|
||||
i = 0
|
||||
i = 0
|
||||
while i < struct["length"]:
|
||||
if i == 0x0 or i == 0x24:
|
||||
var_names = ["unk_00", "unk_24"]
|
||||
@ -169,7 +169,7 @@ def disassemble(bytes, midx, symbol_map={}, comments=True, romstart=0):
|
||||
"chaseSpeed", "unk_1C", "unk_20", "chaseRadius", "unk_28", "unk_2C"]
|
||||
while i < struct["length"]:
|
||||
var_f, var_i1, var_i2 = unpack_from(f">fii", npcAISettings, i)
|
||||
if not var_f == 0:
|
||||
if not var_f == 0:
|
||||
tmp_out += INDENT + f".{var_names[x]} = {var_f:.01f}f,\n"
|
||||
if not var_i1 == 0:
|
||||
# account for X32
|
||||
@ -195,10 +195,10 @@ def disassemble(bytes, midx, symbol_map={}, comments=True, romstart=0):
|
||||
|
||||
for z in range(numNpcs):
|
||||
i = 0
|
||||
var_names = ["id", "settings", "pos", "flags",
|
||||
"init", "unk_1C", "yaw", "dropFlags",
|
||||
"itemDropChance", "itemDrops", "heartDrops", "flowerDrops",
|
||||
"minCoinBonus", "maxCoinBonus", "movement", "animations",
|
||||
var_names = ["id", "settings", "pos", "flags",
|
||||
"init", "unk_1C", "yaw", "dropFlags",
|
||||
"itemDropChance", "itemDrops", "heartDrops", "flowerDrops",
|
||||
"minCoinBonus", "maxCoinBonus", "movement", "animations",
|
||||
"unk_1E0", "extraAnimations", "tattle"]
|
||||
|
||||
if numNpcs > 1:
|
||||
@ -375,7 +375,7 @@ def disassemble(bytes, midx, symbol_map={}, comments=True, romstart=0):
|
||||
elif struct["type"] == "NpcGroupList":
|
||||
tmp_out = f"NpcGroupList {name} = {{\n"
|
||||
npcGroupList = bytes.read(struct["length"])
|
||||
|
||||
|
||||
i = 0
|
||||
while i < struct["length"]:
|
||||
npcCount, npcs, battle = unpack_from(">3I", npcGroupList, i)
|
||||
@ -405,8 +405,8 @@ def disassemble(bytes, midx, symbol_map={}, comments=True, romstart=0):
|
||||
bytes.read(0x10)
|
||||
|
||||
main,entry_list,entry_count = unpack(">IIi", bytes.read(4 * 3))
|
||||
out += f" .main = N(main),\n"
|
||||
out += f" .entryList = {entry_list_name},\n"
|
||||
out += f" .main = &N(main),\n"
|
||||
out += f" .entryList = &{entry_list_name},\n"
|
||||
out += f" .entryCount = ENTRY_COUNT({entry_list_name}),\n"
|
||||
|
||||
bytes.read(0x1C)
|
||||
@ -416,7 +416,7 @@ def disassemble(bytes, midx, symbol_map={}, comments=True, romstart=0):
|
||||
out += f" .background = &gBackgroundImage,\n"
|
||||
elif bg != 0:
|
||||
raise Exception(f"unknown MapConfig background {bg:X}")
|
||||
out += f" .tattle = 0x{tattle:X},\n"
|
||||
out += f" .tattle = {{ 0x{tattle:X} }},\n"
|
||||
|
||||
out += f"}};\n"
|
||||
afterHeader = True
|
||||
@ -600,9 +600,9 @@ if __name__ == "__main__":
|
||||
midx = parse_midx(f, vram=vram)
|
||||
|
||||
with open(os.path.join(DIR, "../ver/current/baserom.z64"), "rb") as romfile:
|
||||
name_fixes = {
|
||||
"script_NpcAI": "npcAI",
|
||||
"aISettings": "npcAISettings",
|
||||
name_fixes = {
|
||||
"script_NpcAI": "npcAI",
|
||||
"aISettings": "npcAISettings",
|
||||
"script_ExitWalk": "exitWalk",
|
||||
"script_MakeEntities": "makeEntities",
|
||||
}
|
||||
@ -611,7 +611,7 @@ if __name__ == "__main__":
|
||||
romfile.seek(struct["start"] + rom_offset)
|
||||
|
||||
name = struct["name"]
|
||||
|
||||
|
||||
if name.startswith("N("):
|
||||
name = name[2:-1]
|
||||
|
||||
@ -675,14 +675,14 @@ if __name__ == "__main__":
|
||||
name = f"NPC_{name}"
|
||||
disasm_script.CONSTANTS["MAP_NPCS"][id_] = name
|
||||
INCLUDES_NEEDED["npcs"][id_] = name
|
||||
|
||||
|
||||
for id_, name in disasm_script.CONSTANTS["NpcIDs"].items():
|
||||
disasm_script.CONSTANTS["MAP_NPCS"][id_] = name
|
||||
|
||||
romfile.seek(rom_offset, 0)
|
||||
|
||||
disasm = disassemble(romfile, midx, symbol_map, args.comments, rom_offset)
|
||||
|
||||
|
||||
print("========== Includes needed: ===========\n")
|
||||
print(f"#include \"map.h\"")
|
||||
print(f"#include \"message_ids.h\"")
|
||||
@ -690,7 +690,7 @@ if __name__ == "__main__":
|
||||
for npc in sorted(INCLUDES_NEEDED["sprites"]):
|
||||
print(f"#include \"sprite/npc/{npc}.h\"")
|
||||
print()
|
||||
|
||||
|
||||
if INCLUDES_NEEDED["forward"]:
|
||||
print()
|
||||
print("========== Forward declares: ==========\n")
|
||||
@ -711,4 +711,4 @@ if __name__ == "__main__":
|
||||
print("=======================================\n")
|
||||
print(disasm.rstrip())
|
||||
|
||||
|
||||
|
||||
|
@ -4,8 +4,7 @@
|
||||
.section .rodata
|
||||
|
||||
glabel D_80243170_EDBF90
|
||||
.ascii "[%d] dokan get pos (no=%d) pos=%d, %d, %d, dir=%d
|
||||
\0\0\0flo_23\0\0flo_12\0\0flo_11\0\0"
|
||||
.ascii "[%d] dokan get pos (no=%d) pos=%d, %d, %d, dir=%d\n\0\0\0flo_23\0\0flo_12\0\0flo_11\0\0"
|
||||
|
||||
.section .text
|
||||
|
||||
|
@ -45,7 +45,7 @@ segments:
|
||||
- [0x3bf0, c, 3bf0_len_6f0]
|
||||
- [0x42e0, c, 42e0_len_1f60]
|
||||
- [0x43F0, c]
|
||||
- [0x6000, c, 6000]
|
||||
- [0x6000, c, heap]
|
||||
- [0x6240, c, 6240_len_c00]
|
||||
- [0x6e40, c, 6e40_len_500]
|
||||
- [0x7340, c, 7340_len_b00]
|
||||
|
Loading…
Reference in New Issue
Block a user