More menu matches

This commit is contained in:
Luciano Ciccariello 2022-10-23 18:38:07 +01:00
parent 9fca03028e
commit 46a860b30b
3 changed files with 30 additions and 21 deletions

View File

@ -8,6 +8,7 @@
},
"files.associations": {
"main.h": "c",
"dra.h": "c",
"stage.h": "c",
"cmath": "c",
"limits": "c",

View File

@ -1406,8 +1406,11 @@ IsOutsideDrawArea = 0x800F54CC;
ScissorPolyG4 = 0x_800F5530;
ScissorPolyGT4 = 0x800F564C;
ScissorSprite = 0x800F57C8;
DrawMenuRect = 0x800F5D44;
DrawMenuSprite = 0x800F5B90;
DrawRelicsMenu = 0x800F5EF0;
DrawMenuAlucardPortrait = 0x800F622C;
DrawMenuAlucardCloakPreview = 0x800F643C;
DrawMenuChar = 0x800F678C;
DrawMenuStr = 0x800F67EC;
DrawMenuInt = 0x800F68F4;

View File

@ -923,19 +923,19 @@ void func_800F5A90(void) {
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F5AE4);
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F5B90);
void func_800F5B90(MenuContext* context, s32 x, s32 y, s32 width, s32 height,
s32 u, s32 v, s32 clut, s32 tpage, s32 arg9, s32 argA,
s32 argB);
INCLUDE_ASM("asm/dra/nonmatchings/42398", DrawMenuSprite);
void DrawMenuSprite(MenuContext* context, s32 x, s32 y, s32 width, s32 height,
s32 u, s32 v, s32 clut, s32 tpage, s32 arg9, s32 argA,
s32 argB);
#ifndef NON_EQUIVALENT
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F5D44);
void func_800F5D44(MenuContext* context, s32 posX, s32 posY, s32 width,
s32 height, s32 r, s32 g, s32 b);
INCLUDE_ASM("asm/dra/nonmatchings/42398", DrawMenuRect);
void DrawMenuRect(MenuContext* context, s32 posX, s32 posY, s32 width,
s32 height, s32 r, s32 g, s32 b);
#else
// NOTE: used to draw the menu cursor
void func_800F5D44(MenuContext* context, s32 posX, s32 posY, s32 width,
s32 height, s32 r, s32 g, s32 b) {
void DrawMenuRect(MenuContext* context, s32 posX, s32 posY, s32 width,
s32 height, s32 r, s32 g, s32 b) {
POLY_G4* prim;
s32 temp_s2;
s32 temp_t1;
@ -985,12 +985,15 @@ void func_800F5E68(MenuContext* context, s32 iOption, s32 x, s32 y, s32 w,
} else {
r = 0x80;
}
func_800F5D44(context, x, y + (iOption * (h + yGap)), w, h, r, 0, 0);
DrawMenuRect(context, x, y + (iOption * (h + yGap)), w, h, r, 0, 0);
}
INCLUDE_ASM("asm/dra/nonmatchings/42398", DrawRelicsMenu);
INCLUDE_ASM("asm/dra/nonmatchings/42398", DrawMenuAlucardPortrait);
void DrawMenuAlucardPortrait(MenuContext* ctx) {
DrawMenuSprite(ctx, 0x10, 0x24, 0x40, 0x40, 0, 0x80, 0x150, 0x9C, 1, 0, 0);
DrawMenuSprite(ctx, 0x10, 0x64, 0x40, 0x20, 0, 0xC0, 0x150, 0x9C, 0, 0, 1);
}
s32 func_800F62E8(s32 context) {
s32 temp_v0 = context * 3;
@ -1001,8 +1004,10 @@ s32 func_800F62E8(s32 context) {
// Apply cloak palette
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F6304);
// Draw menu Alucard cloak preview
INCLUDE_ASM("asm/dra/nonmatchings/42398", func_800F643C);
void DrawMenuAlucardCloakPreview(MenuContext* ctx) {
DrawMenuSprite(ctx, 0xC0, 0x80, 0x20, 0x40, 0, 0xB0, 0x100, 7, 1, 0, 2);
DrawMenuSprite(ctx, 0x100, 0x80, 0x40, 0x40, 0x80, 0xB0, 0x100, 7, 1, 0, 0);
}
void func_800F6508(MenuContext* context, s32 x, s32 y) {
s32 yellow;
@ -1012,7 +1017,7 @@ void func_800F6508(MenuContext* context, s32 x, s32 y) {
} else {
yellow = 0x7F - (g_blinkTimer & 0xF);
}
func_800F5D44(context, x, y, 0x70, 0xB, yellow, yellow, 0);
DrawMenuRect(context, x, y, 0x70, 0xB, yellow, yellow, 0);
}
// Draw main menu cursor
@ -1026,13 +1031,13 @@ void func_800F6568(MenuContext* arg0) {
} else {
r = 0x5F - (g_blinkTimer & 0x1F);
}
func_800F5D44(arg0, arg0->cursorX,
arg0->cursorY + (height * g_menuMainCursorIndex), arg0->unk4,
height, r, 0, 0);
DrawMenuRect(arg0, arg0->cursorX,
arg0->cursorY + (height * g_menuMainCursorIndex), arg0->unk4,
height, r, 0, 0);
}
void func_800F6618(s32 menuContextIndex,
s32 bColorMode) { // Draw equip menu cursor
// Draw equip menu cursor
void func_800F6618(s32 menuContextIndex, s32 bColorMode) {
s32 temp_v1;
s32 r;
MenuContext* context = &D_8013761C[menuContextIndex * 0x1E];
@ -1046,8 +1051,8 @@ void func_800F6618(s32 menuContextIndex,
r = 0x5F - (g_blinkTimer & 0x1F);
}
}
func_800F5D44(context, 0x70, (g_menuRelicsCursorIndex * 0xD) + 0x1C, 0x71,
0xB, r, 0, 0);
DrawMenuRect(context, 0x70, (g_menuRelicsCursorIndex * 0xD) + 0x1C, 0x71,
0xB, r, 0, 0);
}
#ifndef NON_MATCHING