Implement Rumble
Build libsm64 / Build libsm64 for linux (push) Successful in 31s
Build libsm64 / Build libsm64 for web (push) Successful in 32s
Build libsm64 / Build libsm64 for windows (push) Successful in 24s

This commit is contained in:
2026-05-25 12:34:52 -05:00
parent bd3dd8f523
commit a499b4f032
19 changed files with 317 additions and 139 deletions
+8 -6
View File
@@ -22,6 +22,7 @@
#include "../include/mario_animation_ids.h"
#include "../include/object_fields.h"
#include "../include/mario_geo_switch_case_ids.h"
#include "../../rumble.h"
#define MIN_SWIM_SPEED 16.0f
@@ -989,9 +990,10 @@ static s32 act_water_throw(struct MarioState *m)
if (m->actionTimer++ == 5)
{
mario_throw_held_object(m);
#ifdef VERSION_SH
// #ifdef VERSION_SH
queue_rumble_data(3, 50);
#endif
// #endif
}
if (is_anim_at_end(m))
@@ -1194,12 +1196,12 @@ static s32 act_water_plunge(struct MarioState *m)
m->particleFlags |= PARTICLE_WATER_SPLASH;
m->actionState = 1;
#ifdef VERSION_SH
// #ifdef VERSION_SH
if (m->prevAction & ACT_FLAG_AIR)
{
queue_rumble_data(5, 80);
}
#endif
// #endif
}
if (stepResult == WATER_STEP_HIT_FLOOR || m->vel[1] >= endVSpeed || m->actionTimer > 20)
@@ -1316,9 +1318,9 @@ static s32 act_caught_in_whirlpool(struct MarioState *m)
set_mario_animation(m, MARIO_ANIM_GENERAL_FALL);
vec3f_copy(m->marioObj->header.gfx.pos, m->pos);
vec3s_set(m->marioObj->header.gfx.angle, 0, m->faceAngle[1], 0);
#ifdef VERSION_SH
// #ifdef VERSION_SH
reset_rumble_timers();
#endif
// #endif
return FALSE;
}