mirror of
https://github.com/pmret/papermario.git
synced 2024-11-09 12:32:38 +01:00
dead_sqrtf, data migration, etc (#790)
* more goods * move dead map data to dir * data migration / splatification * new splat * git subrepo pull --force tools/splat subrepo: subdir: "tools/splat" merged: "d93b6550c4" upstream: origin: "https://github.com/ethteck/splat.git" branch: "master" commit: "d93b6550c4" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo" commit: "2f68596" * splat fix * dead_sqrtf bye bye * fix * Clover comments * comment
This commit is contained in:
parent
50ab50f669
commit
473bfa0692
@ -127,9 +127,9 @@ typedef struct CamPosSettings {
|
|||||||
} CamPosSettings; // size = 0x1C
|
} CamPosSettings; // size = 0x1C
|
||||||
|
|
||||||
typedef struct DmaTable {
|
typedef struct DmaTable {
|
||||||
/* 0x00 */ s32 dmaStart;
|
/* 0x00 */ s32 start;
|
||||||
/* 0x04 */ s32 dmaEnd;
|
/* 0x04 */ s32 end;
|
||||||
/* 0x08 */ s32 dmaDest;
|
/* 0x08 */ s32 dest;
|
||||||
} DmaTable;
|
} DmaTable;
|
||||||
|
|
||||||
typedef struct UseItemStruct {
|
typedef struct UseItemStruct {
|
||||||
@ -2476,18 +2476,4 @@ typedef struct CreditsUnkBeta {
|
|||||||
/* 0x02 */ s16 size;
|
/* 0x02 */ s16 size;
|
||||||
} CreditsUnkBeta; // size = 0x4
|
} CreditsUnkBeta; // size = 0x4
|
||||||
|
|
||||||
typedef struct TempE20110 {
|
|
||||||
/* 0x00 */ Vec3f pos;
|
|
||||||
/* 0x0C */ f32 scale;
|
|
||||||
/* 0x10 */ f32 unk_10;
|
|
||||||
/* 0x14 */ char unk_14[0x4];
|
|
||||||
/* 0x18 */ s32 unk_18;
|
|
||||||
/* 0x1C */ s32 unk_1C;
|
|
||||||
/* 0x20 */ s8 unk_20;
|
|
||||||
/* 0x21 */ s8 unk_21;
|
|
||||||
/* 0x22 */ s8 unk_22;
|
|
||||||
/* 0x23 */ s8 unk_23;
|
|
||||||
/* 0x24 */ s32 unk_24;
|
|
||||||
} TempE20110; // size = 0x28
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -79,7 +79,7 @@
|
|||||||
#define gOverrideFlags dead_gOverrideFlags
|
#define gOverrideFlags dead_gOverrideFlags
|
||||||
#define set_message_msg dead_set_message_msg
|
#define set_message_msg dead_set_message_msg
|
||||||
#define gPlayerData dead_gPlayerData
|
#define gPlayerData dead_gPlayerData
|
||||||
#define gPartnerPopupProperties D_80094900
|
#define gPartnerPopupProperties dead_gPartnerPopupProperties
|
||||||
#define increment_status_menu_disabled dead_increment_status_menu_disabled
|
#define increment_status_menu_disabled dead_increment_status_menu_disabled
|
||||||
#define decrement_status_menu_disabled dead_decrement_status_menu_disabled
|
#define decrement_status_menu_disabled dead_decrement_status_menu_disabled
|
||||||
#define sync_status_menu dead_sync_status_menu
|
#define sync_status_menu dead_sync_status_menu
|
||||||
|
@ -1086,6 +1086,7 @@ enum SoundIDs {
|
|||||||
SOUND_2072 = 0x00002072,
|
SOUND_2072 = 0x00002072,
|
||||||
SOUND_2073 = 0x00002073,
|
SOUND_2073 = 0x00002073,
|
||||||
SOUND_2074 = 0x00002074,
|
SOUND_2074 = 0x00002074,
|
||||||
|
SOUND_2075 = 0x00002075,
|
||||||
SOUND_BOMB_BLAST = 0x00002076,
|
SOUND_BOMB_BLAST = 0x00002076,
|
||||||
SOUND_207A = 0x0000207A,
|
SOUND_207A = 0x0000207A,
|
||||||
SOUND_207B = 0x0000207B,
|
SOUND_207B = 0x0000207B,
|
||||||
|
@ -148,7 +148,7 @@ typedef struct NpcSettings {
|
|||||||
typedef struct ItemDrop {
|
typedef struct ItemDrop {
|
||||||
/* 0x00 */ s16 item;
|
/* 0x00 */ s16 item;
|
||||||
/* 0x02 */ s16 weight;
|
/* 0x02 */ s16 weight;
|
||||||
/* 0x04 */ s16 unk_08;
|
/* 0x04 */ s16 unk_04;
|
||||||
} ItemDrop; // size = 0x06
|
} ItemDrop; // size = 0x06
|
||||||
|
|
||||||
/// @brief Describes heart/flower drop chances after defeating an Npc in the overworld.
|
/// @brief Describes heart/flower drop chances after defeating an Npc in the overworld.
|
||||||
|
@ -280,6 +280,7 @@ ApiStatus func_802D2884(Evt* script, s32 isInitialCall);
|
|||||||
ApiStatus func_802D2C14(Evt* script, s32 isInitialCall);
|
ApiStatus func_802D2C14(Evt* script, s32 isInitialCall);
|
||||||
ApiStatus func_802D7B10(Evt* script, s32 isInitialCall);
|
ApiStatus func_802D7B10(Evt* script, s32 isInitialCall);
|
||||||
ApiStatus ShowConsumableChoicePopup(Evt* script, s32 isInitialCall);
|
ApiStatus ShowConsumableChoicePopup(Evt* script, s32 isInitialCall);
|
||||||
|
ApiStatus func_800458CC(Evt* script, s32 isInitialCall);
|
||||||
ApiStatus func_80045900(Evt* script, s32 isInitialCall);
|
ApiStatus func_80045900(Evt* script, s32 isInitialCall);
|
||||||
ApiStatus ShowKeyChoicePopup(Evt* script, s32 isInitialCall);
|
ApiStatus ShowKeyChoicePopup(Evt* script, s32 isInitialCall);
|
||||||
ApiStatus CloseChoicePopup(Evt* script, s32 isInitialCall);
|
ApiStatus CloseChoicePopup(Evt* script, s32 isInitialCall);
|
||||||
|
@ -10,3 +10,4 @@ spimdisasm
|
|||||||
pygfxd
|
pygfxd
|
||||||
intervaltree
|
intervaltree
|
||||||
rabbitizer
|
rabbitizer
|
||||||
|
n64img
|
||||||
|
@ -215,9 +215,9 @@ ApiStatus LoadBattleDmaData(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (gBattleDmaDest == 0) {
|
if (gBattleDmaDest == 0) {
|
||||||
dma_copy(moveScript->dmaStart, moveScript->dmaEnd, moveScript->dmaDest);
|
dma_copy(moveScript->start, moveScript->end, moveScript->dest);
|
||||||
} else {
|
} else {
|
||||||
dma_copy(moveScript->dmaStart, moveScript->dmaEnd, gBattleDmaDest);
|
dma_copy(moveScript->start, moveScript->end, gBattleDmaDest);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
|
91
src/196AA0.c
91
src/196AA0.c
@ -22,10 +22,90 @@
|
|||||||
#include "battle/action_cmd/spook.h"
|
#include "battle/action_cmd/spook.h"
|
||||||
#include "battle/action_cmd/water_block.h"
|
#include "battle/action_cmd/water_block.h"
|
||||||
#include "battle/action_cmd/tidal_wave.h"
|
#include "battle/action_cmd/tidal_wave.h"
|
||||||
|
#include "ld_addrs.h"
|
||||||
|
|
||||||
|
s32 D_80294190[] = { 0x2121751D, 0x23A3460C, 0xB46B0078, 0x730D1300, };
|
||||||
|
|
||||||
|
s32 D_802941A0[] = { 0x00E4862E, 0xB4F27570, 0xFFF304BC, 0xF70D0500, };
|
||||||
|
|
||||||
|
s32 D_802941B0[] = { 0x2D38D254, 0x28D17D2C, 0xB5A11B55, 0xFFFFFF00, };
|
||||||
|
|
||||||
|
s32 D_802941C0[] = { 7, 6, 5, 4, 3, 2, 1, 0 };
|
||||||
|
|
||||||
|
s32 D_802941E0[] = { 11, 10, 9, 8, 7, 6, 5, 4 };
|
||||||
|
|
||||||
|
s32 D_80294200[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
|
||||||
|
|
||||||
|
s32 D_80294220[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
|
||||||
|
|
||||||
|
s32 D_80294240[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
|
||||||
|
|
||||||
|
s32 D_80294260[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
|
||||||
|
|
||||||
|
s32 D_80294280[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
|
||||||
|
|
||||||
|
s32 D_802942A0[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
|
||||||
|
|
||||||
|
s32 D_802942C0[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
|
||||||
|
|
||||||
|
s32 D_802942E0[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
|
||||||
|
|
||||||
|
s32 D_80294300[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
|
||||||
|
|
||||||
|
s32 D_80294320[] = { 9, 8, 7, 6, 5, 4, 3, 2 };
|
||||||
|
|
||||||
|
s32 D_80294340[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
|
||||||
|
|
||||||
|
s32 D_80294360[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
|
||||||
|
|
||||||
|
s32 D_80294380[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
|
||||||
|
|
||||||
|
s32 D_802943A0[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
|
||||||
|
|
||||||
|
s32 D_802943C0[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
|
||||||
|
|
||||||
|
s32 D_802943E0[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
|
||||||
|
|
||||||
|
s32 D_80294400[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
|
||||||
|
|
||||||
|
s32 D_80294420[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
|
||||||
|
|
||||||
|
s32 D_80294440[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
|
||||||
|
|
||||||
|
s32 D_80294460[] = { 6, 3, 5, 3, 4, 3, 2, 3, 1, 3, 0, 3, 0, 2, 0, 1 };
|
||||||
|
|
||||||
|
s32 D_802944A0[] = { 130, 120, 110, 100, 90, 80, 70, 60 };
|
||||||
|
|
||||||
|
#define AC_TBL_ENTRY(name) \
|
||||||
|
action_cmd_ ## name ## _ROM_START, action_cmd_ ## name ## _ROM_END, action_cmd_ ## name ## _VRAM
|
||||||
|
|
||||||
// TODO: move to src/battle/action_cmd.c
|
// TODO: move to src/battle/action_cmd.c
|
||||||
|
void* actionCommandDmaTable[] = {
|
||||||
extern void* actionCommandDmaTable[23];
|
NULL, NULL, NULL,
|
||||||
|
AC_TBL_ENTRY(jump),
|
||||||
|
AC_TBL_ENTRY(hammer),
|
||||||
|
AC_TBL_ENTRY(flee),
|
||||||
|
AC_TBL_ENTRY(break_free),
|
||||||
|
AC_TBL_ENTRY(whirlwind),
|
||||||
|
AC_TBL_ENTRY(stop_leech),
|
||||||
|
AC_TBL_ENTRY(07),
|
||||||
|
AC_TBL_ENTRY(dizzy_shell),
|
||||||
|
AC_TBL_ENTRY(fire_shell),
|
||||||
|
AC_TBL_ENTRY(0A),
|
||||||
|
AC_TBL_ENTRY(bomb),
|
||||||
|
AC_TBL_ENTRY(body_slam),
|
||||||
|
AC_TBL_ENTRY(air_lift),
|
||||||
|
AC_TBL_ENTRY(air_raid),
|
||||||
|
AC_TBL_ENTRY(squirt),
|
||||||
|
AC_TBL_ENTRY(power_shock),
|
||||||
|
AC_TBL_ENTRY(mega_shock),
|
||||||
|
AC_TBL_ENTRY(smack),
|
||||||
|
AC_TBL_ENTRY(spiny_surge),
|
||||||
|
AC_TBL_ENTRY(hurricane),
|
||||||
|
AC_TBL_ENTRY(spook),
|
||||||
|
AC_TBL_ENTRY(water_block),
|
||||||
|
AC_TBL_ENTRY(tidal_wave),
|
||||||
|
};
|
||||||
|
|
||||||
BSS s32 D_8029FBC0;
|
BSS s32 D_8029FBC0;
|
||||||
BSS s32 D_8029FBC4[3]; // unused?
|
BSS s32 D_8029FBC4[3]; // unused?
|
||||||
@ -79,14 +159,15 @@ void action_command_water_block_free_hud_elements(void);
|
|||||||
void action_command_tidal_wave_free_hud_elements(void);
|
void action_command_tidal_wave_free_hud_elements(void);
|
||||||
|
|
||||||
ApiStatus LoadActionCommand(Evt* script, s32 isInitialCall) {
|
ApiStatus LoadActionCommand(Evt* script, s32 isInitialCall) {
|
||||||
s32 cmd = evt_get_variable(script, *script->ptrReadPos);
|
Bytecode* args = script->ptrReadPos;
|
||||||
|
s32 cmd = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
dma_copy(actionCommandDmaTable[cmd * 3], actionCommandDmaTable[cmd * 3 + 1], actionCommandDmaTable[cmd * 3 + 2]);
|
dma_copy(actionCommandDmaTable[cmd * 3 + 0], actionCommandDmaTable[cmd * 3 + 1], actionCommandDmaTable[cmd * 3 + 2]);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_80268224(s32 arg0) {
|
s32 func_80268224(s32 arg0) {
|
||||||
if (!(gBattleStatus.flags1 & 0x80000)) {
|
if (!(gBattleStatus.flags1 & BS_FLAGS1_80000)) {
|
||||||
arg0 -= is_ability_active(ABILITY_DODGE_MASTER) * 3;
|
arg0 -= is_ability_active(ABILITY_DODGE_MASTER) * 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,12 +1,175 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "battle/battle.h"
|
#include "battle/battle.h"
|
||||||
|
#include "script_api/battle.h"
|
||||||
#include "npc.h"
|
#include "npc.h"
|
||||||
#include "effects.h"
|
#include "effects.h"
|
||||||
#include "hud_element.h"
|
#include "hud_element.h"
|
||||||
|
#include "world/partners.h"
|
||||||
#include "sprite.h"
|
#include "sprite.h"
|
||||||
|
#include "sprite/npc/BattleMerlee.h"
|
||||||
|
|
||||||
extern s32 D_80077C40;
|
ApiStatus ShowMerleeCoinMessage(Evt* script, s32 isInitialCall);
|
||||||
extern EnemyDrops D_80077EB8;
|
ApiStatus ShowMerleeRanOutMessage(Evt* script, s32 isInitialCall);
|
||||||
|
ApiStatus FadeInMerlee(Evt* script, s32 isInitialCall);
|
||||||
|
ApiStatus FadeOutMerlee(Evt* script, s32 isInitialCall);
|
||||||
|
ApiStatus MerleeUpdateFX(Evt* script, s32 isInitialCall);
|
||||||
|
ApiStatus MerleeStopFX(Evt* script, s32 isInitialCall);
|
||||||
|
ApiStatus PlayMerleeGatherFX(Evt* script, s32 isInitialCall);
|
||||||
|
ApiStatus PlayMerleeOrbFX(Evt* script, s32 isInitialCall);
|
||||||
|
|
||||||
|
void spawn_drops(Enemy* enemy);
|
||||||
|
|
||||||
|
s32 D_80077C40 = 0;
|
||||||
|
|
||||||
|
extern EvtScript D_800936DC;
|
||||||
|
|
||||||
|
EvtScript D_80077C44 = {
|
||||||
|
EVT_WAIT(10)
|
||||||
|
EVT_CALL(FadeBackgroundToBlack)
|
||||||
|
EVT_WAIT(10)
|
||||||
|
EVT_CALL(CreateNpc, NPC_BTL_MERLEE, ANIM_BattleMerlee_Gather)
|
||||||
|
EVT_CALL(SetNpcFlagBits, NPC_BTL_MERLEE, NPC_FLAG_100, TRUE)
|
||||||
|
EVT_CALL(SetNpcYaw, NPC_BTL_MERLEE, 0)
|
||||||
|
EVT_CALL(GetCamLookAtObjVector)
|
||||||
|
EVT_CALL(SetNpcPos, NPC_BTL_MERLEE, LocalVar(0), LocalVar(1), LocalVar(2))
|
||||||
|
EVT_THREAD
|
||||||
|
EVT_CALL(MerleeUpdateFX)
|
||||||
|
EVT_END_THREAD
|
||||||
|
EVT_CALL(FadeInMerlee)
|
||||||
|
EVT_WAIT(30)
|
||||||
|
EVT_CALL(SetNpcAnimation, NPC_BTL_MERLEE, ANIM_BattleMerlee_Release)
|
||||||
|
EVT_CALL(MerleeStopFX)
|
||||||
|
EVT_CALL(UnfadeBackgroundFromBlack)
|
||||||
|
EVT_WAIT(20)
|
||||||
|
EVT_THREAD
|
||||||
|
EVT_CALL(FadeOutMerlee)
|
||||||
|
EVT_CALL(DeleteNpc, NPC_BTL_MERLEE)
|
||||||
|
EVT_END_THREAD
|
||||||
|
EVT_CALL(PlaySound, SOUND_2075)
|
||||||
|
EVT_CALL(GetPlayerPos, LocalVar(0), LocalVar(1), LocalVar(2))
|
||||||
|
EVT_CALL(PlayMerleeGatherFX, LocalVar(0), LocalVar(1), LocalVar(2))
|
||||||
|
EVT_CALL(PlayMerleeOrbFX, LocalVar(0), LocalVar(1), LocalVar(2))
|
||||||
|
EVT_WAIT(15)
|
||||||
|
EVT_CALL(ShowMerleeCoinMessage)
|
||||||
|
EVT_WAIT(15)
|
||||||
|
EVT_CALL(HasMerleeCasts)
|
||||||
|
EVT_IF_EQ(LocalVar(0), 1)
|
||||||
|
EVT_RETURN
|
||||||
|
EVT_END_IF
|
||||||
|
EVT_CALL(ShowMerleeRanOutMessage)
|
||||||
|
EVT_WAIT(15)
|
||||||
|
EVT_RETURN
|
||||||
|
EVT_END
|
||||||
|
};
|
||||||
|
|
||||||
|
EvtScript SCRIPT_NpcDefeat = {
|
||||||
|
EVT_CALL(GetBattleOutcome, LocalVar(0))
|
||||||
|
EVT_SWITCH(LocalVar(0))
|
||||||
|
EVT_CASE_EQ(0)
|
||||||
|
EVT_CALL(OnDefeatEnemy)
|
||||||
|
EVT_CASE_EQ(1)
|
||||||
|
EVT_CASE_EQ(2)
|
||||||
|
EVT_END_SWITCH
|
||||||
|
EVT_RETURN
|
||||||
|
EVT_END
|
||||||
|
};
|
||||||
|
|
||||||
|
EvtScript D_80077E9C = {
|
||||||
|
EVT_CALL(OnFleeBattleDrops)
|
||||||
|
EVT_RETURN
|
||||||
|
EVT_END
|
||||||
|
};
|
||||||
|
|
||||||
|
EnemyDrops D_80077EB8 = {
|
||||||
|
.dropFlags = 0x80,
|
||||||
|
.itemDropChance = 10,
|
||||||
|
.itemDrops = {
|
||||||
|
{
|
||||||
|
.item = ITEM_MUSHROOM,
|
||||||
|
.weight = 50,
|
||||||
|
.unk_04 = -1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
.heartDrops = {
|
||||||
|
{
|
||||||
|
.cutoff = F16(75),
|
||||||
|
.generalChance = F16(100),
|
||||||
|
.attempts = 0,
|
||||||
|
.chancePerAttempt = 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.cutoff = F16(50),
|
||||||
|
.generalChance = F16(75),
|
||||||
|
.attempts = 0,
|
||||||
|
.chancePerAttempt = 2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.cutoff = F16(25),
|
||||||
|
.generalChance = F16(50),
|
||||||
|
.attempts = 0,
|
||||||
|
.chancePerAttempt = 3,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
.cutoff = F16(0),
|
||||||
|
.generalChance = F16(25),
|
||||||
|
.attempts = 0,
|
||||||
|
.chancePerAttempt = 4,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
.flowerDrops = {
|
||||||
|
{
|
||||||
|
.cutoff = 1,
|
||||||
|
.generalChance = 3,
|
||||||
|
.attempts = 0,
|
||||||
|
.chancePerAttempt = 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
.minCoinBonus = 0,
|
||||||
|
.maxCoinBonus = 0,
|
||||||
|
};
|
||||||
|
|
||||||
|
EvtScript EnemyNpcHit = {
|
||||||
|
EVT_CALL(GetOwnerEncounterTrigger, LocalVar(0))
|
||||||
|
EVT_SWITCH(LocalVar(0))
|
||||||
|
EVT_CASE_EQ(1)
|
||||||
|
EVT_CASE_OR_EQ(2)
|
||||||
|
EVT_CASE_OR_EQ(4)
|
||||||
|
EVT_CASE_OR_EQ(6)
|
||||||
|
EVT_CALL(GetSelfAnimationFromTable, 7, LocalVar(0))
|
||||||
|
EVT_EXEC_WAIT(D_800936DC)
|
||||||
|
EVT_CASE_EQ(3)
|
||||||
|
EVT_THREAD
|
||||||
|
EVT_CALL(func_800458CC, LocalVar(0))
|
||||||
|
EVT_IF_EQ(LocalVar(0), 0)
|
||||||
|
EVT_SET(LocalVar(10), 0)
|
||||||
|
EVT_LOOP(30)
|
||||||
|
EVT_ADD(LocalVar(10), 40)
|
||||||
|
EVT_CALL(SetNpcRotation, NPC_SELF, 0, LocalVar(10), 0)
|
||||||
|
EVT_WAIT(1)
|
||||||
|
EVT_END_LOOP
|
||||||
|
EVT_END_IF
|
||||||
|
EVT_END_THREAD
|
||||||
|
EVT_END_CASE_GROUP
|
||||||
|
EVT_END_SWITCH
|
||||||
|
EVT_RETURN
|
||||||
|
EVT_END
|
||||||
|
};
|
||||||
|
|
||||||
|
EvtScript EnemyNpcDefeat = {
|
||||||
|
EVT_CALL(SetNpcRotation, NPC_SELF, 0, 0, 0)
|
||||||
|
EVT_CALL(GetBattleOutcome, LocalVar(0))
|
||||||
|
EVT_SWITCH(LocalVar(0))
|
||||||
|
EVT_CASE_EQ(0)
|
||||||
|
EVT_CALL(DoNpcDefeat)
|
||||||
|
EVT_CASE_EQ(2)
|
||||||
|
EVT_CALL(func_80045900, 0)
|
||||||
|
EVT_CASE_EQ(3)
|
||||||
|
EVT_CALL(SetEnemyFlagBits, -1, 16, 1)
|
||||||
|
EVT_CALL(RemoveNpc, NPC_SELF)
|
||||||
|
EVT_END_SWITCH
|
||||||
|
EVT_RETURN
|
||||||
|
EVT_END
|
||||||
|
};
|
||||||
|
|
||||||
extern s8 D_8009A654;
|
extern s8 D_8009A654;
|
||||||
extern s16 D_8009A668;
|
extern s16 D_8009A668;
|
||||||
|
23
src/E20110.c
23
src/E20110.c
@ -2,7 +2,28 @@
|
|||||||
|
|
||||||
#define NAMESPACE E20110
|
#define NAMESPACE E20110
|
||||||
|
|
||||||
extern TempE20110* D_802B7CB8_E20DC8;
|
typedef struct TempE20110 {
|
||||||
|
/* 0x00 */ Vec3f pos;
|
||||||
|
/* 0x0C */ f32 scale;
|
||||||
|
/* 0x10 */ f32 unk_10;
|
||||||
|
/* 0x14 */ char unk_14[0x4];
|
||||||
|
/* 0x18 */ s32 unk_18;
|
||||||
|
/* 0x1C */ s32 unk_1C;
|
||||||
|
/* 0x20 */ s8 unk_20;
|
||||||
|
/* 0x21 */ s8 unk_21;
|
||||||
|
/* 0x22 */ s8 unk_22;
|
||||||
|
/* 0x23 */ s8 unk_23;
|
||||||
|
/* 0x24 */ s32 unk_24;
|
||||||
|
} TempE20110; // size = 0x28
|
||||||
|
|
||||||
|
BSS TempE20110 D_802B7DA0;
|
||||||
|
|
||||||
|
#include "inspect_icon.png.h"
|
||||||
|
#include "inspect_icon.png.inc.c"
|
||||||
|
#include "inspect_icon.pal.inc.c"
|
||||||
|
#include "inspect_icon_dlist.gfx.inc.c"
|
||||||
|
|
||||||
|
TempE20110* D_802B7CB8_E20DC8 = &D_802B7DA0;
|
||||||
|
|
||||||
#include "common/UnkAngleFunc1.inc.c"
|
#include "common/UnkAngleFunc1.inc.c"
|
||||||
|
|
||||||
|
19
src/E21870.c
19
src/E21870.c
@ -3,19 +3,22 @@
|
|||||||
typedef struct TempE21870 {
|
typedef struct TempE21870 {
|
||||||
/* 0x00 */ Vec3f pos;
|
/* 0x00 */ Vec3f pos;
|
||||||
/* 0x0C */ f32 scale;
|
/* 0x0C */ f32 scale;
|
||||||
/* 0x10 */ f32 unk_10;
|
/* 0x10 */ char unk_10[0x8];
|
||||||
/* 0x14 */ char unk_14[0x4];
|
|
||||||
/* 0x18 */ s32 unk_18;
|
/* 0x18 */ s32 unk_18;
|
||||||
/* 0x1C */ s32 unk_1C;
|
/* 0x1C */ char unk_1C[0x4];
|
||||||
/* 0x20 */ s32 unk_20;
|
/* 0x20 */ s32 unk_20;
|
||||||
/* 0x24 */ s32 unk_24;
|
/* 0x24 */ s32 unk_24;
|
||||||
} TempE21870; // size = 0x28
|
} TempE21870; // size = 0x28
|
||||||
|
|
||||||
extern u8 D_802B7640_E21EB0[];
|
BSS TempE21870 D_802B7D40;
|
||||||
extern u16 D_802B7C60_E224D0[];
|
|
||||||
extern u16 D_802B7C80_E224F0[];
|
#include "pulse_stone.png.h"
|
||||||
extern Gfx D_802B7CA0_E22510[];
|
#include "pulse_stone.png.inc.c"
|
||||||
extern TempE21870* D_802B7D18_E22588;
|
#include "pulse_stone.pal.inc.c"
|
||||||
|
#include "pulse_stone.flash.pal.inc.c"
|
||||||
|
#include "pulse_stone_dlist.gfx.inc.c"
|
||||||
|
|
||||||
|
TempE21870* D_802B7D18_E22588 = &D_802B7D40;
|
||||||
|
|
||||||
void func_802B74F0(void);
|
void func_802B74F0(void);
|
||||||
|
|
||||||
|
96
src/E225B0.c
96
src/E225B0.c
@ -1,9 +1,7 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
typedef struct struct802B7C78 {
|
typedef struct struct802B7C78 {
|
||||||
/* 0x00 */ f32 x;
|
/* 0x00 */ Vec3f pos;
|
||||||
/* 0x04 */ f32 y;
|
|
||||||
/* 0x08 */ f32 z;
|
|
||||||
/* 0x0C */ f32 scale;
|
/* 0x0C */ f32 scale;
|
||||||
/* 0x10 */ s32 unk_10;
|
/* 0x10 */ s32 unk_10;
|
||||||
/* 0x14 */ s32 unk_14;
|
/* 0x14 */ s32 unk_14;
|
||||||
@ -14,14 +12,18 @@ typedef struct struct802B7C78 {
|
|||||||
/* 0x28 */ s32 unk_28;
|
/* 0x28 */ s32 unk_28;
|
||||||
} struct802B7C78;
|
} struct802B7C78;
|
||||||
|
|
||||||
extern u8 D_802B7580_E22B30[];
|
#include "i_spy.png.h"
|
||||||
extern u8 D_802B7BA0_E23150[];
|
#include "i_spy.png.inc.c"
|
||||||
extern u8 D_802B7BC0_E23170[];
|
#include "i_spy.pal.inc.c"
|
||||||
extern u8 D_802B7BE0_E23190[];
|
#include "i_spy.2.pal.inc.c"
|
||||||
extern Gfx D_802B7C00_E231B0[];
|
#include "i_spy.flash.pal.inc.c"
|
||||||
|
#include "i_spy_dlist.gfx.inc.c"
|
||||||
|
|
||||||
|
BSS struct802B7C78 D_802B7CB0;
|
||||||
|
|
||||||
|
struct802B7C78* D_802B7C78_E23228 = &D_802B7CB0;
|
||||||
|
|
||||||
extern void (*D_8010C93C)(void);
|
extern void (*D_8010C93C)(void);
|
||||||
extern struct802B7C78* D_802B7C78_E23228;
|
|
||||||
|
|
||||||
void func_802B735C_E2290C(void);
|
void func_802B735C_E2290C(void);
|
||||||
|
|
||||||
@ -29,29 +31,22 @@ void func_802B7000_E225B0(void) {
|
|||||||
Matrix4f matrix1;
|
Matrix4f matrix1;
|
||||||
Matrix4f matrix2;
|
Matrix4f matrix2;
|
||||||
FoldImageRecPart foldImage;
|
FoldImageRecPart foldImage;
|
||||||
|
|
||||||
Gfx* oldMasterGfxPos;
|
|
||||||
f32 scale;
|
|
||||||
s32 temp;
|
s32 temp;
|
||||||
s32 matrixIndex;
|
|
||||||
struct802B7C78* localD_802B7C78_E23228;
|
|
||||||
u16 oldMatrixListPos;
|
|
||||||
|
|
||||||
if (gPlayerStatus.animFlags & PA_FLAGS_100) {
|
if (gPlayerStatus.animFlags & PA_FLAGS_100) {
|
||||||
guScaleF(matrix1, D_802B7C78_E23228->scale, D_802B7C78_E23228->scale,
|
guScaleF(matrix1, D_802B7C78_E23228->scale, D_802B7C78_E23228->scale,
|
||||||
D_802B7C78_E23228->scale);
|
D_802B7C78_E23228->scale);
|
||||||
guRotateF(matrix2, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
guRotateF(matrix2, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
guMtxCatF(matrix1, matrix2, matrix1);
|
guMtxCatF(matrix1, matrix2, matrix1);
|
||||||
guTranslateF(matrix2, D_802B7C78_E23228->x, D_802B7C78_E23228->y, D_802B7C78_E23228->z);
|
guTranslateF(matrix2, D_802B7C78_E23228->pos.x, D_802B7C78_E23228->pos.y, D_802B7C78_E23228->pos.z);
|
||||||
guMtxCatF(matrix1, matrix2, matrix2);
|
guMtxCatF(matrix1, matrix2, matrix2);
|
||||||
guMtxF2L(matrix2, (Mtx*) &gDisplayContext->matrixStack[gMatrixListPos]);
|
guMtxF2L(matrix2, (Mtx*) &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], 3);
|
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], 3);
|
||||||
gSPDisplayList(gMasterGfxPos++, D_802B7C00_E231B0);
|
gSPDisplayList(gMasterGfxPos++, D_802B7C00_E231B0);
|
||||||
|
|
||||||
localD_802B7C78_E23228 = D_802B7C78_E23228;
|
if (D_802B7C78_E23228->unk_18 < 47) {
|
||||||
if (localD_802B7C78_E23228->unk_18 < 47) {
|
D_802B7C78_E23228->unk_20 += 1;
|
||||||
localD_802B7C78_E23228->unk_20 += 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
temp = D_802B7C78_E23228->unk_20;
|
temp = D_802B7C78_E23228->unk_20;
|
||||||
@ -94,9 +89,9 @@ void func_802B7000_E225B0(void) {
|
|||||||
void func_802B72C0_E22870(void) {
|
void func_802B72C0_E22870(void) {
|
||||||
mem_clear(D_802B7C78_E23228, sizeof(*D_802B7C78_E23228));
|
mem_clear(D_802B7C78_E23228, sizeof(*D_802B7C78_E23228));
|
||||||
|
|
||||||
D_802B7C78_E23228->x = gPlayerStatus.position.x;
|
D_802B7C78_E23228->pos.x = gPlayerStatus.position.x;
|
||||||
D_802B7C78_E23228->y = gPlayerStatus.position.y + gPlayerStatus.colliderHeight + 8.0f;
|
D_802B7C78_E23228->pos.y = gPlayerStatus.position.y + gPlayerStatus.colliderHeight + 8.0f;
|
||||||
D_802B7C78_E23228->z = gPlayerStatus.position.z;
|
D_802B7C78_E23228->pos.z = gPlayerStatus.position.z;
|
||||||
|
|
||||||
D_802B7C78_E23228->unk_28 = 0xFF;
|
D_802B7C78_E23228->unk_28 = 0xFF;
|
||||||
|
|
||||||
@ -105,58 +100,53 @@ void func_802B72C0_E22870(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void func_802B735C_E2290C(void) {
|
void func_802B735C_E2290C(void) {
|
||||||
f32 temp_f2;
|
|
||||||
s32 temp_v0_3;
|
|
||||||
s32 temp_v1;
|
|
||||||
struct802B7C78* temp_a0;
|
|
||||||
struct802B7C78* temp_v1_3;
|
|
||||||
s32 phi_v0;
|
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
PartnerActionStatus* partnerActionStatus = &gPartnerActionStatus;
|
PartnerActionStatus* partnerActionStatus = &gPartnerActionStatus;
|
||||||
|
s32 cond;
|
||||||
|
|
||||||
temp_a0 = D_802B7C78_E23228;
|
D_802B7C78_E23228->pos.y +=
|
||||||
temp_f2 = temp_a0->y;
|
(playerStatus->position.y + playerStatus->colliderHeight + 10.0f - D_802B7C78_E23228->pos.y) / 1.5f;
|
||||||
temp_v1 = temp_a0->unk_24;
|
D_802B7C78_E23228->pos.x = playerStatus->position.x;
|
||||||
temp_a0->y = temp_f2 + (((playerStatus->position.y + playerStatus->colliderHeight + 10.0f) - temp_f2) / 1.5f);
|
D_802B7C78_E23228->pos.z = playerStatus->position.z;
|
||||||
temp_a0->x = playerStatus->position.x;
|
|
||||||
temp_a0->z = playerStatus->position.z;
|
|
||||||
|
|
||||||
switch (temp_v1) {
|
switch (D_802B7C78_E23228->unk_24) {
|
||||||
case 0:
|
case 0:
|
||||||
if (partnerActionStatus->partnerActionState != PARTNER_ACTION_NONE && partnerActionStatus->actingPartner == PARTNER_LAKILESTER) {
|
if (partnerActionStatus->partnerActionState != PARTNER_ACTION_NONE &&
|
||||||
phi_v0 = gGameStatusPtr->keepUsingPartnerOnMapChange;
|
partnerActionStatus->actingPartner == PARTNER_LAKILESTER)
|
||||||
|
{
|
||||||
|
cond = gGameStatusPtr->keepUsingPartnerOnMapChange;
|
||||||
} else {
|
} else {
|
||||||
phi_v0 = playerStatus->flags & (PS_FLAGS_INPUT_DISABLED | PS_FLAGS_1000);
|
cond = playerStatus->flags & (PS_FLAGS_INPUT_DISABLED | PS_FLAGS_1000);
|
||||||
}
|
}
|
||||||
if (phi_v0 == 0) {
|
|
||||||
temp_v1_3 = D_802B7C78_E23228;
|
if (!cond) {
|
||||||
temp_v1_3->unk_24 += 1;
|
D_802B7C78_E23228->unk_24++;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (playerStatus->flags & PS_FLAGS_20) {
|
if (playerStatus->flags & PS_FLAGS_20) {
|
||||||
temp_a0->unk_24 = 3;
|
D_802B7C78_E23228->unk_24 = 3;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (temp_a0->unk_18++ >= 0x10) {
|
if (D_802B7C78_E23228->unk_18++ >= 16) {
|
||||||
temp_a0->scale = 0.36f;
|
D_802B7C78_E23228->scale = 0.36f;
|
||||||
temp_a0->unk_24 += 1;
|
D_802B7C78_E23228->unk_24++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
temp_a0->scale = 0.57f;
|
D_802B7C78_E23228->scale = 0.57f;
|
||||||
temp_a0->unk_24 += 1;
|
D_802B7C78_E23228->unk_24++;
|
||||||
sfx_play_sound_at_player(SOUND_17B, 0);
|
sfx_play_sound_at_player(SOUND_17B, 0);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
temp_a0->scale = 0.53f;
|
D_802B7C78_E23228->scale = 0.53f;
|
||||||
if (temp_a0->unk_18 >= 0x2F || playerStatus->flags & PS_FLAGS_20) {
|
if (D_802B7C78_E23228->unk_18 >= 47 || playerStatus->flags & PS_FLAGS_20) {
|
||||||
temp_a0->unk_28 -= 0x40;
|
D_802B7C78_E23228->unk_28 -= 64;
|
||||||
if (temp_a0->unk_28 < 0) {
|
if (D_802B7C78_E23228->unk_28 < 0) {
|
||||||
temp_a0->unk_28 = 0;
|
D_802B7C78_E23228->unk_28 = 0;
|
||||||
temp_a0->unk_18 = 0x33;
|
D_802B7C78_E23228->unk_18 = 51;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,15 +11,11 @@ const char ascii_EA6D78[] = "kzn_18";
|
|||||||
extern s32 D_802466D0[];
|
extern s32 D_802466D0[];
|
||||||
|
|
||||||
void func_8004D8E0(DeadEnemy*);
|
void func_8004D8E0(DeadEnemy*);
|
||||||
void func_80240DC4_EA16C4(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolume* territory);
|
|
||||||
|
|
||||||
#include "world/common/enemy/WanderMeleeAI.inc.c"
|
#include "world/common/enemy/WanderMeleeAI.inc.c"
|
||||||
#include "world/common/enemy/wip/PiranhaPlantAI_00.inc.c"
|
#include "world/common/enemy/wip/PiranhaPlantAI_00.inc.c"
|
||||||
#include "world/common/enemy/wip/PiranhaPlantAI_01.inc.c"
|
#include "world/common/enemy/wip/PiranhaPlantAI_01.inc.c"
|
||||||
|
#include "world/common/enemy/wip/PiranhaPlantAI_10.inc.c"
|
||||||
// sqrtf issue - Would be PiranhaPlantAI_10
|
|
||||||
INCLUDE_ASM(s32, "EA0C10", func_80240DC4_EA16C4);
|
|
||||||
|
|
||||||
#include "world/common/enemy/wip/PiranhaPlantAI_11.inc.c"
|
#include "world/common/enemy/wip/PiranhaPlantAI_11.inc.c"
|
||||||
#include "world/common/enemy/wip/PiranhaPlantAI_12.inc.c"
|
#include "world/common/enemy/wip/PiranhaPlantAI_12.inc.c"
|
||||||
#include "world/common/enemy/wip/PiranhaPlantAI_13.inc.c"
|
#include "world/common/enemy/wip/PiranhaPlantAI_13.inc.c"
|
||||||
|
33
src/EA36E0.c
33
src/EA36E0.c
@ -24,41 +24,12 @@ ApiStatus N(GetActingPartner)(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
#include "world/common/UnkFunc46.inc.c"
|
#include "world/common/UnkFunc46.inc.c"
|
||||||
|
|
||||||
// TODO: Linker magic
|
#include "world/common/UnkFunc47.inc.c"
|
||||||
// Normally this would be #include "world/common/UnkFunc47.inc.c"
|
|
||||||
// Due to sqrtf being an inline/instrinsic func, we can't use dead.h
|
|
||||||
#ifdef NON_MATCHING
|
|
||||||
ApiStatus N(UnkFunc47(Evt* script, s32 isInitialCall) {
|
|
||||||
f32 var1 = script->varTable[0] - gPlayerStatus.position.x;
|
|
||||||
f32 var2 = script->varTable[2] - gPlayerStatus.position.y;
|
|
||||||
f32 var3 = 0.0f - gPlayerStatus.position.z;
|
|
||||||
|
|
||||||
script->varTable[4] = sqrtf((var1 * var1) + (var2 * var2) + (var3 * var3));
|
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
INCLUDE_ASM(s32, "EA36E0", func_80242EC4_EA37C4);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "world/common/UnkFunc48.inc.c"
|
#include "world/common/UnkFunc48.inc.c"
|
||||||
|
|
||||||
#include "world/common/UnkFunc49.inc.c"
|
#include "world/common/UnkFunc49.inc.c"
|
||||||
|
|
||||||
// TODO: Linker magic
|
#include "world/common/UnkFunc50.inc.c"
|
||||||
// Normally this would be #include "world/common/UnkFunc50.inc.c"
|
|
||||||
// Due to sqrtf being an inline/instrinsic func, we can't use dead.h
|
|
||||||
#ifdef NON_MATCHING
|
|
||||||
ApiStatus func_80243054_EA3954(Evt* script, s32 isInitialCall) {
|
|
||||||
f32 temp_f2 = UNK_FUNC_50_LVar1 - script->varTable[0]; //-469.0
|
|
||||||
f32 temp_f0 = UNK_FUNC_50_LVar2 - script->varTable[2]; //46.0
|
|
||||||
|
|
||||||
script->varTable[3] = -sqrtf((temp_f2 * temp_f2) + (temp_f0 * temp_f0));
|
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
INCLUDE_ASM(s32, "EA36E0", func_80243054_EA3954);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "world/common/UnkFunc51.inc.c"
|
#include "world/common/UnkFunc51.inc.c"
|
||||||
|
@ -17,7 +17,7 @@ extern HudScript HES_StickTapNeutral;
|
|||||||
extern HudScript HES_RightOn;
|
extern HudScript HES_RightOn;
|
||||||
extern HudScript HES_TimingReady;
|
extern HudScript HES_TimingReady;
|
||||||
|
|
||||||
extern s32 D_802941E0;
|
extern s32 D_802941E0[];
|
||||||
|
|
||||||
ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
|
||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
@ -25,7 +25,7 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
|
|||||||
s32 id;
|
s32 id;
|
||||||
|
|
||||||
battleStatus->unk_82 = 1;
|
battleStatus->unk_82 = 1;
|
||||||
battleStatus->unk_434 = &D_802941E0;
|
battleStatus->unk_434 = D_802941E0;
|
||||||
battleStatus->unk_86 = 0;
|
battleStatus->unk_86 = 0;
|
||||||
|
|
||||||
if (battleStatus->unk_83 == 0) {
|
if (battleStatus->unk_83 == 0) {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#define NAMESPACE action_command_jump
|
#define NAMESPACE action_command_jump
|
||||||
|
|
||||||
extern s32 D_802941C0;
|
extern s32 D_802941C0[];
|
||||||
|
|
||||||
// icon IDs for hud elements
|
// icon IDs for hud elements
|
||||||
extern HudScript HES_AButton;
|
extern HudScript HES_AButton;
|
||||||
@ -15,7 +15,7 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
|
|||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
|
|
||||||
gBattleStatus.unk_82 = 1;
|
gBattleStatus.unk_82 = 1;
|
||||||
gBattleStatus.unk_434 = &D_802941C0;
|
gBattleStatus.unk_434 = D_802941C0;
|
||||||
gBattleStatus.unk_86 = 0;
|
gBattleStatus.unk_86 = 0;
|
||||||
|
|
||||||
if (gBattleStatus.unk_83 == 0) {
|
if (gBattleStatus.unk_83 == 0) {
|
||||||
|
35
src/npc.c
35
src/npc.c
@ -3,21 +3,30 @@
|
|||||||
#include "effects.h"
|
#include "effects.h"
|
||||||
#include "sprite.h"
|
#include "sprite.h"
|
||||||
|
|
||||||
|
|
||||||
|
s8 D_80077BF0[] = {
|
||||||
|
0x01, 0x02, 0x00, 0x34, 0x01, 0x04, 0x00, 0x36, 0x00, 0x36, 0x01, 0x02, 0x00, 0x1C, 0x01, 0x02, 0x00, 0x06, 0x01, 0x02, 0x00, 0x2C, 0x01, 0x02, 0x00, 0x2C, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||||
|
};
|
||||||
|
|
||||||
|
f32 D_80077C10 = 0.0f;
|
||||||
|
s16 D_80077C14 = 4;
|
||||||
|
s16 D_80077C16 = 0; // padding?
|
||||||
|
f32 D_80077C18 = 0;
|
||||||
|
s16 D_80077C1C = 4;
|
||||||
|
s16 D_80077C1E = 5;
|
||||||
|
s32 D_80077C20 = 0;
|
||||||
|
s32 D_80077C24 = 0;
|
||||||
|
s16 D_80077C28 = 4;
|
||||||
|
s16 D_80077C2A = 0; // padding?
|
||||||
|
s32 D_80077C2C = 0;
|
||||||
|
s16 D_80077C30 = 4;
|
||||||
|
s16 D_80077C32 = 0; // padding?
|
||||||
|
s32 D_80077C34 = 0;
|
||||||
|
s16 D_80077C38 = 4;
|
||||||
|
s16 D_80077C3A = 4;
|
||||||
|
|
||||||
extern s16 D_8010C97A;
|
extern s16 D_8010C97A;
|
||||||
|
|
||||||
extern f32 D_80077C10;
|
|
||||||
extern s16 D_80077C14;
|
|
||||||
|
|
||||||
extern f32 D_80077C18;
|
|
||||||
extern s16 D_80077C1C;
|
|
||||||
extern s16 D_80077C1E;
|
|
||||||
extern s32 D_80077C20;
|
|
||||||
|
|
||||||
extern s16 D_80077C30;
|
|
||||||
extern s32 D_80077C34;
|
|
||||||
extern s16 D_80077C38;
|
|
||||||
extern s16 D_80077C3A;
|
|
||||||
|
|
||||||
void STUB_npc_callback(Npc* npc) {
|
void STUB_npc_callback(Npc* npc) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "npc.h"
|
#include "npc.h"
|
||||||
#include "hud_element.h"
|
#include "hud_element.h"
|
||||||
|
#include "message_ids.h"
|
||||||
|
|
||||||
#define MAX_ICONS (64)
|
#define MAX_ICONS (64)
|
||||||
|
|
||||||
@ -69,9 +70,12 @@ typedef struct HudStatusIcon {
|
|||||||
/* 0xA8 */ HudSimpleStatusIcon danger;
|
/* 0xA8 */ HudSimpleStatusIcon danger;
|
||||||
} HudStatusIcon; // size = 0xB0
|
} HudStatusIcon; // size = 0xB0
|
||||||
|
|
||||||
extern s16 D_80078160[];
|
s16 D_80078160[] = { 28, 40 };
|
||||||
extern s16 D_80078164[];
|
s16 D_80078164[] = { 0, -2 };
|
||||||
extern s32 D_80078168[];
|
s32 D_80078168[] = {
|
||||||
|
MSG_Menus_Merlee_IncreaseCoins,
|
||||||
|
MSG_Menus_Merlee_Exhausted,
|
||||||
|
};
|
||||||
|
|
||||||
extern HudScript HES_Item_Present;
|
extern HudScript HES_Item_Present;
|
||||||
|
|
||||||
@ -109,7 +113,6 @@ extern HudScript HES_Surprise;
|
|||||||
extern HudScript HES_Peril;
|
extern HudScript HES_Peril;
|
||||||
extern HudScript HES_Danger;
|
extern HudScript HES_Danger;
|
||||||
|
|
||||||
|
|
||||||
void update_merlee_message(void* popup);
|
void update_merlee_message(void* popup);
|
||||||
void draw_merlee_message(void* popup);
|
void draw_merlee_message(void* popup);
|
||||||
void func_80045BC8(void);
|
void func_80045BC8(void);
|
||||||
|
@ -51,7 +51,7 @@ ApiStatus N(PiranhaPlantAI_Main)(Evt* script, s32 isInitialCall) {
|
|||||||
N(PiranhaPlantAI_01)(script, settings, territoryPtr);
|
N(PiranhaPlantAI_01)(script, settings, territoryPtr);
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
func_80240DC4_EA16C4(script, settings, territoryPtr);
|
N(PiranhaPlantAI_10)(script, settings, territoryPtr);
|
||||||
if (script->functionTemp[0] != 11) {
|
if (script->functionTemp[0] != 11) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -123,6 +123,11 @@ def write_ninja_rules(ninja: ninja_syntax.Writer, cpp: str, cppflags: str, extra
|
|||||||
deps="gcc",
|
deps="gcc",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ninja.rule("dead_cc",
|
||||||
|
description="dead_cc $in",
|
||||||
|
command=f"mips-linux-gnu-objcopy --redefine-sym sqrtf=dead_sqrtf $in $out",
|
||||||
|
)
|
||||||
|
|
||||||
ninja.rule("bin",
|
ninja.rule("bin",
|
||||||
description="bin $in",
|
description="bin $in",
|
||||||
command=f"{cross}ld -r -b binary $in -o $out",
|
command=f"{cross}ld -r -b binary $in -o $out",
|
||||||
@ -248,8 +253,6 @@ class Configure:
|
|||||||
|
|
||||||
split.main(
|
split.main(
|
||||||
splat_file,
|
splat_file,
|
||||||
None,
|
|
||||||
str(self.version_path / "baserom.z64"),
|
|
||||||
modes,
|
modes,
|
||||||
verbose=False,
|
verbose=False,
|
||||||
)
|
)
|
||||||
@ -391,19 +394,34 @@ class Configure:
|
|||||||
|
|
||||||
cflags = cflags.replace("gcc_272", "")
|
cflags = cflags.replace("gcc_272", "")
|
||||||
|
|
||||||
build(entry.object_path, entry.src_paths, task, variables={
|
# Dead cod
|
||||||
"cflags": cflags,
|
if isinstance(seg, segtypes.common.c.CommonSegC) and seg.rom_start >= 0xEA0900:
|
||||||
"cppflags": f"-DVERSION_{self.version.upper()}",
|
obj_path = str(entry.object_path)
|
||||||
})
|
init_obj_path = Path(obj_path + ".dead")
|
||||||
|
build(init_obj_path, entry.src_paths, task, variables={
|
||||||
|
"cflags": cflags,
|
||||||
|
"cppflags": f"-DVERSION_{self.version.upper()}",
|
||||||
|
})
|
||||||
|
build(
|
||||||
|
entry.object_path,
|
||||||
|
[init_obj_path],
|
||||||
|
"dead_cc",
|
||||||
|
)
|
||||||
|
# Not dead cod
|
||||||
|
else:
|
||||||
|
build(entry.object_path, entry.src_paths, task, variables={
|
||||||
|
"cflags": cflags,
|
||||||
|
"cppflags": f"-DVERSION_{self.version.upper()}",
|
||||||
|
})
|
||||||
|
|
||||||
# images embedded inside data aren't linked, but they do need to be built into .inc.c files
|
# images embedded inside data aren't linked, but they do need to be built into .inc.c files
|
||||||
if isinstance(seg, segtypes.common.group.CommonSegGroup):
|
if isinstance(seg, segtypes.common.group.CommonSegGroup):
|
||||||
for seg in seg.subsegments:
|
for seg in seg.subsegments:
|
||||||
if isinstance(seg, segtypes.n64.img.N64SegImg):
|
if isinstance(seg, segtypes.n64.img.N64SegImg):
|
||||||
flags = ""
|
flags = ""
|
||||||
if seg.flip_horizontal:
|
if seg.n64img.flip_h:
|
||||||
flags += "--flip-x "
|
flags += "--flip-x "
|
||||||
if seg.flip_vertical:
|
if seg.n64img.flip_v:
|
||||||
flags += "--flip-y "
|
flags += "--flip-y "
|
||||||
|
|
||||||
src_paths = [seg.out_path().relative_to(ROOT)]
|
src_paths = [seg.out_path().relative_to(ROOT)]
|
||||||
@ -444,9 +462,9 @@ class Configure:
|
|||||||
build(entry.object_path, [compressed_path], "bin")
|
build(entry.object_path, [compressed_path], "bin")
|
||||||
elif isinstance(seg, segtypes.n64.img.N64SegImg):
|
elif isinstance(seg, segtypes.n64.img.N64SegImg):
|
||||||
flags = ""
|
flags = ""
|
||||||
if seg.flip_horizontal:
|
if seg.n64img.flip_h:
|
||||||
flags += "--flip-x "
|
flags += "--flip-x "
|
||||||
if seg.flip_vertical:
|
if seg.n64img.flip_v:
|
||||||
flags += "--flip-y "
|
flags += "--flip-y "
|
||||||
|
|
||||||
bin_path = entry.object_path.with_suffix(".bin")
|
bin_path = entry.object_path.with_suffix(".bin")
|
||||||
|
@ -565,8 +565,7 @@ replace_funcs = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def trim_lw(arg):
|
def trim_lw(arg):
|
||||||
arg = arg[3:-1]
|
return arg[arg.find("(")+1:arg.find(")")]
|
||||||
return arg
|
|
||||||
|
|
||||||
|
|
||||||
def replace_constants(self, func, args):
|
def replace_constants(self, func, args):
|
||||||
@ -1117,8 +1116,8 @@ if __name__ == "__main__":
|
|||||||
f.seek(offset)
|
f.seek(offset)
|
||||||
print(ScriptDisassembler(f).disassemble(), end="")
|
print(ScriptDisassembler(f).disassemble(), end="")
|
||||||
break
|
break
|
||||||
except:
|
except Exception as e:
|
||||||
break
|
print(e)
|
||||||
|
|
||||||
loffset = script.end_pos
|
loffset = script.end_pos
|
||||||
LOCAL_WORDS = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
|
LOCAL_WORDS = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
[subrepo]
|
[subrepo]
|
||||||
remote = https://github.com/ethteck/splat.git
|
remote = https://github.com/ethteck/splat.git
|
||||||
branch = master
|
branch = master
|
||||||
commit = 9af40c526558452a14b113c3d44b0382d038d65c
|
commit = d93b6550c4800a2eb9ef672bf8d17067091e42df
|
||||||
parent = 268eb8e88164dcb3858634f62d9f33f8f41407c1
|
parent = aa495d906bc91dce95c15010852ac62d7ebc12dd
|
||||||
method = merge
|
method = merge
|
||||||
cmdver = 0.4.3
|
cmdver = 0.4.3
|
||||||
|
@ -1,5 +1,25 @@
|
|||||||
# splat Release Notes
|
# splat Release Notes
|
||||||
|
|
||||||
|
### 0.11.2
|
||||||
|
* The way options are parsed and accessed has been completely refactored. The following option names have changed:
|
||||||
|
|
||||||
|
`linker_symbol_header_path` -> `ld_symbol_header_path`
|
||||||
|
|
||||||
|
`asm_endlabels` -> `asm_end_label`
|
||||||
|
|
||||||
|
Additionally, any custom segments or code that needs to read options will have to accommodate the new API for doing so. Options are now fields of an object named `opts` within the existing `options` namespace. Because the options are fields, `get_` is no longer necessary. To give an example:
|
||||||
|
|
||||||
|
Before: `options.get_asm_path()`
|
||||||
|
|
||||||
|
After: `options.opts.asm_path`
|
||||||
|
|
||||||
|
The clean_up_path function in linker_entry.py now uses a cache, offering a small performance improvement during the linker script writing phase.
|
||||||
|
|
||||||
|
### 0.11.1
|
||||||
|
* The linker script now includes a `_SIZE` symbol for each segment.
|
||||||
|
* The new `create_asm_dependencies`, if enabled, will cause splat to create `.asmproc.d` files that can inform a build system which asm files a c file depends upon. If your build system is configured correctly, this can allow triggering a rebuild of a C file when its included asm files are modified.
|
||||||
|
* Splat no longer depends directly on pypng and now instead uses [n64img](https://github.com/decompals/n64img). Currently, all image behavior uses the exact same code. Eventually, n64img will be implemented in C and support rebuilding images as well.
|
||||||
|
|
||||||
## 0.11.0: Spimdisasm Returns
|
## 0.11.0: Spimdisasm Returns
|
||||||
|
|
||||||
Spimdisasm now handles data (data, rodata, bss) disassembly in splat! This includes a few changes in behavior:
|
Spimdisasm now handles data (data, rodata, bss) disassembly in splat! This includes a few changes in behavior:
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
PyYAML
|
PyYAML
|
||||||
pylibyaml
|
pylibyaml
|
||||||
pypng
|
|
||||||
colorama
|
|
||||||
spimdisasm>=1.5.3
|
|
||||||
rabbitizer>=1.2.0
|
|
||||||
pygfxd
|
|
||||||
tqdm
|
tqdm
|
||||||
intervaltree
|
intervaltree
|
||||||
|
colorama
|
||||||
|
spimdisasm>=1.5.5
|
||||||
|
rabbitizer>=1.2.0
|
||||||
|
pygfxd
|
||||||
|
n64img>=0.1.2
|
||||||
|
@ -7,7 +7,7 @@ from util import options
|
|||||||
|
|
||||||
class CommonSegAsm(CommonSegCodeSubsegment):
|
class CommonSegAsm(CommonSegCodeSubsegment):
|
||||||
def out_path(self) -> Optional[Path]:
|
def out_path(self) -> Optional[Path]:
|
||||||
return options.get_asm_path() / self.dir / f"{self.name}.s"
|
return options.opts.asm_path / self.dir / f"{self.name}.s"
|
||||||
|
|
||||||
def scan(self, rom_bytes: bytes):
|
def scan(self, rom_bytes: bytes):
|
||||||
if (
|
if (
|
||||||
|
@ -7,7 +7,7 @@ from util import log
|
|||||||
|
|
||||||
class CommonSegBin(CommonSegment):
|
class CommonSegBin(CommonSegment):
|
||||||
def out_path(self) -> Optional[Path]:
|
def out_path(self) -> Optional[Path]:
|
||||||
return options.get_asset_path() / self.dir / f"{self.name}.bin"
|
return options.opts.asset_path / self.dir / f"{self.name}.bin"
|
||||||
|
|
||||||
def split(self, rom_bytes):
|
def split(self, rom_bytes):
|
||||||
path = self.out_path()
|
path = self.out_path()
|
||||||
|
@ -79,7 +79,7 @@ class CommonSegC(CommonSegCodeSubsegment):
|
|||||||
)
|
)
|
||||||
macro_contents = text[pos:close_paren_pos]
|
macro_contents = text[pos:close_paren_pos]
|
||||||
macro_args = macro_contents.split(",")
|
macro_args = macro_contents.split(",")
|
||||||
if options.get_use_legacy_include_asm():
|
if options.opts.use_legacy_include_asm:
|
||||||
if len(macro_args) >= 3:
|
if len(macro_args) >= 3:
|
||||||
yield macro_args[2].strip(" )")
|
yield macro_args[2].strip(" )")
|
||||||
else:
|
else:
|
||||||
@ -90,7 +90,7 @@ class CommonSegC(CommonSegCodeSubsegment):
|
|||||||
def get_global_asm_funcs(c_file):
|
def get_global_asm_funcs(c_file):
|
||||||
with open(c_file, "r") as f:
|
with open(c_file, "r") as f:
|
||||||
text = CommonSegC.strip_c_comments(f.read())
|
text = CommonSegC.strip_c_comments(f.read())
|
||||||
if options.get_compiler() in [GCC, SN64]:
|
if options.opts.compiler in [GCC, SN64]:
|
||||||
return set(CommonSegC.find_include_asm(text))
|
return set(CommonSegC.find_include_asm(text))
|
||||||
else:
|
else:
|
||||||
return set(
|
return set(
|
||||||
@ -98,7 +98,7 @@ class CommonSegC(CommonSegCodeSubsegment):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def out_path(self) -> Optional[Path]:
|
def out_path(self) -> Optional[Path]:
|
||||||
return options.get_src_path() / self.dir / f"{self.name}.c"
|
return options.opts.src_path / self.dir / f"{self.name}.c"
|
||||||
|
|
||||||
def scan(self, rom_bytes: bytes):
|
def scan(self, rom_bytes: bytes):
|
||||||
if (
|
if (
|
||||||
@ -108,7 +108,7 @@ class CommonSegC(CommonSegCodeSubsegment):
|
|||||||
):
|
):
|
||||||
path = self.out_path()
|
path = self.out_path()
|
||||||
if path:
|
if path:
|
||||||
if options.do_c_func_detection() and os.path.exists(path):
|
if options.opts.do_c_func_detection and os.path.exists(path):
|
||||||
# TODO run cpp?
|
# TODO run cpp?
|
||||||
self.defined_funcs = self.get_funcs_defined_in_c(path)
|
self.defined_funcs = self.get_funcs_defined_in_c(path)
|
||||||
self.global_asm_funcs = self.get_global_asm_funcs(path)
|
self.global_asm_funcs = self.get_global_asm_funcs(path)
|
||||||
@ -120,8 +120,7 @@ class CommonSegC(CommonSegCodeSubsegment):
|
|||||||
|
|
||||||
def split(self, rom_bytes: bytes):
|
def split(self, rom_bytes: bytes):
|
||||||
if not self.rom_start == self.rom_end:
|
if not self.rom_start == self.rom_end:
|
||||||
|
asm_out_dir = options.opts.nonmatchings_path / self.dir
|
||||||
asm_out_dir = options.get_nonmatchings_path() / self.dir
|
|
||||||
asm_out_dir.mkdir(parents=True, exist_ok=True)
|
asm_out_dir.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
self.print_file_boundaries()
|
self.print_file_boundaries()
|
||||||
@ -130,26 +129,28 @@ class CommonSegC(CommonSegCodeSubsegment):
|
|||||||
|
|
||||||
c_path = self.out_path()
|
c_path = self.out_path()
|
||||||
if c_path:
|
if c_path:
|
||||||
if not os.path.exists(c_path) and options.get_create_c_files():
|
if not os.path.exists(c_path) and options.opts.create_c_files:
|
||||||
self.create_c_file(asm_out_dir, c_path)
|
self.create_c_file(asm_out_dir, c_path)
|
||||||
is_new_c_file = True
|
is_new_c_file = True
|
||||||
|
|
||||||
|
self.create_asm_dependencies_file(c_path, asm_out_dir, is_new_c_file)
|
||||||
|
|
||||||
assert self.spim_section is not None
|
assert self.spim_section is not None
|
||||||
for func in self.spim_section.symbolList:
|
for func in self.spim_section.symbolList:
|
||||||
assert func.vram is not None
|
|
||||||
assert isinstance(func, spimdisasm.mips.symbols.SymbolFunction)
|
|
||||||
func_sym = self.get_symbol(
|
|
||||||
func.vram, in_segment=True, type="func", local_only=True
|
|
||||||
)
|
|
||||||
assert func_sym is not None
|
|
||||||
|
|
||||||
if func.getName() in self.global_asm_funcs or is_new_c_file:
|
if func.getName() in self.global_asm_funcs or is_new_c_file:
|
||||||
|
assert func.vram is not None
|
||||||
|
assert isinstance(func, spimdisasm.mips.symbols.SymbolFunction)
|
||||||
|
func_sym = self.get_symbol(
|
||||||
|
func.vram, in_segment=True, type="func", local_only=True
|
||||||
|
)
|
||||||
|
assert func_sym is not None
|
||||||
|
|
||||||
self.create_c_asm_file(func, asm_out_dir, func_sym)
|
self.create_c_asm_file(func, asm_out_dir, func_sym)
|
||||||
|
|
||||||
def get_c_preamble(self):
|
def get_c_preamble(self):
|
||||||
ret = []
|
ret = []
|
||||||
|
|
||||||
preamble = options.get_generated_c_premble()
|
preamble = options.opts.generated_c_preamble
|
||||||
ret.append(preamble)
|
ret.append(preamble)
|
||||||
ret.append("")
|
ret.append("")
|
||||||
|
|
||||||
@ -168,9 +169,12 @@ class CommonSegC(CommonSegCodeSubsegment):
|
|||||||
break
|
break
|
||||||
|
|
||||||
def create_c_asm_file(
|
def create_c_asm_file(
|
||||||
self, func: spimdisasm.mips.symbols.SymbolFunction, out_dir, func_sym: Symbol
|
self,
|
||||||
|
func: spimdisasm.mips.symbols.SymbolFunction,
|
||||||
|
out_dir: Path,
|
||||||
|
func_sym: Symbol,
|
||||||
):
|
):
|
||||||
outpath = Path(os.path.join(out_dir, self.name, func_sym.name + ".s"))
|
outpath = out_dir / self.name / (func_sym.name + ".s")
|
||||||
assert func.vram is not None
|
assert func.vram is not None
|
||||||
|
|
||||||
# Skip extraction if the file exists and the symbol is marked as extract=false
|
# Skip extraction if the file exists and the symbol is marked as extract=false
|
||||||
@ -180,12 +184,14 @@ class CommonSegC(CommonSegCodeSubsegment):
|
|||||||
outpath.parent.mkdir(parents=True, exist_ok=True)
|
outpath.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
with open(outpath, "w", newline="\n") as f:
|
with open(outpath, "w", newline="\n") as f:
|
||||||
if options.asm_inc_header():
|
if options.opts.asm_inc_header:
|
||||||
f.write(options.c_newline().join(options.asm_inc_header().split("\n")))
|
f.write(
|
||||||
|
options.opts.c_newline.join(options.opts.asm_inc_header.split("\n"))
|
||||||
|
)
|
||||||
|
|
||||||
if self.parent and isinstance(self.parent, CommonSegGroup):
|
if self.parent and isinstance(self.parent, CommonSegGroup):
|
||||||
if (
|
if (
|
||||||
options.get_migrate_rodata_to_functions()
|
options.opts.migrate_rodata_to_functions
|
||||||
and func.vram in self.parent.rodata_syms
|
and func.vram in self.parent.rodata_syms
|
||||||
):
|
):
|
||||||
func_rodata = list({s for s in self.parent.rodata_syms[func.vram]})
|
func_rodata = list({s for s in self.parent.rodata_syms[func.vram]})
|
||||||
@ -242,17 +248,17 @@ class CommonSegC(CommonSegCodeSubsegment):
|
|||||||
|
|
||||||
# Terrible hack to "auto-decompile" empty functions
|
# Terrible hack to "auto-decompile" empty functions
|
||||||
if (
|
if (
|
||||||
options.get_auto_decompile_empty_functions()
|
options.opts.auto_decompile_empty_functions
|
||||||
and func.instructions[0].isJrRa()
|
and func.instructions[0].isJrRa()
|
||||||
and func.instructions[1].isNop()
|
and func.instructions[1].isNop()
|
||||||
):
|
):
|
||||||
c_lines.append("void " + func.getName() + "(void) {")
|
c_lines.append("void " + func.getName() + "(void) {")
|
||||||
c_lines.append("}")
|
c_lines.append("}")
|
||||||
else:
|
else:
|
||||||
if options.get_compiler() in [GCC, SN64]:
|
if options.opts.compiler in [GCC, SN64]:
|
||||||
if options.get_use_legacy_include_asm():
|
if options.opts.use_legacy_include_asm:
|
||||||
rel_asm_out_dir = asm_out_dir.relative_to(
|
rel_asm_out_dir = asm_out_dir.relative_to(
|
||||||
options.get_nonmatchings_path()
|
options.opts.nonmatchings_path
|
||||||
)
|
)
|
||||||
c_lines.append(
|
c_lines.append(
|
||||||
f'INCLUDE_ASM(s32, "{rel_asm_out_dir / self.name}", {func.getName()});'
|
f'INCLUDE_ASM(s32, "{rel_asm_out_dir / self.name}", {func.getName()});'
|
||||||
@ -266,7 +272,7 @@ class CommonSegC(CommonSegCodeSubsegment):
|
|||||||
os.path.join(asm_out_dir, self.name, func.getName() + ".s")
|
os.path.join(asm_out_dir, self.name, func.getName() + ".s")
|
||||||
)
|
)
|
||||||
rel_asm_outpath = os.path.relpath(
|
rel_asm_outpath = os.path.relpath(
|
||||||
asm_outpath, options.get_base_path()
|
asm_outpath, options.opts.base_path
|
||||||
)
|
)
|
||||||
c_lines.append(f'#pragma GLOBAL_ASM("{rel_asm_outpath}")')
|
c_lines.append(f'#pragma GLOBAL_ASM("{rel_asm_outpath}")')
|
||||||
c_lines.append("")
|
c_lines.append("")
|
||||||
@ -275,3 +281,27 @@ class CommonSegC(CommonSegCodeSubsegment):
|
|||||||
with open(c_path, "w") as f:
|
with open(c_path, "w") as f:
|
||||||
f.write("\n".join(c_lines))
|
f.write("\n".join(c_lines))
|
||||||
log.write(f"Wrote {self.name} to {c_path}")
|
log.write(f"Wrote {self.name} to {c_path}")
|
||||||
|
|
||||||
|
def create_asm_dependencies_file(
|
||||||
|
self, c_path: Path, asm_out_dir: Path, is_new_c_file: bool
|
||||||
|
):
|
||||||
|
if not options.opts.create_asm_dependencies:
|
||||||
|
return
|
||||||
|
if not (len(self.global_asm_funcs) > 0 or is_new_c_file):
|
||||||
|
return
|
||||||
|
|
||||||
|
assert self.spim_section is not None
|
||||||
|
|
||||||
|
build_path = options.opts.build_path
|
||||||
|
|
||||||
|
dep_path = build_path / c_path.with_suffix(".asmproc.d")
|
||||||
|
with dep_path.open("w") as f:
|
||||||
|
o_path = build_path / c_path.with_suffix(".o")
|
||||||
|
f.write(f"{o_path}:")
|
||||||
|
for func in self.spim_section.symbolList:
|
||||||
|
func_name = func.getName()
|
||||||
|
|
||||||
|
if func_name in self.global_asm_funcs or is_new_c_file:
|
||||||
|
outpath = asm_out_dir / self.name / (func_name + ".s")
|
||||||
|
f.write(f" \\\n {outpath}")
|
||||||
|
f.write("\n")
|
||||||
|
@ -131,7 +131,7 @@ class CommonSegCode(CommonSegGroup):
|
|||||||
section_order.remove(".text")
|
section_order.remove(".text")
|
||||||
|
|
||||||
for i, section in enumerate(section_order):
|
for i, section in enumerate(section_order):
|
||||||
if section not in options.auto_all_sections():
|
if section not in options.opts.auto_all_sections:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if not found_sections[section].has_start():
|
if not found_sections[section].has_start():
|
||||||
@ -159,7 +159,7 @@ class CommonSegCode(CommonSegGroup):
|
|||||||
) # Used to manually add "all_" types for sections not otherwise defined in the yaml
|
) # Used to manually add "all_" types for sections not otherwise defined in the yaml
|
||||||
|
|
||||||
self.section_boundaries = OrderedDict(
|
self.section_boundaries = OrderedDict(
|
||||||
(s_name, Range()) for s_name in options.get_section_order()
|
(s_name, Range()) for s_name in options.opts.section_order
|
||||||
)
|
)
|
||||||
|
|
||||||
found_sections = OrderedDict(
|
found_sections = OrderedDict(
|
||||||
@ -223,7 +223,21 @@ class CommonSegCode(CommonSegGroup):
|
|||||||
|
|
||||||
# Add dummy segments to be expanded later
|
# Add dummy segments to be expanded later
|
||||||
if typ.startswith("all_"):
|
if typ.startswith("all_"):
|
||||||
ret.append(Segment(start, "auto", typ, "", "auto"))
|
ret.append(
|
||||||
|
Segment(
|
||||||
|
start,
|
||||||
|
"auto",
|
||||||
|
typ,
|
||||||
|
"",
|
||||||
|
"auto",
|
||||||
|
False,
|
||||||
|
self.given_subalign,
|
||||||
|
self.exclusive_ram_id,
|
||||||
|
self.given_dir,
|
||||||
|
self.symbol_name_format,
|
||||||
|
self.symbol_name_format_no_rom,
|
||||||
|
)
|
||||||
|
)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
segment_class = Segment.get_class_for_type(typ)
|
segment_class = Segment.get_class_for_type(typ)
|
||||||
@ -292,6 +306,12 @@ class CommonSegCode(CommonSegGroup):
|
|||||||
"all_" + section,
|
"all_" + section,
|
||||||
"",
|
"",
|
||||||
vram_start,
|
vram_start,
|
||||||
|
False,
|
||||||
|
self.given_subalign,
|
||||||
|
self.exclusive_ram_id,
|
||||||
|
self.given_dir,
|
||||||
|
self.symbol_name_format,
|
||||||
|
self.symbol_name_format_no_rom,
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
@ -7,46 +7,18 @@ from segtypes.segment import Segment
|
|||||||
from segtypes import segment
|
from segtypes import segment
|
||||||
from util import symbols
|
from util import symbols
|
||||||
|
|
||||||
|
|
||||||
# abstract class for c, asm, data, etc
|
# abstract class for c, asm, data, etc
|
||||||
class CommonSegCodeSubsegment(Segment):
|
class CommonSegCodeSubsegment(Segment):
|
||||||
def __init__(
|
def __init__(self, *args, **kwargs):
|
||||||
self,
|
super().__init__(*args, **kwargs)
|
||||||
rom_start,
|
|
||||||
rom_end,
|
|
||||||
type,
|
|
||||||
name,
|
|
||||||
vram_start,
|
|
||||||
extract,
|
|
||||||
given_subalign,
|
|
||||||
exclusive_ram_id,
|
|
||||||
given_dir,
|
|
||||||
symbol_name_format,
|
|
||||||
symbol_name_format_no_rom,
|
|
||||||
args,
|
|
||||||
yaml,
|
|
||||||
):
|
|
||||||
vram = segment.parse_segment_vram(yaml)
|
|
||||||
if vram is not None:
|
|
||||||
vram_start = vram
|
|
||||||
self.partial_migration: bool = (
|
|
||||||
yaml.get("partial_migration", False) if isinstance(yaml, dict) else False
|
|
||||||
)
|
|
||||||
|
|
||||||
super().__init__(
|
vram = segment.parse_segment_vram(self.yaml)
|
||||||
rom_start,
|
if vram is not None:
|
||||||
rom_end,
|
self.vram_start = vram
|
||||||
type,
|
self.partial_migration: bool = (
|
||||||
name,
|
self.yaml.get("partial_migration", False)
|
||||||
vram_start,
|
if isinstance(self.yaml, dict)
|
||||||
extract,
|
else False
|
||||||
given_subalign,
|
|
||||||
exclusive_ram_id=exclusive_ram_id,
|
|
||||||
given_dir=given_dir,
|
|
||||||
symbol_name_format=symbol_name_format,
|
|
||||||
symbol_name_format_no_rom=symbol_name_format_no_rom,
|
|
||||||
args=args,
|
|
||||||
yaml=yaml,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
self.spim_section: Optional[spimdisasm.mips.sections.SectionBase] = None
|
self.spim_section: Optional[spimdisasm.mips.sections.SectionBase] = None
|
||||||
@ -151,7 +123,7 @@ class CommonSegCodeSubsegment(Segment):
|
|||||||
self.parent.check_rodata_sym(func_spim.vram, sym)
|
self.parent.check_rodata_sym(func_spim.vram, sym)
|
||||||
|
|
||||||
def print_file_boundaries(self):
|
def print_file_boundaries(self):
|
||||||
if not options.find_file_boundaries() or not self.spim_section:
|
if not options.opts.find_file_boundaries or not self.spim_section:
|
||||||
return
|
return
|
||||||
|
|
||||||
assert isinstance(self.rom_start, int)
|
assert isinstance(self.rom_start, int)
|
||||||
@ -193,7 +165,7 @@ class CommonSegCodeSubsegment(Segment):
|
|||||||
|
|
||||||
while rom_offset:
|
while rom_offset:
|
||||||
word = rom_bytes[rom_offset : rom_offset + 4]
|
word = rom_bytes[rom_offset : rom_offset + 4]
|
||||||
word_int = int.from_bytes(word, options.get_endianess())
|
word_int = int.from_bytes(word, options.opts.endianness)
|
||||||
if word_int >= start and word_int <= end:
|
if word_int >= start and word_int <= end:
|
||||||
self.parent.jtbl_glabels_to_add.add(word_int)
|
self.parent.jtbl_glabels_to_add.add(word_int)
|
||||||
else:
|
else:
|
||||||
@ -203,10 +175,12 @@ class CommonSegCodeSubsegment(Segment):
|
|||||||
|
|
||||||
def should_scan(self) -> bool:
|
def should_scan(self) -> bool:
|
||||||
return (
|
return (
|
||||||
options.mode_active("code")
|
options.opts.is_mode_active("code")
|
||||||
and self.rom_start != "auto"
|
and self.rom_start != "auto"
|
||||||
and self.rom_end != "auto"
|
and self.rom_end != "auto"
|
||||||
)
|
)
|
||||||
|
|
||||||
def should_split(self) -> bool:
|
def should_split(self) -> bool:
|
||||||
return self.extract and (self.partial_migration or options.mode_active("code"))
|
return self.extract and (
|
||||||
|
self.partial_migration or options.opts.is_mode_active("code")
|
||||||
|
)
|
||||||
|
@ -15,10 +15,10 @@ class CommonSegData(CommonSegCodeSubsegment, CommonSegGroup):
|
|||||||
return self.sibling.out_path()
|
return self.sibling.out_path()
|
||||||
else:
|
else:
|
||||||
# Implied C file
|
# Implied C file
|
||||||
return options.get_src_path() / self.dir / f"{self.name}.c"
|
return options.opts.src_path / self.dir / f"{self.name}.c"
|
||||||
else:
|
else:
|
||||||
# ASM
|
# ASM
|
||||||
return options.get_data_path() / self.dir / f"{self.name}.{self.type}.s"
|
return options.opts.data_path / self.dir / f"{self.name}.{self.type}.s"
|
||||||
|
|
||||||
def scan(self, rom_bytes: bytes):
|
def scan(self, rom_bytes: bytes):
|
||||||
CommonSegGroup.scan(self, rom_bytes)
|
CommonSegGroup.scan(self, rom_bytes)
|
||||||
@ -48,7 +48,7 @@ class CommonSegData(CommonSegCodeSubsegment, CommonSegGroup):
|
|||||||
f.write(self.spim_section.disassemble())
|
f.write(self.spim_section.disassemble())
|
||||||
|
|
||||||
def should_self_split(self) -> bool:
|
def should_self_split(self) -> bool:
|
||||||
return options.mode_active("data")
|
return options.opts.is_mode_active("data")
|
||||||
|
|
||||||
def should_split(self) -> bool:
|
def should_split(self) -> bool:
|
||||||
return True
|
return True
|
||||||
|
@ -5,7 +5,7 @@ from util import options
|
|||||||
|
|
||||||
class CommonSegHeader(CommonSegment):
|
class CommonSegHeader(CommonSegment):
|
||||||
def should_split(self):
|
def should_split(self):
|
||||||
return self.extract and options.mode_active("code")
|
return self.extract and options.opts.is_mode_active("code")
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_line(typ, data, comment):
|
def get_line(typ, data, comment):
|
||||||
@ -21,7 +21,7 @@ class CommonSegHeader(CommonSegment):
|
|||||||
return f".{typ} {dstr} /* {comment} */"
|
return f".{typ} {dstr} /* {comment} */"
|
||||||
|
|
||||||
def out_path(self) -> Path:
|
def out_path(self) -> Path:
|
||||||
return options.get_asm_path() / self.dir / f"{self.name}.s"
|
return options.opts.asm_path / self.dir / f"{self.name}.s"
|
||||||
|
|
||||||
def parse_header(self, rom_bytes):
|
def parse_header(self, rom_bytes):
|
||||||
return []
|
return []
|
||||||
|
@ -55,7 +55,7 @@ class CommonSegLib(N64Segment):
|
|||||||
return self.section
|
return self.section
|
||||||
|
|
||||||
def get_linker_entries(self):
|
def get_linker_entries(self):
|
||||||
path = options.get_lib_path() / self.name
|
path = options.opts.lib_path / self.name
|
||||||
|
|
||||||
object_path = f"{path}.a:{self.object}.o"
|
object_path = f"{path}.a:{self.object}.o"
|
||||||
|
|
||||||
|
@ -45,11 +45,11 @@ class CommonSegRodata(CommonSegData):
|
|||||||
# Disassemble the file itself
|
# Disassemble the file itself
|
||||||
super().split(rom_bytes)
|
super().split(rom_bytes)
|
||||||
|
|
||||||
if options.get_migrate_rodata_to_functions():
|
if options.opts.migrate_rodata_to_functions:
|
||||||
if self.spim_section and (
|
if self.spim_section and (
|
||||||
not self.type.startswith(".") or self.partial_migration
|
not self.type.startswith(".") or self.partial_migration
|
||||||
):
|
):
|
||||||
path_folder = options.get_data_path() / self.dir
|
path_folder = options.opts.data_path / self.dir
|
||||||
path_folder.parent.mkdir(parents=True, exist_ok=True)
|
path_folder.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
for rodataSym in self.spim_section.symbolList:
|
for rodataSym in self.spim_section.symbolList:
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
from functools import lru_cache
|
||||||
from typing import Dict, Optional, OrderedDict, Union, List
|
from typing import Dict, Optional, OrderedDict, Union, List
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from segtypes.common.data import CommonSegData
|
|
||||||
from segtypes.n64.img import N64SegImg
|
|
||||||
from segtypes.n64.palette import N64SegPalette
|
from segtypes.n64.palette import N64SegPalette
|
||||||
from util import options
|
from util import options
|
||||||
from segtypes.segment import Segment
|
from segtypes.segment import Segment
|
||||||
@ -10,9 +9,10 @@ import os
|
|||||||
import re
|
import re
|
||||||
|
|
||||||
# clean 'foo/../bar' to 'bar'
|
# clean 'foo/../bar' to 'bar'
|
||||||
|
@lru_cache(maxsize=None)
|
||||||
def clean_up_path(path: Path) -> Path:
|
def clean_up_path(path: Path) -> Path:
|
||||||
path_resolved = path.resolve()
|
path_resolved = path.resolve()
|
||||||
base_resolved = options.get_base_path().resolve()
|
base_resolved = options.opts.base_path.resolve()
|
||||||
try:
|
try:
|
||||||
return path_resolved.relative_to(base_resolved)
|
return path_resolved.relative_to(base_resolved)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
@ -31,11 +31,11 @@ def clean_up_path(path: Path) -> Path:
|
|||||||
|
|
||||||
def path_to_object_path(path: Path) -> Path:
|
def path_to_object_path(path: Path) -> Path:
|
||||||
path = clean_up_path(path)
|
path = clean_up_path(path)
|
||||||
if options.use_o_as_suffix():
|
if options.opts.use_o_as_suffix:
|
||||||
full_suffix = ".o"
|
full_suffix = ".o"
|
||||||
else:
|
else:
|
||||||
full_suffix = path.suffix + ".o"
|
full_suffix = path.suffix + ".o"
|
||||||
return clean_up_path(options.get_build_path() / path.with_suffix(full_suffix))
|
return clean_up_path(options.opts.build_path / path.with_suffix(full_suffix))
|
||||||
|
|
||||||
|
|
||||||
def write_file_if_different(path: Path, new_content: str):
|
def write_file_if_different(path: Path, new_content: str):
|
||||||
@ -107,8 +107,7 @@ class LinkerEntry:
|
|||||||
|
|
||||||
class LinkerWriter:
|
class LinkerWriter:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.shiftable: bool = options.get_shiftable()
|
self.linker_discard_section: bool = options.opts.ld_discard_section
|
||||||
self.linker_discard_section: bool = options.linker_discard_section()
|
|
||||||
self.entries: List[LinkerEntry] = []
|
self.entries: List[LinkerEntry] = []
|
||||||
|
|
||||||
self.buffer: List[str] = []
|
self.buffer: List[str] = []
|
||||||
@ -120,8 +119,8 @@ class LinkerWriter:
|
|||||||
self._begin_block()
|
self._begin_block()
|
||||||
self._writeln(f"__romPos = 0;")
|
self._writeln(f"__romPos = 0;")
|
||||||
|
|
||||||
if options.get_gp() is not None:
|
if options.opts.gp is not None:
|
||||||
self._writeln("_gp = " + f"0x{options.get_gp():X};")
|
self._writeln("_gp = " + f"0x{options.opts.gp:X};")
|
||||||
|
|
||||||
# Adds all the entries of a segment to the linker script buffer
|
# Adds all the entries of a segment to the linker script buffer
|
||||||
def add(self, segment: Segment, next_segment: Optional[Segment]):
|
def add(self, segment: Segment, next_segment: Optional[Segment]):
|
||||||
@ -133,8 +132,8 @@ class LinkerWriter:
|
|||||||
section_labels: OrderedDict[str, LinkerSection] = OrderedDict(
|
section_labels: OrderedDict[str, LinkerSection] = OrderedDict(
|
||||||
{
|
{
|
||||||
l: LinkerSection(l)
|
l: LinkerSection(l)
|
||||||
for l in options.get_section_order()
|
for l in options.opts.section_order
|
||||||
if l in options.ld_section_labels()
|
if l in options.opts.ld_section_labels
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -274,11 +273,11 @@ class LinkerWriter:
|
|||||||
assert self._indent_level == 0
|
assert self._indent_level == 0
|
||||||
|
|
||||||
write_file_if_different(
|
write_file_if_different(
|
||||||
options.get_ld_script_path(), "\n".join(self.buffer) + "\n"
|
options.opts.ld_script_path, "\n".join(self.buffer) + "\n"
|
||||||
)
|
)
|
||||||
|
|
||||||
def save_symbol_header(self):
|
def save_symbol_header(self):
|
||||||
path = options.get_linker_symbol_header_path()
|
path = options.opts.ld_symbol_header_path
|
||||||
|
|
||||||
if path:
|
if path:
|
||||||
write_file_if_different(
|
write_file_if_different(
|
||||||
|
@ -6,7 +6,7 @@ from util import log
|
|||||||
|
|
||||||
class N64SegYay0(N64Segment):
|
class N64SegYay0(N64Segment):
|
||||||
def split(self, rom_bytes):
|
def split(self, rom_bytes):
|
||||||
out_dir = options.get_asset_path() / self.dir
|
out_dir = options.opts.asset_path / self.dir
|
||||||
out_dir.mkdir(parents=True, exist_ok=True)
|
out_dir.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
if self.rom_end == "auto":
|
if self.rom_end == "auto":
|
||||||
@ -28,8 +28,8 @@ class N64SegYay0(N64Segment):
|
|||||||
return [
|
return [
|
||||||
LinkerEntry(
|
LinkerEntry(
|
||||||
self,
|
self,
|
||||||
[options.get_asset_path() / self.dir / f"{self.name}.bin"],
|
[options.opts.asset_path / self.dir / f"{self.name}.bin"],
|
||||||
options.get_asset_path() / self.dir / f"{self.name}.Yay0",
|
options.opts.asset_path / self.dir / f"{self.name}.Yay0",
|
||||||
self.get_linker_section(),
|
self.get_linker_section(),
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
@ -13,12 +13,12 @@ class N64SegAsm(CommonSegAsm):
|
|||||||
ret.append("/* assembler directives */")
|
ret.append("/* assembler directives */")
|
||||||
ret.append(".set noat /* allow manual use of $at */")
|
ret.append(".set noat /* allow manual use of $at */")
|
||||||
ret.append(".set noreorder /* don't insert nops after branches */")
|
ret.append(".set noreorder /* don't insert nops after branches */")
|
||||||
if options.get_add_set_gp_64():
|
if options.opts.add_set_gp_64:
|
||||||
ret.append(
|
ret.append(
|
||||||
".set gp=64 /* allow use of 64-bit general purpose registers */"
|
".set gp=64 /* allow use of 64-bit general purpose registers */"
|
||||||
)
|
)
|
||||||
ret.append("")
|
ret.append("")
|
||||||
preamble = options.get_generated_s_preamble()
|
preamble = options.opts.generated_s_preamble
|
||||||
if preamble:
|
if preamble:
|
||||||
ret.append(preamble)
|
ret.append(preamble)
|
||||||
ret.append("")
|
ret.append("")
|
||||||
|
35
tools/splat/segtypes/n64/ci.py
Normal file
35
tools/splat/segtypes/n64/ci.py
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
from segtypes.n64.img import N64SegImg
|
||||||
|
from util import log
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from segtypes.n64.palette import N64SegPalette
|
||||||
|
|
||||||
|
# Base class for CI4/CI8
|
||||||
|
class N64SegCi(N64SegImg):
|
||||||
|
def parse_palette_name(self, yaml, args) -> str:
|
||||||
|
ret = self.name
|
||||||
|
if isinstance(yaml, dict):
|
||||||
|
if "palette" in yaml:
|
||||||
|
ret = yaml["palette"]
|
||||||
|
elif len(args) > 2:
|
||||||
|
ret = args[2]
|
||||||
|
|
||||||
|
return ret
|
||||||
|
|
||||||
|
def __init__(self, *args, **kwargs):
|
||||||
|
super().__init__(*args, **kwargs)
|
||||||
|
|
||||||
|
self.palette: "Optional[N64SegPalette]" = None
|
||||||
|
self.palette_name = self.parse_palette_name(self.yaml, self.args)
|
||||||
|
|
||||||
|
def split(self, rom_bytes):
|
||||||
|
if self.palette is None:
|
||||||
|
# TODO: output with blank palette
|
||||||
|
log.error(
|
||||||
|
f"no palette sibling segment exists\n(hint: add a segment with type 'palette' and name '{self.name}')"
|
||||||
|
)
|
||||||
|
self.palette.extract = False
|
||||||
|
self.n64img.palette = self.palette.parse_palette(rom_bytes)
|
||||||
|
|
||||||
|
super().split(rom_bytes)
|
@ -1,17 +1,7 @@
|
|||||||
from segtypes.n64.ci8 import N64SegCi8
|
from segtypes.n64.ci import N64SegCi
|
||||||
from util import iter
|
import n64img.image
|
||||||
|
|
||||||
|
|
||||||
class N64SegCi4(N64SegCi8):
|
class N64SegCi4(N64SegCi):
|
||||||
@staticmethod
|
def __init__(self, *args, **kwargs):
|
||||||
def parse_image(data, width, height, flip_h=False, flip_v=False):
|
super().__init__(*args, **kwargs, img_cls=n64img.image.CI4)
|
||||||
img_data = bytearray()
|
|
||||||
|
|
||||||
for x, y, i in iter.iter_image_indexes(width, height, 0.5, 1, flip_h, flip_v):
|
|
||||||
img_data.append(data[i] >> 4)
|
|
||||||
img_data.append(data[i] & 0xF)
|
|
||||||
|
|
||||||
return img_data
|
|
||||||
|
|
||||||
def max_length(self):
|
|
||||||
return self.width * self.height // 2
|
|
||||||
|
@ -1,97 +1,7 @@
|
|||||||
from typing import TYPE_CHECKING, Optional
|
from segtypes.n64.ci import N64SegCi
|
||||||
from segtypes.n64.rgba16 import N64SegRgba16
|
import n64img.image
|
||||||
import png
|
|
||||||
from util import log
|
|
||||||
from util import options
|
|
||||||
from util import iter
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
|
||||||
from segtypes.n64.palette import N64SegPalette as Palette
|
|
||||||
|
|
||||||
|
|
||||||
class N64SegCi8(N64SegRgba16):
|
class N64SegCi8(N64SegCi):
|
||||||
def __init__(
|
def __init__(self, *args, **kwargs):
|
||||||
self,
|
super().__init__(*args, **kwargs, img_cls=n64img.image.CI8)
|
||||||
rom_start,
|
|
||||||
rom_end,
|
|
||||||
type,
|
|
||||||
name,
|
|
||||||
vram_start,
|
|
||||||
extract,
|
|
||||||
given_subalign,
|
|
||||||
exclusive_ram_id,
|
|
||||||
given_dir,
|
|
||||||
symbol_name_format,
|
|
||||||
symbol_name_format_no_rom,
|
|
||||||
args,
|
|
||||||
yaml,
|
|
||||||
):
|
|
||||||
super().__init__(
|
|
||||||
rom_start,
|
|
||||||
rom_end,
|
|
||||||
type,
|
|
||||||
name,
|
|
||||||
vram_start,
|
|
||||||
extract,
|
|
||||||
given_subalign,
|
|
||||||
exclusive_ram_id=exclusive_ram_id,
|
|
||||||
given_dir=given_dir,
|
|
||||||
symbol_name_format=symbol_name_format,
|
|
||||||
symbol_name_format_no_rom=symbol_name_format_no_rom,
|
|
||||||
args=args,
|
|
||||||
yaml=yaml,
|
|
||||||
)
|
|
||||||
|
|
||||||
self.palette: "Optional[Palette]" = None
|
|
||||||
|
|
||||||
palette_name = self.name
|
|
||||||
if isinstance(yaml, dict):
|
|
||||||
if "palette" in yaml:
|
|
||||||
palette_name = yaml["palette"]
|
|
||||||
elif len(args) > 2:
|
|
||||||
palette_name = args[2]
|
|
||||||
|
|
||||||
self.palette_name = palette_name
|
|
||||||
|
|
||||||
def split(self, rom_bytes):
|
|
||||||
path = options.get_asset_path() / self.dir / (self.name + ".png")
|
|
||||||
path.parent.mkdir(parents=True, exist_ok=True)
|
|
||||||
|
|
||||||
data = rom_bytes[self.rom_start : self.rom_end]
|
|
||||||
|
|
||||||
if self.palette is None:
|
|
||||||
# TODO: output with blank palette
|
|
||||||
log.error(
|
|
||||||
f"no palette sibling segment exists\n(hint: add a segment with type 'palette' and name '{self.name}')"
|
|
||||||
)
|
|
||||||
|
|
||||||
w = png.Writer(
|
|
||||||
self.width, self.height, palette=self.palette.parse_palette(rom_bytes)
|
|
||||||
)
|
|
||||||
image = self.__class__.parse_image(
|
|
||||||
data, self.width, self.height, self.flip_horizontal, self.flip_vertical
|
|
||||||
)
|
|
||||||
|
|
||||||
with open(self.out_path(), "wb") as f:
|
|
||||||
w.write_array(f, image)
|
|
||||||
|
|
||||||
self.palette.extract = False
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def parse_image(data, width, height, flip_h=False, flip_v=False):
|
|
||||||
# hot path
|
|
||||||
if not flip_h and not flip_v:
|
|
||||||
return data
|
|
||||||
|
|
||||||
flipped_data = bytearray()
|
|
||||||
|
|
||||||
for x, y, i in iter.iter_image_indexes(width, height, 1, 1, flip_h, flip_v):
|
|
||||||
flipped_data.append(data[i])
|
|
||||||
|
|
||||||
return flipped_data
|
|
||||||
|
|
||||||
def max_length(self):
|
|
||||||
return self.width * self.height
|
|
||||||
|
|
||||||
def cache(self):
|
|
||||||
return (self.yaml, self.rom_end, 1)
|
|
||||||
|
@ -50,13 +50,13 @@ class N64SegGfx(CommonSegCodeSubsegment):
|
|||||||
return ".data"
|
return ".data"
|
||||||
|
|
||||||
def out_path(self) -> Path:
|
def out_path(self) -> Path:
|
||||||
return options.get_asset_path() / self.dir / f"{self.name}.gfx.inc.c"
|
return options.opts.asset_path / self.dir / f"{self.name}.gfx.inc.c"
|
||||||
|
|
||||||
def scan(self, rom_bytes: bytes):
|
def scan(self, rom_bytes: bytes):
|
||||||
self.file_text = self.disassemble_data(rom_bytes)
|
self.file_text = self.disassemble_data(rom_bytes)
|
||||||
|
|
||||||
def get_gfxd_target(self):
|
def get_gfxd_target(self):
|
||||||
opt = options.get_gfx_ucode()
|
opt = options.opts.gfx_ucode
|
||||||
|
|
||||||
if opt == "f3d":
|
if opt == "f3d":
|
||||||
return gfxd_f3d # type: ignore
|
return gfxd_f3d # type: ignore
|
||||||
@ -155,7 +155,7 @@ class N64SegGfx(CommonSegCodeSubsegment):
|
|||||||
f"Error: gfx segment {self.name} length ({segment_length}) is not a multiple of 8!"
|
f"Error: gfx segment {self.name} length ({segment_length}) is not a multiple of 8!"
|
||||||
)
|
)
|
||||||
|
|
||||||
out_str = options.get_generated_c_premble() + "\n\n"
|
out_str = options.opts.generated_c_preamble + "\n\n"
|
||||||
|
|
||||||
sym = self.create_symbol(
|
sym = self.create_symbol(
|
||||||
addr=self.vram_start, in_segment=True, type="data", define=True
|
addr=self.vram_start, in_segment=True, type="data", define=True
|
||||||
@ -169,7 +169,7 @@ class N64SegGfx(CommonSegCodeSubsegment):
|
|||||||
|
|
||||||
gfxd_target(self.get_gfxd_target())
|
gfxd_target(self.get_gfxd_target())
|
||||||
gfxd_endian(
|
gfxd_endian(
|
||||||
GfxdEndian.big if options.get_endianess() == "big" else GfxdEndian.little, 4
|
GfxdEndian.big if options.opts.endianness == "big" else GfxdEndian.little, 4
|
||||||
)
|
)
|
||||||
|
|
||||||
# Callbacks
|
# Callbacks
|
||||||
@ -205,10 +205,10 @@ class N64SegGfx(CommonSegCodeSubsegment):
|
|||||||
|
|
||||||
def should_scan(self) -> bool:
|
def should_scan(self) -> bool:
|
||||||
return (
|
return (
|
||||||
options.mode_active("gfx")
|
options.opts.is_mode_active("gfx")
|
||||||
and self.rom_start != "auto"
|
and self.rom_start != "auto"
|
||||||
and self.rom_end != "auto"
|
and self.rom_end != "auto"
|
||||||
)
|
)
|
||||||
|
|
||||||
def should_split(self) -> bool:
|
def should_split(self) -> bool:
|
||||||
return self.extract and options.mode_active("gfx")
|
return self.extract and options.opts.is_mode_active("gfx")
|
||||||
|
@ -13,12 +13,12 @@ class N64SegHasm(CommonSegHasm):
|
|||||||
ret.append("/* assembler directives */")
|
ret.append("/* assembler directives */")
|
||||||
ret.append(".set noat /* allow manual use of $at */")
|
ret.append(".set noat /* allow manual use of $at */")
|
||||||
ret.append(".set noreorder /* don't insert nops after branches */")
|
ret.append(".set noreorder /* don't insert nops after branches */")
|
||||||
if options.get_add_set_gp_64():
|
if options.opts.add_set_gp_64:
|
||||||
ret.append(
|
ret.append(
|
||||||
".set gp=64 /* allow use of 64-bit general purpose registers */"
|
".set gp=64 /* allow use of 64-bit general purpose registers */"
|
||||||
)
|
)
|
||||||
ret.append("")
|
ret.append("")
|
||||||
preamble = options.get_generated_s_preamble()
|
preamble = options.opts.generated_s_preamble
|
||||||
if preamble:
|
if preamble:
|
||||||
ret.append(preamble)
|
ret.append(preamble)
|
||||||
ret.append("")
|
ret.append("")
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
from segtypes.common.header import CommonSegHeader
|
from segtypes.common.header import CommonSegHeader
|
||||||
from pathlib import Path
|
|
||||||
from util import options
|
from util import options
|
||||||
|
|
||||||
|
|
||||||
class N64SegHeader(CommonSegHeader):
|
class N64SegHeader(CommonSegHeader):
|
||||||
def parse_header(self, rom_bytes):
|
def parse_header(self, rom_bytes):
|
||||||
encoding = options.get_header_encoding()
|
encoding = options.opts.header_encoding
|
||||||
|
|
||||||
header_lines = []
|
header_lines = []
|
||||||
header_lines.append(f".section .data\n")
|
header_lines.append(f".section .data\n")
|
||||||
|
@ -1,30 +1,7 @@
|
|||||||
from segtypes.n64.rgba16 import N64SegRgba16
|
from segtypes.n64.img import N64SegImg
|
||||||
import png
|
import n64img.image
|
||||||
from math import ceil
|
|
||||||
from util import iter
|
|
||||||
|
|
||||||
|
|
||||||
class N64SegI4(N64SegRgba16):
|
class N64SegI4(N64SegImg):
|
||||||
@staticmethod
|
def __init__(self, *args, **kwargs):
|
||||||
def get_writer(width, height):
|
super().__init__(*args, **kwargs, img_cls=n64img.image.I4)
|
||||||
return png.Writer(width, height, greyscale=True)
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def parse_image(data, width, height, flip_h=False, flip_v=False):
|
|
||||||
img = bytearray()
|
|
||||||
|
|
||||||
for x, y, i in iter.iter_image_indexes(width, height, 0.5, 1, flip_h, flip_v):
|
|
||||||
b = data[i]
|
|
||||||
|
|
||||||
i1 = (b >> 4) & 0xF
|
|
||||||
i2 = b & 0xF
|
|
||||||
|
|
||||||
i1 = ceil(0xFF * (i1 / 15))
|
|
||||||
i2 = ceil(0xFF * (i2 / 15))
|
|
||||||
|
|
||||||
img += bytes((i1, i2))
|
|
||||||
|
|
||||||
return img
|
|
||||||
|
|
||||||
def max_length(self):
|
|
||||||
return self.width * self.height // 2
|
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
from segtypes.n64.i4 import N64SegI4
|
from segtypes.n64.img import N64SegImg
|
||||||
|
from segtypes.n64.img import N64SegImg
|
||||||
|
import n64img.image
|
||||||
|
|
||||||
|
|
||||||
class N64SegI8(N64SegI4):
|
class N64SegI8(N64SegImg):
|
||||||
@staticmethod
|
def __init__(self, *args, **kwargs):
|
||||||
def parse_image(data, width, height, flip_h=False, flip_v=False):
|
super().__init__(*args, **kwargs, img_cls=n64img.image.I8)
|
||||||
return data
|
|
||||||
|
|
||||||
def max_length(self):
|
|
||||||
return self.width * self.height
|
|
||||||
|
@ -1,19 +1,7 @@
|
|||||||
from segtypes.n64.ia4 import N64SegIa4
|
from segtypes.n64.img import N64SegImg
|
||||||
from util import iter
|
import n64img.image
|
||||||
|
|
||||||
|
|
||||||
class N64SegIa16(N64SegIa4):
|
class N64SegIa16(N64SegImg):
|
||||||
def split(self, rom_bytes):
|
def __init__(self, *args, **kwargs):
|
||||||
path = self.out_path()
|
super().__init__(*args, **kwargs, img_cls=n64img.image.IA16)
|
||||||
path.parent.mkdir(parents=True, exist_ok=True)
|
|
||||||
|
|
||||||
data = rom_bytes[self.rom_start : self.rom_end]
|
|
||||||
|
|
||||||
w = self.__class__.get_writer(self.width, self.height)
|
|
||||||
with open(path, "wb") as f:
|
|
||||||
w.write_array(f, data)
|
|
||||||
|
|
||||||
self.log(f"Wrote {self.name} to {path}")
|
|
||||||
|
|
||||||
def max_length(self):
|
|
||||||
return self.width * self.height * 2
|
|
||||||
|
@ -1,35 +1,7 @@
|
|||||||
from segtypes.n64.rgba16 import N64SegRgba16
|
from segtypes.n64.img import N64SegImg
|
||||||
import png
|
import n64img.image
|
||||||
from math import ceil
|
|
||||||
from util import iter
|
|
||||||
|
|
||||||
|
|
||||||
class N64SegIa4(N64SegRgba16):
|
class N64SegIa4(N64SegImg):
|
||||||
@staticmethod
|
def __init__(self, *args, **kwargs):
|
||||||
def get_writer(width, height):
|
super().__init__(*args, **kwargs, img_cls=n64img.image.IA4)
|
||||||
return png.Writer(width, height, greyscale=True, alpha=True)
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def parse_image(data, width, height, flip_h=False, flip_v=False):
|
|
||||||
img = bytearray()
|
|
||||||
|
|
||||||
for x, y, i in iter.iter_image_indexes(width, height, 0.5, 1, flip_h, flip_v):
|
|
||||||
b = data[i]
|
|
||||||
|
|
||||||
h = (b >> 4) & 0xF
|
|
||||||
l = b & 0xF
|
|
||||||
|
|
||||||
i1 = (h >> 1) & 0xF
|
|
||||||
a1 = (h & 1) * 0xFF
|
|
||||||
i1 = ceil(0xFF * (i1 / 7))
|
|
||||||
|
|
||||||
i2 = (l >> 1) & 0xF
|
|
||||||
a2 = (l & 1) * 0xFF
|
|
||||||
i2 = ceil(0xFF * (i2 / 7))
|
|
||||||
|
|
||||||
img += bytes((i1, a1, i2, a2))
|
|
||||||
|
|
||||||
return img
|
|
||||||
|
|
||||||
def max_length(self):
|
|
||||||
return self.width * self.height // 2
|
|
||||||
|
@ -1,27 +1,7 @@
|
|||||||
from segtypes.n64.ia4 import N64SegIa4
|
from segtypes.n64.img import N64SegImg
|
||||||
from math import ceil
|
import n64img.image
|
||||||
from util import iter
|
|
||||||
|
|
||||||
|
|
||||||
class N64SegIa8(N64SegIa4):
|
class N64SegIa8(N64SegImg):
|
||||||
@staticmethod
|
def __init__(self, *args, **kwargs):
|
||||||
def parse_image(data, width, height, flip_h=False, flip_v=False):
|
super().__init__(*args, **kwargs, img_cls=n64img.image.IA8)
|
||||||
img = bytearray()
|
|
||||||
|
|
||||||
for x, y, i in iter.iter_image_indexes(
|
|
||||||
width, height, flip_h=flip_h, flip_v=flip_v
|
|
||||||
):
|
|
||||||
b = data[i]
|
|
||||||
|
|
||||||
i = (b >> 4) & 0xF
|
|
||||||
a = b & 0xF
|
|
||||||
|
|
||||||
i = ceil(0xFF * (i / 15))
|
|
||||||
a = ceil(0xFF * (a / 15))
|
|
||||||
|
|
||||||
img += bytes((i, a))
|
|
||||||
|
|
||||||
return img
|
|
||||||
|
|
||||||
def max_length(self):
|
|
||||||
return self.width * self.height
|
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Optional
|
from typing import Type
|
||||||
|
|
||||||
|
from n64img.image import Image
|
||||||
from segtypes.n64.segment import N64Segment
|
from segtypes.n64.segment import N64Segment
|
||||||
from util import options
|
from util import log, options
|
||||||
from util import log
|
|
||||||
|
|
||||||
|
|
||||||
class N64SegImg(N64Segment):
|
class N64SegImg(N64Segment):
|
||||||
@ -21,6 +22,7 @@ class N64SegImg(N64Segment):
|
|||||||
symbol_name_format_no_rom,
|
symbol_name_format_no_rom,
|
||||||
args,
|
args,
|
||||||
yaml,
|
yaml,
|
||||||
|
img_cls: Type[Image],
|
||||||
):
|
):
|
||||||
super().__init__(
|
super().__init__(
|
||||||
rom_start,
|
rom_start,
|
||||||
@ -38,26 +40,15 @@ class N64SegImg(N64Segment):
|
|||||||
yaml=yaml,
|
yaml=yaml,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
self.n64img: Image = img_cls(None, 0, 0)
|
||||||
|
|
||||||
if isinstance(yaml, dict):
|
if isinstance(yaml, dict):
|
||||||
if self.extract:
|
if self.extract:
|
||||||
self.width = yaml["width"]
|
self.width = yaml["width"]
|
||||||
self.height = yaml["height"]
|
self.height = yaml["height"]
|
||||||
|
|
||||||
self.flip_horizontal = bool(yaml.get("flip_x", False))
|
self.n64img.flip_h = bool(yaml.get("flip_x", False))
|
||||||
self.flip_vertical = bool(yaml.get("flip_y", False))
|
self.n64img.flip_v = bool(yaml.get("flip_y", False))
|
||||||
|
|
||||||
if yaml.get("flip"):
|
|
||||||
self.warn(
|
|
||||||
f"'flip' parameter for img segments is deprecated; use flip_x and flip_y instead"
|
|
||||||
)
|
|
||||||
flip = yaml.get("flip")
|
|
||||||
|
|
||||||
self.flip_vertical = (
|
|
||||||
flip == "both" or flip.startswith("v") or flip == "y"
|
|
||||||
)
|
|
||||||
self.flip_horizontal = (
|
|
||||||
flip == "both" or flip.startswith("h") or flip == "x"
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
if self.extract:
|
if self.extract:
|
||||||
if len(yaml) < 5:
|
if len(yaml) < 5:
|
||||||
@ -67,22 +58,33 @@ class N64SegImg(N64Segment):
|
|||||||
self.width = yaml[3]
|
self.width = yaml[3]
|
||||||
self.height = yaml[4]
|
self.height = yaml[4]
|
||||||
|
|
||||||
self.flip_horizontal = False
|
self.n64img.width = self.width
|
||||||
self.flip_vertical = False
|
self.n64img.height = self.height
|
||||||
|
|
||||||
if self.extract and self.max_length() is not None:
|
self.check_len()
|
||||||
expected_len = int(self.max_length())
|
|
||||||
|
def check_len(self) -> None:
|
||||||
|
if self.extract:
|
||||||
|
expected_len = int(self.n64img.size())
|
||||||
|
assert isinstance(self.rom_start, int)
|
||||||
|
assert isinstance(self.rom_end, int)
|
||||||
actual_len = self.rom_end - self.rom_start
|
actual_len = self.rom_end - self.rom_start
|
||||||
if actual_len > expected_len and actual_len - expected_len > self.subalign:
|
if actual_len > expected_len and actual_len - expected_len > self.subalign:
|
||||||
log.error(
|
log.error(
|
||||||
f"Error: {self.name} should end at 0x{self.rom_start + expected_len:X}, but it ends at 0x{self.rom_end:X}\n(hint: add a 'bin' segment after it)"
|
f"Error: {self.name} should end at 0x{self.rom_start + expected_len:X}, but it ends at 0x{self.rom_end:X}\n(hint: add a 'bin' segment after it)"
|
||||||
)
|
)
|
||||||
|
|
||||||
def out_path(self) -> Optional[Path]:
|
def out_path(self) -> Path:
|
||||||
return options.get_asset_path() / self.dir / f"{self.name}.png"
|
return options.opts.asset_path / self.dir / f"{self.name}.png"
|
||||||
|
|
||||||
def should_split(self) -> bool:
|
def should_split(self) -> bool:
|
||||||
return self.extract and options.mode_active("img")
|
return self.extract and options.opts.is_mode_active("img")
|
||||||
|
|
||||||
def max_length(self) -> Optional[int]:
|
def split(self, rom_bytes):
|
||||||
return None
|
path = self.out_path()
|
||||||
|
path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
|
self.n64img.data = rom_bytes[self.rom_start : self.rom_end]
|
||||||
|
self.n64img.write(path)
|
||||||
|
|
||||||
|
self.log(f"Wrote {self.name} to {path}")
|
||||||
|
@ -1,50 +1,20 @@
|
|||||||
from typing import TYPE_CHECKING, Optional
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
from typing import TYPE_CHECKING, Optional
|
||||||
|
|
||||||
from segtypes.n64.segment import N64Segment
|
from segtypes.n64.segment import N64Segment
|
||||||
from util import options
|
from util import log, options
|
||||||
from util.color import unpack_color
|
from util.color import unpack_color
|
||||||
from util.iter import iter_in_groups
|
from util.iter import iter_in_groups
|
||||||
from util import log
|
|
||||||
import png
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from segtypes.n64.ci8 import N64SegCi8 as Raster
|
from segtypes.n64.ci import N64SegCi as Raster
|
||||||
|
|
||||||
|
|
||||||
class N64SegPalette(N64Segment):
|
class N64SegPalette(N64Segment):
|
||||||
require_unique_name = False
|
require_unique_name = False
|
||||||
|
|
||||||
def __init__(
|
def __init__(self, *args, **kwargs):
|
||||||
self,
|
super().__init__(*args, **kwargs)
|
||||||
rom_start,
|
|
||||||
rom_end,
|
|
||||||
type,
|
|
||||||
name,
|
|
||||||
vram_start,
|
|
||||||
extract,
|
|
||||||
given_subalign,
|
|
||||||
exclusive_ram_id,
|
|
||||||
given_dir,
|
|
||||||
symbol_name_format,
|
|
||||||
symbol_name_format_no_rom,
|
|
||||||
args,
|
|
||||||
yaml,
|
|
||||||
):
|
|
||||||
super().__init__(
|
|
||||||
rom_start,
|
|
||||||
rom_end,
|
|
||||||
type,
|
|
||||||
name,
|
|
||||||
vram_start,
|
|
||||||
extract,
|
|
||||||
given_subalign,
|
|
||||||
exclusive_ram_id=exclusive_ram_id,
|
|
||||||
given_dir=given_dir,
|
|
||||||
symbol_name_format=symbol_name_format,
|
|
||||||
symbol_name_format_no_rom=symbol_name_format_no_rom,
|
|
||||||
args=args,
|
|
||||||
yaml=yaml,
|
|
||||||
)
|
|
||||||
|
|
||||||
self.raster: "Optional[Raster]" = None
|
self.raster: "Optional[Raster]" = None
|
||||||
|
|
||||||
@ -53,8 +23,8 @@ class N64SegPalette(N64Segment):
|
|||||||
# 2) relevant raster segment name + "." + unique palette name
|
# 2) relevant raster segment name + "." + unique palette name
|
||||||
# 3) unique, referencing the relevant raster segment using `raster_name`
|
# 3) unique, referencing the relevant raster segment using `raster_name`
|
||||||
self.raster_name = (
|
self.raster_name = (
|
||||||
yaml.get("raster_name", self.name.split(".")[0])
|
self.yaml.get("raster_name", self.name.split(".")[0])
|
||||||
if isinstance(yaml, dict)
|
if isinstance(self.yaml, dict)
|
||||||
else self.name.split(".")[0]
|
else self.name.split(".")[0]
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -66,6 +36,8 @@ class N64SegPalette(N64Segment):
|
|||||||
|
|
||||||
if self.max_length() and isinstance(self.rom_end, int):
|
if self.max_length() and isinstance(self.rom_end, int):
|
||||||
expected_len = int(self.max_length())
|
expected_len = int(self.max_length())
|
||||||
|
assert isinstance(self.rom_end, int)
|
||||||
|
assert isinstance(self.rom_start, int)
|
||||||
actual_len = self.rom_end - self.rom_start
|
actual_len = self.rom_end - self.rom_start
|
||||||
if (
|
if (
|
||||||
actual_len > expected_len
|
actual_len > expected_len
|
||||||
@ -75,31 +47,14 @@ class N64SegPalette(N64Segment):
|
|||||||
f"Error: {self.name} should end at 0x{self.rom_start + expected_len:X}, but it ends at 0x{self.rom_end:X}\n(hint: add a 'bin' segment after it)"
|
f"Error: {self.name} should end at 0x{self.rom_start + expected_len:X}, but it ends at 0x{self.rom_end:X}\n(hint: add a 'bin' segment after it)"
|
||||||
)
|
)
|
||||||
|
|
||||||
def should_split(self):
|
|
||||||
return self.extract and (super().should_split() or options.mode_active("img"))
|
|
||||||
|
|
||||||
def out_path(self) -> Optional[Path]:
|
|
||||||
return options.get_asset_path() / self.dir / f"{self.name}.png"
|
|
||||||
|
|
||||||
def split(self, rom_bytes):
|
def split(self, rom_bytes):
|
||||||
if self.raster is None:
|
if self.raster is None:
|
||||||
# TODO: output with no raster
|
# TODO: output with no raster
|
||||||
log.error(f"orphaned palette segment: {self.name} lacks ci4/ci8 sibling")
|
log.error(f"orphaned palette segment: {self.name} lacks ci4/ci8 sibling")
|
||||||
|
|
||||||
w = png.Writer(
|
self.raster.n64img.palette = self.parse_palette(rom_bytes)
|
||||||
self.raster.width, self.raster.height, palette=self.parse_palette(rom_bytes)
|
|
||||||
)
|
|
||||||
image = self.raster.__class__.parse_image(
|
|
||||||
rom_bytes[self.raster.rom_start : self.raster.rom_end],
|
|
||||||
self.raster.width,
|
|
||||||
self.raster.height,
|
|
||||||
self.raster.flip_horizontal,
|
|
||||||
self.raster.flip_vertical,
|
|
||||||
)
|
|
||||||
|
|
||||||
with open(self.out_path(), "wb") as f:
|
|
||||||
w.write_array(f, image)
|
|
||||||
|
|
||||||
|
self.raster.n64img.write(self.out_path())
|
||||||
self.raster.extract = False
|
self.raster.extract = False
|
||||||
|
|
||||||
def parse_palette(self, rom_bytes):
|
def parse_palette(self, rom_bytes):
|
||||||
@ -114,14 +69,20 @@ class N64SegPalette(N64Segment):
|
|||||||
def max_length(self):
|
def max_length(self):
|
||||||
return 256 * 2
|
return 256 * 2
|
||||||
|
|
||||||
|
def out_path(self) -> Path:
|
||||||
|
return options.opts.asset_path / self.dir / f"{self.name}.png"
|
||||||
|
|
||||||
|
def should_split(self) -> bool:
|
||||||
|
return self.extract and options.opts.is_mode_active("img")
|
||||||
|
|
||||||
def get_linker_entries(self):
|
def get_linker_entries(self):
|
||||||
from segtypes.linker_entry import LinkerEntry
|
from segtypes.linker_entry import LinkerEntry
|
||||||
|
|
||||||
return [
|
return [
|
||||||
LinkerEntry(
|
LinkerEntry(
|
||||||
self,
|
self,
|
||||||
[options.get_asset_path() / self.dir / f"{self.name}.png"],
|
[options.opts.asset_path / self.dir / f"{self.name}.png"],
|
||||||
options.get_asset_path() / self.dir / f"{self.name}.pal",
|
options.opts.asset_path / self.dir / f"{self.name}.pal",
|
||||||
self.get_linker_section(),
|
self.get_linker_section(),
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
@ -1,43 +1,7 @@
|
|||||||
from segtypes.n64.img import N64SegImg
|
from segtypes.n64.img import N64SegImg
|
||||||
import png
|
import n64img.image
|
||||||
from util import iter
|
|
||||||
from util.color import unpack_color
|
|
||||||
|
|
||||||
# TODO: move common behaviour to N64ImgSegment and have all image segments extend that instead
|
|
||||||
class N64SegRgba16(N64SegImg):
|
class N64SegRgba16(N64SegImg):
|
||||||
def split(self, rom_bytes):
|
def __init__(self, *args, **kwargs):
|
||||||
path = self.out_path()
|
super().__init__(*args, **kwargs, img_cls=n64img.image.RGBA16)
|
||||||
path.parent.mkdir(parents=True, exist_ok=True)
|
|
||||||
|
|
||||||
data = rom_bytes[self.rom_start : self.rom_end]
|
|
||||||
|
|
||||||
w = self.__class__.get_writer(self.width, self.height)
|
|
||||||
with open(path, "wb") as f:
|
|
||||||
w.write_array(
|
|
||||||
f,
|
|
||||||
self.parse_image(
|
|
||||||
data,
|
|
||||||
self.width,
|
|
||||||
self.height,
|
|
||||||
self.flip_horizontal,
|
|
||||||
self.flip_vertical,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
self.log(f"Wrote {self.name} to {path}")
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def get_writer(width, height):
|
|
||||||
return png.Writer(width, height, greyscale=False, alpha=True)
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def parse_image(data, width, height, flip_h=False, flip_v=False):
|
|
||||||
img = bytearray()
|
|
||||||
|
|
||||||
for x, y, i in iter.iter_image_indexes(width, height, 2, 1, flip_h, flip_v):
|
|
||||||
img += bytes(unpack_color(data[i:]))
|
|
||||||
|
|
||||||
return img
|
|
||||||
|
|
||||||
def max_length(self):
|
|
||||||
return self.width * self.height * 2
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
from segtypes.n64.rgba16 import N64SegRgba16
|
from segtypes.n64.img import N64SegImg
|
||||||
|
import n64img.image
|
||||||
|
|
||||||
|
|
||||||
class N64SegRgba32(N64SegRgba16):
|
class N64SegRgba32(N64SegImg):
|
||||||
@staticmethod
|
def __init__(self, *args, **kwargs):
|
||||||
def parse_image(data, width, height, flip_h=False, flip_v=False):
|
super().__init__(*args, **kwargs, img_cls=n64img.image.RGBA32)
|
||||||
return data
|
|
||||||
|
|
||||||
def max_length(self):
|
|
||||||
return self.width * self.height * 4
|
|
||||||
|
@ -52,7 +52,7 @@ class N64SegVtx(CommonSegCodeSubsegment):
|
|||||||
return ".data"
|
return ".data"
|
||||||
|
|
||||||
def out_path(self) -> Path:
|
def out_path(self) -> Path:
|
||||||
return options.get_asset_path() / self.dir / f"{self.name}.vtx.inc.c"
|
return options.opts.asset_path / self.dir / f"{self.name}.vtx.inc.c"
|
||||||
|
|
||||||
def scan(self, rom_bytes: bytes):
|
def scan(self, rom_bytes: bytes):
|
||||||
self.file_text = self.disassemble_data(rom_bytes)
|
self.file_text = self.disassemble_data(rom_bytes)
|
||||||
@ -66,7 +66,7 @@ class N64SegVtx(CommonSegCodeSubsegment):
|
|||||||
)
|
)
|
||||||
|
|
||||||
lines = []
|
lines = []
|
||||||
preamble = options.get_generated_c_premble()
|
preamble = options.opts.generated_c_preamble
|
||||||
lines.append(preamble)
|
lines.append(preamble)
|
||||||
lines.append("")
|
lines.append("")
|
||||||
|
|
||||||
@ -98,10 +98,10 @@ class N64SegVtx(CommonSegCodeSubsegment):
|
|||||||
|
|
||||||
def should_scan(self) -> bool:
|
def should_scan(self) -> bool:
|
||||||
return (
|
return (
|
||||||
options.mode_active("vtx")
|
options.opts.is_mode_active("vtx")
|
||||||
and self.rom_start != "auto"
|
and self.rom_start != "auto"
|
||||||
and self.rom_end != "auto"
|
and self.rom_end != "auto"
|
||||||
)
|
)
|
||||||
|
|
||||||
def should_split(self) -> bool:
|
def should_split(self) -> bool:
|
||||||
return self.extract and options.mode_active("vtx")
|
return self.extract and options.opts.is_mode_active("vtx")
|
||||||
|
@ -16,7 +16,7 @@ class PsxSegAsm(CommonSegAsm):
|
|||||||
ret.append(".set noat /* allow manual use of $at */")
|
ret.append(".set noat /* allow manual use of $at */")
|
||||||
ret.append(".set noreorder /* don't insert nops after branches */")
|
ret.append(".set noreorder /* don't insert nops after branches */")
|
||||||
ret.append("")
|
ret.append("")
|
||||||
preamble = options.get_generated_s_preamble()
|
preamble = options.opts.generated_s_preamble
|
||||||
if preamble:
|
if preamble:
|
||||||
ret.append(preamble)
|
ret.append(preamble)
|
||||||
ret.append("")
|
ret.append("")
|
||||||
|
@ -30,14 +30,14 @@ def parse_segment_align(segment: Union[dict, list]) -> Optional[int]:
|
|||||||
|
|
||||||
|
|
||||||
def parse_segment_subalign(segment: Union[dict, list]) -> int:
|
def parse_segment_subalign(segment: Union[dict, list]) -> int:
|
||||||
default = options.get_subalign()
|
default = options.opts.subalign
|
||||||
if isinstance(segment, dict):
|
if isinstance(segment, dict):
|
||||||
return int(segment.get("subalign", default))
|
return int(segment.get("subalign", default))
|
||||||
return default
|
return default
|
||||||
|
|
||||||
|
|
||||||
def parse_segment_section_order(segment: Union[dict, list]) -> List[str]:
|
def parse_segment_section_order(segment: Union[dict, list]) -> List[str]:
|
||||||
default = options.get_section_order()
|
default = options.opts.section_order
|
||||||
if isinstance(segment, dict):
|
if isinstance(segment, dict):
|
||||||
return segment.get("section_order", default)
|
return segment.get("section_order", default)
|
||||||
return default
|
return default
|
||||||
@ -66,7 +66,7 @@ class Segment:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_base_segment_class(seg_type):
|
def get_base_segment_class(seg_type):
|
||||||
platform = options.get_platform()
|
platform = options.opts.platform
|
||||||
is_platform_seg = False
|
is_platform_seg = False
|
||||||
|
|
||||||
# heirarchy is platform -> common -> fail
|
# heirarchy is platform -> common -> fail
|
||||||
@ -84,9 +84,9 @@ class Segment:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_extension_segment_class(seg_type):
|
def get_extension_segment_class(seg_type):
|
||||||
platform = options.get_platform()
|
platform = options.opts.platform
|
||||||
|
|
||||||
ext_path = options.get_extensions_path()
|
ext_path = options.opts.extensions_path
|
||||||
if not ext_path:
|
if not ext_path:
|
||||||
log.error(
|
log.error(
|
||||||
f"could not load presumed extended segment type '{seg_type}' because no extensions path is configured"
|
f"could not load presumed extended segment type '{seg_type}' because no extensions path is configured"
|
||||||
@ -143,14 +143,14 @@ class Segment:
|
|||||||
if isinstance(segment, dict) and "symbol_name_format" in segment:
|
if isinstance(segment, dict) and "symbol_name_format" in segment:
|
||||||
return str(segment["symbol_name_format"])
|
return str(segment["symbol_name_format"])
|
||||||
else:
|
else:
|
||||||
return options.get_symbol_name_format()
|
return options.opts.symbol_name_format
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def parse_segment_symbol_name_format_no_rom(segment: Union[dict, list]) -> str:
|
def parse_segment_symbol_name_format_no_rom(segment: Union[dict, list]) -> str:
|
||||||
if isinstance(segment, dict) and "symbol_name_format_no_rom" in segment:
|
if isinstance(segment, dict) and "symbol_name_format_no_rom" in segment:
|
||||||
return str(segment["symbol_name_format_no_rom"])
|
return str(segment["symbol_name_format_no_rom"])
|
||||||
else:
|
else:
|
||||||
return options.get_symbol_name_format_no_rom()
|
return options.opts.symbol_name_format_no_rom
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -159,12 +159,12 @@ class Segment:
|
|||||||
type: str,
|
type: str,
|
||||||
name: str,
|
name: str,
|
||||||
vram_start: Any,
|
vram_start: Any,
|
||||||
extract: bool = True,
|
extract: bool,
|
||||||
given_subalign: int = options.get_subalign(),
|
given_subalign: Optional[int],
|
||||||
exclusive_ram_id: Optional[str] = None,
|
exclusive_ram_id: Optional[str],
|
||||||
given_dir: Path = Path(),
|
given_dir: Path,
|
||||||
symbol_name_format: str = options.get_symbol_name_format(),
|
symbol_name_format: str,
|
||||||
symbol_name_format_no_rom: str = options.get_symbol_name_format_no_rom(),
|
symbol_name_format_no_rom: str,
|
||||||
args=[],
|
args=[],
|
||||||
yaml={},
|
yaml={},
|
||||||
):
|
):
|
||||||
@ -176,13 +176,13 @@ class Segment:
|
|||||||
self.extract = extract
|
self.extract = extract
|
||||||
|
|
||||||
self.align: Optional[int] = None
|
self.align: Optional[int] = None
|
||||||
self.given_subalign = given_subalign
|
self.given_subalign = given_subalign or options.opts.subalign
|
||||||
self.exclusive_ram_id = exclusive_ram_id
|
self.exclusive_ram_id: Optional[str] = exclusive_ram_id
|
||||||
self.given_dir = given_dir
|
self.given_dir: Path = given_dir
|
||||||
self.given_seg_symbols: Dict[
|
self.given_seg_symbols: Dict[
|
||||||
int, List[Symbol]
|
int, List[Symbol]
|
||||||
] = {} # Symbols known to be in this segment
|
] = {} # Symbols known to be in this segment
|
||||||
self.given_section_order: List[str] = options.get_section_order()
|
self.given_section_order: List[str] = options.opts.section_order
|
||||||
self.follows_vram: Optional[str] = None
|
self.follows_vram: Optional[str] = None
|
||||||
|
|
||||||
self.given_symbol_name_format = symbol_name_format
|
self.given_symbol_name_format = symbol_name_format
|
||||||
@ -360,7 +360,7 @@ class Segment:
|
|||||||
return self.should_split()
|
return self.should_split()
|
||||||
|
|
||||||
def should_split(self) -> bool:
|
def should_split(self) -> bool:
|
||||||
return self.extract and options.mode_active(self.type)
|
return self.extract and options.opts.is_mode_active(self.type)
|
||||||
|
|
||||||
def scan(self, rom_bytes: bytes):
|
def scan(self, rom_bytes: bytes):
|
||||||
pass
|
pass
|
||||||
@ -396,7 +396,7 @@ class Segment:
|
|||||||
return []
|
return []
|
||||||
|
|
||||||
def log(self, msg):
|
def log(self, msg):
|
||||||
if options.verbose():
|
if options.opts.verbose:
|
||||||
log.write(f"{self.type} {self.name}: {msg}")
|
log.write(f"{self.type} {self.name}: {msg}")
|
||||||
|
|
||||||
def warn(self, msg: str):
|
def warn(self, msg: str):
|
||||||
|
@ -20,14 +20,12 @@ from util.symbols import Symbol
|
|||||||
|
|
||||||
from intervaltree import Interval, IntervalTree
|
from intervaltree import Interval, IntervalTree
|
||||||
|
|
||||||
VERSION = "0.11.0"
|
VERSION = "0.11.2"
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
description="Split a rom given a rom, a config, and output directory"
|
description="Split a rom given a rom, a config, and output directory"
|
||||||
)
|
)
|
||||||
parser.add_argument("config", help="path to a compatible config .yaml file", nargs="+")
|
parser.add_argument("config", help="path to a compatible config .yaml file", nargs="+")
|
||||||
parser.add_argument("--target", help="path to a file to split (.z64 rom)")
|
|
||||||
parser.add_argument("--basedir", help="a directory in which to extract the rom")
|
|
||||||
parser.add_argument("--modes", nargs="+", default="all")
|
parser.add_argument("--modes", nargs="+", default="all")
|
||||||
parser.add_argument("--verbose", action="store_true", help="Enable debug logging")
|
parser.add_argument("--verbose", action="store_true", help="Enable debug logging")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
@ -189,7 +187,7 @@ def configure_disassembler():
|
|||||||
spimdisasm.common.GlobalConfig.TRUST_JAL_FUNCTIONS = True
|
spimdisasm.common.GlobalConfig.TRUST_JAL_FUNCTIONS = True
|
||||||
spimdisasm.common.GlobalConfig.GLABEL_ASM_COUNT = False
|
spimdisasm.common.GlobalConfig.GLABEL_ASM_COUNT = False
|
||||||
|
|
||||||
if options.rom_address_padding():
|
if options.opts.rom_address_padding:
|
||||||
spimdisasm.common.GlobalConfig.ASM_COMMENT_OFFSET_WIDTH = 6
|
spimdisasm.common.GlobalConfig.ASM_COMMENT_OFFSET_WIDTH = 6
|
||||||
else:
|
else:
|
||||||
spimdisasm.common.GlobalConfig.ASM_COMMENT_OFFSET_WIDTH = 0
|
spimdisasm.common.GlobalConfig.ASM_COMMENT_OFFSET_WIDTH = 0
|
||||||
@ -203,23 +201,23 @@ def configure_disassembler():
|
|||||||
rabbitizer.config.regNames_userFpcCsr = False
|
rabbitizer.config.regNames_userFpcCsr = False
|
||||||
rabbitizer.config.regNames_vr4300Cop0NamedRegisters = False
|
rabbitizer.config.regNames_vr4300Cop0NamedRegisters = False
|
||||||
|
|
||||||
rabbitizer.config.misc_opcodeLJust = options.mnemonic_ljust() - 1
|
rabbitizer.config.misc_opcodeLJust = options.opts.mnemonic_ljust - 1
|
||||||
|
|
||||||
rabbitizer.config.regNames_gprAbiNames = rabbitizer.Abi.fromStr(
|
rabbitizer.config.regNames_gprAbiNames = rabbitizer.Abi.fromStr(
|
||||||
options.get_mips_abi_gpr()
|
options.opts.mips_abi_gpr
|
||||||
)
|
)
|
||||||
rabbitizer.config.regNames_fprAbiNames = rabbitizer.Abi.fromStr(
|
rabbitizer.config.regNames_fprAbiNames = rabbitizer.Abi.fromStr(
|
||||||
options.get_mips_abi_float_regs()
|
options.opts.mips_abi_float_regs
|
||||||
)
|
)
|
||||||
|
|
||||||
if options.get_endianess() == "big":
|
if options.opts.endianness == "big":
|
||||||
spimdisasm.common.GlobalConfig.ENDIAN = spimdisasm.common.InputEndian.BIG
|
spimdisasm.common.GlobalConfig.ENDIAN = spimdisasm.common.InputEndian.BIG
|
||||||
else:
|
else:
|
||||||
spimdisasm.common.GlobalConfig.ENDIAN = spimdisasm.common.InputEndian.LITTLE
|
spimdisasm.common.GlobalConfig.ENDIAN = spimdisasm.common.InputEndian.LITTLE
|
||||||
|
|
||||||
rabbitizer.config.pseudos_pseudoMove = False
|
rabbitizer.config.pseudos_pseudoMove = False
|
||||||
|
|
||||||
selectedCompiler = options.get_compiler()
|
selectedCompiler = options.opts.compiler
|
||||||
if selectedCompiler == compiler.SN64:
|
if selectedCompiler == compiler.SN64:
|
||||||
rabbitizer.config.regNames_namedRegisters = False
|
rabbitizer.config.regNames_namedRegisters = False
|
||||||
rabbitizer.config.toolchainTweaks_sn64DivFix = True
|
rabbitizer.config.toolchainTweaks_sn64DivFix = True
|
||||||
@ -233,19 +231,22 @@ def configure_disassembler():
|
|||||||
elif selectedCompiler == compiler.IDO:
|
elif selectedCompiler == compiler.IDO:
|
||||||
spimdisasm.common.GlobalConfig.COMPILER = spimdisasm.common.Compiler.IDO
|
spimdisasm.common.GlobalConfig.COMPILER = spimdisasm.common.Compiler.IDO
|
||||||
|
|
||||||
spimdisasm.common.GlobalConfig.GP_VALUE = options.get_gp()
|
spimdisasm.common.GlobalConfig.GP_VALUE = options.opts.gp
|
||||||
|
|
||||||
spimdisasm.common.GlobalConfig.ASM_TEXT_LABEL = options.get_asm_function_macro()
|
spimdisasm.common.GlobalConfig.ASM_TEXT_LABEL = options.opts.asm_function_macro
|
||||||
spimdisasm.common.GlobalConfig.ASM_DATA_LABEL = options.get_asm_data_macro()
|
spimdisasm.common.GlobalConfig.ASM_DATA_LABEL = options.opts.asm_data_macro
|
||||||
spimdisasm.common.GlobalConfig.ASM_TEXT_END_LABEL = options.get_asm_end_label()
|
spimdisasm.common.GlobalConfig.ASM_TEXT_END_LABEL = options.opts.asm_end_label
|
||||||
|
|
||||||
if spimdisasm.common.GlobalConfig.ASM_TEXT_LABEL == ".globl":
|
if spimdisasm.common.GlobalConfig.ASM_TEXT_LABEL == ".globl":
|
||||||
spimdisasm.common.GlobalConfig.ASM_TEXT_ENT_LABEL = ".ent"
|
spimdisasm.common.GlobalConfig.ASM_TEXT_ENT_LABEL = ".ent"
|
||||||
spimdisasm.common.GlobalConfig.ASM_TEXT_FUNC_AS_LABEL = True
|
spimdisasm.common.GlobalConfig.ASM_TEXT_FUNC_AS_LABEL = True
|
||||||
|
|
||||||
spimdisasm.common.GlobalConfig.LINE_ENDS = options.c_newline()
|
if spimdisasm.common.GlobalConfig.ASM_TEXT_LABEL == ".globl":
|
||||||
|
spimdisasm.common.GlobalConfig.ASM_DATA_SYM_AS_LABEL = True
|
||||||
|
|
||||||
if options.get_platform() == "n64":
|
spimdisasm.common.GlobalConfig.LINE_ENDS = options.opts.c_newline
|
||||||
|
|
||||||
|
if options.opts.platform == "n64":
|
||||||
symbols.spim_context.fillDefaultBannedSymbols()
|
symbols.spim_context.fillDefaultBannedSymbols()
|
||||||
|
|
||||||
|
|
||||||
@ -256,7 +257,7 @@ def brief_seg_name(seg: Segment, limit: int, ellipsis="…") -> str:
|
|||||||
return s
|
return s
|
||||||
|
|
||||||
|
|
||||||
def main(config_path, base_dir, target_path, modes, verbose, use_cache=True):
|
def main(config_path, modes, verbose, use_cache=True):
|
||||||
global config
|
global config
|
||||||
|
|
||||||
log.write(f"splat {VERSION} (powered by spimdisasm {spimdisasm.__version__})")
|
log.write(f"splat {VERSION} (powered by spimdisasm {spimdisasm.__version__})")
|
||||||
@ -268,13 +269,9 @@ def main(config_path, base_dir, target_path, modes, verbose, use_cache=True):
|
|||||||
additional_config = yaml.load(f.read(), Loader=yaml.SafeLoader)
|
additional_config = yaml.load(f.read(), Loader=yaml.SafeLoader)
|
||||||
config = merge_configs(config, additional_config)
|
config = merge_configs(config, additional_config)
|
||||||
|
|
||||||
options.initialize(config, config_path, base_dir, target_path)
|
options.initialize(config, config_path, modes, verbose)
|
||||||
options.set("modes", modes)
|
|
||||||
|
|
||||||
if verbose:
|
with options.opts.target_path.open("rb") as f2:
|
||||||
options.set("verbose", True)
|
|
||||||
|
|
||||||
with options.get_target_path().open("rb") as f2:
|
|
||||||
rom_bytes = f2.read()
|
rom_bytes = f2.read()
|
||||||
|
|
||||||
if "sha1" in config:
|
if "sha1" in config:
|
||||||
@ -284,7 +281,7 @@ def main(config_path, base_dir, target_path, modes, verbose, use_cache=True):
|
|||||||
log.error(f"sha1 mismatch: expected {e_sha1}, was {sha1}")
|
log.error(f"sha1 mismatch: expected {e_sha1}, was {sha1}")
|
||||||
|
|
||||||
# Create main output dir
|
# Create main output dir
|
||||||
options.get_base_path().mkdir(parents=True, exist_ok=True)
|
options.opts.base_path.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
processed_segments: List[Segment] = []
|
processed_segments: List[Segment] = []
|
||||||
|
|
||||||
@ -295,7 +292,7 @@ def main(config_path, base_dir, target_path, modes, verbose, use_cache=True):
|
|||||||
# Load cache
|
# Load cache
|
||||||
if use_cache:
|
if use_cache:
|
||||||
try:
|
try:
|
||||||
with options.get_cache_path().open("rb") as f3:
|
with options.opts.cache_path.open("rb") as f3:
|
||||||
cache = pickle.load(f3)
|
cache = pickle.load(f3)
|
||||||
|
|
||||||
if verbose:
|
if verbose:
|
||||||
@ -325,11 +322,11 @@ def main(config_path, base_dir, target_path, modes, verbose, use_cache=True):
|
|||||||
# Assign symbols to segments
|
# Assign symbols to segments
|
||||||
assign_symbols_to_segments()
|
assign_symbols_to_segments()
|
||||||
|
|
||||||
if options.mode_active("code"):
|
if options.opts.is_mode_active("code"):
|
||||||
symbols.initialize_spim_context(all_segments)
|
symbols.initialize_spim_context(all_segments)
|
||||||
|
|
||||||
# Resolve raster/palette siblings
|
# Resolve raster/palette siblings
|
||||||
if options.mode_active("img"):
|
if options.opts.is_mode_active("img"):
|
||||||
palettes.initialize(all_segments)
|
palettes.initialize(all_segments)
|
||||||
|
|
||||||
# Scan
|
# Scan
|
||||||
@ -380,7 +377,7 @@ def main(config_path, base_dir, target_path, modes, verbose, use_cache=True):
|
|||||||
if segment.should_split():
|
if segment.should_split():
|
||||||
segment.split(rom_bytes)
|
segment.split(rom_bytes)
|
||||||
|
|
||||||
if options.mode_active("ld"):
|
if options.opts.is_mode_active("ld"):
|
||||||
global linker_writer
|
global linker_writer
|
||||||
linker_writer = LinkerWriter()
|
linker_writer = LinkerWriter()
|
||||||
for i, segment in enumerate(
|
for i, segment in enumerate(
|
||||||
@ -399,15 +396,15 @@ def main(config_path, base_dir, target_path, modes, verbose, use_cache=True):
|
|||||||
|
|
||||||
# write elf_sections.txt - this only lists the generated sections in the elf, not subsections
|
# write elf_sections.txt - this only lists the generated sections in the elf, not subsections
|
||||||
# that the elf combines into one section
|
# that the elf combines into one section
|
||||||
if options.get_create_elf_section_list_auto():
|
if options.opts.elf_section_list_path:
|
||||||
section_list = ""
|
section_list = ""
|
||||||
for segment in all_segments:
|
for segment in all_segments:
|
||||||
section_list += "." + to_cname(segment.name) + "\n"
|
section_list += "." + to_cname(segment.name) + "\n"
|
||||||
with open(options.get_elf_section_list_path(), "w", newline="\n") as f:
|
with open(options.opts.elf_section_list_path, "w", newline="\n") as f:
|
||||||
f.write(section_list)
|
f.write(section_list)
|
||||||
|
|
||||||
# Write undefined_funcs_auto.txt
|
# Write undefined_funcs_auto.txt
|
||||||
if options.get_create_undefined_funcs_auto():
|
if options.opts.create_undefined_funcs_auto:
|
||||||
to_write = [
|
to_write = [
|
||||||
s
|
s
|
||||||
for s in symbols.all_symbols
|
for s in symbols.all_symbols
|
||||||
@ -415,12 +412,12 @@ def main(config_path, base_dir, target_path, modes, verbose, use_cache=True):
|
|||||||
]
|
]
|
||||||
to_write.sort(key=lambda x: x.vram_start)
|
to_write.sort(key=lambda x: x.vram_start)
|
||||||
|
|
||||||
with open(options.get_undefined_funcs_auto_path(), "w", newline="\n") as f:
|
with open(options.opts.undefined_funcs_auto_path, "w", newline="\n") as f:
|
||||||
for symbol in to_write:
|
for symbol in to_write:
|
||||||
f.write(f"{symbol.name} = 0x{symbol.vram_start:X};\n")
|
f.write(f"{symbol.name} = 0x{symbol.vram_start:X};\n")
|
||||||
|
|
||||||
# write undefined_syms_auto.txt
|
# write undefined_syms_auto.txt
|
||||||
if options.get_create_undefined_syms_auto():
|
if options.opts.create_undefined_syms_auto:
|
||||||
to_write = [
|
to_write = [
|
||||||
s
|
s
|
||||||
for s in symbols.all_symbols
|
for s in symbols.all_symbols
|
||||||
@ -431,7 +428,7 @@ def main(config_path, base_dir, target_path, modes, verbose, use_cache=True):
|
|||||||
]
|
]
|
||||||
to_write.sort(key=lambda x: x.vram_start)
|
to_write.sort(key=lambda x: x.vram_start)
|
||||||
|
|
||||||
with open(options.get_undefined_syms_auto_path(), "w", newline="\n") as f:
|
with open(options.opts.undefined_syms_auto_path, "w", newline="\n") as f:
|
||||||
for symbol in to_write:
|
for symbol in to_write:
|
||||||
f.write(f"{symbol.name} = 0x{symbol.vram_start:X};\n")
|
f.write(f"{symbol.name} = 0x{symbol.vram_start:X};\n")
|
||||||
|
|
||||||
@ -454,10 +451,10 @@ def main(config_path, base_dir, target_path, modes, verbose, use_cache=True):
|
|||||||
if cache != {} and use_cache:
|
if cache != {} and use_cache:
|
||||||
if verbose:
|
if verbose:
|
||||||
log.write("Writing cache")
|
log.write("Writing cache")
|
||||||
with open(options.get_cache_path(), "wb") as f4:
|
with open(options.opts.cache_path, "wb") as f4:
|
||||||
pickle.dump(cache, f4)
|
pickle.dump(cache, f4)
|
||||||
|
|
||||||
if options.dump_symbols():
|
if options.opts.dump_symbols:
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
splat_hidden_folder = Path(".splat/")
|
splat_hidden_folder = Path(".splat/")
|
||||||
@ -487,6 +484,4 @@ def main(config_path, base_dir, target_path, modes, verbose, use_cache=True):
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
main(
|
main(args.config, args.modes, args.verbose, args.use_cache)
|
||||||
args.config, args.basedir, args.target, args.modes, args.verbose, args.use_cache
|
|
||||||
)
|
|
||||||
|
@ -4,7 +4,7 @@ from util import options
|
|||||||
|
|
||||||
# RRRRRGGG GGBBBBBA
|
# RRRRRGGG GGBBBBBA
|
||||||
def unpack_color(data):
|
def unpack_color(data):
|
||||||
s = int.from_bytes(data[0:2], byteorder=options.get_endianess())
|
s = int.from_bytes(data[0:2], byteorder=options.opts.endianness)
|
||||||
|
|
||||||
r = (s >> 11) & 0x1F
|
r = (s >> 11) & 0x1F
|
||||||
g = (s >> 6) & 0x1F
|
g = (s >> 6) & 0x1F
|
||||||
|
@ -1,392 +1,368 @@
|
|||||||
from typing import Dict, List, Optional, Union, Literal
|
from dataclasses import dataclass
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from util import log
|
from typing import Dict, List, Mapping, Optional, Type, TypeVar
|
||||||
|
|
||||||
from util import compiler
|
from util import compiler
|
||||||
from util.compiler import Compiler
|
from util.compiler import Compiler
|
||||||
|
|
||||||
opts = {}
|
opts: "SplatOpts"
|
||||||
|
|
||||||
|
|
||||||
def initialize(config: Dict, config_path, base_path=None, target_path=None):
|
@dataclass
|
||||||
|
class SplatOpts:
|
||||||
|
# Debug / logging
|
||||||
|
verbose: bool
|
||||||
|
dump_symbols: bool
|
||||||
|
modes: List[str]
|
||||||
|
|
||||||
|
# Project configuration
|
||||||
|
|
||||||
|
# Determines the base path of the project. Everything is relative to this path
|
||||||
|
base_path: Path
|
||||||
|
# Determines the path to the target binary
|
||||||
|
target_path: Path
|
||||||
|
# Determines the platform of the target binary
|
||||||
|
platform: str
|
||||||
|
# Determines the compiler used to compile the target binary
|
||||||
|
compiler: Compiler
|
||||||
|
# Determines the endianness of the target binary
|
||||||
|
endianness: str
|
||||||
|
# Determines the default section order of the target binary
|
||||||
|
# this can be overridden per-segment
|
||||||
|
section_order: List[str]
|
||||||
|
# Determines the code that is inserted by default in generated .c files
|
||||||
|
generated_c_preamble: str
|
||||||
|
# Determines the code that is inserted by default in generated .s files
|
||||||
|
generated_s_preamble: str
|
||||||
|
# Determines whether to use .o as the suffix for all binary files?... TODO document
|
||||||
|
use_o_as_suffix: bool
|
||||||
|
# the value of the $gp register to correctly calculate offset to %gp_rel relocs
|
||||||
|
gp: Optional[int]
|
||||||
|
|
||||||
|
# Paths
|
||||||
|
asset_path: Path
|
||||||
|
# Determines the path to the symbol addresses file(s)
|
||||||
|
# A symbol_addrs file is to be updated/curated manually and contains addresses of symbols
|
||||||
|
# as well as optional metadata such as rom address, type, and more
|
||||||
|
#
|
||||||
|
# It's possible to use more than one file by supplying a list instead of a string
|
||||||
|
symbol_addrs_paths: List[Path]
|
||||||
|
# Determines the path to the project build directory
|
||||||
|
build_path: Path
|
||||||
|
# Determines the path to the source code directory
|
||||||
|
src_path: Path
|
||||||
|
# Determines the path to the asm code directory
|
||||||
|
asm_path: Path
|
||||||
|
# Determines the path to the asm data directory
|
||||||
|
data_path: Path
|
||||||
|
# Determines the path to the asm nonmatchings directory
|
||||||
|
nonmatchings_path: Path
|
||||||
|
# Determines the path to the cache file (used when supplied --use-cache via the CLI)
|
||||||
|
cache_path: Path
|
||||||
|
|
||||||
|
# Determines whether to create an automatically-generated undefined functions file
|
||||||
|
# this file stores all functions that are referenced in the code but are not defined as seen by splat
|
||||||
|
create_undefined_funcs_auto: bool
|
||||||
|
# Determines the path to the undefined_funcs_auto file
|
||||||
|
undefined_funcs_auto_path: Path
|
||||||
|
|
||||||
|
# Determines whether to create an automatically-generated undefined symbols file
|
||||||
|
# this file stores all symbols that are referenced in the code but are not defined as seen by splat
|
||||||
|
create_undefined_syms_auto: bool
|
||||||
|
# Determines the path to the undefined_symbols_auto file
|
||||||
|
undefined_syms_auto_path: Path
|
||||||
|
|
||||||
|
# Determines the path in which to search for custom splat extensions
|
||||||
|
extensions_path: Optional[Path]
|
||||||
|
|
||||||
|
# Determines the path to library files that are to be linked into the target binary
|
||||||
|
lib_path: Path
|
||||||
|
|
||||||
|
# TODO document
|
||||||
|
elf_section_list_path: Optional[Path]
|
||||||
|
|
||||||
|
# Linker script
|
||||||
|
# Determines the default subalign value to be specified in the generated linker script
|
||||||
|
subalign: int
|
||||||
|
# The following option determines whether to automatically configure the linker script to link against
|
||||||
|
# specified sections for all "base" (asm/c) files when the yaml doesn't have manual configurations
|
||||||
|
# for these sections.
|
||||||
|
auto_all_sections: List[str]
|
||||||
|
# Determines the desired path to the linker script that splat will generate
|
||||||
|
ld_script_path: Path
|
||||||
|
# Determines the desired path to the linker symbol header,
|
||||||
|
# which exposes externed definitions for all segment ram/rom start/end locations
|
||||||
|
ld_symbol_header_path: Optional[Path]
|
||||||
|
# Determines whether to add a discard section to the linker script
|
||||||
|
ld_discard_section: bool
|
||||||
|
# Determines the list of section labels that are to be added to the linker script
|
||||||
|
ld_section_labels: List[str]
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# C file options
|
||||||
|
################################################################################
|
||||||
|
# Determines whether to create new c files if they don't exist
|
||||||
|
create_c_files: bool
|
||||||
|
# Determines whether to "auto-decompile" empty functions
|
||||||
|
auto_decompile_empty_functions: bool
|
||||||
|
# Determines whether to detect matched/unmatched functions in existing c files
|
||||||
|
# so we can avoid creating .s files for already-decompiled functions
|
||||||
|
do_c_func_detection: bool
|
||||||
|
# Determines the newline char(s) to be used in c files
|
||||||
|
c_newline: str
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# (Dis)assembly-related options
|
||||||
|
################################################################################
|
||||||
|
# The following options determine the format that symbols should be named by default
|
||||||
|
symbol_name_format: str
|
||||||
|
# Same as above but for symbols with no rom address
|
||||||
|
symbol_name_format_no_rom: str
|
||||||
|
# Determines whether to detect and hint to the user about likely file splits when disassembling
|
||||||
|
find_file_boundaries: bool
|
||||||
|
# Determines whether to attempt to automatically migrate rodata into functions
|
||||||
|
# (only works in certain circumstances)
|
||||||
|
migrate_rodata_to_functions: bool
|
||||||
|
# Determines the header to be used in every asm file that's included from c files
|
||||||
|
asm_inc_header: str
|
||||||
|
# Determines the macro used to declare functions in asm files
|
||||||
|
asm_function_macro: str
|
||||||
|
# Determines the macro used to declare data symbols in asm files
|
||||||
|
asm_data_macro: str
|
||||||
|
# Determines the macro used at the end of a function, such as endlabel or .end
|
||||||
|
asm_end_label: str
|
||||||
|
# Determines the number of characters to left align before the TODO finish documenting
|
||||||
|
mnemonic_ljust: int
|
||||||
|
# Determines whether to pad the rom address
|
||||||
|
rom_address_padding: bool
|
||||||
|
# Determines which ABI names to use for general purpose registers
|
||||||
|
mips_abi_gpr: str
|
||||||
|
# Determines which ABI names to use for floating point registers
|
||||||
|
# Valid values: 'numeric', 'o32', 'n32', 'n64'
|
||||||
|
# o32 is highly recommended, as it provides logically named registers for floating point instructions
|
||||||
|
# For more info, see https://gist.github.com/EllipticEllipsis/27eef11205c7a59d8ea85632bc49224d
|
||||||
|
mips_abi_float_regs: str
|
||||||
|
# Determines whether to ad ".set gp=64 to asm/hasm files"
|
||||||
|
add_set_gp_64: bool
|
||||||
|
# Generate .asmproc.d dependency files for each C file which still reference functions in assembly files
|
||||||
|
create_asm_dependencies: bool
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# N64-specific options
|
||||||
|
################################################################################
|
||||||
|
# Determines the encoding of the header
|
||||||
|
header_encoding: str
|
||||||
|
# Determines the type gfx ucode (used by gfx segments)
|
||||||
|
# Valid options are ['f3d', 'f3db', 'f3dex', 'f3dexb', 'f3dex2']
|
||||||
|
gfx_ucode: str
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Compiler-specific options
|
||||||
|
################################################################################
|
||||||
|
# Determines whether to use a legacy INCLUDE_ASM macro format in c files
|
||||||
|
# only applies to GCC/SN64
|
||||||
|
use_legacy_include_asm: bool
|
||||||
|
|
||||||
|
# Returns whether the given mode is currently enabled
|
||||||
|
def is_mode_active(self, mode: str) -> bool:
|
||||||
|
return mode in self.modes or "all" in self.modes
|
||||||
|
|
||||||
|
|
||||||
|
def parse_yaml(
|
||||||
|
yaml: Dict,
|
||||||
|
basename: str,
|
||||||
|
config_paths: List[str],
|
||||||
|
modes: List[str],
|
||||||
|
verbose: bool = False,
|
||||||
|
) -> SplatOpts:
|
||||||
|
T = TypeVar("T")
|
||||||
|
|
||||||
|
def yaml_as_type(value: object, t: Type[T]) -> T:
|
||||||
|
if isinstance(value, t):
|
||||||
|
return value
|
||||||
|
raise ValueError(f"Expected {t}, got {type(value)}")
|
||||||
|
|
||||||
|
def parse_opt(
|
||||||
|
yaml: Mapping[str, object],
|
||||||
|
opt: str,
|
||||||
|
t: Type[T],
|
||||||
|
default: Optional[T] = None,
|
||||||
|
) -> T:
|
||||||
|
value = yaml.get(opt)
|
||||||
|
if isinstance(value, t):
|
||||||
|
# Fast path
|
||||||
|
return value
|
||||||
|
if value is None and opt not in yaml:
|
||||||
|
if default is not None:
|
||||||
|
return default
|
||||||
|
raise ValueError(f"Missing required option {opt}")
|
||||||
|
return yaml_as_type(value, t)
|
||||||
|
|
||||||
|
def parse_opt_within(
|
||||||
|
yaml: Mapping[str, object],
|
||||||
|
opt: str,
|
||||||
|
t: Type[T],
|
||||||
|
within: List[T],
|
||||||
|
default: Optional[T] = None,
|
||||||
|
) -> T:
|
||||||
|
value = parse_opt(yaml, opt, t, default)
|
||||||
|
if value not in within:
|
||||||
|
raise ValueError(f"Invalid value for {opt}: {value}")
|
||||||
|
return value
|
||||||
|
|
||||||
|
def parse_path(
|
||||||
|
yaml: Mapping[str, object], opt: str, default: Optional[str] = None
|
||||||
|
) -> Path:
|
||||||
|
value = parse_opt(yaml, opt, str, default)
|
||||||
|
return Path(value)
|
||||||
|
|
||||||
|
def parse_optional_path(yaml: Mapping[str, object], opt: str, base_path: Path):
|
||||||
|
value = yaml.get(opt)
|
||||||
|
if value is None:
|
||||||
|
return None
|
||||||
|
if not isinstance(value, str):
|
||||||
|
raise ValueError(f"Expected str, got {type(value)}")
|
||||||
|
return base_path / Path(value)
|
||||||
|
|
||||||
|
def parse_symbol_addrs_paths(yaml: Mapping[str, object]) -> List[Path]:
|
||||||
|
paths = yaml.get("symbol_addrs_path", "symbol_addrs.txt")
|
||||||
|
|
||||||
|
if isinstance(paths, str):
|
||||||
|
return [base_path / paths]
|
||||||
|
elif isinstance(paths, list):
|
||||||
|
return [base_path / path for path in paths]
|
||||||
|
else:
|
||||||
|
raise ValueError(f"Expected str or list, got {type(paths)}")
|
||||||
|
|
||||||
|
platform = parse_opt_within(yaml, "platform", str, ["n64", "psx"], "n64")
|
||||||
|
comp = compiler.for_name(parse_opt(yaml, "compiler", str, "IDO"))
|
||||||
|
|
||||||
|
base_path = Path(config_paths[0]).parent / parse_opt(yaml, "base_path", str)
|
||||||
|
asm_path: Path = base_path / parse_path(yaml, "asm_path", "asm")
|
||||||
|
|
||||||
|
return SplatOpts(
|
||||||
|
verbose=verbose,
|
||||||
|
dump_symbols=parse_opt(yaml, "dump_symbols", bool, False),
|
||||||
|
modes=modes,
|
||||||
|
base_path=base_path,
|
||||||
|
target_path=base_path / parse_path(yaml, "target_path"),
|
||||||
|
platform=platform,
|
||||||
|
compiler=comp,
|
||||||
|
endianness=parse_opt(
|
||||||
|
yaml,
|
||||||
|
"endianness",
|
||||||
|
str,
|
||||||
|
"little" if platform.lower() == "psx" else "big",
|
||||||
|
),
|
||||||
|
section_order=parse_opt(
|
||||||
|
yaml, "section_order", list, [".text", ".data", ".rodata", ".bss"]
|
||||||
|
),
|
||||||
|
generated_c_preamble=parse_opt(
|
||||||
|
yaml, "generated_c_preamble", str, '#include "common.h"'
|
||||||
|
),
|
||||||
|
generated_s_preamble=parse_opt(yaml, "generated_s_preamble", str, ""),
|
||||||
|
use_o_as_suffix=parse_opt(yaml, "o_as_suffix", bool, False),
|
||||||
|
gp=parse_opt(yaml, "gp_value", int, 0),
|
||||||
|
asset_path=base_path / parse_path(yaml, "asset_path", "assets"),
|
||||||
|
symbol_addrs_paths=parse_symbol_addrs_paths(yaml),
|
||||||
|
build_path=base_path / parse_path(yaml, "build_path", "build"),
|
||||||
|
src_path=base_path / parse_path(yaml, "src_path", "src"),
|
||||||
|
asm_path=asm_path,
|
||||||
|
data_path=asm_path / parse_path(yaml, "data_path", "data"),
|
||||||
|
nonmatchings_path=asm_path
|
||||||
|
/ parse_path(yaml, "nonmatchings_path", "nonmatchings"),
|
||||||
|
cache_path=base_path / parse_path(yaml, "cache_path", ".splache"),
|
||||||
|
create_undefined_funcs_auto=parse_opt(
|
||||||
|
yaml, "create_undefined_funcs_auto", bool, True
|
||||||
|
),
|
||||||
|
undefined_funcs_auto_path=base_path
|
||||||
|
/ parse_path(yaml, "undefined_funcs_auto_path", "undefined_funcs_auto.txt"),
|
||||||
|
create_undefined_syms_auto=parse_opt(
|
||||||
|
yaml, "create_undefined_syms_auto", bool, True
|
||||||
|
),
|
||||||
|
undefined_syms_auto_path=base_path
|
||||||
|
/ parse_path(yaml, "undefined_syms_auto_path", "undefined_syms_auto.txt"),
|
||||||
|
extensions_path=parse_optional_path(yaml, "extensions_path", base_path),
|
||||||
|
lib_path=base_path / parse_path(yaml, "lib_path", "lib"),
|
||||||
|
elf_section_list_path=parse_optional_path(
|
||||||
|
yaml, "elf_section_list_path", base_path
|
||||||
|
),
|
||||||
|
subalign=parse_opt(yaml, "subalign", int, 16),
|
||||||
|
auto_all_sections=parse_opt(
|
||||||
|
yaml, "auto_all_sections", list, [".data", ".rodata", ".bss"]
|
||||||
|
),
|
||||||
|
ld_script_path=base_path / parse_path(yaml, "ld_script_path", f"{basename}.ld"),
|
||||||
|
ld_symbol_header_path=parse_optional_path(
|
||||||
|
yaml, "ld_symbol_header_path", base_path
|
||||||
|
),
|
||||||
|
ld_discard_section=parse_opt(yaml, "ld_discard_section", bool, True),
|
||||||
|
ld_section_labels=parse_opt(
|
||||||
|
yaml,
|
||||||
|
"ld_section_labels",
|
||||||
|
list,
|
||||||
|
[".text", ".data", ".rodata", ".bss"],
|
||||||
|
),
|
||||||
|
create_c_files=parse_opt(yaml, "create_c_files", bool, True),
|
||||||
|
auto_decompile_empty_functions=parse_opt(
|
||||||
|
yaml, "auto_decompile_empty_functions", bool, True
|
||||||
|
),
|
||||||
|
do_c_func_detection=parse_opt(yaml, "do_c_func_detection", bool, True),
|
||||||
|
c_newline=parse_opt(yaml, "c_newline", str, comp.c_newline),
|
||||||
|
symbol_name_format=parse_opt(yaml, "symbol_name_format", str, "$VRAM"),
|
||||||
|
symbol_name_format_no_rom=parse_opt(
|
||||||
|
yaml, "symbol_name_format_no_rom", str, "$VRAM_$SEG"
|
||||||
|
),
|
||||||
|
find_file_boundaries=parse_opt(yaml, "find_file_boundaries", bool, True),
|
||||||
|
migrate_rodata_to_functions=parse_opt(
|
||||||
|
yaml, "migrate_rodata_to_functions", bool, True
|
||||||
|
),
|
||||||
|
asm_inc_header=parse_opt(yaml, "asm_inc_header", str, comp.asm_inc_header),
|
||||||
|
asm_function_macro=parse_opt(
|
||||||
|
yaml, "asm_function_macro", str, comp.asm_function_macro
|
||||||
|
),
|
||||||
|
asm_data_macro=parse_opt(yaml, "asm_data_macro", str, comp.asm_data_macro),
|
||||||
|
asm_end_label=parse_opt(yaml, "asm_end_label", str, comp.asm_end_label),
|
||||||
|
mnemonic_ljust=parse_opt(yaml, "mnemonic_ljust", int, 11),
|
||||||
|
rom_address_padding=parse_opt(yaml, "rom_address_padding", bool, False),
|
||||||
|
mips_abi_gpr=parse_opt_within(
|
||||||
|
yaml,
|
||||||
|
"mips_abi_gpr",
|
||||||
|
str,
|
||||||
|
["numeric", "o32", "n32", "n64"],
|
||||||
|
"o32",
|
||||||
|
),
|
||||||
|
mips_abi_float_regs=parse_opt_within(
|
||||||
|
yaml,
|
||||||
|
"mips_abi_float_regs",
|
||||||
|
str,
|
||||||
|
["numeric", "o32", "n32", "n64"],
|
||||||
|
"numeric",
|
||||||
|
),
|
||||||
|
add_set_gp_64=parse_opt(yaml, "add_set_gp_64", bool, True),
|
||||||
|
create_asm_dependencies=parse_opt(yaml, "create_asm_dependencies", bool, False),
|
||||||
|
header_encoding=parse_opt(yaml, "header_encoding", str, "ASCII"),
|
||||||
|
gfx_ucode=parse_opt_within(
|
||||||
|
yaml,
|
||||||
|
"gfx_ucode",
|
||||||
|
str,
|
||||||
|
["f3d", "f3db", "f3dex", "f3dexb", "f3dex2"],
|
||||||
|
"f3dex2",
|
||||||
|
),
|
||||||
|
use_legacy_include_asm=parse_opt(yaml, "use_legacy_include_asm", bool, False),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def initialize(
|
||||||
|
config: Dict,
|
||||||
|
config_paths: List[str],
|
||||||
|
modes: Optional[List[str]] = None,
|
||||||
|
verbose=False,
|
||||||
|
):
|
||||||
global opts
|
global opts
|
||||||
opts = dict(config.get("options", {}))
|
|
||||||
|
|
||||||
if base_path:
|
if not modes:
|
||||||
opts["base_path"] = Path(base_path)
|
modes = ["all"]
|
||||||
else:
|
|
||||||
if "base_path" not in opts:
|
|
||||||
log.error(
|
|
||||||
"Error: Base output dir not specified as a command line arg or via the config yaml (base_path)"
|
|
||||||
)
|
|
||||||
|
|
||||||
opts["base_path"] = Path(config_path[0]).parent / opts["base_path"]
|
opts = parse_yaml(
|
||||||
|
config["options"], config["options"]["basename"], config_paths, modes, verbose
|
||||||
if not target_path:
|
|
||||||
if "target_path" not in opts:
|
|
||||||
log.error(
|
|
||||||
"Error: Target binary path not specified as a command line arg or via the config yaml (target_path)"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def set(opt, val):
|
|
||||||
opts[opt] = val
|
|
||||||
|
|
||||||
|
|
||||||
def get(opt, default=None):
|
|
||||||
return opts.get(opt, default)
|
|
||||||
|
|
||||||
|
|
||||||
# Returns whether the given mode is currently enabled
|
|
||||||
def mode_active(mode) -> bool:
|
|
||||||
return mode in opts["modes"] or "all" in opts["modes"]
|
|
||||||
|
|
||||||
|
|
||||||
# TODO standardize names of options for categories & decide whether to stick to get_ or drop it
|
|
||||||
################################################################################
|
|
||||||
# Debug / logging options
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
# Determines whether to log more verbose output
|
|
||||||
def verbose() -> bool:
|
|
||||||
return opts.get("verbose", False)
|
|
||||||
|
|
||||||
|
|
||||||
def dump_symbols() -> bool:
|
|
||||||
return opts.get("dump_symbols", False)
|
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# Global options
|
|
||||||
#
|
|
||||||
# These can be set in the config yaml at the top level
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
# Determines the platform of the target binary
|
|
||||||
# Currently supported: n64, psx
|
|
||||||
def get_platform() -> str:
|
|
||||||
return opts.get("platform", "n64")
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the compiler used to compile the target binary
|
|
||||||
def get_compiler() -> Compiler:
|
|
||||||
return compiler.for_name(opts.get("compiler", "IDO"))
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the endianness of the target binary
|
|
||||||
def get_endianess() -> Union[Literal["little"], Literal["big"]]:
|
|
||||||
return opts.get("endianess", "little" if get_platform().upper() == "PSX" else "big")
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the default section order of the target binary
|
|
||||||
# this can be overridden per-segment
|
|
||||||
def get_section_order() -> List[str]:
|
|
||||||
return opts.get("section_order", [".text", ".data", ".rodata", ".bss"])
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the code that is inserted by default in generated .c files
|
|
||||||
def get_generated_c_premble() -> str:
|
|
||||||
return opts.get("generated_c_preamble", '#include "common.h"')
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the code that is inserted by default in generated .s files
|
|
||||||
def get_generated_s_preamble() -> str:
|
|
||||||
return opts.get("generated_s_preamble", "")
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the base path of the project. Everything is relative to this path
|
|
||||||
def get_base_path() -> Path:
|
|
||||||
return Path(opts["base_path"])
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the asset path of the project. Assets such as raw binary files are stored here
|
|
||||||
def get_asset_path() -> Path:
|
|
||||||
return get_base_path() / opts.get("asset_path", "assets")
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the path to the target binary
|
|
||||||
def get_target_path() -> Path:
|
|
||||||
return get_base_path() / opts["target_path"]
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the path to the symbol addresses file(s)
|
|
||||||
# A symbol_addrs file is to be updated/curated manually and contains addresses of symbols
|
|
||||||
# as well as optional metadata such as rom address, type, and more
|
|
||||||
#
|
|
||||||
# It's possible to use more than one file by supplying a list instead of a string
|
|
||||||
def get_symbol_addrs_paths() -> List[Path]:
|
|
||||||
paths: Union[List[str], str] = opts.get("symbol_addrs_path", "symbol_addrs.txt")
|
|
||||||
|
|
||||||
if isinstance(paths, str):
|
|
||||||
return [get_base_path() / paths]
|
|
||||||
else:
|
|
||||||
return [get_base_path() / path for path in paths]
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the path to the project build directory
|
|
||||||
def get_build_path() -> Path:
|
|
||||||
return get_base_path() / opts.get("build_path", "build")
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the path to the source code directory
|
|
||||||
def get_src_path() -> Path:
|
|
||||||
return get_base_path() / opts.get("src_path", "src")
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the path to the asm code directory
|
|
||||||
def get_asm_path() -> Path:
|
|
||||||
return get_base_path() / opts.get("asm_path", "asm")
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the path to the asm data directory
|
|
||||||
def get_data_path() -> Path:
|
|
||||||
if "data_path" in opts:
|
|
||||||
return get_base_path() / opts["data_path"]
|
|
||||||
return get_asm_path() / "data"
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the path to the asm nonmatchings directory
|
|
||||||
def get_nonmatchings_path() -> Path:
|
|
||||||
if "nonmatchings_path" in opts:
|
|
||||||
return get_base_path() / opts["nonmatchings_path"]
|
|
||||||
return get_asm_path() / "nonmatchings"
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the path to the cache file (used when supplied --use-cache via the CLI)
|
|
||||||
def get_cache_path() -> Path:
|
|
||||||
return get_base_path() / opts.get("cache_path", ".splat_cache")
|
|
||||||
|
|
||||||
|
|
||||||
# Determines whether to create an automatically-generated undefined functions file
|
|
||||||
# this file stores all functions that are referenced in the code but are not defined as seen by splat
|
|
||||||
def get_create_undefined_funcs_auto() -> bool:
|
|
||||||
return opts.get("create_undefined_funcs_auto", True)
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the path to the undefined_funcs_auto file
|
|
||||||
def get_undefined_funcs_auto_path() -> Path:
|
|
||||||
return get_base_path() / opts.get(
|
|
||||||
"undefined_funcs_auto_path", "undefined_funcs_auto.txt"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# Determines whether to create an automatically-generated undefined symbols file
|
|
||||||
# this file stores all symbols that are referenced in the code but are not defined as seen by splat
|
|
||||||
def get_create_undefined_syms_auto() -> bool:
|
|
||||||
return opts.get("create_undefined_syms_auto", True)
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the path to the undefined_symbols_auto file
|
|
||||||
def get_undefined_syms_auto_path() -> Path:
|
|
||||||
return get_base_path() / opts.get(
|
|
||||||
"undefined_syms_auto_path", "undefined_syms_auto.txt"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# TODO document
|
|
||||||
def get_create_elf_section_list_auto() -> bool:
|
|
||||||
return opts.get("create_elf_section_list_auto", False)
|
|
||||||
|
|
||||||
|
|
||||||
# TODO document
|
|
||||||
def get_elf_section_list_path() -> Path:
|
|
||||||
return get_base_path() / opts.get("elf_section_list_path", "elf_sections.txt")
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the path in which to search for custom splat extensions
|
|
||||||
def get_extensions_path() -> Optional[Path]:
|
|
||||||
ext_opt = opts.get("extensions_path")
|
|
||||||
if not ext_opt:
|
|
||||||
return None
|
|
||||||
|
|
||||||
return get_base_path() / ext_opt
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the path to library files that are to be linked into the target binary
|
|
||||||
def get_lib_path() -> Path:
|
|
||||||
return get_base_path() / opts.get("lib_path", "lib")
|
|
||||||
|
|
||||||
|
|
||||||
# Determines whether to use .o as the suffix for all binary files?... TODO document
|
|
||||||
def use_o_as_suffix() -> bool:
|
|
||||||
return opts.get("o_as_suffix", False)
|
|
||||||
|
|
||||||
|
|
||||||
# the value of the $gp register to correctly calculate offset to %gp_rel relocs
|
|
||||||
def get_gp() -> Optional[int]:
|
|
||||||
return opts.get("gp_value", None)
|
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# Linker script options
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
# Determines the desired path to the linker script that splat will generate
|
|
||||||
def get_ld_script_path() -> Path:
|
|
||||||
return get_base_path() / opts.get("ld_script_path", f"{opts.get('basename')}.ld")
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the default subalign value to be specified in the generated linker script
|
|
||||||
def get_subalign() -> int:
|
|
||||||
return opts.get("subalign", 16)
|
|
||||||
|
|
||||||
|
|
||||||
# The following option determines whether to automatically configure the linker script to link against
|
|
||||||
# specified sections for all "base" (asm/c) files when the yaml doesn't have manual configurations
|
|
||||||
# for these sections.
|
|
||||||
def auto_all_sections() -> List[str]:
|
|
||||||
val = opts.get("auto_all_sections", [".data", ".rodata", ".bss"])
|
|
||||||
if not isinstance(val, list):
|
|
||||||
raise RuntimeError(
|
|
||||||
'auto_all_sections must be a list (for example, [".data", ".rodata", ".bss"])'
|
|
||||||
)
|
|
||||||
return val
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the desired path to the linker symbol header, which exposes externed definitions for all segment ram/rom start/end locations
|
|
||||||
def get_linker_symbol_header_path() -> Optional[Path]:
|
|
||||||
if "linker_symbol_header_path" in opts:
|
|
||||||
return get_base_path() / str(opts["linker_symbol_header_path"])
|
|
||||||
else:
|
|
||||||
return None
|
|
||||||
|
|
||||||
|
|
||||||
# Determines whether to create a shiftable linker script (EXPERIMENTAL)
|
|
||||||
def get_shiftable() -> bool:
|
|
||||||
return opts.get("shiftable", False)
|
|
||||||
|
|
||||||
|
|
||||||
# Determines whether to add a discard section to the linker script
|
|
||||||
def linker_discard_section() -> bool:
|
|
||||||
return opts.get("linker_discard_section", True)
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the list of section labels that are to be added to the linker script
|
|
||||||
def ld_section_labels() -> List[str]:
|
|
||||||
return opts.get("ld_section_labels", [".text", ".data", ".rodata", ".bss"])
|
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# C file options
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
# Determines whether to create new c files if they don't exist
|
|
||||||
def get_create_c_files() -> bool:
|
|
||||||
return opts.get("create_c_files", True)
|
|
||||||
|
|
||||||
|
|
||||||
# Determines whether to "auto-decompile" empty functions
|
|
||||||
def get_auto_decompile_empty_functions() -> bool:
|
|
||||||
return opts.get("auto_decompile_empty_functions", True)
|
|
||||||
|
|
||||||
|
|
||||||
# Determines whether to detect matched/unmatched functions in existing c files
|
|
||||||
# so we can avoid creating .s files for already-decompiled functions
|
|
||||||
def do_c_func_detection() -> bool:
|
|
||||||
return opts.get("do_c_func_detection", True)
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the newline char(s) to be used in c files
|
|
||||||
def c_newline() -> str:
|
|
||||||
return opts.get("c_newline", get_compiler().c_newline)
|
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# (Dis)assembly-related options
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
# The following options determine the format that symbols should be named by default
|
|
||||||
def get_symbol_name_format() -> str:
|
|
||||||
return opts.get("symbol_name_format", "$VRAM")
|
|
||||||
|
|
||||||
|
|
||||||
# Same as above but for symbols with no rom address
|
|
||||||
def get_symbol_name_format_no_rom() -> str:
|
|
||||||
return opts.get("symbol_name_format_no_rom", "$VRAM_$SEG")
|
|
||||||
|
|
||||||
|
|
||||||
# Determines whether to detect and hint to the user about likely file splits when disassembling
|
|
||||||
def find_file_boundaries() -> bool:
|
|
||||||
return opts.get("find_file_boundaries", True)
|
|
||||||
|
|
||||||
|
|
||||||
# Determines whether to attempt to automatically migrate rodata into functions (only works in certain circumstances)
|
|
||||||
def get_migrate_rodata_to_functions() -> bool:
|
|
||||||
return opts.get("migrate_rodata_to_functions", True)
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the header to be used in every asm file that's included from c files
|
|
||||||
def asm_inc_header() -> str:
|
|
||||||
return opts.get("asm_inc_header", get_compiler().asm_inc_header)
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the macro used to declare functions in asm files
|
|
||||||
def get_asm_function_macro() -> str:
|
|
||||||
return opts.get("asm_function_macro", get_compiler().asm_function_macro)
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the macro used to declare data symbols in asm files
|
|
||||||
def get_asm_data_macro() -> str:
|
|
||||||
return opts.get("asm_data_macro", get_compiler().asm_data_macro)
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the macro used at the end of a function, such as endlabel or .end
|
|
||||||
def get_asm_end_label() -> str:
|
|
||||||
return opts.get("asm_endlabels", get_compiler().asm_end_label)
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the number of characters to left align before the TODO finish documenting
|
|
||||||
def mnemonic_ljust() -> int:
|
|
||||||
return opts.get("mnemonic_ljust", 11)
|
|
||||||
|
|
||||||
|
|
||||||
# Determines whether to pad the rom address
|
|
||||||
def rom_address_padding() -> bool:
|
|
||||||
return opts.get("rom_address_padding", False)
|
|
||||||
|
|
||||||
|
|
||||||
# Determines which ABI names to use for general purpose registers
|
|
||||||
# Valid values: 'numeric', 'o32', 'n32', 'n64'
|
|
||||||
def get_mips_abi_gpr() -> str:
|
|
||||||
return opts.get("mips_abi_gpr", "o32")
|
|
||||||
|
|
||||||
|
|
||||||
# Determines which ABI names to use for floating point registers
|
|
||||||
# Valid values: 'numeric', 'o32', 'n32', 'n64'
|
|
||||||
# o32 is highly recommended, as it provides logically named registers for floating point instructions
|
|
||||||
# For more info, see https://gist.github.com/EllipticEllipsis/27eef11205c7a59d8ea85632bc49224d
|
|
||||||
def get_mips_abi_float_regs() -> str:
|
|
||||||
return opts.get("mips_abi_float_regs", "numeric")
|
|
||||||
|
|
||||||
|
|
||||||
# Determines whether to ad ".set gp=64 to asm/hasm files"
|
|
||||||
def get_add_set_gp_64() -> bool:
|
|
||||||
return opts.get("add_set_gp_64", True)
|
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# N64-specific options
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
# Determines the encoding of the header
|
|
||||||
def get_header_encoding() -> str:
|
|
||||||
return opts.get("header_encoding", "ASCII")
|
|
||||||
|
|
||||||
|
|
||||||
# Determines the type gfx ucode (used by gfx segments)
|
|
||||||
# Valid options are ['f3d', 'f3db', 'f3dex', 'f3dexb', 'f3dex2']
|
|
||||||
def get_gfx_ucode() -> str:
|
|
||||||
valid_options = ["f3d", "f3db", "f3dex", "f3dexb", "f3dex2"]
|
|
||||||
ret = opts.get("gfx_ucode", "f3dex2")
|
|
||||||
if ret not in valid_options:
|
|
||||||
log.error(f"Invalid gfx_ucode: {ret}. Valid options are: {valid_options}")
|
|
||||||
return ret
|
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# Compiler-specific options
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
# Determines whether to use a legacy INCLUDE_ASM macro format in c files
|
|
||||||
# only applies to GCC/SN64
|
|
||||||
def get_use_legacy_include_asm() -> bool:
|
|
||||||
return opts.get("use_legacy_include_asm", True)
|
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
from typing import Dict, Union
|
from typing import Dict, Union
|
||||||
from segtypes.n64.ci4 import N64SegCi4, N64SegCi8
|
from segtypes.n64.ci import N64SegCi
|
||||||
from segtypes.n64.palette import N64SegPalette as Palette
|
from segtypes.n64.palette import N64SegPalette as Palette
|
||||||
from segtypes.common.group import CommonSegGroup
|
from segtypes.common.group import CommonSegGroup
|
||||||
|
|
||||||
# Resolve Raster#palette and Palette#raster links
|
# Resolve Raster#palette and Palette#raster links
|
||||||
def initialize(all_segments):
|
def initialize(all_segments):
|
||||||
def process(segments):
|
def process(segments):
|
||||||
raster_map: Dict[str, Union[N64SegCi4, N64SegCi8]] = {}
|
raster_map: Dict[str, N64SegCi] = {}
|
||||||
palette_map: Dict[str, Palette] = {}
|
palette_map: Dict[str, Palette] = {}
|
||||||
|
|
||||||
for segment in segments:
|
for segment in segments:
|
||||||
if isinstance(segment, Palette):
|
if isinstance(segment, Palette):
|
||||||
palette_map[segment.name] = segment
|
palette_map[segment.name] = segment
|
||||||
|
|
||||||
if isinstance(segment, N64SegCi4) or isinstance(segment, N64SegCi8):
|
if isinstance(segment, N64SegCi):
|
||||||
raster_map[segment.name] = segment
|
raster_map[segment.name] = segment
|
||||||
|
|
||||||
if isinstance(segment, CommonSegGroup):
|
if isinstance(segment, CommonSegGroup):
|
||||||
|
@ -52,7 +52,7 @@ def initialize(all_segments: "List[Segment]"):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
# Manual list of func name / addrs
|
# Manual list of func name / addrs
|
||||||
for path in options.get_symbol_addrs_paths():
|
for path in options.opts.symbol_addrs_paths:
|
||||||
if path.exists():
|
if path.exists():
|
||||||
with open(path) as f:
|
with open(path) as f:
|
||||||
sym_addrs_lines = f.readlines()
|
sym_addrs_lines = f.readlines()
|
||||||
@ -410,9 +410,9 @@ class Symbol:
|
|||||||
suffix = self.format_name(self.segment.symbol_name_format_no_rom)
|
suffix = self.format_name(self.segment.symbol_name_format_no_rom)
|
||||||
else:
|
else:
|
||||||
if isinstance(self.rom, int):
|
if isinstance(self.rom, int):
|
||||||
suffix = self.format_name(options.get_symbol_name_format())
|
suffix = self.format_name(options.opts.symbol_name_format)
|
||||||
else:
|
else:
|
||||||
suffix = self.format_name(options.get_symbol_name_format_no_rom())
|
suffix = self.format_name(options.opts.symbol_name_format_no_rom)
|
||||||
|
|
||||||
if self.type == "func":
|
if self.type == "func":
|
||||||
prefix = "func"
|
prefix = "func"
|
||||||
|
@ -35,7 +35,7 @@ class N64SegPm_charset(N64Segment):
|
|||||||
self.rasters.append(raster)
|
self.rasters.append(raster)
|
||||||
|
|
||||||
def split(self, rom_bytes):
|
def split(self, rom_bytes):
|
||||||
fs_dir = options.get_asset_path() / self.dir / self.name
|
fs_dir = options.opts.asset_path / self.dir / self.name
|
||||||
fs_dir.mkdir(parents=True, exist_ok=True)
|
fs_dir.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
for i, raster in enumerate(self.rasters):
|
for i, raster in enumerate(self.rasters):
|
||||||
@ -52,7 +52,7 @@ class N64SegPm_charset(N64Segment):
|
|||||||
self.width = self.yaml[3]
|
self.width = self.yaml[3]
|
||||||
self.height = self.yaml[4]
|
self.height = self.yaml[4]
|
||||||
|
|
||||||
fs_dir = options.get_asset_path() / self.dir / self.name
|
fs_dir = options.opts.asset_path / self.dir / self.name
|
||||||
|
|
||||||
return [LinkerEntry(
|
return [LinkerEntry(
|
||||||
self,
|
self,
|
||||||
|
@ -28,7 +28,7 @@ class N64SegPm_charset_palettes(N64Segment):
|
|||||||
self.palettes.append(palette)
|
self.palettes.append(palette)
|
||||||
|
|
||||||
def split(self, rom_bytes):
|
def split(self, rom_bytes):
|
||||||
fs_dir = options.get_asset_path() / self.dir / self.name / "palette"
|
fs_dir = options.opts.asset_path / self.dir / self.name / "palette"
|
||||||
fs_dir.mkdir(parents=True, exist_ok=True)
|
fs_dir.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
for i, palette in enumerate(self.palettes):
|
for i, palette in enumerate(self.palettes):
|
||||||
@ -41,7 +41,7 @@ class N64SegPm_charset_palettes(N64Segment):
|
|||||||
def get_linker_entries(self):
|
def get_linker_entries(self):
|
||||||
from segtypes.linker_entry import LinkerEntry
|
from segtypes.linker_entry import LinkerEntry
|
||||||
|
|
||||||
fs_dir = options.get_asset_path() / self.dir / self.name / "palette"
|
fs_dir = options.opts.asset_path / self.dir / self.name / "palette"
|
||||||
|
|
||||||
return [LinkerEntry(
|
return [LinkerEntry(
|
||||||
self,
|
self,
|
||||||
|
@ -44,7 +44,7 @@ glabel {name}
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def effect_path(self, effect):
|
def effect_path(self, effect):
|
||||||
return options.get_build_path() / "asm" / "effects" / f"{effect}.s"
|
return options.opts.build_path / "asm" / "effects" / f"{effect}.s"
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -78,7 +78,7 @@ glabel {name}
|
|||||||
yaml=yaml,
|
yaml=yaml,
|
||||||
)
|
)
|
||||||
|
|
||||||
with open(options.get_asm_path() / ".." / "effects.yaml") as f:
|
with open(options.opts.asm_path / ".." / "effects.yaml") as f:
|
||||||
self.effects = yaml_loader.load(f.read(), Loader=yaml_loader.SafeLoader)
|
self.effects = yaml_loader.load(f.read(), Loader=yaml_loader.SafeLoader)
|
||||||
|
|
||||||
def split(self, rom_bytes):
|
def split(self, rom_bytes):
|
||||||
|
@ -25,7 +25,7 @@ glabel {name}
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def shim_path(self, shim):
|
def shim_path(self, shim):
|
||||||
return options.get_build_path() / "asm" / "effect_shims" / f"{shim}.s"
|
return options.opts.build_path / "asm" / "effect_shims" / f"{shim}.s"
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -59,7 +59,7 @@ glabel {name}
|
|||||||
yaml=yaml,
|
yaml=yaml,
|
||||||
)
|
)
|
||||||
|
|
||||||
with open(options.get_asm_path() / ".." / "effect_shims.yaml") as f:
|
with open(options.opts.asm_path / ".." / "effect_shims.yaml") as f:
|
||||||
self.shims = yaml_loader.load(f.read(), Loader=yaml_loader.SafeLoader)
|
self.shims = yaml_loader.load(f.read(), Loader=yaml_loader.SafeLoader)
|
||||||
|
|
||||||
def split(self, rom_bytes):
|
def split(self, rom_bytes):
|
||||||
|
@ -10,9 +10,11 @@ from util.iter import iter_in_groups
|
|||||||
from util import options
|
from util import options
|
||||||
import png
|
import png
|
||||||
import yaml as yaml_loader
|
import yaml as yaml_loader
|
||||||
|
import n64img.image
|
||||||
|
|
||||||
script_dir = Path(os.path.dirname(os.path.realpath(__file__)))
|
script_dir = Path(os.path.dirname(os.path.realpath(__file__)))
|
||||||
|
|
||||||
|
|
||||||
def decode_null_terminated_ascii(data):
|
def decode_null_terminated_ascii(data):
|
||||||
length = 0
|
length = 0
|
||||||
for byte in data:
|
for byte in data:
|
||||||
@ -20,7 +22,8 @@ def decode_null_terminated_ascii(data):
|
|||||||
break
|
break
|
||||||
length += 1
|
length += 1
|
||||||
|
|
||||||
return data[:length].decode('ascii')
|
return data[:length].decode("ascii")
|
||||||
|
|
||||||
|
|
||||||
def parse_palette(data):
|
def parse_palette(data):
|
||||||
palette = []
|
palette = []
|
||||||
@ -30,18 +33,20 @@ def parse_palette(data):
|
|||||||
|
|
||||||
return palette
|
return palette
|
||||||
|
|
||||||
|
|
||||||
def add_file_ext(name: str) -> str:
|
def add_file_ext(name: str) -> str:
|
||||||
if name.startswith("party_"):
|
if name.startswith("party_"):
|
||||||
return name + ".png"
|
return name + ".png"
|
||||||
elif name.endswith("_hit") or name.endswith("_shape"):
|
elif name.endswith("_hit") or name.endswith("_shape"):
|
||||||
return name + ".bin" # TODO: xml
|
return name + ".bin" # TODO: xml
|
||||||
elif name.endswith("_tex"):
|
elif name.endswith("_tex"):
|
||||||
return name + ".bin" # TODO: texture archive
|
return name + ".bin" # TODO: texture archive
|
||||||
elif name.endswith("_bg"):
|
elif name.endswith("_bg"):
|
||||||
return name + ".png"
|
return name + ".png"
|
||||||
else:
|
else:
|
||||||
return name + ".bin"
|
return name + ".bin"
|
||||||
|
|
||||||
|
|
||||||
class N64SegPm_map_data(N64Segment):
|
class N64SegPm_map_data(N64Segment):
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -79,20 +84,19 @@ class N64SegPm_map_data(N64Segment):
|
|||||||
self.files = yaml_loader.load(f.read(), Loader=yaml_loader.SafeLoader)
|
self.files = yaml_loader.load(f.read(), Loader=yaml_loader.SafeLoader)
|
||||||
|
|
||||||
def split(self, rom_bytes):
|
def split(self, rom_bytes):
|
||||||
fs_dir = options.get_asset_path() / self.dir / self.name
|
fs_dir = options.opts.asset_path / self.dir / self.name
|
||||||
(fs_dir / "title").mkdir(parents=True, exist_ok=True)
|
(fs_dir / "title").mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
data = rom_bytes[self.rom_start: self.rom_end]
|
data = rom_bytes[self.rom_start : self.rom_end]
|
||||||
|
|
||||||
asset_idx = 0
|
asset_idx = 0
|
||||||
while True:
|
while True:
|
||||||
asset_data = data[0x20 + asset_idx * 0x1C:]
|
asset_data = data[0x20 + asset_idx * 0x1C :]
|
||||||
|
|
||||||
name = decode_null_terminated_ascii(asset_data[0:])
|
name = decode_null_terminated_ascii(asset_data[0:])
|
||||||
offset = int.from_bytes(asset_data[0x10:0x14], byteorder="big")
|
offset = int.from_bytes(asset_data[0x10:0x14], byteorder="big")
|
||||||
size = int.from_bytes(asset_data[0x14:0x18], byteorder="big")
|
size = int.from_bytes(asset_data[0x14:0x18], byteorder="big")
|
||||||
decompressed_size = int.from_bytes(
|
decompressed_size = int.from_bytes(asset_data[0x18:0x1C], byteorder="big")
|
||||||
asset_data[0x18:0x1C], byteorder="big")
|
|
||||||
|
|
||||||
is_compressed = size != decompressed_size
|
is_compressed = size != decompressed_size
|
||||||
|
|
||||||
@ -116,51 +120,75 @@ class N64SegPm_map_data(N64Segment):
|
|||||||
w = png.Writer(150, 105, palette=parse_palette(bytes[:0x200]))
|
w = png.Writer(150, 105, palette=parse_palette(bytes[:0x200]))
|
||||||
w.write_array(f, bytes[0x200:])
|
w.write_array(f, bytes[0x200:])
|
||||||
elif name == "title_data":
|
elif name == "title_data":
|
||||||
if "ver/us" in options.opts["target_path"]:
|
if "ver/us" in str(options.opts.target_path):
|
||||||
with open(fs_dir / "title/logotype.png", "wb") as f:
|
w = 200
|
||||||
width = 200
|
h = 112
|
||||||
height = 112
|
img = n64img.image.RGBA32(
|
||||||
N64SegRgba32.get_writer(width, height).write_array(f, N64SegRgba32.parse_image(bytes[0x2210 : 0x2210 + width * height * 4], width, height))
|
data=bytes[0x2210 : 0x2210 + w * h * 4], width=w, height=h
|
||||||
|
)
|
||||||
|
img.write(fs_dir / "title/logotype.png")
|
||||||
|
|
||||||
with open(fs_dir / "title/copyright.png", "wb") as f:
|
w = 144
|
||||||
width = 144
|
h = 32
|
||||||
height = 32
|
img = n64img.image.IA8(
|
||||||
N64SegIa8.get_writer(width, height).write_array(f, N64SegIa8.parse_image(bytes[0x10 : 0x10 + width * height], width, height))
|
data=bytes[0x10 : 0x10 + w * h], width=w, height=h
|
||||||
|
)
|
||||||
|
img.write(fs_dir / "title/copyright.png")
|
||||||
|
|
||||||
with open(fs_dir / "title/press_start.png", "wb") as f:
|
w = 128
|
||||||
width = 128
|
h = 32
|
||||||
height = 32
|
img = n64img.image.IA8(
|
||||||
N64SegIa8.get_writer(width, height).write_array(f, N64SegIa8.parse_image(bytes[0x1210 : 0x1210 + width * height], width, height))
|
data=bytes[0x1210 : 0x1210 + w * h], width=w, height=h
|
||||||
|
)
|
||||||
|
img.write(fs_dir / "title/press_start.png")
|
||||||
else:
|
else:
|
||||||
with open(fs_dir / "title/logotype.png", "wb") as f:
|
w = 272
|
||||||
width = 272
|
h = 88
|
||||||
height = 88
|
img = n64img.image.RGBA32(
|
||||||
N64SegRgba32.get_writer(width, height).write_array(f, N64SegRgba32.parse_image(bytes[0x1830 : 0x1830 + width * height * 4], width, height))
|
data=bytes[0x1830 : 0x1830 + w * h * 4], width=w, height=h
|
||||||
|
)
|
||||||
|
img.write(fs_dir / "title/logotype.png")
|
||||||
|
|
||||||
with open(fs_dir / "title/copyright.png", "wb") as f:
|
w = 128
|
||||||
width = 128
|
h = 32
|
||||||
height = 32
|
img = n64img.image.CI4(
|
||||||
|
data=bytes[0x10 : 0x10 + w * h], width=w, height=h
|
||||||
|
)
|
||||||
|
img.palette = parse_palette(bytes[0x810:0x830])
|
||||||
|
img.write(fs_dir / "title/copyright.png")
|
||||||
|
|
||||||
w = png.Writer(width, height, palette=parse_palette(bytes[0x810:0x830]))
|
w = 128
|
||||||
w.write_array(f, N64SegCi4.parse_image(bytes[0x10 : 0x10 + width * height], width, height))
|
h = 32
|
||||||
|
img = n64img.image.IA8(
|
||||||
with open(fs_dir / "title/press_start.png", "wb") as f:
|
data=bytes[0x830 : 0x830 + w * h], width=w, height=h
|
||||||
width = 128
|
)
|
||||||
height = 32
|
img.write(fs_dir / "title/press_start.png")
|
||||||
N64SegIa8.get_writer(width, height).write_array(f, N64SegIa8.parse_image(bytes[0x830 : 0x830 + width * height], width, height))
|
|
||||||
elif name.endswith("_bg"):
|
elif name.endswith("_bg"):
|
||||||
def write_bg_png(bytes, path, header_offset=0):
|
|
||||||
header = bytes[header_offset:header_offset+0x10]
|
|
||||||
|
|
||||||
raster_offset = int.from_bytes(header[0:4], byteorder="big") - 0x80200000
|
def write_bg_png(bytes, path, header_offset=0):
|
||||||
palette_offset = int.from_bytes(header[4:8], byteorder="big") - 0x80200000
|
header = bytes[header_offset : header_offset + 0x10]
|
||||||
assert int.from_bytes(header[8:12], byteorder="big") == 0x000C0014 # draw pos
|
|
||||||
|
raster_offset = (
|
||||||
|
int.from_bytes(header[0:4], byteorder="big") - 0x80200000
|
||||||
|
)
|
||||||
|
palette_offset = (
|
||||||
|
int.from_bytes(header[4:8], byteorder="big") - 0x80200000
|
||||||
|
)
|
||||||
|
assert (
|
||||||
|
int.from_bytes(header[8:12], byteorder="big") == 0x000C0014
|
||||||
|
) # draw pos
|
||||||
width = int.from_bytes(header[12:14], byteorder="big")
|
width = int.from_bytes(header[12:14], byteorder="big")
|
||||||
height = int.from_bytes(header[14:16], byteorder="big")
|
height = int.from_bytes(header[14:16], byteorder="big")
|
||||||
|
|
||||||
with open(path, "wb") as f:
|
with open(path, "wb") as f:
|
||||||
# CI-8
|
# CI-8
|
||||||
w = png.Writer(width, height, palette=parse_palette(bytes[palette_offset:palette_offset+512]))
|
w = png.Writer(
|
||||||
|
width,
|
||||||
|
height,
|
||||||
|
palette=parse_palette(
|
||||||
|
bytes[palette_offset : palette_offset + 512]
|
||||||
|
),
|
||||||
|
)
|
||||||
w.write_array(f, bytes[raster_offset:])
|
w.write_array(f, bytes[raster_offset:])
|
||||||
|
|
||||||
write_bg_png(bytes, path)
|
write_bg_png(bytes, path)
|
||||||
@ -177,10 +205,13 @@ class N64SegPm_map_data(N64Segment):
|
|||||||
def get_linker_entries(self):
|
def get_linker_entries(self):
|
||||||
from segtypes.linker_entry import LinkerEntry
|
from segtypes.linker_entry import LinkerEntry
|
||||||
|
|
||||||
fs_dir = options.get_asset_path() / self.dir / self.name
|
fs_dir = options.opts.asset_path / self.dir / self.name
|
||||||
|
|
||||||
return [LinkerEntry(
|
return [
|
||||||
self,
|
LinkerEntry(
|
||||||
[fs_dir / add_file_ext(name) for name in self.files],
|
self,
|
||||||
fs_dir.with_suffix(".dat"), ".data"),
|
[fs_dir / add_file_ext(name) for name in self.files],
|
||||||
|
fs_dir.with_suffix(".dat"),
|
||||||
|
".data",
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
@ -418,7 +418,7 @@ class N64SegPm_msg(N64Segment):
|
|||||||
section_offsets.append(offset)
|
section_offsets.append(offset)
|
||||||
pos += 4
|
pos += 4
|
||||||
|
|
||||||
msg_dir = options.get_asset_path() / self.name
|
msg_dir = options.opts.asset_path / self.name
|
||||||
msg_dir.mkdir(parents=True, exist_ok=True)
|
msg_dir.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
for i, section_offset in enumerate(section_offsets):
|
for i, section_offset in enumerate(section_offsets):
|
||||||
@ -465,7 +465,7 @@ class N64SegPm_msg(N64Segment):
|
|||||||
def get_linker_entries(self):
|
def get_linker_entries(self):
|
||||||
from segtypes.linker_entry import LinkerEntry
|
from segtypes.linker_entry import LinkerEntry
|
||||||
|
|
||||||
base_path = options.get_asset_path() / f"{self.name}"
|
base_path = options.opts.asset_path / f"{self.name}"
|
||||||
out_paths = [base_path / Path(f + ".msg") for f in self.files]
|
out_paths = [base_path / Path(f + ".msg") for f in self.files]
|
||||||
|
|
||||||
return [LinkerEntry(self, out_paths, base_path, ".data")]
|
return [LinkerEntry(self, out_paths, base_path, ".data")]
|
||||||
|
@ -300,7 +300,7 @@ class N64SegPm_npc_sprites(N64Segment):
|
|||||||
self.sprite_cfg = yaml_loader.load(f.read(), Loader=yaml_loader.SafeLoader)
|
self.sprite_cfg = yaml_loader.load(f.read(), Loader=yaml_loader.SafeLoader)
|
||||||
|
|
||||||
def split(self, rom_bytes):
|
def split(self, rom_bytes):
|
||||||
out_dir = options.get_asset_path() / self.dir / self.name
|
out_dir = options.opts.asset_path / self.dir / self.name
|
||||||
|
|
||||||
data = rom_bytes[self.rom_start:self.rom_end]
|
data = rom_bytes[self.rom_start:self.rom_end]
|
||||||
pos = 0
|
pos = 0
|
||||||
@ -328,8 +328,8 @@ class N64SegPm_npc_sprites(N64Segment):
|
|||||||
def get_linker_entries(self):
|
def get_linker_entries(self):
|
||||||
from segtypes.linker_entry import LinkerEntry
|
from segtypes.linker_entry import LinkerEntry
|
||||||
|
|
||||||
basepath = options.get_asset_path() / "sprite" / f"{self.name}"
|
basepath = options.opts.asset_path / "sprite" / f"{self.name}"
|
||||||
out_paths = [options.get_asset_path() / "sprite" / self.name / (f["name"] if type(f) is dict else f)
|
out_paths = [options.opts.asset_path / "sprite" / self.name / (f["name"] if type(f) is dict else f)
|
||||||
for f in self.files]
|
for f in self.files]
|
||||||
|
|
||||||
return [LinkerEntry(self, out_paths, basepath, ".data")]
|
return [LinkerEntry(self, out_paths, basepath, ".data")]
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: Mario Story
|
name: Mario Story
|
||||||
basename: papermario
|
|
||||||
options:
|
options:
|
||||||
|
basename: papermario
|
||||||
find_file_boundaries: True
|
find_file_boundaries: True
|
||||||
compiler: GCC
|
compiler: GCC
|
||||||
mnemonic_ljust: 10
|
mnemonic_ljust: 10
|
||||||
@ -11,7 +11,7 @@ options:
|
|||||||
extensions_path: tools/splat_ext
|
extensions_path: tools/splat_ext
|
||||||
symbol_addrs_path: ver/jp/symbol_addrs.txt
|
symbol_addrs_path: ver/jp/symbol_addrs.txt
|
||||||
ld_script_path: ver/jp/papermario.ld
|
ld_script_path: ver/jp/papermario.ld
|
||||||
linker_symbol_header_path: ver/jp/build/include/ld_addrs.h
|
ld_symbol_header_path: ver/jp/build/include/ld_addrs.h
|
||||||
src_path: src
|
src_path: src
|
||||||
asm_path: ver/jp/asm
|
asm_path: ver/jp/asm
|
||||||
asset_path: assets/jp
|
asset_path: assets/jp
|
||||||
|
@ -55,110 +55,3 @@ dlabel UseMystery
|
|||||||
|
|
||||||
dlabel gMoveScriptTable
|
dlabel gMoveScriptTable
|
||||||
.word 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x007345A0, 0x00737890, func_802A1000, 0x802A3044, 0x007345A0, 0x00737890, func_802A1000, 0x802A3044, 0x007345A0, 0x00737890, func_802A1000, 0x802A3044, 0x007345A0, 0x00737890, func_802A1000, 0x802A369C, 0x007345A0, 0x00737890, func_802A1000, 0x802A3B28, 0x00737890, 0x0073AED0, func_802A1000, 0x802A3124, 0x0073AED0, 0x0073D860, func_802A1000, 0x802A3044, 0x0074AD90, 0x0074D570, func_802A1000, 0x802A3144, 0x0074F130, 0x00752450, func_802A1000, 0x802A38C4, 0x0074F130, 0x00752450, func_802A1000, 0x802A3234, 0x00752450, 0x00756780, func_802A1000, 0x802A3D38, 0x00756780, 0x007595B0, func_802A1000, 0x802A3114, 0x007595B0, 0x0075C980, func_802A1000, 0x802A3944, 0x007595B0, 0x0075C980, func_802A1000, 0x802A32B4, 0x0075E5D0, 0x00761920, func_802A1000, 0x802A3944, 0x0075E5D0, 0x00761920, func_802A1000, 0x802A32B4, 0x00763540, 0x00765C20, func_802A1000, 0x802A3044, 0x00767C90, 0x0076A830, func_802A1000, 0x802A3044, 0x00772BA0, 0x00775100, func_802A1000, 0x802A3044, 0x00775100, 0x00777690, func_802A1000, 0x802A3044, 0x00777690, 0x00779C90, func_802A1000, 0x802A3044, 0x0077CB80, 0x0077F240, func_802A1000, 0x802A3044, 0x0077F240, 0x00781920, func_802A1000, 0x802A3124, 0x0073D860, 0x00740CC0, func_802A1000, 0x802A2650, 0x0073D860, 0x00740CC0, func_802A1000, 0x802A2650, 0x0073D860, 0x00740CC0, func_802A1000, 0x802A2650, 0x0073D860, 0x00740CC0, func_802A1000, 0x802A30F4, 0x0073D860, 0x00740CC0, func_802A1000, 0x802A3644, 0x00740CC0, 0x00743DF0, func_802A1000, 0x802A2620, 0x00743DF0, 0x00746E10, func_802A1000, 0x802A2734, 0x00746E10, 0x00748DD0, func_802A1000, 0x802A2600, 0x00748DD0, 0x0074AD90, func_802A1000, 0x802A2600, 0x0074D570, 0x0074F130, func_802A1000, 0x802A2800, 0x0074D570, 0x0074F130, func_802A1000, 0x802A27F0, 0x0075C980, 0x0075E5D0, func_802A1000, 0x802A2880, 0x0075C980, 0x0075E5D0, func_802A1000, battle_item_strange_cake_script6, 0x00761920, 0x00763540, func_802A1000, 0x802A2880, 0x00761920, 0x00763540, func_802A1000, battle_item_strange_cake_script6, 0x00765C20, 0x00767C90, func_802A1000, 0x802A2600, 0x0076A830, 0x0076D760, func_802A1000, 0x802A2600, 0x0076D760, 0x0076F330, func_802A1000, 0x802A2600, 0x0076F330, 0x00770F30, func_802A1000, 0x802A2600, 0x00770F30, 0x00772BA0, func_802A1000, 0x802A2600, 0x00781920, 0x00783BA0, func_802A1000, 0x802A26E0, 0x00783BA0, 0x00785B20, func_802A1000, 0x802A2600, 0x00785B20, 0x00789E60, func_802A1000, 0x802A2630
|
.word 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x007345A0, 0x00737890, func_802A1000, 0x802A3044, 0x007345A0, 0x00737890, func_802A1000, 0x802A3044, 0x007345A0, 0x00737890, func_802A1000, 0x802A3044, 0x007345A0, 0x00737890, func_802A1000, 0x802A369C, 0x007345A0, 0x00737890, func_802A1000, 0x802A3B28, 0x00737890, 0x0073AED0, func_802A1000, 0x802A3124, 0x0073AED0, 0x0073D860, func_802A1000, 0x802A3044, 0x0074AD90, 0x0074D570, func_802A1000, 0x802A3144, 0x0074F130, 0x00752450, func_802A1000, 0x802A38C4, 0x0074F130, 0x00752450, func_802A1000, 0x802A3234, 0x00752450, 0x00756780, func_802A1000, 0x802A3D38, 0x00756780, 0x007595B0, func_802A1000, 0x802A3114, 0x007595B0, 0x0075C980, func_802A1000, 0x802A3944, 0x007595B0, 0x0075C980, func_802A1000, 0x802A32B4, 0x0075E5D0, 0x00761920, func_802A1000, 0x802A3944, 0x0075E5D0, 0x00761920, func_802A1000, 0x802A32B4, 0x00763540, 0x00765C20, func_802A1000, 0x802A3044, 0x00767C90, 0x0076A830, func_802A1000, 0x802A3044, 0x00772BA0, 0x00775100, func_802A1000, 0x802A3044, 0x00775100, 0x00777690, func_802A1000, 0x802A3044, 0x00777690, 0x00779C90, func_802A1000, 0x802A3044, 0x0077CB80, 0x0077F240, func_802A1000, 0x802A3044, 0x0077F240, 0x00781920, func_802A1000, 0x802A3124, 0x0073D860, 0x00740CC0, func_802A1000, 0x802A2650, 0x0073D860, 0x00740CC0, func_802A1000, 0x802A2650, 0x0073D860, 0x00740CC0, func_802A1000, 0x802A2650, 0x0073D860, 0x00740CC0, func_802A1000, 0x802A30F4, 0x0073D860, 0x00740CC0, func_802A1000, 0x802A3644, 0x00740CC0, 0x00743DF0, func_802A1000, 0x802A2620, 0x00743DF0, 0x00746E10, func_802A1000, 0x802A2734, 0x00746E10, 0x00748DD0, func_802A1000, 0x802A2600, 0x00748DD0, 0x0074AD90, func_802A1000, 0x802A2600, 0x0074D570, 0x0074F130, func_802A1000, 0x802A2800, 0x0074D570, 0x0074F130, func_802A1000, 0x802A27F0, 0x0075C980, 0x0075E5D0, func_802A1000, 0x802A2880, 0x0075C980, 0x0075E5D0, func_802A1000, battle_item_strange_cake_script6, 0x00761920, 0x00763540, func_802A1000, 0x802A2880, 0x00761920, 0x00763540, func_802A1000, battle_item_strange_cake_script6, 0x00765C20, 0x00767C90, func_802A1000, 0x802A2600, 0x0076A830, 0x0076D760, func_802A1000, 0x802A2600, 0x0076D760, 0x0076F330, func_802A1000, 0x802A2600, 0x0076F330, 0x00770F30, func_802A1000, 0x802A2600, 0x00770F30, 0x00772BA0, func_802A1000, 0x802A2600, 0x00781920, 0x00783BA0, func_802A1000, 0x802A26E0, 0x00783BA0, 0x00785B20, func_802A1000, 0x802A2600, 0x00785B20, 0x00789E60, func_802A1000, 0x802A2630
|
||||||
|
|
||||||
dlabel D_80294190
|
|
||||||
.word 0x2121751D, 0x23A3460C, 0xB46B0078, 0x730D1300
|
|
||||||
|
|
||||||
dlabel D_802941A0
|
|
||||||
.word 0x00E4862E, 0xB4F27570, 0xFFF304BC, 0xF70D0500
|
|
||||||
|
|
||||||
dlabel D_802941B0
|
|
||||||
.word 0x2D38D254, 0x28D17D2C, 0xB5A11B55, 0xFFFFFF00
|
|
||||||
|
|
||||||
dlabel D_802941C0
|
|
||||||
.word 0x00000007, 0x00000006, 0x00000005, 0x00000004, 0x00000003, 0x00000002, 0x00000001, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802941E0
|
|
||||||
.word 0x0000000B, 0x0000000A, 0x00000009, 0x00000008, 0x00000007, 0x00000006, 0x00000005, 0x00000004
|
|
||||||
|
|
||||||
dlabel D_80294200
|
|
||||||
.word 0x00000082, 0x00000078, 0x0000006E, 0x00000064, 0x0000005A, 0x00000050, 0x00000046, 0x0000003C
|
|
||||||
|
|
||||||
dlabel D_80294220
|
|
||||||
.word 0x00000082, 0x00000078, 0x0000006E, 0x00000064, 0x0000005A, 0x00000050, 0x00000046, 0x0000003C
|
|
||||||
|
|
||||||
dlabel D_80294240
|
|
||||||
.word 0x00000082, 0x00000078, 0x0000006E, 0x00000064, 0x0000005A, 0x00000050, 0x00000046, 0x0000003C
|
|
||||||
|
|
||||||
dlabel D_80294260
|
|
||||||
.word 0x00000082, 0x00000078, 0x0000006E, 0x00000064, 0x0000005A, 0x00000050, 0x00000046, 0x0000003C
|
|
||||||
|
|
||||||
dlabel D_80294280
|
|
||||||
.word 0x00000082, 0x00000078, 0x0000006E, 0x00000064, 0x0000005A, 0x00000050, 0x00000046, 0x0000003C
|
|
||||||
|
|
||||||
dlabel D_802942A0
|
|
||||||
.word 0x00000082, 0x00000078, 0x0000006E, 0x00000064, 0x0000005A, 0x00000050, 0x00000046, 0x0000003C
|
|
||||||
|
|
||||||
dlabel D_802942C0
|
|
||||||
.word 0x00000082, 0x00000078, 0x0000006E, 0x00000064, 0x0000005A, 0x00000050, 0x00000046, 0x0000003C
|
|
||||||
|
|
||||||
dlabel D_802942E0
|
|
||||||
.word 0x00000082, 0x00000078, 0x0000006E, 0x00000064, 0x0000005A, 0x00000050, 0x00000046, 0x0000003C
|
|
||||||
|
|
||||||
dlabel D_80294300
|
|
||||||
.word 0x00000082, 0x00000078, 0x0000006E, 0x00000064, 0x0000005A, 0x00000050, 0x00000046, 0x0000003C
|
|
||||||
|
|
||||||
dlabel D_80294320
|
|
||||||
.word 0x00000009, 0x00000008, 0x00000007, 0x00000006, 0x00000005, 0x00000004, 0x00000003, 0x00000002
|
|
||||||
|
|
||||||
dlabel D_80294340
|
|
||||||
.word 0x00000082, 0x00000078, 0x0000006E, 0x00000064, 0x0000005A, 0x00000050, 0x00000046, 0x0000003C
|
|
||||||
|
|
||||||
dlabel D_80294360
|
|
||||||
.word 0x00000082, 0x00000078, 0x0000006E, 0x00000064, 0x0000005A, 0x00000050, 0x00000046, 0x0000003C
|
|
||||||
|
|
||||||
dlabel D_80294380
|
|
||||||
.word 0x00000082, 0x00000078, 0x0000006E, 0x00000064, 0x0000005A, 0x00000050, 0x00000046, 0x0000003C
|
|
||||||
|
|
||||||
dlabel D_802943A0
|
|
||||||
.word 0x00000082, 0x00000078, 0x0000006E, 0x00000064, 0x0000005A, 0x00000050, 0x00000046, 0x0000003C
|
|
||||||
|
|
||||||
dlabel D_802943C0
|
|
||||||
.word 0x00000082, 0x00000078, 0x0000006E, 0x00000064, 0x0000005A, 0x00000050, 0x00000046, 0x0000003C
|
|
||||||
|
|
||||||
dlabel D_802943E0
|
|
||||||
.word 0x00000082, 0x00000078, 0x0000006E, 0x00000064, 0x0000005A, 0x00000050, 0x00000046, 0x0000003C
|
|
||||||
|
|
||||||
dlabel D_80294400
|
|
||||||
.word 0x00000082, 0x00000078, 0x0000006E, 0x00000064, 0x0000005A, 0x00000050, 0x00000046, 0x0000003C
|
|
||||||
|
|
||||||
dlabel D_80294420
|
|
||||||
.word 0x00000082, 0x00000078, 0x0000006E, 0x00000064, 0x0000005A, 0x00000050, 0x00000046, 0x0000003C
|
|
||||||
|
|
||||||
dlabel D_80294440
|
|
||||||
.word 0x00000082, 0x00000078, 0x0000006E, 0x00000064, 0x0000005A, 0x00000050, 0x00000046, 0x0000003C
|
|
||||||
|
|
||||||
dlabel D_80294460
|
|
||||||
.word 0x00000006, 0x00000003, 0x00000005, 0x00000003, 0x00000004, 0x00000003, 0x00000002, 0x00000003, 0x00000001, 0x00000003, 0x00000000, 0x00000003, 0x00000000, 0x00000002, 0x00000000, 0x00000001
|
|
||||||
|
|
||||||
dlabel D_802944A0
|
|
||||||
.word 0x00000082, 0x00000078, 0x0000006E, 0x00000064, 0x0000005A, 0x00000050, 0x00000046, 0x0000003C
|
|
||||||
|
|
||||||
dlabel actionCommandDmaTable
|
|
||||||
.word 0x00000000, 0x00000000, 0x00000000
|
|
||||||
.word action_cmd_jump_ROM_START, action_cmd_jump_ROM_END, action_cmd_jump_VRAM
|
|
||||||
.word action_cmd_hammer_ROM_START, action_cmd_hammer_ROM_END, action_cmd_hammer_VRAM
|
|
||||||
.word action_cmd_flee_ROM_START, action_cmd_flee_ROM_END, action_cmd_flee_VRAM
|
|
||||||
.word action_cmd_break_free_ROM_START, action_cmd_break_free_ROM_END, action_cmd_break_free_VRAM
|
|
||||||
.word action_cmd_whirlwind_ROM_START, action_cmd_whirlwind_ROM_END, action_cmd_whirlwind_VRAM
|
|
||||||
.word action_cmd_stop_leech_ROM_START, action_cmd_stop_leech_ROM_END, action_cmd_stop_leech_VRAM
|
|
||||||
.word action_cmd_07_ROM_START, action_cmd_07_ROM_END, action_cmd_07_VRAM
|
|
||||||
.word action_cmd_dizzy_shell_ROM_START, action_cmd_dizzy_shell_ROM_END, action_cmd_dizzy_shell_VRAM
|
|
||||||
.word action_cmd_fire_shell_ROM_START, action_cmd_fire_shell_ROM_END, action_cmd_fire_shell_VRAM
|
|
||||||
.word action_cmd_0A_ROM_START, action_cmd_0A_ROM_END, action_cmd_0A_VRAM
|
|
||||||
.word action_cmd_bomb_ROM_START, action_cmd_bomb_ROM_END, action_cmd_bomb_VRAM
|
|
||||||
.word action_cmd_body_slam_ROM_START, action_cmd_body_slam_ROM_END, action_cmd_body_slam_VRAM
|
|
||||||
.word action_cmd_air_lift_ROM_START, action_cmd_air_lift_ROM_END, action_cmd_air_lift_VRAM
|
|
||||||
.word action_cmd_air_raid_ROM_START, action_cmd_air_raid_ROM_END, action_cmd_air_raid_VRAM
|
|
||||||
.word action_cmd_squirt_ROM_START, action_cmd_squirt_ROM_END, action_cmd_squirt_VRAM
|
|
||||||
|
|
||||||
.word action_cmd_power_shock_ROM_START, action_cmd_power_shock_ROM_END, action_cmd_power_shock_VRAM
|
|
||||||
.word action_cmd_mega_shock_ROM_START, action_cmd_mega_shock_ROM_END, action_cmd_mega_shock_VRAM
|
|
||||||
.word action_cmd_smack_ROM_START, action_cmd_smack_ROM_END, action_cmd_smack_VRAM
|
|
||||||
.word action_cmd_spiny_surge_ROM_START, action_cmd_spiny_surge_ROM_END, action_cmd_spiny_surge_VRAM
|
|
||||||
.word action_cmd_hurricane_ROM_START, action_cmd_hurricane_ROM_END, action_cmd_hurricane_VRAM
|
|
||||||
.word action_cmd_spook_ROM_START, action_cmd_spook_ROM_END, action_cmd_spook_VRAM
|
|
||||||
/*.word action_cmd__ROM_START, action_cmd__ROM_END, action_cmd__VRAM*/
|
|
||||||
|
|
||||||
.word action_cmd_water_block_ROM_START, action_cmd_water_block_ROM_END, action_cmd_water_block_VRAM
|
|
||||||
.word action_cmd_tidal_wave_ROM_START, action_cmd_tidal_wave_ROM_END, action_cmd_tidal_wave_VRAM
|
|
||||||
|
@ -1,75 +0,0 @@
|
|||||||
.include "macro.inc"
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
|
|
||||||
dlabel D_80077BF0
|
|
||||||
.byte 0x01, 0x02, 0x00, 0x34, 0x01, 0x04, 0x00, 0x36, 0x00, 0x36, 0x01, 0x02, 0x00, 0x1C, 0x01, 0x02, 0x00, 0x06, 0x01, 0x02, 0x00, 0x2C, 0x01, 0x02, 0x00, 0x2C, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00
|
|
||||||
|
|
||||||
dlabel D_80077C10
|
|
||||||
.word 0x00000000
|
|
||||||
|
|
||||||
dlabel D_80077C14
|
|
||||||
.word 0x00040000
|
|
||||||
|
|
||||||
dlabel D_80077C18
|
|
||||||
.word 0x00000000
|
|
||||||
|
|
||||||
dlabel D_80077C1C
|
|
||||||
.short 0x0004
|
|
||||||
|
|
||||||
dlabel D_80077C1E
|
|
||||||
.short 0x0005
|
|
||||||
|
|
||||||
dlabel D_80077C20
|
|
||||||
.word 0x00000000
|
|
||||||
|
|
||||||
dlabel D_80077C24
|
|
||||||
.word 0x00000000
|
|
||||||
|
|
||||||
dlabel D_80077C28
|
|
||||||
.short 0x0004, 0x0000
|
|
||||||
|
|
||||||
dlabel D_80077C2C
|
|
||||||
.word 0x00000000
|
|
||||||
|
|
||||||
dlabel D_80077C30
|
|
||||||
.word 0x00040000
|
|
||||||
|
|
||||||
dlabel D_80077C34
|
|
||||||
.word 0x00000000
|
|
||||||
|
|
||||||
dlabel D_80077C38
|
|
||||||
.short 0x0004
|
|
||||||
|
|
||||||
dlabel D_80077C3A
|
|
||||||
.short 0x0004, 0x0000, 0x0000
|
|
||||||
|
|
||||||
dlabel D_80077C40
|
|
||||||
.word 0x00000000
|
|
||||||
|
|
||||||
dlabel D_80077C44
|
|
||||||
.word 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000001, FadeBackgroundToBlack, 0x00000008, 0x00000001, 0x0000000A, 0x00000043, 0x00000003, CreateNpc, 0xFFFFFFF6, 0x00BB0001, 0x00000043, 0x00000004, SetNpcFlagBits, 0xFFFFFFF6, 0x00000100, 0x00000001, 0x00000043, 0x00000003, SetNpcYaw, 0xFFFFFFF6, 0x00000000, 0x00000043, 0x00000001, GetCamLookAtObjVector, 0x00000043, 0x00000005, SetNpcPos, 0xFFFFFFF6, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000056, 0x00000000, 0x00000043, 0x00000001, MerleeUpdateFX, 0x00000057, 0x00000000, 0x00000043, 0x00000001, FadeInMerlee, 0x00000008, 0x00000001, 0x0000001E, 0x00000043, 0x00000003, SetNpcAnimation, 0xFFFFFFF6, 0x00BB0000, 0x00000043, 0x00000001, MerleeStopFX, 0x00000043, 0x00000001, UnfadeBackgroundFromBlack, 0x00000008, 0x00000001, 0x00000014, 0x00000056, 0x00000000, 0x00000043, 0x00000001, FadeOutMerlee, 0x00000043, 0x00000002, DeleteNpc, 0xFFFFFFF6, 0x00000057, 0x00000000, 0x00000043, 0x00000002, PlaySound, 0x00002075, 0x00000043, 0x00000004, GetPlayerPos, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, PlayMerleeGatherFX, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000043, 0x00000004, PlayMerleeOrbFX, 0xFE363C80, 0xFE363C81, 0xFE363C82, 0x00000008, 0x00000001, 0x0000000F, 0x00000043, 0x00000001, ShowMerleeCoinMessage, 0x00000008, 0x00000001, 0x0000000F, 0x00000043, 0x00000001, HasMerleeCasts, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000001, 0x00000002, 0x00000000, 0x00000013, 0x00000000, 0x00000043, 0x00000001, ShowMerleeRanOutMessage, 0x00000008, 0x00000001, 0x0000000F, 0x00000002, 0x00000000, 0x00000001, 0x00000000
|
|
||||||
|
|
||||||
dlabel SCRIPT_NpcDefeat
|
|
||||||
.word 0x00000043, 0x00000002, GetBattleOutcome, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000016, 0x00000001, 0x00000000, 0x00000043, 0x00000001, OnDefeatEnemy, 0x00000016, 0x00000001, 0x00000001, 0x00000016, 0x00000001, 0x00000002, 0x00000023, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_80077E9C
|
|
||||||
.word 0x00000043, 0x00000001, OnFleeBattleDrops, 0x00000002, 0x00000000, 0x00000001, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_80077EB8
|
|
||||||
.word 0x800A008A, 0x0032FFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00005FFF, 0x7FFF0000, 0x00013FFF, 0x5FFF0000, 0x00021FFF, 0x3FFF0000, 0x00030000, 0x1FFF0000, 0x00040000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00030000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
|
||||||
|
|
||||||
dlabel EnemyNpcHit
|
|
||||||
.word 0x00000043, 0x00000002, GetOwnerEncounterTrigger, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000016, 0x00000001, 0x00000001, 0x0000001D, 0x00000001, 0x00000002, 0x0000001D, 0x00000001, 0x00000004, 0x0000001D, 0x00000001, 0x00000006, 0x00000043, 0x00000003, GetSelfAnimationFromTable, 0x00000007, 0xFE363C80, 0x00000046, 0x00000001, 0x800936DC, 0x00000016, 0x00000001, 0x00000003, 0x00000056, 0x00000000, 0x00000043, 0x00000002, func_800458CC, 0xFE363C80, 0x0000000A, 0x00000002, 0xFE363C80, 0x00000000, 0x00000024, 0x00000002, 0xFE363C8A, 0x00000000, 0x00000005, 0x00000001, 0x0000001E, 0x00000027, 0x00000002, 0xFE363C8A, 0x00000028, 0x00000043, 0x00000005, SetNpcRotation, 0xFFFFFFFF, 0x00000000, 0xFE363C8A, 0x00000000, 0x00000008, 0x00000001, 0x00000001, 0x00000006, 0x00000000, 0x00000013, 0x00000000, 0x00000057, 0x00000000, 0x00000020, 0x00000000, 0x00000023, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000
|
|
||||||
|
|
||||||
dlabel EnemyNpcDefeat
|
|
||||||
.word 0x00000043, 0x00000005, SetNpcRotation, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000043, 0x00000002, GetBattleOutcome, 0xFE363C80, 0x00000014, 0x00000001, 0xFE363C80, 0x00000016, 0x00000001, 0x00000000, 0x00000043, 0x00000001, DoNpcDefeat, 0x00000016, 0x00000001, 0x00000002, 0x00000043, 0x00000002, func_80045900, 0x00000000, 0x00000016, 0x00000001, 0x00000003, 0x00000043, 0x00000004, SetEnemyFlagBits, 0xFFFFFFFF, 0x00000010, 0x00000001, 0x00000043, 0x00000002, RemoveNpc, 0xFFFFFFFF, 0x00000023, 0x00000000, 0x00000002, 0x00000000, 0x00000001, 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_80078160
|
|
||||||
.short 0x001C, 0x0028
|
|
||||||
|
|
||||||
dlabel D_80078164
|
|
||||||
.short 0x0000, 0xFFFE
|
|
||||||
|
|
||||||
dlabel D_80078168
|
|
||||||
.word 0x001D0074, 0x001D0075
|
|
File diff suppressed because one or more lines are too long
@ -1,15 +0,0 @@
|
|||||||
.include "macro.inc"
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
|
|
||||||
dlabel D_802B7A20_E20B30
|
|
||||||
.word 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000333, 0x33300000, 0x00000000, 0x00000000, 0x00033333, 0x33333000, 0x00000000, 0x00000000, 0x00333411, 0x11433300, 0x00000000, 0x00000000, 0x03331111, 0x11113330, 0x00000000, 0x00000000, 0x03311111, 0x11111330, 0x00000000, 0x00000000, 0x33211111, 0x11111233, 0x00000000, 0x00000000, 0x33411111, 0x11111433, 0x00000000, 0x00000000, 0x33111111, 0x11111133, 0x00000000, 0x00000000, 0x33111111, 0x11111133, 0x00000000, 0x00000000, 0x33111111, 0x11111133, 0x00000000, 0x00000000, 0x33411111, 0x11111433, 0x00000000, 0x00000000, 0x33211111, 0x11111233, 0x00000000, 0x00000000, 0x03311111, 0x11111330, 0x00000000, 0x00000000, 0x03321111, 0x11112330, 0x00000000, 0x00000000, 0x00331111, 0x11113300, 0x00000000, 0x00000000, 0x00332111, 0x11123300, 0x00000000, 0x00000000, 0x00033111, 0x11133000, 0x00000000, 0x00000000, 0x00033311, 0x11333000, 0x00000000, 0x00000000, 0x00003321, 0x12330000, 0x00000000, 0x00000000, 0x00000333, 0x33300000, 0x00000000, 0x00000000, 0x00000033, 0x33000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000033, 0x33000000, 0x00000000, 0x00000000, 0x00000333, 0x33300000, 0x00000000, 0x00000000, 0x00003321, 0x12330000, 0x00000000, 0x00000000, 0x00003311, 0x11330000, 0x00000000, 0x00000000, 0x00003311, 0x11330000, 0x00000000, 0x00000000, 0x00003321, 0x12330000, 0x00000000, 0x00000000, 0x00000333, 0x33300000, 0x00000000, 0x00000000, 0x00000033, 0x33000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802B7C20_E20D30
|
|
||||||
.word 0x294AC94B, 0x794B4085, 0xA14B0001, 0x00010001, 0x00010001, 0x00010001, 0x00010001, 0x00010001
|
|
||||||
|
|
||||||
dlabel D_802B7C40_E20D50
|
|
||||||
.word 0xE7000000, 0x00000000, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00200005, 0xD7000002, 0xFFFFFFFF, 0xE3000F00, 0x00000000, 0xE3001001, 0x00008000, 0xE3000C00, 0x00080000, 0xE3001201, 0x00002000, 0xE3001801, 0x000000C0, 0xE3000D01, 0x00000000, 0xE3001402, 0x00000C00, 0xE3001700, 0x00000000, 0xE2001E01, 0x00000000, 0xDF000000, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802B7CB8_E20DC8
|
|
||||||
.word 0x802B7DA0, 0x00000000
|
|
@ -1,18 +0,0 @@
|
|||||||
.include "macro.inc"
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
|
|
||||||
dlabel D_802B7640_E21EB0
|
|
||||||
.word 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000C, 0xCCCCCCCC, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000CCCCC, 0xCCCCCCCC, 0xCCCC0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xCCCCCCCA, 0x9999999A, 0xCCCCCCC0, 0x00000000, 0x00000000, 0x00000000, 0x0000000C, 0xCCCA9999, 0x99999999, 0x999ACCCC, 0xC0000000, 0x00000000, 0x00000000, 0x000000CC, 0xA9999999, 0x99999999, 0x999999AC, 0xCC000000, 0x00000000, 0x00000000, 0x0000CCCA, 0x99999999, 0x99999999, 0x99999999, 0xACCC0000, 0x00000000, 0x00000000, 0x000CCC99, 0x99999999, 0x99999999, 0x99999999, 0x99CCC000, 0x00000000, 0x00000000, 0x00CCB999, 0x99999999, 0x99999999, 0x99999999, 0x999BCC00, 0x00000000, 0x00000000, 0x0CCA9999, 0x99999966, 0x66666999, 0x99999999, 0x9999ACC0, 0x00000000, 0x00000000, 0xCCB99999, 0x99996666, 0x66666666, 0x99999999, 0x99999BCC, 0x00000000, 0x00000000, 0xCC999999, 0x99966643, 0x35556666, 0x66999999, 0x999999CC, 0x00000000, 0x0000000C, 0xC9999999, 0x99666218, 0x23555446, 0x66699999, 0x9999999C, 0xC0000000, 0x000000CC, 0xA9999999, 0x96662811, 0x82354444, 0x46669999, 0x9999999A, 0xCC000000, 0x000000CC, 0x99999999, 0x96633221, 0x22111124, 0x43666999, 0x99999999, 0xCC000000, 0x00000CCA, 0x99999999, 0x66644443, 0x31288118, 0x48366699, 0x99999999, 0xACC00000, 0x00000CC9, 0x99999999, 0x66544444, 0x31811118, 0x24836699, 0x99999999, 0x9CC00000, 0x0000CCB9, 0x99999999, 0x66555553, 0x31811118, 0x22486669, 0x99999999, 0x9BCC0000, 0x0000CCA9, 0x99999999, 0x66555388, 0x31111118, 0x28444669, 0x99999999, 0x9ACC0000, 0x0000CC99, 0x99999999, 0x66538111, 0x31111188, 0x21424666, 0x99999999, 0x99CC0000, 0x0000CC99, 0x99999999, 0x66381111, 0x22888882, 0x21482466, 0x99999999, 0x99CC0000, 0x0000CC99, 0x99999999, 0x66411111, 0x83222222, 0x21411266, 0x99999999, 0x99CC0000, 0x0000CC99, 0x99999999, 0x66611111, 0x23432281, 0x14381866, 0x99999999, 0x99CC0000, 0x0000CCA9, 0x99999999, 0x96681112, 0x24444444, 0x43338866, 0x99999999, 0x9ACC0000, 0x0000CCB9, 0x99999999, 0x96641122, 0x44333454, 0x33333866, 0x99999999, 0x9BCC0000, 0x00000CC9, 0x99999999, 0x96662224, 0x43344455, 0x43333366, 0x99999999, 0x9CC00000, 0x00000CCA, 0x99999999, 0x99665344, 0x33444475, 0x53333566, 0x99999999, 0xACC00000, 0x000000CC, 0x99999999, 0x99666544, 0x34444477, 0x54333669, 0x99999999, 0xCC000000, 0x000000CC, 0xA9999999, 0x99966654, 0x44444477, 0x55437669, 0x9999999A, 0xCC000000, 0x0000000C, 0xC9999999, 0x99996666, 0x54444477, 0x75556699, 0x9999999C, 0xC0000000, 0x00000000, 0xCC999999, 0x99999666, 0x66654477, 0x77666999, 0x999999CC, 0x00000000, 0x00000000, 0xCCB99999, 0x99999996, 0x66666666, 0x66669999, 0x99999BCC, 0x00000000, 0x00000000, 0x0CCA9999, 0x99999999, 0x99666666, 0x66999999, 0x9999ACC0, 0x00000000, 0x00000000, 0x00CCB999, 0x99999999, 0x99999999, 0x99999999, 0x999BCC00, 0x00000000, 0x00000000, 0x000CCC99, 0x99999999, 0x99999999, 0x99999999, 0x99CCC000, 0x00000000, 0x00000000, 0x0000CCCA, 0x99999999, 0x99999999, 0x99999999, 0xACCC0000, 0x00000000, 0x00000000, 0x000000CC, 0xA9999999, 0x99999999, 0x999999AC, 0xCC000000, 0x00000000, 0x00000000, 0x0000000C, 0xCCCA9999, 0x99999999, 0x999ACCCC, 0xC0000000, 0x00000000, 0x00000000, 0x00000000, 0xCCCCCCA9, 0x99999999, 0xACCCCCC0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000CCCCC, 0x9999999C, 0xCCCC0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000CC, 0xC99999CC, 0xC0000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000C, 0xC99999CC, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000C, 0xCA999ACC, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xCC999CC0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xCC999CC0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xCC999CC0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xCCA9ACC0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0CC9CC00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0CC9CC00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0CCACC00, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00CCC000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00CCC000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000C0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802B7C60_E224D0
|
|
||||||
.word 0x0000F6BB, 0xF477E2AD, 0xD921A019, 0x4809700F, 0xF5B9E739, 0xB5AD8421, 0x00010001, 0x00010001
|
|
||||||
|
|
||||||
dlabel D_802B7C80_E224F0
|
|
||||||
.word 0x0000F771, 0xEEA1E559, 0xD48FBC0B, 0x8B05AB8B, 0xF729E739, 0xB5AD8421, 0x00010001, 0x00010001
|
|
||||||
|
|
||||||
dlabel D_802B7CA0_E22510
|
|
||||||
.word 0xE7000000, 0x00000000, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00200005, 0xD7000002, 0xFFFFFFFF, 0xE3000F00, 0x00000000, 0xE3001001, 0x00008000, 0xE3000C00, 0x00080000, 0xE3001201, 0x00002000, 0xE3001801, 0x000000C0, 0xE3000D01, 0x00000000, 0xE3001402, 0x00000C00, 0xE3001700, 0x00000000, 0xE2001E01, 0x00000000, 0xDF000000, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802B7D18_E22588
|
|
||||||
.word 0x802B7D40, 0x00000000
|
|
@ -1,21 +0,0 @@
|
|||||||
.include "macro.inc"
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
|
|
||||||
dlabel D_802B7580_E22B30
|
|
||||||
.word 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000FFFFF, 0xFFFF0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000F, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000FFFF, 0xFFFEDDCC, 0xCDDEFFFF, 0xFFF00000, 0x00000000, 0x00000000, 0x00000000, 0x00FFFFFE, 0xCCCCCCCC, 0xCCCCCCCE, 0xFFFFF000, 0x00000000, 0x00000000, 0x00000000, 0x0FFFECCC, 0xCCCCCCCC, 0xCCCCCCCC, 0xCCEFFF00, 0x00000000, 0x00000000, 0x0000000F, 0xFFECCCCC, 0xCCCCCCCC, 0xCCCCCCCC, 0xCCCCEFFF, 0x00000000, 0x00000000, 0x000000FF, 0xFCCCCCCC, 0xCCCCCCCC, 0xCCCCCCCC, 0xCCCCCCFF, 0xF0000000, 0x00000000, 0x00000FFE, 0xCCCCCCCC, 0xCCCCCCCC, 0xCCCCCCCC, 0xCCCCCCCE, 0xFF000000, 0x00000000, 0x0000FFDC, 0xCCCCCCCC, 0xCCCCCCCC, 0xCCCCCCCC, 0xCCCCCCCC, 0xDFF00000, 0x00000000, 0x000FFECC, 0xCCCCCCCC, 0xCCCCCCCC, 0xCCCCCCCC, 0xCCCCCCCC, 0xCEFF0000, 0x00000000, 0x000FFCCC, 0xCCCCCCCC, 0xCCCCCCCC, 0xCCCCC999, 0x999CCCCC, 0xCCFF0000, 0x00000000, 0x00FFCCCC, 0xCCCCCCCC, 0xCCCCCCCC, 0xCC999999, 0x999CCCCC, 0xCCCFF000, 0x00000000, 0x0FFECCCC, 0xCCCCCCCC, 0xCCCCCCCC, 0x99999932, 0x399CCCCC, 0xCCCEFF00, 0x00000000, 0x0FFCCCCC, 0xCCCCCCCC, 0xCCCCCC99, 0x99931123, 0x799CCCCC, 0xCCCCFF00, 0x00000000, 0xFFECCCCC, 0xCCCCCCCC, 0xCCC99999, 0x93111238, 0x599CCCCC, 0xCCCCEFF0, 0x00000000, 0xFFCCCCCC, 0xCCCCCCCC, 0xC9999941, 0x11113388, 0x99CCCCCC, 0xCCCCCFF0, 0x00000000, 0xFFCCCCCC, 0xCCCCCCCC, 0xC9994111, 0x11133888, 0x99CCCCCC, 0xCCCCCFF0, 0x0000000F, 0xFECCCCCC, 0xCCCCCCCC, 0x99311111, 0x11233887, 0x99CCCCCC, 0xCCCCCEFF, 0x0000000F, 0xFECCCCCC, 0xCCCCCCCC, 0x99211111, 0x11233885, 0x99CCCCCC, 0xCCCCCEFF, 0x0000000F, 0xFCCCCCCC, 0xCCCCCCCC, 0x99211111, 0x11233889, 0x9CCCCCCC, 0xCCCCCCFF, 0x0000000F, 0xFCCCCCCC, 0xCCCCCCCC, 0x94211111, 0x11238889, 0x9CCCCCCC, 0xCCCCCCFF, 0x0000000F, 0xFECCCCCC, 0xCCCCCCC9, 0x92111112, 0x22123879, 0x9CCCCCCC, 0xCCCCCEFF, 0x0000000F, 0xFECCCCCC, 0xCCCCCCC9, 0x92111133, 0x33323359, 0x9CCCCCCC, 0xCCCCCEFF, 0x00000000, 0xFFCCCCCC, 0xCCCCCCC9, 0x92112333, 0x88322399, 0xCCCCCCCC, 0xCCCCCFF0, 0x00000000, 0xFFCCCCCC, 0xCCCCCC99, 0x41113388, 0x88832399, 0xCCCCCCCC, 0xCCCCCFF0, 0x00000000, 0xFFECCCCC, 0xCCCCCC99, 0x21133888, 0x88887599, 0xCCCCCCCC, 0xCCCCEFF0, 0x00000000, 0x0FFCCCCC, 0xCCCCCC99, 0x11338888, 0x8759999C, 0xCCCCCCCC, 0xCCCCFF00, 0x00000000, 0x0FFECCCC, 0xCCCCC999, 0x13388875, 0x999999CC, 0xCCCCCCCC, 0xCCCEFF00, 0x00000000, 0x00FFCCCC, 0xCCCCC994, 0x18885999, 0x999CCCCC, 0xCCCCCCCC, 0xCCCFF000, 0x00000000, 0x000FFCCC, 0xCCCCC992, 0x87999999, 0xCCCCCCCC, 0xCCCCCCCC, 0xCCFF0000, 0x00000000, 0x000FFECC, 0xCCCCC999, 0x99999CCC, 0xCCCCCCCC, 0xCCCCCCCC, 0xCEFF0000, 0x00000000, 0x0000FFDC, 0xCCCCC999, 0x99CCCCCC, 0xCCCCCCCC, 0xCCCCCCCC, 0xDFF00000, 0x00000000, 0x00000FFE, 0xCCCCCCCC, 0xCCCCCCCC, 0xCCCCCCCC, 0xCCCCCCCE, 0xFF000000, 0x00000000, 0x000000FF, 0xFCCCCCCC, 0xCCCCCCCC, 0xCCCCCCCC, 0xCCCCCCFF, 0xF0000000, 0x00000000, 0x0000000F, 0xFFECCCCC, 0xCCCCCCCC, 0xCCCCCCCC, 0xCCCCEFFF, 0x00000000, 0x00000000, 0x00000000, 0x0FFFECCC, 0xCCCCCCCC, 0xCCCCCCCC, 0xCCEFFF00, 0x00000000, 0x00000000, 0x00000000, 0x00FFFFFE, 0xCCCCCCCC, 0xCCCCCCCE, 0xFFFFF000, 0x00000000, 0x00000000, 0x00000000, 0x0000FFFF, 0xFFECCCCC, 0xCCCCEFFF, 0xFFF00000, 0x00000000, 0x00000000, 0x00000000, 0x0000000F, 0xFFFFCCCC, 0xCCCFFFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00FFFCCC, 0xCCFFF000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000FFCCC, 0xCCFF0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000FFECC, 0xCEFF0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000FFCC, 0xCFF00000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000FFCC, 0xCFF00000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000FFEC, 0xEFF00000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000FFEC, 0xEFF00000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000FFC, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000FFC, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000FFE, 0xFF000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000FF, 0xF0000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x000000FF, 0xF0000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x0000000F, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802B7BA0_E23150
|
|
||||||
.word 0x0000FFFF, 0xE7ABDF45, 0xB6814305, 0x12077401, 0xC7032287, 0x00010001, 0xE739B5AD, 0x84210001
|
|
||||||
|
|
||||||
dlabel D_802B7BC0_E23170
|
|
||||||
.word 0x0000FFFF, 0xE7ABDF45, 0xB6814305, 0x12077401, 0xC7032287, 0x00010001, 0xE739B5AD, 0x84210001
|
|
||||||
|
|
||||||
dlabel D_802B7BE0_E23190
|
|
||||||
.word 0x0000FFE7, 0xEF95DE85, 0xB68152C5, 0x12079483, 0xD6C3BDC3, 0xAD8394C5, 0xE739B5AD, 0x84210001
|
|
||||||
|
|
||||||
dlabel D_802B7C00_E231B0
|
|
||||||
.word 0xE7000000, 0x00000000, 0xE3000A01, 0x00000000, 0xD9C0F9FB, 0x00000000, 0xD9FFFFFF, 0x00200005, 0xD7000002, 0xFFFFFFFF, 0xE3000F00, 0x00000000, 0xE3001001, 0x00008000, 0xE3000C00, 0x00080000, 0xE3001201, 0x00002000, 0xE3001801, 0x000000C0, 0xE3000D01, 0x00000000, 0xE3001402, 0x00000C00, 0xE3001700, 0x00000000, 0xE2001E01, 0x00000000, 0xDF000000, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802B7C78_E23228
|
|
||||||
.word 0x802B7CB0, 0x00000000
|
|
File diff suppressed because one or more lines are too long
@ -1,710 +0,0 @@
|
|||||||
.set noat # allow manual use of $at
|
|
||||||
.set noreorder # don't insert nops after branches
|
|
||||||
|
|
||||||
.section .rodata
|
|
||||||
|
|
||||||
dlabel D_80246618_EA6F18
|
|
||||||
.double 380.0
|
|
||||||
|
|
||||||
dlabel D_80246620_EA6F20
|
|
||||||
.double -380.0
|
|
||||||
|
|
||||||
dlabel D_80246628_EA6F28
|
|
||||||
.double 305.0
|
|
||||||
|
|
||||||
dlabel D_80246630_EA6F30
|
|
||||||
.double 375.0
|
|
||||||
|
|
||||||
dlabel D_80246638_EA6F38
|
|
||||||
.double 45.0
|
|
||||||
|
|
||||||
dlabel D_80246640_EA6F40
|
|
||||||
.double 150.0
|
|
||||||
|
|
||||||
.section .text
|
|
||||||
|
|
||||||
glabel func_80240DC4_EA16C4
|
|
||||||
/* EA16C4 80240DC4 27BDFF80 */ addiu $sp, $sp, -0x80
|
|
||||||
/* EA16C8 80240DC8 AFBF0064 */ sw $ra, 0x64($sp)
|
|
||||||
/* EA16CC 80240DCC AFBE0060 */ sw $fp, 0x60($sp)
|
|
||||||
/* EA16D0 80240DD0 AFB7005C */ sw $s7, 0x5c($sp)
|
|
||||||
/* EA16D4 80240DD4 AFB60058 */ sw $s6, 0x58($sp)
|
|
||||||
/* EA16D8 80240DD8 AFB50054 */ sw $s5, 0x54($sp)
|
|
||||||
/* EA16DC 80240DDC AFB40050 */ sw $s4, 0x50($sp)
|
|
||||||
/* EA16E0 80240DE0 AFB3004C */ sw $s3, 0x4c($sp)
|
|
||||||
/* EA16E4 80240DE4 AFB20048 */ sw $s2, 0x48($sp)
|
|
||||||
/* EA16E8 80240DE8 AFB10044 */ sw $s1, 0x44($sp)
|
|
||||||
/* EA16EC 80240DEC AFB00040 */ sw $s0, 0x40($sp)
|
|
||||||
/* EA16F0 80240DF0 F7B80078 */ sdc1 $f24, 0x78($sp)
|
|
||||||
/* EA16F4 80240DF4 F7B60070 */ sdc1 $f22, 0x70($sp)
|
|
||||||
/* EA16F8 80240DF8 F7B40068 */ sdc1 $f20, 0x68($sp)
|
|
||||||
/* EA16FC 80240DFC AFA40080 */ sw $a0, 0x80($sp)
|
|
||||||
/* EA1700 80240E00 8C960148 */ lw $s6, 0x148($a0)
|
|
||||||
/* EA1704 80240E04 00C0902D */ daddu $s2, $a2, $zero
|
|
||||||
/* EA1708 80240E08 86C40008 */ lh $a0, 8($s6)
|
|
||||||
/* EA170C 80240E0C 0C00F92F */ jal dead_get_npc_unsafe
|
|
||||||
/* EA1710 80240E10 0000B82D */ daddu $s7, $zero, $zero
|
|
||||||
/* EA1714 80240E14 0040882D */ daddu $s1, $v0, $zero
|
|
||||||
/* EA1718 80240E18 9622008E */ lhu $v0, 0x8e($s1)
|
|
||||||
/* EA171C 80240E1C 2442FFFF */ addiu $v0, $v0, -1
|
|
||||||
/* EA1720 80240E20 A622008E */ sh $v0, 0x8e($s1)
|
|
||||||
/* EA1724 80240E24 00021400 */ sll $v0, $v0, 0x10
|
|
||||||
/* EA1728 80240E28 8EC30090 */ lw $v1, 0x90($s6)
|
|
||||||
/* EA172C 80240E2C 00021403 */ sra $v0, $v0, 0x10
|
|
||||||
/* EA1730 80240E30 0062182A */ slt $v1, $v1, $v0
|
|
||||||
/* EA1734 80240E34 14600005 */ bnez $v1, .L80240E4C
|
|
||||||
/* EA1738 80240E38 02E0F02D */ daddu $fp, $s7, $zero
|
|
||||||
/* EA173C 80240E3C 8EC20000 */ lw $v0, ($s6)
|
|
||||||
/* EA1740 80240E40 3C031F10 */ lui $v1, 0x1f10
|
|
||||||
/* EA1744 80240E44 00431025 */ or $v0, $v0, $v1
|
|
||||||
/* EA1748 80240E48 AEC20000 */ sw $v0, ($s6)
|
|
||||||
.L80240E4C:
|
|
||||||
/* EA174C 80240E4C 8622008E */ lh $v0, 0x8e($s1)
|
|
||||||
/* EA1750 80240E50 1440025D */ bnez $v0, .L802417C8
|
|
||||||
/* EA1754 80240E54 00000000 */ nop
|
|
||||||
/* EA1758 80240E58 3C028010 */ lui $v0, %hi(dead_gPlayerStatusPtr)
|
|
||||||
/* EA175C 80240E5C 8C42FC90 */ lw $v0, %lo(dead_gPlayerStatusPtr)($v0)
|
|
||||||
/* EA1760 80240E60 0C00AB85 */ jal dead_clamp_angle
|
|
||||||
/* EA1764 80240E64 C44C00A8 */ lwc1 $f12, 0xa8($v0)
|
|
||||||
/* EA1768 80240E68 3C014334 */ lui $at, 0x4334
|
|
||||||
/* EA176C 80240E6C 44811000 */ mtc1 $at, $f2
|
|
||||||
/* EA1770 80240E70 00000000 */ nop
|
|
||||||
/* EA1774 80240E74 4602003C */ c.lt.s $f0, $f2
|
|
||||||
/* EA1778 80240E78 00000000 */ nop
|
|
||||||
/* EA177C 80240E7C 45000011 */ bc1f .L80240EC4
|
|
||||||
/* EA1780 80240E80 00000000 */ nop
|
|
||||||
/* EA1784 80240E84 3C038008 */ lui $v1, %hi(dead_gCurrentCameraID)
|
|
||||||
/* EA1788 80240E88 8C63C760 */ lw $v1, %lo(dead_gCurrentCameraID)($v1)
|
|
||||||
/* EA178C 80240E8C 3C0142B4 */ lui $at, 0x42b4
|
|
||||||
/* EA1790 80240E90 44816000 */ mtc1 $at, $f12
|
|
||||||
/* EA1794 80240E94 00031080 */ sll $v0, $v1, 2
|
|
||||||
/* EA1798 80240E98 00431021 */ addu $v0, $v0, $v1
|
|
||||||
/* EA179C 80240E9C 00021080 */ sll $v0, $v0, 2
|
|
||||||
/* EA17A0 80240EA0 00431023 */ subu $v0, $v0, $v1
|
|
||||||
/* EA17A4 80240EA4 000218C0 */ sll $v1, $v0, 3
|
|
||||||
/* EA17A8 80240EA8 00431021 */ addu $v0, $v0, $v1
|
|
||||||
/* EA17AC 80240EAC 000210C0 */ sll $v0, $v0, 3
|
|
||||||
/* EA17B0 80240EB0 3C01800C */ lui $at, %hi(D_800B8DEC)
|
|
||||||
/* EA17B4 80240EB4 00220821 */ addu $at, $at, $v0
|
|
||||||
/* EA17B8 80240EB8 C4208DEC */ lwc1 $f0, %lo(D_800B8DEC)($at)
|
|
||||||
/* EA17BC 80240EBC 080903C0 */ j .L80240F00
|
|
||||||
/* EA17C0 80240EC0 460C0301 */ sub.s $f12, $f0, $f12
|
|
||||||
.L80240EC4:
|
|
||||||
/* EA17C4 80240EC4 3C038008 */ lui $v1, %hi(dead_gCurrentCameraID)
|
|
||||||
/* EA17C8 80240EC8 8C63C760 */ lw $v1, %lo(dead_gCurrentCameraID)($v1)
|
|
||||||
/* EA17CC 80240ECC 3C0142B4 */ lui $at, 0x42b4
|
|
||||||
/* EA17D0 80240ED0 44816000 */ mtc1 $at, $f12
|
|
||||||
/* EA17D4 80240ED4 00031080 */ sll $v0, $v1, 2
|
|
||||||
/* EA17D8 80240ED8 00431021 */ addu $v0, $v0, $v1
|
|
||||||
/* EA17DC 80240EDC 00021080 */ sll $v0, $v0, 2
|
|
||||||
/* EA17E0 80240EE0 00431023 */ subu $v0, $v0, $v1
|
|
||||||
/* EA17E4 80240EE4 000218C0 */ sll $v1, $v0, 3
|
|
||||||
/* EA17E8 80240EE8 00431021 */ addu $v0, $v0, $v1
|
|
||||||
/* EA17EC 80240EEC 000210C0 */ sll $v0, $v0, 3
|
|
||||||
/* EA17F0 80240EF0 3C01800C */ lui $at, %hi(D_800B8DEC)
|
|
||||||
/* EA17F4 80240EF4 00220821 */ addu $at, $at, $v0
|
|
||||||
/* EA17F8 80240EF8 C4208DEC */ lwc1 $f0, %lo(D_800B8DEC)($at)
|
|
||||||
/* EA17FC 80240EFC 460C0300 */ add.s $f12, $f0, $f12
|
|
||||||
.L80240F00:
|
|
||||||
/* EA1800 80240F00 0C00AB85 */ jal dead_clamp_angle
|
|
||||||
/* EA1804 80240F04 00000000 */ nop
|
|
||||||
/* EA1808 80240F08 46000586 */ mov.s $f22, $f0
|
|
||||||
/* EA180C 80240F0C 3C014334 */ lui $at, 0x4334
|
|
||||||
/* EA1810 80240F10 44816000 */ mtc1 $at, $f12
|
|
||||||
/* EA1814 80240F14 0C00AB85 */ jal dead_clamp_angle
|
|
||||||
/* EA1818 80240F18 460CB300 */ add.s $f12, $f22, $f12
|
|
||||||
/* EA181C 80240F1C 8EC20088 */ lw $v0, 0x88($s6)
|
|
||||||
/* EA1820 80240F20 14400010 */ bnez $v0, .L80240F64
|
|
||||||
/* EA1824 80240F24 46000606 */ mov.s $f24, $f0
|
|
||||||
/* EA1828 80240F28 3C028010 */ lui $v0, %hi(dead_gPlayerStatusPtr)
|
|
||||||
/* EA182C 80240F2C 8C42FC90 */ lw $v0, %lo(dead_gPlayerStatusPtr)($v0)
|
|
||||||
/* EA1830 80240F30 804300B4 */ lb $v1, 0xb4($v0)
|
|
||||||
/* EA1834 80240F34 3C014200 */ lui $at, 0x4200
|
|
||||||
/* EA1838 80240F38 4481A000 */ mtc1 $at, $f20
|
|
||||||
/* EA183C 80240F3C 10600016 */ beqz $v1, .L80240F98
|
|
||||||
/* EA1840 80240F40 24020001 */ addiu $v0, $zero, 1
|
|
||||||
/* EA1844 80240F44 3C0142C8 */ lui $at, 0x42c8
|
|
||||||
/* EA1848 80240F48 4481A000 */ mtc1 $at, $f20
|
|
||||||
/* EA184C 80240F4C 14620013 */ bne $v1, $v0, .L80240F9C
|
|
||||||
/* EA1850 80240F50 26300038 */ addiu $s0, $s1, 0x38
|
|
||||||
/* EA1854 80240F54 3C0142B4 */ lui $at, 0x42b4
|
|
||||||
/* EA1858 80240F58 4481A000 */ mtc1 $at, $f20
|
|
||||||
/* EA185C 80240F5C 080903E8 */ j .L80240FA0
|
|
||||||
/* EA1860 80240F60 0200202D */ daddu $a0, $s0, $zero
|
|
||||||
.L80240F64:
|
|
||||||
/* EA1864 80240F64 3C028010 */ lui $v0, %hi(dead_gPlayerStatusPtr)
|
|
||||||
/* EA1868 80240F68 8C42FC90 */ lw $v0, %lo(dead_gPlayerStatusPtr)($v0)
|
|
||||||
/* EA186C 80240F6C 804300B4 */ lb $v1, 0xb4($v0)
|
|
||||||
/* EA1870 80240F70 3C014218 */ lui $at, 0x4218
|
|
||||||
/* EA1874 80240F74 4481A000 */ mtc1 $at, $f20
|
|
||||||
/* EA1878 80240F78 10600007 */ beqz $v1, .L80240F98
|
|
||||||
/* EA187C 80240F7C 24020001 */ addiu $v0, $zero, 1
|
|
||||||
/* EA1880 80240F80 3C0142B4 */ lui $at, 0x42b4
|
|
||||||
/* EA1884 80240F84 4481A000 */ mtc1 $at, $f20
|
|
||||||
/* EA1888 80240F88 14620004 */ bne $v1, $v0, .L80240F9C
|
|
||||||
/* EA188C 80240F8C 26300038 */ addiu $s0, $s1, 0x38
|
|
||||||
/* EA1890 80240F90 3C014296 */ lui $at, 0x4296
|
|
||||||
/* EA1894 80240F94 4481A000 */ mtc1 $at, $f20
|
|
||||||
.L80240F98:
|
|
||||||
/* EA1898 80240F98 26300038 */ addiu $s0, $s1, 0x38
|
|
||||||
.L80240F9C:
|
|
||||||
/* EA189C 80240F9C 0200202D */ daddu $a0, $s0, $zero
|
|
||||||
.L80240FA0:
|
|
||||||
/* EA18A0 80240FA0 3C158010 */ lui $s5, %hi(dead_gPlayerStatusPtr)
|
|
||||||
/* EA18A4 80240FA4 26B5FC90 */ addiu $s5, $s5, %lo(dead_gPlayerStatusPtr)
|
|
||||||
/* EA18A8 80240FA8 4407C000 */ mfc1 $a3, $f24
|
|
||||||
/* EA18AC 80240FAC 862200A6 */ lh $v0, 0xa6($s1)
|
|
||||||
/* EA18B0 80240FB0 8EA30000 */ lw $v1, ($s5)
|
|
||||||
/* EA18B4 80240FB4 44824000 */ mtc1 $v0, $f8
|
|
||||||
/* EA18B8 80240FB8 00000000 */ nop
|
|
||||||
/* EA18BC 80240FBC 46804220 */ cvt.s.w $f8, $f8
|
|
||||||
/* EA18C0 80240FC0 C4600028 */ lwc1 $f0, 0x28($v1)
|
|
||||||
/* EA18C4 80240FC4 44064000 */ mfc1 $a2, $f8
|
|
||||||
/* EA18C8 80240FC8 26330040 */ addiu $s3, $s1, 0x40
|
|
||||||
/* EA18CC 80240FCC E6200038 */ swc1 $f0, 0x38($s1)
|
|
||||||
/* EA18D0 80240FD0 C4600030 */ lwc1 $f0, 0x30($v1)
|
|
||||||
/* EA18D4 80240FD4 0260282D */ daddu $a1, $s3, $zero
|
|
||||||
/* EA18D8 80240FD8 0C00ACA3 */ jal dead_add_vec2D_polar
|
|
||||||
/* EA18DC 80240FDC E6200040 */ swc1 $f0, 0x40($s1)
|
|
||||||
/* EA18E0 80240FE0 862200A6 */ lh $v0, 0xa6($s1)
|
|
||||||
/* EA18E4 80240FE4 44820000 */ mtc1 $v0, $f0
|
|
||||||
/* EA18E8 80240FE8 00000000 */ nop
|
|
||||||
/* EA18EC 80240FEC 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* EA18F0 80240FF0 4600A000 */ add.s $f0, $f20, $f0
|
|
||||||
/* EA18F4 80240FF4 4406B000 */ mfc1 $a2, $f22
|
|
||||||
/* EA18F8 80240FF8 44050000 */ mfc1 $a1, $f0
|
|
||||||
/* EA18FC 80240FFC 0C00F909 */ jal dead_npc_move_heading
|
|
||||||
/* EA1900 80241000 0220202D */ daddu $a0, $s1, $zero
|
|
||||||
/* EA1904 80241004 8EC20088 */ lw $v0, 0x88($s6)
|
|
||||||
/* EA1908 80241008 1440005D */ bnez $v0, .L80241180
|
|
||||||
/* EA190C 8024100C 00000000 */ nop
|
|
||||||
/* EA1910 80241010 C6200038 */ lwc1 $f0, 0x38($s1)
|
|
||||||
/* EA1914 80241014 3C018024 */ lui $at, %hi(D_80246618_EA6F18)
|
|
||||||
/* EA1918 80241018 D4246618 */ ldc1 $f4, %lo(D_80246618_EA6F18)($at)
|
|
||||||
/* EA191C 8024101C 46000021 */ cvt.d.s $f0, $f0
|
|
||||||
/* EA1920 80241020 4620203C */ c.lt.d $f4, $f0
|
|
||||||
/* EA1924 80241024 00000000 */ nop
|
|
||||||
/* EA1928 80241028 45000005 */ bc1f .L80241040
|
|
||||||
/* EA192C 8024102C 00000000 */ nop
|
|
||||||
/* EA1930 80241030 3C0143BE */ lui $at, 0x43be
|
|
||||||
/* EA1934 80241034 44810000 */ mtc1 $at, $f0
|
|
||||||
/* EA1938 80241038 00000000 */ nop
|
|
||||||
/* EA193C 8024103C E6200038 */ swc1 $f0, 0x38($s1)
|
|
||||||
.L80241040:
|
|
||||||
/* EA1940 80241040 C6200038 */ lwc1 $f0, 0x38($s1)
|
|
||||||
/* EA1944 80241044 3C018024 */ lui $at, %hi(D_80246620_EA6F20)
|
|
||||||
/* EA1948 80241048 D4226620 */ ldc1 $f2, %lo(D_80246620_EA6F20)($at)
|
|
||||||
/* EA194C 8024104C 46000021 */ cvt.d.s $f0, $f0
|
|
||||||
/* EA1950 80241050 4622003C */ c.lt.d $f0, $f2
|
|
||||||
/* EA1954 80241054 00000000 */ nop
|
|
||||||
/* EA1958 80241058 45000005 */ bc1f .L80241070
|
|
||||||
/* EA195C 8024105C 00000000 */ nop
|
|
||||||
/* EA1960 80241060 3C01C3BE */ lui $at, 0xc3be
|
|
||||||
/* EA1964 80241064 44810000 */ mtc1 $at, $f0
|
|
||||||
/* EA1968 80241068 00000000 */ nop
|
|
||||||
/* EA196C 8024106C E6200038 */ swc1 $f0, 0x38($s1)
|
|
||||||
.L80241070:
|
|
||||||
/* EA1970 80241070 C6200040 */ lwc1 $f0, 0x40($s1)
|
|
||||||
/* EA1974 80241074 46000021 */ cvt.d.s $f0, $f0
|
|
||||||
/* EA1978 80241078 4620203C */ c.lt.d $f4, $f0
|
|
||||||
/* EA197C 8024107C 00000000 */ nop
|
|
||||||
/* EA1980 80241080 45000005 */ bc1f .L80241098
|
|
||||||
/* EA1984 80241084 00000000 */ nop
|
|
||||||
/* EA1988 80241088 3C0143BE */ lui $at, 0x43be
|
|
||||||
/* EA198C 8024108C 44810000 */ mtc1 $at, $f0
|
|
||||||
/* EA1990 80241090 00000000 */ nop
|
|
||||||
/* EA1994 80241094 E6200040 */ swc1 $f0, 0x40($s1)
|
|
||||||
.L80241098:
|
|
||||||
/* EA1998 80241098 C6200040 */ lwc1 $f0, 0x40($s1)
|
|
||||||
/* EA199C 8024109C 46000021 */ cvt.d.s $f0, $f0
|
|
||||||
/* EA19A0 802410A0 4622003C */ c.lt.d $f0, $f2
|
|
||||||
/* EA19A4 802410A4 00000000 */ nop
|
|
||||||
/* EA19A8 802410A8 45000005 */ bc1f .L802410C0
|
|
||||||
/* EA19AC 802410AC 00000000 */ nop
|
|
||||||
/* EA19B0 802410B0 3C01C3BE */ lui $at, 0xc3be
|
|
||||||
/* EA19B4 802410B4 44810000 */ mtc1 $at, $f0
|
|
||||||
/* EA19B8 802410B8 00000000 */ nop
|
|
||||||
/* EA19BC 802410BC E6200040 */ swc1 $f0, 0x40($s1)
|
|
||||||
.L802410C0:
|
|
||||||
/* EA19C0 802410C0 C6220038 */ lwc1 $f2, 0x38($s1)
|
|
||||||
/* EA19C4 802410C4 46021082 */ mul.s $f2, $f2, $f2
|
|
||||||
/* EA19C8 802410C8 00000000 */ nop
|
|
||||||
/* EA19CC 802410CC C6200040 */ lwc1 $f0, 0x40($s1)
|
|
||||||
/* EA19D0 802410D0 46000002 */ mul.s $f0, $f0, $f0
|
|
||||||
/* EA19D4 802410D4 00000000 */ nop
|
|
||||||
/* EA19D8 802410D8 46001300 */ add.s $f12, $f2, $f0
|
|
||||||
/* EA19DC 802410DC 46006004 */ sqrt.s $f0, $f12
|
|
||||||
/* EA19E0 802410E0 46000032 */ c.eq.s $f0, $f0
|
|
||||||
/* EA19E4 802410E4 00000000 */ nop
|
|
||||||
/* EA19E8 802410E8 45010003 */ bc1t .L802410F8
|
|
||||||
/* EA19EC 802410EC 00000000 */ nop
|
|
||||||
/* EA19F0 802410F0 0C019C10 */ jal dead_sqrtf
|
|
||||||
/* EA19F4 802410F4 00000000 */ nop
|
|
||||||
.L802410F8:
|
|
||||||
/* EA19F8 802410F8 8E260038 */ lw $a2, 0x38($s1)
|
|
||||||
/* EA19FC 802410FC 8E270040 */ lw $a3, 0x40($s1)
|
|
||||||
/* EA1A00 80241100 4480A000 */ mtc1 $zero, $f20
|
|
||||||
/* EA1A04 80241104 E7A00038 */ swc1 $f0, 0x38($sp)
|
|
||||||
/* EA1A08 80241108 4600A306 */ mov.s $f12, $f20
|
|
||||||
/* EA1A0C 8024110C 0C00ABDC */ jal fio_validate_header_checksums
|
|
||||||
/* EA1A10 80241110 4600A386 */ mov.s $f14, $f20
|
|
||||||
/* EA1A14 80241114 46000586 */ mov.s $f22, $f0
|
|
||||||
/* EA1A18 80241118 C7A20038 */ lwc1 $f2, 0x38($sp)
|
|
||||||
/* EA1A1C 8024111C 3C018024 */ lui $at, %hi(D_80246628_EA6F28)
|
|
||||||
/* EA1A20 80241120 D4206628 */ ldc1 $f0, %lo(D_80246628_EA6F28)($at)
|
|
||||||
/* EA1A24 80241124 460010A1 */ cvt.d.s $f2, $f2
|
|
||||||
/* EA1A28 80241128 4620103C */ c.lt.d $f2, $f0
|
|
||||||
/* EA1A2C 8024112C 00000000 */ nop
|
|
||||||
/* EA1A30 80241130 45000004 */ bc1f .L80241144
|
|
||||||
/* EA1A34 80241134 0200202D */ daddu $a0, $s0, $zero
|
|
||||||
/* EA1A38 80241138 3C064398 */ lui $a2, 0x4398
|
|
||||||
/* EA1A3C 8024113C 08090459 */ j .L80241164
|
|
||||||
/* EA1A40 80241140 34C68000 */ ori $a2, $a2, 0x8000
|
|
||||||
.L80241144:
|
|
||||||
/* EA1A44 80241144 3C018024 */ lui $at, %hi(D_80246630_EA6F30)
|
|
||||||
/* EA1A48 80241148 D4206630 */ ldc1 $f0, %lo(D_80246630_EA6F30)($at)
|
|
||||||
/* EA1A4C 8024114C 4622003C */ c.lt.d $f0, $f2
|
|
||||||
/* EA1A50 80241150 00000000 */ nop
|
|
||||||
/* EA1A54 80241154 450000FA */ bc1f .L80241540
|
|
||||||
/* EA1A58 80241158 00000000 */ nop
|
|
||||||
/* EA1A5C 8024115C 3C0643BB */ lui $a2, 0x43bb
|
|
||||||
/* EA1A60 80241160 34C68000 */ ori $a2, $a2, 0x8000
|
|
||||||
.L80241164:
|
|
||||||
/* EA1A64 80241164 4407B000 */ mfc1 $a3, $f22
|
|
||||||
/* EA1A68 80241168 0260282D */ daddu $a1, $s3, $zero
|
|
||||||
/* EA1A6C 8024116C E6340038 */ swc1 $f20, 0x38($s1)
|
|
||||||
/* EA1A70 80241170 0C00ACA3 */ jal dead_add_vec2D_polar
|
|
||||||
/* EA1A74 80241174 E6340040 */ swc1 $f20, 0x40($s1)
|
|
||||||
/* EA1A78 80241178 08090550 */ j .L80241540
|
|
||||||
/* EA1A7C 8024117C 00000000 */ nop
|
|
||||||
.L80241180:
|
|
||||||
/* EA1A80 80241180 8E220000 */ lw $v0, ($s1)
|
|
||||||
/* EA1A84 80241184 30420040 */ andi $v0, $v0, 0x40
|
|
||||||
/* EA1A88 80241188 144000B0 */ bnez $v0, .L8024144C
|
|
||||||
/* EA1A8C 8024118C 27A50020 */ addiu $a1, $sp, 0x20
|
|
||||||
/* EA1A90 80241190 27B40020 */ addiu $s4, $sp, 0x20
|
|
||||||
/* EA1A94 80241194 0280282D */ daddu $a1, $s4, $zero
|
|
||||||
/* EA1A98 80241198 27B30024 */ addiu $s3, $sp, 0x24
|
|
||||||
/* EA1A9C 8024119C 8EA20000 */ lw $v0, ($s5)
|
|
||||||
/* EA1AA0 802411A0 3C014032 */ lui $at, 0x4032
|
|
||||||
/* EA1AA4 802411A4 44811800 */ mtc1 $at, $f3
|
|
||||||
/* EA1AA8 802411A8 44801000 */ mtc1 $zero, $f2
|
|
||||||
/* EA1AAC 802411AC C440002C */ lwc1 $f0, 0x2c($v0)
|
|
||||||
/* EA1AB0 802411B0 C4460028 */ lwc1 $f6, 0x28($v0)
|
|
||||||
/* EA1AB4 802411B4 C4440030 */ lwc1 $f4, 0x30($v0)
|
|
||||||
/* EA1AB8 802411B8 46000021 */ cvt.d.s $f0, $f0
|
|
||||||
/* EA1ABC 802411BC 46220000 */ add.d $f0, $f0, $f2
|
|
||||||
/* EA1AC0 802411C0 E7A60020 */ swc1 $f6, 0x20($sp)
|
|
||||||
/* EA1AC4 802411C4 E7A40028 */ swc1 $f4, 0x28($sp)
|
|
||||||
/* EA1AC8 802411C8 46200020 */ cvt.s.d $f0, $f0
|
|
||||||
/* EA1ACC 802411CC E7A00024 */ swc1 $f0, 0x24($sp)
|
|
||||||
/* EA1AD0 802411D0 E7B40010 */ swc1 $f20, 0x10($sp)
|
|
||||||
/* EA1AD4 802411D4 E7B60014 */ swc1 $f22, 0x14($sp)
|
|
||||||
/* EA1AD8 802411D8 862200A8 */ lh $v0, 0xa8($s1)
|
|
||||||
/* EA1ADC 802411DC 0260302D */ daddu $a2, $s3, $zero
|
|
||||||
/* EA1AE0 802411E0 44820000 */ mtc1 $v0, $f0
|
|
||||||
/* EA1AE4 802411E4 00000000 */ nop
|
|
||||||
/* EA1AE8 802411E8 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* EA1AEC 802411EC E7A00018 */ swc1 $f0, 0x18($sp)
|
|
||||||
/* EA1AF0 802411F0 862200A6 */ lh $v0, 0xa6($s1)
|
|
||||||
/* EA1AF4 802411F4 27B00028 */ addiu $s0, $sp, 0x28
|
|
||||||
/* EA1AF8 802411F8 44820000 */ mtc1 $v0, $f0
|
|
||||||
/* EA1AFC 802411FC 00000000 */ nop
|
|
||||||
/* EA1B00 80241200 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* EA1B04 80241204 E7A0001C */ swc1 $f0, 0x1c($sp)
|
|
||||||
/* EA1B08 80241208 8E240080 */ lw $a0, 0x80($s1)
|
|
||||||
/* EA1B0C 8024120C 0C0394C1 */ jal dead_npc_test_move_simple_with_slipping
|
|
||||||
/* EA1B10 80241210 0200382D */ daddu $a3, $s0, $zero
|
|
||||||
/* EA1B14 80241214 104000CA */ beqz $v0, .L80241540
|
|
||||||
/* EA1B18 80241218 0280282D */ daddu $a1, $s4, $zero
|
|
||||||
/* EA1B1C 8024121C 8EA20000 */ lw $v0, ($s5)
|
|
||||||
/* EA1B20 80241220 3C018024 */ lui $at, %hi(D_80246638_EA6F38)
|
|
||||||
/* EA1B24 80241224 D4226638 */ ldc1 $f2, %lo(D_80246638_EA6F38)($at)
|
|
||||||
/* EA1B28 80241228 C440002C */ lwc1 $f0, 0x2c($v0)
|
|
||||||
/* EA1B2C 8024122C C4460028 */ lwc1 $f6, 0x28($v0)
|
|
||||||
/* EA1B30 80241230 C4440030 */ lwc1 $f4, 0x30($v0)
|
|
||||||
/* EA1B34 80241234 46000021 */ cvt.d.s $f0, $f0
|
|
||||||
/* EA1B38 80241238 46220000 */ add.d $f0, $f0, $f2
|
|
||||||
/* EA1B3C 8024123C E7A60020 */ swc1 $f6, 0x20($sp)
|
|
||||||
/* EA1B40 80241240 E7A40028 */ swc1 $f4, 0x28($sp)
|
|
||||||
/* EA1B44 80241244 46200020 */ cvt.s.d $f0, $f0
|
|
||||||
/* EA1B48 80241248 E7A00024 */ swc1 $f0, 0x24($sp)
|
|
||||||
/* EA1B4C 8024124C E7B40010 */ swc1 $f20, 0x10($sp)
|
|
||||||
/* EA1B50 80241250 E7B60014 */ swc1 $f22, 0x14($sp)
|
|
||||||
/* EA1B54 80241254 862200A8 */ lh $v0, 0xa8($s1)
|
|
||||||
/* EA1B58 80241258 44820000 */ mtc1 $v0, $f0
|
|
||||||
/* EA1B5C 8024125C 00000000 */ nop
|
|
||||||
/* EA1B60 80241260 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* EA1B64 80241264 E7A00018 */ swc1 $f0, 0x18($sp)
|
|
||||||
/* EA1B68 80241268 862200A6 */ lh $v0, 0xa6($s1)
|
|
||||||
/* EA1B6C 8024126C 0260302D */ daddu $a2, $s3, $zero
|
|
||||||
/* EA1B70 80241270 44820000 */ mtc1 $v0, $f0
|
|
||||||
/* EA1B74 80241274 00000000 */ nop
|
|
||||||
/* EA1B78 80241278 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* EA1B7C 8024127C E7A0001C */ swc1 $f0, 0x1c($sp)
|
|
||||||
/* EA1B80 80241280 8E240080 */ lw $a0, 0x80($s1)
|
|
||||||
/* EA1B84 80241284 0C0394C1 */ jal dead_npc_test_move_simple_with_slipping
|
|
||||||
/* EA1B88 80241288 0200382D */ daddu $a3, $s0, $zero
|
|
||||||
/* EA1B8C 8024128C 27A5002C */ addiu $a1, $sp, 0x2c
|
|
||||||
/* EA1B90 80241290 27A60030 */ addiu $a2, $sp, 0x30
|
|
||||||
/* EA1B94 80241294 27A70034 */ addiu $a3, $sp, 0x34
|
|
||||||
/* EA1B98 80241298 27A30038 */ addiu $v1, $sp, 0x38
|
|
||||||
/* EA1B9C 8024129C C6220038 */ lwc1 $f2, 0x38($s1)
|
|
||||||
/* EA1BA0 802412A0 C620003C */ lwc1 $f0, 0x3c($s1)
|
|
||||||
/* EA1BA4 802412A4 3C014348 */ lui $at, 0x4348
|
|
||||||
/* EA1BA8 802412A8 44813000 */ mtc1 $at, $f6
|
|
||||||
/* EA1BAC 802412AC 46000021 */ cvt.d.s $f0, $f0
|
|
||||||
/* EA1BB0 802412B0 E7A2002C */ swc1 $f2, 0x2c($sp)
|
|
||||||
/* EA1BB4 802412B4 3C014059 */ lui $at, 0x4059
|
|
||||||
/* EA1BB8 802412B8 44811800 */ mtc1 $at, $f3
|
|
||||||
/* EA1BBC 802412BC 44801000 */ mtc1 $zero, $f2
|
|
||||||
/* EA1BC0 802412C0 C6240040 */ lwc1 $f4, 0x40($s1)
|
|
||||||
/* EA1BC4 802412C4 46220000 */ add.d $f0, $f0, $f2
|
|
||||||
/* EA1BC8 802412C8 E7A60038 */ swc1 $f6, 0x38($sp)
|
|
||||||
/* EA1BCC 802412CC E7A40034 */ swc1 $f4, 0x34($sp)
|
|
||||||
/* EA1BD0 802412D0 46200020 */ cvt.s.d $f0, $f0
|
|
||||||
/* EA1BD4 802412D4 E7A00030 */ swc1 $f0, 0x30($sp)
|
|
||||||
/* EA1BD8 802412D8 AFA30010 */ sw $v1, 0x10($sp)
|
|
||||||
/* EA1BDC 802412DC 8E240080 */ lw $a0, 0x80($s1)
|
|
||||||
/* EA1BE0 802412E0 0C03908F */ jal dead_npc_raycast_down_sides
|
|
||||||
/* EA1BE4 802412E4 0040802D */ daddu $s0, $v0, $zero
|
|
||||||
/* EA1BE8 802412E8 1600001C */ bnez $s0, .L8024135C
|
|
||||||
/* EA1BEC 802412EC 00000000 */ nop
|
|
||||||
/* EA1BF0 802412F0 1040001A */ beqz $v0, .L8024135C
|
|
||||||
/* EA1BF4 802412F4 00000000 */ nop
|
|
||||||
/* EA1BF8 802412F8 C7A20038 */ lwc1 $f2, 0x38($sp)
|
|
||||||
/* EA1BFC 802412FC 3C014054 */ lui $at, 0x4054
|
|
||||||
/* EA1C00 80241300 44810800 */ mtc1 $at, $f1
|
|
||||||
/* EA1C04 80241304 44800000 */ mtc1 $zero, $f0
|
|
||||||
/* EA1C08 80241308 460010A1 */ cvt.d.s $f2, $f2
|
|
||||||
/* EA1C0C 8024130C 4622003C */ c.lt.d $f0, $f2
|
|
||||||
/* EA1C10 80241310 00000000 */ nop
|
|
||||||
/* EA1C14 80241314 45000011 */ bc1f .L8024135C
|
|
||||||
/* EA1C18 80241318 00000000 */ nop
|
|
||||||
/* EA1C1C 8024131C 3C01405E */ lui $at, 0x405e
|
|
||||||
/* EA1C20 80241320 44810800 */ mtc1 $at, $f1
|
|
||||||
/* EA1C24 80241324 44800000 */ mtc1 $zero, $f0
|
|
||||||
/* EA1C28 80241328 00000000 */ nop
|
|
||||||
/* EA1C2C 8024132C 4620103C */ c.lt.d $f2, $f0
|
|
||||||
/* EA1C30 80241330 00000000 */ nop
|
|
||||||
/* EA1C34 80241334 45000009 */ bc1f .L8024135C
|
|
||||||
/* EA1C38 80241338 00000000 */ nop
|
|
||||||
/* EA1C3C 8024133C C622003C */ lwc1 $f2, 0x3c($s1)
|
|
||||||
/* EA1C40 80241340 C7A00030 */ lwc1 $f0, 0x30($sp)
|
|
||||||
/* EA1C44 80241344 46001032 */ c.eq.s $f2, $f0
|
|
||||||
/* EA1C48 80241348 00000000 */ nop
|
|
||||||
/* EA1C4C 8024134C 45010003 */ bc1t .L8024135C
|
|
||||||
/* EA1C50 80241350 00000000 */ nop
|
|
||||||
/* EA1C54 80241354 08090550 */ j .L80241540
|
|
||||||
/* EA1C58 80241358 241E0001 */ addiu $fp, $zero, 1
|
|
||||||
.L8024135C:
|
|
||||||
/* EA1C5C 8024135C 3C108010 */ lui $s0, %hi(dead_gPlayerStatusPtr)
|
|
||||||
/* EA1C60 80241360 2610FC90 */ addiu $s0, $s0, %lo(dead_gPlayerStatusPtr)
|
|
||||||
/* EA1C64 80241364 8E020000 */ lw $v0, ($s0)
|
|
||||||
/* EA1C68 80241368 3C014024 */ lui $at, 0x4024
|
|
||||||
/* EA1C6C 8024136C 44811800 */ mtc1 $at, $f3
|
|
||||||
/* EA1C70 80241370 44801000 */ mtc1 $zero, $f2
|
|
||||||
/* EA1C74 80241374 C440002C */ lwc1 $f0, 0x2c($v0)
|
|
||||||
/* EA1C78 80241378 C4460028 */ lwc1 $f6, 0x28($v0)
|
|
||||||
/* EA1C7C 8024137C C4440030 */ lwc1 $f4, 0x30($v0)
|
|
||||||
/* EA1C80 80241380 46000021 */ cvt.d.s $f0, $f0
|
|
||||||
/* EA1C84 80241384 46220000 */ add.d $f0, $f0, $f2
|
|
||||||
/* EA1C88 80241388 E7A60020 */ swc1 $f6, 0x20($sp)
|
|
||||||
/* EA1C8C 8024138C E7A40028 */ swc1 $f4, 0x28($sp)
|
|
||||||
/* EA1C90 80241390 46200020 */ cvt.s.d $f0, $f0
|
|
||||||
/* EA1C94 80241394 E7A00024 */ swc1 $f0, 0x24($sp)
|
|
||||||
/* EA1C98 80241398 E7B40010 */ swc1 $f20, 0x10($sp)
|
|
||||||
/* EA1C9C 8024139C E7B60014 */ swc1 $f22, 0x14($sp)
|
|
||||||
/* EA1CA0 802413A0 862200A8 */ lh $v0, 0xa8($s1)
|
|
||||||
/* EA1CA4 802413A4 27A50020 */ addiu $a1, $sp, 0x20
|
|
||||||
/* EA1CA8 802413A8 44820000 */ mtc1 $v0, $f0
|
|
||||||
/* EA1CAC 802413AC 00000000 */ nop
|
|
||||||
/* EA1CB0 802413B0 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* EA1CB4 802413B4 E7A00018 */ swc1 $f0, 0x18($sp)
|
|
||||||
/* EA1CB8 802413B8 862200A6 */ lh $v0, 0xa6($s1)
|
|
||||||
/* EA1CBC 802413BC 27A60024 */ addiu $a2, $sp, 0x24
|
|
||||||
/* EA1CC0 802413C0 44820000 */ mtc1 $v0, $f0
|
|
||||||
/* EA1CC4 802413C4 00000000 */ nop
|
|
||||||
/* EA1CC8 802413C8 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* EA1CCC 802413CC E7A0001C */ swc1 $f0, 0x1c($sp)
|
|
||||||
/* EA1CD0 802413D0 8E240080 */ lw $a0, 0x80($s1)
|
|
||||||
/* EA1CD4 802413D4 0C0394C1 */ jal dead_npc_test_move_simple_with_slipping
|
|
||||||
/* EA1CD8 802413D8 27A70028 */ addiu $a3, $sp, 0x28
|
|
||||||
/* EA1CDC 802413DC 8FA60020 */ lw $a2, 0x20($sp)
|
|
||||||
/* EA1CE0 802413E0 8E020000 */ lw $v0, ($s0)
|
|
||||||
/* EA1CE4 802413E4 8FA70028 */ lw $a3, 0x28($sp)
|
|
||||||
/* EA1CE8 802413E8 C44C0028 */ lwc1 $f12, 0x28($v0)
|
|
||||||
/* EA1CEC 802413EC C44E0030 */ lwc1 $f14, 0x30($v0)
|
|
||||||
/* EA1CF0 802413F0 0C00AC71 */ jal dead_dist2D
|
|
||||||
/* EA1CF4 802413F4 24170001 */ addiu $s7, $zero, 1
|
|
||||||
/* EA1CF8 802413F8 46000506 */ mov.s $f20, $f0
|
|
||||||
/* EA1CFC 802413FC 8E030000 */ lw $v1, ($s0)
|
|
||||||
/* EA1D00 80241400 862200A6 */ lh $v0, 0xa6($s1)
|
|
||||||
/* EA1D04 80241404 4407C000 */ mfc1 $a3, $f24
|
|
||||||
/* EA1D08 80241408 44824000 */ mtc1 $v0, $f8
|
|
||||||
/* EA1D0C 8024140C 00000000 */ nop
|
|
||||||
/* EA1D10 80241410 46804220 */ cvt.s.w $f8, $f8
|
|
||||||
/* EA1D14 80241414 C4600028 */ lwc1 $f0, 0x28($v1)
|
|
||||||
/* EA1D18 80241418 44064000 */ mfc1 $a2, $f8
|
|
||||||
/* EA1D1C 8024141C 26240038 */ addiu $a0, $s1, 0x38
|
|
||||||
/* EA1D20 80241420 E6200038 */ swc1 $f0, 0x38($s1)
|
|
||||||
/* EA1D24 80241424 C4600030 */ lwc1 $f0, 0x30($v1)
|
|
||||||
/* EA1D28 80241428 26250040 */ addiu $a1, $s1, 0x40
|
|
||||||
/* EA1D2C 8024142C 0C00ACA3 */ jal dead_add_vec2D_polar
|
|
||||||
/* EA1D30 80241430 E6200040 */ swc1 $f0, 0x40($s1)
|
|
||||||
/* EA1D34 80241434 862200A6 */ lh $v0, 0xa6($s1)
|
|
||||||
/* EA1D38 80241438 44820000 */ mtc1 $v0, $f0
|
|
||||||
/* EA1D3C 8024143C 00000000 */ nop
|
|
||||||
/* EA1D40 80241440 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* EA1D44 80241444 0809054C */ j .L80241530
|
|
||||||
/* EA1D48 80241448 4600A500 */ add.s $f20, $f20, $f0
|
|
||||||
.L8024144C:
|
|
||||||
/* EA1D4C 8024144C 8EA20000 */ lw $v0, ($s5)
|
|
||||||
/* EA1D50 80241450 3C014032 */ lui $at, 0x4032
|
|
||||||
/* EA1D54 80241454 44811800 */ mtc1 $at, $f3
|
|
||||||
/* EA1D58 80241458 44801000 */ mtc1 $zero, $f2
|
|
||||||
/* EA1D5C 8024145C C440002C */ lwc1 $f0, 0x2c($v0)
|
|
||||||
/* EA1D60 80241460 C4460028 */ lwc1 $f6, 0x28($v0)
|
|
||||||
/* EA1D64 80241464 C4440030 */ lwc1 $f4, 0x30($v0)
|
|
||||||
/* EA1D68 80241468 46000021 */ cvt.d.s $f0, $f0
|
|
||||||
/* EA1D6C 8024146C 46220000 */ add.d $f0, $f0, $f2
|
|
||||||
/* EA1D70 80241470 E7A60020 */ swc1 $f6, 0x20($sp)
|
|
||||||
/* EA1D74 80241474 E7A40028 */ swc1 $f4, 0x28($sp)
|
|
||||||
/* EA1D78 80241478 46200020 */ cvt.s.d $f0, $f0
|
|
||||||
/* EA1D7C 8024147C E7A00024 */ swc1 $f0, 0x24($sp)
|
|
||||||
/* EA1D80 80241480 E7B40010 */ swc1 $f20, 0x10($sp)
|
|
||||||
/* EA1D84 80241484 E7B60014 */ swc1 $f22, 0x14($sp)
|
|
||||||
/* EA1D88 80241488 862200A8 */ lh $v0, 0xa8($s1)
|
|
||||||
/* EA1D8C 8024148C 44820000 */ mtc1 $v0, $f0
|
|
||||||
/* EA1D90 80241490 00000000 */ nop
|
|
||||||
/* EA1D94 80241494 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* EA1D98 80241498 E7A00018 */ swc1 $f0, 0x18($sp)
|
|
||||||
/* EA1D9C 8024149C 862200A6 */ lh $v0, 0xa6($s1)
|
|
||||||
/* EA1DA0 802414A0 27A60024 */ addiu $a2, $sp, 0x24
|
|
||||||
/* EA1DA4 802414A4 44820000 */ mtc1 $v0, $f0
|
|
||||||
/* EA1DA8 802414A8 00000000 */ nop
|
|
||||||
/* EA1DAC 802414AC 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* EA1DB0 802414B0 E7A0001C */ swc1 $f0, 0x1c($sp)
|
|
||||||
/* EA1DB4 802414B4 8E240080 */ lw $a0, 0x80($s1)
|
|
||||||
/* EA1DB8 802414B8 0C0394C1 */ jal dead_npc_test_move_simple_with_slipping
|
|
||||||
/* EA1DBC 802414BC 27A70028 */ addiu $a3, $sp, 0x28
|
|
||||||
/* EA1DC0 802414C0 1040001F */ beqz $v0, .L80241540
|
|
||||||
/* EA1DC4 802414C4 00000000 */ nop
|
|
||||||
/* EA1DC8 802414C8 8FA60020 */ lw $a2, 0x20($sp)
|
|
||||||
/* EA1DCC 802414CC 8EA20000 */ lw $v0, ($s5)
|
|
||||||
/* EA1DD0 802414D0 8FA70028 */ lw $a3, 0x28($sp)
|
|
||||||
/* EA1DD4 802414D4 C44C0028 */ lwc1 $f12, 0x28($v0)
|
|
||||||
/* EA1DD8 802414D8 0C00AC71 */ jal dead_dist2D
|
|
||||||
/* EA1DDC 802414DC C44E0030 */ lwc1 $f14, 0x30($v0)
|
|
||||||
/* EA1DE0 802414E0 46000506 */ mov.s $f20, $f0
|
|
||||||
/* EA1DE4 802414E4 8EA30000 */ lw $v1, ($s5)
|
|
||||||
/* EA1DE8 802414E8 862200A6 */ lh $v0, 0xa6($s1)
|
|
||||||
/* EA1DEC 802414EC 4407C000 */ mfc1 $a3, $f24
|
|
||||||
/* EA1DF0 802414F0 44824000 */ mtc1 $v0, $f8
|
|
||||||
/* EA1DF4 802414F4 00000000 */ nop
|
|
||||||
/* EA1DF8 802414F8 46804220 */ cvt.s.w $f8, $f8
|
|
||||||
/* EA1DFC 802414FC C4600028 */ lwc1 $f0, 0x28($v1)
|
|
||||||
/* EA1E00 80241500 44064000 */ mfc1 $a2, $f8
|
|
||||||
/* EA1E04 80241504 0200202D */ daddu $a0, $s0, $zero
|
|
||||||
/* EA1E08 80241508 E6200038 */ swc1 $f0, 0x38($s1)
|
|
||||||
/* EA1E0C 8024150C C4600030 */ lwc1 $f0, 0x30($v1)
|
|
||||||
/* EA1E10 80241510 0260282D */ daddu $a1, $s3, $zero
|
|
||||||
/* EA1E14 80241514 0C00ACA3 */ jal dead_add_vec2D_polar
|
|
||||||
/* EA1E18 80241518 E6200040 */ swc1 $f0, 0x40($s1)
|
|
||||||
/* EA1E1C 8024151C 862200A6 */ lh $v0, 0xa6($s1)
|
|
||||||
/* EA1E20 80241520 44820000 */ mtc1 $v0, $f0
|
|
||||||
/* EA1E24 80241524 00000000 */ nop
|
|
||||||
/* EA1E28 80241528 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* EA1E2C 8024152C 4600A500 */ add.s $f20, $f20, $f0
|
|
||||||
.L80241530:
|
|
||||||
/* EA1E30 80241530 4406B000 */ mfc1 $a2, $f22
|
|
||||||
/* EA1E34 80241534 4405A000 */ mfc1 $a1, $f20
|
|
||||||
/* EA1E38 80241538 0C00F909 */ jal dead_npc_move_heading
|
|
||||||
/* EA1E3C 8024153C 0220202D */ daddu $a0, $s1, $zero
|
|
||||||
.L80241540:
|
|
||||||
/* EA1E40 80241540 C6400008 */ lwc1 $f0, 8($s2)
|
|
||||||
/* EA1E44 80241544 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* EA1E48 80241548 44050000 */ mfc1 $a1, $f0
|
|
||||||
/* EA1E4C 8024154C C640000C */ lwc1 $f0, 0xc($s2)
|
|
||||||
/* EA1E50 80241550 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* EA1E54 80241554 44060000 */ mfc1 $a2, $f0
|
|
||||||
/* EA1E58 80241558 C6200040 */ lwc1 $f0, 0x40($s1)
|
|
||||||
/* EA1E5C 8024155C 26300038 */ addiu $s0, $s1, 0x38
|
|
||||||
/* EA1E60 80241560 E7A00010 */ swc1 $f0, 0x10($sp)
|
|
||||||
/* EA1E64 80241564 C6400010 */ lwc1 $f0, 0x10($s2)
|
|
||||||
/* EA1E68 80241568 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* EA1E6C 8024156C E7A00014 */ swc1 $f0, 0x14($sp)
|
|
||||||
/* EA1E70 80241570 C6400014 */ lwc1 $f0, 0x14($s2)
|
|
||||||
/* EA1E74 80241574 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* EA1E78 80241578 E7A00018 */ swc1 $f0, 0x18($sp)
|
|
||||||
/* EA1E7C 8024157C 8E440004 */ lw $a0, 4($s2)
|
|
||||||
/* EA1E80 80241580 8E270038 */ lw $a3, 0x38($s1)
|
|
||||||
/* EA1E84 80241584 0C013431 */ jal dead_is_point_within_region
|
|
||||||
/* EA1E88 80241588 26330040 */ addiu $s3, $s1, 0x40
|
|
||||||
/* EA1E8C 8024158C 1040005A */ beqz $v0, .L802416F8
|
|
||||||
/* EA1E90 80241590 00000000 */ nop
|
|
||||||
/* EA1E94 80241594 8E430004 */ lw $v1, 4($s2)
|
|
||||||
/* EA1E98 80241598 10600005 */ beqz $v1, .L802415B0
|
|
||||||
/* EA1E9C 8024159C 24020001 */ addiu $v0, $zero, 1
|
|
||||||
/* EA1EA0 802415A0 10620029 */ beq $v1, $v0, .L80241648
|
|
||||||
/* EA1EA4 802415A4 00000000 */ nop
|
|
||||||
/* EA1EA8 802415A8 080905BE */ j .L802416F8
|
|
||||||
/* EA1EAC 802415AC 00000000 */ nop
|
|
||||||
.L802415B0:
|
|
||||||
/* EA1EB0 802415B0 C6480008 */ lwc1 $f8, 8($s2)
|
|
||||||
/* EA1EB4 802415B4 46804220 */ cvt.s.w $f8, $f8
|
|
||||||
/* EA1EB8 802415B8 44064000 */ mfc1 $a2, $f8
|
|
||||||
/* EA1EBC 802415BC C648000C */ lwc1 $f8, 0xc($s2)
|
|
||||||
/* EA1EC0 802415C0 46804220 */ cvt.s.w $f8, $f8
|
|
||||||
/* EA1EC4 802415C4 C62C0038 */ lwc1 $f12, 0x38($s1)
|
|
||||||
/* EA1EC8 802415C8 C62E0040 */ lwc1 $f14, 0x40($s1)
|
|
||||||
/* EA1ECC 802415CC 44074000 */ mfc1 $a3, $f8
|
|
||||||
/* EA1ED0 802415D0 0C00AC71 */ jal dead_dist2D
|
|
||||||
/* EA1ED4 802415D4 00000000 */ nop
|
|
||||||
/* EA1ED8 802415D8 C6420010 */ lwc1 $f2, 0x10($s2)
|
|
||||||
/* EA1EDC 802415DC 468010A0 */ cvt.s.w $f2, $f2
|
|
||||||
/* EA1EE0 802415E0 4600103C */ c.lt.s $f2, $f0
|
|
||||||
/* EA1EE4 802415E4 00000000 */ nop
|
|
||||||
/* EA1EE8 802415E8 45000043 */ bc1f .L802416F8
|
|
||||||
/* EA1EEC 802415EC E7A00038 */ swc1 $f0, 0x38($sp)
|
|
||||||
/* EA1EF0 802415F0 C64C0008 */ lwc1 $f12, 8($s2)
|
|
||||||
/* EA1EF4 802415F4 46806320 */ cvt.s.w $f12, $f12
|
|
||||||
/* EA1EF8 802415F8 8E260038 */ lw $a2, 0x38($s1)
|
|
||||||
/* EA1EFC 802415FC 8E270040 */ lw $a3, 0x40($s1)
|
|
||||||
/* EA1F00 80241600 C64E000C */ lwc1 $f14, 0xc($s2)
|
|
||||||
/* EA1F04 80241604 0C00ABDC */ jal fio_validate_header_checksums
|
|
||||||
/* EA1F08 80241608 468073A0 */ cvt.s.w $f14, $f14
|
|
||||||
/* EA1F0C 8024160C 0200202D */ daddu $a0, $s0, $zero
|
|
||||||
/* EA1F10 80241610 44070000 */ mfc1 $a3, $f0
|
|
||||||
/* EA1F14 80241614 C6400008 */ lwc1 $f0, 8($s2)
|
|
||||||
/* EA1F18 80241618 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* EA1F1C 8024161C E6200038 */ swc1 $f0, 0x38($s1)
|
|
||||||
/* EA1F20 80241620 C640000C */ lwc1 $f0, 0xc($s2)
|
|
||||||
/* EA1F24 80241624 46800020 */ cvt.s.w $f0, $f0
|
|
||||||
/* EA1F28 80241628 E6200040 */ swc1 $f0, 0x40($s1)
|
|
||||||
/* EA1F2C 8024162C C6480010 */ lwc1 $f8, 0x10($s2)
|
|
||||||
/* EA1F30 80241630 46804220 */ cvt.s.w $f8, $f8
|
|
||||||
/* EA1F34 80241634 44064000 */ mfc1 $a2, $f8
|
|
||||||
/* EA1F38 80241638 0C00ACA3 */ jal dead_add_vec2D_polar
|
|
||||||
/* EA1F3C 8024163C 0260282D */ daddu $a1, $s3, $zero
|
|
||||||
/* EA1F40 80241640 080905BE */ j .L802416F8
|
|
||||||
/* EA1F44 80241644 00000000 */ nop
|
|
||||||
.L80241648:
|
|
||||||
/* EA1F48 80241648 8E420008 */ lw $v0, 8($s2)
|
|
||||||
/* EA1F4C 8024164C 8E430010 */ lw $v1, 0x10($s2)
|
|
||||||
/* EA1F50 80241650 C6200038 */ lwc1 $f0, 0x38($s1)
|
|
||||||
/* EA1F54 80241654 00431021 */ addu $v0, $v0, $v1
|
|
||||||
/* EA1F58 80241658 44821000 */ mtc1 $v0, $f2
|
|
||||||
/* EA1F5C 8024165C 00000000 */ nop
|
|
||||||
/* EA1F60 80241660 468010A0 */ cvt.s.w $f2, $f2
|
|
||||||
/* EA1F64 80241664 4600103C */ c.lt.s $f2, $f0
|
|
||||||
/* EA1F68 80241668 00000000 */ nop
|
|
||||||
/* EA1F6C 8024166C 45030001 */ bc1tl .L80241674
|
|
||||||
/* EA1F70 80241670 E6220038 */ swc1 $f2, 0x38($s1)
|
|
||||||
.L80241674:
|
|
||||||
/* EA1F74 80241674 8E420008 */ lw $v0, 8($s2)
|
|
||||||
/* EA1F78 80241678 8E430010 */ lw $v1, 0x10($s2)
|
|
||||||
/* EA1F7C 8024167C C6200038 */ lwc1 $f0, 0x38($s1)
|
|
||||||
/* EA1F80 80241680 00431023 */ subu $v0, $v0, $v1
|
|
||||||
/* EA1F84 80241684 44821000 */ mtc1 $v0, $f2
|
|
||||||
/* EA1F88 80241688 00000000 */ nop
|
|
||||||
/* EA1F8C 8024168C 468010A0 */ cvt.s.w $f2, $f2
|
|
||||||
/* EA1F90 80241690 4602003C */ c.lt.s $f0, $f2
|
|
||||||
/* EA1F94 80241694 00000000 */ nop
|
|
||||||
/* EA1F98 80241698 45030001 */ bc1tl .L802416A0
|
|
||||||
/* EA1F9C 8024169C E6220038 */ swc1 $f2, 0x38($s1)
|
|
||||||
.L802416A0:
|
|
||||||
/* EA1FA0 802416A0 8E42000C */ lw $v0, 0xc($s2)
|
|
||||||
/* EA1FA4 802416A4 8E430014 */ lw $v1, 0x14($s2)
|
|
||||||
/* EA1FA8 802416A8 C6200040 */ lwc1 $f0, 0x40($s1)
|
|
||||||
/* EA1FAC 802416AC 00431021 */ addu $v0, $v0, $v1
|
|
||||||
/* EA1FB0 802416B0 44821000 */ mtc1 $v0, $f2
|
|
||||||
/* EA1FB4 802416B4 00000000 */ nop
|
|
||||||
/* EA1FB8 802416B8 468010A0 */ cvt.s.w $f2, $f2
|
|
||||||
/* EA1FBC 802416BC 4600103C */ c.lt.s $f2, $f0
|
|
||||||
/* EA1FC0 802416C0 00000000 */ nop
|
|
||||||
/* EA1FC4 802416C4 45030001 */ bc1tl .L802416CC
|
|
||||||
/* EA1FC8 802416C8 E6220040 */ swc1 $f2, 0x40($s1)
|
|
||||||
.L802416CC:
|
|
||||||
/* EA1FCC 802416CC 8E42000C */ lw $v0, 0xc($s2)
|
|
||||||
/* EA1FD0 802416D0 8E430014 */ lw $v1, 0x14($s2)
|
|
||||||
/* EA1FD4 802416D4 C6200040 */ lwc1 $f0, 0x40($s1)
|
|
||||||
/* EA1FD8 802416D8 00431023 */ subu $v0, $v0, $v1
|
|
||||||
/* EA1FDC 802416DC 44821000 */ mtc1 $v0, $f2
|
|
||||||
/* EA1FE0 802416E0 00000000 */ nop
|
|
||||||
/* EA1FE4 802416E4 468010A0 */ cvt.s.w $f2, $f2
|
|
||||||
/* EA1FE8 802416E8 4602003C */ c.lt.s $f0, $f2
|
|
||||||
/* EA1FEC 802416EC 00000000 */ nop
|
|
||||||
/* EA1FF0 802416F0 45030001 */ bc1tl .L802416F8
|
|
||||||
/* EA1FF4 802416F4 E6220040 */ swc1 $f2, 0x40($s1)
|
|
||||||
.L802416F8:
|
|
||||||
/* EA1FF8 802416F8 16E0001F */ bnez $s7, .L80241778
|
|
||||||
/* EA1FFC 802416FC 00000000 */ nop
|
|
||||||
/* EA2000 80241700 8E220000 */ lw $v0, ($s1)
|
|
||||||
/* EA2004 80241704 30420008 */ andi $v0, $v0, 8
|
|
||||||
/* EA2008 80241708 10400003 */ beqz $v0, .L80241718
|
|
||||||
/* EA200C 8024170C 27A50020 */ addiu $a1, $sp, 0x20
|
|
||||||
/* EA2010 80241710 13C00019 */ beqz $fp, .L80241778
|
|
||||||
/* EA2014 80241714 00000000 */ nop
|
|
||||||
.L80241718:
|
|
||||||
/* EA2018 80241718 27A60024 */ addiu $a2, $sp, 0x24
|
|
||||||
/* EA201C 8024171C 27A20038 */ addiu $v0, $sp, 0x38
|
|
||||||
/* EA2020 80241720 C6220038 */ lwc1 $f2, 0x38($s1)
|
|
||||||
/* EA2024 80241724 C620003C */ lwc1 $f0, 0x3c($s1)
|
|
||||||
/* EA2028 80241728 3C0143C8 */ lui $at, 0x43c8
|
|
||||||
/* EA202C 8024172C 44813000 */ mtc1 $at, $f6
|
|
||||||
/* EA2030 80241730 46000021 */ cvt.d.s $f0, $f0
|
|
||||||
/* EA2034 80241734 E7A20020 */ swc1 $f2, 0x20($sp)
|
|
||||||
/* EA2038 80241738 3C018024 */ lui $at, %hi(D_80246640_EA6F40)
|
|
||||||
/* EA203C 8024173C D4226640 */ ldc1 $f2, %lo(D_80246640_EA6F40)($at)
|
|
||||||
/* EA2040 80241740 C6240040 */ lwc1 $f4, 0x40($s1)
|
|
||||||
/* EA2044 80241744 46220000 */ add.d $f0, $f0, $f2
|
|
||||||
/* EA2048 80241748 E7A60038 */ swc1 $f6, 0x38($sp)
|
|
||||||
/* EA204C 8024174C E7A40028 */ swc1 $f4, 0x28($sp)
|
|
||||||
/* EA2050 80241750 46200020 */ cvt.s.d $f0, $f0
|
|
||||||
/* EA2054 80241754 E7A00024 */ swc1 $f0, 0x24($sp)
|
|
||||||
/* EA2058 80241758 AFA20010 */ sw $v0, 0x10($sp)
|
|
||||||
/* EA205C 8024175C 8E240080 */ lw $a0, 0x80($s1)
|
|
||||||
/* EA2060 80241760 0C03908F */ jal dead_npc_raycast_down_sides
|
|
||||||
/* EA2064 80241764 27A70028 */ addiu $a3, $sp, 0x28
|
|
||||||
/* EA2068 80241768 10400003 */ beqz $v0, .L80241778
|
|
||||||
/* EA206C 8024176C 00000000 */ nop
|
|
||||||
/* EA2070 80241770 C7A00024 */ lwc1 $f0, 0x24($sp)
|
|
||||||
/* EA2074 80241774 E620003C */ swc1 $f0, 0x3c($s1)
|
|
||||||
.L80241778:
|
|
||||||
/* EA2078 80241778 C62C0038 */ lwc1 $f12, 0x38($s1)
|
|
||||||
/* EA207C 8024177C 3C028010 */ lui $v0, %hi(dead_gPlayerStatusPtr)
|
|
||||||
/* EA2080 80241780 8C42FC90 */ lw $v0, %lo(dead_gPlayerStatusPtr)($v0)
|
|
||||||
/* EA2084 80241784 C62E0040 */ lwc1 $f14, 0x40($s1)
|
|
||||||
/* EA2088 80241788 8C460028 */ lw $a2, 0x28($v0)
|
|
||||||
/* EA208C 8024178C 0C00ABDC */ jal fio_validate_header_checksums
|
|
||||||
/* EA2090 80241790 8C470030 */ lw $a3, 0x30($v0)
|
|
||||||
/* EA2094 80241794 0220202D */ daddu $a0, $s1, $zero
|
|
||||||
/* EA2098 80241798 24050321 */ addiu $a1, $zero, 0x321
|
|
||||||
/* EA209C 8024179C 0000302D */ daddu $a2, $zero, $zero
|
|
||||||
/* EA20A0 802417A0 0C013600 */ jal dead_ai_enemy_play_sound
|
|
||||||
/* EA20A4 802417A4 E620000C */ swc1 $f0, 0xc($s1)
|
|
||||||
/* EA20A8 802417A8 8EC200CC */ lw $v0, 0xcc($s6)
|
|
||||||
/* EA20AC 802417AC 8C420024 */ lw $v0, 0x24($v0)
|
|
||||||
/* EA20B0 802417B0 AE220028 */ sw $v0, 0x28($s1)
|
|
||||||
/* EA20B4 802417B4 96C20096 */ lhu $v0, 0x96($s6)
|
|
||||||
/* EA20B8 802417B8 A622008E */ sh $v0, 0x8e($s1)
|
|
||||||
/* EA20BC 802417BC 8FA80080 */ lw $t0, 0x80($sp)
|
|
||||||
/* EA20C0 802417C0 2402000B */ addiu $v0, $zero, 0xb
|
|
||||||
/* EA20C4 802417C4 AD020070 */ sw $v0, 0x70($t0)
|
|
||||||
.L802417C8:
|
|
||||||
/* EA20C8 802417C8 8FBF0064 */ lw $ra, 0x64($sp)
|
|
||||||
/* EA20CC 802417CC 8FBE0060 */ lw $fp, 0x60($sp)
|
|
||||||
/* EA20D0 802417D0 8FB7005C */ lw $s7, 0x5c($sp)
|
|
||||||
/* EA20D4 802417D4 8FB60058 */ lw $s6, 0x58($sp)
|
|
||||||
/* EA20D8 802417D8 8FB50054 */ lw $s5, 0x54($sp)
|
|
||||||
/* EA20DC 802417DC 8FB40050 */ lw $s4, 0x50($sp)
|
|
||||||
/* EA20E0 802417E0 8FB3004C */ lw $s3, 0x4c($sp)
|
|
||||||
/* EA20E4 802417E4 8FB20048 */ lw $s2, 0x48($sp)
|
|
||||||
/* EA20E8 802417E8 8FB10044 */ lw $s1, 0x44($sp)
|
|
||||||
/* EA20EC 802417EC 8FB00040 */ lw $s0, 0x40($sp)
|
|
||||||
/* EA20F0 802417F0 D7B80078 */ ldc1 $f24, 0x78($sp)
|
|
||||||
/* EA20F4 802417F4 D7B60070 */ ldc1 $f22, 0x70($sp)
|
|
||||||
/* EA20F8 802417F8 D7B40068 */ ldc1 $f20, 0x68($sp)
|
|
||||||
/* EA20FC 802417FC 03E00008 */ jr $ra
|
|
||||||
/* EA2100 80241800 27BD0080 */ addiu $sp, $sp, 0x80
|
|
@ -1,45 +0,0 @@
|
|||||||
.set noat # allow manual use of $at
|
|
||||||
.set noreorder # don't insert nops after branches
|
|
||||||
|
|
||||||
glabel EA36E0_UnkFunc47
|
|
||||||
/* EA37C4 80242EC4 27BDFFE8 */ addiu $sp, $sp, -0x18
|
|
||||||
/* EA37C8 80242EC8 AFB00010 */ sw $s0, 0x10($sp)
|
|
||||||
/* EA37CC 80242ECC 0080802D */ daddu $s0, $a0, $zero
|
|
||||||
/* EA37D0 80242ED0 3C028011 */ lui $v0, %hi(dead_gPlayerStatus)
|
|
||||||
/* EA37D4 80242ED4 24427578 */ addiu $v0, $v0, %lo(dead_gPlayerStatus)
|
|
||||||
/* EA37D8 80242ED8 AFBF0014 */ sw $ra, 0x14($sp)
|
|
||||||
/* EA37DC 80242EDC C4400028 */ lwc1 $f0, 0x28($v0)
|
|
||||||
/* EA37E0 80242EE0 C6020084 */ lwc1 $f2, 0x84($s0)
|
|
||||||
/* EA37E4 80242EE4 468010A0 */ cvt.s.w $f2, $f2
|
|
||||||
/* EA37E8 80242EE8 46001081 */ sub.s $f2, $f2, $f0
|
|
||||||
/* EA37EC 80242EEC 46021082 */ mul.s $f2, $f2, $f2
|
|
||||||
/* EA37F0 80242EF0 00000000 */ nop
|
|
||||||
/* EA37F4 80242EF4 C440002C */ lwc1 $f0, 0x2c($v0)
|
|
||||||
/* EA37F8 80242EF8 C604008C */ lwc1 $f4, 0x8c($s0)
|
|
||||||
/* EA37FC 80242EFC 46802120 */ cvt.s.w $f4, $f4
|
|
||||||
/* EA3800 80242F00 46002101 */ sub.s $f4, $f4, $f0
|
|
||||||
/* EA3804 80242F04 46042102 */ mul.s $f4, $f4, $f4
|
|
||||||
/* EA3808 80242F08 00000000 */ nop
|
|
||||||
/* EA380C 80242F0C C4460030 */ lwc1 $f6, 0x30($v0)
|
|
||||||
/* EA3810 80242F10 44800000 */ mtc1 $zero, $f0
|
|
||||||
/* EA3814 80242F14 00000000 */ nop
|
|
||||||
/* EA3818 80242F18 46060001 */ sub.s $f0, $f0, $f6
|
|
||||||
/* EA381C 80242F1C 46000002 */ mul.s $f0, $f0, $f0
|
|
||||||
/* EA3820 80242F20 00000000 */ nop
|
|
||||||
/* EA3824 80242F24 46041080 */ add.s $f2, $f2, $f4
|
|
||||||
/* EA3828 80242F28 46001300 */ add.s $f12, $f2, $f0
|
|
||||||
/* EA382C 80242F2C 46006004 */ sqrt.s $f0, $f12
|
|
||||||
/* EA3830 80242F30 46000032 */ c.eq.s $f0, $f0
|
|
||||||
/* EA3834 80242F34 00000000 */ nop
|
|
||||||
/* EA3838 80242F38 45010003 */ bc1t .L80242F48
|
|
||||||
/* EA383C 80242F3C 00000000 */ nop
|
|
||||||
/* EA3840 80242F40 0C019C10 */ jal dead_sqrtf
|
|
||||||
/* EA3844 80242F44 00000000 */ nop
|
|
||||||
.L80242F48:
|
|
||||||
/* EA3848 80242F48 4600020D */ trunc.w.s $f8, $f0
|
|
||||||
/* EA384C 80242F4C E6080094 */ swc1 $f8, 0x94($s0)
|
|
||||||
/* EA3850 80242F50 8FBF0014 */ lw $ra, 0x14($sp)
|
|
||||||
/* EA3854 80242F54 8FB00010 */ lw $s0, 0x10($sp)
|
|
||||||
/* EA3858 80242F58 24020002 */ addiu $v0, $zero, 2
|
|
||||||
/* EA385C 80242F5C 03E00008 */ jr $ra
|
|
||||||
/* EA3860 80242F60 27BD0018 */ addiu $sp, $sp, 0x18
|
|
@ -1,51 +0,0 @@
|
|||||||
.set noat # allow manual use of $at
|
|
||||||
.set noreorder # don't insert nops after branches
|
|
||||||
|
|
||||||
.section .rodata
|
|
||||||
|
|
||||||
dlabel D_802466C0_EA6FC0
|
|
||||||
.double -583.0
|
|
||||||
|
|
||||||
dlabel D_802466C8_EA6FC8
|
|
||||||
.double 165.0
|
|
||||||
|
|
||||||
.section .text
|
|
||||||
|
|
||||||
glabel func_80243054_EA3954
|
|
||||||
/* EA3954 80243054 3C018024 */ lui $at, %hi(D_802466C0_EA6FC0)
|
|
||||||
/* EA3958 80243058 D42266C0 */ ldc1 $f2, %lo(D_802466C0_EA6FC0)($at)
|
|
||||||
/* EA395C 8024305C 27BDFFE8 */ addiu $sp, $sp, -0x18
|
|
||||||
/* EA3960 80243060 AFB00010 */ sw $s0, 0x10($sp)
|
|
||||||
/* EA3964 80243064 0080802D */ daddu $s0, $a0, $zero
|
|
||||||
/* EA3968 80243068 AFBF0014 */ sw $ra, 0x14($sp)
|
|
||||||
/* EA396C 8024306C C6000084 */ lwc1 $f0, 0x84($s0)
|
|
||||||
/* EA3970 80243070 46800021 */ cvt.d.w $f0, $f0
|
|
||||||
/* EA3974 80243074 46201081 */ sub.d $f2, $f2, $f0
|
|
||||||
/* EA3978 80243078 462010A0 */ cvt.s.d $f2, $f2
|
|
||||||
/* EA397C 8024307C 46021082 */ mul.s $f2, $f2, $f2
|
|
||||||
/* EA3980 80243080 00000000 */ nop
|
|
||||||
/* EA3984 80243084 3C018024 */ lui $at, %hi(D_802466C8_EA6FC8)
|
|
||||||
/* EA3988 80243088 D42066C8 */ ldc1 $f0, %lo(D_802466C8_EA6FC8)($at)
|
|
||||||
/* EA398C 8024308C C604008C */ lwc1 $f4, 0x8c($s0)
|
|
||||||
/* EA3990 80243090 46802121 */ cvt.d.w $f4, $f4
|
|
||||||
/* EA3994 80243094 46240001 */ sub.d $f0, $f0, $f4
|
|
||||||
/* EA3998 80243098 46200020 */ cvt.s.d $f0, $f0
|
|
||||||
/* EA399C 8024309C 46000002 */ mul.s $f0, $f0, $f0
|
|
||||||
/* EA39A0 802430A0 00000000 */ nop
|
|
||||||
/* EA39A4 802430A4 46001300 */ add.s $f12, $f2, $f0
|
|
||||||
/* EA39A8 802430A8 46006004 */ sqrt.s $f0, $f12
|
|
||||||
/* EA39AC 802430AC 46000032 */ c.eq.s $f0, $f0
|
|
||||||
/* EA39B0 802430B0 00000000 */ nop
|
|
||||||
/* EA39B4 802430B4 45030004 */ bc1tl .L802430C8
|
|
||||||
/* EA39B8 802430B8 46000007 */ neg.s $f0, $f0
|
|
||||||
/* EA39BC 802430BC 0C019C10 */ jal dead_sqrtf
|
|
||||||
/* EA39C0 802430C0 00000000 */ nop
|
|
||||||
/* EA39C4 802430C4 46000007 */ neg.s $f0, $f0
|
|
||||||
.L802430C8:
|
|
||||||
/* EA39C8 802430C8 4600018D */ trunc.w.s $f6, $f0
|
|
||||||
/* EA39CC 802430CC E6060090 */ swc1 $f6, 0x90($s0)
|
|
||||||
/* EA39D0 802430D0 8FBF0014 */ lw $ra, 0x14($sp)
|
|
||||||
/* EA39D4 802430D4 8FB00010 */ lw $s0, 0x10($sp)
|
|
||||||
/* EA39D8 802430D8 24020002 */ addiu $v0, $zero, 2
|
|
||||||
/* EA39DC 802430DC 03E00008 */ jr $ra
|
|
||||||
/* EA39E0 802430E0 27BD0018 */ addiu $sp, $sp, 0x18
|
|
@ -1,11 +0,0 @@
|
|||||||
asset_dirs = ver/us/assets
|
|
||||||
|
|
||||||
maps = dro_01 dro_02 hos_00 hos_01 hos_02 hos_03 hos_04 hos_05 hos_06 hos_10 hos_20 isk_01 isk_02 isk_03 isk_04 isk_05 isk_06 isk_07 isk_08 isk_09 isk_10 isk_11 isk_12 isk_13 isk_14 isk_16 isk_18 isk_19 iwa_00 iwa_01 iwa_02 iwa_03 iwa_04 iwa_10 iwa_11 osr_00 osr_01 osr_02 osr_03 kkj_00 kkj_01 kkj_02 kkj_03 kkj_10 kkj_11 kkj_12 kkj_13 kkj_14 kkj_15 kkj_16 kkj_17 kkj_18 kkj_19 kkj_20 kkj_21 kkj_22 kkj_23 kkj_24 kkj_25 kkj_26 kkj_27 kkj_28 kkj_29 kmr_00 kmr_02 kmr_03 kmr_04 kmr_05 kmr_06 kmr_07 kmr_09 kmr_10 kmr_11 kmr_12 kmr_20 kmr_30 kpa_01 kpa_03 kpa_04 kpa_08 kpa_09 kpa_10 kpa_11 kpa_12 kpa_13 kpa_14 kpa_15 kpa_16 kpa_17 kpa_32 kpa_33 kpa_40 kpa_41 kpa_50 kpa_52 kpa_60 kpa_61 kpa_62 kpa_63 kpa_70 kpa_80 kpa_90 kpa_91 kpa_94 kpa_95 kpa_96 kpa_102 kpa_111 kpa_112 kpa_113 kpa_115 kpa_116 kpa_117 kpa_118 kpa_119 kpa_121 kpa_130 kpa_133 kpa_134 machi mac_00 mac_01 mac_02 mac_03 mac_04 mac_05 mac_06 tik_01 tik_02 tik_03 tik_04 tik_05 tik_06 tik_07 tik_08 tik_09 tik_10 tik_12 tik_14 tik_15 tik_17 tik_18 tik_19 tik_20 tik_21 tik_22 tik_23 tik_25 kgr_01 kgr_02 nok_01 nok_02 nok_03 nok_04 nok_11 nok_12 nok_13 nok_14 nok_15 sbk_00 sbk_01 sbk_02 sbk_03 sbk_04 sbk_05 sbk_06 sbk_10 sbk_11 sbk_12 sbk_13 sbk_14 sbk_15 sbk_16 sbk_20 sbk_21 sbk_22 sbk_23 sbk_24 sbk_25 sbk_26 sbk_30 sbk_31 sbk_32 sbk_33 sbk_34 sbk_35 sbk_36 sbk_40 sbk_41 sbk_42 sbk_43 sbk_44 sbk_45 sbk_46 sbk_50 sbk_51 sbk_52 sbk_53 sbk_54 sbk_55 sbk_56 sbk_60 sbk_61 sbk_62 sbk_63 sbk_64 sbk_65 sbk_66 sbk_99 trd_00 trd_01 trd_02 trd_03 trd_04 trd_05 trd_06 trd_07 trd_08 trd_09 trd_10 tst_01 tst_02 tst_03 tst_04 tst_10 tst_11 tst_12 tst_13 tst_20 jan_00 jan_01 jan_02 jan_03 jan_04 jan_05 jan_06 jan_07 jan_08 jan_09 jan_10 jan_11 jan_12 jan_13 jan_14 jan_15 jan_16 jan_17 jan_18 jan_19 jan_22 jan_23 mim_01 mim_02 mim_03 mim_04 mim_05 mim_06 mim_07 mim_08 mim_09 mim_10 mim_11 mim_12 obk_01 obk_02 obk_03 obk_04 obk_05 obk_06 obk_07 obk_08 obk_09 arn_02 arn_03 arn_04 arn_05 arn_07 arn_08 arn_09 arn_10 arn_11 arn_12 arn_13 arn_20 dgb_01 dgb_02 dgb_03 dgb_04 dgb_05 dgb_06 dgb_07 dgb_08 dgb_09 dgb_10 dgb_11 dgb_12 dgb_13 dgb_14 dgb_15 dgb_16 dgb_17 dgb_18 kzn_01 kzn_02 kzn_03 kzn_04 kzn_05 kzn_06 kzn_07 kzn_08 kzn_09 kzn_10 kzn_11 kzn_17 kzn_18 kzn_19 kzn_20 kzn_22 kzn_23 flo_00 flo_03 flo_07 flo_08 flo_09 flo_10 flo_11 flo_12 flo_13 flo_14 flo_15 flo_16 flo_17 flo_18 flo_19 flo_21 flo_22 flo_23 flo_24 flo_25 sam_01 sam_02 sam_03 sam_04 sam_05 sam_06 sam_07 sam_08 sam_09 sam_10 sam_11 sam_12 pra_01 pra_02 pra_03 pra_04 pra_05 pra_09 pra_10 pra_11 pra_13 pra_14 pra_15 pra_16 pra_18 pra_19 pra_20 pra_21 pra_22 pra_29 pra_31 pra_32 pra_33 pra_34 pra_35 pra_40 omo_01 omo_02 omo_03 omo_04 omo_05 omo_06 omo_07 omo_08 omo_09 omo_10 omo_11 omo_12 omo_13 omo_14 omo_15 omo_16 omo_17 end_00 end_01 mgm_00 mgm_01 mgm_02 mgm_03 gv_01 kmr_bt03 kmr_bt04 kmr_bt05 kmr_bt06 nok_bt01 nok_bt02 nok_bt03 nok_bt04 trd_bt00 trd_bt01 trd_bt02 trd_bt03 trd_bt04 trd_bt05 iwa_bt01 iwa_bt02 sbk_bt02 isk_bt01 isk_bt02 isk_bt03 isk_bt04 isk_bt05 isk_bt06 isk_bt07 isk_bt08 arn_bt01 arn_bt02 arn_bt03 arn_bt04 arn_bt05 arn_bt06 dgb_bt01 dgb_bt02 dgb_bt03 dgb_bt04 dgb_bt05 mim_bt01 omo_bt01 omo_bt02 omo_bt03 omo_bt04 omo_bt05 omo_bt06 omo_bt07 kgr_bt01 flo_bt01 flo_bt02 flo_bt03 flo_bt04 flo_bt05 flo_bt06 jan_bt00 jan_bt01 jan_bt02 jan_bt03 jan_bt04 kzn_bt01 kzn_bt02 kzn_bt04 kzn_bt05 sam_bt01 sam_bt02 sam_bt03 sam_bt04 tik_bt01 tik_bt02 tik_bt03 tik_bt04 tik_bt05 pra_bt01 pra_bt02 pra_bt03 pra_bt04 mac_bt01 mac_bt02 kpa_bt01 kpa_bt02 kpa_bt03 kpa_bt04 kpa_bt05 kpa_bt07 kpa_bt08 kpa_bt09 kpa_bt11 kpa_bt13 kpa_bt14 hos_bt01 hos_bt02 kkj_bt01 kkj_bt02
|
|
||||||
|
|
||||||
npc_sprites = world_goombario world_kooper world_bombette world_parakarry world_bow world_watt world_sushie world_lakilester battle_goombario battle_kooper battle_bombette battle_parakarry battle_bow battle_watt battle_sushie battle_lakilester kooper_without_shell world_eldstar world_mamar world_skolar world_muskular world_misstar world_klevar world_kalmar battle_eldstar battle_mamar battle_skolar battle_muskular battle_misstar battle_klevar battle_kalmar twink jr_troopa spiked_jr_troopa spiked_para_jr_troopa mage_jr_troopa para_jr_troopa goomba spiked_goomba paragoomba koopa_troopa para_troopa fuzzy bob_omb bullet_bill bill_blaster monty_mole cleft pokey battle_bandit buzzy_beetle swooper stone_chomp putrid_piranha piranha_plant sentinel world_clubba battle_clubba shy_guy groove_guy sky_guy pyro_guy spy_guy medi_guy fuzzipede jungle_guy heart_plant hurt_plant m_bush bubble kent_c_koopa dayzee lakitu spiny bzzap ruff_puff spike_top duplighost albino_dino blooper baby_blooper gulpit dry_bones thrown_bone bony_beetle magikoopa flying_magikoopa world_koopatrol koopatrol hammer_bros bush_basic bush_blocky bush_dry bush_leafy bush_matted world_kammy battle_kammy goomba_bros goomba_king spiky_goomnut dark_toad koopa_bros buzzar tutankoopa chain_chomp world_tubba battle_tubba tubbas_heart big_lantern_ghost shy_squad_guy marshal_guy stilt_guy stilt_guy_unfold shy_stack_guy shy_stack_unfold shy_stack_damage shy_stack_rock general_guy general_guy_bomb tank_guy lava_piranha_head petit_piranha lava_bud huff_n_puff tuff_puff monstar crystal_king world_bowser battle_bowser luigi toad three_sisters vanna_t toad_kid toad_guard harry_t toad_minister postmaster conductor_toad train_station_toad fishmael artist_toad koopa koopa_without_shell world_bob_omb whacka dryite mouser boo yoshi yoshi_kid raven bubulb penguin shiver_toad world_bandit goompa goombaria gooma goompapa goomama the_master chan lee merlon chet_rippo rowf minh_t russ_t tayce_t fice_t bartender chanterelle rip_cheato chuck_quizmo merluvlee merlar merlow star_kid kolorado_wife koopa_koot kolorado battle_kolorado archeologist nomadimouse world_merlee battle_merlee disguised_moustafa moustafa oaklie bootler yakkey gourmet_guy village_leader leaders_friend rafael_raven tolielup gate_flower petunia posie lily rosie sun lakilulu ninji mayor_penguin mayor_penguin_wife penguin_patrol herringway merle star_rod fire coin parade_peach parade_koopas parade_burnt_bowser parade_luigi parade_partners parade_yoshis parade_kolorados parade_chicks parade_ice_show parade_toads parade_batons parade_drums parade_flags parade_horns parade_tubba_balloon parade_wizards parade_mario parade_shy_guys parade_twink leaf
|
|
||||||
|
|
||||||
backgrounds = kmr_bg nok_bg sbk_bg sbk3_bg iwa_bg hos_bg arn_bg obk_bg omo_bg yos_bg jan_bg fla_bg flb_bg sra_bg yki_bg sam_bg kpa_bg title_bg
|
|
||||||
|
|
||||||
party_images = party_kurio party_kameki party_pinki party_pareta party_resa party_akari party_opuku party_pokopi
|
|
||||||
|
|
||||||
texture_archives = mac_tex tik_tex kgr_tex kmr_tex iwa_tex sbk_tex dro_tex isk_tex trd_tex nok_tex hos_tex kpa_tex osr_tex kkj_tex tst_tex jan_tex mim_tex obk_tex arn_tex dgb_tex kzn_tex flo_tex sam_tex pra_tex omo_tex end_tex mgm_tex gv__tex
|
|
@ -1,7 +1,7 @@
|
|||||||
name: Paper Mario (North America)
|
name: Paper Mario (North America)
|
||||||
basename: papermario
|
|
||||||
sha1: 3837f44cda784b466c9a2d99df70d77c322b97a0
|
sha1: 3837f44cda784b466c9a2d99df70d77c322b97a0
|
||||||
options:
|
options:
|
||||||
|
basename: papermario
|
||||||
find_file_boundaries: True
|
find_file_boundaries: True
|
||||||
compiler: GCC
|
compiler: GCC
|
||||||
mnemonic_ljust: 10
|
mnemonic_ljust: 10
|
||||||
@ -14,7 +14,7 @@ options:
|
|||||||
extensions_path: tools/splat_ext
|
extensions_path: tools/splat_ext
|
||||||
symbol_addrs_path: ver/us/symbol_addrs.txt
|
symbol_addrs_path: ver/us/symbol_addrs.txt
|
||||||
ld_script_path: ver/us/papermario.ld
|
ld_script_path: ver/us/papermario.ld
|
||||||
linker_symbol_header_path: ver/us/build/include/ld_addrs.h
|
ld_symbol_header_path: ver/us/build/include/ld_addrs.h
|
||||||
src_path: src
|
src_path: src
|
||||||
asm_path: ver/us/asm
|
asm_path: ver/us/asm
|
||||||
asset_path: assets/us
|
asset_path: assets/us
|
||||||
@ -320,13 +320,15 @@ segments:
|
|||||||
- [0x52D80, .data, state_file_select]
|
- [0x52D80, .data, state_file_select]
|
||||||
- [0x52DC0, .data, state_title_screen]
|
- [0x52DC0, .data, state_title_screen]
|
||||||
- [0x52EE0, .data, state_demo]
|
- [0x52EE0, .data, state_demo]
|
||||||
- [0x52FF0, data]
|
- [0x52FF0, .data, npc]
|
||||||
|
- [0x53040, .data, 1a1f0_len_5390]
|
||||||
|
- [0x53560, .data, status_icons]
|
||||||
- [0x53570, .data, audio/25f00_len_940]
|
- [0x53570, .data, audio/25f00_len_940]
|
||||||
- [0x53590, .data, audio/sfx_player]
|
- [0x53590, .data, audio/sfx_player]
|
||||||
- [0x541B0, .data, audio/30450]
|
- [0x541B0, .data, audio/30450]
|
||||||
- [0x54250, .data, audio/31650]
|
- [0x54250, .data, audio/31650]
|
||||||
- [0x54260, .data, audio/33450]
|
- [0x54260, .data, audio/33450]
|
||||||
- [0x54360, data]
|
- [0x54360, data] # some audio table
|
||||||
- [0x5A3E0, .data, audio/reverb]
|
- [0x5A3E0, .data, audio/reverb]
|
||||||
- [0x5A610, .data, effects]
|
- [0x5A610, .data, effects]
|
||||||
- [0x5B320, .data, 5B320]
|
- [0x5B320, .data, 5B320]
|
||||||
@ -350,7 +352,7 @@ segments:
|
|||||||
- [0x6FA30, .data, os/seteventmesg]
|
- [0x6FA30, .data, os/seteventmesg]
|
||||||
- [0x6FA40, .data, os/siacs]
|
- [0x6FA40, .data, os/siacs]
|
||||||
- [0x6FA50, .data, os/osSetThreadPri]
|
- [0x6FA50, .data, os/osSetThreadPri]
|
||||||
- [0x6FA70, data] # has scripts?
|
- [0x6FA70, data] # libultra data
|
||||||
- [0x70E30, .data, battle/battle]
|
- [0x70E30, .data, battle/battle]
|
||||||
- [0x71430, bin, gspF3DEX2kawase_fifo_text]
|
- [0x71430, bin, gspF3DEX2kawase_fifo_text]
|
||||||
- [0x72A60, bin, gspF3DEX2kawase_fifo_data]
|
- [0x72A60, bin, gspF3DEX2kawase_fifo_data]
|
||||||
@ -1378,6 +1380,7 @@ segments:
|
|||||||
- [0x1C0560, ia8, ui/battle/swap_background, 48, 16]
|
- [0x1C0560, ia8, ui/battle/swap_background, 48, 16]
|
||||||
- [0x1C0860]
|
- [0x1C0860]
|
||||||
- [0x1C2100, data, 1C2100]
|
- [0x1C2100, data, 1C2100]
|
||||||
|
- [0x1C2A70, .data, 196AA0]
|
||||||
- [0x1C2EC0, .data, 19FAF0]
|
- [0x1C2EC0, .data, 19FAF0]
|
||||||
- [0x1C2FC0, .data, 1A5830]
|
- [0x1C2FC0, .data, 1A5830]
|
||||||
- [0x1C3000, .data, 1AF120]
|
- [0x1C3000, .data, 1AF120]
|
||||||
@ -11420,7 +11423,14 @@ segments:
|
|||||||
vram: 0x802B7000
|
vram: 0x802B7000
|
||||||
subsegments:
|
subsegments:
|
||||||
- [0xE20110, c, E20110]
|
- [0xE20110, c, E20110]
|
||||||
- [0xE20B30, data]
|
- start: 0xE20B30
|
||||||
|
type: .data
|
||||||
|
name: E20110
|
||||||
|
subsegments:
|
||||||
|
- [0xE20B30, ci4, inspect_icon, 32, 32]
|
||||||
|
- [0xE20D30, palette, inspect_icon]
|
||||||
|
- [0xE20D50, gfx, inspect_icon_dlist]
|
||||||
|
- [0xE20DC8]
|
||||||
- [0xE20DD0]
|
- [0xE20DD0]
|
||||||
- type: code
|
- type: code
|
||||||
start: 0xE20EB0
|
start: 0xE20EB0
|
||||||
@ -11441,14 +11451,31 @@ segments:
|
|||||||
vram: 0x802B7000
|
vram: 0x802B7000
|
||||||
subsegments:
|
subsegments:
|
||||||
- [0xE21870, c, E21870]
|
- [0xE21870, c, E21870]
|
||||||
- [0xE21EB0, data]
|
- start: 0xE21EB0
|
||||||
|
type: .data
|
||||||
|
name: E21870
|
||||||
|
subsegments:
|
||||||
|
- [0xE21EB0, ci4, pulse_stone, 56, 56]
|
||||||
|
- [0xE224D0, palette, pulse_stone]
|
||||||
|
- [0xE224F0, palette, pulse_stone.flash]
|
||||||
|
- [0xE22510, gfx, pulse_stone_dlist]
|
||||||
|
- [0xE22588]
|
||||||
- [0xE22590]
|
- [0xE22590]
|
||||||
- type: code
|
- type: code
|
||||||
start: 0xE225B0
|
start: 0xE225B0
|
||||||
vram: 0x802B7000
|
vram: 0x802B7000
|
||||||
subsegments:
|
subsegments:
|
||||||
- [0xE225B0, c, E225B0]
|
- [0xE225B0, c, E225B0]
|
||||||
- [0xE22B30, data]
|
- start: 0xE22B30
|
||||||
|
type: .data
|
||||||
|
name: E225B0
|
||||||
|
subsegments:
|
||||||
|
- [0xE22B30, ci4, i_spy, 56, 56]
|
||||||
|
- [0xE23150, palette, i_spy]
|
||||||
|
- [0xE23170, palette, i_spy.2]
|
||||||
|
- [0xE23190, palette, i_spy.flash]
|
||||||
|
- [0xE231B0, gfx, i_spy_dlist]
|
||||||
|
- [0xE23228]
|
||||||
- [0xE23230]
|
- [0xE23230]
|
||||||
- type: code
|
- type: code
|
||||||
name: world_action_idle
|
name: world_action_idle
|
||||||
@ -12766,7 +12793,7 @@ segments:
|
|||||||
- [0xEA0900, c]
|
- [0xEA0900, c]
|
||||||
- [0xEA0C10, c, EA0C10]
|
- [0xEA0C10, c, EA0C10]
|
||||||
- [0xEA36E0, c, EA36E0]
|
- [0xEA36E0, c, EA36E0]
|
||||||
- [0xEA3A80, data]
|
- [0xEA3A80, data, dead/EA3A80]
|
||||||
- [0xEA6D70]
|
- [0xEA6D70]
|
||||||
- type: code
|
- type: code
|
||||||
start: 0xEA6FD0
|
start: 0xEA6FD0
|
||||||
@ -12775,13 +12802,13 @@ segments:
|
|||||||
- [0xEA6FD0, c]
|
- [0xEA6FD0, c]
|
||||||
- [0xEA7010, c]
|
- [0xEA7010, c]
|
||||||
- [0xEA7320, c]
|
- [0xEA7320, c]
|
||||||
- [0xEA7390, data]
|
- [0xEA7390, data, dead/EA7390]
|
||||||
- type: code
|
- type: code
|
||||||
start: 0xEA8AE0
|
start: 0xEA8AE0
|
||||||
vram: 0x80240000
|
vram: 0x80240000
|
||||||
subsegments:
|
subsegments:
|
||||||
- [0xEA8AE0, c]
|
- [0xEA8AE0, c]
|
||||||
- [0xEAA810, data]
|
- [0xEAA810, data, dead/EAA810]
|
||||||
- [0xEB0E20]
|
- [0xEB0E20]
|
||||||
- type: code
|
- type: code
|
||||||
start: 0xEB0E60
|
start: 0xEB0E60
|
||||||
@ -12789,21 +12816,21 @@ segments:
|
|||||||
subsegments:
|
subsegments:
|
||||||
- [0xEB0E60, c]
|
- [0xEB0E60, c]
|
||||||
- [0xEB1170, c]
|
- [0xEB1170, c]
|
||||||
- [0xEB1920, data]
|
- [0xEB1920, data, dead/EB1920]
|
||||||
- type: code
|
- type: code
|
||||||
start: 0xEB5130
|
start: 0xEB5130
|
||||||
vram: 0x80240000
|
vram: 0x80240000
|
||||||
subsegments:
|
subsegments:
|
||||||
- [0xEB5130, c]
|
- [0xEB5130, c]
|
||||||
- [0xEB5470, c]
|
- [0xEB5470, c]
|
||||||
- [0xEB54C0, data]
|
- [0xEB54C0, data, dead/EB54C0]
|
||||||
- type: code
|
- type: code
|
||||||
start: 0xEB7230
|
start: 0xEB7230
|
||||||
vram: 0x80240000
|
vram: 0x80240000
|
||||||
subsegments:
|
subsegments:
|
||||||
- [0xEB7230, c]
|
- [0xEB7230, c]
|
||||||
- [0xEB7540, c, EB7540]
|
- [0xEB7540, c, EB7540]
|
||||||
- [0xEB7850, data]
|
- [0xEB7850, data, dead/EB7850]
|
||||||
- [0xEB8E40]
|
- [0xEB8E40]
|
||||||
- type: code
|
- type: code
|
||||||
start: 0xEB8E50
|
start: 0xEB8E50
|
||||||
@ -12812,7 +12839,7 @@ segments:
|
|||||||
- [0xEB8E50, c, EB8E50]
|
- [0xEB8E50, c, EB8E50]
|
||||||
- [0xEB8E90, c, EB8E90]
|
- [0xEB8E90, c, EB8E90]
|
||||||
- [0xEB9D90, c]
|
- [0xEB9D90, c]
|
||||||
- [0xEBA260, data]
|
- [0xEBA260, data, dead/EBA260]
|
||||||
- [0xEC2000]
|
- [0xEC2000]
|
||||||
- type: code
|
- type: code
|
||||||
start: 0xEC2200
|
start: 0xEC2200
|
||||||
@ -12821,7 +12848,7 @@ segments:
|
|||||||
- [0xEC2200, c, EC2200]
|
- [0xEC2200, c, EC2200]
|
||||||
- [0xEC2240, c, EC2240]
|
- [0xEC2240, c, EC2240]
|
||||||
- [0xEC2610, c]
|
- [0xEC2610, c]
|
||||||
- [0xEC2850, data]
|
- [0xEC2850, data, dead/EC2850]
|
||||||
- [0xEC7170]
|
- [0xEC7170]
|
||||||
- type: code
|
- type: code
|
||||||
start: 0xEC71B0
|
start: 0xEC71B0
|
||||||
@ -12829,7 +12856,7 @@ segments:
|
|||||||
subsegments:
|
subsegments:
|
||||||
- [0xEC71B0, c]
|
- [0xEC71B0, c]
|
||||||
- [0xEC7590, c]
|
- [0xEC7590, c]
|
||||||
- [0xEC78F0, data]
|
- [0xEC78F0, data, dead/EC78F0]
|
||||||
- type: code
|
- type: code
|
||||||
start: 0xEC9D00
|
start: 0xEC9D00
|
||||||
vram: 0x80240000
|
vram: 0x80240000
|
||||||
@ -12839,7 +12866,7 @@ segments:
|
|||||||
- [0xECAA80, c, ECAA80]
|
- [0xECAA80, c, ECAA80]
|
||||||
- [0xECB930, c]
|
- [0xECB930, c]
|
||||||
- [0xECBB70, c]
|
- [0xECBB70, c]
|
||||||
- [0xECBC10, data]
|
- [0xECBC10, data, dead/ECBC10]
|
||||||
- [0xECFE60]
|
- [0xECFE60]
|
||||||
- type: code
|
- type: code
|
||||||
start: 0xECFFF0
|
start: 0xECFFF0
|
||||||
@ -12849,7 +12876,7 @@ segments:
|
|||||||
- [0xED0030, c]
|
- [0xED0030, c]
|
||||||
- [0xED00D0, c]
|
- [0xED00D0, c]
|
||||||
- [0xED0310, c]
|
- [0xED0310, c]
|
||||||
- [0xED1840, data]
|
- [0xED1840, data, dead/ED1840]
|
||||||
- [0xED41C0]
|
- [0xED41C0]
|
||||||
- type: code
|
- type: code
|
||||||
start: 0xED4220
|
start: 0xED4220
|
||||||
@ -12860,13 +12887,13 @@ segments:
|
|||||||
- [0xED42A0, c]
|
- [0xED42A0, c]
|
||||||
- [0xED46D0, c]
|
- [0xED46D0, c]
|
||||||
- [0xED5540, c]
|
- [0xED5540, c]
|
||||||
- [0xED5780, data]
|
- [0xED5780, data, dead/ED5780]
|
||||||
- type: code
|
- type: code
|
||||||
start: 0xED8E20
|
start: 0xED8E20
|
||||||
vram: 0x80240000
|
vram: 0x80240000
|
||||||
subsegments:
|
subsegments:
|
||||||
- [0xED8E20, c, ED8E20]
|
- [0xED8E20, c, ED8E20]
|
||||||
- [0xED9170, data]
|
- [0xED9170, data, dead/ED9170]
|
||||||
- [0xEDBF90]
|
- [0xEDBF90]
|
||||||
- type: code
|
- type: code
|
||||||
start: 0xEDBFE0
|
start: 0xEDBFE0
|
||||||
@ -12874,7 +12901,7 @@ segments:
|
|||||||
subsegments:
|
subsegments:
|
||||||
- [0xEDBFE0, c]
|
- [0xEDBFE0, c]
|
||||||
- [0xEDC020, c]
|
- [0xEDC020, c]
|
||||||
- [0xEDC6D0, data]
|
- [0xEDC6D0, data, dead/EDC6D0]
|
||||||
- type: code
|
- type: code
|
||||||
start: 0xEDE9C0
|
start: 0xEDE9C0
|
||||||
vram: 0x80240000
|
vram: 0x80240000
|
||||||
@ -12882,7 +12909,7 @@ segments:
|
|||||||
- [0xEDE9C0, c]
|
- [0xEDE9C0, c]
|
||||||
- [0xEDEA00, c, EDEA00]
|
- [0xEDEA00, c, EDEA00]
|
||||||
- [0xEE2040, c, EE2040]
|
- [0xEE2040, c, EE2040]
|
||||||
- [0xEE20E0, data]
|
- [0xEE20E0, data, dead/EE20E0]
|
||||||
- [0xEE64B0]
|
- [0xEE64B0]
|
||||||
- type: code
|
- type: code
|
||||||
start: 0xEE65B0
|
start: 0xEE65B0
|
||||||
@ -12891,7 +12918,7 @@ segments:
|
|||||||
- [0xEE65B0, c]
|
- [0xEE65B0, c]
|
||||||
- [0xEE70C0, c]
|
- [0xEE70C0, c]
|
||||||
- [0xEE8940, c]
|
- [0xEE8940, c]
|
||||||
- [0xEE8970, data]
|
- [0xEE8970, data, dead/EE8970]
|
||||||
- [0xEEB900]
|
- [0xEEB900]
|
||||||
- type: code
|
- type: code
|
||||||
start: 0xEED100
|
start: 0xEED100
|
||||||
@ -12902,7 +12929,7 @@ segments:
|
|||||||
- [0xEED1E0, c]
|
- [0xEED1E0, c]
|
||||||
- [0xEEDF50, c]
|
- [0xEEDF50, c]
|
||||||
- [0xEEFAA0, c]
|
- [0xEEFAA0, c]
|
||||||
- [0xEEFAD0, data]
|
- [0xEEFAD0, data, dead/EEFAD0]
|
||||||
- [0xEF2550]
|
- [0xEF2550]
|
||||||
- type: code
|
- type: code
|
||||||
start: 0xEF2610
|
start: 0xEF2610
|
||||||
@ -12911,7 +12938,7 @@ segments:
|
|||||||
- [0xEF2610, c]
|
- [0xEF2610, c]
|
||||||
- [0xEF2650, c]
|
- [0xEF2650, c]
|
||||||
- [0xEF2680, c, EF2680]
|
- [0xEF2680, c, EF2680]
|
||||||
- [0xEF58E0, data]
|
- [0xEF58E0, data, dead/EF58E0]
|
||||||
- [0xEF79C0]
|
- [0xEF79C0]
|
||||||
- type: code
|
- type: code
|
||||||
start: 0xEF7A80
|
start: 0xEF7A80
|
||||||
@ -12920,7 +12947,7 @@ segments:
|
|||||||
- [0xEF7A80, c]
|
- [0xEF7A80, c]
|
||||||
- [0xEF7FB0, c]
|
- [0xEF7FB0, c]
|
||||||
- [0xEF8010, c]
|
- [0xEF8010, c]
|
||||||
- [0xEF8250, data]
|
- [0xEF8250, data, dead/EF8250]
|
||||||
- type: code
|
- type: code
|
||||||
start: 0xEFEB00
|
start: 0xEFEB00
|
||||||
vram: 0x80240000
|
vram: 0x80240000
|
||||||
|
@ -25752,7 +25752,6 @@ dead_gCurrentCameraID = 0x8007C760; // type:data
|
|||||||
dead_gItemTable = 0x8008D2C0; // type:data
|
dead_gItemTable = 0x8008D2C0; // type:data
|
||||||
rdpstateinit_dl = 0x80093BB8; // type:data
|
rdpstateinit_dl = 0x80093BB8; // type:data
|
||||||
D_80094664 = 0x80094664; // type:data
|
D_80094664 = 0x80094664; // type:data
|
||||||
D_80094900 = 0x80094900; // type:data
|
|
||||||
D_80097D60 = 0x80097D60; // type:data
|
D_80097D60 = 0x80097D60; // type:data
|
||||||
D_80097D68 = 0x80097D68; // type:data
|
D_80097D68 = 0x80097D68; // type:data
|
||||||
D_80097D70 = 0x80097D70; // type:data
|
D_80097D70 = 0x80097D70; // type:data
|
||||||
@ -27929,6 +27928,7 @@ D_80079540 = 0x80079540; // type:data dead:yes
|
|||||||
dead_gCurrentCameraID = 0x8007C760; // type:data dead:yes
|
dead_gCurrentCameraID = 0x8007C760; // type:data dead:yes
|
||||||
dead_gItemTable = 0x8008D2C0; // type:data dead:true
|
dead_gItemTable = 0x8008D2C0; // type:data dead:true
|
||||||
dead_gItemTable = 0x8008D2C0; // type:data dead:yes
|
dead_gItemTable = 0x8008D2C0; // type:data dead:yes
|
||||||
|
dead_gPartnerPopupProperties = 0x80094900; // type:data dead:yes
|
||||||
dead_gCurrentCamID = 0x800A158C; // type:data dead:yes
|
dead_gCurrentCamID = 0x800A158C; // type:data dead:yes
|
||||||
dead_gOverrideFlags = 0x800A15A8; // type:data dead:yes
|
dead_gOverrideFlags = 0x800A15A8; // type:data dead:yes
|
||||||
dead_gCurrentEncounter = 0x800B7EF0; // type:data dead:yes
|
dead_gCurrentEncounter = 0x800B7EF0; // type:data dead:yes
|
||||||
|
@ -389,6 +389,7 @@ D_80246894 = 0x80246894;
|
|||||||
dead_gCurrentCameraID = 0x8007C760;
|
dead_gCurrentCameraID = 0x8007C760;
|
||||||
dead_gGameStatusPtr = 0x80079430;
|
dead_gGameStatusPtr = 0x80079430;
|
||||||
D_80079540 = 0x80079540;
|
D_80079540 = 0x80079540;
|
||||||
|
dead_gPartnerPopupProperties = 0x80094900;
|
||||||
|
|
||||||
// TODO below
|
// TODO below
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user