mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 06:24:30 +00:00
[ntsc-1.2] Match game.c, z_play.c, z_room.c (#2117)
* Match z_room.c * Match game.c and z_play.c * Add undefined syms * Rewrite condition based on other file matches
This commit is contained in:
parent
87914c6cc6
commit
e7cf2fceac
8 changed files with 174 additions and 25 deletions
|
@ -1,5 +1,9 @@
|
|||
#include "global.h"
|
||||
#include "fault.h"
|
||||
#include "terminal.h"
|
||||
#if PLATFORM_N64
|
||||
#include "n64dd.h"
|
||||
#endif
|
||||
|
||||
Vec3f D_801270A0 = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
|
@ -295,6 +299,7 @@ void Room_DrawBackground2D(Gfx** gfxP, void* tex, void* tlut, u16 width, u16 hei
|
|||
|
||||
bg = (uObjBg*)(gfx + 1);
|
||||
gSPBranchList(gfx, (Gfx*)(bg + 1));
|
||||
gfx = (Gfx*)(bg + 1);
|
||||
|
||||
bg->b.imageX = 0;
|
||||
bg->b.imageW = width * (1 << 2);
|
||||
|
@ -309,8 +314,6 @@ void Room_DrawBackground2D(Gfx** gfxP, void* tex, void* tlut, u16 width, u16 hei
|
|||
bg->b.imagePal = 0;
|
||||
bg->b.imageFlip = 0;
|
||||
|
||||
gfx = (Gfx*)(bg + 1);
|
||||
|
||||
if (fmt == G_IM_FMT_CI) {
|
||||
gDPLoadTLUT(gfx++, tlutCount, 256, tlut);
|
||||
} else {
|
||||
|
@ -441,7 +444,11 @@ RoomShapeImageMultiBgEntry* Room_GetImageMultiBgEntry(RoomShapeImageMulti* roomS
|
|||
PRINTF(VT_COL(RED, WHITE) T("z_room.c:カメラIDに一致するデータが存在しません camid=%d\n",
|
||||
"z_room.c: Data consistent with camera id does not exist camid=%d\n") VT_RST,
|
||||
bgCamIndex);
|
||||
#if PLATFORM_N64
|
||||
Fault_AddHungupAndCrash("../z_room.c", 721);
|
||||
#else
|
||||
LogUtils_HungupThread("../z_room.c", 726);
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@ -521,7 +528,11 @@ void Room_DrawImage(PlayState* play, Room* room, u32 flags) {
|
|||
} else if (roomShape->amountType == ROOM_SHAPE_IMAGE_AMOUNT_MULTI) {
|
||||
Room_DrawImageMulti(play, room, flags);
|
||||
} else {
|
||||
#if PLATFORM_N64
|
||||
Fault_AddHungupAndCrash("../z_room.c", 836);
|
||||
#else
|
||||
LogUtils_HungupThread("../z_room.c", 841);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -610,10 +621,20 @@ s32 func_8009728C(PlayState* play, RoomContext* roomCtx, s32 roomNum) {
|
|||
(void*)ALIGN16((uintptr_t)roomCtx->bufPtrs[roomCtx->unk_30] - ((size + 8) * roomCtx->unk_30 + 7));
|
||||
|
||||
osCreateMesgQueue(&roomCtx->loadQueue, &roomCtx->loadMsg, 1);
|
||||
|
||||
#if PLATFORM_N64
|
||||
if ((B_80121AF0 != NULL) && (B_80121AF0->unk_08 != NULL)) {
|
||||
B_80121AF0->unk_08(play, roomCtx, roomNum);
|
||||
} else {
|
||||
DMA_REQUEST_ASYNC(&roomCtx->dmaRequest, roomCtx->unk_34, play->roomList[roomNum].vromStart, size, 0,
|
||||
&roomCtx->loadQueue, NULL, "../z_room.c", 1036);
|
||||
}
|
||||
#else
|
||||
DMA_REQUEST_ASYNC(&roomCtx->dmaRequest, roomCtx->unk_34, play->roomList[roomNum].vromStart, size, 0,
|
||||
&roomCtx->loadQueue, NULL, "../z_room.c", 1036);
|
||||
roomCtx->unk_30 ^= 1;
|
||||
#endif
|
||||
|
||||
roomCtx->unk_30 ^= 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue