Disallow function that shouldn't be in Lua

This commit is contained in:
Agent X 2024-04-09 17:40:52 -04:00
parent 136edd1097
commit b8c42f308f
6 changed files with 176 additions and 217 deletions

View File

@ -88,7 +88,7 @@ override_disallowed_functions = {
"src/engine/surface_collision.h": [ " debug_", "f32_find_wall_collision" ],
"src/game/mario_actions_airborne.c": [ "^[us]32 act_.*" ],
"src/game/mario_actions_automatic.c": [ "^[us]32 act_.*" ],
"src/game/mario_actions_cutscene.c": [ "^[us]32 act_.*", " geo_", "spawn_obj" ],
"src/game/mario_actions_cutscene.c": [ "^[us]32 act_.*", " geo_", "spawn_obj", "print_displaying_credits_entry" ],
"src/game/mario_actions_moving.c": [ "^[us]32 act_.*" ],
"src/game/mario_actions_object.c": [ "^[us]32 act_.*" ],
"src/game/mario_actions_stationary.c": [ "^[us]32 act_.*" ],

View File

@ -4923,11 +4923,6 @@ function mario_ready_to_speak(m)
-- ...
end
--- @return nil
function print_displaying_credits_entry()
-- ...
end
--- @param m MarioState
--- @param object Object
--- @return integer

View File

@ -6159,24 +6159,6 @@
<br />
## [print_displaying_credits_entry](#print_displaying_credits_entry)
### Lua Example
`print_displaying_credits_entry()`
### Parameters
- None
### Returns
- None
### C Prototype
`void print_displaying_credits_entry(void);`
[:arrow_up_small:](#)
<br />
## [should_start_or_continue_dialog](#should_start_or_continue_dialog)
### Lua Example
@ -8702,6 +8684,173 @@
[: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 />
---

View File

@ -5,173 +5,6 @@
[< 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

View File

@ -977,7 +977,6 @@
- [launch_mario_until_land](functions-3.md#launch_mario_until_land)
- [mario_execute_cutscene_action](functions-3.md#mario_execute_cutscene_action)
- [mario_ready_to_speak](functions-3.md#mario_ready_to_speak)
- [print_displaying_credits_entry](functions-3.md#print_displaying_credits_entry)
- [should_start_or_continue_dialog](functions-3.md#should_start_or_continue_dialog)
- [stuck_in_ground_handler](functions-3.md#stuck_in_ground_handler)
@ -1131,14 +1130,14 @@
<br />
- mod_storage.h
- [mod_storage_clear](functions-4.md#mod_storage_clear)
- [mod_storage_load](functions-4.md#mod_storage_load)
- [mod_storage_load_bool](functions-4.md#mod_storage_load_bool)
- [mod_storage_load_number](functions-4.md#mod_storage_load_number)
- [mod_storage_remove](functions-4.md#mod_storage_remove)
- [mod_storage_save](functions-4.md#mod_storage_save)
- [mod_storage_save_bool](functions-4.md#mod_storage_save_bool)
- [mod_storage_save_number](functions-4.md#mod_storage_save_number)
- [mod_storage_clear](functions-3.md#mod_storage_clear)
- [mod_storage_load](functions-3.md#mod_storage_load)
- [mod_storage_load_bool](functions-3.md#mod_storage_load_bool)
- [mod_storage_load_number](functions-3.md#mod_storage_load_number)
- [mod_storage_remove](functions-3.md#mod_storage_remove)
- [mod_storage_save](functions-3.md#mod_storage_save)
- [mod_storage_save_bool](functions-3.md#mod_storage_save_bool)
- [mod_storage_save_number](functions-3.md#mod_storage_save_number)
<br />

View File

@ -15896,22 +15896,6 @@ int smlua_func_mario_ready_to_speak(lua_State* L) {
return 1;
}
int smlua_func_print_displaying_credits_entry(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", "print_displaying_credits_entry", 0, top);
return 0;
}
extern void print_displaying_credits_entry(void);
print_displaying_credits_entry();
return 1;
}
int smlua_func_should_start_or_continue_dialog(lua_State* L) {
if (L == NULL) { return 0; }
@ -32343,7 +32327,6 @@ void smlua_bind_functions_autogen(void) {
smlua_bind_function(L, "launch_mario_until_land", smlua_func_launch_mario_until_land);
smlua_bind_function(L, "mario_execute_cutscene_action", smlua_func_mario_execute_cutscene_action);
smlua_bind_function(L, "mario_ready_to_speak", smlua_func_mario_ready_to_speak);
smlua_bind_function(L, "print_displaying_credits_entry", smlua_func_print_displaying_credits_entry);
smlua_bind_function(L, "should_start_or_continue_dialog", smlua_func_should_start_or_continue_dialog);
smlua_bind_function(L, "stuck_in_ground_handler", smlua_func_stuck_in_ground_handler);