mirror of https://github.com/zeldaret/tmc.git
Use FX enum and add another sparkle to the enum
This commit is contained in:
parent
1ceeac3c84
commit
bf9df14832
|
@ -42,7 +42,7 @@ typedef enum {
|
||||||
FX_BROWN_SMOKE_LARGE,
|
FX_BROWN_SMOKE_LARGE,
|
||||||
FX_BROWN_SMOKE2,
|
FX_BROWN_SMOKE2,
|
||||||
FX_SWEAT,
|
FX_SWEAT,
|
||||||
FX_26,
|
FX_SPARKLE4,
|
||||||
FX_27,
|
FX_27,
|
||||||
FX_SLOW_EXPLOSION,
|
FX_SLOW_EXPLOSION,
|
||||||
FX_CONFETTI,
|
FX_CONFETTI,
|
||||||
|
|
|
@ -314,13 +314,13 @@ void sub_08030E80(EyegoreEntity* this) {
|
||||||
-11, 9, 11, 9, -9, -2, -8, 10, -11, -1, 11, -1, 9, -2, 8, 10,
|
-11, 9, 11, 9, -9, -2, -8, 10, -11, -1, 11, -1, 9, -2, 8, 10,
|
||||||
};
|
};
|
||||||
u32 tmp = super->animationState << 2;
|
u32 tmp = super->animationState << 2;
|
||||||
Entity* effect = CreateObject(SPECIAL_FX, 2, 0);
|
Entity* effect = CreateObject(SPECIAL_FX, FX_DEATH, 0);
|
||||||
if (effect != NULL) {
|
if (effect != NULL) {
|
||||||
CopyPosition(super, effect);
|
CopyPosition(super, effect);
|
||||||
effect->x.HALF.HI += gUnk_080CE2F4[tmp + 0];
|
effect->x.HALF.HI += gUnk_080CE2F4[tmp + 0];
|
||||||
effect->y.HALF.HI += gUnk_080CE2F4[tmp + 1];
|
effect->y.HALF.HI += gUnk_080CE2F4[tmp + 1];
|
||||||
}
|
}
|
||||||
effect = CreateObject(SPECIAL_FX, 2, 0);
|
effect = CreateObject(SPECIAL_FX, FX_DEATH, 0);
|
||||||
if (effect != NULL) {
|
if (effect != NULL) {
|
||||||
CopyPosition(super, effect);
|
CopyPosition(super, effect);
|
||||||
effect->x.HALF.HI += gUnk_080CE2F4[tmp + 2];
|
effect->x.HALF.HI += gUnk_080CE2F4[tmp + 2];
|
||||||
|
|
|
@ -353,7 +353,7 @@ bool32 sub_0802C0E8(Entity* this) {
|
||||||
void sub_0802C18C(Entity* this) {
|
void sub_0802C18C(Entity* this) {
|
||||||
this->field_0x78.HALF.LO--;
|
this->field_0x78.HALF.LO--;
|
||||||
if ((this->field_0x78.HALF.LO & 7) == 0) {
|
if ((this->field_0x78.HALF.LO & 7) == 0) {
|
||||||
Entity* ent = CreateObject(SPECIAL_FX, 0x11, 0x40);
|
Entity* ent = CreateObject(SPECIAL_FX, FX_DASH, 0x40);
|
||||||
if (ent != NULL) {
|
if (ent != NULL) {
|
||||||
PositionRelative(this, ent, 0, Q_16_16(1.0));
|
PositionRelative(this, ent, 0, Q_16_16(1.0));
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ void CreateMagicSparkles(u32 baseX, u32 baseY, u32 layer) {
|
||||||
r = Random();
|
r = Random();
|
||||||
if (r & 0x7)
|
if (r & 0x7)
|
||||||
return;
|
return;
|
||||||
spark = CreateObject(SPECIAL_FX, 0x26, 0);
|
spark = CreateObject(SPECIAL_FX, FX_SPARKLE4, 0);
|
||||||
if (spark == NULL)
|
if (spark == NULL)
|
||||||
return;
|
return;
|
||||||
offsetX = (r >> 0x8) & 0xF;
|
offsetX = (r >> 0x8) & 0xF;
|
||||||
|
|
|
@ -28,7 +28,7 @@ void sub_0806C224(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Simon_CreateChest(Entity* this) {
|
void Simon_CreateChest(Entity* this) {
|
||||||
CreateObjectWithParent(this, SPECIAL_FX, 0x43, 0);
|
CreateObjectWithParent(this, SPECIAL_FX, FX_BIG_EXPLOSION2, 0);
|
||||||
SetTileType(0x73, COORD_TO_TILE(this), this->collisionLayer);
|
SetTileType(0x73, COORD_TO_TILE(this), this->collisionLayer);
|
||||||
SoundReq(SFX_SECRET_BIG);
|
SoundReq(SFX_SECRET_BIG);
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ void sub_0806A26C(Entity* this) {
|
||||||
const s8* ptr;
|
const s8* ptr;
|
||||||
u32 uVar2, uVar1;
|
u32 uVar2, uVar1;
|
||||||
Entity* pEVar1;
|
Entity* pEVar1;
|
||||||
pEVar1 = CreateObject(SPECIAL_FX, 0x2f, 0);
|
pEVar1 = CreateObject(SPECIAL_FX, FX_SLOW_SMOKE_SMALL, 0);
|
||||||
if (pEVar1 != NULL) {
|
if (pEVar1 != NULL) {
|
||||||
PositionEntityOnTop(this, pEVar1);
|
PositionEntityOnTop(this, pEVar1);
|
||||||
uVar2 = uVar1 = Random();
|
uVar2 = uVar1 = Random();
|
||||||
|
|
|
@ -116,7 +116,7 @@ void sub_08099880(BigIceBlockEntity* this) {
|
||||||
uVar4 = (0x3c - super->timer) * 0x20 + 0x100;
|
uVar4 = (0x3c - super->timer) * 0x20 + 0x100;
|
||||||
SetAffineInfo(super, 0x100, uVar4, 0);
|
SetAffineInfo(super, 0x100, uVar4, 0);
|
||||||
sub_0806FCF4(super, uVar4, 2, 0);
|
sub_0806FCF4(super, uVar4, 2, 0);
|
||||||
obj = CreateObject(SPECIAL_FX, 0x11, 0x40);
|
obj = CreateObject(SPECIAL_FX, FX_DASH, 0x40);
|
||||||
if (obj != NULL) {
|
if (obj != NULL) {
|
||||||
rand = Random();
|
rand = Random();
|
||||||
x = ((rand >> 0x10) % 0x21) - 0x10;
|
x = ((rand >> 0x10) % 0x21) - 0x10;
|
||||||
|
|
|
@ -92,7 +92,7 @@ void FrozenWaterElement_Action2(FrozenWaterElementEntity* this) {
|
||||||
super->spriteOffsetY += 8;
|
super->spriteOffsetY += 8;
|
||||||
}
|
}
|
||||||
value = gUnk_08123DC0[this->unk_74 >> 5];
|
value = gUnk_08123DC0[this->unk_74 >> 5];
|
||||||
effect = CreateObject(SPECIAL_FX, 0x11, 0x40);
|
effect = CreateObject(SPECIAL_FX, FX_DASH, 0x40);
|
||||||
if (effect != NULL) {
|
if (effect != NULL) {
|
||||||
rand = Random();
|
rand = Random();
|
||||||
tmp = (((rand >> 0x10) & value) - ((value + 1) >> 1));
|
tmp = (((rand >> 0x10) & value) - ((value + 1) >> 1));
|
||||||
|
@ -101,7 +101,7 @@ void FrozenWaterElement_Action2(FrozenWaterElementEntity* this) {
|
||||||
effect->x.HALF.HI = this->unk_80 + gRoomControls.origin_x + tmp;
|
effect->x.HALF.HI = this->unk_80 + gRoomControls.origin_x + tmp;
|
||||||
effect->y.HALF.HI = this->unk_82 + gRoomControls.origin_y + tmp2;
|
effect->y.HALF.HI = this->unk_82 + gRoomControls.origin_y + tmp2;
|
||||||
}
|
}
|
||||||
effect = CreateObject(SPECIAL_FX, 2, 0x40);
|
effect = CreateObject(SPECIAL_FX, FX_DEATH, 0x40);
|
||||||
if (effect != NULL) {
|
if (effect != NULL) {
|
||||||
rand = Random();
|
rand = Random();
|
||||||
tmp = (((rand >> 0x10) & value) - ((value + 1) >> 1));
|
tmp = (((rand >> 0x10) & value) - ((value + 1) >> 1));
|
||||||
|
|
|
@ -437,7 +437,7 @@ void GyorgBossObject_SpawnChildren(u32 unk0, bool32 fromBlue, u32 animationState
|
||||||
}
|
}
|
||||||
if (fromBlue == FALSE) {
|
if (fromBlue == FALSE) {
|
||||||
Entity* tmp;
|
Entity* tmp;
|
||||||
tmp = CreateObject(SPECIAL_FX, 2, 0);
|
tmp = CreateObject(SPECIAL_FX, FX_DEATH, 0);
|
||||||
if (tmp) {
|
if (tmp) {
|
||||||
tmp->x.HALF.HI = x;
|
tmp->x.HALF.HI = x;
|
||||||
tmp->y.HALF.HI = y;
|
tmp->y.HALF.HI = y;
|
||||||
|
|
|
@ -166,7 +166,7 @@ bool32 sub_08097008(ObjectOnPillarEntity* this) {
|
||||||
this->tileIndex = tileType;
|
this->tileIndex = tileType;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
effect = CreateObject(SPECIAL_FX, 4, 0);
|
effect = CreateObject(SPECIAL_FX, FX_ROCK, 0);
|
||||||
if (effect != NULL) {
|
if (effect != NULL) {
|
||||||
CopyPosition(super, effect);
|
CopyPosition(super, effect);
|
||||||
}
|
}
|
||||||
|
@ -244,11 +244,11 @@ void sub_080971E0(ObjectOnPillarEntity* this) {
|
||||||
EntityWithHitFlag* entity;
|
EntityWithHitFlag* entity;
|
||||||
u32 tilePosition;
|
u32 tilePosition;
|
||||||
|
|
||||||
entity = (EntityWithHitFlag*)CreateObject(SPECIAL_FX, 0x11, 0x40);
|
entity = (EntityWithHitFlag*)CreateObject(SPECIAL_FX, FX_DASH, 0x40);
|
||||||
if (entity != NULL) {
|
if (entity != NULL) {
|
||||||
PositionRelative(super, &entity->base, -0x80000, 0x20000);
|
PositionRelative(super, &entity->base, -0x80000, 0x20000);
|
||||||
}
|
}
|
||||||
entity = (EntityWithHitFlag*)CreateObject(SPECIAL_FX, 0x11, 0x40);
|
entity = (EntityWithHitFlag*)CreateObject(SPECIAL_FX, FX_DASH, 0x40);
|
||||||
if (entity != NULL) {
|
if (entity != NULL) {
|
||||||
PositionRelative(super, &entity->base, 0x80000, 0x20000);
|
PositionRelative(super, &entity->base, 0x80000, 0x20000);
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ void PushableStatue_Action1(PushableStatueEntity* this) {
|
||||||
sub_08089538(this);
|
sub_08089538(this);
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
obj = CreateObject(SPECIAL_FX, 4, 0);
|
obj = CreateObject(SPECIAL_FX, FX_ROCK, 0);
|
||||||
if (obj != NULL) {
|
if (obj != NULL) {
|
||||||
CopyPosition(super, obj);
|
CopyPosition(super, obj);
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ void PushableStatue_SubAction0(PushableStatueEntity* this) {
|
||||||
sub_08089538(this);
|
sub_08089538(this);
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
obj = CreateObject(SPECIAL_FX, 4, 0);
|
obj = CreateObject(SPECIAL_FX, FX_ROCK, 0);
|
||||||
if (obj != NULL) {
|
if (obj != NULL) {
|
||||||
CopyPosition(super, obj);
|
CopyPosition(super, obj);
|
||||||
}
|
}
|
||||||
|
@ -216,7 +216,7 @@ bool32 sub_080895C0(PushableStatueEntity* this) {
|
||||||
sub_08089454(this);
|
sub_08089454(this);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
obj = CreateObject(SPECIAL_FX, 4, 0);
|
obj = CreateObject(SPECIAL_FX, FX_ROCK, 0);
|
||||||
if (obj != NULL) {
|
if (obj != NULL) {
|
||||||
CopyPosition(super, obj);
|
CopyPosition(super, obj);
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,7 +98,7 @@ void SmallIceBlock_Action1(SmallIceBlockEntity* this) {
|
||||||
sub_080994B8(this);
|
sub_080994B8(this);
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
obj = CreateObject(SPECIAL_FX, 0xd, 0);
|
obj = CreateObject(SPECIAL_FX, FX_ICE, 0);
|
||||||
if (obj != NULL) {
|
if (obj != NULL) {
|
||||||
CopyPosition(super, obj);
|
CopyPosition(super, obj);
|
||||||
}
|
}
|
||||||
|
@ -165,7 +165,7 @@ void SmallIceBlock_Action4(SmallIceBlockEntity* this) {
|
||||||
}
|
}
|
||||||
SetAffineInfo(super, 0x100, (0x3c - super->timer) * 0x20 + 0x100, 0);
|
SetAffineInfo(super, 0x100, (0x3c - super->timer) * 0x20 + 0x100, 0);
|
||||||
if ((super->timer & 1) != 0) {
|
if ((super->timer & 1) != 0) {
|
||||||
obj = CreateObject(SPECIAL_FX, 0x11, 0x40);
|
obj = CreateObject(SPECIAL_FX, FX_DASH, 0x40);
|
||||||
if (obj != NULL) {
|
if (obj != NULL) {
|
||||||
rand = Random();
|
rand = Random();
|
||||||
x = ((rand >> 0x10) % 9) - 4;
|
x = ((rand >> 0x10) % 9) - 4;
|
||||||
|
|
|
@ -44,7 +44,7 @@ const ObjectDefinition gObjectDefinition_F[] = {
|
||||||
{ { 1, 0, 0, 0, 154, 2, 0 }, { 4, 0, 0, 0, SPRITE_SPECIALFX, 0, 0 } }, // FX_BROWN_SMOKE_LARGE
|
{ { 1, 0, 0, 0, 154, 2, 0 }, { 4, 0, 0, 0, SPRITE_SPECIALFX, 0, 0 } }, // FX_BROWN_SMOKE_LARGE
|
||||||
{ { 1, 0, 0, 0, 154, 2, 0 }, { 4, 0, 0, 0, SPRITE_SPECIALFX, 0, 0 } }, // FX_BROWN_SMOKE2
|
{ { 1, 0, 0, 0, 154, 2, 0 }, { 4, 0, 0, 0, SPRITE_SPECIALFX, 0, 0 } }, // FX_BROWN_SMOKE2
|
||||||
{ { 1, 0, 0, 0, 243, 0, 0 }, { 1, 0, 0, 0, SPRITE_SPECIALFX_1, 0, 0 } }, // FX_SWEAT
|
{ { 1, 0, 0, 0, 243, 0, 0 }, { 1, 0, 0, 0, SPRITE_SPECIALFX_1, 0, 0 } }, // FX_SWEAT
|
||||||
{ { 1, 0, 0, 0, 60, 2, 0 }, { 4, 0, 0, 0, SPRITE_SPECIALFX, 0, 0 } }, // FX_26
|
{ { 1, 0, 0, 0, 60, 2, 0 }, { 4, 0, 0, 0, SPRITE_SPECIALFX, 0, 0 } }, // FX_SPARKLE4
|
||||||
{ { 1, 0, 0, 0, 96, 2, 0 }, { 0, 0, 0, 0, SPRITE_SPECIALFX_1, 0, 0 } }, // FX_27
|
{ { 1, 0, 0, 0, 96, 2, 0 }, { 0, 0, 0, 0, SPRITE_SPECIALFX_1, 0, 0 } }, // FX_27
|
||||||
{ { 1, 0, 0, 0, 154, 2, 0 }, { 3, 0, 0, 0, SPRITE_SPECIALFX, 0, 0 } }, // FX_SLOW_EXPLOSION
|
{ { 1, 0, 0, 0, 154, 2, 0 }, { 3, 0, 0, 0, SPRITE_SPECIALFX, 0, 0 } }, // FX_SLOW_EXPLOSION
|
||||||
{ { 1, 0, 0, 0, 113, 0, 0 }, { 71, 0, 0, 0, SPRITE_SPECIALFX_1, 0, 0 } }, // FX_CONFETTI
|
{ { 1, 0, 0, 0, 113, 0, 0 }, { 71, 0, 0, 0, SPRITE_SPECIALFX_1, 0, 0 } }, // FX_CONFETTI
|
||||||
|
|
|
@ -248,7 +248,7 @@ void CreateSparkle(Entity* entity) {
|
||||||
s32 y;
|
s32 y;
|
||||||
s32 x;
|
s32 x;
|
||||||
|
|
||||||
sparkle = CreateObject(SPECIAL_FX, 0x26, 0);
|
sparkle = CreateObject(SPECIAL_FX, FX_SPARKLE4, 0);
|
||||||
if (sparkle != NULL) {
|
if (sparkle != NULL) {
|
||||||
rand = Random();
|
rand = Random();
|
||||||
x = rand & 0xf;
|
x = rand & 0xf;
|
||||||
|
|
|
@ -368,7 +368,7 @@ static void LoadDestructibleTile(TileEntity* tile) {
|
||||||
void sub_0804B388(u32 a1, u32 a2) {
|
void sub_0804B388(u32 a1, u32 a2) {
|
||||||
Entity* e;
|
Entity* e;
|
||||||
SetTileType(a2 == 1 ? 38 : 52, a1, a2);
|
SetTileType(a2 == 1 ? 38 : 52, a1, a2);
|
||||||
e = CreateObject(SPECIAL_FX, 2, 0);
|
e = CreateObject(SPECIAL_FX, FX_DEATH, 0);
|
||||||
if (e != NULL) {
|
if (e != NULL) {
|
||||||
e->collisionLayer = a2;
|
e->collisionLayer = a2;
|
||||||
sub_0806F704(e, a1);
|
sub_0806F704(e, a1);
|
||||||
|
|
|
@ -998,12 +998,12 @@ void sub_0804BF38(Entity* this, ScriptExecutionContext* context) {
|
||||||
numEnts = ptr->entCnt;
|
numEnts = ptr->entCnt;
|
||||||
|
|
||||||
for (entCnt = 0; entCnt < numEnts; entCnt++) {
|
for (entCnt = 0; entCnt < numEnts; entCnt++) {
|
||||||
fx = CreateObject(SPECIAL_FX, 0xf, 0);
|
fx = CreateObject(SPECIAL_FX, FX_ROCK_SMALL, 0);
|
||||||
if (fx != NULL) {
|
if (fx != NULL) {
|
||||||
fx->x.HALF.HI = ptr->x + gRoomControls.origin_x + entCnt * 0x10;
|
fx->x.HALF.HI = ptr->x + gRoomControls.origin_x + entCnt * 0x10;
|
||||||
fx->y.HALF.HI = ptr->y + gRoomControls.origin_y + (entCnt & 1) * 8;
|
fx->y.HALF.HI = ptr->y + gRoomControls.origin_y + (entCnt & 1) * 8;
|
||||||
}
|
}
|
||||||
fx = CreateObject(SPECIAL_FX, 0x54, 0);
|
fx = CreateObject(SPECIAL_FX, FX_WHITE_PUFF, 0);
|
||||||
if (fx != NULL) {
|
if (fx != NULL) {
|
||||||
fx->x.HALF.HI = ptr->x + gRoomControls.origin_x + entCnt * 0x10;
|
fx->x.HALF.HI = ptr->x + gRoomControls.origin_x + entCnt * 0x10;
|
||||||
fx->y.HALF.HI = ptr->y + gRoomControls.origin_y + -0xc + (entCnt & 1) * 8;
|
fx->y.HALF.HI = ptr->y + gRoomControls.origin_y + -0xc + (entCnt & 1) * 8;
|
||||||
|
|
Loading…
Reference in New Issue