mirror of
https://github.com/zeldaret/mm.git
synced 2026-08-22 06:19:54 -04:00
code_8012EC80.c OK and Documented + parameter_static extraction (#534)
* Match remaining functions of code_8012EC80.c * parameter_static extracted and OK * Small Progress * Documentation all over the place * Finish Documenting * Cleanup * Name more textures * Update knowledge on deku playground player name * All textures from parameter_static known now * Finish documenting and validating parameter_static * More up-to-date SaveContext docs * More docs * More cleanup * Sun -> Star * Minor touchup * More cleanup * pictograph -> pictoBox * Remove the "unused" part * More accurate name: hour lines * It's gsDPLoadTextureBlock, not gsDPSetTextureImage * Fix parameter_static and merge issues * More docs from new PRs and Parameter WIP * Missed a name * Move parameter_static to interface assets * Clean up code_8012EC80.c data * Fix comment * Add comments to parameter_static * Oops * fix merge * Missed a PR review suggestion * Fix merge
This commit is contained in:
+13
-13
@@ -1968,8 +1968,8 @@ void func_801149A0(s32 arg0, s16 arg1);
|
||||
// void func_80114A9C(void);
|
||||
// void func_80114B84(void);
|
||||
// void func_80114CA0(void);
|
||||
UNK_TYPE func_80114E90(void);
|
||||
UNK_TYPE func_80114F2C(u8 arg0);
|
||||
s32 Interface_HasEmptyBottle(void);
|
||||
s32 Interface_HasItemInBottle(u8 itemId);
|
||||
// void func_80114FD0(void);
|
||||
// void func_80115130(void);
|
||||
// void func_801152B8(void);
|
||||
@@ -2055,7 +2055,7 @@ s32 func_80123810(GlobalContext* globalCtx);
|
||||
void func_80123AA4(Player* player, s32 arg1);
|
||||
// void func_80123BD4(void);
|
||||
// void func_80123C58(void);
|
||||
// void func_80123C90(void);
|
||||
void Player_SetEquipmentData(GlobalContext* globalCtx, Player* this);
|
||||
void func_80123D50(GlobalContext* globalCtx, Player* player, UNK_TYPE arg2, UNK_TYPE arg3);
|
||||
void func_80123DA4(Player* player);
|
||||
// void func_80123DC0(void);
|
||||
@@ -2253,16 +2253,16 @@ s32 Room_StartRoomTransition(GlobalContext* globalCtx, RoomContext* roomCtx, s32
|
||||
s32 Room_HandleLoadCallbacks(GlobalContext* globalCtx, RoomContext* roomCtx);
|
||||
void Room_Draw(GlobalContext* globalCtx, Room* room, u32 flags);
|
||||
void func_8012EBF8(GlobalContext* globalCtx, RoomContext* roomCtx);
|
||||
s32 func_8012EC80(GlobalContext* globalCtx);
|
||||
void func_8012ED34(s16 equipment);
|
||||
u8 func_8012ED78(GlobalContext* globalCtx, s16 equipment);
|
||||
void func_8012EDE8(s16 arg0, u32 arg1);
|
||||
s32 func_8012EE34(s16 arg0);
|
||||
void func_8012EF0C(s16 arg0);
|
||||
void func_8012F0EC(s16 arg0);
|
||||
void func_8012F1BC(s16 sceneIndex);
|
||||
s16 func_8012F22C(s16 sceneIndex);
|
||||
void func_8012F278(GlobalContext* globalCtx);
|
||||
s32 Inventory_GetBtnBItem(GlobalContext* globalCtx);
|
||||
void Inventory_ChangeEquipment(s16 value);
|
||||
u8 Inventory_DeleteEquipment(GlobalContext* globalCtx, s16 equipment);
|
||||
void Inventory_ChangeUpgrade(s16 upgrade, u32 value);
|
||||
s32 Inventory_IsMapVisible(s16 sceneNum);
|
||||
void Inventory_SetMapVisibility(s16 tingleIndex);
|
||||
void Inventory_SaveDekuPlaygroundHighScore(s16 timerId);
|
||||
void Inventory_IncrementSkullTokenCount(s16 sceneIndex);
|
||||
s16 Inventory_GetSkullTokenCount(s16 sceneIndex);
|
||||
void Inventory_SaveLotteryCodeGuess(GlobalContext* globalCtx);
|
||||
s32 Object_Spawn(ObjectContext* objectCtx, s16 id);
|
||||
void Object_InitBank(GameState* gameState, ObjectContext* objectCtx);
|
||||
void Object_UpdateBank(ObjectContext* objectCtx);
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@
|
||||
#define ALL_EQUIP_VALUE(equip) ((gSaveContext.inventory.equipment & gEquipMasks[equip]) >> gEquipShifts[equip])
|
||||
#define CUR_EQUIP_VALUE(equip) ((gSaveContext.equips.equipment & gEquipMasks[equip]) >> gEquipShifts[equip])
|
||||
#define CUR_UPG_VALUE(upg) ((gSaveContext.inventory.upgrades & gUpgradeMasks[upg]) >> gUpgradeShifts[upg])
|
||||
#define TAKE_EQUIPPED_ITEM(equip) (gSaveContext.equips.equipment = ((((void)0, gSaveContext.equips.equipment) & (gEquipNegMasks[equip])) | (u16)(0 << gEquipShifts[equip])))
|
||||
#define SET_EQUIP_VALUE(equip, value) (gSaveContext.equips.equipment = ((((void)0, gSaveContext.equips.equipment) & (gEquipNegMasks[equip])) | (u16)((u16)(value) << gEquipShifts[equip])))
|
||||
#define CUR_FORM_EQUIP(button) (gSaveContext.equips.buttonItems[CUR_FORM][button])
|
||||
#define CHECK_QUEST_ITEM(item) (((void)0, gSaveContext.inventory.questItems) & gBitFlags[item])
|
||||
#define REMOVE_QUEST_ITEM(item) (gSaveContext.inventory.questItems = (((void)0, gSaveContext.inventory.questItems) & (-1 - gBitFlags[item])))
|
||||
|
||||
+9
-5
@@ -708,7 +708,7 @@ typedef enum {
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u16 unk_0;
|
||||
/* 0x02 */ u16 unk_2;
|
||||
/* 0x02 */ u16 timeIncrement;
|
||||
/* 0x04 */ f32 unk_4;
|
||||
/* 0x08 */ f32 unk_8;
|
||||
/* 0x0C */ f32 unk_C;
|
||||
@@ -855,15 +855,15 @@ typedef struct {
|
||||
/* 0x11F0B */ UNK_TYPE1 pad11F0B[0x5];
|
||||
/* 0x11F10 */ s32 unk11F10;
|
||||
/* 0x11F14 */ UNK_TYPE1 pad11F14[0xE];
|
||||
/* 0x11F22 */ u8 unk11F22;
|
||||
/* 0x11F22 */ u8 msgMode;
|
||||
/* 0x11F23 */ UNK_TYPE1 pad11F23[0xFD];
|
||||
/* 0x12020 */ u8 unk12020;
|
||||
/* 0x12021 */ u8 choiceIndex;
|
||||
/* 0x12022 */ u8 unk12022;
|
||||
/* 0x12023 */ u8 unk12023;
|
||||
/* 0x12024 */ UNK_TYPE1 unk12024[0x6];
|
||||
/* 0x1202A */ u16 unk1202A;
|
||||
/* 0x1202C */ UNK_TYPE1 pad1202C[0x2];
|
||||
/* 0x1202A */ u16 ocarinaMode;
|
||||
/* 0x1202C */ u16 ocarinaAction;
|
||||
/* 0x1202E */ u16 unk1202E;
|
||||
/* 0x12030 */ s16 unk_12030;
|
||||
/* 0x12032 */ UNK_TYPE1 unk_12032[0x2];
|
||||
@@ -871,7 +871,11 @@ typedef struct {
|
||||
/* 0x12044 */ s16 unk12044;
|
||||
/* 0x12046 */ UNK_TYPE1 pad12046[0x2];
|
||||
/* 0x12048 */ u8 unk12048; // EnKakasi
|
||||
/* 0x12049 */ UNK_TYPE1 pad12049[0x21];
|
||||
/* 0x12049 */ UNK_TYPE1 pad12049[0xB];
|
||||
/* 0x12054 */ s16 unk12054; // First digit in lottery code guess
|
||||
/* 0x12056 */ s16 unk12056; // Second digit lottery code guess
|
||||
/* 0x12058 */ s16 unk12058; // Third digit lottery code guess
|
||||
/* 0x1205A */ UNK_TYPE1 pad1205A[0x10];
|
||||
/* 0x1206A */ s16 unk1206A;
|
||||
/* 0x1206C */ s32 unk1206C;
|
||||
/* 0x12070 */ UNK_TYPE1 pad12070[0x8];
|
||||
|
||||
+52
-6
@@ -20,7 +20,7 @@ typedef struct {
|
||||
/* 0x50 */ u8 dungeonItems[10];
|
||||
/* 0x5A */ s8 dungeonKeys[10];
|
||||
/* 0x64 */ s8 strayFairies[10]; // "orange_fairy"
|
||||
/* 0x6E */ u8 unk_6E[8][3]; // "degnuts_memory_name"
|
||||
/* 0x6E */ char dekuPlaygroundPlayerName[3][8]; // Stores playerName (8 char) over (3 days) when getting a new high score. original name: degnuts_memory_name
|
||||
} Inventory; // size = 0x88
|
||||
|
||||
typedef struct {
|
||||
@@ -41,6 +41,24 @@ typedef struct {
|
||||
/* 0x1C */ u32 tempCollectFlags;
|
||||
} RespawnData; // size = 0x20
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 chest;
|
||||
/* 0x04 */ u32 swch0;
|
||||
/* 0x08 */ u32 swch1;
|
||||
/* 0x0C */ u32 clearedRoom;
|
||||
/* 0x10 */ u32 collectible;
|
||||
/* 0x14 */ u32 unk_14;
|
||||
/* 0x18 */ u32 unk_18;
|
||||
} PermanentSceneFlags; // size = 0x1C
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 chest;
|
||||
/* 0x04 */ u32 swch0;
|
||||
/* 0x08 */ u32 swch1;
|
||||
/* 0x0C */ u32 clearedRoom;
|
||||
/* 0x10 */ u32 collectible;
|
||||
} CycleSceneFlags; // size = 0x14
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ u32 entranceIndex; // "scene_no"
|
||||
/* 0x0004 */ u8 equippedMask; // "player_mask"
|
||||
@@ -78,16 +96,37 @@ typedef struct {
|
||||
/* 0x004A */ s16 savedSceneNum; // "scene_data_ID"
|
||||
/* 0x004C */ ItemEquips equips;
|
||||
/* 0x0070 */ Inventory inventory;
|
||||
/* 0x00F8 */ u32 roomInf[128][7];
|
||||
/* 0x00F8 */ PermanentSceneFlags permanentSceneFlags[120];
|
||||
/* 0x0E18 */ u8 unk_E18[0x54];
|
||||
/* 0x0E6C */ u32 dekuPlaygroundHighScores[3];
|
||||
/* 0x0E78 */ u32 pictoFlags0;
|
||||
/* 0x0E7C */ u32 pictoFlags1;
|
||||
/* 0x0E80 */ u32 unk_E80;
|
||||
/* 0x0E84 */ u32 unk_E84;
|
||||
/* 0x0E88 */ u32 unk_E88[7]; // Invadepoh flags
|
||||
/* 0x0EA4 */ u32 scenesVisible[7]; // tingle maps and clouded regions on pause map. Stores scenes bitwise for up to 224 scenes even though there are not that many scenes
|
||||
/* 0x0EC0 */ u32 skullTokenCount; // upper 16 bits store Swamp skulls, lower 16 bits store Ocean skulls
|
||||
/* 0x0EC4 */ u32 unk_EC4; // Gossic stone heart piece flags
|
||||
/* 0x0EC8 */ u32 unk_EC8;
|
||||
/* 0x0ECC */ u32 unk_ECC[2]; // Related to blue warps
|
||||
/* 0x0ED4 */ u32 stolenItems; // Items stolen by Takkuri and given to Curiosity Shop Man
|
||||
/* 0x0ED8 */ u32 unk_DD8;
|
||||
/* 0x0EDC */ u32 bankRupees;
|
||||
/* 0x0EE0 */ u32 unk_EE0;
|
||||
/* 0x0EE4 */ u32 unk_EE4; // Fishing flags
|
||||
/* 0x0EE8 */ u32 unk_EE8;
|
||||
/* 0x0EEC */ u32 horseBackBalloonHighScore;
|
||||
/* 0x0EF0 */ u32 lotteryCodeGuess; // Lottery code chosen by player (only uses lower three hex digits)
|
||||
/* 0x0EF4 */ u32 unk_EF4; // Shooting Gallery Man Flags
|
||||
/* 0x0EF8 */ u8 weekEventReg[100]; // "week_event_reg"
|
||||
/* 0x0F5C */ u32 mapsVisited; // "area_arrival"
|
||||
/* 0x0F60 */ u32 unk_F60; // "cloud_clear"
|
||||
/* 0x0F60 */ u32 mapsVisible; // "cloud_clear"
|
||||
/* 0x0F64 */ u8 unk_F64; // "oca_rec_flag"
|
||||
/* 0x0F65 */ u8 unk_F65; // "oca_rec_flag8"
|
||||
/* 0x0F66 */ u8 unk_F66[128]; // "oca_rec_buff8"
|
||||
/* 0x0FE6 */ s8 unk_FE6; // "aikotoba_index"
|
||||
/* 0x0FE7 */ s8 unk_FE7[5]; // "aikotoba_table"
|
||||
/* 0x0FEC */ s8 lotteryCodes[3][3]; // "numbers_table"
|
||||
/* 0x0FEC */ s8 lotteryCodes[3][3]; // Preset lottery codes "numbers_table"
|
||||
/* 0x0FF5 */ s8 spiderHouseMaskOrder[6]; // "kinsta_color_table"
|
||||
/* 0x0FFB */ s8 bomberCode[5]; // "bombers_aikotoba_table"
|
||||
/* 0x1000 */ HorseData horseData;
|
||||
@@ -169,12 +208,12 @@ typedef struct {
|
||||
/* 0x3F54 */ u8 dogIsLost; // "dog_event_flag"
|
||||
/* 0x3F55 */ u8 nextTransition; // "next_wipe"
|
||||
/* 0x3F56 */ s16 worldMapArea; // "area_type"
|
||||
/* 0x3F58 */ s16 unk_3F58; // "sunmoon_flag"
|
||||
/* 0x3F58 */ s16 sunsSongState; // "sunmoon_flag"
|
||||
/* 0x3F5A */ s16 healthAccumulator; // "life_mode"
|
||||
/* 0x3F5C */ s32 unk_3F5C; // "bet_rupees"
|
||||
/* 0x3F60 */ u8 unk_3F60; // "framescale_flag"
|
||||
/* 0x3F64 */ f32 unk_3F64; // "framescale_scale"
|
||||
/* 0x3F68 */ u32 cycleSceneFlags[120][5];
|
||||
/* 0x3F68 */ CycleSceneFlags cycleSceneFlags[120]; // Scene flags that are temporarily stored over the duration of a single 3-day cycle
|
||||
/* 0x48C8 */ u16 unk_48C8; // "scene_id_mix"
|
||||
/* 0x48CA */ u8 maskMaskBit[3]; // masks given away on the Moon
|
||||
/* 0x48CD */ char unk_48CD[24];
|
||||
@@ -197,4 +236,11 @@ typedef enum {
|
||||
/* 0xFF */ BTN_DISABLED = 0xFF
|
||||
} ButtonStatus;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ SUNSSONG_INACTIVE,
|
||||
/* 1 */ SUNSSONG_START, // the suns ocarina effect signals that the song has finished playing
|
||||
/* 2 */ SUNSSONG_SPEED_TIME, // suns was played where time passes, speed up the advancement of time
|
||||
/* 3 */ SUNSSONG_SPECIAL // time does not advance, but signals the song was played. used for freezing redeads
|
||||
} SunsSongState;
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user