mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-05-10 19:01:46 +00:00
This new camera code is NOT up to pollos standards.
This commit is contained in:
parent
14f98e4b30
commit
2479eaabfb
24 changed files with 855 additions and 915 deletions
|
|
@ -8948,12 +8948,6 @@ function camera_config_enable_analog_cam(enable)
|
||||||
-- ...
|
-- ...
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @param enable boolean
|
|
||||||
--- Overrides if Camera Collision is enabled
|
|
||||||
function camera_config_enable_camera_collisions(enable)
|
|
||||||
-- ...
|
|
||||||
end
|
|
||||||
|
|
||||||
--- @param enable boolean
|
--- @param enable boolean
|
||||||
--- Overrides if the L button will center the camera
|
--- Overrides if the L button will center the camera
|
||||||
function camera_config_enable_centering(enable)
|
function camera_config_enable_centering(enable)
|
||||||
|
|
@ -8961,14 +8955,20 @@ function camera_config_enable_centering(enable)
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @param enable boolean
|
--- @param enable boolean
|
||||||
--- Overrides if Free Camera is enabled
|
--- Overrides if Camera Collision is enabled
|
||||||
function camera_config_enable_free_cam(enable)
|
function camera_config_enable_collisions(enable)
|
||||||
-- ...
|
-- ...
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @param enable boolean
|
--- @param enable boolean
|
||||||
--- Overrides if Freecam DPad Behavior is enabled
|
--- Overrides if Freecam DPad Behavior is enabled
|
||||||
function camera_config_enable_freecam_dpad(enable)
|
function camera_config_enable_dpad(enable)
|
||||||
|
-- ...
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @param enable boolean
|
||||||
|
--- Overrides if Free Camera is enabled
|
||||||
|
function camera_config_enable_free_cam(enable)
|
||||||
-- ...
|
-- ...
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -9027,21 +9027,21 @@ function camera_config_is_analog_cam_enabled()
|
||||||
-- ...
|
-- ...
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @return boolean
|
|
||||||
--- Checks if Free Camera is enabled
|
|
||||||
function camera_config_is_free_cam_enabled()
|
|
||||||
-- ...
|
|
||||||
end
|
|
||||||
|
|
||||||
--- @return boolean
|
--- @return boolean
|
||||||
--- Checks if Camera Collision is enabled
|
--- Checks if Camera Collision is enabled
|
||||||
function camera_config_is_free_camera_collision_enabled()
|
function camera_config_is_collision_enabled()
|
||||||
-- ...
|
-- ...
|
||||||
end
|
end
|
||||||
|
|
||||||
--- @return boolean
|
--- @return boolean
|
||||||
--- Checks if Freecam DPad Behavior is enabled
|
--- Checks if Freecam DPad Behavior is enabled
|
||||||
function camera_config_is_freecam_dpad_enabled()
|
function camera_config_is_dpad_enabled()
|
||||||
|
-- ...
|
||||||
|
end
|
||||||
|
|
||||||
|
--- @return boolean
|
||||||
|
--- Checks if Free Camera is enabled
|
||||||
|
function camera_config_is_free_cam_enabled()
|
||||||
-- ...
|
-- ...
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6838,29 +6838,6 @@ Overrides if Analog Camera is enabled
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
## [camera_config_enable_camera_collisions](#camera_config_enable_camera_collisions)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Overrides if Camera Collision is enabled
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`camera_config_enable_camera_collisions(enable)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| enable | `boolean` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- None
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`void camera_config_enable_camera_collisions(bool enable);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [camera_config_enable_centering](#camera_config_enable_centering)
|
## [camera_config_enable_centering](#camera_config_enable_centering)
|
||||||
|
|
||||||
### Description
|
### Description
|
||||||
|
|
@ -6884,6 +6861,52 @@ Overrides if the L button will center the camera
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
## [camera_config_enable_collisions](#camera_config_enable_collisions)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Overrides if Camera Collision is enabled
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`camera_config_enable_collisions(enable)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| enable | `boolean` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- None
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`void camera_config_enable_collisions(bool enable);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [camera_config_enable_dpad](#camera_config_enable_dpad)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Overrides if Freecam DPad Behavior is enabled
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`camera_config_enable_dpad(enable)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| enable | `boolean` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- None
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`void camera_config_enable_dpad(bool enable);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
## [camera_config_enable_free_cam](#camera_config_enable_free_cam)
|
## [camera_config_enable_free_cam](#camera_config_enable_free_cam)
|
||||||
|
|
||||||
### Description
|
### Description
|
||||||
|
|
@ -6907,29 +6930,6 @@ Overrides if Free Camera is enabled
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
## [camera_config_enable_freecam_dpad](#camera_config_enable_freecam_dpad)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Overrides if Freecam DPad Behavior is enabled
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`camera_config_enable_freecam_dpad(enable)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| enable | `boolean` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- None
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`void camera_config_enable_freecam_dpad(bool enable);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [camera_config_enable_mouse_look](#camera_config_enable_mouse_look)
|
## [camera_config_enable_mouse_look](#camera_config_enable_mouse_look)
|
||||||
|
|
||||||
### Description
|
### Description
|
||||||
|
|
@ -7131,6 +7131,48 @@ Checks if Analog Camera is enabled
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
## [camera_config_is_collision_enabled](#camera_config_is_collision_enabled)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Checks if Camera Collision is enabled
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`local booleanValue = camera_config_is_collision_enabled()`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
- None
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- `boolean`
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`bool camera_config_is_collision_enabled(void);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [camera_config_is_dpad_enabled](#camera_config_is_dpad_enabled)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Checks if Freecam DPad Behavior is enabled
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`local booleanValue = camera_config_is_dpad_enabled()`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
- None
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- `boolean`
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`bool camera_config_is_dpad_enabled(void);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
## [camera_config_is_free_cam_enabled](#camera_config_is_free_cam_enabled)
|
## [camera_config_is_free_cam_enabled](#camera_config_is_free_cam_enabled)
|
||||||
|
|
||||||
### Description
|
### Description
|
||||||
|
|
@ -7152,48 +7194,6 @@ Checks if Free Camera is enabled
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
## [camera_config_is_free_camera_collision_enabled](#camera_config_is_free_camera_collision_enabled)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Checks if Camera Collision is enabled
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`local booleanValue = camera_config_is_free_camera_collision_enabled()`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
- None
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- `boolean`
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`bool camera_config_is_free_camera_collision_enabled(void);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [camera_config_is_freecam_dpad_enabled](#camera_config_is_freecam_dpad_enabled)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Checks if Freecam DPad Behavior is enabled
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`local booleanValue = camera_config_is_freecam_dpad_enabled()`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
- None
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- `boolean`
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`bool camera_config_is_freecam_dpad_enabled(void);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [camera_config_is_mouse_look_enabled](#camera_config_is_mouse_look_enabled)
|
## [camera_config_is_mouse_look_enabled](#camera_config_is_mouse_look_enabled)
|
||||||
|
|
||||||
### Description
|
### Description
|
||||||
|
|
@ -8111,565 +8111,6 @@ Gets the `level` terrain collision from `area`
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
|
||||||
---
|
|
||||||
# functions from smlua_gfx_utils.h
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
|
|
||||||
## [get_fog_color](#get_fog_color)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Gets a value of the global fog color
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`local integerValue = get_fog_color(index)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| index | `integer` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- `integer`
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`u8 get_fog_color(u8 index);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [get_fog_intensity](#get_fog_intensity)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Gets the intensity of the fog
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`local numberValue = get_fog_intensity()`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
- None
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- `number`
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`f32 get_fog_intensity(void);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [get_lighting_color](#get_lighting_color)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Gets a value of the global lighting color
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`local integerValue = get_lighting_color(index)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| index | `integer` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- `integer`
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`u8 get_lighting_color(u8 index);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [get_lighting_color_ambient](#get_lighting_color_ambient)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Gets a value of the global ambient lighting color
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`local integerValue = get_lighting_color_ambient(index)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| index | `integer` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- `integer`
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`u8 get_lighting_color_ambient(u8 index);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [get_lighting_dir](#get_lighting_dir)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Gets a value of the global lighting direction
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`local numberValue = get_lighting_dir(index)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| index | `integer` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- `number`
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`f32 get_lighting_dir(u8 index);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [get_skybox](#get_skybox)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Gets the current skybox
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`local integerValue = get_skybox()`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
- None
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- `integer`
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`s8 get_skybox(void);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [get_skybox_color](#get_skybox_color)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Gets a value of the global skybox color
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`local integerValue = get_skybox_color(index)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| index | `integer` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- `integer`
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`u8 get_skybox_color(u8 index);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [get_vertex_color](#get_vertex_color)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Gets a value of the global vertex shading color
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`local integerValue = get_vertex_color(index)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| index | `integer` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- `integer`
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`u8 get_vertex_color(u8 index);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [gfx_get_vtx](#gfx_get_vtx)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Gets a vertex from a display list command if it has the correct op. Intended to be used with `gfx_parse`.
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`local PointerValue = gfx_get_vtx(gfx, offset)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| gfx | `Pointer` <`Gfx`> |
|
|
||||||
| offset | `integer` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- `Pointer` <`Vtx`>
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`Vtx *gfx_get_vtx(Gfx* gfx, u16 offset);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [gfx_parse](#gfx_parse)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Traverses a display list. Takes a Lua function as a parameter, which is called back for each command in the display list with the parameters `cmd` (display list pointer), and `op`.
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`gfx_parse(cmd, func)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| cmd | `Pointer` <`Gfx`> |
|
|
||||||
| func | `Lua Function` () |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- None
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`void gfx_parse(Gfx* cmd, LuaFunction func);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [gfx_set_combine_lerp](#gfx_set_combine_lerp)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Sets the display list combine mode. you can fill this function with G_CCMUX_* and G_ACMUX_* constants
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`gfx_set_combine_lerp(gfx, a0, b0, c0, d0, Aa0, Ab0, Ac0, Ad0, a1, b1, c1, d1, Aa1, Ab1, Ac1, Ad1)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| gfx | `Pointer` <`Gfx`> |
|
|
||||||
| a0 | `integer` |
|
|
||||||
| b0 | `integer` |
|
|
||||||
| c0 | `integer` |
|
|
||||||
| d0 | `integer` |
|
|
||||||
| Aa0 | `integer` |
|
|
||||||
| Ab0 | `integer` |
|
|
||||||
| Ac0 | `integer` |
|
|
||||||
| Ad0 | `integer` |
|
|
||||||
| a1 | `integer` |
|
|
||||||
| b1 | `integer` |
|
|
||||||
| c1 | `integer` |
|
|
||||||
| d1 | `integer` |
|
|
||||||
| Aa1 | `integer` |
|
|
||||||
| Ab1 | `integer` |
|
|
||||||
| Ac1 | `integer` |
|
|
||||||
| Ad1 | `integer` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- None
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`void gfx_set_combine_lerp(Gfx* gfx, u32 a0, u32 b0, u32 c0, u32 d0, u32 Aa0, u32 Ab0, u32 Ac0, u32 Ad0, u32 a1, u32 b1, u32 c1, u32 d1, u32 Aa1, u32 Ab1, u32 Ac1, u32 Ad1);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [gfx_set_texture_image](#gfx_set_texture_image)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Sets the display list texture image. Pass in textureInfo.texture as `texture`
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`gfx_set_texture_image(gfx, format, size, width, texture)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| gfx | `Pointer` <`Gfx`> |
|
|
||||||
| format | `integer` |
|
|
||||||
| size | `integer` |
|
|
||||||
| width | `integer` |
|
|
||||||
| texture | `Pointer` <`integer`> |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- None
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`void gfx_set_texture_image(Gfx* gfx, u32 format, u32 size, u32 width, u8* texture);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [set_fog_color](#set_fog_color)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Sets a value of the global fog color
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`set_fog_color(index, value)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| index | `integer` |
|
|
||||||
| value | `integer` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- None
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`void set_fog_color(u8 index, u8 value);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [set_fog_intensity](#set_fog_intensity)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Sets the intensity of the fog (this value scales very quickly, 1.0 to 1.1 is a desirable range)
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`set_fog_intensity(intensity)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| intensity | `number` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- None
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`void set_fog_intensity(f32 intensity);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [set_lighting_color](#set_lighting_color)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Sets a value of the global lighting color
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`set_lighting_color(index, value)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| index | `integer` |
|
|
||||||
| value | `integer` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- None
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`void set_lighting_color(u8 index, u8 value);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [set_lighting_color_ambient](#set_lighting_color_ambient)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Sets a value of the global lighting color (run this after `set_lighting_color` for the ambient color to not be overriden)
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`set_lighting_color_ambient(index, value)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| index | `integer` |
|
|
||||||
| value | `integer` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- None
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`void set_lighting_color_ambient(u8 index, u8 value);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [set_lighting_dir](#set_lighting_dir)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Sets a value of the global lighting direction
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`set_lighting_dir(index, value)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| index | `integer` |
|
|
||||||
| value | `number` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- None
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`void set_lighting_dir(u8 index, f32 value);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [set_override_far](#set_override_far)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Sets the override far plane
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`set_override_far(far)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| far | `number` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- None
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`void set_override_far(f32 far);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [set_override_fov](#set_override_fov)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Sets the override FOV
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`set_override_fov(fov)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| fov | `number` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- None
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`void set_override_fov(f32 fov);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [set_override_near](#set_override_near)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Sets the override near plane
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`set_override_near(near)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| near | `number` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- None
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`void set_override_near(f32 near);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [set_override_skybox](#set_override_skybox)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Sets the override skybox
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`set_override_skybox(background)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| background | `integer` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- None
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`void set_override_skybox(s8 background);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [set_skybox_color](#set_skybox_color)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Sets a value of the global skybox color
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`set_skybox_color(index, value)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| index | `integer` |
|
|
||||||
| value | `integer` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- None
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`void set_skybox_color(u8 index, u8 value);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
|
|
||||||
## [set_vertex_color](#set_vertex_color)
|
|
||||||
|
|
||||||
### Description
|
|
||||||
Sets a value of the global vertex shading color
|
|
||||||
|
|
||||||
### Lua Example
|
|
||||||
`set_vertex_color(index, value)`
|
|
||||||
|
|
||||||
### Parameters
|
|
||||||
| Field | Type |
|
|
||||||
| ----- | ---- |
|
|
||||||
| index | `integer` |
|
|
||||||
| value | `integer` |
|
|
||||||
|
|
||||||
### Returns
|
|
||||||
- None
|
|
||||||
|
|
||||||
### C Prototype
|
|
||||||
`void set_vertex_color(u8 index, u8 value);`
|
|
||||||
|
|
||||||
[:arrow_up_small:](#)
|
|
||||||
|
|
||||||
<br />
|
|
||||||
---
|
---
|
||||||
|
|
||||||
[< prev](functions-4.md) | [1](functions.md) | [2](functions-2.md) | [3](functions-3.md) | [4](functions-4.md) | 5 | [6](functions-6.md) | [next >](functions-6.md)]
|
[< prev](functions-4.md) | [1](functions.md) | [2](functions-2.md) | [3](functions-3.md) | [4](functions-4.md) | 5 | [6](functions-6.md) | [next >](functions-6.md)]
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,565 @@
|
||||||
[< prev](functions-5.md) | [1](functions.md) | [2](functions-2.md) | [3](functions-3.md) | [4](functions-4.md) | [5](functions-5.md) | 6]
|
[< prev](functions-5.md) | [1](functions.md) | [2](functions-2.md) | [3](functions-3.md) | [4](functions-4.md) | [5](functions-5.md) | 6]
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
# functions from smlua_gfx_utils.h
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
|
||||||
|
## [get_fog_color](#get_fog_color)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Gets a value of the global fog color
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`local integerValue = get_fog_color(index)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| index | `integer` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- `integer`
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`u8 get_fog_color(u8 index);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [get_fog_intensity](#get_fog_intensity)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Gets the intensity of the fog
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`local numberValue = get_fog_intensity()`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
- None
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- `number`
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`f32 get_fog_intensity(void);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [get_lighting_color](#get_lighting_color)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Gets a value of the global lighting color
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`local integerValue = get_lighting_color(index)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| index | `integer` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- `integer`
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`u8 get_lighting_color(u8 index);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [get_lighting_color_ambient](#get_lighting_color_ambient)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Gets a value of the global ambient lighting color
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`local integerValue = get_lighting_color_ambient(index)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| index | `integer` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- `integer`
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`u8 get_lighting_color_ambient(u8 index);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [get_lighting_dir](#get_lighting_dir)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Gets a value of the global lighting direction
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`local numberValue = get_lighting_dir(index)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| index | `integer` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- `number`
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`f32 get_lighting_dir(u8 index);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [get_skybox](#get_skybox)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Gets the current skybox
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`local integerValue = get_skybox()`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
- None
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- `integer`
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`s8 get_skybox(void);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [get_skybox_color](#get_skybox_color)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Gets a value of the global skybox color
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`local integerValue = get_skybox_color(index)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| index | `integer` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- `integer`
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`u8 get_skybox_color(u8 index);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [get_vertex_color](#get_vertex_color)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Gets a value of the global vertex shading color
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`local integerValue = get_vertex_color(index)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| index | `integer` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- `integer`
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`u8 get_vertex_color(u8 index);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [gfx_get_vtx](#gfx_get_vtx)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Gets a vertex from a display list command if it has the correct op. Intended to be used with `gfx_parse`.
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`local PointerValue = gfx_get_vtx(gfx, offset)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| gfx | `Pointer` <`Gfx`> |
|
||||||
|
| offset | `integer` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- `Pointer` <`Vtx`>
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`Vtx *gfx_get_vtx(Gfx* gfx, u16 offset);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [gfx_parse](#gfx_parse)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Traverses a display list. Takes a Lua function as a parameter, which is called back for each command in the display list with the parameters `cmd` (display list pointer), and `op`.
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`gfx_parse(cmd, func)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| cmd | `Pointer` <`Gfx`> |
|
||||||
|
| func | `Lua Function` () |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- None
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`void gfx_parse(Gfx* cmd, LuaFunction func);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [gfx_set_combine_lerp](#gfx_set_combine_lerp)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Sets the display list combine mode. you can fill this function with G_CCMUX_* and G_ACMUX_* constants
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`gfx_set_combine_lerp(gfx, a0, b0, c0, d0, Aa0, Ab0, Ac0, Ad0, a1, b1, c1, d1, Aa1, Ab1, Ac1, Ad1)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| gfx | `Pointer` <`Gfx`> |
|
||||||
|
| a0 | `integer` |
|
||||||
|
| b0 | `integer` |
|
||||||
|
| c0 | `integer` |
|
||||||
|
| d0 | `integer` |
|
||||||
|
| Aa0 | `integer` |
|
||||||
|
| Ab0 | `integer` |
|
||||||
|
| Ac0 | `integer` |
|
||||||
|
| Ad0 | `integer` |
|
||||||
|
| a1 | `integer` |
|
||||||
|
| b1 | `integer` |
|
||||||
|
| c1 | `integer` |
|
||||||
|
| d1 | `integer` |
|
||||||
|
| Aa1 | `integer` |
|
||||||
|
| Ab1 | `integer` |
|
||||||
|
| Ac1 | `integer` |
|
||||||
|
| Ad1 | `integer` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- None
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`void gfx_set_combine_lerp(Gfx* gfx, u32 a0, u32 b0, u32 c0, u32 d0, u32 Aa0, u32 Ab0, u32 Ac0, u32 Ad0, u32 a1, u32 b1, u32 c1, u32 d1, u32 Aa1, u32 Ab1, u32 Ac1, u32 Ad1);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [gfx_set_texture_image](#gfx_set_texture_image)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Sets the display list texture image. Pass in textureInfo.texture as `texture`
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`gfx_set_texture_image(gfx, format, size, width, texture)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| gfx | `Pointer` <`Gfx`> |
|
||||||
|
| format | `integer` |
|
||||||
|
| size | `integer` |
|
||||||
|
| width | `integer` |
|
||||||
|
| texture | `Pointer` <`integer`> |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- None
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`void gfx_set_texture_image(Gfx* gfx, u32 format, u32 size, u32 width, u8* texture);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [set_fog_color](#set_fog_color)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Sets a value of the global fog color
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`set_fog_color(index, value)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| index | `integer` |
|
||||||
|
| value | `integer` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- None
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`void set_fog_color(u8 index, u8 value);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [set_fog_intensity](#set_fog_intensity)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Sets the intensity of the fog (this value scales very quickly, 1.0 to 1.1 is a desirable range)
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`set_fog_intensity(intensity)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| intensity | `number` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- None
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`void set_fog_intensity(f32 intensity);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [set_lighting_color](#set_lighting_color)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Sets a value of the global lighting color
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`set_lighting_color(index, value)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| index | `integer` |
|
||||||
|
| value | `integer` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- None
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`void set_lighting_color(u8 index, u8 value);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [set_lighting_color_ambient](#set_lighting_color_ambient)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Sets a value of the global lighting color (run this after `set_lighting_color` for the ambient color to not be overriden)
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`set_lighting_color_ambient(index, value)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| index | `integer` |
|
||||||
|
| value | `integer` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- None
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`void set_lighting_color_ambient(u8 index, u8 value);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [set_lighting_dir](#set_lighting_dir)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Sets a value of the global lighting direction
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`set_lighting_dir(index, value)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| index | `integer` |
|
||||||
|
| value | `number` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- None
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`void set_lighting_dir(u8 index, f32 value);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [set_override_far](#set_override_far)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Sets the override far plane
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`set_override_far(far)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| far | `number` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- None
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`void set_override_far(f32 far);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [set_override_fov](#set_override_fov)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Sets the override FOV
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`set_override_fov(fov)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| fov | `number` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- None
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`void set_override_fov(f32 fov);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [set_override_near](#set_override_near)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Sets the override near plane
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`set_override_near(near)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| near | `number` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- None
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`void set_override_near(f32 near);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [set_override_skybox](#set_override_skybox)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Sets the override skybox
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`set_override_skybox(background)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| background | `integer` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- None
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`void set_override_skybox(s8 background);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [set_skybox_color](#set_skybox_color)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Sets a value of the global skybox color
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`set_skybox_color(index, value)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| index | `integer` |
|
||||||
|
| value | `integer` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- None
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`void set_skybox_color(u8 index, u8 value);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
## [set_vertex_color](#set_vertex_color)
|
||||||
|
|
||||||
|
### Description
|
||||||
|
Sets a value of the global vertex shading color
|
||||||
|
|
||||||
|
### Lua Example
|
||||||
|
`set_vertex_color(index, value)`
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
| Field | Type |
|
||||||
|
| ----- | ---- |
|
||||||
|
| index | `integer` |
|
||||||
|
| value | `integer` |
|
||||||
|
|
||||||
|
### Returns
|
||||||
|
- None
|
||||||
|
|
||||||
|
### C Prototype
|
||||||
|
`void set_vertex_color(u8 index, u8 value);`
|
||||||
|
|
||||||
|
[:arrow_up_small:](#)
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
---
|
---
|
||||||
# functions from smlua_level_utils.h
|
# functions from smlua_level_utils.h
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1658,10 +1658,10 @@
|
||||||
- smlua_camera_utils.h
|
- smlua_camera_utils.h
|
||||||
- [camera_allow_toxic_gas_camera](functions-5.md#camera_allow_toxic_gas_camera)
|
- [camera_allow_toxic_gas_camera](functions-5.md#camera_allow_toxic_gas_camera)
|
||||||
- [camera_config_enable_analog_cam](functions-5.md#camera_config_enable_analog_cam)
|
- [camera_config_enable_analog_cam](functions-5.md#camera_config_enable_analog_cam)
|
||||||
- [camera_config_enable_camera_collisions](functions-5.md#camera_config_enable_camera_collisions)
|
|
||||||
- [camera_config_enable_centering](functions-5.md#camera_config_enable_centering)
|
- [camera_config_enable_centering](functions-5.md#camera_config_enable_centering)
|
||||||
|
- [camera_config_enable_collisions](functions-5.md#camera_config_enable_collisions)
|
||||||
|
- [camera_config_enable_dpad](functions-5.md#camera_config_enable_dpad)
|
||||||
- [camera_config_enable_free_cam](functions-5.md#camera_config_enable_free_cam)
|
- [camera_config_enable_free_cam](functions-5.md#camera_config_enable_free_cam)
|
||||||
- [camera_config_enable_freecam_dpad](functions-5.md#camera_config_enable_freecam_dpad)
|
|
||||||
- [camera_config_enable_mouse_look](functions-5.md#camera_config_enable_mouse_look)
|
- [camera_config_enable_mouse_look](functions-5.md#camera_config_enable_mouse_look)
|
||||||
- [camera_config_get_aggression](functions-5.md#camera_config_get_aggression)
|
- [camera_config_get_aggression](functions-5.md#camera_config_get_aggression)
|
||||||
- [camera_config_get_centering](functions-5.md#camera_config_get_centering)
|
- [camera_config_get_centering](functions-5.md#camera_config_get_centering)
|
||||||
|
|
@ -1672,9 +1672,9 @@
|
||||||
- [camera_config_invert_x](functions-5.md#camera_config_invert_x)
|
- [camera_config_invert_x](functions-5.md#camera_config_invert_x)
|
||||||
- [camera_config_invert_y](functions-5.md#camera_config_invert_y)
|
- [camera_config_invert_y](functions-5.md#camera_config_invert_y)
|
||||||
- [camera_config_is_analog_cam_enabled](functions-5.md#camera_config_is_analog_cam_enabled)
|
- [camera_config_is_analog_cam_enabled](functions-5.md#camera_config_is_analog_cam_enabled)
|
||||||
|
- [camera_config_is_collision_enabled](functions-5.md#camera_config_is_collision_enabled)
|
||||||
|
- [camera_config_is_dpad_enabled](functions-5.md#camera_config_is_dpad_enabled)
|
||||||
- [camera_config_is_free_cam_enabled](functions-5.md#camera_config_is_free_cam_enabled)
|
- [camera_config_is_free_cam_enabled](functions-5.md#camera_config_is_free_cam_enabled)
|
||||||
- [camera_config_is_free_camera_collision_enabled](functions-5.md#camera_config_is_free_camera_collision_enabled)
|
|
||||||
- [camera_config_is_freecam_dpad_enabled](functions-5.md#camera_config_is_freecam_dpad_enabled)
|
|
||||||
- [camera_config_is_mouse_look_enabled](functions-5.md#camera_config_is_mouse_look_enabled)
|
- [camera_config_is_mouse_look_enabled](functions-5.md#camera_config_is_mouse_look_enabled)
|
||||||
- [camera_config_is_x_inverted](functions-5.md#camera_config_is_x_inverted)
|
- [camera_config_is_x_inverted](functions-5.md#camera_config_is_x_inverted)
|
||||||
- [camera_config_is_y_inverted](functions-5.md#camera_config_is_y_inverted)
|
- [camera_config_is_y_inverted](functions-5.md#camera_config_is_y_inverted)
|
||||||
|
|
@ -1728,29 +1728,29 @@
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
- smlua_gfx_utils.h
|
- smlua_gfx_utils.h
|
||||||
- [get_fog_color](functions-5.md#get_fog_color)
|
- [get_fog_color](functions-6.md#get_fog_color)
|
||||||
- [get_fog_intensity](functions-5.md#get_fog_intensity)
|
- [get_fog_intensity](functions-6.md#get_fog_intensity)
|
||||||
- [get_lighting_color](functions-5.md#get_lighting_color)
|
- [get_lighting_color](functions-6.md#get_lighting_color)
|
||||||
- [get_lighting_color_ambient](functions-5.md#get_lighting_color_ambient)
|
- [get_lighting_color_ambient](functions-6.md#get_lighting_color_ambient)
|
||||||
- [get_lighting_dir](functions-5.md#get_lighting_dir)
|
- [get_lighting_dir](functions-6.md#get_lighting_dir)
|
||||||
- [get_skybox](functions-5.md#get_skybox)
|
- [get_skybox](functions-6.md#get_skybox)
|
||||||
- [get_skybox_color](functions-5.md#get_skybox_color)
|
- [get_skybox_color](functions-6.md#get_skybox_color)
|
||||||
- [get_vertex_color](functions-5.md#get_vertex_color)
|
- [get_vertex_color](functions-6.md#get_vertex_color)
|
||||||
- [gfx_get_vtx](functions-5.md#gfx_get_vtx)
|
- [gfx_get_vtx](functions-6.md#gfx_get_vtx)
|
||||||
- [gfx_parse](functions-5.md#gfx_parse)
|
- [gfx_parse](functions-6.md#gfx_parse)
|
||||||
- [gfx_set_combine_lerp](functions-5.md#gfx_set_combine_lerp)
|
- [gfx_set_combine_lerp](functions-6.md#gfx_set_combine_lerp)
|
||||||
- [gfx_set_texture_image](functions-5.md#gfx_set_texture_image)
|
- [gfx_set_texture_image](functions-6.md#gfx_set_texture_image)
|
||||||
- [set_fog_color](functions-5.md#set_fog_color)
|
- [set_fog_color](functions-6.md#set_fog_color)
|
||||||
- [set_fog_intensity](functions-5.md#set_fog_intensity)
|
- [set_fog_intensity](functions-6.md#set_fog_intensity)
|
||||||
- [set_lighting_color](functions-5.md#set_lighting_color)
|
- [set_lighting_color](functions-6.md#set_lighting_color)
|
||||||
- [set_lighting_color_ambient](functions-5.md#set_lighting_color_ambient)
|
- [set_lighting_color_ambient](functions-6.md#set_lighting_color_ambient)
|
||||||
- [set_lighting_dir](functions-5.md#set_lighting_dir)
|
- [set_lighting_dir](functions-6.md#set_lighting_dir)
|
||||||
- [set_override_far](functions-5.md#set_override_far)
|
- [set_override_far](functions-6.md#set_override_far)
|
||||||
- [set_override_fov](functions-5.md#set_override_fov)
|
- [set_override_fov](functions-6.md#set_override_fov)
|
||||||
- [set_override_near](functions-5.md#set_override_near)
|
- [set_override_near](functions-6.md#set_override_near)
|
||||||
- [set_override_skybox](functions-5.md#set_override_skybox)
|
- [set_override_skybox](functions-6.md#set_override_skybox)
|
||||||
- [set_skybox_color](functions-5.md#set_skybox_color)
|
- [set_skybox_color](functions-6.md#set_skybox_color)
|
||||||
- [set_vertex_color](functions-5.md#set_vertex_color)
|
- [set_vertex_color](functions-6.md#set_vertex_color)
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,6 @@ ROMHACK_CAMERA_COLLISION = "Kolize kamery"
|
||||||
ROMHACK_CAMERA_L_CENTERING = "L Centrování"
|
ROMHACK_CAMERA_L_CENTERING = "L Centrování"
|
||||||
ROMHACK_CAMERA_USE_DPAD = "Chování DPadu"
|
ROMHACK_CAMERA_USE_DPAD = "Chování DPadu"
|
||||||
ROMHACK_CAMERA_SLOW_FALL = "Pomalý pád"
|
ROMHACK_CAMERA_SLOW_FALL = "Pomalý pád"
|
||||||
ROMHACK_CAMERA_ZOOMED_IN_DIST = "Přiblížená vzdálenost"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_OUT_DIST = "Zvětšená vzdálenost“"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_IN_HEIGHT = "Přiblížená výška"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_OUT_HEIGHT = "Zvětšená výška"
|
|
||||||
CAMERA_TOXIC_GAS = "Nastavení pro toxický plyn"
|
CAMERA_TOXIC_GAS = "Nastavení pro toxický plyn"
|
||||||
MOUSE_LOOK = "Myš pro ovládání kamery"
|
MOUSE_LOOK = "Myš pro ovládání kamery"
|
||||||
INVERT_X = "Převrátit X"
|
INVERT_X = "Převrátit X"
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,6 @@ ROMHACK_CAMERA_COLLISION = "Camera botsingen"
|
||||||
ROMHACK_CAMERA_L_CENTERING = "L-centrering"
|
ROMHACK_CAMERA_L_CENTERING = "L-centrering"
|
||||||
ROMHACK_CAMERA_USE_DPAD = "DPad gedrag"
|
ROMHACK_CAMERA_USE_DPAD = "DPad gedrag"
|
||||||
ROMHACK_CAMERA_SLOW_FALL = "Langzame val"
|
ROMHACK_CAMERA_SLOW_FALL = "Langzame val"
|
||||||
ROMHACK_CAMERA_ZOOMED_IN_DIST = "Ingezoomde afstand"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_OUT_DIST = "Uitzoom afstand"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_IN_HEIGHT = "Ingezoomde hoogte"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_OUT_HEIGHT = "Uitzoomhoogte"
|
|
||||||
CAMERA_TOXIC_GAS = "Aanpassen voor giftig gas"
|
CAMERA_TOXIC_GAS = "Aanpassen voor giftig gas"
|
||||||
MOUSE_LOOK = "Muis Camera"
|
MOUSE_LOOK = "Muis Camera"
|
||||||
INVERT_X = "Keer X om"
|
INVERT_X = "Keer X om"
|
||||||
|
|
|
||||||
|
|
@ -71,23 +71,19 @@ FREE_CAMERA = "Free Camera"
|
||||||
ANALOG_CAMERA = "Analog Camera"
|
ANALOG_CAMERA = "Analog Camera"
|
||||||
FREE_CAMERA_TITLE = "FREE CAMERA"
|
FREE_CAMERA_TITLE = "FREE CAMERA"
|
||||||
FREE_CAMERA_L_CENTERING = "L Centering"
|
FREE_CAMERA_L_CENTERING = "L Centering"
|
||||||
FREE_CAMERA_USE_DPAD = "DPad Behavior"
|
FREE_CAMERA_USE_DPAD = "D-Pad Behavior"
|
||||||
FREE_CAMERA_COLLISION = "Camera Collisions"
|
FREE_CAMERA_COLLISION = "Camera Collision"
|
||||||
ROMHACK_CAMERA_TITLE = "ROMHACK\nCAMERA"
|
ROMHACK_CAMERA_TITLE = "ROMHACK\nCAMERA"
|
||||||
ROMHACK_CAMERA = "Romhack Camera"
|
ROMHACK_CAMERA = "Romhack Camera"
|
||||||
ROMHACK_CAMERA_AUTOMATIC = "Automatic"
|
ROMHACK_CAMERA_AUTOMATIC = "Automatic"
|
||||||
ROMHACK_CAMERA_ON = "On"
|
ROMHACK_CAMERA_ON = "On"
|
||||||
ROMHACK_CAMERA_Off = "Off"
|
ROMHACK_CAMERA_Off = "Off"
|
||||||
ROMHACK_CAMERA_IN_BOWSER = "Use in Bowser fights"
|
ROMHACK_CAMERA_IN_BOWSER = "Use In Bowser Fights"
|
||||||
ROMHACK_CAMERA_COLLISION = "Camera Collisions"
|
ROMHACK_CAMERA_COLLISION = "Camera Collision"
|
||||||
ROMHACK_CAMERA_L_CENTERING = "L Centering"
|
ROMHACK_CAMERA_L_CENTERING = "L Centering"
|
||||||
ROMHACK_CAMERA_USE_DPAD = "DPad Behavior"
|
ROMHACK_CAMERA_USE_DPAD = "D-Pad Behavior"
|
||||||
ROMHACK_CAMERA_SLOW_FALL = "Slow Fall"
|
ROMHACK_CAMERA_SLOW_FALL = "Slow Fall"
|
||||||
ROMHACK_CAMERA_ZOOMED_IN_DIST = "Zoomed In Distance"
|
CAMERA_TOXIC_GAS = "Adjust For Toxic Gas"
|
||||||
ROMHACK_CAMERA_ZOOMED_OUT_DIST = "Zoomed Out Distance"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_IN_HEIGHT = "Zoomed In Height"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_OUT_HEIGHT = "Zoomed Out Height"
|
|
||||||
CAMERA_TOXIC_GAS = "Adjust for toxic gas"
|
|
||||||
MOUSE_LOOK = "Mouse Look"
|
MOUSE_LOOK = "Mouse Look"
|
||||||
INVERT_X = "Invert X"
|
INVERT_X = "Invert X"
|
||||||
INVERT_Y = "Invert Y"
|
INVERT_Y = "Invert Y"
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,6 @@ ROMHACK_CAMERA_COLLISION = "Collisions de caméra"
|
||||||
ROMHACK_CAMERA_L_CENTERING = "Centrage en L"
|
ROMHACK_CAMERA_L_CENTERING = "Centrage en L"
|
||||||
ROMHACK_CAMERA_USE_DPAD = "Comportement du DPAD"
|
ROMHACK_CAMERA_USE_DPAD = "Comportement du DPAD"
|
||||||
ROMHACK_CAMERA_SLOW_FALL = "Chute lente"
|
ROMHACK_CAMERA_SLOW_FALL = "Chute lente"
|
||||||
ROMHACK_CAMERA_ZOOMED_IN_DIST = "Distance zoomée"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_OUT_DIST = "Distance zoomée"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_IN_HEIGHT = "Hauteur du zoom avant"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_OUT_HEIGHT = "Hauteur du zoom arrière"
|
|
||||||
CAMERA_TOXIC_GAS = "Ajustement pour les gaz toxiques"
|
CAMERA_TOXIC_GAS = "Ajustement pour les gaz toxiques"
|
||||||
MOUSE_LOOK = "Souris comme Caméra"
|
MOUSE_LOOK = "Souris comme Caméra"
|
||||||
INVERT_X = "Inverser l'axe X"
|
INVERT_X = "Inverser l'axe X"
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,6 @@ ROMHACK_CAMERA_COLLISION = "Kamerakollisionen"
|
||||||
ROMHACK_CAMERA_L_CENTERING = "L-Zentrierung"
|
ROMHACK_CAMERA_L_CENTERING = "L-Zentrierung"
|
||||||
ROMHACK_CAMERA_USE_DPAD = "DPad-Verhalten"
|
ROMHACK_CAMERA_USE_DPAD = "DPad-Verhalten"
|
||||||
ROMHACK_CAMERA_SLOW_FALL = "Langsamer Fall"
|
ROMHACK_CAMERA_SLOW_FALL = "Langsamer Fall"
|
||||||
ROMHACK_CAMERA_ZOOMED_IN_DIST = "Vergrößerter Abstand"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_OUT_DIST = "Herausgezoomte Entfernung"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_IN_HEIGHT = "Vergrößerte Höhe"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_OUT_HEIGHT = "Herausgezoomte Höhe"
|
|
||||||
CAMERA_TOXIC_GAS = "Einstellung für giftige Gase"
|
CAMERA_TOXIC_GAS = "Einstellung für giftige Gase"
|
||||||
MOUSE_LOOK = "Mausansicht"
|
MOUSE_LOOK = "Mausansicht"
|
||||||
INVERT_X = "X invertieren"
|
INVERT_X = "X invertieren"
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,6 @@ ROMHACK_CAMERA_COLLISION = "Collisioni della telecamera"
|
||||||
ROMHACK_CAMERA_L_CENTERING = "Centratura a L"
|
ROMHACK_CAMERA_L_CENTERING = "Centratura a L"
|
||||||
ROMHACK_CAMERA_USE_DPAD = "Comportamento del DPad"
|
ROMHACK_CAMERA_USE_DPAD = "Comportamento del DPad"
|
||||||
ROMHACK_CAMERA_SLOW_FALL = "Caduta lenta"
|
ROMHACK_CAMERA_SLOW_FALL = "Caduta lenta"
|
||||||
ROMHACK_CAMERA_ZOOMED_IN_DIST = "Distanza zoomata"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_OUT_DIST = "Distanza ingrandita"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_IN_HEIGHT = "Altezza ingrandita"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_OUT_HEIGHT = "Altezza ingrandimento"
|
|
||||||
CAMERA_TOXIC_GAS = "Regola per i gas tossici"
|
CAMERA_TOXIC_GAS = "Regola per i gas tossici"
|
||||||
MOUSE_LOOK = "Telecamera con mouse"
|
MOUSE_LOOK = "Telecamera con mouse"
|
||||||
INVERT_X = "Inverti X"
|
INVERT_X = "Inverti X"
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,6 @@ ROMHACK_CAMERA_COLLISION = "カメラの衝突"
|
||||||
ROMHACK_CAMERA_L_CENTERING = "Lセンタリング"
|
ROMHACK_CAMERA_L_CENTERING = "Lセンタリング"
|
||||||
ROMHACK_CAMERA_USE_DPAD = "DPad の動作"
|
ROMHACK_CAMERA_USE_DPAD = "DPad の動作"
|
||||||
ROMHACK_CAMERA_SLOW_FALL = "スローフォール"
|
ROMHACK_CAMERA_SLOW_FALL = "スローフォール"
|
||||||
ROMHACK_CAMERA_ZOOMED_IN_DIST = "ズームイン距離"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_OUT_DIST = "ズームアウトした距離"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_IN_HEIGHT = "ズームした高さ"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_OUT_HEIGHT = "ズームアウトした高さ"
|
|
||||||
CAMERA_TOXIC_GAS = "有毒ガスの調整"
|
CAMERA_TOXIC_GAS = "有毒ガスの調整"
|
||||||
MOUSE_LOOK = "マウスでの操作"
|
MOUSE_LOOK = "マウスでの操作"
|
||||||
INVERT_X = "X方向のカメラ反転"
|
INVERT_X = "X方向のカメラ反転"
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,6 @@ ROMHACK_CAMERA_COLLISION = "Kolizje kamery"
|
||||||
ROMHACK_CAMERA_L_CENTERING = "Wyśrodkowanie L"
|
ROMHACK_CAMERA_L_CENTERING = "Wyśrodkowanie L"
|
||||||
ROMHACK_CAMERA_USE_DPAD = "Zachowanie DPada"
|
ROMHACK_CAMERA_USE_DPAD = "Zachowanie DPada"
|
||||||
ROMHACK_CAMERA_SLOW_FALL = "Powolne opadanie"
|
ROMHACK_CAMERA_SLOW_FALL = "Powolne opadanie"
|
||||||
ROMHACK_CAMERA_ZOOMED_IN_DIST = "Powiększona odległość"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_OUT_DIST = "Powiększona odległość"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_IN_HEIGHT = "Powiększona wysokość"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_OUT_HEIGHT = "Powiększona wysokość"
|
|
||||||
CAMERA_TOXIC_GAS = "Dostosuj dla toksycznego gazu"
|
CAMERA_TOXIC_GAS = "Dostosuj dla toksycznego gazu"
|
||||||
MOUSE_LOOK = "Patrzenie Myszą"
|
MOUSE_LOOK = "Patrzenie Myszą"
|
||||||
INVERT_X = "Odwróć Oś X"
|
INVERT_X = "Odwróć Oś X"
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,6 @@ ROMHACK_CAMERA_COLLISION = "Colisões da câmera"
|
||||||
ROMHACK_CAMERA_L_CENTERING = "Centralizar com L"
|
ROMHACK_CAMERA_L_CENTERING = "Centralizar com L"
|
||||||
ROMHACK_CAMERA_USE_DPAD = "Usar D-Pad"
|
ROMHACK_CAMERA_USE_DPAD = "Usar D-Pad"
|
||||||
ROMHACK_CAMERA_SLOW_FALL = "Queda lenta"
|
ROMHACK_CAMERA_SLOW_FALL = "Queda lenta"
|
||||||
ROMHACK_CAMERA_ZOOMED_IN_DIST = "Distância do zoom aumentado"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_OUT_DIST = "Distância do zoom reduzido"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_IN_HEIGHT = "Altura do zoom aumentado"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_OUT_HEIGHT = "Altura do zoom reduzido"
|
|
||||||
CAMERA_TOXIC_GAS = "Ajustar em gás tóxico"
|
CAMERA_TOXIC_GAS = "Ajustar em gás tóxico"
|
||||||
MOUSE_LOOK = "Movimento com mouse"
|
MOUSE_LOOK = "Movimento com mouse"
|
||||||
INVERT_X = "Inverter eixo X"
|
INVERT_X = "Inverter eixo X"
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,6 @@ ROMHACK_CAMERA_COLLISION = "Коллизии камеры"
|
||||||
ROMHACK_CAMERA_L_CENTERING = "Центрирование L"
|
ROMHACK_CAMERA_L_CENTERING = "Центрирование L"
|
||||||
ROMHACK_CAMERA_USE_DPAD = "Поведение DPad"
|
ROMHACK_CAMERA_USE_DPAD = "Поведение DPad"
|
||||||
ROMHACK_CAMERA_SLOW_FALL = "Медленное падение"
|
ROMHACK_CAMERA_SLOW_FALL = "Медленное падение"
|
||||||
ROMHACK_CAMERA_ZOOMED_IN_DIST = "Расстояние приближения"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_OUT_DIST = "Увеличенное расстояние"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_IN_HEIGHT = "Увеличенная высота"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_OUT_HEIGHT = "Высота уменьшенного изображения"
|
|
||||||
CAMERA_TOXIC_GAS = "Настроить на токсичный газ"
|
CAMERA_TOXIC_GAS = "Настроить на токсичный газ"
|
||||||
MOUSE_LOOK = "Использовать мышь"
|
MOUSE_LOOK = "Использовать мышь"
|
||||||
INVERT_X = "Инвертировать X"
|
INVERT_X = "Инвертировать X"
|
||||||
|
|
|
||||||
|
|
@ -83,10 +83,6 @@ ROMHACK_CAMERA_COLLISION = "Colisiones de cámara"
|
||||||
ROMHACK_CAMERA_L_CENTERING = "Centrado L"
|
ROMHACK_CAMERA_L_CENTERING = "Centrado L"
|
||||||
ROMHACK_CAMERA_USE_DPAD = "Comportamiento del DPad"
|
ROMHACK_CAMERA_USE_DPAD = "Comportamiento del DPad"
|
||||||
ROMHACK_CAMERA_SLOW_FALL = "Caída lenta"
|
ROMHACK_CAMERA_SLOW_FALL = "Caída lenta"
|
||||||
ROMHACK_CAMERA_ZOOMED_IN_DIST = "Distancia ampliada"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_OUT_DIST = "Distancia de alejamiento"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_IN_HEIGHT = "Altura ampliada"
|
|
||||||
ROMHACK_CAMERA_ZOOMED_OUT_HEIGHT = "Altura de reducción"
|
|
||||||
CAMERA_TOXIC_GAS = "Ajuste para gases tóxicos"
|
CAMERA_TOXIC_GAS = "Ajuste para gases tóxicos"
|
||||||
MOUSE_LOOK = "Movimiento con mouse"
|
MOUSE_LOOK = "Movimiento con mouse"
|
||||||
INVERT_X = "Invertir eje X"
|
INVERT_X = "Invertir eje X"
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,4 @@ extern s16 newcam_analogue;
|
||||||
extern u16 newcam_intendedmode;
|
extern u16 newcam_intendedmode;
|
||||||
|
|
||||||
extern u16 newcam_mode;
|
extern u16 newcam_mode;
|
||||||
extern s16 newcam_yaw;
|
extern s16 newcam_yaw;
|
||||||
|
|
||||||
extern u8 gFreeCameraUseDpad;
|
|
||||||
extern u8 gFreeCameraHasCollision;
|
|
||||||
|
|
@ -119,10 +119,10 @@ u16 newcam_modeflags;
|
||||||
s16 newcam_saved_mode = -1;
|
s16 newcam_saved_mode = -1;
|
||||||
s16 newcam_saved_defmode = -1;
|
s16 newcam_saved_defmode = -1;
|
||||||
|
|
||||||
u8 gFreeCameraUseDpad = FALSE;
|
u8 newcam_use_dpad = FALSE;
|
||||||
u8 gFreeCameraHasCollision = TRUE;
|
u8 newcam_has_collision = TRUE;
|
||||||
u8 sFreeCameraDirectionLocked = FALSE;
|
u8 newcam_direction_locked = FALSE;
|
||||||
u8 sFreeCameraLCentering = TRUE;
|
u8 newcam_l_centering = TRUE;
|
||||||
|
|
||||||
extern bool gDjuiInMainMenu;
|
extern bool gDjuiInMainMenu;
|
||||||
|
|
||||||
|
|
@ -200,9 +200,9 @@ void newcam_init_settings(void) {
|
||||||
newcam_mouse = (u8)camera_config_is_mouse_look_enabled();
|
newcam_mouse = (u8)camera_config_is_mouse_look_enabled();
|
||||||
newcam_analogue = (s16)camera_config_is_analog_cam_enabled();
|
newcam_analogue = (s16)camera_config_is_analog_cam_enabled();
|
||||||
newcam_degrade = (f32)camera_config_get_deceleration();
|
newcam_degrade = (f32)camera_config_get_deceleration();
|
||||||
gFreeCameraUseDpad = (u8)camera_config_is_freecam_dpad_enabled();
|
newcam_use_dpad = (u8)camera_config_is_dpad_enabled();
|
||||||
gFreeCameraHasCollision = (u8)camera_config_is_free_camera_collision_enabled();
|
newcam_has_collision = (u8)camera_config_is_collision_enabled();
|
||||||
sFreeCameraLCentering = (u8)camera_config_get_centering();
|
newcam_l_centering = (u8)camera_config_get_centering();
|
||||||
|
|
||||||
// setup main menu camera
|
// setup main menu camera
|
||||||
if (gDjuiInMainMenu) { newcam_tilt = 5; }
|
if (gDjuiInMainMenu) { newcam_tilt = 5; }
|
||||||
|
|
@ -220,9 +220,9 @@ void newcam_init_settings_override(bool override) {
|
||||||
newcam_mouse = (u8)camera_config_is_mouse_look_enabled();
|
newcam_mouse = (u8)camera_config_is_mouse_look_enabled();
|
||||||
newcam_analogue = (s16)camera_config_is_analog_cam_enabled();
|
newcam_analogue = (s16)camera_config_is_analog_cam_enabled();
|
||||||
newcam_degrade = (f32)camera_config_get_deceleration();
|
newcam_degrade = (f32)camera_config_get_deceleration();
|
||||||
gFreeCameraUseDpad = (u8)camera_config_is_freecam_dpad_enabled();
|
newcam_use_dpad = (u8)camera_config_is_dpad_enabled();
|
||||||
gFreeCameraHasCollision = (u8)camera_config_is_free_camera_collision_enabled();
|
newcam_has_collision = (u8)camera_config_is_collision_enabled();
|
||||||
sFreeCameraLCentering = (u8)camera_config_get_centering();
|
newcam_l_centering = (u8)camera_config_get_centering();
|
||||||
|
|
||||||
// setup main menu camera
|
// setup main menu camera
|
||||||
if (gDjuiInMainMenu) { newcam_tilt = 5; }
|
if (gDjuiInMainMenu) { newcam_tilt = 5; }
|
||||||
|
|
@ -414,14 +414,14 @@ static void newcam_rotate_button(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((newcam_mouse == 1) && !gDjuiInMainMenu && !gDjuiChatBoxFocus && !gDjuiConsoleFocus) {
|
if ((newcam_mouse == 1) && !gDjuiInMainMenu && !gDjuiChatBoxFocus && !gDjuiConsoleFocus) {
|
||||||
if (!gFreeCameraUseDpad || !sFreeCameraDirectionLocked) {
|
if (!newcam_use_dpad || !newcam_direction_locked) {
|
||||||
newcam_yaw += ivrt(0) * mouse_x * 16;
|
newcam_yaw += ivrt(0) * mouse_x * 16;
|
||||||
}
|
}
|
||||||
newcam_tilt += ivrt(1) * mouse_y * 16;
|
newcam_tilt += ivrt(1) * mouse_y * 16;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dpad behaviors
|
// Dpad behaviors
|
||||||
if (gFreeCameraUseDpad) {
|
if (newcam_use_dpad) {
|
||||||
// Make dpad up head to the nearest cardinal direction
|
// Make dpad up head to the nearest cardinal direction
|
||||||
if (gPlayer1Controller->buttonPressed & U_JPAD) {
|
if (gPlayer1Controller->buttonPressed & U_JPAD) {
|
||||||
newcam_yaw = snap_to_45_degrees(newcam_yaw);
|
newcam_yaw = snap_to_45_degrees(newcam_yaw);
|
||||||
|
|
@ -431,11 +431,11 @@ static void newcam_rotate_button(void) {
|
||||||
else if (gPlayer1Controller->buttonPressed & R_JPAD) { newcam_yaw -= ivrt(0)*DEGREES(45); }
|
else if (gPlayer1Controller->buttonPressed & R_JPAD) { newcam_yaw -= ivrt(0)*DEGREES(45); }
|
||||||
// Make dpad down lock the current camera direction
|
// Make dpad down lock the current camera direction
|
||||||
else if (gPlayer1Controller->buttonPressed & D_JPAD) {
|
else if (gPlayer1Controller->buttonPressed & D_JPAD) {
|
||||||
sFreeCameraDirectionLocked = !sFreeCameraDirectionLocked;
|
newcam_direction_locked = !newcam_direction_locked;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gFreeCameraUseDpad && sFreeCameraDirectionLocked) {
|
if (newcam_use_dpad && newcam_direction_locked) {
|
||||||
newcam_yaw_acc = prevNewcamYaw;
|
newcam_yaw_acc = prevNewcamYaw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -459,7 +459,7 @@ static void newcam_zoom_button(void) {
|
||||||
newcam_distance = newcam_distance_target;
|
newcam_distance = newcam_distance_target;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sFreeCameraLCentering && (gPlayer1Controller->buttonDown & L_TRIG) && (newcam_modeflags & NC_FLAG_ZOOM)) {
|
if (newcam_l_centering && (gPlayer1Controller->buttonDown & L_TRIG) && (newcam_modeflags & NC_FLAG_ZOOM)) {
|
||||||
//When you press L, set the flag for centering the camera. Afterwards, start setting the yaw to the Player's yaw at the time.
|
//When you press L, set the flag for centering the camera. Afterwards, start setting the yaw to the Player's yaw at the time.
|
||||||
newcam_yaw_target = -gMarioStates[0].faceAngle[1]-0x4000;
|
newcam_yaw_target = -gMarioStates[0].faceAngle[1]-0x4000;
|
||||||
newcam_centering = 1;
|
newcam_centering = 1;
|
||||||
|
|
@ -725,7 +725,7 @@ static void newcam_position_cam(void) {
|
||||||
newcam_lookat[2] = newcam_pos_target[2]-newcam_pan_z;
|
newcam_lookat[2] = newcam_pos_target[2]-newcam_pan_z;
|
||||||
|
|
||||||
newcam_level_bounds();
|
newcam_level_bounds();
|
||||||
if (gFreeCameraHasCollision && newcam_modeflags & NC_FLAG_COLLISION) {
|
if (newcam_has_collision && newcam_modeflags & NC_FLAG_COLLISION) {
|
||||||
newcam_collision();
|
newcam_collision();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12210,13 +12210,13 @@ void romhack_camera_init_settings(void) {
|
||||||
gCameraUseCourseSpecificSettings = (override == RCO_DISABLE && dynos_level_is_vanilla_level(gCurrLevelNum));
|
gCameraUseCourseSpecificSettings = (override == RCO_DISABLE && dynos_level_is_vanilla_level(gCurrLevelNum));
|
||||||
gRomhackCameraSettings.collisions = configRomhackCameraHasCollision;
|
gRomhackCameraSettings.collisions = configRomhackCameraHasCollision;
|
||||||
gRomhackCameraSettings.centering = configRomhackCameraHasCentering;
|
gRomhackCameraSettings.centering = configRomhackCameraHasCentering;
|
||||||
gRomhackCameraSettings.dpad = configRomhackCameraDpadBehavior;
|
gRomhackCameraSettings.dpad = configRomhackCameraDPadBehavior;
|
||||||
gOverrideAllowToxicGasCamera = configCameraToxicGas;
|
gOverrideAllowToxicGasCamera = configCameraToxicGas;
|
||||||
gRomhackCameraSettings.slowFall = configRomhackCameraSlowFall;
|
gRomhackCameraSettings.slowFall = configRomhackCameraSlowFall;
|
||||||
gRomhackCameraSettings.zoomedInDist = configRomhackCameraZoomedInDist;
|
gRomhackCameraSettings.zoomedInDist = 900;
|
||||||
gRomhackCameraSettings.zoomedOutDist = configRomhackCameraZoomedOutDist;
|
gRomhackCameraSettings.zoomedOutDist = 1400;
|
||||||
gRomhackCameraSettings.zoomedInHeight = configRomhackCameraZoomedInHeight;
|
gRomhackCameraSettings.zoomedInHeight = 300;
|
||||||
gRomhackCameraSettings.zoomedOutHeight = configRomhackCameraZoomedOutHeight;
|
gRomhackCameraSettings.zoomedOutHeight = 450;
|
||||||
}
|
}
|
||||||
|
|
||||||
static u8 rom_hack_cam_can_see_mario(Vec3f desiredPos) {
|
static u8 rom_hack_cam_can_see_mario(Vec3f desiredPos) {
|
||||||
|
|
|
||||||
|
|
@ -129,29 +129,26 @@ bool configUseStandardKeyBindingsChat = false;
|
||||||
bool configEnableFreeCamera = false;
|
bool configEnableFreeCamera = false;
|
||||||
bool configFreeCameraAnalog = false;
|
bool configFreeCameraAnalog = false;
|
||||||
bool configFreeCameraLCentering = false;
|
bool configFreeCameraLCentering = false;
|
||||||
bool configFreeCameraDpadBehavior = false;
|
bool configFreeCameraDPadBehavior = false;
|
||||||
bool configFreeCameraHasCollision = true;
|
bool configFreeCameraHasCollision = true;
|
||||||
bool configCameraMouse = false;
|
bool configFreeCameraMouse = false;
|
||||||
unsigned int configCameraXSens = 50;
|
unsigned int configFreeCameraXSens = 50;
|
||||||
unsigned int configCameraYSens = 50;
|
unsigned int configFreeCameraYSens = 50;
|
||||||
unsigned int configCameraAggr = 0;
|
unsigned int configFreeCameraAggr = 0;
|
||||||
unsigned int configCameraPan = 0;
|
unsigned int configFreeCameraPan = 0;
|
||||||
unsigned int configCameraDegrade = 50; // 0 - 100%
|
unsigned int configFreeCameraDegrade = 50; // 0 - 100%
|
||||||
// romhack camera settings
|
// romhack camera settings
|
||||||
unsigned int configEnableRomhackCamera = 0; // 0 for automatic, 1 for force on, 2 for force off
|
unsigned int configEnableRomhackCamera = 0; // 0 for automatic, 1 for force on, 2 for force off
|
||||||
bool configRomhackCameraBowserFights = false;
|
bool configRomhackCameraBowserFights = false;
|
||||||
bool configRomhackCameraHasCollision = false;
|
bool configRomhackCameraHasCollision = false;
|
||||||
bool configRomhackCameraHasCentering = false;
|
bool configRomhackCameraHasCentering = false;
|
||||||
bool configRomhackCameraDpadBehavior = false;
|
bool configRomhackCameraDPadBehavior = false;
|
||||||
bool configRomhackCameraSlowFall = true;
|
bool configRomhackCameraSlowFall = true;
|
||||||
bool configCameraToxicGas = true;
|
|
||||||
unsigned int configRomhackCameraZoomedInDist = 900;
|
|
||||||
unsigned int configRomhackCameraZoomedOutDist = 1400;
|
|
||||||
unsigned int configRomhackCameraZoomedInHeight = 300;
|
|
||||||
unsigned int configRomhackCameraZoomedOutHeight = 450;
|
|
||||||
// common camera settings
|
// common camera settings
|
||||||
bool configCameraInvertX = false;
|
bool configCameraInvertX = false;
|
||||||
bool configCameraInvertY = true;
|
bool configCameraInvertY = true;
|
||||||
|
bool configCameraToxicGas = true;
|
||||||
// debug
|
// debug
|
||||||
bool configLuaProfiler = false;
|
bool configLuaProfiler = false;
|
||||||
bool configDebugPrint = false;
|
bool configDebugPrint = false;
|
||||||
|
|
@ -272,28 +269,26 @@ static const struct ConfigOption options[] = {
|
||||||
{.name = "bettercam_enable", .type = CONFIG_TYPE_BOOL, .boolValue = &configEnableFreeCamera},
|
{.name = "bettercam_enable", .type = CONFIG_TYPE_BOOL, .boolValue = &configEnableFreeCamera},
|
||||||
{.name = "bettercam_analog", .type = CONFIG_TYPE_BOOL, .boolValue = &configFreeCameraAnalog},
|
{.name = "bettercam_analog", .type = CONFIG_TYPE_BOOL, .boolValue = &configFreeCameraAnalog},
|
||||||
{.name = "bettercam_centering", .type = CONFIG_TYPE_BOOL, .boolValue = &configFreeCameraLCentering},
|
{.name = "bettercam_centering", .type = CONFIG_TYPE_BOOL, .boolValue = &configFreeCameraLCentering},
|
||||||
{.name = "bettercam_dpad", .type = CONFIG_TYPE_BOOL, .boolValue = &configFreeCameraDpadBehavior},
|
{.name = "bettercam_dpad", .type = CONFIG_TYPE_BOOL, .boolValue = &configFreeCameraDPadBehavior},
|
||||||
{.name = "bettercam_collision", .type = CONFIG_TYPE_BOOL, .boolValue = &configFreeCameraHasCollision},
|
{.name = "bettercam_collision", .type = CONFIG_TYPE_BOOL, .boolValue = &configFreeCameraHasCollision},
|
||||||
{.name = "bettercam_mouse_look", .type = CONFIG_TYPE_BOOL, .boolValue = &configCameraMouse},
|
{.name = "bettercam_mouse_look", .type = CONFIG_TYPE_BOOL, .boolValue = &configFreeCameraMouse},
|
||||||
{.name = "bettercam_invertx", .type = CONFIG_TYPE_BOOL, .boolValue = &configCameraInvertX},
|
|
||||||
{.name = "bettercam_inverty", .type = CONFIG_TYPE_BOOL, .boolValue = &configCameraInvertY},
|
{.name = "bettercam_xsens", .type = CONFIG_TYPE_UINT, .uintValue = &configFreeCameraXSens},
|
||||||
{.name = "bettercam_xsens", .type = CONFIG_TYPE_UINT, .uintValue = &configCameraXSens},
|
{.name = "bettercam_ysens", .type = CONFIG_TYPE_UINT, .uintValue = &configFreeCameraYSens},
|
||||||
{.name = "bettercam_ysens", .type = CONFIG_TYPE_UINT, .uintValue = &configCameraYSens},
|
{.name = "bettercam_aggression", .type = CONFIG_TYPE_UINT, .uintValue = &configFreeCameraAggr},
|
||||||
{.name = "bettercam_aggression", .type = CONFIG_TYPE_UINT, .uintValue = &configCameraAggr},
|
{.name = "bettercam_pan_level", .type = CONFIG_TYPE_UINT, .uintValue = &configFreeCameraPan},
|
||||||
{.name = "bettercam_pan_level", .type = CONFIG_TYPE_UINT, .uintValue = &configCameraPan},
|
{.name = "bettercam_degrade", .type = CONFIG_TYPE_UINT, .uintValue = &configFreeCameraDegrade},
|
||||||
{.name = "bettercam_degrade", .type = CONFIG_TYPE_UINT, .uintValue = &configCameraDegrade},
|
|
||||||
// romhack camera settings
|
// romhack camera settings
|
||||||
{.name = "romhackcam_enable", .type = CONFIG_TYPE_UINT, .uintValue = &configEnableRomhackCamera},
|
{.name = "romhackcam_enable", .type = CONFIG_TYPE_UINT, .uintValue = &configEnableRomhackCamera},
|
||||||
{.name = "romhackcam_bowser", .type = CONFIG_TYPE_BOOL, .boolValue = &configRomhackCameraBowserFights},
|
{.name = "romhackcam_bowser", .type = CONFIG_TYPE_BOOL, .boolValue = &configRomhackCameraBowserFights},
|
||||||
{.name = "romhackcam_collision", .type = CONFIG_TYPE_BOOL, .boolValue = &configRomhackCameraHasCollision},
|
{.name = "romhackcam_collision", .type = CONFIG_TYPE_BOOL, .boolValue = &configRomhackCameraHasCollision},
|
||||||
{.name = "romhackcam_centering", .type = CONFIG_TYPE_BOOL, .boolValue = &configRomhackCameraHasCentering},
|
{.name = "romhackcam_centering", .type = CONFIG_TYPE_BOOL, .boolValue = &configRomhackCameraHasCentering},
|
||||||
{.name = "romhackcam_dpad", .type = CONFIG_TYPE_BOOL, .boolValue = &configRomhackCameraDpadBehavior},
|
{.name = "romhackcam_dpad", .type = CONFIG_TYPE_BOOL, .boolValue = &configRomhackCameraDPadBehavior},
|
||||||
{.name = "romhackcam_slowfall", .type = CONFIG_TYPE_BOOL, .boolValue = &configRomhackCameraSlowFall},
|
{.name = "romhackcam_slowfall", .type = CONFIG_TYPE_BOOL, .boolValue = &configRomhackCameraSlowFall},
|
||||||
|
// common camera settings
|
||||||
|
{.name = "bettercam_invertx", .type = CONFIG_TYPE_BOOL, .boolValue = &configCameraInvertX},
|
||||||
|
{.name = "bettercam_inverty", .type = CONFIG_TYPE_BOOL, .boolValue = &configCameraInvertY},
|
||||||
{.name = "romhackcam_toxic_gas", .type = CONFIG_TYPE_BOOL, .boolValue = &configCameraToxicGas},
|
{.name = "romhackcam_toxic_gas", .type = CONFIG_TYPE_BOOL, .boolValue = &configCameraToxicGas},
|
||||||
{.name = "romhackcam_zi_dist", .type = CONFIG_TYPE_UINT, .uintValue = &configRomhackCameraZoomedInDist},
|
|
||||||
{.name = "romhackcam_zo_dist", .type = CONFIG_TYPE_UINT, .uintValue = &configRomhackCameraZoomedOutDist},
|
|
||||||
{.name = "romhackcam_zi_height", .type = CONFIG_TYPE_UINT, .uintValue = &configRomhackCameraZoomedInHeight},
|
|
||||||
{.name = "romhackcam_zo_height", .type = CONFIG_TYPE_UINT, .uintValue = &configRomhackCameraZoomedOutHeight},
|
|
||||||
// debug
|
// debug
|
||||||
{.name = "debug_offset", .type = CONFIG_TYPE_U64, .u64Value = &gPcDebug.bhvOffset},
|
{.name = "debug_offset", .type = CONFIG_TYPE_U64, .u64Value = &gPcDebug.bhvOffset},
|
||||||
{.name = "debug_tags", .type = CONFIG_TYPE_U64, .u64Value = gPcDebug.tags},
|
{.name = "debug_tags", .type = CONFIG_TYPE_U64, .u64Value = gPcDebug.tags},
|
||||||
|
|
|
||||||
|
|
@ -81,29 +81,25 @@ extern bool configUseStandardKeyBindingsChat;
|
||||||
extern bool configEnableFreeCamera;
|
extern bool configEnableFreeCamera;
|
||||||
extern bool configFreeCameraAnalog;
|
extern bool configFreeCameraAnalog;
|
||||||
extern bool configFreeCameraLCentering;
|
extern bool configFreeCameraLCentering;
|
||||||
extern bool configFreeCameraDpadBehavior;
|
extern bool configFreeCameraDPadBehavior;
|
||||||
extern bool configFreeCameraHasCollision;
|
extern bool configFreeCameraHasCollision;
|
||||||
extern bool configCameraMouse;
|
extern bool configFreeCameraMouse;
|
||||||
extern unsigned int configCameraXSens;
|
extern unsigned int configFreeCameraXSens;
|
||||||
extern unsigned int configCameraYSens;
|
extern unsigned int configFreeCameraYSens;
|
||||||
extern unsigned int configCameraAggr;
|
extern unsigned int configFreeCameraAggr;
|
||||||
extern unsigned int configCameraPan;
|
extern unsigned int configFreeCameraPan;
|
||||||
extern unsigned int configCameraDegrade;
|
extern unsigned int configFreeCameraDegrade;
|
||||||
// romhack camera settings
|
// romhack camera settings
|
||||||
extern unsigned int configEnableRomhackCamera;
|
extern unsigned int configEnableRomhackCamera;
|
||||||
extern bool configRomhackCameraBowserFights;
|
extern bool configRomhackCameraBowserFights;
|
||||||
extern bool configRomhackCameraHasCollision;
|
extern bool configRomhackCameraHasCollision;
|
||||||
extern bool configRomhackCameraHasCentering;
|
extern bool configRomhackCameraHasCentering;
|
||||||
extern bool configRomhackCameraDpadBehavior;
|
extern bool configRomhackCameraDPadBehavior;
|
||||||
extern bool configRomhackCameraSlowFall;
|
extern bool configRomhackCameraSlowFall;
|
||||||
extern bool configCameraToxicGas;
|
|
||||||
extern unsigned int configRomhackCameraZoomedInDist;
|
|
||||||
extern unsigned int configRomhackCameraZoomedOutDist;
|
|
||||||
extern unsigned int configRomhackCameraZoomedInHeight;
|
|
||||||
extern unsigned int configRomhackCameraZoomedOutHeight;
|
|
||||||
// common camera settings
|
// common camera settings
|
||||||
extern bool configCameraInvertX;
|
extern bool configCameraInvertX;
|
||||||
extern bool configCameraInvertY;
|
extern bool configCameraInvertY;
|
||||||
|
extern bool configCameraToxicGas;
|
||||||
// debug
|
// debug
|
||||||
extern bool configLuaProfiler;
|
extern bool configLuaProfiler;
|
||||||
extern bool configDebugPrint;
|
extern bool configDebugPrint;
|
||||||
|
|
|
||||||
|
|
@ -22,14 +22,14 @@ void djui_panel_free_camera_create(struct DjuiBase* caller) {
|
||||||
djui_checkbox_create(body, DLANG(CAMERA, FREE_CAMERA), &configEnableFreeCamera, djui_panel_free_camera_value_changed);
|
djui_checkbox_create(body, DLANG(CAMERA, FREE_CAMERA), &configEnableFreeCamera, djui_panel_free_camera_value_changed);
|
||||||
djui_checkbox_create(body, DLANG(CAMERA, ANALOG_CAMERA), &configFreeCameraAnalog, djui_panel_free_camera_value_changed);
|
djui_checkbox_create(body, DLANG(CAMERA, ANALOG_CAMERA), &configFreeCameraAnalog, djui_panel_free_camera_value_changed);
|
||||||
djui_checkbox_create(body, DLANG(CAMERA, ROMHACK_CAMERA_L_CENTERING), &configFreeCameraLCentering, djui_panel_free_camera_value_changed);
|
djui_checkbox_create(body, DLANG(CAMERA, ROMHACK_CAMERA_L_CENTERING), &configFreeCameraLCentering, djui_panel_free_camera_value_changed);
|
||||||
djui_checkbox_create(body, DLANG(CAMERA, FREE_CAMERA_USE_DPAD), &configFreeCameraDpadBehavior, djui_panel_free_camera_value_changed);
|
djui_checkbox_create(body, DLANG(CAMERA, FREE_CAMERA_USE_DPAD), &configFreeCameraDPadBehavior, djui_panel_free_camera_value_changed);
|
||||||
djui_checkbox_create(body, DLANG(CAMERA, FREE_CAMERA_COLLISION), &configFreeCameraHasCollision, djui_panel_free_camera_value_changed);
|
djui_checkbox_create(body, DLANG(CAMERA, FREE_CAMERA_COLLISION), &configFreeCameraHasCollision, djui_panel_free_camera_value_changed);
|
||||||
djui_checkbox_create(body, DLANG(CAMERA, MOUSE_LOOK), &configCameraMouse, djui_panel_free_camera_value_changed);
|
djui_checkbox_create(body, DLANG(CAMERA, MOUSE_LOOK), &configFreeCameraMouse, djui_panel_free_camera_value_changed);
|
||||||
djui_slider_create(body, DLANG(CAMERA, X_SENSITIVITY), &configCameraXSens, 1, 100, djui_panel_free_camera_value_changed);
|
djui_slider_create(body, DLANG(CAMERA, X_SENSITIVITY), &configFreeCameraXSens, 1, 100, djui_panel_free_camera_value_changed);
|
||||||
djui_slider_create(body, DLANG(CAMERA, Y_SENSITIVITY), &configCameraYSens, 1, 100, djui_panel_free_camera_value_changed);
|
djui_slider_create(body, DLANG(CAMERA, Y_SENSITIVITY), &configFreeCameraYSens, 1, 100, djui_panel_free_camera_value_changed);
|
||||||
djui_slider_create(body, DLANG(CAMERA, AGGRESSION), &configCameraAggr, 0, 100, djui_panel_free_camera_value_changed);
|
djui_slider_create(body, DLANG(CAMERA, AGGRESSION), &configFreeCameraAggr, 0, 100, djui_panel_free_camera_value_changed);
|
||||||
djui_slider_create(body, DLANG(CAMERA, PAN_LEVEL), &configCameraPan, 0, 100, djui_panel_free_camera_value_changed);
|
djui_slider_create(body, DLANG(CAMERA, PAN_LEVEL), &configFreeCameraPan, 0, 100, djui_panel_free_camera_value_changed);
|
||||||
djui_slider_create(body, DLANG(CAMERA, DECELERATION), &configCameraDegrade, 0, 100, djui_panel_free_camera_value_changed);
|
djui_slider_create(body, DLANG(CAMERA, DECELERATION), &configFreeCameraDegrade, 0, 100, djui_panel_free_camera_value_changed);
|
||||||
|
|
||||||
djui_button_create(body, DLANG(MENU, BACK), DJUI_BUTTON_STYLE_BACK, djui_panel_menu_back);
|
djui_button_create(body, DLANG(MENU, BACK), DJUI_BUTTON_STYLE_BACK, djui_panel_menu_back);
|
||||||
}
|
}
|
||||||
|
|
@ -46,13 +46,9 @@ void djui_panel_romhack_camera_create(struct DjuiBase* caller) {
|
||||||
djui_checkbox_create(body, DLANG(CAMERA, ROMHACK_CAMERA_IN_BOWSER), &configRomhackCameraBowserFights, djui_panel_romhack_camera_value_changed);
|
djui_checkbox_create(body, DLANG(CAMERA, ROMHACK_CAMERA_IN_BOWSER), &configRomhackCameraBowserFights, djui_panel_romhack_camera_value_changed);
|
||||||
djui_checkbox_create(body, DLANG(CAMERA, ROMHACK_CAMERA_COLLISION), &configRomhackCameraHasCollision, djui_panel_romhack_camera_value_changed);
|
djui_checkbox_create(body, DLANG(CAMERA, ROMHACK_CAMERA_COLLISION), &configRomhackCameraHasCollision, djui_panel_romhack_camera_value_changed);
|
||||||
djui_checkbox_create(body, DLANG(CAMERA, ROMHACK_CAMERA_L_CENTERING), &configRomhackCameraHasCentering, djui_panel_romhack_camera_value_changed);
|
djui_checkbox_create(body, DLANG(CAMERA, ROMHACK_CAMERA_L_CENTERING), &configRomhackCameraHasCentering, djui_panel_romhack_camera_value_changed);
|
||||||
djui_checkbox_create(body, DLANG(CAMERA, ROMHACK_CAMERA_USE_DPAD), &configRomhackCameraDpadBehavior, djui_panel_romhack_camera_value_changed);
|
djui_checkbox_create(body, DLANG(CAMERA, ROMHACK_CAMERA_USE_DPAD), &configRomhackCameraDPadBehavior, djui_panel_romhack_camera_value_changed);
|
||||||
djui_checkbox_create(body, DLANG(CAMERA, ROMHACK_CAMERA_SLOW_FALL), &configRomhackCameraSlowFall, djui_panel_romhack_camera_value_changed);
|
djui_checkbox_create(body, DLANG(CAMERA, ROMHACK_CAMERA_SLOW_FALL), &configRomhackCameraSlowFall, djui_panel_romhack_camera_value_changed);
|
||||||
djui_slider_create(body, DLANG(CAMERA, ROMHACK_CAMERA_ZOOMED_IN_DIST), &configRomhackCameraZoomedInDist, 700, 1200, djui_panel_romhack_camera_value_changed);
|
djui_checkbox_create(body, DLANG(CAMERA, CAMERA_TOXIC_GAS), &configCameraToxicGas, djui_panel_romhack_camera_value_changed); // this should technically be a common option
|
||||||
djui_slider_create(body, DLANG(CAMERA, ROMHACK_CAMERA_ZOOMED_OUT_DIST), &configRomhackCameraZoomedOutDist, 100, 600, djui_panel_romhack_camera_value_changed);
|
|
||||||
djui_slider_create(body, DLANG(CAMERA, ROMHACK_CAMERA_ZOOMED_IN_HEIGHT), &configRomhackCameraZoomedInHeight, 150, 500, djui_panel_romhack_camera_value_changed);
|
|
||||||
djui_slider_create(body, DLANG(CAMERA, ROMHACK_CAMERA_ZOOMED_OUT_HEIGHT), &configRomhackCameraZoomedOutHeight, 100, 500, djui_panel_romhack_camera_value_changed);
|
|
||||||
djui_checkbox_create(body, DLANG(CAMERA, CAMERA_TOXIC_GAS), &configCameraToxicGas, djui_panel_romhack_camera_value_changed);
|
|
||||||
|
|
||||||
djui_button_create(body, DLANG(MENU, BACK), DJUI_BUTTON_STYLE_BACK, djui_panel_menu_back);
|
djui_button_create(body, DLANG(MENU, BACK), DJUI_BUTTON_STYLE_BACK, djui_panel_menu_back);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27654,23 +27654,6 @@ int smlua_func_camera_config_enable_analog_cam(lua_State* L) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int smlua_func_camera_config_enable_camera_collisions(lua_State* L) {
|
|
||||||
if (L == NULL) { return 0; }
|
|
||||||
|
|
||||||
int top = lua_gettop(L);
|
|
||||||
if (top != 1) {
|
|
||||||
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_config_enable_camera_collisions", 1, top);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool enable = smlua_to_boolean(L, 1);
|
|
||||||
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_enable_camera_collisions"); return 0; }
|
|
||||||
|
|
||||||
camera_config_enable_camera_collisions(enable);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int smlua_func_camera_config_enable_centering(lua_State* L) {
|
int smlua_func_camera_config_enable_centering(lua_State* L) {
|
||||||
if (L == NULL) { return 0; }
|
if (L == NULL) { return 0; }
|
||||||
|
|
||||||
|
|
@ -27688,6 +27671,40 @@ int smlua_func_camera_config_enable_centering(lua_State* L) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int smlua_func_camera_config_enable_collisions(lua_State* L) {
|
||||||
|
if (L == NULL) { return 0; }
|
||||||
|
|
||||||
|
int top = lua_gettop(L);
|
||||||
|
if (top != 1) {
|
||||||
|
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_config_enable_collisions", 1, top);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool enable = smlua_to_boolean(L, 1);
|
||||||
|
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_enable_collisions"); return 0; }
|
||||||
|
|
||||||
|
camera_config_enable_collisions(enable);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int smlua_func_camera_config_enable_dpad(lua_State* L) {
|
||||||
|
if (L == NULL) { return 0; }
|
||||||
|
|
||||||
|
int top = lua_gettop(L);
|
||||||
|
if (top != 1) {
|
||||||
|
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_config_enable_dpad", 1, top);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool enable = smlua_to_boolean(L, 1);
|
||||||
|
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_enable_dpad"); return 0; }
|
||||||
|
|
||||||
|
camera_config_enable_dpad(enable);
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
int smlua_func_camera_config_enable_free_cam(lua_State* L) {
|
int smlua_func_camera_config_enable_free_cam(lua_State* L) {
|
||||||
if (L == NULL) { return 0; }
|
if (L == NULL) { return 0; }
|
||||||
|
|
||||||
|
|
@ -27705,23 +27722,6 @@ int smlua_func_camera_config_enable_free_cam(lua_State* L) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int smlua_func_camera_config_enable_freecam_dpad(lua_State* L) {
|
|
||||||
if (L == NULL) { return 0; }
|
|
||||||
|
|
||||||
int top = lua_gettop(L);
|
|
||||||
if (top != 1) {
|
|
||||||
LOG_LUA_LINE("Improper param count for '%s': Expected %u, Received %u", "camera_config_enable_freecam_dpad", 1, top);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool enable = smlua_to_boolean(L, 1);
|
|
||||||
if (!gSmLuaConvertSuccess) { LOG_LUA("Failed to convert parameter %u for function '%s'", 1, "camera_config_enable_freecam_dpad"); return 0; }
|
|
||||||
|
|
||||||
camera_config_enable_freecam_dpad(enable);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int smlua_func_camera_config_enable_mouse_look(lua_State* L) {
|
int smlua_func_camera_config_enable_mouse_look(lua_State* L) {
|
||||||
if (L == NULL) { return 0; }
|
if (L == NULL) { return 0; }
|
||||||
|
|
||||||
|
|
@ -27878,6 +27878,36 @@ int smlua_func_camera_config_is_analog_cam_enabled(UNUSED lua_State* L) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int smlua_func_camera_config_is_collision_enabled(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", "camera_config_is_collision_enabled", 0, top);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
lua_pushboolean(L, camera_config_is_collision_enabled());
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int smlua_func_camera_config_is_dpad_enabled(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", "camera_config_is_dpad_enabled", 0, top);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
lua_pushboolean(L, camera_config_is_dpad_enabled());
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
int smlua_func_camera_config_is_free_cam_enabled(UNUSED lua_State* L) {
|
int smlua_func_camera_config_is_free_cam_enabled(UNUSED lua_State* L) {
|
||||||
if (L == NULL) { return 0; }
|
if (L == NULL) { return 0; }
|
||||||
|
|
||||||
|
|
@ -27893,36 +27923,6 @@ int smlua_func_camera_config_is_free_cam_enabled(UNUSED lua_State* L) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int smlua_func_camera_config_is_free_camera_collision_enabled(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", "camera_config_is_free_camera_collision_enabled", 0, top);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
lua_pushboolean(L, camera_config_is_free_camera_collision_enabled());
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int smlua_func_camera_config_is_freecam_dpad_enabled(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", "camera_config_is_freecam_dpad_enabled", 0, top);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
lua_pushboolean(L, camera_config_is_freecam_dpad_enabled());
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int smlua_func_camera_config_is_mouse_look_enabled(UNUSED lua_State* L) {
|
int smlua_func_camera_config_is_mouse_look_enabled(UNUSED lua_State* L) {
|
||||||
if (L == NULL) { return 0; }
|
if (L == NULL) { return 0; }
|
||||||
|
|
||||||
|
|
@ -34229,10 +34229,10 @@ void smlua_bind_functions_autogen(void) {
|
||||||
// smlua_camera_utils.h
|
// smlua_camera_utils.h
|
||||||
smlua_bind_function(L, "camera_allow_toxic_gas_camera", smlua_func_camera_allow_toxic_gas_camera);
|
smlua_bind_function(L, "camera_allow_toxic_gas_camera", smlua_func_camera_allow_toxic_gas_camera);
|
||||||
smlua_bind_function(L, "camera_config_enable_analog_cam", smlua_func_camera_config_enable_analog_cam);
|
smlua_bind_function(L, "camera_config_enable_analog_cam", smlua_func_camera_config_enable_analog_cam);
|
||||||
smlua_bind_function(L, "camera_config_enable_camera_collisions", smlua_func_camera_config_enable_camera_collisions);
|
|
||||||
smlua_bind_function(L, "camera_config_enable_centering", smlua_func_camera_config_enable_centering);
|
smlua_bind_function(L, "camera_config_enable_centering", smlua_func_camera_config_enable_centering);
|
||||||
|
smlua_bind_function(L, "camera_config_enable_collisions", smlua_func_camera_config_enable_collisions);
|
||||||
|
smlua_bind_function(L, "camera_config_enable_dpad", smlua_func_camera_config_enable_dpad);
|
||||||
smlua_bind_function(L, "camera_config_enable_free_cam", smlua_func_camera_config_enable_free_cam);
|
smlua_bind_function(L, "camera_config_enable_free_cam", smlua_func_camera_config_enable_free_cam);
|
||||||
smlua_bind_function(L, "camera_config_enable_freecam_dpad", smlua_func_camera_config_enable_freecam_dpad);
|
|
||||||
smlua_bind_function(L, "camera_config_enable_mouse_look", smlua_func_camera_config_enable_mouse_look);
|
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_aggression", smlua_func_camera_config_get_aggression);
|
||||||
smlua_bind_function(L, "camera_config_get_centering", smlua_func_camera_config_get_centering);
|
smlua_bind_function(L, "camera_config_get_centering", smlua_func_camera_config_get_centering);
|
||||||
|
|
@ -34243,9 +34243,9 @@ void smlua_bind_functions_autogen(void) {
|
||||||
smlua_bind_function(L, "camera_config_invert_x", smlua_func_camera_config_invert_x);
|
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_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_analog_cam_enabled", smlua_func_camera_config_is_analog_cam_enabled);
|
||||||
|
smlua_bind_function(L, "camera_config_is_collision_enabled", smlua_func_camera_config_is_collision_enabled);
|
||||||
|
smlua_bind_function(L, "camera_config_is_dpad_enabled", smlua_func_camera_config_is_dpad_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_free_cam_enabled", smlua_func_camera_config_is_free_cam_enabled);
|
||||||
smlua_bind_function(L, "camera_config_is_free_camera_collision_enabled", smlua_func_camera_config_is_free_camera_collision_enabled);
|
|
||||||
smlua_bind_function(L, "camera_config_is_freecam_dpad_enabled", smlua_func_camera_config_is_freecam_dpad_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_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_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_is_y_inverted", smlua_func_camera_config_is_y_inverted);
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@ static struct CameraOverride sOverrideEnableCamera = { 0 };
|
||||||
static struct CameraOverride sOverrideCameraAnalog = { 0 };
|
static struct CameraOverride sOverrideCameraAnalog = { 0 };
|
||||||
static struct CameraOverride sOverrideCameraMouse = { 0 };
|
static struct CameraOverride sOverrideCameraMouse = { 0 };
|
||||||
static struct CameraOverride sOverrideCameraLCentering = { 0 };
|
static struct CameraOverride sOverrideCameraLCentering = { 0 };
|
||||||
static struct CameraOverride sOverrideCameraFreecamDpad = { 0 };
|
static struct CameraOverride sOverrideCameraDPad = { 0 };
|
||||||
static struct CameraOverride sOverrideCameraFreecamCollision = { 0 };
|
static struct CameraOverride sOverrideCameraCollision = { 0 };
|
||||||
|
|
||||||
void camera_reset_overrides(void) {
|
void camera_reset_overrides(void) {
|
||||||
sOverrideCameraXSens.override = false;
|
sOverrideCameraXSens.override = false;
|
||||||
|
|
@ -28,8 +28,8 @@ void camera_reset_overrides(void) {
|
||||||
sOverrideCameraAnalog.override = false;
|
sOverrideCameraAnalog.override = false;
|
||||||
sOverrideCameraMouse.override = false;
|
sOverrideCameraMouse.override = false;
|
||||||
sOverrideCameraLCentering.override = false;
|
sOverrideCameraLCentering.override = false;
|
||||||
sOverrideCameraFreecamDpad.override = false;
|
sOverrideCameraDPad.override = false;
|
||||||
sOverrideCameraFreecamCollision.override = false;
|
sOverrideCameraCollision.override = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void camera_freeze(void) {
|
void camera_freeze(void) {
|
||||||
|
|
@ -128,16 +128,16 @@ bool camera_config_is_analog_cam_enabled(void) {
|
||||||
return sOverrideCameraAnalog.override ? sOverrideCameraAnalog.value : configFreeCameraAnalog;
|
return sOverrideCameraAnalog.override ? sOverrideCameraAnalog.value : configFreeCameraAnalog;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool camera_config_is_freecam_dpad_enabled(void) {
|
bool camera_config_is_dpad_enabled(void) {
|
||||||
return sOverrideCameraFreecamDpad.override ? sOverrideCameraFreecamDpad.value : configFreeCameraDpadBehavior;
|
return sOverrideCameraDPad.override ? sOverrideCameraDPad.value : configFreeCameraDPadBehavior;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool camera_config_is_free_camera_collision_enabled(void) {
|
bool camera_config_is_collision_enabled(void) {
|
||||||
return sOverrideCameraFreecamCollision.override ? sOverrideCameraFreecamCollision.value : configFreeCameraHasCollision;
|
return sOverrideCameraCollision.override ? sOverrideCameraCollision.value : configFreeCameraHasCollision;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool camera_config_is_mouse_look_enabled(void) {
|
bool camera_config_is_mouse_look_enabled(void) {
|
||||||
return sOverrideCameraMouse.override ? sOverrideCameraMouse.value : configCameraMouse;
|
return sOverrideCameraMouse.override ? sOverrideCameraMouse.value : configFreeCameraMouse;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool camera_config_is_x_inverted(void) {
|
bool camera_config_is_x_inverted(void) {
|
||||||
|
|
@ -149,23 +149,23 @@ bool camera_config_is_y_inverted(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 camera_config_get_x_sensitivity(void) {
|
u32 camera_config_get_x_sensitivity(void) {
|
||||||
return sOverrideCameraXSens.override ? sOverrideCameraXSens.value : configCameraXSens;
|
return sOverrideCameraXSens.override ? sOverrideCameraXSens.value : configFreeCameraXSens;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 camera_config_get_y_sensitivity(void) {
|
u32 camera_config_get_y_sensitivity(void) {
|
||||||
return sOverrideCameraYSens.override ? sOverrideCameraYSens.value : configCameraYSens;
|
return sOverrideCameraYSens.override ? sOverrideCameraYSens.value : configFreeCameraYSens;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 camera_config_get_aggression(void) {
|
u32 camera_config_get_aggression(void) {
|
||||||
return sOverrideCameraAggr.override ? sOverrideCameraAggr.value : configCameraAggr;
|
return sOverrideCameraAggr.override ? sOverrideCameraAggr.value : configFreeCameraAggr;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 camera_config_get_pan_level(void) {
|
u32 camera_config_get_pan_level(void) {
|
||||||
return sOverrideCameraPan.override ? sOverrideCameraPan.value : configCameraPan;
|
return sOverrideCameraPan.override ? sOverrideCameraPan.value : configFreeCameraPan;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 camera_config_get_deceleration(void) {
|
u32 camera_config_get_deceleration(void) {
|
||||||
return sOverrideCameraDegrade.override ? sOverrideCameraDegrade.value : configCameraDegrade;
|
return sOverrideCameraDegrade.override ? sOverrideCameraDegrade.value : configFreeCameraDegrade;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool camera_config_get_centering(void) {
|
bool camera_config_get_centering(void) {
|
||||||
|
|
@ -190,15 +190,15 @@ void camera_config_enable_centering(bool enable) {
|
||||||
newcam_init_settings();
|
newcam_init_settings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void camera_config_enable_freecam_dpad(bool enable) {
|
void camera_config_enable_dpad(bool enable) {
|
||||||
sOverrideCameraFreecamDpad.value = enable;
|
sOverrideCameraDPad.value = enable;
|
||||||
sOverrideCameraFreecamDpad.override = true;
|
sOverrideCameraDPad.override = true;
|
||||||
newcam_init_settings();
|
newcam_init_settings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void camera_config_enable_camera_collisions(bool enable) {
|
void camera_config_enable_collisions(bool enable) {
|
||||||
sOverrideCameraFreecamCollision.value = enable;
|
sOverrideCameraCollision.value = enable;
|
||||||
sOverrideCameraFreecamCollision.override = true;
|
sOverrideCameraCollision.override = true;
|
||||||
newcam_init_settings();
|
newcam_init_settings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,9 +68,9 @@ bool camera_config_is_free_cam_enabled(void);
|
||||||
/* |description|Checks if Analog Camera is enabled|descriptionEnd| */
|
/* |description|Checks if Analog Camera is enabled|descriptionEnd| */
|
||||||
bool camera_config_is_analog_cam_enabled(void);
|
bool camera_config_is_analog_cam_enabled(void);
|
||||||
/* |description|Checks if Freecam DPad Behavior is enabled|descriptionEnd| */
|
/* |description|Checks if Freecam DPad Behavior is enabled|descriptionEnd| */
|
||||||
bool camera_config_is_freecam_dpad_enabled(void);
|
bool camera_config_is_dpad_enabled(void);
|
||||||
/* |description|Checks if Camera Collision is enabled|descriptionEnd| */
|
/* |description|Checks if Camera Collision is enabled|descriptionEnd| */
|
||||||
bool camera_config_is_free_camera_collision_enabled(void);
|
bool camera_config_is_collision_enabled(void);
|
||||||
/* |description|Checks if Mouse Look is enabled|descriptionEnd| */
|
/* |description|Checks if Mouse Look is enabled|descriptionEnd| */
|
||||||
bool camera_config_is_mouse_look_enabled(void);
|
bool camera_config_is_mouse_look_enabled(void);
|
||||||
/* |description|Checks if camera X is inverted|descriptionEnd| */
|
/* |description|Checks if camera X is inverted|descriptionEnd| */
|
||||||
|
|
@ -97,9 +97,9 @@ void camera_config_enable_analog_cam(bool enable);
|
||||||
/* |description|Overrides if the L button will center the camera|descriptionEnd| */
|
/* |description|Overrides if the L button will center the camera|descriptionEnd| */
|
||||||
void camera_config_enable_centering(bool enable);
|
void camera_config_enable_centering(bool enable);
|
||||||
/* |description|Overrides if Freecam DPad Behavior is enabled|descriptionEnd| */
|
/* |description|Overrides if Freecam DPad Behavior is enabled|descriptionEnd| */
|
||||||
void camera_config_enable_freecam_dpad(bool enable);
|
void camera_config_enable_dpad(bool enable);
|
||||||
/* |description|Overrides if Camera Collision is enabled|descriptionEnd| */
|
/* |description|Overrides if Camera Collision is enabled|descriptionEnd| */
|
||||||
void camera_config_enable_camera_collisions(bool enable);
|
void camera_config_enable_collisions(bool enable);
|
||||||
/* |description|Overrides if camera mouse look is enabled|descriptionEnd| */
|
/* |description|Overrides if camera mouse look is enabled|descriptionEnd| */
|
||||||
void camera_config_enable_mouse_look(bool enable);
|
void camera_config_enable_mouse_look(bool enable);
|
||||||
/* |description|Overrides if camera X is inverted|descriptionEnd| */
|
/* |description|Overrides if camera X is inverted|descriptionEnd| */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue