Implemented D-Pad transformation masks and ocarina

This commit is contained in:
Mr-Wiseguy 2024-03-05 02:55:05 -05:00
parent 3be10210ad
commit 0ceeeb04ea
5 changed files with 1902 additions and 80 deletions

BIN
patches/dpad.rgba32.bin Normal file

Binary file not shown.

BIN
patches/dpad.rgba32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 955 B

File diff suppressed because it is too large Load Diff

View File

@ -19,4 +19,27 @@ static inline void* actor_relocate(Actor* actor, void* addr) {
(intptr_t)((uintptr_t)actor->overlayEntry->vramStart - (uintptr_t)actor->overlayEntry->loadedRamAddr)); (intptr_t)((uintptr_t)actor->overlayEntry->vramStart - (uintptr_t)actor->overlayEntry->loadedRamAddr));
} }
typedef enum {
/* 0 */ PICTO_BOX_STATE_OFF, // Not using the pictograph
/* 1 */ PICTO_BOX_STATE_LENS, // Looking through the lens of the pictograph
/* 2 */ PICTO_BOX_STATE_SETUP_PHOTO, // Looking at the photo currently taken
/* 3 */ PICTO_BOX_STATE_PHOTO
} PictoBoxState;
#define INCBIN(identifier, filename) \
asm(".pushsection .rodata\n" \
"\t.local " #identifier "\n" \
"\t.type " #identifier ", @object\n" \
"\t.balign 8\n" \
#identifier ":\n" \
"\t.incbin \"" filename "\"\n\n" \
\
"\t.balign 8\n" \
"\t.popsection\n"); \
extern u8 identifier[]
void draw_dpad(PlayState* play);
void draw_dpad_icons(PlayState* play);
#endif #endif

View File

@ -169,14 +169,6 @@ void Graph_ExecuteAndDraw(GraphicsContext* gfxCtx, GameState* gameState) {
} }
} }
typedef enum {
/* 0 */ PICTO_BOX_STATE_OFF, // Not using the pictograph
/* 1 */ PICTO_BOX_STATE_LENS, // Looking through the lens of the pictograph
/* 2 */ PICTO_BOX_STATE_SETUP_PHOTO, // Looking at the photo currently taken
/* 3 */ PICTO_BOX_STATE_PHOTO
} PictoBoxState;
extern s16 sPictoState; extern s16 sPictoState;
// Modify interface drawing (rupees, key counter, etc.) // Modify interface drawing (rupees, key counter, etc.)
@ -473,6 +465,12 @@ void Interface_Draw(PlayState* play) {
Magic_DrawMeter(play); Magic_DrawMeter(play);
// @recomp Draw the D-Pad and its item icons
if (pauseCtx->state != PAUSE_STATE_MAIN) {
draw_dpad(play);
draw_dpad_icons(play);
}
// @recomp Right align and shift right/down for minimap // @recomp Right align and shift right/down for minimap
gEXSetRectAlign(OVERLAY_DISP++, G_EX_ORIGIN_RIGHT, G_EX_ORIGIN_RIGHT, gEXSetRectAlign(OVERLAY_DISP++, G_EX_ORIGIN_RIGHT, G_EX_ORIGIN_RIGHT,
-(SCREEN_WIDTH - margin_reduction) * 4, margin_reduction * 4, -(SCREEN_WIDTH - margin_reduction) * 4, margin_reduction * 4,