mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-12-07 08:33:28 +00:00
Expose save_file_set_cannon_unlocked
For a project I'm working on.
This commit is contained in:
parent
a45dbbbeb5
commit
b5d5ba7687
6 changed files with 45 additions and 1 deletions
|
|
@ -88,7 +88,7 @@ override_allowed_functions = {
|
||||||
"src/pc/djui/djui_popup.h": [ "create" ],
|
"src/pc/djui/djui_popup.h": [ "create" ],
|
||||||
"src/pc/djui/djui_language.h": [ "djui_language_get" ],
|
"src/pc/djui/djui_language.h": [ "djui_language_get" ],
|
||||||
"src/pc/djui/djui_panel_menu.h": [ "djui_menu_get_rainbow_string_color" ],
|
"src/pc/djui/djui_panel_menu.h": [ "djui_menu_get_rainbow_string_color" ],
|
||||||
"src/game/save_file.h": [ "get_level_", "save_file_get_", "save_file_set_flags", "save_file_clear_flags", "save_file_reload", "save_file_erase_current_backup_save", "save_file_set_star_flags", "save_file_is_cannon_unlocked", "touch_coin_score_age", "save_file_set_course_coin_score", "save_file_do_save", "save_file_remove_star_flags", "save_file_erase" ],
|
"src/game/save_file.h": [ "get_level_", "save_file_get_", "save_file_set_flags", "save_file_clear_flags", "save_file_reload", "save_file_erase_current_backup_save", "save_file_set_star_flags", "save_file_is_cannon_unlocked", "save_file_set_cannon_unlocked", "touch_coin_score_age", "save_file_set_course_coin_score", "save_file_do_save", "save_file_remove_star_flags", "save_file_erase" ],
|
||||||
"src/pc/lua/utils/smlua_model_utils.h": [ "smlua_model_util_get_id" ],
|
"src/pc/lua/utils/smlua_model_utils.h": [ "smlua_model_util_get_id" ],
|
||||||
"src/game/object_list_processor.h": [ "set_object_respawn_info_bits" ],
|
"src/game/object_list_processor.h": [ "set_object_respawn_info_bits" ],
|
||||||
"src/game/platform_displacement.h": [ "apply_platform_displacement" ],
|
"src/game/platform_displacement.h": [ "apply_platform_displacement" ],
|
||||||
|
|
|
||||||
|
|
@ -9996,6 +9996,11 @@ function save_file_is_cannon_unlocked(fileIndex, courseIndex)
|
||||||
-- ...
|
-- ...
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Unlocks the cannon in the current course
|
||||||
|
function save_file_set_cannon_unlocked()
|
||||||
|
-- ...
|
||||||
|
end
|
||||||
|
|
||||||
--- @param capPos Vec3s
|
--- @param capPos Vec3s
|
||||||
--- @return integer
|
--- @return integer
|
||||||
--- Retrieves the current position of Mario's cap, if it is on the ground in the current level and area. The position is stored in the provided `capPos` parameter. Useful for tracking the cap's location after it has been dropped or lost
|
--- Retrieves the current position of Mario's cap, if it is on the ground in the current level and area. The position is stored in the provided `capPos` parameter. Useful for tracking the cap's location after it has been dropped or lost
|
||||||
|
|
|
||||||
|
|
@ -5201,6 +5201,27 @@ Checks whether the cannon in the specified course is unlocked. Returns true if t
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
## [save_file_set_cannon_unlocked](#save_file_set_cannon_unlocked)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Unlocks the cannon in the current course
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`save_file_set_cannon_unlocked()`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
- None
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- None
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`void save_file_set_cannon_unlocked(void);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
## [save_file_get_cap_pos](#save_file_get_cap_pos)
|
## [save_file_get_cap_pos](#save_file_get_cap_pos)
|
||||||
|
|
||||||
### Description
|
### Description
|
||||||
|
|
|
||||||
|
|
@ -1785,6 +1785,7 @@
|
||||||
- [save_file_get_course_coin_score](functions-6.md#save_file_get_course_coin_score)
|
- [save_file_get_course_coin_score](functions-6.md#save_file_get_course_coin_score)
|
||||||
- [save_file_set_course_coin_score](functions-6.md#save_file_set_course_coin_score)
|
- [save_file_set_course_coin_score](functions-6.md#save_file_set_course_coin_score)
|
||||||
- [save_file_is_cannon_unlocked](functions-6.md#save_file_is_cannon_unlocked)
|
- [save_file_is_cannon_unlocked](functions-6.md#save_file_is_cannon_unlocked)
|
||||||
|
- [save_file_set_cannon_unlocked](functions-6.md#save_file_set_cannon_unlocked)
|
||||||
- [save_file_get_cap_pos](functions-6.md#save_file_get_cap_pos)
|
- [save_file_get_cap_pos](functions-6.md#save_file_get_cap_pos)
|
||||||
- [save_file_get_sound_mode](functions-6.md#save_file_get_sound_mode)
|
- [save_file_get_sound_mode](functions-6.md#save_file_get_sound_mode)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -241,6 +241,7 @@ Useful for tracking course-specific progress and enabling shortcuts
|
||||||
|descriptionEnd| */
|
|descriptionEnd| */
|
||||||
s32 save_file_is_cannon_unlocked(s32 fileIndex, s32 courseIndex);
|
s32 save_file_is_cannon_unlocked(s32 fileIndex, s32 courseIndex);
|
||||||
|
|
||||||
|
/* |description|Unlocks the cannon in the current course|descriptionEnd| */
|
||||||
void save_file_set_cannon_unlocked(void);
|
void save_file_set_cannon_unlocked(void);
|
||||||
void save_file_set_cap_pos(s16 x, s16 y, s16 z);
|
void save_file_set_cap_pos(s16 x, s16 y, s16 z);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30332,6 +30332,21 @@ int smlua_func_save_file_is_cannon_unlocked(lua_State* L) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int smlua_func_save_file_set_cannon_unlocked(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", "save_file_set_cannon_unlocked", 0, top);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
save_file_set_cannon_unlocked();
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
int smlua_func_save_file_get_cap_pos(lua_State* L) {
|
int smlua_func_save_file_get_cap_pos(lua_State* L) {
|
||||||
if (L == NULL) { return 0; }
|
if (L == NULL) { return 0; }
|
||||||
|
|
||||||
|
|
@ -38428,6 +38443,7 @@ void smlua_bind_functions_autogen(void) {
|
||||||
smlua_bind_function(L, "save_file_get_course_coin_score", smlua_func_save_file_get_course_coin_score);
|
smlua_bind_function(L, "save_file_get_course_coin_score", smlua_func_save_file_get_course_coin_score);
|
||||||
smlua_bind_function(L, "save_file_set_course_coin_score", smlua_func_save_file_set_course_coin_score);
|
smlua_bind_function(L, "save_file_set_course_coin_score", smlua_func_save_file_set_course_coin_score);
|
||||||
smlua_bind_function(L, "save_file_is_cannon_unlocked", smlua_func_save_file_is_cannon_unlocked);
|
smlua_bind_function(L, "save_file_is_cannon_unlocked", smlua_func_save_file_is_cannon_unlocked);
|
||||||
|
smlua_bind_function(L, "save_file_set_cannon_unlocked", smlua_func_save_file_set_cannon_unlocked);
|
||||||
smlua_bind_function(L, "save_file_get_cap_pos", smlua_func_save_file_get_cap_pos);
|
smlua_bind_function(L, "save_file_get_cap_pos", smlua_func_save_file_get_cap_pos);
|
||||||
smlua_bind_function(L, "save_file_get_sound_mode", smlua_func_save_file_get_sound_mode);
|
smlua_bind_function(L, "save_file_get_sound_mode", smlua_func_save_file_get_sound_mode);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue