mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2024-11-25 21:45:12 +00:00
Expose level_control_timer_running
This commit is contained in:
parent
96e21e13a1
commit
d4fe80d4a6
6 changed files with 216 additions and 176 deletions
|
@ -75,7 +75,7 @@ override_allowed_functions = {
|
||||||
"src/game/object_list_processor.h": [ "set_object_respawn_info_bits" ],
|
"src/game/object_list_processor.h": [ "set_object_respawn_info_bits" ],
|
||||||
"src/game/mario_misc.h": [ "bhv_toad.*", "bhv_unlock_door.*" ],
|
"src/game/mario_misc.h": [ "bhv_toad.*", "bhv_unlock_door.*" ],
|
||||||
"src/pc/utils/misc.h": [ "update_all_mario_stars" ],
|
"src/pc/utils/misc.h": [ "update_all_mario_stars" ],
|
||||||
"src/game/level_update.h": [ "level_trigger_warp", "get_painting_warp_node", "initiate_painting_warp", "warp_special", "lvl_set_current_level" ],
|
"src/game/level_update.h": [ "level_trigger_warp", "get_painting_warp_node", "initiate_painting_warp", "warp_special", "lvl_set_current_level", "level_control_timer_running" ],
|
||||||
"src/game/area.h": [ "area_get_warp_node" ],
|
"src/game/area.h": [ "area_get_warp_node" ],
|
||||||
"src/engine/level_script.h": [ "area_create_warp_node" ],
|
"src/engine/level_script.h": [ "area_create_warp_node" ],
|
||||||
"src/game/ingame_menu.h": [ "set_min_dialog_width", "set_dialog_override_pos", "reset_dialog_override_pos", "set_dialog_override_color", "reset_dialog_override_color" ]
|
"src/game/ingame_menu.h": [ "set_min_dialog_width", "set_dialog_override_pos", "reset_dialog_override_pos", "set_dialog_override_color", "reset_dialog_override_color" ]
|
||||||
|
|
|
@ -4246,6 +4246,11 @@ function initiate_painting_warp(paintingIndex)
|
||||||
-- ...
|
-- ...
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- @return integer
|
||||||
|
function level_control_timer_running()
|
||||||
|
-- ...
|
||||||
|
end
|
||||||
|
|
||||||
--- @param m MarioState
|
--- @param m MarioState
|
||||||
--- @param warpOp integer
|
--- @param warpOp integer
|
||||||
--- @return integer
|
--- @return integer
|
||||||
|
|
|
@ -4047,6 +4047,24 @@
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
## [level_control_timer_running](#level_control_timer_running)
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`local integerValue = level_control_timer_running()`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
- None
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- `integer`
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`u8 level_control_timer_running(void);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
## [level_trigger_warp](#level_trigger_warp)
|
## [level_trigger_warp](#level_trigger_warp)
|
||||||
|
|
||||||
### Lua Example
|
### Lua Example
|
||||||
|
@ -8684,173 +8702,6 @@
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
---
|
|
||||||
# functions from mod_storage.h
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
|
|
||||||
## [mod_storage_clear](#mod_storage_clear)
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`local booleanValue = mod_storage_clear()`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
- None
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- `boolean`
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`bool mod_storage_clear(void);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [mod_storage_load](#mod_storage_load)
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`local stringValue = mod_storage_load(key)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| key | `string` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- `string`
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`const char *mod_storage_load(const char* key);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [mod_storage_load_bool](#mod_storage_load_bool)
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`local booleanValue = mod_storage_load_bool(key)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| key | `string` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- `boolean`
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`bool mod_storage_load_bool(const char* key);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [mod_storage_load_number](#mod_storage_load_number)
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`local numberValue = mod_storage_load_number(key)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| key | `string` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- `number`
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`double mod_storage_load_number(const char* key);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [mod_storage_remove](#mod_storage_remove)
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`local booleanValue = mod_storage_remove(key)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| key | `string` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- `boolean`
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`bool mod_storage_remove(const char* key);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [mod_storage_save](#mod_storage_save)
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`local booleanValue = mod_storage_save(key, value)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| key | `string` |
|
|
||||||
| value | `string` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- `boolean`
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`bool mod_storage_save(const char* key, const char* value);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [mod_storage_save_bool](#mod_storage_save_bool)
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`local booleanValue = mod_storage_save_bool(key, value)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| key | `string` |
|
|
||||||
| value | `boolean` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- `boolean`
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`bool mod_storage_save_bool(const char* key, bool value);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [mod_storage_save_number](#mod_storage_save_number)
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`local booleanValue = mod_storage_save_number(key, value)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| key | `string` |
|
|
||||||
| value | `number` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- `boolean`
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`bool mod_storage_save_number(const char* key, double value);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,173 @@
|
||||||
[< prev](functions-3.md) | [1](functions.md) | [2](functions-2.md) | [3](functions-3.md) | 4 | [5](functions-5.md) | [next >](functions-5.md)]
|
[< prev](functions-3.md) | [1](functions.md) | [2](functions-2.md) | [3](functions-3.md) | 4 | [5](functions-5.md) | [next >](functions-5.md)]
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
# functions from mod_storage.h
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
|
||||||
|
## [mod_storage_clear](#mod_storage_clear)
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`local booleanValue = mod_storage_clear()`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
- None
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- `boolean`
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`bool mod_storage_clear(void);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [mod_storage_load](#mod_storage_load)
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`local stringValue = mod_storage_load(key)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| key | `string` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- `string`
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`const char *mod_storage_load(const char* key);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [mod_storage_load_bool](#mod_storage_load_bool)
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`local booleanValue = mod_storage_load_bool(key)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| key | `string` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- `boolean`
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`bool mod_storage_load_bool(const char* key);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [mod_storage_load_number](#mod_storage_load_number)
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`local numberValue = mod_storage_load_number(key)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| key | `string` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- `number`
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`double mod_storage_load_number(const char* key);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [mod_storage_remove](#mod_storage_remove)
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`local booleanValue = mod_storage_remove(key)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| key | `string` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- `boolean`
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`bool mod_storage_remove(const char* key);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [mod_storage_save](#mod_storage_save)
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`local booleanValue = mod_storage_save(key, value)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| key | `string` |
|
||||||
|
| value | `string` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- `boolean`
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`bool mod_storage_save(const char* key, const char* value);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [mod_storage_save_bool](#mod_storage_save_bool)
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`local booleanValue = mod_storage_save_bool(key, value)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| key | `string` |
|
||||||
|
| value | `boolean` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- `boolean`
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`bool mod_storage_save_bool(const char* key, bool value);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [mod_storage_save_number](#mod_storage_save_number)
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`local booleanValue = mod_storage_save_number(key, value)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| key | `string` |
|
||||||
|
| value | `number` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- `boolean`
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`bool mod_storage_save_number(const char* key, double value);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
---
|
---
|
||||||
# functions from network_player.h
|
# functions from network_player.h
|
||||||
|
|
||||||
|
|
|
@ -860,6 +860,7 @@
|
||||||
- level_update.h
|
- level_update.h
|
||||||
- [get_painting_warp_node](functions-3.md#get_painting_warp_node)
|
- [get_painting_warp_node](functions-3.md#get_painting_warp_node)
|
||||||
- [initiate_painting_warp](functions-3.md#initiate_painting_warp)
|
- [initiate_painting_warp](functions-3.md#initiate_painting_warp)
|
||||||
|
- [level_control_timer_running](functions-3.md#level_control_timer_running)
|
||||||
- [level_trigger_warp](functions-3.md#level_trigger_warp)
|
- [level_trigger_warp](functions-3.md#level_trigger_warp)
|
||||||
- [lvl_set_current_level](functions-3.md#lvl_set_current_level)
|
- [lvl_set_current_level](functions-3.md#lvl_set_current_level)
|
||||||
- [warp_special](functions-3.md#warp_special)
|
- [warp_special](functions-3.md#warp_special)
|
||||||
|
@ -1130,14 +1131,14 @@
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
- mod_storage.h
|
- mod_storage.h
|
||||||
- [mod_storage_clear](functions-3.md#mod_storage_clear)
|
- [mod_storage_clear](functions-4.md#mod_storage_clear)
|
||||||
- [mod_storage_load](functions-3.md#mod_storage_load)
|
- [mod_storage_load](functions-4.md#mod_storage_load)
|
||||||
- [mod_storage_load_bool](functions-3.md#mod_storage_load_bool)
|
- [mod_storage_load_bool](functions-4.md#mod_storage_load_bool)
|
||||||
- [mod_storage_load_number](functions-3.md#mod_storage_load_number)
|
- [mod_storage_load_number](functions-4.md#mod_storage_load_number)
|
||||||
- [mod_storage_remove](functions-3.md#mod_storage_remove)
|
- [mod_storage_remove](functions-4.md#mod_storage_remove)
|
||||||
- [mod_storage_save](functions-3.md#mod_storage_save)
|
- [mod_storage_save](functions-4.md#mod_storage_save)
|
||||||
- [mod_storage_save_bool](functions-3.md#mod_storage_save_bool)
|
- [mod_storage_save_bool](functions-4.md#mod_storage_save_bool)
|
||||||
- [mod_storage_save_number](functions-3.md#mod_storage_save_number)
|
- [mod_storage_save_number](functions-4.md#mod_storage_save_number)
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
|
|
@ -13880,6 +13880,21 @@ int smlua_func_initiate_painting_warp(lua_State* L) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int smlua_func_level_control_timer_running(UNUSED lua_State* L) {
|
||||||
|
if (L == NULL) { return 0; }
|
||||||
|
|
||||||
|
int top = lua_gettop(L);
|
||||||
|
if (top != 0) {
|
||||||
|
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "level_control_timer_running", 0, top);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
lua_pushinteger(L, level_control_timer_running());
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
int smlua_func_level_trigger_warp(lua_State* L) {
|
int smlua_func_level_trigger_warp(lua_State* L) {
|
||||||
if (L == NULL) { return 0; }
|
if (L == NULL) { return 0; }
|
||||||
|
|
||||||
|
@ -32279,6 +32294,7 @@ void smlua_bind_functions_autogen(void) {
|
||||||
// level_update.h
|
// level_update.h
|
||||||
smlua_bind_function(L, "get_painting_warp_node", smlua_func_get_painting_warp_node);
|
smlua_bind_function(L, "get_painting_warp_node", smlua_func_get_painting_warp_node);
|
||||||
smlua_bind_function(L, "initiate_painting_warp", smlua_func_initiate_painting_warp);
|
smlua_bind_function(L, "initiate_painting_warp", smlua_func_initiate_painting_warp);
|
||||||
|
smlua_bind_function(L, "level_control_timer_running", smlua_func_level_control_timer_running);
|
||||||
smlua_bind_function(L, "level_trigger_warp", smlua_func_level_trigger_warp);
|
smlua_bind_function(L, "level_trigger_warp", smlua_func_level_trigger_warp);
|
||||||
smlua_bind_function(L, "lvl_set_current_level", smlua_func_lvl_set_current_level);
|
smlua_bind_function(L, "lvl_set_current_level", smlua_func_lvl_set_current_level);
|
||||||
smlua_bind_function(L, "warp_special", smlua_func_warp_special);
|
smlua_bind_function(L, "warp_special", smlua_func_warp_special);
|
||||||
|
|
Loading…
Reference in a new issue