summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoroctorock <79596758+octorock@users.noreply.github.com>2024-01-06 18:22:00 +0100
committeroctorock <79596758+octorock@users.noreply.github.com>2024-01-06 18:43:02 +0100
commit1ecc23d534d65f918f3fedb690bde4d7b67b0505 (patch)
tree7cdcd98e7302a4acefad7d73d75c1e678f65acd3 /src
parent560dfa45b16d5da212174423d71c67f638366cce (diff)
Fix format
Diffstat (limited to 'src')
-rw-r--r--src/beanstalkSubtask.c12
-rw-r--r--src/enemy/armos.c2
-rw-r--r--src/enemy/businessScrub.c1
-rw-r--r--src/enemy/eyegore.c7
-rw-r--r--src/enemy/gyorgMale.c4
-rw-r--r--src/enemy/octorokBoss.c11
-rw-r--r--src/enemy/tektite.c2
-rw-r--r--src/item/itemMoleMitts.c2
-rw-r--r--src/manager/diggingCaveEntranceManager.c8
-rw-r--r--src/manager/flameManager.c14
-rw-r--r--src/manager/holeManager.c4
-rw-r--r--src/manager/hyruleTownTileSetManager.c6
-rw-r--r--src/manager/lightLevelSetManager.c8
-rw-r--r--src/manager/templeOfDropletsManager.c4
-rw-r--r--src/npc/npc5.c3
-rw-r--r--src/npcDefinitions.c8
-rw-r--r--src/object/button.c2
-rw-r--r--src/object/doubleBookshelf.c7
-rw-r--r--src/object/evilSpirit.c8
-rw-r--r--src/object/furniture.c3
-rw-r--r--src/object/itemOnGround.c3
-rw-r--r--src/object/ladderUp.c3
-rw-r--r--src/object/linkEmptyingBottle.c2
-rw-r--r--src/object/lockedDoor.c1
-rw-r--r--src/object/macroDecorations.c15
-rw-r--r--src/object/minecart.c14
-rw-r--r--src/object/octorokBossObject.c4
-rw-r--r--src/object/playerClone.c4
-rw-r--r--src/object/pushableFurniture.c3
-rw-r--r--src/object/stoneTablet.c15
-rw-r--r--src/objectDefinitions.c8
-rw-r--r--src/playerItem/playerItemCellOverwriteSet.c244
-rw-r--r--src/playerItem/playerItemHeldObject.c2
-rw-r--r--src/playerUtils.c27
-rw-r--r--src/projectile/projectile5.c2
-rw-r--r--src/projectile/spiderWeb.c3
-rw-r--r--src/room.c5
-rw-r--r--src/ui.c3
-rw-r--r--src/worldEvent/worldEvent2.c3
39 files changed, 235 insertions, 242 deletions
diff --git a/src/beanstalkSubtask.c b/src/beanstalkSubtask.c
index d3745995..9da2f7eb 100644
--- a/src/beanstalkSubtask.c
+++ b/src/beanstalkSubtask.c
@@ -203,7 +203,7 @@ u32 UpdatePlayerCollision(void) {
if (index != 0xff && (gRoomControls.scroll_flags & 4) == 0) {
ptr1 = &gUnk_080B4490[index * 2];
if (GetCollisionDataAtTilePos(COORD_TO_TILE_OFFSET(&gPlayerEntity.base, -ptr1[0], -ptr1[1]),
- gPlayerEntity.base.collisionLayer) == COLLISION_DATA_255) {
+ gPlayerEntity.base.collisionLayer) == COLLISION_DATA_255) {
if ((((gPlayerState.flags & (PL_FLAGS10000 | PL_FLAGS2)) != 0) ||
((gPlayerState.sword_state & 0x10) != 0)) ||
((sub_080806BC(gPlayerEntity.base.x.HALF.HI - gRoomControls.origin_x,
@@ -934,8 +934,8 @@ bool32 sub_0801A980(void) {
const s16* ptr;
GetLayerByIndex(gPlayerEntity.base.collisionLayer); // TODO result unused?
ptr = &gUnk_080B44A8[gPlayerEntity.base.animationState & 6];
- tileType =
- GetTileTypeAtTilePos(COORD_TO_TILE_OFFSET(&gPlayerEntity.base, -ptr[0], -ptr[1]), gPlayerEntity.base.collisionLayer);
+ tileType = GetTileTypeAtTilePos(COORD_TO_TILE_OFFSET(&gPlayerEntity.base, -ptr[0], -ptr[1]),
+ gPlayerEntity.base.collisionLayer);
if (tileType < 0x4000) {
GetActTileForTileType(tileType);
}
@@ -1277,10 +1277,8 @@ void UnregisterInteractTile(u32 tilePos, s32 layer) {
}
const struct_080B44D0 gUnk_080B44D0[] = {
- { 0x67, SPECIAL_TILE_132 }, { 0x68, SPECIAL_TILE_133 },
- { 0x69, SPECIAL_TILE_134 }, { 0x6a, SPECIAL_TILE_135 },
- { 0x6b, SPECIAL_TILE_136 }, { 0x27, SPECIAL_TILE_131 },
- { 0x23, SPECIAL_TILE_141 }, { 0x0, 0x0 },
+ { 0x67, SPECIAL_TILE_132 }, { 0x68, SPECIAL_TILE_133 }, { 0x69, SPECIAL_TILE_134 }, { 0x6a, SPECIAL_TILE_135 },
+ { 0x6b, SPECIAL_TILE_136 }, { 0x27, SPECIAL_TILE_131 }, { 0x23, SPECIAL_TILE_141 }, { 0x0, 0x0 },
};
// used for minish houses, seems to overwrite all tiles with certain collision values on layer 1 for them?
diff --git a/src/enemy/armos.c b/src/enemy/armos.c
index 9fdc9d3b..94236dee 100644
--- a/src/enemy/armos.c
+++ b/src/enemy/armos.c
@@ -425,7 +425,7 @@ bool32 sub_0803086C(ArmosEntity* this) {
centerY = super->y.HALF_U.HI - gRoomControls.origin_y;
// TODO for some reason the 0x3f of COORD_TO_TILE(super) needs to be forced to r2 here.
tilePos = ((((((super)->x.HALF.HI) - gRoomControls.origin_x) >> 4) & (r2 = 0x3f)) |
- (((((super)->y.HALF.HI) - gRoomControls.origin_y) >> 4) & r2) << 6);
+ (((((super)->y.HALF.HI) - gRoomControls.origin_y) >> 4) & r2) << 6);
if (GetTileTypeAtTilePos(tilePos, super->collisionLayer) == SPECIAL_TILE_73) {
if (CheckPlayerInRegion(centerX, centerY, 2, 0xc) != 0) {
diff --git a/src/enemy/businessScrub.c b/src/enemy/businessScrub.c
index d386672f..3f2c5c74 100644
--- a/src/enemy/businessScrub.c
+++ b/src/enemy/businessScrub.c
@@ -15,7 +15,6 @@
#include "save.h"
#include "tiles.h"
-
struct SalesOffering {
u8 field_0x0;
u8 field_0x1;
diff --git a/src/enemy/eyegore.c b/src/enemy/eyegore.c
index 590f081f..03b1c90e 100644
--- a/src/enemy/eyegore.c
+++ b/src/enemy/eyegore.c
@@ -401,11 +401,10 @@ void sub_08031024(EyegoreEntity* this) {
} else {
tmp2 = this->unk_7b >> 1;
uVar5 = GetTileTypeAtWorldCoords(super->x.HALF.HI + gUnk_080CE2C0[tmp2],
- super->y.HALF.HI + gUnk_080CE2C0[tmp2 + 1], super->collisionLayer);
+ super->y.HALF.HI + gUnk_080CE2C0[tmp2 + 1], super->collisionLayer);
uVar8 = GetTileTypeAtWorldCoords(super->x.HALF.HI + gUnk_080CE2C0[tmp2 + 2],
- super->y.HALF.HI + gUnk_080CE2C0[tmp2 + 3], super->collisionLayer);
- if (!(((gMapTileTypeToCollisionData[uVar5] == 0) &&
- (gMapTileTypeToCollisionData[uVar8] == 0)) ||
+ super->y.HALF.HI + gUnk_080CE2C0[tmp2 + 3], super->collisionLayer);
+ if (!(((gMapTileTypeToCollisionData[uVar5] == 0) && (gMapTileTypeToCollisionData[uVar8] == 0)) ||
((this->unk_7b | 1) & 1) == 0)) {
if (super->direction >> 3 == super->animationState) {
this->unk_78 |= 0x20;
diff --git a/src/enemy/gyorgMale.c b/src/enemy/gyorgMale.c
index bcbe32ba..d4d52e95 100644
--- a/src/enemy/gyorgMale.c
+++ b/src/enemy/gyorgMale.c
@@ -1070,8 +1070,8 @@ void sub_08047EA4(GyorgMaleEntity* this, u32 unk1) {
if (this->unk_7c & 1) {
tmp2 = sub_08047F68(this) << 8;
dir = CalculateDirectionFromOffsets(gPlayerEntity.base.x.HALF.HI - super->x.HALF.HI,
-
- gPlayerEntity.base.y.HALF.HI - super->y.HALF.HI);
+
+ gPlayerEntity.base.y.HALF.HI - super->y.HALF.HI);
tmp = dir - (tmp / 256);
tmp &= 0xFF;
gPlayerEntity.base.x.WORD += (gSineTable[tmp] - gSineTable[dir]) * tmp2;
diff --git a/src/enemy/octorokBoss.c b/src/enemy/octorokBoss.c
index 306b611b..e0d377f8 100644
--- a/src/enemy/octorokBoss.c
+++ b/src/enemy/octorokBoss.c
@@ -690,9 +690,9 @@ void OctorokBoss_Action1_AimTowardsPlayer(OctorokBossEntity* this) {
s32 tmp1;
s32 tmp2;
- tmp1 =
- (u8)(CalculateDirectionFromOffsets(gPlayerEntity.base.x.WORD - super->x.WORD, gPlayerEntity.base.y.WORD - super->y.WORD) -
- (((u8)(-this->angle.HALF.HI) ^ 0x80)));
+ tmp1 = (u8)(CalculateDirectionFromOffsets(gPlayerEntity.base.x.WORD - super->x.WORD,
+ gPlayerEntity.base.y.WORD - super->y.WORD) -
+ (((u8)(-this->angle.HALF.HI) ^ 0x80)));
if (IS_FROZEN(this) == FALSE) {
tmp2 = 8;
} else {
@@ -900,8 +900,9 @@ void OctorokBoss_ExecuteAttackVacuum(OctorokBossEntity* this) {
if (this->unk_80 == 0) {
super->direction =
-
- CalculateDirectionFromOffsets(gPlayerEntity.base.x.WORD - super->x.WORD, gPlayerEntity.base.y.WORD - super->y.WORD);
+
+ CalculateDirectionFromOffsets(gPlayerEntity.base.x.WORD - super->x.WORD,
+ gPlayerEntity.base.y.WORD - super->y.WORD);
tmp = ((u8) - (this->angle.HALF.HI + 0x80)) - super->direction;
if (tmp < 0) {
tmp = -tmp;
diff --git a/src/enemy/tektite.c b/src/enemy/tektite.c
index e5989987..fbc4c756 100644
--- a/src/enemy/tektite.c
+++ b/src/enemy/tektite.c
@@ -165,7 +165,7 @@ void sub_0802F300(TektiteEntity* this) {
} else if (super->collisions != COL_NONE) {
sub_0800417E(super, super->collisions);
} else if ((GetActTileAtEntity(super) & 0xf0) == 0x50) { // ACT_TILE_240 and ACT_TILE_241?
- super->direction = (super->direction + 0x10) & (0x3 | DirectionNorthWest);
+ super->direction = (super->direction + 0x10) & (0x3 | DirectionNorthWest);
}
if (--super->timer == 0) {
diff --git a/src/item/itemMoleMitts.c b/src/item/itemMoleMitts.c
index dfd015c1..8f535bdb 100644
--- a/src/item/itemMoleMitts.c
+++ b/src/item/itemMoleMitts.c
@@ -180,7 +180,7 @@ s32 sub_080774A0(void) {
u32 tilePos;
tilePos = COORD_TO_TILE_OFFSET((&gPlayerEntity.base), -gUnk_0811BE1E[gPlayerEntity.base.animationState & 6],
- -gUnk_0811BE1E[(gPlayerEntity.base.animationState & 6) + 1]);
+ -gUnk_0811BE1E[(gPlayerEntity.base.animationState & 6) + 1]);
collisionData = GetCollisionDataAtTilePos(tilePos, gPlayerEntity.base.collisionLayer);
diff --git a/src/manager/diggingCaveEntranceManager.c b/src/manager/diggingCaveEntranceManager.c
index b83c36e3..ce428a2b 100644
--- a/src/manager/diggingCaveEntranceManager.c
+++ b/src/manager/diggingCaveEntranceManager.c
@@ -110,10 +110,10 @@ void DiggingCaveEntranceManager_EnterEntrance(DiggingCaveEntranceManager* this,
gRoomControls.area = entr->targetArea;
gRoomControls.room = entr->targetRoom;
gDiggingCaveEntranceTransition.entrance = entr;
- gDiggingCaveEntranceTransition.offsetX = gPlayerEntity.base.x.HALF.HI - gRoomControls.origin_x -
- ((entr->sourceTilePos & TILE_POS_X_COMPONENT) * 16);
- gDiggingCaveEntranceTransition.offsetY = gPlayerEntity.base.y.HALF.HI - gRoomControls.origin_y -
- ((entr->sourceTilePos & TILE_POS_Y_COMPONENT) >> 2);
+ gDiggingCaveEntranceTransition.offsetX =
+ gPlayerEntity.base.x.HALF.HI - gRoomControls.origin_x - ((entr->sourceTilePos & TILE_POS_X_COMPONENT) * 16);
+ gDiggingCaveEntranceTransition.offsetY =
+ gPlayerEntity.base.y.HALF.HI - gRoomControls.origin_y - ((entr->sourceTilePos & TILE_POS_Y_COMPONENT) >> 2);
#ifndef EU
isDiggingCave = gDiggingCaveEntranceTransition.isDiggingCave;
diff --git a/src/manager/flameManager.c b/src/manager/flameManager.c
index 6140730e..a363ebe0 100644
--- a/src/manager/flameManager.c
+++ b/src/manager/flameManager.c
@@ -14,20 +14,20 @@
void FlameManager_Main(FlameManager* this) {
if (super->action == 0) {
- this->tilePos = TILE(this->tilePos, this->field_0x3a);
- if (GetTileTypeAtTilePos(this->tilePos, LAYER_TOP) == TILE_TYPE_117) {
+ this->x = TILE(this->x, this->y);
+ if (GetTileTypeAtTilePos(this->x, LAYER_TOP) == TILE_TYPE_117) {
super->action = 1;
- SetTile(SPECIAL_TILE_106, this->tilePos, LAYER_BOTTOM);
+ SetTile(SPECIAL_TILE_106, this->x, LAYER_BOTTOM);
} else {
DeleteThisEntity();
}
}
- if (GetTileTypeAtTilePos(this->tilePos, LAYER_BOTTOM) == SPECIAL_TILE_107) {
- sub_0807B7D8(TILE_TYPE_118, this->tilePos, LAYER_TOP);
+ if (GetTileTypeAtTilePos(this->x, LAYER_BOTTOM) == SPECIAL_TILE_107) {
+ sub_0807B7D8(TILE_TYPE_118, this->x, LAYER_TOP);
DeleteThisEntity();
}
- if (GetTileTypeAtTilePos(this->tilePos, LAYER_TOP) == TILE_TYPE_118) {
- SetTile(SPECIAL_TILE_107, this->tilePos, LAYER_BOTTOM);
+ if (GetTileTypeAtTilePos(this->x, LAYER_TOP) == TILE_TYPE_118) {
+ SetTile(SPECIAL_TILE_107, this->x, LAYER_BOTTOM);
DeleteThisEntity();
}
}
diff --git a/src/manager/holeManager.c b/src/manager/holeManager.c
index 5807b909..c83ed3ea 100644
--- a/src/manager/holeManager.c
+++ b/src/manager/holeManager.c
@@ -35,14 +35,14 @@ typedef struct struct_08108764 {
u16 unk_06;
u16 unk_08;
u16 unk_0a;
- }* unk_0c;
+ } * unk_0c;
struct {
u8 unk_00;
u8 unk_01;
u8 unk_02[2];
u16 unk_04;
u16 unk_06;
- }* unk_10;
+ } * unk_10;
} struct_08108764;
extern struct_08108764 gUnk_08108764[];
diff --git a/src/manager/hyruleTownTileSetManager.c b/src/manager/hyruleTownTileSetManager.c
index d7ef4495..118d2f14 100644
--- a/src/manager/hyruleTownTileSetManager.c
+++ b/src/manager/hyruleTownTileSetManager.c
@@ -115,14 +115,14 @@ void sub_08059B18(void) {
for (loopVar = 0; loopVar < 4; ++loopVar) {
for (innerLoopVar = 0; innerLoopVar < 4; ++innerLoopVar) {
SetTileByIndex(loopVar * 0x10 + TILE_TYPE_1195 + innerLoopVar,
- COMMON(0x28 + 0x10 * innerLoopVar, loopVar * 0x10), 1);
+ COMMON(0x28 + 0x10 * innerLoopVar, loopVar * 0x10), 1);
}
}
for (loopVar = 0; loopVar < 3; ++loopVar) {
for (innerLoopVar = 0; innerLoopVar < 4; ++innerLoopVar) {
SetTileByIndex(loopVar * 0x10 + TILE_TYPE_1088 + innerLoopVar,
- COMMON(0x28 + 0x10 * innerLoopVar, loopVar * 0x10), 2);
+ COMMON(0x28 + 0x10 * innerLoopVar, loopVar * 0x10), 2);
}
}
SetTileByIndex(TILE_TYPE_214, TILE_POS(2, 23), LAYER_TOP);
@@ -133,7 +133,7 @@ void sub_08059B18(void) {
for (loopVar = 0; loopVar < 5; ++loopVar) {
for (innerLoopVar = 0; innerLoopVar < 4; ++innerLoopVar) {
SetTileByIndex(loopVar * 0x10 + TILE_TYPE_1190 + innerLoopVar,
- COMMON(0x28 + 0x10 * innerLoopVar, loopVar * 0x10), 1);
+ COMMON(0x28 + 0x10 * innerLoopVar, loopVar * 0x10), 1);
}
}
SetTileByIndex(TILE_TYPE_1092, TILE_POS(2, 24), LAYER_TOP);
diff --git a/src/manager/lightLevelSetManager.c b/src/manager/lightLevelSetManager.c
index a2218e63..26350020 100644
--- a/src/manager/lightLevelSetManager.c
+++ b/src/manager/lightLevelSetManager.c
@@ -133,14 +133,14 @@ void LightLevelSetManager_Type3(LightLevelSetManager* this) {
void sub_0805BE70(LightLevelSetManager* this, u32 tileType) {
SetTileType(tileType,
- ((this->field_0x38 << 0x10) >> 0x14 & 0x3fU) | ((this->field_0x3a << 0x10) >> 0x14 & 0x3fU) << 6,
- super->type2);
+ ((this->field_0x38 << 0x10) >> 0x14 & 0x3fU) | ((this->field_0x3a << 0x10) >> 0x14 & 0x3fU) << 6,
+ super->type2);
}
void sub_0805BE94(LightLevelSetManager* this) {
SetTileType(TILE_TYPE_118,
- ((this->field_0x38 << 0x10) >> 0x14 & 0x3fU) | ((this->field_0x3a << 0x10) >> 0x14 & 0x3fU) << 6,
- super->type2);
+ ((this->field_0x38 << 0x10) >> 0x14 & 0x3fU) | ((this->field_0x3a << 0x10) >> 0x14 & 0x3fU) << 6,
+ super->type2);
ChangeLightLevel(super->timer);
DeleteThisEntity();
}
diff --git a/src/manager/templeOfDropletsManager.c b/src/manager/templeOfDropletsManager.c
index 2e0b716c..19d8f07a 100644
--- a/src/manager/templeOfDropletsManager.c
+++ b/src/manager/templeOfDropletsManager.c
@@ -488,9 +488,7 @@ void sub_0805A9CC(TempleOfDropletsManager* this) {
gScreen.bg3.updated = 1;
}
-extern struct {
- u8 unk_00[0x20];
-} gUnk_085A97A0[];
+extern struct { u8 unk_00[0x20]; } gUnk_085A97A0[];
void sub_0805AA58(TempleOfDropletsManager* this) {
if (--super->timer == 0) {
diff --git a/src/npc/npc5.c b/src/npc/npc5.c
index 6e71501e..27c865d6 100644
--- a/src/npc/npc5.c
+++ b/src/npc/npc5.c
@@ -531,7 +531,8 @@ u32 CalcJumpDirection(Entity* this) {
static const u8 sTable[] = {
// actTile, animationState
- ACT_TILE_43, DirectionSouth, ACT_TILE_42, DirectionNorth, ACT_TILE_45, DirectionEast, ACT_TILE_44, DirectionWest, 0x0,
+ ACT_TILE_43, DirectionSouth, ACT_TILE_42, DirectionNorth, ACT_TILE_45, DirectionEast,
+ ACT_TILE_44, DirectionWest, 0x0,
};
u32 actTile;
diff --git a/src/npcDefinitions.c b/src/npcDefinitions.c
index e5ef462d..b6db7f31 100644
--- a/src/npcDefinitions.c
+++ b/src/npcDefinitions.c
@@ -180,9 +180,11 @@ const NPCDefinition gNPCDefinition_52[] = {
};
#endif
-#define MULTI_FORM(definition_ptr) \
- { \
- { 2, 0, 0, 0, 0, 0, 0 }, { .definition = (definition_ptr) } \
+#define MULTI_FORM(definition_ptr) \
+ { \
+ { 2, 0, 0, 0, 0, 0, 0 }, { \
+ .definition = (definition_ptr) \
+ } \
}
const NPCDefinition gNPCDefinitions[] = {
diff --git a/src/object/button.c b/src/object/button.c
index ef014914..d72e176f 100644
--- a/src/object/button.c
+++ b/src/object/button.c
@@ -43,7 +43,7 @@ void Button_Init(ButtonEntity* this) {
super->collisionLayer = this->unk_84;
}
this->tilePos = (((super->x.HALF.HI - gRoomControls.origin_x) >> 4) & 0x3F) |
- ((((super->y.HALF.HI - gRoomControls.origin_y) >> 4) & 0x3F) << 6);
+ ((((super->y.HALF.HI - gRoomControls.origin_y) >> 4) & 0x3F) << 6);
this->unk_72 = GetTileTypeAtTilePos(this->tilePos, super->collisionLayer);
if (super->type == 0 && CheckFlags(this->unk_86)) {
super->action = 5;
diff --git a/src/object/doubleBookshelf.c b/src/object/doubleBookshelf.c
index eb3c267e..33519589 100644
--- a/src/object/doubleBookshelf.c
+++ b/src/object/doubleBookshelf.c
@@ -188,10 +188,9 @@ void sub_0809B334(DoubleBookshelfEntity* this) {
}
void sub_0809B358(DoubleBookshelfEntity* this) {
- static const u16 gUnk_08123D68[] = { SPECIAL_TILE_34, SPECIAL_TILE_34, SPECIAL_TILE_116,
- SPECIAL_TILE_38, SPECIAL_TILE_116, SPECIAL_TILE_116,
- SPECIAL_TILE_38, SPECIAL_TILE_116, SPECIAL_TILE_34,
- SPECIAL_TILE_34 };
+ static const u16 gUnk_08123D68[] = { SPECIAL_TILE_34, SPECIAL_TILE_34, SPECIAL_TILE_116, SPECIAL_TILE_38,
+ SPECIAL_TILE_116, SPECIAL_TILE_116, SPECIAL_TILE_38, SPECIAL_TILE_116,
+ SPECIAL_TILE_34, SPECIAL_TILE_34 };
s32 index;
const u16* array = &gUnk_08123D68[this->unk_84];
u32 tilePos = this->tilePos + TILE_POS(-2, -2);
diff --git a/src/object/evilSpirit.c b/src/object/evilSpirit.c
index 730d2de5..bec6e328 100644
--- a/src/object/evilSpirit.c
+++ b/src/object/evilSpirit.c
@@ -82,11 +82,13 @@ void EvilSpirit_Action1(EvilSpiritEntity* this) {
this->unk76 = this->unk7c;
this->unk7a = this->unk7c;
super->speed = 0x300;
- super->direction =
- CalculateDirectionFromOffsets(super->parent->x.WORD - super->x.WORD, super->parent->y.WORD - super->y.WORD) ^ 0x80;
+ super->direction = CalculateDirectionFromOffsets(super->parent->x.WORD - super->x.WORD,
+ super->parent->y.WORD - super->y.WORD) ^
+ 0x80;
} else {
super->speed = 0x600;
- dir = CalculateDirectionFromOffsets(gPlayerEntity.base.x.WORD - super->x.WORD, gPlayerEntity.base.y.WORD - super->y.WORD) ^
+ dir = CalculateDirectionFromOffsets(gPlayerEntity.base.x.WORD - super->x.WORD,
+ gPlayerEntity.base.y.WORD - super->y.WORD) ^
0x80;
if (dir != super->direction) {
if ((u8)(dir - super->direction) > 0x80) {
diff --git a/src/object/furniture.c b/src/object/furniture.c
index 44cb7449..ddcec22f 100644
--- a/src/object/furniture.c
+++ b/src/object/furniture.c
@@ -338,8 +338,7 @@ static void FurnitureUpdate(FurnitureEntity* this) {
break;
case 0x80:
if (gPlayerEntity.base.y.HALF.HI < super->y.HALF.HI + 8) {
- if (gPlayerState.floor_type != SURFACE_LADDER &&
- GetTileTypeAtEntity(super) == SPECIAL_TILE_23) {
+ if (gPlayerState.floor_type != SURFACE_LADDER && GetTileTypeAtEntity(super) == SPECIAL_TILE_23) {
SetTile(SPECIAL_TILE_38, this->tilePos, super->collisionLayer);
SetTile(SPECIAL_TILE_61, this->tilePos + TILE_POS(0, -1), super->collisionLayer);
SetTile(SPECIAL_TILE_61, this->tilePos + TILE_POS(0, -2), super->collisionLayer);
diff --git a/src/object/itemOnGround.c b/src/object/itemOnGround.c
index 7d7b8917..7d627de4 100644
--- a/src/object/itemOnGround.c
+++ b/src/object/itemOnGround.c
@@ -284,8 +284,7 @@ void sub_080812A0(ItemOnGroundEntity* this) {
}
void sub_080812A8(ItemOnGroundEntity* this) {
- if (GetCollisionDataAtEntity(super) != COLLISION_DATA_15 &&
- this->unk_6e != GetTileTypeAtEntity(super)) {
+ if (GetCollisionDataAtEntity(super) != COLLISION_DATA_15 && this->unk_6e != GetTileTypeAtEntity(super)) {
super->direction = 0;
super->speed = 0;
super->spriteSettings.draw = 1;
diff --git a/src/object/ladderUp.c b/src/object/ladderUp.c
index 5e5727fa..8dcd7e67 100644
--- a/src/object/ladderUp.c
+++ b/src/object/ladderUp.c
@@ -66,8 +66,7 @@ void LadderUp(Entity* this) {
default:
if (this->type2 == 0) {
if (gPlayerEntity.base.y.HALF.HI < this->y.HALF.HI) {
- if (gPlayerState.floor_type != SURFACE_LADDER &&
- (GetTileTypeAtEntity(this) == SPECIAL_TILE_23)) {
+ if (gPlayerState.floor_type != SURFACE_LADDER && (GetTileTypeAtEntity(this) == SPECIAL_TILE_23)) {
SetTile(SPECIAL_TILE_35, COORD_TO_TILE(this), this->collisionLayer);
RestorePrevTileEntity(COORD_TO_TILE_OFFSET(this, 0, 16), this->collisionLayer);
}
diff --git a/src/object/linkEmptyingBottle.c b/src/object/linkEmptyingBottle.c
index fff00408..0b4200a7 100644
--- a/src/object/linkEmptyingBottle.c
+++ b/src/object/linkEmptyingBottle.c
@@ -120,7 +120,7 @@ void sub_08094980(LinkEmptyingBottleEntity* this, u32 searchTileIndex, u32 repla
yOffset = gUnk_08122A28[index + 1];
if (searchTileIndex == GetTileTypeRelativeToEntity(super, xOffset, yOffset)) {
SetTile(replaceTileIndex, TILE(super->x.HALF.HI + xOffset, super->y.HALF.HI + yOffset),
- super->collisionLayer);
+ super->collisionLayer);
}
index += 2;
}
diff --git a/src/object/lockedDoor.c b/src/object/lockedDoor.c
index eda3c651..f4af4b0e 100644
--- a/src/object/lockedDoor.c
+++ b/src/object/lockedDoor.c
@@ -15,7 +15,6 @@
#include "sound.h"
#include "tiles.h"
-
typedef struct {
/*0x00*/ Entity base;
/*0x68*/ u8 unused1[8];
diff --git a/src/object/macroDecorations.c b/src/object/macroDecorations.c
index 95fcad17..457dce52 100644
--- a/src/object/macroDecorations.c
+++ b/src/object/macroDecorations.c
@@ -82,16 +82,11 @@ void MacroDecoration_Action1(MacroDecorationEntity* this) {
void sub_08097EB8(MacroDecorationEntity* this) {
static const s16 tilePosArray[] = {
- 0xff7e, SPECIAL_TILE_137, 0xff7f, SPECIAL_TILE_34,
- 0xff80, SPECIAL_TILE_34, 0xff81, SPECIAL_TILE_138,
- 0xffbe, SPECIAL_TILE_34, 0xffbf, SPECIAL_TILE_34,
- 0xffc0, SPECIAL_TILE_34, 0xffc1, SPECIAL_TILE_34,
- 0xfffe, SPECIAL_TILE_34, 0xffff, SPECIAL_TILE_34,
- 0, SPECIAL_TILE_34, 1, SPECIAL_TILE_34,
- 2, SPECIAL_TILE_139, 0x3e, SPECIAL_TILE_34,
- 0x3f, SPECIAL_TILE_34, 0x40, SPECIAL_TILE_38,
- 0x41, SPECIAL_TILE_34, 0x7e, SPECIAL_TILE_140,
- 0x7f, SPECIAL_TILE_140, 0x7fff, 0xffff,
+ 0xff7e, SPECIAL_TILE_137, 0xff7f, SPECIAL_TILE_34, 0xff80, SPECIAL_TILE_34, 0xff81, SPECIAL_TILE_138,
+ 0xffbe, SPECIAL_TILE_34, 0xffbf, SPECIAL_TILE_34, 0xffc0, SPECIAL_TILE_34, 0xffc1, SPECIAL_TILE_34,
+ 0xfffe, SPECIAL_TILE_34, 0xffff, SPECIAL_TILE_34, 0, SPECIAL_TILE_34, 1, SPECIAL_TILE_34,
+ 2, SPECIAL_TILE_139, 0x3e, SPECIAL_TILE_34, 0x3f, SPECIAL_TILE_34, 0x40, SPECIAL_TILE_38,
+ 0x41, SPECIAL_TILE_34, 0x7e, SPECIAL_TILE_140, 0x7f, SPECIAL_TILE_140, 0x7fff, 0xffff,
};
const s16* tilePosPtr;
u16 tilePos = COORD_TO_TILE(super);
diff --git a/src/object/minecart.c b/src/object/minecart.c
index 075bb3e4..6d101de6 100644
--- a/src/object/minecart.c
+++ b/src/object/minecart.c
@@ -164,7 +164,7 @@ void Minecart_Action3(MinecartEntity* this) {
}
actTile = GetActTileRelativeToEntity(super, offsetCoords[super->animationState * 2],
- offsetCoords[super->animationState * 2 + 1]);
+ offsetCoords[super->animationState * 2 + 1]);
if (FindValueForKey(actTile, gUnk_081223D8[super->animationState]) == 0) {
super->direction = DirectionTurnAround(super->direction);
super->animationState = AnimationStateFlip90(super->animationState);
@@ -343,18 +343,22 @@ const KeyValuePair* const gUnk_081223D8[] = {
gUnk_08122436,
};
const KeyValuePair gUnk_081223E8[] = {
- { ACT_TILE_242, 1 }, { ACT_TILE_101, 1 }, { ACT_TILE_104, 1 }, { ACT_TILE_106, 1 }, { ACT_TILE_100, 1 }, { ACT_TILE_41, 1 },
+ { ACT_TILE_242, 1 }, { ACT_TILE_101, 1 }, { ACT_TILE_104, 1 },
+ { ACT_TILE_106, 1 }, { ACT_TILE_100, 1 }, { ACT_TILE_41, 1 },
};
const u16 gUnk_081223E8End = 0;
const KeyValuePair gUnk_08122402[] = {
- { ACT_TILE_243, 1 }, { ACT_TILE_102, 1 }, { ACT_TILE_104, 1 }, { ACT_TILE_105, 1 }, { ACT_TILE_100, 1 }, { ACT_TILE_41, 1 },
+ { ACT_TILE_243, 1 }, { ACT_TILE_102, 1 }, { ACT_TILE_104, 1 },
+ { ACT_TILE_105, 1 }, { ACT_TILE_100, 1 }, { ACT_TILE_41, 1 },
};
const u16 gUnk_08122402End = 0;
const KeyValuePair gUnk_0812241C[] = {
- { ACT_TILE_242, 1 }, { ACT_TILE_101, 1 }, { ACT_TILE_103, 1 }, { ACT_TILE_105, 1 }, { ACT_TILE_100, 1 }, { ACT_TILE_41, 1 },
+ { ACT_TILE_242, 1 }, { ACT_TILE_101, 1 }, { ACT_TILE_103, 1 },
+ { ACT_TILE_105, 1 }, { ACT_TILE_100, 1 }, { ACT_TILE_41, 1 },
};
const u16 gUnk_0812241CEnd = 0;
const KeyValuePair gUnk_08122436[] = {
- { ACT_TILE_243, 1 }, { ACT_TILE_102, 1 }, { ACT_TILE_106, 1 }, { ACT_TILE_103, 1 }, { ACT_TILE_100, 1 }, { ACT_TILE_41, 1 },
+ { ACT_TILE_243, 1 }, { ACT_TILE_102, 1 }, { ACT_TILE_106, 1 },
+ { ACT_TILE_103, 1 }, { ACT_TILE_100, 1 }, { ACT_TILE_41, 1 },
};
const u16 gUnk_08122436End = 0;
diff --git a/src/object/octorokBossObject.c b/src/object/octorokBossObject.c
index 828a87d5..ed704166 100644
--- a/src/object/octorokBossObject.c
+++ b/src/object/octorokBossObject.c
@@ -183,7 +183,7 @@ void OctorokBossObject_Action1(OctorokBossObjectEntity* this) {
case 1:
super->direction =
CalculateDirectionFromOffsets(this->helper->tailObjects[super->timer]->x.WORD - super->x.WORD,
- this->helper->tailObjects[super->timer]->y.WORD - super->y.WORD);
+ this->helper->tailObjects[super->timer]->y.WORD - super->y.WORD);
LinearMoveAngle(super, super->speed, super->direction);
if (EntityInRectRadius(super, this->helper->tailObjects[super->timer], 2, 2) == 0) {
return;
@@ -352,7 +352,7 @@ bool32 sub_0809A6F8(u32 param_1, u32 param_2, u32 param_3, u32 param_4) {
if (gUnk_081238A0[param_3] != 0) {
if ((param_4 & 1) != 0) {
SetTileByIndex(gUnk_081238A0[param_3], (param_1 >> 4 & 0x3f) | (param_2 >> 4 & 0x3f) << 6,
- LAYER_BOTTOM);
+ LAYER_BOTTOM);
} else {
RestorePrevTileEntity((param_1 >> 4 & 0x3f) | (param_2 >> 4 & 0x3f) << 6, 1);
}
diff --git a/src/object/playerClone.c b/src/object/playerClone.c
index 3a39e465..174b7a1d 100644
--- a/src/object/playerClone.c
+++ b/src/object/playerClone.c
@@ -191,8 +191,8 @@ void sub_08084CAC(PlayerCloneEntity* this) {
if (((PlayerCloneEntity*)gPlayerClones[super->type])->unk70 == 0) {
ptr = &gUnk_080B4468[super->animationState & 6];
- if (GetActTileForTileType(
- GetTileTypeAtTilePos(COORD_TO_TILE_OFFSET(super, -ptr[0], -ptr[1]), super->collisionLayer)) == ACT_TILE_114) {
+ if (GetActTileForTileType(GetTileTypeAtTilePos(COORD_TO_TILE_OFFSET(super, -ptr[0], -ptr[1]),
+ super->collisionLayer)) == ACT_TILE_114) {
((PlayerCloneEntity*)gPlayerClones[0])->unk6c |= (1 << super->type);
} else {
((PlayerCloneEntity*)gPlayerClones[0])->unk6c &= ~(1 << super->type);
diff --git a/src/object/pushableFurniture.c b/src/object/pushableFurniture.c
index 677ecd1b..4a0dfda7 100644
--- a/src/object/pushableFurniture.c
+++ b/src/object/pushableFurniture.c
@@ -618,8 +618,7 @@ void (*const PushableFurniture_Actions[])(PushableFurnitureEntity*) = {
PushableFurniture_Action2,
};
const u16 gUnk_08121EE4[] = {
- SPECIAL_TILE_43, SPECIAL_TILE_34, SPECIAL_TILE_44,
- SPECIAL_TILE_36, SPECIAL_TILE_45, SPECIAL_TILE_37,
+ SPECIAL_TILE_43, SPECIAL_TILE_34, SPECIAL_TILE_44, SPECIAL_TILE_36, SPECIAL_TILE_45, SPECIAL_TILE_37,
};
const u16 gUnk_08121EF0[] = {
SPECIAL_TILE_38,
diff --git a/src/object/stoneTablet.c b/src/object/stoneTablet.c
index e99d48be..99e45cbe 100644
--- a/src/object/stoneTablet.c
+++ b/src/object/stoneTablet.c
@@ -27,19 +27,8 @@ void StoneTablet_Init(Entity* this) {
SPECIAL_TILE_34, -2, SPECIAL_TILE_34, -1, SPECIAL_TILE_34, 0, SPECIAL_TILE_34, 1, 0xffff,
};
static const u16 gUnk_081232FE[] = {
- SPECIAL_TILE_101,
- -65,
- SPECIAL_TILE_34,
- -64,
- SPECIAL_TILE_102,
- -63,
- SPECIAL_TILE_41,
- -1,
- SPECIAL_TILE_38,
- 0,
- SPECIAL_TILE_42,
- 1,
- 0xffff,
+ SPECIAL_TILE_101, -65, SPECIAL_TILE_34, -64, SPECIAL_TILE_102, -63, SPECIAL_TILE_41, -1,
+ SPECIAL_TILE_38, 0, SPECIAL_TILE_42, 1, 0xffff,
};
this->action = 1;
this->spriteSettings.draw = 1;
diff --git a/src/objectDefinitions.c b/src/objectDefinitions.c
index 4af3ef99..8b9e062a 100644
--- a/src/objectDefinitions.c
+++ b/src/objectDefinitions.c
@@ -1431,9 +1431,11 @@ const ObjectDefinition gObjectDefinition_0[] = {
};
#endif
-#define MULTI_FORM(definition_ptr) \
- { \
- { 2, 0, 0, 0, 0, 0, 0 }, { .definition = definition_ptr } \
+#define MULTI_FORM(definition_ptr) \
+ { \
+ { 2, 0, 0, 0, 0, 0, 0 }, { \
+ .definition = definition_ptr \
+ } \
}
const ObjectDefinition gObjectDefinitions[] = {
MULTI_FORM(gObjectDefinition_0),
diff --git a/src/playerItem/playerItemCellOverwriteSet.c b/src/playerItem/playerItemCellOverwriteSet.c
index 5cacca03..77680a1a 100644
--- a/src/playerItem/playerItemCellOverwriteSet.c
+++ b/src/playerItem/playerItemCellOverwriteSet.c
@@ -19,70 +19,70 @@ typedef struct {
// actTile for specialTile
const u8 gMapSpecialTileToActTile[] = {
- 0, // SPECIAL_TILE_0
- 0, // SPECIAL_TILE_1
- 0, // SPECIAL_TILE_2
- 0, // SPECIAL_TILE_3
- 0, // SPECIAL_TILE_4
- 0, // SPECIAL_TILE_5
- 0, // SPECIAL_TILE_6
- 0, // SPECIAL_TILE_7
- 0, // SPECIAL_TILE_8
- 0, // SPECIAL_TILE_9
- 0, // SPECIAL_TILE_10
- 0, // SPECIAL_TILE_11
- 0, // SPECIAL_TILE_12
- 0, // SPECIAL_TILE_13
- 0, // SPECIAL_TILE_14
- 0, // SPECIAL_TILE_15
- 0, // SPECIAL_TILE_16
- 0, // SPECIAL_TILE_17
- 0, // SPECIAL_TILE_18
- 0, // SPECIAL_TILE_19
+ 0, // SPECIAL_TILE_0
+ 0, // SPECIAL_TILE_1
+ 0, // SPECIAL_TILE_2
+ 0, // SPECIAL_TILE_3
+ 0, // SPECIAL_TILE_4
+ 0, // SPECIAL_TILE_5
+ 0, // SPECIAL_TILE_6
+ 0, // SPECIAL_TILE_7
+ 0, // SPECIAL_TILE_8
+ 0, // SPECIAL_TILE_9
+ 0, // SPECIAL_TILE_10
+ 0, // SPECIAL_TILE_11
+ 0, // SPECIAL_TILE_12
+ 0, // SPECIAL_TILE_13
+ 0, // SPECIAL_TILE_14
+ 0, // SPECIAL_TILE_15
+ 0, // SPECIAL_TILE_16
+ 0, // SPECIAL_TILE_17
+ 0, // SPECIAL_TILE_18
+ 0, // SPECIAL_TILE_19
ACT_TILE_241, // SPECIAL_TILE_20
- 0, // SPECIAL_TILE_21
- 0, // SPECIAL_TILE_22
+ 0, // SPECIAL_TILE_21
+ 0, // SPECIAL_TILE_22
ACT_TILE_83, // SPECIAL_TILE_23
ACT_TILE_242, // SPECIAL_TILE_24
ACT_TILE_243, // SPECIAL_TILE_25
- 0, // SPECIAL_TILE_26
- 0, // SPECIAL_TILE_27
- 0, // SPECIAL_TILE_28
- 0, // SPECIAL_TILE_29
- 0, // SPECIAL_TILE_30
- 0, // SPECIAL_TILE_31
+ 0, // SPECIAL_TILE_26
+ 0, // SPECIAL_TILE_27
+ 0, // SPECIAL_TILE_28
+ 0, // SPECIAL_TILE_29
+ 0, // SPECIAL_TILE_30
+ 0, // SPECIAL_TILE_31
ACT_TILE_240, // SPECIAL_TILE_32
- 0, // SPECIAL_TILE_33
- 0, // SPECIAL_TILE_34
- 0, // SPECIAL_TILE_35
- 0, // SPECIAL_TILE_36
- 0, // SPECIAL_TILE_37
- 0, // SPECIAL_TILE_38
- 0, // SPECIAL_TILE_39
- 0, // SPECIAL_TILE_40
- 0, // SPECIAL_TILE_41
- 0, // SPECIAL_TILE_42
- 0, // SPECIAL_TILE_43
- 0, // SPECIAL_TILE_44
- 0, // SPECIAL_TILE_45
- 0, // SPECIAL_TILE_46
- 0, // SPECIAL_TILE_47
- 0, // SPECIAL_TILE_48
- 0, // SPECIAL_TILE_49
- 0, // SPECIAL_TILE_50
- 0, // SPECIAL_TILE_51
- 0, // SPECIAL_TILE_52
- 0, // SPECIAL_TILE_53
- 0, // SPECIAL_TILE_54
- 0, // SPECIAL_TILE_55
- 0, // SPECIAL_TILE_56
- 0, // SPECIAL_TILE_57
- 0, // SPECIAL_TILE_58
- 0, // SPECIAL_TILE_59
- 0, // SPECIAL_TILE_60
- 0, // SPECIAL_TILE_61
- 0, // SPECIAL_TILE_62
- 0, // SPECIAL_TILE_63
+ 0, // SPECIAL_TILE_33
+ 0, // SPECIAL_TILE_34
+ 0, // SPECIAL_TILE_35
+ 0, // SPECIAL_TILE_36
+ 0, // SPECIAL_TILE_37
+ 0, // SPECIAL_TILE_38
+ 0, // SPECIAL_TILE_39
+ 0, // SPECIAL_TILE_40
+ 0, // SPECIAL_TILE_41
+ 0, // SPECIAL_TILE_42
+ 0, // SPECIAL_TILE_43
+ 0, // SPECIAL_TILE_44
+ 0, // SPECIAL_TILE_45
+ 0, // SPECIAL_TILE_46
+ 0, // SPECIAL_TILE_47
+ 0, // SPECIAL_TILE_48
+ 0, // SPECIAL_TILE_49
+ 0, // SPECIAL_TILE_50
+ 0, // SPECIAL_TILE_51
+ 0, // SPECIAL_TILE_52
+ 0, // SPECIAL_TILE_53
+ 0, // SPECIAL_TILE_54
+ 0, // SPECIAL_TILE_55
+ 0, // SPECIAL_TILE_56
+ 0, // SPECIAL_TILE_57
+ 0, // SPECIAL_TILE_58
+ 0, // SPECIAL_TILE_59
+ 0, // SPECIAL_TILE_60
+ 0, // SPECIAL_TILE_61
+ 0, // SPECIAL_TILE_62
+ 0, // SPECIAL_TILE_63
ACT_TILE_61, // SPECIAL_TILE_64
ACT_TILE_61, // SPECIAL_TILE_65
ACT_TILE_61, // SPECIAL_TILE_66
@@ -92,50 +92,50 @@ const u8 gMapSpecialTileToActTile[] = {
ACT_TILE_61, // SPECIAL_TILE_70
ACT_TILE_61, // SPECIAL_TILE_71
ACT_TILE_61, // SPECIAL_TILE_72
- 0, // SPECIAL_TILE_73
- 0, // SPECIAL_TILE_74
- 0, // SPECIAL_TILE_75
- 0, // SPECIAL_TILE_76
- 0, // SPECIAL_TILE_77
- 0, // SPECIAL_TILE_78
- 0, // SPECIAL_TILE_79
- 0, // SPECIAL_TILE_80
+ 0, // SPECIAL_TILE_73
+ 0, // SPECIAL_TILE_74
+ 0, // SPECIAL_TILE_75
+ 0, // SPECIAL_TILE_76
+ 0, // SPECIAL_TILE_77
+ 0, // SPECIAL_TILE_78
+ 0, // SPECIAL_TILE_79
+ 0, // SPECIAL_TILE_80
ACT_TILE_58, // SPECIAL_TILE_81
- 0, // SPECIAL_TILE_82
- 0, // SPECIAL_TILE_83
- 0, // SPECIAL_TILE_84
- 0, // SPECIAL_TILE_85
- 0, // SPECIAL_TILE_86
- 0, // SPECIAL_TILE_87
- 0, // SPECIAL_TILE_88
- 0, // SPECIAL_TILE_89
- 0, // SPECIAL_TILE_90
- 0, // SPECIAL_TILE_91
- 0, // SPECIAL_TILE_92
- 0, // SPECIAL_TILE_93
- 0, // SPECIAL_TILE_94
- 0, // SPECIAL_TILE_95
- 0, // SPECIAL_TILE_96
- 0, // SPECIAL_TILE_97
- 0, // SPECIAL_TILE_98
- 0, // SPECIAL_TILE_99
- 0, // SPECIAL_TILE_100
- 0, // SPECIAL_TILE_101
- 0, // SPECIAL_TILE_102
- 0, // SPECIAL_TILE_103
- 0, // SPECIAL_TILE_104
+ 0, // SPECIAL_TILE_82
+ 0, // SPECIAL_TILE_83
+ 0, // SPECIAL_TILE_84
+ 0, // SPECIAL_TILE_85
+ 0, // SPECIAL_TILE_86
+ 0, // SPECIAL_TILE_87
+ 0, // SPECIAL_TILE_88
+ 0, // SPECIAL_TILE_89
+ 0, // SPECIAL_TILE_90
+ 0, // SPECIAL_TILE_91
+ 0, // SPECIAL_TILE_92
+ 0, // SPECIAL_TILE_93
+ 0, // SPECIAL_TILE_94
+ 0, // SPECIAL_TILE_95
+ 0, // SPECIAL_TILE_96
+ 0, // SPECIAL_TILE_97
+ 0, // SPECIAL_TILE_98
+ 0, // SPECIAL_TILE_99
+ 0, // SPECIAL_TILE_100
+ 0, // SPECIAL_TILE_101
+ 0, // SPECIAL_TILE_102
+ 0, // SPECIAL_TILE_103
+ 0, // SPECIAL_TILE_104
ACT_TILE_40, // SPECIAL_TILE_105
- 0, // SPECIAL_TILE_106
- 0, // SPECIAL_TILE_107
- 0, // SPECIAL_TILE_108
- 0, // SPECIAL_TILE_109
- 0, // SPECIAL_TILE_110
- 0, // SPECIAL_TILE_111
- 0, // SPECIAL_TILE_112
- 0, // SPECIAL_TILE_113
- 0, // SPECIAL_TILE_114
- 0, // SPECIAL_TILE_115
- 0, // SPECIAL_TILE_116
+ 0, // SPECIAL_TILE_106
+ 0, // SPECIAL_TILE_107
+ 0, // SPECIAL_TILE_108
+ 0, // SPECIAL_TILE_109
+ 0, // SPECIAL_TILE_110
+ 0, // SPECIAL_TILE_111
+ 0, // SPECIAL_TILE_112
+ 0, // SPECIAL_TILE_113
+ 0, // SPECIAL_TILE_114
+ 0, // SPECIAL_TILE_115
+ 0, // SPECIAL_TILE_116
ACT_TILE_18, // SPECIAL_TILE_117
ACT_TILE_18, // SPECIAL_TILE_118
ACT_TILE_18, // SPECIAL_TILE_119
@@ -144,11 +144,11 @@ const u8 gMapSpecialTileToActTile[] = {
ACT_TILE_18, // SPECIAL_TILE_122
ACT_TILE_18, // SPECIAL_TILE_123
ACT_TILE_18, // SPECIAL_TILE_124
- 0, // SPECIAL_TILE_125
+ 0, // SPECIAL_TILE_125
ACT_TILE_116, // SPECIAL_TILE_126
ACT_TILE_116, // SPECIAL_TILE_127
ACT_TILE_41, // SPECIAL_TILE_128
- 0, // SPECIAL_TILE_129
+ 0, // SPECIAL_TILE_129
ACT_TILE_35, // SPECIAL_TILE_130
ACT_TILE_41, // SPECIAL_TILE_131
ACT_TILE_41, // SPECIAL_TILE_132
@@ -163,13 +163,13 @@ const u8 gMapSpecialTileToActTile[] = {
ACT_TILE_41, // SPECIAL_TILE_141
ACT_TILE_80, // SPECIAL_TILE_142
ACT_TILE_81, // SPECIAL_TILE_143
- 0, // SPECIAL_TILE_144
+ 0, // SPECIAL_TILE_144
ACT_TILE_15, // SPECIAL_TILE_145
- 0, // SPECIAL_TILE_146
- 0, // SPECIAL_TILE_147
- 0, // SPECIAL_TILE_148
- 0, // SPECIAL_TILE_149
- 0, // SPECIAL_TILE_150
+ 0, // SPECIAL_TILE_146
+ 0, // SPECIAL_TILE_147
+ 0, // SPECIAL_TILE_148
+ 0, // SPECIAL_TILE_149
+ 0, // SPECIAL_TILE_150
};
// collisionData for specialTile
@@ -342,18 +342,20 @@ void PlayerItemCellOverwriteSet(PlayerItemCellOverwriteSetEntity* this) {
Entity* player = &gPlayerEntity.base;
if (super->action == 0) {
- this->tileType = GetTileTypeAtTilePos(TILE(player->x.HALF.HI + offsetByDirection[player->animationState & 0xe],
- player->y.HALF.HI + offsetByDirection[(player->animationState & 0xe) + 1]),
- super->collisionLayer);
+ this->tileType =
+ GetTileTypeAtTilePos(TILE(player->x.HALF.HI + offsetByDirection[player->animationState & 0xe],
+ player->y.HALF.HI + offsetByDirection[(player->animationState & 0xe) + 1]),
+ super->collisionLayer);
super->action++;
}
gPlayerState.mobility |= 0x80;
tmp = gInput.heldKeys & R_BUTTON;
if ((gInput.heldKeys & A_BUTTON) != 0) {
if ((gInput.newKeys & R_BUTTON) != 0) {
- this->tileType = GetTileTypeAtTilePos(TILE(player->x.HALF.HI + offsetByDirection[player->animationState & 0xe],
- player->y.HALF.HI + offsetByDirection[(player->animationState & 0xe) + 1]),
- super->collisionLayer);
+ this->tileType =
+ GetTileTypeAtTilePos(TILE(player->x.HALF.HI + offsetByDirection[player->animationState & 0xe],
+ player->y.HALF.HI + offsetByDirection[(player->animationState & 0xe) + 1]),
+ super->collisionLayer);
}
if ((gInput.heldKeys & R_BUTTON) != 0) {
player->iframes = 2;
@@ -387,13 +389,17 @@ void PlayerItemCellOverwriteSet(PlayerItemCellOverwriteSetEntity* this) {
DeleteThisEntity();
}
if ((gInput.heldKeys & B_BUTTON) != 0) {
- sub_0807B7D8(this->tileType, TILE(player->x.HALF.HI + offsetByDirection[0], player->y.HALF.HI + offsetByDirection[1]),
+ sub_0807B7D8(this->tileType,
+ TILE(player->x.HALF.HI + offsetByDirection[0], player->y.HALF.HI + offsetByDirection[1]),
super->collisionLayer);
- sub_0807B7D8(this->tileType, TILE(player->x.HALF.HI + offsetByDirection[2], player->y.HALF.HI + offsetByDirection[3]),
+ sub_0807B7D8(this->tileType,
+ TILE(player->x.HALF.HI + offsetByDirection[2], player->y.HALF.HI + offsetByDirection[3]),
super->collisionLayer);
- sub_0807B7D8(this->tileType, TILE(player->x.HALF.HI + offsetByDirection[4], player->y.HALF.HI + offsetByDirection[5]),
+ sub_0807B7D8(this->tileType,
+ TILE(player->x.HALF.HI + offsetByDirection[4], player->y.HALF.HI + offsetByDirection[5]),
super->collisionLayer);
- sub_0807B7D8(this->tileType, TILE(player->x.HALF.HI + offsetByDirection[6], player->y.HALF.HI + offsetByDirection[7]),
+ sub_0807B7D8(this->tileType,
+ TILE(player->x.HALF.HI + offsetByDirection[6], player->y.HALF.HI + offsetByDirection[7]),
super->collisionLayer);
}
}
diff --git a/src/playerItem/playerItemHeldObject.c b/src/playerItem/playerItemHeldObject.c
index 3bb07ec0..0783cd04 100644
--- a/src/playerItem/playerItemHeldObject.c
+++ b/src/playerItem/playerItemHeldObject.c
@@ -123,7 +123,7 @@ void PlayerItemHeldObject_SubAction2(PlayerItemHeldObjectEntity* this) {
super->knockbackDuration = 0;
}
if (GetActTileRelativeToEntity(super, gUnk_081320C4[super->direction >> 2],
- gUnk_081320C4[(super->direction >> 2) + 1]) == ACT_TILE_116) {
+ gUnk_081320C4[(super->direction >> 2) + 1]) == ACT_TILE_116) {
LinearMoveUpdate(super);
} else {
data = GetCollisionDataAtEntity(super);
diff --git a/src/playerUtils.c b/src/playerUtils.c
index e07275db..906595f3 100644
--- a/src/playerUtils.c
+++ b/src/playerUtils.c
@@ -897,8 +897,10 @@ void sub_08077F84(void) {
Entity* obj;
if ((gPlayerEntity.base.collisionLayer & 2) == 0) {
- u32 tileType = GetTileTypeAtWorldCoords(gPlayerEntity.base.x.HALF.HI, gPlayerEntity.base.y.HALF.HI - 12, LAYER_TOP);
- if (tileType == TILE_TYPE_835 || tileType == TILE_TYPE_836 || tileType == TILE_TYPE_837 || tileType == TILE_TYPE_838) {
+ u32 tileType =
+ GetTileTypeAtWorldCoords(gPlayerEntity.base.x.HALF.HI, gPlayerEntity.base.y.HALF.HI - 12, LAYER_TOP);
+ if (tileType == TILE_TYPE_835 || tileType == TILE_TYPE_836 || tileType == TILE_TYPE_837 ||
+ tileType == TILE_TYPE_838) {
sub_0807AA80(&gPlayerEntity.base);
gPlayerState.jump_status |= 8;
obj = CreateObject(ROTATING_TRAPDOOR, 0, 0);
@@ -1968,7 +1970,8 @@ void RespawnPlayer(void) {
} else {
u32 i;
for (i = 0; i <= 0xf && gPlayerState.path_memory[i] != -1; i++) {
- if (GetCollisionDataAtTilePos((u16)gPlayerState.path_memory[i], gPlayerState.path_memory[i] >> 0x1e) != COLLISION_DATA_15) {
+ if (GetCollisionDataAtTilePos((u16)gPlayerState.path_memory[i], gPlayerState.path_memory[i] >> 0x1e) !=
+ COLLISION_DATA_15) {
gPlayerEntity.base.collisionLayer = gPlayerState.path_memory[i] >> 0x1e;
gPlayerEntity.base.x.HALF.HI =
gRoomControls.origin_x + (gPlayerState.path_memory[i] & 0x3f) * 16 + 8;
@@ -2354,13 +2357,16 @@ bool32 sub_08079C30(Entity* player) {
return TRUE;
}
- if (gPlayerState.floor_type != FindValueForKey(GetActTileRelativeToEntity(player, 0, -1), gMapActTileToSurfaceType))
+ if (gPlayerState.floor_type !=
+ FindValueForKey(GetActTileRelativeToEntity(player, 0, -1), gMapActTileToSurfaceType))
return FALSE;
- if (gPlayerState.floor_type != FindValueForKey(GetActTileRelativeToEntity(player, 2, 0), gMapActTileToSurfaceType))
+ if (gPlayerState.floor_type !=
+ FindValueForKey(GetActTileRelativeToEntity(player, 2, 0), gMapActTileToSurfaceType))
return FALSE;
- if (gPlayerState.floor_type == FindValueForKey(GetActTileRelativeToEntity(player, -2, 0), gMapActTileToSurfaceType)) {
+ if (gPlayerState.floor_type ==
+ FindValueForKey(GetActTileRelativeToEntity(player, -2, 0), gMapActTileToSurfaceType)) {
return TRUE;
}
}
@@ -2593,7 +2599,8 @@ void UpdateFloorType(void) {
SurfaceType GetSurfaceCalcType(Entity* param_1, s32 x, s32 y) {
u32 position = TILE(param_1->x.HALF.HI + (u32)x, param_1->y.HALF.HI + y);
- u32 tileType = GetTileTypeAtWorldCoords(param_1->x.HALF.HI + x, param_1->y.HALF.HI + y, gPlayerEntity.base.collisionLayer);
+ u32 tileType =
+ GetTileTypeAtWorldCoords(param_1->x.HALF.HI + x, param_1->y.HALF.HI + y, gPlayerEntity.base.collisionLayer);
if (tileType != gPlayerState.tileType) {
gPlayerState.surfaceTimer = 0;
}
@@ -2656,7 +2663,7 @@ u32 sub_0807A2F8(u32 param_1) {
uVar2 = sub_08004202(&gPlayerEntity.base, auStack36, uVar2);
if (GetCollisionDataAtTilePos(uVar2 >> 1, LAYER_BOTTOM)) {
if (!FindValueForKey((u16)GetActTileAtTilePos((u16)(uVar2 >> 1), gPlayerEntity.base.collisionLayer),
- gUnk_0811C1D8[gPlayerEntity.base.animationState >> 1])) {
+ gUnk_0811C1D8[gPlayerEntity.base.animationState >> 1])) {
break;
}
} else {
@@ -2666,7 +2673,7 @@ u32 sub_0807A2F8(u32 param_1) {
uVar1 = sub_08004202(&gPlayerEntity.base, auStack36, uVar1);
if (GetCollisionDataAtTilePos(uVar1 >> 1, LAYER_BOTTOM)) {
if (!FindValueForKey((u16)GetActTileAtTilePos((uVar1 >> 1), gPlayerEntity.base.collisionLayer),
- gUnk_0811C1D8[gPlayerEntity.base.animationState >> 1])) {
+ gUnk_0811C1D8[gPlayerEntity.base.animationState >> 1])) {
break;
}
} else {
@@ -2798,7 +2805,7 @@ void sub_0807A750(u32 param_1, u32 param_2, const u8* param_3, u32 param_4) {
}
if ((index != 0) && (index != 0xf)) {
uVar2 = GetCollisionDataAtTilePos((param_1 >> 4 & 0x3f) | (param_2 >> 4 & 0x3f) << 6,
- gPlayerEntity.base.collisionLayer);
+ gPlayerEntity.base.collisionLayer);
if (uVar2 > 0xf) {
if (uVar2 != 0xff) {
uVar2 = param_3[uVar2 - 0x10];
diff --git a/src/projectile/projectile5.c b/src/projectile/projectile5.c
index 00c44540..f84d2a7b 100644
--- a/src/projectile/projectile5.c
+++ b/src/projectile/projectile5.c
@@ -40,7 +40,7 @@ void Projectile5_OnCollision(Entity* this) {
if ((((Projectile5Entity*)this->parent)->unk_83 & 0x3f) == 3) {
if (gPlayerState.hurtBlinkSpeed != 0) {
if (GetCollisionDataAtTilePos(TILE(this->x.HALF.HI, this->y.HALF.HI),
- gPlayerEntity.base.collisionLayer) == 0) {
+ gPlayerEntity.base.collisionLayer) == 0) {
if (this->contactFlags == CONTACT_NOW) {
*pbVar2 = *pbVar2 & 0x7f;
DeleteThisEntity();
diff --git a/src/projectile/spiderWeb.c b/src/projectile/spiderWeb.c
index 34960c2e..6a386f64 100644
--- a/src/projectile/spiderWeb.c
+++ b/src/projectile/spiderWeb.c
@@ -246,8 +246,7 @@ void sub_080AA9E0(Entity* this) {
}
void sub_080AAA68(Entity* this) {
- static const u16 typeTiles[] = { SPECIAL_TILE_35, SPECIAL_TILE_37, SPECIAL_TILE_38,
- SPECIAL_TILE_36 };
+ static const u16 typeTiles[] = { SPECIAL_TILE_35, SPECIAL_TILE_37, SPECIAL_TILE_38, SPECIAL_TILE_36 };
SetTile(typeTiles[this->type], TILE(this->x.HALF.HI, this->y.HALF.HI), this->collisionLayer);
}
diff --git a/src/room.c b/src/room.c
index 109cd3ab..a75c098a 100644
--- a/src/room.c
+++ b/src/room.c
@@ -201,9 +201,8 @@ static void sub_0804B058(EntityData* dat) {
if (EnemyEnableRespawn(uVar2) != 0) {
ent = LoadRoomEntity(dat);
if ((ent != NULL) && (ent->kind == ENEMY)) {
- ((Enemy*)ent)->idx =
- uVar2 | 0x80; // TODO Set the room tracker flag that can be set by the enemy so it does not
- // appear next time the room is visited?
+ ((Enemy*)ent)->idx = uVar2 | 0x80; // TODO Set the room tracker flag that can be set by the
+ // enemy so it does not appear next time the room is visited?
}
}
} else {
diff --git a/src/ui.c b/src/ui.c
index a3c3fb4a..e1c17292 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -629,8 +629,7 @@ void ButtonUIElement_Action1(UIElement* element) {
MAX_MOVEMENT = (!element->type2) ? 4 : 8;
- if (element->type2 == 0 &&
- (((gHUD.hideFlags >> element->type) & 1) || (gMessage.state & MESSAGE_ACTIVE) != 0)) {
+ if (element->type2 == 0 && (((gHUD.hideFlags >> element->type) & 1) || (gMessage.state & MESSAGE_ACTIVE) != 0)) {
y = (s16)gHUD.buttonY[element->type] - 0x28;
} else {
y = (s16)gHUD.buttonY[element->type];
diff --git a/src/worldEvent/worldEvent2.c b/src/worldEvent/worldEvent2.c
index 0c8a02d5..d7b87459 100644
--- a/src/worldEvent/worldEvent2.c
+++ b/src/worldEvent/worldEvent2.c
@@ -61,8 +61,7 @@ void sub_08055994(void) {
layer = LAYER_BOTTOM;
}
SetTileType(TILE_TYPE_115,
- (*(u16*)(gMenu.field_0xc + 8) >> 4 & 0x3f) | (*(u16*)(gMenu.field_0xc + 10) >> 4 & 0x3f) << 6,
- layer);
+ (*(u16*)(gMenu.field_0xc + 8) >> 4 & 0x3f) | (*(u16*)(gMenu.field_0xc + 10) >> 4 & 0x3f) << 6, layer);
sub_080553E0((u32)gMenu.field_0x4);
SoundReq(SFX_SECRET_BIG);
}