mirror of
https://github.com/zeldaret/tmc
synced 2026-08-20 14:15:10 -04:00
Use negative values where appropriate
This commit is contained in:
@@ -109,7 +109,7 @@ void sub_08088BE0(BigBarrelEntity* this) {
|
||||
Entity* ent;
|
||||
|
||||
if (CheckLocalFlag(0x15) == 0) {
|
||||
sub_08088C78(this, 2, 0, 0xffffff88);
|
||||
sub_08088C78(this, 2, 0, -120);
|
||||
ent = sub_08088C78(this, 4, 0x15, 0);
|
||||
if (ent != NULL) {
|
||||
ent->x.HALF.HI = gRoomControls.origin_x + 0x48;
|
||||
@@ -118,15 +118,15 @@ void sub_08088BE0(BigBarrelEntity* this) {
|
||||
}
|
||||
|
||||
if (CheckLocalFlag(0x16) == 0) {
|
||||
sub_08088C78(this, 2, 1, 0x78);
|
||||
sub_08088C78(this, 2, 1, 120);
|
||||
ent = sub_08088C78(this, 4, 0x16, 0);
|
||||
if (ent != NULL) {
|
||||
ent->x.HALF.HI = gRoomControls.origin_x + 0x188;
|
||||
ent->y.HALF.HI = gRoomControls.origin_y + 200;
|
||||
}
|
||||
}
|
||||
sub_08088C78(this, 1, 0, 0xffffff88);
|
||||
sub_08088C78(this, 1, 1, 0x78);
|
||||
sub_08088C78(this, 1, 0, -120);
|
||||
sub_08088C78(this, 1, 1, 120);
|
||||
}
|
||||
|
||||
Entity* sub_08088C78(BigBarrelEntity* this, u32 type, u32 type2, u32 xOffset) {
|
||||
|
||||
@@ -201,7 +201,7 @@ void sub_080840A8(s32 param_1, s32 param_2) {
|
||||
obj->zVelocity = gUnk_0811F840[Random() & 3];
|
||||
obj->x.HALF.HI = gUnk_0811F850[Random() & 3] + param_1;
|
||||
obj->y.HALF.HI = param_2 + 1;
|
||||
obj->z.HALF.HI = 0xfff8;
|
||||
obj->z.HALF.HI = -8;
|
||||
ResolveCollisionLayer(obj);
|
||||
obj = CreateFx(obj, FX_DASH, 0);
|
||||
if (obj != NULL) {
|
||||
|
||||
@@ -323,11 +323,11 @@ void sub_08094660(GleerokParticleEntity* this) {
|
||||
sub_08094708(this, iVar3, iVar4);
|
||||
iVar3 = super->x.HALF.HI + spriteOffsetX + 0x30;
|
||||
iVar4 = super->y.HALF.HI + spriteOffsetX + 0x30;
|
||||
this->unk78 = 0xfffffff0;
|
||||
this->unk78 = -16;
|
||||
this->unk7c = 0;
|
||||
sub_08094708(this, iVar3, iVar4);
|
||||
this->unk78 = 0;
|
||||
this->unk7c = 0xfffffff0;
|
||||
this->unk7c = -16;
|
||||
sub_08094708(this, iVar3, iVar4);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -378,7 +378,7 @@ void KeyStealingTakkuri_Type4_Init(KeyStealingTakkuriEntity* this) {
|
||||
super->action++;
|
||||
super->collisionLayer = 1;
|
||||
super->spriteRendering.b3 = 1;
|
||||
super->z.HALF.HI = 0xfff0;
|
||||
super->z.HALF.HI = -16;
|
||||
sub_0807DD64(super);
|
||||
InitAnimationForceUpdate(super, 1);
|
||||
}
|
||||
@@ -396,7 +396,7 @@ void sub_0809E0A0(KeyStealingTakkuriEntity* this) {
|
||||
super->child = obj;
|
||||
super->subtimer = 0;
|
||||
CopyPosition(&gPlayerEntity, obj);
|
||||
obj->z.HALF.HI = 0xfff8;
|
||||
obj->z.HALF.HI = -8;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -347,7 +347,7 @@ void sub_08085A44(LilypadLargeEntity* this) {
|
||||
if (GetRelativeCollisionTile(super, 0x10, 0x18) != 0x11) {
|
||||
super->direction = 0x18;
|
||||
} else {
|
||||
if (GetRelativeCollisionTile(super, 0xfffffff0, 0x18) != 0x11) {
|
||||
if (GetRelativeCollisionTile(super, -0x10, 0x18) != 0x11) {
|
||||
super->direction = 8;
|
||||
} else {
|
||||
super->direction = 0x10;
|
||||
|
||||
@@ -23,7 +23,7 @@ void LitArea(Entity* this) {
|
||||
this->flags |= ENT_PERSIST;
|
||||
this->subtimer = gRoomControls.room;
|
||||
this->timer = 2;
|
||||
this->field_0x68.HWORD = 0xfffe;
|
||||
this->field_0x68.HWORD = -2;
|
||||
this->field_0x6a.HWORD = 0x80;
|
||||
SetAffineInfo(this, 0x80, 0x80, 0);
|
||||
} else {
|
||||
@@ -34,7 +34,7 @@ void LitArea(Entity* this) {
|
||||
this->field_0x68.HWORD = 1;
|
||||
}
|
||||
if (0x88 < this->field_0x6a.HWORD) {
|
||||
this->field_0x68.HWORD = 0xffff;
|
||||
this->field_0x68.HWORD = -1;
|
||||
}
|
||||
SetAffineInfo(this, this->field_0x6a.HWORD, this->field_0x6a.HWORD, 0);
|
||||
}
|
||||
|
||||
@@ -22,9 +22,10 @@ void StoneTablet(Entity* this) {
|
||||
|
||||
void StoneTablet_Init(Entity* this) {
|
||||
// TODO recreate as TileData[]
|
||||
static const u16 gUnk_081232EC[] = { 0x4022, 0xfffe, 0x4022, 0xffff, 0x4022, 0x0, 0x4022, 0x1, 0xffff };
|
||||
static const u16 gUnk_081232FE[] = { 0x4065, 0xffbf, 0x4022, 0xffc0, 0x4066, 0xffc1, 0x4029,
|
||||
0xffff, 0x4026, 0x0, 0x402a, 0x1, 0xffff };
|
||||
static const u16 gUnk_081232EC[] = { 0x4022, -2, 0x4022, -1, 0x4022, 0, 0x4022, 1, 0xffff };
|
||||
static const u16 gUnk_081232FE[] = {
|
||||
0x4065, -65, 0x4022, -64, 0x4066, -63, 0x4029, -1, 0x4026, 0, 0x402a, 1, 0xffff
|
||||
};
|
||||
this->action = 1;
|
||||
this->spriteSettings.draw = 1;
|
||||
if (this->type == 3) {
|
||||
|
||||
Reference in New Issue
Block a user