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

Go to the source code of this file.

Functions

s32 N push_block_handle_fall (Entity *block, Evt *source)
 

Function Documentation

◆ push_block_handle_fall()

s32 N push_block_handle_fall ( Entity * block,
Evt * source )

Definition at line 11 of file PushBlockGravity.inc.c.

11 {
12
13 block->pos.y = source->varTable[0] - (N(PushBlockFallCurve)[source->functionTemp[0]] * BLOCK_GRID_SIZE);
14 if (source->functionTemp[0] == 0) {
16 }
17
18 if ((source->functionTemp[0] > 4) && (source->functionTemp[0] & 1)) {
19 fx_smoke_burst(1, block->pos.x, block->pos.y, block->pos.z, 1.0f, 20);
20 }
21
22 source->functionTemp[0]++;
23
24 return source->functionTemp[0] == ARRAY_COUNT(N(PushBlockFallCurve));
25}
#define sfx_play_sound_at_position
#define BLOCK_GRID_SIZE
Definition entity.h:67
@ SOUND_PUSH_BLOCK_FALL
Definition enums.h:873
@ SOUND_SPACE_DEFAULT
Definition enums.h:1737
#define ARRAY_COUNT(arr)
Definition macros.h:40