mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-04-26 20:11:42 +00:00
Document rumble_init.h (65.46%)
This commit is contained in:
parent
116d9808d2
commit
e3c1b20f6b
6 changed files with 34 additions and 11 deletions
|
|
@ -28,7 +28,7 @@ in_files = [
|
|||
"src/game/mario_actions_submerged.c",
|
||||
"src/game/mario_step.h",
|
||||
"src/game/mario.h",
|
||||
"src/game/rumble_init.c",
|
||||
"src/game/rumble_init.h",
|
||||
"src/pc/djui/djui_popup.h",
|
||||
"src/pc/network/network_utils.h",
|
||||
"src/pc/djui/djui_console.h",
|
||||
|
|
@ -75,7 +75,7 @@ in_files = [
|
|||
|
||||
override_allowed_functions = {
|
||||
"src/audio/external.h": [ " play_", "fade", "current_background", "stop_", "sound_banks", "drop_queued_background_music", "set_sound_moving_speed", "background_music_default_volume", "get_sound_pan", "sound_get_level_intensity", "set_audio_muted" ],
|
||||
"src/game/rumble_init.c": [ "queue_rumble_", "reset_rumble_timers" ],
|
||||
"src/game/rumble_init.h": [ "queue_rumble_", "reset_rumble_timers" ],
|
||||
"src/pc/djui/djui_popup.h": [ "create" ],
|
||||
"src/pc/djui/djui_language.h": [ "djui_language_get" ],
|
||||
"src/pc/djui/djui_panel_menu.h": [ "djui_menu_get_rainbow_string_color" ],
|
||||
|
|
|
|||
|
|
@ -8304,6 +8304,7 @@ end
|
|||
|
||||
--- @param a0 integer
|
||||
--- @param a1 integer
|
||||
--- Queues rumble data
|
||||
function queue_rumble_data(a0, a1)
|
||||
-- ...
|
||||
end
|
||||
|
|
@ -8311,6 +8312,7 @@ end
|
|||
--- @param m MarioState
|
||||
--- @param a0 integer
|
||||
--- @param a1 integer
|
||||
--- Queues rumble data for Mario
|
||||
function queue_rumble_data_mario(m, a0, a1)
|
||||
-- ...
|
||||
end
|
||||
|
|
@ -8318,17 +8320,20 @@ end
|
|||
--- @param object Object
|
||||
--- @param a0 integer
|
||||
--- @param a1 integer
|
||||
--- Queues rumble data for object, factoring in its distance from Mario
|
||||
function queue_rumble_data_object(object, a0, a1)
|
||||
-- ...
|
||||
end
|
||||
|
||||
--- @param m MarioState
|
||||
--- Resets rumble timers
|
||||
function reset_rumble_timers(m)
|
||||
-- ...
|
||||
end
|
||||
|
||||
--- @param m MarioState
|
||||
--- @param a0 integer
|
||||
--- Resets rumble timers and sets a field based on `a0`
|
||||
function reset_rumble_timers_2(m, a0)
|
||||
-- ...
|
||||
end
|
||||
|
|
|
|||
|
|
@ -4591,13 +4591,16 @@
|
|||
<br />
|
||||
|
||||
---
|
||||
# functions from rumble_init.c
|
||||
# functions from rumble_init.h
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
## [queue_rumble_data](#queue_rumble_data)
|
||||
|
||||
### Description
|
||||
Queues rumble data
|
||||
|
||||
### Lua Example
|
||||
`queue_rumble_data(a0, a1)`
|
||||
|
||||
|
|
@ -4619,6 +4622,9 @@
|
|||
|
||||
## [queue_rumble_data_mario](#queue_rumble_data_mario)
|
||||
|
||||
### Description
|
||||
Queues rumble data for Mario
|
||||
|
||||
### Lua Example
|
||||
`queue_rumble_data_mario(m, a0, a1)`
|
||||
|
||||
|
|
@ -4641,6 +4647,9 @@
|
|||
|
||||
## [queue_rumble_data_object](#queue_rumble_data_object)
|
||||
|
||||
### Description
|
||||
Queues rumble data for object, factoring in its distance from Mario
|
||||
|
||||
### Lua Example
|
||||
`queue_rumble_data_object(object, a0, a1)`
|
||||
|
||||
|
|
@ -4663,6 +4672,9 @@
|
|||
|
||||
## [reset_rumble_timers](#reset_rumble_timers)
|
||||
|
||||
### Description
|
||||
Resets rumble timers
|
||||
|
||||
### Lua Example
|
||||
`reset_rumble_timers(m)`
|
||||
|
||||
|
|
@ -4683,6 +4695,9 @@
|
|||
|
||||
## [reset_rumble_timers_2](#reset_rumble_timers_2)
|
||||
|
||||
### Description
|
||||
Resets rumble timers and sets a field based on `a0`
|
||||
|
||||
### Lua Example
|
||||
`reset_rumble_timers_2(m, a0)`
|
||||
|
||||
|
|
|
|||
|
|
@ -1571,7 +1571,7 @@
|
|||
|
||||
<br />
|
||||
|
||||
- rumble_init.c
|
||||
- rumble_init.h
|
||||
- [queue_rumble_data](functions-5.md#queue_rumble_data)
|
||||
- [queue_rumble_data_mario](functions-5.md#queue_rumble_data_mario)
|
||||
- [queue_rumble_data_object](functions-5.md#queue_rumble_data_object)
|
||||
|
|
|
|||
|
|
@ -1,17 +1,24 @@
|
|||
#ifndef RUMBLE_INIT_H
|
||||
#define RUMBLE_INIT_H
|
||||
|
||||
// this file is very scarcely documented
|
||||
|
||||
extern s32 gRumblePakTimer;
|
||||
|
||||
void init_rumble_pak_scheduler_queue(void);
|
||||
void block_until_rumble_pak_free(void);
|
||||
void release_rumble_pak_control(void);
|
||||
/* |description|Queues rumble data|descriptionEnd| */
|
||||
void queue_rumble_data(s16 a0, s16 a1);
|
||||
/* |description|Queues rumble data for object, factoring in its distance from Mario|descriptionEnd| */
|
||||
void queue_rumble_data_object(struct Object* object, s16 a0, s16 a1);
|
||||
/* |description|Queues rumble data for Mario|descriptionEnd| */
|
||||
void queue_rumble_data_mario(struct MarioState* m, s16 a0, s16 a1);
|
||||
void func_sh_8024C89C(s16 a0);
|
||||
u8 is_rumble_finished_and_queue_empty(void);
|
||||
/* |description|Resets rumble timers|descriptionEnd| */
|
||||
void reset_rumble_timers(struct MarioState* m);
|
||||
/* |description|Resets rumble timers and sets a field based on `a0`|descriptionEnd| */
|
||||
void reset_rumble_timers_2(struct MarioState* m, s32 a0);
|
||||
void func_sh_8024CA04(void);
|
||||
void cancel_rumble(void);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
#include "src/game/characters.h"
|
||||
#include "src/game/mario_step.h"
|
||||
#include "src/game/mario.h"
|
||||
#include "src/game/rumble_init.h"
|
||||
#include "src/pc/djui/djui_popup.h"
|
||||
#include "src/pc/network/network_utils.h"
|
||||
#include "src/pc/djui/djui_console.h"
|
||||
|
|
@ -27978,7 +27979,7 @@ int smlua_func_set_object_respawn_info_bits(lua_State* L) {
|
|||
}
|
||||
|
||||
///////////////////
|
||||
// rumble_init.c //
|
||||
// rumble_init.h //
|
||||
///////////////////
|
||||
|
||||
int smlua_func_queue_rumble_data(lua_State* L) {
|
||||
|
|
@ -27995,7 +27996,6 @@ int smlua_func_queue_rumble_data(lua_State* L) {
|
|||
s16 a1 = smlua_to_integer(L, 2);
|
||||
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "queue_rumble_data"); return 0; }
|
||||
|
||||
extern void queue_rumble_data(s16 a0, s16 a1);
|
||||
queue_rumble_data(a0, a1);
|
||||
|
||||
return 1;
|
||||
|
|
@ -28017,7 +28017,6 @@ int smlua_func_queue_rumble_data_mario(lua_State* L) {
|
|||
s16 a1 = smlua_to_integer(L, 3);
|
||||
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "queue_rumble_data_mario"); return 0; }
|
||||
|
||||
extern void queue_rumble_data_mario(struct MarioState* m, s16 a0, s16 a1);
|
||||
queue_rumble_data_mario(m, a0, a1);
|
||||
|
||||
return 1;
|
||||
|
|
@ -28039,7 +28038,6 @@ int smlua_func_queue_rumble_data_object(lua_State* L) {
|
|||
s16 a1 = smlua_to_integer(L, 3);
|
||||
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 3, "queue_rumble_data_object"); return 0; }
|
||||
|
||||
extern void queue_rumble_data_object(struct Object* object, s16 a0, s16 a1);
|
||||
queue_rumble_data_object(object, a0, a1);
|
||||
|
||||
return 1;
|
||||
|
|
@ -28057,7 +28055,6 @@ int smlua_func_reset_rumble_timers(lua_State* L) {
|
|||
struct MarioState* m = (struct MarioState*)smlua_to_cobject(L, 1, LOT_MARIOSTATE);
|
||||
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "reset_rumble_timers"); return 0; }
|
||||
|
||||
extern void reset_rumble_timers(struct MarioState* m);
|
||||
reset_rumble_timers(m);
|
||||
|
||||
return 1;
|
||||
|
|
@ -28077,7 +28074,6 @@ int smlua_func_reset_rumble_timers_2(lua_State* L) {
|
|||
s32 a0 = smlua_to_integer(L, 2);
|
||||
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 2, "reset_rumble_timers_2"); return 0; }
|
||||
|
||||
extern void reset_rumble_timers_2(struct MarioState* m, s32 a0);
|
||||
reset_rumble_timers_2(m, a0);
|
||||
|
||||
return 1;
|
||||
|
|
@ -35052,7 +35048,7 @@ void smlua_bind_functions_autogen(void) {
|
|||
// object_list_processor.h
|
||||
smlua_bind_function(L, "set_object_respawn_info_bits", smlua_func_set_object_respawn_info_bits);
|
||||
|
||||
// rumble_init.c
|
||||
// rumble_init.h
|
||||
smlua_bind_function(L, "queue_rumble_data", smlua_func_queue_rumble_data);
|
||||
smlua_bind_function(L, "queue_rumble_data_mario", smlua_func_queue_rumble_data_mario);
|
||||
smlua_bind_function(L, "queue_rumble_data_object", smlua_func_queue_rumble_data_object);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue