Update N64Recomp to fix issue with pause screen cursor, fix some issues caused by patches and overlay function-local statics
This commit is contained in:
parent
c9128b6da2
commit
12de6551e6
|
@ -9,7 +9,7 @@ on:
|
||||||
N64RECOMP_COMMIT:
|
N64RECOMP_COMMIT:
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
default: 'd30d85bdfb711d05443c5d3e9a52cdd766ba1e49'
|
default: '388c16c13f7ab5f18ea41da9c58f5b6478498f57'
|
||||||
DXC_CHECKSUM:
|
DXC_CHECKSUM:
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 8e93e558b04cc6866b635838099823f51a3941a0
|
Subproject commit 50d63debd58ce9f01957142ea91b67b6c7018c96
|
|
@ -8,7 +8,7 @@
|
||||||
#define PAGE_BG_WIDTH (PAGE_BG_COLS * PAGE_BG_QUAD_WIDTH)
|
#define PAGE_BG_WIDTH (PAGE_BG_COLS * PAGE_BG_QUAD_WIDTH)
|
||||||
#define PAGE_BG_HEIGHT (PAGE_BG_ROWS * PAGE_BG_QUAD_HEIGHT)
|
#define PAGE_BG_HEIGHT (PAGE_BG_ROWS * PAGE_BG_QUAD_HEIGHT)
|
||||||
|
|
||||||
#define RECOMP_PAGE_ROW_HEIGHT 14
|
#define RECOMP_PAGE_ROW_HEIGHT 15
|
||||||
#define RECOMP_PAGE_ROW_COUNT ((PAGE_BG_HEIGHT + RECOMP_PAGE_ROW_HEIGHT - 1) / RECOMP_PAGE_ROW_HEIGHT)
|
#define RECOMP_PAGE_ROW_COUNT ((PAGE_BG_HEIGHT + RECOMP_PAGE_ROW_HEIGHT - 1) / RECOMP_PAGE_ROW_HEIGHT)
|
||||||
|
|
||||||
extern s16* sVtxPageQuadsX[VTX_PAGE_MAX];
|
extern s16* sVtxPageQuadsX[VTX_PAGE_MAX];
|
||||||
|
@ -55,16 +55,16 @@ s16 KaleidoScope_SetPageVertices(PlayState* play, Vtx* vtx, s16 vtxPage, s16 num
|
||||||
|
|
||||||
vtx[4 * row + 0].v.flag = vtx[4 * row + 1].v.flag = vtx[4 * row + 2].v.flag = vtx[4 * row + 3].v.flag = 0;
|
vtx[4 * row + 0].v.flag = vtx[4 * row + 1].v.flag = vtx[4 * row + 2].v.flag = vtx[4 * row + 3].v.flag = 0;
|
||||||
|
|
||||||
#define PIXEL_OFFSET ((1 << 4))
|
#define PIXEL_OFFSET 0
|
||||||
|
|
||||||
vtx[4 * row + 0].v.tc[0] = PIXEL_OFFSET;
|
vtx[4 * row + 0].v.tc[0] = PIXEL_OFFSET;
|
||||||
vtx[4 * row + 0].v.tc[1] = (1 << 5) + PIXEL_OFFSET;
|
vtx[4 * row + 0].v.tc[1] = PIXEL_OFFSET;
|
||||||
vtx[4 * row + 1].v.tc[0] = PAGE_BG_WIDTH * (1 << 5) + PIXEL_OFFSET;
|
vtx[4 * row + 1].v.tc[0] = (PAGE_BG_WIDTH + 2 - 1) * (1 << 5) + PIXEL_OFFSET;
|
||||||
vtx[4 * row + 1].v.tc[1] = (1 << 5) + PIXEL_OFFSET;
|
vtx[4 * row + 1].v.tc[1] = PIXEL_OFFSET;
|
||||||
vtx[4 * row + 2].v.tc[0] = PIXEL_OFFSET;
|
vtx[4 * row + 2].v.tc[0] = PIXEL_OFFSET;
|
||||||
vtx[4 * row + 2].v.tc[1] = (cur_y - next_y + 1) * (1 << 5) + PIXEL_OFFSET;
|
vtx[4 * row + 2].v.tc[1] = (cur_y - next_y + 1 - 1) * (1 << 5) + PIXEL_OFFSET;
|
||||||
vtx[4 * row + 3].v.tc[0] = PAGE_BG_WIDTH * (1 << 5) + PIXEL_OFFSET;
|
vtx[4 * row + 3].v.tc[0] = (PAGE_BG_WIDTH + 2 - 1) * (1 << 5) + PIXEL_OFFSET;
|
||||||
vtx[4 * row + 3].v.tc[1] = (cur_y - next_y + 1) * (1 << 5) + PIXEL_OFFSET;
|
vtx[4 * row + 3].v.tc[1] = (cur_y - next_y + 1 - 1) * (1 << 5) + PIXEL_OFFSET;
|
||||||
|
|
||||||
vtx[4 * row + 0].v.cn[0] = vtx[4 * row + 1].v.cn[0] = vtx[4 * row + 2].v.cn[0] = vtx[4 * row + 3].v.cn[0] = 0;
|
vtx[4 * row + 0].v.cn[0] = vtx[4 * row + 1].v.cn[0] = vtx[4 * row + 2].v.cn[0] = vtx[4 * row + 3].v.cn[0] = 0;
|
||||||
vtx[4 * row + 0].v.cn[1] = vtx[4 * row + 1].v.cn[1] = vtx[4 * row + 2].v.cn[1] = vtx[4 * row + 3].v.cn[1] = 0;
|
vtx[4 * row + 0].v.cn[1] = vtx[4 * row + 1].v.cn[1] = vtx[4 * row + 2].v.cn[1] = vtx[4 * row + 3].v.cn[1] = 0;
|
||||||
|
@ -234,20 +234,21 @@ Gfx* KaleidoScope_DrawPageSections(Gfx* gfx, Vtx* vertices, TexturePtr* textures
|
||||||
|
|
||||||
// Draw the rows.
|
// Draw the rows.
|
||||||
for (u32 bg_row = 0; bg_row < RECOMP_PAGE_ROW_COUNT; bg_row++) {
|
for (u32 bg_row = 0; bg_row < RECOMP_PAGE_ROW_COUNT; bg_row++) {
|
||||||
|
u32 cur_row_height = MIN(RECOMP_PAGE_ROW_HEIGHT, PAGE_BG_HEIGHT - bg_row * RECOMP_PAGE_ROW_HEIGHT);
|
||||||
gDPLoadTextureTile(gfx++, *cur_image,
|
gDPLoadTextureTile(gfx++, *cur_image,
|
||||||
G_IM_FMT_IA, G_IM_SIZ_8b, // fmt, siz
|
G_IM_FMT_IA, G_IM_SIZ_8b, // fmt, siz
|
||||||
PAGE_BG_WIDTH + 2, PAGE_BG_HEIGHT + 2, // width, height
|
PAGE_BG_WIDTH + 2, PAGE_BG_HEIGHT + 2, // width, height
|
||||||
0, (bg_row + 0) * RECOMP_PAGE_ROW_HEIGHT, // uls, ult
|
0, bg_row * RECOMP_PAGE_ROW_HEIGHT, // uls, ult
|
||||||
PAGE_BG_WIDTH + 2, (bg_row + 1) * RECOMP_PAGE_ROW_HEIGHT + 2, // lrs, lrt
|
PAGE_BG_WIDTH + 2 - 1, bg_row * RECOMP_PAGE_ROW_HEIGHT + cur_row_height + 1 - 1, // lrs, lrt
|
||||||
0, // pal
|
0, // pal
|
||||||
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
|
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP,
|
||||||
G_TX_NOMASK, G_TX_NOMASK,
|
G_TX_NOMASK, G_TX_NOMASK,
|
||||||
G_TX_NOLOD, G_TX_NOLOD);
|
G_TX_NOLOD, G_TX_NOLOD);
|
||||||
gDPSetTileSize(gfx++, G_TX_RENDERTILE,
|
gDPSetTileSize(gfx++, G_TX_RENDERTILE,
|
||||||
0 << G_TEXTURE_IMAGE_FRAC,
|
0 << G_TEXTURE_IMAGE_FRAC,
|
||||||
0 << G_TEXTURE_IMAGE_FRAC,
|
0 << G_TEXTURE_IMAGE_FRAC,
|
||||||
(PAGE_BG_WIDTH + 2) <<G_TEXTURE_IMAGE_FRAC,
|
(PAGE_BG_WIDTH + 2 - 1) <<G_TEXTURE_IMAGE_FRAC,
|
||||||
(RECOMP_PAGE_ROW_HEIGHT + 2) << G_TEXTURE_IMAGE_FRAC);
|
(cur_row_height + 1 - 1) << G_TEXTURE_IMAGE_FRAC);
|
||||||
gSPVertex(gfx++, vertices + 4 * bg_row, 4, 0);
|
gSPVertex(gfx++, vertices + 4 * bg_row, 4, 0);
|
||||||
gSP2Triangles(gfx++, 0, 3, 1, 0x0, 3, 0, 2, 0x0);
|
gSP2Triangles(gfx++, 0, 3, 1, 0x0, 3, 0, 2, 0x0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -381,7 +381,6 @@ void DemoKankyo_DrawMoonAndGiant(Actor* thisx, PlayState* play2) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static Vec3f D_80A5AFB0 = { 0.0f, 0.0f, 0.0f };
|
static Vec3f D_80A5AFB0 = { 0.0f, 0.0f, 0.0f };
|
||||||
static Vec3f D_80A5AFBC = { 0.0f, -1.0f, 0.0f };
|
|
||||||
|
|
||||||
// The byte after unk_01 in EnWaterEffectStruct is unused, so we'll use it as a respawn flag.
|
// The byte after unk_01 in EnWaterEffectStruct is unused, so we'll use it as a respawn flag.
|
||||||
#define WATER_EFFECT_RESPAWNED(ptr) (&(ptr)->unk_01)[1]
|
#define WATER_EFFECT_RESPAWNED(ptr) (&(ptr)->unk_01)[1]
|
||||||
|
|
|
@ -122,14 +122,16 @@ extern s16 D_80AAAE20;
|
||||||
extern s16 D_80AAAE22;
|
extern s16 D_80AAAE22;
|
||||||
extern s16 D_80AAAE24;
|
extern s16 D_80AAAE24;
|
||||||
|
|
||||||
|
extern f32 D_80AAAAB8;
|
||||||
|
extern f32 D_80AAAABC;
|
||||||
|
extern s16 D_80AAAAC0;
|
||||||
|
extern s16 D_80AAAAC4;
|
||||||
|
extern s16 D_80AAAAC8;
|
||||||
|
extern s16 D_80AAAACC;
|
||||||
|
|
||||||
// @recomp Patched to enable vertex interpolation for the dynamic water as Woodfall temple rises from below the water.
|
// @recomp Patched to enable vertex interpolation for the dynamic water as Woodfall temple rises from below the water.
|
||||||
void DmChar01_Draw(Actor* thisx, PlayState* play) {
|
void DmChar01_Draw(Actor* thisx, PlayState* play) {
|
||||||
static f32 D_80AAAAB8 = 0.0f;
|
// @recomp Move function statics to externs so they still get reset on overlay load like normal.
|
||||||
static f32 D_80AAAABC = 0.0f;
|
|
||||||
static s16 D_80AAAAC0 = 0;
|
|
||||||
static s16 D_80AAAAC4 = 0;
|
|
||||||
static s16 D_80AAAAC8 = 0;
|
|
||||||
static s16 D_80AAAACC = 0;
|
|
||||||
DmChar01* this = (DmChar01*)thisx;
|
DmChar01* this = (DmChar01*)thisx;
|
||||||
f32 temp_f12;
|
f32 temp_f12;
|
||||||
f32 spBC;
|
f32 spBC;
|
||||||
|
|
|
@ -199,6 +199,13 @@ void KaleidoScope_DrawCursor(PlayState* play) {
|
||||||
CLOSE_DISPS(play->state.gfxCtx);
|
CLOSE_DISPS(play->state.gfxCtx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern s16 sPauseZRCursorColorTimer; // 8082B9C8 32899 -17976
|
||||||
|
extern s16 sPauseZRCursorColorIndex; // 8082B9CC 32899 -17972
|
||||||
|
extern s16 sPauseZRCursorRed; // 8082DA50 32899 -9648
|
||||||
|
extern s16 sPauseZRCursorGreen; // 8082DA52 32899 -9646
|
||||||
|
extern s16 sPauseZRCursorBlue; // 8082DA54 32899 -9644
|
||||||
|
extern s16 sPauseZRCursorAlpha; // 8082DA56 32899 -9642
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* infoPanelVtx
|
* infoPanelVtx
|
||||||
*
|
*
|
||||||
|
@ -213,16 +220,11 @@ void KaleidoScope_DrawCursor(PlayState* play) {
|
||||||
|
|
||||||
// @recomp Patched to tag the matrix for interpolating the vertices of the Z button, R button, and name panel.
|
// @recomp Patched to tag the matrix for interpolating the vertices of the Z button, R button, and name panel.
|
||||||
void KaleidoScope_DrawInfoPanel(PlayState* play) {
|
void KaleidoScope_DrawInfoPanel(PlayState* play) {
|
||||||
static s16 sPauseZRCursorColorTargets[][4] = {
|
static const s16 sPauseZRCursorColorTargets[][4] = {
|
||||||
{ 180, 210, 255, 220 },
|
{ 180, 210, 255, 220 },
|
||||||
{ 100, 100, 150, 220 },
|
{ 100, 100, 150, 220 },
|
||||||
};
|
};
|
||||||
static s16 sPauseZRCursorColorTimer = 20;
|
// @recomp Moved non-const function-local statics to externs so they still get reset on overlay load.
|
||||||
static s16 sPauseZRCursorColorIndex = 0;
|
|
||||||
static s16 sPauseZRCursorRed;
|
|
||||||
static s16 sPauseZRCursorGreen;
|
|
||||||
static s16 sPauseZRCursorBlue;
|
|
||||||
static s16 sPauseZRCursorAlpha;
|
|
||||||
PauseContext* pauseCtx = &play->pauseCtx;
|
PauseContext* pauseCtx = &play->pauseCtx;
|
||||||
s16 stepR;
|
s16 stepR;
|
||||||
s16 stepG;
|
s16 stepG;
|
||||||
|
|
Loading…
Reference in New Issue