Compare commits

...

9 commits

Author SHA1 Message Date
Blockyyy
e46ec872db
Merge 184bb8671d into 5fd55ffac1 2025-10-29 18:44:49 +01:00
Cooliokid956
5fd55ffac1
djui_hud_is_mouse_locked() (#986)
Some checks failed
Build coop / build-linux (push) Has been cancelled
Build coop / build-steamos (push) Has been cancelled
Build coop / build-windows-opengl (push) Has been cancelled
Build coop / build-windows-directx (push) Has been cancelled
Build coop / build-macos-arm (push) Has been cancelled
Build coop / build-macos-intel (push) Has been cancelled
* djui_hud_get_mouse_locked()

Adds a total of 1 function:
# `bool djui_hud_get_mouse_locked()`
Returns the DJUI mouse lock status

Tip: This won't return the true state of mouse lock, so make sure to use `get_first_person_enabled()` and `camera_config_is_mouse_look_enabled()` as well

---
This also fills in some descriptions left out by Isaac in his viewport/scissor functions

* djui_hud_is_mouse_locked()

Same as before but is

* this is better imo
2025-10-29 18:41:27 +01:00
Emily♥
9f7ad0f93e
Some syncing fixes for Bowser and Heave Ho (#989)
* Fix Eyerok pounding in multiplayer

Eyerok now only enters the double pound state if ALL players stand on the pedestal rather than just one. Players standing on the pedestal will be ignored. I had to write a new function for this, I hope this is acceptable.

* Suggested changes

I didn't want to change the name of arg0 in eyerok_check_mario_relative_z because it was a vanilla function, but I suppose I can.

* Remove interaction limit for PVP

Fixes issues with certain mods

* Fixes for Bowser and Heave Ho

Hopefully this makes things a bit better.
2025-10-29 18:39:40 +01:00
Blockyyy
184bb8671d update Czech.ini
Co-authored-by: Dominicentek <69892109+Dominicentek@users.noreply.github.com>
2025-07-01 16:12:11 +02:00
Blockyyy
7865f1ba32 Merge branch 'chatopt' of https://github.com/Blockyyy/sm64coopdx into chatopt 2025-07-01 00:32:20 +02:00
Blockyyy
a8be244775 update German.ini 2025-07-01 00:32:12 +02:00
Blockyyy
327b9be6f9
Update lang/Portuguese.ini
Co-authored-by: mingokrb <82242100+mingokrb@users.noreply.github.com>
2025-06-29 13:52:09 +02:00
Blockyyy
19c87a42ad temp translation (chzech, german, japenese, polish, russian) 2025-06-29 01:53:25 +02:00
Blockyyy
c5019d1876 Add chat scaling and opacity 2025-06-29 01:41:35 +02:00
27 changed files with 195 additions and 43 deletions

View file

@ -3914,8 +3914,14 @@ function djui_hud_get_raw_mouse_y()
-- ... -- ...
end end
--- @return boolean
--- Checks if the cursor is locked to the window
function djui_hud_is_mouse_locked()
-- ...
end
--- @param locked boolean --- @param locked boolean
--- Sets if the cursor is hidden and constrainted to the window --- Locks (or unlocks) the cursor to the window
function djui_hud_set_mouse_locked(locked) function djui_hud_set_mouse_locked(locked)
-- ... -- ...
end end
@ -3954,12 +3960,12 @@ end
--- @param y number --- @param y number
--- @param width number --- @param width number
--- @param height number --- @param height number
--- Sets the viewport to the specified position and size, this will resize --- Sets the viewport to the specified position and size, this will resize any subsequent DJUI graphics
function djui_hud_set_viewport(x, y, width, height) function djui_hud_set_viewport(x, y, width, height)
-- ... -- ...
end end
--- put the description here --- Resets the viewport to a fullscreen state
function djui_hud_reset_viewport() function djui_hud_reset_viewport()
-- ... -- ...
end end
@ -3968,12 +3974,12 @@ end
--- @param y number --- @param y number
--- @param width number --- @param width number
--- @param height number --- @param height number
--- put the description here --- Sets the scissor rectangle to the specified position and size, this will cut off any subsequent DJUI graphics not within the rectangle
function djui_hud_set_scissor(x, y, width, height) function djui_hud_set_scissor(x, y, width, height)
-- ... -- ...
end end
--- put the description here --- Resets the scissor rectangle to a fullscreen state
function djui_hud_reset_scissor() function djui_hud_reset_scissor()
-- ... -- ...
end end
@ -6443,14 +6449,14 @@ end
--- @param m MarioState --- @param m MarioState
--- @return integer --- @return integer
--- Performs a full Mario stationary physics step (4 substeps) and returns an `GROUND_STEP_*` result --- Performs a full Mario stationary physics step (4 substeps) and returns a `GROUND_STEP_*` result
function stationary_ground_step(m) function stationary_ground_step(m)
-- ... -- ...
end end
--- @param m MarioState --- @param m MarioState
--- @return integer --- @return integer
--- Performs a full Mario ground physics step (4 substeps) and returns an `GROUND_STEP_*` result --- Performs a full Mario ground physics step (4 substeps) and returns a `GROUND_STEP_*` result
function perform_ground_step(m) function perform_ground_step(m)
-- ... -- ...
end end
@ -10029,7 +10035,7 @@ end
--- @param player integer --- @param player integer
--- @return integer --- @return integer
--- Gets the tempo of `player` --- Gets the `tempo` of `player`
function sequence_player_get_tempo(player) function sequence_player_get_tempo(player)
-- ... -- ...
end end
@ -10043,7 +10049,7 @@ end
--- @param player integer --- @param player integer
--- @return integer --- @return integer
--- Gets the tempoAcc (tempo accumulation) of `player` --- Gets the `tempoAcc` (tempo accumulation) of `player`
function sequence_player_get_tempo_acc(player) function sequence_player_get_tempo_acc(player)
-- ... -- ...
end end
@ -10057,7 +10063,7 @@ end
--- @param player integer --- @param player integer
--- @return integer --- @return integer
--- Gets the transposition (pitch) of `player` --- Gets the `transposition` (pitch) of `player`
function sequence_player_get_transposition(player) function sequence_player_get_transposition(player)
-- ... -- ...
end end

View file

@ -3140,10 +3140,31 @@ Returns the y coordinate of the mouse relative to the screen
<br /> <br />
## [djui_hud_is_mouse_locked](#djui_hud_is_mouse_locked)
### Description
Checks if the cursor is locked to the window
### Lua Example
`local booleanValue = djui_hud_is_mouse_locked()`
### Parameters
- None
### Returns
- `boolean`
### C Prototype
`bool djui_hud_is_mouse_locked(void);`
[:arrow_up_small:](#)
<br />
## [djui_hud_set_mouse_locked](#djui_hud_set_mouse_locked) ## [djui_hud_set_mouse_locked](#djui_hud_set_mouse_locked)
### Description ### Description
Sets if the cursor is hidden and constrainted to the window Locks (or unlocks) the cursor to the window
### Lua Example ### Lua Example
`djui_hud_set_mouse_locked(locked)` `djui_hud_set_mouse_locked(locked)`
@ -3271,7 +3292,7 @@ Returns the amount scrolled vertically (-down/up+)
## [djui_hud_set_viewport](#djui_hud_set_viewport) ## [djui_hud_set_viewport](#djui_hud_set_viewport)
### Description ### Description
Sets the viewport to the specified position and size, this will resize Sets the viewport to the specified position and size, this will resize any subsequent DJUI graphics
### Lua Example ### Lua Example
`djui_hud_set_viewport(x, y, width, height)` `djui_hud_set_viewport(x, y, width, height)`
@ -3297,7 +3318,7 @@ Sets the viewport to the specified position and size, this will resize
## [djui_hud_reset_viewport](#djui_hud_reset_viewport) ## [djui_hud_reset_viewport](#djui_hud_reset_viewport)
### Description ### Description
put the description here Resets the viewport to a fullscreen state
### Lua Example ### Lua Example
`djui_hud_reset_viewport()` `djui_hud_reset_viewport()`
@ -3318,7 +3339,7 @@ put the description here
## [djui_hud_set_scissor](#djui_hud_set_scissor) ## [djui_hud_set_scissor](#djui_hud_set_scissor)
### Description ### Description
put the description here Sets the scissor rectangle to the specified position and size, this will cut off any subsequent DJUI graphics not within the rectangle
### Lua Example ### Lua Example
`djui_hud_set_scissor(x, y, width, height)` `djui_hud_set_scissor(x, y, width, height)`
@ -3344,7 +3365,7 @@ put the description here
## [djui_hud_reset_scissor](#djui_hud_reset_scissor) ## [djui_hud_reset_scissor](#djui_hud_reset_scissor)
### Description ### Description
put the description here Resets the scissor rectangle to a fullscreen state
### Lua Example ### Lua Example
`djui_hud_reset_scissor()` `djui_hud_reset_scissor()`

View file

@ -4070,7 +4070,7 @@ Sets all of Mario's velocity variables to 0 and sets his Y position to the floor
## [stationary_ground_step](#stationary_ground_step) ## [stationary_ground_step](#stationary_ground_step)
### Description ### Description
Performs a full Mario stationary physics step (4 substeps) and returns an `GROUND_STEP_*` result Performs a full Mario stationary physics step (4 substeps) and returns a `GROUND_STEP_*` result
### Lua Example ### Lua Example
`local integerValue = stationary_ground_step(m)` `local integerValue = stationary_ground_step(m)`
@ -4093,7 +4093,7 @@ Performs a full Mario stationary physics step (4 substeps) and returns an `GROUN
## [perform_ground_step](#perform_ground_step) ## [perform_ground_step](#perform_ground_step)
### Description ### Description
Performs a full Mario ground physics step (4 substeps) and returns an `GROUND_STEP_*` result Performs a full Mario ground physics step (4 substeps) and returns a `GROUND_STEP_*` result
### Lua Example ### Lua Example
`local integerValue = perform_ground_step(m)` `local integerValue = perform_ground_step(m)`

View file

@ -5276,7 +5276,7 @@ Returns the current sound mode (e.g., stereo, mono) stored in the save file. Use
## [sequence_player_get_tempo](#sequence_player_get_tempo) ## [sequence_player_get_tempo](#sequence_player_get_tempo)
### Description ### Description
Gets the tempo of `player` Gets the `tempo` of `player`
### Lua Example ### Lua Example
`local integerValue = sequence_player_get_tempo(player)` `local integerValue = sequence_player_get_tempo(player)`
@ -5323,7 +5323,7 @@ Sets the `tempo` of `player`. Resets when another sequence is played
## [sequence_player_get_tempo_acc](#sequence_player_get_tempo_acc) ## [sequence_player_get_tempo_acc](#sequence_player_get_tempo_acc)
### Description ### Description
Gets the tempoAcc (tempo accumulation) of `player` Gets the `tempoAcc` (tempo accumulation) of `player`
### Lua Example ### Lua Example
`local integerValue = sequence_player_get_tempo_acc(player)` `local integerValue = sequence_player_get_tempo_acc(player)`
@ -5370,7 +5370,7 @@ Sets the `tempoAcc` (tempo accumulation) of `player`. Resets when another sequen
## [sequence_player_get_transposition](#sequence_player_get_transposition) ## [sequence_player_get_transposition](#sequence_player_get_transposition)
### Description ### Description
Gets the transposition (pitch) of `player` Gets the `transposition` (pitch) of `player`
### Lua Example ### Lua Example
`local integerValue = sequence_player_get_transposition(player)` `local integerValue = sequence_player_get_transposition(player)`

View file

@ -770,6 +770,7 @@
- [djui_hud_get_mouse_y](functions-3.md#djui_hud_get_mouse_y) - [djui_hud_get_mouse_y](functions-3.md#djui_hud_get_mouse_y)
- [djui_hud_get_raw_mouse_x](functions-3.md#djui_hud_get_raw_mouse_x) - [djui_hud_get_raw_mouse_x](functions-3.md#djui_hud_get_raw_mouse_x)
- [djui_hud_get_raw_mouse_y](functions-3.md#djui_hud_get_raw_mouse_y) - [djui_hud_get_raw_mouse_y](functions-3.md#djui_hud_get_raw_mouse_y)
- [djui_hud_is_mouse_locked](functions-3.md#djui_hud_is_mouse_locked)
- [djui_hud_set_mouse_locked](functions-3.md#djui_hud_set_mouse_locked) - [djui_hud_set_mouse_locked](functions-3.md#djui_hud_set_mouse_locked)
- [djui_hud_get_mouse_buttons_down](functions-3.md#djui_hud_get_mouse_buttons_down) - [djui_hud_get_mouse_buttons_down](functions-3.md#djui_hud_get_mouse_buttons_down)
- [djui_hud_get_mouse_buttons_pressed](functions-3.md#djui_hud_get_mouse_buttons_pressed) - [djui_hud_get_mouse_buttons_pressed](functions-3.md#djui_hud_get_mouse_buttons_pressed)

View file

@ -189,6 +189,11 @@ MARIO_THEME = "Mario"
ODYSSEY_THEME = "Odyssey" ODYSSEY_THEME = "Odyssey"
FILE_SELECT_THEME = "Výběr souboru" FILE_SELECT_THEME = "Výběr souboru"
[CHAT_DISPLAY]
TEXT_OPACITY = "Průhlednost Textu"
BACKGROUND_OPACITY = "Průhlednost pozadí"
CHAT_SCALE = "Velikost Chatu"
[DYNOS] [DYNOS]
DYNOS = "DYNOS" DYNOS = "DYNOS"
LOCAL_PLAYER_MODEL_ONLY = "Pouze lokální model hráče" LOCAL_PLAYER_MODEL_ONLY = "Pouze lokální model hráče"

View file

@ -189,6 +189,11 @@ MARIO_THEME = "Mario"
ODYSSEY_THEME = "Odyssey" ODYSSEY_THEME = "Odyssey"
FILE_SELECT_THEME = "Bestand selecteren" FILE_SELECT_THEME = "Bestand selecteren"
[CHAT_DISPLAY]
TEXT_OPACITY = "Chat tekst doorzichtigheid"
BACKGROUND_OPACITY = "Chat achtergrond doorzichtigheid"
CHAT_SCALE = "Chat grootte"
[DYNOS] [DYNOS]
DYNOS = "DYNOS" DYNOS = "DYNOS"
LOCAL_PLAYER_MODEL_ONLY = "Alleen lokaal spelermodel" LOCAL_PLAYER_MODEL_ONLY = "Alleen lokaal spelermodel"

View file

@ -189,6 +189,11 @@ MARIO_THEME = "Mario"
ODYSSEY_THEME = "Odyssey" ODYSSEY_THEME = "Odyssey"
FILE_SELECT_THEME = "File Select" FILE_SELECT_THEME = "File Select"
[CHAT_DISPLAY]
TEXT_OPACITY = "Chat text opacity"
BACKGROUND_OPACITY = "Chat background opacity"
CHAT_SCALE = "Chat scale"
[DYNOS] [DYNOS]
DYNOS = "DYNOS" DYNOS = "DYNOS"
LOCAL_PLAYER_MODEL_ONLY = "Local Player Model Only" LOCAL_PLAYER_MODEL_ONLY = "Local Player Model Only"

View file

@ -189,6 +189,11 @@ MARIO_THEME = "Mario"
ODYSSEY_THEME = "Odyssey" ODYSSEY_THEME = "Odyssey"
FILE_SELECT_THEME = "Sélection de fichier" FILE_SELECT_THEME = "Sélection de fichier"
[CHAT_DISPLAY]
TEXT_OPACITY = "Opacité du texte du tchat"
BACKGROUND_OPACITY = "Opacité du fond du tchat"
CHAT_SCALE = "Échelle du tchat"
[DYNOS] [DYNOS]
DYNOS = "DYNOS" DYNOS = "DYNOS"
LOCAL_PLAYER_MODEL_ONLY = "Modèle de joueur local seulement" LOCAL_PLAYER_MODEL_ONLY = "Modèle de joueur local seulement"

View file

@ -189,6 +189,11 @@ MARIO_THEME = "Mario"
ODYSSEY_THEME = "Odyssey" ODYSSEY_THEME = "Odyssey"
FILE_SELECT_THEME = "Dateiauswahl" FILE_SELECT_THEME = "Dateiauswahl"
[CHAT_DISPLAY]
TEXT_OPACITY = "Chat-Textopazität"
BACKGROUND_OPACITY = "Opazität des Chat-Hintergrunds"
CHAT_SCALE = "Chat-Größe"
[DYNOS] [DYNOS]
DYNOS = "DYNOS" DYNOS = "DYNOS"
LOCAL_PLAYER_MODEL_ONLY = "Nur lokales Spielermodell" LOCAL_PLAYER_MODEL_ONLY = "Nur lokales Spielermodell"

View file

@ -187,6 +187,11 @@ MARIO_THEME = "Mario"
ODYSSEY_THEME = "Odyssey" ODYSSEY_THEME = "Odyssey"
FILE_SELECT_THEME = "Selezione file" FILE_SELECT_THEME = "Selezione file"
[CHAT_DISPLAY]
TEXT_OPACITY = "Opacità testo della chat"
BACKGROUND_OPACITY = "Opacità sfondo della chat"
CHAT_SCALE = "Grandezza della chat"
[DYNOS] [DYNOS]
DYNOS = "DYNOS" DYNOS = "DYNOS"
LOCAL_PLAYER_MODEL_ONLY = "Solo modello del giocatore locale" LOCAL_PLAYER_MODEL_ONLY = "Solo modello del giocatore locale"

View file

@ -190,6 +190,11 @@ MARIO_THEME = "マリオ"
ODYSSEY_THEME = "オデッセイ風" ODYSSEY_THEME = "オデッセイ風"
FILE_SELECT_THEME = "ファイルセレクト風" FILE_SELECT_THEME = "ファイルセレクト風"
[CHAT_DISPLAY]
TEXT_OPACITY = "チャットテキストの不透明度"
BACKGROUND_OPACITY = "チャットの背景の不透明度"
CHAT_SCALE = "チャットスケール"
[DYNOS] [DYNOS]
DYNOS = "DYNOS" DYNOS = "DYNOS"
LOCAL_PLAYER_MODEL_ONLY = "ローカルのキャラモデルに限定" LOCAL_PLAYER_MODEL_ONLY = "ローカルのキャラモデルに限定"

View file

@ -189,6 +189,11 @@ MARIO_THEME = "Mario"
ODYSSEY_THEME = "Odyssey" ODYSSEY_THEME = "Odyssey"
FILE_SELECT_THEME = "Wybór Pliku" FILE_SELECT_THEME = "Wybór Pliku"
[CHAT_DISPLAY]
TEXT_OPACITY = "Nieprzezroczystość tekstu czatu"
BACKGROUND_OPACITY = "Nieprzezroczystość tła czatu"
CHAT_SCALE = "Skala czatu"
[DYNOS] [DYNOS]
DYNOS = "DYNOS" DYNOS = "DYNOS"
LOCAL_PLAYER_MODEL_ONLY = "Tylko lokalny model gracza" LOCAL_PLAYER_MODEL_ONLY = "Tylko lokalny model gracza"

View file

@ -189,6 +189,11 @@ MARIO_THEME = "Mario"
ODYSSEY_THEME = "Odyssey" ODYSSEY_THEME = "Odyssey"
FILE_SELECT_THEME = "Seletor de Arquivo" FILE_SELECT_THEME = "Seletor de Arquivo"
[CHAT_DISPLAY]
TEXT_OPACITY = "Opacidade do texto do chat"
BACKGROUND_OPACITY = "Opacidade do fundo do chat"
CHAT_SCALE = "Tamanho do chat"
[DYNOS] [DYNOS]
DYNOS = "DYNOS" DYNOS = "DYNOS"
LOCAL_PLAYER_MODEL_ONLY = "Apenas modelo do jogador local" LOCAL_PLAYER_MODEL_ONLY = "Apenas modelo do jogador local"

View file

@ -188,6 +188,11 @@ MARIO_THEME = "Mario"
ODYSSEY_THEME = "Одиссеи" ODYSSEY_THEME = "Одиссеи"
FILE_SELECT_THEME = "Выбор файла" FILE_SELECT_THEME = "Выбор файла"
[CHAT_DISPLAY]
TEXT_OPACITY = "Непрозрачность текста чата"
BACKGROUND_OPACITY = "Непрозрачность фона чата"
CHAT_SCALE = "Масштаб чата"
[DYNOS] [DYNOS]
DYNOS = "DYNOS" DYNOS = "DYNOS"
LOCAL_PLAYER_MODEL_ONLY = "Только локальная модель игрока" LOCAL_PLAYER_MODEL_ONLY = "Только локальная модель игрока"

View file

@ -189,6 +189,11 @@ MARIO_THEME = "Mario"
ODYSSEY_THEME = "Odyssey" ODYSSEY_THEME = "Odyssey"
FILE_SELECT_THEME = "Selección de archivo" FILE_SELECT_THEME = "Selección de archivo"
[CHAT_DISPLAY]
TEXT_OPACITY = "Opacidad del texto del chat"
BACKGROUND_OPACITY = "Opacidad del fondo del chat"
CHAT_SCALE = "Escala del chat"
[DYNOS] [DYNOS]
DYNOS = "DYNOS" DYNOS = "DYNOS"
LOCAL_PLAYER_MODEL_ONLY = "Solo modelo de jugador local" LOCAL_PLAYER_MODEL_ONLY = "Solo modelo de jugador local"

View file

@ -15,15 +15,15 @@ void sequence_channel_set_volume(struct SequenceChannel *seqChannel, u8 volume);
void process_sequences(s32 iterationsRemaining); void process_sequences(s32 iterationsRemaining);
void init_sequence_player(u32 player); void init_sequence_player(u32 player);
void init_sequence_players(void); void init_sequence_players(void);
/* |description|Gets the tempo of `player`|descriptionEnd| */ /* |description|Gets the `tempo` of `player`|descriptionEnd| */
u16 sequence_player_get_tempo(u8 player); u16 sequence_player_get_tempo(u8 player);
/* |description|Sets the `tempo` of `player`. Resets when another sequence is played|descriptionEnd| */ /* |description|Sets the `tempo` of `player`. Resets when another sequence is played|descriptionEnd| */
void sequence_player_set_tempo(u8 player, u16 tempo); void sequence_player_set_tempo(u8 player, u16 tempo);
/* |description|Gets the tempoAcc (tempo accumulation) of `player`|descriptionEnd| */ /* |description|Gets the `tempoAcc` (tempo accumulation) of `player`|descriptionEnd| */
u16 sequence_player_get_tempo_acc(u8 player); u16 sequence_player_get_tempo_acc(u8 player);
/* |description|Sets the `tempoAcc` (tempo accumulation) of `player`. Resets when another sequence is played|descriptionEnd| */ /* |description|Sets the `tempoAcc` (tempo accumulation) of `player`. Resets when another sequence is played|descriptionEnd| */
void sequence_player_set_tempo_acc(u8 player, u16 tempoAcc); void sequence_player_set_tempo_acc(u8 player, u16 tempoAcc);
/* |description|Gets the transposition (pitch) of `player`|descriptionEnd| */ /* |description|Gets the `transposition` (pitch) of `player`|descriptionEnd| */
u16 sequence_player_get_transposition(u8 player); u16 sequence_player_get_transposition(u8 player);
/* |description|Sets the `transposition` (pitch) of `player`. Resets when another sequence is played|descriptionEnd| */ /* |description|Sets the `transposition` (pitch) of `player`. Resets when another sequence is played|descriptionEnd| */
void sequence_player_set_transposition(u8 player, u16 transposition); void sequence_player_set_transposition(u8 player, u16 transposition);

View file

@ -3,6 +3,7 @@ static u32 networkBowserAnimationIndex = 0;
static u8 bowserIsDying = FALSE; static u8 bowserIsDying = FALSE;
static u8 bowserCutscenePlayed = FALSE; static u8 bowserCutscenePlayed = FALSE;
static u8 bowserIsCutscenePlayer = FALSE; static u8 bowserIsCutscenePlayer = FALSE;
static u8 bowserCutsceneGlobalIndex = UNKNOWN_GLOBAL_INDEX;
void bowser_tail_anchor_act_0(void) { void bowser_tail_anchor_act_0(void) {
struct Object* bowser = o->parentObj; struct Object* bowser = o->parentObj;
@ -777,6 +778,10 @@ void bowser_act_thrown_dropped(void)
o->oAction = 4; o->oAction = 4;
else else
o->oAction = 12; o->oAction = 12;
if (is_nearest_mario_state_to_object(gMarioState, o)) {
network_send_object(o);
}
} }
} }
@ -1125,8 +1130,17 @@ void bowser_act_ride_tilting_platform(void) {
cur_obj_extend_animation_if_at_end(); cur_obj_extend_animation_if_at_end();
} }
void bowser_act_nothing(void) { void bowser_act_nothing(void) { // start moving if cutscene player is inactive
if (bowserCutsceneGlobalIndex == UNKNOWN_GLOBAL_INDEX) {
return;
}
struct NetworkPlayer* np = network_player_from_global_index(bowserCutsceneGlobalIndex);
if (np == NULL || !is_player_active(&gMarioStates[np->localIndex])) {
bowserCutscenePlayed = TRUE;
bowser_initialize_action();
return;
}
} }
s32 bowser_check_fallen_off_stage(void) // bowser off stage? s32 bowser_check_fallen_off_stage(void) // bowser off stage?
@ -1232,6 +1246,7 @@ void bowser_held_update(void) {
return; return;
} }
o->parentObj = player;
o->oBowserUnkF4 &= ~0x20000; o->oBowserUnkF4 &= ~0x20000;
cur_obj_become_intangible(); cur_obj_become_intangible();
@ -1385,6 +1400,13 @@ static u8 bhv_bowser_ignore_if_true(void) {
return FALSE; return FALSE;
} }
static void bhv_bowser_on_received_post(UNUSED u8 localIndex) {
// prevent sync from putting bowser in text action instead of nothing action
if (!(bowserIsCutscenePlayer || bowserCutscenePlayed) && (o->oAction == 5 || o->oAction == 6)) {
o->oAction = 20;
}
}
void bhv_bowser_init(void) { void bhv_bowser_init(void) {
bowserIsDying = FALSE; bowserIsDying = FALSE;
s32 level; // 0 is dw, 1 is fs, 2 is sky s32 level; // 0 is dw, 1 is fs, 2 is sky
@ -1408,9 +1430,11 @@ void bhv_bowser_init(void) {
// Make sure we're the first to trigger Bowser. // Make sure we're the first to trigger Bowser.
if (!is_other_player_active()) { if (!is_other_player_active()) {
bowserIsCutscenePlayer = TRUE; bowserIsCutscenePlayer = TRUE;
bowserCutsceneGlobalIndex = gNetworkPlayerLocal->globalIndex;
o->oAction = 5; // bowser_act_text_wait o->oAction = 5; // bowser_act_text_wait
} else { // If we aren't do nothing till we get our sync. } else { // If we aren't do nothing till we get our sync.
bowserIsCutscenePlayer = FALSE; bowserIsCutscenePlayer = FALSE;
bowserCutsceneGlobalIndex = UNKNOWN_GLOBAL_INDEX;
o->oAction = 20; // bowser_act_nothing o->oAction = 20; // bowser_act_nothing
} }
@ -1419,9 +1443,11 @@ void bhv_bowser_init(void) {
if (so) { if (so) {
so->override_ownership = bhv_bowser_override_ownership; so->override_ownership = bhv_bowser_override_ownership;
so->ignore_if_true = bhv_bowser_ignore_if_true; so->ignore_if_true = bhv_bowser_ignore_if_true;
so->on_received_post = bhv_bowser_on_received_post;
so->fullObjectSync = TRUE; so->fullObjectSync = TRUE;
sync_object_init_field_with_size(o, &o->header.gfx.node.flags, 16); sync_object_init_field_with_size(o, &o->header.gfx.node.flags, 16);
sync_object_init_field_with_size(o, &o->header.gfx.animInfo.animFrame, 16); sync_object_init_field_with_size(o, &o->header.gfx.animInfo.animFrame, 16);
sync_object_init_field_with_size(o, &bowserCutsceneGlobalIndex, 8);
sync_object_init_field(o, &networkBowserAnimationIndex); sync_object_init_field(o, &networkBowserAnimationIndex);
sync_object_init_field(o, &o->header.gfx.scale[0]); sync_object_init_field(o, &o->header.gfx.scale[0]);
sync_object_init_field(o, &o->header.gfx.scale[1]); sync_object_init_field(o, &o->header.gfx.scale[1]);

View file

@ -23,7 +23,7 @@ void bhv_heave_ho_throw_mario_loop(void) {
if (player) { if (player) {
player->oInteractStatus |= INT_STATUS_MARIO_UNK2; player->oInteractStatus |= INT_STATUS_MARIO_UNK2;
} }
if (marioState) { if (marioState && marioState->action == ACT_GRABBED) {
marioState->forwardVel = -45.0f; marioState->forwardVel = -45.0f;
marioState->vel[1] = 95.0f; marioState->vel[1] = 95.0f;
} }

View file

@ -36,9 +36,9 @@ u32 mario_update_moving_sand(struct MarioState *m);
u32 mario_update_windy_ground(struct MarioState *m); u32 mario_update_windy_ground(struct MarioState *m);
/* |description|Sets all of Mario's velocity variables to 0 and sets his Y position to the floor height|descriptionEnd| */ /* |description|Sets all of Mario's velocity variables to 0 and sets his Y position to the floor height|descriptionEnd| */
void stop_and_set_height_to_floor(struct MarioState *m); void stop_and_set_height_to_floor(struct MarioState *m);
/* |description|Performs a full Mario stationary physics step (4 substeps) and returns an `GROUND_STEP_*` result|descriptionEnd| */ /* |description|Performs a full Mario stationary physics step (4 substeps) and returns a `GROUND_STEP_*` result|descriptionEnd| */
s32 stationary_ground_step(struct MarioState *m); s32 stationary_ground_step(struct MarioState *m);
/* |description|Performs a full Mario ground physics step (4 substeps) and returns an `GROUND_STEP_*` result|descriptionEnd| */ /* |description|Performs a full Mario ground physics step (4 substeps) and returns a `GROUND_STEP_*` result|descriptionEnd| */
s32 perform_ground_step(struct MarioState *m); s32 perform_ground_step(struct MarioState *m);
/* |description|Performs a full Mario air physics step (4 substeps) and returns an `AIR_STEP_*` result|descriptionEnd| */ /* |description|Performs a full Mario air physics step (4 substeps) and returns an `AIR_STEP_*` result|descriptionEnd| */
s32 perform_air_step(struct MarioState *m, u32 stepArg); s32 perform_air_step(struct MarioState *m, u32 stepArg);

View file

@ -207,6 +207,9 @@ bool configDjuiThemeCenter = true;
bool configDjuiThemeGradients = true; bool configDjuiThemeGradients = true;
unsigned int configDjuiThemeFont = FONT_NORMAL; unsigned int configDjuiThemeFont = FONT_NORMAL;
unsigned int configDjuiScale = 0; unsigned int configDjuiScale = 0;
unsigned int configDjuiChatAlpha = 255;
unsigned int configDjuiBaseAlpha = 127;
unsigned int configDjuiChatSize = 100;
// other // other
unsigned int configRulesVersion = 0; unsigned int configRulesVersion = 0;
bool configCompressOnStartup = false; bool configCompressOnStartup = false;
@ -362,6 +365,9 @@ static const struct ConfigOption options[] = {
{.name = "djui_theme_gradients", .type = CONFIG_TYPE_BOOL, .boolValue = &configDjuiThemeGradients}, {.name = "djui_theme_gradients", .type = CONFIG_TYPE_BOOL, .boolValue = &configDjuiThemeGradients},
{.name = "djui_theme_font", .type = CONFIG_TYPE_UINT, .uintValue = &configDjuiThemeFont}, {.name = "djui_theme_font", .type = CONFIG_TYPE_UINT, .uintValue = &configDjuiThemeFont},
{.name = "djui_scale", .type = CONFIG_TYPE_UINT, .uintValue = &configDjuiScale}, {.name = "djui_scale", .type = CONFIG_TYPE_UINT, .uintValue = &configDjuiScale},
{.name = "djui_chat_alpha", .type = CONFIG_TYPE_UINT, .uintValue = &configDjuiChatAlpha},
{.name = "djui_base_alpha", .type = CONFIG_TYPE_UINT, .uintValue = &configDjuiBaseAlpha},
{.name = "djui_chat_size", .type = CONFIG_TYPE_UINT, .uintValue = &configDjuiChatSize},
// other // other
{.name = "rules_version", .type = CONFIG_TYPE_UINT, .uintValue = &configRulesVersion}, {.name = "rules_version", .type = CONFIG_TYPE_UINT, .uintValue = &configRulesVersion},
{.name = "compress_on_startup", .type = CONFIG_TYPE_BOOL, .boolValue = &configCompressOnStartup}, {.name = "compress_on_startup", .type = CONFIG_TYPE_BOOL, .boolValue = &configCompressOnStartup},
@ -789,6 +795,10 @@ NEXT_OPTION:
if (configDjuiTheme >= DJUI_THEME_MAX) { configDjuiTheme = 0; } if (configDjuiTheme >= DJUI_THEME_MAX) { configDjuiTheme = 0; }
if (configDjuiScale >= 5) { configDjuiScale = 0; } if (configDjuiScale >= 5) { configDjuiScale = 0; }
if (configDjuiChatAlpha > 255) { configDjuiChatAlpha = 255; }
if (configDjuiBaseAlpha > 255) { configDjuiBaseAlpha = 255; }
if (configDjuiChatSize > 200) { configDjuiChatSize = 200; }
if (gCLIOpts.fullscreen == 1) { if (gCLIOpts.fullscreen == 1) {
configWindow.fullscreen = true; configWindow.fullscreen = true;
} else if (gCLIOpts.fullscreen == 2) { } else if (gCLIOpts.fullscreen == 2) {

View file

@ -168,6 +168,9 @@ extern bool configDjuiThemeCenter;
extern bool configDjuiThemeGradients; extern bool configDjuiThemeGradients;
extern unsigned int configDjuiThemeFont; extern unsigned int configDjuiThemeFont;
extern unsigned int configDjuiScale; extern unsigned int configDjuiScale;
extern unsigned int configDjuiChatAlpha;
extern unsigned int configDjuiBaseAlpha;
extern unsigned int configDjuiChatSize;
// other // other
extern unsigned int configRulesVersion; extern unsigned int configRulesVersion;
extern bool configCompressOnStartup; extern bool configCompressOnStartup;

View file

@ -14,6 +14,7 @@
static bool djui_chat_message_render(struct DjuiBase* base) { static bool djui_chat_message_render(struct DjuiBase* base) {
struct DjuiChatMessage* chatMessage = (struct DjuiChatMessage*)base; struct DjuiChatMessage* chatMessage = (struct DjuiChatMessage*)base;
struct DjuiBase* ctBase = &chatMessage->message->base; struct DjuiBase* ctBase = &chatMessage->message->base;
struct DjuiTheme* theme = gDjuiThemes[configDjuiTheme];
f32 seconds = clock_elapsed() - chatMessage->createTime; f32 seconds = clock_elapsed() - chatMessage->createTime;
f32 f = 1.0f; f32 f = 1.0f;
@ -24,15 +25,15 @@ static bool djui_chat_message_render(struct DjuiBase* base) {
} }
if (gDjuiChatBoxFocus) { if (gDjuiChatBoxFocus) {
djui_base_set_color(base, 0, 0, 0, 120); djui_base_set_color(base, theme->threePanels.rectColor.r, theme->threePanels.rectColor.g, theme->threePanels.rectColor.b, configDjuiBaseAlpha);
djui_base_set_color(ctBase, 255, 255, 255, 255); djui_base_set_color(ctBase, theme->interactables.textColor.r, theme->interactables.textColor.g, theme->interactables.textColor.b, configDjuiChatAlpha);
djui_base_set_size_type(base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE); djui_base_set_size_type(base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
djui_base_set_size(base, 1.0f, chatMessage->base.height.value); djui_base_set_size(base, 1.0f, chatMessage->base.height.value);
} else if (f <= 0.1f) { } else if (f <= 0.1f) {
return false; return false;
} else { } else {
djui_base_set_color(base, 0, 0, 0, 180 * f); djui_base_set_color(base, theme->threePanels.rectColor.r, theme->threePanels.rectColor.g, theme->threePanels.rectColor.b, configDjuiBaseAlpha * f);
djui_base_set_color(ctBase, 255, 255, 255, 255 * f); djui_base_set_color(ctBase, theme->interactables.textColor.r, theme->interactables.textColor.g, theme->interactables.textColor.b, configDjuiChatAlpha * f);
djui_base_set_size_type(base, DJUI_SVT_ABSOLUTE, DJUI_SVT_ABSOLUTE); djui_base_set_size_type(base, DJUI_SVT_ABSOLUTE, DJUI_SVT_ABSOLUTE);
djui_base_set_size(base, chatMessage->messageWidth, chatMessage->base.height.value); djui_base_set_size(base, chatMessage->messageWidth, chatMessage->base.height.value);
} }
@ -73,10 +74,11 @@ void djui_chat_message_create(const char* message) {
if (gDjuiChatBox == NULL || gDjuiChatBox->chatFlow == NULL) { return; } if (gDjuiChatBox == NULL || gDjuiChatBox->chatFlow == NULL) { return; }
struct DjuiChatMessage* chatMessage = calloc(1, sizeof(struct DjuiChatMessage)); struct DjuiChatMessage* chatMessage = calloc(1, sizeof(struct DjuiChatMessage));
struct DjuiBase* base = &chatMessage->base; struct DjuiBase* base = &chatMessage->base;
f32 chatScale = (configDjuiChatSize * 0.01);
djui_base_init(&gDjuiChatBox->chatFlow->base, base, djui_chat_message_render, djui_chat_message_destroy); djui_base_init(&gDjuiChatBox->chatFlow->base, base, djui_chat_message_render, djui_chat_message_destroy);
djui_base_set_size_type(base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE); djui_base_set_size_type(base, DJUI_SVT_RELATIVE, DJUI_SVT_ABSOLUTE);
djui_base_set_size(base, 1.0f, 0); djui_base_set_size(base, chatScale, 0);
djui_base_set_color(base, 0, 0, 0, 64); djui_base_set_color(base, 0, 0, 0, configDjuiBaseAlpha);
djui_base_set_padding(base, 2, 4, 2, 4); djui_base_set_padding(base, 2, 4, 2, 4);
djui_base_set_alignment(base, DJUI_HALIGN_LEFT, DJUI_VALIGN_BOTTOM); djui_base_set_alignment(base, DJUI_HALIGN_LEFT, DJUI_VALIGN_BOTTOM);
@ -86,15 +88,17 @@ void djui_chat_message_create(const char* message) {
struct DjuiBase* ctBase = &chatText->base; struct DjuiBase* ctBase = &chatText->base;
djui_base_set_size_type(ctBase, DJUI_SVT_ABSOLUTE, DJUI_SVT_RELATIVE); djui_base_set_size_type(ctBase, DJUI_SVT_ABSOLUTE, DJUI_SVT_RELATIVE);
djui_base_set_size(ctBase, maxTextWidth, 1.0f); djui_base_set_size(ctBase, maxTextWidth, 1.0f);
djui_base_set_color(ctBase, 255, 255, 255, 255);
djui_base_set_location(ctBase, 0, 0); djui_base_set_location(ctBase, 0, 0);
djui_text_set_alignment(chatText, DJUI_HALIGN_LEFT, DJUI_VALIGN_TOP); djui_text_set_alignment(chatText, DJUI_HALIGN_LEFT, DJUI_VALIGN_TOP);
djui_base_set_color(&chatText->base, 255, 255, 255, configDjuiChatAlpha);
chatMessage->message = chatText; chatMessage->message = chatText;
chatText->fontScale *= chatScale;
chatMessage->createTime = clock_elapsed(); chatMessage->createTime = clock_elapsed();
// figure out chat message height // figure out chat message height
chatText->base.comp.width = maxTextWidth; chatText->base.comp.width = maxTextWidth;
f32 messageHeight = djui_text_count_lines(chatText, 10) * (chatText->font->lineHeight * chatText->font->defaultFontScale) + 8; f32 messageHeight = djui_text_count_lines(chatText, 10) * (chatText->font->lineHeight * chatText->font->defaultFontScale * chatScale) + 8 * chatScale;
djui_base_set_size(base, 1.0f, messageHeight); djui_base_set_size(base, 1.0f, messageHeight);
gDjuiChatBox->chatFlow->base.height.value += messageHeight + gDjuiChatBox->chatFlow->margin.value; gDjuiChatBox->chatFlow->base.height.value += messageHeight + gDjuiChatBox->chatFlow->margin.value;
if (!gDjuiChatBox->scrolling) { if (!gDjuiChatBox->scrolling) {

View file

@ -33,7 +33,7 @@ static struct DjuiColor sRefColor = { 255, 255, 255, 255 };
static bool sLegacy = false; static bool sLegacy = false;
f32 gDjuiHudUtilsZ = 0; f32 gDjuiHudUtilsZ = 0;
u8 gDjuiHudLockMouse = false; bool gDjuiHudLockMouse = false;
extern ALIGNED8 const u8 texture_hud_char_camera[]; extern ALIGNED8 const u8 texture_hud_char_camera[];
extern ALIGNED8 const u8 texture_hud_char_lakitu[]; extern ALIGNED8 const u8 texture_hud_char_lakitu[];
@ -297,6 +297,10 @@ f32 djui_hud_get_raw_mouse_y(void) {
return mouse_y; return mouse_y;
} }
bool djui_hud_is_mouse_locked(void) {
return gDjuiHudLockMouse;
}
void djui_hud_set_mouse_locked(bool locked) { void djui_hud_set_mouse_locked(bool locked) {
gDjuiHudLockMouse = locked; gDjuiHudLockMouse = locked;
} }

View file

@ -52,7 +52,7 @@ struct GlobalTextures {
extern struct GlobalTextures gGlobalTextures; extern struct GlobalTextures gGlobalTextures;
extern f32 gDjuiHudUtilsZ; extern f32 gDjuiHudUtilsZ;
extern u8 gDjuiHudLockMouse; extern bool gDjuiHudLockMouse;
/* |description|Gets the current DJUI HUD resolution|descriptionEnd| */ /* |description|Gets the current DJUI HUD resolution|descriptionEnd| */
u8 djui_hud_get_resolution(void); u8 djui_hud_get_resolution(void);
@ -92,7 +92,9 @@ f32 djui_hud_get_mouse_y(void);
f32 djui_hud_get_raw_mouse_x(void); f32 djui_hud_get_raw_mouse_x(void);
/* |description|Returns the y coordinate of the mouse relative to the screen|descriptionEnd| */ /* |description|Returns the y coordinate of the mouse relative to the screen|descriptionEnd| */
f32 djui_hud_get_raw_mouse_y(void); f32 djui_hud_get_raw_mouse_y(void);
/* |description|Sets if the cursor is hidden and constrainted to the window|descriptionEnd| */ /* |description|Checks if the cursor is locked to the window|descriptionEnd| */
bool djui_hud_is_mouse_locked(void);
/* |description|Locks (or unlocks) the cursor to the window|descriptionEnd| */
void djui_hud_set_mouse_locked(bool locked); void djui_hud_set_mouse_locked(bool locked);
/* |description|Returns the flags of the mouse buttons held down|descriptionEnd| */ /* |description|Returns the flags of the mouse buttons held down|descriptionEnd| */
u8 djui_hud_get_mouse_buttons_down(void); u8 djui_hud_get_mouse_buttons_down(void);
@ -104,13 +106,13 @@ u8 djui_hud_get_mouse_buttons_released(void);
f32 djui_hud_get_mouse_scroll_x(void); f32 djui_hud_get_mouse_scroll_x(void);
/* |description|Returns the amount scrolled vertically (-down/up+)|descriptionEnd| */ /* |description|Returns the amount scrolled vertically (-down/up+)|descriptionEnd| */
f32 djui_hud_get_mouse_scroll_y(void); f32 djui_hud_get_mouse_scroll_y(void);
/* |description|Sets the viewport to the specified position and size, this will resize |descriptionEnd| */ /* |description|Sets the viewport to the specified position and size, this will resize any subsequent DJUI graphics|descriptionEnd| */
void djui_hud_set_viewport(f32 x, f32 y, f32 width, f32 height); void djui_hud_set_viewport(f32 x, f32 y, f32 width, f32 height);
/* |description|put the description here|descriptionEnd| */ /* |description|Resets the viewport to a fullscreen state|descriptionEnd| */
void djui_hud_reset_viewport(void); void djui_hud_reset_viewport(void);
/* |description|put the description here|descriptionEnd| */ /* |description|Sets the scissor rectangle to the specified position and size, this will cut off any subsequent DJUI graphics not within the rectangle|descriptionEnd| */
void djui_hud_set_scissor(f32 x, f32 y, f32 width, f32 height); void djui_hud_set_scissor(f32 x, f32 y, f32 width, f32 height);
/* |description|put the description here|descriptionEnd| */ /* |description|Resets the scissor rectangle to a fullscreen state|descriptionEnd| */
void djui_hud_reset_scissor(void); void djui_hud_reset_scissor(void);
/* |description|Measures the length of `message` in the current font|descriptionEnd| */ /* |description|Measures the length of `message` in the current font|descriptionEnd| */

View file

@ -142,6 +142,10 @@ void djui_panel_main_menu_create(struct DjuiBase* caller) {
char* djuiFontChoices[2] = {DLANG(DJUI_THEMES, FONT_NORMAL), DLANG(DJUI_THEMES, FONT_ALIASED)}; char* djuiFontChoices[2] = {DLANG(DJUI_THEMES, FONT_NORMAL), DLANG(DJUI_THEMES, FONT_ALIASED)};
djui_selectionbox_create(body, DLANG(DJUI_THEMES, DJUI_FONT), djuiFontChoices, 2, &configDjuiThemeFont, djui_panel_menu_options_djui_setting_change); djui_selectionbox_create(body, DLANG(DJUI_THEMES, DJUI_FONT), djuiFontChoices, 2, &configDjuiThemeFont, djui_panel_menu_options_djui_setting_change);
djui_slider_create(body, DLANG(CHAT_DISPLAY, TEXT_OPACITY), &configDjuiChatAlpha, 0, 255, NULL);
djui_slider_create(body, DLANG(CHAT_DISPLAY, BACKGROUND_OPACITY), &configDjuiBaseAlpha, 0, 255, NULL);
djui_slider_create(body, DLANG(CHAT_DISPLAY, CHAT_SCALE), &configDjuiChatSize, 0, 200, NULL);
if (gDjuiInMainMenu) { if (gDjuiInMainMenu) {
// copy sound choices from gMainMenuSounds // copy sound choices from gMainMenuSounds
int numSounds = sizeof(gMainMenuSounds) / sizeof(gMainMenuSounds[0]); int numSounds = sizeof(gMainMenuSounds) / sizeof(gMainMenuSounds[0]);

View file

@ -12698,6 +12698,21 @@ int smlua_func_djui_hud_get_raw_mouse_y(UNUSED lua_State* L) {
return 1; return 1;
} }
int smlua_func_djui_hud_is_mouse_locked(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_hud_is_mouse_locked", 0, top);
return 0;
}
lua_pushboolean(L, djui_hud_is_mouse_locked());
return 1;
}
int smlua_func_djui_hud_set_mouse_locked(lua_State* L) { int smlua_func_djui_hud_set_mouse_locked(lua_State* L) {
if (L == NULL) { return 0; } if (L == NULL) { return 0; }
@ -37431,6 +37446,7 @@ void smlua_bind_functions_autogen(void) {
smlua_bind_function(L, "djui_hud_get_mouse_y", smlua_func_djui_hud_get_mouse_y); smlua_bind_function(L, "djui_hud_get_mouse_y", smlua_func_djui_hud_get_mouse_y);
smlua_bind_function(L, "djui_hud_get_raw_mouse_x", smlua_func_djui_hud_get_raw_mouse_x); smlua_bind_function(L, "djui_hud_get_raw_mouse_x", smlua_func_djui_hud_get_raw_mouse_x);
smlua_bind_function(L, "djui_hud_get_raw_mouse_y", smlua_func_djui_hud_get_raw_mouse_y); smlua_bind_function(L, "djui_hud_get_raw_mouse_y", smlua_func_djui_hud_get_raw_mouse_y);
smlua_bind_function(L, "djui_hud_is_mouse_locked", smlua_func_djui_hud_is_mouse_locked);
smlua_bind_function(L, "djui_hud_set_mouse_locked", smlua_func_djui_hud_set_mouse_locked); smlua_bind_function(L, "djui_hud_set_mouse_locked", smlua_func_djui_hud_set_mouse_locked);
smlua_bind_function(L, "djui_hud_get_mouse_buttons_down", smlua_func_djui_hud_get_mouse_buttons_down); smlua_bind_function(L, "djui_hud_get_mouse_buttons_down", smlua_func_djui_hud_get_mouse_buttons_down);
smlua_bind_function(L, "djui_hud_get_mouse_buttons_pressed", smlua_func_djui_hud_get_mouse_buttons_pressed); smlua_bind_function(L, "djui_hud_get_mouse_buttons_pressed", smlua_func_djui_hud_get_mouse_buttons_pressed);