Merge branch 'coop' of github.com:sm64ex-coop-dev/sm64ex-coop into coop

This commit is contained in:
MysterD 2022-05-25 17:49:42 -07:00
commit 3052f9c78c
7 changed files with 945 additions and 1 deletions

View file

@ -7323,6 +7323,116 @@ function allocate_mario_action(actFlags)
-- ...
end
--- @param enable boolean
--- @return nil
function camera_config_enable_analog_cam(enable)
-- ...
end
--- @param enable boolean
--- @return nil
function camera_config_enable_free_cam(enable)
-- ...
end
--- @param enable boolean
--- @return nil
function camera_config_enable_mouse_look(enable)
-- ...
end
--- @return integer
function camera_config_get_aggression()
-- ...
end
--- @return integer
function camera_config_get_deceleration()
-- ...
end
--- @return integer
function camera_config_get_pan_level()
-- ...
end
--- @return integer
function camera_config_get_x_sensitivity()
-- ...
end
--- @return integer
function camera_config_get_y_sensitivity()
-- ...
end
--- @param invert boolean
--- @return nil
function camera_config_invert_x(invert)
-- ...
end
--- @param invert boolean
--- @return nil
function camera_config_invert_y(invert)
-- ...
end
--- @return boolean
function camera_config_is_analog_cam_enabled()
-- ...
end
--- @return boolean
function camera_config_is_free_cam_enabled()
-- ...
end
--- @return boolean
function camera_config_is_mouse_look_enabled()
-- ...
end
--- @return boolean
function camera_config_is_x_inverted()
-- ...
end
--- @return boolean
function camera_config_is_y_inverted()
-- ...
end
--- @param value integer
--- @return nil
function camera_config_set_aggression(value)
-- ...
end
--- @param value integer
--- @return nil
function camera_config_set_deceleration(value)
-- ...
end
--- @param value integer
--- @return nil
function camera_config_set_pan_level(value)
-- ...
end
--- @param value integer
--- @return nil
function camera_config_set_x_sensitivity(value)
-- ...
end
--- @param value integer
--- @return nil
function camera_config_set_y_sensitivity(value)
-- ...
end
--- @return nil
function camera_freeze()
-- ...

View file

@ -5113,6 +5113,386 @@
<br />
## [camera_config_enable_analog_cam](#camera_config_enable_analog_cam)
### Lua Example
`camera_config_enable_analog_cam(enable)`
### Parameters
| Field | Type |
| ----- | ---- |
| enable | `boolean` |
### Returns
- None
### C Prototype
`void camera_config_enable_analog_cam(bool enable);`
[:arrow_up_small:](#)
<br />
## [camera_config_enable_free_cam](#camera_config_enable_free_cam)
### Lua Example
`camera_config_enable_free_cam(enable)`
### Parameters
| Field | Type |
| ----- | ---- |
| enable | `boolean` |
### Returns
- None
### C Prototype
`void camera_config_enable_free_cam(bool enable);`
[:arrow_up_small:](#)
<br />
## [camera_config_enable_mouse_look](#camera_config_enable_mouse_look)
### Lua Example
`camera_config_enable_mouse_look(enable)`
### Parameters
| Field | Type |
| ----- | ---- |
| enable | `boolean` |
### Returns
- None
### C Prototype
`void camera_config_enable_mouse_look(bool enable);`
[:arrow_up_small:](#)
<br />
## [camera_config_get_aggression](#camera_config_get_aggression)
### Lua Example
`local integerValue = camera_config_get_aggression()`
### Parameters
- None
### Returns
- `integer`
### C Prototype
`u32 camera_config_get_aggression(void);`
[:arrow_up_small:](#)
<br />
## [camera_config_get_deceleration](#camera_config_get_deceleration)
### Lua Example
`local integerValue = camera_config_get_deceleration()`
### Parameters
- None
### Returns
- `integer`
### C Prototype
`u32 camera_config_get_deceleration(void);`
[:arrow_up_small:](#)
<br />
## [camera_config_get_pan_level](#camera_config_get_pan_level)
### Lua Example
`local integerValue = camera_config_get_pan_level()`
### Parameters
- None
### Returns
- `integer`
### C Prototype
`u32 camera_config_get_pan_level(void);`
[:arrow_up_small:](#)
<br />
## [camera_config_get_x_sensitivity](#camera_config_get_x_sensitivity)
### Lua Example
`local integerValue = camera_config_get_x_sensitivity()`
### Parameters
- None
### Returns
- `integer`
### C Prototype
`u32 camera_config_get_x_sensitivity(void);`
[:arrow_up_small:](#)
<br />
## [camera_config_get_y_sensitivity](#camera_config_get_y_sensitivity)
### Lua Example
`local integerValue = camera_config_get_y_sensitivity()`
### Parameters
- None
### Returns
- `integer`
### C Prototype
`u32 camera_config_get_y_sensitivity(void);`
[:arrow_up_small:](#)
<br />
## [camera_config_invert_x](#camera_config_invert_x)
### Lua Example
`camera_config_invert_x(invert)`
### Parameters
| Field | Type |
| ----- | ---- |
| invert | `boolean` |
### Returns
- None
### C Prototype
`void camera_config_invert_x(bool invert);`
[:arrow_up_small:](#)
<br />
## [camera_config_invert_y](#camera_config_invert_y)
### Lua Example
`camera_config_invert_y(invert)`
### Parameters
| Field | Type |
| ----- | ---- |
| invert | `boolean` |
### Returns
- None
### C Prototype
`void camera_config_invert_y(bool invert);`
[:arrow_up_small:](#)
<br />
## [camera_config_is_analog_cam_enabled](#camera_config_is_analog_cam_enabled)
### Lua Example
`local booleanValue = camera_config_is_analog_cam_enabled()`
### Parameters
- None
### Returns
- `boolean`
### C Prototype
`bool camera_config_is_analog_cam_enabled(void);`
[:arrow_up_small:](#)
<br />
## [camera_config_is_free_cam_enabled](#camera_config_is_free_cam_enabled)
### Lua Example
`local booleanValue = camera_config_is_free_cam_enabled()`
### Parameters
- None
### Returns
- `boolean`
### C Prototype
`bool camera_config_is_free_cam_enabled(void);`
[:arrow_up_small:](#)
<br />
## [camera_config_is_mouse_look_enabled](#camera_config_is_mouse_look_enabled)
### Lua Example
`local booleanValue = camera_config_is_mouse_look_enabled()`
### Parameters
- None
### Returns
- `boolean`
### C Prototype
`bool camera_config_is_mouse_look_enabled(void);`
[:arrow_up_small:](#)
<br />
## [camera_config_is_x_inverted](#camera_config_is_x_inverted)
### Lua Example
`local booleanValue = camera_config_is_x_inverted()`
### Parameters
- None
### Returns
- `boolean`
### C Prototype
`bool camera_config_is_x_inverted(void);`
[:arrow_up_small:](#)
<br />
## [camera_config_is_y_inverted](#camera_config_is_y_inverted)
### Lua Example
`local booleanValue = camera_config_is_y_inverted()`
### Parameters
- None
### Returns
- `boolean`
### C Prototype
`bool camera_config_is_y_inverted(void);`
[:arrow_up_small:](#)
<br />
## [camera_config_set_aggression](#camera_config_set_aggression)
### Lua Example
`camera_config_set_aggression(value)`
### Parameters
| Field | Type |
| ----- | ---- |
| value | `integer` |
### Returns
- None
### C Prototype
`void camera_config_set_aggression(u32 value);`
[:arrow_up_small:](#)
<br />
## [camera_config_set_deceleration](#camera_config_set_deceleration)
### Lua Example
`camera_config_set_deceleration(value)`
### Parameters
| Field | Type |
| ----- | ---- |
| value | `integer` |
### Returns
- None
### C Prototype
`void camera_config_set_deceleration(u32 value);`
[:arrow_up_small:](#)
<br />
## [camera_config_set_pan_level](#camera_config_set_pan_level)
### Lua Example
`camera_config_set_pan_level(value)`
### Parameters
| Field | Type |
| ----- | ---- |
| value | `integer` |
### Returns
- None
### C Prototype
`void camera_config_set_pan_level(u32 value);`
[:arrow_up_small:](#)
<br />
## [camera_config_set_x_sensitivity](#camera_config_set_x_sensitivity)
### Lua Example
`camera_config_set_x_sensitivity(value)`
### Parameters
| Field | Type |
| ----- | ---- |
| value | `integer` |
### Returns
- None
### C Prototype
`void camera_config_set_x_sensitivity(u32 value);`
[:arrow_up_small:](#)
<br />
## [camera_config_set_y_sensitivity](#camera_config_set_y_sensitivity)
### Lua Example
`camera_config_set_y_sensitivity(value)`
### Parameters
| Field | Type |
| ----- | ---- |
| value | `integer` |
### Returns
- None
### C Prototype
`void camera_config_set_y_sensitivity(u32 value);`
[:arrow_up_small:](#)
<br />
## [camera_freeze](#camera_freeze)
### Lua Example

View file

@ -1368,6 +1368,26 @@
- smlua_misc_utils.h
- [allocate_mario_action](functions-4.md#allocate_mario_action)
- [camera_config_enable_analog_cam](functions-4.md#camera_config_enable_analog_cam)
- [camera_config_enable_free_cam](functions-4.md#camera_config_enable_free_cam)
- [camera_config_enable_mouse_look](functions-4.md#camera_config_enable_mouse_look)
- [camera_config_get_aggression](functions-4.md#camera_config_get_aggression)
- [camera_config_get_deceleration](functions-4.md#camera_config_get_deceleration)
- [camera_config_get_pan_level](functions-4.md#camera_config_get_pan_level)
- [camera_config_get_x_sensitivity](functions-4.md#camera_config_get_x_sensitivity)
- [camera_config_get_y_sensitivity](functions-4.md#camera_config_get_y_sensitivity)
- [camera_config_invert_x](functions-4.md#camera_config_invert_x)
- [camera_config_invert_y](functions-4.md#camera_config_invert_y)
- [camera_config_is_analog_cam_enabled](functions-4.md#camera_config_is_analog_cam_enabled)
- [camera_config_is_free_cam_enabled](functions-4.md#camera_config_is_free_cam_enabled)
- [camera_config_is_mouse_look_enabled](functions-4.md#camera_config_is_mouse_look_enabled)
- [camera_config_is_x_inverted](functions-4.md#camera_config_is_x_inverted)
- [camera_config_is_y_inverted](functions-4.md#camera_config_is_y_inverted)
- [camera_config_set_aggression](functions-4.md#camera_config_set_aggression)
- [camera_config_set_deceleration](functions-4.md#camera_config_set_deceleration)
- [camera_config_set_pan_level](functions-4.md#camera_config_set_pan_level)
- [camera_config_set_x_sensitivity](functions-4.md#camera_config_set_x_sensitivity)
- [camera_config_set_y_sensitivity](functions-4.md#camera_config_set_y_sensitivity)
- [camera_freeze](functions-4.md#camera_freeze)
- [camera_unfreeze](functions-4.md#camera_unfreeze)
- [deref_s32_pointer](functions-4.md#deref_s32_pointer)

View file

@ -230,7 +230,25 @@ function round_begin()
end
if roundShuffle then
gGlobalSyncTable.currentLevel = gGameLevels[math.random(#gGameLevels)].level
local curLevel = nil
for i, gl in ipairs(gGameLevels) do
if gGlobalSyncTable.currentLevel == gl.level then
curLevel = i
end
end
if curLevel ~= nil then
if curLevel >= 3 then
curLevel = 1
else
curLevel = curLevel + 1
end
gGlobalSyncTable.currentLevel = gGameLevels[curLevel].level
else
gGlobalSyncTable.currentLevel = gGameLevels[math.random(#gGameLevels)].level
end
end
for i = 0, (MAX_PLAYERS - 1) do
@ -414,6 +432,7 @@ function on_update()
end
function on_gamemode_command(msg)
local setMode = nil
for i, gm in ipairs(gGameModes) do
@ -444,6 +463,27 @@ function on_gamemode_command(msg)
return false
end
function on_level_command(msg)
local setLevel = nil
for i, gl in ipairs(gGameLevels) do
if msg == gl.name then
setLevel = i
end
end
if setLevel ~= nil then
gGlobalSyncTable.currentLevel = gGameLevels[setLevel].level
round_end()
sWaitTimer = 1
sRoundCount = 0
return true
end
return false
end
hook_event(HOOK_ON_SYNC_VALID, on_sync_valid)
hook_event(HOOK_ON_PAUSE_EXIT, on_pause_exit)
hook_event(HOOK_UPDATE, on_update)
@ -458,4 +498,5 @@ end
if network_is_server() then
hook_chat_command('arena-gamemode', string.format("[%s|random] sets gamemode", sGameModeShortTimes), on_gamemode_command)
hook_chat_command('arena-level', '[Origin|Sky Beach|Pillars] sets level', on_level_command)
end

View file

@ -15073,6 +15073,206 @@ int smlua_func_allocate_mario_action(lua_State* L) {
return 1;
}
int smlua_func_camera_config_enable_analog_cam(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
bool enable = smlua_to_boolean(L, 1);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
camera_config_enable_analog_cam(enable);
return 1;
}
int smlua_func_camera_config_enable_free_cam(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
bool enable = smlua_to_boolean(L, 1);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
camera_config_enable_free_cam(enable);
return 1;
}
int smlua_func_camera_config_enable_mouse_look(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
bool enable = smlua_to_boolean(L, 1);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
camera_config_enable_mouse_look(enable);
return 1;
}
int smlua_func_camera_config_get_aggression(UNUSED lua_State* L) {
if(!smlua_functions_valid_param_count(L, 0)) { return 0; }
lua_pushinteger(L, camera_config_get_aggression());
return 1;
}
int smlua_func_camera_config_get_deceleration(UNUSED lua_State* L) {
if(!smlua_functions_valid_param_count(L, 0)) { return 0; }
lua_pushinteger(L, camera_config_get_deceleration());
return 1;
}
int smlua_func_camera_config_get_pan_level(UNUSED lua_State* L) {
if(!smlua_functions_valid_param_count(L, 0)) { return 0; }
lua_pushinteger(L, camera_config_get_pan_level());
return 1;
}
int smlua_func_camera_config_get_x_sensitivity(UNUSED lua_State* L) {
if(!smlua_functions_valid_param_count(L, 0)) { return 0; }
lua_pushinteger(L, camera_config_get_x_sensitivity());
return 1;
}
int smlua_func_camera_config_get_y_sensitivity(UNUSED lua_State* L) {
if(!smlua_functions_valid_param_count(L, 0)) { return 0; }
lua_pushinteger(L, camera_config_get_y_sensitivity());
return 1;
}
int smlua_func_camera_config_invert_x(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
bool invert = smlua_to_boolean(L, 1);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
camera_config_invert_x(invert);
return 1;
}
int smlua_func_camera_config_invert_y(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
bool invert = smlua_to_boolean(L, 1);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
camera_config_invert_y(invert);
return 1;
}
int smlua_func_camera_config_is_analog_cam_enabled(UNUSED lua_State* L) {
if(!smlua_functions_valid_param_count(L, 0)) { return 0; }
lua_pushboolean(L, camera_config_is_analog_cam_enabled());
return 1;
}
int smlua_func_camera_config_is_free_cam_enabled(UNUSED lua_State* L) {
if(!smlua_functions_valid_param_count(L, 0)) { return 0; }
lua_pushboolean(L, camera_config_is_free_cam_enabled());
return 1;
}
int smlua_func_camera_config_is_mouse_look_enabled(UNUSED lua_State* L) {
if(!smlua_functions_valid_param_count(L, 0)) { return 0; }
lua_pushboolean(L, camera_config_is_mouse_look_enabled());
return 1;
}
int smlua_func_camera_config_is_x_inverted(UNUSED lua_State* L) {
if(!smlua_functions_valid_param_count(L, 0)) { return 0; }
lua_pushboolean(L, camera_config_is_x_inverted());
return 1;
}
int smlua_func_camera_config_is_y_inverted(UNUSED lua_State* L) {
if(!smlua_functions_valid_param_count(L, 0)) { return 0; }
lua_pushboolean(L, camera_config_is_y_inverted());
return 1;
}
int smlua_func_camera_config_set_aggression(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u32 value = smlua_to_integer(L, 1);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
camera_config_set_aggression(value);
return 1;
}
int smlua_func_camera_config_set_deceleration(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u32 value = smlua_to_integer(L, 1);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
camera_config_set_deceleration(value);
return 1;
}
int smlua_func_camera_config_set_pan_level(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u32 value = smlua_to_integer(L, 1);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
camera_config_set_pan_level(value);
return 1;
}
int smlua_func_camera_config_set_x_sensitivity(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u32 value = smlua_to_integer(L, 1);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
camera_config_set_x_sensitivity(value);
return 1;
}
int smlua_func_camera_config_set_y_sensitivity(lua_State* L) {
if(!smlua_functions_valid_param_count(L, 1)) { return 0; }
u32 value = smlua_to_integer(L, 1);
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter 1"); return 0; }
camera_config_set_y_sensitivity(value);
return 1;
}
int smlua_func_camera_freeze(UNUSED lua_State* L) {
if(!smlua_functions_valid_param_count(L, 0)) { return 0; }
@ -17596,6 +17796,26 @@ void smlua_bind_functions_autogen(void) {
// smlua_misc_utils.h
smlua_bind_function(L, "allocate_mario_action", smlua_func_allocate_mario_action);
smlua_bind_function(L, "camera_config_enable_analog_cam", smlua_func_camera_config_enable_analog_cam);
smlua_bind_function(L, "camera_config_enable_free_cam", smlua_func_camera_config_enable_free_cam);
smlua_bind_function(L, "camera_config_enable_mouse_look", smlua_func_camera_config_enable_mouse_look);
smlua_bind_function(L, "camera_config_get_aggression", smlua_func_camera_config_get_aggression);
smlua_bind_function(L, "camera_config_get_deceleration", smlua_func_camera_config_get_deceleration);
smlua_bind_function(L, "camera_config_get_pan_level", smlua_func_camera_config_get_pan_level);
smlua_bind_function(L, "camera_config_get_x_sensitivity", smlua_func_camera_config_get_x_sensitivity);
smlua_bind_function(L, "camera_config_get_y_sensitivity", smlua_func_camera_config_get_y_sensitivity);
smlua_bind_function(L, "camera_config_invert_x", smlua_func_camera_config_invert_x);
smlua_bind_function(L, "camera_config_invert_y", smlua_func_camera_config_invert_y);
smlua_bind_function(L, "camera_config_is_analog_cam_enabled", smlua_func_camera_config_is_analog_cam_enabled);
smlua_bind_function(L, "camera_config_is_free_cam_enabled", smlua_func_camera_config_is_free_cam_enabled);
smlua_bind_function(L, "camera_config_is_mouse_look_enabled", smlua_func_camera_config_is_mouse_look_enabled);
smlua_bind_function(L, "camera_config_is_x_inverted", smlua_func_camera_config_is_x_inverted);
smlua_bind_function(L, "camera_config_is_y_inverted", smlua_func_camera_config_is_y_inverted);
smlua_bind_function(L, "camera_config_set_aggression", smlua_func_camera_config_set_aggression);
smlua_bind_function(L, "camera_config_set_deceleration", smlua_func_camera_config_set_deceleration);
smlua_bind_function(L, "camera_config_set_pan_level", smlua_func_camera_config_set_pan_level);
smlua_bind_function(L, "camera_config_set_x_sensitivity", smlua_func_camera_config_set_x_sensitivity);
smlua_bind_function(L, "camera_config_set_y_sensitivity", smlua_func_camera_config_set_y_sensitivity);
smlua_bind_function(L, "camera_freeze", smlua_func_camera_freeze);
smlua_bind_function(L, "camera_unfreeze", smlua_func_camera_unfreeze);
smlua_bind_function(L, "deref_s32_pointer", smlua_func_deref_s32_pointer);

View file

@ -2,6 +2,7 @@
#include "types.h"
#include "data/dynos.c.h"
#include "game/bettercamera.h"
#include "game/camera.h"
#include "game/hud.h"
#include "pc/lua/smlua.h"
@ -112,6 +113,156 @@ void camera_unfreeze(void) {
gOverrideFreezeCamera = FALSE;
}
bool camera_config_is_free_cam_enabled(void) {
#ifdef BETTERCAMERA
return configEnableCamera;
#else
return false;
#endif
}
bool camera_config_is_analog_cam_enabled(void) {
#ifdef BETTERCAMERA
return configCameraAnalog;
#else
return false;
#endif
}
bool camera_config_is_mouse_look_enabled(void) {
#ifdef BETTERCAMERA
return configCameraMouse;
#else
return false;
#endif
}
bool camera_config_is_x_inverted(void) {
#ifdef BETTERCAMERA
return configCameraInvertX;
#else
return false;
#endif
}
bool camera_config_is_y_inverted(void) {
#ifdef BETTERCAMERA
return configCameraInvertY;
#else
return false;
#endif
}
u32 camera_config_get_x_sensitivity(void) {
#ifdef BETTERCAMERA
return configCameraXSens;
#else
return 0;
#endif
}
u32 camera_config_get_y_sensitivity(void) {
#ifdef BETTERCAMERA
return configCameraYSens;
#else
return 0;
#endif
}
u32 camera_config_get_aggression(void) {
#ifdef BETTERCAMERA
return configCameraAggr;
#else
return 0;
#endif
}
u32 camera_config_get_pan_level(void) {
#ifdef BETTERCAMERA
return configCameraPan;
#else
return 0;
#endif
}
u32 camera_config_get_deceleration(void) {
#ifdef BETTERCAMERA
return configCameraDegrade;
#else
return 0;
#endif
}
void camera_config_enable_free_cam(bool enable) {
#ifdef BETTERCAMERA
configEnableCamera = enable;
newcam_init_settings();
#endif
}
void camera_config_enable_analog_cam(bool enable) {
#ifdef BETTERCAMERA
configCameraAnalog = enable;
newcam_init_settings();
#endif
}
void camera_config_enable_mouse_look(bool enable) {
#ifdef BETTERCAMERA
configCameraMouse = enable;
newcam_init_settings();
#endif
}
void camera_config_invert_x(bool invert) {
#ifdef BETTERCAMERA
configCameraInvertX = invert;
newcam_init_settings();
#endif
}
void camera_config_invert_y(bool invert) {
#ifdef BETTERCAMERA
configCameraInvertY = invert;
newcam_init_settings();
#endif
}
void camera_config_set_x_sensitivity(u32 value) {
#ifdef BETTERCAMERA
configCameraXSens = MIN(MAX(value, 1), 100);
newcam_init_settings();
#endif
}
void camera_config_set_y_sensitivity(u32 value) {
#ifdef BETTERCAMERA
configCameraYSens = MIN(MAX(value, 1), 100);
newcam_init_settings();
#endif
}
void camera_config_set_aggression(u32 value) {
#ifdef BETTERCAMERA
configCameraAggr = MIN(MAX(value, 0), 100);
newcam_init_settings();
#endif
}
void camera_config_set_pan_level(u32 value) {
#ifdef BETTERCAMERA
configCameraPan = MIN(MAX(value, 0), 100);
newcam_init_settings();
#endif
}
void camera_config_set_deceleration(u32 value) {
#ifdef BETTERCAMERA
configCameraDegrade = MIN(MAX(value, 0), 100);
newcam_init_settings();
#endif
}
///
extern s16 gMenuMode;

View file

@ -39,6 +39,28 @@ void hud_render_power_meter(s32 health, f32 x, f32 y, f32 width, f32 height);
void camera_freeze(void);
void camera_unfreeze(void);
bool camera_config_is_free_cam_enabled(void);
bool camera_config_is_analog_cam_enabled(void);
bool camera_config_is_mouse_look_enabled(void);
bool camera_config_is_x_inverted(void);
bool camera_config_is_y_inverted(void);
u32 camera_config_get_x_sensitivity(void);
u32 camera_config_get_y_sensitivity(void);
u32 camera_config_get_aggression(void);
u32 camera_config_get_pan_level(void);
u32 camera_config_get_deceleration(void);
void camera_config_enable_free_cam(bool enable);
void camera_config_enable_analog_cam(bool enable);
void camera_config_enable_mouse_look(bool enable);
void camera_config_invert_x(bool invert);
void camera_config_invert_y(bool invert);
void camera_config_set_x_sensitivity(u32 value);
void camera_config_set_y_sensitivity(u32 value);
void camera_config_set_aggression(u32 value);
void camera_config_set_pan_level(u32 value);
void camera_config_set_deceleration(u32 value);
bool is_game_paused(void);
bool warp_to_level(s32 aLevel, s32 aArea, s32 aAct);