diff --git a/autogen/lua_definitions/functions.lua b/autogen/lua_definitions/functions.lua
index f834ce176..004259b73 100644
--- a/autogen/lua_definitions/functions.lua
+++ b/autogen/lua_definitions/functions.lua
@@ -11086,6 +11086,12 @@ function djui_get_playerlist_page_index()
-- ...
end
+--- @return boolean
+--- Checks if the DJUI chatbox is open
+function djui_is_chatbox_open()
+ -- ...
+end
+
--- @return DjuiFontType
--- Gets the DJUI menu font
function djui_menu_get_font()
diff --git a/autogen/lua_definitions/manual.lua b/autogen/lua_definitions/manual.lua
index c3ee4c52d..c0680411a 100644
--- a/autogen/lua_definitions/manual.lua
+++ b/autogen/lua_definitions/manual.lua
@@ -300,62 +300,6 @@ function get_texture_info(textureName)
-- ...
end
---- @param texInfo TextureInfo The texture
---- @param x number Where the texture is horizontally (left anchored)
---- @param y number Where the texture is vertically (top anchored)
---- @param scaleW number The scaled width of the texture
---- @param scaleH number The scaled height of the texture
---- Renders a texture to the screen
-function djui_hud_render_texture(texInfo, x, y, scaleW, scaleH)
- -- ...
-end
-
---- @param texInfo TextureInfo The texture
---- @param x number Where the texture is horizontally (left anchored)
---- @param y number Where the texture is vertically (top anchored)
---- @param scaleW number The scaled width of the texture
---- @param scaleH number The scaled height of the texture
---- @param tileX number Where the tile is horizontally (left anchored)
---- @param tileY number Where the tile is vertically (top anchored)
---- @param tileW number The width of the tile
---- @param tileH number The height of the tile
---- Renders a tile of a texture to the screen
-function djui_hud_render_texture_tile(texInfo, x, y, scaleW, scaleH, tileX, tileY, tileW, tileH)
- -- ...
-end
-
---- @param texInfo TextureInfo The texture
---- @param prevX number Where the texture previously was horizontally (left anchored)
---- @param prevY number Where the texture previously was vertically (top anchored)
---- @param prevScaleW number The previous scaled width of the texture
---- @param prevScaleH number The previous scaled height of the texture
---- @param x number Where the texture is horizontally (left anchored)
---- @param y number Where the texture is vertically (top anchored)
---- @param scaleW number The scaled width of the texture
---- @param scaleH number The scaled height of the texture
---- Renders an interpolated texture to the screen
-function djui_hud_render_texture_interpolated(texInfo, prevX, prevY, prevScaleW, prevScaleH, x, y, scaleW, scaleH)
- -- ...
-end
-
---- @param texInfo TextureInfo The texture
---- @param prevX number Where the texture previously was horizontally (left anchored)
---- @param prevY number Where the texture previously was vertically (top anchored)
---- @param prevScaleW number The previous scaled width of the texture
---- @param prevScaleH number The previous scaled height of the texture
---- @param x number Where the texture is horizontally (left anchored)
---- @param y number Where the texture is vertically (top anchored)
---- @param scaleW number The scaled width of the texture
---- @param scaleH number The scaled height of the texture
---- @param tileX number Where the tile is horizontally (left anchored)
---- @param tileY number Where the tile is vertically (top anchored)
---- @param tileW number The width of the tile
---- @param tileH number The height of the tile
---- Renders an interpolated tile of a texture to the screen
-function djui_hud_render_texture_tile_interpolated(texInfo, prevX, prevY, prevScaleW, prevScaleH, x, y, scaleW, scaleH, tileX, tileY, tileW, tileH)
- -- ...
-end
-
--- @param textureName string The name of the texture
--- @param overrideTexInfo TextureInfo The texture to override with
--- Overrides a texture with a custom `TextureInfo`
diff --git a/docs/lua/functions-7.md b/docs/lua/functions-7.md
index 8f2047a35..0f66d6356 100644
--- a/docs/lua/functions-7.md
+++ b/docs/lua/functions-7.md
@@ -541,6 +541,27 @@ Gets the DJUI playerlist's page index
+## [djui_is_chatbox_open](#djui_is_chatbox_open)
+
+### Description
+Checks if the DJUI chatbox is open
+
+### Lua Example
+`local booleanValue = djui_is_chatbox_open()`
+
+### Parameters
+- None
+
+### Returns
+- `boolean`
+
+### C Prototype
+`bool djui_is_chatbox_open(void);`
+
+[:arrow_up_small:](#)
+
+
+
## [djui_menu_get_font](#djui_menu_get_font)
### Description
diff --git a/docs/lua/functions.md b/docs/lua/functions.md
index 3619cadfd..c5666a892 100644
--- a/docs/lua/functions.md
+++ b/docs/lua/functions.md
@@ -1986,6 +1986,7 @@
- [djui_is_playerlist_open](functions-7.md#djui_is_playerlist_open)
- [djui_attempting_to_open_playerlist](functions-7.md#djui_attempting_to_open_playerlist)
- [djui_get_playerlist_page_index](functions-7.md#djui_get_playerlist_page_index)
+ - [djui_is_chatbox_open](functions-7.md#djui_is_chatbox_open)
- [djui_menu_get_font](functions-7.md#djui_menu_get_font)
- [djui_menu_get_theme](functions-7.md#djui_menu_get_theme)
- [djui_is_playerlist_ping_visible](functions-7.md#djui_is_playerlist_ping_visible)
diff --git a/src/game/first_person_cam.c b/src/game/first_person_cam.c
index 53f89d9b0..e59d245a3 100644
--- a/src/game/first_person_cam.c
+++ b/src/game/first_person_cam.c
@@ -63,8 +63,6 @@ static void first_person_camera_update(void) {
struct MarioState *m = &gMarioStates[0];
f32 sensX = 0.3f * camera_config_get_x_sensitivity();
f32 sensY = 0.4f * camera_config_get_y_sensitivity();
- s16 invX = camera_config_is_x_inverted() ? 1 : -1;
- s16 invY = camera_config_is_y_inverted() ? 1 : -1;
if (mouse_relative_enabled) {
// hack: make c buttons work for moving the camera
@@ -79,7 +77,7 @@ static void first_person_camera_update(void) {
// update pitch
if (!gFirstPersonCamera.forcePitch) {
- gFirstPersonCamera.pitch -= sensY * (invY * extStickY - 1.5f * mouse_y);
+ gFirstPersonCamera.pitch -= sensY * (extStickY - 1.5f * mouse_y);
gFirstPersonCamera.pitch = clamp(gFirstPersonCamera.pitch, -0x3F00, 0x3F00);
}
@@ -88,7 +86,7 @@ static void first_person_camera_update(void) {
if (m->controller->buttonDown & L_TRIG && gFirstPersonCamera.centerL) {
gFirstPersonCamera.yaw = m->faceAngle[1] + 0x8000;
} else {
- gFirstPersonCamera.yaw += sensX * (invX * extStickX - 1.5f * mouse_x);
+ gFirstPersonCamera.yaw += sensX * (extStickX - 1.5f * mouse_x);
}
}
}
diff --git a/src/pc/lua/smlua_functions_autogen.c b/src/pc/lua/smlua_functions_autogen.c
index 21c58097a..6d0ac5da6 100644
--- a/src/pc/lua/smlua_functions_autogen.c
+++ b/src/pc/lua/smlua_functions_autogen.c
@@ -33317,6 +33317,21 @@ int smlua_func_djui_get_playerlist_page_index(UNUSED lua_State* L) {
return 1;
}
+int smlua_func_djui_is_chatbox_open(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", "djui_is_chatbox_open", 0, top);
+ return 0;
+ }
+
+
+ lua_pushboolean(L, djui_is_chatbox_open());
+
+ return 1;
+}
+
int smlua_func_djui_menu_get_font(UNUSED lua_State* L) {
if (L == NULL) { return 0; }
@@ -38649,6 +38664,7 @@ void smlua_bind_functions_autogen(void) {
smlua_bind_function(L, "djui_is_playerlist_open", smlua_func_djui_is_playerlist_open);
smlua_bind_function(L, "djui_attempting_to_open_playerlist", smlua_func_djui_attempting_to_open_playerlist);
smlua_bind_function(L, "djui_get_playerlist_page_index", smlua_func_djui_get_playerlist_page_index);
+ smlua_bind_function(L, "djui_is_chatbox_open", smlua_func_djui_is_chatbox_open);
smlua_bind_function(L, "djui_menu_get_font", smlua_func_djui_menu_get_font);
smlua_bind_function(L, "djui_menu_get_theme", smlua_func_djui_menu_get_theme);
smlua_bind_function(L, "djui_is_playerlist_ping_visible", smlua_func_djui_is_playerlist_ping_visible);
diff --git a/src/pc/lua/utils/smlua_misc_utils.c b/src/pc/lua/utils/smlua_misc_utils.c
index 7a469db0a..4571a8110 100644
--- a/src/pc/lua/utils/smlua_misc_utils.c
+++ b/src/pc/lua/utils/smlua_misc_utils.c
@@ -110,6 +110,10 @@ u8 djui_get_playerlist_page_index(void) {
return sPageIndex;
}
+bool djui_is_chatbox_open(void) {
+ return gDjuiChatBox->base.visible;
+}
+
enum DjuiFontType djui_menu_get_font(void) {
return configDjuiThemeFont == 0 ? FONT_NORMAL : FONT_ALIASED;
}
diff --git a/src/pc/lua/utils/smlua_misc_utils.h b/src/pc/lua/utils/smlua_misc_utils.h
index 8332a2d48..6b5a8d70a 100644
--- a/src/pc/lua/utils/smlua_misc_utils.h
+++ b/src/pc/lua/utils/smlua_misc_utils.h
@@ -75,6 +75,8 @@ bool djui_is_playerlist_open(void);
bool djui_attempting_to_open_playerlist(void);
/* |description|Gets the DJUI playerlist's page index|descriptionEnd| */
u8 djui_get_playerlist_page_index(void);
+/* |description|Checks if the DJUI chatbox is open|descriptionEnd| */
+bool djui_is_chatbox_open(void);
/* |description|Gets the DJUI menu font|descriptionEnd| */
enum DjuiFontType djui_menu_get_font(void);
/* |description|Gets the DJUI menu theme|descriptionEnd| */