mirror of
https://github.com/zeldaret/tmc
synced 2026-07-10 07:06:52 -04:00
Merge pull request #184 from notyourav/dd
effects.h and handwritten asm notes
This commit is contained in:
+4
-3
@@ -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();
|
||||
@@ -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
|
||||
@@ -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
-1
@@ -10,7 +10,8 @@ typedef struct {
|
||||
} VStruct;
|
||||
|
||||
typedef struct {
|
||||
u8 filler[0x420];
|
||||
u8 _0[0x20];
|
||||
struct OamData oam[0x80];
|
||||
VStruct unk[0x100];
|
||||
} UStruct;
|
||||
|
||||
|
||||
+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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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*);
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -3,6 +3,7 @@
|
||||
#include "enemy.h"
|
||||
#include "random.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern Entity* gUnk_020000B0;
|
||||
|
||||
@@ -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);
|
||||
|
||||
+6
-5
@@ -5,6 +5,7 @@
|
||||
#include "coord.h"
|
||||
#include "random.h"
|
||||
#include "player.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void (*const LakituActionFuncs[])(Entity*);
|
||||
|
||||
@@ -61,7 +62,7 @@ void sub_0803C784(Entity* this) {
|
||||
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->knockbackDirection ^ 0x10) << 3;
|
||||
@@ -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*);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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*);
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
@@ -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;
|
||||
|
||||
+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) {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "random.h"
|
||||
#include "utils.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void DoExitTransition(ScreenTransitionData*);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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*);
|
||||
@@ -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;
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
#include "save.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern u8 gEntCount;
|
||||
|
||||
@@ -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) {
|
||||
|
||||
+2
-1
@@ -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*);
|
||||
@@ -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;
|
||||
|
||||
+2
-2
@@ -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) {
|
||||
|
||||
+2
-2
@@ -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)
|
||||
gIntroState.timer = 120;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "audio.h"
|
||||
#include "random.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void (*const gUnk_0811BDCC[])(ItemBehavior* beh, u32);
|
||||
|
||||
@@ -26,10 +27,10 @@ void ItemPegasusBoots(ItemBehavior* this, u32 arg1) {
|
||||
if (((gPlayerState.flags.all & 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) {
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ void AgbMain(void) {
|
||||
gMain.ticks++;
|
||||
sScreenHandlers[gMain.screen]();
|
||||
MessageUpdate();
|
||||
sub_08050154();
|
||||
UpdateFade();
|
||||
SoundLoop();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
@@ -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);
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "textbox.h"
|
||||
#include "script.h"
|
||||
#include "utils.h"
|
||||
#include "tiles.h"
|
||||
|
||||
void sub_08058ECC(ManagerF*);
|
||||
|
||||
@@ -335,7 +336,7 @@ 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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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*);
|
||||
@@ -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);
|
||||
|
||||
@@ -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
-1
@@ -3,6 +3,7 @@
|
||||
#include "script.h"
|
||||
#include "audio.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
const u8 gUnk_08114134[];
|
||||
const u8 gUnk_08114144[];
|
||||
@@ -55,7 +56,7 @@ void sub_0806D944(Entity* this) {
|
||||
|
||||
// Ezlo Angry FX
|
||||
void sub_0806D96C(Entity* this) {
|
||||
Entity* fx = CreateFx(this, 0x42, 0);
|
||||
Entity* fx = CreateFx(this, FX_STEAM_EFC, 0);
|
||||
if (fx != NULL) {
|
||||
fx->spritePriority.b0 = 1;
|
||||
PositionRelative(this, fx, 0, 0xFFE80000);
|
||||
|
||||
+3
-2
@@ -3,6 +3,7 @@
|
||||
#include "functions.h"
|
||||
#include "textbox.h"
|
||||
#include "script.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void (*gUnk_08111A80[])(Entity*);
|
||||
extern void (*gUnk_08111A8C[])(Entity*);
|
||||
@@ -79,13 +80,13 @@ void sub_080693D0(Entity* this) {
|
||||
}
|
||||
|
||||
void sub_08069428(Entity* this, s32 offsetX, bool32 createFx65) {
|
||||
Entity* fx = CreateFx(this, 4, 0);
|
||||
Entity* fx = CreateFx(this, FX_ROCK, 0);
|
||||
if (fx) {
|
||||
PositionRelative(this, fx, offsetX, 0xFFF00000);
|
||||
ResolveEntityOnTop(this, fx);
|
||||
}
|
||||
if (createFx65 != 0) {
|
||||
fx = CreateFx(this, 65, 0);
|
||||
fx = CreateFx(this, FX_REFLECT4, 0);
|
||||
if (fx) {
|
||||
PositionRelative(this, fx, offsetX, 0xFFF00000);
|
||||
ResolveEntityOnTop(this, fx);
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
#include "entity.h"
|
||||
#include "textbox.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void sub_08063280();
|
||||
|
||||
@@ -58,5 +59,5 @@ void sub_08063280(Entity* this, u32 unused) {
|
||||
var = e->frames.all & 0x7F;
|
||||
e->frames.all ^= var;
|
||||
if (var == 2)
|
||||
CreateFx(e, 49, 0);
|
||||
CreateFx(e, FX_MAILBOX_UNUSED, 0);
|
||||
}
|
||||
|
||||
+2
-1
@@ -6,6 +6,7 @@
|
||||
#include "random.h"
|
||||
#include "audio.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void sub_08068780(Entity*);
|
||||
extern s32 sub_0806EDD8(Entity*, u32, u32);
|
||||
@@ -91,7 +92,7 @@ void sub_08068780(Entity* this) {
|
||||
} else {
|
||||
EnqueueSFX(gUnk_08111538[(s32)Random() % 3]);
|
||||
}
|
||||
ent = CreateFx(this, 0x3d, 0x20);
|
||||
ent = CreateFx(this, FX_STARS2, 0x20);
|
||||
if (ent != NULL) {
|
||||
PositionRelative(this, ent, 0x180000, -0xa0000);
|
||||
}
|
||||
|
||||
+2
-1
@@ -6,6 +6,7 @@
|
||||
#include "flags.h"
|
||||
#include "script.h"
|
||||
#include "save.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void sub_0806B41C(Entity*);
|
||||
extern void sub_0806B3CC(Entity*);
|
||||
@@ -63,7 +64,7 @@ void sub_0806B41C(Entity* this) {
|
||||
this->action = 1;
|
||||
this->spriteSettings.b.draw = 1;
|
||||
if (this->type2 == 2) {
|
||||
CreateFx(this, 0x25, 0);
|
||||
CreateFx(this, FX_SWEAT, 0);
|
||||
}
|
||||
sub_0807DD50(this);
|
||||
}
|
||||
|
||||
+2
-1
@@ -9,6 +9,7 @@
|
||||
#include "save.h"
|
||||
#include "script.h"
|
||||
#include "flags.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void sub_08060528(Entity*);
|
||||
extern void sub_0806EE04(Entity*, void*, u32);
|
||||
@@ -99,7 +100,7 @@ void sub_080604DC(Entity* this) {
|
||||
if (((u32)(this->spriteSettings.raw << 0x1e) >> 0x1e == 1) && sub_080040A8(this)) {
|
||||
if ((this->frames.all & 1) != 0) {
|
||||
this->frames.all &= 0xfe;
|
||||
ent = CreateFx(this, 0x11, 0x40);
|
||||
ent = CreateFx(this, FX_DASH, 0x40);
|
||||
if (ent != NULL) {
|
||||
ent->y.HALF.HI++;
|
||||
sub_0805E3A0(ent, 3);
|
||||
|
||||
+2
-1
@@ -7,6 +7,7 @@
|
||||
#include "npc.h"
|
||||
#include "audio.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void sub_08078850(Entity*, u32, u32, u32*);
|
||||
|
||||
@@ -43,7 +44,7 @@ void Smith(Entity* this) {
|
||||
}
|
||||
if ((this->frames.all & 1) != 0) {
|
||||
this->frames.all &= 0xfe;
|
||||
CreateFx(this, 0x3d, 0x20);
|
||||
CreateFx(this, FX_STARS2, 0x20);
|
||||
SoundReq(gUnk_08110380[(Random() & 7)]);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -3,6 +3,7 @@
|
||||
#include "textbox.h"
|
||||
#include "functions.h"
|
||||
#include "script.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void sub_08062CA4();
|
||||
|
||||
@@ -57,7 +58,7 @@ void sub_08062C7C(Entity* ent) {
|
||||
ent->action = 1;
|
||||
sub_0807DD64(ent);
|
||||
InitializeAnimation(ent, 0);
|
||||
CreateFx(ent, 37, 0);
|
||||
CreateFx(ent, FX_SWEAT, 0);
|
||||
sub_08062CA4(ent);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "random.h"
|
||||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
typedef struct {
|
||||
u8 frame1;
|
||||
@@ -228,7 +229,7 @@ void sub_08061E90(Entity* this, Entity* arg1) {
|
||||
void sub_08061F94(Entity* this) {
|
||||
Entity* ent;
|
||||
|
||||
ent = CreateFx(this, 0x35, 0);
|
||||
ent = CreateFx(this, FX_BIG_EXPLOSION, 0);
|
||||
if (ent != NULL) {
|
||||
ResolveEntityOnTop(this, ent);
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "flags.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void sub_08098E3C(Entity*);
|
||||
extern void sub_08098E88(Entity*);
|
||||
@@ -43,7 +44,7 @@ void sub_08098D6C(Entity* this) {
|
||||
if (CheckFlags(this->field_0x86.HWORD)) {
|
||||
this->action = 2;
|
||||
this->actionDelay = 0x2d;
|
||||
ent = CreateFx(this, 0x43, 0);
|
||||
ent = CreateFx(this, FX_BIG_EXPLOSION2, 0);
|
||||
if (ent != NULL) {
|
||||
ent->y.HALF.HI += 8;
|
||||
}
|
||||
|
||||
+2
-1
@@ -6,6 +6,7 @@
|
||||
#include "random.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void (*const gUnk_08123EC0[])(Entity*);
|
||||
extern void (*const gUnk_08123EEC[])(Entity*);
|
||||
@@ -99,7 +100,7 @@ void sub_0809D0AC(Entity* this) {
|
||||
this->collisionLayer = 1;
|
||||
SetLocalFlag(0x45);
|
||||
SoundReq(SFX_SECRET);
|
||||
fx = CreateFx(this, 0x11, 0);
|
||||
fx = CreateFx(this, FX_DASH, 0);
|
||||
if (fx != NULL) {
|
||||
sub_0806FAD8(this, fx);
|
||||
}
|
||||
|
||||
+2
-1
@@ -5,6 +5,7 @@
|
||||
#include "flags.h"
|
||||
#include "room.h"
|
||||
#include "textbox.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void (*const BookActionFuncs[])(Entity*);
|
||||
extern s8 const gUnk_08123D94[];
|
||||
@@ -135,7 +136,7 @@ void sub_0809B56C(Entity* this) {
|
||||
|
||||
SetFlag(this->field_0x86.HWORD);
|
||||
|
||||
fx = CreateFx(this, 2, 0);
|
||||
fx = CreateFx(this, FX_DEATH, 0);
|
||||
if (fx) {
|
||||
ResolveEntityOnTop(this, fx);
|
||||
}
|
||||
|
||||
+3
-2
@@ -4,6 +4,7 @@
|
||||
#include "room.h"
|
||||
#include "audio.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void (*const gUnk_0811EE38[])(Entity*);
|
||||
|
||||
@@ -231,13 +232,13 @@ u32 sub_08081F00(u32* unk1, u32* unk2) {
|
||||
}
|
||||
|
||||
void sub_08081F24(Entity* this) {
|
||||
Entity* fx = CreateFx(this, 0x11, 0x40);
|
||||
Entity* fx = CreateFx(this, FX_DASH, 0x40);
|
||||
if (fx) {
|
||||
fx->scriptedScene = 3;
|
||||
fx->x.HALF.HI += 7;
|
||||
fx->y.HALF.HI += 5;
|
||||
}
|
||||
fx = CreateFx(this, 0x11, 0x40);
|
||||
fx = CreateFx(this, FX_DASH, 0x40);
|
||||
if (fx) {
|
||||
fx->scriptedScene = 3;
|
||||
fx->x.HALF.HI -= 7;
|
||||
|
||||
@@ -0,0 +1,181 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "flags.h"
|
||||
#include "functions.h"
|
||||
#include "area.h"
|
||||
#include "audio.h"
|
||||
|
||||
extern void (*gUnk_08121488[])(Entity*);
|
||||
|
||||
extern u32 sub_08057810(void);
|
||||
extern void CreateMagicSparkles(u32, u32, u32);
|
||||
|
||||
u32 sub_0808C128(Entity*);
|
||||
void sub_0808C13C(Entity*);
|
||||
void sub_0808C148(Entity*, u32);
|
||||
void sub_0808C01C(Entity*, u32);
|
||||
|
||||
void JarPortal(Entity* this) {
|
||||
gUnk_08121488[this->action](this);
|
||||
}
|
||||
|
||||
void sub_0808BE9C(Entity* this) {
|
||||
this->flags |= 0x80;
|
||||
this->damageType = 1;
|
||||
this->field_0x3c = 0x47;
|
||||
this->field_0x40 = 0x44;
|
||||
this->flags2 = 0x80;
|
||||
this->field_0x68.HALF.LO = 0;
|
||||
if (CheckLocalFlag(this->type)) {
|
||||
if (this->field_0x7c.BYTES.byte0 != 0) {
|
||||
this->action = 1;
|
||||
InitAnimationForceUpdate(this, 0);
|
||||
} else {
|
||||
this->action = 3;
|
||||
InitAnimationForceUpdate(this, 1);
|
||||
}
|
||||
} else {
|
||||
if (this->field_0x7c.BYTES.byte0 == 0) {
|
||||
this->action = 1;
|
||||
InitAnimationForceUpdate(this, 0);
|
||||
} else {
|
||||
this->action = 3;
|
||||
InitAnimationForceUpdate(this, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0808BF14(Entity* this) {
|
||||
if (sub_0808C128(this)) {
|
||||
this->action++;
|
||||
sub_0808C13C(this);
|
||||
if (this->field_0x7c.BYTES.byte0 == 0) {
|
||||
SetLocalFlag(this->type);
|
||||
} else {
|
||||
ClearLocalFlag(this->type);
|
||||
}
|
||||
sub_0808C148(this, 0);
|
||||
}
|
||||
sub_0808C01C(this, 0);
|
||||
}
|
||||
|
||||
void sub_0808BF58(Entity* this) {
|
||||
sub_08003FC4(this, 0x2000);
|
||||
switch (this->subAction) {
|
||||
case 0:
|
||||
if (this->field_0x20 <= 98303) {
|
||||
++this->subAction;
|
||||
InitAnimationForceUpdate(this, 2);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (!this->height.HALF.HI) {
|
||||
++this->subAction;
|
||||
this->field_0x20 = 0x8000;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (!this->height.HALF.HI) {
|
||||
++this->action;
|
||||
this->field_0xf = 0;
|
||||
InitAnimationForceUpdate(this, 1);
|
||||
sub_0808C148(this, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0808BFD8(Entity* this) {
|
||||
if (sub_0808C128(this)) {
|
||||
++this->action;
|
||||
sub_0808C13C(this);
|
||||
if (!this->field_0x7c.BYTES.byte0)
|
||||
ClearLocalFlag(this->type);
|
||||
else
|
||||
SetLocalFlag(this->type);
|
||||
sub_0808C148(this, 0);
|
||||
}
|
||||
sub_0808C01C(this, 1);
|
||||
}
|
||||
|
||||
void sub_0808C01C(Entity* this, u32 r1) {
|
||||
if (CheckPlayerProximity(this->x.HALF.HI - 0x18, this->y.HALF.HI - 0x18, 0x30, 0x30)) {
|
||||
u32 type;
|
||||
gArea.curPortalX = this->x.HALF.HI;
|
||||
gArea.curPortalY = this->y.HALF.HI;
|
||||
gArea.curPortalExitDirection = 2;
|
||||
type = 4;
|
||||
if (r1 != 0)
|
||||
type = 2;
|
||||
gArea.curPortalType = type;
|
||||
if (r1 == 1) {
|
||||
if (((gPlayerState.flags.all & 0x20) != 0) && (gPlayerState.jumpStatus == 0)) {
|
||||
gArea.field_0x18 = 2;
|
||||
} else {
|
||||
if (sub_08057810() != 0) {
|
||||
gArea.field_0x18 = 3;
|
||||
}
|
||||
}
|
||||
CreateMagicSparkles(this->x.HALF.HI, this->y.HALF.HI, this->collisionLayer);
|
||||
if (this->field_0xf == 0) {
|
||||
this->field_0xf = 1;
|
||||
SoundReq(SFX_NEAR_PORTAL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0808C0AC(Entity* this) {
|
||||
sub_08003FC4(this, 0x2000);
|
||||
switch (this->subAction) {
|
||||
case 0:
|
||||
if (this->field_0x20 <= 98303) {
|
||||
this->subAction = 1;
|
||||
InitAnimationForceUpdate(this, 3);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (!this->height.HALF.HI) {
|
||||
++this->subAction;
|
||||
this->field_0x20 = 0x8000;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
UpdateAnimationSingleFrame(this);
|
||||
if (!this->height.HALF.HI) {
|
||||
this->action = 1;
|
||||
InitAnimationForceUpdate(this, 0);
|
||||
sub_0808C148(this, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
u32 sub_0808C128(Entity* this) {
|
||||
return this->bitfield == 157;
|
||||
}
|
||||
|
||||
void sub_0808C13C(Entity* this) {
|
||||
this->subAction = 0;
|
||||
this->field_0x20 = 163840;
|
||||
}
|
||||
|
||||
void sub_0808C148(Entity* this, u32 a2) {
|
||||
u32 pos;
|
||||
|
||||
pos = COORD_TO_TILE(this);
|
||||
if (!a2) {
|
||||
SetTile(16530, pos - 1, this->collisionLayer);
|
||||
SetTile(16531, pos, this->collisionLayer);
|
||||
SetTile(16532, pos + 63, this->collisionLayer);
|
||||
SetTile(16533, pos + 64, this->collisionLayer);
|
||||
} else {
|
||||
sub_0807BA8C(pos - 1, this->collisionLayer);
|
||||
sub_0807BA8C(pos, this->collisionLayer);
|
||||
sub_0807BA8C(pos + 63, this->collisionLayer);
|
||||
sub_0807BA8C(pos + 64, this->collisionLayer);
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "game.h"
|
||||
#include "audio.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
void sub_08083338(Entity*);
|
||||
void sub_080834B4(Entity*);
|
||||
@@ -315,12 +316,12 @@ u32 sub_080837B0(Entity* this) {
|
||||
void sub_08083814(Entity* this, u32 unk0) {
|
||||
Entity* fx;
|
||||
const struct_0811F730* tmp = &gUnk_0811F730[unk0];
|
||||
fx = CreateFx(this, 0x11, 0x40);
|
||||
fx = CreateFx(this, FX_DASH, 0x40);
|
||||
if (fx) {
|
||||
fx->x.HALF.HI += tmp->unk_00.x;
|
||||
fx->y.HALF.HI += tmp->unk_00.y;
|
||||
}
|
||||
fx = CreateFx(this, 0x11, 0x40);
|
||||
fx = CreateFx(this, FX_DASH, 0x40);
|
||||
if (fx) {
|
||||
fx->x.HALF.HI += tmp->unk_02.x;
|
||||
fx->y.HALF.HI += tmp->unk_02.y;
|
||||
|
||||
+2
-1
@@ -6,6 +6,7 @@
|
||||
#include "player.h"
|
||||
#include "flags.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void (*MaskActionFuncs[])(Entity*);
|
||||
|
||||
@@ -111,7 +112,7 @@ void sub_08092B0C(Entity* this) {
|
||||
break;
|
||||
}
|
||||
|
||||
CreateFx(this, 5, 0);
|
||||
CreateFx(this, FX_POT_SHATTER, 0);
|
||||
|
||||
sub_0805457C(this, 3);
|
||||
} else {
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "flags.h"
|
||||
#include "audio.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern u32 sub_08083734(Entity*, u32);
|
||||
extern void sub_080A080C(Entity*);
|
||||
@@ -56,12 +57,12 @@ void sub_080A074C(Entity* this) {
|
||||
this->height.HALF.HI = 0;
|
||||
this->x.HALF.HI = this->field_0x70.HALF.LO;
|
||||
this->y.HALF.HI = this->field_0x70.HALF.HI;
|
||||
ent = CreateFx(this, 0x11, 0x40);
|
||||
ent = CreateFx(this, FX_DASH, 0x40);
|
||||
if (ent != NULL) {
|
||||
ent->x.HALF.HI += 0xc;
|
||||
ent->y.HALF.HI -= 0xc;
|
||||
}
|
||||
ent = CreateFx(this, 0x11, 0x40);
|
||||
ent = CreateFx(this, FX_DASH, 0x40);
|
||||
if (ent != NULL) {
|
||||
ent->x.HALF.HI -= 0xc;
|
||||
ent->y.HALF.HI -= 0xc;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "audio.h"
|
||||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
void sub_0809F318(Entity*);
|
||||
void sub_0809F374(Entity*);
|
||||
@@ -85,7 +86,7 @@ void sub_0809F408(Entity* this) {
|
||||
switch (this->frames.all) {
|
||||
case 9:
|
||||
this->frames.all = 0;
|
||||
CreateFx(this, 0x43, 0);
|
||||
CreateFx(this, FX_BIG_EXPLOSION2, 0);
|
||||
gMenu.field_0x0 = 1;
|
||||
break;
|
||||
case 0x80:
|
||||
|
||||
+6
-5
@@ -5,6 +5,7 @@
|
||||
#include "room.h"
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
void sub_08082824(Entity*);
|
||||
static void sub_08082850(Entity*, Entity*);
|
||||
@@ -97,7 +98,7 @@ void sub_08082310(Entity* this) {
|
||||
break;
|
||||
default:
|
||||
if (sub_080002B8(this) == 13) {
|
||||
CreateFx(this, 0, 0);
|
||||
CreateFx(this, FX_FALL_DOWN, 0);
|
||||
} else if (tileType == 0x4005) {
|
||||
gPlayerState.field_0xab = 4;
|
||||
SetTile((u16)this->field_0x70.HALF.LO, COORD_TO_TILE(this), this->collisionLayer);
|
||||
@@ -137,13 +138,13 @@ void sub_08082588(Entity* this) {
|
||||
void sub_0808259C(Entity* this) {
|
||||
switch (sub_080043E8(this)) {
|
||||
case 2:
|
||||
CreateFx(this, 11, 0);
|
||||
CreateFx(this, FX_WATER_SPLASH, 0);
|
||||
break;
|
||||
case 1:
|
||||
CreateFx(this, 0, 0);
|
||||
CreateFx(this, FX_FALL_DOWN, 0);
|
||||
break;
|
||||
case 3:
|
||||
CreateFx(this, 12, 0);
|
||||
CreateFx(this, FX_LAVA_SPLASH, 0);
|
||||
break;
|
||||
default:
|
||||
sub_08082850(this, &gPlayerEntity);
|
||||
@@ -261,7 +262,7 @@ void sub_08082824(Entity* this) {
|
||||
|
||||
static void sub_08082850(Entity* this, Entity* parent) {
|
||||
u32 parameter = sub_0808288C(this, this->type, this->field_0x7c.BYTES.byte1, this->type2);
|
||||
Entity* fxEntity = CreateFx(this, 5, parameter);
|
||||
Entity* fxEntity = CreateFx(this, FX_POT_SHATTER, parameter);
|
||||
if (fxEntity) {
|
||||
fxEntity->parent = parent;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "room.h"
|
||||
#include "structures.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void sub_0809E96C(Entity*);
|
||||
extern void CreateSparkle(Entity*);
|
||||
@@ -70,7 +71,7 @@ void sub_0809E918(Entity* this) {
|
||||
Entity* fx;
|
||||
s16* i = gUnk_08124364;
|
||||
while (*i != -1000) {
|
||||
fx = CreateFx(this, 3, 0);
|
||||
fx = CreateFx(this, FX_BUSH, 0);
|
||||
if (fx != NULL) {
|
||||
fx->x.HALF.HI += i[0];
|
||||
fx->y.HALF.HI += i[1];
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "save.h"
|
||||
#include "script.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void sub_08078850(Entity*, u32, u32, u8*);
|
||||
|
||||
@@ -26,5 +27,5 @@ void sub_080A2124(Entity* this) {
|
||||
void Windcrest_Unlock(Entity* this) {
|
||||
SoundReq(SFX_SECRET);
|
||||
gSave.windcrests = gSave.windcrests | 1 << (this->type2 + 0x18);
|
||||
CreateFx(this, 0x46, 0);
|
||||
CreateFx(this, FX_GIANT_EXPLOSION, 0);
|
||||
}
|
||||
|
||||
+5
-4
@@ -10,6 +10,7 @@
|
||||
#include "object.h"
|
||||
#include "functions.h"
|
||||
#include "object.h"
|
||||
#include "effects.h"
|
||||
|
||||
static void (*const sPlayerActions[])(Entity*);
|
||||
extern void (*const gUnk_0811BA60[])(Entity*);
|
||||
@@ -501,7 +502,7 @@ void sub_0807127C(Entity* this) {
|
||||
if ((gPlayerState.flags.all & 0x10000) == 0)
|
||||
sub_08004168(this);
|
||||
|
||||
CreateFx(this, 11, 0);
|
||||
CreateFx(this, FX_WATER_SPLASH, 0);
|
||||
|
||||
if ((gPlayerState.flags.all & 8) == 0)
|
||||
gPlayerState.field_0x8 = 0x72c;
|
||||
@@ -1143,7 +1144,7 @@ void sub_08072008(Entity* this) {
|
||||
this->flags |= 0x80;
|
||||
this->spriteOffsetX = 0;
|
||||
gPlayerState.flags.all &= ~(0x800 | 0x1);
|
||||
CreateFx(this, 0xd, 0);
|
||||
CreateFx(this, FX_ICE, 0);
|
||||
sub_080791BC();
|
||||
}
|
||||
|
||||
@@ -1305,7 +1306,7 @@ void sub_08072354(Entity* this) {
|
||||
gPlayerState.field_0x8 = 0x2c1;
|
||||
gPlayerState.flags.all &= ~0x400;
|
||||
UpdateSpriteForCollisionLayer(this);
|
||||
CreateFx(this, 0xc, 0);
|
||||
CreateFx(this, FX_LAVA_SPLASH, 0);
|
||||
SoundReq(SFX_1A6);
|
||||
}
|
||||
|
||||
@@ -1459,7 +1460,7 @@ void sub_080726F4(Entity* this) {
|
||||
|
||||
this->direction = (this->animationState & 6) << 2;
|
||||
if (((gPlayerState.flags.all & 0x80) == 0) && (--this->actionDelay == 0xff)) {
|
||||
CreateFx(&gPlayerEntity, 0x11, 0x40);
|
||||
CreateFx(&gPlayerEntity, FX_DASH, 0x40);
|
||||
this->actionDelay = 4;
|
||||
}
|
||||
if ((gPlayerState.flags.all & 2) == 0) {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "functions.h"
|
||||
#include "player.h"
|
||||
#include "room.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void (*const gUnk_08109AC8[])(Entity*);
|
||||
extern Hitbox gUnk_08109AD0;
|
||||
@@ -46,11 +47,11 @@ void sub_0805FC74(Entity* this) {
|
||||
}
|
||||
if (!sub_080002F0(COORD_TO_TILE(this), gPlayerEntity.collisionLayer, 0x80) &&
|
||||
sub_080040D8(this, &gUnk_08003E44, this->x.HALF.HI, this->y.HALF.HI)) {
|
||||
CreateFx(this, 0x19, 0);
|
||||
CreateFx(this, FX_SWORD_MAGIC, 0);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
if (this->bitfield != 0) {
|
||||
CreateFx(this, 0x19, 0);
|
||||
CreateFx(this, FX_SWORD_MAGIC, 0);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "entity.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void (*const gUnk_080B3E30[])(Entity*);
|
||||
|
||||
@@ -33,6 +34,6 @@ void sub_08019444(Entity* this) {
|
||||
|
||||
void sub_08019468(Entity* this) {
|
||||
if (this->field_0x40 == 0x0e) {
|
||||
CreateFx(this, 0x50, 0);
|
||||
CreateFx(this, FX_REFLECT5, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "coord.h"
|
||||
#include "functions.h"
|
||||
#include "audio.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void (*const gUnk_080B43F4[])(Entity*);
|
||||
|
||||
@@ -70,11 +71,11 @@ void sub_08019580(Entity* this) {
|
||||
}
|
||||
if ((sub_080002F0(TILE(this->x.HALF.HI, this->y.HALF.HI), gPlayerEntity.collisionLayer, 0x80) == 0) &&
|
||||
(sub_080040D8(this, &gUnk_08003E44, this->x.HALF.HI, this->y.HALF.HI) != 0)) {
|
||||
CreateFx(this, 0x19, 0);
|
||||
CreateFx(this, FX_SWORD_MAGIC, 0);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
if (this->bitfield != 0) {
|
||||
CreateFx(this, 0x19, 0);
|
||||
CreateFx(this, FX_SWORD_MAGIC, 0);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
if (sub_08008790(this, 0xc) != NULL) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "entity.h"
|
||||
#include "enemy.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void CreateItemOnGround(Entity*);
|
||||
extern s32 sub_080AF090(Entity*);
|
||||
@@ -46,7 +47,7 @@ void CannonballProjectile_Init(Entity* this) {
|
||||
void CannonballProjectile_Action1(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
if (sub_080AF090(this) == 0) {
|
||||
CreateFx(this, 2, 0);
|
||||
CreateFx(this, FX_DEATH, 0);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
sub_080AB5F4(this);
|
||||
@@ -56,7 +57,7 @@ void CannonballProjectile_Action2(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
sub_080AF090(this);
|
||||
if ((sub_080AB634(this) == 0) && (this->collisions != 0)) {
|
||||
CreateFx(this, 2, 0);
|
||||
CreateFx(this, FX_DEATH, 0);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
@@ -85,7 +86,7 @@ bool32 sub_080AB634(Entity* this) {
|
||||
entities[i]->action = 3;
|
||||
entities[i]->actionDelay = 0x1e;
|
||||
entities[i]->spriteSettings.b.draw = 0;
|
||||
CreateFx(entities[i], 0x45, 0);
|
||||
CreateFx(entities[i], FX_WHITE_ROCK, 0);
|
||||
}
|
||||
DeleteEntity(this);
|
||||
return TRUE;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "player.h"
|
||||
#include "coord.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void sub_08078954(Entity*);
|
||||
|
||||
@@ -129,13 +130,13 @@ void DirtBallProjectile_Action2(Entity* this) {
|
||||
if (tmp != 0) {
|
||||
switch (tmp) {
|
||||
case 2:
|
||||
CreateFx(this, 0xb, 0);
|
||||
CreateFx(this, FX_WATER_SPLASH, 0);
|
||||
break;
|
||||
case 1:
|
||||
CreateFx(this, 0, 0);
|
||||
CreateFx(this, FX_FALL_DOWN, 0);
|
||||
break;
|
||||
case 3:
|
||||
CreateFx(this, 0xc, 0);
|
||||
CreateFx(this, FX_LAVA_SPLASH, 0);
|
||||
break;
|
||||
}
|
||||
DeleteThisEntity();
|
||||
@@ -148,7 +149,7 @@ void DirtBallProjectile_Action2(Entity* this) {
|
||||
this->action = 3;
|
||||
return;
|
||||
case 2:
|
||||
entity = CreateFx(this, 5, 0x80);
|
||||
entity = CreateFx(this, FX_POT_SHATTER, 0x80);
|
||||
if (entity != NULL) {
|
||||
entity->parent = NULL;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "functions.h"
|
||||
#include "random.h"
|
||||
#include "audio.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void sub_0806F5BC(Entity*, u32, u32);
|
||||
extern u32 sub_080041DC(Entity*, u32, u32);
|
||||
@@ -90,7 +91,7 @@ void GleerokProjectile_Action1(Entity* this) {
|
||||
if (this->type == 3) {
|
||||
if (sub_08003FC4(this, 0x1800) == 0) {
|
||||
sub_08008790(this, 7);
|
||||
CreateFx(this, 4, 0);
|
||||
CreateFx(this, FX_ROCK, 0);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "enemy.h"
|
||||
#include "functions.h"
|
||||
#include "player.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void sub_0800449C(Entity*, u32);
|
||||
extern void sub_08079D84(void);
|
||||
@@ -26,7 +27,7 @@ void nullsub_539(Entity* this) {
|
||||
|
||||
void sub_080A9CF0(Entity* this) {
|
||||
if (sub_0806F520() == 0) {
|
||||
CreateFx(this, 2, 0);
|
||||
CreateFx(this, FX_DEATH, 0);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
LakituCloudProjectile_SubActions[this->subAction](this);
|
||||
@@ -46,7 +47,7 @@ void LakituCloudProjectile_SubAction2(Entity* this) {
|
||||
sub_0800449C(&gPlayerEntity, 0x7a);
|
||||
sub_08079D84();
|
||||
}
|
||||
CreateFx(this, 2, 0);
|
||||
CreateFx(this, FX_DEATH, 0);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "entity.h"
|
||||
#include "enemy.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern s32 sub_080AF090(Entity*);
|
||||
extern s32 sub_080A7EB0(Entity*);
|
||||
@@ -35,7 +36,7 @@ void LakituLightning_Action1(Entity* this) {
|
||||
GetNextFrame(this);
|
||||
sub_080AF090(this);
|
||||
if ((this->collisions != 0) || (--this->actionDelay == 0)) {
|
||||
CreateFx(this, 0x4f, 0);
|
||||
CreateFx(this, FX_BLUE_EFC, 0);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
if (sub_080A7EB0(this) != 0) {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "random.h"
|
||||
#include "functions.h"
|
||||
#include "audio.h"
|
||||
#include "effects.h"
|
||||
|
||||
void OctorokBossProjectile_Action2(Entity*);
|
||||
extern void sub_080AE58C(Entity*, u32, u32);
|
||||
@@ -183,14 +184,14 @@ void OctorokBossProjectile_Action1(Entity* this) {
|
||||
if (sub_08003FC4(this, 0x1800) != 0) {
|
||||
return;
|
||||
}
|
||||
CreateFx(this, 4, 0);
|
||||
CreateFx(this, FX_ROCK, 0);
|
||||
DeleteThisEntity();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OctorokBossProjectile_Action2(Entity* this) {
|
||||
CreateFx(this, 4, 0);
|
||||
CreateFx(this, FX_ROCK, 0);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "entity.h"
|
||||
#include "enemy.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void (*const StalfosProjectile_Functions[])(Entity*);
|
||||
extern void (*const StalfosProjectile_Actions[])(Entity*);
|
||||
@@ -126,9 +127,9 @@ void StalfosProjectile_Action3(Entity* this) {
|
||||
|
||||
void sub_080A9BA8(Entity* this) {
|
||||
if (this->type == 0) {
|
||||
CreateFx(this, 5, 0);
|
||||
CreateFx(this, FX_POT_SHATTER, 0);
|
||||
} else {
|
||||
CreateFx(this, 0x3c, 0);
|
||||
CreateFx(this, FX_BONE, 0);
|
||||
}
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "functions.h"
|
||||
#include "random.h"
|
||||
#include "audio.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern void (*const V2Projectile_Functions[])(Entity*);
|
||||
extern void (*const gUnk_0812A7EC[])(Entity*);
|
||||
@@ -26,7 +27,7 @@ ASM_FUNC("asm/non_matching/v2Projectile/sub_080ABBF4.inc", void sub_080ABBF4(Ent
|
||||
|
||||
void sub_080ABC54(Entity* this) {
|
||||
if (sub_0806F520() == 0) {
|
||||
CreateFx(this, 2, 0);
|
||||
CreateFx(this, FX_DEATH, 0);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
gUnk_0812A808[this->subAction](this);
|
||||
@@ -44,7 +45,7 @@ void sub_080ABC90(Entity* this) {
|
||||
ModHealth(-2);
|
||||
sub_0800449C(&gPlayerEntity, 0x7a);
|
||||
sub_08079D84();
|
||||
CreateFx(this, 2, 0);
|
||||
CreateFx(this, FX_DEATH, 0);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
@@ -96,7 +97,7 @@ ASM_FUNC("asm/non_matching/v2Projectile/sub_080ABE04.inc", void sub_080ABE04(Ent
|
||||
|
||||
void sub_080ABE88(Entity* this) {
|
||||
if (sub_08003FC4(this, 0x1800) == 0) {
|
||||
CreateFx(this, 4, 0);
|
||||
CreateFx(this, FX_ROCK, 0);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "enemy.h"
|
||||
#include "audio.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
extern s32 sub_080AF090(Entity*);
|
||||
extern s32 sub_080A7EB0(Entity*);
|
||||
@@ -56,7 +57,7 @@ void sub_080ACB90(Entity* this) {
|
||||
Entity* parent = this->parent;
|
||||
if ((this->x.HALF.HI == parent->x.HALF.HI) && (this->y.HALF.HI <= parent->y.HALF.HI)) {
|
||||
parent->field_0xf = 1;
|
||||
CreateFx(this, 0x1f, 0x40);
|
||||
CreateFx(this, FX_REFLECT2, 0x40);
|
||||
EnqueueSFX(SFX_ITEM_GLOVES_KNOCKBACK);
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
+4
-3
@@ -13,6 +13,7 @@
|
||||
#include "script.h"
|
||||
#include "random.h"
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
|
||||
void sub_0804B3C4(void* arg0) {
|
||||
sub_0804B29C(arg0);
|
||||
@@ -5825,7 +5826,7 @@ void sub_0804F5E8(void) {
|
||||
void sub_0804F680(Entity* parent, s32 x, s32 y) {
|
||||
Entity* fx;
|
||||
|
||||
fx = CreateFx(parent, 2, 0);
|
||||
fx = CreateFx(parent, FX_DEATH, 0);
|
||||
if (fx != NULL) {
|
||||
fx->x.HALF.HI = gRoomControls.roomOriginX + x;
|
||||
fx->y.HALF.HI = gRoomControls.roomOriginY + y;
|
||||
@@ -5866,13 +5867,13 @@ void sub_0804F760(Entity* this) {
|
||||
void sub_0804F79C(Entity* parent) {
|
||||
Entity* fx;
|
||||
|
||||
fx = CreateFx(parent, 0x35, 0);
|
||||
fx = CreateFx(parent, FX_BIG_EXPLOSION, 0);
|
||||
if (fx != NULL) {
|
||||
fx->spriteRendering.b3 = 0;
|
||||
fx->x.HALF.HI = gRoomControls.roomOriginX + 0x1b8;
|
||||
fx->y.HALF.HI = gRoomControls.roomOriginY + 0x148;
|
||||
}
|
||||
fx = CreateFx(parent, 0x35, 0);
|
||||
fx = CreateFx(parent, FX_BIG_EXPLOSION, 0);
|
||||
if (fx != NULL) {
|
||||
fx->spriteRendering.b3 = 0;
|
||||
fx->x.HALF.HI = gRoomControls.roomOriginX + 0x238;
|
||||
|
||||
+6
-5
@@ -12,6 +12,7 @@
|
||||
#include "audio.h"
|
||||
#include "functions.h"
|
||||
#include "main.h"
|
||||
#include "effects.h"
|
||||
|
||||
void InitScriptForEntity(Entity*, ScriptExecutionContext*, u16*);
|
||||
void InitScriptExecutionContext(ScriptExecutionContext* context, u16* script);
|
||||
@@ -74,7 +75,7 @@ void ScriptCommand_WaitForPlayerAction0x17(Entity* entity, ScriptExecutionContex
|
||||
void ScriptCommand_WaitFor_1(Entity* entity, ScriptExecutionContext* context);
|
||||
void ScriptCommand_WaitFor_2(Entity* entity, ScriptExecutionContext* context);
|
||||
void ScriptCommand_0807E778(Entity* entity, ScriptExecutionContext* context);
|
||||
void ScriptCommand_0807E788(Entity* entity, ScriptExecutionContext* context);
|
||||
void ScriptCommand_SetFadeMask(Entity* entity, ScriptExecutionContext* context);
|
||||
void ScriptCommand_0807E79C(Entity* entity, ScriptExecutionContext* context);
|
||||
void ScriptCommandNop2(Entity* entity, ScriptExecutionContext* context);
|
||||
void ScriptCommand_DoFade4(Entity* entity, ScriptExecutionContext* context);
|
||||
@@ -219,7 +220,7 @@ const ScriptCommand gScriptCommands[] = { ScriptCommandNop,
|
||||
ScriptCommand_WaitFor_1,
|
||||
ScriptCommand_WaitFor_2,
|
||||
ScriptCommand_0807E778,
|
||||
ScriptCommand_0807E788,
|
||||
ScriptCommand_SetFadeMask,
|
||||
ScriptCommand_0807E79C,
|
||||
ScriptCommandNop2,
|
||||
ScriptCommand_DoFade4,
|
||||
@@ -1004,8 +1005,8 @@ void ScriptCommand_0807E778(Entity* entity, ScriptExecutionContext* context) {
|
||||
gActiveScriptInfo.unk_08 = context->scriptInstructionPointer[1];
|
||||
}
|
||||
|
||||
void ScriptCommand_0807E788(Entity* entity, ScriptExecutionContext* context) {
|
||||
gFadeControl.field_0x4 = GetNextScriptCommandWordAfterCommandMetadata(context->scriptInstructionPointer);
|
||||
void ScriptCommand_SetFadeMask(Entity* entity, ScriptExecutionContext* context) {
|
||||
gFadeControl.mask = GetNextScriptCommandWordAfterCommandMetadata(context->scriptInstructionPointer);
|
||||
}
|
||||
|
||||
void ScriptCommand_0807E79C(Entity* entity, ScriptExecutionContext* context) {
|
||||
@@ -1684,7 +1685,7 @@ void sub_0807F360(Entity* entity, ScriptExecutionContext* context) {
|
||||
|
||||
void sub_0807F36C(Entity* entity, ScriptExecutionContext* context) {
|
||||
Entity* fx;
|
||||
fx = CreateFx(entity, 0x41, 0);
|
||||
fx = CreateFx(entity, FX_REFLECT4, 0);
|
||||
if (fx != NULL) {
|
||||
fx->spritePriority.b0 = 1;
|
||||
PositionRelative(entity, fx, 0, -524288);
|
||||
|
||||
+1
-1
@@ -6,5 +6,5 @@ extern u32 gUnk_020354C0;
|
||||
|
||||
void sub_08050008() {
|
||||
MemClear(&gUnk_020354C0, 128);
|
||||
gFadeControl.field_0x4 = -1;
|
||||
gFadeControl.mask = 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ Entity* sub_0805E374(Entity* param_1) {
|
||||
u8 r3 = gScreenTransition.field_0x24[8];
|
||||
u8* array = gUnk_081091F8;
|
||||
|
||||
if (r3 != '\x02') {
|
||||
if (r3 != 2) {
|
||||
array = gUnk_081091EE;
|
||||
}
|
||||
return sub_0805E3A0(param_1, array[param_1->kind]);
|
||||
|
||||
+23
-23
@@ -9,46 +9,46 @@ void sub_0807B7D8(u32 param_1, u32 param_2, u32 param_3) {
|
||||
sub_08000152(53);
|
||||
sub_0807B778(param_2, param_3);
|
||||
sub_0807B778(param_2 + 1, param_3);
|
||||
sub_0807B778(param_2 + -1, param_3);
|
||||
sub_0807B778(param_2 - 1, param_3);
|
||||
sub_0807B778(param_2 + 64, param_3);
|
||||
sub_0807B778(param_2 + -64, param_3);
|
||||
sub_0807B778(param_2 - 64, param_3);
|
||||
} else {
|
||||
SetTileType(param_1, param_2, param_3);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_0807B820(u32 param_1) {
|
||||
SetTileType(620, param_1 + -65, 1);
|
||||
SetTileType(627, param_1 + -65, 2);
|
||||
SetTileType(621, param_1 + -64, 1);
|
||||
SetTileType(628, param_1 + -64, 2);
|
||||
SetTileType(622, param_1 + -63, 1);
|
||||
SetTileType(629, param_1 + -63, 2);
|
||||
SetTileType(623, param_1 + -1, 1);
|
||||
SetTileType(620, param_1 - 65, 1);
|
||||
SetTileType(627, param_1 - 65, 2);
|
||||
SetTileType(621, param_1 - 64, 1);
|
||||
SetTileType(628, param_1 - 64, 2);
|
||||
SetTileType(622, param_1 - 63, 1);
|
||||
SetTileType(629, param_1 - 63, 2);
|
||||
SetTileType(623, param_1 - 1, 1);
|
||||
SetTileType(624, param_1, 1);
|
||||
SetTileType(626, param_1 + 1, 1);
|
||||
}
|
||||
|
||||
void sub_0807B8A8(u32 param_1) {
|
||||
SetTileType(636, param_1 + -65, 1);
|
||||
SetTileType(643, param_1 + -65, 2);
|
||||
SetTileType(637, param_1 + -64, 1);
|
||||
SetTileType(644, param_1 + -64, 2);
|
||||
SetTileType(638, param_1 + -63, 1);
|
||||
SetTileType(645, param_1 + -63, 2);
|
||||
SetTileType(639, param_1 + -1, 1);
|
||||
SetTileType(636, param_1 - 65, 1);
|
||||
SetTileType(643, param_1 - 65, 2);
|
||||
SetTileType(637, param_1 - 64, 1);
|
||||
SetTileType(644, param_1 - 64, 2);
|
||||
SetTileType(638, param_1 - 63, 1);
|
||||
SetTileType(645, param_1 - 63, 2);
|
||||
SetTileType(639, param_1 - 1, 1);
|
||||
SetTileType(640, param_1, 1);
|
||||
SetTileType(642, param_1 + 1, 1);
|
||||
}
|
||||
|
||||
void sub_0807B930(int param_1) {
|
||||
SetTileType(652, param_1 + -65, 1);
|
||||
SetTileType(659, param_1 + -65, 2);
|
||||
SetTileType(653, param_1 + -64, 1);
|
||||
SetTileType(660, param_1 + -64, 2);
|
||||
SetTileType(654, param_1 + -63, 1);
|
||||
SetTileType(661, param_1 + -63, 2);
|
||||
SetTileType(655, param_1 + -1, 1);
|
||||
SetTileType(652, param_1 - 65, 1);
|
||||
SetTileType(659, param_1 - 65, 2);
|
||||
SetTileType(653, param_1 - 64, 1);
|
||||
SetTileType(660, param_1 - 64, 2);
|
||||
SetTileType(654, param_1 - 63, 1);
|
||||
SetTileType(661, param_1 - 63, 2);
|
||||
SetTileType(655, param_1 - 1, 1);
|
||||
SetTileType(656, param_1, 1);
|
||||
SetTileType(658, param_1 + 1, 1);
|
||||
}
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ u32 sub_080A554C(u32 arg0) {
|
||||
|
||||
if (arg0 != 0) {
|
||||
for (i = 0; i < 17; i++) {
|
||||
if (arg0 == (&gUnk_02000090)[i])
|
||||
if (arg0 == gMenu.focusCoords[i])
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,5 @@
|
||||
extern u8 gUnk_08127D30[69];
|
||||
|
||||
u32 sub_08052654(u32 r0) {
|
||||
// u32 r1 = gUnk_08127D30;
|
||||
// u32 r1 = gUnk_08127D30;
|
||||
|
||||
return gUnk_08127D30[r0 * 4] == 129;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user