Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
ItemBlock.c File Reference

Go to the source code of this file.

Functions

f32 player_get_camera_facing_angle (void)
 
void entity_inactive_block_hit_init (Entity *)
 
void entity_inactive_block_hit_anim (Entity *)
 
void entity_inactive_block_recoil_anim (Entity *)
 
void entity_ItemBlock_idle (Entity *entity)
 
void entity_HiddenItemBlock_idle (Entity *entity)
 
void entity_HitItemBlock_appear (Entity *entity)
 
void entity_ItemBlock_spawn_item (Entity *entity)
 
void entity_TriggerBlock_start_bound_script_2 (Entity *entity)
 
void entity_TriggerBlock_play_vanish_effect (Entity *entity)
 
void entity_HitItemBlock_play_anim (Entity *entity)
 
void entity_HitItemBlock_show_inactive (Entity *entity)
 
void entity_ItemBlock_check_if_inactive (Entity *entity)
 
void entity_ItemBlock_replace_with_inactive (Entity *entity)
 
void entity_HitItemBlock_hide (Entity *entity)
 
s32 entity_TriggerBlock_start_bound_script (Entity *entity)
 
void entity_TriggerBlock_disable_player_input (void)
 
void entity_TriggerBlock_enable_player_input (void)
 
void entity_ItemBlock_setupGfx (s32 entityIndex)
 
void entity_ItemBlock_init (Entity *entity)
 
void entity_HiddenItemBlock_init (Entity *entity)
 
void entity_ItemlessBlock_init (Entity *entity)
 

Variables

Gfx Entity_YellowBlock_Render []
 
Gfx Entity_RedBlock_Render []
 
AnimScript Entity_HitYellowBlock_AnimationHit
 
AnimScript Entity_HitYellowBlock_AnimationIdle
 
StaticAnimatorNodeEntity_HitYellowBlock_Mesh []
 
AnimScript Entity_HitFloatingYellowBlock_AnimationIdle
 
StaticAnimatorNodeEntity_HitFloatingYellowBlock_Mesh []
 
AnimScript Entity_HitRedBlock_AnimationHit
 
StaticAnimatorNodeEntity_HitRedBlock_Mesh []
 
s32 D_802EA310 []
 
EntityBlueprint Entity_HitGroundedYellowBlock
 
EntityBlueprint Entity_HitFloatingYellowBlock
 
EntityBlueprint Entity_HitRedBlock
 
BSS EffectInstanceTriggerBlockVanishEffect
 
EntityScript Entity_ItemBlock_Script
 
EntityScript Entity_HiddenItemBlock_Script
 
EntityScript Entity_HitBlock_Script
 
EntityScript Entity_TriggerBlock_Script
 
DmaEntry Entity_HitYellowBlock_dma [] = { ENTITY_ROM(HitYellowBlock_gfx), ENTITY_ROM(HitYellowBlock_anim) }
 
DmaEntry Entity_HitFloatinYellowBlock_dma [] = { ENTITY_ROM(HitFloatingYellowBlock_gfx), ENTITY_ROM(HitFloatingYellowBlock_anim) }
 
DmaEntry Entity_HitRedBlock_dma [] = { ENTITY_ROM(HitRedBlock_gfx), ENTITY_ROM(HitRedBlock_anim) }
 
EntityModelScript Entity_YellowBlock_RenderScript = STANDARD_ENTITY_MODEL_SCRIPT(Entity_YellowBlock_Render, RENDER_MODE_SURFACE_OPA)
 
EntityModelScript Entity_HiddenYellowBlock_RenderScript = STANDARD_ENTITY_MODEL_SCRIPT(Entity_YellowBlock_Render, RENDER_MODE_SURFACE_XLU_LAYER2)
 
EntityModelScript Entity_RedBlock_RenderScript = STANDARD_ENTITY_MODEL_SCRIPT(Entity_RedBlock_Render, RENDER_MODE_SURFACE_OPA)
 
EntityModelScript Entity_HiddenRedBlock_RenderScript = STANDARD_ENTITY_MODEL_SCRIPT(Entity_RedBlock_Render, RENDER_MODE_SURFACE_XLU_LAYER2)
 
EntityBlueprint Entity_YellowBlock
 
EntityBlueprint Entity_HiddenYellowBlock
 
EntityBlueprint Entity_RedBlock
 
EntityBlueprint Entity_HiddenRedBlock
 
EntityBlueprint Entity_TriggerBlock
 

Function Documentation

◆ player_get_camera_facing_angle()

f32 player_get_camera_facing_angle ( void )

Definition at line 1191 of file 7BB60.c.

1191 {
1192 f32 angle = 0.0f;
1193
1195 angle = 180.0f;
1196 }
1197
1198 angle = angle + gCameras[CAM_DEFAULT].curYaw + 90.0f;
1199
1200 return clamp_angle(angle);
1201}
#define clamp_angle
@ CAM_DEFAULT
Definition enums.h:1800
Camera gCameras[4]
Definition cam_main.c:17
PlayerStatus gPlayerStatus
Definition 77480.c:39

Referenced by entity_ItemBlock_spawn_item().

◆ entity_inactive_block_hit_init()

void entity_inactive_block_hit_init ( Entity * entity)

Definition at line 222 of file Block.c.

222 {
223 BlockData* data = entity->dataBuf.block;
224
225 data->recoilInterpPhase = 90.0f;
226}
struct BlockData * block
f32 recoilInterpPhase
Definition entity.h:122
EntityData dataBuf

◆ entity_inactive_block_hit_anim()

void entity_inactive_block_hit_anim ( Entity * entity)

Definition at line 228 of file Block.c.

228 {
229 BlockData* data = entity->dataBuf.block;
230 f64 currentY;
231
233 currentY = entity->pos.y;
234 entity->pos.y = currentY + ((f64)sin_rad(DEG_TO_RAD(data->recoilInterpPhase)) * 2);
235 data->recoilInterpPhase += 60.0f;
236 if (data->recoilInterpPhase > 450.0f) {
239 }
240}
void entity_MulticoinBlock_update_timer(Entity *entity)
Definition Block.c:294
void exec_entity_commandlist(Entity *entity)
Definition entity.c:313
f32 sin_rad(f32 x)
Definition 43F0.c:713
#define DEG_TO_RAD(deg)
Definition macros.h:134

◆ entity_inactive_block_recoil_anim()

void entity_inactive_block_recoil_anim ( Entity * entity)

Definition at line 242 of file Block.c.

242 {
243 BlockData* data = entity->dataBuf.block;
244 f64 currentY;
245
247 currentY = entity->pos.y;
248 entity->pos.y = currentY + ((f64)sin_rad(DEG_TO_RAD(data->recoilInterpPhase)));
249 data->recoilInterpPhase += 60.0f;
250 if (data->recoilInterpPhase >= 360.0f) {
251 data->recoilInterpPhase = 0.0f;
252 entity->pos.y = data->initialY;
254 }
255}
f32 initialY
Definition entity.h:121

◆ entity_ItemBlock_idle()

void entity_ItemBlock_idle ( Entity * entity)

Definition at line 51 of file ItemBlock.c.

51 {
53}
s32 entity_base_block_idle(Entity *entity)
Definition Block.c:195

◆ entity_HiddenItemBlock_idle()

void entity_HiddenItemBlock_idle ( Entity * entity)

Definition at line 55 of file ItemBlock.c.

55 {
56 s32 alpha = entity->alpha;
57
59 alpha += 32;
60 if (alpha > 192) {
61 alpha = 192;
62 }
63 entity->alpha = alpha;
64 } else {
65 alpha -= 32;
66 if (alpha <= 0) {
67 alpha = 0;
68 }
69 entity->alpha = alpha;
70 }
71}
@ PA_FLAG_USING_WATT
Definition enums.h:3090

◆ entity_HitItemBlock_appear()

void entity_HitItemBlock_appear ( Entity * entity)

Definition at line 73 of file ItemBlock.c.

73 {
74 if (entity->alpha < 255) {
75 entity->alpha += (entity->alpha == 0 ? 31 : 32);
76 }
77}

◆ entity_ItemBlock_spawn_item()

void entity_ItemBlock_spawn_item ( Entity * entity)

Definition at line 79 of file ItemBlock.c.

79 {
80 BlockData* data = entity->dataBuf.block;
81 s32 angle;
82
83 if (data->item == ITEM_NONE || (entity->flags & ENTITY_FLAG_USED)) {
84 return;
85 }
86
88 entity->flags |= ENTITY_FLAG_USED;
89
90 if (data->item == ITEM_COIN) {
91 make_item_entity(ITEM_COIN, entity->pos.x, entity->pos.y + 28.0, entity->pos.z,
93 } else {
94 angle += 360;
95 make_item_entity(data->item, entity->pos.x, entity->pos.y + 20.0, entity->pos.z,
97 0, angle, data->gameFlagIndex);
98 }
99
100}
f32 player_get_camera_facing_angle(void)
Definition 7BB60.c:1191
s16 item
Definition entity.h:119
u16 gameFlagIndex
Definition entity.h:116
@ ITEM_SPAWN_MODE_ITEM_BLOCK_ITEM
Definition enums.h:2301
@ ITEM_SPAWN_MODE_ITEM_BLOCK_COIN
Definition enums.h:2312
@ ITEM_SPAWN_MODE_ITEM_BLOCK_BADGE
Definition enums.h:2302
@ ITEM_TYPE_FLAG_BADGE
Definition enums.h:1839
@ ENTITY_FLAG_USED
Definition enums.h:2633
s32 make_item_entity(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pickupDelay, s32 angle, s32 pickupVar)
ItemData gItemTable[]

◆ entity_TriggerBlock_start_bound_script_2()

void entity_TriggerBlock_start_bound_script_2 ( Entity * entity)

Definition at line 102 of file ItemBlock.c.

102 {
103 entity_start_script(entity);
104}
s32 entity_start_script(Entity *entity)
Definition entity.c:560

◆ entity_TriggerBlock_play_vanish_effect()

void entity_TriggerBlock_play_vanish_effect ( Entity * entity)

Definition at line 106 of file ItemBlock.c.

106 {
107 TriggerBlockVanishEffect = fx_cold_breath(0, entity->pos.x, entity->pos.y, entity->pos.z, 1.0f, 0x3C);
108}
BSS EffectInstance * TriggerBlockVanishEffect
Definition ItemBlock.c:44

◆ entity_HitItemBlock_play_anim()

void entity_HitItemBlock_play_anim ( Entity * entity)

Definition at line 110 of file ItemBlock.c.

110 {
111 s32 entityType = get_entity_type(entity->listIndex);
112
113 if (entityType == ENTITY_TYPE_HIDDEN_RED_BLOCK || entityType == ENTITY_TYPE_RED_BLOCK) {
115 } else {
117 }
118}
AnimScript Entity_HitRedBlock_AnimationHit
AnimScript Entity_HitYellowBlock_AnimationHit
@ ENTITY_TYPE_HIDDEN_RED_BLOCK
Definition enums.h:2561
@ ENTITY_TYPE_RED_BLOCK
Definition enums.h:2563
void play_model_animation(s32, s16 *)
Definition animator.c:1101
u32 get_entity_type(s32 arg0)
Definition entity.c:568
s16 virtualModelIndex

◆ entity_HitItemBlock_show_inactive()

void entity_HitItemBlock_show_inactive ( Entity * entity)

Definition at line 120 of file ItemBlock.c.

120 {
121 Entity* inertEntity;
122 Shadow* inertShadow;
123 BlockData* data = entity->dataBuf.block;
124
125 inertEntity = get_entity_by_index(data->childEntityIndex);
126 inertEntity->flags &= ~ENTITY_FLAG_HIDDEN;
127 inertShadow = get_shadow_by_index(inertEntity->shadowIndex);
128 inertShadow->flags &= ~ENTITY_FLAG_HIDDEN;
129}
s16 childEntityIndex
Definition entity.h:120
Entity * get_entity_by_index(s32 index)
Definition entity.c:530
Shadow * get_shadow_by_index(s32 index)
Definition entity.c:534
s16 shadowIndex

◆ entity_ItemBlock_check_if_inactive()

void entity_ItemBlock_check_if_inactive ( Entity * entity)

Definition at line 131 of file ItemBlock.c.

131 {
132 BlockData* data = entity->dataBuf.block;
133
134 if ((data->gameFlagIndex != 0xFFFF) && get_global_flag(data->gameFlagIndex)) {
135 EntityBlueprint* bp;
136
139 } else {
141 }
142 create_entity(bp, (s32)entity->pos.x, (s32)entity->pos.y, (s32)entity->pos.z, (s32)entity->rot.y, MAKE_ENTITY_END);
144 } else {
146 }
147}
s32 D_802EA310[]
Definition ItemBlock.c:288
EntityBlueprint Entity_InertRedBlock
Definition Block.c:591
EntityBlueprint Entity_InertYellowBlock
Definition Block.c:578
#define MAKE_ENTITY_END
Definition evt.h:107
void set_entity_commandlist(Entity *entity, s32 *entityScript)
Definition entity.c:235
s32 create_entity(EntityBlueprint *bp,...)
Definition entity.c:1195
s32 get_global_flag(s32 index)
Definition vars_access.c:89

◆ entity_ItemBlock_replace_with_inactive()

void entity_ItemBlock_replace_with_inactive ( Entity * entity)

Definition at line 151 of file ItemBlock.c.

151 {
152 s32 entityType = get_entity_type(entity->listIndex);
154 s32 childEntityIndex;
155 s32 isBlockOnGround;
156 s32 parentEntityType;
157 BlockData* childData;
158 Entity* childEntity;
159 Shadow* shadow;
160
161 if (entityType < ENTITY_TYPE_HAMMER1_BLOCK) {
163 if (entityType >= ENTITY_TYPE_HIDDEN_RED_BLOCK) {
165 }
166 }
167
168 // this child entity is the inert block
169 childEntityIndex = create_entity(bp, (s32)entity->pos.x, (s32)entity->pos.y, (s32)entity->pos.z, (s32)entity->rot.y, MAKE_ENTITY_END);
170 childEntity = get_entity_by_index(childEntityIndex);
171 childEntity->flags |= ENTITY_FLAG_HIDDEN;
172
175 }
176
179 }
180
181 shadow = get_shadow_by_index(childEntity->shadowIndex);
183 isBlockOnGround = is_block_on_ground(entity);
184
185 parentEntityType = get_entity_type(entity->listIndex);
186 if (parentEntityType == ENTITY_TYPE_HIDDEN_RED_BLOCK || parentEntityType == ENTITY_TYPE_RED_BLOCK) {
187 bp = &Entity_HitRedBlock;
188 } else if (isBlockOnGround != 0) {
190 } else {
192 }
193
194 // child entity is now the animated block which appears before it turns inert
195 childEntity = get_entity_by_index(create_entity(bp, (s32)entity->pos.x, (s32)entity->pos.y, (s32)entity->pos.z, (s32)entity->rot.y, MAKE_ENTITY_END));
196 childEntity->alpha = entity->alpha;
197 if ((entity->flags & ENTITY_FLAG_HIDDEN) || (entity->alpha < 255)) {
198 childEntity->alpha = 32;
199 }
200
203 }
204
205 childData = childEntity->dataBuf.block;
206 childData->childEntityIndex = childEntityIndex;
207
210 }
211
212 entity->flags &= ~ENTITY_FLAG_HAS_SHADOW;
213 shadow = get_shadow_by_index(entity->shadowIndex);
215 shadow = get_shadow_by_index(childEntity->shadowIndex);
217}
EntityBlueprint Entity_HitRedBlock
Definition ItemBlock.c:449
EntityBlueprint Entity_HitGroundedYellowBlock
Definition ItemBlock.c:423
EntityBlueprint Entity_HitFloatingYellowBlock
Definition ItemBlock.c:436
@ ENTITY_TYPE_HAMMER1_BLOCK
Definition enums.h:2564
@ ENTITY_FLAG_SHADOW_POS_DIRTY
Definition enums.h:2635
@ ENTITY_FLAG_DRAW_IF_CLOSE_HIDE_MODE2
Definition enums.h:2631
@ ENTITY_FLAG_HAS_DYNAMIC_SHADOW
Definition enums.h:2615
@ ENTITY_FLAG_HIDDEN
Definition enums.h:2613
@ ENTITY_FLAG_FADING_AWAY
Definition enums.h:2641
s32 is_block_on_ground(Entity *block)
Definition entity.c:1736

◆ entity_HitItemBlock_hide()

void entity_HitItemBlock_hide ( Entity * entity)

Definition at line 219 of file ItemBlock.c.

219 {
220 entity->flags |= ENTITY_FLAG_HIDDEN;
221 entity->flags &= ~ENTITY_FLAG_HAS_SHADOW;
223}

◆ entity_TriggerBlock_start_bound_script()

s32 entity_TriggerBlock_start_bound_script ( Entity * entity)

Definition at line 225 of file ItemBlock.c.

225 {
226 if (entity->boundScriptBytecode != NULL) {
228 return TRUE;
229 }
230 return FALSE;
231}
@ ENTITY_FLAG_BOUND_SCRIPT_DIRTY
Definition enums.h:2637
EvtScript * boundScriptBytecode

◆ entity_TriggerBlock_disable_player_input()

void entity_TriggerBlock_disable_player_input ( void )

Definition at line 233 of file ItemBlock.c.

233 {
235 gPlayerStatus.curSpeed = 0.0f;
239}
@ PS_FLAG_SCRIPTED_FALL
Definition enums.h:3071
@ ACTION_STATE_FALLING
Definition enums.h:2435
s32 disable_player_input(void)
Definition 77480.c:990
void gravity_use_fall_parms(void)
Definition 7BB60.c:302
void set_action_state(s32 actionState)
Definition 7E9D0.c:209

◆ entity_TriggerBlock_enable_player_input()

void entity_TriggerBlock_enable_player_input ( void )

Definition at line 241 of file ItemBlock.c.

241 {
243}
s32 enable_player_input(void)
Definition 77480.c:998

◆ entity_ItemBlock_setupGfx()

void entity_ItemBlock_setupGfx ( s32 entityIndex)

Definition at line 245 of file ItemBlock.c.

245 {
246 Gfx* gfx = gMainGfxPos;
247 Entity* entity = get_entity_by_index(entityIndex);
248
249 gDPSetTextureLUT(gfx++, G_TT_NONE);
250 gSPTexture(gfx++, -1, -1, 0, G_TX_RENDERTILE, G_ON);
251
252 if (entity->alpha >= 255) {
253 gDPSetRenderMode(gfx++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
254 gDPSetCombineMode(gfx++, G_CC_MODULATEIA, G_CC_MODULATEIA);
255 } else {
256 gDPSetCombineMode(gfx++, PM_CC_01, PM_CC_02);
257 gDPSetPrimColor(gfx++, 0, 0, 0, 0, 0, entity->alpha);
258 }
259
260 gMainGfxPos = gfx;
261}
#define PM_CC_01
Definition macros.h:276
#define PM_CC_02
Definition macros.h:277
Gfx * gMainGfxPos
Definition cam_main.c:15

Referenced by entity_ItemBlock_init(), and entity_ItemlessBlock_init().

◆ entity_ItemBlock_init()

void entity_ItemBlock_init ( Entity * entity)

Definition at line 263 of file ItemBlock.c.

263 {
264 BlockData* data;
265
267 data = entity->dataBuf.block;
269 data->gameFlagIndex = 0xFFFF;
271}
void entity_ItemBlock_setupGfx(s32 entityIndex)
Definition ItemBlock.c:245
s32 CreateEntityVarArgBuffer[]
Definition entity.c:35
void entity_base_block_init(Entity *entity)
Definition Block.c:213
void(* renderSetupFunc)(s32)

Referenced by entity_HiddenItemBlock_init().

◆ entity_HiddenItemBlock_init()

void entity_HiddenItemBlock_init ( Entity * entity)

Definition at line 273 of file ItemBlock.c.

273 {
274 entity_ItemBlock_init(entity);
275 entity->alpha = 0;
276}
void entity_ItemBlock_init(Entity *entity)
Definition ItemBlock.c:263

◆ entity_ItemlessBlock_init()

void entity_ItemlessBlock_init ( Entity * entity)

Definition at line 278 of file ItemBlock.c.

278 {
279 ModelAnimator* animator;
280
283 animator = get_animator_by_index(entity->virtualModelIndex);
284 animator->renderMode = 0x11;
285 animator->flags |= 0x10000;
286}
ModelAnimator * get_animator_by_index(s32 animModelID)
Definition animator.c:1041

Variable Documentation

◆ Entity_YellowBlock_Render

Gfx Entity_YellowBlock_Render[]
extern

Definition at line 44 of file YellowBlock.c.

44 {
45 gsSPDisplayList(Entity_YellowBlock_RenderSides),
47 gsSPEndDisplayList(),
48};
Gfx Entity_YellowBlock_RenderTopBottom[]
Definition YellowBlock.c:18
Gfx Entity_YellowBlock_RenderSides[]
Definition YellowBlock.c:30

◆ Entity_RedBlock_Render

Gfx Entity_RedBlock_Render[]
extern

Definition at line 44 of file RedBlock.c.

44 {
45 gsSPDisplayList(Entity_RedBlock_RenderSides),
46 gsSPDisplayList(Entity_RedBlock_RenderTopBottom),
47 gsSPEndDisplayList(),
48};
Gfx Entity_RedBlock_RenderSides[]
Definition RedBlock.c:30
Gfx Entity_RedBlock_RenderTopBottom[]
Definition RedBlock.c:18

◆ Entity_HitYellowBlock_AnimationHit

AnimScript Entity_HitYellowBlock_AnimationHit
extern

Definition at line 33 of file HitYellowBlock_anim.c.

33 {
34 as_SetRotation(1, 0.0, 0.0, 0.0)
35 as_SetPos(1, 0, 0, 0)
36 as_SetScale(1, 1.0, 1.0, 1.0)
37 as_SetRotation(2, 0.0, 0.0, 0.0)
38 as_SetPos(2, 0, 0, 0)
39 as_SetScale(2, 1.0, 1.0, 1.0)
40 as_SetRotation(3, 0.0, 0.0, 0.0)
41 as_SetPos(3, 0, 25, 0)
42 as_SetScale(3, -1.0, -1.0, -1.0)
43 as_Wait(1)
44 as_SetPos(2, 0, 25, 0)
45 as_SetScale(2, 2.0, 0.0, 2.0)
46 as_SetScale(3, -2.0, 0.0, -2.0)
47 as_Wait(1)
48 as_SetPos(2, 0, 40, 0)
49 as_SetScale(2, 1.62, -0.62, 1.62)
50 as_SetScale(3, -1.62, 0.62, -1.62)
51 as_Wait(1)
52 as_SetPos(2, 0, 50, 0)
53 as_SetScale(2, -1.0, -1.0, -1.0)
54 as_SetScale(3, 1.0, 1.0, 1.0)
55 as_Wait(1)
56 as_SetPos(2, 0, 43, 0)
57 as_SetScale(2, -1.36, -0.885, -1.36)
58 as_SetPos(3, 0, 21, 0)
59 as_SetScale(3, 1.36, 0.885, 1.36)
60 as_Wait(1)
61 as_SetPos(2, 0, 35, 0)
62 as_SetScale(2, -1.245, -0.745, -1.245)
63 as_SetPos(3, 0, 16, 0)
64 as_SetScale(3, 1.245, 0.745, 1.245)
65 as_Wait(1)
66 as_SetPos(2, 0, 30, 0)
67 as_SetScale(2, -1.18, -0.815, -1.18)
68 as_SetPos(3, 0, 9, 0)
69 as_SetScale(3, 1.18, 0.815, 1.18)
70 as_Wait(1)
71 as_SetPos(2, 0, 26, 0)
72 as_SetScale(2, -1.06, -0.935, -1.06)
73 as_SetPos(3, 0, 3, 0)
74 as_SetScale(3, 1.06, 0.935, 1.06)
75 as_Wait(1)
77 as_SetPos(2, 0, 25, 0)
78 as_SetScale(2, -1.0, -1.0, -1.0)
79 as_SetPos(3, 0, 0, 0)
80 as_SetScale(3, 1.0, 1.0, 1.0)
81 as_Wait(1)
83 as_End
84};
#define as_Wait(time)
#define as_SetPos(node, x, y, z)
#define as_SetRotation(node, x, y, z)
#define as_SetScale(node, x, y, z)
#define as_End
#define as_Loop
#define as_EndLoop

Referenced by entity_HitItemBlock_play_anim().

◆ Entity_HitYellowBlock_AnimationIdle

AnimScript Entity_HitYellowBlock_AnimationIdle
extern

Definition at line 86 of file HitYellowBlock_anim.c.

86 {
87 as_SetRotation(1, 0.0, 0.0, 0.0)
88 as_SetPos(1, 0, 0, 0)
89 as_SetScale(1, 1.0, 1.0, 1.0)
90 as_SetRotation(2, 0.0, 0.0, 0.0)
91 as_SetPos(2, 0, 0, 0)
92 as_SetScale(2, 1.0, 1.0, 1.0)
93 as_SetRotation(3, 0.0, 0.0, 0.0)
94 as_SetPos(3, 0, 25, 0)
95 as_SetScale(3, -1.0, -1.0, -1.0)
96 as_Wait(1)
98 as_End
99};
#define as_Restart

◆ Entity_HitYellowBlock_Mesh

StaticAnimatorNode* Entity_HitYellowBlock_Mesh[]
extern

Definition at line 26 of file HitYellowBlock_anim.c.

26 {
31};
StaticAnimatorNode Entity_HitYellowBlock_NodeBlock2
StaticAnimatorNode Entity_HitYellowBlock_NodeBlock1
StaticAnimatorNode Entity_HitYellowBlock_NodeMain
#define ENTITY_ANIM_NULL

◆ Entity_HitFloatingYellowBlock_AnimationIdle

AnimScript Entity_HitFloatingYellowBlock_AnimationIdle
extern

Definition at line 85 of file HitFloatingYellowBlock_anim.c.

85 {
86 as_SetRotation(1, 0.0, 0.0, 0.0)
87 as_SetPos(1, 0, 0, 0)
88 as_SetScale(1, 1.0, 1.0, 1.0)
89 as_SetRotation(2, 0.0, 0.0, 0.0)
90 as_SetPos(2, 0, 0, 0)
91 as_SetScale(2, 1.0, 1.0, 1.0)
92 as_SetRotation(3, 0.0, 0.0, 0.0)
93 as_SetPos(3, 0, 25, 0)
94 as_SetScale(3, 1.0, -1.0, 1.0)
95 as_Wait(1)
97 as_End
98};

◆ Entity_HitFloatingYellowBlock_Mesh

StaticAnimatorNode* Entity_HitFloatingYellowBlock_Mesh[]
extern

Definition at line 26 of file HitFloatingYellowBlock_anim.c.

26 {
31};
StaticAnimatorNode Entity_HitFloatingYellowBlock_NodeBlock2
StaticAnimatorNode Entity_HitFloatingYellowBlock_NodeBlock1
StaticAnimatorNode Entity_HitFloatingYellowBlock_NodeMain

◆ Entity_HitRedBlock_AnimationHit

AnimScript Entity_HitRedBlock_AnimationHit
extern

Definition at line 33 of file HitRedBlock_anim.c.

33 {
34 as_SetRotation(1, 0.0, 0.0, 0.0)
35 as_SetPos(1, 0, 0, 0)
36 as_SetScale(1, 1.0, 1.0, 1.0)
37 as_SetRotation(2, 0.0, 0.0, 0.0)
38 as_SetPos(2, 0, 0, 0)
39 as_SetScale(2, 1.0, 1.0, 1.0)
40 as_SetRotation(3, 0.0, 0.0, 0.0)
41 as_SetPos(3, 0, 25, 0)
42 as_SetScale(3, -1.0, -1.0, -1.0)
43 as_Wait(1)
44 as_SetPos(2, 0, 9, 0)
45 as_SetScale(2, 1.62, 0.62, 1.62)
46 as_SetScale(3, -1.62, -0.62, -1.62)
47 as_Wait(1)
48 as_SetPos(2, 0, 25, 0)
49 as_SetScale(2, 2.0, 0.0, 2.0)
50 as_SetScale(3, -2.0, 0.0, -2.0)
51 as_Wait(1)
52 as_SetPos(2, 0, 40, 0)
53 as_SetScale(2, 1.62, -0.62, 1.62)
54 as_SetScale(3, -1.62, 0.62, -1.62)
55 as_Wait(1)
56 as_SetPos(2, 0, 50, 0)
57 as_SetScale(2, -1.0, -1.0, -1.0)
58 as_SetScale(3, 1.0, 1.0, 1.0)
59 as_Wait(1)
60 as_SetPos(2, 0, 43, 0)
61 as_SetScale(2, -1.36, -0.885, -1.36)
62 as_SetPos(3, 0, 21, 0)
63 as_SetScale(3, 1.36, 0.885, 1.36)
64 as_Wait(1)
65 as_SetPos(2, 0, 35, 0)
66 as_SetScale(2, -1.245, -0.745, -1.245)
67 as_SetPos(3, 0, 16, 0)
68 as_SetScale(3, 1.245, 0.745, 1.245)
69 as_Wait(1)
70 as_SetPos(2, 0, 30, 0)
71 as_SetScale(2, -1.18, -0.815, -1.18)
72 as_SetPos(3, 0, 9, 0)
73 as_SetScale(3, 1.18, 0.815, 1.18)
74 as_Wait(1)
75 as_SetPos(2, 0, 26, 0)
76 as_SetScale(2, -1.06, -0.935, -1.06)
77 as_SetPos(3, 0, 3, 0)
78 as_SetScale(3, 1.06, 0.935, 1.06)
79 as_Wait(1)
81 as_SetPos(2, 0, 25, 0)
82 as_SetScale(2, -1.0, -1.0, -1.0)
83 as_SetPos(3, 0, 0, 0)
84 as_SetScale(3, 1.0, 1.0, 1.0)
85 as_Wait(1)
87 as_End
88};

Referenced by entity_HitItemBlock_play_anim().

◆ Entity_HitRedBlock_Mesh

StaticAnimatorNode* Entity_HitRedBlock_Mesh[]
extern

Definition at line 26 of file HitRedBlock_anim.c.

26 {
31};
StaticAnimatorNode Entity_HitRedBlock_NodeMain
StaticAnimatorNode Entity_HitRedBlock_NodeBlock2
StaticAnimatorNode Entity_HitRedBlock_NodeBlock1

◆ D_802EA310

EntityScript D_802EA310
Initial value:
= {
es_SetCallback(NULL, 2)
}
#define es_SetCallback(func, time)
Definition entity.h:38
#define es_SetFlags(flags)
Definition entity.h:43
#define es_End
Definition entity.h:35
@ ENTITY_FLAG_PENDING_INSTANCE_DELETE
Definition enums.h:2642

Definition at line 288 of file ItemBlock.c.

Referenced by entity_ItemBlock_check_if_inactive().

◆ Entity_HitGroundedYellowBlock

EntityBlueprint Entity_HitGroundedYellowBlock
Initial value:
= {
.typeDataSize = sizeof(BlockData),
.modelAnimationNodes = Entity_HitYellowBlock_Mesh,
.updateEntityScript = Entity_HitBlock_Script,
.fpHandleCollision = NULL,
{ .dmaList = Entity_HitYellowBlock_dma },
.entityType = ENTITY_TYPE_YELLOW_BLOCK,
.aabbSize = { 25, 25, 25 }
}
AnimScript Entity_HitYellowBlock_AnimationIdle
DmaEntry Entity_HitYellowBlock_dma[]
Definition ItemBlock.c:349
StaticAnimatorNode * Entity_HitYellowBlock_Mesh[]
EntityScript Entity_HitBlock_Script
Definition ItemBlock.c:320
void entity_ItemlessBlock_init(Entity *entity)
Definition ItemBlock.c:278
@ ENTITY_TYPE_YELLOW_BLOCK
Definition enums.h:2558
@ ENTITY_FLAG_HAS_ANIMATED_MODEL
Definition enums.h:2616
@ ENTITY_FLAG_FIXED_SHADOW_SIZE
Definition enums.h:2622
@ ENTITY_FLAG_4000
Definition enums.h:2627

Definition at line 423 of file ItemBlock.c.

423 {
425 .typeDataSize = sizeof(BlockData),
426 .renderCommandList = Entity_HitYellowBlock_AnimationIdle,
427 .modelAnimationNodes = Entity_HitYellowBlock_Mesh,
429 .updateEntityScript = Entity_HitBlock_Script,
430 .fpHandleCollision = NULL,
431 { .dmaList = Entity_HitYellowBlock_dma },
432 .entityType = ENTITY_TYPE_YELLOW_BLOCK,
433 .aabbSize = { 25, 25, 25 }
434};

Referenced by entity_ItemBlock_replace_with_inactive().

◆ Entity_HitFloatingYellowBlock

EntityBlueprint Entity_HitFloatingYellowBlock
Initial value:
= {
.typeDataSize = sizeof(BlockData),
.modelAnimationNodes = Entity_HitFloatingYellowBlock_Mesh,
.updateEntityScript = Entity_HitBlock_Script,
.fpHandleCollision = NULL,
.entityType = ENTITY_TYPE_YELLOW_BLOCK,
.aabbSize = { 25, 25, 25 }
}
AnimScript Entity_HitFloatingYellowBlock_AnimationIdle
DmaEntry Entity_HitFloatinYellowBlock_dma[]
Definition ItemBlock.c:350
StaticAnimatorNode * Entity_HitFloatingYellowBlock_Mesh[]

Definition at line 436 of file ItemBlock.c.

436 {
438 .typeDataSize = sizeof(BlockData),
440 .modelAnimationNodes = Entity_HitFloatingYellowBlock_Mesh,
442 .updateEntityScript = Entity_HitBlock_Script,
443 .fpHandleCollision = NULL,
445 .entityType = ENTITY_TYPE_YELLOW_BLOCK,
446 .aabbSize = { 25, 25, 25 }
447};

Referenced by entity_ItemBlock_replace_with_inactive().

◆ Entity_HitRedBlock

EntityBlueprint Entity_HitRedBlock
Initial value:
= {
.typeDataSize = sizeof(BlockData),
.renderCommandList = Entity_HitRedBlock_AnimationHit,
.modelAnimationNodes = Entity_HitRedBlock_Mesh,
.updateEntityScript = Entity_HitBlock_Script,
.fpHandleCollision = NULL,
{ .dmaList = Entity_HitRedBlock_dma },
.entityType = ENTITY_TYPE_RED_BLOCK,
.aabbSize = { 25, 25, 25 }
}
DmaEntry Entity_HitRedBlock_dma[]
Definition ItemBlock.c:351
StaticAnimatorNode * Entity_HitRedBlock_Mesh[]

Definition at line 449 of file ItemBlock.c.

449 {
451 .typeDataSize = sizeof(BlockData),
452 .renderCommandList = Entity_HitRedBlock_AnimationHit,
453 .modelAnimationNodes = Entity_HitRedBlock_Mesh,
455 .updateEntityScript = Entity_HitBlock_Script,
456 .fpHandleCollision = NULL,
457 { .dmaList = Entity_HitRedBlock_dma },
458 .entityType = ENTITY_TYPE_RED_BLOCK,
459 .aabbSize = { 25, 25, 25 }
460};

Referenced by entity_ItemBlock_replace_with_inactive().

◆ TriggerBlockVanishEffect

BSS EffectInstance* TriggerBlockVanishEffect

Definition at line 44 of file ItemBlock.c.

Referenced by entity_TriggerBlock_play_vanish_effect().

◆ Entity_ItemBlock_Script

EntityScript Entity_ItemBlock_Script

◆ Entity_HiddenItemBlock_Script

◆ Entity_HitBlock_Script

EntityScript Entity_HitBlock_Script

◆ Entity_TriggerBlock_Script

EntityScript Entity_TriggerBlock_Script
Initial value:
= {
es_SetCallback(NULL, 2)
}
void entity_TriggerBlock_disable_player_input(void)
Definition ItemBlock.c:233
void entity_inactive_block_hit_init(Entity *)
Definition Block.c:222
s32 entity_TriggerBlock_start_bound_script(Entity *entity)
Definition ItemBlock.c:225
void entity_inactive_block_recoil_anim(Entity *)
Definition Block.c:242
void entity_inactive_block_hit_anim(Entity *)
Definition Block.c:228
void entity_TriggerBlock_play_vanish_effect(Entity *entity)
Definition ItemBlock.c:106
void entity_TriggerBlock_enable_player_input(void)
Definition ItemBlock.c:241
void entity_TriggerBlock_start_bound_script_2(Entity *entity)
Definition ItemBlock.c:102
@ ENTITY_FLAG_DISABLE_COLLISION
Definition enums.h:2618

Definition at line 331 of file ItemBlock.c.

◆ Entity_HitYellowBlock_dma

DmaEntry Entity_HitYellowBlock_dma[] = { ENTITY_ROM(HitYellowBlock_gfx), ENTITY_ROM(HitYellowBlock_anim) }

Definition at line 349 of file ItemBlock.c.

349{ ENTITY_ROM(HitYellowBlock_gfx), ENTITY_ROM(HitYellowBlock_anim) };
#define ENTITY_ROM(name)
Definition entity.h:65

◆ Entity_HitFloatinYellowBlock_dma

DmaEntry Entity_HitFloatinYellowBlock_dma[] = { ENTITY_ROM(HitFloatingYellowBlock_gfx), ENTITY_ROM(HitFloatingYellowBlock_anim) }

Definition at line 350 of file ItemBlock.c.

350{ ENTITY_ROM(HitFloatingYellowBlock_gfx), ENTITY_ROM(HitFloatingYellowBlock_anim) };

◆ Entity_HitRedBlock_dma

DmaEntry Entity_HitRedBlock_dma[] = { ENTITY_ROM(HitRedBlock_gfx), ENTITY_ROM(HitRedBlock_anim) }

Definition at line 351 of file ItemBlock.c.

351{ ENTITY_ROM(HitRedBlock_gfx), ENTITY_ROM(HitRedBlock_anim) };

◆ Entity_YellowBlock_RenderScript

◆ Entity_HiddenYellowBlock_RenderScript

Definition at line 354 of file ItemBlock.c.

◆ Entity_RedBlock_RenderScript

◆ Entity_HiddenRedBlock_RenderScript

Definition at line 356 of file ItemBlock.c.

◆ Entity_YellowBlock

EntityBlueprint Entity_YellowBlock
Initial value:
= {
.typeDataSize = sizeof(BlockData),
.renderCommandList = Entity_YellowBlock_RenderScript,
.modelAnimationNodes = 0,
.updateEntityScript = Entity_ItemBlock_Script,
.fpHandleCollision = entity_block_handle_collision,
{ .dma = ENTITY_ROM(YellowBlock) },
.entityType = ENTITY_TYPE_YELLOW_BLOCK,
.aabbSize = { 25, 25, 25 }
}
EntityModelScript Entity_YellowBlock_RenderScript
Definition ItemBlock.c:353
EntityScript Entity_ItemBlock_Script
Definition ItemBlock.c:294
s32 entity_block_handle_collision(Entity *entity)
Definition Block.c:334

Definition at line 358 of file ItemBlock.c.

358 {
360 .typeDataSize = sizeof(BlockData),
361 .renderCommandList = Entity_YellowBlock_RenderScript,
362 .modelAnimationNodes = 0,
363 .fpInit = entity_ItemBlock_init,
364 .updateEntityScript = Entity_ItemBlock_Script,
365 .fpHandleCollision = entity_block_handle_collision,
366 { .dma = ENTITY_ROM(YellowBlock) },
367 .entityType = ENTITY_TYPE_YELLOW_BLOCK,
368 .aabbSize = { 25, 25, 25 }
369};

◆ Entity_HiddenYellowBlock

EntityBlueprint Entity_HiddenYellowBlock
Initial value:
= {
.typeDataSize = sizeof(BlockData),
.modelAnimationNodes = 0,
.updateEntityScript = Entity_HiddenItemBlock_Script,
.fpHandleCollision = entity_block_handle_collision,
{ .dma = ENTITY_ROM(YellowBlock) },
.aabbSize = { 25, 25, 25 }
}
void entity_HiddenItemBlock_init(Entity *entity)
Definition ItemBlock.c:273
EntityModelScript Entity_HiddenYellowBlock_RenderScript
Definition ItemBlock.c:354
EntityScript Entity_HiddenItemBlock_Script
Definition ItemBlock.c:307
@ ENTITY_TYPE_HIDDEN_YELLOW_BLOCK
Definition enums.h:2560

Definition at line 371 of file ItemBlock.c.

371 {
373 .typeDataSize = sizeof(BlockData),
374 .renderCommandList = Entity_HiddenYellowBlock_RenderScript,
375 .modelAnimationNodes = 0,
377 .updateEntityScript = Entity_HiddenItemBlock_Script,
378 .fpHandleCollision = entity_block_handle_collision,
379 { .dma = ENTITY_ROM(YellowBlock) },
381 .aabbSize = { 25, 25, 25 }
382};

◆ Entity_RedBlock

EntityBlueprint Entity_RedBlock
Initial value:
= {
.typeDataSize = sizeof(BlockData),
.renderCommandList = Entity_RedBlock_RenderScript,
.modelAnimationNodes = 0,
.updateEntityScript = Entity_ItemBlock_Script,
.fpHandleCollision = entity_block_handle_collision,
{ .dma = ENTITY_ROM(RedBlock) },
.entityType = ENTITY_TYPE_RED_BLOCK,
.aabbSize = { 25, 25, 25 }
}
EntityModelScript Entity_RedBlock_RenderScript
Definition ItemBlock.c:355

Definition at line 384 of file ItemBlock.c.

384 {
386 .typeDataSize = sizeof(BlockData),
387 .renderCommandList = Entity_RedBlock_RenderScript,
388 .modelAnimationNodes = 0,
389 .fpInit = entity_ItemBlock_init,
390 .updateEntityScript = Entity_ItemBlock_Script,
391 .fpHandleCollision = entity_block_handle_collision,
392 { .dma = ENTITY_ROM(RedBlock) },
393 .entityType = ENTITY_TYPE_RED_BLOCK,
394 .aabbSize = { 25, 25, 25 }
395};

◆ Entity_HiddenRedBlock

EntityBlueprint Entity_HiddenRedBlock
Initial value:
= {
.typeDataSize = sizeof(BlockData),
.renderCommandList = Entity_HiddenRedBlock_RenderScript,
.modelAnimationNodes = 0,
.updateEntityScript = Entity_HiddenItemBlock_Script,
.fpHandleCollision = entity_block_handle_collision,
{ .dma = ENTITY_ROM(RedBlock) },
.aabbSize = { 25, 25, 25 }
}
EntityModelScript Entity_HiddenRedBlock_RenderScript
Definition ItemBlock.c:356

Definition at line 397 of file ItemBlock.c.

397 {
399 .typeDataSize = sizeof(BlockData),
400 .renderCommandList = Entity_HiddenRedBlock_RenderScript,
401 .modelAnimationNodes = 0,
403 .updateEntityScript = Entity_HiddenItemBlock_Script,
404 .fpHandleCollision = entity_block_handle_collision,
405 { .dma = ENTITY_ROM(RedBlock) },
406 .entityType = ENTITY_TYPE_HIDDEN_RED_BLOCK,
407 .aabbSize = { 25, 25, 25 }
408};

◆ Entity_TriggerBlock

EntityBlueprint Entity_TriggerBlock
Initial value:
= {
.typeDataSize = sizeof(BlockData),
.modelAnimationNodes = Entity_HitYellowBlock_Mesh,
.updateEntityScript = Entity_TriggerBlock_Script,
.fpHandleCollision = entity_block_handle_collision,
{ .dmaList = Entity_HitYellowBlock_dma },
.aabbSize = { 25, 25, 25 }
}
EntityScript Entity_TriggerBlock_Script
Definition ItemBlock.c:331
@ ENTITY_TYPE_SINGLE_TRIGGER_BLOCK
Definition enums.h:2559
@ ENTITY_FLAG_8000
Definition enums.h:2628

Definition at line 410 of file ItemBlock.c.

410 {
412 .typeDataSize = sizeof(BlockData),
413 .renderCommandList = Entity_HitYellowBlock_AnimationIdle,
414 .modelAnimationNodes = Entity_HitYellowBlock_Mesh,
416 .updateEntityScript = Entity_TriggerBlock_Script,
417 .fpHandleCollision = entity_block_handle_collision,
418 { .dmaList = Entity_HitYellowBlock_dma },
420 .aabbSize = { 25, 25, 25 }
421};