mirror of
https://github.com/zeldaret/tmc
synced 2026-07-09 23:01:43 -04:00
Prefix all Items and PlayerItems
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
|
||||
extern void (*const gUnk_080B3E30[])(Entity*);
|
||||
|
||||
void sub_08018FCC(Entity* this) {
|
||||
void PlayerItemBow(Entity* this) {
|
||||
gUnk_080B3E30[(this->action)](this);
|
||||
}
|
||||
|
||||
+9
-7
@@ -5,10 +5,12 @@
|
||||
|
||||
// TODO - How does this relate to PlayerItemFunctions? Is this just a lookup table?
|
||||
void (*const gItemFunctions[])(ItemBehavior*, u32) = {
|
||||
DebugItem, Sword, Sword, Sword, Sword, Sword, Sword, Bomb,
|
||||
Bomb, Bow, Bow, sub_08075D14, sub_08075D14, Shield, Shield, Lantern,
|
||||
Lantern, GustJar, PacciCane, MoleMitts, RocsCape, sub_08076800, DebugItem, Ocarina,
|
||||
DebugItem, DebugItem, DebugItem, TryPickupObject, JarEmpty, JarEmpty, JarEmpty, JarEmpty,
|
||||
|
||||
ItemDebug, ItemSword, ItemSword, ItemSword, ItemSword, ItemSword, ItemSword,
|
||||
ItemBomb, ItemBomb, ItemBow, ItemBow, ItemBoomerang, ItemBoomerang, ItemShield,
|
||||
ItemShield, ItemLantern, ItemLantern, ItemGustJar, ItemPacciCane, ItemMoleMitts, ItemRocsCape,
|
||||
ItemPegasusBoots, ItemDebug, ItemOcarina, ItemDebug, ItemDebug, ItemDebug, ItemTryPickupObject,
|
||||
ItemJarEmpty, ItemJarEmpty, ItemJarEmpty, ItemJarEmpty,
|
||||
};
|
||||
|
||||
extern void sub_08077E78(ItemBehavior*, u32);
|
||||
@@ -61,7 +63,7 @@ void OcarinaUse(ItemBehavior *beh, u32 arg1)
|
||||
}
|
||||
#endif
|
||||
|
||||
void PacciCane(ItemBehavior* beh, u32 arg1) {
|
||||
void ItemPacciCane(ItemBehavior* beh, u32 arg1) {
|
||||
gUnk_0811BDE0[beh->stateID](beh, arg1);
|
||||
}
|
||||
|
||||
@@ -83,7 +85,7 @@ void sub_08076CBC(ItemBehavior* beh, u32 arg1) {
|
||||
}
|
||||
}
|
||||
|
||||
void Shield(ItemBehavior* beh, u32 arg1) {
|
||||
void ItemShield(ItemBehavior* beh, u32 arg1) {
|
||||
gUnk_0811BDE8[beh->stateID](beh, arg1);
|
||||
}
|
||||
|
||||
@@ -121,7 +123,7 @@ void sub_08076D94(ItemBehavior* beh, u32 arg1) {
|
||||
}
|
||||
}
|
||||
|
||||
void GustJar(ItemBehavior* beh, u32 arg1) {
|
||||
void ItemGustJar(ItemBehavior* beh, u32 arg1) {
|
||||
gPlayerState.field_0xa8 = 3;
|
||||
gUnk_0811BDF4[beh->stateID](beh, arg1);
|
||||
}
|
||||
|
||||
+2
-2
@@ -279,10 +279,10 @@ u16 sub_08056300(u16* arr) {
|
||||
return 0xff;
|
||||
}
|
||||
|
||||
void NulledItem() {
|
||||
void PlayerItemNulled2() {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
void sub_08056330() {
|
||||
void PlayerItemNulled() {
|
||||
DeleteThisEntity();
|
||||
}
|
||||
|
||||
@@ -55,8 +55,8 @@ void sub_08057920(Manager* this) {
|
||||
DiggingCaveEntrance* tmp;
|
||||
u8 roomID;
|
||||
roomID = gRoomControls.roomID;
|
||||
for (tmp = diggingCaveEntrances[gRoomControls.areaID]; (tmp = sub_08057AA8(tmp, roomID)) != 0 && !sub_0805795C(this, tmp);
|
||||
tmp++)
|
||||
for (tmp = diggingCaveEntrances[gRoomControls.areaID];
|
||||
(tmp = sub_08057AA8(tmp, roomID)) != 0 && !sub_0805795C(this, tmp); tmp++)
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
+46
-24
@@ -1,30 +1,52 @@
|
||||
#include "global.h"
|
||||
#include "functions.h"
|
||||
|
||||
extern void sub_080A7544();
|
||||
extern void sub_0801B188();
|
||||
extern void sub_0801B45C();
|
||||
extern void sub_08018FCC();
|
||||
extern void sub_080A2D74();
|
||||
extern void sub_08054A40();
|
||||
extern void sub_08056330();
|
||||
extern void sub_080ADA30();
|
||||
extern void sub_080704BC();
|
||||
extern void sub_0801B898();
|
||||
extern void CellOverwriteSet();
|
||||
extern void SwordSpin();
|
||||
extern void SwordBeam();
|
||||
extern void sub_080ACBCC();
|
||||
extern void Item11();
|
||||
extern void sub_080700E8();
|
||||
extern void sub_080ACF14();
|
||||
extern void Item14();
|
||||
extern void sub_080A306C();
|
||||
extern void NulledItem();
|
||||
extern void PlayerItemSword();
|
||||
extern void PlayerItemBomb();
|
||||
extern void PlayerItem3();
|
||||
extern void PlayerItemBow();
|
||||
extern void PlayerItemShield();
|
||||
extern void PlayerItemLantern();
|
||||
extern void PlayerItemNulled();
|
||||
extern void PlayerItemGustJar();
|
||||
extern void PlayerItemPacciCane();
|
||||
extern void PlayerItemC();
|
||||
extern void PlayerItemCellOverwriteSet();
|
||||
extern void PlayerItemSwordSpin();
|
||||
extern void PlayerItemSwordBeam();
|
||||
extern void PlayerItem10();
|
||||
extern void PlayerItem11();
|
||||
extern void PlayerItem12();
|
||||
extern void PlayerItem13();
|
||||
extern void PlayerItem14();
|
||||
extern void PlayerItem15();
|
||||
extern void PlayerItemNulled2();
|
||||
|
||||
void (*const gPlayerItemFunctions[])() = {
|
||||
DeleteEntity, sub_080A7544, sub_0801B188, sub_0801B45C, sub_08018FCC, sub_080A2D74, sub_08054A40,
|
||||
sub_08056330, sub_080ADA30, sub_080704BC, DeleteEntity, DeleteEntity, sub_0801B898, CellOverwriteSet,
|
||||
SwordSpin, SwordBeam, sub_080ACBCC, Item11, sub_080700E8, sub_080ACF14, Item14,
|
||||
sub_080A306C, SwordBeam, NulledItem, CellOverwriteSet
|
||||
|
||||
DeleteEntity,
|
||||
PlayerItemSword,
|
||||
PlayerItemBomb,
|
||||
PlayerItem3,
|
||||
PlayerItemBow,
|
||||
PlayerItemShield,
|
||||
PlayerItemLantern,
|
||||
PlayerItemNulled,
|
||||
PlayerItemGustJar,
|
||||
PlayerItemPacciCane,
|
||||
DeleteEntity,
|
||||
DeleteEntity,
|
||||
PlayerItemC,
|
||||
PlayerItemCellOverwriteSet,
|
||||
PlayerItemSwordSpin,
|
||||
PlayerItemSwordBeam,
|
||||
PlayerItem10,
|
||||
PlayerItem11,
|
||||
PlayerItem12,
|
||||
PlayerItem13,
|
||||
PlayerItem14,
|
||||
PlayerItem15,
|
||||
PlayerItemSwordBeam,
|
||||
PlayerItemNulled2,
|
||||
PlayerItemCellOverwriteSet
|
||||
};
|
||||
|
||||
@@ -13,7 +13,7 @@ extern Hitbox gUnk_080B3E18;
|
||||
extern u8 gUnk_080B3DE0[];
|
||||
extern Hitbox* gUnk_080B3DE8[];
|
||||
|
||||
void Item11(Entity* this) {
|
||||
void PlayerItem11(Entity* this) {
|
||||
if (this->currentHealth) {
|
||||
this->iframes = 0;
|
||||
gUnk_080B3DD0[this->action](this);
|
||||
@@ -10,7 +10,7 @@ extern u8 gUnk_08003E44;
|
||||
|
||||
void sub_0805FC74(Entity*);
|
||||
|
||||
void Item14(Entity* this) {
|
||||
void PlayerItem14(Entity* this) {
|
||||
gUnk_08109AC8[this->action](this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user