Tidying and msg.c work (#311)

* undefined syms cleanup

* moving all remaining undefined funcs to dead_syms (as they're dead)

* Rename and update MessagePrintState

* msg wip

* B9D60 -> msg

* msg stuff

* .

* PR stuff
This commit is contained in:
Ethan Roseman 2021-07-13 09:43:14 -04:00 committed by GitHub
parent a854c70a5c
commit f02743e1cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
53 changed files with 966 additions and 680 deletions

View File

@ -1057,39 +1057,98 @@ typedef struct SpriteComponent {
/* 0x4C */ char unk_4C[4];
} SpriteComponent; // size = 0x50
typedef struct PrintContext {
/* 0x000 */ s8* string;
/* 0x004 */ s16 bufPos;
typedef struct MessagePrintState {
/* 0x000 */ s8* srcBuffer;
/* 0x004 */ s16 printBufferPos;
/* 0x006 */ char unk_06[2];
/* 0x008 */ s32 stringID;
/* 0x00C */ char unk_0C[4];
/* 0x010 */ u8 buffer[1024];
/* 0x410 */ char unk_410[68];
/* 0x00C */ s16 srcBufferPos;
/* 0x00E */ s16 currentPrintDelay;
/* 0x010 */ u8 printBuffer[1088]; // slightly larger than source buffer
/* 0x450 */ s16 printBufferSize;
/* 0x452 */ u16 effectFrameCounter;
/* 0x454 */ u8 font;
/* 0x455 */ char unk_455;
/* 0x456 */ s16 startPosX;
/* 0x458 */ s16 startPosY;
/* 0x45A */ char unk_45A[45];
/* 0x455 */ s8 fontVariant;
/* 0x456 */ Vec2s windowOffsetPos; // offset from baseWindowPos. used to animated window pos?
/* 0x45A */ Vec2s windowBasePos; // ex: set by the parameters for choice style
/* 0x45E */ s8 printDelayTime; // delay to print each chunk
/* 0x45F */ s8 charsPerChunk; // how many chars to print at once
/* 0x460 */ s32 curLinePos; // position along current line
/* 0x464 */ s8 unk_464;
/* 0x465 */ char unk_465;
/* 0x466 */ s16 nextLinePos; // ?
/* 0x468 */ s8 lineCount;
/* 0x469 */ char unk_469[0x3];
/* 0x46C */ s32 unk_46C;
/* 0x470 */ s8 currentAnimFrame[4];
/* 0x474 */ s16 animTimers[4];
/* 0x47C */ s8 rewindArrowAnimState;
/* 0x47D */ char unk_47D[0x1];
/* 0x47E */ s16 rewindArrowBlinkCounter;
/* 0x480 */ s16 unk_480;
/* 0x482 */ Vec2s rewindArrowPos;
/* 0x486 */ s8 currentLine;
/* 0x487 */ u8 unkArraySize;
/* 0x488 */ s16 unkArrayunkLength[4];
/* 0x490 */ char unk_490[0x58];
/* 0x488 */ s16 lineEndPos[4];
/* 0x490 */ char unk_490[0x38];
/* 0x4C8 */ s16 unk_4C8;
/* 0x4CA */ s16 unk_4CA;
/* 0x4CC */ s16 unk_4CC;
/* 0x4CE */ s8 maxOption;
/* 0x4CF */ char unk_4CF[0x1];
/* 0x4D0 */ s16 cursorPosX[6];
/* 0x4DC */ s16 cursorPosY[6];
/* 0x4E8 */ u8 currentOption;
/* 0x4E9 */ char unk_4E9[19];
/* 0x4E9 */ s8 madeChoice;
/* 0x4EA */ u8 cancelOption;
/* 0x4EB */ char unk_4EB[0x1];
/* 0x4EC */ s8 targetOption;
/* 0x4ED */ s8 unkCounter;
/* 0x4EE */ s8 selectedOption;
/* 0x4EF */ char unk_4EF[0x9];
/* 0x4F8 */ u8 windowState;
/* 0x4F9 */ char unk_4F9[0x3];
/* 0x4FC */ s32 stateFlags;
/* 0x500 */ char unk_500[9];
/* 0x509 */ u8 lerpElpasedTime;
/* 0x50A */ s16 startX;
/* 0x50C */ s16 startY;
/* 0x50E */ char unk_50E[6];
/* 0x514 */ s16 sizeY;
/* 0x516 */ s16 sizeX;
/* 0x518 */ char unk_518[19];
/* 0x500 */ s16 delayFlags; // ?
/* 0x502 */ char unk_502[0x2];
/* 0x504 */ s32* closedWritebackBool; // if not null, writes 1 here when message closes
/* 0x508 */ s8 style;
/* 0x509 */ s8 fadeInCounter;
/* 0x50A */ Vec2s initOpenPos; // where the message originates from, in screen-space coords
/* 0x50E */ Vec2s openStartPos;
/* 0x512 */ s8 fadeOutCounter;
/* 0x513 */ char unk_513[0x1];
/* 0x514 */ Vec2s windowSize;
/* 0x518 */ s8 speechSoundType;
/* 0x519 */ u8 volume;
/* 0x51A */ s8 speechPan; // just pan?
/* 0x51B */ char unk_51B[0x1];
/* 0x51C */ u16 speechVolumePitch;
/* 0x51E */ char unk_51E[0x2];
/* 0x520 */ s32 speedSoundIDA;
/* 0x524 */ s32 speedSoundIDB;
/* 0x528 */ s16 varBufferReadPos;
/* 0x52A */ s8 unk_52A;
/* 0x52B */ u8 currentImageIndex;
/* 0x52C */ char unk_52C[10];
/* 0x536 */ s16 height;
/* 0x538 */ s16 width;
/* 0x53A */ char unk_53A[30];
} PrintContext; // size = 0x558
/* 0x52C */ Vec2s varImageScreenPos; // in addition, posX=0 is taken as 'dont draw'
/* 0x530 */ s8 varImgHasBorder;
/* 0x531 */ u8 varImgFinalAlpha;
/* 0x532 */ s8 varImgAlphaFadeStep; // how much to fade in per frame
/* 0x533 */ s8 varImageDisplayState; // 0 = fade in, 1 = fully visible, 2 = fade out
/* 0x534 */ s16 varImageFadeTimer; // frames faded in
/* 0x536 */ s16 stringHeight;
/* 0x538 */ s16 stringWidth;
/* 0x53A */ s8 maxLineChars;
/* 0x53B */ s8 numLines;
/* 0x53C */ s8 maxLinesPerPage;
/* 0x53D */ char unk_53D[0x3];
/* 0x540 */ f32 sizeScale;
/* 0x544 */ s32* letterBackgroundImg;
/* 0x548 */ s32* letterBackgroundPal;
/* 0x54C */ s32* letterContentImg;
/* 0x550 */ s32* letterContentPal;
/* 0x554 */ char unk_554[0x4];
} MessagePrintState; // size = 0x558
typedef struct ShopItemEntity {
/* 0x00 */ s32 index;

View File

@ -100,7 +100,7 @@ void entity_BlueSwitch_init(Entity* entity);
void entity_HugeBlueSwitch_init(Entity* entity);
// Text
PrintContext* msg_get_printer_for_string(s32 stringID, s32* a1);
MessagePrintState* msg_get_printer_for_string(s32 stringID, s32* a1);
void get_screen_coords(Cam camID, f32 x, f32 y, f32 z, s32* screenX, s32* screenY, s32* screenZ);

View File

@ -87,14 +87,14 @@ extern s32 D_8010CD20;
extern s32 D_801595A0;
extern BackgroundHeader gBackgroundImage;
extern PrintContext* gCurrentPrintContext;
extern MessagePrintState* gCurrentPrintContext;
extern s32 D_802DB264;
extern PrintContext* D_802DB268;
extern MessagePrintState* D_802DB268;
extern s32 D_802EB390;
extern s32 D_802EB394;
extern PrintContext* D_802EB398;
extern PrintContext* D_802EB39C;
extern MessagePrintState* D_802EB398;
extern MessagePrintState* D_802EB39C;
extern s32 D_802E99DC;
extern Entity* D_802EB3A0;
@ -239,6 +239,8 @@ extern u8 D_802D9D71; // player alpha2 copy?
extern DisplayContext D_80164000[];
extern MessagePrintState gMessagePrinters[3];
extern f32 gCurtainScale;
extern f32 gCurtainScaleGoal;
extern f32 gCurtainFade;

View File

@ -1,14 +1,14 @@
#include "common.h"
extern PrintContext* gSpeakingActorPrintCtx;
extern PrintContext* D_8029FA64;
extern MessagePrintState* gSpeakingActorPrintCtx;
extern MessagePrintState* D_8029FA64;
extern s32 gSpeakingActorPrintIsDone; // unk_08
extern s32 gSpeakingActorTalkAnim;
extern s32 gSpeakingActorIdleAnim;
extern Actor* gSpeakingActor;
extern ActorPart* gSpeakingActorPart;
void msg_printer_set_origin_pos(PrintContext* printer, s32 x, s32 y);
void msg_printer_set_origin_pos(MessagePrintState* printer, s32 x, s32 y);
ApiStatus ActorSpeak(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
@ -17,7 +17,7 @@ ApiStatus ActorSpeak(ScriptInstance* script, s32 isInitialCall) {
s32 stringID;
ActorID actorID;
s32 partIndex;
PrintContext** printContext;
MessagePrintState** printContext;
s32 anim;
f32 headX, headY, headZ;

View File

@ -1343,7 +1343,7 @@ void add_part_decoration(ActorPart* part, s32 decorationIndex, DecorationID deco
void add_actor_decoration(Actor* actor, s32 decorationIndex, DecorationID decorationType) {
ActorPart* part;
for (part = actor->partsTable; part != NULL; part = part->nextPart) {
if ((part->flags & 0x100001) == 0 && part->idleAnimations && (part->flags & 2) == 0) {
if ((part->flags & 0x100001) == 0 && part->idleAnimations && !(part->flags & 2)) {
add_part_decoration(part, decorationIndex, decorationType);
}
}
@ -1356,7 +1356,7 @@ void remove_part_decoration(ActorPart* part, s32 decorationIndex) {
void remove_actor_decoration(Actor* actor, s32 decorationIndex) {
ActorPart* part;
for (part = actor->partsTable; part != NULL; part = part->nextPart) {
if ((part->flags & 0x100001) == 0 && part->idleAnimations && (part->flags & 2) == 0) {
if ((part->flags & 0x100001) == 0 && part->idleAnimations && !(part->flags & 2)) {
remove_part_decoration(part, decorationIndex);
}
}
@ -1369,7 +1369,7 @@ s32 player_team_is_ability_active(Actor* actor, Ability ability) {
if (actorGenus != 0x100) {
// Separate ifs required to match
if (actorGenus <= 0x100) {
if (actorGenus == 0 && (gBattleStatus.flags2 & 0x40) == 0) {
if (actorGenus == 0 && !(gBattleStatus.flags2 & 0x40)) {
hasAbility = is_ability_active(ability);
}
}

View File

@ -1,125 +0,0 @@
#include "common.h"
#define MSG_ROM_START 0x1B83000
extern Gfx D_8014C500[];
extern s32 D_801512F4; // message images?
extern s16 D_80155C98;
void clear_character_set(void) {
D_80155C98 = -1;
}
INCLUDE_ASM(s32, "B9D60", clear_printers);
INCLUDE_ASM(s32, "B9D60", load_font_data);
INCLUDE_ASM(s32, "B9D60", load_font);
INCLUDE_ASM(s32, "B9D60", update_messages);
INCLUDE_ASM(s32, "B9D60", _update_message);
INCLUDE_ASM(s32, "B9D60", render_messages);
INCLUDE_ASM(s32, "B9D60", msg_play_speech_sound);
INCLUDE_ASM(s32, "B9D60", msg_copy_to_print_buffer);
INCLUDE_ASM(s32, "B9D60", initialize_printer);
void dma_load_string(u32 msgID, void* dest) {
u8* addr = (u8*) MSG_ROM_START + (msgID >> 14); // (msgID >> 16) * 4
u8* offset[2]; // start, end
dma_copy(addr, addr + 4, &offset[0]); // Load section offset
addr = MSG_ROM_START + offset[0] + (msgID & 0xFFFF) * 4;
dma_copy(addr, addr + 8, &offset); // Load message start and end offsets
// Load the msg data
dma_copy(MSG_ROM_START + offset[0], MSG_ROM_START + offset[1], dest);
}
INCLUDE_ASM(s32, "B9D60", load_message_to_buffer);
PrintContext* msg_get_printer_for_string(s32 stringID, s32* a1) {
return _msg_get_printer_for_string(stringID, a1, 0);
}
INCLUDE_ASM(s32, "B9D60", _get_printer_for_string);
INCLUDE_ASM(s32, "B9D60", msg_printer_load_string);
INCLUDE_ASM(s32, "B9D60", msg_printer_set_origin_pos);
s32 cancel_message(PrintContext* printContext) {
if ((printContext->stateFlags & 2) == 0) {
return 0;
}
printContext->stateFlags |= 1;
return 1;
}
void set_message_images(s32* images) {
D_801512F4 = images;
}
INCLUDE_ASM(s32, "B9D60", set_message_string);
INCLUDE_ASM(s32, "B9D60", set_message_value);
void close_message(PrintContext* printContext) {
printContext->stateFlags &= ~0x40;
}
INCLUDE_ASM(s32, "B9D60", msg_get_print_char_width);
INCLUDE_ASM(s32, "B9D60", msg_get_draw_char_width);
INCLUDE_ASM(s32, "B9D60", get_string_properties);
INCLUDE_ASM(s32, "B9D60", get_string_width);
INCLUDE_ASM(s32, "B9D60", get_string_lines);
INCLUDE_ASM(s32, "B9D60", draw_string);
INCLUDE_ASM(s32, "B9D60", msg_update_rewind_arrow);
INCLUDE_ASM(s32, "B9D60", msg_draw_rewind_arrow);
INCLUDE_ASM(s32, "B9D60", msg_draw_choice_pointer);
INCLUDE_ASM(s32, "B9D60", draw_digit);
INCLUDE_ASM(void, "B9D60", draw_number, s32 value, s32 x, s32 y, s32 arg3, s32 palette, s32 opacity, s32 style);
void drawbox_message_delegate(s32 arg0) {
appendGfx_message(arg0, 0, 0, 0, 0, 4, 0);
}
INCLUDE_ASM(s32, "B9D60", draw_message_window);
INCLUDE_ASM(s32, "B9D60", appendGfx_message);
void msg_reset_gfx_state(void) {
gDPPipeSync(gMasterGfxPos++);
gSPDisplayList(gMasterGfxPos++, D_8014C500);
}
INCLUDE_ASM(s32, "B9D60", msg_draw_char);
INCLUDE_ASM(s32, "B9D60", msg_draw_prim_rect);
INCLUDE_ASM(s32, "B9D60", appendGfx_msg_prim_rect);
INCLUDE_ASM(s32, "B9D60", msg_draw_speech_bubble);
INCLUDE_ASM(s32, "B9D60", msg_draw_speech_arrow);
INCLUDE_ASM(s32, "B9D60", msg_draw_frame);
INCLUDE_ASM(s32, "B9D60", msg_get_glyph);

View File

@ -286,7 +286,7 @@ static s32 D_801512C0;
static s32 D_801512C4;
static s32 D_801512C8[6];
static ModelTransformGroupList* gCurrentTransformGroups;
static s8 D_801512E4[0x4];
static s8 gMsgGlobalWaveCounter[0x4];
static s8 D_801512E8[0x8];
static s8 B_801512F0[0x410];
static GameMode gMainGameState[2]; // TODO rename

View File

@ -48,7 +48,7 @@ ApiStatus ShowMessageAtScreenPos(ScriptInstance* script, s32 isInitialCall) {
ApiStatus ShowMessageAtWorldPos(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
PrintContext** currentPrintContext;
MessagePrintState** currentPrintContext;
s32* currentCameraID = &gCurrentCameraID;
if (isInitialCall) {
@ -114,7 +114,7 @@ ApiStatus SwitchMessage(ScriptInstance* script, s32 isInitialCall) {
ApiStatus ShowChoice(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
PrintContext** temp802DB268;
MessagePrintState** temp802DB268;
if (isInitialCall) {
s32 stringID = get_variable(script, *args++);

721
src/msg.c Normal file
View File

@ -0,0 +1,721 @@
#include "common.h"
#define MSG_ROM_START 0x1B83000
extern s16 gNextMessageBuffer;
extern Gfx D_8014C500[];
extern s32 gMsgBGScrollAmtX;
extern u16 gMsgGlobalWaveCounter;
extern s32 gMsgVarImages; // message images?
extern s32 gMsgBGScrollAmtY;
extern s32 D_80151338;
extern char gMessageBufferA[1024];
extern char gMessageStringVars[3][32];
extern s16 D_80155C98;
extern s32 D_802ED970;
extern s32 D_802EE8D0;
extern s32 D_802F39D0;
extern s32 D_802F4560;
s32 _update_message(MessagePrintState*);
void clear_character_set(void) {
D_80155C98 = -1;
}
void clear_printers(void) {
s32 i;
for (i = 0; i < ARRAY_COUNT(gMessagePrinters); i++) {
initialize_printer(&gMessagePrinters[i], 0, 0);
}
gMsgBGScrollAmtX = 0;
gMsgBGScrollAmtY = 0;
for (i = 0; i < ARRAY_COUNT(gMessageStringVars); i++) {
gMessageStringVars[i][0] = 0;
}
D_80151338 = 0;
gMsgGlobalWaveCounter = 0;
load_font(0);
}
// needs rom split around 0x10F1B0
void load_font_data(s32 start, u16 size, s32* dest);
#ifdef NON_MATCHING
void load_font_data(s32 start, u16 size, s32* dest) {
u8* temp_a0;
temp_a0 = start + 0x10F1B0;
dma_copy(temp_a0, temp_a0 + size, dest);
}
#else
INCLUDE_ASM(void, "msg", load_font_data, s32 start, u16 size, s32* dest);
#endif
// Needs symbols for font offsets
#ifdef NON_MATCHING
void load_font(s32 font) {
if (font != D_80155C98) {
if (font == 0) {
load_font_data(0, 0x5100, &D_802EE8D0);
load_font_data(0x5300, 0x500, &D_802F4560);
} else if (font == 1) {
load_font_data(0x5800, 0xF60, &D_802ED970);
load_font_data(0x6760, 0xB88, &D_802F39D0);
load_font_data(0x72E8, 0x80, &D_802F4560);
}
}
}
#else
INCLUDE_ASM(void, "msg", load_font, s32 font);
#endif
void load_font(s32 font);
void update_messages(void) {
s32 i;
gMsgGlobalWaveCounter++;
if (gMsgGlobalWaveCounter >= 360) {
gMsgGlobalWaveCounter = 0;
}
for (i = 0; i < ARRAY_COUNT(gMessagePrinters); i++) {
if (gMessagePrinters[i].stateFlags & 2) {
_update_message(&gMessagePrinters[i]);
}
}
gMsgBGScrollAmtX += 12;
gMsgBGScrollAmtY -= 12;
if (gMsgBGScrollAmtX >= 2048) {
gMsgBGScrollAmtX -= 2048;
}
if (gMsgBGScrollAmtY < 0) {
gMsgBGScrollAmtY += 2048;
}
}
#ifdef NON_MATCHING
s32 _update_message(MessagePrintState* printer) {
GameStatus* temp_v0_5;
f32 temp_f4;
s32 temp_a1_3;
s32 temp_v0_2;
u32 temp_v1;
u8 temp_v1_2;
s32 phi_a3;
s32 phi_a0;
u8 phi_v0;
s32 phi_a0_2;
MessagePrintState* phi_a0_4;
s32 phi_a1_2;
s32 phi_s1;
u8 phi_a1_3;
s16 phi_v1;
s32 phi_a0_5;
printer->effectFrameCounter++;
if (printer->effectFrameCounter >= 3600) {
printer->effectFrameCounter = 0;
}
temp_f4 = (f32) ((((f64) (f32) printer->initOpenPos.x - 160.0) / 3.8) + 64.0);
if (temp_f4 < 5.0) {
temp_f4 = 5.0f;
} else if (temp_f4 > 122.0) {
temp_f4 = 122.0f;
}
if (temp_f4 >= 2.1474836e9f) {
printer->unk_51A = ((s8)(temp_f4 - 2.1474836e9f));
} else {
printer->unk_51A = temp_f4;
}
if (!(printer->stateFlags & 0x40)) {
if (!(printer->stateFlags & 0x30)) {
temp_v1_2 = printer->windowState;
if (temp_v1_2 != 7) {
if (temp_v1_2 < 8) {
if (temp_v1_2 != 5) {
phi_s1 = 0;
} else {
phi_a3 = 0x8000;
if (printer->stateFlags & 0x80000) {
phi_a3 = 0x8004;
}
if (((phi_a3 & gGameStatusPtr->pressedButtons)) || ((gGameStatusPtr->currentButtons & 0x4000) != 0)) {
printer->windowState = 4;
printer->currentPrintDelay = 0;
printer->stateFlags |= 0x4;
if ((gGameStatusPtr->pressedButtons & 0x8004) != 0) {
phi_s1 = 1;
sfx_play_sound_with_params(0xC9, 0, 0, 0);
} else {
if (printer->srcBuffer[printer->srcBufferPos] != 0xFD) {
printer->stateFlags |= 0x104;
if (printer->fontVariant == 0) {
if (printer->srcBuffer[printer->srcBufferPos] == 0xC3) {
phi_a0 = 0xCC;
} else {
block_29:
printer->stateFlags |= 0x184;
phi_a0 = 0xCC;
}
} else {
goto block_29;
}
sfx_play_sound_with_params(phi_a0, 0, 0, 0);
}
if ((printer->style - 1) < 4U) {
sfx_play_sound_with_params(0xC9, 0, 0, 0);
}
}
} else {
if ((gGameStatusPtr->pressedButtons & 0x2000) != 0) {
if (!(printer->stateFlags & 0x40000)) {
if (printer->currentLine != 0) {
printer->windowState = 0xB;
printer->unk_4CC = 0;
phi_v0 = printer->currentLine - 1;
phi_a0_2 = 0xCD;
block_44:
printer->unkArraySize = phi_v0;
temp_v0_2 = printer->curLinePos - printer->lineEndPos[phi_v0 & 0xFF];
if (temp_v0_2 < 0) {
temp_v0_2 = -temp_v0_2;
}
printer->unk_4C8 = temp_v0_2;
sfx_play_sound_with_params(phi_a0_2, 0, 0, 0);
}
}
}
}
}
} else if (temp_v1_2 != 8) {
if (temp_v1_2 == 0xC) {
if (gGameStatusPtr->pressedButtons & 0x4000) {
printer->windowState = 0xB;
printer->unk_4CC = 0;
phi_v0 = printer->currentLine;
phi_a0_2 = 0xCC;
goto block_44;
}
if (gGameStatusPtr->pressedButtons & 0x2000) {
if (printer->unkArraySize != 0) {
printer->windowState = 0xB;
printer->unk_4CC = 0;
phi_v0 = printer->unkArraySize - 1;
phi_a0_2 = 0xCD;
goto block_44;
}
} else {
if (gGameStatusPtr->pressedButtons & 0x8000) {
printer->windowState = 0xB;
printer->unk_4CC = 0;
phi_v0 = printer->unkArraySize + 1;
phi_a0_2 = 0xCE;
goto block_44;
}
}
}
} else {
block_65:
printer->unkCounter++;
if ((printer->unkCounter & 0xFF) >= 5U) {
printer->windowState = 7;
printer->currentOption = printer->targetOption;
printer->selectedOption = printer->targetOption;
}
}
} else {
if (gGameStatusPtr->pressedButtons & 0x8000) {
printer->madeChoice = 1;
printer->windowState = 4;
printer->unkCounter = 0;
printer->stateFlags |= 0x20000;
sfx_play_sound_with_params(0xC9, 0, 0, 0);
} else {
if ((printer->cancelOption != 0xFF) && (gGameStatusPtr->pressedButtons & 0x4000)) {
if (printer->cancelOption < printer->maxOption) {
printer->selectedOption = printer->cancelOption;
} else {
printer->selectedOption = printer->currentOption;
}
printer->madeChoice = 1;
printer->windowState = 4;
printer->unkCounter = 0;
printer->currentOption = printer->cancelOption;
printer->stateFlags |= 0x20000;
sfx_play_sound_with_params(0xCA, 0, 0, 0);
}
if (gGameStatusPtr->heldButtons & 0x20000) {
if (printer->currentOption != printer->maxOption - 1) {
printer->targetOption = printer->currentOption + 1;
printer->windowState = 8;
printer->unkCounter = 1;
sfx_play_sound_with_params(0xCA, 0, 0, 0);
}
} else if (gGameStatusPtr->heldButtons & 0x10000) {
if (printer->currentOption != 0) {
printer->targetOption = printer->currentOption - 1;
printer->windowState = 8;
printer->unkCounter = 1;
sfx_play_sound_with_params(0xCA, 0, 0, 0);
}
}
}
if (printer->windowState == 8) {
goto block_65;
}
}
} else {
if (!(printer->stateFlags & 0x20)) {
if (printer->windowState == 5) {
if ((gGameStatusPtr->pressedButtons & 0x8000) != 0) {
printer->windowState = 4;
printer->currentPrintDelay = 0;
printer->stateFlags |= 4;
}
}
}
}
if (printer->stateFlags & 4) {
phi_a1_2 = 0;
if ((gGameStatusPtr->currentButtons & 0x8000) == 0) {
printer->stateFlags &= ~0x4;
}
}
do {
temp_a1_3 = phi_a1_2 + 1;
if (printer->animTimers[0] > 0) {
printer->animTimers[0]--;
}
phi_a0_4 += 2;
phi_a1_2 = temp_a1_3;
} while ((temp_a1_3 < 4) != 0);
switch (printer->windowState) {
case 1:
block_84:
block_85:
if (printer->windowState == 1) {
printer->windowState = 4;
phi_a1_3 = printer->charsPerChunk;
printer->currentPrintDelay = 0;
} else {
if (printer->stateFlags & 0x100) {
phi_a1_3 = 0xC;
printer->currentPrintDelay = 0;
}
phi_a1_3 = printer->charsPerChunk;
if (!(printer->stateFlags & 0x4)) {
if (!(printer->stateFlags & 0x30)) {
if (gGameStatusPtr->currentButtons & 0x8000) {
phi_a1_3 = 6;
printer->currentPrintDelay = 0;
}
}
}
}
if ((printer->currentPrintDelay == 0) || (printer->currentPrintDelay--, (printer->currentPrintDelay == 0))) {
msg_copy_to_print_buffer(printer, phi_a1_3, 0);
}
goto block_135;
case 4:
temp_v0_5 = gGameStatusPtr;
if ((temp_v0_5->pressedButtons & 0x8000) | (temp_v0_5->currentButtons & 0x4000)) {
if (!(printer->stateFlags & 0x30) && ((phi_s1 & 0xFF) == 0)) {
printer->stateFlags |= 0x100;
goto block_84;
}
}
goto block_85;
case 6:
if ((gGameStatusPtr->pressedButtons & 0xC000) != 0) {
if (!(printer->stateFlags & 0x30)) {
printer->stateFlags |= 0x100;
}
}
printer->curLinePos += printer->unk_464;
if ((printer->stateFlags & 0x100) || ((!(printer->stateFlags & 0x14)) && ((gGameStatusPtr->currentButtons & 0x8000) != 0))) {
printer->curLinePos += 6;
}
if (printer->curLinePos >= printer->nextLinePos) {
printer->windowState = 4;
printer->curLinePos = printer->nextLinePos;
printer->stateFlags |= 4;
if (((printer->style - 7) < 2U) || (printer->srcBuffer[printer->srcBufferPos] == 0xF1)) {
printer->currentPrintDelay = 0;
} else {
printer->currentPrintDelay = 5;
}
printer->lineEndPos[printer->currentLine] = printer->unk_462;
}
goto block_135;
case 11:
printer->unk_4CC++;
phi_v1 = printer->curLinePos - printer->lineEndPos[printer->unkArraySize];
if (phi_v1 < 0) {
phi_v1 = -phi_v1;
}
if (printer->unk_4C8 < 0x11U) {
if (phi_v1 < 0xF) {
phi_a0_5 = 2;
if (!(phi_v1 < 9)) {
phi_a0_5 = 3;
}
} else {
phi_a0_5 = 4;
}
} else if (phi_v1 > 96) {
phi_a0_5 = 10;
} else if (phi_v1 > 48) {
phi_a0_5 = 9;
} else if (phi_v1 >= 24) {
phi_a0_5 = 7;
} else if (phi_v1 >= 16) {
phi_a0_5 = 5;
} else {
if (phi_v1 >= 8) {
phi_a0_5 = 4;
}
phi_a0_5 = 2;
if (!(phi_v1 < 5)) {
phi_a0_5 = 3;
}
}
printer->unk_4CA = phi_a0_5;
if (printer->lineEndPos[printer->unkArraySize] >= printer->curLinePos) {
printer->curLinePos += phi_a0_5;
if (printer->curLinePos >= printer->lineEndPos[printer->unkArraySize]) {
printer->curLinePos = printer->lineEndPos[printer->unkArraySize];
printer->windowState = 0xC;
if (printer->unkArraySize == printer->currentLine) {
printer->windowState = 5;
printer->rewindArrowAnimState = 0;
printer->rewindArrowBlinkCounter = 0;
}
}
} else {
printer->curLinePos -= phi_a0_5;
if (printer->lineEndPos[printer->unkArraySize] >= printer->curLinePos) {
printer->curLinePos = printer->lineEndPos[printer->unkArraySize];
printer->windowState = 0xC;
}
}
default:
block_135:
if (printer->stateFlags & 1) {
printer->windowState = 0;
printer->stateFlags = 0;
if (printer->letterBackgroundImg != NULL) {
general_heap_free(printer->letterBackgroundImg);
}
if (printer->letterBackgroundPal != NULL) {
general_heap_free(printer->letterBackgroundPal);
}
if (printer->letterContentImg != NULL) {
general_heap_free(printer->letterContentImg);
}
if (printer->letterContentPal != NULL) {
general_heap_free(printer->letterContentPal);
}
if (printer->closedWritebackBool != NULL) {
*printer->closedWritebackBool = 1;
printer->closedWritebackBool = NULL;
}
}
}
}
return printer->windowState;
}
#else
INCLUDE_ASM(s32, "msg", _update_message, MessagePrintState* msgPrintState);
#endif
INCLUDE_ASM(s32, "msg", render_messages);
void msg_play_speech_sound(MessagePrintState* printer, u8 character) {
f32 volTemp;
s16 volume;
s32 pitchShift;
s32 flag = 1;
s32 hundred = 100;
if (printer->stateFlags & 0x800000 && !(printer->delayFlags & 6) && printer->volume != 0) {
volTemp = (f32)printer->volume / 100.0;
pitchShift = ((character % 20) * 10) + (printer->speechVolumePitch - hundred);
volume = ((rand_int(15) + 78) * volTemp);
if (volume > 255) {
volume = 255;
}
if (character & flag) {
sfx_play_sound_with_params(printer->speedSoundIDA, volume, printer->speechPan, pitchShift);
} else {
sfx_play_sound_with_params(printer->speedSoundIDB, volume, printer->speechPan, pitchShift);
}
}
}
INCLUDE_ASM(s32, "msg", msg_copy_to_print_buffer);
void initialize_printer(MessagePrintState* printer, s32 arg1, s32 arg2) {
s32 i;
printer->printBufferSize = ARRAY_COUNT(printer->printBuffer);
printer->printBuffer[0] = 0xFB; // next (TODO: make enum for this)
printer->printDelayTime = 1;
printer->charsPerChunk = 1;
printer->unk_464 = 6;
printer->srcBuffer = NULL;
printer->stringID = 0;
printer->currentPrintDelay = 0;
printer->windowOffsetPos.x = 0;
printer->windowOffsetPos.y = 0;
printer->windowBasePos.x = 0;
printer->windowBasePos.y = 0;
printer->rewindArrowAnimState = 0;
printer->rewindArrowBlinkCounter = 0;
printer->rewindArrowPos.x = 0;
printer->rewindArrowPos.y = 0;
printer->currentLine = 0;
printer->unkArraySize = 0;
printer->maxOption = 0;
printer->madeChoice = 0;
printer->currentOption = 0;
printer->selectedOption = 0;
printer->cancelOption = -1;
printer->windowState = 0;
printer->stateFlags = 0;
printer->delayFlags = 0;
printer->closedWritebackBool = NULL;
printer->printBufferPos = 0;
printer->srcBufferPos = 0;
printer->font = 0;
printer->fontVariant = 0;
printer->effectFrameCounter = 0;
printer->curLinePos = 0;
printer->unk_46C = 0;
printer->lineCount = 0;
for (i = 0; i < ARRAY_COUNT(printer->animTimers); i++) {
printer->currentAnimFrame[i] = 0;
printer->animTimers[i] = -1;
}
printer->initOpenPos.x = 160;
printer->initOpenPos.y = 40;
printer->speechSoundType = -1;
printer->speechPan = 64;
printer->volume = 75;
printer->rewindArrowBlinkCounter = 0;
printer->style = 0;
printer->fadeInCounter = 0;
printer->openStartPos.x = 0;
printer->openStartPos.y = 0;
printer->fadeOutCounter = 0;
printer->windowSize.y = 0;
printer->windowSize.x = 0;
printer->speechVolumePitch = 0;
printer->speedSoundIDA = 0;
printer->speedSoundIDB = 0;
printer->varBufferReadPos = 0;
printer->currentImageIndex = 0;
printer->varImageScreenPos.x = 0;
printer->varImageScreenPos.y = 0;
printer->varImgHasBorder = 0;
printer->varImgFinalAlpha = 255;
printer->varImageDisplayState = 0;
printer->varImageFadeTimer = 0;
printer->letterBackgroundImg = NULL;
printer->letterBackgroundPal = NULL;
printer->letterContentImg = NULL;
printer->letterContentPal = NULL;
printer->sizeScale = 1.0f;
}
void dma_load_string(u32 msgID, void* dest) {
u8* addr = (u8*) MSG_ROM_START + (msgID >> 14); // (msgID >> 16) * 4
u8* offset[2]; // start, end
dma_copy(addr, addr + 4, &offset[0]); // Load section offset
addr = MSG_ROM_START + offset[0] + (msgID & 0xFFFF) * 4;
dma_copy(addr, addr + 8, &offset); // Load message start and end offsets
// Load the msg data
dma_copy(MSG_ROM_START + offset[0], MSG_ROM_START + offset[1], dest);
}
s32 load_message_to_buffer(s32 stringID);
INCLUDE_ASM(s32, "msg", load_message_to_buffer, s32 stringID);
MessagePrintState* msg_get_printer_for_string(s32 stringID, s32* donePrintingWriteback) {
return _msg_get_printer_for_string(stringID, donePrintingWriteback, 0);
}
#ifdef NON_MATCHING
MessagePrintState* _msg_get_printer_for_string(s32 stringID, s32* donePrintingWriteback, s32 arg2) {
if (stringID != 0) {
s8* srcBuffer = (s8*) stringID;
s32 i;
if (stringID >= 0) {
srcBuffer = load_message_to_buffer(srcBuffer);
}
for (i = 0; i < ARRAY_COUNT(gMessagePrinters); i++) {
MessagePrintState* printer = &gMessagePrinters[i];
if (!(printer->stateFlags & 2)) {
s32 height;
s32 width;
s32 maxLineChars;
s32 numLines;
s32 maxLinesPerPage;
initialize_printer(printer, 1, arg2);
printer->windowState = 1;
printer->srcBuffer = srcBuffer;
printer->stringID = stringID;
printer->stateFlags |= 2;
get_string_properties(stringID, &height, &width, &maxLineChars, &numLines, &maxLinesPerPage, NULL, 0);
printer->stringHeight = height;
printer->stringWidth = width;
printer->maxLineChars = maxLineChars;
printer->numLines = numLines;
printer->maxLinesPerPage = maxLinesPerPage;
printer->closedWritebackBool = donePrintingWriteback;
if (donePrintingWriteback != NULL) {
*donePrintingWriteback = FALSE;
}
return printer;
}
}
}
return NULL;
}
#else
INCLUDE_ASM(MessagePrintState*, "msg", _msg_get_printer_for_string, s32 stringID, s32* donePrintingWriteback, s32 arg2);
#endif
INCLUDE_ASM(s32, "msg", msg_printer_load_string);
void msg_printer_set_origin_pos(MessagePrintState* msgPrintState, s16 x, s16 y) {
msgPrintState->initOpenPos.x = x;
msgPrintState->initOpenPos.y = y;
if (msgPrintState->initOpenPos.x < 0) {
msgPrintState->initOpenPos.x = 0;
}
if (msgPrintState->initOpenPos.x > 320) {
msgPrintState->initOpenPos.x = 320;
}
if (msgPrintState->initOpenPos.y < 0) {
msgPrintState->initOpenPos.y = 0;
}
if (msgPrintState->initOpenPos.y > 220) {
msgPrintState->initOpenPos.y = 220;
}
}
s32 cancel_message(MessagePrintState* msgPrintState) {
if ((msgPrintState->stateFlags & 2) == 0) {
return 0;
}
msgPrintState->stateFlags |= 1;
return 1;
}
void set_message_images(s32* images) {
gMsgVarImages = images;
}
INCLUDE_ASM(s32, "msg", set_message_string);
INCLUDE_ASM(s32, "msg", set_message_value);
void close_message(MessagePrintState* msgPrintState) {
msgPrintState->stateFlags &= ~0x40;
}
INCLUDE_ASM(s32, "msg", msg_get_print_char_width);
INCLUDE_ASM(s32, "msg", msg_get_draw_char_width);
INCLUDE_ASM(void, "msg", get_string_properties);
s32 get_string_width(s32 stringID, u16 charset) {
s32 width;
get_string_properties(stringID, 0, &width, 0, 0, 0, 0, charset);
return width;
}
s32 get_string_lines(s32 stringID) {
s32 numLines;
get_string_properties(stringID, 0, 0, 0, &numLines, 0, 0, 0);
return numLines;
}
void draw_string(s32 stringID, s32 posX, s32 posY, s32 opacity, s32 palette, s32 style);
INCLUDE_ASM(void, "msg", draw_string, s32 stringID, s32 posX, s32 posY, s32 opacity, s32 palette, s32 style);
INCLUDE_ASM(s32, "msg", msg_update_rewind_arrow);
INCLUDE_ASM(s32, "msg", msg_draw_rewind_arrow);
INCLUDE_ASM(s32, "msg", msg_draw_choice_pointer);
INCLUDE_ASM(s32, "msg", draw_digit);
INCLUDE_ASM(void, "msg", draw_number, s32 value, s32 x, s32 y, s32 arg3, s32 palette, s32 opacity, s32 style);
void drawbox_message_delegate(s32 arg0) {
appendGfx_message(arg0, 0, 0, 0, 0, 4, 0);
}
INCLUDE_ASM(s32, "msg", draw_message_window);
INCLUDE_ASM(s32, "msg", appendGfx_message);
void msg_reset_gfx_state(void) {
gDPPipeSync(gMasterGfxPos++);
gSPDisplayList(gMasterGfxPos++, D_8014C500);
}
INCLUDE_ASM(s32, "msg", msg_draw_char);
INCLUDE_ASM(s32, "msg", msg_draw_prim_rect);
INCLUDE_ASM(s32, "msg", appendGfx_msg_prim_rect);
INCLUDE_ASM(s32, "msg", msg_draw_speech_bubble);
INCLUDE_ASM(s32, "msg", msg_draw_speech_arrow);
INCLUDE_ASM(s32, "msg", msg_draw_frame);
INCLUDE_ASM(s32, "msg", msg_get_glyph);

View File

@ -2,6 +2,6 @@
#include "ld_addrs.h"
ApiStatus N(func_80240000_BFD880)(void) {
dma_copy(C20F40_ROM_START, C20F40_ROM_END, &gBackgroundImage);
dma_copy(C20F40_ROM_START, C20F40_ROM_END, C20F40_VRAM);
return ApiStatus_DONE2;
}

View File

@ -20,7 +20,7 @@ glabel MessagePlural
glabel MessageSingular
.short 0xF0FD
glabel D_8014C296
glabel gNextMessageBuffer
.short 0x0000
glabel D_8014C298

View File

@ -1,43 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel clear_printers
/* B9D74 80123674 27BDFFE0 */ addiu $sp, $sp, -0x20
/* B9D78 80123678 AFB00010 */ sw $s0, 0x10($sp)
/* B9D7C 8012367C 0000802D */ daddu $s0, $zero, $zero
/* B9D80 80123680 AFB10014 */ sw $s1, 0x14($sp)
/* B9D84 80123684 3C118015 */ lui $s1, %hi(D_80154C30)
/* B9D88 80123688 26314C30 */ addiu $s1, $s1, %lo(D_80154C30)
/* B9D8C 8012368C AFBF0018 */ sw $ra, 0x18($sp)
.L80123690:
/* B9D90 80123690 0220202D */ daddu $a0, $s1, $zero
/* B9D94 80123694 0000282D */ daddu $a1, $zero, $zero
/* B9D98 80123698 0C0495A9 */ jal initialize_printer
/* B9D9C 8012369C 00A0302D */ daddu $a2, $a1, $zero
/* B9DA0 801236A0 26100001 */ addiu $s0, $s0, 1
/* B9DA4 801236A4 2A020003 */ slti $v0, $s0, 3
/* B9DA8 801236A8 1440FFF9 */ bnez $v0, .L80123690
/* B9DAC 801236AC 26310558 */ addiu $s1, $s1, 0x558
/* B9DB0 801236B0 24100002 */ addiu $s0, $zero, 2
/* B9DB4 801236B4 3C028015 */ lui $v0, %hi(D_80155C78)
/* B9DB8 801236B8 24425C78 */ addiu $v0, $v0, %lo(D_80155C78)
/* B9DBC 801236BC 3C018015 */ lui $at, %hi(D_801512D8)
/* B9DC0 801236C0 AC2012D8 */ sw $zero, %lo(D_801512D8)($at)
/* B9DC4 801236C4 3C018015 */ lui $at, %hi(D_8015130C)
/* B9DC8 801236C8 AC20130C */ sw $zero, %lo(D_8015130C)($at)
.L801236CC:
/* B9DCC 801236CC A0400000 */ sb $zero, ($v0)
/* B9DD0 801236D0 2610FFFF */ addiu $s0, $s0, -1
/* B9DD4 801236D4 0601FFFD */ bgez $s0, .L801236CC
/* B9DD8 801236D8 2442FFE0 */ addiu $v0, $v0, -0x20
/* B9DDC 801236DC 3C018015 */ lui $at, %hi(D_80151338)
/* B9DE0 801236E0 AC201338 */ sw $zero, %lo(D_80151338)($at)
/* B9DE4 801236E4 3C018015 */ lui $at, %hi(D_801512E4)
/* B9DE8 801236E8 A42012E4 */ sh $zero, %lo(D_801512E4)($at)
/* B9DEC 801236EC 0C048DCD */ jal load_font
/* B9DF0 801236F0 0000202D */ daddu $a0, $zero, $zero
/* B9DF4 801236F4 8FBF0018 */ lw $ra, 0x18($sp)
/* B9DF8 801236F8 8FB10014 */ lw $s1, 0x14($sp)
/* B9DFC 801236FC 8FB00010 */ lw $s0, 0x10($sp)
/* B9E00 80123700 03E00008 */ jr $ra
/* B9E04 80123704 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,19 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel get_string_lines
/* BCBB0 801264B0 27BDFFD0 */ addiu $sp, $sp, -0x30
/* BCBB4 801264B4 27A20020 */ addiu $v0, $sp, 0x20
/* BCBB8 801264B8 0000282D */ daddu $a1, $zero, $zero
/* BCBBC 801264BC 00A0302D */ daddu $a2, $a1, $zero
/* BCBC0 801264C0 00A0382D */ daddu $a3, $a1, $zero
/* BCBC4 801264C4 AFBF0028 */ sw $ra, 0x28($sp)
/* BCBC8 801264C8 AFA20010 */ sw $v0, 0x10($sp)
/* BCBCC 801264CC AFA00014 */ sw $zero, 0x14($sp)
/* BCBD0 801264D0 AFA00018 */ sw $zero, 0x18($sp)
/* BCBD4 801264D4 0C0497DA */ jal get_string_properties
/* BCBD8 801264D8 AFA0001C */ sw $zero, 0x1c($sp)
/* BCBDC 801264DC 8FA20020 */ lw $v0, 0x20($sp)
/* BCBE0 801264E0 8FBF0028 */ lw $ra, 0x28($sp)
/* BCBE4 801264E4 03E00008 */ jr $ra
/* BCBE8 801264E8 27BD0030 */ addiu $sp, $sp, 0x30

View File

@ -1,19 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel get_string_width
/* BCB74 80126474 27BDFFD0 */ addiu $sp, $sp, -0x30
/* BCB78 80126478 30A5FFFF */ andi $a1, $a1, 0xffff
/* BCB7C 8012647C AFA5001C */ sw $a1, 0x1c($sp)
/* BCB80 80126480 0000282D */ daddu $a1, $zero, $zero
/* BCB84 80126484 27A60020 */ addiu $a2, $sp, 0x20
/* BCB88 80126488 00A0382D */ daddu $a3, $a1, $zero
/* BCB8C 8012648C AFBF0028 */ sw $ra, 0x28($sp)
/* BCB90 80126490 AFA00010 */ sw $zero, 0x10($sp)
/* BCB94 80126494 AFA00014 */ sw $zero, 0x14($sp)
/* BCB98 80126498 0C0497DA */ jal get_string_properties
/* BCB9C 8012649C AFA00018 */ sw $zero, 0x18($sp)
/* BCBA0 801264A0 8FA20020 */ lw $v0, 0x20($sp)
/* BCBA4 801264A4 8FBF0028 */ lw $ra, 0x28($sp)
/* BCBA8 801264A8 03E00008 */ jr $ra
/* BCBAC 801264AC 27BD0030 */ addiu $sp, $sp, 0x30

View File

@ -1,93 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel initialize_printer
/* BBDA4 801256A4 0000182D */ daddu $v1, $zero, $zero
/* BBDA8 801256A8 2406FFFF */ addiu $a2, $zero, -1
/* BBDAC 801256AC 0080282D */ daddu $a1, $a0, $zero
/* BBDB0 801256B0 24020440 */ addiu $v0, $zero, 0x440
/* BBDB4 801256B4 A4820450 */ sh $v0, 0x450($a0)
/* BBDB8 801256B8 240200FB */ addiu $v0, $zero, 0xfb
/* BBDBC 801256BC A0820010 */ sb $v0, 0x10($a0)
/* BBDC0 801256C0 24020001 */ addiu $v0, $zero, 1
/* BBDC4 801256C4 A082045E */ sb $v0, 0x45e($a0)
/* BBDC8 801256C8 A082045F */ sb $v0, 0x45f($a0)
/* BBDCC 801256CC 24020006 */ addiu $v0, $zero, 6
/* BBDD0 801256D0 A0820464 */ sb $v0, 0x464($a0)
/* BBDD4 801256D4 240200FF */ addiu $v0, $zero, 0xff
/* BBDD8 801256D8 AC800000 */ sw $zero, ($a0)
/* BBDDC 801256DC AC800008 */ sw $zero, 8($a0)
/* BBDE0 801256E0 A480000E */ sh $zero, 0xe($a0)
/* BBDE4 801256E4 A4800456 */ sh $zero, 0x456($a0)
/* BBDE8 801256E8 A4800458 */ sh $zero, 0x458($a0)
/* BBDEC 801256EC A480045A */ sh $zero, 0x45a($a0)
/* BBDF0 801256F0 A480045C */ sh $zero, 0x45c($a0)
/* BBDF4 801256F4 A080047C */ sb $zero, 0x47c($a0)
/* BBDF8 801256F8 A480047E */ sh $zero, 0x47e($a0)
/* BBDFC 801256FC A4800482 */ sh $zero, 0x482($a0)
/* BBE00 80125700 A4800484 */ sh $zero, 0x484($a0)
/* BBE04 80125704 A0800486 */ sb $zero, 0x486($a0)
/* BBE08 80125708 A0800487 */ sb $zero, 0x487($a0)
/* BBE0C 8012570C A08004CE */ sb $zero, 0x4ce($a0)
/* BBE10 80125710 A08004E9 */ sb $zero, 0x4e9($a0)
/* BBE14 80125714 A08004E8 */ sb $zero, 0x4e8($a0)
/* BBE18 80125718 A08004EE */ sb $zero, 0x4ee($a0)
/* BBE1C 8012571C A08204EA */ sb $v0, 0x4ea($a0)
/* BBE20 80125720 A08004F8 */ sb $zero, 0x4f8($a0)
/* BBE24 80125724 AC8004FC */ sw $zero, 0x4fc($a0)
/* BBE28 80125728 A4800500 */ sh $zero, 0x500($a0)
/* BBE2C 8012572C AC800504 */ sw $zero, 0x504($a0)
/* BBE30 80125730 A4800004 */ sh $zero, 4($a0)
/* BBE34 80125734 A480000C */ sh $zero, 0xc($a0)
/* BBE38 80125738 A0800454 */ sb $zero, 0x454($a0)
/* BBE3C 8012573C A0800455 */ sb $zero, 0x455($a0)
/* BBE40 80125740 A4800452 */ sh $zero, 0x452($a0)
/* BBE44 80125744 AC800460 */ sw $zero, 0x460($a0)
/* BBE48 80125748 AC80046C */ sw $zero, 0x46c($a0)
/* BBE4C 8012574C A0800468 */ sb $zero, 0x468($a0)
.L80125750:
/* BBE50 80125750 00831021 */ addu $v0, $a0, $v1
/* BBE54 80125754 A0400470 */ sb $zero, 0x470($v0)
/* BBE58 80125758 A4A60474 */ sh $a2, 0x474($a1)
/* BBE5C 8012575C 24630001 */ addiu $v1, $v1, 1
/* BBE60 80125760 28620004 */ slti $v0, $v1, 4
/* BBE64 80125764 1440FFFA */ bnez $v0, .L80125750
/* BBE68 80125768 24A50002 */ addiu $a1, $a1, 2
/* BBE6C 8012576C 3C013F80 */ lui $at, 0x3f80
/* BBE70 80125770 44810000 */ mtc1 $at, $f0
/* BBE74 80125774 240200A0 */ addiu $v0, $zero, 0xa0
/* BBE78 80125778 A482050A */ sh $v0, 0x50a($a0)
/* BBE7C 8012577C 24020028 */ addiu $v0, $zero, 0x28
/* BBE80 80125780 A482050C */ sh $v0, 0x50c($a0)
/* BBE84 80125784 2402FFFF */ addiu $v0, $zero, -1
/* BBE88 80125788 A0820518 */ sb $v0, 0x518($a0)
/* BBE8C 8012578C 24020040 */ addiu $v0, $zero, 0x40
/* BBE90 80125790 A082051A */ sb $v0, 0x51a($a0)
/* BBE94 80125794 2402004B */ addiu $v0, $zero, 0x4b
/* BBE98 80125798 A0820519 */ sb $v0, 0x519($a0)
/* BBE9C 8012579C 240200FF */ addiu $v0, $zero, 0xff
/* BBEA0 801257A0 A480047E */ sh $zero, 0x47e($a0)
/* BBEA4 801257A4 A0800508 */ sb $zero, 0x508($a0)
/* BBEA8 801257A8 A0800509 */ sb $zero, 0x509($a0)
/* BBEAC 801257AC A480050E */ sh $zero, 0x50e($a0)
/* BBEB0 801257B0 A4800510 */ sh $zero, 0x510($a0)
/* BBEB4 801257B4 A0800512 */ sb $zero, 0x512($a0)
/* BBEB8 801257B8 A4800516 */ sh $zero, 0x516($a0)
/* BBEBC 801257BC A4800514 */ sh $zero, 0x514($a0)
/* BBEC0 801257C0 A480051C */ sh $zero, 0x51c($a0)
/* BBEC4 801257C4 AC800520 */ sw $zero, 0x520($a0)
/* BBEC8 801257C8 AC800524 */ sw $zero, 0x524($a0)
/* BBECC 801257CC A4800528 */ sh $zero, 0x528($a0)
/* BBED0 801257D0 A080052B */ sb $zero, 0x52b($a0)
/* BBED4 801257D4 A480052C */ sh $zero, 0x52c($a0)
/* BBED8 801257D8 A480052E */ sh $zero, 0x52e($a0)
/* BBEDC 801257DC A0800530 */ sb $zero, 0x530($a0)
/* BBEE0 801257E0 A0820531 */ sb $v0, 0x531($a0)
/* BBEE4 801257E4 A0800533 */ sb $zero, 0x533($a0)
/* BBEE8 801257E8 A4800534 */ sh $zero, 0x534($a0)
/* BBEEC 801257EC AC800544 */ sw $zero, 0x544($a0)
/* BBEF0 801257F0 AC800548 */ sw $zero, 0x548($a0)
/* BBEF4 801257F4 AC80054C */ sw $zero, 0x54c($a0)
/* BBEF8 801257F8 AC800550 */ sw $zero, 0x550($a0)
/* BBEFC 801257FC 03E00008 */ jr $ra
/* BBF00 80125800 E4800540 */ swc1 $f0, 0x540($a0)

View File

@ -1,87 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel msg_play_speech_sound
/* BAB34 80124434 27BDFFD8 */ addiu $sp, $sp, -0x28
/* BAB38 80124438 AFB00010 */ sw $s0, 0x10($sp)
/* BAB3C 8012443C 0080802D */ daddu $s0, $a0, $zero
/* BAB40 80124440 AFBF001C */ sw $ra, 0x1c($sp)
/* BAB44 80124444 AFB20018 */ sw $s2, 0x18($sp)
/* BAB48 80124448 AFB10014 */ sw $s1, 0x14($sp)
/* BAB4C 8012444C F7B40020 */ sdc1 $f20, 0x20($sp)
/* BAB50 80124450 8E0204FC */ lw $v0, 0x4fc($s0)
/* BAB54 80124454 3C030080 */ lui $v1, 0x80
/* BAB58 80124458 00431024 */ and $v0, $v0, $v1
/* BAB5C 8012445C 1040003D */ beqz $v0, .L80124554
/* BAB60 80124460 00000000 */ nop
/* BAB64 80124464 96020500 */ lhu $v0, 0x500($s0)
/* BAB68 80124468 30420006 */ andi $v0, $v0, 6
/* BAB6C 8012446C 14400039 */ bnez $v0, .L80124554
/* BAB70 80124470 00000000 */ nop
/* BAB74 80124474 92020519 */ lbu $v0, 0x519($s0)
/* BAB78 80124478 10400036 */ beqz $v0, .L80124554
/* BAB7C 8012447C 2404000F */ addiu $a0, $zero, 0xf
/* BAB80 80124480 4482A000 */ mtc1 $v0, $f20
/* BAB84 80124484 00000000 */ nop
/* BAB88 80124488 4680A520 */ cvt.s.w $f20, $f20
/* BAB8C 8012448C 30B100FF */ andi $s1, $a1, 0xff
/* BAB90 80124490 3C02CCCC */ lui $v0, 0xcccc
/* BAB94 80124494 3442CCCD */ ori $v0, $v0, 0xcccd
/* BAB98 80124498 02220019 */ multu $s1, $v0
/* BAB9C 8012449C 3C014059 */ lui $at, 0x4059
/* BABA0 801244A0 44810800 */ mtc1 $at, $f1
/* BABA4 801244A4 44800000 */ mtc1 $zero, $f0
/* BABA8 801244A8 4600A521 */ cvt.d.s $f20, $f20
/* BABAC 801244AC 4620A503 */ div.d $f20, $f20, $f0
/* BABB0 801244B0 4620A520 */ cvt.s.d $f20, $f20
/* BABB4 801244B4 00004010 */ mfhi $t0
/* BABB8 801244B8 00081902 */ srl $v1, $t0, 4
/* BABBC 801244BC 00031080 */ sll $v0, $v1, 2
/* BABC0 801244C0 00431021 */ addu $v0, $v0, $v1
/* BABC4 801244C4 00021080 */ sll $v0, $v0, 2
/* BABC8 801244C8 02221023 */ subu $v0, $s1, $v0
/* BABCC 801244CC 304200FF */ andi $v0, $v0, 0xff
/* BABD0 801244D0 00021880 */ sll $v1, $v0, 2
/* BABD4 801244D4 00621821 */ addu $v1, $v1, $v0
/* BABD8 801244D8 9602051C */ lhu $v0, 0x51c($s0)
/* BABDC 801244DC 00031840 */ sll $v1, $v1, 1
/* BABE0 801244E0 2442FF9C */ addiu $v0, $v0, -0x64
/* BABE4 801244E4 0C00A67F */ jal rand_int
/* BABE8 801244E8 00629021 */ addu $s2, $v1, $v0
/* BABEC 801244EC 2442004E */ addiu $v0, $v0, 0x4e
/* BABF0 801244F0 44820000 */ mtc1 $v0, $f0
/* BABF4 801244F4 00000000 */ nop
/* BABF8 801244F8 46800020 */ cvt.s.w $f0, $f0
/* BABFC 801244FC 46140002 */ mul.s $f0, $f0, $f20
/* BAC00 80124500 00000000 */ nop
/* BAC04 80124504 4600008D */ trunc.w.s $f2, $f0
/* BAC08 80124508 44021000 */ mfc1 $v0, $f2
/* BAC0C 8012450C 00000000 */ nop
/* BAC10 80124510 0040282D */ daddu $a1, $v0, $zero
/* BAC14 80124514 00021400 */ sll $v0, $v0, 0x10
/* BAC18 80124518 00021403 */ sra $v0, $v0, 0x10
/* BAC1C 8012451C 28420100 */ slti $v0, $v0, 0x100
/* BAC20 80124520 50400001 */ beql $v0, $zero, .L80124528
/* BAC24 80124524 240500FF */ addiu $a1, $zero, 0xff
.L80124528:
/* BAC28 80124528 32220001 */ andi $v0, $s1, 1
/* BAC2C 8012452C 10400004 */ beqz $v0, .L80124540
/* BAC30 80124530 30A500FF */ andi $a1, $a1, 0xff
/* BAC34 80124534 8E040520 */ lw $a0, 0x520($s0)
/* BAC38 80124538 08049152 */ j .L80124548
/* BAC3C 8012453C 00123C00 */ sll $a3, $s2, 0x10
.L80124540:
/* BAC40 80124540 00123C00 */ sll $a3, $s2, 0x10
/* BAC44 80124544 8E040524 */ lw $a0, 0x524($s0)
.L80124548:
/* BAC48 80124548 9206051A */ lbu $a2, 0x51a($s0)
/* BAC4C 8012454C 0C0526AE */ jal sfx_play_sound_with_params
/* BAC50 80124550 00073C03 */ sra $a3, $a3, 0x10
.L80124554:
/* BAC54 80124554 8FBF001C */ lw $ra, 0x1c($sp)
/* BAC58 80124558 8FB20018 */ lw $s2, 0x18($sp)
/* BAC5C 8012455C 8FB10014 */ lw $s1, 0x14($sp)
/* BAC60 80124560 8FB00010 */ lw $s0, 0x10($sp)
/* BAC64 80124564 D7B40020 */ ldc1 $f20, 0x20($sp)
/* BAC68 80124568 03E00008 */ jr $ra
/* BAC6C 8012456C 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,28 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel msg_printer_set_origin_pos
/* BC1B8 80125AB8 A485050A */ sh $a1, 0x50a($a0)
/* BC1BC 80125ABC 8482050A */ lh $v0, 0x50a($a0)
/* BC1C0 80125AC0 04410002 */ bgez $v0, .L80125ACC
/* BC1C4 80125AC4 A486050C */ sh $a2, 0x50c($a0)
/* BC1C8 80125AC8 A480050A */ sh $zero, 0x50a($a0)
.L80125ACC:
/* BC1CC 80125ACC 8482050A */ lh $v0, 0x50a($a0)
/* BC1D0 80125AD0 28420141 */ slti $v0, $v0, 0x141
/* BC1D4 80125AD4 14400002 */ bnez $v0, .L80125AE0
/* BC1D8 80125AD8 24020140 */ addiu $v0, $zero, 0x140
/* BC1DC 80125ADC A482050A */ sh $v0, 0x50a($a0)
.L80125AE0:
/* BC1E0 80125AE0 8482050C */ lh $v0, 0x50c($a0)
/* BC1E4 80125AE4 04420001 */ bltzl $v0, .L80125AEC
/* BC1E8 80125AE8 A480050C */ sh $zero, 0x50c($a0)
.L80125AEC:
/* BC1EC 80125AEC 8482050C */ lh $v0, 0x50c($a0)
/* BC1F0 80125AF0 284200DD */ slti $v0, $v0, 0xdd
/* BC1F4 80125AF4 14400002 */ bnez $v0, .L80125B00
/* BC1F8 80125AF8 240200DC */ addiu $v0, $zero, 0xdc
/* BC1FC 80125AFC A482050C */ sh $v0, 0x50c($a0)
.L80125B00:
/* BC200 80125B00 03E00008 */ jr $ra
/* BC204 80125B04 00000000 */ nop

View File

@ -1,57 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel update_messages
/* B9ED8 801237D8 27BDFFE0 */ addiu $sp, $sp, -0x20
/* B9EDC 801237DC 3C038015 */ lui $v1, %hi(D_801512E4)
/* B9EE0 801237E0 246312E4 */ addiu $v1, $v1, %lo(D_801512E4)
/* B9EE4 801237E4 AFBF0018 */ sw $ra, 0x18($sp)
/* B9EE8 801237E8 AFB10014 */ sw $s1, 0x14($sp)
/* B9EEC 801237EC AFB00010 */ sw $s0, 0x10($sp)
/* B9EF0 801237F0 94620000 */ lhu $v0, ($v1)
/* B9EF4 801237F4 24420001 */ addiu $v0, $v0, 1
/* B9EF8 801237F8 A4620000 */ sh $v0, ($v1)
/* B9EFC 801237FC 3042FFFF */ andi $v0, $v0, 0xffff
/* B9F00 80123800 2C420168 */ sltiu $v0, $v0, 0x168
/* B9F04 80123804 50400001 */ beql $v0, $zero, .L8012380C
/* B9F08 80123808 A4600000 */ sh $zero, ($v1)
.L8012380C:
/* B9F0C 8012380C 0000882D */ daddu $s1, $zero, $zero
/* B9F10 80123810 3C108015 */ lui $s0, %hi(D_80154C30)
/* B9F14 80123814 26104C30 */ addiu $s0, $s0, %lo(D_80154C30)
.L80123818:
/* B9F18 80123818 8E0204FC */ lw $v0, 0x4fc($s0)
/* B9F1C 8012381C 30420002 */ andi $v0, $v0, 2
/* B9F20 80123820 50400004 */ beql $v0, $zero, .L80123834
/* B9F24 80123824 26310001 */ addiu $s1, $s1, 1
/* B9F28 80123828 0C048E26 */ jal _update_message
/* B9F2C 8012382C 0200202D */ daddu $a0, $s0, $zero
/* B9F30 80123830 26310001 */ addiu $s1, $s1, 1
.L80123834:
/* B9F34 80123834 2A220003 */ slti $v0, $s1, 3
/* B9F38 80123838 1440FFF7 */ bnez $v0, .L80123818
/* B9F3C 8012383C 26100558 */ addiu $s0, $s0, 0x558
/* B9F40 80123840 3C048015 */ lui $a0, %hi(D_801512D8)
/* B9F44 80123844 248412D8 */ addiu $a0, $a0, %lo(D_801512D8)
/* B9F48 80123848 3C068015 */ lui $a2, %hi(D_8015130C)
/* B9F4C 8012384C 24C6130C */ addiu $a2, $a2, %lo(D_8015130C)
/* B9F50 80123850 8C850000 */ lw $a1, ($a0)
/* B9F54 80123854 8CC70000 */ lw $a3, ($a2)
/* B9F58 80123858 24A2000C */ addiu $v0, $a1, 0xc
/* B9F5C 8012385C 24E3FFF4 */ addiu $v1, $a3, -0xc
/* B9F60 80123860 AC820000 */ sw $v0, ($a0)
/* B9F64 80123864 28420800 */ slti $v0, $v0, 0x800
/* B9F68 80123868 14400003 */ bnez $v0, .L80123878
/* B9F6C 8012386C ACC30000 */ sw $v1, ($a2)
/* B9F70 80123870 24A2F80C */ addiu $v0, $a1, -0x7f4
/* B9F74 80123874 AC820000 */ sw $v0, ($a0)
.L80123878:
/* B9F78 80123878 04610002 */ bgez $v1, .L80123884
/* B9F7C 8012387C 24E207F4 */ addiu $v0, $a3, 0x7f4
/* B9F80 80123880 ACC20000 */ sw $v0, ($a2)
.L80123884:
/* B9F84 80123884 8FBF0018 */ lw $ra, 0x18($sp)
/* B9F88 80123888 8FB10014 */ lw $s1, 0x14($sp)
/* B9F8C 8012388C 8FB00010 */ lw $s0, 0x10($sp)
/* B9F90 80123890 03E00008 */ jr $ra
/* B9F94 80123894 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -29,8 +29,8 @@ glabel _msg_get_printer_for_string
/* BC078 80125978 27B40028 */ addiu $s4, $sp, 0x28
/* BC07C 8012597C 27B5002C */ addiu $s5, $sp, 0x2c
/* BC080 80125980 27B60030 */ addiu $s6, $sp, 0x30
/* BC084 80125984 3C108015 */ lui $s0, %hi(D_80154C30)
/* BC088 80125988 26104C30 */ addiu $s0, $s0, %lo(D_80154C30)
/* BC084 80125984 3C108015 */ lui $s0, %hi(gMessagePrinters)
/* BC088 80125988 26104C30 */ addiu $s0, $s0, %lo(gMessagePrinters)
.L8012598C:
/* BC08C 8012598C 8E0204FC */ lw $v0, 0x4fc($s0)
/* BC090 80125990 30420002 */ andi $v0, $v0, 2

View File

@ -2362,8 +2362,8 @@ glabel L80129F74_C0674
/* C068C 80129F8C 97AD008E */ lhu $t5, 0x8e($sp)
/* C0690 80129F90 00031080 */ sll $v0, $v1, 2
/* C0694 80129F94 00431021 */ addu $v0, $v0, $v1
/* C0698 80129F98 3C038015 */ lui $v1, %hi(D_801512F4)
/* C069C 80129F9C 8C6312F4 */ lw $v1, %lo(D_801512F4)($v1)
/* C0698 80129F98 3C038015 */ lui $v1, %hi(gMsgVarImages)
/* C069C 80129F9C 8C6312F4 */ lw $v1, %lo(gMsgVarImages)($v1)
/* C06A0 80129FA0 00021080 */ sll $v0, $v0, 2
/* C06A4 80129FA4 00626021 */ addu $t4, $v1, $v0
/* C06A8 80129FA8 000D1400 */ sll $v0, $t5, 0x10
@ -3529,8 +3529,8 @@ glabel L8012AB5C_C125C
/* C1780 8012B080 44800000 */ mtc1 $zero, $f0
/* C1784 8012B084 00000000 */ nop
/* C1788 8012B088 46220001 */ sub.d $f0, $f0, $f2
/* C178C 8012B08C 3C028015 */ lui $v0, %hi(D_801512E4)
/* C1790 8012B090 944212E4 */ lhu $v0, %lo(D_801512E4)($v0)
/* C178C 8012B08C 3C028015 */ lui $v0, %hi(gMsgGlobalWaveCounter)
/* C1790 8012B090 944212E4 */ lhu $v0, %lo(gMsgGlobalWaveCounter)($v0)
/* C1794 8012B094 8C630030 */ lw $v1, 0x30($v1)
/* C1798 8012B098 4620030D */ trunc.w.d $f12, $f0
/* C179C 8012B09C 44046000 */ mfc1 $a0, $f12
@ -4538,8 +4538,8 @@ glabel L8012BF70_C2670
/* C2690 8012BF90 93C40530 */ lbu $a0, 0x530($fp)
/* C2694 8012BF94 00021880 */ sll $v1, $v0, 2
/* C2698 8012BF98 00621821 */ addu $v1, $v1, $v0
/* C269C 8012BF9C 3C028015 */ lui $v0, %hi(D_801512F4)
/* C26A0 8012BFA0 8C4212F4 */ lw $v0, %lo(D_801512F4)($v0)
/* C269C 8012BF9C 3C028015 */ lui $v0, %hi(gMsgVarImages)
/* C26A0 8012BFA0 8C4212F4 */ lw $v0, %lo(gMsgVarImages)($v0)
/* C26A4 8012BFA4 00031880 */ sll $v1, $v1, 2
/* C26A8 8012BFA8 04800078 */ bltz $a0, .L8012C18C
/* C26AC 8012BFAC 00438821 */ addu $s1, $v0, $v1

View File

@ -4,13 +4,13 @@
glabel load_message_to_buffer
/* BBF8C 8012588C 27BDFFE0 */ addiu $sp, $sp, -0x20
/* BBF90 80125890 AFB10014 */ sw $s1, 0x14($sp)
/* BBF94 80125894 3C118015 */ lui $s1, %hi(D_8014C296)
/* BBF98 80125898 2631C296 */ addiu $s1, $s1, %lo(D_8014C296)
/* BBF94 80125894 3C118015 */ lui $s1, %hi(gNextMessageBuffer)
/* BBF98 80125898 2631C296 */ addiu $s1, $s1, %lo(gNextMessageBuffer)
/* BBF9C 8012589C AFBF0018 */ sw $ra, 0x18($sp)
/* BBFA0 801258A0 AFB00010 */ sw $s0, 0x10($sp)
/* BBFA4 801258A4 86250000 */ lh $a1, ($s1)
/* BBFA8 801258A8 3C108015 */ lui $s0, %hi(D_80154430)
/* BBFAC 801258AC 26104430 */ addiu $s0, $s0, %lo(D_80154430)
/* BBFA8 801258A8 3C108015 */ lui $s0, %hi(gMessageBufferA)
/* BBFAC 801258AC 26104430 */ addiu $s0, $s0, %lo(gMessageBufferA)
/* BBFB0 801258B0 00052A80 */ sll $a1, $a1, 0xa
/* BBFB4 801258B4 0C049601 */ jal dma_load_string
/* BBFB8 801258B8 00B02821 */ addu $a1, $a1, $s0

View File

@ -351,8 +351,8 @@ glabel msg_draw_frame
/* C4770 8012E070 5C600001 */ bgtzl $v1, .L8012E078
/* C4774 8012E074 0000182D */ daddu $v1, $zero, $zero
.L8012E078:
/* C4778 8012E078 3C028015 */ lui $v0, %hi(D_801512D8)
/* C477C 8012E07C 8C4212D8 */ lw $v0, %lo(D_801512D8)($v0)
/* C4778 8012E078 3C028015 */ lui $v0, %hi(gMsgBGScrollAmtX)
/* C477C 8012E07C 8C4212D8 */ lw $v0, %lo(gMsgBGScrollAmtX)($v0)
/* C4780 8012E080 0804B824 */ j .L8012E090
/* C4784 8012E084 00431023 */ subu $v0, $v0, $v1
.L8012E088:
@ -368,8 +368,8 @@ glabel msg_draw_frame
/* C47A8 8012E0A8 5C600001 */ bgtzl $v1, .L8012E0B0
/* C47AC 8012E0AC 0000182D */ daddu $v1, $zero, $zero
.L8012E0B0:
/* C47B0 8012E0B0 3C028015 */ lui $v0, %hi(D_8015130C)
/* C47B4 8012E0B4 8C42130C */ lw $v0, %lo(D_8015130C)($v0)
/* C47B0 8012E0B0 3C028015 */ lui $v0, %hi(gMsgBGScrollAmtY)
/* C47B4 8012E0B4 8C42130C */ lw $v0, %lo(gMsgBGScrollAmtY)($v0)
/* C47B8 8012E0B8 00431023 */ subu $v0, $v0, $v1
/* C47BC 8012E0BC 0804B87E */ j .L8012E1F8
/* C47C0 8012E0C0 3042FFFF */ andi $v0, $v0, 0xffff
@ -437,8 +437,8 @@ glabel msg_draw_frame
/* C489C 8012E19C 5C600001 */ bgtzl $v1, .L8012E1A4
/* C48A0 8012E1A0 0000182D */ daddu $v1, $zero, $zero
.L8012E1A4:
/* C48A4 8012E1A4 3C028015 */ lui $v0, %hi(D_801512D8)
/* C48A8 8012E1A8 8C4212D8 */ lw $v0, %lo(D_801512D8)($v0)
/* C48A4 8012E1A4 3C028015 */ lui $v0, %hi(gMsgBGScrollAmtX)
/* C48A8 8012E1A8 8C4212D8 */ lw $v0, %lo(gMsgBGScrollAmtX)($v0)
/* C48AC 8012E1AC 0804B86F */ j .L8012E1BC
/* C48B0 8012E1B0 00431023 */ subu $v0, $v0, $v1
.L8012E1B4:
@ -454,8 +454,8 @@ glabel msg_draw_frame
/* C48D4 8012E1D4 5C600001 */ bgtzl $v1, .L8012E1DC
/* C48D8 8012E1D8 0000182D */ daddu $v1, $zero, $zero
.L8012E1DC:
/* C48DC 8012E1DC 3C028015 */ lui $v0, %hi(D_8015130C)
/* C48E0 8012E1E0 8C42130C */ lw $v0, %lo(D_8015130C)($v0)
/* C48DC 8012E1DC 3C028015 */ lui $v0, %hi(gMsgBGScrollAmtY)
/* C48E0 8012E1E0 8C42130C */ lw $v0, %lo(gMsgBGScrollAmtY)($v0)
/* C48E4 8012E1E4 00431023 */ subu $v0, $v0, $v1
/* C48E8 8012E1E8 0804B87E */ j .L8012E1F8
/* C48EC 8012E1EC 3042FFFF */ andi $v0, $v0, 0xffff

View File

@ -3,8 +3,8 @@
glabel msg_draw_rewind_arrow
/* BD5AC 80126EAC 27BDFFC0 */ addiu $sp, $sp, -0x40
/* BD5B0 80126EB0 3C058015 */ lui $a1, %hi(D_80154C30)
/* BD5B4 80126EB4 24A54C30 */ addiu $a1, $a1, %lo(D_80154C30)
/* BD5B0 80126EB0 3C058015 */ lui $a1, %hi(gMessagePrinters)
/* BD5B4 80126EB4 24A54C30 */ addiu $a1, $a1, %lo(gMessagePrinters)
/* BD5B8 80126EB8 00041080 */ sll $v0, $a0, 2
/* BD5BC 80126EBC 00441021 */ addu $v0, $v0, $a0
/* BD5C0 80126EC0 00021080 */ sll $v0, $v0, 2

View File

@ -48,8 +48,8 @@ glabel msg_update_rewind_arrow
/* BCF14 80126814 AC620000 */ sw $v0, ($v1)
/* BCF18 80126818 3C028015 */ lui $v0, %hi(D_8014C2D8)
/* BCF1C 8012681C 2442C2D8 */ addiu $v0, $v0, %lo(D_8014C2D8)
/* BCF20 80126820 3C058015 */ lui $a1, %hi(D_80154C30)
/* BCF24 80126824 24A54C30 */ addiu $a1, $a1, %lo(D_80154C30)
/* BCF20 80126820 3C058015 */ lui $a1, %hi(gMessagePrinters)
/* BCF24 80126824 24A54C30 */ addiu $a1, $a1, %lo(gMessagePrinters)
/* BCF28 80126828 AC620004 */ sw $v0, 4($v1)
/* BCF2C 8012682C 00041080 */ sll $v0, $a0, 2
/* BCF30 80126830 00441021 */ addu $v0, $v0, $a0

View File

@ -8,8 +8,8 @@ glabel render_messages
/* BA910 80124210 AFB00020 */ sw $s0, 0x20($sp)
/* BA914 80124214 3C10800A */ lui $s0, %hi(gMasterGfxPos)
/* BA918 80124218 2610A66C */ addiu $s0, $s0, %lo(gMasterGfxPos)
/* BA91C 8012421C 3C058015 */ lui $a1, %hi(D_80154C30)
/* BA920 80124220 24A54C30 */ addiu $a1, $a1, %lo(D_80154C30)
/* BA91C 8012421C 3C058015 */ lui $a1, %hi(gMessagePrinters)
/* BA920 80124220 24A54C30 */ addiu $a1, $a1, %lo(gMessagePrinters)
/* BA924 80124224 44803000 */ mtc1 $zero, $f6
/* BA928 80124228 3C028007 */ lui $v0, %hi(gCurrentDisplayContextIndex)
/* BA92C 8012422C 8C4241F4 */ lw $v0, %lo(gCurrentDisplayContextIndex)($v0)
@ -92,8 +92,8 @@ glabel render_messages
.L80124358:
/* BAA58 80124358 0000882D */ daddu $s1, $zero, $zero
/* BAA5C 8012435C 24120005 */ addiu $s2, $zero, 5
/* BAA60 80124360 3C108015 */ lui $s0, %hi(D_80154C30)
/* BAA64 80124364 26104C30 */ addiu $s0, $s0, %lo(D_80154C30)
/* BAA60 80124360 3C108015 */ lui $s0, %hi(gMessagePrinters)
/* BAA64 80124364 26104C30 */ addiu $s0, $s0, %lo(gMessagePrinters)
.L80124368:
/* BAA68 80124368 8E0204FC */ lw $v0, 0x4fc($s0)
/* BAA6C 8012436C 30420002 */ andi $v0, $v0, 2

View File

@ -6,3 +6,96 @@ dead_cos_rad = 0x8002B4C0;
dead_set_float_variable = 0x802D5A10;
dead_playFX_11 = 0x80075170;
dead_gPlayerStatusPtr = 0x800FFC90;
func_80126064 = 0x80126064;
func_8012607C = 0x8012607C;
func_80126094 = 0x80126094;
func_801260AC = 0x801260AC;
func_8003E4BC = 0x8003E4BC;
func_80075110 = 0x80075110;
func_80042AF4 = 0x80042AF4;
func_8002B1C4 = 0x8002B1C4;
func_8002AF18 = 0x8002AF18;
func_8002AE14 = 0x8002AE14;
func_8004D800 = 0x8004D800;
func_8002B28C = 0x8002B28C;
func_8004D9C0 = 0x8004D9C0;
func_8004DAD8 = 0x8004DAD8;
func_8004DF64 = 0x8004DF64;
func_8004E024 = 0x8004E024;
func_8004E25C = 0x8004E25C;
func_8004E2EC = 0x8004E2EC;
func_8004E39C = 0x8004E39C;
func_8004E544 = 0x8004E544;
func_8004E808 = 0x8004E808;
func_8004EB8C = 0x8004EB8C;
func_8004D1A4 = 0x8004D1A4;
func_8003E424 = 0x8003E424;
func_80067040 = 0x80067040;
func_800E5304 = 0x800E5304;
func_800E423C = 0x800E423C;
func_8004D0C4 = 0x8004D0C4;
func_8004D8E0 = 0x8004D8E0;
func_8002ACEC = 0x8002ACEC;
func_8003E534 = 0x8003E534;
func_8002BFD4 = 0x8002BFD4;
func_8002C01C = 0x8002C01C;
func_8002B5DC = 0x8002B5DC;
func_8002B640 = 0x8002B640;
func_800F1EF8 = 0x800F1EF8;
func_8015704C = 0x8015704C;
func_80077C30 = 0x80077C30;
func_8002B6A4 = 0x8002B6A4;
func_80077930 = 0x80077930;
func_8011AAB4 = 0x8011AAB4;
func_8002B21C = 0x8002B21C;
func_802E2A80 = 0x802E2A80;
func_802E2B74 = 0x802E2B74;
func_80128510 = 0x80128510;
func_8012DFE8 = 0x8012DFE8;
func_8002AA2C = 0x8002AA2C;
func_80059AC8 = 0x80059AC8;
func_80118BB0 = 0x80118BB0;
func_80077BD0 = 0x80077BD0;
func_80041080 = 0x80041080;
func_800F1D9C = 0x800F1D9C;
func_800F1730 = 0x800F1730;
func_8003C43C = 0x8003C43C;
func_800F1718 = 0x800F1718;
func_800F16F4 = 0x800F16F4;
func_80125270 = 0x80125270;
func_80124F44 = 0x80124F44;
func_8006CAC0 = 0x8006CAC0;
func_800775D0 = 0x800775D0;
func_802F3B00 = 0x802F3B00;
func_800FCD0C = 0x800FCD0C;
func_800F9260 = 0x800F9260;
func_800F93E8 = 0x800F93E8;
func_800F2D5C = 0x800F2D5C;
func_80130C74 = 0x80130C74;
func_800769D0 = 0x800769D0;
func_80075E30 = 0x80075E30;
func_8002B524 = 0x8002B524;
func_8002BF18 = 0x8002BF18;
func_80076970 = 0x80076970;
func_80144200 = 0x80144200;
func_80144178 = 0x80144178;
func_800E53AC = 0x800E53AC;
func_8013CF98 = 0x8013CF98;
func_80066FE0 = 0x80066FE0;
func_8002A910 = 0x8002A910;
func_8005F128 = 0x8005F128;
func_800F7278 = 0x800F7278;
func_800F2E98 = 0x800F2E98;
func_8003ED50 = 0x8003ED50;
func_8003E5E8 = 0x8003E5E8;
func_8002FCBC = 0x8002FCBC;
func_801574DC = 0x801574DC;
func_80157118 = 0x80157118;
func_8005F238 = 0x8005F238;
func_80074070 = 0x80074070;
func_8002BF68 = 0x8002BF68;
func_80130C64 = 0x80130C64;
func_8002B45C = 0x8002B45C;
func_801266F8 = 0x801266F8;
func_80126734 = 0x80126734;
func_80144194 = 0x80144194;

View File

@ -300,6 +300,7 @@ D_800D9F80 = 0x800D9F80;
D_800DA000 = 0x800DA000;
D_800DA03C = 0x800DA03C;
D_800DA040 = 0x800DA040;
nusched = 0x800DA440;
D_800DA444 = 0x800DA444;
D_800DA47C = 0x800DA47C;
D_800DA4B4 = 0x800DA4B4;

View File

@ -369,7 +369,7 @@ segments:
- [0xa5dd0, c, a5dd0_len_114e0]
- [0xB4580, c, B4580]
- [0xb72b0, c, entity]
- [0xB9D60, c, B9D60]
- [0xB9D60, c, msg]
- [0xC50A0, c, C50A0]
- [0xcd180, c, cd180_len_38f0]
- [0xCEE40, c, CEE40]

View File

@ -17891,8 +17891,6 @@ func_802407B0_EFF2B0 = 0x802407B0; // type:func rom:0xEFF2B0
D_00000094 = 0x94; // type:data
D_00000094_2 = 0x94; // type:data
D_000001E4 = 0x1E4; // type:data
D_00074210 = 0x74210; // type:data
D_00074230 = 0x74230; // type:data
D_00E32420 = 0xE32420; // type:data
D_00E35670 = 0xE35670; // type:data
D_00E38890 = 0xE38890; // type:data
@ -18635,20 +18633,20 @@ D_801512C8 = 0x801512C8; // type:data
gCurrentModelListPtr = 0x801512CC; //
D_801512D0 = 0x801512D0; // type:data
D_801512D4 = 0x801512D4; // type:data
D_801512D8 = 0x801512D8; // type:data
gMsgBGScrollAmtX = 0x801512D8; // type:data
D_801512DA = 0x801512DA; // type:data
gCurrentTransformGroups = 0x801512E0; // type:data
D_801512E4 = 0x801512E4; // type:data
gMsgGlobalWaveCounter = 0x801512E4; // type:data
gCurrentModelSpecialDlsPtr = 0x801512E8; //
gLastCreatedEntityIndex = 0x801512EC; //
D_801512F0 = 0x801512F0; // type:data
D_801512F4 = 0x801512F4; // type:data
gMsgVarImages = 0x801512F4; // type:data
D_801512F8 = 0x801512F8; // type:data
D_801512FC = 0x801512FC; // type:data
D_80151300 = 0x80151300; // type:data
D_80151304 = 0x80151304; // type:data
D_80151308 = 0x80151308; // type:data
D_8015130C = 0x8015130C; // type:data
gMsgBGScrollAmtY = 0x8015130C; // type:data
D_8015130E = 0x8015130E; // type:data
D_80151310 = 0x80151310; // type:data
D_80151314 = 0x80151314; // type:data
@ -18757,10 +18755,9 @@ entity_fog_dist_max = 0x80154390; // type:data
gWorldDynamicEntityList = 0x801543A0; //
gBattleDynamicEntityList = 0x801543E0; //
gCurrentDynamicEntityListPtr = 0x80154420; //
D_80154430 = 0x80154430; // type:data
D_80154C30 = 0x80154C30; // type:data
D_80155C38 = 0x80155C38; // type:data
D_80155C78 = 0x80155C78; // type:data
gMessageBufferA = 0x80154430; // type:data
gMessagePrinters = 0x80154C30; // type:data // size:0x1008
gMessageStringVars = 0x80155C38; // type:data
D_80155C98 = 0x80155C98; // type:data
D_80155CA0 = 0x80155CA0; // type:data
D_80155D20 = 0x80155D20; // type:data
@ -19022,7 +19019,6 @@ D_80245624 = 0x80245624; // type:data
D_80245630 = 0x80245630; // type:data
D_80245650 = 0x80245650; // type:data
D_802458F0 = 0x802458F0; // type:data
obk_01_bss_sym = 0x802458F0; // type:data
D_80245928 = 0x80245928; // type:data
D_8024592C = 0x8024592C; // type:data
D_802459C0 = 0x802459C0; // type:data
@ -19055,7 +19051,6 @@ D_802467B4 = 0x802467B4; // type:data
D_80246894 = 0x80246894; // type:data
D_80246990 = 0x80246990; // type:data
D_80246A20 = 0x80246A20; // type:data
pra_09_bss_sym = 0x80246A20; // type:data
D_80246BE8 = 0x80246BE8; // type:data
D_80246E50 = 0x80246E50; // type:data
D_80247050 = 0x80247050; // type:data
@ -19068,8 +19063,6 @@ D_80247664 = 0x80247664; // type:data
D_80247750 = 0x80247750; // type:data
D_802479F0 = 0x802479F0; // type:data
D_80247AF0 = 0x80247AF0; // type:data
jan_00_fake_sym = 0x80247AF0; // type:data
jan_05_temp_bss = 0x80247AF0; // type:data
D_80247B00 = 0x80247B00; // type:data
D_80247BB8 = 0x80247BB8; // type:data
D_80247BF0 = 0x80247BF0; // type:data

View File

@ -1,93 +0,0 @@
func_80126064 = 0x80126064;
func_8012607C = 0x8012607C;
func_80126094 = 0x80126094;
func_801260AC = 0x801260AC;
func_8003E4BC = 0x8003E4BC;
func_80075110 = 0x80075110;
func_80042AF4 = 0x80042AF4;
func_8002B1C4 = 0x8002B1C4;
func_8002AF18 = 0x8002AF18;
func_8002AE14 = 0x8002AE14;
func_8004D800 = 0x8004D800;
func_8002B28C = 0x8002B28C;
func_8004D9C0 = 0x8004D9C0;
func_8004DAD8 = 0x8004DAD8;
func_8004DF64 = 0x8004DF64;
func_8004E024 = 0x8004E024;
func_8004E25C = 0x8004E25C;
func_8004E2EC = 0x8004E2EC;
func_8004E39C = 0x8004E39C;
func_8004E544 = 0x8004E544;
func_8004E808 = 0x8004E808;
func_8004EB8C = 0x8004EB8C;
func_8004D1A4 = 0x8004D1A4;
func_8003E424 = 0x8003E424;
func_80067040 = 0x80067040;
func_800E5304 = 0x800E5304;
func_800E423C = 0x800E423C;
func_8004D0C4 = 0x8004D0C4;
func_8004D8E0 = 0x8004D8E0;
func_8002ACEC = 0x8002ACEC;
func_8003E534 = 0x8003E534;
func_8002BFD4 = 0x8002BFD4;
func_8002C01C = 0x8002C01C;
func_8002B5DC = 0x8002B5DC;
func_8002B640 = 0x8002B640;
func_800F1EF8 = 0x800F1EF8;
func_8015704C = 0x8015704C;
func_80077C30 = 0x80077C30;
func_8002B6A4 = 0x8002B6A4;
func_80077930 = 0x80077930;
func_8011AAB4 = 0x8011AAB4;
func_8002B21C = 0x8002B21C;
func_802E2A80 = 0x802E2A80;
func_802E2B74 = 0x802E2B74;
func_80128510 = 0x80128510;
func_8012DFE8 = 0x8012DFE8;
func_8002AA2C = 0x8002AA2C;
func_80059AC8 = 0x80059AC8;
func_80118BB0 = 0x80118BB0;
func_80077BD0 = 0x80077BD0;
func_80041080 = 0x80041080;
func_800F1D9C = 0x800F1D9C;
func_800F1730 = 0x800F1730;
func_8003C43C = 0x8003C43C;
func_800F1718 = 0x800F1718;
func_800F16F4 = 0x800F16F4;
func_80125270 = 0x80125270;
func_80124F44 = 0x80124F44;
func_8006CAC0 = 0x8006CAC0;
func_800775D0 = 0x800775D0;
func_802F3B00 = 0x802F3B00;
func_800FCD0C = 0x800FCD0C;
func_800F9260 = 0x800F9260;
func_800F93E8 = 0x800F93E8;
func_800F2D5C = 0x800F2D5C;
func_80130C74 = 0x80130C74;
func_800769D0 = 0x800769D0;
func_80075E30 = 0x80075E30;
func_8002B524 = 0x8002B524;
func_8002BF18 = 0x8002BF18;
func_80076970 = 0x80076970;
func_80144200 = 0x80144200;
func_80144178 = 0x80144178;
func_800E53AC = 0x800E53AC;
func_8013CF98 = 0x8013CF98;
func_80066FE0 = 0x80066FE0;
func_8002A910 = 0x8002A910;
func_8005F128 = 0x8005F128;
func_800F7278 = 0x800F7278;
func_800F2E98 = 0x800F2E98;
func_8003ED50 = 0x8003ED50;
func_8003E5E8 = 0x8003E5E8;
func_8002FCBC = 0x8002FCBC;
func_801574DC = 0x801574DC;
func_80157118 = 0x80157118;
func_8005F238 = 0x8005F238;
func_80074070 = 0x80074070;
func_8002BF68 = 0x8002BF68;
func_80130C64 = 0x80130C64;
func_8002B45C = 0x8002B45C;
func_801266F8 = 0x801266F8;
func_80126734 = 0x80126734;
func_80144194 = 0x80144194;

View File

@ -1,5 +1,6 @@
D_00000094 = 0x00000094;
D_00000094_2 = 0x00000094;
D_000001E4 = 0x1E4;
D_0A000808 = 0x0A000808;
D_0A000328 = 0x0A000328;
D_0A000380 = 0x0A000380;
@ -10,8 +11,6 @@ D_0A000EE8 = 0x0A000EE8;
D_0A000EF8 = 0x0A000EF8;
D_0A004350 = 0x0A004350;
D_0A0026F0 = 0x0A0026F0;
D_00074210 = 0x00074210;
D_00074230 = 0x00074230;
D_0A0031E0 = 0x0A0031E0;
D_0A001508 = 0x0A001508;
D_0A0031B0 = 0x0A0031B0;
@ -33,44 +32,26 @@ D_00E62370 = 0x00E62370;
D_00E62AC0 = 0x00E62AC0;
D_00E639C0 = 0x00E639C0;
D_00E648D0 = 0x00E648D0;
rdpstateinit_dl = 0x80093bb8;
_osViModeNtscLan1 = 0x80095820;
_osViModeMPalLan1 = 0x80095870;
gBackgroundImage = 0x80200000;
func_80243880_95EA80 = 0x80243880;
func_80242040_8B20B0 = 0x80242040;
EnterWalk = 0x80285960;
ExitWalk = 0x80285CF4;
spiked_goomba = 0x8021B0AC;
paragoomba = 0x8021CD00;
rdpstateinit_dl = 0x80093bb8;
LeoDiskHandle = 0x800B1B08;
CartRomHandle = 0x800B4518;
nusched = 0x800DA440;
D_800F7BE8 = 0x800F7BE8;
D_800F7BBC = 0x800F7BBC;
D_802C05CC = 0x802C05CC;
_osViModeNtscLan1 = 0x80095820;
_osViModeMPalLan1 = 0x80095870;
kzn_20_bss = 0x802442D0;
code_eb1170_bss = 0x802442D0;
D_000001E4 = 0x1E4;
gPauseMenuStrings = 0x8026F778;
broken_kmr_04_function_addr = 0x80243770;
D_802442D0 = 0x802442D0;
trd_06_fake_sym = 0x802491C0;
jan_05_temp_bss = 0x80247AF0;
D_80097E30 = 0x80097E30;
D_802AB513 = 0x802AB513;
D_802E9904 = 0x802E9904;
D_802E98E0 = 0x802E98E0;
D_802E99DC = 0x802E99DC;
D_80093DB0 = 0x80093DB0;
jan_00_fake_sym = 0x80247AF0;
D_80247AF0_CCB300 = 0x80247AF0;
D_802491C0_CA70E0 = 0x802491C0;
pra_09_bss_sym = 0x80246A20;
obk_01_bss_sym = 0x802458F0;
_163400_BSS_START = 0x8024C080;
_163400_BSS_END = 0x8024C120;
D_80244F98_EC7198 = 0x80244F98;
D_80246568_C8C018 = 0x80246568;
D_8024B9A8_B8FB28 = 0x8024B9A8;
D_8038F800 = 0x8038F800;

View File

@ -24,20 +24,20 @@ D_801512C8 = 0x801512C8;
gCurrentModelListPtr = 0x801512CC;
D_801512D0 = 0x801512D0;
D_801512D4 = 0x801512D4;
D_801512D8 = 0x801512D8;
gMsgBGScrollAmtX = 0x801512D8;
D_801512DA = 0x801512DA;
gCurrentTransformGroups = 0x801512E0;
D_801512E4 = 0x801512E4;
gMsgGlobalWaveCounter = 0x801512E4;
gCurrentModelSpecialDlsPtr = 0x801512E8;
gLastCreatedEntityIndex = 0x801512EC;
D_801512F0 = 0x801512F0;
D_801512F4 = 0x801512F4;
gMsgVarImages = 0x801512F4;
D_801512F8 = 0x801512F8;
D_801512FC = 0x801512FC;
D_80151300 = 0x80151300;
D_80151304 = 0x80151304;
D_80151308 = 0x80151308;
D_8015130C = 0x8015130C;
gMsgBGScrollAmtY = 0x8015130C;
D_8015130E = 0x8015130E;
D_80151310 = 0x80151310;
D_80151314 = 0x80151314;
@ -146,10 +146,10 @@ entity_fog_dist_max = 0x80154390;
gWorldDynamicEntityList = 0x801543A0;
gBattleDynamicEntityList = 0x801543E0;
gCurrentDynamicEntityListPtr = 0x80154420;
D_80154430 = 0x80154430;
D_80154C30 = 0x80154C30;
gMessageBufferA = 0x80154430;
gMessagePrinters = 0x80154C30;
D_80155C38 = 0x80155C38;
D_80155C78 = 0x80155C78;
gMessageStringVars = 0x80155C38;
D_80155C98 = 0x80155C98;
D_80155CA0 = 0x80155CA0;
D_80155D20 = 0x80155D20;