mirror of
https://github.com/zeldaret/tmc
synced 2026-07-29 07:33:35 -04:00
Merge branch 'master' into asset-extraction
This commit is contained in:
+20
-19
@@ -10,6 +10,7 @@
|
||||
#include "manager.h"
|
||||
#include "utils.h"
|
||||
#include "npc.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern u8 gUnk_03003DE0;
|
||||
extern u8 gUnk_03000C30;
|
||||
@@ -21,7 +22,7 @@ extern u8 gUnk_03003DF0[];
|
||||
extern u8 gUnk_03003BE0;
|
||||
extern Entity* gUnk_03004040[3];
|
||||
extern u8 gUnk_020342F8;
|
||||
extern u8 gHitboxCount;
|
||||
extern u8 gCollidableCount;
|
||||
extern void gDoCollision(void);
|
||||
|
||||
extern void sub_080ADD70();
|
||||
@@ -128,16 +129,16 @@ void PrepNextFrame(void) {
|
||||
|
||||
void PlayerUpdate(Entity* this) {
|
||||
if (gSave.stats.effect != 0)
|
||||
gPlayerState.flags.all |= 0x4000;
|
||||
gPlayerState.flags |= 0x4000;
|
||||
else
|
||||
gPlayerState.flags.all &= ~0x4000;
|
||||
gPlayerState.flags &= ~0x4000;
|
||||
|
||||
if (sub_0805E3B0(this) == 0) {
|
||||
if ((gPlayerState.flags.all & 0x80000) != 0) {
|
||||
if ((gPlayerState.flags & 0x80000) != 0) {
|
||||
sub_08077B20();
|
||||
if ((gPlayerState.flags.all & 0x200000) != 0) {
|
||||
if ((gPlayerState.flags & 0x200000) != 0) {
|
||||
gPlayerState.playerAction = 0x18;
|
||||
gPlayerState.flags.all &= ~0x80000;
|
||||
gPlayerState.flags &= ~0x80000;
|
||||
gPlayerState.hurtBlinkSpeed = 0xf0;
|
||||
this->flags |= 0x80;
|
||||
} else {
|
||||
@@ -170,10 +171,10 @@ void HandlePlayerLife(Entity* this) {
|
||||
if ((gPlayerEntity.bitfield & 0x80) && (gPlayerEntity.iframes > 0))
|
||||
SoundReq(SFX_86);
|
||||
|
||||
gPlayerState.flags.all &= ~(0x2000000 | 0x200);
|
||||
if (gPlayerState.flags.all & 0x400)
|
||||
gPlayerState.flags &= ~(0x2000000 | 0x200);
|
||||
if (gPlayerState.flags & 0x400)
|
||||
ResetPlayer();
|
||||
if ((gPlayerState.flags.all & 0x400000) && !gPlayerState.field_0xa0[0])
|
||||
if ((gPlayerState.flags & 0x400000) && !gPlayerState.field_0xa0[0])
|
||||
sub_0807A108();
|
||||
if (sub_08079B24() == 0)
|
||||
sub_08079708(this);
|
||||
@@ -189,10 +190,10 @@ void HandlePlayerLife(Entity* this) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((gPlayerState.field_0x8b != 0) || (gTextBox.doTextBox & 0x7f))
|
||||
if ((gPlayerState.field_0x8b != 0) || (gMessage.doTextBox & 0x7f))
|
||||
return;
|
||||
|
||||
gRoomVars.unk2 = gTextBox.doTextBox & 0x7f;
|
||||
gRoomVars.unk2 = gMessage.doTextBox & 0x7f;
|
||||
temp = gSave.stats.maxHealth / 4;
|
||||
if (temp > 24)
|
||||
temp = 24;
|
||||
@@ -227,7 +228,7 @@ void HandlePlayerLife(Entity* this) {
|
||||
} else if ((gSave.stats.effectTimer == 0) || --gSave.stats.effectTimer == 0) {
|
||||
gSave.stats.effect = 0;
|
||||
} else if ((gSave.stats.effectTimer & 0x3f) == 0) {
|
||||
CreateFx(this, 0x55 + gSave.stats.effect, 0);
|
||||
CreateFx(this, FX_AURA_BASE + gSave.stats.effect, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -242,12 +243,12 @@ void sub_080171F0(void) {
|
||||
|
||||
gPlayerEntity.bitfield &= ~0x80;
|
||||
if (gPlayerEntity.action != 0x14)
|
||||
gPlayerState.flags.all = (gPlayerState.flags.all & ~0x10000) | (0x10000 * (gPlayerState.flags.all & 2) / 2);
|
||||
gPlayerState.flags = (gPlayerState.flags & ~0x10000) | (0x10000 * (gPlayerState.flags & 2) / 2);
|
||||
|
||||
gPlayerState.flags.all &= ~2;
|
||||
gPlayerState.flags &= ~2;
|
||||
sub_080028E0(&gPlayerEntity);
|
||||
|
||||
if (gPlayerState.flags.all & 0x400000)
|
||||
if (gPlayerState.flags & 0x400000)
|
||||
gUnk_0200AF00.filler25[10] = 1;
|
||||
|
||||
sub_08078180();
|
||||
@@ -262,13 +263,13 @@ void sub_080171F0(void) {
|
||||
gPlayerState.field_0x3f = 0;
|
||||
sub_0807B0C8();
|
||||
|
||||
if (gPlayerState.flags.all & 0x400000)
|
||||
if (gPlayerState.flags & 0x400000)
|
||||
gUnk_03004040[0]->spriteOffsetY = gUnk_03004040[1]->spriteOffsetY = gUnk_03004040[2]->spriteOffsetY = 0;
|
||||
|
||||
if (gPlayerEntity.action == 0x1d)
|
||||
gPlayerState.flags.all |= 0x20000000;
|
||||
gPlayerState.flags |= 0x20000000;
|
||||
else
|
||||
gPlayerState.flags.all &= ~0x20000000;
|
||||
gPlayerState.flags &= ~0x20000000;
|
||||
|
||||
sub_0807A8D8(&gPlayerEntity);
|
||||
if (gPlayerState.jumpStatus & 0xc0)
|
||||
@@ -370,7 +371,7 @@ NONMATCH("asm/non_matching/arm_proxy/NPCUpdate.inc", void NPCUpdate(Entity* this
|
||||
END_NONMATCH
|
||||
|
||||
void ClearHitboxList(void) {
|
||||
gHitboxCount = 0;
|
||||
gCollidableCount = 0;
|
||||
}
|
||||
|
||||
void CollisionMain(void) {
|
||||
|
||||
+3
-5
@@ -198,7 +198,6 @@ s32 fade(s32 target, s32 current) {
|
||||
|
||||
void doPlaySound(u32 sound) {
|
||||
u32 volume;
|
||||
u32 iVar2;
|
||||
MusicPlayerInfo* musicPlayerInfo;
|
||||
|
||||
if (sound == 0)
|
||||
@@ -209,8 +208,7 @@ void doPlaySound(u32 sound) {
|
||||
} else {
|
||||
volume = gSoundPlayingInfo.volumeSfx;
|
||||
}
|
||||
iVar2 = gSoundPlayingInfo.volumeMaster;
|
||||
volume = iVar2 * volume / 0x100;
|
||||
volume = gSoundPlayingInfo.volumeMaster * volume / 0x100;
|
||||
musicPlayerInfo = gMusicPlayers[gSongTable[sound].musicPlayerIndex].info;
|
||||
m4aMPlayImmInit(musicPlayerInfo);
|
||||
m4aMPlayVolumeControl(musicPlayerInfo, 0xffff, volume);
|
||||
@@ -535,7 +533,7 @@ extern const SongHeader sfx14E;
|
||||
extern const SongHeader sfx14F;
|
||||
extern const SongHeader sfx150;
|
||||
extern const SongHeader sfx151;
|
||||
extern const SongHeader sfx152;
|
||||
extern const SongHeader sfxNearPortal;
|
||||
extern const SongHeader sfx153;
|
||||
extern const SongHeader sfx154;
|
||||
extern const SongHeader sfx155;
|
||||
@@ -1167,7 +1165,7 @@ const Song gSongTable[] = {
|
||||
[SFX_14F] = { &sfx14F, MUSIC_PLAYER_15, MUSIC_PLAYER_15 },
|
||||
[SFX_150] = { &sfx150, MUSIC_PLAYER_14, MUSIC_PLAYER_14 },
|
||||
[SFX_151] = { &sfx151, MUSIC_PLAYER_13, MUSIC_PLAYER_13 },
|
||||
[SFX_152] = { &sfx152, MUSIC_PLAYER_18, MUSIC_PLAYER_18 },
|
||||
[SFX_NEAR_PORTAL] = { &sfxNearPortal, MUSIC_PLAYER_18, MUSIC_PLAYER_18 },
|
||||
[SFX_153] = { &sfx153, MUSIC_PLAYER_11, MUSIC_PLAYER_11 },
|
||||
[SFX_154] = { &sfx154, MUSIC_PLAYER_10, MUSIC_PLAYER_10 },
|
||||
[SFX_155] = { &sfx155, MUSIC_PLAYER_0F, MUSIC_PLAYER_0F },
|
||||
|
||||
+2
-4
@@ -15,12 +15,10 @@ void CreateMinishEntrance(u32 tilePos) {
|
||||
}
|
||||
|
||||
void sub_08018C58(u32 tilePos) {
|
||||
u32 i = 0;
|
||||
u32 i;
|
||||
|
||||
for (; i < 6;) {
|
||||
for (i = 0; i < 6; i += 2, tilePos += 0x40) {
|
||||
SetTileType(0x260 + i, tilePos, 1);
|
||||
SetTileType(0x261 + i, tilePos + 1, 1);
|
||||
i += 2;
|
||||
tilePos += 0x40;
|
||||
}
|
||||
}
|
||||
|
||||
+14
-22
@@ -4,22 +4,14 @@
|
||||
#include "menu.h"
|
||||
#include "area.h"
|
||||
#include "utils.h"
|
||||
|
||||
typedef struct {
|
||||
u8 filler[0xa8];
|
||||
Stats stats;
|
||||
} SaveFile;
|
||||
#include "structures.h"
|
||||
#include "save.h"
|
||||
|
||||
typedef struct {
|
||||
u8 unk;
|
||||
u8 filler[7];
|
||||
} struct_080FD5B4;
|
||||
|
||||
typedef struct {
|
||||
u8 filler[0x2e];
|
||||
u8 unk;
|
||||
} ScreenTransition;
|
||||
|
||||
extern SaveFile gSave;
|
||||
extern struct_080FD5B4 gUnk_080FD5B4[];
|
||||
extern ScreenTransition gScreenTransition;
|
||||
@@ -105,7 +97,7 @@ u32 SetBottleContents(u32 itemID, u32 bottleIndex) {
|
||||
return bottleIndex;
|
||||
}
|
||||
|
||||
u32 sub_0805449C(u32 arg0) {
|
||||
u32 ItemIsSword(u32 arg0) {
|
||||
switch (arg0) {
|
||||
case 1:
|
||||
case 2:
|
||||
@@ -118,8 +110,8 @@ u32 sub_0805449C(u32 arg0) {
|
||||
}
|
||||
}
|
||||
|
||||
u32 sub_080544B4(u32 arg0) {
|
||||
switch (arg0) {
|
||||
u32 ItemIsShield(u32 id) {
|
||||
switch (id) {
|
||||
case 13:
|
||||
case 14:
|
||||
return 1;
|
||||
@@ -128,8 +120,8 @@ u32 sub_080544B4(u32 arg0) {
|
||||
}
|
||||
}
|
||||
|
||||
u32 sub_080544C8(u32 arg0) {
|
||||
switch (arg0) {
|
||||
u32 ItemIsBottle(u32 id) {
|
||||
switch (id) {
|
||||
case 28:
|
||||
case 29:
|
||||
case 30:
|
||||
@@ -140,14 +132,14 @@ u32 sub_080544C8(u32 arg0) {
|
||||
}
|
||||
}
|
||||
|
||||
u32 GetBottleContaining(u32 arg0) {
|
||||
if (arg0 == gSave.stats.bottles[0]) {
|
||||
u32 GetBottleContaining(u32 id) {
|
||||
if (id == gSave.stats.bottles[0]) {
|
||||
return 1;
|
||||
} else if (arg0 == gSave.stats.bottles[1]) {
|
||||
} else if (id == gSave.stats.bottles[1]) {
|
||||
return 2;
|
||||
} else if (arg0 == gSave.stats.bottles[2]) {
|
||||
} else if (id == gSave.stats.bottles[2]) {
|
||||
return 3;
|
||||
} else if (arg0 == gSave.stats.bottles[3]) {
|
||||
} else if (id == gSave.stats.bottles[3]) {
|
||||
return 4;
|
||||
} else {
|
||||
return 0;
|
||||
@@ -160,7 +152,7 @@ NONMATCH("asm/non_matching/sub_08054524.inc", void sub_08054524(void)) {
|
||||
|
||||
bVar1 = gArea.locationIndex;
|
||||
if (gArea.locationIndex == 0) {
|
||||
bVar1 = gScreenTransition.unk;
|
||||
bVar1 = gScreenTransition.field_0x24[0xa];
|
||||
}
|
||||
if (bVar1 > 0x16) {
|
||||
bVar1 = 0;
|
||||
@@ -263,7 +255,7 @@ u32 CreateItemDrop(Entity* arg0, u32 itemID, u32 itemParameter) {
|
||||
} else if (arg0->id == 0x1e) {
|
||||
itemEntity->direction = arg0->animationState << 3 | 0x80;
|
||||
itemEntity->speed = 0xc0;
|
||||
itemEntity->field_0x20 = 0x18000;
|
||||
itementity->hVelocity = 0x18000;
|
||||
}
|
||||
}
|
||||
CopyPosition(arg0, itemEntity);
|
||||
|
||||
+2
-1
@@ -10,7 +10,8 @@ typedef struct {
|
||||
} VStruct;
|
||||
|
||||
typedef struct {
|
||||
u8 filler[0x420];
|
||||
u8 _0[0x20];
|
||||
struct OamData oam[0x80];
|
||||
VStruct unk[0x100];
|
||||
} UStruct;
|
||||
|
||||
|
||||
+1
-1
@@ -141,7 +141,7 @@ void sub_0805F918(u32 idx, u32 idx2, void* dest) {
|
||||
|
||||
u32 sub_0805F9A0(u32 r0) {
|
||||
|
||||
if (gUnk_02000000->gameLanguage == 0) {
|
||||
if (gSaveHeader->gameLanguage == 0) {
|
||||
u16* val = &gUnk_081092D4;
|
||||
u32 i = 0;
|
||||
|
||||
|
||||
@@ -44,7 +44,6 @@ void sub_08077E54(ItemBehavior* beh) {
|
||||
}
|
||||
|
||||
void sub_08077E78(ItemBehavior* arg0, u32 bits) {
|
||||
u8* pbVar1;
|
||||
u32 not ;
|
||||
|
||||
if (bits == 0) {
|
||||
|
||||
+5
-4
@@ -2,6 +2,7 @@
|
||||
#include "entity.h"
|
||||
#include "room.h"
|
||||
#include "object.h"
|
||||
#include "effects.h"
|
||||
|
||||
void sub_080A29C8(s32 xOff, s32 yOff, u32 layer) {
|
||||
Entity* pEVar1;
|
||||
@@ -15,15 +16,15 @@ void sub_080A29C8(s32 xOff, s32 yOff, u32 layer) {
|
||||
}
|
||||
|
||||
void sub_080A29FC(Entity* parent) {
|
||||
CreateFx(parent, 0x11, 0);
|
||||
CreateFx(parent, FX_DASH, 0);
|
||||
}
|
||||
|
||||
void sub_080A2A08(Entity* parent) {
|
||||
CreateFx(parent, 0x6, 0);
|
||||
CreateFx(parent, FX_6, 0);
|
||||
}
|
||||
|
||||
void sub_080A2A14(Entity* parent) {
|
||||
CreateFx(parent, 0xb, 0);
|
||||
CreateFx(parent, FX_WATER_SPLASH, 0);
|
||||
}
|
||||
|
||||
Entity* sub_080A2A20(Entity* parent, u32 form, u32 parameter) {
|
||||
@@ -50,7 +51,7 @@ Entity* sub_080A2A3C(Entity* parent, u32 form, u32 subtype, u32 param_4) {
|
||||
Entity* sub_080A2A64(Entity* parent) {
|
||||
Entity* pEVar1;
|
||||
|
||||
pEVar1 = CreateFx(parent, 0x20, 0);
|
||||
pEVar1 = CreateFx(parent, FX_SPARKLE2, 0);
|
||||
if (pEVar1 != NULL) {
|
||||
pEVar1->spritePriority.b0 = 7;
|
||||
}
|
||||
|
||||
+7
-6
@@ -4,6 +4,7 @@
|
||||
#include "room.h"
|
||||
#include "createObject.h"
|
||||
#include "object.h"
|
||||
#include "effects.h"
|
||||
|
||||
Entity* CreateObject(u32 subtype, u32 form, u32 parameter) {
|
||||
Entity* entity;
|
||||
@@ -36,13 +37,13 @@ Entity* CreateFx(Entity* parentEnt, u32 form, u32 parameter) {
|
||||
}
|
||||
|
||||
void CreateDust(Entity* parent) {
|
||||
CreateFx(parent, 2, 0);
|
||||
CreateFx(parent, FX_DEATH, 0);
|
||||
}
|
||||
|
||||
void CreateDustAt(s32 xOff, s32 yOff, u32 layer) {
|
||||
Entity* ent;
|
||||
|
||||
ent = CreateObject(SPECIAL_FX, 2, 0);
|
||||
ent = CreateObject(SPECIAL_FX, FX_DEATH, 0);
|
||||
if (ent != NULL) {
|
||||
ent->x.HALF.HI = gRoomControls.roomOriginX + xOff;
|
||||
ent->y.HALF.HI = gRoomControls.roomOriginY + yOff;
|
||||
@@ -51,15 +52,15 @@ void CreateDustAt(s32 xOff, s32 yOff, u32 layer) {
|
||||
}
|
||||
|
||||
void CreateDustSmall(Entity* parent) {
|
||||
CreateFx(parent, 0x11, 0);
|
||||
CreateFx(parent, FX_DASH, 0);
|
||||
}
|
||||
|
||||
void CreateExplosionBroken(Entity* parent) {
|
||||
CreateFx(parent, 0x6, 0);
|
||||
CreateFx(parent, FX_6, 0);
|
||||
}
|
||||
|
||||
void CreateWaterSplash(Entity* parent) {
|
||||
CreateFx(parent, 0xb, 0);
|
||||
CreateFx(parent, FX_WATER_SPLASH, 0);
|
||||
}
|
||||
|
||||
Entity* sub_080A2A20(Entity* parent, u32 form, u32 parameter) {
|
||||
@@ -86,7 +87,7 @@ Entity* sub_080A2A3C(Entity* parent, u32 form, u32 subtype, u32 param_4) {
|
||||
Entity* CreateWaterTrace(Entity* parent) {
|
||||
Entity* ent;
|
||||
|
||||
ent = CreateFx(parent, 0x20, 0);
|
||||
ent = CreateFx(parent, FX_RIPPLE, 0);
|
||||
if (ent != NULL) {
|
||||
ent->spritePriority.b0 = 7;
|
||||
}
|
||||
|
||||
+3
-3
@@ -27,7 +27,7 @@ void sub_0805FA04(void) {
|
||||
MessageInitialize();
|
||||
MemClear((void*)&gUnk_02032EC0, sizeof(UI));
|
||||
MemClear((void*)&gMenu, sizeof(Menu));
|
||||
gMenu.unk16 = gUnk_02000000->gameLanguage;
|
||||
gMenu.unk16 = gSaveHeader->gameLanguage;
|
||||
sub_08053320();
|
||||
sub_0801D79C(0, 0x1144);
|
||||
gMain.funcIndex = 1;
|
||||
@@ -56,8 +56,8 @@ void sub_0805FA98(void) {
|
||||
}
|
||||
break;
|
||||
case 0x100:
|
||||
gUnk_02000000->gameLanguage = gMenu.unk16;
|
||||
TextboxNoOverlapFollow(gMenu.unk14 * 0x100 + gMenu.unk15);
|
||||
gSaveHeader->gameLanguage = gMenu.unk16;
|
||||
MessageFromTarget(gMenu.unk14 * 0x100 + gMenu.unk15);
|
||||
break;
|
||||
case 0x2:
|
||||
MessageInitialize();
|
||||
|
||||
+11
-11
@@ -52,7 +52,7 @@ void sub_080318DC(Entity* this) {
|
||||
|
||||
if (this->bitfield != 0x80 && this->bitfield != 0x81) {
|
||||
if (this->type == 1) {
|
||||
if (this->action < 7 && this->field_0x42) {
|
||||
if (this->action < 7 && this->knockbackDuration != 0) {
|
||||
brother = this->attachedEntity;
|
||||
if (brother) {
|
||||
brother->parent = this->parent;
|
||||
@@ -72,7 +72,7 @@ void sub_080318DC(Entity* this) {
|
||||
|
||||
this->action = 9;
|
||||
this->spritePriority.b1 = 1;
|
||||
if (this->field_0x3e < 0x10) {
|
||||
if (this->knockbackDirection < 0x10) {
|
||||
this->spriteSettings.b.flipX = 0;
|
||||
} else {
|
||||
this->spriteSettings.b.flipX = 1;
|
||||
@@ -81,19 +81,19 @@ void sub_080318DC(Entity* this) {
|
||||
}
|
||||
|
||||
if (this->currentHealth == 0) {
|
||||
this->field_0x3e = ((this->field_0x3e + (7 & Random())) - 4) & 0x1f;
|
||||
this->field_0x42 += this->type2 * 3;
|
||||
this->knockbackDirection = ((this->knockbackDirection + (7 & Random())) - 4) & 0x1f;
|
||||
this->knockbackDuration += this->type2 * 3;
|
||||
sub_08032338(this);
|
||||
}
|
||||
}
|
||||
|
||||
if (this->field_0x42 && this->frames.all & 0x10) {
|
||||
if (this->knockbackDuration != 0 && this->frames.all & 0x10) {
|
||||
if (this->type == 0) {
|
||||
this->action = 8;
|
||||
} else {
|
||||
this->action = 9;
|
||||
}
|
||||
if (this->field_0x3e < 0x10) {
|
||||
if (this->knockbackDirection < 0x10) {
|
||||
this->spriteSettings.b.flipX = 0;
|
||||
} else {
|
||||
this->spriteSettings.b.flipX = 1;
|
||||
@@ -323,7 +323,7 @@ void sub_08031E90(Entity* this) {
|
||||
void sub_08031EA8(Entity* this) {
|
||||
this->action = 1;
|
||||
this->spritePriority.b1 = 1;
|
||||
this->field_0x20 = 0x40000;
|
||||
this->hVelocity = 0x40000;
|
||||
this->height.HALF.HI = (4 - this->type2) * 0xe;
|
||||
this->field_0x78.HALF.HI = Random();
|
||||
InitializeAnimation(this, 4);
|
||||
@@ -332,8 +332,8 @@ void sub_08031EA8(Entity* this) {
|
||||
void sub_08031EE8(Entity* this) {
|
||||
int draw;
|
||||
|
||||
this->height.WORD -= this->field_0x20;
|
||||
this->field_0x20 -= 0x1800;
|
||||
this->height.WORD -= this->hVelocity;
|
||||
this->hVelocity -= 0x1800;
|
||||
|
||||
if (this->height.HALF.HI < 1) {
|
||||
draw = this->spriteSettings.b.draw;
|
||||
@@ -347,7 +347,7 @@ void sub_08031EE8(Entity* this) {
|
||||
if (draw == 1)
|
||||
GetNextFrame(this);
|
||||
|
||||
if (this->field_0x20 < 1) {
|
||||
if (this->hVelocity < 1) {
|
||||
this->action = 2;
|
||||
this->flags |= 0x80;
|
||||
InitializeAnimation(this, 5);
|
||||
@@ -450,7 +450,7 @@ void sub_08032160(Entity* this) {
|
||||
this->spriteSettings.b.flipX = 0;
|
||||
}
|
||||
this->speed = 0xf0;
|
||||
this->field_0x20 = 0x12000;
|
||||
this->hVelocity = 0x12000;
|
||||
this->spritePriority.b1 = 1;
|
||||
InitializeAnimation(this, 12);
|
||||
}
|
||||
|
||||
+6
-6
@@ -48,7 +48,7 @@ void sub_08021780(Entity* this) {
|
||||
}
|
||||
|
||||
if (this->currentHealth == 0)
|
||||
this->field_0x42 = 0;
|
||||
this->knockbackDuration = 0;
|
||||
|
||||
sub_0804AA30(this, gUnk_080CB590);
|
||||
}
|
||||
@@ -105,7 +105,7 @@ void sub_080218CC(Entity* this) {
|
||||
this->spriteSettings.b.draw = 1;
|
||||
this->direction = ((sub_08049F84(this, 1) ^ 0x10) + gUnk_080CB5DC[Random() & 7]) & 0x1f;
|
||||
this->speed = 0x100;
|
||||
this->field_0x20 = 0x12000;
|
||||
this->hVelocity = 0x12000;
|
||||
}
|
||||
|
||||
GetNextFrame(this);
|
||||
@@ -216,7 +216,7 @@ void sub_08021AD8(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08021B64(Entity* this) {
|
||||
if (gPlayerState.flags.all & 4) {
|
||||
if (gPlayerState.flags & 4) {
|
||||
this->action = 3;
|
||||
this->height.WORD = 0;
|
||||
InitializeAnimation(this, 2);
|
||||
@@ -233,12 +233,12 @@ void sub_08021B64(Entity* this) {
|
||||
this->actionDelay = (u8)iVar4;
|
||||
}
|
||||
|
||||
if (gPlayerState.flags.all & 0x110)
|
||||
if (gPlayerState.flags & 0x110)
|
||||
iVar4 = 0;
|
||||
|
||||
if (iVar4 == 0) {
|
||||
this->action = 6;
|
||||
this->field_0x20 = 0x10000;
|
||||
this->hVelocity = 0x10000;
|
||||
((u8*)&this->field_0x86)[1] = 0;
|
||||
if (gPlayerEntity.direction != 0xff) {
|
||||
this->direction = 0x10 ^ gPlayerEntity.direction;
|
||||
@@ -299,7 +299,7 @@ u32 sub_08021D00(Entity* this) {
|
||||
} else {
|
||||
this->action = 4;
|
||||
this->actionDelay = 1;
|
||||
this->field_0x20 = 0x18000;
|
||||
this->hVelocity = 0x18000;
|
||||
InitializeAnimation(this, 4);
|
||||
ret = 1;
|
||||
}
|
||||
|
||||
+6
-6
@@ -30,8 +30,8 @@ void sub_0802C688(Entity* this) {
|
||||
case 0:
|
||||
case 1:
|
||||
if (this->field_0x82.HALF.LO) {
|
||||
this->field_0x42 = 0;
|
||||
gPlayerEntity.field_0x42 = 4;
|
||||
this->knockbackDuration = 0;
|
||||
gPlayerEntity.knockbackDuration = 4;
|
||||
}
|
||||
return;
|
||||
case 0xe:
|
||||
@@ -39,7 +39,7 @@ void sub_0802C688(Entity* this) {
|
||||
case 0x15:
|
||||
case 0x16:
|
||||
this->action = 3;
|
||||
this->field_0x42 = 0;
|
||||
this->knockbackDuration = 0;
|
||||
sub_0802CBC4(this);
|
||||
return;
|
||||
}
|
||||
@@ -54,7 +54,7 @@ void sub_0802C688(Entity* this) {
|
||||
this->action = 3;
|
||||
this->damageType = 0x6e;
|
||||
this->field_0xf = 1;
|
||||
this->field_0x20 = 0x18000;
|
||||
this->hVelocity = 0x18000;
|
||||
this->speed = 0;
|
||||
this->field_0x80.HALF.HI = 1;
|
||||
InitializeAnimation(this, this->direction >> 4 | 6);
|
||||
@@ -72,7 +72,7 @@ void sub_0802C7AC(Entity* this) {
|
||||
if (this->field_0x82.HALF.LO != 2) {
|
||||
this->speed = this->field_0x82.HALF.LO ? 0x200 : 0x80;
|
||||
}
|
||||
this->field_0x20 = 0x18000;
|
||||
this->hVelocity = 0x18000;
|
||||
this->field_0x82.HALF.HI = 0;
|
||||
this->field_0x80.HALF.HI = 0;
|
||||
} else {
|
||||
@@ -225,7 +225,7 @@ void sub_0802CA94(Entity* this) {
|
||||
this->flags &= ~0x80;
|
||||
this->field_0xf = 1;
|
||||
this->spritePriority.b1 = 1;
|
||||
this->field_0x20 = 0x18000;
|
||||
this->hVelocity = 0x18000;
|
||||
this->speed = 0;
|
||||
this->field_0x82.HALF.HI = 0;
|
||||
this->field_0x80.HALF.HI = 0;
|
||||
|
||||
@@ -381,7 +381,7 @@ void sub_0802ADDC(Entity* this) {
|
||||
void sub_0802AE24(Entity* this) {
|
||||
this->action = 1;
|
||||
this->actionDelay = 0xf0;
|
||||
this->field_0x20 = 0x8000;
|
||||
this->hVelocity = 0x8000;
|
||||
this->hitbox = (Hitbox*)&gUnk_080CD174;
|
||||
this->field_0x3c = 3;
|
||||
this->field_0x16 = 0;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "random.h"
|
||||
#include "npc.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void sub_0801D040(Entity*, u32);
|
||||
extern Entity* sub_08049DF4(u32);
|
||||
@@ -60,7 +61,7 @@ void sub_08028934(Entity* this) {
|
||||
this->actionDelay = 0x28;
|
||||
this->flags &= ~0x80;
|
||||
sub_080290E0(this, 4);
|
||||
pEVar1 = CreateFx(this, 3, 0);
|
||||
pEVar1 = CreateFx(this, FX_BUSH, 0);
|
||||
if (pEVar1 != NULL) {
|
||||
pEVar1->height.HALF.HI -= 8;
|
||||
}
|
||||
@@ -245,11 +246,11 @@ void sub_08028CE8(Entity* this) {
|
||||
struct SalesOffering* offer = (struct SalesOffering*)this->field_0x7c.WORD;
|
||||
u32 subtype;
|
||||
|
||||
if ((gTextBox.doTextBox & 0x7f) == 0 && sub_0802915C(this) && !sub_08056338()) {
|
||||
if ((gMessage.doTextBox & 0x7f) == 0 && sub_0802915C(this) && !sub_08056338()) {
|
||||
if (offer->price <= gSave.stats.rupees) {
|
||||
if (sub_080291DC(this)) {
|
||||
/* Bag full. */
|
||||
TextboxNoOverlapFollow(0x2904);
|
||||
MessageFromTarget(0x2904);
|
||||
sub_08078A90(0);
|
||||
} else {
|
||||
ModRupees(-offer->price);
|
||||
@@ -284,7 +285,7 @@ void sub_08028CE8(Entity* this) {
|
||||
}
|
||||
} else {
|
||||
/* Not enough money. */
|
||||
TextboxNoOverlapFollow(0x2903);
|
||||
MessageFromTarget(0x2903);
|
||||
sub_08078A90(0);
|
||||
}
|
||||
}
|
||||
@@ -302,7 +303,7 @@ void sub_08028DE8(Entity* this) {
|
||||
this->field_0x80.HALF.HI = 1;
|
||||
}
|
||||
} else {
|
||||
TextboxNoOverlapFollow(0x2902);
|
||||
MessageFromTarget(0x2902);
|
||||
this->action = 4;
|
||||
this->field_0x80.HALF.HI = 0;
|
||||
this->actionDelay = 1;
|
||||
@@ -314,11 +315,11 @@ void sub_08028DE8(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08028E40(Entity* this) {
|
||||
if ((gTextBox.doTextBox & 0x7f) == 0) {
|
||||
if ((gMessage.doTextBox & 0x7f) == 0) {
|
||||
struct SalesOffering* offer = (struct SalesOffering*)this->field_0x7c.WORD;
|
||||
|
||||
this->action = 4;
|
||||
this->subAction = gTextBox.doTextBox & 0x7f;
|
||||
this->subAction = gMessage.doTextBox & 0x7f;
|
||||
this->actionDelay = 1;
|
||||
if (CheckLocalFlag(offer->field_0xa) == 0) {
|
||||
SetLocalFlag(offer->field_0xa);
|
||||
@@ -382,8 +383,8 @@ void sub_08028F0C(Entity* this) {
|
||||
dialog = offer->field_0x4;
|
||||
sub_08078A90(1);
|
||||
}
|
||||
TextboxNoOverlapFollow(dialog);
|
||||
gTextBox.field_0x10 = offer->price;
|
||||
MessageFromTarget(dialog);
|
||||
gMessage.field_0x10 = offer->price;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -117,7 +117,7 @@ void sub_0801EF40(Entity* this) {
|
||||
}
|
||||
} else {
|
||||
sub_0804AA1C(this);
|
||||
this->field_0x20 = 0;
|
||||
this->hVelocity = 0;
|
||||
InitializeAnimation(this, 9);
|
||||
}
|
||||
this->field_0x80.HALF.LO = this->currentHealth;
|
||||
@@ -698,7 +698,7 @@ void sub_0801FB68(Entity* this) {
|
||||
break;
|
||||
}
|
||||
|
||||
this->field_0x20 = 0;
|
||||
this->hVelocity = 0;
|
||||
}
|
||||
|
||||
u32 sub_0801FBD0(Entity* this) {
|
||||
@@ -711,7 +711,7 @@ u32 sub_0801FBD0(Entity* this) {
|
||||
|
||||
void Chuchu_JumpAtPlayer(Entity* this) {
|
||||
this->speed = 0x180;
|
||||
this->field_0x20 = 0x20000;
|
||||
this->hVelocity = 0x20000;
|
||||
this->direction = sub_08049F84(this, 1);
|
||||
InitializeAnimation(this, 3);
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ void sub_08022988(Entity* this) {
|
||||
return;
|
||||
|
||||
this->frameIndex = 1;
|
||||
this->field_0x20 = 0x10000;
|
||||
this->hVelocity = 0x10000;
|
||||
EnqueueSFX(0xd6);
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ void sub_080229F8(Entity* this) {
|
||||
this->speed = 0xc0;
|
||||
sub_08022B44(this);
|
||||
} else {
|
||||
this->field_0x20 = 0x10000;
|
||||
this->hVelocity = 0x10000;
|
||||
EnqueueSFX(0xd6);
|
||||
}
|
||||
}
|
||||
@@ -138,7 +138,7 @@ u32 sub_08022B20(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08022B44(Entity* this) {
|
||||
this->field_0x20 = 0xc000;
|
||||
this->hVelocity = 0xc000;
|
||||
this->direction = GetFacingDirection(this, &gPlayerEntity);
|
||||
|
||||
if (this->direction & 0xf)
|
||||
|
||||
+2
-2
@@ -64,7 +64,7 @@ void sub_08020BB8(Entity* this) {
|
||||
this->action = 11;
|
||||
this->actionDelay = gUnk_080CAB0C[this->type];
|
||||
this->damageType = 81;
|
||||
sub_08021218(this, 8, DirectionToAnimationState(this->field_0x3e ^ 0x10));
|
||||
sub_08021218(this, 8, DirectionToAnimationState(this->knockbackDirection ^ 0x10));
|
||||
sub_08021588(this);
|
||||
sub_0804A9FC(this, 0x1c);
|
||||
break;
|
||||
@@ -72,7 +72,7 @@ void sub_08020BB8(Entity* this) {
|
||||
this->action = 11;
|
||||
this->actionDelay = gUnk_080CAB10[this->type];
|
||||
this->damageType = 81;
|
||||
sub_08021218(this, 8, DirectionToAnimationState(this->field_0x3e ^ 0x10));
|
||||
sub_08021218(this, 8, DirectionToAnimationState(this->knockbackDirection ^ 0x10));
|
||||
sub_08021588(this);
|
||||
sub_0804A9FC(this, 0x1c);
|
||||
break;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include "enemy.h"
|
||||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern s16 sub_080001DA(u32, u32); // ?
|
||||
extern void sub_08049CF4();
|
||||
extern u32 CheckPlayerProximity(u32, u32, u32, u32);
|
||||
void sub_080221C0();
|
||||
|
||||
typedef struct {
|
||||
@@ -37,7 +37,7 @@ void sub_08021FF4(Entity* this) {
|
||||
|
||||
void sub_08022004(Entity* this) {
|
||||
SetTile((u16)this->field_0x7c.HALF.LO, (u16)this->field_0x7c.HALF.HI, this->collisionLayer);
|
||||
CreateFx(this, 5, 0);
|
||||
CreateFx(this, FX_POT_SHATTER, 0);
|
||||
sub_08049CF4(this);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
@@ -80,7 +80,7 @@ void sub_080220F0(Entity* this) {
|
||||
this->field_0x44 = 0;
|
||||
off = gUnk_080CB76C[this->type2];
|
||||
for (i = 0; i < 6; i++, off++) {
|
||||
Entity* fx = CreateFx(this, 0x11, 0);
|
||||
Entity* fx = CreateFx(this, FX_DASH, 0);
|
||||
if (fx) {
|
||||
fx->x.HALF.HI += off->h;
|
||||
fx->y.HALF.HI += off->v;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "enemy.h"
|
||||
#include "random.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
void sub_0802C4B0(Entity*);
|
||||
void sub_0802C62C(Entity*);
|
||||
@@ -31,7 +32,7 @@ void sub_0802C254(Entity* this) {
|
||||
|
||||
void sub_0802C258(Entity* this) {
|
||||
sub_0804A720(this);
|
||||
this->field_0x20 = 0x20000;
|
||||
this->hVelocity = 0x20000;
|
||||
this->actionDelay = 2;
|
||||
this->field_0x7a.HWORD = Random() & 0x70;
|
||||
switch (this->type) {
|
||||
@@ -92,7 +93,7 @@ NONMATCH("asm/non_matching/fallingBoulder/sub_0802C334.inc", void sub_0802C334(E
|
||||
u32 diff = 0;
|
||||
s32 i;
|
||||
for (i = 1; i > -1; i--) {
|
||||
Entity* ent = CreateFx(this, 0x15, 0);
|
||||
Entity* ent = CreateFx(this, FX_ROCK2, 0);
|
||||
if (ent) {
|
||||
ent->x.HALF.HI += 12;
|
||||
ent->x.HALF.HI -= diff;
|
||||
@@ -189,7 +190,7 @@ void sub_0802C4B0(Entity* this) {
|
||||
}
|
||||
|
||||
rand = Random() & 7;
|
||||
this->field_0x20 = 0x20000;
|
||||
this->hVelocity = 0x20000;
|
||||
if (rand & 4) {
|
||||
if (rand & 3) {
|
||||
*(u32*)&this->cutsceneBeh = gUnk_080CD58C[offset | 1];
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "enemy.h"
|
||||
#include "random.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
typedef struct {
|
||||
s8 h, v;
|
||||
@@ -88,7 +89,7 @@ void sub_08045454(Entity* this) {
|
||||
off++;
|
||||
}
|
||||
|
||||
ent = CreateFx(this, 2, 0);
|
||||
ent = CreateFx(this, FX_DEATH, 0);
|
||||
if (ent)
|
||||
CopyPosition(this, ent);
|
||||
|
||||
@@ -100,7 +101,7 @@ u32 sub_0804A024(Entity*, u32, u32);
|
||||
void sub_08045524(Entity* this) {
|
||||
u32 tmp, tmp1, tmp2;
|
||||
|
||||
this->field_0x20 = 0x1c000;
|
||||
this->hVelocity = 0x1c000;
|
||||
tmp = sub_0804A024(this, 1, 8);
|
||||
if (tmp != 0xff && (Random() & 3) == 0) {
|
||||
this->actionDelay = Random() & 3;
|
||||
|
||||
+6
-6
@@ -58,7 +58,7 @@ NONMATCH("asm/non_matching/gibdo/sub_080374A4.inc", void sub_080374A4(Entity* th
|
||||
} else {
|
||||
if ((u8)(this->action - 1) < 2) {
|
||||
this->action = 1;
|
||||
x = DirectionTurnAround(this->field_0x3e);
|
||||
x = DirectionTurnAround(this->knockbackDirection);
|
||||
this->direction = x;
|
||||
this->animationState = x >> 3;
|
||||
InitAnimationForceUpdate(this, this->animationState);
|
||||
@@ -342,19 +342,19 @@ void sub_08037A58(Entity* this) {
|
||||
this->damageType = 0x26;
|
||||
this->flags2 |= 1;
|
||||
this->iframes = 0xf4;
|
||||
this->field_0x3e = (this->animationState << 3) ^ 0x10;
|
||||
this->field_0x42 = 8;
|
||||
this->knockbackDirection = DirectionFromAnimationState(this->animationState) ^ 0x10;
|
||||
this->knockbackDuration = 8;
|
||||
this->field_0x46 = 0x180;
|
||||
this->field_0x76.HALF.LO = 0x3c;
|
||||
InitAnimationForceUpdate(this, this->animationState + 0x10);
|
||||
}
|
||||
|
||||
void sub_08037ACC(Entity* this) {
|
||||
gPlayerState.flags.all &= 0xFFFFFEFF;
|
||||
gPlayerState.flags &= 0xFFFFFEFF;
|
||||
gPlayerEntity.flags |= 0x80;
|
||||
gPlayerEntity.iframes = 0x1e;
|
||||
gPlayerEntity.field_0x3e = DirectionFromAnimationState(this->animationState);
|
||||
gPlayerEntity.field_0x42 = 4;
|
||||
gPlayerEntity.knockbackDirection = DirectionFromAnimationState(this->animationState);
|
||||
gPlayerEntity.knockbackDuration = 4;
|
||||
gPlayerEntity.field_0x46 = 0x180;
|
||||
}
|
||||
// Damage player maybe?
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "fileScreen.h"
|
||||
#include "random.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
void (*const gUnk_080D1AFC[8])(Entity*);
|
||||
void (*const gUnk_080D1B1C[7])(Entity*);
|
||||
@@ -935,7 +936,7 @@ void sub_08047BF0(Entity* this) {
|
||||
sub_08047E48(this);
|
||||
if (this->actionDelay == 0) {
|
||||
if ((this->field_0xf++ & 0xF) == 0) {
|
||||
tmp = CreateFx(this, 0x51, 0);
|
||||
tmp = CreateFx(this, FX_GIANT_EXPLOSION4, 0);
|
||||
if (tmp) {
|
||||
u32 rand = Random();
|
||||
tmp->x.HALF.HI += (rand & 0x1E) + 0xFFF1;
|
||||
@@ -960,17 +961,17 @@ void sub_08047BF0(Entity* this) {
|
||||
if (this->actionDelay == 0x5A) {
|
||||
tmp = this->attachedEntity;
|
||||
tmp->spriteSettings.b.draw = 0;
|
||||
CreateFx(tmp, 0x51, 0);
|
||||
CreateFx(tmp, FX_GIANT_EXPLOSION4, 0);
|
||||
} else {
|
||||
if (this->actionDelay == 0x3C) {
|
||||
tmp = this->attachedEntity->attachedEntity;
|
||||
tmp->spriteSettings.b.draw = 0;
|
||||
CreateFx(tmp, 0x51, 0);
|
||||
CreateFx(tmp, FX_GIANT_EXPLOSION4, 0);
|
||||
} else {
|
||||
if (this->actionDelay == 0x1E) {
|
||||
tmp = this->attachedEntity->attachedEntity->attachedEntity;
|
||||
tmp->spriteSettings.b.draw = 0;
|
||||
CreateFx(tmp, 0x51, 0);
|
||||
CreateFx(tmp, FX_GIANT_EXPLOSION4, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "entity.h"
|
||||
#include "enemy.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void (*const gHangingSeedFunctions[])(Entity*);
|
||||
extern void (*const gUnk_080CB588[])(Entity*);
|
||||
@@ -15,7 +16,7 @@ void HangingSeed_OnTick(Entity* this) {
|
||||
|
||||
void sub_080216FC(Entity* this) {
|
||||
if (this->bitfield & 0x80) {
|
||||
CreateFx(this, 3, 0x80);
|
||||
CreateFx(this, FX_BUSH, 0x80);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ void sub_0802BBC4(Entity* this) {
|
||||
case 2:
|
||||
case 3:
|
||||
if (this->action == 4) {
|
||||
this->field_0x42 = 0;
|
||||
this->knockbackDuration = 0;
|
||||
sub_0802C218(this);
|
||||
}
|
||||
break;
|
||||
@@ -89,7 +89,7 @@ void sub_0802BCA8(Entity* this) {
|
||||
|
||||
this->action = 7;
|
||||
this->actionDelay = 0x5a;
|
||||
this->field_0x20 = 0x18000;
|
||||
this->hVelocity = 0x18000;
|
||||
this->damageType = 0x19;
|
||||
this->field_0x3a = this->field_0x3a & 0xfb;
|
||||
this->field_0x1c = 0x12;
|
||||
@@ -369,7 +369,7 @@ void sub_0802C1CC(Entity* this) {
|
||||
void sub_0802C218(Entity* this) {
|
||||
this->action = 6;
|
||||
this->speed = 0xe0;
|
||||
this->field_0x20 = 0x18000;
|
||||
this->hVelocity = 0x18000;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
|
||||
+3
-2
@@ -3,6 +3,7 @@
|
||||
#include "enemy.h"
|
||||
#include "random.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern Entity* gUnk_020000B0;
|
||||
|
||||
@@ -39,7 +40,7 @@ void sub_080323F4(Entity* this) {
|
||||
if (this->action != 3 && this->action != 4) {
|
||||
this->action = 3;
|
||||
this->actionDelay = 0xC;
|
||||
this->direction = DirectionTurnAround(this->field_0x3e);
|
||||
this->direction = DirectionTurnAround(this->knockbackDirection);
|
||||
InitAnimationForceUpdate(this, this->direction >> 3);
|
||||
} else if (this->bitfield == 0xCC) {
|
||||
if (this->field_0x43 == 0) {
|
||||
@@ -222,7 +223,7 @@ void sub_08032794(Entity* this) {
|
||||
Entity* target;
|
||||
s8* temp;
|
||||
|
||||
target = CreateFx(this, 0x11, 0x40);
|
||||
target = CreateFx(this, FX_DASH, 0x40);
|
||||
if (target != NULL) {
|
||||
temp = &gUnk_080CE810[this->animationState * 2];
|
||||
PositionRelative(this, target, temp[0] << 0x10, temp[1] << 0x10);
|
||||
|
||||
+9
-8
@@ -5,6 +5,7 @@
|
||||
#include "coord.h"
|
||||
#include "random.h"
|
||||
#include "player.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void (*const LakituActionFuncs[])(Entity*);
|
||||
|
||||
@@ -56,15 +57,15 @@ void Lakitu_DoAction(Entity* this) {
|
||||
|
||||
void sub_0803C784(Entity* this) {
|
||||
if ((this->bitfield & 0x7f) == 0x1d) {
|
||||
this->field_0x20 = 0x20000;
|
||||
this->hVelocity = 0x20000;
|
||||
|
||||
sub_0803CBAC(this);
|
||||
} else {
|
||||
if (this->damageType == 0x43) {
|
||||
Entity* fx = CreateFx(this, 2, 0);
|
||||
Entity* fx = CreateFx(this, FX_DEATH, 0);
|
||||
|
||||
if (fx != NULL) {
|
||||
u32 angle = (this->field_0x3e ^ 0x10) << 3;
|
||||
u32 angle = (this->knockbackDirection ^ 0x10) << 3;
|
||||
s32 sine;
|
||||
|
||||
sine = gSineTable[angle];
|
||||
@@ -352,7 +353,7 @@ void sub_0803CC08(Entity* this) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->field_0x20 >= 0) {
|
||||
if (this->hVelocity >= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -360,25 +361,25 @@ void sub_0803CC08(Entity* this) {
|
||||
return;
|
||||
}
|
||||
|
||||
fx = CreateFx(this, 2, 0);
|
||||
fx = CreateFx(this, FX_DEATH, 0);
|
||||
if (fx != NULL) {
|
||||
fx->x.HALF.HI += 6;
|
||||
fx->y.HALF.HI += 6;
|
||||
}
|
||||
|
||||
fx = CreateFx(this, 2, 0);
|
||||
fx = CreateFx(this, FX_DEATH, 0);
|
||||
if (fx != NULL) {
|
||||
fx->x.HALF.HI -= 6;
|
||||
fx->y.HALF.HI += 6;
|
||||
}
|
||||
|
||||
fx = CreateFx(this, 2, 0);
|
||||
fx = CreateFx(this, FX_DEATH, 0);
|
||||
if (fx != NULL) {
|
||||
fx->x.HALF.HI += 6;
|
||||
fx->y.HALF.HI -= 6;
|
||||
}
|
||||
|
||||
fx = CreateFx(this, 2, 0);
|
||||
fx = CreateFx(this, FX_DEATH, 0);
|
||||
if (fx != NULL) {
|
||||
fx->x.HALF.HI -= 6;
|
||||
fx->y.HALF.HI -= 6;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "entity.h"
|
||||
#include "player.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern u32 GetNextFunction(Entity*);
|
||||
|
||||
@@ -24,7 +25,7 @@ void sub_0803CCD4(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0803CCEC(Entity* this) {
|
||||
this->field_0x42 = 0;
|
||||
this->knockbackDuration = 0;
|
||||
sub_0803CCD4(this);
|
||||
}
|
||||
|
||||
@@ -126,7 +127,7 @@ void sub_0803CE14(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0803CE3C(Entity* this) {
|
||||
CreateFx(this, 2, 0);
|
||||
CreateFx(this, FX_DEATH, 0);
|
||||
|
||||
this->action = 2;
|
||||
this->actionDelay = 60;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "createObject.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern bool32 sub_080544B4(u32);
|
||||
extern bool32 ItemIsShield(u32);
|
||||
|
||||
void sub_0802810C(Entity*);
|
||||
void sub_080281A0(Entity*);
|
||||
@@ -207,9 +207,9 @@ void sub_0802805C(Entity* this) {
|
||||
NONMATCH("asm/non_matching/likeLike/sub_0802810C.inc", void sub_0802810C(Entity* this)) {
|
||||
gPlayerState.jumpStatus = 0x41;
|
||||
gPlayerState.field_0xa = 0;
|
||||
gPlayerState.flags.all &= 0xffffffef;
|
||||
gPlayerState.flags &= 0xffffffef;
|
||||
gPlayerEntity.flags |= 0x80;
|
||||
gPlayerEntity.field_0x20 = 0x18000;
|
||||
gPlayerEntity.hVelocity = 0x18000;
|
||||
gPlayerEntity.iframes = -60;
|
||||
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
|
||||
gPlayerEntity.spritePriority.b1 = this->field_0x82.HALF.HI;
|
||||
@@ -229,10 +229,10 @@ void sub_080281A0(Entity* this) {
|
||||
this->field_0xf = 0x19;
|
||||
if (sub_080281E0(0xe)) {
|
||||
this->field_0x80.HALF.LO = 0xe;
|
||||
TextboxNoOverlapFollow(0x578);
|
||||
MessageFromTarget(0x578);
|
||||
} else if (sub_080281E0(0xd)) {
|
||||
this->field_0x80.HALF.LO = 0xd;
|
||||
TextboxNoOverlapFollow(0x578);
|
||||
MessageFromTarget(0x578);
|
||||
} else {
|
||||
ModHealth(-1);
|
||||
}
|
||||
@@ -241,11 +241,11 @@ void sub_080281A0(Entity* this) {
|
||||
bool32 sub_080281E0(u32 param_1) {
|
||||
bool32 ret = FALSE;
|
||||
if (GetInventoryValue(param_1) == 1) {
|
||||
if (sub_080544B4(gSave.stats.itemOnA)) {
|
||||
if (ItemIsShield(gSave.stats.itemOnA)) {
|
||||
gSave.stats.itemOnA = 0;
|
||||
}
|
||||
|
||||
if (sub_080544B4(gSave.stats.itemOnB)) {
|
||||
if (ItemIsShield(gSave.stats.itemOnB)) {
|
||||
gSave.stats.itemOnB = 0;
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@ void sub_08028224(u32 param_1) {
|
||||
#else
|
||||
sub_080A7C18(param_1, 0, 1);
|
||||
#endif
|
||||
TextboxNoOverlapFollow(0x579);
|
||||
MessageFromTarget(0x579);
|
||||
}
|
||||
|
||||
void (*const gUnk_080CC6FC[])(Entity*) = {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "entity.h"
|
||||
#include "random.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern u8 gEntCount;
|
||||
extern Hitbox gUnk_080FD298;
|
||||
@@ -163,7 +164,7 @@ void sub_08029B2C(Entity* this) {
|
||||
if (sub_0802A14C(this)) {
|
||||
if (this->field_0x86.HALF.LO) {
|
||||
if (--this->actionDelay == 0) {
|
||||
CreateFx(this, 0x48, 0);
|
||||
CreateFx(this, FX_GIANT_EXPLOSION3, 0);
|
||||
DeleteEntity(this);
|
||||
}
|
||||
} else {
|
||||
@@ -241,7 +242,7 @@ void sub_08029C6C(Entity* this) {
|
||||
|
||||
void sub_08029C98(Entity* this) {
|
||||
if (sub_0802A14C(this)) {
|
||||
CreateFx(this, 0x48, 0);
|
||||
CreateFx(this, FX_GIANT_EXPLOSION3, 0);
|
||||
DeleteEntity(this);
|
||||
} else {
|
||||
gUnk_080CCDA8[this->action](this);
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "random.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
void sub_0803B538(Entity*);
|
||||
u32 sub_0803B4E4(Entity*);
|
||||
@@ -915,7 +916,7 @@ void sub_0803B100(Entity* this) {
|
||||
Entity* temp;
|
||||
|
||||
this->action = 0x29;
|
||||
this->field_0x20 = 0x14000;
|
||||
this->hVelocity = 0x14000;
|
||||
if (this->type == 0) {
|
||||
this->hitbox = &gUnk_080FD364;
|
||||
} else {
|
||||
@@ -962,7 +963,7 @@ void sub_0803B1B8(Entity* this) {
|
||||
this->field_0x7c.HALF.HI = 0x5dc;
|
||||
this->spriteSettings.b.draw = 0;
|
||||
this->damageType = 0x14;
|
||||
temp = CreateFx(this, 0x51, 0);
|
||||
temp = CreateFx(this, FX_GIANT_EXPLOSION4, 0);
|
||||
if (temp != (Entity*)0x0) {
|
||||
temp->x.HALF.HI += this->hitbox->offset_x;
|
||||
temp->y.HALF.HI += this->hitbox->offset_y;
|
||||
@@ -981,7 +982,7 @@ void sub_0803B1B8(Entity* this) {
|
||||
if ((temp->field_0x80.HALF.LO & 0xc) == 0xc) {
|
||||
temp->action = 0xb;
|
||||
temp->actionDelay = 0x78;
|
||||
temp->field_0x20 = 0;
|
||||
temp->hVelocity = 0;
|
||||
(*(Entity**)&temp->field_0x74)->field_0x7c.HALF_U.HI = 0x708;
|
||||
(*(Entity**)&temp->field_0x78)->field_0x7c.HALF_U.HI = 0x708;
|
||||
}
|
||||
@@ -1226,9 +1227,9 @@ void sub_0803B724(Entity* param_1) {
|
||||
void sub_0803B798(void) {
|
||||
gPlayerState.jumpStatus = 0x41;
|
||||
gPlayerState.field_0xa = 0;
|
||||
gPlayerState.flags.all &= 0xffef;
|
||||
gPlayerState.flags &= 0xffef;
|
||||
gPlayerEntity.flags |= 0x80;
|
||||
gPlayerEntity.field_0x20 = 0x18000;
|
||||
gPlayerEntity.hVelocity = 0x18000;
|
||||
gPlayerEntity.height.HALF.HI = -10;
|
||||
gPlayerEntity.direction = 0x10;
|
||||
gPlayerEntity.animationState = 4;
|
||||
@@ -1256,7 +1257,7 @@ u32 sub_0803B870(Entity* this) {
|
||||
Entity* entity;
|
||||
|
||||
entity = this->attachedEntity;
|
||||
if ((entity->bitfield & 0x80) != 0 && (gPlayerState.flags.all & 0x10) != 0) {
|
||||
if ((entity->bitfield & 0x80) != 0 && (gPlayerState.flags & 0x10) != 0) {
|
||||
this->action = 0x18;
|
||||
this->actionDelay = 0x44;
|
||||
this->spriteSettings.b.draw = 0;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "random.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void UnloadOBJPalette(Entity*);
|
||||
|
||||
@@ -78,7 +79,7 @@ void (*const gUnk_080CECB4[])(Entity*) = {
|
||||
};
|
||||
const u8 gUnk_080CECEC[] = { 0xff, 0xfe, 0xff, 0x00, 0x01, 0x02, 0x01, 0x00 };
|
||||
const s8 gUnk_080CECF4[] = { -2, 0x01, -8, -4, -0x14, 0x08, 0x0e, -0x10, -6, 0x0c, 0x12, -2, 0x00, 0x00 };
|
||||
const u8 gUnk_080CED02[] = { 0x46, 0x46, 0x47, 0x48 };
|
||||
const u8 gUnk_080CED02[] = { FX_GIANT_EXPLOSION, FX_GIANT_EXPLOSION, FX_GIANT_EXPLOSION2, FX_GIANT_EXPLOSION3 };
|
||||
const u8 gUnk_080CED06[] = { 0xff, 0x00, 0x01, 0x00, 0x00, 0x00 };
|
||||
void (*const gUnk_080CED0C[])(Entity*) = {
|
||||
sub_08034578, sub_080344E0, sub_0803451C, sub_080344E0, sub_08034558, sub_080344E0, sub_0803451C, sub_080346A0,
|
||||
@@ -815,7 +816,7 @@ void sub_08034BC8(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08034C00(Entity* this) {
|
||||
if (((gPlayerState.flags.all & 0x80) != 0) &&
|
||||
if (((gPlayerState.flags & 0x80) != 0) &&
|
||||
CheckPlayerInRegion(this->x.HALF.HI - gRoomControls.roomOriginX,
|
||||
this->y.HALF.HI - gRoomControls.roomOriginY + 0xd, 3, 3) != 0) {
|
||||
if (gScreenTransition.field_0x39 >= 0x3d) {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "script.h"
|
||||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void sub_0807B600(u32);
|
||||
|
||||
@@ -43,7 +44,7 @@ void (*const gUnk_080CEEB0[])(Entity*) = {
|
||||
sub_08034E30, sub_08034E68, sub_08034EC0, sub_08034ED8, sub_08034EE4, sub_08034F58,
|
||||
};
|
||||
|
||||
const u8 gUnk_080CEEC8[] = { 0x46, 0x46, 0x47, 0x48 };
|
||||
const u8 gUnk_080CEEC8[] = { FX_GIANT_EXPLOSION, FX_GIANT_EXPLOSION, FX_GIANT_EXPLOSION2, FX_GIANT_EXPLOSION3 };
|
||||
const u8 gUnk_080CEECC[] = { 0x58, 0x68, 0x88, 0x68, 0xb8, 0x68, 0x58, 0xa8, 0x88, 0xa8, 0xb8, 0xa8 };
|
||||
const s16 gUnk_080CEED8[] = { -0x82, -0x81, -0x80, -0x7f, -0x7e, -0x42, -0x41, -0x40, -0x3f, -0x3e, -2, -1,
|
||||
1, 2, 0x3e, 0x3f, 0x40, 0x41, 0x42, 0x7e, 0x7f, 0x80, 0x81, 0x82 };
|
||||
@@ -113,7 +114,7 @@ void sub_08034D4C(Entity* this) {
|
||||
|
||||
void sub_08034DC8(Entity* this) {
|
||||
if (gScreenTransition.field_0x39 == 0) {
|
||||
CreateFx(this, 0x51, 0);
|
||||
CreateFx(this, FX_GIANT_EXPLOSION4, 0);
|
||||
sub_0807BA8C(COORD_TO_TILE(this), this->collisionLayer);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ void sub_08045654(Entity* this) {
|
||||
|
||||
void sub_08045678(Entity* this) {
|
||||
|
||||
this->field_0x20 = 0x1c000;
|
||||
this->hVelocity = 0x1c000;
|
||||
if (this->actionDelay != 0) {
|
||||
this->actionDelay--;
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ void sub_08022BEC(Entity* this) {
|
||||
|
||||
this->field_0x7a.HALF.LO = this->currentHealth;
|
||||
this->actionDelay = 1;
|
||||
this->direction = this->field_0x3e;
|
||||
this->direction = this->knockbackDirection;
|
||||
|
||||
this->animationState = ((this->direction + 2) & 0x1c) >> 2;
|
||||
this->frameIndex = this->animationState;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "entity.h"
|
||||
#include "random.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void sub_0800449C(Entity*, u32);
|
||||
extern bool32 sub_08023A38(u32);
|
||||
@@ -83,11 +84,11 @@ void sub_080230E4(Entity* this) {
|
||||
CopyPosition(this, &gPlayerEntity);
|
||||
gPlayerEntity.flags = gPlayerEntity.flags | 0x80;
|
||||
gPlayerEntity.spriteSettings.b.draw = 1;
|
||||
gPlayerEntity.field_0x20 = 0x18000;
|
||||
gPlayerEntity.hVelocity = 0x18000;
|
||||
gPlayerEntity.direction = 0xff;
|
||||
gPlayerEntity.iframes = -0x14;
|
||||
gPlayerState.jumpStatus = 0x41;
|
||||
gPlayerState.flags.all &= 0xfff7ffff;
|
||||
gPlayerState.flags &= 0xfff7ffff;
|
||||
}
|
||||
|
||||
sub_0804AA30(this, gUnk_080CBC38);
|
||||
@@ -177,7 +178,7 @@ void sub_08023330(Entity* this) {
|
||||
this->field_0x7c.BYTES.byte3 = 0;
|
||||
sub_08023A88(this, this->animationState);
|
||||
CopyPosition(this, this->attachedEntity);
|
||||
CreateFx(this, 4, 0);
|
||||
CreateFx(this, FX_ROCK, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,7 +200,7 @@ void sub_08023398(Entity* this) {
|
||||
this->damageType = 0x85;
|
||||
this->attachedEntity->actionDelay = 1;
|
||||
sub_08023A68(this);
|
||||
CreateFx(this, 4, 0);
|
||||
CreateFx(this, FX_ROCK, 0);
|
||||
return;
|
||||
}
|
||||
this->field_0x78.HWORD = 0x28;
|
||||
@@ -265,7 +266,7 @@ void sub_0802351C(Entity* this) {
|
||||
if (this->field_0x7c.BYTES.byte3 == 0) {
|
||||
if (this->type2 == 0) {
|
||||
gPlayerEntity.animationState = this->animationState & 7;
|
||||
gPlayerState.flags.all |= 0x80000;
|
||||
gPlayerState.flags |= 0x80000;
|
||||
PositionRelative(this, &gPlayerEntity, 0, gUnk_080CBC90[this->animationState & 7] << 0x10);
|
||||
gPlayerEntity.spriteOffsetY = -gUnk_080CBC90[this->animationState & 7];
|
||||
}
|
||||
@@ -400,7 +401,7 @@ void sub_08023894(Entity* this) {
|
||||
this->parent->field_0x7c.BYTES.byte3 = 1;
|
||||
InitializeAnimation(this, this->animationState);
|
||||
if (this->parent->type2 == 0) {
|
||||
gPlayerState.flags.all |= 0x200000;
|
||||
gPlayerState.flags |= 0x200000;
|
||||
gPlayerEntity.x.HALF.HI = this->x.HALF.HI;
|
||||
gPlayerEntity.y.HALF.HI = this->y.HALF.HI;
|
||||
gPlayerEntity.direction = DirectionRoundUp(GetFacingDirection(*(Entity**)&this->field_0x74, this));
|
||||
|
||||
+3
-3
@@ -234,7 +234,7 @@ void Peahat_Stunned(Entity* this) {
|
||||
}
|
||||
|
||||
if (this->direction == 0xff)
|
||||
this->direction = this->field_0x3e;
|
||||
this->direction = this->knockbackDirection;
|
||||
|
||||
ProcessMovement(this);
|
||||
GetNextFrame(this);
|
||||
@@ -260,7 +260,7 @@ void Peahat_RepairPropeller(Entity* this) {
|
||||
return;
|
||||
|
||||
this->action = 9;
|
||||
this->field_0x20 = 0x18000;
|
||||
this->hVelocity = 0x18000;
|
||||
this->direction = Random() & 0x1f;
|
||||
sub_0804AA1C(this);
|
||||
this->animationState = PeahatAnimation_RepairPropeller;
|
||||
@@ -286,7 +286,7 @@ void Peahat_Hop(Entity* this) {
|
||||
if (--this->actionDelay == 0) {
|
||||
if (this->frames.all & 0x80) {
|
||||
this->action = 9;
|
||||
this->field_0x20 = 0x18000;
|
||||
this->hVelocity = 0x18000;
|
||||
this->animationState = PeahatAnimation_NewPropeller;
|
||||
InitializeAnimation(this, this->animationState);
|
||||
} else {
|
||||
|
||||
+3
-3
@@ -395,7 +395,7 @@ void sub_080244E8(Entity* this) {
|
||||
sub_080249DC(this);
|
||||
this->cutsceneBeh.HALF.HI = gPlayerEntity.spritePriority.b1;
|
||||
gPlayerEntity.flags &= 0x7f;
|
||||
gPlayerState.flags.all |= 0x100;
|
||||
gPlayerState.flags |= 0x100;
|
||||
gPlayerState.field_0xa |= 0x80;
|
||||
if (gPlayerState.swimState != 0) {
|
||||
gPlayerState.swimState = 0;
|
||||
@@ -809,7 +809,7 @@ NONMATCH("asm/non_matching/pesto/sub_08024E4C.inc", void sub_08024E4C(Entity* th
|
||||
Entity* player = &gPlayerEntity;
|
||||
|
||||
ResetPlayer();
|
||||
gPlayerState.flags.all |= 0x100;
|
||||
gPlayerState.flags |= 0x100;
|
||||
gPlayerState.field_0xa |= 0x80;
|
||||
gPlayerState.playerAction = 0xe;
|
||||
gPlayerState.field_0x38 = 0x14;
|
||||
@@ -832,7 +832,7 @@ END_NONMATCH
|
||||
|
||||
void sub_08024F50(Entity* this) {
|
||||
gPlayerState.field_0xa = 0;
|
||||
gPlayerState.flags.all &= 0xfffffeff;
|
||||
gPlayerState.flags &= 0xfffffeff;
|
||||
CopyPosition(this, &gPlayerEntity);
|
||||
gPlayerEntity.action = 1;
|
||||
gPlayerEntity.flags |= 0x80;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "random.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern u32 sub_080002E0(u32, u32);
|
||||
extern u32 sub_080002C8(u16, u8);
|
||||
@@ -71,11 +72,11 @@ void sub_08025020(Entity* this) {
|
||||
}
|
||||
this->action = 7;
|
||||
this->actionDelay = 0x3c;
|
||||
if (0 < this->field_0x20) {
|
||||
this->field_0x20 = 0;
|
||||
if (0 < this->hVelocity) {
|
||||
this->hVelocity = 0;
|
||||
}
|
||||
this->iframes = -0xc;
|
||||
this->field_0x42 = 0;
|
||||
this->knockbackDuration = 0;
|
||||
if (this->field_0x80.HALF.LO == 0) {
|
||||
this->animationState = (*(Entity**)&this->field_0x4c)->direction >> 3;
|
||||
InitializeAnimation(this, this->animationState + 4);
|
||||
@@ -199,7 +200,7 @@ void sub_080252E0(Entity* this) {
|
||||
this->action = 3;
|
||||
this->actionDelay = 0x1e;
|
||||
this->field_0xf = 0;
|
||||
this->field_0x20 = 0x18000;
|
||||
this->hVelocity = 0x18000;
|
||||
InitializeAnimation(this, 1);
|
||||
}
|
||||
}
|
||||
@@ -212,7 +213,7 @@ void sub_0802538C(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
} else {
|
||||
sub_08003FC4(this, 0x2000);
|
||||
if (this->field_0x20 < 0x2000) {
|
||||
if (this->hVelocity < 0x2000) {
|
||||
this->action = 4;
|
||||
InitializeAnimation(this, 2);
|
||||
}
|
||||
@@ -241,7 +242,7 @@ void sub_0802541C(Entity* this) {
|
||||
if (this->frames.all & 0x80) {
|
||||
this->action = 3;
|
||||
this->field_0xf = 1;
|
||||
this->field_0x20 = 0x20000;
|
||||
this->hVelocity = 0x20000;
|
||||
InitializeAnimation(this, 1);
|
||||
}
|
||||
}
|
||||
@@ -520,12 +521,12 @@ bool32 sub_08025AB8(u32 tile, u32 layer) {
|
||||
void sub_08025AE8(Entity* this) {
|
||||
Entity* ent;
|
||||
|
||||
ent = CreateFx(this, 0x22, 0);
|
||||
ent = CreateFx(this, FX_BROWN_SMOKE, 0);
|
||||
if (ent) {
|
||||
ent->y.WORD--;
|
||||
}
|
||||
|
||||
ent = CreateFx(this, 0x23, 0);
|
||||
ent = CreateFx(this, FX_BROWN_SMOKE_LARGE, 0);
|
||||
if (ent) {
|
||||
ent->y.WORD++;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "entity.h"
|
||||
#include "random.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void sub_0804A4E4(Entity*, Entity*);
|
||||
|
||||
@@ -40,7 +41,7 @@ void sub_08022254(Entity* this) {
|
||||
break;
|
||||
case 0x16:
|
||||
case 0x1c:
|
||||
CreateFx(this, 4, 0);
|
||||
CreateFx(this, FX_ROCK, 0);
|
||||
ent = CreateEnemy(CHUCHU, 1);
|
||||
if (ent) {
|
||||
ent->type2 = 1;
|
||||
@@ -51,7 +52,7 @@ void sub_08022254(Entity* this) {
|
||||
this->action = 2;
|
||||
this->flags &= ~0x80;
|
||||
this->spriteSettings.b.draw = 0;
|
||||
this->direction = this->field_0x3e;
|
||||
this->direction = this->knockbackDirection;
|
||||
this->attachedEntity = ent;
|
||||
}
|
||||
}
|
||||
@@ -101,8 +102,8 @@ void sub_080223E4(Entity* this) {
|
||||
ent->bitfield = 0x94;
|
||||
ent->iframes = 0x10;
|
||||
#ifndef EU
|
||||
ent->field_0x42 = 0xc;
|
||||
ent->field_0x3e = this->direction;
|
||||
ent->knockbackDuration = 0xc;
|
||||
ent->knockbackDirection = this->direction;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ void Rollobite_OnTick(Entity* this) {
|
||||
void sub_08020668(Entity* this) {
|
||||
if (this->damageType == 34 && this->currentHealth != 0xff) {
|
||||
this->action = 4;
|
||||
this->field_0x20 = 0x20000;
|
||||
this->hVelocity = 0x20000;
|
||||
this->direction = 0xff;
|
||||
this->currentHealth = 0xff;
|
||||
this->damageType = 35;
|
||||
@@ -54,11 +54,11 @@ void sub_08020668(Entity* this) {
|
||||
|
||||
void sub_080206E0(Entity* this) {
|
||||
if (Rollobite_TryToHoleUp(this)) {
|
||||
this->field_0x42 = 0;
|
||||
this->knockbackDuration = 0;
|
||||
} else if (Rollobite_IsRolledUp(this)) {
|
||||
this->field_0x42--;
|
||||
sub_080AE58C(this, this->field_0x3e, 10);
|
||||
sub_080AE7E8(this, this->field_0x46, this->field_0x3e, 10);
|
||||
this->knockbackDuration--;
|
||||
sub_080AE58C(this, this->knockbackDirection, 10);
|
||||
sub_080AE7E8(this, this->field_0x46, this->knockbackDirection, 10);
|
||||
} else {
|
||||
sub_08001324(this);
|
||||
}
|
||||
@@ -102,7 +102,7 @@ void sub_080207A8(Entity* this) {
|
||||
this->spritePriority.b0 = 4;
|
||||
this->field_0x3a &= 0xfb;
|
||||
this->direction ^= 0x10;
|
||||
this->field_0x20 = 0x18000;
|
||||
this->hVelocity = 0x18000;
|
||||
this->speed = 0x80;
|
||||
InitializeAnimation(this, this->animationState + 0x10);
|
||||
}
|
||||
@@ -262,7 +262,7 @@ bool32 Rollobite_TryToHoleUp(Entity* this) {
|
||||
this->x.HALF.HI += 8;
|
||||
this->y.HALF.HI &= 0xfff0;
|
||||
this->y.HALF.HI += 13;
|
||||
this->field_0x20 = 0x20000;
|
||||
this->hVelocity = 0x20000;
|
||||
InitializeAnimation(this, this->animationState + 0x14);
|
||||
SetTile(0x4034, tile, this->collisionLayer);
|
||||
return TRUE;
|
||||
|
||||
@@ -231,9 +231,9 @@ void sub_080296C8(Entity* this) {
|
||||
|
||||
void sub_080296D8(Entity* this) {
|
||||
gPlayerState.jumpStatus = 0x41;
|
||||
gPlayerState.flags.all &= 0xffffffef;
|
||||
gPlayerState.flags &= 0xffffffef;
|
||||
gPlayerEntity.flags |= 0x80;
|
||||
gPlayerEntity.field_0x20 = 0x18000;
|
||||
gPlayerEntity.hVelocity = 0x18000;
|
||||
gPlayerEntity.iframes = 0xa6;
|
||||
gPlayerEntity.height.HALF.HI = -2;
|
||||
gPlayerEntity.direction = gPlayerEntity.animationState << 2;
|
||||
|
||||
+2
-1
@@ -4,6 +4,7 @@
|
||||
#include "room.h"
|
||||
#include "random.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
typedef struct {
|
||||
s8 h, v;
|
||||
@@ -115,7 +116,7 @@ void sub_080450A8(Entity* this) {
|
||||
off++;
|
||||
}
|
||||
|
||||
ent = CreateFx(this, 2, 0);
|
||||
ent = CreateFx(this, FX_DEATH, 0);
|
||||
if (ent)
|
||||
CopyPosition(this, ent);
|
||||
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
#include "entity.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void (*const gUnk_080CD234[])(Entity*);
|
||||
extern void (*const gUnk_080CD24C[])(Entity*);
|
||||
@@ -23,7 +24,7 @@ void sub_0802B2E0(Entity* this) {
|
||||
this->iframes = 0;
|
||||
this->spriteSettings.b.draw = 0;
|
||||
this->action = 2;
|
||||
ent = CreateFx(this, 2, 0);
|
||||
ent = CreateFx(this, FX_DEATH, 0);
|
||||
if (ent) {
|
||||
this->attachedEntity = ent;
|
||||
this->actionDelay = 14;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "entity.h"
|
||||
#include "random.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern bool32 sub_0806FC80(Entity*, Entity*, u32);
|
||||
extern Entity* sub_08049DF4(u32);
|
||||
@@ -224,7 +225,7 @@ void sub_08028528(Entity* this) {
|
||||
|
||||
if ((this->actionDelay & 7) == 0) {
|
||||
EnqueueSFX(0xf0);
|
||||
CreateFx(this, 2, 0x40);
|
||||
CreateFx(this, FX_DEATH, 0x40);
|
||||
}
|
||||
|
||||
if (++this->field_0x7a.HALF.HI == 0x80) {
|
||||
@@ -379,11 +380,11 @@ bool32 sub_080288A4(Entity* this) {
|
||||
void sub_080288C0(Entity* this) {
|
||||
Entity* ent = this->attachedEntity;
|
||||
if (ent && (ent->bitfield & 0x80)) {
|
||||
this->field_0x3e = ent->field_0x3e;
|
||||
this->knockbackDirection = ent->knockbackDirection;
|
||||
this->iframes = -ent->iframes;
|
||||
this->field_0x46 = ent->field_0x46;
|
||||
this->field_0x42 = ent->field_0x42;
|
||||
ent->field_0x42 = 0;
|
||||
this->knockbackDuration = ent->knockbackDuration;
|
||||
ent->knockbackDuration = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,10 +49,10 @@ void sub_0802B628(Entity* this) {
|
||||
case 0x1d:
|
||||
if (this->action < 6) {
|
||||
this->action = 6;
|
||||
this->field_0x20 = 0x18000;
|
||||
this->hVelocity = 0x18000;
|
||||
this->speed = 0xc0;
|
||||
this->direction = this->field_0x3e;
|
||||
this->field_0x42 = 0;
|
||||
this->direction = this->knockbackDirection;
|
||||
this->knockbackDuration = 0;
|
||||
this->iframes = -8;
|
||||
this->damageType = 100;
|
||||
InitializeAnimation(this, 9);
|
||||
@@ -166,7 +166,7 @@ void sub_0802B8E0(Entity* this) {
|
||||
}
|
||||
} else {
|
||||
this->action = 8;
|
||||
this->field_0x20 = 0x10000;
|
||||
this->hVelocity = 0x10000;
|
||||
this->speed = 0x60;
|
||||
this->damageType = 99;
|
||||
InitializeAnimation(this, this->animationState);
|
||||
|
||||
@@ -159,7 +159,7 @@ void sub_080226EC(Entity* this) {
|
||||
|
||||
if (sub_080228F0(this)) {
|
||||
this->action = 6;
|
||||
this->field_0x20 = 0x12000;
|
||||
this->hVelocity = 0x12000;
|
||||
this->speed = 0x140;
|
||||
this->direction = GetFacingDirection(this, gUnk_020000B0);
|
||||
this->damageType = 0x5a;
|
||||
|
||||
+4
-4
@@ -39,9 +39,9 @@ void sub_0802F150(Entity* this) {
|
||||
this->field_0xf = 0;
|
||||
*(u8*)&this->field_0x7c = 0;
|
||||
if (this->height.HALF.HI != 0) {
|
||||
this->field_0x20 >>= 2;
|
||||
this->hVelocity >>= 2;
|
||||
} else {
|
||||
this->field_0x20 = 0;
|
||||
this->hVelocity = 0;
|
||||
}
|
||||
InitializeAnimation(this, 0);
|
||||
break;
|
||||
@@ -95,7 +95,7 @@ void sub_0802F284(Entity* this) {
|
||||
this->action = 2;
|
||||
this->actionDelay = 0x10;
|
||||
this->field_0xf = this->type;
|
||||
this->field_0x20 = this->field_0x82.HWORD << 4;
|
||||
this->hVelocity = this->field_0x82.HWORD << 4;
|
||||
sub_0802F45C(this);
|
||||
InitializeAnimation(this, 2);
|
||||
}
|
||||
@@ -166,7 +166,7 @@ void sub_0802F3F4(Entity* this) {
|
||||
this->action = 2;
|
||||
this->actionDelay = 0x10;
|
||||
this->field_0xf = this->type;
|
||||
this->field_0x20 = this->field_0x82.HWORD << 4;
|
||||
this->hVelocity = this->field_0x82.HWORD << 4;
|
||||
(*(u8*)&this->field_0x7c.HALF.LO)++;
|
||||
sub_0802F45C(this);
|
||||
InitializeAnimation(this, 2);
|
||||
|
||||
@@ -33,9 +33,9 @@ void sub_08037F00(Entity* this) {
|
||||
this->field_0xf = 0;
|
||||
this->field_0x80.HALF.LO = 0;
|
||||
if (this->height.HALF.HI != 0) {
|
||||
this->field_0x20 >>= 2;
|
||||
this->hVelocity >>= 2;
|
||||
} else {
|
||||
this->field_0x20 = 0;
|
||||
this->hVelocity = 0;
|
||||
}
|
||||
|
||||
InitializeAnimation(this, 0);
|
||||
@@ -86,7 +86,7 @@ void sub_08037Fe0(Entity* this) {
|
||||
this->action = 2;
|
||||
this->actionDelay = 6;
|
||||
this->field_0xf = 0;
|
||||
this->field_0x20 = 0x38000;
|
||||
this->hVelocity = 0x38000;
|
||||
sub_08038168(this);
|
||||
InitializeAnimation(this, 2);
|
||||
}
|
||||
@@ -142,7 +142,7 @@ void sub_08038110(Entity* this) {
|
||||
if (this->field_0x80.HALF.LO < 5) {
|
||||
this->action = 2;
|
||||
this->actionDelay = 8;
|
||||
this->field_0x20 = 0x38000;
|
||||
this->hVelocity = 0x38000;
|
||||
sub_08038168(this);
|
||||
InitializeAnimation(this, 2);
|
||||
} else {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "random.h"
|
||||
#include "utils.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void DoExitTransition(ScreenTransitionData*);
|
||||
|
||||
@@ -951,7 +952,7 @@ NONMATCH("asm/non_matching/vaati/sub_08043490.inc", void sub_08043490(Entity* th
|
||||
|
||||
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[4];
|
||||
if (entity->height.HALF.HI < -4) {
|
||||
entity->field_0x20 = 0x18000;
|
||||
entity->hVelocity = 0x18000;
|
||||
this->subAction = 2;
|
||||
this->field_0x7c.BYTES.byte2 = 0;
|
||||
((VaatiArm_HeapStruct*)this->myHeap)->parent->subAction = 2;
|
||||
@@ -978,7 +979,7 @@ void sub_08043520(Entity* this) {
|
||||
|
||||
entity = ((VaatiArm_HeapStruct*)this->myHeap)->entities[4];
|
||||
sub_08003FC4(entity, 0x1a00);
|
||||
if ((entity->field_0x20 < 0) && (-6 < entity->height.HALF.HI)) {
|
||||
if ((entity->hVelocity < 0) && (-6 < entity->height.HALF.HI)) {
|
||||
entity->height.HALF.HI = -6;
|
||||
this->subAction = 3;
|
||||
this->field_0x7a.HWORD = 900;
|
||||
@@ -1064,7 +1065,7 @@ static inline void deleteThing(Entity* this, const u32 index) {
|
||||
if (index == 1) {
|
||||
this->spriteSettings.b.draw = 0;
|
||||
}
|
||||
CreateFx(((VaatiArm_HeapStruct*)this->myHeap)->entities[index], 0x51, 0);
|
||||
CreateFx(((VaatiArm_HeapStruct*)this->myHeap)->entities[index], FX_GIANT_EXPLOSION4, 0);
|
||||
((VaatiArm_HeapStruct*)this->myHeap)->entities[index]->myHeap = NULL;
|
||||
DeleteEntity(((VaatiArm_HeapStruct*)this->myHeap)->entities[index]);
|
||||
}
|
||||
@@ -1331,7 +1332,7 @@ void sub_08043D08(Entity* this) {
|
||||
entity->spriteSettings.b.draw = 0;
|
||||
InitializeAnimation(entity, 0x13);
|
||||
sub_0804AA1C(entity);
|
||||
fx = CreateFx(entity, 0x51, 0);
|
||||
fx = CreateFx(entity, FX_GIANT_EXPLOSION4, 0);
|
||||
if (fx != NULL) {
|
||||
fx->x.HALF.HI += gUnk_080D13E9[this->type2];
|
||||
fx->y.HALF.HI -= 6;
|
||||
@@ -1351,7 +1352,7 @@ void sub_08043DB0(Entity* this) {
|
||||
Entity* pEVar3;
|
||||
Entity* pEVar4;
|
||||
|
||||
if (((gPlayerState.flags.all & 0x80) != 0)) {
|
||||
if (((gPlayerState.flags & 0x80) != 0)) {
|
||||
pEVar3 = ((VaatiArm_HeapStruct*)this->myHeap)->entities[3];
|
||||
if (CheckPlayerInRegion(pEVar3->x.HALF.HI - gRoomControls.roomOriginX,
|
||||
pEVar3->y.HALF.HI - gRoomControls.roomOriginY + 2, 3, 3)) {
|
||||
|
||||
@@ -74,7 +74,7 @@ void VaatiProjectileFunction1(Entity* this) {
|
||||
entity->flags = entity->flags & 0x7f;
|
||||
}
|
||||
} else {
|
||||
gPlayerState.flags.all &= 0xfffffeff; // using b.unk8 does not match
|
||||
gPlayerState.flags &= 0xfffffeff; // using b.unk8 does not match
|
||||
entity = &gPlayerEntity;
|
||||
entity->flags = gPlayerEntity.flags | 0x80;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "audio.h"
|
||||
#include "area.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void sub_080AEFB4(Entity*);
|
||||
extern u8 gEntCount;
|
||||
@@ -477,7 +478,7 @@ void VaatiRebornEnemyType0Action7(Entity* this) {
|
||||
SetRoomFlag(1);
|
||||
} else {
|
||||
if ((this->actionDelay & 7) == 0) {
|
||||
fx = CreateFx(this, 2, 0);
|
||||
fx = CreateFx(this, FX_DEATH, 0);
|
||||
if (fx != NULL) {
|
||||
tmp = Random() & 0x3f3f;
|
||||
fx->x.HALF.HI = ((tmp & 0xff) - 0x20) + fx->x.HALF.HI;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "flags.h"
|
||||
#include "audio.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
void sub_080409B0(Entity*);
|
||||
void sub_080408EC(Entity*);
|
||||
@@ -312,7 +313,7 @@ void VaatiTransfiguredType0Action3(Entity* this) {
|
||||
if (this->actionDelay != 0) {
|
||||
if (--this->actionDelay == 0) {
|
||||
this->flags &= 0x7f;
|
||||
this->field_0x20 = 0x38000;
|
||||
this->hVelocity = 0x38000;
|
||||
this->field_0xf = 0x10;
|
||||
}
|
||||
break;
|
||||
@@ -378,7 +379,7 @@ void VaatiTransfiguredType0Action4(Entity* this) {
|
||||
this->field_0x74.HALF.LO = 0;
|
||||
this->actionDelay = 0x80;
|
||||
this->field_0xf = 0;
|
||||
this->field_0x20 = 0x24000;
|
||||
this->hVelocity = 0x24000;
|
||||
SoundReq(SFX_12B);
|
||||
}
|
||||
break;
|
||||
@@ -567,7 +568,7 @@ void VaatiTransfiguredType0Action7(Entity* this) {
|
||||
}
|
||||
this->field_0xf = (this->field_0xf + 1) & 7;
|
||||
if (this->field_0xf == 0) {
|
||||
pEVar3 = CreateFx(this, 0x55, 0);
|
||||
pEVar3 = CreateFx(this, FX_AURA_BASE, 0);
|
||||
if (pEVar3 != NULL) {
|
||||
uVar4 = Random() & 0x3f3f;
|
||||
pEVar3->x.HALF.HI += (uVar4 & 0xff) - 0x20;
|
||||
@@ -1060,7 +1061,7 @@ void sub_080409B0(Entity* this) {
|
||||
this->field_0x80.HALF.HI = 3;
|
||||
this->flags &= 0x7f;
|
||||
this->damageType = 0x36;
|
||||
this->field_0x20 = 0x18000;
|
||||
this->hVelocity = 0x18000;
|
||||
SoundReq(SFX_164);
|
||||
}
|
||||
}
|
||||
@@ -1068,7 +1069,7 @@ void sub_080409B0(Entity* this) {
|
||||
}
|
||||
|
||||
if (this->field_0x80.HALF.HI < 3) {
|
||||
if (this->field_0x42 != 0) {
|
||||
if (this->knockbackDuration != 0) {
|
||||
sub_080AF18C(this);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -93,8 +93,8 @@ void VaatiTransfiguredEyeFunction0Action0(Entity* this) {
|
||||
Entity* child;
|
||||
u8 bVar2;
|
||||
|
||||
bVar2 = gTextBox.doTextBox & 0x7f;
|
||||
if ((gTextBox.doTextBox & 0x7f) == 0) {
|
||||
bVar2 = gMessage.doTextBox & 0x7f;
|
||||
if ((gMessage.doTextBox & 0x7f) == 0) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.b.draw = 0;
|
||||
this->field_0x80.HALF.LO = bVar2;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
#include "save.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern u8 gEntCount;
|
||||
|
||||
@@ -455,7 +456,7 @@ void VaatiWrathType0ActionA(Entity* this) {
|
||||
this->subAction = 0;
|
||||
this->direction = 0;
|
||||
this->speed = 0x100;
|
||||
this->field_0x20 = 0x12000;
|
||||
this->hVelocity = 0x12000;
|
||||
sub_0801D2B4(this, 0x16b);
|
||||
InitAnimationForceUpdate(this, 5);
|
||||
type1 = ((VaatiWrathHeapStruct*)this->myHeap)->type1;
|
||||
@@ -625,7 +626,7 @@ void sub_08041CD0(Entity* this) {
|
||||
} else {
|
||||
this->subAction = 2;
|
||||
this->actionDelay = 0x3c;
|
||||
TextboxNoOverlapFollow(0x1651);
|
||||
MessageFromTarget(0x1651);
|
||||
}
|
||||
} else {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
@@ -636,7 +637,7 @@ void sub_08041D14(Entity* this) {
|
||||
Entity* pEVar1;
|
||||
|
||||
GetNextFrame(((VaatiWrathHeapStruct*)this->myHeap)->type2);
|
||||
if ((gTextBox.doTextBox & 0x7f) == 0) {
|
||||
if ((gMessage.doTextBox & 0x7f) == 0) {
|
||||
if (this->actionDelay != 0) {
|
||||
this->actionDelay--;
|
||||
} else {
|
||||
@@ -708,7 +709,7 @@ void sub_08041E78(Entity* this) {
|
||||
const s8* temp;
|
||||
|
||||
if ((this->field_0xf & 0xf) == 0) {
|
||||
fx = CreateFx(this, 0x51, 0);
|
||||
fx = CreateFx(this, FX_GIANT_EXPLOSION4, 0);
|
||||
if (fx != NULL) {
|
||||
temp = &gUnk_080D0E90[this->field_0xf >> 3 & 0xe];
|
||||
fx->x.HALF.HI += *temp++;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "audio.h"
|
||||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
void sub_080485D8(Entity*);
|
||||
void sub_080485FC(Entity*);
|
||||
@@ -158,7 +159,7 @@ void VaatiWrathEyeAction7(Entity* this) {
|
||||
this->actionDelay = 0x3c;
|
||||
this->flags &= 0x7f;
|
||||
this->spriteSettings.b.draw = 0;
|
||||
CreateFx(this, 0x1f, 0x40);
|
||||
CreateFx(this, FX_REFLECT2, 0x40);
|
||||
this->parent->field_0x7a.HALF.HI |= 0x10 << this->type;
|
||||
} else {
|
||||
if (--this->actionDelay != 0) {
|
||||
|
||||
@@ -37,9 +37,9 @@ void sub_0802A454(Entity* this) {
|
||||
}
|
||||
}
|
||||
|
||||
if (this->field_0x42)
|
||||
if (this->field_0x42 > 4)
|
||||
this->field_0x42 -= 4;
|
||||
if (this->knockbackDuration != 0)
|
||||
if (this->knockbackDuration > 4)
|
||||
this->knockbackDuration -= 4;
|
||||
|
||||
if (this->field_0x43 != 0) {
|
||||
sub_0804A9FC(this, 0x1c);
|
||||
|
||||
@@ -118,7 +118,7 @@ void sub_0802CE68(Entity* this) {
|
||||
|
||||
gPlayerState.field_0xa |= 0x80;
|
||||
gPlayerState.field_0x1a[0] |= 0x80;
|
||||
gPlayerState.flags.all |= 0x100;
|
||||
gPlayerState.flags |= 0x100;
|
||||
if (!sub_0806FCB8(this, gPlayerEntity.x.HALF.HI, gPlayerEntity.y.HALF.HI, 4)) {
|
||||
this->direction = GetFacingDirection(this, &gPlayerEntity);
|
||||
sub_0806F69C(this);
|
||||
|
||||
@@ -22,7 +22,7 @@ void sub_0802A250(Entity* this) {
|
||||
|
||||
this->action = 1;
|
||||
this->actionDelay = 0;
|
||||
this->field_0x20 = -0x30000;
|
||||
this->hVelocity = -0x30000;
|
||||
this->speed = gUnk_080CD03C[Random() & 3];
|
||||
this->direction = gUnk_080CD040[Random() & 3] + 0x18;
|
||||
this->collisionLayer = 2;
|
||||
|
||||
+3
-2
@@ -6,6 +6,7 @@
|
||||
#include "random.h"
|
||||
#include "createObject.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void (*const gUnk_080CEB74[])(Entity*);
|
||||
extern void (*const gUnk_080CEB8C[])(Entity*);
|
||||
@@ -36,7 +37,7 @@ void sub_08033564(Entity* this) {
|
||||
this->spriteSettings.b.draw = FALSE;
|
||||
this->flags &= 0x7f;
|
||||
this->field_0x7c.HALF.LO = 0x27c;
|
||||
gPlayerState.flags.all |= 0x4000;
|
||||
gPlayerState.flags |= 0x4000;
|
||||
gSave.stats.effect = this->type + 1;
|
||||
gSave.stats.effectTimer = 600;
|
||||
if (this->type == 0) {
|
||||
@@ -52,7 +53,7 @@ void sub_08033564(Entity* this) {
|
||||
this->flags &= 0x7f;
|
||||
this->iframes = 0;
|
||||
this->spriteSettings.b.draw = FALSE;
|
||||
ent = CreateFx(this, 2, 0);
|
||||
ent = CreateFx(this, FX_DEATH, 0);
|
||||
if (ent != NULL) {
|
||||
this->attachedEntity = ent;
|
||||
this->actionDelay = 0xe;
|
||||
|
||||
+1
-1
@@ -102,7 +102,7 @@ void DeleteEntity(Entity* ent) {
|
||||
ent->spriteSettings.b.draw = 0;
|
||||
ent->field_0x3c = 0;
|
||||
ent->bitfield = 0;
|
||||
ent->field_0x42 = 0;
|
||||
ent->knockbackDuration = 0;
|
||||
ent->currentHealth = 0;
|
||||
UnlinkEntity(ent);
|
||||
ent->next = NULL;
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ void sub_0801CF18(Element* arg0) {
|
||||
|
||||
void sub_0801CF60(Element* arg0) {
|
||||
|
||||
if ((gUnk_0200AF00.ezloNagFuncIndex >= 5) || (gTextBox.doTextBox & 0x7f)) {
|
||||
if ((gUnk_0200AF00.ezloNagFuncIndex >= 5) || (gMessage.doTextBox & 0x7f)) {
|
||||
arg0->unk4 = 0;
|
||||
arg0->unk0 &= -3;
|
||||
return;
|
||||
|
||||
+21
-21
@@ -113,7 +113,7 @@ void CreateDialogBox(u32 arg0, u32 arg1) {
|
||||
}
|
||||
|
||||
void sub_08050384(void) {
|
||||
sub_0801C4A0(0, 0);
|
||||
RecoverUI(0, 0);
|
||||
MemClear(&gBG0Buffer, sizeof(gBG0Buffer));
|
||||
gScreen.bg.bg0Updated = 1;
|
||||
}
|
||||
@@ -144,14 +144,14 @@ void LoadOptionsFromSave(u32 idx) {
|
||||
brightnessPref = saveFile->brightnessPref;
|
||||
}
|
||||
|
||||
gUnk_02000000->messageSpeed = messageSpeed;
|
||||
gUnk_02000000->brightnessPref = brightnessPref;
|
||||
gSaveHeader->messageSpeed = messageSpeed;
|
||||
gSaveHeader->brightnessPref = brightnessPref;
|
||||
gUsedPalettes = 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
void SetActiveSave(u32 idx) {
|
||||
if (idx < NUM_SAVE_SLOTS) {
|
||||
gUnk_02000000->saveFileId = idx;
|
||||
gSaveHeader->saveFileId = idx;
|
||||
MemCopy(&gUnk_02019EE0.saves[idx], &gSave, sizeof(gUnk_02019EE0.saves[idx]));
|
||||
}
|
||||
LoadOptionsFromSave(idx);
|
||||
@@ -181,8 +181,8 @@ void HandleChooseFileScreen(void) {
|
||||
sub_0801C208();
|
||||
sub_080AD9B0();
|
||||
sub_080AD918();
|
||||
if (gUnk_02019EE0.unk3 != gUnk_02000000->gameLanguage) {
|
||||
gUnk_02019EE0.unk3 = gUnk_02000000->gameLanguage;
|
||||
if (gUnk_02019EE0.unk3 != gSaveHeader->gameLanguage) {
|
||||
gUnk_02019EE0.unk3 = gSaveHeader->gameLanguage;
|
||||
sub_080503A8(0x6);
|
||||
sub_080503A8(0xF);
|
||||
}
|
||||
@@ -202,7 +202,7 @@ static void HandleFileScreenEnter(void) {
|
||||
MemClear(&gUnk_0200AF00, sizeof(gUnk_0200AF00));
|
||||
MemClear(&gUnk_02019EE0, sizeof(gUnk_02019EE0));
|
||||
gUnk_02019EE0.unk3 = 7;
|
||||
gUnk_02019EE0.unk6 = gUnk_02000000->gameLanguage > LANGUAGE_EN ? 3 : 0;
|
||||
gUnk_02019EE0.unk6 = gSaveHeader->gameLanguage > LANGUAGE_EN ? 3 : 0;
|
||||
MemClear(&gUnk_02032EC0, sizeof(gUnk_02032EC0));
|
||||
gUnk_02032EC0.lastState = 8;
|
||||
SetFileSelectState(STATE_NONE);
|
||||
@@ -297,7 +297,7 @@ void sub_0805070C(void) {
|
||||
var0->bgColor = 5;
|
||||
var0->unk1 = 1;
|
||||
var0->unk4 = 0x30;
|
||||
var0->unk8 = gUnk_02000D00;
|
||||
var0->unk8 = gTextGfxBuffer;
|
||||
for (i = 0; i < NUM_SAVE_SLOTS; i++) {
|
||||
var0->unk6 = 0;
|
||||
MemClear(var0->unk8, 0x200);
|
||||
@@ -323,7 +323,7 @@ void sub_08050790(void) {
|
||||
var0->bgColor = 5;
|
||||
var0->unk1 = 1;
|
||||
var0->unk4 = 0x80;
|
||||
var0->unk8 = gUnk_02000D00;
|
||||
var0->unk8 = gTextGfxBuffer;
|
||||
for (i = 0; i < 16; i++) {
|
||||
var0->unk6 = 0;
|
||||
var1 = i * 16;
|
||||
@@ -331,7 +331,7 @@ void sub_08050790(void) {
|
||||
sub_0805F7DC(var1, var0);
|
||||
var1++;
|
||||
}
|
||||
MemCopy(gUnk_02000D00, (void*)(BG_VRAM + i * 0x400), 0x400);
|
||||
MemCopy(gTextGfxBuffer, (void*)(BG_VRAM + i * 0x400), 0x400);
|
||||
}
|
||||
sub_0805F300(var0);
|
||||
}
|
||||
@@ -420,7 +420,7 @@ void sub_08050940(void) {
|
||||
keys &= ~(DPAD_UP | DPAD_DOWN);
|
||||
}
|
||||
|
||||
num_rows = gUnk_02000000->gameLanguage > 1 ? NUM_SAVE_SLOTS + 1 : NUM_SAVE_SLOTS;
|
||||
num_rows = gSaveHeader->gameLanguage > 1 ? NUM_SAVE_SLOTS + 1 : NUM_SAVE_SLOTS;
|
||||
mode = gUnk_02032EC0.lastState;
|
||||
switch (keys) {
|
||||
case DPAD_UP:
|
||||
@@ -679,7 +679,7 @@ void HandleFileLanguageSelect(void) {
|
||||
void sub_08050DB8(void) {
|
||||
MemClear(&gBG2Buffer, sizeof(gBG2Buffer));
|
||||
sub_080503A8(0xc);
|
||||
gMenu.field_0x4 = gUnk_02000000->gameLanguage;
|
||||
gMenu.field_0x4 = gSaveHeader->gameLanguage;
|
||||
sub_080A7114(1);
|
||||
}
|
||||
|
||||
@@ -689,7 +689,7 @@ void sub_08050DE4(void) {
|
||||
if (gUnk_02019EE0.isTransitioning)
|
||||
return;
|
||||
|
||||
row_idx = gUnk_02000000->gameLanguage;
|
||||
row_idx = gSaveHeader->gameLanguage;
|
||||
switch (gInput.newKeys) {
|
||||
case DPAD_UP:
|
||||
row_idx--;
|
||||
@@ -709,7 +709,7 @@ void sub_08050DE4(void) {
|
||||
break;
|
||||
case B_BUTTON:
|
||||
row_idx = gMenu.field_0x4;
|
||||
gUnk_02000000->gameLanguage = gMenu.field_0x4;
|
||||
gSaveHeader->gameLanguage = gMenu.field_0x4;
|
||||
SoundReq(SFX_MENU_CANCEL);
|
||||
SetFileSelectState(STATE_NONE);
|
||||
break;
|
||||
@@ -722,8 +722,8 @@ void sub_08050DE4(void) {
|
||||
if (row_idx > 6) {
|
||||
row_idx = 6;
|
||||
}
|
||||
if (gUnk_02000000->gameLanguage != row_idx) {
|
||||
gUnk_02000000->gameLanguage = row_idx;
|
||||
if (gSaveHeader->gameLanguage != row_idx) {
|
||||
gSaveHeader->gameLanguage = row_idx;
|
||||
SoundReq(SFX_TEXTBOX_CHOICE);
|
||||
}
|
||||
}
|
||||
@@ -869,7 +869,7 @@ NONMATCH("asm/non_matching/fileScreen/sub_080610B8.inc", void sub_080610B8(void)
|
||||
END_NONMATCH
|
||||
|
||||
void sub_08051358(void) {
|
||||
gMenu.field_0x12 = gUnk_02000000->gameLanguage == 0 ? 4 : 3;
|
||||
gMenu.field_0x12 = gSaveHeader->gameLanguage == 0 ? 4 : 3;
|
||||
|
||||
if (gMenu.focusCoords[0] != 0x0b || gMenu.focusCoords[1] != 0x5) {
|
||||
gMenu.focusCoords[1] = 0x5;
|
||||
@@ -958,7 +958,7 @@ u32 sub_080514BC(u32 a1) {
|
||||
u32 c;
|
||||
u32 idx;
|
||||
|
||||
if (gUnk_02000000->gameLanguage != 0)
|
||||
if (gSaveHeader->gameLanguage != 0)
|
||||
return 1;
|
||||
|
||||
switch (a1) {
|
||||
@@ -1169,7 +1169,7 @@ void sub_080517EC(void) {
|
||||
|
||||
void sub_08051874(void) {
|
||||
s32 temp;
|
||||
gUnk_02000000->saveFileId = gUnk_02019EE0.unk7;
|
||||
gSaveHeader->saveFileId = gUnk_02019EE0.unk7;
|
||||
temp = HandleSave(0);
|
||||
gUnk_02019EE0.saveStatus[gUnk_02019EE0.unk7] = temp;
|
||||
switch (temp) {
|
||||
@@ -1202,8 +1202,8 @@ void sub_080518E4(void) {
|
||||
void HandleFileStart(void) {
|
||||
if (gMenu.menuType == 0) {
|
||||
gMenu.menuType = 1;
|
||||
gUnk_02000000->messageSpeed = gSave.messageSpeed;
|
||||
gUnk_02000000->brightnessPref = gSave.brightnessPref;
|
||||
gSaveHeader->messageSpeed = gSave.messageSpeed;
|
||||
gSaveHeader->brightnessPref = gSave.brightnessPref;
|
||||
gMain.funcIndex = 2;
|
||||
DoFade(5, 8);
|
||||
}
|
||||
|
||||
+1236
File diff suppressed because it is too large
Load Diff
+3
-3
@@ -13,13 +13,13 @@ u32 CheckLocalFlag(u32 flag) {
|
||||
}
|
||||
|
||||
u32 CheckFlags(u32 flags) {
|
||||
s32 uVar1;
|
||||
s32 type;
|
||||
s32 index;
|
||||
s32 length;
|
||||
index = flags & 0x3ff;
|
||||
length = (((flags & (0xf0) << 0x6) >> 0xa) + 1);
|
||||
uVar1 = (flags & 0xc000) >> 0xe;
|
||||
switch ((u32)uVar1) {
|
||||
type = (flags & 0xc000) >> 0xe;
|
||||
switch ((u32)type) {
|
||||
case 2:
|
||||
return CheckRoomFlags(index, length);
|
||||
case 0:
|
||||
|
||||
+4
-4
@@ -67,7 +67,7 @@ void sub_0805212C(void) {
|
||||
#else
|
||||
sub_08052418(0, 0);
|
||||
gScreen.lcd.displayControl |= 0x600;
|
||||
gFadeControl.field_0x4 = 0xffff;
|
||||
gFadeControl.mask = 0x0000ffff;
|
||||
DoFade(4, 0x10);
|
||||
#endif
|
||||
}
|
||||
@@ -97,7 +97,7 @@ void sub_080521A0(void) {
|
||||
gMenu.field_0x3 = 0;
|
||||
sub_080A7114(1);
|
||||
sub_08052418(0, 0);
|
||||
gFadeControl.field_0x4 = 0xffffffff;
|
||||
gFadeControl.mask = 0xffffffff;
|
||||
break;
|
||||
case 1:
|
||||
if (gMenu.transitionTimer == 0) {
|
||||
@@ -245,7 +245,7 @@ NONMATCH("asm/non_matching/game/sub_08052418.inc", void sub_08052418(int param_1
|
||||
gUnk_020227E8._0[param_2 * 2].BYTES.byte1 = 1;
|
||||
MemCopy(&gUnk_080FCA8C, &temp, sizeof(temp));
|
||||
i = param_1 * 0xc;
|
||||
// temp._0 = gBG1Buffer[gUnk_080FCAA4._8[param_1]][gUnk_080FCAA4._0[gUnk_02000000->gameLanguage + i]] * 2;
|
||||
// temp._0 = gBG1Buffer[gUnk_080FCAA4._8[param_1]][gUnk_080FCAA4._0[gSaveHeader->gameLanguage + i]] * 2;
|
||||
temp._13 = ((temp._13 & 0xfe) | gUnk_080FCAA4._8[i + 1]) & 1;
|
||||
sub_0805F46C(gUnk_080FCAA4._a[param_1], &temp);
|
||||
gScreen.bg.bg1xOffset = 1;
|
||||
@@ -265,7 +265,7 @@ void InitializePlayer(void) {
|
||||
gRoomControls.cameraTarget = pl;
|
||||
gPlayerState.playerAction = gUnk_080FCAC8[gScreenTransition.field_0xf];
|
||||
if (!CheckGlobalFlag(EZERO_1ST)) {
|
||||
gPlayerState.flags.all |= 8;
|
||||
gPlayerState.flags |= 8;
|
||||
}
|
||||
switch (gScreenTransition.field_0xf) {
|
||||
case 0x2:
|
||||
|
||||
+8
-8
@@ -94,7 +94,7 @@ static void HandleNintendoCapcomLogos(void) {
|
||||
gIntroState.timer = 120;
|
||||
LoadGfxGroup(16);
|
||||
LoadGfxGroup(1);
|
||||
if (gUnk_02000000->gameLanguage == 0) {
|
||||
if (gSaveHeader->gameLanguage == 0) {
|
||||
paletteGroup = 1;
|
||||
} else {
|
||||
paletteGroup = 2;
|
||||
@@ -148,13 +148,13 @@ static void HandleTitlescreen(void) {
|
||||
sub_080ADD30();
|
||||
gUnk_02024490.unk0 = 1;
|
||||
LoadGfxGroup(2);
|
||||
if (gUnk_02000000->gameLanguage == 0) {
|
||||
if (gSaveHeader->gameLanguage == 0) {
|
||||
paletteGroup = 3;
|
||||
} else {
|
||||
paletteGroup = 4;
|
||||
}
|
||||
LoadPaletteGroup(paletteGroup);
|
||||
if (gUnk_02000000->gameLanguage == 0) {
|
||||
if (gSaveHeader->gameLanguage == 0) {
|
||||
// Blend first and second layer
|
||||
gScreen.controls.layerFXControl = BLDCNT_TGT1_BG2 | BLDCNT_TGT2_BG3 | BLDCNT_EFFECT_BLEND;
|
||||
gScreen.controls.alphaBlend = BLDALPHA_BLEND(9, 9);
|
||||
@@ -183,7 +183,7 @@ static void HandleTitlescreen(void) {
|
||||
if (gFadeControl.active) {
|
||||
return;
|
||||
}
|
||||
if (gUnk_02000000->gameLanguage == 0) {
|
||||
if (gSaveHeader->gameLanguage == 0) {
|
||||
HandleJapaneseTitlescreenAnimationIntro();
|
||||
} else {
|
||||
HandleTitlescreenAnimationIntro();
|
||||
@@ -240,8 +240,8 @@ static void HandleTitlescreen(void) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if (gIntroState.gameLanguage != gUnk_02000000->gameLanguage) {
|
||||
gIntroState.gameLanguage = gUnk_02000000->gameLanguage;
|
||||
if (gIntroState.gameLanguage != gSaveHeader->gameLanguage) {
|
||||
gIntroState.gameLanguage = gSaveHeader->gameLanguage;
|
||||
LoadGfxGroup(3);
|
||||
}
|
||||
UpdateLightRays();
|
||||
@@ -285,7 +285,7 @@ static void HandleJapaneseTitlescreenAnimationIntro(void) {
|
||||
gIntroState.subState++;
|
||||
gScreen.bg.bg1yOffset = 0;
|
||||
gScreen.bg.bg1Control = 0xc09;
|
||||
gFadeControl.field_0x4 = 0x40;
|
||||
gFadeControl.mask = 0x00000040;
|
||||
DoFade(6, 0x10);
|
||||
SoundReq(SFX_F8);
|
||||
}
|
||||
@@ -293,7 +293,7 @@ static void HandleJapaneseTitlescreenAnimationIntro(void) {
|
||||
break;
|
||||
case 1:
|
||||
if (!gFadeControl.active) {
|
||||
gFadeControl.field_0x4 = -1;
|
||||
gFadeControl.mask = 0xFFFFFFFF;
|
||||
gIntroState.subState++;
|
||||
#if defined(JP) || defined(EU) || defined(DEMO_JP)
|
||||
gIntroState.timer = 120;
|
||||
|
||||
@@ -21,9 +21,9 @@ void sub_08075A0C(ItemBehavior* this, u32 arg1) {
|
||||
s8* tmp;
|
||||
itemSlot = IsItemEquipped(this->behaviorID);
|
||||
if (gPlayerState.heldObject != 0 || gPlayerState.playerAction == 0x18 || gPlayerState.jumpStatus != 0 ||
|
||||
gPlayerState.field_0x2c != NULL || (gPlayerState.flags.all & 0x80) != 0) {
|
||||
gPlayerState.field_0x2c != NULL || (gPlayerState.flags & 0x80) != 0) {
|
||||
ForceEquipItem(0xf, itemSlot);
|
||||
gPlayerState.flags.all &= 0xff7fffff;
|
||||
gPlayerState.flags &= 0xff7fffff;
|
||||
ForceEquipItem(0xf, itemSlot);
|
||||
sub_08077E78(this, arg1);
|
||||
} else {
|
||||
@@ -50,11 +50,11 @@ ASM_FUNC("asm/non_matching/eu/sub_08075ADC.inc", void sub_08075ADC(ItemBehavior*
|
||||
void sub_08075ADC(ItemBehavior* this, u32 arg1) {
|
||||
u32 bVar1;
|
||||
|
||||
if (gPlayerState.field_0x2c != NULL || (this->field_0x5[9] & 1) == 0 || (gPlayerState.flags.all & 0x110) != 0 ||
|
||||
if (gPlayerState.field_0x2c != NULL || (this->field_0x5[9] & 1) == 0 || (gPlayerState.flags & 0x110) != 0 ||
|
||||
sub_08079D48() == 0) {
|
||||
this->field_0xf = 0;
|
||||
this->stateID += 1;
|
||||
gPlayerState.flags.all |= 0x800000;
|
||||
gPlayerState.flags |= 0x800000;
|
||||
bVar1 = 8 >> arg1;
|
||||
gPlayerState.field_0x3[1] = gPlayerState.field_0x3[1] & ~((bVar1 << 4) | bVar1);
|
||||
bVar1 = ~bVar1;
|
||||
@@ -73,11 +73,11 @@ void sub_08075B54(ItemBehavior* this, u32 arg1) {
|
||||
Entity* object;
|
||||
s8* tmp;
|
||||
|
||||
if ((gPlayerState.flags.all & 0x110) == 0) {
|
||||
if ((gPlayerState.flags & 0x110) == 0) {
|
||||
itemSlot = IsItemEquipped(this->behaviorID);
|
||||
if (!(((sub_08077F10(this) == 0) && (itemSlot < 2)) || (gPlayerState.jumpStatus != 0))) {
|
||||
ForceEquipItem(0xf, itemSlot);
|
||||
gPlayerState.flags.all &= 0xff7fffff;
|
||||
gPlayerState.flags &= 0xff7fffff;
|
||||
sub_08077E78(this, arg1);
|
||||
SoundReq(SFX_ITEM_LANTERN_OFF);
|
||||
} else {
|
||||
|
||||
@@ -24,7 +24,7 @@ void OcarinaUse(ItemBehavior* this, u32 arg1) {
|
||||
gPlayerEntity.spriteSettings.b.flipX = 0;
|
||||
gPlayerEntity.flags &= 0x7f;
|
||||
gPlayerEntity.field_0x7a.HWORD = 2;
|
||||
gPlayerState.flags.all |= 0x10000000;
|
||||
gPlayerState.flags |= 0x10000000;
|
||||
gPlayerState.field_0x27[0] = -1;
|
||||
gUnk_02034490[0] = 1;
|
||||
gPlayerState.field_0xa = (8 >> arg1) | gPlayerState.field_0xa;
|
||||
@@ -41,7 +41,7 @@ NONMATCH("asm/non_matching/ocarina/OcarinaUpdate.inc", void OcarinaUpdate(ItemBe
|
||||
UpdateItemAnim(this);
|
||||
if ((this->field_0x5[9] & 0x80) != 0) {
|
||||
gPlayerEntity.flags |= 0x80;
|
||||
gPlayerState.flags.all &= 0xefffffff;
|
||||
gPlayerState.flags &= 0xefffffff;
|
||||
gPlayerState.field_0x27[0] = 0;
|
||||
gUnk_02034490[0] = 0;
|
||||
CreateBird();
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "audio.h"
|
||||
#include "random.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void (*const gUnk_0811BDCC[])(ItemBehavior* beh, u32);
|
||||
|
||||
@@ -16,20 +17,19 @@ void ItemPegasusBoots(ItemBehavior* this, u32 arg1) {
|
||||
gPlayerState.field_0x1d[1] = 0;
|
||||
gPlayerState.field_0xe = 0;
|
||||
sub_08077E78(this, arg1);
|
||||
|
||||
} else {
|
||||
bVar1 = this->field_0x5[2] - 1;
|
||||
this->field_0x5[2] = bVar1;
|
||||
if ((bVar1 & 7) == 0) {
|
||||
SoundReq(SFX_PLY_LAND);
|
||||
}
|
||||
if (((gPlayerState.flags.all & 0x80) == 0) && ((this->field_0x5[2] & 7) == 0)) {
|
||||
if (((gPlayerState.flags & 0x80) == 0) && ((this->field_0x5[2] & 7) == 0)) {
|
||||
if (gPlayerState.field_0x10[2] == 0x11) {
|
||||
if (gPlayerEntity.spriteOffsetY == 0) {
|
||||
CreateFx(&gPlayerEntity, 0x52, 0);
|
||||
CreateFx(&gPlayerEntity, FX_GREEN_SPLASH, 0);
|
||||
}
|
||||
} else {
|
||||
fx = CreateFx(&gPlayerEntity, 0x11, 0x40);
|
||||
fx = CreateFx(&gPlayerEntity, FX_DASH, 0x40);
|
||||
if ((fx != NULL) && (fx->y.HALF.HI = fx->y.HALF.HI + 2, this->stateID != 2)) {
|
||||
uVar4 = Random() & 3;
|
||||
if ((Random() & 1) != 0) {
|
||||
@@ -53,12 +53,12 @@ void sub_080768F8(ItemBehavior* this, u32 arg1) {
|
||||
u32 bVar2;
|
||||
|
||||
bVar1 = gPlayerState.field_0x1c | gPlayerState.field_0x3[1] | gPlayerState.heldObject | gPlayerState.jumpStatus;
|
||||
bVar2 = (gPlayerState.flags.all & 0x1000);
|
||||
bVar2 = (gPlayerState.flags & 0x1000);
|
||||
bVar1 |= bVar2;
|
||||
if (bVar1 == 0) {
|
||||
gPlayerState.field_0x1d[1] = 1;
|
||||
gPlayerState.field_0x1d[4] = bVar1;
|
||||
if ((gPlayerState.flags.all & 0x80) == 0) {
|
||||
if ((gPlayerState.flags & 0x80) == 0) {
|
||||
this->field_0x5[2] = 0x10;
|
||||
} else {
|
||||
gPlayerState.field_0x8 = 0xc14;
|
||||
|
||||
@@ -22,7 +22,7 @@ extern bool32 sub_08077EFC(ItemBehavior*);
|
||||
if ((gPlayerState.jumpStatus != 0) && ((gPlayerState.jumpStatus & 7) != 3))
|
||||
goto _08076710;
|
||||
if (-1 < gPlayerEntity.height.WORD) {
|
||||
gPlayerEntity.field_0x20 = 0x20000;
|
||||
gPlayerEntity.hVelocity = 0x20000;
|
||||
gPlayerState.jumpStatus = 1;
|
||||
gPlayerState.field_0x2c = NULL;
|
||||
this->stateID += 1;
|
||||
@@ -45,7 +45,7 @@ extern bool32 sub_08077EFC(ItemBehavior*);
|
||||
gPlayerState.jumpStatus = 1;
|
||||
gPlayerState.field_0xe = -1;
|
||||
gPlayerState.field_0x2c = NULL;
|
||||
gPlayerEntity.field_0x20 = 0x20000;
|
||||
gPlayerEntity.hVelocity = 0x20000;
|
||||
_0807673C:
|
||||
sub_08077F84();
|
||||
SoundReq(SFX_PLY_VO4);
|
||||
@@ -67,10 +67,10 @@ void sub_08076758(ItemBehavior* this, u32 arg1) {
|
||||
((gPlayerState.jumpStatus & 7) != 3)) {
|
||||
if (sub_08077EFC(this)) {
|
||||
if (this->stateID < 2) {
|
||||
if ((gPlayerEntity.field_0x20 < 1) && ((gPlayerState.jumpStatus & 0x10) == 0)) {
|
||||
if ((gPlayerEntity.hVelocity < 1) && ((gPlayerState.jumpStatus & 0x10) == 0)) {
|
||||
this->stateID = 2;
|
||||
gPlayerEntity.field_0x7a.HWORD = 2;
|
||||
gPlayerEntity.field_0x20 = 0x20000;
|
||||
gPlayerEntity.hVelocity = 0x20000;
|
||||
gPlayerState.jumpStatus |= 0x10;
|
||||
gPlayerState.field_0x8 = 0x288;
|
||||
SoundReq(SFX_172);
|
||||
|
||||
@@ -72,9 +72,9 @@ void sub_0807564C(ItemBehavior* this, u32 arg1) {
|
||||
|
||||
void sub_08075694(ItemBehavior* this, u32 arg1) {
|
||||
this->field_0x5[2] = 1;
|
||||
if ((gPlayerState.flags.all & 0x8000000) != 0) {
|
||||
gPlayerState.flags.all &= 0xf7ffffff;
|
||||
gPlayerState.flags.all &= 0xfffbffff;
|
||||
if ((gPlayerState.flags & 0x8000000) != 0) {
|
||||
gPlayerState.flags &= 0xf7ffffff;
|
||||
gPlayerState.flags &= 0xfffbffff;
|
||||
sub_08077DF4(this, 300);
|
||||
} else {
|
||||
gPlayerState.field_0xab = 1;
|
||||
@@ -86,7 +86,7 @@ void sub_08075694(ItemBehavior* this, u32 arg1) {
|
||||
gPlayerEntity.field_0x40 = 0x1e;
|
||||
gPlayerState.field_0x1a[1] |= 0x40;
|
||||
gPlayerState.field_0x1a[1] &= 0xdf;
|
||||
if ((gPlayerState.field_0xa0[0] == 0x04) && ((gPlayerState.flags.all & 0x400000) == 0)) {
|
||||
if ((gPlayerState.field_0xa0[0] == 0x04) && ((gPlayerState.flags & 0x400000) == 0)) {
|
||||
gPlayerState.field_0xa0[0] = 0x01;
|
||||
sub_0807A108();
|
||||
}
|
||||
@@ -121,10 +121,10 @@ void sub_080758B0(ItemBehavior* this, u32 arg1) {
|
||||
ASM_FUNC("asm/non_matching/itemSword/sub_08075900.inc", void sub_08075900(ItemBehavior* this, u32 arg1))
|
||||
|
||||
void sub_080759B8(ItemBehavior* this, u32 arg1) {
|
||||
if ((gPlayerState.flags.all & 0x80) == 0) {
|
||||
if ((gPlayerState.flags & 0x80) == 0) {
|
||||
gPlayerEntity.field_0x40 = 0;
|
||||
}
|
||||
gPlayerState.flags.all &= 0xf7ffffff;
|
||||
gPlayerState.flags &= 0xf7ffffff;
|
||||
gPlayerState.field_0x1a[1] = 0;
|
||||
gPlayerState.field_0x2c = NULL;
|
||||
sub_08077E78(this, arg1);
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
#include "global.h"
|
||||
|
||||
typedef enum {
|
||||
SWORD,
|
||||
GUST_JAR,
|
||||
CANE,
|
||||
BOOMERANG,
|
||||
SHIELD,
|
||||
MOLE_MITTS,
|
||||
LANTERN,
|
||||
BOMBS,
|
||||
PEGASUS_BOOTS,
|
||||
ROCS_CAPE,
|
||||
OCARINA,
|
||||
BOW,
|
||||
BOTTLE0,
|
||||
BOTTLE1,
|
||||
BOTTLE2,
|
||||
BOTTLE3,
|
||||
SAVE_BUTTON,
|
||||
} ItemMenuTableSlot;
|
||||
|
||||
typedef struct {
|
||||
u8 up;
|
||||
u8 down;
|
||||
u8 left;
|
||||
u8 right;
|
||||
u8 type;
|
||||
u8 unk0;
|
||||
u8 x;
|
||||
u8 y;
|
||||
} ItemMenuTableEntry;
|
||||
|
||||
const ItemMenuTableEntry gItemMenuTable[] = {
|
||||
[SWORD] = { BOTTLE0, SHIELD, BOOMERANG, GUST_JAR, 0x01, 0x0c, 0x42, 0x33 },
|
||||
[GUST_JAR] = { BOTTLE1, MOLE_MITTS, SWORD, CANE, 0x01, 0x10, 0x66, 0x33 },
|
||||
[CANE] = { BOTTLE3, LANTERN, GUST_JAR, BOOMERANG, 0x01, 0x14, 0x8a, 0x33 },
|
||||
[BOOMERANG] = { SAVE_BUTTON, BOMBS, CANE, SWORD, 0x01, 0x15, 0xae, 0x33 },
|
||||
[SHIELD] = { SWORD, PEGASUS_BOOTS, BOMBS, MOLE_MITTS, 0x01, 0x16, 0x42, 0x4b },
|
||||
[MOLE_MITTS] = { GUST_JAR, ROCS_CAPE, SHIELD, LANTERN, 0x01, 0x17, 0x66, 0x4b },
|
||||
[LANTERN] = { CANE, OCARINA, MOLE_MITTS, BOMBS, 0x01, 0x00, 0x8a, 0x4b },
|
||||
[BOMBS] = { BOOMERANG, BOW, LANTERN, SHIELD, 0x01, 0x00, 0xae, 0x4b },
|
||||
[PEGASUS_BOOTS] = { SHIELD, BOTTLE0, BOW, ROCS_CAPE, 0x01, 0x00, 0x42, 0x63 },
|
||||
[ROCS_CAPE] = { MOLE_MITTS, BOTTLE1, PEGASUS_BOOTS, OCARINA, 0x01, 0x00, 0x66, 0x63 },
|
||||
[OCARINA] = { LANTERN, BOTTLE3, ROCS_CAPE, BOW, 0x01, 0x00, 0x8a, 0x63 },
|
||||
[BOW] = { BOMBS, SAVE_BUTTON, OCARINA, PEGASUS_BOOTS, 0x01, 0x00, 0xae, 0x63 },
|
||||
[BOTTLE0] = { PEGASUS_BOOTS, SWORD, SAVE_BUTTON, BOTTLE1, 0x01, 0x00, 0x42, 0x7b },
|
||||
[BOTTLE1] = { ROCS_CAPE, GUST_JAR, BOTTLE0, BOTTLE2, 0x01, 0x00, 0x5a, 0x7b },
|
||||
[BOTTLE2] = { ROCS_CAPE, GUST_JAR, BOTTLE1, BOTTLE3, 0x01, 0x00, 0x72, 0x7b },
|
||||
[BOTTLE3] = { OCARINA, CANE, BOTTLE2, SAVE_BUTTON, 0x01, 0x00, 0x8a, 0x7b },
|
||||
[SAVE_BUTTON] = { BOW, BOOMERANG, BOTTLE3, BOTTLE0, 0x03, 0x00, 0xb5, 0x75 },
|
||||
{ BOW, BOOMERANG, BOTTLE3, BOTTLE0, 0x05, 0x00, 0xb5, 0x75 },
|
||||
};
|
||||
+9
-10
@@ -80,8 +80,8 @@ void AgbMain(void) {
|
||||
|
||||
gMain.ticks++;
|
||||
sScreenHandlers[gMain.screen]();
|
||||
MessageUpdate();
|
||||
sub_08050154();
|
||||
MessageMain();
|
||||
UpdateFade();
|
||||
SoundLoop();
|
||||
break;
|
||||
}
|
||||
@@ -191,7 +191,7 @@ NONMATCH("asm/non_matching/sub_080560B8.inc", static void sub_080560B8(void)) {
|
||||
case -1:
|
||||
default:
|
||||
MemCopy(&sDefaultSettings, (void*)0x2000000, 16);
|
||||
Write_02000000(gUnk_02000000);
|
||||
Write_02000000(gSaveHeader);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -211,14 +211,13 @@ END_NONMATCH
|
||||
|
||||
u32 sub_08056134(void) {
|
||||
#ifdef EU
|
||||
if ((gUnk_02000000->signature != SIGNATURE) || (gUnk_02000000->saveFileId >= NUM_SAVE_SLOTS) ||
|
||||
(gUnk_02000000->messageSpeed >= MAX_MSG_SPEED) || (gUnk_02000000->brightnessPref >= MAX_BRIGHTNESS) ||
|
||||
(gUnk_02000000->gameLanguage <= GAME_LANGUAGE) || (gUnk_02000000->gameLanguage >= 7) ||
|
||||
(gUnk_02000000->_e != 0))
|
||||
if ((gSaveHeader->signature != SIGNATURE) || (gSaveHeader->saveFileId >= NUM_SAVE_SLOTS) ||
|
||||
(gSaveHeader->messageSpeed >= MAX_MSG_SPEED) || (gSaveHeader->brightnessPref >= MAX_BRIGHTNESS) ||
|
||||
(gSaveHeader->gameLanguage <= GAME_LANGUAGE) || (gSaveHeader->gameLanguage >= 7) || (gSaveHeader->_e != 0))
|
||||
#else
|
||||
if ((gUnk_02000000->signature != SIGNATURE) || (gUnk_02000000->saveFileId >= NUM_SAVE_SLOTS) ||
|
||||
(gUnk_02000000->messageSpeed >= MAX_MSG_SPEED) || (gUnk_02000000->brightnessPref >= MAX_BRIGHTNESS) ||
|
||||
(gUnk_02000000->gameLanguage != GAME_LANGUAGE) || (gUnk_02000000->_e != 0))
|
||||
if ((gSaveHeader->signature != SIGNATURE) || (gSaveHeader->saveFileId >= NUM_SAVE_SLOTS) ||
|
||||
(gSaveHeader->messageSpeed >= MAX_MSG_SPEED) || (gSaveHeader->brightnessPref >= MAX_BRIGHTNESS) ||
|
||||
(gSaveHeader->gameLanguage != GAME_LANGUAGE) || (gSaveHeader->_e != 0))
|
||||
#endif
|
||||
return FALSE;
|
||||
|
||||
|
||||
@@ -17,10 +17,10 @@ void Manager1_Main(Entity* this) {
|
||||
u8* pbVar2;
|
||||
|
||||
gUnk_08107C5C[this->action](this);
|
||||
gUnk_08107C48[((u8*)&this->field_0x20)[1]](this);
|
||||
bVar1 = gUnk_08107C40[((u8*)&this->field_0x20)[1]];
|
||||
if ((bVar1 != 0) && (*(u8*)&this->field_0x20 != bVar1)) {
|
||||
((u8*)&this->field_0x20)[0] = bVar1;
|
||||
gUnk_08107C48[((u8*)&this->hVelocity)[1]](this);
|
||||
bVar1 = gUnk_08107C40[((u8*)&this->hVelocity)[1]];
|
||||
if ((bVar1 != 0) && (*(u8*)&this->hVelocity != bVar1)) {
|
||||
((u8*)&this->hVelocity)[0] = bVar1;
|
||||
LoadGfxGroup(bVar1);
|
||||
}
|
||||
}
|
||||
@@ -28,9 +28,9 @@ void Manager1_Main(Entity* this) {
|
||||
void sub_080570B8(Entity* this) {
|
||||
u8* pbVar1;
|
||||
|
||||
LoadGfxGroup(((u8*)&this->field_0x20)[0]);
|
||||
LoadGfxGroup(((u8*)&this->hVelocity)[0]);
|
||||
this->height.WORD = 0;
|
||||
pbVar1 = ((u8*)&this->field_0x20 + 1);
|
||||
pbVar1 = ((u8*)&this->hVelocity + 1);
|
||||
if (*pbVar1 == 3) {
|
||||
gScreen.affine.bg3Updated = 1;
|
||||
} else {
|
||||
@@ -46,9 +46,9 @@ void sub_080570F8(void) {
|
||||
|
||||
void sub_08057118(Entity* this) {
|
||||
this->actionDelay = 0;
|
||||
*(u8*)&this->field_0x20 = 0;
|
||||
((u8*)&this->field_0x20)[1] = 0;
|
||||
((u8*)&this->field_0x20)[2] = 0;
|
||||
*(u8*)&this->hVelocity = 0;
|
||||
((u8*)&this->hVelocity)[1] = 0;
|
||||
((u8*)&this->hVelocity)[2] = 0;
|
||||
this->action = 1;
|
||||
gScreen.affine.bg3Control = 0x1e04;
|
||||
gScreen.lcd.displayControl |= 0x800;
|
||||
|
||||
@@ -253,8 +253,6 @@ void sub_0805A664(Manager15* this) {
|
||||
sub_0805A68C(this);
|
||||
}
|
||||
|
||||
extern u32 CheckPlayerProximity(u32, u32, u32, u32);
|
||||
|
||||
void sub_0805A68C(Manager15* this) {
|
||||
if (CheckPlayerProximity(this->unk_38 - 0x18, this->unk_3a - 0x18, 0x30, 0x30)) {
|
||||
if (this->unk_2c <= 0x1007) {
|
||||
|
||||
@@ -32,7 +32,6 @@ void Manager1A_Main(Manager1A* this) {
|
||||
}
|
||||
|
||||
extern void sub_08052D74(void*, void*, void*);
|
||||
extern u32 CheckPlayerProximity(u32, u32, u32, u32);
|
||||
|
||||
typedef struct struct_08108764 {
|
||||
u8 unk_00;
|
||||
@@ -140,9 +139,9 @@ void sub_0805B168(Manager1A* this) {
|
||||
u32 sub_0805B1CC(Manager1A* this) {
|
||||
u32 re = 0;
|
||||
if (CheckPlayerProximity(this->unk_20, this->unk_22, this->unk_24, this->unk_26)) {
|
||||
if ((gPlayerState.flags.all & 0x4) && (gPlayerState.flags.all & 0x1)) {
|
||||
gPlayerState.flags.all |= 0x8000;
|
||||
} else if (gPlayerState.flags.all & 0x8000) {
|
||||
if ((gPlayerState.flags & 0x4) && (gPlayerState.flags & 0x1)) {
|
||||
gPlayerState.flags |= 0x8000;
|
||||
} else if (gPlayerState.flags & 0x8000) {
|
||||
re = 1;
|
||||
}
|
||||
}
|
||||
@@ -158,7 +157,7 @@ void sub_0805B210(Manager1A* this) {
|
||||
gScreenTransition.areaID = tmp->unk_01;
|
||||
gScreenTransition.roomID = tmp->unk_02;
|
||||
gScreenTransition.playerLayer = tmp->unk_03;
|
||||
if (gPlayerState.flags.all & 0x80) {
|
||||
if (gPlayerState.flags & 0x80) {
|
||||
gScreenTransition.field_0xf = 6;
|
||||
} else {
|
||||
gScreenTransition.field_0xf = 2;
|
||||
|
||||
@@ -76,7 +76,7 @@ void sub_0805C7C4(Manager26* this) {
|
||||
}
|
||||
|
||||
void sub_0805C7CC(Manager26* this) {
|
||||
if (gPlayerState.flags.all & 0x80) {
|
||||
if (gPlayerState.flags & 0x80) {
|
||||
if (gPlayerEntity.y.HALF.HI < this->unk_2a + 0x10) {
|
||||
this->manager.unk_0d = 1;
|
||||
} else {
|
||||
|
||||
+10
-10
@@ -7,6 +7,7 @@
|
||||
#include "random.h"
|
||||
#include "audio.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
|
||||
// Facilitates the usage of minish portals.
|
||||
|
||||
@@ -25,10 +26,9 @@ typedef struct {
|
||||
} Manager3;
|
||||
|
||||
extern s8 gUnk_08107C6C[];
|
||||
extern u32 CheckPlayerProximity(u32, u32, u32, u32);
|
||||
extern u32 sub_08057810(void);
|
||||
extern u32 sub_080002C0(u16, u16, u8);
|
||||
extern void sub_080577AC(u32, u32, u32);
|
||||
extern void CreateMagicSparkles(u32, u32, u32);
|
||||
|
||||
void Manager3_Main(Manager3* this) {
|
||||
s8 tmp;
|
||||
@@ -47,7 +47,7 @@ void Manager3_Main(Manager3* this) {
|
||||
gArea.field_0x18 = 1;
|
||||
gArea.curPortalType = 5;
|
||||
} else {
|
||||
if ((gPlayerState.flags.all & 0x20) && gPlayerState.jumpStatus == 0) {
|
||||
if ((gPlayerState.flags & 0x20) && gPlayerState.jumpStatus == 0) {
|
||||
gArea.field_0x18 = 2;
|
||||
} else {
|
||||
if (sub_08057810()) {
|
||||
@@ -55,11 +55,11 @@ void Manager3_Main(Manager3* this) {
|
||||
}
|
||||
}
|
||||
if (sub_080002C0(this->unk_38, this->unk_3a, this->manager.unk_0e) == 0x3d) {
|
||||
sub_080577AC(this->unk_38 + gRoomControls.roomOriginX, this->unk_3a + gRoomControls.roomOriginY,
|
||||
this->manager.unk_0e);
|
||||
CreateMagicSparkles(this->unk_38 + gRoomControls.roomOriginX, this->unk_3a + gRoomControls.roomOriginY,
|
||||
this->manager.unk_0e);
|
||||
if (!this->manager.unk_0f) {
|
||||
this->manager.unk_0f = 1;
|
||||
SoundReq(SFX_152);
|
||||
SoundReq(SFX_NEAR_PORTAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -69,15 +69,15 @@ void Manager3_Main(Manager3* this) {
|
||||
}
|
||||
}
|
||||
|
||||
void sub_080577AC(u32 baseX, u32 baseY, u32 layer) {
|
||||
void CreateMagicSparkles(u32 baseX, u32 baseY, u32 layer) {
|
||||
u32 r;
|
||||
int offsetX, offsetY;
|
||||
Entity* spark;
|
||||
r = Random();
|
||||
if ((r & 0x7) != 0)
|
||||
if (r & 0x7)
|
||||
return;
|
||||
spark = CreateObject(SPECIAL_FX, 0x26, 0);
|
||||
if (!spark)
|
||||
if (spark == NULL)
|
||||
return;
|
||||
offsetX = (r >> 0x8) & 0xF;
|
||||
offsetY = ((r >> 0x10) & 0xF);
|
||||
@@ -94,7 +94,7 @@ void sub_080577AC(u32 baseX, u32 baseY, u32 layer) {
|
||||
}
|
||||
|
||||
u32 sub_08057810(void) {
|
||||
if ((gPlayerState.flags.all & 0x80) && !gPlayerState.field_0xaa && (gArea.curPortalType != 0x6) &&
|
||||
if ((gPlayerState.flags & 0x80) && !gPlayerState.field_0xaa && (gArea.curPortalType != 0x6) &&
|
||||
(gPlayerState.heldObject == 0)) {
|
||||
switch (gPlayerState.field_0xa8) {
|
||||
case 0:
|
||||
|
||||
@@ -79,13 +79,13 @@ void sub_0805DF4C(Manager* this) {
|
||||
if (--this->unk_0e == 0) {
|
||||
this->action = 3;
|
||||
this->unk_0e = 0x1e;
|
||||
TextboxNoOverlapFollow(0x164f);
|
||||
MessageFromTarget(0x164f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0805DF98(Manager* this) {
|
||||
if ((gTextBox.doTextBox & 0x7f) == 0) {
|
||||
if ((gMessage.doTextBox & 0x7f) == 0) {
|
||||
if (this->unk_0e != 0) {
|
||||
this->unk_0e -= 1;
|
||||
} else {
|
||||
|
||||
@@ -37,7 +37,7 @@ void sub_0805E1F8(u32, u32);
|
||||
|
||||
void Manager39_Main(Manager39* this) {
|
||||
gUnk_08108E28[this->manager.action](this);
|
||||
if ((gRoomControls.roomID != this->unk_20) || (gTextBox.doTextBox & 0x7F)) {
|
||||
if ((gRoomControls.roomID != this->unk_20) || (gMessage.doTextBox & 0x7F)) {
|
||||
sub_0805E1D8(this);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ void Manager6_Main(Manager6* this) {
|
||||
for (i = this->warpList; i->posX != 0xFFFF; i++) {
|
||||
tmp = (i->unk_07.all & 0x3);
|
||||
if (((tmp & (gPlayerEntity.collisionLayer)) != 0) &&
|
||||
(((gPlayerState.flags.all & 0x80) != 0) || ((i->unk_07.b.unk2) != 0)) &&
|
||||
(((gPlayerState.flags & 0x80) != 0) || ((i->unk_07.b.unk2) != 0)) &&
|
||||
(CheckPlayerInRegion(i->posX, i->posY, i->width, i->height) != 0) &&
|
||||
(gPlayerEntity.height.HALF.HI == 0)) {
|
||||
DoExitTransition(GetCurrentRoomProperty(i->unk_06));
|
||||
|
||||
@@ -49,7 +49,7 @@ void sub_080585DC(ManagerA*);
|
||||
|
||||
void sub_08058408(ManagerA* this) {
|
||||
u32 tmp2;
|
||||
tmp2 = (gPlayerState.flags.all & 0x08);
|
||||
tmp2 = (gPlayerState.flags & 0x08);
|
||||
if (tmp2 != 0)
|
||||
return;
|
||||
if (!CheckPlayerInRegion(this->unk_20, this->unk_22, this->unk_24, this->unk_26))
|
||||
@@ -59,7 +59,7 @@ void sub_08058408(ManagerA* this) {
|
||||
return;
|
||||
case 2:
|
||||
sub_080585DC(this);
|
||||
if ((gPlayerState.flags.all & 0x80) == 0)
|
||||
if ((gPlayerState.flags & 0x80) == 0)
|
||||
return;
|
||||
case 0:
|
||||
default:
|
||||
@@ -118,7 +118,7 @@ extern void UnfreezeTime(void);
|
||||
void sub_08058514(ManagerA* this) {
|
||||
switch (this->manager.unk_0d) {
|
||||
case 1:
|
||||
if ((gPlayerState.flags.all & 0x1235) != 0)
|
||||
if ((gPlayerState.flags & 0x1235) != 0)
|
||||
return;
|
||||
if (gPlayerEntity.height.HALF.HI != 0)
|
||||
return;
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "textbox.h"
|
||||
#include "script.h"
|
||||
#include "utils.h"
|
||||
#include "tiles.h"
|
||||
|
||||
void sub_08058ECC(ManagerF*);
|
||||
|
||||
@@ -335,14 +336,14 @@ void sub_0805930C(ManagerF* this) {
|
||||
}
|
||||
|
||||
void SetDirtTile(u32 tile) {
|
||||
SetTileType(0x1d, tile, 1);
|
||||
SetTileType(CUT_GRASS, tile, 1);
|
||||
SetTileType(0, tile, 2);
|
||||
SetTileType(0, tile - 0x40, 2);
|
||||
}
|
||||
|
||||
void sub_08059368(ManagerF* this) {
|
||||
this->manager.action = 1;
|
||||
if (this->unk_3c == gCurrentTextBox._28) {
|
||||
if (this->unk_3c == gTextRender.curToken.textIndex) {
|
||||
SetFlag(this->unk_3e);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
@@ -359,7 +360,7 @@ void sub_0805938C(ManagerF* this) {
|
||||
}
|
||||
|
||||
u32 sub_080593CC(ManagerF* this) {
|
||||
if (!(gPlayerState.flags.all & 0x80) && gPlayerState.swimState != 0 && gPlayerEntity.animationState == 0 &&
|
||||
if (!(gPlayerState.flags & 0x80) && gPlayerState.swimState != 0 && gPlayerEntity.animationState == 0 &&
|
||||
(gPlayerState.field_0x90.HALF.LO & 0xF00) == 0x400) {
|
||||
return sub_0806FCB8(&gPlayerEntity, this->unk_38, this->unk_3a + 0xC, 6);
|
||||
}
|
||||
|
||||
+2
-2
@@ -53,14 +53,14 @@ void sub_08063314(Entity* this) {
|
||||
InitializeAnimation(this, offset);
|
||||
}
|
||||
if (this->interactType != '\0') {
|
||||
TextboxNoOverlapFollow(this->actionDelay + 0xA01);
|
||||
MessageFromTarget(this->actionDelay + 0xA01);
|
||||
this->action++;
|
||||
}
|
||||
sub_0806ED78(this);
|
||||
}
|
||||
|
||||
void sub_0806336C(Entity* this) {
|
||||
if ((gTextBox.doTextBox & 0x7F) == 0) {
|
||||
if ((gMessage.doTextBox & 0x7F) == 0) {
|
||||
this->action++;
|
||||
InitializeAnimation(this, 8);
|
||||
}
|
||||
|
||||
+1
-2
@@ -34,7 +34,6 @@ extern Hitbox gUnk_080FD180;
|
||||
Entity* sub_0806D00C(Entity* this);
|
||||
|
||||
void sub_0806D4C0(Entity*, u32);
|
||||
extern u32 CheckPlayerProximity(u32, u32, u32, u32);
|
||||
|
||||
void BigGoron(Entity* this) {
|
||||
gUnk_081140D4[this->type](this);
|
||||
@@ -185,7 +184,7 @@ void sub_0806D274(Entity* this) {
|
||||
case 0:
|
||||
case 1:
|
||||
default:
|
||||
if ((gTextBox.doTextBox & 0x7f) == 0) {
|
||||
if ((gMessage.doTextBox & 0x7f) == 0) {
|
||||
this->frameIndex = 2;
|
||||
break;
|
||||
}
|
||||
|
||||
+12
-11
@@ -9,6 +9,7 @@
|
||||
#include "npc.h"
|
||||
#include "audio.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void (*gUnk_081115C0[])(Entity*);
|
||||
extern void (*gUnk_081115D0[])(Entity*);
|
||||
@@ -86,7 +87,7 @@ void sub_08068A4C(Entity* this) {
|
||||
if (this->interactType != 0) {
|
||||
this->interactType = 0;
|
||||
this->action = 2;
|
||||
TextboxNoOverlapFollow(0);
|
||||
MessageFromTarget(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,7 +166,7 @@ void sub_08068BD0(Entity* this) {
|
||||
void sub_08068BEC(Entity* this, u32 unused) {
|
||||
Entity* target;
|
||||
|
||||
target = CreateFx(this, 0x44, 0);
|
||||
target = CreateFx(this, FX_WHITE_SPLASH, 0);
|
||||
if (target) {
|
||||
target->spritePriority.b0 = 1;
|
||||
PositionRelative(this, target, 0, -0x100000);
|
||||
@@ -306,42 +307,42 @@ switchD_08068d12_caseD_0:
|
||||
|
||||
// Introduction dialoague
|
||||
void sub_08068DB8(Entity* this) {
|
||||
TextboxNoOverlap(gUnk_08111664[this->actionDelay], this);
|
||||
MessageNoOverlap(gUnk_08111664[this->actionDelay], this);
|
||||
}
|
||||
|
||||
// Ask to teach dialoague
|
||||
void sub_08068DD0(Entity* this) {
|
||||
TextboxNoOverlap(gUnk_0811167A[this->actionDelay], this);
|
||||
MessageNoOverlap(gUnk_0811167A[this->actionDelay], this);
|
||||
}
|
||||
|
||||
// Technique Dialogue
|
||||
void sub_08068DE8(Entity* this) {
|
||||
TextboxNoOverlap(gUnk_08111690[this->actionDelay], this);
|
||||
MessageNoOverlap(gUnk_08111690[this->actionDelay], this);
|
||||
}
|
||||
|
||||
// Posession dialogue
|
||||
void sub_08068E00(Entity* this) {
|
||||
TextboxNoOverlap(gUnk_081116A6[this->actionDelay], this);
|
||||
MessageNoOverlap(gUnk_081116A6[this->actionDelay], this);
|
||||
}
|
||||
|
||||
void sub_08068E18(Entity* this) {
|
||||
TextboxNoOverlap(gUnk_081116BC[this->actionDelay], this);
|
||||
MessageNoOverlap(gUnk_081116BC[this->actionDelay], this);
|
||||
}
|
||||
|
||||
void sub_08068E30(Entity* this) {
|
||||
TextboxNoOverlap(gUnk_081116D2[this->actionDelay], this);
|
||||
MessageNoOverlap(gUnk_081116D2[this->actionDelay], this);
|
||||
}
|
||||
|
||||
void sub_08068E48(Entity* this) {
|
||||
TextboxNoOverlap(gUnk_081116E8[this->actionDelay], this);
|
||||
MessageNoOverlap(gUnk_081116E8[this->actionDelay], this);
|
||||
}
|
||||
|
||||
void sub_08068E60(Entity* this) {
|
||||
TextboxNoOverlap(gUnk_081116FE[this->actionDelay], this);
|
||||
MessageNoOverlap(gUnk_081116FE[this->actionDelay], this);
|
||||
}
|
||||
|
||||
void sub_08068E78(Entity* this) {
|
||||
TextboxNoOverlap(gUnk_08111714[this->actionDelay], this);
|
||||
MessageNoOverlap(gUnk_08111714[this->actionDelay], this);
|
||||
}
|
||||
|
||||
void sub_08068E90(Entity* this) {
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ void sub_0806355C(Entity* this) {
|
||||
ASM_FUNC("asm/non_matching/brocco/sub_08063584.inc", void sub_08063584(Entity* this))
|
||||
|
||||
void sub_08063608(Entity* this) {
|
||||
u8 tmp = gTextBox.doTextBox & 0x7f;
|
||||
u8 tmp = gMessage.doTextBox & 0x7f;
|
||||
if (tmp == 0) {
|
||||
this->action = 1;
|
||||
this->field_0xf = tmp;
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ void sub_080672C8(Entity* this) {
|
||||
tmp = CheckGlobalFlag(TABIDACHI);
|
||||
dialog = BOOLCAST(tmp);
|
||||
}
|
||||
TextboxNoOverlap(gUnk_08110CE8[(dialog * 2 + this->type * 6) / 2], this);
|
||||
MessageNoOverlap(gUnk_08110CE8[(dialog * 2 + this->type * 6) / 2], this);
|
||||
}
|
||||
|
||||
void sub_08067304(Entity* this) {
|
||||
|
||||
@@ -80,7 +80,7 @@ NONMATCH("asm/non_matching/castleMaid/sub_08064570.inc", void sub_08064570(Entit
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if ((gTextBox.doTextBox & 0x7f) != 0) {
|
||||
if ((gMessage.doTextBox & 0x7f) != 0) {
|
||||
return;
|
||||
}
|
||||
this->action = 1;
|
||||
@@ -111,7 +111,7 @@ void sub_0806464C(Entity* this) {
|
||||
} else {
|
||||
tmp = 1;
|
||||
}
|
||||
TextboxNoOverlap(gUnk_0810F88C[tmp], this);
|
||||
MessageNoOverlap(gUnk_0810F88C[tmp], this);
|
||||
}
|
||||
|
||||
void sub_08064688(Entity* this) {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "script.h"
|
||||
#include "functions.h"
|
||||
#include "flags.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern Hitbox gUnk_08110E94;
|
||||
|
||||
@@ -87,7 +88,7 @@ void sub_08067534(Entity* this) {
|
||||
Entity* entity;
|
||||
s32 i;
|
||||
for (i = 0; i < 2; ++i) {
|
||||
entity = CreateFx(this, 2, 0);
|
||||
entity = CreateFx(this, FX_DEATH, 0);
|
||||
if (entity != NULL) {
|
||||
entity->x.HALF.HI += gUnk_08110E64[i];
|
||||
entity->y.HALF.HI += 0x1c;
|
||||
|
||||
+2
-2
@@ -151,7 +151,7 @@ void sub_0806797C(Entity* this) {
|
||||
|
||||
void sub_0806799C(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if ((gTextBox.doTextBox & 0x7f) == 0) {
|
||||
if ((gMessage.doTextBox & 0x7f) == 0) {
|
||||
sub_08067B08(this);
|
||||
sub_0805E3A0(this, 1);
|
||||
}
|
||||
@@ -272,7 +272,7 @@ void sub_08067C44(Entity* this) {
|
||||
s32 iVar4;
|
||||
u32 uVar5;
|
||||
|
||||
uVar5 = -((s32) - (gPlayerState.flags.all & 0x80) >> 0x1f);
|
||||
uVar5 = -((s32) - (gPlayerState.flags & 0x80) >> 0x1f);
|
||||
if (uVar5 != this->field_0x68.HALF.HI) {
|
||||
if (uVar5 == 0) {
|
||||
sub_08078778(this);
|
||||
|
||||
+2
-2
@@ -181,7 +181,7 @@ void Cow_ShowDialogue(Entity* ent) {
|
||||
|
||||
void sub_0806920C(Entity* ent) {
|
||||
// TODO: figure out what bitfield flag this is
|
||||
u32 var0 = gPlayerState.flags.all & 0x80;
|
||||
u32 var0 = gPlayerState.flags & 0x80;
|
||||
u32 var1 = -var0 >> 0x1F;
|
||||
|
||||
if (var1 != ent->field_0x6c.HALF.HI) {
|
||||
@@ -200,7 +200,7 @@ void sub_0806924C(Entity* ent) {
|
||||
s8 itype = ent->interactType;
|
||||
if (itype != 0) {
|
||||
// TODO: figure out what bitfield flag this is
|
||||
if ((gPlayerState.flags.all & 0x80) != 0) {
|
||||
if ((gPlayerState.flags & 0x80) != 0) {
|
||||
if (itype == 2) {
|
||||
ent->action = 4;
|
||||
sub_0806F118(ent);
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ void sub_0806E648(Entity* this) {
|
||||
|
||||
void sub_0806E65C(Entity* this) {
|
||||
if (this->interactType != 0) {
|
||||
if ((gPlayerState.flags.all & 0x80) != 0) {
|
||||
if ((gPlayerState.flags & 0x80) != 0) {
|
||||
if (this->interactType == 2) {
|
||||
this->action = 4;
|
||||
sub_0806F118(this);
|
||||
|
||||
@@ -53,7 +53,7 @@ void sub_0806E824(Entity* this) {
|
||||
|
||||
void sub_0806E838(Entity* this) {
|
||||
if (this->interactType != 0) {
|
||||
if ((gPlayerState.flags.all & 0x80) != 0) {
|
||||
if ((gPlayerState.flags & 0x80) != 0) {
|
||||
if (this->interactType == 2) {
|
||||
this->action = 3;
|
||||
sub_0806F118(this);
|
||||
@@ -69,7 +69,7 @@ void sub_0806E838(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_0806E884(Entity* this) {
|
||||
TextboxNoOverlap(0xdb6, this);
|
||||
MessageNoOverlap(0xdb6, this);
|
||||
}
|
||||
|
||||
void CuccoChick_Fusion(Entity* this) {
|
||||
@@ -79,7 +79,7 @@ void CuccoChick_Fusion(Entity* this) {
|
||||
this->frameIndex = 1;
|
||||
} else {
|
||||
if (sub_08003FC4(this, 0x3000) == 0) {
|
||||
this->field_0x20 = 0x10000;
|
||||
this->hVelocity = 0x10000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -66,7 +66,7 @@ void sub_0806BE84(Entity* this, ScriptExecutionContext* context) {
|
||||
if (GetInventoryValue(0x3C) >= 2) {
|
||||
msgIndex = 2;
|
||||
}
|
||||
TextboxNoOverlap(gUnk_08113344[msgIndex], this);
|
||||
MessageNoOverlap(gUnk_08113344[msgIndex], this);
|
||||
}
|
||||
|
||||
void sub_0806BEC8(Entity* this, ScriptExecutionContext* context) {
|
||||
@@ -83,7 +83,7 @@ void sub_0806BEC8(Entity* this, ScriptExecutionContext* context) {
|
||||
msgIndex = 2;
|
||||
}
|
||||
|
||||
TextboxNoOverlap(gUnk_0811334A[msgIndex], this);
|
||||
MessageNoOverlap(gUnk_0811334A[msgIndex], this);
|
||||
}
|
||||
|
||||
void sub_0806BEFC() {
|
||||
|
||||
@@ -5,8 +5,6 @@
|
||||
#include "functions.h"
|
||||
#include "save.h"
|
||||
|
||||
extern u32 sub_08002632(Entity*);
|
||||
|
||||
void Din(Entity* this) {
|
||||
switch (this->action) {
|
||||
case 0:
|
||||
|
||||
+9
-9
@@ -71,7 +71,7 @@ void sub_08069B44(Entity* this) {
|
||||
if ((this->flags & 2) != 0) {
|
||||
sub_0807DD50(this);
|
||||
}
|
||||
if (((this->type == 0) && ((gPlayerState.flags.all & 0x80) == 0)) && (GetInventoryValue(0x36) != 2)) {
|
||||
if (((this->type == 0) && ((gPlayerState.flags & 0x80) == 0)) && (GetInventoryValue(0x36) != 2)) {
|
||||
this->action = 4;
|
||||
}
|
||||
#if defined(JP) || defined(EU) || defined(DEMO_JP)
|
||||
@@ -87,7 +87,7 @@ void sub_08069B44(Entity* this) {
|
||||
void sub_08069C40(Entity* this) {
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (sub_08069F90(this) != 0) {
|
||||
if ((gPlayerState.flags.all & 0x80) != 0) {
|
||||
if ((gPlayerState.flags & 0x80) != 0) {
|
||||
sub_08069CB8(this);
|
||||
} else {
|
||||
this->animationState = GetAnimationState(this);
|
||||
@@ -282,14 +282,14 @@ u32 sub_08069F90(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08069FBC(Entity* this) {
|
||||
u32 tmp = (gPlayerState.flags.all & 0x80) != 0 ? 0x24 : 0x20;
|
||||
u32 tmp = (gPlayerState.flags & 0x80) != 0 ? 0x24 : 0x20;
|
||||
if ((this->animationState == 1) || (this->animationState == 3)) {
|
||||
this->field_0x6a.HALF.HI = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_08069FE8(Entity* this) {
|
||||
u32 tmp = -((s32) - (gPlayerState.flags.all & 0x80) >> 0x1f);
|
||||
u32 tmp = -((s32) - (gPlayerState.flags & 0x80) >> 0x1f);
|
||||
if (tmp != this->field_0x6a.HALF.LO) {
|
||||
if (tmp == 0) {
|
||||
sub_08078778(this);
|
||||
@@ -302,7 +302,7 @@ void sub_08069FE8(Entity* this) {
|
||||
|
||||
void sub_0806A028(Entity* this) {
|
||||
if (this->interactType != 0) {
|
||||
if ((gPlayerState.flags.all & 0x80) != 0) {
|
||||
if ((gPlayerState.flags & 0x80) != 0) {
|
||||
if (this->interactType == 2) {
|
||||
this->action = 6;
|
||||
sub_0806F118(this);
|
||||
@@ -326,7 +326,7 @@ void sub_0806A080(Entity* this) {
|
||||
void sub_0806A0A4(Entity* this) {
|
||||
s32 dialog;
|
||||
|
||||
if ((gPlayerState.flags.all & 0x80) != 0) {
|
||||
if ((gPlayerState.flags & 0x80) != 0) {
|
||||
dialog = 4;
|
||||
#if defined(JP) || defined(EU) || defined(DEMO_JP)
|
||||
if (CheckLocalFlag(0xcc) == 0) {
|
||||
@@ -364,12 +364,12 @@ void sub_0806A0A4(Entity* this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
TextboxNoOverlap(gUnk_08111F74[(u32)gSave.unk8 * 5 + dialog], this);
|
||||
MessageNoOverlap(gUnk_08111F74[(u32)gSave.unk8 * 5 + dialog], this);
|
||||
}
|
||||
|
||||
void sub_0806A144(Entity* this) {
|
||||
s32 dialog = 4;
|
||||
if ((gPlayerState.flags.all & 0x80) != 0) {
|
||||
if ((gPlayerState.flags & 0x80) != 0) {
|
||||
dialog = 3;
|
||||
if ((GetInventoryValue(0x46) == 0) && (CheckGlobalFlag(0x29) != 0)) {
|
||||
if (CheckLocalFlag(0x85) == 0) {
|
||||
@@ -379,7 +379,7 @@ void sub_0806A144(Entity* this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
TextboxNoOverlap(gUnk_08111FD8[dialog], this);
|
||||
MessageNoOverlap(gUnk_08111FD8[dialog], this);
|
||||
}
|
||||
|
||||
void Dog_Fusion(Entity* this) {
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@ void sub_0806C038(Entity* this) {
|
||||
}
|
||||
}
|
||||
}
|
||||
TextboxNoOverlap(gUnk_081133A4[index], this);
|
||||
MessageNoOverlap(gUnk_081133A4[index], this);
|
||||
}
|
||||
|
||||
void sub_0806C09C(Entity* this) {
|
||||
|
||||
+3
-3
@@ -38,7 +38,7 @@ void sub_08065A00(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08065A10(Entity* this) {
|
||||
if ((gTextBox.doTextBox & 0x7F) == 0) {
|
||||
if ((gMessage.doTextBox & 0x7F) == 0) {
|
||||
this->action = 1;
|
||||
InitAnimationForceUpdate(this, this->animationState / 2);
|
||||
}
|
||||
@@ -58,7 +58,7 @@ void sub_08065A50(Entity* this) {
|
||||
void sub_08065A64(Entity* this) {
|
||||
u32 uVar2;
|
||||
|
||||
uVar2 = -(gPlayerState.flags.all & 0x80) >> 0x1f;
|
||||
uVar2 = -(gPlayerState.flags & 0x80) >> 0x1f;
|
||||
if (uVar2 != this->field_0x68.HALF.HI) {
|
||||
if (uVar2 == 0) {
|
||||
sub_08078778(this);
|
||||
@@ -71,7 +71,7 @@ void sub_08065A64(Entity* this) {
|
||||
|
||||
void sub_08065AA4(Entity* this) {
|
||||
if (this->interactType != 0) {
|
||||
if (gPlayerState.flags.all & 0x80) {
|
||||
if (gPlayerState.flags & 0x80) {
|
||||
if (this->interactType == 2) {
|
||||
this->action = 4;
|
||||
sub_0806F118(this);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user