mirror of
https://github.com/zeldaret/tmc
synced 2026-09-03 02:13:43 -04:00
+59
-121
@@ -20,7 +20,32 @@ extern struct_080FD5B4 gUnk_080FD5B4[];
|
||||
extern u8 gUnk_0200AF13;
|
||||
extern u8 gUnk_0200AF14;
|
||||
extern u8 gUnk_080FE1C6[];
|
||||
extern Droptable gUnk_02034398;
|
||||
/*{
|
||||
0u,
|
||||
0x1u,
|
||||
0x2u,
|
||||
0x3u,
|
||||
0x4u,
|
||||
0x5u,
|
||||
0x6u,
|
||||
0x7u,
|
||||
0x8u,
|
||||
0x9u,
|
||||
0x8u,
|
||||
0x9u,
|
||||
0xau,
|
||||
0xau,
|
||||
0xbu,
|
||||
0xcu,
|
||||
0xdu,
|
||||
0xeu,
|
||||
0xfu,
|
||||
0x8u,
|
||||
0xfu,
|
||||
0x1u,
|
||||
0x8u,
|
||||
};
|
||||
*/
|
||||
extern void (*const gUnk_080FE2A0[])(void);
|
||||
|
||||
void ForceEquipItem(u32, u8);
|
||||
@@ -158,7 +183,7 @@ NONMATCH("asm/non_matching/sub_08054524.inc", void sub_08054524(void)) {
|
||||
bVar1 = 0;
|
||||
}
|
||||
|
||||
MemCopy(&gUnk_080015BC[0] + gUnk_080FE1C6[bVar1] * 0x8, &gUnk_02034398, 0x20);
|
||||
MemCopy(&gAreaDroptables[0] + gUnk_080FE1C6[bVar1] * 0x8, &gRoomVars.currentAreaDroptable, 0x20);
|
||||
}
|
||||
END_NONMATCH
|
||||
|
||||
@@ -170,8 +195,6 @@ void sub_08054570(void) {
|
||||
gRoomVars.field_0x2 = 0;
|
||||
}
|
||||
|
||||
// BUG?
|
||||
extern const Droptable gUnk_080014e4[];
|
||||
extern void sub_08000F14(s16*, const s16*, const s16*, const s16*);
|
||||
extern u32 sub_08000F2C(s16*, const s16*, const s16*, const s16*);
|
||||
u32 CreateItemDrop(Entity* arg0, u32 itemID, u32 itemParameter);
|
||||
@@ -182,17 +205,17 @@ u32 CreateRandomItemDrop(Entity* arg0, u32 arg1) {
|
||||
ITEM_ENEMY_BEETLE, ITEM_NONE, ITEM_NONE, ITEM_NONE, ITEM_NONE, ITEM_NONE,
|
||||
}*/;
|
||||
|
||||
int r0, r1, r2, r4, r5;
|
||||
int r0, r1, rand, summOdds, item;
|
||||
u32 r3;
|
||||
const Droptable *ptr2, *ptr3, *ptr4;
|
||||
Droptable s0;
|
||||
Droptable droptable;
|
||||
r3 = arg1;
|
||||
if (gRoomVars.field_0x2 != 1) {
|
||||
ptr2 = &gUnk_08001A1C[0];
|
||||
ptr4 = 0;
|
||||
ptr2 = &gDroptableModifiers[DROPTABLE_NONE];
|
||||
ptr4 = NULL;
|
||||
switch (r3) {
|
||||
case 1 ... 12:
|
||||
ptr4 = &gUnk_0800137C[r3];
|
||||
ptr4 = &gEnemyDroptables[r3];
|
||||
break;
|
||||
#ifndef EU
|
||||
case 24:
|
||||
@@ -208,9 +231,9 @@ u32 CreateRandomItemDrop(Entity* arg0, u32 arg1) {
|
||||
#ifdef EU
|
||||
case 24:
|
||||
#endif
|
||||
ptr2 = &gUnk_0800161C[r3];
|
||||
ptr2 = &gObjectDroptables[r3 - 16];
|
||||
case 15:
|
||||
ptr4 = &gUnk_02034398;
|
||||
ptr4 = &gRoomVars.currentAreaDroptable;
|
||||
break;
|
||||
case 0:
|
||||
default:
|
||||
@@ -218,59 +241,59 @@ u32 CreateRandomItemDrop(Entity* arg0, u32 arg1) {
|
||||
}
|
||||
if (ptr4 != 0) {
|
||||
if ((r1 = gSave.stats.unkB) == 0) {
|
||||
ptr3 = &gUnk_08001A1C[0];
|
||||
// nop
|
||||
ptr3 = &gDroptableModifiers[DROPTABLE_NONE];
|
||||
} else {
|
||||
#ifdef EU
|
||||
ptr3 = &gUnk_0800143C[r1 + 3];
|
||||
ptr3 = &gEnemyDroptables[r1 + 9];
|
||||
#else
|
||||
ptr3 = &gUnk_0800143C[r1];
|
||||
ptr3 = &gEnemyDroptables[r1 + 6];
|
||||
#endif
|
||||
}
|
||||
// vector addition, s0 = ptr4 + ptr2 + ptr3
|
||||
sub_08000F14(s0.a, ptr4->a, ptr2->a, ptr3->a);
|
||||
sub_08000F14(droptable.a, ptr4->a, ptr2->a, ptr3->a);
|
||||
if (gSave.stats.health <= 8) {
|
||||
s0.s.hearts += 5;
|
||||
droptable.s.hearts += 5;
|
||||
}
|
||||
if (gSave.stats.bombCount == 0) {
|
||||
s0.s.bombs += 3;
|
||||
droptable.s.bombs += 3;
|
||||
}
|
||||
if (gSave.stats.arrowCount == 0) {
|
||||
s0.s.arrows += 3;
|
||||
droptable.s.arrows += 3;
|
||||
}
|
||||
if (gSave.stats.rupees <= 10) {
|
||||
s0.s.rupee5 += 1;
|
||||
droptable.s.rupee5 += 1;
|
||||
}
|
||||
ptr2 = &gUnk_08001A1C[0];
|
||||
ptr2 = &gDroptableModifiers[DROPTABLE_NONE];
|
||||
r0 = gSave.stats.hasAllFigurines;
|
||||
ptr3 = ptr2;
|
||||
ptr3 = &gDroptableModifiers[DROPTABLE_NONE];
|
||||
// don't drop shells anymore
|
||||
if (r0 != 0) {
|
||||
ptr2++;
|
||||
ptr2 = &gDroptableModifiers[DROPTABLE_NO_SHELLS];
|
||||
}
|
||||
// don't drop kinstones anymore
|
||||
if (gSave.didAllFusions != 0) {
|
||||
ptr3 += 2;
|
||||
ptr3 = &gDroptableModifiers[DROPTABLE_NO_KINSTONES];
|
||||
}
|
||||
// vector addition, s0 = s0 + ptr2 + ptr3
|
||||
// resulting values are clamped to be >= 0
|
||||
// returns sum over s0
|
||||
r4 = sub_08000F2C(s0.a, s0.a, ptr2->a, ptr3->a);
|
||||
r2 = Random();
|
||||
r5 = (r2 >> 0x18);
|
||||
r5 &= 0xF;
|
||||
r2 = r2 % r4;
|
||||
summOdds = sub_08000F2C(droptable.a, droptable.a, ptr2->a, ptr3->a);
|
||||
rand = Random();
|
||||
item = (rand >> 0x18);
|
||||
item &= 0xF;
|
||||
rand = rand % summOdds;
|
||||
{
|
||||
u32 r3;
|
||||
for (r3 = 0, r1 = 0; r3 < 0x10; r3++, r5 = (r5 + 1) & 0xF) {
|
||||
if ((r1 += s0.a[r5]) > r2) {
|
||||
for (r3 = 0, r1 = 0; r3 < 0x10; r3++, item = (item + 1) & 0xF) {
|
||||
if ((r1 += droptable.a[item]) > rand) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
r1 = gUnk_080FE1B4[r5];
|
||||
if (r1 != 0) {
|
||||
r2 = 0;
|
||||
return CreateItemDrop(arg0, r1, r2);
|
||||
r1 = gUnk_080FE1B4[item];
|
||||
if (r1 != ITEM_NONE) {
|
||||
return CreateItemDrop(arg0, r1, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -311,10 +334,10 @@ u32 CreateItemDrop(Entity* arg0, u32 itemID, u32 itemParameter) {
|
||||
u32 rand;
|
||||
|
||||
if (GetInventoryValue(ITEM_KINSTONE_BAG) == 0) {
|
||||
return 0;
|
||||
return ITEM_NONE;
|
||||
}
|
||||
if (3 < gRoomVars.filler1[0]) {
|
||||
return 0;
|
||||
return ITEM_NONE;
|
||||
}
|
||||
|
||||
if (itemID != ITEM_KINSTONE) {
|
||||
@@ -362,91 +385,6 @@ u32 CreateItemDrop(Entity* arg0, u32 itemID, u32 itemParameter) {
|
||||
}
|
||||
return itemID;
|
||||
}
|
||||
/*
|
||||
extern u8 gUnk_080FE1DD[];
|
||||
|
||||
u32 CreateItemDrop(Entity* arg0, u32 itemID, u32 itemParameter) {
|
||||
u32 prereqID;
|
||||
u32 adjustedParam;
|
||||
u32 uVar1;
|
||||
Entity* itemEntity;
|
||||
|
||||
adjustedParam = (u8)itemParameter;
|
||||
switch (adjustedParam) {
|
||||
case 0x3f:
|
||||
if (!GetInventoryValue(0x40)) {
|
||||
return 0;
|
||||
}
|
||||
if (itemParameter == 0) {
|
||||
adjustedParam = 1;
|
||||
}
|
||||
case 0x5d:
|
||||
if (!GetInventoryValue(0x65)) {
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
case 0x5e:
|
||||
if (!GetInventoryValue(0x9)) {
|
||||
return 0;
|
||||
}
|
||||
break;
|
||||
case 0x5c:
|
||||
case 0xfc ... 0xfe:
|
||||
if (GetInventoryValue(0x67) == 0) {
|
||||
return 0;
|
||||
}
|
||||
if (3 < gRoomVars.filler[5]) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (itemID != 0x5c) {
|
||||
adjustedParam = gUnk_080FE1DD[(Random() & 0x3f) + (itemID - 0xfc) * 0x40];
|
||||
if (adjustedParam == 0) {
|
||||
itemID = 0;
|
||||
}
|
||||
else {
|
||||
itemID = 0x5c;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 0xff:
|
||||
if (!GetInventoryValue(0x1)) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if (itemID != 0) {
|
||||
if (itemID == 0xff) {
|
||||
itemEntity = CreateEnemy(BEETLE, 0);
|
||||
if (itemEntity != NULL) {
|
||||
itemEntity->x.HALF.HI = arg0->x.HALF.HI;
|
||||
itemEntity->y.HALF.HI = arg0->y.HALF.HI;
|
||||
itemEntity->collisionLayer = arg0->collisionLayer;
|
||||
UpdateSpriteOrderAndFlip(itemEntity);
|
||||
}
|
||||
} else {
|
||||
itemEntity = CreateObject(GROUND_ITEM, itemID, adjustedParam);
|
||||
if (itemEntity != NULL) {
|
||||
if (arg0 == &gPlayerEntity) {
|
||||
itemEntity->actionDelay = 1;
|
||||
} else {
|
||||
itemEntity->actionDelay = 0;
|
||||
}
|
||||
if (arg0->kind == OBJECT) {
|
||||
if (arg0->id == 99) {
|
||||
arg0->child = itemEntity;
|
||||
} else if (arg0->id == 0x1e) {
|
||||
itemEntity->direction = arg0->animationState << 3 | 0x80;
|
||||
itemEntity->speed = 0xc0;
|
||||
itementity->zVelocity = 0x18000;
|
||||
}
|
||||
}
|
||||
CopyPosition(arg0, itemEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
return itemID;
|
||||
}
|
||||
*/
|
||||
|
||||
void Subtask_WorldEvent(void) {
|
||||
#if !(defined(DEMO_USA) || defined(DEMO_JP))
|
||||
|
||||
+49
-52
@@ -1,8 +1,8 @@
|
||||
#include "global.h"
|
||||
#include "droptables.h"
|
||||
|
||||
const Droptable gUnk_0800137C[] = {
|
||||
{ {
|
||||
const Droptable gEnemyDroptables[] = {
|
||||
[0] = { {
|
||||
.none = -999,
|
||||
.rupee1 = -999,
|
||||
.rupee5 = -999,
|
||||
@@ -20,7 +20,7 @@ const Droptable gUnk_0800137C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[1] = { {
|
||||
.none = 300,
|
||||
.rupee1 = -999,
|
||||
.rupee5 = -999,
|
||||
@@ -38,7 +38,7 @@ const Droptable gUnk_0800137C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[2] = { {
|
||||
.none = -999,
|
||||
.rupee1 = -999,
|
||||
.rupee5 = -999,
|
||||
@@ -56,7 +56,7 @@ const Droptable gUnk_0800137C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[3] = { {
|
||||
.none = 36,
|
||||
.rupee1 = 28,
|
||||
.rupee5 = 20,
|
||||
@@ -74,7 +74,7 @@ const Droptable gUnk_0800137C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[4] = { {
|
||||
.none = 74,
|
||||
.rupee1 = 10,
|
||||
.rupee5 = 5,
|
||||
@@ -92,7 +92,7 @@ const Droptable gUnk_0800137C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[5] = { {
|
||||
.none = 100,
|
||||
.rupee1 = 0,
|
||||
.rupee5 = 0,
|
||||
@@ -110,10 +110,7 @@ const Droptable gUnk_0800137C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
};
|
||||
// not 100% sure
|
||||
const Droptable gUnk_0800143C[] = {
|
||||
{ {
|
||||
[6] = { {
|
||||
.none = 73,
|
||||
.rupee1 = 25,
|
||||
.rupee5 = -999,
|
||||
@@ -131,7 +128,7 @@ const Droptable gUnk_0800143C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[7] = { {
|
||||
.none = 55,
|
||||
.rupee1 = -999,
|
||||
.rupee5 = 70,
|
||||
@@ -149,7 +146,7 @@ const Droptable gUnk_0800143C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[8] = { {
|
||||
.none = 50,
|
||||
.rupee1 = -999,
|
||||
.rupee5 = 26,
|
||||
@@ -167,7 +164,7 @@ const Droptable gUnk_0800143C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[9] = { {
|
||||
.none = 45,
|
||||
.rupee1 = -999,
|
||||
.rupee5 = -999,
|
||||
@@ -185,7 +182,7 @@ const Droptable gUnk_0800143C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[10] = { {
|
||||
.none = 300,
|
||||
.rupee1 = -999,
|
||||
.rupee5 = -999,
|
||||
@@ -203,7 +200,7 @@ const Droptable gUnk_0800143C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[11] = { {
|
||||
.none = 60,
|
||||
.rupee1 = 10,
|
||||
.rupee5 = -999,
|
||||
@@ -221,7 +218,7 @@ const Droptable gUnk_0800143C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[12] = { {
|
||||
.none = 70,
|
||||
.rupee1 = 0,
|
||||
.rupee5 = -999,
|
||||
@@ -239,7 +236,7 @@ const Droptable gUnk_0800143C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[13] = { {
|
||||
.none = 63,
|
||||
.rupee1 = 10,
|
||||
.rupee5 = 20,
|
||||
@@ -257,7 +254,7 @@ const Droptable gUnk_0800143C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[14] = { {
|
||||
.none = 50,
|
||||
.rupee1 = 10,
|
||||
.rupee5 = 20,
|
||||
@@ -275,7 +272,7 @@ const Droptable gUnk_0800143C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[15] = { {
|
||||
.none = 0,
|
||||
.rupee1 = 0,
|
||||
.rupee5 = 0,
|
||||
@@ -293,7 +290,7 @@ const Droptable gUnk_0800143C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[16] = { {
|
||||
.none = 0,
|
||||
.rupee1 = 0,
|
||||
.rupee5 = 0,
|
||||
@@ -311,7 +308,7 @@ const Droptable gUnk_0800143C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[17] = { {
|
||||
.none = 0,
|
||||
.rupee1 = 40,
|
||||
.rupee5 = 24,
|
||||
@@ -330,9 +327,9 @@ const Droptable gUnk_0800143C[] = {
|
||||
.none5 = 0,
|
||||
} },
|
||||
};
|
||||
// not 100% sure
|
||||
const Droptable gUnk_080015BC[] = {
|
||||
{ {
|
||||
|
||||
const Droptable gAreaDroptables[] = {
|
||||
[0] = { {
|
||||
.none = 920,
|
||||
.rupee1 = 15,
|
||||
.rupee5 = 5,
|
||||
@@ -350,7 +347,7 @@ const Droptable gUnk_080015BC[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[1] = { {
|
||||
.none = 900,
|
||||
.rupee1 = 0,
|
||||
.rupee5 = 0,
|
||||
@@ -368,7 +365,7 @@ const Droptable gUnk_080015BC[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[2] = { {
|
||||
.none = 920,
|
||||
.rupee1 = 11,
|
||||
.rupee5 = 3,
|
||||
@@ -386,9 +383,7 @@ const Droptable gUnk_080015BC[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
};
|
||||
const Droptable gUnk_0800161C[] = {
|
||||
{ {
|
||||
[3] = { {
|
||||
.none = 920,
|
||||
.rupee1 = 30,
|
||||
.rupee5 = 1,
|
||||
@@ -406,7 +401,7 @@ const Droptable gUnk_0800161C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[4] = { {
|
||||
.none = 920,
|
||||
.rupee1 = 6,
|
||||
.rupee5 = 1,
|
||||
@@ -424,7 +419,7 @@ const Droptable gUnk_0800161C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[5] = { {
|
||||
.none = 920,
|
||||
.rupee1 = 55,
|
||||
.rupee5 = 7,
|
||||
@@ -442,7 +437,7 @@ const Droptable gUnk_0800161C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[6] = { {
|
||||
.none = 920,
|
||||
.rupee1 = 23,
|
||||
.rupee5 = 5,
|
||||
@@ -460,7 +455,7 @@ const Droptable gUnk_0800161C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[7] = { {
|
||||
.none = 920,
|
||||
.rupee1 = 20,
|
||||
.rupee5 = 3,
|
||||
@@ -478,7 +473,7 @@ const Droptable gUnk_0800161C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[8] = { {
|
||||
.none = 920,
|
||||
.rupee1 = 25,
|
||||
.rupee5 = 6,
|
||||
@@ -496,7 +491,7 @@ const Droptable gUnk_0800161C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[9] = { {
|
||||
.none = 920,
|
||||
.rupee1 = 18,
|
||||
.rupee5 = 2,
|
||||
@@ -514,7 +509,7 @@ const Droptable gUnk_0800161C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[0xa] = { {
|
||||
.none = 920,
|
||||
.rupee1 = 30,
|
||||
.rupee5 = 1,
|
||||
@@ -536,7 +531,7 @@ const Droptable gUnk_0800161C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[0xb] = { {
|
||||
.none = 900,
|
||||
.rupee1 = 16,
|
||||
.rupee5 = 4,
|
||||
@@ -554,7 +549,7 @@ const Droptable gUnk_0800161C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[0xc] = { {
|
||||
.none = 920,
|
||||
.rupee1 = 23,
|
||||
.rupee5 = 15,
|
||||
@@ -572,7 +567,7 @@ const Droptable gUnk_0800161C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[0xd] = { {
|
||||
.none = 920,
|
||||
.rupee1 = 25,
|
||||
.rupee5 = 25,
|
||||
@@ -590,7 +585,7 @@ const Droptable gUnk_0800161C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[0xe] = { {
|
||||
.none = 920,
|
||||
.rupee1 = 25,
|
||||
.rupee5 = 1,
|
||||
@@ -608,7 +603,7 @@ const Droptable gUnk_0800161C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[0xf] = { {
|
||||
.none = 800,
|
||||
.rupee1 = 60,
|
||||
.rupee5 = 15,
|
||||
@@ -626,7 +621,7 @@ const Droptable gUnk_0800161C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[0x10] = { {
|
||||
.none = 920,
|
||||
.rupee1 = 15,
|
||||
.rupee5 = 5,
|
||||
@@ -644,7 +639,7 @@ const Droptable gUnk_0800161C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[0x11] = { {
|
||||
.none = 920,
|
||||
.rupee1 = 15,
|
||||
.rupee5 = 5,
|
||||
@@ -662,7 +657,7 @@ const Droptable gUnk_0800161C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[0x12] = { {
|
||||
.none = 920,
|
||||
.rupee1 = 15,
|
||||
.rupee5 = 5,
|
||||
@@ -680,7 +675,9 @@ const Droptable gUnk_0800161C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
};
|
||||
const Droptable gObjectDroptables[] = {
|
||||
[0] = { {
|
||||
.none = 0,
|
||||
.rupee1 = 10,
|
||||
.rupee5 = 0,
|
||||
@@ -698,7 +695,7 @@ const Droptable gUnk_0800161C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[1] = { {
|
||||
.none = 0,
|
||||
.rupee1 = 3,
|
||||
.rupee5 = 0,
|
||||
@@ -716,7 +713,7 @@ const Droptable gUnk_0800161C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[2] = { {
|
||||
.none = 0,
|
||||
.rupee1 = 100,
|
||||
.rupee5 = 20,
|
||||
@@ -734,7 +731,7 @@ const Droptable gUnk_0800161C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[3] = { {
|
||||
.none = 0,
|
||||
.rupee1 = 300,
|
||||
.rupee5 = 50,
|
||||
@@ -752,7 +749,7 @@ const Droptable gUnk_0800161C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[4] = { {
|
||||
.none = 0,
|
||||
.rupee1 = -999,
|
||||
.rupee5 = -999,
|
||||
@@ -770,7 +767,7 @@ const Droptable gUnk_0800161C[] = {
|
||||
.none4 = 0,
|
||||
.none5 = 0,
|
||||
} },
|
||||
{ {
|
||||
[5] = { {
|
||||
.none = 0,
|
||||
.rupee1 = 2,
|
||||
.rupee5 = 2,
|
||||
@@ -1068,7 +1065,7 @@ const Droptable gUnk_0800191C[] = {
|
||||
};
|
||||
|
||||
// special treatment for shells and kinstones after finishing figurines/fusions
|
||||
const Droptable gUnk_08001A1C[] = {
|
||||
const Droptable gDroptableModifiers[] = {
|
||||
// nop
|
||||
{ {
|
||||
.none = 0,
|
||||
|
||||
+169
-27
@@ -1,7 +1,13 @@
|
||||
#define NENT_DEPRECATED
|
||||
#include "entity.h"
|
||||
#include "definitions.h"
|
||||
#include "functions.h"
|
||||
#include "object.h"
|
||||
#include "save.h"
|
||||
#include "projectile.h"
|
||||
#include "object/deathFx.h"
|
||||
|
||||
extern void sub_08049CF4(Entity*);
|
||||
|
||||
extern EnemyDefinition gEnemyDefinitions[];
|
||||
|
||||
@@ -17,45 +23,45 @@ const EnemyDefinition* GetEnemyDefinition(Entity* entity) {
|
||||
return definition;
|
||||
}
|
||||
|
||||
bool32 EnemyInit(Entity* this) {
|
||||
if ((this->flags & ENT_DID_INIT) == 0) {
|
||||
const EnemyDefinition* definition = GetEnemyDefinition(this);
|
||||
if (LoadEnemySprite(this, definition) == FALSE) {
|
||||
bool32 EnemyInit(GenericEntity* this) {
|
||||
if ((super->flags & ENT_DID_INIT) == 0) {
|
||||
const EnemyDefinition* definition = GetEnemyDefinition(super);
|
||||
if (LoadEnemySprite(super, definition) == FALSE) {
|
||||
return FALSE;
|
||||
}
|
||||
this->flags |= ENT_DID_INIT;
|
||||
super->flags |= ENT_DID_INIT;
|
||||
if (definition->spriteFlags.collision != 0) {
|
||||
COLLISION_ON(this);
|
||||
COLLISION_ON(super);
|
||||
}
|
||||
this->spriteIndex = definition->spriteIndex;
|
||||
if (this->spriteSettings.draw == 0) {
|
||||
this->spriteSettings.draw = definition->spriteFlags.draw;
|
||||
super->spriteIndex = definition->spriteIndex;
|
||||
if (super->spriteSettings.draw == 0) {
|
||||
super->spriteSettings.draw = definition->spriteFlags.draw;
|
||||
}
|
||||
this->spritePriority.b1 = definition->spriteFlags.spritePriority;
|
||||
this->spriteSettings.shadow = definition->spriteFlags.shadow;
|
||||
if (this->speed == 0) {
|
||||
this->speed = definition->speed;
|
||||
super->spritePriority.b1 = definition->spriteFlags.spritePriority;
|
||||
super->spriteSettings.shadow = definition->spriteFlags.shadow;
|
||||
if (super->speed == 0) {
|
||||
super->speed = definition->speed;
|
||||
}
|
||||
this->flags2 = definition->flags2;
|
||||
this->hitType = definition->damageType;
|
||||
this->hitbox = (Hitbox*)definition->ptr.hitbox;
|
||||
this->health = definition->health;
|
||||
if (this->hurtType == 0) {
|
||||
this->hurtType = 0x41;
|
||||
super->flags2 = definition->flags2;
|
||||
super->hitType = definition->damageType;
|
||||
super->hitbox = (Hitbox*)definition->ptr.hitbox;
|
||||
super->health = definition->health;
|
||||
if (super->hurtType == 0) {
|
||||
super->hurtType = 0x41;
|
||||
}
|
||||
UpdateSpriteForCollisionLayer(this);
|
||||
UpdateSpriteForCollisionLayer(super);
|
||||
if ((this->field_0x6c.HALF.HI & 0x20) != 0) {
|
||||
u32 uVar4 = gUnk_080D3E74[this->id >> 3] >> ((this->id & 7) << 1) & 3;
|
||||
u32 uVar4 = gUnk_080D3E74[super->id >> 3] >> ((super->id & 7) << 1) & 3;
|
||||
if (uVar4 != 0) {
|
||||
Entity* object = CreateObject(OBJECT_A9, uVar4 - 1, 0);
|
||||
if (object != NULL) {
|
||||
object->actionDelay = this->flags;
|
||||
object->field_0xf = this->spriteSettings.draw;
|
||||
object->actionDelay = super->flags;
|
||||
object->field_0xf = super->spriteSettings.draw;
|
||||
object->spritePriority.b0 = 3;
|
||||
object->parent = this;
|
||||
CopyPosition(this, object);
|
||||
this->flags &= ~ENT_COLLIDE;
|
||||
this->spriteSettings.draw = 0;
|
||||
object->parent = super;
|
||||
CopyPosition(super, object);
|
||||
super->flags &= ~ENT_COLLIDE;
|
||||
super->spriteSettings.draw = 0;
|
||||
this->field_0x6c.HALF.HI |= 0x10;
|
||||
}
|
||||
}
|
||||
@@ -86,3 +92,139 @@ bool32 LoadEnemySprite(Entity* entity, const EnemyDefinition* definition) {
|
||||
LoadObjPalette(entity, definition->paletteIndex);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
ASM_FUNC("asm/non_matching/enemyUtils/sub_0804A720.inc", void sub_0804A720(Entity* this))
|
||||
|
||||
void CreateDeathFx(GenericEntity* parent, u32 parentId, u32 fixedItem);
|
||||
void sub_0804A7D4(Entity* this) {
|
||||
CreateDeathFx((GenericEntity*)this, this->id, 0);
|
||||
}
|
||||
|
||||
void CreateDeathFx(GenericEntity* parent, u32 parentId, u32 fixedItem) {
|
||||
DeathFxObject* deathFx;
|
||||
DeathFxObject* deathFx2;
|
||||
u8 bVar3;
|
||||
|
||||
if ((parent->field_0x6c.HALF.HI & 1) != 0) {
|
||||
if ((parent->field_0x6c.HALF.HI & 2) != 0) {
|
||||
return;
|
||||
}
|
||||
deathFx = (DeathFxObject*)CreateObject(DEATH_FX, parent->base.id, 0);
|
||||
if (deathFx == NULL) {
|
||||
return;
|
||||
}
|
||||
deathFx->unk6c = 1;
|
||||
PositionRelative(&(parent->base), &(deathFx->base), 0, 1);
|
||||
deathFx->base.parent = &(parent->base);
|
||||
parent->field_0x6c.HALF.HI |= 2;
|
||||
if ((parent->base.id == 0x37) && (gRoomTransition.field_0x39 != 0)) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
sub_0807CD9C();
|
||||
SoundReq(SONG_STOP_BGM);
|
||||
DeleteThisEntity();
|
||||
return;
|
||||
} else {
|
||||
int tmp = parent->base.field_0x3a & 2;
|
||||
if (tmp == 0) {
|
||||
sub_08049CF4(&(parent->base));
|
||||
gSave.unk50 += 1;
|
||||
parent->base.field_0x3a |= 2;
|
||||
parent->base.actionDelay = 0xff;
|
||||
SetDefaultPriority(&(parent->base), 3);
|
||||
deathFx2 = (DeathFxObject*)CreateObject(DEATH_FX, parent->base.id, 0);
|
||||
if (deathFx2 != NULL) {
|
||||
deathFx2->unk6c = tmp;
|
||||
deathFx2->parentId = parentId;
|
||||
deathFx2->item = fixedItem;
|
||||
deathFx2->base.parent = &(parent->base);
|
||||
deathFx2->base.child = &(parent->base);
|
||||
CopyPosition(&(parent->base), &(deathFx2->base));
|
||||
}
|
||||
if ((parent->field_0x6c.HALF.HI & 8) != 0) {
|
||||
deathFx2->unk6c |= 8;
|
||||
DeleteEntity(&(parent->base));
|
||||
return;
|
||||
}
|
||||
if ((parent->base.bitfield & 0x7f) == 0x13) {
|
||||
bVar3 = parent->base.field_0x1c & 0xf;
|
||||
if (bVar3 != 1) {
|
||||
if ((bVar3 == 2) && (deathFx2 != NULL)) {
|
||||
deathFx2->unk6c |= 2;
|
||||
}
|
||||
} else {
|
||||
if (deathFx2 != NULL) {
|
||||
deathFx2->unk6c |= 4;
|
||||
}
|
||||
}
|
||||
deathFx2->base.parent = NULL;
|
||||
DeleteThisEntity();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (parent->base.actionDelay == 0) {
|
||||
DeleteThisEntity();
|
||||
} else {
|
||||
if (--parent->base.actionDelay == 0) {
|
||||
parent->base.spriteSettings.draw = 0;
|
||||
SetDefaultPriority(&(parent->base), 0);
|
||||
} else {
|
||||
if (parent->base.actionDelay < 9) {
|
||||
if (parent->base.spriteSettings.draw) {
|
||||
parent->base.spriteSettings.draw = 0;
|
||||
} else {
|
||||
parent->base.spriteSettings.draw = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Entity* CreateProjectileWithParent(Entity* parent, u32 projectileId, u32 projectileType) {
|
||||
Entity* projectile;
|
||||
|
||||
projectile = CreateProjectile(projectileId);
|
||||
if (projectile != NULL) {
|
||||
projectile->type = projectileType;
|
||||
CopyPosition(parent, projectile);
|
||||
}
|
||||
return projectile;
|
||||
}
|
||||
|
||||
void SetChildOffset(Entity* entity, s32 xOffset, s32 yOffset, s32 zOffset) {
|
||||
Entity* other;
|
||||
GenericEntity* this = (GenericEntity*)entity;
|
||||
|
||||
other = *(Entity**)&this->field_0x68;
|
||||
if (other != NULL) {
|
||||
other->spriteRendering.b3 = super->spriteRendering.b3;
|
||||
other->spriteOrientation.flipY = super->spriteOrientation.flipY;
|
||||
other->x.HALF.HI = super->x.HALF.HI + xOffset;
|
||||
other->y.HALF.HI = super->y.HALF.HI + yOffset;
|
||||
other->z.HALF.HI = super->z.HALF.HI + zOffset;
|
||||
other->collisionLayer = super->collisionLayer;
|
||||
}
|
||||
}
|
||||
|
||||
Entity* sub_0804A9FC(Entity* parent, u32 fxType) {
|
||||
Entity* fx;
|
||||
GenericEntity* this = (GenericEntity*)parent;
|
||||
|
||||
if ((*(Entity**)&this->field_0x68 == NULL) && (fx = CreateFx(super, fxType, 0), fx != NULL)) {
|
||||
*(Entity**)&this->field_0x68 = fx;
|
||||
} else {
|
||||
fx = NULL;
|
||||
}
|
||||
return fx;
|
||||
}
|
||||
|
||||
void sub_0804AA1C(Entity* entity) {
|
||||
GenericEntity* this = (GenericEntity*)entity;
|
||||
if (*(Entity**)&this->field_0x68 != NULL) {
|
||||
(*(Entity**)&this->field_0x68)->parent = NULL;
|
||||
*(Entity**)&this->field_0x68 = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,260 @@
|
||||
#include "global.h"
|
||||
#define NENT_DEPRECATED
|
||||
#include "entity.h"
|
||||
#include "sound.h"
|
||||
#include "functions.h"
|
||||
#include "object/deathFx.h"
|
||||
#include "enemy.h"
|
||||
|
||||
void sub_08081790(DeathFxObject* this);
|
||||
void DeathFx_Delete(DeathFxObject* this);
|
||||
|
||||
void DeathFx_Action0(DeathFxObject* this);
|
||||
void DeathFx_Action1(DeathFxObject* this);
|
||||
void DeathFx_Action2(DeathFxObject* this);
|
||||
void DeathFx(Entity* this) {
|
||||
static void (*const DeathFx_Actions[])(DeathFxObject*) = {
|
||||
DeathFx_Action0,
|
||||
DeathFx_Action1,
|
||||
DeathFx_Action2,
|
||||
};
|
||||
DeathFx_Actions[this->action]((DeathFxObject*)this);
|
||||
}
|
||||
|
||||
void DeathFx_Action0(DeathFxObject* this) {
|
||||
static const u8 gUnk_0811EC08[] = {
|
||||
0, 64, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
};
|
||||
static const u8 gUnk_0811EC20[] = {
|
||||
26,
|
||||
14,
|
||||
26,
|
||||
26,
|
||||
};
|
||||
Entity* parent;
|
||||
int uVar4;
|
||||
u32 tmp;
|
||||
|
||||
if (this->unk6c & 1) {
|
||||
super->spriteIndex = 0x65;
|
||||
super->action = 2;
|
||||
super->direction = 0;
|
||||
super->speed = 0x40;
|
||||
super->collisionLayer = 2;
|
||||
UpdateSpriteForCollisionLayer(&this->base);
|
||||
super->spriteRendering.b0 = 3;
|
||||
if (super->actionDelay == 0) {
|
||||
tmp = 0x80;
|
||||
} else {
|
||||
tmp = super->actionDelay;
|
||||
super->actionDelay = 0;
|
||||
}
|
||||
sub_0805EC9C(super, tmp, tmp, 0);
|
||||
LoadSwapGFX(super, 4, 0);
|
||||
InitAnimationForceUpdate(super, 0);
|
||||
SoundReq(SFX_BOSS_EXPLODE);
|
||||
} else {
|
||||
if (this->unk6c & 0xc) {
|
||||
sub_08081790(this);
|
||||
DeathFx_Delete(this);
|
||||
} else {
|
||||
if (this->unk6c & 2) {
|
||||
InitializeAnimation(&this->base, 2);
|
||||
} else {
|
||||
super->spritePriority.b0 = 3;
|
||||
uVar4 = gUnk_0811EC08[super->type >> 2];
|
||||
uVar4 >>= ((super->type % 4) << 1);
|
||||
uVar4 &= 3;
|
||||
parent = super->parent;
|
||||
if (parent != NULL) {
|
||||
parent->actionDelay = gUnk_0811EC20[uVar4];
|
||||
}
|
||||
InitializeAnimation(&this->base, uVar4);
|
||||
}
|
||||
}
|
||||
super->action = 1;
|
||||
EnqueueSFX(SFX_FF);
|
||||
}
|
||||
SetDefaultPriority(super, 3);
|
||||
}
|
||||
|
||||
void DeathFx_Action1(DeathFxObject* this) {
|
||||
GetNextFrame(super);
|
||||
if (super->frame & 0x80) {
|
||||
sub_08081790(this);
|
||||
DeathFx_Delete(this);
|
||||
} else {
|
||||
if ((super->frame & 1) != 0) {
|
||||
super->spritePriority.b0 = 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DeathFx_Action2(DeathFxObject* this) {
|
||||
UpdateAnimationSingleFrame(super);
|
||||
if (super->frame & 0x80) {
|
||||
DeathFx_Delete(this);
|
||||
} else {
|
||||
if ((super->frame & 1) != 0) {
|
||||
LinearMoveUpdate(super);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DeathFx_DropRandom9(DeathFxObject* this);
|
||||
void DeathFx_DropRandom13(DeathFxObject* this);
|
||||
void DeathFx_DropRandom1(DeathFxObject* this);
|
||||
void DeathFx_DropRandom14(DeathFxObject* this);
|
||||
void DeathFx_DropFixedItem(DeathFxObject* this);
|
||||
void sub_08081790(DeathFxObject* this) {
|
||||
static void (*const DeathFx_DropFunctions[])(DeathFxObject*) = {
|
||||
DeathFx_DropRandom9, DeathFx_DropRandom13, DeathFx_DropRandom1, DeathFx_DropRandom14,
|
||||
DeathFx_DropRandom9, DeathFx_DropRandom9, DeathFx_DropRandom9, DeathFx_DropRandom9,
|
||||
DeathFx_DropRandom9, DeathFx_DropRandom9, DeathFx_DropRandom9, DeathFx_DropRandom9,
|
||||
DeathFx_DropRandom9, DeathFx_DropRandom9, DeathFx_DropRandom9, DeathFx_DropFixedItem,
|
||||
};
|
||||
static const u8 DeathFx_EnemyDroptables[] = {
|
||||
[OCTOROK] = 6,
|
||||
[CHUCHU] = 6,
|
||||
[LEEVER] = 6,
|
||||
[PEAHAT] = 6,
|
||||
[ROLLOBITE] = 0,
|
||||
[DARK_NUT] = 11,
|
||||
[HANGING_SEED] = 0,
|
||||
[BEETLE] = 6,
|
||||
[KEESE] = 6,
|
||||
[DOOR_MIMIC] = 0,
|
||||
[ROCK_CHUCHU] = 10,
|
||||
[SPINY_CHUCHU] = 6,
|
||||
[CUCCO_CHICK_AGGR] = 6,
|
||||
[MOLDORM] = 7,
|
||||
[ENEMY_E] = 6,
|
||||
[MOLDWORM] = 6,
|
||||
[SLUGGULA] = 6,
|
||||
[PESTO] = 0,
|
||||
[PUFFSTOOL] = 6,
|
||||
[CHUCHU_BOSS] = 6,
|
||||
[LIKE_LIKE] = 6,
|
||||
[SPEAR_MOBLIN] = 8,
|
||||
[BUSINESS_SCRUB] = 0,
|
||||
[RUPEE_LIKE] = 8,
|
||||
[MADDERPILLAR] = 6,
|
||||
[WATER_DROP] = 6,
|
||||
[WALL_MASTER] = 8,
|
||||
[BOMB_PEAHAT] = 10,
|
||||
[SPARK] = 6,
|
||||
[CHASER] = 0,
|
||||
[SPIKED_BEETLE] = 6,
|
||||
[SENSOR_BLADE_TRAP] = 0,
|
||||
[HELMASAUR] = 6,
|
||||
[FALLING_BOULDER] = 0,
|
||||
[BOBOMB] = 10,
|
||||
[WALL_MASTER_2] = 8,
|
||||
[GLEEROK] = 6,
|
||||
[VAATI_EYES_MACRO] = 0,
|
||||
[TEKTITE] = 6,
|
||||
[WIZZROBE_WIND] = 6,
|
||||
[WIZZROBE_FIRE] = 6,
|
||||
[WIZZROBE_ICE] = 6,
|
||||
[ARMOS] = 11,
|
||||
[EYEGORE] = 9,
|
||||
[ROPE] = 6,
|
||||
[SMALL_PESTO] = 1,
|
||||
[ACRO_BANDIT] = 6,
|
||||
[BLADE_TRAP] = 0,
|
||||
[KEATON] = 7,
|
||||
[CROW] = 6,
|
||||
[MULLDOZER] = 6,
|
||||
[BOMBAROSSA] = 6,
|
||||
[WISP] = 0,
|
||||
[SPINY_BEETLE] = 6,
|
||||
[MAZAAL_HEAD] = 6,
|
||||
[MAZAAL_MACRO] = 6,
|
||||
[MAZAAL_HAND] = 6,
|
||||
[OCTOROK_BOSS] = 6,
|
||||
[FLYING_POT] = 6,
|
||||
[GOBDO] = 6,
|
||||
[OCTOROK_GOLDEN] = 6,
|
||||
[TEKTITE_GOLDEN] = 6,
|
||||
[ROPE_GOLDEN] = 6,
|
||||
[CLOUD_PIRANHA] = 6,
|
||||
[SCISSORS_BEETLE] = 7,
|
||||
[CUCCO_AGGR] = 6,
|
||||
[STALFOS] = 7,
|
||||
[FLYING_SKULL] = 6,
|
||||
[MAZAAL_BRACELET] = 6,
|
||||
[TAKKURI] = 6,
|
||||
[BOW_MOBLIN] = 8,
|
||||
[LAKITU] = 6,
|
||||
[LAKITU_CLOUD] = 6,
|
||||
[TORCH_TRAP] = 6,
|
||||
[VAATI_REBORN_ENEMY] = 6,
|
||||
[VAATI_PROJECTILE] = 6,
|
||||
[BALL_CHAIN_SOLIDER] = 8,
|
||||
[ENEMY_4D] = 8,
|
||||
[GHINI] = 6,
|
||||
[VAATI_TRANSFIGURED] = 6,
|
||||
[ENEMY_50] = 6,
|
||||
[VAATI_WRATH] = 6,
|
||||
[VAATI_ARM] = 12,
|
||||
[DUST] = 0,
|
||||
[VAATI_BALL] = 6,
|
||||
[OCTOROK2] = 6,
|
||||
[SLIME] = 6,
|
||||
[MINI_SLIME] = 6,
|
||||
[FIREBALL_GUY] = 6,
|
||||
[MINI_FIREBALL_GUY] = 6,
|
||||
[VAATI_TRANSFIGURED_EYE] = 6,
|
||||
[BUSINESS_SCRUB_PROLOGUE] = 0,
|
||||
[GYORG_FEMALE] = 6,
|
||||
[GYORG_MALE] = 6,
|
||||
[CURTAIN] = 0,
|
||||
[VAATI_WRATH_EYE] = 6,
|
||||
[GYORG_CHILD] = 12,
|
||||
[GYORG_FEMALE_EYE] = 6,
|
||||
[GYORG_MALE_EYE] = 6,
|
||||
[GYORG_FEMALE_MOUTH] = 6,
|
||||
[ENEMY_64] = 6,
|
||||
[TREE_ITEM] = 6,
|
||||
[ENEMY_66] = 6,
|
||||
6,
|
||||
6,
|
||||
6,
|
||||
6,
|
||||
6,
|
||||
6,
|
||||
6,
|
||||
6,
|
||||
6,
|
||||
};
|
||||
if (this->parentId < 0xf0) {
|
||||
CreateRandomItemDrop(super, DeathFx_EnemyDroptables[this->parentId]);
|
||||
} else {
|
||||
DeathFx_DropFunctions[this->parentId - 0xf0](this);
|
||||
}
|
||||
}
|
||||
|
||||
void DeathFx_DropRandom9(DeathFxObject* this) {
|
||||
CreateRandomItemDrop(super, 9);
|
||||
}
|
||||
|
||||
void DeathFx_DropRandom13(DeathFxObject* this) {
|
||||
CreateRandomItemDrop(super, 13);
|
||||
}
|
||||
|
||||
void DeathFx_DropRandom14(DeathFxObject* this) {
|
||||
CreateRandomItemDrop(super, 14);
|
||||
}
|
||||
|
||||
void DeathFx_DropRandom1(DeathFxObject* this) {
|
||||
CreateRandomItemDrop(super, 1);
|
||||
}
|
||||
|
||||
u32 CreateItemDrop(Entity* arg0, u32 itemID, u32 itemParameter);
|
||||
void DeathFx_DropFixedItem(DeathFxObject* this) {
|
||||
CreateItemDrop(super, this->item, 0);
|
||||
}
|
||||
|
||||
void DeathFx_Delete(DeathFxObject* this) {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
+1
-6
@@ -39,11 +39,6 @@ static void LoadDestructibleTile(TileEntity*);
|
||||
static void LoadGrassDropTile(TileEntity*);
|
||||
static void LoadLocationTile(TileEntity*);
|
||||
|
||||
typedef struct {
|
||||
u8 filler[0x20];
|
||||
} VarStruct;
|
||||
extern VarStruct gUnk_080015BC[];
|
||||
|
||||
void LoadRoomEntityList(EntityData* listPtr) {
|
||||
if (listPtr != NULL) {
|
||||
while (listPtr->kind != 0xFF) {
|
||||
@@ -302,7 +297,7 @@ void LoadRoomTileEntities(TileEntity* list) {
|
||||
}
|
||||
|
||||
static void LoadGrassDropTile(TileEntity* tile) {
|
||||
MemCopy(&gUnk_080015BC[tile->_1], &gRoomVars.filler4[44], 0x20);
|
||||
MemCopy(&gAreaDroptables[tile->_1], &gRoomVars.currentAreaDroptable, 0x20);
|
||||
}
|
||||
|
||||
static void LoadLocationTile(TileEntity* tile) {
|
||||
|
||||
Reference in New Issue
Block a user