Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
item_entity.h
Go to the documentation of this file.
1#ifndef ITEM_ENTITY_H
2#define ITEM_ENTITY_H
3
4#include "common.h"
5
6typedef s32 ItemScript[];
7
8enum {
14};
15
16#define is_End ITEM_SCRIPT_OP_End,
17#define is_SetIcon(time, icon) ITEM_SCRIPT_OP_SetImage, time, ICON_##icon##_raster, ICON_##icon##_palette, 0, 0,
18#define is_Restart ITEM_SCRIPT_OP_Restart,
19#define is_Loop ITEM_SCRIPT_OP_Loop,
20#define is_RandomRestart(max, cutoff) ITEM_SCRIPT_OP_RandomRestart, max, cutoff,
21
22// item entity script templates used to generate scripts
23
24#define IES_TEMPLATE_STANDARD(icon) \
25 { \
26 is_SetIcon(60, icon) \
27 is_Restart \
28 is_End \
29 }
30
31#define IES_TEMPLATE_HEART() \
32 { \
33 is_SetIcon(10, anim_heart_0) \
34 is_SetIcon(6, anim_heart_1) \
35 is_Restart \
36 is_End \
37 }
38
39#define IES_TEMPLATE_HEART_PIECE() \
40 { \
41 is_SetIcon(60, anim_heart_piece) \
42 is_Restart \
43 is_End \
44 }
45
46#define IES_TEMPLATE_COIN() \
47 { \
48 is_Loop \
49 is_SetIcon(3, anim_coin_0) \
50 is_SetIcon(3, anim_coin_1) \
51 is_SetIcon(3, anim_coin_4) \
52 is_SetIcon(3, anim_coin_5) \
53 is_SetIcon(3, anim_coin_6) \
54 is_SetIcon(3, anim_coin_7) \
55 is_SetIcon(3, anim_coin_8) \
56 is_SetIcon(3, anim_coin_9) \
57 is_RandomRestart(100, 50) \
58 is_SetIcon(3, anim_coin_0) \
59 is_SetIcon(2, anim_coin_1) \
60 is_SetIcon(1, anim_coin_2) \
61 is_SetIcon(1, anim_coin_3) \
62 is_SetIcon(2, anim_coin_4) \
63 is_SetIcon(3, anim_coin_5) \
64 is_SetIcon(3, anim_coin_6) \
65 is_SetIcon(3, anim_coin_7) \
66 is_SetIcon(3, anim_coin_8) \
67 is_SetIcon(3, anim_coin_9) \
68 is_Restart \
69 is_End \
70 }
71
72#define IES_TEMPLATE_STAR_POINT() \
73 { \
74 is_SetIcon(2, anim_sp_0) \
75 is_SetIcon(2, anim_sp_1) \
76 is_SetIcon(2, anim_sp_2) \
77 is_SetIcon(2, anim_sp_3) \
78 is_SetIcon(2, anim_sp_4) \
79 is_SetIcon(2, anim_sp_5) \
80 is_SetIcon(2, anim_sp_6) \
81 is_SetIcon(2, anim_sp_7) \
82 is_Restart \
83 is_End \
84 }
85
86#define IES_TEMPLATE_HEART_POINT() \
87 { \
88 is_SetIcon(8, anim_hp_0) \
89 is_SetIcon(5, anim_hp_1) \
90 is_SetIcon(8, anim_hp_2) \
91 is_Restart \
92 is_End \
93 }
94
95#define IES_TEMPLATE_FLOWER_POINT() \
96 { \
97 is_SetIcon(8, anim_fp_0) \
98 is_SetIcon(5, anim_fp_1) \
99 is_SetIcon(8, anim_fp_2) \
100 is_Restart \
101 is_End \
102 }
103
104#define IES_TEMPLATE_STAR_PIECE() \
105 { \
106 is_SetIcon(12, anim_star_piece_0) \
107 is_SetIcon(4, anim_star_piece_1) \
108 is_SetIcon(12, anim_star_piece_2) \
109 is_SetIcon(4, anim_star_piece_1) \
110 is_Restart \
111 is_End \
112 }
113
114#endif
s32 ItemScript[]
Definition item_entity.h:6
@ ITEM_SCRIPT_OP_End
Definition item_entity.h:9
@ ITEM_SCRIPT_OP_RandomRestart
Definition item_entity.h:13
@ ITEM_SCRIPT_OP_SetImage
Definition item_entity.h:10
@ ITEM_SCRIPT_OP_Restart
Definition item_entity.h:11
@ ITEM_SCRIPT_OP_Loop
Definition item_entity.h:12