Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
392 changes: 392 additions & 0 deletions CLAUDE.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion config/sym_ovl_export.us.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1943,8 +1943,8 @@ func_801D0408 = 0x801d0408;
func_801D0500 = 0x801d0500;
func_801D05C4 = 0x801d05c4;
func_801D0704 = 0x801d0704;
MenuConfig = 0x801d080c;
func_801D069C = 0x801d069c;
func_801D080C = 0x801d080c;
unused = 0x801d2514;
func_801D05C0 = 0x801d05c0;
func_801D06B0 = 0x801d06b0;
Expand Down
2 changes: 2 additions & 0 deletions config/symbols.cnfgmenu.us.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
D_8009D7C0 = 0x8009D7C0; // size:0x10
PlaySound = 0x801D0040;
MenuConfig = 0x801D080C;
D_801D2478 = 0x801D2478; // size:0x14
D_801D24A0 = 0x801D24A0; // size:0x10
D_801D24B8 = 0x801D24B8; // size:0x8
Expand Down
52 changes: 52 additions & 0 deletions config/symbols.main.us.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,54 @@
__main = 0x800110B8;
__SN_ENTRY_POINT = 0x800110C0;
main = 0x80011C1C;
MenuUnloadPortraits = 0x80017678;
MenuLoadPartyPortrait = 0x8001786C;
SetupGamepad = 0x8001C434;
MenuStoreKeypressBitmask = 0x8001CB48;
MenuDrawPartyPortrait = 0x8001D180;
MenuCreateWindow = 0x8001DE0C;
MenuMoveWindow = 0x8001DE24;
MenuCopyWindow = 0x8001DE40;
MenuStoreWindowColors = 0x8001DE70;
MenuRestoreWindowColors = 0x8001DEB0;
MenuSetWindowColors = 0x8001DEF0;
MenuDrawWindow = 0x8001E040;
MenuDrawCursor = 0x8001EB2C;
MenuGetPopupState = 0x8001F6B4;
MenuShowPopupText = 0x8001F6C0;
MenuUpdatePopup = 0x8001F710;
MenuLoadPartyData = 0x80020058;
MenuInitDisplayEnv = 0x80021044;
MenuSetTransition = 0x8002120C;
MenuIsBusy = 0x80023050;
MenuExitSubmenu = 0x8002305C;
MenuDrawSubmenuTitle = 0x800230C4;
MenuGetPlaytimeHours = 0x80023788;
MenuGetPlaytimeMinutes = 0x8002382C;
PartyAddMateria = 0x8002542C;
SYS_gil = 0x80025B7C;
MenuLoadTexture = 0x80025D14;
MenuGetMateriaColor = 0x8002603C;
MenuSetCursorPickerObj = 0x80026448;
MenuCursorPickerHandler = 0x800264A8;
SetPolyBuffer = 0x800269C0;
MenuPushDrawState = 0x800269D0;
MenuPopDrawState = 0x800269E8;
MenuSetOTag = 0x80026A00;
func_80026A0C = 0x80026A0C;
MenuSetDrawMode = 0x80026A34;
MenuSetClipRect = 0x80026A94;
MenuSetBrightness = 0x80026B5C;
MenuSetBrightnessUnused = 0x80026B64;
MenuGetTextWidth = 0x80026B70;
MenuDrawText = 0x80026F44;
MenuDrawLetter = 0x8002708C;
MenuDrawSliderBg = 0x80027B84;
MenuDrawSlider = 0x80028030;
MenuDrawProgressBar = 0x800285AC;
MenuDrawBtlImage = 0x80028CA0;
MenuDrawNumber = 0x80028E00;
MenuDrawNumberPadded = 0x80029114;
SetReverbMode = 0x80029AF0;
DS_read = 0x80033E74;
ChangeClearSIO = 0x80034CE8;
Expand Down Expand Up @@ -444,6 +489,13 @@ _patch_card = 0x80048B34;
_patch_card2 = 0x80048BEC;
_ExitCard = 0x80048C7C;
g_bPadsInitialized = 0x80062D70;
ButtonsDown = 0x80062D78;
ButtonsTapped = 0x80062D7C;
MenuPopupState = 0x80062DDB;
MenuPopupTextColor = 0x80062DDC;
MenuPopupDelayCounter = 0x80062DE0;
MenuBusy = 0x80062DF8;
MenuPopupText = 0x80062EB8;
D_800696AC = 0x800696AC;
g_ReverbMode = 0x8009A140;
g_ReverbAttr = 0x8009C564; // type:SpuReverbAttr size:0x14
1 change: 1 addition & 0 deletions config/symbols.savemenu.us.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
func_801D1774 = 0x801D1774;
func_801D1BAC = 0x801D1BAC;
PlaySound = 0x801D2B58; // title.c static
g_MenuStartMode = 0x801E2CF8;
D_801E2E64 = 0x801E2E64;
menus = 0x801E379C; // size:0x90
Expand Down
33 changes: 17 additions & 16 deletions include/game.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ typedef struct {
s8 unkE;
s8 unkF;
s8 unk10;
s8 unk11; // scroll type: 0=no wrap, 1/2:wrap, 3>:infinite
} Unk80026448; // size: 0x12
s8 unk11; // scroll type: 0=no wrap, 1/2:wrap, 3>:infinite
} CursorPicker; // size: 0x12

typedef union {
void* poly;
Expand Down Expand Up @@ -293,13 +293,13 @@ typedef struct {
u8 unB0[0x390];
} Unk8009D84C; // size: 0x440

extern u8 D_80049208[12]; // window colors maybe??
extern u8 D_800492F0[][12]; // see Labels enum
extern u16 D_80062D78; // pressed button?
extern u16 D_80062D7C; // pressed button?
extern u16 D_80062D7E; // pressed button?
extern u16 D_80062D80; // tapped button
extern u16 D_80062D82; // repeated button
extern u8 D_80049208[12]; // window colors maybe??
extern u8 D_800492F0[][12]; // see Labels enum
extern u16 ButtonsDown; // pressed button?
extern u16 ButtonsTapped; // pressed button?
extern u16 ButtonsRepeating; // pressed button?
extern u16 D_80062D80; // tapped button
extern u16 D_80062D82; // repeated button
extern u8 D_80062D98;
extern u8 D_80062D99;
extern s32 D_80062DCC;
Expand Down Expand Up @@ -342,13 +342,14 @@ s32 func_8001521C(s32);
const char* func_80015248(s32 arg0, s32 arg1, s32 arg2);
void func_800155A4(s32);
void func_8001726C(s16, u16);
void func_80021044(DRAWENV* draw_env, DISPENV* disp_env);
void func_80026448(Unk80026448* arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4,
s32 arg5, s32 arg6, s32 arg7, s32 arg8, s32 arg9, s32 arg10,
s32 arg11, s32 arg12, u16 arg13);
void func_800269C0(void* poly);
s32 func_80026B70(unsigned char* str);
void func_80026F44(s32 x, s32 y, const char*, s32 color); // print FF7 string
void MenuInitDisplayEnv(DRAWENV* draw_env, DISPENV* disp_env);
void MenuSetCursorPickerObj(
CursorPicker* arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5,
s32 arg6, s32 arg7, s32 arg8, s32 arg9, s32 arg10, s32 arg11, s32 arg12,
u16 arg13);
void SetPolyBuffer(void* buffer);
s32 MenuGetTextWidth(unsigned char* str);
void MenuDrawText(s32 x, s32 y, const char*, s32 color); // print FF7 string
void func_8002DA7C();

int func_80033DAC(int sector_no, void (*cb)());
Expand Down
34 changes: 17 additions & 17 deletions src/battle/battle3.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static void func_800DBEA4(s32 arg0, s16 arg1) { func_800DBC18(arg0, arg1); }

INCLUDE_ASM("asm/us/battle/nonmatchings/battle3", func_800DBEC8);

static void func_800DBF54(void) { func_800269C0(D_80077F64); }
static void func_800DBF54(void) { SetPolyBuffer(D_80077F64); }

static void func_800DBF7C(void) { D_800F3122 = 0; }

Expand Down Expand Up @@ -105,7 +105,7 @@ static void func_800DD690(s32 arg0, s16 arg1) {
s32 setupType;
s32 temp_v1;

func_80026A00();
MenuSetOTag();
switch (arg1) {
case 0:
func_800E2098();
Expand All @@ -131,10 +131,10 @@ static void func_800DD690(s32 arg0, s16 arg1) {
if (temp_v1 < NUM_SETUP) {
setupType = -(temp_v1 <= SETUP_BACK_ATTACK) & 7;
}
func_80026F44(8, 7, func_80015248(5, 0x12, 8), setupType);
MenuDrawText(8, 7, func_80015248(5, 0x12, 8), setupType);
break;
case 3:
func_80026F44(9, 7, func_80015248(5, 0x13, 8), 7);
MenuDrawText(9, 7, func_80015248(5, 0x13, 8), 7);
break;
case 24:
func_800E33A0();
Expand Down Expand Up @@ -242,15 +242,15 @@ void func_800DF900(void) {
u16* tapped;

if (D_800F3896 == 3 && D_800F99E4 == 0) {
tapped = &D_80062D7E;
tapped = &ButtonsRepeating;
if (*tapped & 0x20) {
func_800BB9B8(1);
D_800F99E4 = 1;
D_800F3896 = -1;
func_800A4350(D_800F38A0, D_800F389C, D_800F389E, D_801516F8);
func_800D9F5C(3);
func_800D9F5C(1);
} else if (D_80062D7E & 0x8040) {
} else if (ButtonsRepeating & 0x8040) {
func_800BB9B8(4);
D_800F99E4 = 1;
D_800F3896 = 1;
Expand Down Expand Up @@ -287,7 +287,7 @@ void func_800E0294(void) {

temp_s0 = &D_8009D84C[D_800F38A1].unAC[0];
if (D_800F3896 == 0x1B && D_800F99E4 == 0) {
if (D_80062D7E & 0x20) {
if (ButtonsRepeating & 0x20) {
if (func_800E54EC() == 2) {
D_800F99E4 = 1;
func_800BB9B8(1);
Expand All @@ -300,7 +300,7 @@ void func_800E0294(void) {
func_800D9F5C(0x1B);
func_800D9F5C(1);
}
} else if ((D_80062D7E & 0x40) && (func_800E54EC() == 0)) {
} else if ((ButtonsRepeating & 0x40) && (func_800E54EC() == 0)) {
func_800BB9B8(4);
D_800F99E4 = 1;
D_800F3896 = 1;
Expand All @@ -318,7 +318,7 @@ void func_800E03F0(void) {

temp_s0 = &D_8009D8F8[D_800F38A1 * 0x440];
if ((D_800F3896 == 0x1A) && (D_800F99E4 == 0)) {
if (D_80062D7E & 0x20) {
if (ButtonsRepeating & 0x20) {
D_800F99E4 = 1;
if (func_800E4BCC() == 2) {
func_800BB9B8(1);
Expand All @@ -331,7 +331,7 @@ void func_800E03F0(void) {
func_800D9F5C(0x1A);
func_800D9F5C(1);
}
} else if ((D_80062D7E & 0x40) && (func_800E4BCC() == 0)) {
} else if ((ButtonsRepeating & 0x40) && (func_800E4BCC() == 0)) {
func_800BB9B8(4);
D_800F99E4 = 1;
D_800F3896 = 1;
Expand All @@ -352,8 +352,8 @@ INCLUDE_ASM("asm/us/battle/nonmatchings/battle3", func_800E0794);

void func_800E084C(void) {
if (D_800F3896 == 9) {
func_800264A8(&D_800F9144);
if (D_80062D7C & 0x20) {
MenuCursorPickerHandler(&D_800F9144);
if (ButtonsTapped & 0x20) {
if (D_800F914E == 0) {
func_800A4844(1);
} else {
Expand Down Expand Up @@ -418,7 +418,7 @@ static void func_800E1938(s16 arg0, s16 arg1, s32 arg2) {
}
x = ((var_a3 & 1) << 4) | 0x60;
y = ((var_a3 >> 1) << 4) + 0x70;
func_80028CA0(arg0, arg1, x, y, 0x10, 0x10, 1, 0);
MenuDrawBtlImage(arg0, arg1, x, y, 0x10, 0x10, 1, 0);
}

INCLUDE_ASM("asm/us/battle/nonmatchings/battle3", func_800E1A2C);
Expand Down Expand Up @@ -590,12 +590,12 @@ INCLUDE_ASM("asm/us/battle/nonmatchings/battle3", func_800E6018);

INCLUDE_ASM("asm/us/battle/nonmatchings/battle3", func_800E60F8);

s32 func_800E6820(void) { return func_80026B70(D_800F384A); }
s32 func_800E6820(void) { return MenuGetTextWidth(D_800F384A); }

static void func_800E6848(void) {
func_80026F44(0x10, 8, &D_800F3828[0], 7);
func_80026F44(0x2C, 0x1C, &D_800F3828[0x22], 7);
func_80026F44(func_800E6820() + 0x4C, 0x1C, &D_800F3828[0x44], 7);
MenuDrawText(0x10, 8, &D_800F3828[0], 7);
MenuDrawText(0x2C, 0x1C, &D_800F3828[0x22], 7);
MenuDrawText(func_800E6820() + 0x4C, 0x1C, &D_800F3828[0x44], 7);
}

INCLUDE_ASM("asm/us/battle/nonmatchings/battle3", func_800E68B4);
Expand Down
Loading