mirror of
https://github.com/zeldaret/tmc
synced 2026-07-11 23:30:06 -04:00
Fix format
This commit is contained in:
+1
-1
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include "sound.h"
|
||||
#include "tiles.h"
|
||||
|
||||
|
||||
typedef struct {
|
||||
/*0x00*/ Entity base;
|
||||
/*0x68*/ u8 unused1[8];
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user