sm64coopdx/src/game/behaviors/lll_sinking_rectangle.inc.c

34 lines
894 B
C
Raw Normal View History

2019-08-25 04:46:40 +00:00
// lll_sinking_rectangle.c.inc
2020-03-02 03:42:52 +00:00
void sinking_rectangular_plat_actions(f32 a0, s32 a1) {
2019-08-25 04:46:40 +00:00
switch (o->oAction) {
case 0:
o->oAction++;
break;
case 1:
2020-06-02 16:44:34 +00:00
o->oPosY -= sins(o->oLllWoodPieceOscillationTimer) * a0;
o->oLllWoodPieceOscillationTimer += a1;
2019-08-25 04:46:40 +00:00
break;
case 2:
break;
break; // Two breaks needed?
}
}
void bhv_lll_sinking_rectangular_platform_loop(void) {
f32 sp1C = 0.4f;
s32 sp18 = 0x100;
if (o->oMoveAngleYaw != 0)
2020-03-02 03:42:52 +00:00
sinking_rectangular_plat_actions(sp1C, sp18);
2019-08-25 04:46:40 +00:00
else {
2020-06-02 16:44:34 +00:00
o->oFaceAnglePitch = sins(o->oLllWoodPieceOscillationTimer) * 512.0f;
o->oLllWoodPieceOscillationTimer += 0x100;
2019-08-25 04:46:40 +00:00
}
}
void bhv_lll_sinking_square_platforms_loop(void) {
f32 sp1C = 0.5f;
s32 sp18 = 0x100;
2020-03-02 03:42:52 +00:00
sinking_rectangular_plat_actions(sp1C, sp18);
2019-08-25 04:46:40 +00:00
}