mirror of
https://github.com/YohannDR/mzm.git
synced 2024-10-07 02:23:20 +00:00
Add and decompile most of pause_screen_map.c
This commit is contained in:
parent
a4d51a522c
commit
d60d98250a
@ -2,7 +2,7 @@
|
||||
|
||||
This is a work in progress decompilation of Metroid - Zero Mission.
|
||||
|
||||
2390/2721 functions decompiled (87.86%, 331 left)
|
||||
2404/2721 functions decompiled (88.35%, 317 left)
|
||||
Progress can be seen here : https://docs.google.com/spreadsheets/d/1X8XarD5evY8ZI7r_GQqh1pYmdVMbBcINYfRBUlogmKY/edit#gid=0
|
||||
|
||||
**This decomp is not shiftable, don't use it as a base to work on anything**
|
||||
|
@ -1,4 +1,6 @@
|
||||
#define MINIMAP_UPDATE_FLAG_NONE 0x0
|
||||
#define MINIMAP_UPDATE_FLAG_UPPER_LINE 0x1
|
||||
#define MINIMAP_UPDATE_FLAG_MIDDLE_LINE 0x2
|
||||
#define MINIMAP_UPDATE_FLAG_LOWER_LINE 0x3
|
||||
#define MINIMAP_UPDATE_FLAG_LOWER_LINE 0x3
|
||||
|
||||
#define MINIMAP_TILE_BACKGROUND 0x140
|
||||
|
@ -6,6 +6,8 @@
|
||||
#include "structs/menus/pause_screen.h"
|
||||
#include "connection.h"
|
||||
|
||||
extern const u16 sPauseScreen_3fd252[5 * 16 - 1];
|
||||
extern const u16 sMinimapAnimatedPalette[1 * 16];
|
||||
extern const u16 sSamusWireframePal[4 * 16];
|
||||
|
||||
// ...
|
||||
@ -24,7 +26,7 @@ extern const struct PauseScreenWireframeData sSamusWireframeData[7];
|
||||
|
||||
// ...
|
||||
|
||||
extern const u16 sPauseSceren_40d17c[2];
|
||||
extern const u16 sPauseScreen_40d17c[2];
|
||||
extern const u8 sPauseScreen_40d180[MAX_AMOUNT_OF_AREAS];
|
||||
|
||||
extern const struct WorldMapData sWorldMapData[MAX_AMOUNT_OF_AREAS];
|
||||
@ -42,5 +44,11 @@ extern const struct OamArray sPauseScreenTargetsOam[16];
|
||||
extern const struct OamArray sPauseScreenWorldMapOam[18];
|
||||
|
||||
extern const u8 sMaintainedInputDelays[7];
|
||||
extern const u8 sMapScreenAreaIds[MAX_AMOUNT_OF_AREAS];
|
||||
extern const u8 sMapScreenAreasViewOrder[MAX_AMOUNT_OF_AREAS];
|
||||
|
||||
// ...
|
||||
|
||||
extern u8* const sPauseScreen_40d79c[5];
|
||||
|
||||
#endif /* PAUSE_SCREEN_DATA_H */
|
||||
|
21
include/data/menus/pause_screen_map_data.h
Normal file
21
include/data/menus/pause_screen_map_data.h
Normal file
@ -0,0 +1,21 @@
|
||||
#ifndef PAUSE_SCREEN_MAP_DATA_H
|
||||
#define PAUSE_SCREEN_MAP_DATA_H
|
||||
|
||||
#include "types.h"
|
||||
#include "structs/cutscene.h"
|
||||
#include "structs/menus/pause_screen.h"
|
||||
#include "connection.h"
|
||||
|
||||
extern const u8 sMinimapTilesGfx[5120];
|
||||
extern const u32 sPauseScreen_40f4c4[1792];
|
||||
extern const u32 sPauseScreenAreaNamesGfx[167];
|
||||
extern const u16 sMinimapTilesPal[5 * 16];
|
||||
|
||||
// Temp
|
||||
// FORCE_RODATA
|
||||
extern u32* sPauseScreen_7602a8;
|
||||
// FORCE_RODATA
|
||||
extern u8 sMapDownloadLineTrailOamOffsets[4];
|
||||
extern const u32 sPauseScreen_7602b0[9];
|
||||
|
||||
#endif /* PAUSE_SCREEN_MAP_DATA_H */
|
24
include/menus/pause_screen_map.h
Normal file
24
include/menus/pause_screen_map.h
Normal file
@ -0,0 +1,24 @@
|
||||
#ifndef PAUSE_SCREEN_MAP_MENU_H
|
||||
#define PAUSE_SCREEN_MAP_MENU_H
|
||||
|
||||
#include "types.h"
|
||||
#include "structs/menu.h"
|
||||
#include "structs/cutscene.h"
|
||||
|
||||
void PauseScreenCountTanksInArea(void);
|
||||
void PauseScreenDrawIgtAndTanks(u8 param_1, u8 drawTanks);
|
||||
void PauseScreenInitMapDownload(void);
|
||||
u32 PauseScreenMapDownloadSubroutine(void);
|
||||
u32 PauseScreenMapDownloadInstant_Unused(void);
|
||||
u32 PauseScreenMapDownloadInstantWithLine_Unused(void);
|
||||
u32 PauseScreenMapDownload(void);
|
||||
void unk_6db58(u8 param_1);
|
||||
void PauseScreenMapGetAbsoluteMapBordersPositions(void);
|
||||
void PauseScreenMapUpdateMapBordersForTargets(void);
|
||||
void PauseScreenGetAllMinimapData(u8 start);
|
||||
void PauseScreenMapCheckExploredAreas(void);
|
||||
void MapScreenSubroutine(void);
|
||||
void MapScreenTogglehWorldMap(u8 notOpeningWorldMap);
|
||||
void MapScreenChangeMap(void);
|
||||
|
||||
#endif /* PAUSE_SCREEN_MAP_MENU_H */
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include "types.h"
|
||||
#include "structs/menu.h"
|
||||
#include "structs/connection.h"
|
||||
|
||||
#define PAUSE_SCREEN_DATA sNonGameplayRamPointer->pauseScreen
|
||||
#define PAUSE_SCREEN_EWRAM sEwramPointer->pauseScreen
|
||||
@ -98,7 +99,7 @@ struct BossFlameData {
|
||||
};
|
||||
|
||||
struct PauseScreenEwramData {
|
||||
u8 padding_0[0x4000];
|
||||
u16 mapTilemaps[MAX_AMOUNT_OF_AREAS][1024];
|
||||
u16 easySleepTextFormatted_1[1024];
|
||||
u16 easySleepTextFormatted_2[1024];
|
||||
u16 unk_5000[1024];
|
||||
@ -159,10 +160,10 @@ struct PauseScreenData {
|
||||
|
||||
u8 energyTankTotal;
|
||||
u8 energyTankCurrent;
|
||||
u8 misileTankTotal;
|
||||
u8 misileTankCurrent;
|
||||
u8 superMisileTankTotal;
|
||||
u8 superMisileTankCurrent;
|
||||
u8 missileTankTotal;
|
||||
u8 missileTankCurrent;
|
||||
u8 superMissileTankTotal;
|
||||
u8 superMissileTankCurrent;
|
||||
u8 powerBombTankTotal;
|
||||
u8 powerBombTankCurrent;
|
||||
u8 tankStatus;
|
||||
@ -181,7 +182,7 @@ struct PauseScreenData {
|
||||
u8 unk_4B;
|
||||
|
||||
u8 mapDownloadType;
|
||||
u8 downloadLineOffset;
|
||||
u8 downloadTimer;
|
||||
u8 downloadStage;
|
||||
u8 unk_4F;
|
||||
u8 currentDownloadedLine;
|
||||
@ -244,7 +245,7 @@ struct PauseScreenData {
|
||||
|
||||
struct BossFlameData bossFlameData[2];
|
||||
|
||||
u16* mapsDataPointer;
|
||||
u16 (*mapsDataPointer)[1024];
|
||||
|
||||
struct MenuOamData miscOam[23];
|
||||
struct MenuOamData unk_278[7];
|
||||
|
@ -406,9 +406,9 @@ void PauseScreenDrawCompletionInfo(u8 dontDraw)
|
||||
return;
|
||||
|
||||
// Count tanks and prepare VRAM with IGT and tanks
|
||||
count_tanks_in_area();
|
||||
draw_igt_and_tanks(FALSE, FALSE);
|
||||
draw_igt_and_tanks(FALSE, TRUE);
|
||||
PauseScreenCountTanksInArea();
|
||||
PauseScreenDrawIgtAndTanks(FALSE, FALSE);
|
||||
PauseScreenDrawIgtAndTanks(FALSE, TRUE);
|
||||
|
||||
priority = 3;
|
||||
|
||||
@ -893,8 +893,8 @@ void PauseScreenLoadAreaNamesAndIcons(void)
|
||||
if (PAUSE_SCREEN_DATA.typeFlags & PAUSE_SCREEN_TYPE_CHOZO_STATUE_HINT)
|
||||
{
|
||||
PAUSE_SCREEN_DATA.areaNameOam[0].oamID = sPauseScreen_40d180[PAUSE_SCREEN_DATA.currentArea];
|
||||
PAUSE_SCREEN_DATA.areaNameOam[0].yPosition = sPauseSceren_40d17c[1];
|
||||
PAUSE_SCREEN_DATA.areaNameOam[0].xPosition = sPauseSceren_40d17c[0];
|
||||
PAUSE_SCREEN_DATA.areaNameOam[0].yPosition = sPauseScreen_40d17c[1];
|
||||
PAUSE_SCREEN_DATA.areaNameOam[0].xPosition = sPauseScreen_40d17c[0];
|
||||
PAUSE_SCREEN_DATA.areaNameOam[0].priority = 0;
|
||||
PAUSE_SCREEN_DATA.areaNameOam[0].boundBackground = 4;
|
||||
PAUSE_SCREEN_DATA.areaNameOam[0].exists = TRUE;
|
||||
@ -2123,13 +2123,13 @@ u32 PauseScreenCallCurrentSubroutine(void)
|
||||
case PAUSE_SCREEN_SUBROUTINE_MAP_SCREEN:
|
||||
if (!(gChangedInput & (gButtonAssignments.pause | KEY_B)))
|
||||
{
|
||||
PauseScreenSubroutine();
|
||||
MapScreenSubroutine();
|
||||
break;
|
||||
}
|
||||
|
||||
if (PAUSE_SCREEN_DATA.onWorldMap)
|
||||
{
|
||||
PauseScreenSubroutine();
|
||||
MapScreenSubroutine();
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2195,7 +2195,7 @@ u32 PauseScreenCallCurrentSubroutine(void)
|
||||
break;
|
||||
|
||||
case PAUSE_SCREEN_SUBROUTINE_MAP_DOWNLOAD:
|
||||
if (map_download_subroutine())
|
||||
if (PauseScreenMapDownloadSubroutine())
|
||||
{
|
||||
PAUSE_SCREEN_DATA.subroutineInfo.currentSubroutine = 0x12;
|
||||
}
|
||||
|
1173
src/menus/pause_screen_map.c
Normal file
1173
src/menus/pause_screen_map.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user