Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
Block.c
Go to the documentation of this file.
1#include "common.h"
2#include "effects.h"
3#include "vars_access.h"
4#include "ld_addrs.h"
5#include "entity.h"
6
7#if VERSION_JP // TODO remove once segments are split
8extern Addr entity_model_BrickBlock_ROM_END;
9extern Addr entity_model_BrickBlock_ROM_START;
10extern Addr entity_model_Hammer1Block_ROM_END;
11extern Addr entity_model_Hammer1Block_ROM_START;
12extern Addr entity_model_Hammer2Block_ROM_END;
13extern Addr entity_model_Hammer2Block_ROM_START;
14extern Addr entity_model_Hammer3Block_ROM_END;
15extern Addr entity_model_Hammer3Block_ROM_START;
16extern Addr entity_model_InertRedBlock_ROM_END;
17extern Addr entity_model_InertRedBlock_ROM_START;
18extern Addr entity_model_InertYellowBlock_ROM_END;
19extern Addr entity_model_InertYellowBlock_ROM_START;
20extern Addr entity_model_PowBlock_ROM_END;
21extern Addr entity_model_PowBlock_ROM_START;
22extern Addr entity_model_PushBlock_ROM_END;
23extern Addr entity_model_PushBlock_ROM_START;
24#endif
25
28extern Gfx Entity_BrickBlock_Render[];
32extern Gfx Entity_PushBlock_Render[];
33extern Gfx Entity_PowBlock_Render[];
34
37
45
46void entity_BrickBlock_idle(Entity* entity);
48
50
51#define MULTICOIN_BLOCK_MAX_COINS 10
52
53void entity_base_block_setupGfx(s32 entityIndex) {
54 Gfx* gfx = gMainGfxPos;
55 Entity* entity = get_entity_by_index(entityIndex);
56
57 gDPSetTextureLUT(gfx++, G_TT_NONE);
58 gSPTexture(gfx++, -1, -1, 0, G_TX_RENDERTILE, G_ON);
59
60 if (entity->alpha >= 255) {
61 gDPSetRenderMode(gfx++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
62 gDPSetCombineMode(gfx++, G_CC_MODULATEIA, G_CC_MODULATEIA);
63 } else {
64 gDPSetCombineMode(gfx++, PM_CC_01, PM_CC_02);
65 gDPSetPrimColor(gfx++, 0, 0, 0, 0, 0, entity->alpha);
66 }
67
68 gMainGfxPos = gfx;
69}
70
72 fx_cold_breath(0, entity->pos.x, entity->pos.y, entity->pos.z, 1.0f, 0x3C);
73}
74
76 s32 type = get_entity_type(entity->listIndex);
78 entity->scale.y = 0.23f;
79 entity->scale.x = 1.04f;
80 entity->scale.z = 1.04f;
81 entity->pos.y += 18.0f;
82 } else {
83 entity->scale.y = 0.46f;
84 entity->scale.x = 2.08f;
85 entity->scale.z = 2.08f;
86 entity->pos.y += 18.0f;
87 }
88}
89
91 s32 type = get_entity_type(entity->listIndex);
93 entity->scale.x -= 0.09;
94 entity->scale.z -= 0.09;
95 entity->scale.y += 0.045;
96 entity->pos.y -= 3.0f;
97 } else {
98 entity->scale.x -= 0.18;
99 entity->scale.z -= 0.18;
100 entity->scale.y += 0.09;
101 entity->pos.y -= 3.0f;
102 }
104}
105
107 PlayerStatus* playerStatus = &gPlayerStatus;
108 BlockData* data = entity->dataBuf.block;
109 f32 deltaY;
110
111 if (entity->alpha < 255) {
112 entity->flags &= ~ENTITY_FLAG_200000;
113 return;
114 }
115
116 if (!(data->sinkingTimer & 0x8000)) {
117 if (data->sinkingTimer < 150) {
118 data->sinkingTimer++;
119 return;
120 }
121
122 if (entity->pos.y < data->initialY - 25.0f) {
123 deltaY = (entity->pos.y - data->initialY + 50.0f) * 0.125f;
124 } else {
125 deltaY = (data->initialY - entity->pos.y) * 0.125f;
126 }
127
128 if (deltaY > 1.2) {
129 deltaY = 1.2f;
130 }
131 if (deltaY < 0.3) {
132 deltaY = 0.3f;
133 }
134
135 entity->pos.y += deltaY;
136
137 if (data->initialY < entity->pos.y) {
138 entity->pos.y = data->initialY;
139 data->sinkingTimer = -1;
140 entity->flags &= ~ENTITY_FLAG_200000;
141 }
142 } else {
144 if (!(playerStatus->flags & PS_FLAG_JUMPING)) {
145 Shadow* shadow = get_shadow_by_index(entity->shadowIndex);
146 if (shadow != NULL) {
147 f32 temp2 = entity->pos.y - shadow->pos.y;
148
149 if (entity->pos.y - temp2 <= playerStatus->colliderHeight + 1) {
150 entity->pos.y = playerStatus->colliderHeight + 1;
151 data->sinkingTimer = 1;
152 }
153 }
154 } else {
155 data->sinkingTimer = 1;
156 return;
157 }
158 } else {
159 Shadow* shadow = get_shadow_by_index(entity->shadowIndex);
160 if (shadow != NULL) {
161 if (entity->pos.y <= shadow->pos.y) {
162 entity->pos.y = shadow->pos.y;
163 data->sinkingTimer = 1;
164 }
165 }
166 }
167
169 data->sinkingTimer = 1;
170 return;
171 }
172
173 if (entity->pos.y < data->initialY - 25.0f) {
174 deltaY = (entity->pos.y - data->initialY + 50.0f) * 0.125f;
175 } else {
176 deltaY = (data->initialY - entity->pos.y) * 0.125f;
177 }
178
179 if (deltaY > 1.2) {
180 deltaY = 1.2f;
181 }
182 if (deltaY < 0.3) {
183 deltaY = 0.3f;
184 }
185
186 entity->pos.y -= deltaY;
187
188 if (entity->pos.y < data->initialY - 50.0f) {
189 entity->pos.y = data->initialY - 50.0f;
190 data->sinkingTimer = 1;
191 }
192 }
193}
194
196 BlockData* data = entity->dataBuf.block;
197 s32 ret = 0;
198
199 if (is_block_on_ground(entity) != 0) {
200 if (entity->flags & ENTITY_FLAG_200000) {
201 ret = 1;
203 if (data->item != -1) {
204 ItemEntity* itemEntity = get_item_entity(data->item);
205 itemEntity->pos.y = entity->pos.y + 4.0f;
206 }
207 }
208 }
209
210 return ret;
211}
212
214 BlockData* data = entity->dataBuf.block;
215
216 data->item = -1;
217 data->initialY = entity->pos.y;
218 data->sinkingTimer = -1;
219 entity->flags &= ~ENTITY_FLAG_200000;
220}
221
223 BlockData* data = entity->dataBuf.block;
224
225 data->recoilInterpPhase = 90.0f;
226}
227
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}
241
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}
256
258 BlockData* data;
259
261 data = entity->dataBuf.block;
263 data->timeLeft = 123;
264 data->gameFlagIndex = 0xFFFF;
265}
266
268 BlockData* data = entity->dataBuf.block;
269 s32 itemSpawnMode;
270 s32 flagIndex;
271
272 if (data->coinsLeft > 0) {
274 itemSpawnMode = ITEM_SPAWN_MODE_ITEM_BLOCK_COIN;
275 flagIndex = data->gameFlagIndex;
276 } else {
278 flagIndex = 0;
279 }
280 make_item_entity_nodelay(ITEM_COIN, entity->pos.x, entity->pos.y + 28.0, entity->pos.z,
281 itemSpawnMode, flagIndex);
282 data->coinsLeft -= 1;
283 }
284
285 if ((data->coinsLeft == 0) || (data->timeLeft == 0)) {
286 data->empty = TRUE;
288 (s32)entity->pos.x, (s32)entity->pos.y, (s32)entity->pos.z,
291 }
292}
293
295 BlockData* data = entity->dataBuf.block;
296
297 if (entity->type == ENTITY_TYPE_MULTI_COIN_BRICK) {
299 data->timeLeft -= 1;
300 if (data->timeLeft < 0) {
301 data->timeLeft = 0;
302 data->coinsLeft = 1;
303 }
304 }
305 }
306}
307
309 BlockData* data = entity->dataBuf.block;
310
313 return;
314 }
317 if (data->empty) {
318 create_entity(&Entity_InertYellowBlock, (s32)entity->pos.x, (s32)entity->pos.y, (s32)entity->pos.z, (s32)entity->rot.y, MAKE_ENTITY_END);
320 }
321}
322
324 BlockData* data = entity->dataBuf.block;
325
326 if (data->gameFlagIndex != 0xFFFF) {
327 if (get_global_flag(data->gameFlagIndex) != 0) {
328 create_entity(&Entity_InertYellowBlock, (s32)entity->pos.x, (s32)entity->pos.y, (s32)entity->pos.z, (s32)entity->rot.y, MAKE_ENTITY_END);
330 }
331 }
332}
333
335 s32 breakBlock;
336 PlayerStatus* playerStatus = &gPlayerStatus;
337
338 if (entity->alpha == 0 && (entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_FLOOR)) {
339 return FALSE;
340 }
341
343 s32 type = get_entity_type(entity->listIndex);
344 switch (type) {
352 return FALSE;
353 }
354
355 if (playerStatus->flags & PS_FLAG_JUMPING) {
357 }
358 return TRUE;
359 }
360
362 // partner collision means either kooper shell toss or bombette explosion
364 switch (get_entity_type(entity->listIndex)) {
369 return TRUE;
370 }
371 }
373 return TRUE;
374 }
375
376 breakBlock = FALSE;
378 if (playerStatus->actionState == ACTION_STATE_SPIN_JUMP || playerStatus->actionState == ACTION_STATE_TORNADO_JUMP) {
379 return FALSE;
380 }
381
382 if (playerStatus->actionState == ACTION_STATE_SPIN_POUND || playerStatus->actionState == ACTION_STATE_TORNADO_POUND) {
383 breakBlock = TRUE;
384 } else {
385 return TRUE;
386 }
387 } else {
389 return TRUE;
390 }
391 if (!(playerStatus->flags & PS_FLAG_HAMMER_CHECK)) {
392 return TRUE;
393 }
394 }
395
396 switch (get_entity_type(entity->listIndex)) {
405 break;
408 if (breakBlock) {
409 if (gPlayerData.bootsLevel < 1) {
410 breakBlock = FALSE;
411 }
412 } else {
413 if (gPlayerData.hammerLevel > -1) {
414 breakBlock = TRUE;
415 }
416 }
417 if (!breakBlock) {
418 return TRUE;
419 }
422 break;
425 if (breakBlock) {
426 if (gPlayerData.bootsLevel < 2) {
427 breakBlock = FALSE;
428 }
429 } else if (gPlayerData.hammerLevel > 0) {
430 breakBlock = TRUE;
431 }
432 if (!breakBlock) {
433 return TRUE;
434 }
437 break;
440 if (gPlayerData.hammerLevel < 2) {
441 return TRUE;
442 }
445 break;
448 case ENTITY_TYPE_1C:
449 case ENTITY_TYPE_1D:
450 case ENTITY_TYPE_1E:
452 entity_start_script(entity);
454 break;
456 entity_start_script(entity);
457 break;
459 break;
460 }
461
462 return TRUE;
463}
464
469
471 BlockData* data = entity->dataBuf.block;
472
473 data->item = -1;
474 data->initialY = entity->pos.y;
475 data->sinkingTimer = -1;
476 entity->flags &= ~ENTITY_FLAG_200000;
477 entity->scale.x = 0.5f;
478 entity->scale.y = 0.5f;
479 entity->scale.z = 0.5f;
480}
481
559
561
563
565
567
569
571
573
575
577
580 .typeDataSize = sizeof(BlockData),
581 .renderCommandList = Entity_InertYellowBlock_RenderScript,
582 .modelAnimationNodes = 0,
584 .updateEntityScript = Entity_InertBlock_Script,
585 .fpHandleCollision = entity_block_handle_collision,
586 { .dma = ENTITY_ROM(InertYellowBlock) },
588 .aabbSize = { 25, 25, 25 }
589};
590
593 .typeDataSize = sizeof(BlockData),
594 .renderCommandList = Entity_InertRedBlock_RenderScript,
595 .modelAnimationNodes = 0,
597 .updateEntityScript = Entity_InertBlock_Script,
598 .fpHandleCollision = entity_block_handle_collision,
599 { .dma = ENTITY_ROM(InertRedBlock) },
600 .entityType = ENTITY_TYPE_INACTIVE_BLOCK,
601 .aabbSize = { 25, 25, 25 }
602};
603
606 .typeDataSize = sizeof(BlockData),
607 .renderCommandList = Entity_BrickBlock_RenderScript,
608 .modelAnimationNodes = 0,
609 .fpInit = entity_base_block_init,
610 .updateEntityScript = Entity_BrickBlock_Script,
611 .fpHandleCollision = entity_block_handle_collision,
612 { .dma = ENTITY_ROM(BrickBlock) },
613 .entityType = ENTITY_TYPE_BRICK_BLOCK,
614 .aabbSize = { 25, 25, 25 }
615};
616
619 .typeDataSize = sizeof(BlockData),
620 .renderCommandList = Entity_MulticoinBrick_RenderScript,
621 .modelAnimationNodes = 0,
623 .updateEntityScript = Entity_MulticoinBlock_Script,
624 .fpHandleCollision = entity_block_handle_collision,
625 { .dma = ENTITY_ROM(BrickBlock) },
626 .entityType = ENTITY_TYPE_MULTI_COIN_BRICK,
627 .aabbSize = { 25, 25, 25 }
628};
629
632 .typeDataSize = sizeof(BlockData),
633 .renderCommandList = Entity_Hammer1Block_RenderScript,
634 .modelAnimationNodes = 0,
636 .updateEntityScript = Entity_Hammer1Block_Script,
637 .fpHandleCollision = entity_block_handle_collision,
638 { .dma = ENTITY_ROM(Hammer1Block) },
639 .entityType = ENTITY_TYPE_HAMMER1_BLOCK,
640 .aabbSize = { 50, 50, 50 }
641};
642
645 .typeDataSize = sizeof(BlockData),
646 .renderCommandList = Entity_Hammer1Block_RenderScript,
647 .modelAnimationNodes = 0,
649 .updateEntityScript = Entity_Hammer1Block_Script,
650 .fpHandleCollision = entity_block_handle_collision,
651 { .dma = ENTITY_ROM(Hammer1Block) },
652 .entityType = ENTITY_TYPE_HAMMER1_BLOCK,
653 .aabbSize = { 100, 50, 50 }
654};
655
658 .typeDataSize = sizeof(BlockData),
659 .renderCommandList = Entity_Hammer1Block_RenderScript,
660 .modelAnimationNodes = 0,
662 .updateEntityScript = Entity_Hammer1Block_Script,
663 .fpHandleCollision = entity_block_handle_collision,
664 { .dma = ENTITY_ROM(Hammer1Block) },
665 .entityType = ENTITY_TYPE_HAMMER1_BLOCK,
666 .aabbSize = { 50, 50, 100 }
667};
668
671 .typeDataSize = sizeof(BlockData),
672 .renderCommandList = Entity_Hammer1Block_RenderScript,
673 .modelAnimationNodes = 0,
675 .updateEntityScript = Entity_BaseBlock_Script,
676 .fpHandleCollision = entity_block_handle_collision,
677 { .dma = ENTITY_ROM(Hammer1Block) },
678 .entityType = ENTITY_TYPE_HAMMER1_BLOCK_TINY,
679 .aabbSize = { 25, 25, 25 }
680};
681
684 .typeDataSize = sizeof(BlockData),
685 .renderCommandList = Entity_Hammer2Block_RenderScript,
686 .modelAnimationNodes = 0,
687 .fpInit = entity_base_block_init,
688 .updateEntityScript = Entity_BaseBlock_Script,
689 .fpHandleCollision = entity_block_handle_collision,
690 { .dma = ENTITY_ROM(Hammer2Block) },
691 .entityType = ENTITY_TYPE_HAMMER2_BLOCK,
692 .aabbSize = { 50, 50, 50 }
693};
694
697 .typeDataSize = sizeof(BlockData),
698 .renderCommandList = Entity_Hammer2Block_RenderScript,
699 .modelAnimationNodes = 0,
700 .fpInit = entity_base_block_init,
701 .updateEntityScript = Entity_BaseBlock_Script,
702 .fpHandleCollision = entity_block_handle_collision,
703 { .dma = ENTITY_ROM(Hammer2Block) },
704 .entityType = ENTITY_TYPE_HAMMER2_BLOCK,
705 .aabbSize = { 100, 50, 50 }
706};
707
710 .typeDataSize = sizeof(BlockData),
711 .renderCommandList = Entity_Hammer2Block_RenderScript,
712 .modelAnimationNodes = 0,
713 .fpInit = entity_base_block_init,
714 .updateEntityScript = Entity_BaseBlock_Script,
715 .fpHandleCollision = entity_block_handle_collision,
716 { .dma = ENTITY_ROM(Hammer2Block) },
717 .entityType = ENTITY_TYPE_HAMMER2_BLOCK,
718 .aabbSize = { 50, 50, 100 }
719};
720
723 .typeDataSize = sizeof(BlockData),
724 .renderCommandList = Entity_Hammer2Block_RenderScript,
725 .modelAnimationNodes = 0,
727 .updateEntityScript = Entity_BaseBlock_Script,
728 .fpHandleCollision = entity_block_handle_collision,
729 { .dma = ENTITY_ROM(Hammer2Block) },
730 .entityType = ENTITY_TYPE_HAMMER2_BLOCK_TINY,
731 .aabbSize = { 25, 25, 25 }
732};
733
736 .typeDataSize = sizeof(BlockData),
737 .renderCommandList = Entity_Hammer3Block_RenderScript,
738 .modelAnimationNodes = 0,
739 .fpInit = entity_base_block_init,
740 .updateEntityScript = Entity_BaseBlock_Script,
741 .fpHandleCollision = entity_block_handle_collision,
742 { .dma = ENTITY_ROM(Hammer3Block) },
743 .entityType = ENTITY_TYPE_HAMMER3_BLOCK,
744 .aabbSize = { 50, 50, 50 }
745};
746
749 .typeDataSize = sizeof(BlockData),
750 .renderCommandList = Entity_Hammer3Block_RenderScript,
751 .modelAnimationNodes = 0,
752 .fpInit = entity_base_block_init,
753 .updateEntityScript = Entity_BaseBlock_Script,
754 .fpHandleCollision = entity_block_handle_collision,
755 { .dma = ENTITY_ROM(Hammer3Block) },
756 .entityType = ENTITY_TYPE_HAMMER3_BLOCK,
757 .aabbSize = { 100, 50, 50 }
758};
759
762 .typeDataSize = sizeof(BlockData),
763 .renderCommandList = Entity_Hammer3Block_RenderScript,
764 .modelAnimationNodes = 0,
765 .fpInit = entity_base_block_init,
766 .updateEntityScript = Entity_BaseBlock_Script,
767 .fpHandleCollision = entity_block_handle_collision,
768 { .dma = ENTITY_ROM(Hammer3Block) },
769 .entityType = ENTITY_TYPE_HAMMER3_BLOCK,
770 .aabbSize = { 50, 50, 100 }
771};
772
775 .typeDataSize = sizeof(BlockData),
776 .renderCommandList = Entity_Hammer3Block_RenderScript,
777 .modelAnimationNodes = 0,
779 .updateEntityScript = Entity_BaseBlock_Script,
780 .fpHandleCollision = entity_block_handle_collision,
781 { .dma = ENTITY_ROM(Hammer3Block) },
782 .entityType = ENTITY_TYPE_HAMMER3_BLOCK_TINY,
783 .aabbSize = { 25, 25, 25 }
784};
785
788 .typeDataSize = sizeof(BlockData),
789 .renderCommandList = Entity_PushBlock_RenderScript,
790 .modelAnimationNodes = 0,
791 .fpInit = entity_base_block_init,
792 .updateEntityScript = Entity_BaseBlock_Script,
793 .fpHandleCollision = entity_block_handle_collision,
794 { .dma = ENTITY_ROM(PushBlock) },
795 .entityType = ENTITY_TYPE_PUSH_BLOCK,
796 .aabbSize = { 25, 25, 25 }
797};
798
801 .typeDataSize = sizeof(BlockData),
802 .renderCommandList = Entity_PowBlock_RenderScript,
803 .modelAnimationNodes = 0,
804 .fpInit = entity_base_block_init,
805 .updateEntityScript = Entity_PowBlock_Script,
806 .fpHandleCollision = entity_block_handle_collision,
807 { .dma = ENTITY_ROM(PowBlock) },
808 .entityType = ENTITY_TYPE_POW_BLOCK,
809 .aabbSize = { 30, 25, 25 },
810};
EntityModelScript Entity_Hammer3Block_RenderScript
Definition Block.c:570
EntityModelScript Entity_BrickBlock_RenderScript
Definition Block.c:574
EntityScript Entity_MulticoinBlock_Script
Definition Block.c:547
EntityModelScript Entity_MulticoinBrick_RenderScript
Definition Block.c:564
EntityBlueprint Entity_Hammer2BlockWideX
Definition Block.c:695
EntityBlueprint Entity_Hammer3BlockWideZ
Definition Block.c:760
EntityModelScript Entity_InertRedBlock_RenderScript
Definition Block.c:562
EntityScript Entity_PowBlock_Script
Definition Block.c:482
Gfx Entity_Hammer1Block_Render[]
EntityScript Entity_BrickBlock_Script
Definition Block.c:529
EntityBlueprint Entity_InertRedBlock
Definition Block.c:591
void entity_inactive_block_hit_init(Entity *entity)
Definition Block.c:222
void entity_breakable_block_create_shattering_entity(Entity *entity)
EntityBlueprint Entity_Hammer2BlockTiny
Definition Block.c:721
EntityBlueprint Entity_Hammer3BlockWideX
Definition Block.c:747
EntityScript Entity_CreatedInertBlock_Script
Definition Block.c:513
EntityBlueprint Entity_Hammer1BlockWideZ
Definition Block.c:656
EntityBlueprint Entity_Hammer1BlockWideX
Definition Block.c:643
EntityBlueprint Entity_ShatteringHammer2BlockTiny
EntityBlueprint Entity_Hammer3BlockTiny
Definition Block.c:773
EntityBlueprint Entity_Hammer1BlockTiny
Definition Block.c:669
EntityBlueprint Entity_Hammer2Block
Definition Block.c:682
void entity_block_hit_animate_scale(Entity *entity)
Definition Block.c:90
void entity_BrickBlock_idle(Entity *entity)
Gfx Entity_BrickBlock_Render[]
Definition BrickBlock.c:46
#define MULTICOIN_BLOCK_MAX_COINS
Definition Block.c:51
void entity_MulticoinBlock_idle(Entity *entity)
Definition Block.c:308
EntityScript Entity_InertBlock_Script
Definition Block.c:503
EntityModelScript Entity_Hammer2Block_RenderScript
Definition Block.c:568
void entity_init_Hammer1Block_normal(Entity *entity)
Definition Block.c:465
void entity_base_block_update_slow_sinking(Entity *entity)
Definition Block.c:106
void entity_MulticoinBlock_init(Entity *entity)
Definition Block.c:257
void entity_MulticoinBlock_spawn_coin(Entity *entity)
Definition Block.c:267
void entity_MulticoinBlock_update_timer(Entity *entity)
Definition Block.c:294
void entity_init_HammerBlock_small(Entity *entity)
Definition Block.c:470
EntityBlueprint Entity_ShatteringHammer1Block
EntityBlueprint Entity_Hammer1Block
Definition Block.c:630
EntityBlueprint Entity_ShatteringBrickBlock
EntityBlueprint Entity_InertYellowBlock
Definition Block.c:578
EntityBlueprint Entity_ShatteringHammer1BlockTiny
EntityBlueprint Entity_PushBlock
Definition Block.c:786
s32 entity_base_block_idle(Entity *entity)
Definition Block.c:195
Gfx Entity_InertYellowBlock_Render[]
EntityBlueprint Entity_Hammer2BlockWideZ
Definition Block.c:708
void entity_MulticoinBlock_check_if_inactive(Entity *entity)
Definition Block.c:323
EntityBlueprint Entity_MulticoinBlock
Definition Block.c:617
EntityScript Entity_BaseBlock_Script
Definition Block.c:491
Gfx Entity_Hammer3Block_Render[]
EntityBlueprint Entity_BrickBlock
Definition Block.c:604
void entity_base_block_setupGfx(s32 entityIndex)
Definition Block.c:53
EntityScript Entity_BreakingBlock_Script
Definition Block.c:520
void entity_base_block_init(Entity *entity)
Definition Block.c:213
Gfx Entity_InertRedBlock_Render[]
void entity_base_block_play_vanish_effect(Entity *entity)
Definition Block.c:71
EntityScript D_802E9DEC
Definition Block.c:497
EntityModelScript Entity_InertYellowBlock_RenderScript
Definition Block.c:560
f32 entity_block_hit_init_scale(Entity *entity)
Definition Block.c:75
Gfx Entity_Hammer2Block_Render[]
EntityBlueprint Entity_Hammer3Block
Definition Block.c:734
EntityModelScript Entity_PowBlock_RenderScript
Definition Block.c:576
void entity_inactive_block_recoil_anim(Entity *entity)
Definition Block.c:242
EntityBlueprint Entity_ShatteringHammer3Block
EntityScript Entity_Hammer1Block_Script
Definition Block.c:540
EntityModelScript Entity_PushBlock_RenderScript
Definition Block.c:572
EntityBlueprint Entity_ShatteringHammer3BlockTiny
s32 entity_block_handle_collision(Entity *entity)
Definition Block.c:334
EntityBlueprint Entity_ShatteringHammer2Block
EntityModelScript Entity_Hammer1Block_RenderScript
Definition Block.c:566
Gfx Entity_PushBlock_Render[]
Definition PushBlock.c:52
void entity_inactive_block_hit_anim(Entity *entity)
Definition Block.c:228
EntityBlueprint Entity_PowBlock
Definition Block.c:799
Gfx Entity_PowBlock_Render[]
Definition PowBlock.c:68
struct BlockData * block
#define sfx_play_sound_at_position
#define clamp_angle
s32 EntityModelScript[]
Definition entity.h:7
#define es_Call(func)
Definition entity.h:37
#define es_Restart
Definition entity.h:40
#define STANDARD_ENTITY_MODEL_SCRIPT(gfx, renderMode)
Definition entity.h:56
#define es_SetCallback(func, time)
Definition entity.h:38
f32 initialY
Definition entity.h:121
#define es_SetFlags(flags)
Definition entity.h:43
s16 sinkingTimer
Definition entity.h:118
#define ENTITY_ROM(name)
Definition entity.h:65
#define es_Label(labelId)
Definition entity.h:41
f32 recoilInterpPhase
Definition entity.h:122
#define es_Goto(labelId)
Definition entity.h:39
#define es_RestartBoundScript
Definition entity.h:42
s32 EntityScript[]
Definition entity.h:6
#define es_End
Definition entity.h:35
s16 timeLeft
Definition entity.h:114
s16 item
Definition entity.h:119
#define es_PlaySound(soundId)
Definition entity.h:45
#define es_Jump(script)
Definition entity.h:36
s8 empty
Definition entity.h:112
s16 coinsLeft
Definition entity.h:113
u16 gameFlagIndex
Definition entity.h:116
@ ITEM_SPAWN_MODE_ITEM_BLOCK_SPAWN_ALWAYS
Definition enums.h:2311
@ ITEM_SPAWN_MODE_ITEM_BLOCK_COIN
Definition enums.h:2312
@ PS_FLAG_JUMPING
Definition enums.h:3035
@ PS_FLAG_HAMMER_CHECK
Definition enums.h:3073
@ ENTITY_TYPE_HAMMER1_BLOCK
Definition enums.h:2564
@ ENTITY_TYPE_1E
Definition enums.h:2573
@ ENTITY_TYPE_HEALING_BLOCK_FRAME
Definition enums.h:2574
@ ENTITY_TYPE_SINGLE_TRIGGER_BLOCK
Definition enums.h:2559
@ ENTITY_TYPE_POW_BLOCK
Definition enums.h:2576
@ ENTITY_TYPE_PUSH_BLOCK
Definition enums.h:2555
@ ENTITY_TYPE_HIDDEN_RED_BLOCK
Definition enums.h:2561
@ ENTITY_TYPE_HAMMER3_BLOCK
Definition enums.h:2566
@ ENTITY_TYPE_1C
Definition enums.h:2571
@ ENTITY_TYPE_HEALING_BLOCK
Definition enums.h:2570
@ ENTITY_TYPE_1D
Definition enums.h:2572
@ ENTITY_TYPE_HAMMER2_BLOCK
Definition enums.h:2565
@ ENTITY_TYPE_INACTIVE_BLOCK
Definition enums.h:2562
@ ENTITY_TYPE_HAMMER3_BLOCK_TINY
Definition enums.h:2569
@ ENTITY_TYPE_MULTI_COIN_BRICK
Definition enums.h:2557
@ ENTITY_TYPE_BRICK_BLOCK
Definition enums.h:2556
@ ENTITY_TYPE_HAMMER2_BLOCK_TINY
Definition enums.h:2568
@ ENTITY_TYPE_HIDDEN_YELLOW_BLOCK
Definition enums.h:2560
@ ENTITY_TYPE_RED_BLOCK
Definition enums.h:2563
@ ENTITY_TYPE_MULTI_TRIGGER_BLOCK
Definition enums.h:2554
@ ENTITY_TYPE_HAMMER1_BLOCK_TINY
Definition enums.h:2567
@ ENTITY_TYPE_YELLOW_BLOCK
Definition enums.h:2558
@ ENTITY_COLLISION_PARTNER
Definition enums.h:2655
@ ENTITY_COLLISION_PLAYER_HAMMER
Definition enums.h:2654
@ ENTITY_COLLISION_PLAYER_TOUCH_FLOOR
Definition enums.h:2648
@ ENTITY_COLLISION_PLAYER_TOUCH_CEILING
Definition enums.h:2650
@ SOUND_HIT_BLOCK
Definition enums.h:768
@ SOUND_SMASH_HAMER_BLOCK_3
Definition enums.h:771
@ SOUND_SMASH_HAMER_BLOCK_1
Definition enums.h:769
@ SOUND_SMASH_HAMER_BLOCK_2
Definition enums.h:770
@ RENDER_MODE_SURFACE_OPA
Definition enums.h:3264
@ ENTITY_FLAG_80
Definition enums.h:2620
@ ENTITY_FLAG_200000
Definition enums.h:2634
@ ENTITY_FLAG_FIXED_SHADOW_SIZE
Definition enums.h:2622
@ ENTITY_FLAG_HIDDEN
Definition enums.h:2613
@ ENTITY_FLAG_4000
Definition enums.h:2627
@ ENTITY_FLAG_PENDING_INSTANCE_DELETE
Definition enums.h:2642
@ ENTITY_FLAG_DISABLE_COLLISION
Definition enums.h:2618
@ PARTNER_BOMBETTE
Definition enums.h:2888
@ ACTION_STATE_SPIN_POUND
Definition enums.h:2442
@ ACTION_STATE_SPIN_JUMP
Definition enums.h:2441
@ ACTION_STATE_TORNADO_POUND
Definition enums.h:2444
@ ACTION_STATE_TORNADO_JUMP
Definition enums.h:2443
@ SOUND_SPACE_DEFAULT
Definition enums.h:1737
#define MAKE_ENTITY_END
Definition evt.h:107
Entity * get_entity_by_index(s32 index)
Definition entity.c:530
Shadow * get_shadow_by_index(s32 index)
Definition entity.c:534
ItemEntity * get_item_entity(s32 itemEntityIndex)
s32 entity_start_script(Entity *entity)
Definition entity.c:560
s32 make_item_entity_nodelay(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pickupVar)
u32 get_entity_type(s32 arg0)
Definition entity.c:568
void set_entity_commandlist(Entity *entity, s32 *entityScript)
Definition entity.c:235
void exec_entity_commandlist(Entity *entity)
Definition entity.c:313
f32 sin_rad(f32 x)
Definition 43F0.c:713
s32 create_entity(EntityBlueprint *bp,...)
Definition entity.c:1195
s32 is_block_on_ground(Entity *block)
Definition entity.c:1736
#define PM_CC_01
Definition macros.h:276
#define DEG_TO_RAD(deg)
Definition macros.h:134
#define PM_CC_02
Definition macros.h:277
void(* renderSetupFunc)(s32)
EntityData dataBuf
Vec3f scale
u8 collisionFlags
s16 shadowIndex
u8 Addr[]
Linker symbol address, as in ld_addrs.h.
Definition types.h:16
Gfx * gMainGfxPos
Definition cam_main.c:15
PlayerData gPlayerData
Definition 77480.c:40
PlayerStatus gPlayerStatus
Definition 77480.c:39
s32 get_global_flag(s32 index)
Definition vars_access.c:89