Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanis002 committed Nov 29, 2024
1 parent aea3652 commit 26ff90e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/code/z_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ s32 Camera_QRegInit(void);
* runtime. If a small f32 is being stored as an s16, it is common to store that value 100 times larger than the
* original value. This is then scaled back down during runtime with the CAM_DATA_SCALED macro.
*/
#define CAM_DATA_SCALED(x) ((x) * 0.01f)
#define CAM_DATA_SCALED(x) ((x)*0.01f)

// Load the next value from camera read-only data stored in CameraModeValue
#define GET_NEXT_RO_DATA(values) ((values++)->val)
Expand Down
3 changes: 2 additions & 1 deletion src/code/z_map_mark.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ void MapMark_DrawForDungeon(PlayState* play) {
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);

rectLeft = WIDE_INCR((((DEBUG_FEATURES ? GREG(94) : 0) + markPoint->x + 204) << 2), (WIDE_MINIMAP_SHIFT / 2));
rectLeft =
WIDE_INCR((((DEBUG_FEATURES ? GREG(94) : 0) + markPoint->x + 204) << 2), (WIDE_MINIMAP_SHIFT / 2));
rectTop = ((DEBUG_FEATURES ? GREG(95) : 0) + markPoint->y + 140) << 2;
gSPTextureRectangle(OVERLAY_DISP++, rectLeft, rectTop, markInfo->rectWidth + rectLeft,
rectTop + markInfo->rectHeight, G_TX_RENDERTILE, 0, 0,
Expand Down
3 changes: 2 additions & 1 deletion src/code/z_play.c
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,8 @@ void Play_Draw(PlayState* this) {
}
}

if (!DEBUG_FEATURES || (R_HREG_MODE != HREG_MODE_PLAY) || (R_PLAY_DRAW_ENV_FLAGS & PLAY_ENV_DRAW_SKYBOX_FILTERS)) {
if (!DEBUG_FEATURES || (R_HREG_MODE != HREG_MODE_PLAY) ||
(R_PLAY_DRAW_ENV_FLAGS & PLAY_ENV_DRAW_SKYBOX_FILTERS)) {
Environment_DrawSkyboxFilters(this);
}

Expand Down
4 changes: 2 additions & 2 deletions src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ void EnAnubiceTag_Draw(Actor* thisx, PlayState* play) {
#if IS_ACTOR_DEBUG_ENABLED
if (BREG(0) != 0) {
DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z,
this->actor.world.rot.x, this->actor.world.rot.y, this->actor.world.rot.z, 1.0f, 1.0f,
1.0f, 255, 0, 0, 255, 4, play->state.gfxCtx);
this->actor.world.rot.x, this->actor.world.rot.y, this->actor.world.rot.z, 1.0f, 1.0f,
1.0f, 255, 0, 0, 255, 4, play->state.gfxCtx);
}
#endif
}
24 changes: 11 additions & 13 deletions src/overlays/actors/ovl_player_actor/z_player.c
Original file line number Diff line number Diff line change
Expand Up @@ -10727,15 +10727,15 @@ void Player_Init(Actor* thisx, PlayState* play2) {
u32 giAllocSize = Player_GetGIAllocSize();

#if ENABLE_AUTO_GI_ALLOC
this->giObjectSegment = (void*)ALIGN16((uintptr_t)ZELDA_ARENA_MALLOC(giAllocSize, __FILE__, __LINE__));
this->giObjectSegment = (void*)ALIGN16((uintptr_t)ZELDA_ARENA_MALLOC(giAllocSize, __FILE__, __LINE__));
#else
ASSERT(giAllocSize < GI_ALLOC_SIZE, "[HackerOoT:ERROR]: GI Object larger than the allocated size.", __FILE__,
__LINE__);
// `giObjectSegment` is used for both "get item" objects and title cards. The maximum size for
// get item objects is 0x2000 (see the assert in func_8083AE40), and the maximum size for
// title cards is 0x1000 * LANGUAGE_MAX since each title card image includes all languages.
this->giObjectSegment =
(void*)(((uintptr_t)ZELDA_ARENA_MALLOC(0x1000 * LANGUAGE_MAX + 8, "../z_player.c", 17175) + 8) & ~0xF);
ASSERT(giAllocSize < GI_ALLOC_SIZE, "[HackerOoT:ERROR]: GI Object larger than the allocated size.", __FILE__,
__LINE__);
// `giObjectSegment` is used for both "get item" objects and title cards. The maximum size for
// get item objects is 0x2000 (see the assert in func_8083AE40), and the maximum size for
// title cards is 0x1000 * LANGUAGE_MAX since each title card image includes all languages.
this->giObjectSegment =
(void*)(((uintptr_t)ZELDA_ARENA_MALLOC(0x1000 * LANGUAGE_MAX + 8, "../z_player.c", 17175) + 8) & ~0xF);
#endif

respawnFlag = gSaveContext.respawnFlag;
Expand Down Expand Up @@ -14557,9 +14557,8 @@ s32 Player_UpdateNoclip(Player* this, PlayState* play) {
sControlInput = &play->state.input[0];

if ((CHECK_BTN_ALL(sControlInput->cur.button, BTN_L | BTN_R | BTN_A) &&
CHECK_BTN_ALL(sControlInput->press.button, BTN_B)) ||
(CHECK_BTN_ALL(sControlInput->cur.button, BTN_L) &&
CHECK_BTN_ALL(sControlInput->press.button, BTN_DRIGHT))) {
CHECK_BTN_ALL(sControlInput->press.button, BTN_B)) ||
(CHECK_BTN_ALL(sControlInput->cur.button, BTN_L) && CHECK_BTN_ALL(sControlInput->press.button, BTN_DRIGHT))) {

sNoclipEnabled ^= 1;
cameraMode = 0;
Expand Down Expand Up @@ -14690,8 +14689,7 @@ s32 Player_UpdateNoclip(Player* this, PlayState* play) {
this->actor.velocity.y = 0.0f;
this->actor.velocity.x = 0.0f;

if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_L) &&
CHECK_BTN_ALL(sControlInput->press.button, BTN_DLEFT)) {
if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_L) && CHECK_BTN_ALL(sControlInput->press.button, BTN_DLEFT)) {
Flags_SetTempClear(play, play->roomCtx.curRoom.num);
}

Expand Down

0 comments on commit 26ff90e

Please sign in to comment.