is_transition_playing() (#171)
Can be useful for people making HUD mods or anything like that.
This commit is contained in:
parent
b5789a7c54
commit
cbc78025f3
|
@ -7750,6 +7750,11 @@ function is_game_paused()
|
|||
-- ...
|
||||
end
|
||||
|
||||
--- @return boolean
|
||||
function is_transition_playing()
|
||||
-- ...
|
||||
end
|
||||
|
||||
--- @param name string
|
||||
--- @param level integer
|
||||
--- @param area integer
|
||||
|
|
|
@ -7042,6 +7042,24 @@
|
|||
|
||||
<br />
|
||||
|
||||
## [is_transition_playing](#is_transition_playing)
|
||||
|
||||
### Lua Example
|
||||
`local booleanValue = is_transition_playing()`
|
||||
|
||||
### Parameters
|
||||
- None
|
||||
|
||||
### Returns
|
||||
- `boolean`
|
||||
|
||||
### C Prototype
|
||||
`bool is_transition_playing(void);`
|
||||
|
||||
[:arrow_up_small:](#)
|
||||
|
||||
<br />
|
||||
|
||||
## [movtexqc_register](#movtexqc_register)
|
||||
|
||||
### Lua Example
|
||||
|
|
|
@ -1443,6 +1443,7 @@
|
|||
- [hud_set_value](functions-4.md#hud_set_value)
|
||||
- [hud_show](functions-4.md#hud_show)
|
||||
- [is_game_paused](functions-4.md#is_game_paused)
|
||||
- [is_transition_playing](functions-4.md#is_transition_playing)
|
||||
- [movtexqc_register](functions-4.md#movtexqc_register)
|
||||
- [play_transition](functions-4.md#play_transition)
|
||||
- [save_file_set_using_backup_slot](functions-4.md#save_file_set_using_backup_slot)
|
||||
|
|
|
@ -17046,6 +17046,15 @@ int smlua_func_is_game_paused(UNUSED lua_State* L) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_is_transition_playing(UNUSED lua_State* L) {
|
||||
if(!smlua_functions_valid_param_count(L, 0)) { return 0; }
|
||||
|
||||
|
||||
lua_pushboolean(L, is_transition_playing());
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int smlua_func_movtexqc_register(lua_State* L) {
|
||||
if(!smlua_functions_valid_param_count(L, 4)) { return 0; }
|
||||
|
||||
|
@ -19476,6 +19485,7 @@ void smlua_bind_functions_autogen(void) {
|
|||
smlua_bind_function(L, "hud_set_value", smlua_func_hud_set_value);
|
||||
smlua_bind_function(L, "hud_show", smlua_func_hud_show);
|
||||
smlua_bind_function(L, "is_game_paused", smlua_func_is_game_paused);
|
||||
smlua_bind_function(L, "is_transition_playing", smlua_func_is_transition_playing);
|
||||
smlua_bind_function(L, "movtexqc_register", smlua_func_movtexqc_register);
|
||||
smlua_bind_function(L, "play_transition", smlua_func_play_transition);
|
||||
smlua_bind_function(L, "save_file_set_using_backup_slot", smlua_func_save_file_set_using_backup_slot);
|
||||
|
|
|
@ -273,6 +273,12 @@ bool is_game_paused(void) {
|
|||
|
||||
///
|
||||
|
||||
bool is_transition_playing(void) {
|
||||
return sTransitionUpdate != NULL || gWarpTransition.isActive;
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
u32 allocate_mario_action(u32 actFlags) {
|
||||
actFlags = actFlags & (~((u32)0x3F));
|
||||
return actFlags | ACT_FLAG_CUSTOM_ACTION | gLuaMarioActionIndex++;
|
||||
|
@ -313,6 +319,8 @@ void movtexqc_register(const char* name, s16 level, s16 area, s16 type) {
|
|||
dynos_movtexqc_register(name, level, area, type);
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
f32 get_environment_region(u8 index) {
|
||||
if (gEnvironmentRegions != NULL && index <= gEnvironmentRegions[0]) {
|
||||
return gEnvironmentRegions[6 * (int)index];
|
||||
|
@ -320,20 +328,28 @@ f32 get_environment_region(u8 index) {
|
|||
return -11000;
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
void set_environment_region(u8 index, s32 value) {
|
||||
if (gEnvironmentRegions != NULL && index <= gEnvironmentRegions[0]) {
|
||||
gEnvironmentRegions[6 * (int)index] = value;
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
void set_override_fov(f32 fov) {
|
||||
gOverrideFOV = fov;
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
void set_override_near(f32 near) {
|
||||
gOverrideNear = near;
|
||||
}
|
||||
|
||||
///
|
||||
|
||||
void set_override_far(f32 far) {
|
||||
gOverrideFar = far;
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ void camera_config_set_pan_level(u32 value);
|
|||
void camera_config_set_deceleration(u32 value);
|
||||
|
||||
bool is_game_paused(void);
|
||||
bool is_transition_playing(void);
|
||||
|
||||
s16 get_dialog_id(void);
|
||||
|
||||
|
|
Loading…
Reference in New Issue