Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8cb2e2f

Browse files
committedMar 16, 2025
move to item_actions
1 parent dca63ba commit 8cb2e2f

File tree

4 files changed

+50
-44
lines changed

4 files changed

+50
-44
lines changed
 

‎include/item_actions.h

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#ifndef INCLUDE_ITEM_ACTIONS_H
2+
#define INCLUDE_ITEM_ACTIONS_H
3+
4+
#include "structs/dungeon_entity.h"
5+
void StunSeedItemAction(Entity *pokemon, Entity *target);
6+
void MaxElixirAction(Entity *pokemon, Entity *target);
7+
void ProteinItemAction(Entity *pokemon, Entity *target);
8+
void CalciumItemAction(Entity *pokemon, Entity *target);
9+
void IronItemAction(Entity *pokemon, Entity *target);
10+
void ZincItemAction(Entity *pokemon, Entity *target);
11+
void sub_80487CC(Entity *pokemon, Entity *target, u32 param_3, u32 param_4);
12+
void GrimyFoodItemAction(Entity *pokemon, Entity *target);
13+
void HandleGummiItemAction(Entity *pokemon, Entity *target, u8 r2);
14+
void IcePartItemAction(Entity *pokemon, Entity *target, u8 r2);
15+
void SteelPartItemAction(Entity *pokemon, Entity *target, u8 r2);
16+
void RockPartItemAction(Entity *pokemon, Entity *target, u8 r2);
17+
void MusicBoxItemAction(Entity *pokemon, Entity *target, u8 r2);
18+
void nullsub_94(Entity *pokemon, Entity *target, u8 r2);
19+
void KeyItemAction(Entity *pokemon, Entity *target, u8 r2);
20+
void sub_8048340(Entity *pokemon, Entity *target, u32 r2);
21+
void HealSeedItemAction(Entity *pokemon, Entity *target, u8 r2);
22+
void WishStoneItemAction(Entity *pokemon, Entity *target, u8 r2);
23+
void OranBerryItemAction(Entity *pokemon, Entity *target);
24+
void ChestoBerryItemAction(Entity *pokemon, Entity *target);
25+
void JoySeedItemAction(Entity *pokemon, Entity *target);
26+
void GinsengItemAction(Entity *pokemon, Entity *target);
27+
void BlastSeedItemAction(Entity *pokemon, Entity *target, u8 r2);
28+
void SitrusBerryItemAction(Entity *pokemon, Entity *target);
29+
void WarpSeedItemAction(Entity *pokemon, Entity *target);
30+
void PlainSeedItemAction(Entity *pokemon, Entity *target);
31+
void SleepSeedItemAction(Entity *pokemon, Entity *target);
32+
void TotterSeedItemAction(Entity *pokemon, Entity *target);
33+
void CheriBerryItemAction(Entity *pokemon, Entity *target);
34+
void PechaBerryItemAction(Entity *pokemon, Entity *target);
35+
void QuickSeedItemAction(Entity *pokemon, Entity *target);
36+
void HungerSeedItemAction(Entity *pokemon, Entity *target);
37+
void RawstBerryItemAction(Entity *pokemon, Entity *target);
38+
void LifeSeedItemAction(Entity *pokemon, Entity *target);
39+
void AllureSeedItemAction(Entity *pokemon, Entity *target);
40+
void EyedropSeedItemAction(Entity *pokemon, Entity *target);
41+
void BlinkerSeedItemAction(Entity *pokemon, Entity *target);
42+
void DoomSeedItemAction(Entity *pokemon, Entity *target);
43+
void sub_80482FC(Entity *pokemon, Entity *target, u32 pp, u8 param_4);
44+
45+
46+
#endif /* ifndef INCLUDE_ITEM_ACTIONS_H */

‎include/move_actions.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ bool8 Conversion2MoveAction(Entity *pokemon, Entity *target, Move *move, s32 par
226226
bool8 SteelWingMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4, u32 param_5);
227227
bool8 sub_8058C98(Entity *pokemon, Entity *target, Move *move, u32 param_4, u32 param_5);
228228
bool32 EarthquakeMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4);
229-
bool8 MetalClawMoveAction(Entity *pokemon, Entity *target, Move *move, u32 param_4, u32 param_5);
229+
bool8 MetalClawMoveAction(Entity *pokemon, Entity *target, Move *move, s32 param_4, s32 param_5);
230230

231231

232232

‎ld_script.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ SECTIONS {
211211
src/code_8045A00.o(.text);
212212
src/dungeon_items.o(.text);
213213
asm/code_8046CE4.o(.text);
214-
src/code_8048480.o(.text);
214+
src/item_actions.o(.text);
215215
src/dungeon_ai_item_weight.o(.text);
216216
src/dungeon_map_access.o(.text);
217217
src/tile_types.o(.text);
@@ -578,7 +578,7 @@ SECTIONS {
578578
data/data_8109D10.o(.rodata);
579579
src/pokemon_3.o(.rodata);
580580
src/items.o(.rodata);
581-
src/code_8048480.o(.rodata);
581+
src/item_actions.o(.rodata);
582582
src/friend_area.o(.rodata);
583583
data/data_810AC60.o(.rodata);
584584
src/tile_types.o(.rodata);

‎src/code_8048480.c ‎src/item_actions.c

+1-41
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "global.h"
2+
#include "item_actions.h"
23
#include "code_803E668.h"
34
#include "code_8041AD0.h"
45
#include "code_8045A00.h"
@@ -83,47 +84,6 @@ Entity *sub_80696FC(Entity *);
8384
extern void DisplayMsgIfNewIqSkillLearned(EntityInfo *, s32);
8485
extern u32 HandleDamagingMove(struct Entity *, struct Entity *, struct Move *, u32, u32);
8586

86-
void StunSeedItemAction(Entity *, Entity *);
87-
void MaxElixirAction(Entity *, Entity *);
88-
void ProteinItemAction(Entity *, Entity *);
89-
void CalciumItemAction(Entity *, Entity *);
90-
void IronItemAction(Entity *, Entity *);
91-
void ZincItemAction(Entity *, Entity *);
92-
void sub_80487CC(Entity *, Entity *, u32, u32);
93-
void GrimyFoodItemAction(Entity *, Entity *);
94-
void HandleGummiItemAction(Entity *, Entity *, u8);
95-
void IcePartItemAction(Entity *, Entity *, u8);
96-
void SteelPartItemAction(Entity *, Entity *, u8);
97-
void RockPartItemAction(Entity *, Entity *, u8);
98-
void MusicBoxItemAction(Entity *, Entity *, u8);
99-
void nullsub_94(Entity *, Entity *, u8);
100-
void KeyItemAction(Entity *, Entity *, u8);
101-
void sub_8078B5C(Entity *, Entity *, u32, u32, u32);
102-
void sub_8048340(Entity *, Entity *, u32);
103-
void HealSeedItemAction(Entity *, Entity *, u8);
104-
void WishStoneItemAction(Entity *, Entity *, u8);
105-
void OranBerryItemAction(Entity *, Entity *);
106-
void ChestoBerryItemAction(Entity *, Entity *);
107-
void JoySeedItemAction(Entity *, Entity *);
108-
void GinsengItemAction(Entity *, Entity *);
109-
void BlastSeedItemAction(Entity *, Entity *, u8);
110-
void SitrusBerryItemAction(Entity *, Entity *);
111-
void WarpSeedItemAction(Entity *, Entity *);
112-
void PlainSeedItemAction(Entity *, Entity *);
113-
void SleepSeedItemAction(Entity *, Entity *);
114-
void TotterSeedItemAction(Entity *, Entity *);
115-
void CheriBerryItemAction(Entity *, Entity *);
116-
void PechaBerryItemAction(Entity *, Entity *);
117-
void QuickSeedItemAction(Entity *, Entity *);
118-
void HungerSeedItemAction(Entity *, Entity *);
119-
void RawstBerryItemAction(Entity *, Entity *);
120-
void LifeSeedItemAction(Entity *, Entity *);
121-
void AllureSeedItemAction(Entity *, Entity *);
122-
void EyedropSeedItemAction(Entity *, Entity *);
123-
void BlinkerSeedItemAction(Entity *, Entity *);
124-
void DoomSeedItemAction(Entity *, Entity *);
125-
void sub_80482FC(Entity *, Entity *, u32, u8);
126-
12787
extern void sub_8071DA4(Entity *);
12888
extern void SetShopkeeperAggression(Entity *, Entity *);
12989
extern void sub_806A6E8(Entity *);

0 commit comments

Comments
 (0)
Please sign in to comment.