mirror of
https://github.com/FireEmblemUniverse/fireemblem8u.git
synced 2024-11-23 05:10:00 +00:00
revoe savemenu
This commit is contained in:
parent
53d0b1eb8d
commit
c5f30c0f06
@ -2096,7 +2096,7 @@ _08046A4A:
|
||||
add r1, sp, #4
|
||||
bl ReadGameSavePlaySt
|
||||
add r0, sp, #4
|
||||
bl sub_8089768
|
||||
bl GetChapterTitleExtra
|
||||
adds r2, r7, #0
|
||||
adds r2, #0x2c
|
||||
adds r1, r2, r5
|
||||
@ -2242,7 +2242,7 @@ _08046B72:
|
||||
_08046B74:
|
||||
movs r0, #0xd0
|
||||
lsls r0, r0, #1
|
||||
bl sub_8089678
|
||||
bl PutChapterTitleBG
|
||||
movs r3, #0
|
||||
mov r9, r3
|
||||
movs r0, #0xa0
|
||||
@ -2294,7 +2294,7 @@ _08046BB0:
|
||||
ldr r3, [sp, #0x60]
|
||||
ldm r3!, {r1}
|
||||
str r3, [sp, #0x60]
|
||||
bl sub_8089624
|
||||
bl PutChapterTitleGfx
|
||||
ldr r0, _08046C5C @ gBG0TilemapBuffer+0x006
|
||||
ldr r1, [sp, #0x5c]
|
||||
adds r0, r1, r0
|
||||
|
@ -1,27 +1,27 @@
|
||||
.section .data
|
||||
|
||||
.global gUnknown_08A21658
|
||||
gUnknown_08A21658: @ 0x08A21658
|
||||
.global Img_SaveMenuBG
|
||||
Img_SaveMenuBG: @ 0x08A21658
|
||||
.incbin "baserom.gba", 0xA21658, 0x4774
|
||||
|
||||
.global gUnknown_08A25DCC
|
||||
gUnknown_08A25DCC: @ 0x08A25DCC
|
||||
.global Pal_SaveMenuBG
|
||||
Pal_SaveMenuBG: @ 0x08A25DCC
|
||||
.incbin "baserom.gba", 0xA25DCC, 0x100
|
||||
|
||||
.global gUnknown_08A25ECC
|
||||
gUnknown_08A25ECC: @ 0x08A25ECC
|
||||
.global Tsa_SaveMenuBG
|
||||
Tsa_SaveMenuBG: @ 0x08A25ECC
|
||||
.incbin "baserom.gba", 0xA25ECC, 0x4B4
|
||||
|
||||
.global gUnknown_08A26380
|
||||
gUnknown_08A26380: @ 0x08A26380
|
||||
.global Img_MainMenuBgFog
|
||||
Img_MainMenuBgFog: @ 0x08A26380
|
||||
.incbin "baserom.gba", 0xA26380, 0x558
|
||||
|
||||
.global gUnknown_08A268D8
|
||||
gUnknown_08A268D8: @ 0x08A268D8
|
||||
.global Pal_MainMenuBgFog
|
||||
Pal_MainMenuBgFog: @ 0x08A268D8
|
||||
.incbin "baserom.gba", 0xA268D8, 0x20
|
||||
|
||||
.global gUnknown_08A268F8
|
||||
gUnknown_08A268F8: @ 0x08A268F8
|
||||
.global Tsa_MainMenuBgFog
|
||||
Tsa_MainMenuBgFog: @ 0x08A268F8
|
||||
.incbin "baserom.gba", 0xA268F8, 0x17C
|
||||
|
||||
.global Img_SaveScreenSprits
|
||||
@ -60,8 +60,8 @@ gUnknown_08A29498: @ 0x08A29498
|
||||
gUnknown_08A29558: @ 0x08A29558
|
||||
.incbin "baserom.gba", 0xA29558, 0x5C
|
||||
|
||||
.global gUnknown_08A295B4
|
||||
gUnknown_08A295B4: @ 0x08A295B4
|
||||
.global Pal_08A295B4
|
||||
Pal_08A295B4: @ 0x08A295B4
|
||||
.incbin "baserom.gba", 0xA295B4, 0x20
|
||||
|
||||
.global Tsa_CommGameBgScreenInShop
|
||||
|
@ -516,7 +516,7 @@ int GetNextChapterStatsSlot(void);
|
||||
void UnlockSoundRoomSong(struct SoundRoomSaveData *buf, int val);
|
||||
int GetCurCompleteChapters(void);
|
||||
int GetNextChapterStatsEntry(void);
|
||||
void RegisterChapterTimeAndTurnCount(struct PlaySt* chData);
|
||||
void RegisterChapterTimeAndTurnCount(struct PlaySt * chData);
|
||||
int GetGameTotalTime_unused(void);
|
||||
int GetGameTotalTurnCount(void);
|
||||
bool IsChapterBelongCurGame(u32 ch_index);
|
||||
@ -564,7 +564,7 @@ void WriteNewGameSave(int index, int isDifficult, int mode, int isTutorial);
|
||||
void WriteGameSave(int slot);
|
||||
void ReadGameSave(int slot);
|
||||
bool IsSaveValid(int);
|
||||
void ReadGameSavePlaySt(int, struct PlaySt*);
|
||||
void ReadGameSavePlaySt(int, struct PlaySt *);
|
||||
u32 LoadSavedBonusClaimFlags(int slot);
|
||||
void LoadSavedWMStuff(int slot, struct GMapData *dest);
|
||||
s8 LoadSavedEid8A(int slot);
|
||||
|
@ -12,8 +12,8 @@ typedef struct {
|
||||
} ChapTitle, * pChapTitle;
|
||||
|
||||
struct ChapterTitleFxSt {
|
||||
u16 unk_00;
|
||||
u16 unk_02;
|
||||
u16 chr_bg;
|
||||
u16 chr_str;
|
||||
};
|
||||
|
||||
extern struct ChapterTitleFxSt gChapterTitleFxSt;
|
||||
|
@ -181,7 +181,7 @@ const struct ROMChapterData* GetROMChapterStruct(unsigned chIndex);
|
||||
const void* GetChapterMapPointer(unsigned chIndex);
|
||||
const void* GetChapterMapChangesPointer(unsigned chIndex);
|
||||
const struct ChapterEventGroup* GetChapterEventDataPointer(unsigned chIndex);
|
||||
const char* GetChapterTitle(unsigned chIndex);
|
||||
const char * GetChapterTitleName(unsigned chIndex);
|
||||
u8 IsDifficultMode(void);
|
||||
|
||||
#endif // GUARD_CHAPTERDATA_H
|
||||
|
@ -19,4 +19,5 @@ enum event_flag_idx {
|
||||
#define EVFLAG_EXTRA_UNIT(i) (EVFLAG_EXTRA_UNIT_BASE + (i))
|
||||
|
||||
EVFLAG_HIDE_BLINKING_ICON = 132,
|
||||
EVFLAG_136 = 136,
|
||||
};
|
||||
|
@ -107,15 +107,15 @@ int SetFaceDisplayBitsById(int slot, int disp);
|
||||
int GetFaceDisplayBits(struct FaceProc*);
|
||||
int GetFaceDisplayBitsById(int slot);
|
||||
void FaceRefreshSprite(struct FaceProc* proc);
|
||||
void PutFaceTm(u16* tm, u8* data, int tileref, s8 isFlipped);
|
||||
void PutFaceTm(u16 * tm, u8* data, int tileref, s8 isFlipped);
|
||||
void UnpackFaceChibiGraphics(int fid, int chr, int pal);
|
||||
void PutFaceChibi(int, u16*, int, int, s8);
|
||||
void UnpackFaceChibiSprGraphics(int fid, int chr, int pal);
|
||||
void FaceChibiSpr_OnIdle(struct FaceProc* proc);
|
||||
void StartFaceChibiSpr(int x, int y, int fid, int chr, int pal, s8 isFlipped, ProcPtr parent);
|
||||
void EndFaceChibiSpr(void);
|
||||
void PutFace80x72_Standard(u16* tm, int tileref, const struct FaceData* info);
|
||||
void PutFace80x72_Raised(u16* tm, int tileref, const struct FaceData* info);
|
||||
void PutFace80x72_Standard(u16 * tm, int tileref, const struct FaceData* info);
|
||||
void PutFace80x72_Raised(u16 * tm, int tileref, const struct FaceData* info);
|
||||
s8 ShouldFaceBeRaised(int fid);
|
||||
void PutFace80x72_Core(u16*, int, int, int);
|
||||
void sub_8005D64(struct FaceBlinkProc*);
|
||||
|
@ -395,16 +395,16 @@ ProcPtr StartMuralBackgroundExt(ProcPtr, void*, int, int, int);
|
||||
void EndMuralBackground(void);
|
||||
|
||||
void sub_80895B4(int, int);
|
||||
void sub_8089624(int, u32);
|
||||
void sub_808966C(int, int);
|
||||
void sub_8089678(int);
|
||||
void PutChapterTitleGfx(int, u32);
|
||||
void _PutChapterTitleGfx(int, int);
|
||||
void PutChapterTitleBG(int);
|
||||
void sub_80896A8(int chr);
|
||||
void sub_80896D8(u16 bg[], int);
|
||||
void sub_80896FC(u16 *, int, int);
|
||||
void sub_8089720(u16 * tm, int pal);
|
||||
void sub_8089744(u16 * tm, int pal);
|
||||
int sub_8089768(struct PlaySt *);
|
||||
int sub_808979C(struct PlaySt *);
|
||||
int GetChapterTitleExtra(struct PlaySt *);
|
||||
int GetChapterTitleWM(struct PlaySt *);
|
||||
|
||||
u8 CanPrepScreenSave();
|
||||
int sub_8095024();
|
||||
|
@ -701,7 +701,7 @@ struct PrepMenuTradeProc {
|
||||
void PrepItemTrade_ApplyItemSwap(struct Unit * unitA, int itemSlotA, struct Unit * unitB, int itemSlotB);
|
||||
s8 PrepItemTrade_DpadKeyHandler(struct PrepMenuTradeProc * proc);
|
||||
void DrawPrepScreenItems(u16*, struct Text*, struct Unit*, u8);
|
||||
void DrawPrepScreenItemIcons(u16* tm, struct Unit* unit);
|
||||
void DrawPrepScreenItemIcons(u16 * tm, struct Unit* unit);
|
||||
void PrepItemTrade_Init(struct PrepMenuTradeProc * proc);
|
||||
void PrepItemTrade_Loop_MainKeyHandler(struct PrepMenuTradeProc * proc);
|
||||
void PrepItemTrade_OnEnd(void);
|
||||
|
@ -6,26 +6,26 @@
|
||||
|
||||
enum {
|
||||
PL_SAVEMENU_INIT,
|
||||
PL_SAVEMENU_1,
|
||||
PL_SAVEMENU_DIFFICULTY_SEL,
|
||||
PL_SAVEMENU_MAIN_LOOP,
|
||||
PL_SAVEMENU_3,
|
||||
PL_SAVEMENU_4,
|
||||
PL_SAVEMENU_5,
|
||||
PL_SAVEMENU_6,
|
||||
PL_SAVEMENU_7,
|
||||
PL_SAVEMENU_SCROLL_SLOT,
|
||||
PL_SAVEMENU_BACK_TO_MAIN,
|
||||
PL_SAVEMENU_SAVE_SLOT_SEL,
|
||||
PL_SAVEMENU_SLOT_SELECTED,
|
||||
PL_SAVEMENU_EXEC_MISC_OPTION,
|
||||
PL_SAVEMENU_8,
|
||||
PL_SAVEMENU_9,
|
||||
PL_SAVEMENU_10,
|
||||
PL_SAVEMENU_11,
|
||||
PL_SAVEMENU_POST_BONUS_CLAIM,
|
||||
PL_SAVEMENU_12,
|
||||
PL_SAVEMENU_13,
|
||||
PL_SAVEMENU_14,
|
||||
PL_SAVEMENU_EXEC_EXTRA_MISC_OPTION,
|
||||
PL_SAVEMENU_EXIT,
|
||||
PL_SAVEMENU_16,
|
||||
PL_SAVEMENU_EXIT_FADE,
|
||||
PL_SAVEMENU_NEW_GAME,
|
||||
PL_SAVEMENU_19,
|
||||
PL_SAVEMENU_MAIN_LOOP0,
|
||||
PL_SAVEMENU_SAVE_SLOT_SEL_FADEIN,
|
||||
PL_SAVEMENU_BLOCKING,
|
||||
};
|
||||
|
||||
@ -38,8 +38,10 @@ enum {
|
||||
MAIN_MENU_NEW_GAME = 4,
|
||||
MAIN_MENU_EXTRAS = 5,
|
||||
MAIN_MENU_INVALID = 6,
|
||||
MAIN_MENU_7 = 7,
|
||||
MAIN_MENU_EXIT = 8,
|
||||
|
||||
/* SaveMenuProc::main_options and main_sel_bitmask */
|
||||
/* SaveMenuProc::main_options and main_sel_bitfile */
|
||||
MAIN_MENU_OPTION_RESUME = (1 << MAIN_MENU_RESUME),
|
||||
MAIN_MENU_OPTION_RESTART = (1 << MAIN_MENU_RESTART),
|
||||
MAIN_MENU_OPTION_COPY = (1 << MAIN_MENU_COPY),
|
||||
@ -47,6 +49,8 @@ enum {
|
||||
MAIN_MENU_OPTION_NEW_GAME = (1 << MAIN_MENU_NEW_GAME),
|
||||
MAIN_MENU_OPTION_EXTRAS = (1 << MAIN_MENU_EXTRAS),
|
||||
MAIN_MENU_OPTION_INVALID = (1 << MAIN_MENU_INVALID),
|
||||
MAIN_MENU_OPTION_7 = (1 << MAIN_MENU_7),
|
||||
MAIN_MENU_OPTION_EXIT = (1 << MAIN_MENU_EXIT),
|
||||
|
||||
/* SaveMenuProc::extra_select */
|
||||
EXTRA_MENU_LINK_ARENA = 0,
|
||||
@ -56,7 +60,7 @@ enum {
|
||||
EXTRA_MENU_BONUS_CLAIM = 5,
|
||||
EXTRA_MENU_6 = 6,
|
||||
|
||||
/* SaveMenuProc::extra_sel_bitmask */
|
||||
/* SaveMenuProc::extra_sel_bitfile */
|
||||
EXTRA_MENU_OPTION_LINK_ARENA = (1 << EXTRA_MENU_LINK_ARENA),
|
||||
EXTRA_MENU_OPTION_SOUND_ROOM = (1 << EXTRA_MENU_SOUND_ROOM),
|
||||
EXTRA_MENU_OPTION_SUPPORT = (1 << EXTRA_MENU_SUPPORT),
|
||||
@ -65,6 +69,29 @@ enum {
|
||||
EXTRA_MENU_OPTION_6 = (1 << EXTRA_MENU_6),
|
||||
};
|
||||
|
||||
enum video_savemenu {
|
||||
BGCHR_SAVEMENU_SUBBOX_TEXT = 0x80,
|
||||
BGPAL_SAVEMENU_SUBBOX_TEXT = 4,
|
||||
|
||||
BGCHR_SAVEMENU_BGFOG = 0x260,
|
||||
BGPAL_SAVEMENU_BGFOG = 7,
|
||||
|
||||
OBJCHR_SAVEMENU_SPRITES = 0x40,
|
||||
OBJPAL_SAVEMENU_SPRITES = 2,
|
||||
|
||||
OBJCHR_SAVEMENU_MAINCHOICE_STR = 0x200,
|
||||
|
||||
OBJCHR_SAVEMENU_TITLEBG = 0x2C0,
|
||||
OBJPAL_SAVEMENU_TITLEBG = 8,
|
||||
|
||||
OBJCHR_SAVEMENU_TITLEGFX = 0x340,
|
||||
};
|
||||
|
||||
enum video_savemenu_slotsel {
|
||||
OBJCHR_SAVEMENU_SLOTSEL_HELPBOX = 0x200,
|
||||
OBJPAL_SAVEMENU_SLOTSEL_HELPBOX = 9,
|
||||
};
|
||||
|
||||
struct SaveDrawProc {
|
||||
/* 00 */ PROC_HEADER;
|
||||
/* 29 */ bool unk_29;
|
||||
@ -99,16 +126,16 @@ struct SaveMenuProc {
|
||||
/* 32 */ u8 extra_options; // extras menu current index
|
||||
/* 33 */ u8 max_choice;
|
||||
/* 34 */ u8 extra_select; // confirm / cancel options
|
||||
/* 35 */ u8 extra_sel_bitmask; // bit mask
|
||||
/* 36 */ u8 unk_36;
|
||||
/* 35 */ u8 extra_sel_bitfile; // bit mask
|
||||
/* 36 */ u8 cursor_config;
|
||||
/* 37 */ u8 chapter_idx[3];
|
||||
/* 3A */ u8 unk_3a[3];
|
||||
/* 3D */ u8 unk_3d;
|
||||
/* 3E */ u8 unk_3e;
|
||||
/* 3E */ u8 hb_en;
|
||||
/* 3F */ u8 sus_slot_cur;
|
||||
/* 40 */ u8 ctrl_timer;
|
||||
/* 41 */ u8 unk_41;
|
||||
/* 42 */ u16 main_sel_bitmask;
|
||||
/* 42 */ u16 main_sel_bitfile;
|
||||
/* 44 */ u16 unk_44;
|
||||
/* 46 */ u16 unk_46;
|
||||
|
||||
@ -117,7 +144,7 @@ struct SaveMenuProc {
|
||||
|
||||
/* 58 */ struct SaveDrawProc * savedraw;
|
||||
/* 5C */ u32 unk_5c;
|
||||
/* 60 */ ProcPtr unk_60;
|
||||
/* 60 */ ProcPtr approc;
|
||||
};
|
||||
|
||||
enum savemenuproc_st {
|
||||
@ -181,31 +208,31 @@ struct ProcBonusClaimMenu
|
||||
/* 5C */ int unk_5c;
|
||||
};
|
||||
|
||||
void sub_80A882C(ProcPtr proc);
|
||||
u8 SaveMenuGetSelectBitMask(u8 bitfile, u32 index);
|
||||
u8 sub_80A887C(u8 a, u8 b);
|
||||
u8 sub_80A88B8(u8);
|
||||
void sub_80A88E0(struct SaveMenuProc * proc);
|
||||
int LoadSaveMenuHelpText(int slot);
|
||||
void SaveMenu_NewGame(ProcPtr proc);
|
||||
u8 SaveMenuGetBitfile(u8 bitfile, u32 index);
|
||||
u8 SaveMenuGetBitfileByMask(u8 a, u8 b);
|
||||
u8 BitfileToIndex(u8);
|
||||
void SaveMenuHandleHelpBox(struct SaveMenuProc * proc);
|
||||
int LoadSaveMenuInfo(int slot);
|
||||
bool SaveMenuWaitHelpBoxAnim(struct SaveMenuProc * proc);
|
||||
void sub_80A8A9C(struct SaveMenuProc * proc);
|
||||
void SaveMenuPutChapterTitle(struct SaveMenuProc * proc);
|
||||
void SaveMenu_SetLcdChapterIdx(void);
|
||||
void SaveMenu_Init(void);
|
||||
void ProcSaveMenu_InitScreen(struct SaveMenuProc * proc);
|
||||
void SaveMenu_InitScreen(struct SaveMenuProc * proc);
|
||||
void SaveMenu_LoadExtraMenuGraphics(struct SaveMenuProc * proc);
|
||||
void SaveMenuInit(struct SaveMenuProc * proc);
|
||||
void SaveMenuInitUnused(struct SaveMenuProc * proc);
|
||||
void SaveMenu_JumpToTarget(struct SaveMenuProc * proc);
|
||||
void SameMenu_CtrlLoop(struct SaveMenuProc * proc);
|
||||
void SaveMenuWriteNewGame(struct SaveMenuProc * proc);
|
||||
void sub_80A9290(struct SaveMenuProc * proc);
|
||||
void SaveMenuPostChapterIDLE(struct SaveMenuProc * proc);
|
||||
void sub_80A96D0(struct SaveMenuProc * proc);
|
||||
void sub_80A96DC(struct SaveMenuProc * proc);
|
||||
void sub_80A96EC(struct SaveMenuProc * proc);
|
||||
void sub_80A99C0(struct SaveMenuProc * proc);
|
||||
void ExecSaveMenuMiscOption(struct SaveMenuProc * proc);
|
||||
void SaveMenu_SaveSlotSelectLoop(struct SaveMenuProc * proc);
|
||||
void _ExecSaveMenuMiscOption(struct SaveMenuProc * proc);
|
||||
void SaveMenuRegisterSlotSelected(struct SaveMenuProc * proc);
|
||||
void SaveMenuWaitSlotBoxScrolling(struct SaveMenuProc * proc);
|
||||
void SaveMenuScrollSlot(struct SaveMenuProc * proc);
|
||||
void sub_80A9A08(struct SaveMenuProc * proc);
|
||||
void sub_80A9A18(struct SaveMenuProc * proc);
|
||||
void SaveMenuScrollBackToMain(struct SaveMenuProc * proc);
|
||||
void sub_80A9A68(struct SaveMenuProc * proc);
|
||||
void sub_80A9AB0(struct SaveMenuProc * proc);
|
||||
void sub_80A9AF4(struct SaveMenuProc * proc);
|
||||
@ -220,18 +247,18 @@ void sub_80AA018(struct SaveMenuProc * proc);
|
||||
void PostSaveMenuHandler(struct SaveMenuProc * proc);
|
||||
void ExtraMapStartSomeBgm(struct SaveMenuProc * proc);
|
||||
void ExecExtraMap(struct SaveMenuProc * proc);
|
||||
void sub_80AA158(struct SaveMenuProc * proc);
|
||||
void sub_80AA1BC(struct SaveMenuProc * proc);
|
||||
void SaveMenuStartExtraMiscScreen(struct SaveMenuProc * proc);
|
||||
void SaveMenuPostExtraMiscScreen(struct SaveMenuProc * proc);
|
||||
void SaveMenu_ResetLcdFormDifficulty(struct SaveMenuProc * proc);
|
||||
void sub_80AA248(struct SaveMenuProc * proc);
|
||||
void sub_80AA2A8(struct SaveMenuProc * proc);
|
||||
void SaveMenu_ReloadScreenFormDifficulty(struct SaveMenuProc * proc);
|
||||
void SaveMenu_PostDifficultHandler(struct SaveMenuProc * proc);
|
||||
void sub_80AA47C(struct SaveMenuProc * proc);
|
||||
void SaveMenuSlotSelDrawSprite(struct SaveMenuProc * proc);
|
||||
void SaveMenuStartBonusClaim(struct SaveMenuProc * proc);
|
||||
void sub_80AA4B4(void);
|
||||
void SaveMenu_EndHelpPromptSprite(void);
|
||||
void StartSaveMenu(ProcPtr);
|
||||
void sub_80AA4F8(ProcPtr proc);
|
||||
void SaveMenuDirectlySelectSlotOnPrepScreen(ProcPtr proc);
|
||||
void Make6C_SaveMenuPostChapter(ProcPtr);
|
||||
void SaveMenu_SetDifficultyChoice(int, int);
|
||||
void sub_80AA550(struct ProcBonusClaimMenu * proc);
|
||||
@ -240,11 +267,11 @@ void sub_80AA658(struct ProcBonusClaimMenu * proc);
|
||||
void sub_80AA69C(struct ProcBonusClaimMenu * proc);
|
||||
void sub_80AA6D8(void);
|
||||
void StartBonusClaimMenu(ProcPtr);
|
||||
void sub_80AA700(void);
|
||||
void InitSaveMenuHelpTextSt(void);
|
||||
const char * GetLeaderNameForSaveMenu(void);
|
||||
int GetLeaderLevelForSaveMenu(void);
|
||||
const char * GetWMNodeNameForSaveMenu(void);
|
||||
void sub_80AA790(u16 *, u16 *, int);
|
||||
void SaveMenuCopyPalette(u16 *, u16 *, int);
|
||||
void sub_80AA7AC(int a, int b);
|
||||
// ??? sub_80AA7EC(???);
|
||||
void sub_80AA9D8(struct SaveDrawProc *);
|
||||
@ -270,7 +297,7 @@ struct SaveDrawCursorProc {
|
||||
/* 30 */ s16 main_options;
|
||||
/* 32 */ s16 unk_32;
|
||||
/* 34 */ s16 unk_34;
|
||||
/* 36 */ u8 unk_36;
|
||||
/* 36 */ u8 cursor_en;
|
||||
/* 37 */ u8 unk_37;
|
||||
/* 38 */ u8 unk_38;
|
||||
/* 39 */ u8 unk_39;
|
||||
@ -298,8 +325,8 @@ struct Unknown020007E0 {
|
||||
|
||||
extern struct Unknown020007E0 gUnknown_020007E0[];
|
||||
|
||||
extern struct Font gUnknown_02000920;
|
||||
extern struct Text gUnknown_02000938;
|
||||
extern struct Font gSaveMenuSubBoxFont;
|
||||
extern struct Text gSaveMenuSubBoxText;
|
||||
|
||||
struct Unknown03004990 {
|
||||
/* 000 */ u8 unk[0x79E - 0x000];
|
||||
@ -322,22 +349,22 @@ void sub_80AB56C(u32 a);
|
||||
// ??? sub_80AB720(???);
|
||||
void sub_80AB760(void*);
|
||||
void sub_80AB77C(void);
|
||||
void sub_80AB794(void);
|
||||
// ??? sub_80AB7BC(???);
|
||||
void sub_80AB83C(struct SaveMenuProc*, s8);
|
||||
void SaveMenuInitSubBoxText(void);
|
||||
// ??? SaveMenuDrawSubSelBoxExt(???);
|
||||
void SaveMenuDrawSubSelBox(struct SaveMenuProc *, s8);
|
||||
// ??? AddMainMenuOption(???);
|
||||
// ??? AddExtraMenuOption(???);
|
||||
void InitSaveMenuChoice(struct SaveMenuProc*);
|
||||
u8 SaveMenuModifySaveSlot(u8, int, int);
|
||||
s8 sub_80AB9FC(struct SaveMenuProc*, int);
|
||||
s8 sub_80ABA98(struct SaveMenuProc*);
|
||||
void StartSqMask(struct SaveMenuProc* parent, int b, int c);
|
||||
void StartSqMask(struct SaveMenuProc*, int, int);
|
||||
void InitSaveMenuChoice(struct SaveMenuProc *);
|
||||
u8 SaveMenuModifySaveSlot(u8 slot, s8 valid, s8 position);
|
||||
s8 SaveMenuTryMoveSaveSlotCursor(struct SaveMenuProc *, s8 position);
|
||||
bool SaveMenuHasOptions(struct SaveMenuProc * proc);
|
||||
void StartSqMask(struct SaveMenuProc * parent, int b, int c);
|
||||
void StartSqMask(struct SaveMenuProc *, int, int);
|
||||
void SaveBgUp_Loop(void);
|
||||
ProcPtr StartSaveBgUp(ProcPtr parent);
|
||||
void sub_80ABC14(u8, struct SaveMenuProc*);
|
||||
void sub_80ABD88(u8);
|
||||
void sub_80ABE3C(int param_1, int param_2);
|
||||
void SaveMenuInitSaveSlotData(u8, struct SaveMenuProc *);
|
||||
void SaveMenuInitSlotPalette(u8);
|
||||
void SaveDrawSetDifficultSlotPalette(int param_1, int param_2);
|
||||
u8 SaveMenuGetValidMenuAmt(u8 endMask, struct SaveMenuProc * proc);
|
||||
void sub_80ABF74(u8);
|
||||
void DrawDifficultyModeText(struct DifficultyMenuProc *);
|
||||
@ -376,7 +403,7 @@ extern u16 * SpriteArray_08A2067C[];
|
||||
// extern ??? ProcScr_savedraw
|
||||
// extern ??? gProcScr_SaveDrawCursor
|
||||
// extern ??? gProcScr_08A206F8
|
||||
// extern ??? gUnknown_08A20720
|
||||
// extern ??? SaveMenuSubSelBoxTexts
|
||||
// extern ??? gProcScr_SqMask
|
||||
// extern ??? gProcScr_SaveBgUp
|
||||
extern u16 * SpriteArray_08A2099C[];
|
||||
|
@ -174,7 +174,7 @@ void StartTalkWaitForInput(ProcPtr parent, int x, int y);
|
||||
void StartTalkWaitForInputUnk(ProcPtr parent, int x, int y, int unk);
|
||||
void TalkShiftClearAll_OnInit(struct Proc*);
|
||||
void TalkShiftClearAll_OnIdle(struct Proc*);
|
||||
void StartTalkChoice(const struct ChoiceEntryInfo* choices, struct Text* text, u16* tm, int defaultChoice, int color, ProcPtr parent);
|
||||
void StartTalkChoice(const struct ChoiceEntryInfo* choices, struct Text* text, u16 * tm, int defaultChoice, int color, ProcPtr parent);
|
||||
void TalkChoice_OnIdle(struct TalkChoiceProc*);
|
||||
void TalkShiftClear_OnInit(struct Proc*);
|
||||
void TalkShiftClear_OnIdle(struct Proc*);
|
||||
@ -207,7 +207,7 @@ int GetTalkChoiceResult(void);
|
||||
int SetTalkChoiceResult(int);
|
||||
void SetTalkNumber(int);
|
||||
void SetTalkUnkStr(const char* str);
|
||||
void PrintStringToTexts(struct Text** texts, const char* str, u16* tm, int unk);
|
||||
void PrintStringToTexts(struct Text** texts, const char* str, u16 * tm, int unk);
|
||||
void TalkPutSpriteText_OnIdle(struct Proc*);
|
||||
void ClearPrimaryHBlank(void);
|
||||
void TalkPutSpriteText_OnEnd(void);
|
||||
|
@ -14,13 +14,13 @@ extern u8 gUnk_02000000[];
|
||||
// extern ??? gMinimapBackWinBuf
|
||||
// extern ??? gMinimapDisplayedWinBuf
|
||||
extern u16 *gMinimapObjectFlashPal;
|
||||
// extern ??? gUnknown_020007A0
|
||||
// extern ??? Pal_020007A0
|
||||
// extern ??? gUnknown_020007E0
|
||||
// extern ??? gUnknown_02000920
|
||||
// extern ??? gUnknown_02000938
|
||||
extern u8 gUnknown_02000940[];
|
||||
extern u8 gUnknown_02000944[];
|
||||
extern struct PlaySt_OptionBits gUnknown_02000948[];
|
||||
// extern ??? gSaveMenuSubBoxFont
|
||||
// extern ??? gSaveMenuSubBoxText
|
||||
extern u8 gPlayStChapterBits[];
|
||||
extern u8 gPlayStChapterMode[];
|
||||
extern struct PlaySt_OptionBits gPlayStOptionBits[];
|
||||
|
||||
// extern ??? gUnk_Sio_02000C78
|
||||
// extern ??? gUnk_Sio_02000F00
|
||||
@ -1094,12 +1094,12 @@ extern struct ProcCmd CONST_DATA gProcScr_DrawDifficultyMenuSprites[];
|
||||
// extern ??? gProcScr_SoundRoom_DrawSprites
|
||||
// extern ??? gUnknown_08A21550
|
||||
// extern ??? gUnknown_08A21568
|
||||
extern u8 gUnknown_08A21658[]; // gfx, "records" background
|
||||
extern u16 gUnknown_08A25DCC[]; // pal, "records" background
|
||||
extern u8 gUnknown_08A25ECC[]; // tsa, "records" background
|
||||
extern u8 gUnknown_08A26380[]; // gfx, fog overlay
|
||||
extern u16 gUnknown_08A268D8[]; // pal, fog overlay
|
||||
extern u8 gUnknown_08A268F8[]; // tsa, fog overlay
|
||||
extern u8 Img_SaveMenuBG[]; // gfx, "records" background
|
||||
extern u16 Pal_SaveMenuBG[]; // pal, "records" background
|
||||
extern u8 Tsa_SaveMenuBG[]; // tsa, "records" background
|
||||
extern u8 Img_MainMenuBgFog[]; // gfx, fog overlay
|
||||
extern u16 Pal_MainMenuBgFog[]; // pal, fog overlay
|
||||
extern u8 Tsa_MainMenuBgFog[]; // tsa, fog overlay
|
||||
extern u8 Img_SaveScreenSprits[]; // gfx
|
||||
extern u16 Pal_SaveScreenSprits[]; // pal
|
||||
extern u16 Pal_08A28088[];
|
||||
@ -1110,7 +1110,7 @@ extern u8 Img_GameMainMenuObjs[];
|
||||
// extern ??? gUnknown_08A2949A
|
||||
// extern ??? gUnknown_08A294BA
|
||||
// extern ??? gUnknown_08A29558
|
||||
extern u16 gUnknown_08A295B4[]; // pal
|
||||
extern u16 Pal_08A295B4[]; // pal
|
||||
extern u8 Tsa_CommGameBgScreenInShop[]; // tsa
|
||||
// extern ??? gUnknown_08A29A88
|
||||
// extern ??? gUnknown_08A2B1E4
|
||||
|
@ -793,12 +793,12 @@ s8 sub_80BCCFC(s8, s8, s8);
|
||||
// ??? sub_80BCDE4(???);
|
||||
int sub_80BCE34(int, int, s16, u16 *, struct Struct0859E7D4 *, int);
|
||||
void ResetGmStoryNode(void);
|
||||
int sub_80BCFDC(u32);
|
||||
int GetPlayChapterId(u32);
|
||||
int GetNextUnclearedNode(struct GMapData *);
|
||||
u32 GetNextUnclearedChapter(void);
|
||||
u32 GetBattleMapKind(void);
|
||||
int sub_80BD20C(int);
|
||||
int sub_80BD224(struct GMapData *);
|
||||
int GetChapterIndexOnWmNode(struct GMapData *);
|
||||
void sub_80BD260(struct GMapData *, void *);
|
||||
void sub_80BD270(struct GMapData *, void *);
|
||||
// ??? sub_80BD284(???);
|
||||
|
12
ldscript.txt
12
ldscript.txt
@ -32,13 +32,13 @@ SECTIONS
|
||||
. = 0x000504; gMinimapBackWinBuf = .;
|
||||
. = 0x000508; gMinimapDisplayedWinBuf = .;
|
||||
. = 0x00050C; gMinimapObjectFlashPal = .;
|
||||
. = 0x0007A0; gUnknown_020007A0 = .;
|
||||
. = 0x0007A0; Pal_020007A0 = .;
|
||||
. = 0x0007E0; gUnknown_020007E0 = .;
|
||||
. = 0x000920; gUnknown_02000920 = .;
|
||||
. = 0x000938; gUnknown_02000938 = .;
|
||||
. = 0x000940; gUnknown_02000940 = .;
|
||||
. = 0x000944; gUnknown_02000944 = .;
|
||||
. = 0x000948; gUnknown_02000948 = .;
|
||||
. = 0x000920; gSaveMenuSubBoxFont = .;
|
||||
. = 0x000938; gSaveMenuSubBoxText = .;
|
||||
. = 0x000940; gPlayStChapterBits = .;
|
||||
. = 0x000944; gPlayStChapterMode = .;
|
||||
. = 0x000948; gPlayStOptionBits = .;
|
||||
. = 0x000968; gBonusClaimData = .;
|
||||
. = 0x000D68; gBonusClaimDataUpdated = .;
|
||||
. = 0x000FA0; gUnknown_02000FA0 = .;
|
||||
|
@ -564,19 +564,19 @@ void SetupDungeonRecordUi(ProcPtr proc) {
|
||||
|
||||
SetBlendConfig(1, 6, 16, 0);
|
||||
|
||||
Decompress(gUnknown_08A21658, (void *)BG_VRAM + GetBackgroundTileDataOffset(3));
|
||||
Decompress(Img_SaveMenuBG, (void *)BG_VRAM + GetBackgroundTileDataOffset(3));
|
||||
|
||||
ApplyPalettes(gUnknown_08A25DCC, 8, 8);
|
||||
ApplyPalettes(Pal_SaveMenuBG, 8, 8);
|
||||
|
||||
CallARM_FillTileRect(gBG3TilemapBuffer, gUnknown_08A25ECC, 0x8000);
|
||||
CallARM_FillTileRect(gBG3TilemapBuffer, Tsa_SaveMenuBG, 0x8000);
|
||||
|
||||
// Load and display fog overlay
|
||||
|
||||
Decompress(gUnknown_08A26380, (void *)(BG_VRAM + 0x4C00) + GetBackgroundTileDataOffset(2));
|
||||
Decompress(Img_MainMenuBgFog, (void *)(BG_VRAM + 0x4C00) + GetBackgroundTileDataOffset(2));
|
||||
|
||||
Decompress(gUnknown_08A268F8, gGenericBuffer);
|
||||
Decompress(Tsa_MainMenuBgFog, gGenericBuffer);
|
||||
|
||||
ApplyPalette(gUnknown_08A268D8, 7);
|
||||
ApplyPalette(Pal_MainMenuBgFog, 7);
|
||||
|
||||
CallARM_FillTileRect(gBG2TilemapBuffer, gGenericBuffer, 0x7260);
|
||||
|
||||
|
@ -115,7 +115,7 @@ int GetNextChapterStatsEntry()
|
||||
return GetChapterStats(index - 1)->chapter_index;
|
||||
}
|
||||
|
||||
void RegisterChapterTimeAndTurnCount(struct PlaySt* play_st)
|
||||
void RegisterChapterTimeAndTurnCount(struct PlaySt * play_st)
|
||||
{
|
||||
struct ChapterStats *chstat = GetChapterStats(GetNextChapterStatsSlot());
|
||||
int time, turn;
|
||||
|
@ -141,9 +141,9 @@ bool sub_80A6D1C(u8 *buf)
|
||||
return true;
|
||||
}
|
||||
|
||||
const char* GetChapterTitle_(unsigned ch)
|
||||
const char * GetChapterTitleName_(unsigned ch)
|
||||
{
|
||||
return GetChapterTitle(ch);
|
||||
return GetChapterTitleName(ch);
|
||||
}
|
||||
|
||||
bool bmsave_null_false1(void)
|
||||
|
@ -68,8 +68,8 @@ void sub_80B0674(void)
|
||||
|
||||
EnablePaletteSync();
|
||||
|
||||
sub_8089678(0xac0);
|
||||
sub_8089624(0xb40, sub_8089768(&gPlaySt));
|
||||
PutChapterTitleBG(0xac0);
|
||||
PutChapterTitleGfx(0xb40, GetChapterTitleExtra(&gPlaySt));
|
||||
|
||||
return;
|
||||
}
|
||||
@ -321,7 +321,7 @@ void BonusClaim_Init(struct BonusClaimProc * proc)
|
||||
SetupBackgrounds(0);
|
||||
|
||||
ApplyPalettes(Pal_CommGameBgScreenInShop, 0xC, 2);
|
||||
ApplyPalette(gUnknown_08A295B4, 0xE);
|
||||
ApplyPalette(Pal_08A295B4, 0xE);
|
||||
Decompress(Img_CommGameBgScreen, (void*)0x06008000);
|
||||
|
||||
CallARM_FillTileRect(gBG3TilemapBuffer, Tsa_CommGameBgScreenInShop, 0xc000);
|
||||
@ -602,7 +602,7 @@ void BonusClaim_StartSelectTargetSubMenu(struct BonusClaimProc * proc)
|
||||
int count;
|
||||
int color = 0;
|
||||
struct Unit * unit = gpBonusClaimConfig[i].unit;
|
||||
u16* tm = gBG0TilemapBuffer + 14;
|
||||
u16 * tm = gBG0TilemapBuffer + 14;
|
||||
|
||||
ClearText(th);
|
||||
Text_SetCursor(th, 0);
|
||||
|
2
src/cg.c
2
src/cg.c
@ -193,7 +193,7 @@ void sub_80B65F4(void) {
|
||||
void ModifySaveLinkArenaStruct2B(void *buf, int val);
|
||||
|
||||
//! FE8U = 0x080B65F8
|
||||
void DisplayCGfx(u16* tm, int offset, int palId, int palCount, int idx)
|
||||
void DisplayCGfx(u16 * tm, int offset, int palId, int palCount, int idx)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -41,110 +41,82 @@ void sub_80895B4(int config, int palId)
|
||||
}
|
||||
|
||||
ApplyPalette(pal, palId);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void sub_8089624(int chr, u32 titleId) {
|
||||
|
||||
if (titleId > 0x108) {
|
||||
void PutChapterTitleGfx(int chr, u32 titleId)
|
||||
{
|
||||
if (titleId > 0x108)
|
||||
titleId = 0x54;
|
||||
}
|
||||
|
||||
gChapterTitleFxSt.unk_02 = chr & 0x3FF;
|
||||
|
||||
Decompress(chap_title_data[titleId].save, (void*)((chr * 0x20) + 0x6000000));
|
||||
|
||||
return;
|
||||
gChapterTitleFxSt.chr_str = chr & 0x3FF;
|
||||
Decompress(chap_title_data[titleId].save, (void*)((chr * TILE_SIZE_4BPP) + 0x6000000));
|
||||
}
|
||||
|
||||
void sub_808966C(int chr, int titleId) {
|
||||
sub_8089624(chr, titleId);
|
||||
return;
|
||||
void _PutChapterTitleGfx(int chr, int titleId)
|
||||
{
|
||||
PutChapterTitleGfx(chr, titleId);
|
||||
}
|
||||
|
||||
void sub_8089678(int chr) {
|
||||
|
||||
gChapterTitleFxSt.unk_00 = chr & 0x3FF;
|
||||
|
||||
Decompress(gGfx_08A09E4C, (void*)((chr * 0x20) + 0x6000000));
|
||||
|
||||
return;
|
||||
void PutChapterTitleBG(int chr)
|
||||
{
|
||||
gChapterTitleFxSt.chr_bg = chr & 0x3FF;
|
||||
Decompress(gGfx_08A09E4C, (void*)((chr * TILE_SIZE_4BPP) + 0x6000000));
|
||||
}
|
||||
|
||||
extern u8 gUnknown_08A0A4E8[];
|
||||
|
||||
void sub_80896A8(int chr) {
|
||||
|
||||
gChapterTitleFxSt.unk_00 = chr & 0x3FF;
|
||||
|
||||
Decompress(gUnknown_08A0A4E8, (void*)((chr * 0x20) + 0x6000000));
|
||||
|
||||
return;
|
||||
void sub_80896A8(int chr)
|
||||
{
|
||||
gChapterTitleFxSt.chr_bg = chr & 0x3FF;
|
||||
Decompress(gUnknown_08A0A4E8, (void*)((chr * TILE_SIZE_4BPP) + 0x6000000));
|
||||
}
|
||||
|
||||
void sub_80896D8(u16* tm, int pal) {
|
||||
void sub_80896D8(u16 * tm, int pal)
|
||||
{
|
||||
int i;
|
||||
|
||||
int tile = TILEREF(gChapterTitleFxSt.unk_02, pal);
|
||||
|
||||
for (i = 0; i < 0x40; i++) {
|
||||
int tile = TILEREF(gChapterTitleFxSt.chr_str, pal);
|
||||
for (i = 0; i < 0x40; i++)
|
||||
*tm++ = tile++;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void sub_80896FC(u16* tm, int pal, int c) {
|
||||
void sub_80896FC(u16 * tm, int pal, int c)
|
||||
{
|
||||
int i;
|
||||
|
||||
int tile = TILEREF(gChapterTitleFxSt.unk_02, pal);
|
||||
|
||||
for (i = 0; i < 0x40; i++) {
|
||||
int tile = TILEREF(gChapterTitleFxSt.chr_str, pal);
|
||||
for (i = 0; i < 0x40; i++)
|
||||
*tm++ = tile++;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void sub_8089720(u16 * tm, int pal)
|
||||
{
|
||||
int i;
|
||||
|
||||
int tile = TILEREF(gChapterTitleFxSt.unk_00, pal);
|
||||
|
||||
for (i = 0; i < 0x80; i++) {
|
||||
int tile = TILEREF(gChapterTitleFxSt.chr_bg, pal);
|
||||
for (i = 0; i < 0x80; i++)
|
||||
*tm++ = tile++;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void sub_8089744(u16* tm, int pal) {
|
||||
|
||||
CallARM_FillTileRect(tm, gTsa_08A0A9F8, (u16)TILEREF(gChapterTitleFxSt.unk_00, pal));
|
||||
|
||||
return;
|
||||
void sub_8089744(u16 * tm, int pal)
|
||||
{
|
||||
CallARM_FillTileRect(tm, gTsa_08A0A9F8, (u16)TILEREF(gChapterTitleFxSt.chr_bg, pal));
|
||||
}
|
||||
|
||||
int sub_8089768(struct PlaySt* chapterData) {
|
||||
int GetChapterTitleExtra(struct PlaySt * chapterData)
|
||||
{
|
||||
|
||||
if (chapterData == 0) {
|
||||
if (chapterData == 0)
|
||||
return 0x54; // No Data
|
||||
}
|
||||
|
||||
if (chapterData->chapterStateBits & PLAY_FLAG_POSTGAME) {
|
||||
if (chapterData->chapterStateBits & PLAY_FLAG_POSTGAME)
|
||||
return 0x57; // Creature Campaign
|
||||
}
|
||||
|
||||
if (chapterData->chapterStateBits & PLAY_FLAG_COMPLETE) {
|
||||
if (chapterData->chapterStateBits & PLAY_FLAG_COMPLETE)
|
||||
return 0x55; // Epilogue
|
||||
}
|
||||
|
||||
return GetROMChapterStruct(chapterData->chapterIndex)->chapTitleId;
|
||||
}
|
||||
|
||||
int sub_808979C(struct PlaySt* chapterData) {
|
||||
int GetChapterTitleWM(struct PlaySt * chapterData)
|
||||
{
|
||||
int unk;
|
||||
int i;
|
||||
|
||||
@ -152,16 +124,14 @@ int sub_808979C(struct PlaySt* chapterData) {
|
||||
return 0x54; // No Data
|
||||
}
|
||||
|
||||
unk = sub_80BCFDC(chapterData->chapterIndex);
|
||||
unk = GetPlayChapterId(chapterData->chapterIndex);
|
||||
|
||||
if ((chapterData->chapterStateBits & PLAY_FLAG_POSTGAME) || GetNextUnclearedNode(&gGMData) != unk) {
|
||||
|
||||
for (i = 0; i < gWMMonsterSpawnsSize; i++) {
|
||||
|
||||
if (unk == gWMMonsterSpawnLocations[i]) {
|
||||
if ((chapterData->chapterStateBits & PLAY_FLAG_POSTGAME) || GetNextUnclearedNode(&gGMData) != unk)
|
||||
{
|
||||
for (i = 0; i < gWMMonsterSpawnsSize; i++)
|
||||
{
|
||||
if (unk == gWMMonsterSpawnLocations[i])
|
||||
return 0x46 + i;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -34,9 +34,9 @@ const struct ChapterEventGroup* GetChapterEventDataPointer(unsigned chIndex) {
|
||||
return gExtraMapInfo->event_info;
|
||||
}
|
||||
|
||||
const char* GetChapterTitle(unsigned chIndex) {
|
||||
const char * GetChapterTitleName(unsigned chIndex)
|
||||
{
|
||||
if (chIndex != 0x7F)
|
||||
// ???????????????????
|
||||
return GetStringFromIndex((int)(&GetROMChapterStruct(chIndex)->chapTitleTextId));
|
||||
|
||||
return gExtraMapInfo->chapter_title;
|
||||
|
@ -577,8 +577,8 @@ void ChapterIntro_DrawChapterTitleMaybe() {
|
||||
BG_Fill(gBG0TilemapBuffer, 0x1280);
|
||||
sub_80895B4(8, 5);
|
||||
|
||||
var = sub_808979C(&gPlaySt);
|
||||
sub_808966C(0x280, var);
|
||||
var = GetChapterTitleWM(&gPlaySt);
|
||||
_PutChapterTitleGfx(0x280, var);
|
||||
sub_80896FC(gBG0TilemapBuffer + 0x123, 5, var);
|
||||
|
||||
BG_EnableSyncByMask(1);
|
||||
|
@ -52,7 +52,7 @@ void ChapterIntroTitle_InitBgImg(struct ChapterIntroFXProc *proc)
|
||||
SetWin0Box(0, 0x40, 0xF0, 0x60);
|
||||
|
||||
sub_80895B4(8, 1);
|
||||
sub_8089624(0x100, sub_808979C(&gPlaySt));
|
||||
PutChapterTitleGfx(0x100, GetChapterTitleWM(&gPlaySt));
|
||||
sub_80896D8(TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 9), 1);
|
||||
|
||||
EnablePaletteSync();
|
||||
|
@ -21,7 +21,7 @@ struct Unknown_08A209FC gUnknown_08A209FC[] =
|
||||
};
|
||||
|
||||
//! FE8U = 0x080ABC14
|
||||
void sub_80ABC14(u8 slot, struct SaveMenuProc * proc)
|
||||
void SaveMenuInitSaveSlotData(u8 slot, struct SaveMenuProc * proc)
|
||||
{
|
||||
struct PlaySt playSt;
|
||||
struct GMapData worldMapData;
|
||||
@ -32,19 +32,19 @@ void sub_80ABC14(u8 slot, struct SaveMenuProc * proc)
|
||||
if (IsSaveValid(slot))
|
||||
{
|
||||
int chIndex;
|
||||
int r2;
|
||||
int ch_idx;
|
||||
ReadGameSavePlaySt(slot, &playSt);
|
||||
|
||||
r2 = playSt.chapterIndex;
|
||||
ch_idx = playSt.chapterIndex;
|
||||
if (!(playSt.chapterStateBits & PLAY_FLAG_COMPLETE) && (playSt.save_menu_type == 4))
|
||||
{
|
||||
LoadSavedWMStuff(slot, &worldMapData);
|
||||
r2 = sub_80BD224(&worldMapData);
|
||||
ch_idx = GetChapterIndexOnWmNode(&worldMapData);
|
||||
}
|
||||
|
||||
chIndex = playSt.chapterIndex;
|
||||
playSt.chapterIndex = r2;
|
||||
proc->chapter_idx[slot] = sub_8089768(&playSt);
|
||||
playSt.chapterIndex = ch_idx;
|
||||
proc->chapter_idx[slot] = GetChapterTitleExtra(&playSt);
|
||||
|
||||
playSt.chapterIndex = chIndex;
|
||||
proc->played_time[slot] = playSt.time_saved;
|
||||
@ -52,23 +52,17 @@ void sub_80ABC14(u8 slot, struct SaveMenuProc * proc)
|
||||
|
||||
// BUG?
|
||||
if (IsGameNotFirstChapter((struct PlaySt *)(uintptr_t)slot) != 0)
|
||||
{
|
||||
proc->unk_3a[slot] |= 1;
|
||||
}
|
||||
|
||||
if (LoadSavedEid8A(slot) != 0)
|
||||
{
|
||||
proc->unk_3a[slot] |= 2;
|
||||
}
|
||||
|
||||
if (playSt.chapterStateBits & PLAY_FLAG_COMPLETE)
|
||||
{
|
||||
proc->unk_3a[slot] |= 4;
|
||||
}
|
||||
|
||||
gUnknown_02000940[slot] = playSt.chapterStateBits;
|
||||
gUnknown_02000944[slot] = playSt.chapterModeIndex;
|
||||
memcpy(&gUnknown_02000948[slot], &playSt.config, 8);
|
||||
gPlayStChapterBits[slot] = playSt.chapterStateBits;
|
||||
gPlayStChapterMode[slot] = playSt.chapterModeIndex;
|
||||
memcpy(&gPlayStOptionBits[slot], &playSt.config, 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -76,10 +70,10 @@ void sub_80ABC14(u8 slot, struct SaveMenuProc * proc)
|
||||
proc->unk_3a[slot] = 0;
|
||||
proc->played_time[slot] = 0;
|
||||
|
||||
gUnknown_02000940[slot] = 0;
|
||||
gUnknown_02000944[slot] = 0;
|
||||
gPlayStChapterBits[slot] = 0;
|
||||
gPlayStChapterMode[slot] = 0;
|
||||
|
||||
memset(&gUnknown_02000948[slot], 0, 8);
|
||||
memset(&gPlayStOptionBits[slot], 0, 8);
|
||||
}
|
||||
}
|
||||
else if (proc->unk_44 == 0x100)
|
||||
@ -100,7 +94,7 @@ void sub_80ABC14(u8 slot, struct SaveMenuProc * proc)
|
||||
}
|
||||
|
||||
//! FE8U = 0x080ABD88
|
||||
void sub_80ABD88(u8 slot)
|
||||
void SaveMenuInitSlotPalette(u8 slot)
|
||||
{
|
||||
int i;
|
||||
#ifndef NONMATCHING
|
||||
@ -111,29 +105,29 @@ void sub_80ABD88(u8 slot)
|
||||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
u32 flags = gUnknown_02000940[i] & 0x40 ? 4 : 0;
|
||||
u32 flags = gPlayStChapterBits[i] & PLAY_FLAG_HARD ? 4 : 0;
|
||||
|
||||
if (!gUnknown_02000948[i].controller)
|
||||
if (!gPlayStOptionBits[i].controller)
|
||||
{
|
||||
if (gUnknown_02000944[i] == 1)
|
||||
if (gPlayStChapterMode[i] == 1)
|
||||
{
|
||||
flags = flags | 0x10;
|
||||
}
|
||||
|
||||
if (gUnknown_02000944[i] == 2)
|
||||
if (gPlayStChapterMode[i] == 2)
|
||||
{
|
||||
flags = flags | 0x20;
|
||||
flags = (u8)flags;
|
||||
}
|
||||
|
||||
if (gUnknown_02000944[i] == 3)
|
||||
if (gPlayStChapterMode[i] == 3)
|
||||
{
|
||||
flags = flags | 0x40;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gUnknown_02000944[i] == 3)
|
||||
if (gPlayStChapterMode[i] == 3)
|
||||
{
|
||||
flags = flags | 0x40;
|
||||
}
|
||||
@ -155,7 +149,6 @@ void sub_80ABD88(u8 slot)
|
||||
}
|
||||
|
||||
EnablePaletteSync();
|
||||
return;
|
||||
}
|
||||
|
||||
extern u16 gUnknown_08A07B0A[];
|
||||
@ -164,9 +157,9 @@ extern u16 gUnknown_08A07C0A[];
|
||||
extern u16 gUnknown_08A07BEA[];
|
||||
|
||||
//! FE8U = 0x080ABE3C
|
||||
void sub_80ABE3C(int param_1, int param_2)
|
||||
void SaveDrawSetDifficultSlotPalette(int param_1, int param_2)
|
||||
{
|
||||
int r2;
|
||||
int slot;
|
||||
u16 * r6;
|
||||
u16 * r8;
|
||||
int r9;
|
||||
@ -179,16 +172,16 @@ void sub_80ABE3C(int param_1, int param_2)
|
||||
if (param_1 > 0x10)
|
||||
param_1 = 0x10 - (param_1 & 0xf);
|
||||
|
||||
for (r2 = 0; r2 < 3; r2++)
|
||||
for (slot = 0; slot < 3; slot++)
|
||||
{
|
||||
int tmp;
|
||||
if (!(gUnknown_02000940[r2] & 0x40))
|
||||
if (!(gPlayStChapterBits[slot] & PLAY_FLAG_HARD))
|
||||
continue;
|
||||
|
||||
tmp = (r2 * 0x20 + 0xa0);
|
||||
tmp = (slot * 0x20 + 0xa0);
|
||||
r8 = &gPaletteBuffer[tmp + 0x109];
|
||||
|
||||
if (r2 == param_2)
|
||||
if (slot == param_2)
|
||||
{
|
||||
ip = ketchup;
|
||||
r6 = pickle;
|
||||
@ -212,8 +205,6 @@ void sub_80ABE3C(int param_1, int param_2)
|
||||
}
|
||||
|
||||
EnablePaletteSync();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080ABF44
|
||||
@ -332,10 +323,10 @@ void DifficultySelect_OnEnd(struct DifficultyMenuProc * proc)
|
||||
return;
|
||||
}
|
||||
|
||||
extern u16 gUnknown_08A25DCC[]; // pal
|
||||
extern u16 gUnknown_08A268D8[]; // pal
|
||||
extern u16 Pal_SaveMenuBG[]; // pal
|
||||
extern u16 Pal_MainMenuBgFog[]; // pal
|
||||
extern u16 Pal_SaveScreenSprits[]; // pal
|
||||
extern u16 gUnknown_08A295B4[]; // pal
|
||||
extern u16 Pal_08A295B4[]; // pal
|
||||
extern u16 Pal_DifficultyMenuObjs[];
|
||||
extern u8 Img_DifficultyMenuObjs[];
|
||||
|
||||
@ -355,11 +346,11 @@ void InitDifficultySelectScreen(struct DifficultyMenuProc * proc)
|
||||
InitText(&proc->unk_38[i], 14);
|
||||
}
|
||||
|
||||
ApplyPalettes(gUnknown_08A25DCC, 8, 8);
|
||||
ApplyPalette(gUnknown_08A268D8, 7);
|
||||
ApplyPalettes(Pal_SaveMenuBG, 8, 8);
|
||||
ApplyPalette(Pal_MainMenuBgFog, 7);
|
||||
|
||||
ApplyPalettes(Pal_SaveScreenSprits, 18, 8);
|
||||
ApplyPalette(gUnknown_08A295B4, 2);
|
||||
ApplyPalette(Pal_08A295B4, 2);
|
||||
|
||||
Decompress(Img_DifficultyMenuObjs, (void *)0x06010800);
|
||||
ApplyPalettes(Pal_DifficultyMenuObjs, 17, 10);
|
||||
|
@ -81,9 +81,9 @@ struct UnkProc {
|
||||
/* 4C */ u16 unk_4c[5];
|
||||
};
|
||||
|
||||
extern char gUnknown_020007A0[];
|
||||
extern char Pal_020007A0[];
|
||||
|
||||
char* CONST_DATA gUnknown_08A3CD64 = gUnknown_020007A0;
|
||||
char* CONST_DATA gUnknown_08A3CD64 = Pal_020007A0;
|
||||
|
||||
struct CharacterEndingEnt CONST_DATA gCharacterEndings_Eirika[] = {
|
||||
{ CHARACTER_ENDING_PAIRED, CHARACTER_SETH, CHARACTER_NATASHA, 0x0000081F, },
|
||||
@ -315,7 +315,7 @@ extern u16 gUnknown_020017A0[];
|
||||
extern u16 gUnknown_02001FA0[];
|
||||
|
||||
u16* CONST_DATA gUnknown_08A3D348[] = {
|
||||
(u16*) gUnknown_020007A0,
|
||||
(u16*) Pal_020007A0,
|
||||
gUnknown_02000FA0,
|
||||
gUnknown_020017A0,
|
||||
gUnknown_02001FA0,
|
||||
@ -439,7 +439,7 @@ void SetupCharacterEndingGfx(void) {
|
||||
void sub_80B6810(void) {
|
||||
int offset;
|
||||
int i;
|
||||
u16* tm;
|
||||
u16 * tm;
|
||||
|
||||
ApplyPalettes(gPal_CharacterEndingMenu, 0xC, 2);
|
||||
ApplyPalettes(Pal_CommGameBgScreenInShop, 0xE, 2);
|
||||
@ -1752,13 +1752,13 @@ void sub_80B8014(void) {
|
||||
SetBlendBackdropB(0);
|
||||
SetBlendConfig(1, 6, 0x10, 0);
|
||||
|
||||
Decompress(gUnknown_08A21658, (void *)(GetBackgroundTileDataOffset(3) + 0x6000000));
|
||||
ApplyPalettes(gUnknown_08A25DCC, 8, 8);
|
||||
CallARM_FillTileRect(gBG3TilemapBuffer, gUnknown_08A25ECC, 0x8000);
|
||||
Decompress(Img_SaveMenuBG, (void *)(GetBackgroundTileDataOffset(3) + 0x6000000));
|
||||
ApplyPalettes(Pal_SaveMenuBG, 8, 8);
|
||||
CallARM_FillTileRect(gBG3TilemapBuffer, Tsa_SaveMenuBG, 0x8000);
|
||||
|
||||
Decompress(gUnknown_08A26380, (void *)(GetBackgroundTileDataOffset(2) + 0x06004C00));
|
||||
Decompress(gUnknown_08A268F8, gGenericBuffer);
|
||||
ApplyPalette(gUnknown_08A268D8, 7);
|
||||
Decompress(Img_MainMenuBgFog, (void *)(GetBackgroundTileDataOffset(2) + 0x06004C00));
|
||||
Decompress(Tsa_MainMenuBgFog, gGenericBuffer);
|
||||
ApplyPalette(Pal_MainMenuBgFog, 7);
|
||||
CallARM_FillTileRect(gBG2TilemapBuffer, gGenericBuffer, 0x00007260);
|
||||
|
||||
BG_EnableSyncByMask(0xc);
|
||||
|
@ -62,7 +62,7 @@ void sub_80B04BC(struct Proc8A21568* proc) {
|
||||
//! FE8U = 0x080B04F8
|
||||
void sub_80B04F8(void) {
|
||||
ApplyPalettes(Pal_CommGameBgScreenInShop, 0, 2);
|
||||
ApplyPalette(gUnknown_08A295B4, 2);
|
||||
ApplyPalette(Pal_08A295B4, 2);
|
||||
Decompress(Img_CommGameBgScreen, (void*)0x06001000);
|
||||
CallARM_FillTileRect(gBG0TilemapBuffer, Tsa_CommGameBgScreenInShop, 0x80);
|
||||
|
||||
|
10
src/face.c
10
src/face.c
@ -522,7 +522,7 @@ void FaceRefreshSprite(struct FaceProc* proc) {
|
||||
}
|
||||
|
||||
//! FE8U = 0x08005894
|
||||
void PutFaceTm(u16* tm, u8* data, int tileref, s8 isFlipped) {
|
||||
void PutFaceTm(u16 * tm, u8* data, int tileref, s8 isFlipped) {
|
||||
int ix;
|
||||
int iy;
|
||||
|
||||
@ -576,7 +576,7 @@ void UnpackFaceChibiGraphics(int fid, int chr, int pal) {
|
||||
}
|
||||
|
||||
//! FE8U = 0x08005988
|
||||
void PutFaceChibi(int fid, u16* tm, int chr, int pal, s8 isFlipped) {
|
||||
void PutFaceChibi(int fid, u16 * tm, int chr, int pal, s8 isFlipped) {
|
||||
UnpackFaceChibiGraphics(fid, chr, pal);
|
||||
|
||||
chr &= 0x3FF;
|
||||
@ -657,7 +657,7 @@ void EndFaceChibiSpr(void) {
|
||||
}
|
||||
|
||||
//! FE8U = 0x08005B78
|
||||
void PutFace80x72_Standard(u16* tm, int tileref, const struct FaceData* info) {
|
||||
void PutFace80x72_Standard(u16 * tm, int tileref, const struct FaceData* info) {
|
||||
int x = info->xMouth - 1;
|
||||
int y = info->yMouth;
|
||||
|
||||
@ -677,7 +677,7 @@ void PutFace80x72_Standard(u16* tm, int tileref, const struct FaceData* info) {
|
||||
}
|
||||
|
||||
//! FE8U = 0x08005BCC
|
||||
void PutFace80x72_Raised(u16* tm, int tileref, const struct FaceData* info) {
|
||||
void PutFace80x72_Raised(u16 * tm, int tileref, const struct FaceData* info) {
|
||||
int x = info->xMouth - 1;
|
||||
int y = info->yMouth - 1;
|
||||
|
||||
@ -713,7 +713,7 @@ s8 ShouldFaceBeRaised(int fid) {
|
||||
}
|
||||
|
||||
//! FE8U = 0x08005CA4
|
||||
void PutFace80x72_Core(u16* tm, int fid, int chr, int pal) {
|
||||
void PutFace80x72_Core(u16 * tm, int fid, int chr, int pal) {
|
||||
const struct FaceData* info;
|
||||
|
||||
if (fid == 0) {
|
||||
|
@ -37,7 +37,7 @@ ProcPtr StartMuralBackground(ProcPtr parent, void* vram, int pal) {
|
||||
int tileref;
|
||||
int i;
|
||||
|
||||
u16* tm = gBG3TilemapBuffer;
|
||||
u16 * tm = gBG3TilemapBuffer;
|
||||
|
||||
if (vram == NULL) {
|
||||
vram = ((void*) VRAM) + GetBackgroundTileDataOffset(3);
|
||||
@ -69,7 +69,7 @@ ProcPtr StartMuralBackgroundAlt(ProcPtr parent, void * vram, int pal, u8 flag)
|
||||
{
|
||||
int tileref;
|
||||
int i;
|
||||
u16* tm = gBG3TilemapBuffer;
|
||||
u16 * tm = gBG3TilemapBuffer;
|
||||
|
||||
if (vram == 0) {
|
||||
vram = ((void*) VRAM) + GetBackgroundTileDataOffset(3);
|
||||
@ -101,7 +101,7 @@ ProcPtr StartMuralBackgroundExt(ProcPtr parent, void* vram, int a, int b, int pa
|
||||
int i;
|
||||
int tileref;
|
||||
|
||||
u16* tm = gBG3TilemapBuffer;
|
||||
u16 * tm = gBG3TilemapBuffer;
|
||||
|
||||
if (vram == 0) {
|
||||
vram = ((void*) VRAM) + GetBackgroundTileDataOffset(3);
|
||||
|
@ -427,7 +427,7 @@ void sub_8098A04(u16 * tm)
|
||||
}
|
||||
|
||||
//! FE8U = 0x08098A74
|
||||
void sub_8098A74(u16* tm) {
|
||||
void sub_8098A74(u16 * tm) {
|
||||
int textId;
|
||||
|
||||
TileMap_FillRect(tm, 10, 8, 0);
|
||||
@ -789,7 +789,7 @@ void sub_8099120(struct PrepItemScreenProc* proc) {
|
||||
}
|
||||
|
||||
//! FE8U = 0x08099328
|
||||
void sub_8099328(struct PrepItemScreenProc* proc, u16* tm, struct Unit* unit) {
|
||||
void sub_8099328(struct PrepItemScreenProc* proc, u16 * tm, struct Unit* unit) {
|
||||
TileMap_FillRect(tm, 10, 6, 0);
|
||||
|
||||
ClearText(&gPrepItemScreenTexts[10]);
|
||||
@ -1532,7 +1532,7 @@ ProcPtr StartPrepItemScreen(ProcPtr proc) {
|
||||
}
|
||||
|
||||
//! FE8U = 0x08099F7C
|
||||
void sub_8099F7C(struct Text* th, u16* tm, struct Unit* unit, u16 flags) {
|
||||
void sub_8099F7C(struct Text* th, u16 * tm, struct Unit* unit, u16 flags) {
|
||||
int itemCount;
|
||||
int i;
|
||||
|
||||
|
@ -112,7 +112,7 @@ void sub_809D300(struct Text * textBase, u16 * tm, int yLines, struct Unit * uni
|
||||
}
|
||||
|
||||
//! FE8U = 0x0809D418
|
||||
void sub_809D418(u16* tm, int yLines) {
|
||||
void sub_809D418(u16 * tm, int yLines) {
|
||||
int i;
|
||||
|
||||
for (i = yLines; i < yLines + 7 && i < gUnknown_02012F56; i++) {
|
||||
|
@ -142,7 +142,7 @@ s8 PrepItemTrade_DpadKeyHandler(struct PrepMenuTradeProc * proc)
|
||||
}
|
||||
|
||||
//! FE8U = 0x0809B74C
|
||||
void DrawPrepScreenItems(u16* tm, struct Text* th, struct Unit* unit, u8 checkPrepUsability) {
|
||||
void DrawPrepScreenItems(u16 * tm, struct Text* th, struct Unit* unit, u8 checkPrepUsability) {
|
||||
s8 isUsable;
|
||||
int i;
|
||||
int itemCount;
|
||||
@ -180,7 +180,7 @@ void DrawPrepScreenItems(u16* tm, struct Text* th, struct Unit* unit, u8 checkPr
|
||||
}
|
||||
|
||||
//! FE8U = 0x0809B830
|
||||
void DrawPrepScreenItemIcons(u16* tm, struct Unit* unit) {
|
||||
void DrawPrepScreenItemIcons(u16 * tm, struct Unit* unit) {
|
||||
int i;
|
||||
|
||||
int itemCount = GetUnitItemCount(unit);
|
||||
|
271
src/savedraw.c
271
src/savedraw.c
@ -256,7 +256,7 @@ void sub_80AA7EC(struct SaveDrawProc * proc)
|
||||
|
||||
x = 143;
|
||||
|
||||
if (saveMenuProc->main_sel_bitmask == 1)
|
||||
if (saveMenuProc->main_sel_bitfile == 1)
|
||||
{
|
||||
FormatTime(saveMenuProc->total_time, &hours, &minutes, &seconds);
|
||||
}
|
||||
@ -353,11 +353,11 @@ void SaveDraw_Init(struct SaveDrawProc * proc)
|
||||
|
||||
if (SAVE_MENU_PARENT(proc)->sus_slot_cur == 0xff)
|
||||
{
|
||||
SAVE_MENU_PARENT(proc)->unk_60 = NULL;
|
||||
SAVE_MENU_PARENT(proc)->approc = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
SAVE_MENU_PARENT(proc)->unk_60 =
|
||||
SAVE_MENU_PARENT(proc)->approc =
|
||||
APProc_Create(gUnknown_08A280A8, 320, SAVE_MENU_PARENT(proc)->sus_slot_cur * 32 + 48, 0x3140, 0, 4);
|
||||
}
|
||||
|
||||
@ -415,11 +415,11 @@ void sub_80AACBC(struct SaveDrawProc * proc)
|
||||
{
|
||||
if (proc->unk_3c != SAVE_MENU_PARENT(proc)->sus_slot)
|
||||
{
|
||||
sub_80ABD88(SAVE_MENU_PARENT(proc)->sus_slot);
|
||||
SaveMenuInitSlotPalette(SAVE_MENU_PARENT(proc)->sus_slot);
|
||||
proc->unk_3c = SAVE_MENU_PARENT(proc)->sus_slot;
|
||||
}
|
||||
|
||||
sub_80ABE3C(proc->unk_2a, proc->unk_3c);
|
||||
SaveDrawSetDifficultSlotPalette(proc->unk_2a, proc->unk_3c);
|
||||
|
||||
EnablePaletteSync();
|
||||
|
||||
@ -470,14 +470,14 @@ void sub_80AADE0(struct SaveDrawProc * proc)
|
||||
|
||||
if (saveMenuProc->unk_46 != 0)
|
||||
{
|
||||
if (saveMenuProc->extra_sel_bitmask & EXTRA_MENU_OPTION_MAP)
|
||||
if (saveMenuProc->extra_sel_bitfile & EXTRA_MENU_OPTION_MAP)
|
||||
PutSpriteExt(4, 56, y + 8, SpriteArray_08A209B8[10], OAM2_PAL(4));
|
||||
else
|
||||
PutSpriteExt(4, 56, y + 8, SpriteArray_08A209B8[8], OAM2_PAL(4));
|
||||
}
|
||||
else
|
||||
{
|
||||
spriteIdx = sub_80A88B8(saveMenuProc->main_sel_bitmask);
|
||||
spriteIdx = BitfileToIndex(saveMenuProc->main_sel_bitfile);
|
||||
PutSpriteExt(4, 56, y + 8, SpriteArray_08A209B8[spriteIdx], OAM2_PAL(4));
|
||||
}
|
||||
}
|
||||
@ -499,7 +499,7 @@ void sub_80AAE90(struct SaveDrawProc * proc)
|
||||
|
||||
for (i = 0; i < SAVE_MENU_PARENT(proc)->unk_31; i++)
|
||||
{
|
||||
int spriteIdx = sub_80A88B8(SaveMenuGetSelectBitMask(SAVE_MENU_PARENT(proc)->main_options, i));
|
||||
int spriteIdx = BitfileToIndex(SaveMenuGetBitfile(SAVE_MENU_PARENT(proc)->main_options, i));
|
||||
|
||||
if (i == SAVE_MENU_PARENT(proc)->main_select)
|
||||
{
|
||||
@ -553,7 +553,7 @@ void sub_80AAF6C(struct SaveDrawProc * proc)
|
||||
|
||||
for (i = 0; i < SAVE_MENU_PARENT(proc)->max_choice; i++)
|
||||
{
|
||||
spriteIdx = sub_80A88B8(SaveMenuGetSelectBitMask(SAVE_MENU_PARENT(proc)->extra_options, i));
|
||||
spriteIdx = BitfileToIndex(SaveMenuGetBitfile(SAVE_MENU_PARENT(proc)->extra_options, i));
|
||||
|
||||
if (i == SAVE_MENU_PARENT(proc)->extra_select)
|
||||
{
|
||||
@ -582,7 +582,7 @@ void sub_80AB05C(struct SaveDrawProc * proc)
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
int y;
|
||||
if ((SAVE_MENU_PARENT(proc)->jump_label == PL_SAVEMENU_6) && (SAVE_MENU_PARENT(proc)->sus_slot == i))
|
||||
if ((SAVE_MENU_PARENT(proc)->jump_label == PL_SAVEMENU_SLOT_SELECTED) && (SAVE_MENU_PARENT(proc)->sus_slot == i))
|
||||
{
|
||||
y = 0x100;
|
||||
}
|
||||
@ -604,30 +604,30 @@ void sub_80AB05C(struct SaveDrawProc * proc)
|
||||
if (SAVE_MENU_PARENT(proc)->unk_44 != 0x100)
|
||||
{
|
||||
int unused;
|
||||
if (SAVE_MENU_PARENT(proc)->unk_60 != NULL)
|
||||
if (SAVE_MENU_PARENT(proc)->approc != NULL)
|
||||
{
|
||||
APProc_Delete(SAVE_MENU_PARENT(proc)->unk_60);
|
||||
SAVE_MENU_PARENT(proc)->unk_60 = NULL;
|
||||
APProc_Delete(SAVE_MENU_PARENT(proc)->approc);
|
||||
SAVE_MENU_PARENT(proc)->approc = NULL;
|
||||
}
|
||||
|
||||
// redundant
|
||||
if (SAVE_MENU_PARENT(proc)->main_sel_bitmask & 1)
|
||||
if (SAVE_MENU_PARENT(proc)->main_sel_bitfile & 1)
|
||||
PutSpriteExt(4, 202, SAVE_MENU_PARENT(proc)->sus_slot_cur * 0x20 + 0x1e, Sprite_08A20588, 0x3000);
|
||||
else
|
||||
PutSpriteExt(4, 202, SAVE_MENU_PARENT(proc)->sus_slot_cur * 0x20 + 0x1e, Sprite_08A20588, 0x3000);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SAVE_MENU_PARENT(proc)->main_sel_bitmask == 1)
|
||||
if (SAVE_MENU_PARENT(proc)->main_sel_bitfile == 1)
|
||||
{
|
||||
APProc_SetParameters(
|
||||
SAVE_MENU_PARENT(proc)->unk_60, 436 - SAVE_MENU_PARENT(proc)->unk_2f,
|
||||
SAVE_MENU_PARENT(proc)->approc, 436 - SAVE_MENU_PARENT(proc)->unk_2f,
|
||||
SAVE_MENU_PARENT(proc)->sus_slot_cur * 32 + 48, 0x3140);
|
||||
}
|
||||
else
|
||||
{
|
||||
APProc_SetParameters(
|
||||
SAVE_MENU_PARENT(proc)->unk_60, 320, SAVE_MENU_PARENT(proc)->sus_slot_cur * 32 + 48, 0x3140);
|
||||
SAVE_MENU_PARENT(proc)->approc, 320, SAVE_MENU_PARENT(proc)->sus_slot_cur * 32 + 48, 0x3140);
|
||||
PutSpriteExt(
|
||||
4, 422 - SAVE_MENU_PARENT(proc)->unk_2f, SAVE_MENU_PARENT(proc)->sus_slot_cur * 32 + 30,
|
||||
Sprite_08A20588, 0x3000);
|
||||
@ -636,12 +636,12 @@ void sub_80AB05C(struct SaveDrawProc * proc)
|
||||
}
|
||||
}
|
||||
|
||||
if ((SAVE_MENU_PARENT(proc)->jump_label) == PL_SAVEMENU_5 || (SAVE_MENU_PARENT(proc)->jump_label) == PL_SAVEMENU_6)
|
||||
if ((SAVE_MENU_PARENT(proc)->jump_label) == PL_SAVEMENU_SAVE_SLOT_SEL || (SAVE_MENU_PARENT(proc)->jump_label) == PL_SAVEMENU_SLOT_SELECTED)
|
||||
{
|
||||
if (SAVE_MENU_PARENT(proc)->unk_36 != 0)
|
||||
if (SAVE_MENU_PARENT(proc)->cursor_config != 0)
|
||||
{
|
||||
PutSpriteExt(4, 44, 128, Sprite_08A20536, OAM2_PAL(2));
|
||||
DisplayUiHand(((SAVE_MENU_PARENT(proc)->unk_36 - 1) % 2) * 44 + 52, 136);
|
||||
DisplayUiHand(((SAVE_MENU_PARENT(proc)->cursor_config - 1) % 2) * 44 + 52, 136);
|
||||
sub_80AB4F4(1, 12, SAVE_MENU_PARENT(proc)->sus_slot * 32 + 32, proc);
|
||||
}
|
||||
else if (SAVE_MENU_PARENT(proc)->sus_slot != 0xff)
|
||||
@ -657,12 +657,12 @@ void SaveDraw_Loop_Main(struct SaveDrawProc * proc)
|
||||
{
|
||||
if (proc->unk_29 != 0)
|
||||
{
|
||||
if (SAVE_MENU_PARENT(proc)->main_sel_bitmask < 0x100)
|
||||
if (SAVE_MENU_PARENT(proc)->main_sel_bitfile < 0x100)
|
||||
{
|
||||
if (SAVE_MENU_PARENT(proc)->main_sel_bitmask == 0x20)
|
||||
proc->unk_33 = SAVE_MENU_PARENT(proc)->extra_sel_bitmask;
|
||||
if (SAVE_MENU_PARENT(proc)->main_sel_bitfile == 0x20)
|
||||
proc->unk_33 = SAVE_MENU_PARENT(proc)->extra_sel_bitfile;
|
||||
else
|
||||
proc->unk_33 = SAVE_MENU_PARENT(proc)->main_sel_bitmask;
|
||||
proc->unk_33 = SAVE_MENU_PARENT(proc)->main_sel_bitfile;
|
||||
}
|
||||
|
||||
sub_80AAE90(proc);
|
||||
@ -700,7 +700,7 @@ struct SaveDrawProc * StartSaveDraw(ProcPtr parent)
|
||||
//! FE8U = 0x080AB314
|
||||
void SaveDrawCursor_Init(struct SaveDrawCursorProc * proc)
|
||||
{
|
||||
proc->unk_36 = 0;
|
||||
proc->cursor_en = 0;
|
||||
|
||||
proc->unk_2a = 0;
|
||||
proc->unk_2e = 0;
|
||||
@ -726,7 +726,7 @@ void SaveDrawCursor_Loop(struct SaveDrawCursorProc * proc)
|
||||
0, 1, 2, 3, 3, 2, 1, 0,
|
||||
};
|
||||
|
||||
if ((s8)((struct SaveMenuProc*)(proc->proc_parent))->scroll_cnt == 0) {
|
||||
if ((s8)((struct SaveMenuProc *)(proc->proc_parent))->scroll_cnt == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -736,7 +736,7 @@ void SaveDrawCursor_Loop(struct SaveDrawCursorProc * proc)
|
||||
proc->sus_slot++;
|
||||
}
|
||||
|
||||
if (proc->unk_36 != 0) {
|
||||
if (proc->cursor_en != 0) {
|
||||
yOam0 = proc->unk_32;
|
||||
xOam1 = proc->unk_2e;
|
||||
|
||||
@ -785,7 +785,7 @@ void SaveDrawCursor_Loop(struct SaveDrawCursorProc * proc)
|
||||
proc->sus_slot = 0;
|
||||
} else {
|
||||
if (proc->sus_slot == 4) {
|
||||
proc->unk_36 = 0;
|
||||
proc->cursor_en = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -797,7 +797,7 @@ void SaveDrawCursor_Loop(struct SaveDrawCursorProc * proc)
|
||||
proc->unk_38 = 0;
|
||||
}
|
||||
|
||||
proc->unk_36 = 0;
|
||||
proc->cursor_en = 0;
|
||||
proc->unk_39 = 1;
|
||||
|
||||
return;
|
||||
@ -810,7 +810,7 @@ void sub_80AB4F4(int a, s16 b, s16 c, struct SaveDrawProc * proc)
|
||||
|
||||
drawCursorProc->unk_32 = c - 12;
|
||||
drawCursorProc->unk_2e = b - 2;
|
||||
drawCursorProc->unk_36 = 1;
|
||||
drawCursorProc->cursor_en = 1;
|
||||
drawCursorProc->unk_3a = a;
|
||||
return;
|
||||
}
|
||||
@ -969,40 +969,46 @@ void sub_80AB77C(void) {
|
||||
}
|
||||
|
||||
//! FE8U = 0x080AB794
|
||||
void sub_80AB794(void) {
|
||||
InitTextFont(&gUnknown_02000920, (void*)0x06001000, 0x80, 4);
|
||||
InitText(&gUnknown_02000938, 10);
|
||||
return;
|
||||
void SaveMenuInitSubBoxText(void)
|
||||
{
|
||||
InitTextFont(
|
||||
&gSaveMenuSubBoxFont,
|
||||
(void*)BG_VRAM + BGCHR_SAVEMENU_SUBBOX_TEXT * TILE_SIZE_4BPP,
|
||||
BGCHR_SAVEMENU_SUBBOX_TEXT,
|
||||
BGPAL_SAVEMENU_SUBBOX_TEXT);
|
||||
|
||||
InitText(&gSaveMenuSubBoxText, 10);
|
||||
}
|
||||
|
||||
//! FE8U = 0x080AB7BC
|
||||
void sub_80AB7BC(int msgId, s8 flag) {
|
||||
const char* str;
|
||||
void SaveMenuDrawSubSelBoxExt(int msgId, bool draw_en)
|
||||
{
|
||||
const char * str;
|
||||
|
||||
if (flag != 0) {
|
||||
if (draw_en != 0)
|
||||
{
|
||||
str = GetStringFromIndex(msgId);
|
||||
|
||||
SetTextFont(&gUnknown_02000920);
|
||||
SetTextFont(&gSaveMenuSubBoxFont);
|
||||
|
||||
ClearText(&gUnknown_02000938);
|
||||
Text_SetCursor(&gUnknown_02000938, 0);
|
||||
Text_SetColor(&gUnknown_02000938, 0);
|
||||
Text_DrawString(&gUnknown_02000938, str);
|
||||
ClearText(&gSaveMenuSubBoxText);
|
||||
Text_SetCursor(&gSaveMenuSubBoxText, 0);
|
||||
Text_SetColor(&gSaveMenuSubBoxText, 0);
|
||||
Text_DrawString(&gSaveMenuSubBoxText, str);
|
||||
|
||||
Text_SetCursor(&gUnknown_02000938, 0x2c);
|
||||
Text_DrawString(&gUnknown_02000938, GetStringFromIndex(0x142)); // TODO: msgid "Cancel"
|
||||
Text_SetCursor(&gSaveMenuSubBoxText, 0x2c);
|
||||
Text_DrawString(&gSaveMenuSubBoxText, GetStringFromIndex(0x142)); // TODO: msgid "Cancel"
|
||||
|
||||
PutText(&gUnknown_02000938, TILEMAP_LOCATED(gBG1TilemapBuffer, 7, 17));
|
||||
} else {
|
||||
PutText(&gSaveMenuSubBoxText, TILEMAP_LOCATED(gBG1TilemapBuffer, 7, 17));
|
||||
}
|
||||
else
|
||||
{
|
||||
TileMap_FillRect(TILEMAP_LOCATED(gBG1TilemapBuffer, 7, 17), 0xb, 1, 0);
|
||||
}
|
||||
|
||||
BG_EnableSyncByMask(2);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
int CONST_DATA gUnknown_08A20720[] = {
|
||||
int CONST_DATA SaveMenuSubSelBoxTexts[] = {
|
||||
0x0000, // ""
|
||||
0x0143, // "Start[.]"
|
||||
0x0144, // "Copy"
|
||||
@ -1013,25 +1019,22 @@ int CONST_DATA gUnknown_08A20720[] = {
|
||||
};
|
||||
|
||||
//! FE8U = 0x080AB83C
|
||||
void sub_80AB83C(struct SaveMenuProc* proc, s8 flag) {
|
||||
sub_80AB7BC(gUnknown_08A20720[sub_80A88B8(proc->main_sel_bitmask)], flag);
|
||||
|
||||
if (flag == 0) {
|
||||
proc->unk_36 = 0;
|
||||
}
|
||||
|
||||
return;
|
||||
void SaveMenuDrawSubSelBox(struct SaveMenuProc * proc, s8 flag)
|
||||
{
|
||||
SaveMenuDrawSubSelBoxExt(SaveMenuSubSelBoxTexts[BitfileToIndex(proc->main_sel_bitfile)], flag);
|
||||
if (flag == 0)
|
||||
proc->cursor_config = 0;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080AB874
|
||||
void AddMainMenuOption(struct SaveMenuProc* proc, int option) {
|
||||
void AddMainMenuOption(struct SaveMenuProc * proc, int option) {
|
||||
proc->main_options |= option;
|
||||
proc->unk_31++;
|
||||
return;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080AB888
|
||||
void AddExtraMenuOption(struct SaveMenuProc* proc, int option) {
|
||||
void AddExtraMenuOption(struct SaveMenuProc * proc, int option) {
|
||||
proc->extra_options |= option;
|
||||
proc->max_choice++;
|
||||
return;
|
||||
@ -1092,109 +1095,105 @@ void InitSaveMenuChoice(struct SaveMenuProc * proc)
|
||||
}
|
||||
|
||||
//! FE8U = 0x080AB98C
|
||||
u8 SaveMenuModifySaveSlot(u8 slot, int b, int c) {
|
||||
u8 SaveMenuModifySaveSlot(u8 slot, bool valid, s8 position)
|
||||
{
|
||||
u8 i;
|
||||
s8 castB = b;
|
||||
s8 castC = c;
|
||||
|
||||
if (castC > 0) {
|
||||
for (i = 0; i < 3; i++) {
|
||||
if ((IsSaveValid(slot) == castB)) {
|
||||
if (position > 0)
|
||||
{
|
||||
/* up */
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
if ((IsSaveValid(slot) == valid))
|
||||
return slot;
|
||||
}
|
||||
|
||||
if (slot == 2) {
|
||||
if (slot == 2)
|
||||
slot = 0;
|
||||
} else {
|
||||
else
|
||||
slot++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (i = 0; i < 3; i++) {
|
||||
if ((IsSaveValid(slot) == castB)) {
|
||||
return slot;
|
||||
}
|
||||
|
||||
if (slot == 0) {
|
||||
slot = 2;
|
||||
} else {
|
||||
slot--;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* down */
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
if ((IsSaveValid(slot) == valid))
|
||||
return slot;
|
||||
|
||||
if (slot == 0)
|
||||
slot = 2;
|
||||
else
|
||||
slot--;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080AB9FC
|
||||
s8 sub_80AB9FC(struct SaveMenuProc* proc, int b) {
|
||||
s8 castB = b;
|
||||
bool SaveMenuTryMoveSaveSlotCursor(struct SaveMenuProc * proc, s8 position)
|
||||
{
|
||||
s8 flag = 0;
|
||||
|
||||
u8 previous = proc->sus_slot;
|
||||
|
||||
switch (proc->main_sel_bitmask) {
|
||||
case 0x80:
|
||||
switch (proc->main_sel_bitfile) {
|
||||
case MAIN_MENU_OPTION_7:
|
||||
flag = 1;
|
||||
break;
|
||||
|
||||
case MAIN_MENU_OPTION_COPY:
|
||||
if (proc->cursor_slot == (u8)-1)
|
||||
flag = 1;
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if (proc->cursor_slot == (u8)-1) {
|
||||
flag = 1;
|
||||
}
|
||||
break;
|
||||
|
||||
break;
|
||||
case MAIN_MENU_OPTION_RESTART:
|
||||
case MAIN_MENU_OPTION_ERASE:
|
||||
flag = 1;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
case 8:
|
||||
flag = 1;
|
||||
break;
|
||||
case MAIN_MENU_OPTION_NEW_GAME:
|
||||
break;
|
||||
|
||||
case 0x10:
|
||||
break;
|
||||
|
||||
case 1:
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (castB >= 1) {
|
||||
if (proc->sus_slot == 2) {
|
||||
proc->sus_slot = 0;
|
||||
} else {
|
||||
proc->sus_slot++;
|
||||
}
|
||||
} else {
|
||||
if (proc->sus_slot == 0) {
|
||||
proc->sus_slot = 2;
|
||||
} else {
|
||||
proc->sus_slot--;
|
||||
}
|
||||
}
|
||||
|
||||
if (proc->main_sel_bitmask == 0x40) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
proc->sus_slot = SaveMenuModifySaveSlot(proc->sus_slot, flag, castB);
|
||||
|
||||
if (previous == proc->sus_slot) {
|
||||
case MAIN_MENU_OPTION_RESUME:
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080ABA98
|
||||
s8 sub_80ABA98(struct SaveMenuProc * proc)
|
||||
{
|
||||
if ((proc->main_sel_bitmask & proc->main_options) != 0) {
|
||||
return 1;
|
||||
if (position >= 1)
|
||||
{
|
||||
/* up */
|
||||
if (proc->sus_slot == 2)
|
||||
proc->sus_slot = 0;
|
||||
else
|
||||
proc->sus_slot++;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* down */
|
||||
if (proc->sus_slot == 0)
|
||||
proc->sus_slot = 2;
|
||||
else
|
||||
proc->sus_slot--;
|
||||
}
|
||||
|
||||
return 0;
|
||||
if (proc->main_sel_bitfile == MAIN_MENU_OPTION_INVALID)
|
||||
return true;
|
||||
|
||||
proc->sus_slot = SaveMenuModifySaveSlot(proc->sus_slot, flag, position);
|
||||
if (previous == proc->sus_slot)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SaveMenuHasOptions(struct SaveMenuProc * proc)
|
||||
{
|
||||
if ((proc->main_sel_bitfile & proc->main_options) != 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//! FE8U = 0x080ABAB4
|
||||
void SqMask_Loop(struct SqMaskProc * proc)
|
||||
{
|
||||
proc->unk_29 += proc->unk_2b;
|
||||
@ -1227,7 +1226,7 @@ struct ProcCmd CONST_DATA gProcScr_SqMask[] = {
|
||||
};
|
||||
|
||||
//! FE8U = 0x080ABBB0
|
||||
void StartSqMask(struct SaveMenuProc* parent, int b, int c)
|
||||
void StartSqMask(struct SaveMenuProc * parent, int b, int c)
|
||||
{
|
||||
u8 castB = b;
|
||||
u8 castC = c;
|
||||
|
913
src/savemenu.c
913
src/savemenu.c
File diff suppressed because it is too large
Load Diff
@ -1490,7 +1490,7 @@ void TalkShiftClearAll_OnIdle(struct Proc* proc) {
|
||||
}
|
||||
|
||||
//! FE8U = 0x08007DE8
|
||||
void StartTalkChoice(const struct ChoiceEntryInfo* choices, struct Text* text, u16* tm, int defaultChoice, int color, ProcPtr parent) {
|
||||
void StartTalkChoice(const struct ChoiceEntryInfo* choices, struct Text* text, u16 * tm, int defaultChoice, int color, ProcPtr parent) {
|
||||
struct TalkChoiceProc* proc;
|
||||
|
||||
int x = Text_GetCursor(text) + 16;
|
||||
@ -2124,7 +2124,7 @@ void SetTalkUnkStr(const char* str) {
|
||||
return;
|
||||
}
|
||||
|
||||
void PrintStringToTexts(struct Text** texts, const char* str, u16* tm, int unk) {
|
||||
void PrintStringToTexts(struct Text** texts, const char* str, u16 * tm, int unk) {
|
||||
int uh;
|
||||
|
||||
int line = 0;
|
||||
|
@ -892,7 +892,7 @@ void sub_808E7B4(struct ChapterStatusProc* proc) {
|
||||
|
||||
sub_80895B4(0x80, 0x13);
|
||||
|
||||
sub_8089624(0xB80, sub_808979C(&gPlaySt));
|
||||
PutChapterTitleGfx(0xB80, GetChapterTitleWM(&gPlaySt));
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ int sub_80C089C(int a, int b, int c, int d)
|
||||
//! FE8U = 0x080C0960
|
||||
int sub_80C0960(int chIndex)
|
||||
{
|
||||
int nodeId = sub_80BCFDC(chIndex);
|
||||
int nodeId = GetPlayChapterId(chIndex);
|
||||
|
||||
if ((gPlaySt.chapterStateBits & PLAY_FLAG_POSTGAME) || (GetNextUnclearedNode(&gGMData) != nodeId))
|
||||
{
|
||||
|
@ -1863,26 +1863,18 @@ void ResetGmStoryNode(void)
|
||||
}
|
||||
|
||||
//! FE8U = 0x080BCFDC
|
||||
int sub_80BCFDC(u32 chapterId)
|
||||
int GetPlayChapterId(u32 chapterId)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (chapterId - 0x25 < 9)
|
||||
{
|
||||
chapterId = 0x24;
|
||||
}
|
||||
else if (chapterId - 0x2f < 9)
|
||||
{
|
||||
chapterId = 0x2e;
|
||||
}
|
||||
|
||||
for (i = 0; i < NODE_MAX; i++)
|
||||
{
|
||||
if (chapterId == WMLoc_GetChapterId(i))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
@ -2053,7 +2045,7 @@ int sub_80BD20C(int index)
|
||||
}
|
||||
|
||||
//! FE8U = 0x080BD224
|
||||
int sub_80BD224(struct GMapData * worldMapData)
|
||||
int GetChapterIndexOnWmNode(struct GMapData * worldMapData)
|
||||
{
|
||||
int chapterId = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user