mirror of
https://github.com/zeldaret/tmc
synced 2026-09-03 02:13:43 -04:00
fileScreen.c OK
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "flags.h"
|
||||
#include "functions.h"
|
||||
#include "textbox.h"
|
||||
#include "save.h"
|
||||
|
||||
extern void sub_0801D040(Entity*, u32);
|
||||
extern Entity* sub_08049DF4(u32);
|
||||
@@ -243,7 +244,7 @@ void sub_08028CE8(Entity* this) {
|
||||
u32 subtype;
|
||||
|
||||
if ((gTextBox.doTextBox & 0x7f) == 0 && sub_0802915C(this) && !sub_08056338()) {
|
||||
if (offer->price <= gUnk_02002A40.stats.rupees) {
|
||||
if (offer->price <= gSave.stats.rupees) {
|
||||
if (sub_080291DC(this)) {
|
||||
/* Bag full. */
|
||||
TextboxNoOverlapFollow(0x2904);
|
||||
@@ -508,11 +509,11 @@ bool32 sub_080291DC(Entity* this) {
|
||||
|
||||
switch (offer->field_0x8) {
|
||||
case 0x6c:
|
||||
if (gBombBagSizes[gUnk_02002A40.stats.bombBagType] <= gUnk_02002A40.stats.bombCount)
|
||||
if (gBombBagSizes[gSave.stats.bombBagType] <= gSave.stats.bombCount)
|
||||
return TRUE;
|
||||
break;
|
||||
case 0x6f:
|
||||
if (gQuiverSizes[gUnk_02002A40.stats.quiverType] <= gUnk_02002A40.stats.arrowCount)
|
||||
if (gQuiverSizes[gSave.stats.quiverType] <= gSave.stats.arrowCount)
|
||||
return TRUE;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "trig.h"
|
||||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
#include "fileScreen.h"
|
||||
|
||||
void (* const gUnk_080D1AFC[8])(Entity*);
|
||||
void (* const gUnk_080D1B1C[7])(Entity*);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
#include "textbox.h"
|
||||
#include "save.h"
|
||||
|
||||
extern bool32 sub_080544B4(u32);
|
||||
extern void sub_0807CAA0(u32, u32);
|
||||
@@ -180,7 +181,7 @@ void sub_0802805C(Entity* this) {
|
||||
this->field_0xf = tmp3;
|
||||
}
|
||||
|
||||
if (this->field_0xf >= 0x19 || gUnk_02002A40.stats.health == 0) {
|
||||
if (this->field_0xf >= 0x19 || gSave.stats.health == 0) {
|
||||
sub_0802810C(this);
|
||||
} else {
|
||||
ResetPlayer();
|
||||
@@ -245,12 +246,12 @@ void sub_080281A0(Entity* this) {
|
||||
bool32 sub_080281E0(u32 param_1) {
|
||||
bool32 ret = FALSE;
|
||||
if (GetInventoryValue(param_1) == 1) {
|
||||
if (sub_080544B4(gUnk_02002A40.stats.itemOnA)) {
|
||||
gUnk_02002A40.stats.itemOnA = 0;
|
||||
if (sub_080544B4(gSave.stats.itemOnA)) {
|
||||
gSave.stats.itemOnA = 0;
|
||||
}
|
||||
|
||||
if (sub_080544B4(gUnk_02002A40.stats.itemOnB)) {
|
||||
gUnk_02002A40.stats.itemOnB = 0;
|
||||
if (sub_080544B4(gSave.stats.itemOnB)) {
|
||||
gSave.stats.itemOnB = 0;
|
||||
}
|
||||
|
||||
sub_0807CAA0(param_1, 0);
|
||||
|
||||
+1
-1
@@ -804,7 +804,7 @@ void sub_08024E4C(Entity* this) {
|
||||
this->cutsceneBeh.HALF.LO += 1 + (Random() & 1);
|
||||
}
|
||||
|
||||
if (gUnk_02002A40.stats.health == 0 || this->field_0x86.HALF.HI == 4) {
|
||||
if (gSave.stats.health == 0 || this->field_0x86.HALF.HI == 4) {
|
||||
this->cutsceneBeh.HALF.LO = 0x30;
|
||||
this->field_0x86.HALF.HI = 0;
|
||||
sub_08024F50(this);
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "npc.h"
|
||||
#include "structures.h"
|
||||
#include "player.h"
|
||||
#include "save.h"
|
||||
|
||||
extern void sub_080293DC(Entity*);
|
||||
extern void sub_080296D8(Entity*);
|
||||
@@ -158,7 +159,7 @@ void sub_0802953C(Entity* this) {
|
||||
if (this->actionDelay != 0) {
|
||||
this->actionDelay--;
|
||||
}
|
||||
if (((this->field_0xf > 0x2d) || (gUnk_02002A40.stats.rupees == 0)) && (this->actionDelay == 0)) {
|
||||
if (((this->field_0xf > 0x2d) || (gSave.stats.rupees == 0)) && (this->actionDelay == 0)) {
|
||||
sub_080296D8(this);
|
||||
} else {
|
||||
ResetPlayer();
|
||||
@@ -170,7 +171,7 @@ void sub_0802953C(Entity* this) {
|
||||
gPlayerEntity.spritePriority.b1 = 0;
|
||||
if (--this->field_0x82.HALF.HI == 0) {
|
||||
this->field_0x82.HALF.HI = 0x41;
|
||||
if (gUnk_02002A40.stats.rupees != 0) {
|
||||
if (gSave.stats.rupees != 0) {
|
||||
ModRupees(gUnk_080CCC44[this->entityType.form]);
|
||||
this->cutsceneBeh.HALF.LO = 1;
|
||||
}
|
||||
|
||||
+3
-2
@@ -4,6 +4,7 @@
|
||||
#include "structures.h"
|
||||
#include "player.h"
|
||||
#include "functions.h"
|
||||
#include "save.h"
|
||||
|
||||
extern void (*const gUnk_080CEB74[])(Entity*);
|
||||
extern void (*const gUnk_080CEB8C[])(Entity*);
|
||||
@@ -35,8 +36,8 @@ void sub_08033564(Entity* this) {
|
||||
this->flags &= 0x7f;
|
||||
this->field_0x7c.HALF.LO = 0x27c;
|
||||
gPlayerState.flags.all |= 0x4000;
|
||||
gUnk_02002A40.stats.filler2[4] = this->entityType.form + 1;
|
||||
gUnk_02002A40.stats.field_0x20 = 600;
|
||||
gSave.stats.filler2[4] = this->entityType.form + 1;
|
||||
gSave.stats.field_0x20 = 600;
|
||||
if (this->entityType.form == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user