Implement Rumble
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include "decomp/game/sound_init.h"
|
||||
|
||||
#include "debug_print.h"
|
||||
#include "rumble.h"
|
||||
#include "load_surfaces.h"
|
||||
#include "gfx_adapter.h"
|
||||
#include "load_anim_data.h"
|
||||
@@ -86,6 +87,11 @@ static void free_area(struct Area *area)
|
||||
free(area);
|
||||
}
|
||||
|
||||
SM64_LIB_FN void sm64_register_rumble_callback_function(SM64RumbleCallbackFunctionPtr rumbleCallbackFunction)
|
||||
{
|
||||
g_rumble_callback_func = rumbleCallbackFunction;
|
||||
}
|
||||
|
||||
typedef void (*SM64DebugPrintFunctionPtr)(const char *);
|
||||
|
||||
SM64_LIB_FN void sm64_register_debug_print_function(SM64DebugPrintFunctionPtr debugPrintFunction)
|
||||
@@ -181,6 +187,7 @@ SM64_LIB_FN int32_t sm64_mario_create(float x, float y, float z)
|
||||
struct MarioInstance *newInstance = s_mario_instance_pool.objects[marioIndex];
|
||||
|
||||
newInstance->globalState = global_state_create();
|
||||
newInstance->globalState->mgMarioId = marioIndex;
|
||||
global_state_bind(newInstance->globalState);
|
||||
|
||||
if (!s_init_one_mario)
|
||||
@@ -258,6 +265,8 @@ SM64_LIB_FN void sm64_mario_tick(int32_t marioId, const struct SM64MarioInputs *
|
||||
|
||||
gAreaUpdateCounter++;
|
||||
|
||||
rumble_shim_update();
|
||||
|
||||
outState->health = gMarioState->health;
|
||||
vec3f_copy(outState->position, gMarioState->pos);
|
||||
vec3f_copy(outState->velocity, gMarioState->vel);
|
||||
|
||||
Reference in New Issue
Block a user