1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-10 19:20:13 +00:00

Fix misc 12 (#1222)

* (light) `src` to `src/code/code_8006C510.c`

* `setup + entrance` -> `entrance + setup`

* Decimal for `gdSPDefLights1` args (colors, unit vector)

* Run formatter

* `firstDone` bool -> `materialFlag`

* `ENTR_MAX`: 0x613 -> 0x614

* revert `materialFlag` to bool++ for now
This commit is contained in:
Dragorn421 2022-05-15 16:38:31 +02:00 committed by GitHub
parent bf56c94f0f
commit 811b2d6ad2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 14 additions and 22 deletions

View file

@ -321,7 +321,7 @@ typedef enum {
typedef enum {
#include "tables/entrance_table.h"
/* 0x613 */ ENTR_MAX
/* 0x614 */ ENTR_MAX
} EntranceIndex;
#define ENTR_LOAD_OPENING -1

View file

@ -3,7 +3,7 @@
void Flags_UnsetAllEnv(GlobalContext* globalCtx) {
u8 i;
for (i = 0; i < 20; i++) {
for (i = 0; i < ARRAY_COUNT(globalCtx->envFlags); i++) {
globalCtx->envFlags[i] = 0;
}
}

View file

@ -29,20 +29,19 @@ s32 Overlay_Load(u32 vRomStart, u32 vRomEnd, void* vRamStart, void* vRamEnd, voi
u32 ovlOffset;
u32 size;
size = vRomEnd - vRomStart;
end = (u32)allocatedVRamAddr + size;
if (gOverlayLogSeverity >= 3) {
// "Start loading dynamic link function"
osSyncPrintf("\nダイナミックリンクファンクションのロードを開始します\n");
}
if (gOverlayLogSeverity >= 3) {
size = vRomEnd - vRomStart;
// "DMA transfer of TEXT, DATA, RODATA + rel (%08x-%08x)"
osSyncPrintf("TEXT,DATA,RODATA+relを転送します(%08x-%08x)\n", allocatedVRamAddr,
(u32)allocatedVRamAddr + size);
osSyncPrintf("TEXT,DATA,RODATA+relを転送します(%08x-%08x)\n", allocatedVRamAddr, end);
}
size = vRomEnd - vRomStart;
end = (u32)allocatedVRamAddr + size;
DmaMgr_SendRequest0((u32)allocatedVRamAddr, vRomStart, size);
ovlOffset = ((s32*)end)[-1];
@ -101,7 +100,7 @@ void* func_800FC800(u32 size) {
return __osMallocDebug(&gSystemArena, size, sNew, 0);
}
// possible some kind of delete() function
// possibly some kind of delete() function
void func_800FC83C(void* ptr) {
if (ptr != NULL) {
__osFree(&gSystemArena, ptr);
@ -144,25 +143,18 @@ void* func_800FC948(void* blk, u32 nBlk, u32 blkSize, arg3_800FC948 arg3) {
void func_800FCA18(void* blk, u32 nBlk, u32 blkSize, arg3_800FCA18 arg3, s32 arg4) {
u32 pos;
u32 end;
s32 masked_arg2;
if (blk == 0) {
return;
}
if (arg3 != 0) {
end = (u32)blk;
masked_arg2 = (s32)(blkSize & ~0);
pos = (u32)end + (nBlk * blkSize);
if (masked_arg2) {}
while (pos > end) {
pos -= masked_arg2;
pos -= (s32)(blkSize & ~0);
arg3((void*)pos, 2);
if (1) {}
}
if (!masked_arg2) {}
}
if (arg4 != 0) {

View file

@ -21,7 +21,7 @@ static DebugDispObjectInfo sDebugObjectInfoTable[] = {
{ 0, gDebugCursorTex }, { 1, gDebugArrowDL }, { 1, gDebugCameraDL },
};
static Lights1 sDebugObjectLights = gdSPDefLights1(0x80, 0x80, 0x80, 0xFF, 0xFF, 0xFF, 0x49, 0x49, 0x49);
static Lights1 sDebugObjectLights = gdSPDefLights1(128, 128, 128, 255, 255, 255, 73, 73, 73);
static DebugDispObject* sDebugObjectListHead;

View file

@ -1638,14 +1638,14 @@ void Environment_DrawRain(GlobalContext* globalCtx, View* view, GraphicsContext*
// draw droplet rings on the ground
if (player->actor.world.pos.y < view->eye.y) {
u8 firstDone = false;
u8 materialFlag = false;
for (i = 0; i < globalCtx->envCtx.unk_EE[1]; i++) {
if (!firstDone) {
if (!materialFlag) {
func_80093D84(gfxCtx);
gDPSetEnvColor(POLY_XLU_DISP++, 155, 155, 155, 0);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 120);
firstDone++;
materialFlag++;
}
Matrix_Translate(func_800746DC() * 280.0f + x280, player->actor.world.pos.y + 2.0f,

View file

@ -298,7 +298,7 @@ void Gameplay_Init(GameState* thisx) {
Gameplay_SpawnScene(
globalCtx,
gEntranceTable[((void)0, gSaveContext.entranceIndex) + ((void)0, gSaveContext.sceneSetupIndex)].scene,
gEntranceTable[((void)0, gSaveContext.sceneSetupIndex) + ((void)0, gSaveContext.entranceIndex)].spawn);
gEntranceTable[((void)0, gSaveContext.entranceIndex) + ((void)0, gSaveContext.sceneSetupIndex)].spawn);
osSyncPrintf("\nSCENE_NO=%d COUNTER=%d\n", ((void)0, gSaveContext.entranceIndex), gSaveContext.sceneSetupIndex);
// When entering Gerudo Valley in the right setup, trigger the GC emulator to play the ending movie.

View file

@ -56,7 +56,7 @@ void Title_SetupView(TitleContext* this, f32 x, f32 y, f32 z) {
void Title_Draw(TitleContext* this) {
static s16 sTitleRotY = 0;
static Lights1 sTitleLights = gdSPDefLights1(0x64, 0x64, 0x64, 0xFF, 0xFF, 0xFF, 0x45, 0x45, 0x45);
static Lights1 sTitleLights = gdSPDefLights1(100, 100, 100, 255, 255, 255, 69, 69, 69);
u16 y;
u16 idx;