mirror of
https://github.com/zeldaret/tmc
synced 2026-08-19 05:52:33 -04:00
Use negative values where appropriate
This commit is contained in:
@@ -274,7 +274,7 @@ void sub_08039140(CuccoAggrEntity* this) {
|
||||
super->action = 6;
|
||||
super->timer = Random();
|
||||
super->direction = GetFacingDirection(super, &gPlayerEntity);
|
||||
super->z.HALF.HI = 0xfffc;
|
||||
super->z.HALF.HI = -4;
|
||||
this->unk_78 = 0xb4;
|
||||
sub_080390F8(this);
|
||||
InitializeAnimation(super, 4);
|
||||
|
||||
+1
-1
@@ -146,7 +146,7 @@ void sub_080441E0(DustEntity* this) {
|
||||
super->frameIndex = 1;
|
||||
super->spritePriority.b0 = 7;
|
||||
this->unk_75 = 0;
|
||||
this->unk_76 = 0xffff;
|
||||
this->unk_76 = -1;
|
||||
} else {
|
||||
super->frameIndex = 0;
|
||||
super->speed = 0;
|
||||
|
||||
+1
-1
@@ -143,7 +143,7 @@ void sub_08040D30(Enemy50Entity* this) {
|
||||
}
|
||||
GenericConfused(super);
|
||||
if (super->z.HALF.HI == 0) {
|
||||
super->z.HALF.HI = 0xffff;
|
||||
super->z.HALF.HI = -1;
|
||||
}
|
||||
if (super->confusedTime == 0) {
|
||||
InitializeAnimation(super, (super->animationState ^ 1) + 1);
|
||||
|
||||
@@ -82,7 +82,7 @@ void sub_08039CE0(FlyingSkullEntity* this) {
|
||||
if (super->timer == 0) {
|
||||
sub_0803A100(this);
|
||||
super->timer = 1;
|
||||
super->z.HALF.HI = 0xffff;
|
||||
super->z.HALF.HI = -1;
|
||||
super->spriteOffsetX = 0;
|
||||
SetTile(this->unk_0x74, COORD_TO_TILE(super), super->collisionLayer);
|
||||
}
|
||||
|
||||
+15
-15
@@ -28,9 +28,9 @@ extern void (*const Ghini_Actions[])(GhiniEntity*);
|
||||
extern void (*const Ghini_SubActions[])(GhiniEntity*);
|
||||
extern const u8 gUnk_080D0970[];
|
||||
extern const u8 gUnk_080D0974[];
|
||||
extern const u8 gUnk_080D0978[];
|
||||
extern const s8 gUnk_080D0978[];
|
||||
extern const u8 gUnk_080D0980[];
|
||||
extern const u8 gUnk_080D0984[];
|
||||
extern const s8 gUnk_080D0984[];
|
||||
|
||||
void sub_0803F694(GhiniEntity*);
|
||||
void sub_0803F630(GhiniEntity*);
|
||||
@@ -102,7 +102,7 @@ void Ghini_OnConfused(GhiniEntity* this) {
|
||||
}
|
||||
GenericConfused(super);
|
||||
if (super->z.HALF.HI == 0) {
|
||||
super->z.HALF.HI = 0xffff;
|
||||
super->z.HALF.HI = -1;
|
||||
}
|
||||
if (super->confusedTime == 0) {
|
||||
InitializeAnimation(super, (super->animationState ^ 1) + 1);
|
||||
@@ -361,11 +361,11 @@ void sub_0803F66C(GhiniEntity* this) {
|
||||
}
|
||||
|
||||
void sub_0803F694(GhiniEntity* this) {
|
||||
super->z.HALF.HI = gUnk_080D0984[(((u32)this->unk_7b++ << 0x18) >> 0x1b) & 3] << 0x18 >> 0x18;
|
||||
super->z.HALF.HI = gUnk_080D0984[(this->unk_7b++ >> 3) & 3];
|
||||
}
|
||||
|
||||
void sub_0803F6C0(GhiniEntity* this) {
|
||||
super->frame &= 0xfe;
|
||||
super->frame &= ~1;
|
||||
gPlayerEntity.iframes = 0xc;
|
||||
ModHealth(-4);
|
||||
SoundReqClipped(&gPlayerEntity, SFX_PLY_VO6);
|
||||
@@ -373,9 +373,9 @@ void sub_0803F6C0(GhiniEntity* this) {
|
||||
|
||||
void sub_0803F6EC(GhiniEntity* this) {
|
||||
if (gPlayerEntity.health != 0) {
|
||||
gPlayerEntity.flags |= 0x80;
|
||||
gPlayerEntity.zVelocity = 0x18000;
|
||||
gPlayerEntity.z.HALF.HI = 0xfffe;
|
||||
gPlayerEntity.flags |= ENT_COLLIDE;
|
||||
gPlayerEntity.zVelocity = Q_16_16(1.5);
|
||||
gPlayerEntity.z.HALF.HI = -2;
|
||||
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
|
||||
gPlayerEntity.iframes = -0x3c;
|
||||
gPlayerState.jump_status = 0x41;
|
||||
@@ -416,8 +416,8 @@ const u8 gUnk_080D0974[] = {
|
||||
160,
|
||||
128,
|
||||
};
|
||||
const u8 gUnk_080D0978[] = {
|
||||
0, 254, 0, 2, 0, 252, 0, 4,
|
||||
const s8 gUnk_080D0978[] = {
|
||||
0, -2, 0, 2, 0, -4, 0, 4,
|
||||
};
|
||||
const u8 gUnk_080D0980[] = {
|
||||
15,
|
||||
@@ -425,9 +425,9 @@ const u8 gUnk_080D0980[] = {
|
||||
34,
|
||||
45,
|
||||
};
|
||||
const u8 gUnk_080D0984[] = {
|
||||
255,
|
||||
254,
|
||||
253,
|
||||
254,
|
||||
const s8 gUnk_080D0984[] = {
|
||||
-1,
|
||||
-2,
|
||||
-3,
|
||||
-2,
|
||||
};
|
||||
|
||||
@@ -949,9 +949,9 @@ void sub_08047BF0(GyorgMaleEntity* this) {
|
||||
tmp = CreateFx(super, FX_GIANT_EXPLOSION4, 0);
|
||||
if (tmp) {
|
||||
u32 rand = Random();
|
||||
tmp->x.HALF.HI += (rand & 0x1E) + 0xFFF1;
|
||||
tmp->x.HALF.HI += (rand & 0x1E) - 15;
|
||||
rand >>= 8;
|
||||
tmp->y.HALF.HI += (rand & 0x1E) + 0xFFF1;
|
||||
tmp->y.HALF.HI += (rand & 0x1E) - 15;
|
||||
tmp->spritePriority.b0 = 3;
|
||||
tmp->collisionLayer = 1;
|
||||
UpdateSpriteForCollisionLayer(tmp);
|
||||
|
||||
@@ -84,7 +84,7 @@ static void sub_08037D54(Entity* this) {
|
||||
ptr = gUnk_080CF490 + (this->direction >> 2);
|
||||
proj->x.HALF.HI += *ptr;
|
||||
proj->y.HALF.HI += *(ptr + 1);
|
||||
proj->z.HALF.HI = 0xfffd;
|
||||
proj->z.HALF.HI = -3;
|
||||
EnqueueSFX(SFX_124);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -355,7 +355,7 @@ void sub_080244E8(Entity* this) {
|
||||
case 1:
|
||||
if (++this->z.HALF.HI >= -0x10) {
|
||||
this->field_0x82.HALF.LO = 0;
|
||||
this->field_0x78.HWORD = 0xfff0;
|
||||
this->field_0x78.HWORD = -16;
|
||||
if (sub_08024AD8(this)) {
|
||||
this->field_0x80.HALF.LO++;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user