Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
MorsGames
GitHub Repository: MorsGames/sm64plus
Path: blob/master/src/game/behaviors/breakable_wall.inc.c
7861 views
1
// breakable_wall.c.inc
2
3
void bhv_wf_breakable_wall_loop(void) {
4
if (gMarioStates[0].action == ACT_SHOT_FROM_CANNON) {
5
cur_obj_become_tangible();
6
if (obj_check_if_collided_with_object(o, gMarioObject)) {
7
if (cur_obj_has_behavior(bhvWfBreakableWallRight))
8
play_puzzle_jingle();
9
if (configBetterBlastAwayTheWall && cur_obj_has_behavior(bhvWfBreakableWallLeft))
10
play_sound(SOUND_MARIO_DOH, gMarioState->marioObj->header.gfx.cameraToObject);
11
create_sound_spawner(SOUND_GENERAL_WALL_EXPLOSION);
12
o->oInteractType = 8;
13
if (configBetterBlastAwayTheWall && cur_obj_has_behavior(bhvWfBreakableWallRight)) {
14
set_mario_action(gMarioState, ACT_SPAWN_SPIN_AIRBORNE, 0);
15
set_camera_mode(gMarioState->area->camera, gMarioState->area->camera->defMode, 1);
16
gMarioState->vel[1] = 32.0f;
17
}
18
else
19
o->oDamageOrCoinValue = 1;
20
obj_explode_and_spawn_coins(80.0f, 0);
21
}
22
} else
23
cur_obj_become_intangible();
24
}
25
26