Use negative values where appropriate

This commit is contained in:
Tal Hayon
2022-08-07 00:39:22 +03:00
parent 807d313e10
commit c45195c577
27 changed files with 61 additions and 72 deletions
+1 -1
View File
@@ -170,7 +170,7 @@ void Guard_Head(Entity* this) {
if (this->id == 0x15) {
if ((this->frameIndex & 0x40) != 0) {
pbVar5 = pbVar5 + 0x21;
pbVar3 = 0xffffffff;
pbVar3 = -1;
uVar4 = 0;
} else {
pbVar3 = (uVar2 + 0x19);
+1 -1
View File
@@ -72,7 +72,7 @@ void sub_0806BA34(Entity* this, ScriptExecutionContext* context) {
}
void sub_0806BB1C(Entity* this, ScriptExecutionContext* context) {
s32 item = 0xffffffff;
s32 item = -1;
if (GetInventoryValue(ITEM_QST_BOOK1) == 1) {
item = ITEM_QST_BOOK1;
} else if (GetInventoryValue(ITEM_QST_BOOK2) == 1) {
+3 -3
View File
@@ -160,17 +160,17 @@ void sub_08067EF0(Entity* this) {
}
}
if ((this->frameSpriteSettings & 2) != 0) {
this->frameSpriteSettings &= 0xfd;
this->frameSpriteSettings &= ~2;
fxEnt = CreateFx(this, FX_ROCK, 0);
if (fxEnt != NULL) {
PositionRelative(this, fxEnt, 0, 0xffe80000);
PositionRelative(this, fxEnt, 0, Q_16_16(-24));
}
}
if ((this->frameSpriteSettings & 4) != 0) {
this->frameSpriteSettings &= 0xfb;
fxEnt = CreateFx(this, FX_STARS2, 0x20);
if (fxEnt != NULL) {
PositionRelative(this, fxEnt, 0xffec0000, 0xfff60000);
PositionRelative(this, fxEnt, Q_16_16(-20), Q_16_16(-10));
}
}
if ((this->frameSpriteSettings & 8) != 0) {
+2 -2
View File
@@ -49,8 +49,8 @@ void NPC58_Head(Entity* this) {
SetExtraSpriteFrame(this, 1, (s16)this->field_0x6a.HWORD);
SetExtraSpriteFrame(this, 2, (s16)this->field_0x6c.HWORD);
SetExtraSpriteFrame(this, 3, 10);
sub_0806FFBC(this, 0, 0xfffffff4, 0);
sub_0806FFBC(this, 1, 0xfffffffc, 0);
sub_0806FFBC(this, 0, -12, 0);
sub_0806FFBC(this, 1, -4, 0);
sub_0806FFBC(this, 2, 0xc, 0);
sub_0807000C(this);
}
+1 -1
View File
@@ -18,7 +18,7 @@ void Phonograph(Entity* this) {
this->action++;
this->spriteSettings.draw = 1;
this->field_0x68.HWORD = 1;
this->field_0x6a.HWORD = 0xffff;
this->field_0x6a.HWORD = -1;
sub_0807DD64(this);
this->frameIndex = 0;
}
+1 -1
View File
@@ -148,7 +148,7 @@ void sub_08064F28(Entity* this, ScriptExecutionContext* context) {
}
}
}
iVar4 = 0xffffffff;
iVar4 = -1;
} else {
if (CheckGlobalFlag(KAKERA_COMPLETE) == 0) {
iVar4 = 100 - gSave.unk117;