mirror of
https://github.com/zeldaret/oot.git
synced 2025-01-15 12:47:04 +00:00
two z_room regs
This commit is contained in:
parent
752a83866c
commit
bc8f79298b
2 changed files with 11 additions and 7 deletions
|
@ -48,6 +48,8 @@
|
||||||
#define R_ENV_TIME_SPEED_OLD REG(15) // Most likely used during development. Unused in the final game.
|
#define R_ENV_TIME_SPEED_OLD REG(15) // Most likely used during development. Unused in the final game.
|
||||||
#define R_RUN_SPEED_LIMIT REG(45)
|
#define R_RUN_SPEED_LIMIT REG(45)
|
||||||
#define R_ENABLE_ARENA_DBG SREG(0)
|
#define R_ENABLE_ARENA_DBG SREG(0)
|
||||||
|
#define R_ROOM_PREREND_NODRAW_FLAGS SREG(25)
|
||||||
|
#define R_ROOM_BG2D_FORCE_SCALEBG SREG(26)
|
||||||
#define R_UPDATE_RATE SREG(30)
|
#define R_UPDATE_RATE SREG(30)
|
||||||
#define R_ENABLE_AUDIO_DBG SREG(36)
|
#define R_ENABLE_AUDIO_DBG SREG(36)
|
||||||
#define R_FB_FILTER_TYPE SREG(80)
|
#define R_FB_FILTER_TYPE SREG(80)
|
||||||
|
|
|
@ -303,7 +303,7 @@ void Room_DrawBackground2D(Gfx** gfxP, void* tex, void* tlut, u16 width, u16 hei
|
||||||
gDPPipeSync(gfx++);
|
gDPPipeSync(gfx++);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((fmt == G_IM_FMT_RGBA) && (SREG(26) == 0)) {
|
if ((fmt == G_IM_FMT_RGBA) && !R_ROOM_BG2D_FORCE_SCALEBG) {
|
||||||
bg->b.frameW = width * (1 << 2);
|
bg->b.frameW = width * (1 << 2);
|
||||||
bg->b.frameH = height * (1 << 2);
|
bg->b.frameH = height * (1 << 2);
|
||||||
guS2DInitBg(bg);
|
guS2DInitBg(bg);
|
||||||
|
@ -349,9 +349,10 @@ void Room_DrawPrerenderSingle(PlayState* play, Room* room, u32 flags) {
|
||||||
isFixedCamera = (activeCam->setting == CAM_SET_PREREND_FIXED);
|
isFixedCamera = (activeCam->setting == CAM_SET_PREREND_FIXED);
|
||||||
meshHeaderPrerenderSingle = &room->meshHeader->prerenderSingle;
|
meshHeaderPrerenderSingle = &room->meshHeader->prerenderSingle;
|
||||||
dListsEntry = SEGMENTED_TO_VIRTUAL(meshHeaderPrerenderSingle->base.entry);
|
dListsEntry = SEGMENTED_TO_VIRTUAL(meshHeaderPrerenderSingle->base.entry);
|
||||||
drawBg = (flags & ROOM_DRAW_OPA) && isFixedCamera && (meshHeaderPrerenderSingle->source != NULL) && !(SREG(25) & 1);
|
drawBg = (flags & ROOM_DRAW_OPA) && isFixedCamera && (meshHeaderPrerenderSingle->source != NULL) &&
|
||||||
drawOpa = (flags & ROOM_DRAW_OPA) && (dListsEntry->opa != NULL) && !(SREG(25) & 2);
|
!(R_ROOM_PREREND_NODRAW_FLAGS & (1 << 0));
|
||||||
drawXlu = (flags & ROOM_DRAW_XLU) && (dListsEntry->xlu != NULL) && !(SREG(25) & 4);
|
drawOpa = (flags & ROOM_DRAW_OPA) && (dListsEntry->opa != NULL) && !(R_ROOM_PREREND_NODRAW_FLAGS & (1 << 1));
|
||||||
|
drawXlu = (flags & ROOM_DRAW_XLU) && (dListsEntry->xlu != NULL) && !(R_ROOM_PREREND_NODRAW_FLAGS & (1 << 2));
|
||||||
|
|
||||||
if (drawOpa || drawBg) {
|
if (drawOpa || drawBg) {
|
||||||
gSPSegment(POLY_OPA_DISP++, 0x03, room->segment);
|
gSPSegment(POLY_OPA_DISP++, 0x03, room->segment);
|
||||||
|
@ -445,9 +446,10 @@ void Room_DrawPrerenderMulti(PlayState* play, Room* room, u32 flags) {
|
||||||
|
|
||||||
bgImage = Room_GetMultiBackgroundImage(meshHeaderPrerenderMulti, play);
|
bgImage = Room_GetMultiBackgroundImage(meshHeaderPrerenderMulti, play);
|
||||||
|
|
||||||
drawBg = (flags & ROOM_DRAW_OPA) && isFixedCamera && (bgImage->source != NULL) && !(SREG(25) & 1);
|
drawBg = (flags & ROOM_DRAW_OPA) && isFixedCamera && (bgImage->source != NULL) &&
|
||||||
drawOpa = (flags & ROOM_DRAW_OPA) && (dListsEntry->opa != NULL) && !(SREG(25) & 2);
|
!(R_ROOM_PREREND_NODRAW_FLAGS & (1 << 0));
|
||||||
drawXlu = (flags & ROOM_DRAW_XLU) && (dListsEntry->xlu != NULL) && !(SREG(25) & 4);
|
drawOpa = (flags & ROOM_DRAW_OPA) && (dListsEntry->opa != NULL) && !(R_ROOM_PREREND_NODRAW_FLAGS & (1 << 1));
|
||||||
|
drawXlu = (flags & ROOM_DRAW_XLU) && (dListsEntry->xlu != NULL) && !(R_ROOM_PREREND_NODRAW_FLAGS & (1 << 2));
|
||||||
|
|
||||||
if (drawOpa || drawBg) {
|
if (drawOpa || drawBg) {
|
||||||
gSPSegment(POLY_OPA_DISP++, 0x03, room->segment);
|
gSPSegment(POLY_OPA_DISP++, 0x03, room->segment);
|
||||||
|
|
Loading…
Reference in a new issue