mirror of
https://github.com/zeldaret/mm.git
synced 2026-06-20 15:41:10 -04:00
z_map decompiled (#1032)
* First batch of functions * more ok * z_map_data OK * More OKs, MinimapList ZAPD breaking change * func_80103A58 improvements, more OK * func_80106D5C and func_801091F0 decomped * func_801031D0 decomped and some fixes * house cleaning, more OKs more decomp * Even more OKs * func_80105C40 almost OK, more OKs * func_80108AF8 OK and more * All functions attempted * func_8010534C OK * Start documentation, rename DoorCtx * More OKs, split map_data.data, more doc * incremental clean-up, more function names * more function names * func_801068FC OK * old uncommitted changes * minor tweaks * implement easy fixes * more fixes * z_map_disp OK, implement more suggestions * delete utility program * migrate data * TransiActor ->TransitionActor * Major documentation pass * first pass of changes * warning fix attempt, revert ZFile.cpp * Fix FAKE match * Easy fixes * implement gDPLoadTextureBlock_Runtime * z_demo bss patch * Extract white square texture * Implement more suggestions * rework MapIndex/DungeonIndex * revert dungeonSceneIndex -> mapIndex in some spots, implement suggestions * more suggestions * minor nits * fix #include
This commit is contained in:
+15
-13
@@ -930,21 +930,22 @@ void Message_DrawItemIcon(PlayState* play, Gfx** gfxP) {
|
||||
} else if (msgCtx->itemId == ITEM_STRAY_FAIRIES) {
|
||||
msgCtx->unk12016 = 0x18;
|
||||
gDPPipeSync(gfx++);
|
||||
gDPSetPrimColor(gfx++, 0, 0, sStrayFairyIconPrimColors[((void)0, gSaveContext.dungeonIndex)].r,
|
||||
sStrayFairyIconPrimColors[((void)0, gSaveContext.dungeonIndex)].g,
|
||||
sStrayFairyIconPrimColors[((void)0, gSaveContext.dungeonIndex)].b, msgCtx->textColorAlpha);
|
||||
gDPSetEnvColor(gfx++, sStrayFairyIconEnvColors[((void)0, gSaveContext.dungeonIndex)].r,
|
||||
sStrayFairyIconEnvColors[((void)0, gSaveContext.dungeonIndex)].g,
|
||||
sStrayFairyIconEnvColors[((void)0, gSaveContext.dungeonIndex)].b, 0);
|
||||
gDPSetPrimColor(gfx++, 0, 0, sStrayFairyIconPrimColors[((void)0, gSaveContext.dungeonSceneSharedIndex)].r,
|
||||
sStrayFairyIconPrimColors[((void)0, gSaveContext.dungeonSceneSharedIndex)].g,
|
||||
sStrayFairyIconPrimColors[((void)0, gSaveContext.dungeonSceneSharedIndex)].b,
|
||||
msgCtx->textColorAlpha);
|
||||
gDPSetEnvColor(gfx++, sStrayFairyIconEnvColors[((void)0, gSaveContext.dungeonSceneSharedIndex)].r,
|
||||
sStrayFairyIconEnvColors[((void)0, gSaveContext.dungeonSceneSharedIndex)].g,
|
||||
sStrayFairyIconEnvColors[((void)0, gSaveContext.dungeonSceneSharedIndex)].b, 0);
|
||||
gDPLoadTextureBlock_4b(gfx++, gStrayFairyGlowingCircleIconTex, G_IM_FMT_I, 32, 24, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gSPTextureRectangle(gfx++, msgCtx->unk12010 << 2, msgCtx->unk12012 << 2,
|
||||
(msgCtx->unk12010 + msgCtx->unk12014) << 2, (msgCtx->unk12012 + msgCtx->unk12016) << 2,
|
||||
G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
|
||||
gDPSetPrimColor(gfx++, 0, 0, 255, 255, 255, msgCtx->textColorAlpha);
|
||||
gDPLoadTextureBlock(gfx++, sStrayFairyIconTextures[((void)0, gSaveContext.dungeonIndex)], G_IM_FMT_RGBA,
|
||||
G_IM_SIZ_32b, 32, 24, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
|
||||
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
gDPLoadTextureBlock(gfx++, sStrayFairyIconTextures[((void)0, gSaveContext.dungeonSceneSharedIndex)],
|
||||
G_IM_FMT_RGBA, G_IM_SIZ_32b, 32, 24, 0, G_TX_NOMIRROR | G_TX_WRAP,
|
||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
|
||||
} else if ((msgCtx->itemId >= ITEM_SONG_SONATA) && (msgCtx->itemId <= ITEM_SONG_SUN)) {
|
||||
index = msgCtx->itemId - ITEM_SONG_SONATA;
|
||||
gDPSetPrimColor(gfx++, 0, 0, D_801CFE04[index], D_801CFE1C[index], D_801CFE34[index], msgCtx->textColorAlpha);
|
||||
@@ -2134,7 +2135,7 @@ void Message_LoadOwlWarpText(PlayState* play, s32* offset, f32* arg2, s16* decod
|
||||
s16 owlWarpId;
|
||||
s16 i;
|
||||
|
||||
if (func_8010A0A4(play) || (play->sceneId == SCENE_SECOM)) {
|
||||
if (Map_CurRoomHasMapI(play) || (play->sceneId == SCENE_SECOM)) {
|
||||
owlWarpId = OWL_WARP_ENTRANCE;
|
||||
} else {
|
||||
owlWarpId = pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
|
||||
@@ -2463,7 +2464,8 @@ void Message_Decode(PlayState* play) {
|
||||
Message_LoadTime(play, curChar, &charTexIndex, &spC0, &decodedBufPos);
|
||||
} else if (curChar == 0x21C) {
|
||||
digits[0] = digits[1] = 0;
|
||||
digits[2] = gSaveContext.save.saveInfo.inventory.strayFairies[(void)0, gSaveContext.dungeonIndex];
|
||||
digits[2] =
|
||||
gSaveContext.save.saveInfo.inventory.strayFairies[(void)0, gSaveContext.dungeonSceneSharedIndex];
|
||||
|
||||
while (digits[2] >= 100) {
|
||||
digits[0]++;
|
||||
@@ -3121,7 +3123,7 @@ void Message_OpenText(PlayState* play, u16 textId) {
|
||||
if (msgCtx) {}
|
||||
textId = 0xC9;
|
||||
} else if (textId == 0x11) {
|
||||
if (gSaveContext.save.saveInfo.inventory.strayFairies[((void)0, gSaveContext.dungeonIndex)] == 0xF) {
|
||||
if (gSaveContext.save.saveInfo.inventory.strayFairies[((void)0, gSaveContext.dungeonSceneSharedIndex)] == 0xF) {
|
||||
textId = 0xF3;
|
||||
}
|
||||
} else if ((textId == 0x92) && (play->sceneId == SCENE_KOEPONARACE)) {
|
||||
@@ -5687,7 +5689,7 @@ void Message_Update(PlayState* play) {
|
||||
|
||||
if (sLastPlayedSong == OCARINA_SONG_SOARING) {
|
||||
if (interfaceCtx->restrictions.songOfSoaring == 0) {
|
||||
if (func_8010A0A4(play) || (play->sceneId == SCENE_SECOM)) {
|
||||
if (Map_CurRoomHasMapI(play) || (play->sceneId == SCENE_SECOM)) {
|
||||
Message_StartTextbox(play, 0x1B93, NULL);
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_1B;
|
||||
sLastPlayedSong = 0xFF;
|
||||
|
||||
Reference in New Issue
Block a user