From 55c9ce4861955b33b9e00abc01974bec573da861 Mon Sep 17 00:00:00 2001 From: Mr-Auto <36127424+Mr-Auto@users.noreply.github.com> Date: Sun, 5 Nov 2023 11:32:07 +0100 Subject: [PATCH 01/19] more useless/not useless stuff in `GameProps`, fix `ScreenTeamSelect` aliment, some more `ScreenArenaMenu` --- docs/game_data/spel2.lua | 12 ++++++---- docs/src/includes/_types.md | 12 ++++++---- src/game_api/game_manager.hpp | 24 ++++++++++++++----- src/game_api/screen.hpp | 7 +++--- src/game_api/screen_arena.hpp | 7 ++++++ .../script/usertypes/screen_arena_lua.cpp | 3 +++ src/game_api/script/usertypes/screen_lua.cpp | 1 + src/game_api/state.hpp | 4 ++++ 8 files changed, 52 insertions(+), 18 deletions(-) diff --git a/docs/game_data/spel2.lua b/docs/game_data/spel2.lua index 2708a6b55..49e89e874 100644 --- a/docs/game_data/spel2.lua +++ b/docs/game_data/spel2.lua @@ -2063,16 +2063,16 @@ do ---@field layer_transition_timer integer ---@field transition_to_layer integer ---@field screen_character_select ScreenCharacterSelect - ---@field screen_team_select ScreenTeamSelect + ---@field screen_team_select ScreenTeamSelect @For the arena ---@field screen_camp ScreenStateCamp ---@field screen_level ScreenStateLevel ---@field screen_transition ScreenTransition ---@field screen_death ScreenDeath ---@field screen_win ScreenWin - ---@field screen_credits ScreenCredits - ---@field screen_scores ScreenScores + ---@field screen_credits ScreenCredits @The spaceship minigame + ---@field screen_scores ScreenScores @Landing on the moon after win ---@field screen_constellation ScreenConstellation - ---@field screen_recap ScreenRecap + ---@field screen_recap ScreenRecap @Journal after CO win ---@field screen_arena_stages_select ScreenArenaStagesSelect ---@field screen_arena_intro ScreenArenaIntro ---@field screen_arena_level ScreenArenaLevel @@ -5672,6 +5672,7 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field left_arrow TextureRenderingInfo ---@field right_arrow TextureRenderingInfo ---@field start_panel TextureRenderingInfo + ---@field go_back_wooden_panel TextureRenderingInfo ---@field start_panel_slide_timer number ---@field pulsating_arrows_timer number ---@field selected_player integer @@ -6012,6 +6013,9 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field esc_next_panels_slide_timer number ---@field main_panel_vertical_scroll_position number ---@field selected_option_index integer + ---@field direction_input integer @-1 - none, 0 - UP, 1 - DOWN, 2 - LEFT, 3 - RIGHT + ---@field hold_down_timer integer @Delay after which fast scroll activates (can stop at different value, only matters when you hold down the direction button) + ---@field fast_scroll_timer integer ---@class ScreenZoomAnimation ---@field zoom_target number diff --git a/docs/src/includes/_types.md b/docs/src/includes/_types.md index 302c9f723..e466c81ae 100644 --- a/docs/src/includes/_types.md +++ b/docs/src/includes/_types.md @@ -2050,6 +2050,9 @@ float | [center_panels_hor_slide_position](https://github.com/spelunky-fyi/overl float | [esc_next_panels_slide_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=esc_next_panels_slide_timer) | float | [main_panel_vertical_scroll_position](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=main_panel_vertical_scroll_position) | int | [selected_option_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=selected_option_index) | +int | [direction_input](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=direction_input) | -1 - none, 0 - UP, 1 - DOWN, 2 - LEFT, 3 - RIGHT +int | [hold_down_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=hold_down_timer) | Delay after which fast scroll activates (can stop at different value, only matters when you hold down the direction button) +int | [fast_scroll_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=fast_scroll_timer) | ### ScreenArenaScore @@ -2570,6 +2573,7 @@ Type | Name | Description [TextureRenderingInfo](#TextureRenderingInfo) | [left_arrow](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=left_arrow) | [TextureRenderingInfo](#TextureRenderingInfo) | [right_arrow](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=right_arrow) | [TextureRenderingInfo](#TextureRenderingInfo) | [start_panel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_panel) | +[TextureRenderingInfo](#TextureRenderingInfo) | [go_back_wooden_panel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=go_back_wooden_panel) | float | [start_panel_slide_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_panel_slide_timer) | float | [pulsating_arrows_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=pulsating_arrows_timer) | int | [selected_player](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=selected_player) | @@ -2952,16 +2956,16 @@ int | [camera_layer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ca int | [layer_transition_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=layer_transition_timer) | int | [transition_to_layer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=transition_to_layer) | [ScreenCharacterSelect](#ScreenCharacterSelect) | [screen_character_select](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_character_select) | -[ScreenTeamSelect](#ScreenTeamSelect) | [screen_team_select](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_team_select) | +[ScreenTeamSelect](#ScreenTeamSelect) | [screen_team_select](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_team_select) | For the arena [ScreenStateCamp](#ScreenStateCamp) | [screen_camp](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_camp) | [ScreenStateLevel](#ScreenStateLevel) | [screen_level](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_level) | [ScreenTransition](#ScreenTransition) | [screen_transition](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_transition) | [ScreenDeath](#ScreenDeath) | [screen_death](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_death) | [ScreenWin](#ScreenWin) | [screen_win](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_win) | -[ScreenCredits](#ScreenCredits) | [screen_credits](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_credits) | -[ScreenScores](#ScreenScores) | [screen_scores](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_scores) | +[ScreenCredits](#ScreenCredits) | [screen_credits](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_credits) | The spaceship minigame +[ScreenScores](#ScreenScores) | [screen_scores](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_scores) | Landing on the moon after win [ScreenConstellation](#ScreenConstellation) | [screen_constellation](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_constellation) | -[ScreenRecap](#ScreenRecap) | [screen_recap](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_recap) | +[ScreenRecap](#ScreenRecap) | [screen_recap](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_recap) | Journal after CO win [ScreenArenaStagesSelect](#ScreenArenaStagesSelect) | [screen_arena_stages_select](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_arena_stages_select) | [ScreenArenaIntro](#ScreenArenaIntro) | [screen_arena_intro](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_arena_intro) | [ScreenArenaLevel](#ScreenArenaLevel) | [screen_arena_level](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_arena_level) | diff --git a/src/game_api/game_manager.hpp b/src/game_api/game_manager.hpp index cb45461b8..07ceba9db 100644 --- a/src/game_api/game_manager.hpp +++ b/src/game_api/game_manager.hpp @@ -98,18 +98,30 @@ struct GameProps // uint8_t padding_probably1[3]; - int32_t unknown12; // -1 - int8_t unknown13; // -1 + int32_t next_player_entrence; + int8_t unknown13; // -1 (leader player slot?) + int8_t unknown13; - // uint8_t padding_probably2[3]; + // uint8_t padding_probably2[2]; + + uint32_t unknown14a; + int8_t unknown14b; // -1 + + // uint8_t padding_probably3[3]; - size_t unknown14; // probably not one thig uint32_t unknown15; - // uint32_t padding_probably3; + // uint32_t padding_probably4; size_t* unknown16; size_t unknwon17; - double unknown18; // counts time or something? only active when the game window is active + std::array unknown18; // counts time or something? only active when the game window is active when there is a player choosen? + int32_t unknown19; + int32_t unknown20; // -1 + size_t unknown21; + size_t unknown22; + bool unknown23; + + // seam like only garbage below }; struct GameManager diff --git a/src/game_api/screen.hpp b/src/game_api/screen.hpp index 11574b0eb..e1c0ddfbf 100644 --- a/src/game_api/screen.hpp +++ b/src/game_api/screen.hpp @@ -463,15 +463,13 @@ class ScreenTeamSelect : public Screen // ID: 10 TextureRenderingInfo left_arrow; TextureRenderingInfo right_arrow; TextureRenderingInfo start_panel; + TextureRenderingInfo go_back_wooden_panel; + float unknown2; float start_panel_slide_timer; float pulsating_arrows_timer; uint8_t selected_player; uint8_t buttons; bool ready; - uint8_t unknown4d; - uint32_t unknown5; - uint32_t unknown6; - uint32_t unknown7; }; class ScreenCamp : public Screen // ID: 11 GameManager @@ -600,6 +598,7 @@ class ScreenTransition : public Screen // ID: 13 /// The POST render call will only be visible in the polaroid area on the left of the book. The book is apparently drawn on top of that. class ScreenDeath : public Screen // ID: 14 { + size_t unknown; }; class ScreenWin : public Screen // ID: 16 diff --git a/src/game_api/screen_arena.hpp b/src/game_api/screen_arena.hpp index 0c61dfc9a..2195baea4 100644 --- a/src/game_api/screen_arena.hpp +++ b/src/game_api/screen_arena.hpp @@ -76,6 +76,13 @@ class ScreenArenaMenu : public Screen // ID: 21 float esc_next_panels_slide_timer; float main_panel_vertical_scroll_position; uint32_t selected_option_index; + uint32_t unknown53; + /// -1 - none, 0 - UP, 1 - DOWN, 2 - LEFT, 3 - RIGHT + uint32_t direction_input; + /// Delay after which fast scroll activates (can stop at different value, only matters when you hold down the direction button) + uint32_t hold_down_timer; + uint32_t fast_scroll_timer; + uint8_t unknown57[3]; // last one is 16 unless you go in level/item select screen, then it turns 17 }; class ScreenArenaStagesSelect : public Screen // ID: 22 and 24 diff --git a/src/game_api/script/usertypes/screen_arena_lua.cpp b/src/game_api/script/usertypes/screen_arena_lua.cpp index 14dc47b0b..a33e52c49 100644 --- a/src/game_api/script/usertypes/screen_arena_lua.cpp +++ b/src/game_api/script/usertypes/screen_arena_lua.cpp @@ -61,6 +61,9 @@ void register_usertypes(sol::state& lua) screenarenamenu_type["esc_next_panels_slide_timer"] = &ScreenArenaMenu::esc_next_panels_slide_timer; screenarenamenu_type["main_panel_vertical_scroll_position"] = &ScreenArenaMenu::main_panel_vertical_scroll_position; screenarenamenu_type["selected_option_index"] = &ScreenArenaMenu::selected_option_index; + screenarenamenu_type["direction_input"] = &ScreenArenaMenu::direction_input; + screenarenamenu_type["hold_down_timer"] = &ScreenArenaMenu::hold_down_timer; + screenarenamenu_type["fast_scroll_timer"] = &ScreenArenaMenu::fast_scroll_timer; lua.new_usertype( "ScreenZoomAnimation", diff --git a/src/game_api/script/usertypes/screen_lua.cpp b/src/game_api/script/usertypes/screen_lua.cpp index 7d31afffa..bb09d50f1 100644 --- a/src/game_api/script/usertypes/screen_lua.cpp +++ b/src/game_api/script/usertypes/screen_lua.cpp @@ -332,6 +332,7 @@ void register_usertypes(sol::state& lua) screenteamselect_type["left_arrow"] = &ScreenTeamSelect::left_arrow; screenteamselect_type["right_arrow"] = &ScreenTeamSelect::right_arrow; screenteamselect_type["start_panel"] = &ScreenTeamSelect::start_panel; + screenteamselect_type["go_back_wooden_panel"] = &ScreenTeamSelect::go_back_wooden_panel; screenteamselect_type["start_panel_slide_timer"] = &ScreenTeamSelect::start_panel_slide_timer; screenteamselect_type["pulsating_arrows_timer"] = &ScreenTeamSelect::pulsating_arrows_timer; screenteamselect_type["selected_player"] = &ScreenTeamSelect::selected_player; diff --git a/src/game_api/state.hpp b/src/game_api/state.hpp index a8346e0e6..1e38b92b9 100644 --- a/src/game_api/state.hpp +++ b/src/game_api/state.hpp @@ -215,6 +215,7 @@ struct StateMemory // screen pointers below are most likely in an array and indexed through the screen ID (-10), hence the nullptrs for // screens that are available in GameManager ScreenCharacterSelect* screen_character_select; + /// For the arena ScreenTeamSelect* screen_team_select; ScreenStateCamp* screen_camp; ScreenStateLevel* screen_level; @@ -222,9 +223,12 @@ struct StateMemory ScreenDeath* screen_death; size_t unknown_screen_spaceship; // potentially ScreenSpaceship, but is nullptr (there is no UI rendering on spaceship anyway) ScreenWin* screen_win; + /// The spaceship minigame ScreenCredits* screen_credits; + /// Landing on the moon after win ScreenScores* screen_scores; ScreenConstellation* screen_constellation; + /// Journal after CO win ScreenRecap* screen_recap; ScreenArenaMenu* screen_arena_menu; ScreenArenaStagesSelect* screen_arena_stages_select1; From ae78c2f3be8d761b8005cd2d8886d798ff9e9409 Mon Sep 17 00:00:00 2001 From: Mr-Auto <36127424+Mr-Auto@users.noreply.github.com> Date: Mon, 6 Nov 2023 19:24:03 +0100 Subject: [PATCH 02/19] looking thru all screens in state --- docs/game_data/spel2.lua | 17 ++- docs/src/includes/_types.md | 21 +++- src/game_api/game_manager.hpp | 31 +++-- src/game_api/movable.hpp | 4 +- src/game_api/screen.hpp | 9 +- src/game_api/screen_arena.hpp | 119 ++++++++++-------- .../script/usertypes/screen_arena_lua.cpp | 23 +++- 7 files changed, 142 insertions(+), 82 deletions(-) diff --git a/docs/game_data/spel2.lua b/docs/game_data/spel2.lua index f0586bf7b..a9b1785ac 100644 --- a/docs/game_data/spel2.lua +++ b/docs/game_data/spel2.lua @@ -5989,6 +5989,15 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field sticker_count integer ---@field stickers TextureRenderingInfo[] @size: 20 +---@class ScreenControls + ---@field up boolean + ---@field down boolean + ---@field left boolean + ---@field right boolean + ---@field direction_input integer @-1 - none, 0 - UP, 1 - DOWN, 2 - LEFT, 3 - RIGHT + ---@field hold_down_timer integer @Delay after which fast scroll activates (can stop at different value, only matters when you hold down the direction button) + ---@field fast_scroll_timer integer + ---@class ScreenArenaMenu : Screen ---@field brick_background_animation ScreenZoomAnimation ---@field blurry_border_animation ScreenZoomAnimation @@ -6035,9 +6044,7 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field esc_next_panels_slide_timer number ---@field main_panel_vertical_scroll_position number ---@field selected_option_index integer - ---@field direction_input integer @-1 - none, 0 - UP, 1 - DOWN, 2 - LEFT, 3 - RIGHT - ---@field hold_down_timer integer @Delay after which fast scroll activates (can stop at different value, only matters when you hold down the direction button) - ---@field fast_scroll_timer integer + ---@field contols ScreenControls ---@class ScreenZoomAnimation ---@field zoom_target number @@ -6082,6 +6089,7 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field players_turn_scroll_handle TextureRenderingInfo ---@field grid_player_icon TextureRenderingInfo ---@field selected_stage_index integer + ---@field contols ScreenControls ---@class ScreenArenaItems : Screen ---@field woodpanel_top_slidein_timer number @@ -6116,6 +6124,7 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field center_panels_horizontal_slide_position number ---@field esc_panel_slide_timer number ---@field selected_item_index integer + ---@field controls ScreenControls ---@class ScreenArenaIntro : Screen ---@field players TextureRenderingInfo @@ -6162,7 +6171,7 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field unknown25 TextureRenderingInfo ---@field score_counter TextureRenderingInfo ---@field unknown27 TextureRenderingInfo - ---@field lava_bubbles TextureRenderingInfo + ---@field lava_bubbles ScreenArenaScoreLavaBubble[] @size: 15 ---@field player_won boolean[] @size: MAX_PLAYERS ---@field victory_jump_y_pos number ---@field victory_jump_velocity number diff --git a/docs/src/includes/_types.md b/docs/src/includes/_types.md index bc74fc999..bab7f4a2b 100644 --- a/docs/src/includes/_types.md +++ b/docs/src/includes/_types.md @@ -2024,6 +2024,7 @@ bool | [woodpanels_toggle](https://github.com/spelunky-fyi/overlunky/search?l=Lu float | [center_panels_horizontal_slide_position](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=center_panels_horizontal_slide_position) | float | [esc_panel_slide_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=esc_panel_slide_timer) | int | [selected_item_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=selected_item_index) | +[ScreenControls](#ScreenControls) | [controls](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=controls) | ### ScreenArenaLevel @@ -2088,9 +2089,7 @@ float | [center_panels_hor_slide_position](https://github.com/spelunky-fyi/overl float | [esc_next_panels_slide_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=esc_next_panels_slide_timer) | float | [main_panel_vertical_scroll_position](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=main_panel_vertical_scroll_position) | int | [selected_option_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=selected_option_index) | -int | [direction_input](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=direction_input) | -1 - none, 0 - UP, 1 - DOWN, 2 - LEFT, 3 - RIGHT -int | [hold_down_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=hold_down_timer) | Delay after which fast scroll activates (can stop at different value, only matters when you hold down the direction button) -int | [fast_scroll_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=fast_scroll_timer) | +[ScreenControls](#ScreenControls) | [contols](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=contols) | ### ScreenArenaScore @@ -2123,7 +2122,7 @@ int | [animation_sequence](https://github.com/spelunky-fyi/overlunky/search?l=Lu [TextureRenderingInfo](#TextureRenderingInfo) | [unknown25](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=unknown25) | [TextureRenderingInfo](#TextureRenderingInfo) | [score_counter](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=score_counter) | [TextureRenderingInfo](#TextureRenderingInfo) | [unknown27](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=unknown27) | -[TextureRenderingInfo](#TextureRenderingInfo) | [lava_bubbles](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=lava_bubbles) | +array<ScreenArenaScoreLavaBubble, 15> | [lava_bubbles](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=lava_bubbles) | array<bool, MAX_PLAYERS> | [player_won](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=player_won) | float | [victory_jump_y_pos](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=victory_jump_y_pos) | float | [victory_jump_velocity](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=victory_jump_velocity) | @@ -2182,6 +2181,7 @@ int | [buttons](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=buttons [TextureRenderingInfo](#TextureRenderingInfo) | [players_turn_scroll_handle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=players_turn_scroll_handle) | [TextureRenderingInfo](#TextureRenderingInfo) | [grid_player_icon](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=grid_player_icon) | int | [selected_stage_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=selected_stage_index) | +[ScreenControls](#ScreenControls) | [contols](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=contols) | ### ScreenCamp @@ -2301,6 +2301,19 @@ float | [constellation_text](https://github.com/spelunky-fyi/overlunky/search?l= [SoundMeta](#SoundMeta) | [explosion_and_loop](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=explosion_and_loop) | [SoundMeta](#SoundMeta) | [music](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=music) | +### ScreenControls + + +Type | Name | Description +---- | ---- | ----------- +bool | [up](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=up) | +bool | [down](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=down) | +bool | [left](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=left) | +bool | [right](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=right) | +int | [direction_input](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=direction_input) | -1 - none, 0 - UP, 1 - DOWN, 2 - LEFT, 3 - RIGHT +int | [hold_down_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=hold_down_timer) | Delay after which fast scroll activates (can stop at different value, only matters when you hold down the direction button) +int | [fast_scroll_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=fast_scroll_timer) | + ### ScreenCredits Derived from [Screen](#Screen) diff --git a/src/game_api/game_manager.hpp b/src/game_api/game_manager.hpp index 13f8bd4db..4dea74162 100644 --- a/src/game_api/game_manager.hpp +++ b/src/game_api/game_manager.hpp @@ -43,6 +43,11 @@ struct SaveRelated JournalPopupUI journal_popup_ui; }; +struct BGMUnknown +{ + std::array unknown; // probably wrong size +}; + struct BackgroundMusic { BackgroundSound* game_startup; @@ -64,10 +69,10 @@ struct BackgroundMusic uint8_t unknown17; uint8_t unknown18; uint8_t unknown19; - uint8_t unknown20; - int8_t skip[2400]; // 600 floats, mostly seem to be 1.0 - float idle_counter; - uint32_t unknown22; + uint8_t padding_probably; + std::array unknown21; // They continously go from 1 to 0 and back as a one big table, from first one to the last one, each change is one tick counted by the unknown22 + float idle_counter; // counts down at the start of a level, then reacts to the player movement controls + uint32_t unknown22; // some timer (counts continuously) }; struct KeyboardKey @@ -101,14 +106,14 @@ struct RawInput struct InputDevice { // No idea what these actually do, better not to expose this anyway - bool unknown1; - bool unknown2; - bool menu_input; + bool unknown1; // is_keyboard ? + bool unknown2; // is_controller ? + bool menu_input; // keyboard doesn't seam to care about this bool lost_connection; int8_t input_index; uint8_t padding2[3]; uint32_t buttons; - // a lot more stuff + uint8_t controller_index; // for XInput used in XInputSetState }; struct GameProps @@ -133,22 +138,22 @@ struct GameProps // uint8_t padding_probably1[3]; int32_t next_player_entrence; - int8_t unknown13; // -1 (leader player slot?) - int8_t unknown13; + int8_t unknown13a; // -1 (leader player slot?) + int8_t unknown13b; // uint8_t padding_probably2[2]; uint32_t unknown14a; - int8_t unknown14b; // -1 + int8_t unknown14b[3]; // -1 - // uint8_t padding_probably3[3]; + // uint8_t padding_probably3; uint32_t unknown15; // uint32_t padding_probably4; size_t* unknown16; size_t unknwon17; - std::array unknown18; // counts time or something? only active when the game window is active when there is a player choosen? + std::array unknown18; // counts time or something? only active when the game window is active when there is a player choosen? int32_t unknown19; int32_t unknown20; // -1 size_t unknown21; diff --git a/src/game_api/movable.hpp b/src/game_api/movable.hpp index be63d573b..8badf0250 100644 --- a/src/game_api/movable.hpp +++ b/src/game_api/movable.hpp @@ -137,11 +137,11 @@ class Movable : public Entity /// Return true if the entity is allowed to jump, even midair. Return false and can't jump, except from ladders apparently. virtual bool can_jump() = 0; // 37 - virtual void get_collision_info(CollisionInfo*) = 0; // 38 + virtual void get_collision_info(CollisionInfo* dest) = 0; // 38 virtual float sprint_factor() = 0; // 39 virtual void calculate_jump_height() = 0; // 40, when disabled, jump height is very high virtual std::unordered_map& get_animation_map() = 0; // 41 - virtual void apply_velocity(Vec2* velocities) = 0; // 42, param is pointer to an array of two floats: velocity x and y + virtual void apply_velocity(Vec2* velocities, bool) = 0; // 42, param is pointer to an array of two floats: velocity x and y, could be returninig something /// Returns stomp damage based on shoes and fall time virtual int8_t stomp_damage() = 0; // 43, calculates the amount of stomp damage applied (checks spike shoes, movable.state and stand_counter resulting in different damage values) virtual int8_t stomp_damage_trampoline() = 0; // 44, simply jumps to the 43rd virtual function, aka stomp_damage... diff --git a/src/game_api/screen.hpp b/src/game_api/screen.hpp index e1c0ddfbf..e38a4a8ba 100644 --- a/src/game_api/screen.hpp +++ b/src/game_api/screen.hpp @@ -472,7 +472,7 @@ class ScreenTeamSelect : public Screen // ID: 10 bool ready; }; -class ScreenCamp : public Screen // ID: 11 GameManager +class ScreenCamp : public Screen // ID: 11 GameManager, same as ScreenLevel { public: uint8_t buttons; @@ -591,8 +591,6 @@ class ScreenTransition : public Screen // ID: 13 uint32_t unknown45; uint32_t unknown46; uint32_t unknown47; - uint32_t unknown48; - uint32_t unknown49; }; /// The POST render call will only be visible in the polaroid area on the left of the book. The book is apparently drawn on top of that. @@ -615,8 +613,6 @@ class ScreenWin : public Screen // ID: 16 Entity* rescuing_ship_entity; size_t unknown8; - uint32_t unknown9; - uint32_t unknown10; }; class ScreenCredits : public Screen // ID: 17 @@ -650,11 +646,14 @@ class ScreenConstellation : public Screen // ID: 19 float* credits_progression; SoundMeta* explosion_and_loop; SoundMeta* music; + size_t unknown; // not sure if it's something actually there, or it's some allocator aliment to memory page or something, seam to happen a lot with the screens }; /// The recap book is drawn on top of the POST render event class ScreenRecap : public Screen // ID: 20 { + uint32_t unknown1; + uint32_t unknown2; }; struct ScreenZoomAnimation diff --git a/src/game_api/screen_arena.hpp b/src/game_api/screen_arena.hpp index 2195baea4..6434b94d7 100644 --- a/src/game_api/screen_arena.hpp +++ b/src/game_api/screen_arena.hpp @@ -1,5 +1,6 @@ #pragma once +#include "containers/custom_unordered_map.hpp" #include "screen.hpp" struct ArenaRulesString @@ -16,6 +17,20 @@ struct ArenaRulesString size_t some_offset; }; +struct ScreenControls +{ + bool up; + bool down; + bool left; + bool right; + /// -1 - none, 0 - UP, 1 - DOWN, 2 - LEFT, 3 - RIGHT + uint32_t direction_input; + /// Delay after which fast scroll activates (can stop at different value, only matters when you hold down the direction button) + uint32_t hold_down_timer; + uint32_t fast_scroll_timer; + uint8_t unknown57[3]; // some states, like screen depth +}; + class ScreenArenaMenu : public Screen // ID: 21 { public: @@ -64,25 +79,15 @@ class ScreenArenaMenu : public Screen // ID: 21 TextureRenderingInfo bottom_left_bricks; TextureRenderingInfo top_left_esc_panel; TextureRenderingInfo next_panel; - ArenaRulesString* option_captions; // 17 in total - size_t unknown46; - size_t unknown47; - bool unknown48; - uint8_t unknown49; - uint8_t unknown50; - uint8_t unknown51; + custom_vector option_captions; // I assume it's custom, it's filled with the screen construction + + uint32_t unknown48; // load state? uint32_t unknown52; float center_panels_hor_slide_position; float esc_next_panels_slide_timer; float main_panel_vertical_scroll_position; uint32_t selected_option_index; - uint32_t unknown53; - /// -1 - none, 0 - UP, 1 - DOWN, 2 - LEFT, 3 - RIGHT - uint32_t direction_input; - /// Delay after which fast scroll activates (can stop at different value, only matters when you hold down the direction button) - uint32_t hold_down_timer; - uint32_t fast_scroll_timer; - uint8_t unknown57[3]; // last one is 16 unless you go in level/item select screen, then it turns 17 + ScreenControls contols; }; class ScreenArenaStagesSelect : public Screen // ID: 22 and 24 @@ -134,29 +139,17 @@ class ScreenArenaStagesSelect : public Screen // ID: 22 and 24 TextureRenderingInfo players_turn_scroll; TextureRenderingInfo players_turn_scroll_handle; TextureRenderingInfo grid_player_icon; - float unknown30; - float unknown31; - float unknown32; - uint32_t unknown33; - uint32_t unknown34; - uint32_t unknown35; - uint32_t unknown36; - uint32_t unknown37; - uint32_t unknown38; - uint32_t unknown39; - uint32_t unknown40; - uint32_t unknown41; - uint32_t unknown42; - uint32_t unknown43; - uint32_t unknown44; - uint32_t unknown45; - uint32_t unknown46; - uint32_t unknown47; + float unknown30; // padding probably + custom_unordered_map stages_to_gay_out; // key is the stage, float is how gray out it is + + uint32_t unknown47; // load state? uint32_t unknown48; - uint32_t unknown49; - uint32_t unknown50; - uint32_t unknown51; + uint8_t unknown49; + uint8_t padding_probably[3]; + float panels_slide_from_both_sides; + float visibility_all_stages; uint32_t selected_stage_index; + ScreenControls contols; }; class ScreenArenaItems : public Screen // ID: 23 @@ -197,24 +190,13 @@ class ScreenArenaItems : public Screen // ID: 23 TextureRenderingInfo item_off_gray_overlay; TextureRenderingInfo esc_woodpanel; - float unknown22; - float unknown23; - size_t powerup_deactivation_related; - uint8_t powerup_deactivation_counter; /* unsure */ - uint8_t padding1; - uint16_t padding2; - uint32_t unknown25; - size_t unknown26; - size_t unknown27; - size_t unknown28; - uint32_t unknown29; - uint32_t unknown30; - uint32_t unknown31; - uint32_t unknown32; - uint32_t unknown33; + custom_unordered_map items_to_gay_out; + + float unknown33; float center_panels_horizontal_slide_position; float esc_panel_slide_timer; uint32_t selected_item_index; + ScreenControls controls; }; class ScreenArenaIntro : public Screen // ID: 25 @@ -227,6 +209,7 @@ class ScreenArenaIntro : public Screen // ID: 25 TextureRenderingInfo unknown_all_forced; TextureRenderingInfo left_scroll; TextureRenderingInfo right_scroll; + TextureRenderingInfo unknown1; float scroll_unfurl_timer; bool waiting; // when false, the cutscene ends and gameplay starts uint8_t unknown10b; @@ -241,6 +224,9 @@ class ScreenArenaIntro : public Screen // ID: 25 uint8_t unknown14c; uint8_t unknown14d; uint32_t countdown; // when 0, continues to gameplay + // uint32_t padding_probably + + std::array particles; }; class ScreenArenaLevel : public Screen // ID: 26 @@ -298,6 +284,33 @@ class ScreenArenaLevel : public Screen // ID: 26 TextureRenderingInfo unknown51; TextureRenderingInfo unknown52; TextureRenderingInfo unknown53; + std::array particles; +}; + +struct ScreenArenaScoreLavaBubble +{ + float x; + float y; + int16_t timer1; + uint8_t timer2; // counts down the the timer1 = -1 + bool unknown; +}; + +struct ScreenArenaScoreUnknown +{ + // this is mostly a guess + TextureRenderingInfo texture; + float some_x; // when not in use set to 9999.0 + float some_y; // when not in use set to 9999.0 + float unknown4; + float unknown5; + float unknown6; + float unknown7; + float unknown8; // when not in use set to float max + float unknown9; // when not in use set to float max + float unknown10; + float unknown11; + float unknown12; }; class ScreenArenaScore : public Screen // ID: 27 @@ -338,7 +351,7 @@ class ScreenArenaScore : public Screen // ID: 27 TextureRenderingInfo unknown25; TextureRenderingInfo score_counter; TextureRenderingInfo unknown27; - TextureRenderingInfo lava_bubbles; /* unsure */ + TextureRenderingInfo unknown28; std::array player_won; float victory_jump_y_pos; @@ -355,4 +368,8 @@ class ScreenArenaScore : public Screen // ID: 27 std::array player_crushing_pillar_height; std::array player_create_giblets; float next_sidepanel_slidein_timer; + // uint32_t padding_probably; + std::array particles; + std::array lava_bubbles; + std::array unknown45; // only used if one of the players win, probably the flying down confetti/featers }; diff --git a/src/game_api/script/usertypes/screen_arena_lua.cpp b/src/game_api/script/usertypes/screen_arena_lua.cpp index a33e52c49..52aa223f0 100644 --- a/src/game_api/script/usertypes/screen_arena_lua.cpp +++ b/src/game_api/script/usertypes/screen_arena_lua.cpp @@ -15,6 +15,23 @@ namespace NScreenArena { void register_usertypes(sol::state& lua) { + lua.new_usertype( + "ScreenControls", + "up", + &ScreenControls::up, + "down", + &ScreenControls::down, + "left", + &ScreenControls::left, + "right", + &ScreenControls::right, + "direction_input", + &ScreenControls::direction_input, + "hold_down_timer", + &ScreenControls::hold_down_timer, + "fast_scroll_timer", + &ScreenControls::fast_scroll_timer); + auto screenarenamenu_type = lua.new_usertype("ScreenArenaMenu", sol::base_classes, sol::bases()); screenarenamenu_type["brick_background_animation"] = &ScreenArenaMenu::brick_background_animation; screenarenamenu_type["blurry_border_animation"] = &ScreenArenaMenu::blurry_border_animation; @@ -61,9 +78,7 @@ void register_usertypes(sol::state& lua) screenarenamenu_type["esc_next_panels_slide_timer"] = &ScreenArenaMenu::esc_next_panels_slide_timer; screenarenamenu_type["main_panel_vertical_scroll_position"] = &ScreenArenaMenu::main_panel_vertical_scroll_position; screenarenamenu_type["selected_option_index"] = &ScreenArenaMenu::selected_option_index; - screenarenamenu_type["direction_input"] = &ScreenArenaMenu::direction_input; - screenarenamenu_type["hold_down_timer"] = &ScreenArenaMenu::hold_down_timer; - screenarenamenu_type["fast_scroll_timer"] = &ScreenArenaMenu::fast_scroll_timer; + screenarenamenu_type["contols"] = &ScreenArenaMenu::contols; lua.new_usertype( "ScreenZoomAnimation", @@ -110,6 +125,7 @@ void register_usertypes(sol::state& lua) screenarenastagesselect_type["players_turn_scroll_handle"] = &ScreenArenaStagesSelect::players_turn_scroll_handle; screenarenastagesselect_type["grid_player_icon"] = &ScreenArenaStagesSelect::grid_player_icon; screenarenastagesselect_type["selected_stage_index"] = &ScreenArenaStagesSelect::selected_stage_index; + screenarenastagesselect_type["contols"] = &ScreenArenaStagesSelect::contols; auto screenarenaitems_type = lua.new_usertype("ScreenArenaItems", sol::base_classes, sol::bases()); screenarenaitems_type["woodpanel_top_slidein_timer"] = &ScreenArenaItems::woodpanel_top_slidein_timer; @@ -144,6 +160,7 @@ void register_usertypes(sol::state& lua) screenarenaitems_type["center_panels_horizontal_slide_position"] = &ScreenArenaItems::center_panels_horizontal_slide_position; screenarenaitems_type["esc_panel_slide_timer"] = &ScreenArenaItems::esc_panel_slide_timer; screenarenaitems_type["selected_item_index"] = &ScreenArenaItems::selected_item_index; + screenarenaitems_type["controls"] = &ScreenArenaItems::controls; auto screenarenaintro_type = lua.new_usertype("ScreenArenaIntro", sol::base_classes, sol::bases()); screenarenaintro_type["players"] = &ScreenArenaIntro::players; From 310ea37114d29de4c35432e99c06a9c14b1f21c1 Mon Sep 17 00:00:00 2001 From: Mr-Auto <36127424+Mr-Auto@users.noreply.github.com> Date: Tue, 7 Nov 2023 22:20:11 +0100 Subject: [PATCH 03/19] screen main menu stuff --- src/game_api/screen.hpp | 125 ++++++++++++++----- src/game_api/screen_arena.hpp | 17 +-- src/game_api/script/usertypes/screen_lua.cpp | 2 +- 3 files changed, 95 insertions(+), 49 deletions(-) diff --git a/src/game_api/screen.hpp b/src/game_api/screen.hpp index e38a4a8ba..607b880e7 100644 --- a/src/game_api/screen.hpp +++ b/src/game_api/screen.hpp @@ -48,6 +48,9 @@ class ScreenLogo : public Screen // ID: 0 TextureRenderingInfo logo_mossmouth; TextureRenderingInfo logo_blitworks; TextureRenderingInfo logo_fmod; + /// 0 - mossmouth, 1 - blitworks, 2 - fmod, 3 - end (next screen) + uint32_t state; + uint32_t timer; }; class ScreenIntro : public Screen // ID: 1 @@ -85,8 +88,8 @@ class ScreenTitle : public Screen // ID: 3 ParticleEmitterInfo* particle_torchflame_backflames_animated; ParticleEmitterInfo* particle_torchflame_flames_animated; ParticleEmitterInfo* particle_torchflame_ash; - uint32_t unknown7; - float unknown8; + uint8_t unknown7a; // random very short timer that doesn't seam to do anything + float brightness; SoundMeta* music; SoundMeta* torch_sound; }; @@ -97,19 +100,64 @@ struct SpearDanglerAnimFrames uint32_t row; }; +struct ScreenControls +{ + bool up; + bool down; + bool left; + bool right; + /// -1 - none, 0 - UP, 1 - DOWN, 2 - LEFT, 3 - RIGHT + uint32_t direction_input; + /// Delay after which fast scroll activates (can stop at different value, only matters when you hold down the direction button) + uint32_t hold_down_timer; + uint32_t fast_scroll_timer; +}; + +struct MenuOption +{ + // return and first param are the same, pointer on stack, it really seam to be just two 32bit fields + // int is normally set to 0x2B and float to 0, if the third parameter is not 2, then the function sets first to 0, and the float to float max, + using OptionSelect = std::pair&(std::pair&, Screen* src, uint8_t); + + STRINGID option_name; + float y_position; + float brigthness; // 1.0 for selected item, 0 for non selected + bool enabled; // only visual thing, locks brigthness at 0 + // uint8_t padding_probably[3] + + OptionSelect* select; // called as soon as you hit enter on the selected option + // function is expected to play the select sound + // for main menu it also stops the cthulhu_sound (call kill(true) and set the pointer to null) when leaving the menu to different screen +}; + class ScreenMenu : public Screen // ID: 4 { public: - float unknown4; - float unknown5; + using ScreenTransition = void(); + + float backlayer_transition_speed; + float frontlayer_transition_speed; float unknown6; float unknown7; - float unknown8; - float unknown9; + float unknown8; // middle layer related? + uint32_t some_unknown_state; // 5 in main menu, 1 when going to different screen float unknown10; - float unknown11; - float unknown12; - uint32_t unknown13; + float zoom_in_progress; + float zoom_limit; + /* + 0: "cthulhu_pre_movement", + 1: "cthulhu_rotating", + 2: "cthulhu_separating", + 3: "cthulhu_lowering", + 4: "cthulhu_transition_to_menu", + 5: "return_from_backlayer", + 6: "highlight_selection", + 7: "idle", + 8: "to_submenu", + 9: "to_backlayer", + 10: "backlayer_idle" + */ + uint32_t state; TextureRenderingInfo tunnel_background; TextureRenderingInfo cthulhu_disc; TextureRenderingInfo tunnel_ring_darkbrown; @@ -124,42 +172,49 @@ class ScreenMenu : public Screen // ID: 4 TextureRenderingInfo spear_dangler_related; TextureRenderingInfo play_scroll; TextureRenderingInfo info_toast; - TextureRenderingInfo unknown15; + TextureRenderingInfo unknown15; // probably xbox username scroll uint32_t unknown16a; - uint32_t unknown16b; + uint32_t unknown16b; // padding probably SoundMeta* cthulhu_sound; - size_t unknown16e; // std::list ? - size_t unknown16f; // - float unknown16g; - float unknown16h; - float unknown16i; - float unknown16j; - size_t unknown16k; - std::vector unknown17; // pointers, vector of vectors? menu options? - std::vector unknown20; // unsure what's inside - size_t buttons; - uint32_t unknown23; - uint32_t unknown24; + ParticleEmitterInfo* particle_smoke; + ParticleEmitterInfo* particle_rubble; + float cthulhu_disc_ring_angle; + float cthulhu_disc_split_progress; + float cthulhu_disc_y; + float cthulhu_timer; + ScreenTransition* screen_transition; // called when you leave the menu, just sets the state.screen_next and stuff + + // game many times have pointer to this point, hoping this is some common struct for the menu :) + + std::vector> menu_tree; // always have the vector of the main menu, and then any deeper level menu, like Play or Online + std::vector menu_index_order; // to go back to + ScreenControls controls; uint32_t selected_menu_index; - uint32_t unknown26; - uint32_t unknown27; - uint32_t unknown28; - uint32_t unknown29a; - uint32_t unknown29b; + uint8_t sides_hold_down_timer; + uint8_t sides_fast_scroll_timer; + + // uint8_t padding_probably[2]; + + uint32_t unknown27; // pressed direction? 1 = left, 0 = right, no neutral, stays at the last state + bool loop; // allow going up from first to last option + + // uint8_t padding_probably[3]; + + uint32_t menu_id; // 0 = main menu, 1 = play, 2 = online + uint32_t transfer_to_menu_id; float menu_text_opacity; std::array spear_position; std::array spear_dangler; std::array spear_dangle_momentum; std::array spear_dangle_angle; - float play_scroll_descend_timer; + float play_scroll_descend; STRINGID scroll_text; - - float cthulhu_disc_ring_angle; - float cthulhu_disc_split_progress; - float cthulhu_disc_y; - float cthulhu_timer; + float shake_offset_x; + float shake_offset_y; + bool unknown30; + // maybe two more 32bit values? hard to tell }; class ScreenOptions : public Screen // ID: 5 @@ -596,6 +651,7 @@ class ScreenTransition : public Screen // ID: 13 /// The POST render call will only be visible in the polaroid area on the left of the book. The book is apparently drawn on top of that. class ScreenDeath : public Screen // ID: 14 { + public: size_t unknown; }; @@ -652,6 +708,7 @@ class ScreenConstellation : public Screen // ID: 19 /// The recap book is drawn on top of the POST render event class ScreenRecap : public Screen // ID: 20 { + public: uint32_t unknown1; uint32_t unknown2; }; diff --git a/src/game_api/screen_arena.hpp b/src/game_api/screen_arena.hpp index 6434b94d7..60246702a 100644 --- a/src/game_api/screen_arena.hpp +++ b/src/game_api/screen_arena.hpp @@ -17,20 +17,6 @@ struct ArenaRulesString size_t some_offset; }; -struct ScreenControls -{ - bool up; - bool down; - bool left; - bool right; - /// -1 - none, 0 - UP, 1 - DOWN, 2 - LEFT, 3 - RIGHT - uint32_t direction_input; - /// Delay after which fast scroll activates (can stop at different value, only matters when you hold down the direction button) - uint32_t hold_down_timer; - uint32_t fast_scroll_timer; - uint8_t unknown57[3]; // some states, like screen depth -}; - class ScreenArenaMenu : public Screen // ID: 21 { public: @@ -88,6 +74,7 @@ class ScreenArenaMenu : public Screen // ID: 21 float main_panel_vertical_scroll_position; uint32_t selected_option_index; ScreenControls contols; + uint8_t unknown57[3]; // some states, like screen depth }; class ScreenArenaStagesSelect : public Screen // ID: 22 and 24 @@ -150,6 +137,7 @@ class ScreenArenaStagesSelect : public Screen // ID: 22 and 24 float visibility_all_stages; uint32_t selected_stage_index; ScreenControls contols; + uint8_t unknown57[3]; // some states, like screen depth }; class ScreenArenaItems : public Screen // ID: 23 @@ -197,6 +185,7 @@ class ScreenArenaItems : public Screen // ID: 23 float esc_panel_slide_timer; uint32_t selected_item_index; ScreenControls controls; + uint8_t unknown57[3]; // some states, like screen depth }; class ScreenArenaIntro : public Screen // ID: 25 diff --git a/src/game_api/script/usertypes/screen_lua.cpp b/src/game_api/script/usertypes/screen_lua.cpp index bb09d50f1..2a99e8859 100644 --- a/src/game_api/script/usertypes/screen_lua.cpp +++ b/src/game_api/script/usertypes/screen_lua.cpp @@ -170,7 +170,7 @@ void register_usertypes(sol::state& lua) screenmenu_type["menu_text_opacity"] = &ScreenMenu::menu_text_opacity; screenmenu_type["spear_position"] = &ScreenMenu::spear_position; screenmenu_type["spear_dangler"] = &ScreenMenu::spear_dangler; - screenmenu_type["play_scroll_descend_timer"] = &ScreenMenu::play_scroll_descend_timer; + screenmenu_type["play_scroll_descend_timer"] = &ScreenMenu::play_scroll_descend; screenmenu_type["scroll_text"] = &ScreenMenu::scroll_text; auto screenoptions_type = lua.new_usertype("ScreenOptions", sol::base_classes, sol::bases()); From 7344620591bd835ac5fec9d8e3cb3f8c5e91195c Mon Sep 17 00:00:00 2001 From: Mr-Auto <36127424+Mr-Auto@users.noreply.github.com> Date: Sat, 11 Nov 2023 16:01:18 +0100 Subject: [PATCH 04/19] screen options, also some screen manu --- src/game_api/screen.hpp | 168 ++++++++++++------- src/game_api/screen_arena.hpp | 8 +- src/game_api/script/usertypes/screen_lua.cpp | 62 +++++-- 3 files changed, 160 insertions(+), 78 deletions(-) diff --git a/src/game_api/screen.hpp b/src/game_api/screen.hpp index 607b880e7..b55ea53e5 100644 --- a/src/game_api/screen.hpp +++ b/src/game_api/screen.hpp @@ -144,19 +144,17 @@ class ScreenMenu : public Screen // ID: 4 float unknown10; float zoom_in_progress; float zoom_limit; - /* - 0: "cthulhu_pre_movement", - 1: "cthulhu_rotating", - 2: "cthulhu_separating", - 3: "cthulhu_lowering", - 4: "cthulhu_transition_to_menu", - 5: "return_from_backlayer", - 6: "highlight_selection", - 7: "idle", - 8: "to_submenu", - 9: "to_backlayer", - 10: "backlayer_idle" - */ + /// 0: "cthulhu_pre_movement", + /// 1: "cthulhu_rotating", + /// 2: "cthulhu_separating", + /// 3: "cthulhu_lowering", + /// 4: "cthulhu_transition_to_menu", + /// 5: "return_from_backlayer", + /// 6: "highlight_selection", + /// 7: "idle", + /// 8: "to_submenu", + /// 9: "to_backlayer", + /// 10: "backlayer_idle" uint32_t state; TextureRenderingInfo tunnel_background; TextureRenderingInfo cthulhu_disc; @@ -175,7 +173,7 @@ class ScreenMenu : public Screen // ID: 4 TextureRenderingInfo unknown15; // probably xbox username scroll uint32_t unknown16a; - uint32_t unknown16b; // padding probably + uint32_t padding_probably1; SoundMeta* cthulhu_sound; ParticleEmitterInfo* particle_smoke; ParticleEmitterInfo* particle_rubble; @@ -185,12 +183,10 @@ class ScreenMenu : public Screen // ID: 4 float cthulhu_timer; ScreenTransition* screen_transition; // called when you leave the menu, just sets the state.screen_next and stuff - // game many times have pointer to this point, hoping this is some common struct for the menu :) - - std::vector> menu_tree; // always have the vector of the main menu, and then any deeper level menu, like Play or Online - std::vector menu_index_order; // to go back to + custom_vector> menu_tree; // always have the vector of the main menu, and then any deeper level menu, like Play or Online + custom_vector menu_index_order; // to go back to, probably needs a better name ScreenControls controls; - uint32_t selected_menu_index; + uint32_t selected_menu_index; // more like highlighted uint8_t sides_hold_down_timer; uint8_t sides_fast_scroll_timer; @@ -217,58 +213,93 @@ class ScreenMenu : public Screen // ID: 4 // maybe two more 32bit values? hard to tell }; +struct GraphicandAudioSettings +{ + uint32_t fullscreen_resolution_id; // depends on the GetMonitorInfo etc. + uint32_t windowed_resolution_id; // depends on the GetMonitorInfo etc. + /// 100 = 1.0 + uint32_t resolution_scale; + /// 0 = Fullscreen, 1 = Borderless Windowed, 2 = Windowed + uint8_t display_mode; + uint8_t unknown33; + bool unknown34; // if true, first input just sets it to false and does nothing else + uint8_t unknown35; + bool unknown36; // if it's not false, it's set to false and nothing else touches it ??? + // uint8_t padding_probably6[3]; + uint32_t unknown37; + uint32_t unknown38; +}; + class ScreenOptions : public Screen // ID: 5 { public: - std::vector unknown4; // menu options? - std::vector unknown7; // dunno - - uint32_t selected_menu_index; - uint16_t key_press_timer; // might be two separate values + custom_vector> menu_tree; + custom_vector menu_index_order; // to go back to, probably needs a better name + + // yes, this is just ScreenControls but up/down are reversed and not left/right for some reason + // also ScreenControls could include the selected_index, but in arena screen it's above and here it's below :| + bool DOWN; + bool UP; + // bool unused[2] + /// -1 = none, 0 = down, 1 = up + int32_t direction_input; + uint32_t hold_down_timer; + uint32_t fast_scroll_timer; - uint16_t unknown12; + uint32_t selected_menu_index; // more like highlighted + uint8_t sides_hold_down_timer; + uint8_t sides_fast_scroll_timer; + // uint16_t probably_padding1; + uint32_t unknown0; // pressed direction? 1 = left, 0 = right, no neutral, stays at the last state + bool loop; - bool moved_left; + // uint8_t probably_padding2[3]; - uint8_t padding1; - uint8_t padding2; - uint8_t padding3; - uint8_t unknown14; - uint8_t unknown15; - uint8_t unknown16; - uint8_t unknown17; + // this is probably similar stuff that is at the beginning of ScreenMenu + float unknown1; + float unknown2; + float unknown3; + float unknown4; + float unknown5; + uint32_t unknown6; + uint32_t unknown7; // speed related? + float unknown8; + float unknown9; + float unknown10; + float unknown11; + float unknown12; + float unknown13; + float unknown14; + uint32_t unknown15; + int32_t unknown16; + float unknown17; + float unknown18; - TextureRenderingInfo brick_border; float top_bottom_woodpanels_velocity; float top_bottom_woodpanels_progress; // set to 0 to start sliding in float scroll_unfurl_progress; // set to 0 to start unfurl - float unknown21; - float bottom_woodpanel_y; - float unknown23; - float top_bottom_woodpanels_slide_in_related; + float bottom_woodpanel_speed_multiplayer; + float bottom_woodpanel_y_offset; // maybe a resolution thing? TextureRenderingInfo bottom_woodpanel; TextureRenderingInfo top_woodpanel; - TextureRenderingInfo unknown27; + TextureRenderingInfo scroll; TextureRenderingInfo top_woodpanel_left_scrollhandle; TextureRenderingInfo top_woodpanel_right_scrollhandle; - STRINGID button_right_caption; - STRINGID button_middle_caption; + STRINGID scroll_text; + STRINGID bottom_left_text; + STRINGID bottom_right_text; + STRINGID bottom_middle_text; bool top_woodpanel_visible; bool bottom_woodpanel_visible; bool toggle_woodpanel_slidein_animation; bool capitalize_top_woodpanel; - uint32_t unknown28; - uint32_t current_menu_1; - uint32_t current_menu_2; - uint32_t unknown31; - uint32_t unknown32; - uint32_t unknown33; - uint32_t unknown34; - uint32_t unknown35; - uint32_t unknown36; - uint32_t unknown37; - uint32_t unknown38; + uint32_t unknown_state; // 0 = none, 2 = moving between inner menus, 3 = exiting menu options + uint32_t menu_id; + uint32_t transfer_to_menu_id; + bool show_apply_button; + // uint8_t padding_probably4[3]; + GraphicandAudioSettings graphic_and_audio; TextureRenderingInfo topleft_woodpanel_esc; TextureRenderingInfo brick_background; @@ -280,19 +311,32 @@ class ScreenOptions : public Screen // ID: 5 TextureRenderingInfo item_option_arrow_right; TextureRenderingInfo tooltip_background; TextureRenderingInfo progressbar_background; // brightness 'progressbar' background texture - TextureRenderingInfo unknown40; - TextureRenderingInfo progressbar_foreground; - TextureRenderingInfo progressbar_position_indicator; - TextureRenderingInfo sectionheader_background; // behind 'GRAPHICS' and 'AUDIO' + TextureRenderingInfo volume_progressbar_foreground; + TextureRenderingInfo progressbar_foreground; // the border + TextureRenderingInfo volume_progressbar_position_indicator; + TextureRenderingInfo sectionheader_background; // behind 'GRAPHICS' and 'AUDIO' the black bars - TextureRenderingInfo unknown44; + TextureRenderingInfo unknown44; // could be something else, or just not used in PC version or something TextureRenderingInfo unknown45; - float topleft_woodpanel_esc_slidein_timer; - float text_fadein_timer; - float vertical_scroll_effect_timer; + TextureRenderingInfo unknown46; + TextureRenderingInfo unknown47; + TextureRenderingInfo unknown48; + float unknown48a; // was supposto be topleft_woodpanel_esc_slidein? + float text_fadein; + float vertical_scroll_effect; uint8_t unknown49; - uint8_t unknown50; - uint8_t unknown51; + bool item_visiable; + bool item_highlight; + // uint8_t padding_probably8[5]; + custom_vector unknown50; // holds one 8 byte value, related to choosen opion menu + uint8_t unknown51; // probably bool + // padding_probably10[7]; + custom_vector tooltip_text; + size_t unknown53; + uint32_t unknown54; // some timer + uint32_t unknown55; // probably padding + size_t* credits_related; + size_t unknown57; }; class ScreenPlayerProfile : public Screen // ID: 6 diff --git a/src/game_api/screen_arena.hpp b/src/game_api/screen_arena.hpp index 60246702a..51f2934b7 100644 --- a/src/game_api/screen_arena.hpp +++ b/src/game_api/screen_arena.hpp @@ -72,7 +72,7 @@ class ScreenArenaMenu : public Screen // ID: 21 float center_panels_hor_slide_position; float esc_next_panels_slide_timer; float main_panel_vertical_scroll_position; - uint32_t selected_option_index; + uint32_t selected_option_index; // more like highlighted ScreenControls contols; uint8_t unknown57[3]; // some states, like screen depth }; @@ -135,7 +135,7 @@ class ScreenArenaStagesSelect : public Screen // ID: 22 and 24 uint8_t padding_probably[3]; float panels_slide_from_both_sides; float visibility_all_stages; - uint32_t selected_stage_index; + uint32_t selected_stage_index; // more like highlighted ScreenControls contols; uint8_t unknown57[3]; // some states, like screen depth }; @@ -183,7 +183,7 @@ class ScreenArenaItems : public Screen // ID: 23 float unknown33; float center_panels_horizontal_slide_position; float esc_panel_slide_timer; - uint32_t selected_item_index; + uint32_t selected_item_index; // more like highlighted ScreenControls controls; uint8_t unknown57[3]; // some states, like screen depth }; @@ -281,7 +281,7 @@ struct ScreenArenaScoreLavaBubble float x; float y; int16_t timer1; - uint8_t timer2; // counts down the the timer1 = -1 + uint8_t timer2; // counts down when the timer1 = -1 bool unknown; }; diff --git a/src/game_api/script/usertypes/screen_lua.cpp b/src/game_api/script/usertypes/screen_lua.cpp index 2a99e8859..f50be7d15 100644 --- a/src/game_api/script/usertypes/screen_lua.cpp +++ b/src/game_api/script/usertypes/screen_lua.cpp @@ -146,6 +146,7 @@ void register_usertypes(sol::state& lua) &SpearDanglerAnimFrames::row); auto screenmenu_type = lua.new_usertype("ScreenMenu", sol::base_classes, sol::bases()); + screenmenu_type["state"] = &ScreenMenu::state; screenmenu_type["tunnel_background"] = &ScreenMenu::tunnel_background; screenmenu_type["cthulhu_disc"] = &ScreenMenu::cthulhu_disc; screenmenu_type["tunnel_ring_darkbrown"] = &ScreenMenu::tunnel_ring_darkbrown; @@ -161,38 +162,61 @@ void register_usertypes(sol::state& lua) screenmenu_type["play_scroll"] = &ScreenMenu::play_scroll; screenmenu_type["info_toast"] = &ScreenMenu::info_toast; screenmenu_type["cthulhu_sound"] = &ScreenMenu::cthulhu_sound; + screenmenu_type["particle_smoke"] = &ScreenMenu::particle_smoke; + screenmenu_type["particle_rubble"] = &ScreenMenu::particle_rubble; screenmenu_type["cthulhu_disc_ring_angle"] = &ScreenMenu::cthulhu_disc_ring_angle; screenmenu_type["cthulhu_disc_split_progress"] = &ScreenMenu::cthulhu_disc_split_progress; screenmenu_type["cthulhu_disc_y"] = &ScreenMenu::cthulhu_disc_y; screenmenu_type["cthulhu_timer"] = &ScreenMenu::cthulhu_timer; + screenmenu_type["controls"] = &ScreenMenu::controls; screenmenu_type["selected_menu_index"] = &ScreenMenu::selected_menu_index; - screenmenu_type["menu_text_opacity"] = &ScreenMenu::menu_text_opacity; + screenmenu_type["sides_hold_down_timer"] = &ScreenMenu::sides_hold_down_timer; + screenmenu_type["sides_fast_scroll_timer"] = &ScreenMenu::sides_fast_scroll_timer; + screenmenu_type["loop"] = &ScreenMenu::loop; + screenmenu_type["menu_id"] = &ScreenMenu::menu_id; + screenmenu_type["transfer_to_menu_id"] = &ScreenMenu::transfer_to_menu_id; screenmenu_type["menu_text_opacity"] = &ScreenMenu::menu_text_opacity; screenmenu_type["spear_position"] = &ScreenMenu::spear_position; screenmenu_type["spear_dangler"] = &ScreenMenu::spear_dangler; + screenmenu_type["spear_dangle_momentum"] = &ScreenMenu::spear_dangle_momentum; + screenmenu_type["spear_dangle_angle"] = &ScreenMenu::spear_dangle_angle; screenmenu_type["play_scroll_descend_timer"] = &ScreenMenu::play_scroll_descend; screenmenu_type["scroll_text"] = &ScreenMenu::scroll_text; + screenmenu_type["shake_offset_x"] = &ScreenMenu::shake_offset_x; + screenmenu_type["shake_offset_y"] = &ScreenMenu::shake_offset_y; auto screenoptions_type = lua.new_usertype("ScreenOptions", sol::base_classes, sol::bases()); + screenoptions_type["DOWN"] = &ScreenOptions::DOWN; + screenoptions_type["UP"] = &ScreenOptions::UP; + screenoptions_type["direction_input"] = &ScreenOptions::direction_input; + screenoptions_type["UP"] = &ScreenOptions::UP; + screenoptions_type["hold_down_timer"] = &ScreenOptions::hold_down_timer; + screenoptions_type["fast_scroll_timer"] = &ScreenOptions::fast_scroll_timer; screenoptions_type["selected_menu_index"] = &ScreenOptions::selected_menu_index; - screenoptions_type["brick_border"] = &ScreenOptions::brick_border; + screenoptions_type["sides_hold_down_timer"] = &ScreenOptions::sides_hold_down_timer; + screenoptions_type["sides_fast_scroll_timer"] = &ScreenOptions::sides_fast_scroll_timer; + screenoptions_type["loop"] = &ScreenOptions::loop; screenoptions_type["top_bottom_woodpanels_velocity"] = &ScreenOptions::top_bottom_woodpanels_velocity; screenoptions_type["top_bottom_woodpanels_progress"] = &ScreenOptions::top_bottom_woodpanels_progress; screenoptions_type["scroll_unfurl_progress"] = &ScreenOptions::scroll_unfurl_progress; - screenoptions_type["bottom_woodpanel_y"] = &ScreenOptions::bottom_woodpanel_y; - screenoptions_type["top_bottom_woodpanels_slide_in_related"] = &ScreenOptions::top_bottom_woodpanels_slide_in_related; + screenoptions_type["bottom_woodpanel_speed_multiplayer"] = &ScreenOptions::bottom_woodpanel_speed_multiplayer; + screenoptions_type["bottom_woodpanel_y_offset"] = &ScreenOptions::bottom_woodpanel_y_offset; screenoptions_type["bottom_woodpanel"] = &ScreenOptions::bottom_woodpanel; screenoptions_type["top_woodpanel"] = &ScreenOptions::top_woodpanel; + screenoptions_type["scroll"] = &ScreenOptions::scroll; screenoptions_type["top_woodpanel_left_scrollhandle"] = &ScreenOptions::top_woodpanel_left_scrollhandle; screenoptions_type["top_woodpanel_right_scrollhandle"] = &ScreenOptions::top_woodpanel_right_scrollhandle; - screenoptions_type["button_right_caption"] = &ScreenOptions::button_right_caption; - screenoptions_type["button_middle_caption"] = &ScreenOptions::button_middle_caption; + screenoptions_type["scroll_text"] = &ScreenOptions::scroll_text; + screenoptions_type["bottom_left_text"] = &ScreenOptions::bottom_left_text; + screenoptions_type["bottom_right_text"] = &ScreenOptions::bottom_right_text; + screenoptions_type["bottom_middle_text"] = &ScreenOptions::bottom_middle_text; screenoptions_type["top_woodpanel_visible"] = &ScreenOptions::top_woodpanel_visible; screenoptions_type["bottom_woodpanel_visible"] = &ScreenOptions::bottom_woodpanel_visible; screenoptions_type["toggle_woodpanel_slidein_animation"] = &ScreenOptions::toggle_woodpanel_slidein_animation; screenoptions_type["capitalize_top_woodpanel"] = &ScreenOptions::capitalize_top_woodpanel; - screenoptions_type["current_menu_1"] = &ScreenOptions::current_menu_1; - screenoptions_type["current_menu_2"] = &ScreenOptions::current_menu_2; + screenoptions_type["menu_id"] = &ScreenOptions::menu_id; + screenoptions_type["transfer_to_menu_id"] = &ScreenOptions::transfer_to_menu_id; + screenoptions_type["graphic_and_audio"] = &ScreenOptions::graphic_and_audio; screenoptions_type["topleft_woodpanel_esc"] = &ScreenOptions::topleft_woodpanel_esc; screenoptions_type["brick_background"] = &ScreenOptions::brick_background; screenoptions_type["brick_middlelayer"] = &ScreenOptions::brick_middlelayer; @@ -203,12 +227,26 @@ void register_usertypes(sol::state& lua) screenoptions_type["item_option_arrow_right"] = &ScreenOptions::item_option_arrow_right; screenoptions_type["tooltip_background"] = &ScreenOptions::tooltip_background; screenoptions_type["progressbar_background"] = &ScreenOptions::progressbar_background; + screenoptions_type["volume_progressbar_foreground"] = &ScreenOptions::volume_progressbar_foreground; screenoptions_type["progressbar_foreground"] = &ScreenOptions::progressbar_foreground; - screenoptions_type["progressbar_position_indicator"] = &ScreenOptions::progressbar_position_indicator; + screenoptions_type["volume_progressbar_position_indicator"] = &ScreenOptions::volume_progressbar_position_indicator; screenoptions_type["sectionheader_background"] = &ScreenOptions::sectionheader_background; - screenoptions_type["topleft_woodpanel_esc_slidein_timer"] = &ScreenOptions::topleft_woodpanel_esc_slidein_timer; - screenoptions_type["text_fadein_timer"] = &ScreenOptions::text_fadein_timer; - screenoptions_type["vertical_scroll_effect_timer"] = &ScreenOptions::vertical_scroll_effect_timer; + screenoptions_type["text_fadein"] = &ScreenOptions::text_fadein; + screenoptions_type["vertical_scroll_effect"] = &ScreenOptions::vertical_scroll_effect; + screenoptions_type["item_visiable"] = &ScreenOptions::item_visiable; + screenoptions_type["item_highlight"] = &ScreenOptions::item_highlight; + screenoptions_type["tooltip_text"] = &ScreenOptions::tooltip_text; + + lua.new_usertype( + "GraphicandAudioSettings", + "fullscreen_resolution_id", + &GraphicandAudioSettings::fullscreen_resolution_id, + "windowed_resolution_id", + &GraphicandAudioSettings::windowed_resolution_id, + "resolution_scale", + &GraphicandAudioSettings::resolution_scale, + "display_mode", + &GraphicandAudioSettings::display_mode); lua.new_usertype( "ScreenPlayerProfile", From 629594b0f46adb1ba20b60184cb480521eb7a3bf Mon Sep 17 00:00:00 2001 From: Mr-Auto <36127424+Mr-Auto@users.noreply.github.com> Date: Sat, 11 Nov 2023 16:48:43 +0100 Subject: [PATCH 05/19] screen_player_profile and screen_leaderboards --- src/game_api/game_manager.hpp | 9 +++++---- src/game_api/screen.hpp | 10 ---------- src/game_api/script/usertypes/screen_lua.cpp | 12 ------------ 3 files changed, 5 insertions(+), 26 deletions(-) diff --git a/src/game_api/game_manager.hpp b/src/game_api/game_manager.hpp index 4dea74162..0e89aab26 100644 --- a/src/game_api/game_manager.hpp +++ b/src/game_api/game_manager.hpp @@ -11,14 +11,13 @@ struct SaveData; class ScreenCamp; class ScreenIntro; -class ScreenLeaderboards; +class Screen; class ScreenLevel; class ScreenLogo; class ScreenMenu; class ScreenOnlineLoading; class ScreenOnlineLobby; class ScreenOptions; -class ScreenPlayerProfile; class ScreenPrologue; class ScreenSeedInput; class ScreenTitle; @@ -181,8 +180,10 @@ struct GameManager ScreenTitle* screen_title; ScreenMenu* screen_menu; ScreenOptions* screen_options; - ScreenPlayerProfile* screen_player_profile; - ScreenLeaderboards* screen_leaderboards; + /// It just opens journal + Screen* screen_player_profile; + /// All handled by the Online + Screen* screen_leaderboards; ScreenSeedInput* screen_seed_input; size_t unknown_screen_character_select; // available in State size_t unknown_screen_team_select; // available in State diff --git a/src/game_api/screen.hpp b/src/game_api/screen.hpp index b55ea53e5..6a7a00eee 100644 --- a/src/game_api/screen.hpp +++ b/src/game_api/screen.hpp @@ -339,16 +339,6 @@ class ScreenOptions : public Screen // ID: 5 size_t unknown57; }; -class ScreenPlayerProfile : public Screen // ID: 6 -{ - public: // not reverse engineered -}; - -class ScreenLeaderboards : public Screen // ID: 7 -{ - public: // not reverse engineered -}; - class ScreenSeedInput : public Screen // ID: 8 { public: diff --git a/src/game_api/script/usertypes/screen_lua.cpp b/src/game_api/script/usertypes/screen_lua.cpp index f50be7d15..5e3cd3155 100644 --- a/src/game_api/script/usertypes/screen_lua.cpp +++ b/src/game_api/script/usertypes/screen_lua.cpp @@ -42,8 +42,6 @@ void register_usertypes(sol::state& lua) lua["Screen"]["as_screen_title"] = &Screen::as; lua["Screen"]["as_screen_menu"] = &Screen::as; lua["Screen"]["as_screen_options"] = &Screen::as; - lua["Screen"]["as_screen_player_profile"] = &Screen::as; - lua["Screen"]["as_screen_leaderboards"] = &Screen::as; lua["Screen"]["as_screen_seed_input"] = &Screen::as; lua["Screen"]["as_screen_character_select"] = &Screen::as; lua["Screen"]["as_screen_team_select"] = &Screen::as; @@ -248,16 +246,6 @@ void register_usertypes(sol::state& lua) "display_mode", &GraphicandAudioSettings::display_mode); - lua.new_usertype( - "ScreenPlayerProfile", - sol::base_classes, - sol::bases()); - - lua.new_usertype( - "ScreenLeaderboards", - sol::base_classes, - sol::bases()); - auto screenseedinput_type = lua.new_usertype("ScreenSeedInput", sol::base_classes, sol::bases()); screenseedinput_type["bottom_woodpanel_slideup_timer"] = &ScreenSeedInput::bottom_woodpanel_slideup_timer; screenseedinput_type["bottom_woodpanel_y"] = &ScreenSeedInput::bottom_woodpanel_y; From 65a8d9a2282d8c31a969c9c00cd17fa589c6e049 Mon Sep 17 00:00:00 2001 From: Mr-Auto <36127424+Mr-Auto@users.noreply.github.com> Date: Sat, 11 Nov 2023 17:43:18 +0100 Subject: [PATCH 06/19] `ScreenSeedInput` --- src/game_api/screen.hpp | 49 ++++++++++---------- src/game_api/script/usertypes/screen_lua.cpp | 27 +++++++---- 2 files changed, 43 insertions(+), 33 deletions(-) diff --git a/src/game_api/screen.hpp b/src/game_api/screen.hpp index d0fb49c12..997c2e281 100644 --- a/src/game_api/screen.hpp +++ b/src/game_api/screen.hpp @@ -343,39 +343,38 @@ class ScreenOptions : public Screen // ID: 5 class ScreenSeedInput : public Screen // ID: 8 { public: - uint16_t unknown4; - uint16_t unknown5; - float bottom_woodpanel_slideup_timer; + float bottom_woodpanel_slideup_speed; + float bottom_woodpanel_slideup; float unknown_timer; float unknown6; - float bottom_woodpanel_y; + float bottom_woodpanel_y_offset; TextureRenderingInfo bottom_woodpanel; - TextureRenderingInfo unknown8; + TextureRenderingInfo unknown8; // top_woodpanel? TextureRenderingInfo unknown9; TextureRenderingInfo unknown10; TextureRenderingInfo unknown11; - STRINGID unknown12; - STRINGID unknown13; - STRINGID buttons_text_id; - STRINGID unknown15; - uint8_t unknown16; - uint8_t unknown17; - uint8_t unknown18; + STRINGID unknown12; // this should be scroll_text and above the scroll TextureRenderingInfo, but for some reason they decided to redo it later in the struct + STRINGID bottom_left_text; + /// The only one actually used + STRINGID bottom_right_text; + STRINGID bottom_middle_text; + bool unknown16; + bool show_bottom_woodpanel; + bool slide_in_bottom_woodpanel; uint8_t unknown19; - uint8_t unknown20; - uint8_t unknown21; - uint8_t unknown22; - uint8_t unknown23; - uint32_t unknown24; - uint16_t unknown25; - + /// needs to be set before opening the screen to show the correct text at the bottom + bool allow_random; + // uint8_t probably_padding1[3]; + uint32_t selected_button_index; + bool pressed_select; + // uint8_t probably_padding2; uint16_t seed_chars[9]; // utf16 chars /// Current input length (0-8). You probably shouldn't write to this, except to set it to 0. - uint16_t seed_length; - uint16_t unknown39; + uint8_t seed_length; + // uint8_t probably_padding3[3]; - float topleft_woodpanel_esc_slidein_timer; + float topleft_woodpanel_esc_slidein; STRINGID scroll_text_id; STRINGID start_text_id; TextureRenderingInfo main_woodpanel_left_border; @@ -383,11 +382,11 @@ class ScreenSeedInput : public Screen // ID: 8 TextureRenderingInfo main_woodpanel_right_border; TextureRenderingInfo top_scroll; TextureRenderingInfo seed_letter_cutouts; - TextureRenderingInfo unknown40; - TextureRenderingInfo unknown41; + TextureRenderingInfo hand_pointer; + TextureRenderingInfo key_background; TextureRenderingInfo topleft_woodpanel_esc; TextureRenderingInfo start_sidepanel; - float start_sidepanel_slidein_timer; + float start_sidepanel_slidein; }; struct FlyingThing diff --git a/src/game_api/script/usertypes/screen_lua.cpp b/src/game_api/script/usertypes/screen_lua.cpp index d907b76bc..d4c2b2784 100644 --- a/src/game_api/script/usertypes/screen_lua.cpp +++ b/src/game_api/script/usertypes/screen_lua.cpp @@ -249,20 +249,31 @@ void register_usertypes(sol::state& lua) &GraphicandAudioSettings::display_mode); auto screenseedinput_type = lua.new_usertype("ScreenSeedInput", sol::base_classes, sol::bases()); - screenseedinput_type["bottom_woodpanel_slideup_timer"] = &ScreenSeedInput::bottom_woodpanel_slideup_timer; - screenseedinput_type["bottom_woodpanel_y"] = &ScreenSeedInput::bottom_woodpanel_y; + screenseedinput_type["bottom_woodpanel_slideup_speed"] = &ScreenSeedInput::bottom_woodpanel_slideup_speed; + screenseedinput_type["bottom_woodpanel_slideup_timer"] = &ScreenSeedInput::bottom_woodpanel_slideup; + screenseedinput_type["bottom_woodpanel_y_offset"] = &ScreenSeedInput::bottom_woodpanel_y_offset; screenseedinput_type["bottom_woodpanel"] = &ScreenSeedInput::bottom_woodpanel; - screenseedinput_type["buttons_text_id"] = &ScreenSeedInput::buttons_text_id; - screenseedinput_type["topleft_woodpanel_esc_slidein_timer"] = &ScreenSeedInput::topleft_woodpanel_esc_slidein_timer; + screenseedinput_type["bottom_left_text"] = &ScreenSeedInput::bottom_left_text; + screenseedinput_type["bottom_right_text"] = &ScreenSeedInput::bottom_right_text; + screenseedinput_type["bottom_middle_text"] = &ScreenSeedInput::bottom_middle_text; + screenseedinput_type["show_bottom_woodpanel"] = &ScreenSeedInput::show_bottom_woodpanel; + screenseedinput_type["slide_in_bottom_woodpanel"] = &ScreenSeedInput::slide_in_bottom_woodpanel; + screenseedinput_type["allow_random"] = &ScreenSeedInput::allow_random; + screenseedinput_type["selected_button_index"] = &ScreenSeedInput::selected_button_index; + screenseedinput_type["pressed_select"] = &ScreenSeedInput::pressed_select; + screenseedinput_type["topleft_woodpanel_esc_slidein_timer"] = &ScreenSeedInput::topleft_woodpanel_esc_slidein; screenseedinput_type["scroll_text_id"] = &ScreenSeedInput::scroll_text_id; screenseedinput_type["start_text_id"] = &ScreenSeedInput::start_text_id; screenseedinput_type["main_woodpanel_left_border"] = &ScreenSeedInput::main_woodpanel_left_border; screenseedinput_type["main_woodpanel_center"] = &ScreenSeedInput::main_woodpanel_center; screenseedinput_type["main_woodpanel_right_border"] = &ScreenSeedInput::main_woodpanel_right_border; + screenseedinput_type["top_scroll"] = &ScreenSeedInput::top_scroll; screenseedinput_type["seed_letter_cutouts"] = &ScreenSeedInput::seed_letter_cutouts; + screenseedinput_type["hand_pointer"] = &ScreenSeedInput::hand_pointer; + screenseedinput_type["key_background"] = &ScreenSeedInput::key_background; screenseedinput_type["topleft_woodpanel_esc"] = &ScreenSeedInput::topleft_woodpanel_esc; screenseedinput_type["start_sidepanel"] = &ScreenSeedInput::start_sidepanel; - screenseedinput_type["start_sidepanel_slidein_timer"] = &ScreenSeedInput::start_sidepanel_slidein_timer; + screenseedinput_type["start_sidepanel_slidein_timer"] = &ScreenSeedInput::start_sidepanel_slidein; screenseedinput_type["seed_length"] = &ScreenSeedInput::seed_length; screenseedinput_type["get_seed"] = [](ScreenSeedInput& s) -> std::optional { @@ -270,16 +281,16 @@ void register_usertypes(sol::state& lua) return std::nullopt; std::wstringstream ss; std::wstring seed_str; - for (uint16_t i = 0; i < s.seed_length; ++i) + for (uint8_t i = 0; i < s.seed_length; ++i) seed_str.push_back((wchar_t)(s.seed_chars[i])); ss << std::hex << seed_str; uint32_t seed{0}; ss >> seed; return seed; }; - screenseedinput_type["set_seed"] = [](ScreenSeedInput& s, std::optional seed, std::optional length) + screenseedinput_type["set_seed"] = [](ScreenSeedInput& s, std::optional seed, std::optional length) { - uint16_t len = length.value_or(8); + uint8_t len = length.value_or(8); if (len > 8) len = 8; if (seed.has_value()) From 4abbbff1dcaac5f8e402075300cdfe203fab6d51 Mon Sep 17 00:00:00 2001 From: Mr-Auto <36127424+Mr-Auto@users.noreply.github.com> Date: Sat, 11 Nov 2023 17:43:23 +0100 Subject: [PATCH 07/19] update doc --- docs/game_data/spel2.lua | 81 +++++++++++++++++++++++-------- docs/src/includes/_types.md | 96 ++++++++++++++++++++++++------------- 2 files changed, 125 insertions(+), 52 deletions(-) diff --git a/docs/game_data/spel2.lua b/docs/game_data/spel2.lua index 1b1e1bb6e..cc2c02c15 100644 --- a/docs/game_data/spel2.lua +++ b/docs/game_data/spel2.lua @@ -2256,8 +2256,8 @@ do ---@field screen_title ScreenTitle ---@field screen_menu ScreenMenu ---@field screen_options ScreenOptions - ---@field screen_player_profile ScreenPlayerProfile - ---@field screen_leaderboards ScreenLeaderboards + ---@field screen_player_profile Screen @It just opens journal + ---@field screen_leaderboards Screen @All handled by the Online ---@field screen_seed_input ScreenSeedInput ---@field screen_camp ScreenCamp ---@field screen_level ScreenLevel @@ -5565,6 +5565,7 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field row integer ---@class ScreenMenu : Screen + ---@field state integer @0: "cthulhu_pre_movement",
1: "cthulhu_rotating",
2: "cthulhu_separating",
3: "cthulhu_lowering",
4: "cthulhu_transition_to_menu",
5: "return_from_backlayer",
6: "highlight_selection",
7: "idle",
8: "to_submenu",
9: "to_backlayer",
10: "backlayer_idle" ---@field tunnel_background TextureRenderingInfo ---@field cthulhu_disc TextureRenderingInfo ---@field tunnel_ring_darkbrown TextureRenderingInfo @@ -5580,37 +5581,61 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field play_scroll TextureRenderingInfo ---@field info_toast TextureRenderingInfo ---@field cthulhu_sound SoundMeta + ---@field particle_smoke ParticleEmitterInfo + ---@field particle_rubble ParticleEmitterInfo ---@field cthulhu_disc_ring_angle number ---@field cthulhu_disc_split_progress number ---@field cthulhu_disc_y number ---@field cthulhu_timer number + ---@field controls ScreenControls ---@field selected_menu_index integer ----@field menu_text_opacity number + ---@field sides_hold_down_timer integer + ---@field sides_fast_scroll_timer integer + ---@field loop boolean + ---@field menu_id integer + ---@field transfer_to_menu_id integer + ---@field menu_text_opacity number ---@field spear_position number[] @size: 6 ---@field spear_dangler SpearDanglerAnimFrames[] @size: 6 + ---@field spear_dangle_momentum integer[] @size: 6 + ---@field spear_dangle_angle integer[] @size: 6 ---@field play_scroll_descend_timer number ---@field scroll_text STRINGID + ---@field shake_offset_x number + ---@field shake_offset_y number ---@class ScreenOptions : Screen + ---@field DOWN boolean + ---@field UP boolean + ---@field direction_input integer @-1 = none, 0 = down, 1 = up + ---@field UP boolean + ---@field hold_down_timer integer + ---@field fast_scroll_timer integer ---@field selected_menu_index integer - ---@field brick_border TextureRenderingInfo + ---@field sides_hold_down_timer integer + ---@field sides_fast_scroll_timer integer + ---@field loop boolean ---@field top_bottom_woodpanels_velocity number ---@field top_bottom_woodpanels_progress number ---@field scroll_unfurl_progress number - ---@field bottom_woodpanel_y number - ---@field top_bottom_woodpanels_slide_in_related number + ---@field bottom_woodpanel_speed_multiplayer number + ---@field bottom_woodpanel_y_offset number ---@field bottom_woodpanel TextureRenderingInfo ---@field top_woodpanel TextureRenderingInfo + ---@field scroll TextureRenderingInfo ---@field top_woodpanel_left_scrollhandle TextureRenderingInfo ---@field top_woodpanel_right_scrollhandle TextureRenderingInfo - ---@field button_right_caption STRINGID - ---@field button_middle_caption STRINGID + ---@field scroll_text STRINGID + ---@field bottom_left_text STRINGID + ---@field bottom_right_text STRINGID + ---@field bottom_middle_text STRINGID ---@field top_woodpanel_visible boolean ---@field bottom_woodpanel_visible boolean ---@field toggle_woodpanel_slidein_animation boolean ---@field capitalize_top_woodpanel boolean - ---@field current_menu_1 integer - ---@field current_menu_2 integer + ---@field menu_id integer + ---@field transfer_to_menu_id integer + ---@field graphic_and_audio GraphicandAudioSettings ---@field topleft_woodpanel_esc TextureRenderingInfo ---@field brick_background TextureRenderingInfo ---@field brick_middlelayer TextureRenderingInfo @@ -5621,29 +5646,45 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field item_option_arrow_right TextureRenderingInfo ---@field tooltip_background TextureRenderingInfo ---@field progressbar_background TextureRenderingInfo + ---@field volume_progressbar_foreground TextureRenderingInfo ---@field progressbar_foreground TextureRenderingInfo - ---@field progressbar_position_indicator TextureRenderingInfo + ---@field volume_progressbar_position_indicator TextureRenderingInfo ---@field sectionheader_background TextureRenderingInfo - ---@field topleft_woodpanel_esc_slidein_timer number - ---@field text_fadein_timer number - ---@field vertical_scroll_effect_timer number - ----@class ScreenPlayerProfile : Screen - ----@class ScreenLeaderboards : Screen + ---@field text_fadein number + ---@field vertical_scroll_effect number + ---@field item_visiable boolean + ---@field item_highlight boolean + ---@field tooltip_text STRINGID[] + +---@class GraphicandAudioSettings + ---@field fullscreen_resolution_id integer + ---@field windowed_resolution_id integer + ---@field resolution_scale integer @100 = 1.0 + ---@field display_mode integer @0 = Fullscreen, 1 = Borderless Windowed, 2 = Windowed ---@class ScreenSeedInput : Screen + ---@field bottom_woodpanel_slideup_speed number ---@field bottom_woodpanel_slideup_timer number - ---@field bottom_woodpanel_y number + ---@field bottom_woodpanel_y_offset number ---@field bottom_woodpanel TextureRenderingInfo - ---@field buttons_text_id STRINGID + ---@field bottom_left_text STRINGID + ---@field bottom_right_text STRINGID @The only one actually used + ---@field bottom_middle_text STRINGID + ---@field show_bottom_woodpanel boolean + ---@field slide_in_bottom_woodpanel boolean + ---@field allow_random boolean @needs to be set before opening the screen to show the correct text at the bottom + ---@field selected_button_index integer + ---@field pressed_select boolean ---@field topleft_woodpanel_esc_slidein_timer number ---@field scroll_text_id STRINGID ---@field start_text_id STRINGID ---@field main_woodpanel_left_border TextureRenderingInfo ---@field main_woodpanel_center TextureRenderingInfo ---@field main_woodpanel_right_border TextureRenderingInfo + ---@field top_scroll TextureRenderingInfo ---@field seed_letter_cutouts TextureRenderingInfo + ---@field hand_pointer TextureRenderingInfo + ---@field key_background TextureRenderingInfo ---@field topleft_woodpanel_esc TextureRenderingInfo ---@field start_sidepanel TextureRenderingInfo ---@field start_sidepanel_slidein_timer number diff --git a/docs/src/includes/_types.md b/docs/src/includes/_types.md index 636c8a45d..fe3d7d2ea 100644 --- a/docs/src/includes/_types.md +++ b/docs/src/includes/_types.md @@ -666,6 +666,16 @@ bool | [pressed](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=presse Type | Name | Description ---- | ---- | ----------- +### GraphicandAudioSettings + + +Type | Name | Description +---- | ---- | ----------- +int | [fullscreen_resolution_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=fullscreen_resolution_id) | +int | [windowed_resolution_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=windowed_resolution_id) | +int | [resolution_scale](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=resolution_scale) | 100 = 1.0 +int | [display_mode](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=display_mode) | 0 = Fullscreen, 1 = Borderless Windowed, 2 = Windowed + ### Hud @@ -2343,14 +2353,6 @@ float | [darkness](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=dark bool | [active](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=active) | ends the intro immediately if set to false bool | [skip_prologue](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=skip_prologue) | skips prologue and goes straight to the title screen after the intro -### ScreenLeaderboards - -Derived from [Screen](#Screen) - - -Type | Name | Description ----- | ---- | ----------- - ### ScreenLevel Derived from [Screen](#Screen) @@ -2378,6 +2380,7 @@ Derived from [Screen](#Screen) Type | Name | Description ---- | ---- | ----------- +int | [state](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=state) | 0: "cthulhu_pre_movement",
1: "cthulhu_rotating",
2: "cthulhu_separating",
3: "cthulhu_lowering",
4: "cthulhu_transition_to_menu",
5: "return_from_backlayer",
6: "highlight_selection",
7: "idle",
8: "to_submenu",
9: "to_backlayer",
10: "backlayer_idle" [TextureRenderingInfo](#TextureRenderingInfo) | [tunnel_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=tunnel_background) | [TextureRenderingInfo](#TextureRenderingInfo) | [cthulhu_disc](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=cthulhu_disc) | [TextureRenderingInfo](#TextureRenderingInfo) | [tunnel_ring_darkbrown](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=tunnel_ring_darkbrown) | @@ -2393,17 +2396,28 @@ Type | Name | Description [TextureRenderingInfo](#TextureRenderingInfo) | [play_scroll](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=play_scroll) | [TextureRenderingInfo](#TextureRenderingInfo) | [info_toast](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=info_toast) | [SoundMeta](#SoundMeta) | [cthulhu_sound](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=cthulhu_sound) | +[ParticleEmitterInfo](#ParticleEmitterInfo) | [particle_smoke](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=particle_smoke) | +[ParticleEmitterInfo](#ParticleEmitterInfo) | [particle_rubble](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=particle_rubble) | float | [cthulhu_disc_ring_angle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=cthulhu_disc_ring_angle) | float | [cthulhu_disc_split_progress](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=cthulhu_disc_split_progress) | float | [cthulhu_disc_y](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=cthulhu_disc_y) | float | [cthulhu_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=cthulhu_timer) | +[ScreenControls](#ScreenControls) | [controls](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=controls) | int | [selected_menu_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=selected_menu_index) | -float | [menu_text_opacity](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=menu_text_opacity) | +int | [sides_hold_down_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=sides_hold_down_timer) | +int | [sides_fast_scroll_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=sides_fast_scroll_timer) | +bool | [loop](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=loop) | +int | [menu_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=menu_id) | +int | [transfer_to_menu_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=transfer_to_menu_id) | float | [menu_text_opacity](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=menu_text_opacity) | array<float, 6> | [spear_position](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=spear_position) | array<[SpearDanglerAnimFrames](#SpearDanglerAnimFrames), 6> | [spear_dangler](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=spear_dangler) | +array<int, 6> | [spear_dangle_momentum](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=spear_dangle_momentum) | +array<int, 6> | [spear_dangle_angle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=spear_dangle_angle) | float | [play_scroll_descend_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=play_scroll_descend_timer) | [STRINGID](#Aliases) | [scroll_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll_text) | +float | [shake_offset_x](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=shake_offset_x) | +float | [shake_offset_y](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=shake_offset_y) | ### ScreenOnlineLoading @@ -2484,25 +2498,37 @@ Derived from [Screen](#Screen) Type | Name | Description ---- | ---- | ----------- +bool | [DOWN](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=DOWN) | +bool | [UP](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=UP) | +int | [direction_input](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=direction_input) | -1 = none, 0 = down, 1 = up +bool | [UP](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=UP) | +int | [hold_down_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=hold_down_timer) | +int | [fast_scroll_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=fast_scroll_timer) | int | [selected_menu_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=selected_menu_index) | -[TextureRenderingInfo](#TextureRenderingInfo) | [brick_border](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=brick_border) | +int | [sides_hold_down_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=sides_hold_down_timer) | +int | [sides_fast_scroll_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=sides_fast_scroll_timer) | +bool | [loop](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=loop) | float | [top_bottom_woodpanels_velocity](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_bottom_woodpanels_velocity) | float | [top_bottom_woodpanels_progress](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_bottom_woodpanels_progress) | float | [scroll_unfurl_progress](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll_unfurl_progress) | -float | [bottom_woodpanel_y](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_y) | -float | [top_bottom_woodpanels_slide_in_related](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_bottom_woodpanels_slide_in_related) | +float | [bottom_woodpanel_speed_multiplayer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_speed_multiplayer) | +float | [bottom_woodpanel_y_offset](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_y_offset) | [TextureRenderingInfo](#TextureRenderingInfo) | [bottom_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel) | [TextureRenderingInfo](#TextureRenderingInfo) | [top_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_woodpanel) | +[TextureRenderingInfo](#TextureRenderingInfo) | [scroll](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll) | [TextureRenderingInfo](#TextureRenderingInfo) | [top_woodpanel_left_scrollhandle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_woodpanel_left_scrollhandle) | [TextureRenderingInfo](#TextureRenderingInfo) | [top_woodpanel_right_scrollhandle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_woodpanel_right_scrollhandle) | -[STRINGID](#Aliases) | [button_right_caption](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=button_right_caption) | -[STRINGID](#Aliases) | [button_middle_caption](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=button_middle_caption) | +[STRINGID](#Aliases) | [scroll_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll_text) | +[STRINGID](#Aliases) | [bottom_left_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_left_text) | +[STRINGID](#Aliases) | [bottom_right_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_right_text) | +[STRINGID](#Aliases) | [bottom_middle_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_middle_text) | bool | [top_woodpanel_visible](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_woodpanel_visible) | bool | [bottom_woodpanel_visible](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_visible) | bool | [toggle_woodpanel_slidein_animation](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=toggle_woodpanel_slidein_animation) | bool | [capitalize_top_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=capitalize_top_woodpanel) | -int | [current_menu_1](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=current_menu_1) | -int | [current_menu_2](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=current_menu_2) | +int | [menu_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=menu_id) | +int | [transfer_to_menu_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=transfer_to_menu_id) | +[GraphicandAudioSettings](#GraphicandAudioSettings) | [graphic_and_audio](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=graphic_and_audio) | [TextureRenderingInfo](#TextureRenderingInfo) | [topleft_woodpanel_esc](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=topleft_woodpanel_esc) | [TextureRenderingInfo](#TextureRenderingInfo) | [brick_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=brick_background) | [TextureRenderingInfo](#TextureRenderingInfo) | [brick_middlelayer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=brick_middlelayer) | @@ -2513,20 +2539,15 @@ int | [current_menu_2](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q= [TextureRenderingInfo](#TextureRenderingInfo) | [item_option_arrow_right](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=item_option_arrow_right) | [TextureRenderingInfo](#TextureRenderingInfo) | [tooltip_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=tooltip_background) | [TextureRenderingInfo](#TextureRenderingInfo) | [progressbar_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=progressbar_background) | +[TextureRenderingInfo](#TextureRenderingInfo) | [volume_progressbar_foreground](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=volume_progressbar_foreground) | [TextureRenderingInfo](#TextureRenderingInfo) | [progressbar_foreground](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=progressbar_foreground) | -[TextureRenderingInfo](#TextureRenderingInfo) | [progressbar_position_indicator](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=progressbar_position_indicator) | +[TextureRenderingInfo](#TextureRenderingInfo) | [volume_progressbar_position_indicator](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=volume_progressbar_position_indicator) | [TextureRenderingInfo](#TextureRenderingInfo) | [sectionheader_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=sectionheader_background) | -float | [topleft_woodpanel_esc_slidein_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=topleft_woodpanel_esc_slidein_timer) | -float | [text_fadein_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=text_fadein_timer) | -float | [vertical_scroll_effect_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=vertical_scroll_effect_timer) | - -### ScreenPlayerProfile - -Derived from [Screen](#Screen) - - -Type | Name | Description ----- | ---- | ----------- +float | [text_fadein](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=text_fadein) | +float | [vertical_scroll_effect](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=vertical_scroll_effect) | +bool | [item_visiable](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=item_visiable) | +bool | [item_highlight](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=item_highlight) | +vector<[STRINGID](#Aliases)> | [tooltip_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=tooltip_text) | ### ScreenPrologue @@ -2574,17 +2595,28 @@ Derived from [Screen](#Screen) Type | Name | Description ---- | ---- | ----------- +float | [bottom_woodpanel_slideup_speed](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_slideup_speed) | float | [bottom_woodpanel_slideup_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_slideup_timer) | -float | [bottom_woodpanel_y](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_y) | +float | [bottom_woodpanel_y_offset](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_y_offset) | [TextureRenderingInfo](#TextureRenderingInfo) | [bottom_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel) | -[STRINGID](#Aliases) | [buttons_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=buttons_text_id) | +[STRINGID](#Aliases) | [bottom_left_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_left_text) | +[STRINGID](#Aliases) | [bottom_right_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_right_text) | The only one actually used +[STRINGID](#Aliases) | [bottom_middle_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_middle_text) | +bool | [show_bottom_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=show_bottom_woodpanel) | +bool | [slide_in_bottom_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=slide_in_bottom_woodpanel) | +bool | [allow_random](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=allow_random) | needs to be set before opening the screen to show the correct text at the bottom +int | [selected_button_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=selected_button_index) | +bool | [pressed_select](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=pressed_select) | float | [topleft_woodpanel_esc_slidein_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=topleft_woodpanel_esc_slidein_timer) | [STRINGID](#Aliases) | [scroll_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll_text_id) | [STRINGID](#Aliases) | [start_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_text_id) | [TextureRenderingInfo](#TextureRenderingInfo) | [main_woodpanel_left_border](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=main_woodpanel_left_border) | [TextureRenderingInfo](#TextureRenderingInfo) | [main_woodpanel_center](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=main_woodpanel_center) | [TextureRenderingInfo](#TextureRenderingInfo) | [main_woodpanel_right_border](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=main_woodpanel_right_border) | +[TextureRenderingInfo](#TextureRenderingInfo) | [top_scroll](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_scroll) | [TextureRenderingInfo](#TextureRenderingInfo) | [seed_letter_cutouts](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=seed_letter_cutouts) | +[TextureRenderingInfo](#TextureRenderingInfo) | [hand_pointer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=hand_pointer) | +[TextureRenderingInfo](#TextureRenderingInfo) | [key_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=key_background) | [TextureRenderingInfo](#TextureRenderingInfo) | [topleft_woodpanel_esc](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=topleft_woodpanel_esc) | [TextureRenderingInfo](#TextureRenderingInfo) | [start_sidepanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_sidepanel) | float | [start_sidepanel_slidein_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_sidepanel_slidein_timer) | @@ -2826,8 +2858,8 @@ Type | Name | Description [ScreenTitle](#ScreenTitle) | [screen_title](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_title) | [ScreenMenu](#ScreenMenu) | [screen_menu](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_menu) | [ScreenOptions](#ScreenOptions) | [screen_options](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_options) | -[ScreenPlayerProfile](#ScreenPlayerProfile) | [screen_player_profile](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_player_profile) | -[ScreenLeaderboards](#ScreenLeaderboards) | [screen_leaderboards](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_leaderboards) | +[Screen](#Screen) | [screen_player_profile](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_player_profile) | It just opens journal +[Screen](#Screen) | [screen_leaderboards](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_leaderboards) | All handled by the [Online](#Online) [ScreenSeedInput](#ScreenSeedInput) | [screen_seed_input](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_seed_input) | [ScreenCamp](#ScreenCamp) | [screen_camp](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_camp) | [ScreenLevel](#ScreenLevel) | [screen_level](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_level) | From e3fbdaf91223d18ae2e17b99032d938fc988a055 Mon Sep 17 00:00:00 2001 From: Mr-Auto <36127424+Mr-Auto@users.noreply.github.com> Date: Sat, 11 Nov 2023 21:01:54 +0100 Subject: [PATCH 08/19] rename `ScreenSeedInput` to `ScreenCodeInput` and `ScreenOnlineLobby` stuff --- src/game_api/game_manager.hpp | 6 +- src/game_api/screen.cpp | 25 ---- src/game_api/screen.hpp | 145 +++++++------------ src/game_api/script/usertypes/screen_lua.cpp | 144 +++++++++--------- 4 files changed, 130 insertions(+), 190 deletions(-) diff --git a/src/game_api/game_manager.hpp b/src/game_api/game_manager.hpp index 0e89aab26..abd950886 100644 --- a/src/game_api/game_manager.hpp +++ b/src/game_api/game_manager.hpp @@ -19,7 +19,7 @@ class ScreenOnlineLoading; class ScreenOnlineLobby; class ScreenOptions; class ScreenPrologue; -class ScreenSeedInput; +class ScreenCodeInput; class ScreenTitle; struct JournalUI; struct PauseUI; @@ -184,7 +184,7 @@ struct GameManager Screen* screen_player_profile; /// All handled by the Online Screen* screen_leaderboards; - ScreenSeedInput* screen_seed_input; + ScreenCodeInput* screen_seed_input; size_t unknown_screen_character_select; // available in State size_t unknown_screen_team_select; // available in State ScreenCamp* screen_camp; @@ -202,7 +202,7 @@ struct GameManager size_t unknown_screen_arena_items; // available in State size_t unknown_screen_arena_select; // available in State size_t unknown_screen_arena_intro; // available in State - size_t* screen_arena_level; // also available in State, but it's a different object! this one only has a render_timer, no UI parts + Screen* screen_arena_level; // also available in State, but it's a different object! Seams to only call pause function at the start, probably for the intro stuff size_t* unknown_screen_arena_score; // available in State ScreenOnlineLoading* screen_online_loading; ScreenOnlineLobby* screen_online_lobby; diff --git a/src/game_api/screen.cpp b/src/game_api/screen.cpp index 895870ec9..3335cba70 100644 --- a/src/game_api/screen.cpp +++ b/src/game_api/screen.cpp @@ -109,31 +109,6 @@ void Screen::unhook(std::uint32_t id) } } -void ScreenOnlineLobby::set_code(const std::string& code) -{ - if (code.length() != 8) - { - characters_entered_count = 0; - return; - } - std::string code_upper = code; - std::transform(code_upper.begin(), code_upper.end(), code_upper.begin(), [](unsigned char c) - { return (unsigned char)std::toupper(c); }); - - for (size_t x = 0; x < 8; ++x) - { - const unsigned char c = code.at(x); - auto valid = (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F'); - if (!valid) - { - characters_entered_count = 0; - return; - } - code_chars[x] = c; - } - characters_entered_count = 8; -} - Screen* get_screen_ptr(uint32_t screen_id) { auto game_manager = get_game_manager(); diff --git a/src/game_api/screen.hpp b/src/game_api/screen.hpp index 997c2e281..15d975bf6 100644 --- a/src/game_api/screen.hpp +++ b/src/game_api/screen.hpp @@ -340,38 +340,40 @@ class ScreenOptions : public Screen // ID: 5 size_t unknown57; }; -class ScreenSeedInput : public Screen // ID: 8 +class ScreenCodeInput : public Screen // ID: 8 { public: + // This beginning is the same for ScreenOnlineLobby and similar code can be found in ScreenOptions + float bottom_woodpanel_slideup_speed; float bottom_woodpanel_slideup; - float unknown_timer; - float unknown6; + float scroll_unfurl; + float unknown1; float bottom_woodpanel_y_offset; - TextureRenderingInfo bottom_woodpanel; - TextureRenderingInfo unknown8; // top_woodpanel? - TextureRenderingInfo unknown9; - TextureRenderingInfo unknown10; - TextureRenderingInfo unknown11; - STRINGID unknown12; // this should be scroll_text and above the scroll TextureRenderingInfo, but for some reason they decided to redo it later in the struct + TextureRenderingInfo woodpanel_bottom; + TextureRenderingInfo woodpanel_top; + TextureRenderingInfo scroll; + TextureRenderingInfo left_scroll_handle; + TextureRenderingInfo right_scroll_handle; + STRINGID scroll_text; STRINGID bottom_left_text; /// The only one actually used STRINGID bottom_right_text; STRINGID bottom_middle_text; - bool unknown16; + bool show_top_woodpanel; bool show_bottom_woodpanel; bool slide_in_bottom_woodpanel; - uint8_t unknown19; + uint8_t unknown2; /// needs to be set before opening the screen to show the correct text at the bottom bool allow_random; // uint8_t probably_padding1[3]; uint32_t selected_button_index; bool pressed_select; // uint8_t probably_padding2; - uint16_t seed_chars[9]; // utf16 chars + char16_t code_chars[9]; // utf16 chars /// Current input length (0-8). You probably shouldn't write to this, except to set it to 0. - uint8_t seed_length; + uint8_t code_length; // uint8_t probably_padding3[3]; float topleft_woodpanel_esc_slidein; @@ -387,6 +389,8 @@ class ScreenSeedInput : public Screen // ID: 8 TextureRenderingInfo topleft_woodpanel_esc; TextureRenderingInfo start_sidepanel; float start_sidepanel_slidein; + + virtual void unknown() = 0; // set seed? sets the game variables in state, for ScreenEnterOnlineCode it just sets the unknown10 }; struct FlyingThing @@ -773,53 +777,59 @@ class ScreenOnlineLoading : public Screen // ID: 28 struct OnlineLobbyScreenPlayer { - uint8_t unknown1; + /// 16 = PC, 17 = Discord, 18 = Steam, 19 = Xbox, 32 = Switch, 48 = PS, 49 = PS again? + uint8_t platform_icon; // werid numbers, anything else results in the startd PC icon, maybe it's some actual id /// 0 - Ana Spelunky, 1 - Margaret Tunnel, 2 - Colin Northward, 3 - Roffy D. Sloth.. and so on. Same order as in ENT_TYPE uint8_t character; bool ready; - uint8_t unknown2; + bool searching; +}; + +class ScreenEnterOnlineCode : public ScreenCodeInput // no ID, very special screen +{ + public: + int32_t unknown10; // -1 + TextureRenderingInfo enter_code_your_code_scroll; + TextureRenderingInfo enter_code_your_code_scroll_left_handle; + TextureRenderingInfo enter_code_your_code_scroll_right_handle; + uint32_t unknown11; + TextureRenderingInfo unknown12; + uint32_t unknown13; + TextureRenderingInfo unknown14; + TextureRenderingInfo unknown15; }; class ScreenOnlineLobby : public Screen // ID: 29 { public: - uint8_t unknown2; - uint8_t unknown3; - uint8_t unknown4; - uint8_t unknown5; - float woodpanels_slidein_timer; - float scroll_unfurl_timer; - uint32_t unknown8; - uint32_t unknown9; + // This beginning is the same for ScreenCodeInput and similar code can be found in ScreenOptions + + float bottom_woodpanel_slideup_speed; + float bottom_woodpanel_slideup; + float scroll_unfurl; + float unknown6; + float bottom_woodpanel_y_offset; TextureRenderingInfo woodpanel_bottom; TextureRenderingInfo woodpanel_top; - TextureRenderingInfo unknown13; + TextureRenderingInfo scroll; TextureRenderingInfo left_scroll_handle; TextureRenderingInfo right_scroll_handle; - STRINGID scroll_text_id; - STRINGID btn_left_text_id; - STRINGID btn_right_text_id; - STRINGID btn_center_text_id; - bool woodpanel_top_visible; - bool woodpanel_bottom_visible; - bool toggle_panels_slidein; - bool unknown21; + STRINGID scroll_text; + STRINGID bottom_left_text; + STRINGID bottom_right_text; + STRINGID bottom_middle_text; + bool show_top_woodpanel; + bool show_bottom_woodpanel; + bool slide_in_bottom_woodpanel; + uint8_t unknown21; std::array players; TextureRenderingInfo background_image; - size_t unknown22; - size_t unknown23; - size_t unknown24; - size_t unknown25; - size_t unknown26; - size_t unknown27; - size_t unknown28; - size_t unknown29; - size_t unknown30; + TextureRenderingInfo unknown35; TextureRenderingInfo unknown36; TextureRenderingInfo unknown37; float unknown38; TextureRenderingInfo topleft_woodpanel_esc; - float topleft_woodpanel_esc_slidein_timer; + float topleft_woodpanel_esc_slidein; float character_walk_offset; bool character_facing_left; int8_t move_direction; @@ -845,55 +855,10 @@ class ScreenOnlineLobby : public Screen // ID: 29 uint8_t unknown51; uint32_t unknown53; - // The following is actually class ScreenEnterOnlineCode but it has no direct pointer in GameManager - // or State. In assembly this pointer is accessed by &ScreenOnlineLobby + sizeof(ScreenOnlineLobby) - size_t enter_code_screen_vftable; - float enter_code_render_timer; - uint32_t unknown54; - float unknown56; - float enter_code_woodpanel_bottom_slidein_pos; - float unknown58; - float unknown59; - float unknown60; - TextureRenderingInfo enter_code_woodpanel_bottom; - TextureRenderingInfo unknown61; - TextureRenderingInfo unknown62; - TextureRenderingInfo unknown63; - TextureRenderingInfo unknown64; - STRINGID text_id_1; - STRINGID text_id_2; - STRINGID enter_code_btn_right_text_id; - STRINGID text_id_4; - bool enter_code_woodpanel_top_visible; - bool enter_code_woodpanel_bottom_visible; - bool enter_code_toggle_panels_slidein; - bool unknown68; - uint32_t unknown69; - uint32_t selected_character; - bool unknown71a; - uint8_t unknown71b; - uint16_t code_chars[8]; - uint16_t code_char_terminator; - uint32_t characters_entered_count; - float enter_code_topleft_woodpanel_esc_slidein_timer; - STRINGID enter_code_banner_text_id; - STRINGID enter_code_OK_text_id; - TextureRenderingInfo enter_code_main_woodpanel_left; - TextureRenderingInfo enter_code_main_woodpanel_center; - TextureRenderingInfo enter_code_main_woodpanel_right; - TextureRenderingInfo enter_code_banner; - TextureRenderingInfo enter_code_char_cutouts; - TextureRenderingInfo enter_code_pointing_hand; - TextureRenderingInfo enter_code_buttons; - TextureRenderingInfo unknown85; - TextureRenderingInfo enter_code_OK_panel; - float enter_code_OK_panel_slidein_timer; - int32_t unknown87; - TextureRenderingInfo enter_code_your_code_scroll; - TextureRenderingInfo enter_code_your_code_scroll_left_handle; - TextureRenderingInfo enter_code_your_code_scroll_right_handle; + // can't put ScreenEnterOnlineCode here as it's abstract class + // no idea how the game code apperently allows this, unless this is some compiler opimaization bullshit - void set_code(const std::string& code); + size_t screen_code_input; }; struct PauseUI diff --git a/src/game_api/script/usertypes/screen_lua.cpp b/src/game_api/script/usertypes/screen_lua.cpp index d4c2b2784..972e7ce15 100644 --- a/src/game_api/script/usertypes/screen_lua.cpp +++ b/src/game_api/script/usertypes/screen_lua.cpp @@ -44,7 +44,7 @@ void register_usertypes(sol::state& lua) lua["Screen"]["as_screen_title"] = &Screen::as; lua["Screen"]["as_screen_menu"] = &Screen::as; lua["Screen"]["as_screen_options"] = &Screen::as; - lua["Screen"]["as_screen_seed_input"] = &Screen::as; + lua["Screen"]["as_screen_seed_input"] = &Screen::as; lua["Screen"]["as_screen_character_select"] = &Screen::as; lua["Screen"]["as_screen_team_select"] = &Screen::as; lua["Screen"]["as_screen_camp"] = &Screen::as; @@ -248,47 +248,47 @@ void register_usertypes(sol::state& lua) "display_mode", &GraphicandAudioSettings::display_mode); - auto screenseedinput_type = lua.new_usertype("ScreenSeedInput", sol::base_classes, sol::bases()); - screenseedinput_type["bottom_woodpanel_slideup_speed"] = &ScreenSeedInput::bottom_woodpanel_slideup_speed; - screenseedinput_type["bottom_woodpanel_slideup_timer"] = &ScreenSeedInput::bottom_woodpanel_slideup; - screenseedinput_type["bottom_woodpanel_y_offset"] = &ScreenSeedInput::bottom_woodpanel_y_offset; - screenseedinput_type["bottom_woodpanel"] = &ScreenSeedInput::bottom_woodpanel; - screenseedinput_type["bottom_left_text"] = &ScreenSeedInput::bottom_left_text; - screenseedinput_type["bottom_right_text"] = &ScreenSeedInput::bottom_right_text; - screenseedinput_type["bottom_middle_text"] = &ScreenSeedInput::bottom_middle_text; - screenseedinput_type["show_bottom_woodpanel"] = &ScreenSeedInput::show_bottom_woodpanel; - screenseedinput_type["slide_in_bottom_woodpanel"] = &ScreenSeedInput::slide_in_bottom_woodpanel; - screenseedinput_type["allow_random"] = &ScreenSeedInput::allow_random; - screenseedinput_type["selected_button_index"] = &ScreenSeedInput::selected_button_index; - screenseedinput_type["pressed_select"] = &ScreenSeedInput::pressed_select; - screenseedinput_type["topleft_woodpanel_esc_slidein_timer"] = &ScreenSeedInput::topleft_woodpanel_esc_slidein; - screenseedinput_type["scroll_text_id"] = &ScreenSeedInput::scroll_text_id; - screenseedinput_type["start_text_id"] = &ScreenSeedInput::start_text_id; - screenseedinput_type["main_woodpanel_left_border"] = &ScreenSeedInput::main_woodpanel_left_border; - screenseedinput_type["main_woodpanel_center"] = &ScreenSeedInput::main_woodpanel_center; - screenseedinput_type["main_woodpanel_right_border"] = &ScreenSeedInput::main_woodpanel_right_border; - screenseedinput_type["top_scroll"] = &ScreenSeedInput::top_scroll; - screenseedinput_type["seed_letter_cutouts"] = &ScreenSeedInput::seed_letter_cutouts; - screenseedinput_type["hand_pointer"] = &ScreenSeedInput::hand_pointer; - screenseedinput_type["key_background"] = &ScreenSeedInput::key_background; - screenseedinput_type["topleft_woodpanel_esc"] = &ScreenSeedInput::topleft_woodpanel_esc; - screenseedinput_type["start_sidepanel"] = &ScreenSeedInput::start_sidepanel; - screenseedinput_type["start_sidepanel_slidein_timer"] = &ScreenSeedInput::start_sidepanel_slidein; - screenseedinput_type["seed_length"] = &ScreenSeedInput::seed_length; - screenseedinput_type["get_seed"] = [](ScreenSeedInput& s) -> std::optional + auto screenseedinput_type = lua.new_usertype("ScreenCodeInput", sol::base_classes, sol::bases()); + screenseedinput_type["bottom_woodpanel_slideup_speed"] = &ScreenCodeInput::bottom_woodpanel_slideup_speed; + screenseedinput_type["bottom_woodpanel_slideup_timer"] = &ScreenCodeInput::bottom_woodpanel_slideup; + screenseedinput_type["bottom_woodpanel_y_offset"] = &ScreenCodeInput::bottom_woodpanel_y_offset; + screenseedinput_type["bottom_woodpanel"] = &ScreenCodeInput::woodpanel_bottom; + screenseedinput_type["bottom_left_text"] = &ScreenCodeInput::bottom_left_text; + screenseedinput_type["bottom_right_text"] = &ScreenCodeInput::bottom_right_text; + screenseedinput_type["bottom_middle_text"] = &ScreenCodeInput::bottom_middle_text; + screenseedinput_type["show_bottom_woodpanel"] = &ScreenCodeInput::show_bottom_woodpanel; + screenseedinput_type["slide_in_bottom_woodpanel"] = &ScreenCodeInput::slide_in_bottom_woodpanel; + screenseedinput_type["allow_random"] = &ScreenCodeInput::allow_random; + screenseedinput_type["selected_button_index"] = &ScreenCodeInput::selected_button_index; + screenseedinput_type["pressed_select"] = &ScreenCodeInput::pressed_select; + screenseedinput_type["topleft_woodpanel_esc_slidein_timer"] = &ScreenCodeInput::topleft_woodpanel_esc_slidein; + screenseedinput_type["scroll_text_id"] = &ScreenCodeInput::scroll_text_id; + screenseedinput_type["start_text_id"] = &ScreenCodeInput::start_text_id; + screenseedinput_type["main_woodpanel_left_border"] = &ScreenCodeInput::main_woodpanel_left_border; + screenseedinput_type["main_woodpanel_center"] = &ScreenCodeInput::main_woodpanel_center; + screenseedinput_type["main_woodpanel_right_border"] = &ScreenCodeInput::main_woodpanel_right_border; + screenseedinput_type["top_scroll"] = &ScreenCodeInput::top_scroll; + screenseedinput_type["seed_letter_cutouts"] = &ScreenCodeInput::seed_letter_cutouts; + screenseedinput_type["hand_pointer"] = &ScreenCodeInput::hand_pointer; + screenseedinput_type["key_background"] = &ScreenCodeInput::key_background; + screenseedinput_type["topleft_woodpanel_esc"] = &ScreenCodeInput::topleft_woodpanel_esc; + screenseedinput_type["start_sidepanel"] = &ScreenCodeInput::start_sidepanel; + screenseedinput_type["start_sidepanel_slidein_timer"] = &ScreenCodeInput::start_sidepanel_slidein; + screenseedinput_type["seed_length"] = &ScreenCodeInput::code_length; + screenseedinput_type["get_seed"] = [](ScreenCodeInput& s) -> std::optional { - if (s.seed_length == 0) + if (s.code_length == 0) return std::nullopt; std::wstringstream ss; std::wstring seed_str; - for (uint8_t i = 0; i < s.seed_length; ++i) - seed_str.push_back((wchar_t)(s.seed_chars[i])); + for (uint8_t i = 0; i < s.code_length; ++i) + seed_str.push_back((wchar_t)(s.code_chars[i])); ss << std::hex << seed_str; uint32_t seed{0}; ss >> seed; return seed; }; - screenseedinput_type["set_seed"] = [](ScreenSeedInput& s, std::optional seed, std::optional length) + screenseedinput_type["set_seed"] = [](ScreenCodeInput& s, std::optional seed, std::optional length) { uint8_t len = length.value_or(8); if (len > 8) @@ -297,16 +297,16 @@ void register_usertypes(sol::state& lua) { std::wstringstream ss; ss << std::uppercase << std::hex << std::setw(len) << std::setfill(L'0') << seed.value(); - memcpy(s.seed_chars, ss.str().c_str(), len * 2); - s.seed_length = len; + memcpy(s.code_chars, ss.str().c_str(), len * 2); + s.code_length = len; } else { - s.seed_length = 0; + s.code_length = 0; } }; - /* ScreenSeedInput + /* ScreenCodeInput // get_seed // Get the seed currently entered in the seed dialog or nil if nothing is entered. Will also return incomplete seeds, check seed_length to verify it's ready. // set_seed @@ -588,29 +588,36 @@ void register_usertypes(sol::state& lua) lua.new_usertype( "OnlineLobbyScreenPlayer", + "platform_icon", + &OnlineLobbyScreenPlayer::platform_icon, "character", &OnlineLobbyScreenPlayer::character, "ready", - &OnlineLobbyScreenPlayer::ready); + &OnlineLobbyScreenPlayer::ready, + "searching", + &OnlineLobbyScreenPlayer::searching); auto screenonlinelobby_type = lua.new_usertype("ScreenOnlineLobby", sol::base_classes, sol::bases()); - screenonlinelobby_type["woodpanels_slidein_timer"] = &ScreenOnlineLobby::woodpanels_slidein_timer; - screenonlinelobby_type["scroll_unfurl_timer"] = &ScreenOnlineLobby::scroll_unfurl_timer; + screenonlinelobby_type["bottom_woodpanel_slideup_speed"] = &ScreenOnlineLobby::bottom_woodpanel_slideup_speed; + screenonlinelobby_type["bottom_woodpanel_slideup"] = &ScreenOnlineLobby::bottom_woodpanel_slideup; + screenonlinelobby_type["scroll_unfurl"] = &ScreenOnlineLobby::scroll_unfurl; + screenonlinelobby_type["bottom_woodpanel_y_offset"] = &ScreenOnlineLobby::bottom_woodpanel_y_offset; screenonlinelobby_type["woodpanel_bottom"] = &ScreenOnlineLobby::woodpanel_bottom; screenonlinelobby_type["woodpanel_top"] = &ScreenOnlineLobby::woodpanel_top; + screenonlinelobby_type["scroll"] = &ScreenOnlineLobby::scroll; screenonlinelobby_type["left_scroll_handle"] = &ScreenOnlineLobby::left_scroll_handle; screenonlinelobby_type["right_scroll_handle"] = &ScreenOnlineLobby::right_scroll_handle; - screenonlinelobby_type["scroll_text_id"] = &ScreenOnlineLobby::scroll_text_id; - screenonlinelobby_type["btn_left_text_id"] = &ScreenOnlineLobby::btn_left_text_id; - screenonlinelobby_type["btn_right_text_id"] = &ScreenOnlineLobby::btn_right_text_id; - screenonlinelobby_type["btn_center_text_id"] = &ScreenOnlineLobby::btn_center_text_id; - screenonlinelobby_type["woodpanel_top_visible"] = &ScreenOnlineLobby::woodpanel_top_visible; - screenonlinelobby_type["woodpanel_bottom_visible"] = &ScreenOnlineLobby::woodpanel_bottom_visible; - screenonlinelobby_type["toggle_panels_slidein"] = &ScreenOnlineLobby::toggle_panels_slidein; + screenonlinelobby_type["scroll_text"] = &ScreenOnlineLobby::scroll_text; + screenonlinelobby_type["bottom_left_text"] = &ScreenOnlineLobby::bottom_left_text; + screenonlinelobby_type["bottom_right_text"] = &ScreenOnlineLobby::bottom_right_text; + screenonlinelobby_type["bottom_middle_text"] = &ScreenOnlineLobby::bottom_middle_text; + screenonlinelobby_type["show_top_woodpanel"] = &ScreenOnlineLobby::show_top_woodpanel; + screenonlinelobby_type["show_bottom_woodpanel"] = &ScreenOnlineLobby::show_bottom_woodpanel; + screenonlinelobby_type["slide_in_bottom_woodpanel"] = &ScreenOnlineLobby::slide_in_bottom_woodpanel; screenonlinelobby_type["players"] = &ScreenOnlineLobby::players; screenonlinelobby_type["background_image"] = &ScreenOnlineLobby::background_image; screenonlinelobby_type["topleft_woodpanel_esc"] = &ScreenOnlineLobby::topleft_woodpanel_esc; - screenonlinelobby_type["topleft_woodpanel_esc_slidein_timer"] = &ScreenOnlineLobby::topleft_woodpanel_esc_slidein_timer; + screenonlinelobby_type["topleft_woodpanel_esc_slidein"] = &ScreenOnlineLobby::topleft_woodpanel_esc_slidein; screenonlinelobby_type["character_walk_offset"] = &ScreenOnlineLobby::character_walk_offset; screenonlinelobby_type["character_facing_left"] = &ScreenOnlineLobby::character_facing_left; screenonlinelobby_type["move_direction"] = &ScreenOnlineLobby::move_direction; @@ -624,30 +631,23 @@ void register_usertypes(sol::state& lua) screenonlinelobby_type["player_count"] = &ScreenOnlineLobby::player_count; screenonlinelobby_type["searching_for_players"] = &ScreenOnlineLobby::searching_for_players; screenonlinelobby_type["show_code_panel"] = &ScreenOnlineLobby::show_code_panel; - screenonlinelobby_type["enter_code_woodpanel_bottom_slidein_pos"] = &ScreenOnlineLobby::enter_code_woodpanel_bottom_slidein_pos; - screenonlinelobby_type["enter_code_woodpanel_bottom"] = &ScreenOnlineLobby::enter_code_woodpanel_bottom; - screenonlinelobby_type["enter_code_btn_right_text_id"] = &ScreenOnlineLobby::enter_code_btn_right_text_id; - screenonlinelobby_type["enter_code_woodpanel_top_visible"] = &ScreenOnlineLobby::enter_code_woodpanel_top_visible; - screenonlinelobby_type["enter_code_woodpanel_bottom_visible"] = &ScreenOnlineLobby::enter_code_woodpanel_bottom_visible; - screenonlinelobby_type["enter_code_toggle_panels_slidein"] = &ScreenOnlineLobby::enter_code_toggle_panels_slidein; - screenonlinelobby_type["selected_character"] = &ScreenOnlineLobby::selected_character; - screenonlinelobby_type["characters_entered_count"] = &ScreenOnlineLobby::characters_entered_count; - screenonlinelobby_type["enter_code_topleft_woodpanel_esc_slidein_timer"] = &ScreenOnlineLobby::enter_code_topleft_woodpanel_esc_slidein_timer; - screenonlinelobby_type["enter_code_banner_text_id"] = &ScreenOnlineLobby::enter_code_banner_text_id; - screenonlinelobby_type["enter_code_OK_text_id"] = &ScreenOnlineLobby::enter_code_OK_text_id; - screenonlinelobby_type["enter_code_main_woodpanel_left"] = &ScreenOnlineLobby::enter_code_main_woodpanel_left; - screenonlinelobby_type["enter_code_main_woodpanel_center"] = &ScreenOnlineLobby::enter_code_main_woodpanel_center; - screenonlinelobby_type["enter_code_main_woodpanel_right"] = &ScreenOnlineLobby::enter_code_main_woodpanel_right; - screenonlinelobby_type["enter_code_banner"] = &ScreenOnlineLobby::enter_code_banner; - screenonlinelobby_type["enter_code_char_cutouts"] = &ScreenOnlineLobby::enter_code_char_cutouts; - screenonlinelobby_type["enter_code_pointing_hand"] = &ScreenOnlineLobby::enter_code_pointing_hand; - screenonlinelobby_type["enter_code_buttons"] = &ScreenOnlineLobby::enter_code_buttons; - screenonlinelobby_type["enter_code_OK_panel"] = &ScreenOnlineLobby::enter_code_OK_panel; - screenonlinelobby_type["enter_code_OK_panel_slidein_timer"] = &ScreenOnlineLobby::enter_code_OK_panel_slidein_timer; - screenonlinelobby_type["enter_code_your_code_scroll"] = &ScreenOnlineLobby::enter_code_your_code_scroll; - screenonlinelobby_type["enter_code_your_code_scroll_left_handle"] = &ScreenOnlineLobby::enter_code_your_code_scroll_left_handle; - screenonlinelobby_type["enter_code_your_code_scroll_right_handle"] = &ScreenOnlineLobby::enter_code_your_code_scroll_right_handle; - screenonlinelobby_type["set_code"] = &ScreenOnlineLobby::set_code; + screenonlinelobby_type["screen_code_input"] = sol::property( + [](ScreenOnlineLobby* screen) -> ScreenEnterOnlineCode* + { + return reinterpret_cast(&screen->screen_code_input); + }); + + /// Available in ScreenOnlineLobby + lua.new_usertype( + "ScreenEnterOnlineCode", + "enter_code_your_code_scroll", + &ScreenEnterOnlineCode::enter_code_your_code_scroll, + "enter_code_your_code_scroll_left_handle", + &ScreenEnterOnlineCode::enter_code_your_code_scroll_left_handle, + "enter_code_your_code_scroll_right_handle", + &ScreenEnterOnlineCode::enter_code_your_code_scroll_right_handle, + sol::base_classes, + sol::bases()); lua.new_usertype( "PauseUI", From 7a6a891c20c0f20216ea2c24855e816823382eb7 Mon Sep 17 00:00:00 2001 From: Mr-Auto <36127424+Mr-Auto@users.noreply.github.com> Date: Sat, 11 Nov 2023 21:05:13 +0100 Subject: [PATCH 09/19] update doc --- docs/game_data/spel2.lua | 57 +++----- docs/src/includes/_types.md | 136 +++++++++---------- src/game_api/screen.hpp | 2 +- src/game_api/script/usertypes/screen_lua.cpp | 2 +- 4 files changed, 89 insertions(+), 108 deletions(-) diff --git a/docs/game_data/spel2.lua b/docs/game_data/spel2.lua index cc2c02c15..5a9ea9ebf 100644 --- a/docs/game_data/spel2.lua +++ b/docs/game_data/spel2.lua @@ -2258,7 +2258,7 @@ do ---@field screen_options ScreenOptions ---@field screen_player_profile Screen @It just opens journal ---@field screen_leaderboards Screen @All handled by the Online - ---@field screen_seed_input ScreenSeedInput + ---@field screen_seed_input ScreenCodeInput ---@field screen_camp ScreenCamp ---@field screen_level ScreenLevel ---@field screen_online_loading ScreenOnlineLoading @@ -5662,7 +5662,7 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field resolution_scale integer @100 = 1.0 ---@field display_mode integer @0 = Fullscreen, 1 = Borderless Windowed, 2 = Windowed ----@class ScreenSeedInput : Screen +---@class ScreenCodeInput : Screen ---@field bottom_woodpanel_slideup_speed number ---@field bottom_woodpanel_slideup_timer number ---@field bottom_woodpanel_y_offset number @@ -5682,7 +5682,7 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field main_woodpanel_center TextureRenderingInfo ---@field main_woodpanel_right_border TextureRenderingInfo ---@field top_scroll TextureRenderingInfo - ---@field seed_letter_cutouts TextureRenderingInfo + ---@field letter_cutouts TextureRenderingInfo ---@field hand_pointer TextureRenderingInfo ---@field key_background TextureRenderingInfo ---@field topleft_woodpanel_esc TextureRenderingInfo @@ -5690,7 +5690,7 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field start_sidepanel_slidein_timer number ---@field seed_length integer @Current input length (0-8). You probably shouldn't write to this, except to set it to 0. ---@field get_seed integer? - ---@field set_seed any @[](ScreenSeedInput&s + ---@field set_seed any @[](ScreenCodeInput&s ---@class ScreenCharacterSelect : Screen ---@field main_background_zoom_target number @@ -5883,27 +5883,32 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field ouroboros_angle number ---@class OnlineLobbyScreenPlayer + ---@field platform_icon integer @16 = PC, 17 = Discord, 18 = Steam, 19 = Xbox, 32 = Switch, 48 = PS, 49 = PS again? ---@field character integer @0 - Ana Spelunky, 1 - Margaret Tunnel, 2 - Colin Northward, 3 - Roffy D. Sloth.. and so on. Same order as in ENT_TYPE ---@field ready boolean + ---@field searching boolean ---@class ScreenOnlineLobby : Screen - ---@field woodpanels_slidein_timer number - ---@field scroll_unfurl_timer number + ---@field bottom_woodpanel_slideup_speed number + ---@field bottom_woodpanel_slideup number + ---@field scroll_unfurl number + ---@field bottom_woodpanel_y_offset number ---@field woodpanel_bottom TextureRenderingInfo ---@field woodpanel_top TextureRenderingInfo + ---@field scroll TextureRenderingInfo ---@field left_scroll_handle TextureRenderingInfo ---@field right_scroll_handle TextureRenderingInfo - ---@field scroll_text_id STRINGID - ---@field btn_left_text_id STRINGID - ---@field btn_right_text_id STRINGID - ---@field btn_center_text_id STRINGID - ---@field woodpanel_top_visible boolean - ---@field woodpanel_bottom_visible boolean - ---@field toggle_panels_slidein boolean + ---@field scroll_text STRINGID + ---@field bottom_left_text STRINGID + ---@field bottom_right_text STRINGID + ---@field bottom_middle_text STRINGID + ---@field show_top_woodpanel boolean + ---@field show_bottom_woodpanel boolean + ---@field slide_in_bottom_woodpanel boolean ---@field players OnlineLobbyScreenPlayer[] @size: 4 ---@field background_image TextureRenderingInfo ---@field topleft_woodpanel_esc TextureRenderingInfo - ---@field topleft_woodpanel_esc_slidein_timer number + ---@field topleft_woodpanel_esc_slidein number ---@field character_walk_offset number ---@field character_facing_left boolean ---@field move_direction integer @@ -5917,30 +5922,12 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field player_count integer ---@field searching_for_players boolean ---@field show_code_panel boolean - ---@field enter_code_woodpanel_bottom_slidein_pos number - ---@field enter_code_woodpanel_bottom TextureRenderingInfo - ---@field enter_code_btn_right_text_id STRINGID - ---@field enter_code_woodpanel_top_visible boolean - ---@field enter_code_woodpanel_bottom_visible boolean - ---@field enter_code_toggle_panels_slidein boolean - ---@field selected_character integer - ---@field characters_entered_count integer - ---@field enter_code_topleft_woodpanel_esc_slidein_timer number - ---@field enter_code_banner_text_id STRINGID - ---@field enter_code_OK_text_id STRINGID - ---@field enter_code_main_woodpanel_left TextureRenderingInfo - ---@field enter_code_main_woodpanel_center TextureRenderingInfo - ---@field enter_code_main_woodpanel_right TextureRenderingInfo - ---@field enter_code_banner TextureRenderingInfo - ---@field enter_code_char_cutouts TextureRenderingInfo - ---@field enter_code_pointing_hand TextureRenderingInfo - ---@field enter_code_buttons TextureRenderingInfo - ---@field enter_code_OK_panel TextureRenderingInfo - ---@field enter_code_OK_panel_slidein_timer number + ---@field screen_code_input any @sol::property([](ScreenOnlineLobby*screen)->ScreenEnterOnlineCode*{returnreinterpret_cast(&screen->screen_code_input) + +---@class ScreenEnterOnlineCode : ScreenCodeInput ---@field enter_code_your_code_scroll TextureRenderingInfo ---@field enter_code_your_code_scroll_left_handle TextureRenderingInfo ---@field enter_code_your_code_scroll_right_handle TextureRenderingInfo - ---@field set_code fun(self, code: string): nil ---@class PauseUI ---@field menu_slidein_progress number diff --git a/docs/src/includes/_types.md b/docs/src/includes/_types.md index fe3d7d2ea..0bebd3673 100644 --- a/docs/src/includes/_types.md +++ b/docs/src/includes/_types.md @@ -1940,8 +1940,10 @@ vector<[JournalPage](#JournalPage)> | [pages](https://github.com/spelunky- Type | Name | Description ---- | ---- | ----------- +int | [platform_icon](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=platform_icon) | 16 = PC, 17 = Discord, 18 = Steam, 19 = Xbox, 32 = [Switch](#Switch), 48 = PS, 49 = PS again? int | [character](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=character) | 0 - Ana Spelunky, 1 - Margaret Tunnel, 2 - Colin Northward, 3 - Roffy D. Sloth.. and so on. Same order as in [ENT_TYPE](#ENT_TYPE) bool | [ready](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ready) | +bool | [searching](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=searching) | ### PauseUI @@ -2273,6 +2275,42 @@ int | [flying_thing_countdown](https://github.com/spelunky-fyi/overlunky/search? [ParticleEmitterInfo](#ParticleEmitterInfo) | [particle_torchflame_flames4](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=particle_torchflame_flames4) | [SoundMeta](#SoundMeta) | [sound](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=sound) | +### ScreenCodeInput + +Derived from [Screen](#Screen) + + +Type | Name | Description +---- | ---- | ----------- +float | [bottom_woodpanel_slideup_speed](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_slideup_speed) | +float | [bottom_woodpanel_slideup_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_slideup_timer) | +float | [bottom_woodpanel_y_offset](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_y_offset) | +[TextureRenderingInfo](#TextureRenderingInfo) | [bottom_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel) | +[STRINGID](#Aliases) | [bottom_left_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_left_text) | +[STRINGID](#Aliases) | [bottom_right_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_right_text) | The only one actually used +[STRINGID](#Aliases) | [bottom_middle_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_middle_text) | +bool | [show_bottom_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=show_bottom_woodpanel) | +bool | [slide_in_bottom_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=slide_in_bottom_woodpanel) | +bool | [allow_random](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=allow_random) | needs to be set before opening the screen to show the correct text at the bottom +int | [selected_button_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=selected_button_index) | +bool | [pressed_select](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=pressed_select) | +float | [topleft_woodpanel_esc_slidein_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=topleft_woodpanel_esc_slidein_timer) | +[STRINGID](#Aliases) | [scroll_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll_text_id) | +[STRINGID](#Aliases) | [start_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_text_id) | +[TextureRenderingInfo](#TextureRenderingInfo) | [main_woodpanel_left_border](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=main_woodpanel_left_border) | +[TextureRenderingInfo](#TextureRenderingInfo) | [main_woodpanel_center](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=main_woodpanel_center) | +[TextureRenderingInfo](#TextureRenderingInfo) | [main_woodpanel_right_border](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=main_woodpanel_right_border) | +[TextureRenderingInfo](#TextureRenderingInfo) | [top_scroll](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_scroll) | +[TextureRenderingInfo](#TextureRenderingInfo) | [seed_letter_cutouts](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=seed_letter_cutouts) | +[TextureRenderingInfo](#TextureRenderingInfo) | [hand_pointer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=hand_pointer) | +[TextureRenderingInfo](#TextureRenderingInfo) | [key_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=key_background) | +[TextureRenderingInfo](#TextureRenderingInfo) | [topleft_woodpanel_esc](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=topleft_woodpanel_esc) | +[TextureRenderingInfo](#TextureRenderingInfo) | [start_sidepanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_sidepanel) | +float | [start_sidepanel_slidein_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_sidepanel_slidein_timer) | +int | [seed_length](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=seed_length) | Current input length (0-8). You probably shouldn't write to this, except to set it to 0. +optional<int> | [get_seed](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=get_seed) | Get the seed currently entered in the seed dialog or nil if nothing is entered. Will also return incomplete seeds, check seed_length to verify it's ready.
+ | [set_seed](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_seed) | Params: optional seed, optional length
Set the seed entered in the seed dialog. Call without arguments to clear entered seed. Optionally enter a length to set partial seed.
+ ### ScreenConstellation @@ -2341,6 +2379,18 @@ Derived from [Screen](#Screen) Type | Name | Description ---- | ---- | ----------- +### ScreenEnterOnlineCode + +Available in [ScreenOnlineLobby](#ScreenOnlineLobby) +Derived from [Screen](#Screen) [ScreenCodeInput](#ScreenCodeInput) + + +Type | Name | Description +---- | ---- | ----------- +[TextureRenderingInfo](#TextureRenderingInfo) | [enter_code_your_code_scroll](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter_code_your_code_scroll) | +[TextureRenderingInfo](#TextureRenderingInfo) | [enter_code_your_code_scroll_left_handle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter_code_your_code_scroll_left_handle) | +[TextureRenderingInfo](#TextureRenderingInfo) | [enter_code_your_code_scroll_right_handle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter_code_your_code_scroll_right_handle) | + ### ScreenIntro Derived from [Screen](#Screen) @@ -2436,23 +2486,26 @@ Derived from [Screen](#Screen) Type | Name | Description ---- | ---- | ----------- -float | [woodpanels_slidein_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanels_slidein_timer) | -float | [scroll_unfurl_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll_unfurl_timer) | +float | [bottom_woodpanel_slideup_speed](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_slideup_speed) | +float | [bottom_woodpanel_slideup](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_slideup) | +float | [scroll_unfurl](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll_unfurl) | +float | [bottom_woodpanel_y_offset](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_y_offset) | [TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel_bottom](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_bottom) | [TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel_top](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_top) | +[TextureRenderingInfo](#TextureRenderingInfo) | [scroll](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll) | [TextureRenderingInfo](#TextureRenderingInfo) | [left_scroll_handle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=left_scroll_handle) | [TextureRenderingInfo](#TextureRenderingInfo) | [right_scroll_handle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=right_scroll_handle) | -[STRINGID](#Aliases) | [scroll_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll_text_id) | -[STRINGID](#Aliases) | [btn_left_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=btn_left_text_id) | -[STRINGID](#Aliases) | [btn_right_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=btn_right_text_id) | -[STRINGID](#Aliases) | [btn_center_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=btn_center_text_id) | -bool | [woodpanel_top_visible](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_top_visible) | -bool | [woodpanel_bottom_visible](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_bottom_visible) | -bool | [toggle_panels_slidein](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=toggle_panels_slidein) | +[STRINGID](#Aliases) | [scroll_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll_text) | +[STRINGID](#Aliases) | [bottom_left_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_left_text) | +[STRINGID](#Aliases) | [bottom_right_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_right_text) | +[STRINGID](#Aliases) | [bottom_middle_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_middle_text) | +bool | [show_top_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=show_top_woodpanel) | +bool | [show_bottom_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=show_bottom_woodpanel) | +bool | [slide_in_bottom_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=slide_in_bottom_woodpanel) | array<[OnlineLobbyScreenPlayer](#OnlineLobbyScreenPlayer), 4> | [players](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=players) | [TextureRenderingInfo](#TextureRenderingInfo) | [background_image](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=background_image) | [TextureRenderingInfo](#TextureRenderingInfo) | [topleft_woodpanel_esc](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=topleft_woodpanel_esc) | -float | [topleft_woodpanel_esc_slidein_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=topleft_woodpanel_esc_slidein_timer) | +float | [topleft_woodpanel_esc_slidein](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=topleft_woodpanel_esc_slidein) | float | [character_walk_offset](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=character_walk_offset) | bool | [character_facing_left](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=character_facing_left) | int | [move_direction](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=move_direction) | @@ -2466,30 +2519,7 @@ float | [arrow_right_hor_offset](https://github.com/spelunky-fyi/overlunky/searc int | [player_count](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=player_count) | bool | [searching_for_players](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=searching_for_players) | bool | [show_code_panel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=show_code_panel) | -float | [enter_code_woodpanel_bottom_slidein_pos](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter_code_woodpanel_bottom_slidein_pos) | -[TextureRenderingInfo](#TextureRenderingInfo) | [enter_code_woodpanel_bottom](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter_code_woodpanel_bottom) | -[STRINGID](#Aliases) | [enter_code_btn_right_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter_code_btn_right_text_id) | -bool | [enter_code_woodpanel_top_visible](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter_code_woodpanel_top_visible) | -bool | [enter_code_woodpanel_bottom_visible](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter_code_woodpanel_bottom_visible) | -bool | [enter_code_toggle_panels_slidein](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter_code_toggle_panels_slidein) | -int | [selected_character](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=selected_character) | -int | [characters_entered_count](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=characters_entered_count) | -float | [enter_code_topleft_woodpanel_esc_slidein_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter_code_topleft_woodpanel_esc_slidein_timer) | -[STRINGID](#Aliases) | [enter_code_banner_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter_code_banner_text_id) | -[STRINGID](#Aliases) | [enter_code_OK_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter_code_OK_text_id) | -[TextureRenderingInfo](#TextureRenderingInfo) | [enter_code_main_woodpanel_left](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter_code_main_woodpanel_left) | -[TextureRenderingInfo](#TextureRenderingInfo) | [enter_code_main_woodpanel_center](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter_code_main_woodpanel_center) | -[TextureRenderingInfo](#TextureRenderingInfo) | [enter_code_main_woodpanel_right](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter_code_main_woodpanel_right) | -[TextureRenderingInfo](#TextureRenderingInfo) | [enter_code_banner](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter_code_banner) | -[TextureRenderingInfo](#TextureRenderingInfo) | [enter_code_char_cutouts](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter_code_char_cutouts) | -[TextureRenderingInfo](#TextureRenderingInfo) | [enter_code_pointing_hand](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter_code_pointing_hand) | -[TextureRenderingInfo](#TextureRenderingInfo) | [enter_code_buttons](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter_code_buttons) | -[TextureRenderingInfo](#TextureRenderingInfo) | [enter_code_OK_panel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter_code_OK_panel) | -float | [enter_code_OK_panel_slidein_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter_code_OK_panel_slidein_timer) | -[TextureRenderingInfo](#TextureRenderingInfo) | [enter_code_your_code_scroll](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter_code_your_code_scroll) | -[TextureRenderingInfo](#TextureRenderingInfo) | [enter_code_your_code_scroll_left_handle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter_code_your_code_scroll_left_handle) | -[TextureRenderingInfo](#TextureRenderingInfo) | [enter_code_your_code_scroll_right_handle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=enter_code_your_code_scroll_right_handle) | -nil | [set_code(string code)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_code) | + | [screen_code_input](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_code_input) | ### ScreenOptions @@ -2588,42 +2618,6 @@ int | [animation_state](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q int | [animation_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=animation_timer) | float | [woodpanel_slidedown_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_slidedown_timer) | -### ScreenSeedInput - -Derived from [Screen](#Screen) - - -Type | Name | Description ----- | ---- | ----------- -float | [bottom_woodpanel_slideup_speed](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_slideup_speed) | -float | [bottom_woodpanel_slideup_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_slideup_timer) | -float | [bottom_woodpanel_y_offset](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_y_offset) | -[TextureRenderingInfo](#TextureRenderingInfo) | [bottom_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel) | -[STRINGID](#Aliases) | [bottom_left_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_left_text) | -[STRINGID](#Aliases) | [bottom_right_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_right_text) | The only one actually used -[STRINGID](#Aliases) | [bottom_middle_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_middle_text) | -bool | [show_bottom_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=show_bottom_woodpanel) | -bool | [slide_in_bottom_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=slide_in_bottom_woodpanel) | -bool | [allow_random](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=allow_random) | needs to be set before opening the screen to show the correct text at the bottom -int | [selected_button_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=selected_button_index) | -bool | [pressed_select](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=pressed_select) | -float | [topleft_woodpanel_esc_slidein_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=topleft_woodpanel_esc_slidein_timer) | -[STRINGID](#Aliases) | [scroll_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll_text_id) | -[STRINGID](#Aliases) | [start_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_text_id) | -[TextureRenderingInfo](#TextureRenderingInfo) | [main_woodpanel_left_border](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=main_woodpanel_left_border) | -[TextureRenderingInfo](#TextureRenderingInfo) | [main_woodpanel_center](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=main_woodpanel_center) | -[TextureRenderingInfo](#TextureRenderingInfo) | [main_woodpanel_right_border](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=main_woodpanel_right_border) | -[TextureRenderingInfo](#TextureRenderingInfo) | [top_scroll](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_scroll) | -[TextureRenderingInfo](#TextureRenderingInfo) | [seed_letter_cutouts](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=seed_letter_cutouts) | -[TextureRenderingInfo](#TextureRenderingInfo) | [hand_pointer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=hand_pointer) | -[TextureRenderingInfo](#TextureRenderingInfo) | [key_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=key_background) | -[TextureRenderingInfo](#TextureRenderingInfo) | [topleft_woodpanel_esc](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=topleft_woodpanel_esc) | -[TextureRenderingInfo](#TextureRenderingInfo) | [start_sidepanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_sidepanel) | -float | [start_sidepanel_slidein_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_sidepanel_slidein_timer) | -int | [seed_length](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=seed_length) | Current input length (0-8). You probably shouldn't write to this, except to set it to 0. -optional<int> | [get_seed](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=get_seed) | Get the seed currently entered in the seed dialog or nil if nothing is entered. Will also return incomplete seeds, check seed_length to verify it's ready.
- | [set_seed](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_seed) | Params: optional seed, optional length
Set the seed entered in the seed dialog. Call without arguments to clear entered seed. Optionally enter a length to set partial seed.
- ### ScreenStateCamp Derived from [Screen](#Screen) @@ -2860,7 +2854,7 @@ Type | Name | Description [ScreenOptions](#ScreenOptions) | [screen_options](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_options) | [Screen](#Screen) | [screen_player_profile](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_player_profile) | It just opens journal [Screen](#Screen) | [screen_leaderboards](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_leaderboards) | All handled by the [Online](#Online) -[ScreenSeedInput](#ScreenSeedInput) | [screen_seed_input](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_seed_input) | +[ScreenCodeInput](#ScreenCodeInput) | [screen_seed_input](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_seed_input) | [ScreenCamp](#ScreenCamp) | [screen_camp](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_camp) | [ScreenLevel](#ScreenLevel) | [screen_level](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_level) | [ScreenOnlineLoading](#ScreenOnlineLoading) | [screen_online_loading](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_online_loading) | diff --git a/src/game_api/screen.hpp b/src/game_api/screen.hpp index 15d975bf6..d6995b098 100644 --- a/src/game_api/screen.hpp +++ b/src/game_api/screen.hpp @@ -383,7 +383,7 @@ class ScreenCodeInput : public Screen // ID: 8 TextureRenderingInfo main_woodpanel_center; TextureRenderingInfo main_woodpanel_right_border; TextureRenderingInfo top_scroll; - TextureRenderingInfo seed_letter_cutouts; + TextureRenderingInfo letter_cutouts; TextureRenderingInfo hand_pointer; TextureRenderingInfo key_background; TextureRenderingInfo topleft_woodpanel_esc; diff --git a/src/game_api/script/usertypes/screen_lua.cpp b/src/game_api/script/usertypes/screen_lua.cpp index 972e7ce15..b7ef45368 100644 --- a/src/game_api/script/usertypes/screen_lua.cpp +++ b/src/game_api/script/usertypes/screen_lua.cpp @@ -268,7 +268,7 @@ void register_usertypes(sol::state& lua) screenseedinput_type["main_woodpanel_center"] = &ScreenCodeInput::main_woodpanel_center; screenseedinput_type["main_woodpanel_right_border"] = &ScreenCodeInput::main_woodpanel_right_border; screenseedinput_type["top_scroll"] = &ScreenCodeInput::top_scroll; - screenseedinput_type["seed_letter_cutouts"] = &ScreenCodeInput::seed_letter_cutouts; + screenseedinput_type["letter_cutouts"] = &ScreenCodeInput::letter_cutouts; screenseedinput_type["hand_pointer"] = &ScreenCodeInput::hand_pointer; screenseedinput_type["key_background"] = &ScreenCodeInput::key_background; screenseedinput_type["topleft_woodpanel_esc"] = &ScreenCodeInput::topleft_woodpanel_esc; From 509734c9fb61c49a1dc067d97df49361736d67d0 Mon Sep 17 00:00:00 2001 From: Mr-Auto <36127424+Mr-Auto@users.noreply.github.com> Date: Sun, 12 Nov 2023 12:37:43 +0100 Subject: [PATCH 10/19] fix doc --- docs/game_data/spel2.lua | 7 +++---- docs/parse_source.py | 8 ++++++-- docs/src/includes/_types.md | 9 ++++----- src/game_api/screen.hpp | 4 ++-- src/game_api/script/usertypes/screen_lua.cpp | 12 ++++-------- 5 files changed, 19 insertions(+), 21 deletions(-) diff --git a/docs/game_data/spel2.lua b/docs/game_data/spel2.lua index 5a9ea9ebf..350097f34 100644 --- a/docs/game_data/spel2.lua +++ b/docs/game_data/spel2.lua @@ -5605,10 +5605,9 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field shake_offset_y number ---@class ScreenOptions : Screen - ---@field DOWN boolean - ---@field UP boolean + ---@field down boolean + ---@field up boolean ---@field direction_input integer @-1 = none, 0 = down, 1 = up - ---@field UP boolean ---@field hold_down_timer integer ---@field fast_scroll_timer integer ---@field selected_menu_index integer @@ -5922,7 +5921,7 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field player_count integer ---@field searching_for_players boolean ---@field show_code_panel boolean - ---@field screen_code_input any @sol::property([](ScreenOnlineLobby*screen)->ScreenEnterOnlineCode*{returnreinterpret_cast(&screen->screen_code_input) + ---@field screen_code_input ScreenEnterOnlineCode ---@class ScreenEnterOnlineCode : ScreenCodeInput ---@field enter_code_your_code_scroll TextureRenderingInfo diff --git a/docs/parse_source.py b/docs/parse_source.py index 7826fccdf..929518496 100644 --- a/docs/parse_source.py +++ b/docs/parse_source.py @@ -685,7 +685,11 @@ def run_parse(): var_name = var[0] cpp = var[1] - + # if "screenonlinelobby_type" in container: + # print_console(var_name) + # print_console(cpp) + # print_console(underlying_cpp_type['name']) + if var[1].startswith("sol::property"): param_match = re.match( rf"sol::property\(\[\]\({underlying_cpp_type['name']}&(\w+)\)", @@ -772,7 +776,7 @@ def run_parse(): ) else: m_return_type = re.search( - r"->([:<>\w]+){", var[1] + r"->([:<>\w*]+){", var[1] ) # Use var[1] instead of cpp because it could be replaced on the sol::property stuff if m_return_type: type = replace_fun(m_return_type[1]) diff --git a/docs/src/includes/_types.md b/docs/src/includes/_types.md index 0bebd3673..380dd29df 100644 --- a/docs/src/includes/_types.md +++ b/docs/src/includes/_types.md @@ -2301,7 +2301,7 @@ float | [topleft_woodpanel_esc_slidein_timer](https://github.com/spelunky-fyi/ov [TextureRenderingInfo](#TextureRenderingInfo) | [main_woodpanel_center](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=main_woodpanel_center) | [TextureRenderingInfo](#TextureRenderingInfo) | [main_woodpanel_right_border](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=main_woodpanel_right_border) | [TextureRenderingInfo](#TextureRenderingInfo) | [top_scroll](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_scroll) | -[TextureRenderingInfo](#TextureRenderingInfo) | [seed_letter_cutouts](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=seed_letter_cutouts) | +[TextureRenderingInfo](#TextureRenderingInfo) | [letter_cutouts](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=letter_cutouts) | [TextureRenderingInfo](#TextureRenderingInfo) | [hand_pointer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=hand_pointer) | [TextureRenderingInfo](#TextureRenderingInfo) | [key_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=key_background) | [TextureRenderingInfo](#TextureRenderingInfo) | [topleft_woodpanel_esc](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=topleft_woodpanel_esc) | @@ -2519,7 +2519,7 @@ float | [arrow_right_hor_offset](https://github.com/spelunky-fyi/overlunky/searc int | [player_count](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=player_count) | bool | [searching_for_players](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=searching_for_players) | bool | [show_code_panel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=show_code_panel) | - | [screen_code_input](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_code_input) | +[ScreenEnterOnlineCode](#ScreenEnterOnlineCode) | [screen_code_input](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_code_input) | ### ScreenOptions @@ -2528,10 +2528,9 @@ Derived from [Screen](#Screen) Type | Name | Description ---- | ---- | ----------- -bool | [DOWN](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=DOWN) | -bool | [UP](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=UP) | +bool | [down](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=down) | +bool | [up](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=up) | int | [direction_input](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=direction_input) | -1 = none, 0 = down, 1 = up -bool | [UP](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=UP) | int | [hold_down_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=hold_down_timer) | int | [fast_scroll_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=fast_scroll_timer) | int | [selected_menu_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=selected_menu_index) | diff --git a/src/game_api/screen.hpp b/src/game_api/screen.hpp index d6995b098..5408cad38 100644 --- a/src/game_api/screen.hpp +++ b/src/game_api/screen.hpp @@ -239,8 +239,8 @@ class ScreenOptions : public Screen // ID: 5 // yes, this is just ScreenControls but up/down are reversed and not left/right for some reason // also ScreenControls could include the selected_index, but in arena screen it's above and here it's below :| - bool DOWN; - bool UP; + bool down; + bool up; // bool unused[2] /// -1 = none, 0 = down, 1 = up int32_t direction_input; diff --git a/src/game_api/script/usertypes/screen_lua.cpp b/src/game_api/script/usertypes/screen_lua.cpp index b7ef45368..71736a0a6 100644 --- a/src/game_api/script/usertypes/screen_lua.cpp +++ b/src/game_api/script/usertypes/screen_lua.cpp @@ -186,10 +186,9 @@ void register_usertypes(sol::state& lua) screenmenu_type["shake_offset_y"] = &ScreenMenu::shake_offset_y; auto screenoptions_type = lua.new_usertype("ScreenOptions", sol::base_classes, sol::bases()); - screenoptions_type["DOWN"] = &ScreenOptions::DOWN; - screenoptions_type["UP"] = &ScreenOptions::UP; + screenoptions_type["down"] = &ScreenOptions::down; + screenoptions_type["up"] = &ScreenOptions::up; screenoptions_type["direction_input"] = &ScreenOptions::direction_input; - screenoptions_type["UP"] = &ScreenOptions::UP; screenoptions_type["hold_down_timer"] = &ScreenOptions::hold_down_timer; screenoptions_type["fast_scroll_timer"] = &ScreenOptions::fast_scroll_timer; screenoptions_type["selected_menu_index"] = &ScreenOptions::selected_menu_index; @@ -631,11 +630,8 @@ void register_usertypes(sol::state& lua) screenonlinelobby_type["player_count"] = &ScreenOnlineLobby::player_count; screenonlinelobby_type["searching_for_players"] = &ScreenOnlineLobby::searching_for_players; screenonlinelobby_type["show_code_panel"] = &ScreenOnlineLobby::show_code_panel; - screenonlinelobby_type["screen_code_input"] = sol::property( - [](ScreenOnlineLobby* screen) -> ScreenEnterOnlineCode* - { - return reinterpret_cast(&screen->screen_code_input); - }); + screenonlinelobby_type["screen_code_input"] = sol::property([](ScreenOnlineLobby* screen) -> ScreenEnterOnlineCode* + { return reinterpret_cast(&screen->screen_code_input); }); /// Available in ScreenOnlineLobby lua.new_usertype( From 861622bef9b17bfc32ac6083bc22fbe3751bc52a Mon Sep 17 00:00:00 2001 From: Mr-Auto <36127424+Mr-Auto@users.noreply.github.com> Date: Sun, 12 Nov 2023 12:57:16 +0100 Subject: [PATCH 11/19] fix `get_seed` and `set_seed` in the doc --- docs/game_data/spel2.lua | 4 +- docs/parse_source.py | 4 -- docs/src/includes/_types.md | 4 +- src/game_api/screen.cpp | 32 ++++++++++++++++ src/game_api/screen.hpp | 5 +++ src/game_api/script/usertypes/screen_lua.cpp | 40 +------------------- 6 files changed, 43 insertions(+), 46 deletions(-) diff --git a/docs/game_data/spel2.lua b/docs/game_data/spel2.lua index 350097f34..2d85a4527 100644 --- a/docs/game_data/spel2.lua +++ b/docs/game_data/spel2.lua @@ -5688,8 +5688,8 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field start_sidepanel TextureRenderingInfo ---@field start_sidepanel_slidein_timer number ---@field seed_length integer @Current input length (0-8). You probably shouldn't write to this, except to set it to 0. - ---@field get_seed integer? - ---@field set_seed any @[](ScreenCodeInput&s + ---@field get_seed fun(self): integer? @Get the seed currently entered in the seed dialog or nil if nothing is entered. Will also return incomplete seeds, check seed_length to verify it's ready. + ---@field set_seed fun(self, seed: integer?, length: integer?): nil @Set the seed entered in the seed dialog. Call without arguments to clear entered seed. Optionally enter a length to set partial seed. ---@class ScreenCharacterSelect : Screen ---@field main_background_zoom_target number diff --git a/docs/parse_source.py b/docs/parse_source.py index 929518496..1e08a1b3d 100644 --- a/docs/parse_source.py +++ b/docs/parse_source.py @@ -685,10 +685,6 @@ def run_parse(): var_name = var[0] cpp = var[1] - # if "screenonlinelobby_type" in container: - # print_console(var_name) - # print_console(cpp) - # print_console(underlying_cpp_type['name']) if var[1].startswith("sol::property"): param_match = re.match( diff --git a/docs/src/includes/_types.md b/docs/src/includes/_types.md index 380dd29df..827ee5e12 100644 --- a/docs/src/includes/_types.md +++ b/docs/src/includes/_types.md @@ -2308,8 +2308,8 @@ float | [topleft_woodpanel_esc_slidein_timer](https://github.com/spelunky-fyi/ov [TextureRenderingInfo](#TextureRenderingInfo) | [start_sidepanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_sidepanel) | float | [start_sidepanel_slidein_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_sidepanel_slidein_timer) | int | [seed_length](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=seed_length) | Current input length (0-8). You probably shouldn't write to this, except to set it to 0. -optional<int> | [get_seed](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=get_seed) | Get the seed currently entered in the seed dialog or nil if nothing is entered. Will also return incomplete seeds, check seed_length to verify it's ready.
- | [set_seed](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_seed) | Params: optional seed, optional length
Set the seed entered in the seed dialog. Call without arguments to clear entered seed. Optionally enter a length to set partial seed.
+optional<int> | [get_seed()](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=get_seed) | Get the seed currently entered in the seed dialog or nil if nothing is entered. Will also return incomplete seeds, check seed_length to verify it's ready. +nil | [set_seed(optional seed, optional length)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_seed) | Set the seed entered in the seed dialog. Call without arguments to clear entered seed. Optionally enter a length to set partial seed. ### ScreenConstellation diff --git a/src/game_api/screen.cpp b/src/game_api/screen.cpp index 3335cba70..1050d7a66 100644 --- a/src/game_api/screen.cpp +++ b/src/game_api/screen.cpp @@ -369,3 +369,35 @@ void show_journal(JOURNALUI_PAGE_SHOWN chapter, uint32_t page) gm->journal_ui->flipping_to_page = page; } } + +std::optional ScreenCodeInput::get_seed() +{ + if (code_length == 0) + return std::nullopt; + std::wstringstream ss; + std::wstring seed_str; + for (uint8_t i = 0; i < code_length; ++i) + seed_str.push_back((wchar_t)(code_chars[i])); + ss << std::hex << seed_str; + uint32_t seed{0}; + ss >> seed; + return seed; +} + +void ScreenCodeInput::set_seed(std::optional seed, std::optional length) +{ + uint8_t len = length.value_or(8); + if (len > 8) + len = 8; + if (seed.has_value()) + { + std::wstringstream ss; + ss << std::uppercase << std::hex << std::setw(len) << std::setfill(L'0') << seed.value(); + memcpy(code_chars, ss.str().c_str(), len * 2); + code_length = len; + } + else + { + code_length = 0; + } +} diff --git a/src/game_api/screen.hpp b/src/game_api/screen.hpp index 5408cad38..66d2b1f6e 100644 --- a/src/game_api/screen.hpp +++ b/src/game_api/screen.hpp @@ -390,6 +390,11 @@ class ScreenCodeInput : public Screen // ID: 8 TextureRenderingInfo start_sidepanel; float start_sidepanel_slidein; + /// Set the seed entered in the seed dialog. Call without arguments to clear entered seed. Optionally enter a length to set partial seed. + void set_seed(std::optional seed, std::optional length); + /// Get the seed currently entered in the seed dialog or nil if nothing is entered. Will also return incomplete seeds, check seed_length to verify it's ready. + std::optional get_seed(); + virtual void unknown() = 0; // set seed? sets the game variables in state, for ScreenEnterOnlineCode it just sets the unknown10 }; diff --git a/src/game_api/script/usertypes/screen_lua.cpp b/src/game_api/script/usertypes/screen_lua.cpp index 71736a0a6..8d26368dc 100644 --- a/src/game_api/script/usertypes/screen_lua.cpp +++ b/src/game_api/script/usertypes/screen_lua.cpp @@ -274,44 +274,8 @@ void register_usertypes(sol::state& lua) screenseedinput_type["start_sidepanel"] = &ScreenCodeInput::start_sidepanel; screenseedinput_type["start_sidepanel_slidein_timer"] = &ScreenCodeInput::start_sidepanel_slidein; screenseedinput_type["seed_length"] = &ScreenCodeInput::code_length; - screenseedinput_type["get_seed"] = [](ScreenCodeInput& s) -> std::optional - { - if (s.code_length == 0) - return std::nullopt; - std::wstringstream ss; - std::wstring seed_str; - for (uint8_t i = 0; i < s.code_length; ++i) - seed_str.push_back((wchar_t)(s.code_chars[i])); - ss << std::hex << seed_str; - uint32_t seed{0}; - ss >> seed; - return seed; - }; - screenseedinput_type["set_seed"] = [](ScreenCodeInput& s, std::optional seed, std::optional length) - { - uint8_t len = length.value_or(8); - if (len > 8) - len = 8; - if (seed.has_value()) - { - std::wstringstream ss; - ss << std::uppercase << std::hex << std::setw(len) << std::setfill(L'0') << seed.value(); - memcpy(s.code_chars, ss.str().c_str(), len * 2); - s.code_length = len; - } - else - { - s.code_length = 0; - } - }; - - /* ScreenCodeInput - // get_seed - // Get the seed currently entered in the seed dialog or nil if nothing is entered. Will also return incomplete seeds, check seed_length to verify it's ready. - // set_seed - // Params: optional seed, optional length - // Set the seed entered in the seed dialog. Call without arguments to clear entered seed. Optionally enter a length to set partial seed. - */ + screenseedinput_type["get_seed"] = &ScreenCodeInput::get_seed; + screenseedinput_type["set_seed"] = &ScreenCodeInput::set_seed; auto screencharacterselect_type = lua.new_usertype("ScreenCharacterSelect", sol::base_classes, sol::bases()); screencharacterselect_type["main_background_zoom_target"] = &ScreenCharacterSelect::main_background_zoom_target; From df6f14126d9961f2387d65d988aea6357c531724 Mon Sep 17 00:00:00 2001 From: Mr-Auto <36127424+Mr-Auto@users.noreply.github.com> Date: Sun, 12 Nov 2023 13:20:33 +0100 Subject: [PATCH 12/19] remove `InputDevice` from the doc --- docs/game_data/spel2.lua | 4 ---- docs/src/includes/_types.md | 8 -------- src/game_api/script/usertypes/game_manager_lua.cpp | 6 ------ 3 files changed, 18 deletions(-) diff --git a/docs/game_data/spel2.lua b/docs/game_data/spel2.lua index 2d85a4527..aa54edf70 100644 --- a/docs/game_data/spel2.lua +++ b/docs/game_data/spel2.lua @@ -2283,10 +2283,6 @@ do ---@field timer integer ---@field slide_position number ----@class InputDevice - ---@field input_index integer - ---@field buttons integer - ---@class GameProps ---@field input integer[] @size: MAX_PLAYERS @Used for player input and might be used for some menu inputs not found in buttons_menu. You can probably capture and edit this in ON.POST_PROCESS_INPUT. These are raw inputs, without things like autorun applied. ---@field input_previous integer[] @size: MAX_PLAYERS diff --git a/docs/src/includes/_types.md b/docs/src/includes/_types.md index 827ee5e12..3381a43d2 100644 --- a/docs/src/includes/_types.md +++ b/docs/src/includes/_types.md @@ -1056,14 +1056,6 @@ float | [mousewheel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=mo | [gamepads](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=gamepads) | [Gamepad](#Gamepad) gamepads(int index)
This is the XInput index 1..4, might not be the same as the player slot.
bool | [showcursor](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=showcursor) | -### InputDevice - - -Type | Name | Description ----- | ---- | ----------- -int | [input_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=input_index) | -int | [buttons](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=buttons) | - ### InputMapping Used in [PlayerSlot](#PlayerSlot) diff --git a/src/game_api/script/usertypes/game_manager_lua.cpp b/src/game_api/script/usertypes/game_manager_lua.cpp index 5c9879ca3..4c16e1608 100644 --- a/src/game_api/script/usertypes/game_manager_lua.cpp +++ b/src/game_api/script/usertypes/game_manager_lua.cpp @@ -97,12 +97,6 @@ void register_usertypes(sol::state& lua) &JournalPopupUI::timer, "slide_position", &JournalPopupUI::slide_position); - lua.new_usertype( - "InputDevice", - "input_index", - &InputDevice::input_index, - "buttons", - &InputDevice::buttons); lua.new_usertype( "GameProps", /// NoDoc From 75216850989cc54674571cb5125d9614417f8789 Mon Sep 17 00:00:00 2001 From: Mr-Auto <36127424+Mr-Auto@users.noreply.github.com> Date: Sun, 12 Nov 2023 21:03:40 +0100 Subject: [PATCH 13/19] more screens and stuff --- docs/game_data/spel2.lua | 14 +- docs/src/includes/_types.md | 14 +- src/game_api/game_manager.hpp | 10 ++ src/game_api/render_api.cpp | 4 +- src/game_api/screen.hpp | 157 +++++++------------ src/game_api/script/usertypes/screen_lua.cpp | 10 +- 6 files changed, 88 insertions(+), 121 deletions(-) diff --git a/docs/game_data/spel2.lua b/docs/game_data/spel2.lua index aa54edf70..7e6df4cdf 100644 --- a/docs/game_data/spel2.lua +++ b/docs/game_data/spel2.lua @@ -5647,8 +5647,8 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field sectionheader_background TextureRenderingInfo ---@field text_fadein number ---@field vertical_scroll_effect number - ---@field item_visiable boolean - ---@field item_highlight boolean + ---@field items_visiable boolean + ---@field show_highlight boolean @Shows the red background behind the option, the scarab on the left and left/right arrows ---@field tooltip_text STRINGID[] ---@class GraphicandAudioSettings @@ -5926,15 +5926,15 @@ function Quad:is_point_inside(x, y, epsilon) end ---@class PauseUI ---@field menu_slidein_progress number - ---@field blurred_background TextureRenderingInfo + ---@field blurred_background TextureRenderingInfo @Actually darkened background when you get a prompt asking are you sure about selecting that option ---@field woodpanel_left TextureRenderingInfo ---@field woodpanel_middle TextureRenderingInfo ---@field woodpanel_right TextureRenderingInfo ---@field woodpanel_top TextureRenderingInfo ---@field scroll TextureRenderingInfo - ---@field confirmation_panel TextureRenderingInfo - ---@field previously_selected_menu_index integer - ---@field visibility integer + ---@field confirmation_panel TextureRenderingInfo @Prompt background + ---@field previously_selected_menu_index integer @This is more like selected_option, it's set when you select an option and the game displays the prompt + ---@field visibility integer @0 - Invisible, 1 - Sliding down, 2 - Visible, 3 - Sliding up ---@class JournalUI ---@field state integer @@ -5962,7 +5962,6 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field coffeestain_top TextureRenderingInfo ---@class JournalPageJournalMenu : JournalPage - ---@field selected_menu_index integer ---@field journal_text_info TextRenderingInfo ---@field completion_badge TextureRenderingInfo @@ -6007,7 +6006,6 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field death_cause_text_info TextRenderingInfo ---@class JournalPageDeathMenu : JournalPage - ---@field selected_menu_index integer ---@field game_over_text_info TextRenderingInfo ---@field level_text_info TextRenderingInfo ---@field level_value_text_info TextRenderingInfo diff --git a/docs/src/includes/_types.md b/docs/src/includes/_types.md index 3381a43d2..69f08f9c4 100644 --- a/docs/src/includes/_types.md +++ b/docs/src/includes/_types.md @@ -1145,7 +1145,6 @@ Derived from [JournalPage](#JournalPage) Type | Name | Description ---- | ---- | ----------- -int | [selected_menu_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=selected_menu_index) | [TextRenderingInfo](#TextRenderingInfo) | [game_over_text_info](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=game_over_text_info) | [TextRenderingInfo](#TextRenderingInfo) | [level_text_info](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=level_text_info) | [TextRenderingInfo](#TextRenderingInfo) | [level_value_text_info](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=level_value_text_info) | @@ -1193,7 +1192,6 @@ Derived from [JournalPage](#JournalPage) Type | Name | Description ---- | ---- | ----------- -int | [selected_menu_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=selected_menu_index) | [TextRenderingInfo](#TextRenderingInfo) | [journal_text_info](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=journal_text_info) | [TextureRenderingInfo](#TextureRenderingInfo) | [completion_badge](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=completion_badge) | @@ -1943,15 +1941,15 @@ bool | [searching](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=sear Type | Name | Description ---- | ---- | ----------- float | [menu_slidein_progress](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=menu_slidein_progress) | -[TextureRenderingInfo](#TextureRenderingInfo) | [blurred_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=blurred_background) | +[TextureRenderingInfo](#TextureRenderingInfo) | [blurred_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=blurred_background) | Actually darkened background when you get a prompt asking are you sure about selecting that option [TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel_left](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_left) | [TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel_middle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_middle) | [TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel_right](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_right) | [TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel_top](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_top) | [TextureRenderingInfo](#TextureRenderingInfo) | [scroll](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll) | -[TextureRenderingInfo](#TextureRenderingInfo) | [confirmation_panel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=confirmation_panel) | -int | [previously_selected_menu_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=previously_selected_menu_index) | -int | [visibility](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=visibility) | +[TextureRenderingInfo](#TextureRenderingInfo) | [confirmation_panel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=confirmation_panel) | Prompt background +int | [previously_selected_menu_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=previously_selected_menu_index) | This is more like selected_option, it's set when you select an option and the game displays the prompt +int | [visibility](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=visibility) | 0 - Invisible, 1 - Sliding down, 2 - Visible, 3 - Sliding up ### SaveRelated @@ -2566,8 +2564,8 @@ int | [transfer_to_menu_id](https://github.com/spelunky-fyi/overlunky/search?l=L [TextureRenderingInfo](#TextureRenderingInfo) | [sectionheader_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=sectionheader_background) | float | [text_fadein](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=text_fadein) | float | [vertical_scroll_effect](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=vertical_scroll_effect) | -bool | [item_visiable](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=item_visiable) | -bool | [item_highlight](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=item_highlight) | +bool | [items_visiable](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=items_visiable) | +bool | [show_highlight](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=show_highlight) | Shows the red background behind the option, the scarab on the left and left/right arrows vector<[STRINGID](#Aliases)> | [tooltip_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=tooltip_text) | ### ScreenPrologue diff --git a/src/game_api/game_manager.hpp b/src/game_api/game_manager.hpp index abd950886..2d5969762 100644 --- a/src/game_api/game_manager.hpp +++ b/src/game_api/game_manager.hpp @@ -209,6 +209,16 @@ struct GameManager PauseUI* pause_ui; JournalUI* journal_ui; BackgroundSound* main_menu_music; + float layer_transition; // menus, going inwards/backwards + float layer; + int8_t transition_timer; + bool unknown31; + // uint8_t padding_probably1[2]; + uint32_t unknown33; + bool unknown34; + bool unknown35; + // uint8_t padding_probably2[2]; + // 3 * 4 bytes more maybe? }; GameManager* get_game_manager(); diff --git a/src/game_api/render_api.cpp b/src/game_api/render_api.cpp index 407e357e2..3a09653b4 100644 --- a/src/game_api/render_api.cpp +++ b/src/game_api/render_api.cpp @@ -432,7 +432,7 @@ void RenderAPI::draw_screen_texture(Texture* texture, Quad source, Quad dest, Co typedef void render_func(TextureRenderingInfo*, uint8_t, const char**, Color*); static render_func* rf = (render_func*)(offset); - rf(&tri, shader, texture->name, &color); + rf(&tri, shader, texture == nullptr ? nullptr : texture->name, &color); } } @@ -443,7 +443,7 @@ void RenderAPI::draw_screen_texture(Texture* texture, TextureRenderingInfo tri, { typedef void render_func(TextureRenderingInfo*, uint8_t, const char**, Color*); static render_func* rf = (render_func*)(offset); - rf(&tri, shader, texture->name, &color); + rf(&tri, shader, texture == nullptr ? nullptr : texture->name, &color); } } diff --git a/src/game_api/screen.hpp b/src/game_api/screen.hpp index 66d2b1f6e..5d14ad364 100644 --- a/src/game_api/screen.hpp +++ b/src/game_api/screen.hpp @@ -256,7 +256,7 @@ class ScreenOptions : public Screen // ID: 5 // uint8_t probably_padding2[3]; - // this is probably similar stuff that is at the beginning of ScreenMenu + // this is probably similar stuff that is at the beginning of ScreenMenu, transitions from and to menus float unknown1; float unknown2; float unknown3; @@ -296,7 +296,7 @@ class ScreenOptions : public Screen // ID: 5 bool toggle_woodpanel_slidein_animation; bool capitalize_top_woodpanel; uint32_t unknown_state; // 0 = none, 2 = moving between inner menus, 3 = exiting menu options - uint32_t menu_id; + uint32_t current_menu_id; uint32_t transfer_to_menu_id; bool show_apply_button; // uint8_t padding_probably4[3]; @@ -318,26 +318,32 @@ class ScreenOptions : public Screen // ID: 5 TextureRenderingInfo sectionheader_background; // behind 'GRAPHICS' and 'AUDIO' the black bars TextureRenderingInfo unknown44; // could be something else, or just not used in PC version or something - TextureRenderingInfo unknown45; - TextureRenderingInfo unknown46; - TextureRenderingInfo unknown47; - TextureRenderingInfo unknown48; - float unknown48a; // was supposto be topleft_woodpanel_esc_slidein? + /// In "Gameplay" menu + TextureRenderingInfo pet_icons; + /// For the code in the sync menu + TextureRenderingInfo bottom_scroll; + TextureRenderingInfo bottom_left_scrollhandle; + TextureRenderingInfo bottom_right_scrollhandle; + float topleft_woodpanel_esc_slidein; float text_fadein; float vertical_scroll_effect; - uint8_t unknown49; - bool item_visiable; - bool item_highlight; + uint8_t unknown49; // small random timer + bool items_visiable; + /// Shows the red background behind the option, the scarab on the left and left/right arrows + bool show_highlight; // uint8_t padding_probably8[5]; custom_vector unknown50; // holds one 8 byte value, related to choosen opion menu uint8_t unknown51; // probably bool // padding_probably10[7]; custom_vector tooltip_text; - size_t unknown53; + /// Used for sync progress + bool disable_controls; + // uint8_t padding_probably9[3]; + /// 0 - none, 1 - waiting for the code, 2 - code acquired, 3 - sync in progress, 4 - sync completed + uint32_t sync_progress_state; uint32_t unknown54; // some timer - uint32_t unknown55; // probably padding - size_t* credits_related; - size_t unknown57; + // uint32_t padding_probably10; + float* credits_progression; }; class ScreenCodeInput : public Screen // ID: 8 @@ -866,9 +872,31 @@ class ScreenOnlineLobby : public Screen // ID: 29 size_t screen_code_input; }; +struct MenuInsert +{ + float x; + float y; + float unknown1; // text_disappearance_speed? + float text_spacing; + float unknown5; + uint32_t unknown6; + float unknown7; + float unknown8; + uint32_t unknown9; + float unknown10; + std::vector unknown11; // menu options, probably just a bunch of floats, suprisingly it's not TextRenderingInfo + size_t* unknown12; + size_t* unknown13; // function + uint32_t selected_menu_index; + bool loop; + bool unknown16; + bool disable_controls; +}; + struct PauseUI { float menu_slidein_progress; + /// Actually darkened background when you get a prompt asking are you sure about selecting that option TextureRenderingInfo blurred_background; TextureRenderingInfo woodpanel_left; TextureRenderingInfo woodpanel_middle; @@ -876,22 +904,22 @@ struct PauseUI TextureRenderingInfo woodpanel_top; TextureRenderingInfo scroll; - uint32_t unknown2; - size_t unknown3; - + // uint32_t probably_padding1; + MenuInsert* menu; + /// Prompt background TextureRenderingInfo confirmation_panel; - - uint32_t unknown5; - uint32_t unknown6; - size_t unknown7; - uint32_t unknown8; - + MultiLineTextRendering* prompt_question; + MenuInsert* prompt_menu; + bool unknown8; + // uint8_t probably_padding2[3]; + /// This is more like selected_option, it's set when you select an option and the game displays the prompt uint32_t previously_selected_menu_index; - uint32_t buttons_actions; - uint32_t buttons_movement; - uint8_t unknown11a; - int8_t unknown11b; - uint16_t unknown12; + bool prompt_visible; + std::array buttons_actions; // per player, so no default menu input + std::array buttons_movement; // per player, so no default menu input + int8_t unknown11; + // uint16_t probably_padding3; + /// 0 - Invisible, 1 - Sliding down, 2 - Visible, 3 - Sliding up uint32_t visibility; }; @@ -902,7 +930,7 @@ class JournalPage public: TextureRenderingInfo background; uint32_t page_number; - uint32_t unknown2; + uint32_t unknown2; // probably padding template T* as() @@ -926,34 +954,14 @@ class JournalPageProgress : public JournalPage { public: TextureRenderingInfo coffeestain_top; - - virtual ~JournalPageProgress() = 0; }; class JournalPageJournalMenu : public JournalPage { public: - float unknown3; - float unknown4; - float unknown5; - float unknown6; - float unknown7; - float unknown8; - float unknown9; - float unknown10; - uint32_t unknown11; - float unknown12; - size_t unknown13; - size_t unknown15; - size_t unknown17; - size_t unknown19; - size_t unknown21; - uint32_t selected_menu_index; - uint32_t unknown23; + MenuInsert menu; TextRenderingInfo* journal_text_info; TextureRenderingInfo completion_badge; - - virtual ~JournalPageJournalMenu() = 0; }; class JournalPageDiscoverable : public JournalPage @@ -974,16 +982,12 @@ class JournalPageDiscoverable : public JournalPage MultiLineTextRendering* text_lines; TextRenderingInfo* entry_text_info; TextRenderingInfo* chapter_title_text_info; - - virtual ~JournalPageDiscoverable() = 0; }; class JournalPagePlaces : public JournalPageDiscoverable { public: TextureRenderingInfo main_image; - - virtual ~JournalPagePlaces() = 0; }; class JournalPagePeople : public JournalPageDiscoverable @@ -992,8 +996,6 @@ class JournalPagePeople : public JournalPageDiscoverable TextureRenderingInfo character_background; TextureRenderingInfo character_icon; TextureRenderingInfo character_drawing; - - virtual ~JournalPagePeople() = 0; }; class JournalPageBestiary : public JournalPageDiscoverable @@ -1006,8 +1008,6 @@ class JournalPageBestiary : public JournalPageDiscoverable TextRenderingInfo* defeated_value_text_info; TextRenderingInfo* killedby_text_info; TextRenderingInfo* killedby_value_text_info; - - virtual ~JournalPageBestiary() = 0; }; class JournalPageItems : public JournalPageDiscoverable @@ -1015,8 +1015,6 @@ class JournalPageItems : public JournalPageDiscoverable public: TextureRenderingInfo item_icon; TextureRenderingInfo item_background; - - virtual ~JournalPageItems() = 0; }; class JournalPageTraps : public JournalPageDiscoverable @@ -1024,15 +1022,11 @@ class JournalPageTraps : public JournalPageDiscoverable public: TextureRenderingInfo trap_icon; TextureRenderingInfo trap_background; - - virtual ~JournalPageTraps() = 0; }; class JournalPageStory : public JournalPage { public: - virtual ~JournalPageStory() = 0; - static JournalPageStory* construct(bool right_side, uint32_t page_number); }; @@ -1041,38 +1035,18 @@ class JournalPageFeats : public JournalPage public: TextRenderingInfo* chapter_title_text_info; TextureRenderingInfo feat_icons; - - virtual ~JournalPageFeats() = 0; }; class JournalPageDeathCause : public JournalPage { public: TextRenderingInfo* death_cause_text_info; - - virtual ~JournalPageDeathCause() = 0; }; class JournalPageDeathMenu : public JournalPage { public: - float unknown3; - float unknown4; - float unknown5; - float unknown6; - float unknown7; - float unknown8; - float unknown9; - float unknown10; - uint32_t unknown11; - float unknown12; - size_t unknown13; - size_t unknown14; - size_t unknown15; - size_t unknown16; - size_t unknown17; - uint32_t selected_menu_index; - uint32_t unknown18; + MenuInsert menu; TextRenderingInfo* game_over_text_info; TextRenderingInfo* level_text_info; TextRenderingInfo* level_value_text_info; @@ -1080,14 +1054,11 @@ class JournalPageDeathMenu : public JournalPage TextRenderingInfo* money_value_text_info; TextRenderingInfo* time_text_info; TextRenderingInfo* time_value_text_info; - - virtual ~JournalPageDeathMenu() = 0; }; class JournalPageRecap : public JournalPage { public: - virtual ~JournalPageRecap() = 0; }; class JournalPagePlayerProfile : public JournalPage @@ -1117,8 +1088,6 @@ class JournalPagePlayerProfile : public JournalPage TextRenderingInfo* average_time_value_text_info; TextRenderingInfo* best_time_text_info; TextRenderingInfo* best_time_value_text_info; - - virtual ~JournalPagePlayerProfile() = 0; }; class JournalPageLastGamePlayed : public JournalPage @@ -1134,8 +1103,6 @@ class JournalPageLastGamePlayed : public JournalPage TextRenderingInfo* time_value_text_info; uint32_t sticker_count; std::array stickers; - - virtual ~JournalPageLastGamePlayed() = 0; }; using JOURNALUI_PAGE_SHOWN = uint8_t; // NoAlias @@ -1145,8 +1112,8 @@ struct JournalUI uint32_t state; JOURNALUI_PAGE_SHOWN chapter_shown; - uint8_t unknown1; - uint16_t unknown2; + //uint8_t padding_probably1[3]; + /// Stores pages loaded into memeory. It's not cleared after the journal is closed or when you go back to the main (menu) page. /// Use `:get_type()` to chcek page type and cast it correctly (see ON.[RENDER_PRE_JOURNAL_PAGE](#ON-RENDER_PRE_JOURNAL_PAGE)) custom_vector pages; @@ -1180,8 +1147,6 @@ struct JournalUI uint32_t unknown28; size_t unknown29; - float unknown31; - uint32_t unknown30; }; Screen* get_screen_ptr(uint32_t screen_id); diff --git a/src/game_api/script/usertypes/screen_lua.cpp b/src/game_api/script/usertypes/screen_lua.cpp index 8d26368dc..6a5b9c15f 100644 --- a/src/game_api/script/usertypes/screen_lua.cpp +++ b/src/game_api/script/usertypes/screen_lua.cpp @@ -213,7 +213,7 @@ void register_usertypes(sol::state& lua) screenoptions_type["bottom_woodpanel_visible"] = &ScreenOptions::bottom_woodpanel_visible; screenoptions_type["toggle_woodpanel_slidein_animation"] = &ScreenOptions::toggle_woodpanel_slidein_animation; screenoptions_type["capitalize_top_woodpanel"] = &ScreenOptions::capitalize_top_woodpanel; - screenoptions_type["menu_id"] = &ScreenOptions::menu_id; + screenoptions_type["menu_id"] = &ScreenOptions::current_menu_id; screenoptions_type["transfer_to_menu_id"] = &ScreenOptions::transfer_to_menu_id; screenoptions_type["graphic_and_audio"] = &ScreenOptions::graphic_and_audio; screenoptions_type["topleft_woodpanel_esc"] = &ScreenOptions::topleft_woodpanel_esc; @@ -232,8 +232,8 @@ void register_usertypes(sol::state& lua) screenoptions_type["sectionheader_background"] = &ScreenOptions::sectionheader_background; screenoptions_type["text_fadein"] = &ScreenOptions::text_fadein; screenoptions_type["vertical_scroll_effect"] = &ScreenOptions::vertical_scroll_effect; - screenoptions_type["item_visiable"] = &ScreenOptions::item_visiable; - screenoptions_type["item_highlight"] = &ScreenOptions::item_highlight; + screenoptions_type["items_visiable"] = &ScreenOptions::items_visiable; + screenoptions_type["show_highlight"] = &ScreenOptions::show_highlight; screenoptions_type["tooltip_text"] = &ScreenOptions::tooltip_text; lua.new_usertype( @@ -710,8 +710,6 @@ void register_usertypes(sol::state& lua) lua.new_usertype( "JournalPageJournalMenu", - "selected_menu_index", - &JournalPageJournalMenu::selected_menu_index, "journal_text_info", &JournalPageJournalMenu::journal_text_info, "completion_badge", @@ -810,8 +808,6 @@ void register_usertypes(sol::state& lua) lua.new_usertype( "JournalPageDeathMenu", - "selected_menu_index", - &JournalPageDeathMenu::selected_menu_index, "game_over_text_info", &JournalPageDeathMenu::game_over_text_info, "level_text_info", From a5b0c500289596b1542b641aa4f0351b4946604e Mon Sep 17 00:00:00 2001 From: Mr-Auto <36127424+Mr-Auto@users.noreply.github.com> Date: Sun, 12 Nov 2023 21:05:45 +0100 Subject: [PATCH 14/19] format --- src/game_api/screen.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game_api/screen.hpp b/src/game_api/screen.hpp index 5d14ad364..8e8c1c645 100644 --- a/src/game_api/screen.hpp +++ b/src/game_api/screen.hpp @@ -959,7 +959,7 @@ class JournalPageProgress : public JournalPage class JournalPageJournalMenu : public JournalPage { public: - MenuInsert menu; + MenuInsert menu; TextRenderingInfo* journal_text_info; TextureRenderingInfo completion_badge; }; @@ -1112,7 +1112,7 @@ struct JournalUI uint32_t state; JOURNALUI_PAGE_SHOWN chapter_shown; - //uint8_t padding_probably1[3]; + // uint8_t padding_probably1[3]; /// Stores pages loaded into memeory. It's not cleared after the journal is closed or when you go back to the main (menu) page. /// Use `:get_type()` to chcek page type and cast it correctly (see ON.[RENDER_PRE_JOURNAL_PAGE](#ON-RENDER_PRE_JOURNAL_PAGE)) From 840646d37489ce4aaa74cfb2f216b108d6862ca7 Mon Sep 17 00:00:00 2001 From: Mr-Auto <36127424+Mr-Auto@users.noreply.github.com> Date: Mon, 13 Nov 2023 18:53:43 +0100 Subject: [PATCH 15/19] fix `ScreenCharacterSelect`, add common format `MenuScreenPanels`, remove a lot of exposed variables for now --- src/game_api/screen.hpp | 141 +++++++----------- src/game_api/screen_arena.hpp | 59 +------- .../script/usertypes/screen_arena_lua.cpp | 40 ----- src/game_api/script/usertypes/screen_lua.cpp | 61 +------- 4 files changed, 55 insertions(+), 246 deletions(-) diff --git a/src/game_api/screen.hpp b/src/game_api/screen.hpp index 8e8c1c645..8e8fa8f7f 100644 --- a/src/game_api/screen.hpp +++ b/src/game_api/screen.hpp @@ -76,6 +76,29 @@ class ScreenPrologue : public Screen // ID: 2 float line3_alpha; }; +struct MenuScreenPanels +{ + float top_bottom_woodpanels_velocity; + float top_bottom_woodpanels_progress; // set to 0 to start sliding in + float scroll_unfurl_progress; // set to 0 to start unfurl + float bottom_woodpanel_speed_multiplayer; + float bottom_woodpanel_y_offset; // maybe a resolution thing? + TextureRenderingInfo bottom_woodpanel; + TextureRenderingInfo top_woodpanel; + TextureRenderingInfo scroll; + TextureRenderingInfo top_woodpanel_left_scrollhandle; + TextureRenderingInfo top_woodpanel_right_scrollhandle; + + STRINGID scroll_text; + STRINGID bottom_left_text; + STRINGID bottom_right_text; + STRINGID bottom_middle_text; + bool top_woodpanel_visible; + bool bottom_woodpanel_visible; + bool toggle_woodpanel_slidein_animation; + bool capitalize_top_woodpanel; +}; + class ScreenTitle : public Screen // ID: 3 { public: @@ -276,25 +299,8 @@ class ScreenOptions : public Screen // ID: 5 float unknown17; float unknown18; - float top_bottom_woodpanels_velocity; - float top_bottom_woodpanels_progress; // set to 0 to start sliding in - float scroll_unfurl_progress; // set to 0 to start unfurl - float bottom_woodpanel_speed_multiplayer; - float bottom_woodpanel_y_offset; // maybe a resolution thing? - TextureRenderingInfo bottom_woodpanel; - TextureRenderingInfo top_woodpanel; - TextureRenderingInfo scroll; - TextureRenderingInfo top_woodpanel_left_scrollhandle; - TextureRenderingInfo top_woodpanel_right_scrollhandle; + MenuScreenPanels screen_panels; - STRINGID scroll_text; - STRINGID bottom_left_text; - STRINGID bottom_right_text; - STRINGID bottom_middle_text; - bool top_woodpanel_visible; - bool bottom_woodpanel_visible; - bool toggle_woodpanel_slidein_animation; - bool capitalize_top_woodpanel; uint32_t unknown_state; // 0 = none, 2 = moving between inner menus, 3 = exiting menu options uint32_t current_menu_id; uint32_t transfer_to_menu_id; @@ -349,27 +355,7 @@ class ScreenOptions : public Screen // ID: 5 class ScreenCodeInput : public Screen // ID: 8 { public: - // This beginning is the same for ScreenOnlineLobby and similar code can be found in ScreenOptions - - float bottom_woodpanel_slideup_speed; - float bottom_woodpanel_slideup; - float scroll_unfurl; - float unknown1; - float bottom_woodpanel_y_offset; - TextureRenderingInfo woodpanel_bottom; - TextureRenderingInfo woodpanel_top; - TextureRenderingInfo scroll; - TextureRenderingInfo left_scroll_handle; - TextureRenderingInfo right_scroll_handle; - STRINGID scroll_text; - STRINGID bottom_left_text; - /// The only one actually used - STRINGID bottom_right_text; - STRINGID bottom_middle_text; - bool show_top_woodpanel; - bool show_bottom_woodpanel; - bool slide_in_bottom_woodpanel; - uint8_t unknown2; + MenuScreenPanels screen_panels; /// needs to be set before opening the screen to show the correct text at the bottom bool allow_random; // uint8_t probably_padding1[3]; @@ -436,6 +422,12 @@ struct FlyingThing uint32_t unknown22; }; +struct InputsDevice +{ + uint16_t buttons; + uint16_t buttons_previous; +}; + class ScreenCharacterSelect : public Screen // ID: 9 { public: @@ -460,24 +452,8 @@ class ScreenCharacterSelect : public Screen // ID: 9 uint8_t unknown22; float blurred_border_zoom_timer; float blurred_border_zoom_target; - float unknown25; - float top_bottom_woodpanel_slidein_timer; - float top_scroll_unfurl_timer; - float unknown28; - uint32_t unknown29; - uint32_t unknown30; - TextureRenderingInfo bottom_woodpanel; - TextureRenderingInfo top_woodpanel; - TextureRenderingInfo unknown32; - TextureRenderingInfo left_scroll_handle; - TextureRenderingInfo right_scroll_handle; - STRINGID left_button_text_id; - STRINGID right_button_text_id; - STRINGID middle_button_text_id; - bool top_woodpanel_visible; - bool bottom_woodpanel_visible; - bool toggle_woodpanel_slidein_animation; - uint8_t padding1; + + MenuScreenPanels screen_panels; TextureRenderingInfo mine_entrance_background; TextureRenderingInfo character; TextureRenderingInfo character_shadow; @@ -514,33 +490,33 @@ class ScreenCharacterSelect : public Screen // ID: 9 std::array player_quickselect_wiggle_angle; float another_timer; - float topleft_woodpanel_esc_slidein_timer; - float start_panel_slidein_timer; + float topleft_woodpanel_esc_slidein; + float start_panel_slidein; float action_buttons_keycap_size; bool unknown64a; bool unknown64b; bool unknown64c; bool unknown64d; - uint32_t unknown65; + uint32_t next_screen_to_load; bool not_ready_to_start_yet; uint8_t available_mine_entrances; // The rest are boarded off uint8_t amount_of_mine_entrances_activated; - uint8_t unknown66; - size_t reset_func; /* unsure*/ - uint32_t buttons; - TextureRenderingInfo unknown69; // TODO: this is wrong, there's just a bunch of other stuff here, like some run type flags probably (seeded/adventure/daily) and the next screen (camp/level) - - float opacity; + // uint8_t probably_padding1; + size_t* reset_func; /* unsure*/ + uint32_t unknown69; // it's some states, or flags + TextureRenderingInfo screen_blackout; + float blackout_transparency; bool start_pressed; bool transition_to_game_started; - uint8_t unknown71c; - uint8_t unknown71d; + bool disable_buttons; /* unsure */ // hides the buttons on the enrances and disables control (without setting the bool below) + bool disable_controls; uint32_t unknown72; std::array flying_things; uint16_t flying_thing_countdown; // when 0, flying things appear - int16_t unknown79; - uint32_t unknown80; + int16_t unknown79; // negative, counts up to 0 + + // uint32_t probably_padding2; ParticleEmitterInfo* particle_ceilingdust_smoke; ParticleEmitterInfo* particle_ceilingdust_rubble; @@ -553,7 +529,9 @@ class ScreenCharacterSelect : public Screen // ID: 9 ParticleEmitterInfo* particle_torchflame_flames3; ParticleEmitterInfo* particle_torchflame_smoke4; ParticleEmitterInfo* particle_torchflame_flames4; - SoundMeta* sound; + std::array torch_sound; + std::array inputs; + std::array buttons; }; class ScreenTeamSelect : public Screen // ID: 10 @@ -813,26 +791,7 @@ class ScreenEnterOnlineCode : public ScreenCodeInput // no ID, very special scre class ScreenOnlineLobby : public Screen // ID: 29 { public: - // This beginning is the same for ScreenCodeInput and similar code can be found in ScreenOptions - - float bottom_woodpanel_slideup_speed; - float bottom_woodpanel_slideup; - float scroll_unfurl; - float unknown6; - float bottom_woodpanel_y_offset; - TextureRenderingInfo woodpanel_bottom; - TextureRenderingInfo woodpanel_top; - TextureRenderingInfo scroll; - TextureRenderingInfo left_scroll_handle; - TextureRenderingInfo right_scroll_handle; - STRINGID scroll_text; - STRINGID bottom_left_text; - STRINGID bottom_right_text; - STRINGID bottom_middle_text; - bool show_top_woodpanel; - bool show_bottom_woodpanel; - bool slide_in_bottom_woodpanel; - uint8_t unknown21; + MenuScreenPanels screen_panels; std::array players; TextureRenderingInfo background_image; TextureRenderingInfo unknown35; diff --git a/src/game_api/screen_arena.hpp b/src/game_api/screen_arena.hpp index 51f2934b7..a5fcd0543 100644 --- a/src/game_api/screen_arena.hpp +++ b/src/game_api/screen_arena.hpp @@ -22,24 +22,7 @@ class ScreenArenaMenu : public Screen // ID: 21 public: ScreenZoomAnimation brick_background_animation; ScreenZoomAnimation blurry_border_animation; - float unknown6; - float top_woodpanel_slidein_timer; - float top_scroll_unfurl_timer; - float unknown11; - float unknown12; - TextureRenderingInfo unknown13; - TextureRenderingInfo woodpanel_top; - TextureRenderingInfo unknown15; - TextureRenderingInfo left_scroll_handle; - TextureRenderingInfo right_scroll_handle; - STRINGID scroll_text_id; // StringsTableID - STRINGID unknown17_text_id; // StringsTableID - STRINGID unknown18_text_id; // StringsTableID - STRINGID unknown19_text_id; // StringsTableID - bool top_woodpanel_visible; - bool bottom_woodpanel_visible; - bool woodpanels_toggle; - bool unknown20d; + MenuScreenPanels screen_panels; TextureRenderingInfo brick_background; TextureRenderingInfo blurry_border; TextureRenderingInfo blurry_border2; @@ -80,25 +63,7 @@ class ScreenArenaMenu : public Screen // ID: 21 class ScreenArenaStagesSelect : public Screen // ID: 22 and 24 { public: - uint16_t unknown3a; - uint16_t unknown3b; - float woodenpanel_top_slidein_timer; - float woodenpanel_top_scroll_unfurl_timer; - uint32_t unknown6; - uint32_t unknown7; - TextureRenderingInfo unknown8; - TextureRenderingInfo woodenpanel_top; - TextureRenderingInfo unknown10; - TextureRenderingInfo woodenpanel_top_left_scroll; - TextureRenderingInfo woodenpanel_top_right_scroll; - STRINGID text_id_1; // Strings table ID - STRINGID text_id_2; // Strings table ID - STRINGID text_id_3; // Strings table ID - STRINGID text_id_4; // Strings table ID - bool woodenpanel_top_visible; - bool woodenpanel_bottom_visible; - bool woodenpanels_toggle; - bool unknown11d; + MenuScreenPanels screen_panels; uint16_t buttons; uint16_t padding1; TextureRenderingInfo brick_background; @@ -143,25 +108,7 @@ class ScreenArenaStagesSelect : public Screen // ID: 22 and 24 class ScreenArenaItems : public Screen // ID: 23 { public: - float unknown4; - float woodpanel_top_slidein_timer; - float woodpanel_top_scroll_unfurl_timer; - float unknown7; - float unknown8; - TextureRenderingInfo unknown9; - TextureRenderingInfo woodpanel_top; - TextureRenderingInfo unknown11; - TextureRenderingInfo top_scroll_left_handle; - TextureRenderingInfo top_scroll_right_handle; - STRINGID scroll_text_id; // Strings table ID - STRINGID text_id_2; // Strings table ID - STRINGID text_id_3; // Strings table ID - STRINGID text_id_4; // Strings table ID - bool woodpanel_top_visible; - bool woodpanel_bottom_visible; - bool woodpanels_toggle; - bool unknown15; - + MenuScreenPanels screen_panels; TextureRenderingInfo brick_background; TextureRenderingInfo black_background_bottom_right; TextureRenderingInfo woodpanel_bottom; diff --git a/src/game_api/script/usertypes/screen_arena_lua.cpp b/src/game_api/script/usertypes/screen_arena_lua.cpp index 52aa223f0..fe070ec82 100644 --- a/src/game_api/script/usertypes/screen_arena_lua.cpp +++ b/src/game_api/script/usertypes/screen_arena_lua.cpp @@ -35,20 +35,6 @@ void register_usertypes(sol::state& lua) auto screenarenamenu_type = lua.new_usertype("ScreenArenaMenu", sol::base_classes, sol::bases()); screenarenamenu_type["brick_background_animation"] = &ScreenArenaMenu::brick_background_animation; screenarenamenu_type["blurry_border_animation"] = &ScreenArenaMenu::blurry_border_animation; - screenarenamenu_type["top_woodpanel_slidein_timer"] = &ScreenArenaMenu::top_woodpanel_slidein_timer; - screenarenamenu_type["top_scroll_unfurl_timer"] = &ScreenArenaMenu::top_scroll_unfurl_timer; - screenarenamenu_type["unknown13"] = &ScreenArenaMenu::unknown13; - screenarenamenu_type["woodpanel_top"] = &ScreenArenaMenu::woodpanel_top; - screenarenamenu_type["unknown15"] = &ScreenArenaMenu::unknown15; - screenarenamenu_type["left_scroll_handle"] = &ScreenArenaMenu::left_scroll_handle; - screenarenamenu_type["right_scroll_handle"] = &ScreenArenaMenu::right_scroll_handle; - screenarenamenu_type["scroll_text_id"] = &ScreenArenaMenu::scroll_text_id; - screenarenamenu_type["unknown17_text_id"] = &ScreenArenaMenu::unknown17_text_id; - screenarenamenu_type["unknown18_text_id"] = &ScreenArenaMenu::unknown18_text_id; - screenarenamenu_type["unknown19_text_id"] = &ScreenArenaMenu::unknown19_text_id; - screenarenamenu_type["top_woodpanel_visible"] = &ScreenArenaMenu::top_woodpanel_visible; - screenarenamenu_type["bottom_woodpanel_visible"] = &ScreenArenaMenu::bottom_woodpanel_visible; - screenarenamenu_type["woodpanels_toggle"] = &ScreenArenaMenu::woodpanels_toggle; screenarenamenu_type["brick_background"] = &ScreenArenaMenu::brick_background; screenarenamenu_type["blurry_border"] = &ScreenArenaMenu::blurry_border; screenarenamenu_type["blurry_border2"] = &ScreenArenaMenu::blurry_border2; @@ -86,18 +72,6 @@ void register_usertypes(sol::state& lua) &ScreenZoomAnimation::zoom_target); auto screenarenastagesselect_type = lua.new_usertype("ScreenArenaStagesSelect", sol::base_classes, sol::bases()); - screenarenastagesselect_type["woodenpanel_top_slidein_timer"] = &ScreenArenaStagesSelect::woodenpanel_top_slidein_timer; - screenarenastagesselect_type["woodenpanel_top_scroll_unfurl_timer"] = &ScreenArenaStagesSelect::woodenpanel_top_scroll_unfurl_timer; - screenarenastagesselect_type["woodenpanel_top"] = &ScreenArenaStagesSelect::woodenpanel_top; - screenarenastagesselect_type["woodenpanel_top_left_scroll"] = &ScreenArenaStagesSelect::woodenpanel_top_left_scroll; - screenarenastagesselect_type["woodenpanel_top_right_scroll"] = &ScreenArenaStagesSelect::woodenpanel_top_right_scroll; - screenarenastagesselect_type["text_id_1"] = &ScreenArenaStagesSelect::text_id_1; - screenarenastagesselect_type["text_id_2"] = &ScreenArenaStagesSelect::text_id_2; - screenarenastagesselect_type["text_id_3"] = &ScreenArenaStagesSelect::text_id_3; - screenarenastagesselect_type["text_id_4"] = &ScreenArenaStagesSelect::text_id_4; - screenarenastagesselect_type["woodenpanel_top_visible"] = &ScreenArenaStagesSelect::woodenpanel_top_visible; - screenarenastagesselect_type["woodenpanel_bottom_visible"] = &ScreenArenaStagesSelect::woodenpanel_bottom_visible; - screenarenastagesselect_type["woodenpanels_toggle"] = &ScreenArenaStagesSelect::woodenpanels_toggle; screenarenastagesselect_type["buttons"] = &ScreenArenaStagesSelect::buttons; screenarenastagesselect_type["brick_background"] = &ScreenArenaStagesSelect::brick_background; screenarenastagesselect_type["info_black_background"] = &ScreenArenaStagesSelect::info_black_background; @@ -128,20 +102,6 @@ void register_usertypes(sol::state& lua) screenarenastagesselect_type["contols"] = &ScreenArenaStagesSelect::contols; auto screenarenaitems_type = lua.new_usertype("ScreenArenaItems", sol::base_classes, sol::bases()); - screenarenaitems_type["woodpanel_top_slidein_timer"] = &ScreenArenaItems::woodpanel_top_slidein_timer; - screenarenaitems_type["woodpanel_top_scroll_unfurl_timer"] = &ScreenArenaItems::woodpanel_top_scroll_unfurl_timer; - screenarenaitems_type["unknown9"] = &ScreenArenaItems::unknown9; - screenarenaitems_type["woodpanel_top"] = &ScreenArenaItems::woodpanel_top; - screenarenaitems_type["unknown11"] = &ScreenArenaItems::unknown11; - screenarenaitems_type["top_scroll_left_handle"] = &ScreenArenaItems::top_scroll_left_handle; - screenarenaitems_type["top_scroll_right_handle"] = &ScreenArenaItems::top_scroll_right_handle; - screenarenaitems_type["scroll_text_id"] = &ScreenArenaItems::scroll_text_id; - screenarenaitems_type["text_id_2"] = &ScreenArenaItems::text_id_2; - screenarenaitems_type["text_id_3"] = &ScreenArenaItems::text_id_3; - screenarenaitems_type["text_id_4"] = &ScreenArenaItems::text_id_4; - screenarenaitems_type["woodpanel_top_visible"] = &ScreenArenaItems::woodpanel_top_visible; - screenarenaitems_type["woodpanel_bottom_visible"] = &ScreenArenaItems::woodpanel_bottom_visible; - screenarenaitems_type["woodpanels_toggle"] = &ScreenArenaItems::woodpanels_toggle; screenarenaitems_type["brick_background"] = &ScreenArenaItems::brick_background; screenarenaitems_type["black_background_bottom_right"] = &ScreenArenaItems::black_background_bottom_right; screenarenaitems_type["woodpanel_bottom"] = &ScreenArenaItems::woodpanel_bottom; diff --git a/src/game_api/script/usertypes/screen_lua.cpp b/src/game_api/script/usertypes/screen_lua.cpp index 6a5b9c15f..cdc6ec074 100644 --- a/src/game_api/script/usertypes/screen_lua.cpp +++ b/src/game_api/script/usertypes/screen_lua.cpp @@ -195,24 +195,6 @@ void register_usertypes(sol::state& lua) screenoptions_type["sides_hold_down_timer"] = &ScreenOptions::sides_hold_down_timer; screenoptions_type["sides_fast_scroll_timer"] = &ScreenOptions::sides_fast_scroll_timer; screenoptions_type["loop"] = &ScreenOptions::loop; - screenoptions_type["top_bottom_woodpanels_velocity"] = &ScreenOptions::top_bottom_woodpanels_velocity; - screenoptions_type["top_bottom_woodpanels_progress"] = &ScreenOptions::top_bottom_woodpanels_progress; - screenoptions_type["scroll_unfurl_progress"] = &ScreenOptions::scroll_unfurl_progress; - screenoptions_type["bottom_woodpanel_speed_multiplayer"] = &ScreenOptions::bottom_woodpanel_speed_multiplayer; - screenoptions_type["bottom_woodpanel_y_offset"] = &ScreenOptions::bottom_woodpanel_y_offset; - screenoptions_type["bottom_woodpanel"] = &ScreenOptions::bottom_woodpanel; - screenoptions_type["top_woodpanel"] = &ScreenOptions::top_woodpanel; - screenoptions_type["scroll"] = &ScreenOptions::scroll; - screenoptions_type["top_woodpanel_left_scrollhandle"] = &ScreenOptions::top_woodpanel_left_scrollhandle; - screenoptions_type["top_woodpanel_right_scrollhandle"] = &ScreenOptions::top_woodpanel_right_scrollhandle; - screenoptions_type["scroll_text"] = &ScreenOptions::scroll_text; - screenoptions_type["bottom_left_text"] = &ScreenOptions::bottom_left_text; - screenoptions_type["bottom_right_text"] = &ScreenOptions::bottom_right_text; - screenoptions_type["bottom_middle_text"] = &ScreenOptions::bottom_middle_text; - screenoptions_type["top_woodpanel_visible"] = &ScreenOptions::top_woodpanel_visible; - screenoptions_type["bottom_woodpanel_visible"] = &ScreenOptions::bottom_woodpanel_visible; - screenoptions_type["toggle_woodpanel_slidein_animation"] = &ScreenOptions::toggle_woodpanel_slidein_animation; - screenoptions_type["capitalize_top_woodpanel"] = &ScreenOptions::capitalize_top_woodpanel; screenoptions_type["menu_id"] = &ScreenOptions::current_menu_id; screenoptions_type["transfer_to_menu_id"] = &ScreenOptions::transfer_to_menu_id; screenoptions_type["graphic_and_audio"] = &ScreenOptions::graphic_and_audio; @@ -248,15 +230,6 @@ void register_usertypes(sol::state& lua) &GraphicandAudioSettings::display_mode); auto screenseedinput_type = lua.new_usertype("ScreenCodeInput", sol::base_classes, sol::bases()); - screenseedinput_type["bottom_woodpanel_slideup_speed"] = &ScreenCodeInput::bottom_woodpanel_slideup_speed; - screenseedinput_type["bottom_woodpanel_slideup_timer"] = &ScreenCodeInput::bottom_woodpanel_slideup; - screenseedinput_type["bottom_woodpanel_y_offset"] = &ScreenCodeInput::bottom_woodpanel_y_offset; - screenseedinput_type["bottom_woodpanel"] = &ScreenCodeInput::woodpanel_bottom; - screenseedinput_type["bottom_left_text"] = &ScreenCodeInput::bottom_left_text; - screenseedinput_type["bottom_right_text"] = &ScreenCodeInput::bottom_right_text; - screenseedinput_type["bottom_middle_text"] = &ScreenCodeInput::bottom_middle_text; - screenseedinput_type["show_bottom_woodpanel"] = &ScreenCodeInput::show_bottom_woodpanel; - screenseedinput_type["slide_in_bottom_woodpanel"] = &ScreenCodeInput::slide_in_bottom_woodpanel; screenseedinput_type["allow_random"] = &ScreenCodeInput::allow_random; screenseedinput_type["selected_button_index"] = &ScreenCodeInput::selected_button_index; screenseedinput_type["pressed_select"] = &ScreenCodeInput::pressed_select; @@ -280,18 +253,6 @@ void register_usertypes(sol::state& lua) auto screencharacterselect_type = lua.new_usertype("ScreenCharacterSelect", sol::base_classes, sol::bases()); screencharacterselect_type["main_background_zoom_target"] = &ScreenCharacterSelect::main_background_zoom_target; screencharacterselect_type["blurred_border_zoom_target"] = &ScreenCharacterSelect::blurred_border_zoom_target; - screencharacterselect_type["top_bottom_woodpanel_slidein_timer"] = &ScreenCharacterSelect::top_bottom_woodpanel_slidein_timer; - screencharacterselect_type["top_scroll_unfurl_timer"] = &ScreenCharacterSelect::top_scroll_unfurl_timer; - screencharacterselect_type["bottom_woodpanel"] = &ScreenCharacterSelect::bottom_woodpanel; - screencharacterselect_type["top_woodpanel"] = &ScreenCharacterSelect::top_woodpanel; - screencharacterselect_type["left_scroll_handle"] = &ScreenCharacterSelect::left_scroll_handle; - screencharacterselect_type["right_scroll_handle"] = &ScreenCharacterSelect::right_scroll_handle; - screencharacterselect_type["left_button_text_id"] = &ScreenCharacterSelect::left_button_text_id; - screencharacterselect_type["right_button_text_id"] = &ScreenCharacterSelect::right_button_text_id; - screencharacterselect_type["middle_button_text_id"] = &ScreenCharacterSelect::middle_button_text_id; - screencharacterselect_type["top_woodpanel_visible"] = &ScreenCharacterSelect::top_woodpanel_visible; - screencharacterselect_type["bottom_woodpanel_visible"] = &ScreenCharacterSelect::bottom_woodpanel_visible; - screencharacterselect_type["toggle_woodpanel_slidein_animation"] = &ScreenCharacterSelect::toggle_woodpanel_slidein_animation; screencharacterselect_type["mine_entrance_background"] = &ScreenCharacterSelect::mine_entrance_background; screencharacterselect_type["character"] = &ScreenCharacterSelect::character; screencharacterselect_type["character_shadow"] = &ScreenCharacterSelect::character_shadow; @@ -317,14 +278,13 @@ void register_usertypes(sol::state& lua) screencharacterselect_type["player_quickselect_fadein_timer"] = &ScreenCharacterSelect::player_quickselect_fadein_timer; screencharacterselect_type["player_quickselect_coords"] = &ScreenCharacterSelect::player_quickselect_coords; screencharacterselect_type["player_quickselect_wiggle_angle"] = &ScreenCharacterSelect::player_quickselect_wiggle_angle; - screencharacterselect_type["topleft_woodpanel_esc_slidein_timer"] = &ScreenCharacterSelect::topleft_woodpanel_esc_slidein_timer; - screencharacterselect_type["start_panel_slidein_timer"] = &ScreenCharacterSelect::start_panel_slidein_timer; + screencharacterselect_type["topleft_woodpanel_esc_slidein"] = &ScreenCharacterSelect::topleft_woodpanel_esc_slidein; + screencharacterselect_type["start_panel_slidein"] = &ScreenCharacterSelect::start_panel_slidein; screencharacterselect_type["action_buttons_keycap_size"] = &ScreenCharacterSelect::action_buttons_keycap_size; screencharacterselect_type["not_ready_to_start_yet"] = &ScreenCharacterSelect::not_ready_to_start_yet; screencharacterselect_type["available_mine_entrances"] = &ScreenCharacterSelect::available_mine_entrances; screencharacterselect_type["amount_of_mine_entrances_activated"] = &ScreenCharacterSelect::amount_of_mine_entrances_activated; screencharacterselect_type["buttons"] = &ScreenCharacterSelect::buttons; - screencharacterselect_type["opacity"] = &ScreenCharacterSelect::opacity; screencharacterselect_type["start_pressed"] = &ScreenCharacterSelect::start_pressed; screencharacterselect_type["transition_to_game_started"] = &ScreenCharacterSelect::transition_to_game_started; screencharacterselect_type["flying_things"] = &ScreenCharacterSelect::flying_things; @@ -340,7 +300,6 @@ void register_usertypes(sol::state& lua) screencharacterselect_type["particle_torchflame_flames3"] = &ScreenCharacterSelect::particle_torchflame_flames3; screencharacterselect_type["particle_torchflame_smoke4"] = &ScreenCharacterSelect::particle_torchflame_smoke4; screencharacterselect_type["particle_torchflame_flames4"] = &ScreenCharacterSelect::particle_torchflame_flames4; - screencharacterselect_type["sound"] = &ScreenCharacterSelect::sound; lua.new_usertype( "FlyingThing", @@ -561,22 +520,6 @@ void register_usertypes(sol::state& lua) &OnlineLobbyScreenPlayer::searching); auto screenonlinelobby_type = lua.new_usertype("ScreenOnlineLobby", sol::base_classes, sol::bases()); - screenonlinelobby_type["bottom_woodpanel_slideup_speed"] = &ScreenOnlineLobby::bottom_woodpanel_slideup_speed; - screenonlinelobby_type["bottom_woodpanel_slideup"] = &ScreenOnlineLobby::bottom_woodpanel_slideup; - screenonlinelobby_type["scroll_unfurl"] = &ScreenOnlineLobby::scroll_unfurl; - screenonlinelobby_type["bottom_woodpanel_y_offset"] = &ScreenOnlineLobby::bottom_woodpanel_y_offset; - screenonlinelobby_type["woodpanel_bottom"] = &ScreenOnlineLobby::woodpanel_bottom; - screenonlinelobby_type["woodpanel_top"] = &ScreenOnlineLobby::woodpanel_top; - screenonlinelobby_type["scroll"] = &ScreenOnlineLobby::scroll; - screenonlinelobby_type["left_scroll_handle"] = &ScreenOnlineLobby::left_scroll_handle; - screenonlinelobby_type["right_scroll_handle"] = &ScreenOnlineLobby::right_scroll_handle; - screenonlinelobby_type["scroll_text"] = &ScreenOnlineLobby::scroll_text; - screenonlinelobby_type["bottom_left_text"] = &ScreenOnlineLobby::bottom_left_text; - screenonlinelobby_type["bottom_right_text"] = &ScreenOnlineLobby::bottom_right_text; - screenonlinelobby_type["bottom_middle_text"] = &ScreenOnlineLobby::bottom_middle_text; - screenonlinelobby_type["show_top_woodpanel"] = &ScreenOnlineLobby::show_top_woodpanel; - screenonlinelobby_type["show_bottom_woodpanel"] = &ScreenOnlineLobby::show_bottom_woodpanel; - screenonlinelobby_type["slide_in_bottom_woodpanel"] = &ScreenOnlineLobby::slide_in_bottom_woodpanel; screenonlinelobby_type["players"] = &ScreenOnlineLobby::players; screenonlinelobby_type["background_image"] = &ScreenOnlineLobby::background_image; screenonlinelobby_type["topleft_woodpanel_esc"] = &ScreenOnlineLobby::topleft_woodpanel_esc; From ad76ffcce40514b804fea3a5e804eb5df0d75d36 Mon Sep 17 00:00:00 2001 From: Mr-Auto <36127424+Mr-Auto@users.noreply.github.com> Date: Tue, 14 Nov 2023 19:18:57 +0100 Subject: [PATCH 16/19] few last things? --- src/game_api/screen.hpp | 26 ++++++++------------ src/game_api/screen_arena.hpp | 6 ++--- src/game_api/script/usertypes/screen_lua.cpp | 5 +--- 3 files changed, 14 insertions(+), 23 deletions(-) diff --git a/src/game_api/screen.hpp b/src/game_api/screen.hpp index 8e8fa8f7f..c03d4430e 100644 --- a/src/game_api/screen.hpp +++ b/src/game_api/screen.hpp @@ -78,9 +78,9 @@ class ScreenPrologue : public Screen // ID: 2 struct MenuScreenPanels { - float top_bottom_woodpanels_velocity; - float top_bottom_woodpanels_progress; // set to 0 to start sliding in - float scroll_unfurl_progress; // set to 0 to start unfurl + float woodpanels_velocity; + float woodpanels_progress; + float scroll_unfurl_progress; float bottom_woodpanel_speed_multiplayer; float bottom_woodpanel_y_offset; // maybe a resolution thing? TextureRenderingInfo bottom_woodpanel; @@ -96,7 +96,7 @@ struct MenuScreenPanels bool top_woodpanel_visible; bool bottom_woodpanel_visible; bool toggle_woodpanel_slidein_animation; - bool capitalize_top_woodpanel; + bool capitalize_scroll_text; }; class ScreenTitle : public Screen // ID: 3 @@ -537,18 +537,18 @@ class ScreenCharacterSelect : public Screen // ID: 9 class ScreenTeamSelect : public Screen // ID: 10 { public: - TextureRenderingInfo ana_carrying_torch; + TextureRenderingInfo player_portrait; TextureRenderingInfo scroll_bottom_left; TextureRenderingInfo scrollend_bottom_left; TextureRenderingInfo four_ropes; - TextureRenderingInfo unknown4; + TextureRenderingInfo gems_above_the_ropes; TextureRenderingInfo four_characters; TextureRenderingInfo left_arrow; TextureRenderingInfo right_arrow; TextureRenderingInfo start_panel; TextureRenderingInfo go_back_wooden_panel; - float unknown2; - float start_panel_slide_timer; + float start_panel_slide; + float go_back_wooden_panel_slide; float pulsating_arrows_timer; uint8_t selected_player; uint8_t buttons; @@ -603,7 +603,7 @@ class ScreenTransition : public Screen // ID: 13 TextureRenderingInfo woodpanel_bottomcutout1; TextureRenderingInfo woodpanel_bottomcutout2; TextureRenderingInfo woodpanel_bottomcutout3; - TextureRenderingInfo unknown_all_forced; + TextureRenderingInfo scroll; TextureRenderingInfo stats_scroll_top_bottom; TextureRenderingInfo killcount_rounded_rect; TextureRenderingInfo level_completed_panel; @@ -667,13 +667,7 @@ class ScreenTransition : public Screen // ID: 13 Color this_level_money_color; - uint8_t unknown41; - uint8_t unknown42; - uint8_t unknown43; - uint8_t unknown44; - uint32_t unknown45; - uint32_t unknown46; - uint32_t unknown47; + std::array buttons; }; /// The POST render call will only be visible in the polaroid area on the left of the book. The book is apparently drawn on top of that. diff --git a/src/game_api/screen_arena.hpp b/src/game_api/screen_arena.hpp index a5fcd0543..0ed191e30 100644 --- a/src/game_api/screen_arena.hpp +++ b/src/game_api/screen_arena.hpp @@ -229,7 +229,7 @@ struct ScreenArenaScoreLavaBubble float y; int16_t timer1; uint8_t timer2; // counts down when the timer1 = -1 - bool unknown; + bool visible; }; struct ScreenArenaScoreUnknown @@ -287,7 +287,7 @@ class ScreenArenaScore : public Screen // ID: 27 TextureRenderingInfo unknown25; TextureRenderingInfo score_counter; TextureRenderingInfo unknown27; - TextureRenderingInfo unknown28; + TextureRenderingInfo lava_bubbles; std::array player_won; float victory_jump_y_pos; @@ -306,6 +306,6 @@ class ScreenArenaScore : public Screen // ID: 27 float next_sidepanel_slidein_timer; // uint32_t padding_probably; std::array particles; - std::array lava_bubbles; + std::array lava_bubbles_positions; std::array unknown45; // only used if one of the players win, probably the flying down confetti/featers }; diff --git a/src/game_api/script/usertypes/screen_lua.cpp b/src/game_api/script/usertypes/screen_lua.cpp index cdc6ec074..e9c432653 100644 --- a/src/game_api/script/usertypes/screen_lua.cpp +++ b/src/game_api/script/usertypes/screen_lua.cpp @@ -323,17 +323,14 @@ void register_usertypes(sol::state& lua) &FlyingThing::sinewave_angle); auto screenteamselect_type = lua.new_usertype("ScreenTeamSelect", sol::base_classes, sol::bases()); - screenteamselect_type["ana_carrying_torch"] = &ScreenTeamSelect::ana_carrying_torch; screenteamselect_type["scroll_bottom_left"] = &ScreenTeamSelect::scroll_bottom_left; screenteamselect_type["scrollend_bottom_left"] = &ScreenTeamSelect::scrollend_bottom_left; screenteamselect_type["four_ropes"] = &ScreenTeamSelect::four_ropes; - screenteamselect_type["unknown4"] = &ScreenTeamSelect::unknown4; screenteamselect_type["four_characters"] = &ScreenTeamSelect::four_characters; screenteamselect_type["left_arrow"] = &ScreenTeamSelect::left_arrow; screenteamselect_type["right_arrow"] = &ScreenTeamSelect::right_arrow; screenteamselect_type["start_panel"] = &ScreenTeamSelect::start_panel; screenteamselect_type["go_back_wooden_panel"] = &ScreenTeamSelect::go_back_wooden_panel; - screenteamselect_type["start_panel_slide_timer"] = &ScreenTeamSelect::start_panel_slide_timer; screenteamselect_type["pulsating_arrows_timer"] = &ScreenTeamSelect::pulsating_arrows_timer; screenteamselect_type["selected_player"] = &ScreenTeamSelect::selected_player; screenteamselect_type["buttons"] = &ScreenTeamSelect::buttons; @@ -385,7 +382,7 @@ void register_usertypes(sol::state& lua) screentransition_type["woodpanel_bottomcutout1"] = &ScreenTransition::woodpanel_bottomcutout1; screentransition_type["woodpanel_bottomcutout2"] = &ScreenTransition::woodpanel_bottomcutout2; screentransition_type["woodpanel_bottomcutout3"] = &ScreenTransition::woodpanel_bottomcutout3; - screentransition_type["unknown_all_forced"] = &ScreenTransition::unknown_all_forced; + screentransition_type["scroll"] = &ScreenTransition::scroll; screentransition_type["stats_scroll_top_bottom"] = &ScreenTransition::stats_scroll_top_bottom; screentransition_type["killcount_rounded_rect"] = &ScreenTransition::killcount_rounded_rect; screentransition_type["level_completed_panel"] = &ScreenTransition::level_completed_panel; From 6da87f3749f4253eae3d0c6e7f80992576ff2eb1 Mon Sep 17 00:00:00 2001 From: Mr-Auto <36127424+Mr-Auto@users.noreply.github.com> Date: Tue, 14 Nov 2023 22:55:40 +0100 Subject: [PATCH 17/19] expose the known stuff --- docs/game_data/spel2.lua | 278 ++++++++---------- docs/src/includes/_enums.md | 2 +- docs/src/includes/_events.md | 2 +- docs/src/includes/_types.md | 270 +++++++---------- src/game_api/game_manager.hpp | 11 +- src/game_api/screen.hpp | 144 ++++----- src/game_api/screen_arena.hpp | 13 +- src/game_api/script/lua_vm.cpp | 2 - .../script/usertypes/game_manager_lua.cpp | 3 + .../script/usertypes/screen_arena_lua.cpp | 62 ++-- src/game_api/script/usertypes/screen_lua.cpp | 174 +++++++---- 11 files changed, 455 insertions(+), 506 deletions(-) diff --git a/docs/game_data/spel2.lua b/docs/game_data/spel2.lua index 7e6df4cdf..2f02e0e44 100644 --- a/docs/game_data/spel2.lua +++ b/docs/game_data/spel2.lua @@ -2261,6 +2261,9 @@ do ---@field screen_seed_input ScreenCodeInput ---@field screen_camp ScreenCamp ---@field screen_level ScreenLevel + ---@field screen_transition Screen + ---@field screen_arena_level Screen + ---@field screen_arena_score Screen ---@field screen_online_loading ScreenOnlineLoading ---@field screen_online_lobby ScreenOnlineLobby ---@field pause_ui PauseUI @@ -5519,6 +5522,35 @@ function Quad:is_point_inside(p, epsilon) end ---@return boolean function Quad:is_point_inside(x, y, epsilon) end +---@class MenuScreenPanels + ---@field woodpanels_velocity number + ---@field woodpanels_progress number + ---@field scroll_unfurl_progress number + ---@field bottom_woodpanel_speed_multiplayer number + ---@field bottom_woodpanel_y_offset number + ---@field bottom_woodpanel TextureRenderingInfo + ---@field top_woodpanel TextureRenderingInfo + ---@field scroll TextureRenderingInfo + ---@field top_woodpanel_left_scrollhandle TextureRenderingInfo + ---@field top_woodpanel_right_scrollhandle TextureRenderingInfo + ---@field scroll_text STRINGID + ---@field bottom_left_text STRINGID + ---@field bottom_right_text STRINGID + ---@field bottom_middle_text STRINGID + ---@field top_woodpanel_visible boolean + ---@field bottom_woodpanel_visible boolean + ---@field toggle_woodpanel_slidein_animation boolean + ---@field capitalize_scroll_text boolean + +---@class ScreenControls + ---@field up boolean + ---@field down boolean + ---@field left boolean + ---@field right boolean + ---@field direction_input integer @-1 - none, 0 - UP, 1 - DOWN, 2 - LEFT, 3 - RIGHT + ---@field hold_down_timer integer @Delay after which fast scroll activates (can stop at different value, only matters when you hold down the direction button) + ---@field fast_scroll_timer integer + ---@class Screen ---@field render_timer number ---@field init fun(self): nil @Initializes the screen. @@ -5527,10 +5559,12 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field logo_mossmouth TextureRenderingInfo ---@field logo_blitworks TextureRenderingInfo ---@field logo_fmod TextureRenderingInfo + ---@field state integer @0 - mossmouth, 1 - blitworks, 2 - fmod, 3 - end (next screen) + ---@field timer integer ---@class ScreenIntro : Screen - ---@field unknown4 TextureRenderingInfo - ---@field darkness number + ---@field blackout_background TextureRenderingInfo + ---@field blackout_alpha number ---@field active boolean @ends the intro immediately if set to false ---@field skip_prologue boolean @skips prologue and goes straight to the title screen after the intro @@ -5553,6 +5587,7 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field particle_torchflame_backflames_animated ParticleEmitterInfo ---@field particle_torchflame_flames_animated ParticleEmitterInfo ---@field particle_torchflame_ash ParticleEmitterInfo + ---@field brightness number ---@field music SoundMeta ---@field torch_sound SoundMeta @@ -5587,8 +5622,8 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field selected_menu_index integer ---@field sides_hold_down_timer integer ---@field sides_fast_scroll_timer integer - ---@field loop boolean - ---@field menu_id integer + ---@field loop boolean @Allow going up from first to last option + ---@field menu_id integer @0 = main menu, 1 = play, 2 = online ---@field transfer_to_menu_id integer ---@field menu_text_opacity number ---@field spear_position number[] @size: 6 @@ -5609,28 +5644,11 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field selected_menu_index integer ---@field sides_hold_down_timer integer ---@field sides_fast_scroll_timer integer - ---@field loop boolean - ---@field top_bottom_woodpanels_velocity number - ---@field top_bottom_woodpanels_progress number - ---@field scroll_unfurl_progress number - ---@field bottom_woodpanel_speed_multiplayer number - ---@field bottom_woodpanel_y_offset number - ---@field bottom_woodpanel TextureRenderingInfo - ---@field top_woodpanel TextureRenderingInfo - ---@field scroll TextureRenderingInfo - ---@field top_woodpanel_left_scrollhandle TextureRenderingInfo - ---@field top_woodpanel_right_scrollhandle TextureRenderingInfo - ---@field scroll_text STRINGID - ---@field bottom_left_text STRINGID - ---@field bottom_right_text STRINGID - ---@field bottom_middle_text STRINGID - ---@field top_woodpanel_visible boolean - ---@field bottom_woodpanel_visible boolean - ---@field toggle_woodpanel_slidein_animation boolean - ---@field capitalize_top_woodpanel boolean + ---@field loop boolean @Allow going up from first to last option + ---@field screen_panels MenuScreenPanels ---@field menu_id integer ---@field transfer_to_menu_id integer - ---@field graphic_and_audio GraphicandAudioSettings + ---@field show_apply_button boolean ---@field topleft_woodpanel_esc TextureRenderingInfo ---@field brick_background TextureRenderingInfo ---@field brick_middlelayer TextureRenderingInfo @@ -5645,32 +5663,26 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field progressbar_foreground TextureRenderingInfo ---@field volume_progressbar_position_indicator TextureRenderingInfo ---@field sectionheader_background TextureRenderingInfo + ---@field pet_icons TextureRenderingInfo @In "Gameplay" menu + ---@field bottom_scroll TextureRenderingInfo @For the code in the sync menu + ---@field bottom_left_scrollhandle TextureRenderingInfo + ---@field bottom_right_scrollhandle TextureRenderingInfo + ---@field topleft_woodpanel_esc_slidein number ---@field text_fadein number ---@field vertical_scroll_effect number - ---@field items_visiable boolean + ---@field options_visiable boolean ---@field show_highlight boolean @Shows the red background behind the option, the scarab on the left and left/right arrows ---@field tooltip_text STRINGID[] - ----@class GraphicandAudioSettings - ---@field fullscreen_resolution_id integer - ---@field windowed_resolution_id integer - ---@field resolution_scale integer @100 = 1.0 - ---@field display_mode integer @0 = Fullscreen, 1 = Borderless Windowed, 2 = Windowed + ---@field disable_controls boolean @Used for sync progress + ---@field sync_progress_state integer @0 - none, 1 - waiting for the code, 2 - code acquired, 3 - sync in progress, 4 - sync completed + ---@field credits_progression number ---@class ScreenCodeInput : Screen - ---@field bottom_woodpanel_slideup_speed number - ---@field bottom_woodpanel_slideup_timer number - ---@field bottom_woodpanel_y_offset number - ---@field bottom_woodpanel TextureRenderingInfo - ---@field bottom_left_text STRINGID - ---@field bottom_right_text STRINGID @The only one actually used - ---@field bottom_middle_text STRINGID - ---@field show_bottom_woodpanel boolean - ---@field slide_in_bottom_woodpanel boolean + ---@field screen_panels MenuScreenPanels ---@field allow_random boolean @needs to be set before opening the screen to show the correct text at the bottom ---@field selected_button_index integer ---@field pressed_select boolean - ---@field topleft_woodpanel_esc_slidein_timer number + ---@field topleft_woodpanel_esc_slidein number ---@field scroll_text_id STRINGID ---@field start_text_id STRINGID ---@field main_woodpanel_left_border TextureRenderingInfo @@ -5682,26 +5694,28 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field key_background TextureRenderingInfo ---@field topleft_woodpanel_esc TextureRenderingInfo ---@field start_sidepanel TextureRenderingInfo - ---@field start_sidepanel_slidein_timer number + ---@field start_sidepanel_slidein number ---@field seed_length integer @Current input length (0-8). You probably shouldn't write to this, except to set it to 0. ---@field get_seed fun(self): integer? @Get the seed currently entered in the seed dialog or nil if nothing is entered. Will also return incomplete seeds, check seed_length to verify it's ready. ---@field set_seed fun(self, seed: integer?, length: integer?): nil @Set the seed entered in the seed dialog. Call without arguments to clear entered seed. Optionally enter a length to set partial seed. +---@class FlyingThing + ---@field texture_info TextureRenderingInfo + ---@field entity_type ENT_TYPE + ---@field spritesheet_column number + ---@field spritesheet_row number + ---@field spritesheet_animation_length number + ---@field velocity_x number + ---@field amplitude number + ---@field frequency number + ---@field sinewave_angle number + ---@class ScreenCharacterSelect : Screen + ---@field main_background_zoom_progress number ---@field main_background_zoom_target number + ---@field blurred_border_zoom_progress number ---@field blurred_border_zoom_target number - ---@field top_bottom_woodpanel_slidein_timer number - ---@field top_scroll_unfurl_timer number - ---@field bottom_woodpanel TextureRenderingInfo - ---@field top_woodpanel TextureRenderingInfo - ---@field left_scroll_handle TextureRenderingInfo - ---@field right_scroll_handle TextureRenderingInfo - ---@field left_button_text_id STRINGID - ---@field right_button_text_id STRINGID - ---@field middle_button_text_id STRINGID - ---@field top_woodpanel_visible boolean - ---@field bottom_woodpanel_visible boolean - ---@field toggle_woodpanel_slidein_animation boolean + ---@field screen_panels MenuScreenPanels ---@field mine_entrance_background TextureRenderingInfo ---@field character TextureRenderingInfo ---@field character_shadow TextureRenderingInfo @@ -5727,16 +5741,18 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field player_quickselect_fadein_timer number[] @size: MAX_PLAYERS ---@field player_quickselect_coords number[][] @size: MAX_PLAYERS ---@field player_quickselect_wiggle_angle number[] @size: MAX_PLAYERS - ---@field topleft_woodpanel_esc_slidein_timer number - ---@field start_panel_slidein_timer number + ---@field topleft_woodpanel_esc_slidein number + ---@field start_panel_slidein number ---@field action_buttons_keycap_size number + ---@field next_screen_to_load integer ---@field not_ready_to_start_yet boolean ---@field available_mine_entrances integer ---@field amount_of_mine_entrances_activated integer - ---@field buttons integer - ---@field opacity number + ---@field screen_blackout TextureRenderingInfo + ---@field blackout_transparency number ---@field start_pressed boolean ---@field transition_to_game_started boolean + ---@field disable_controls boolean ---@field flying_things FlyingThing[] @size: 6 ---@field flying_thing_countdown integer ---@field particle_ceilingdust_smoke ParticleEmitterInfo @@ -5750,31 +5766,22 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field particle_torchflame_flames3 ParticleEmitterInfo ---@field particle_torchflame_smoke4 ParticleEmitterInfo ---@field particle_torchflame_flames4 ParticleEmitterInfo - ---@field sound SoundMeta - ----@class FlyingThing - ---@field texture_info TextureRenderingInfo - ---@field entity_type ENT_TYPE - ---@field spritesheet_column number - ---@field spritesheet_row number - ---@field spritesheet_animation_length number - ---@field velocity_x number - ---@field amplitude number - ---@field frequency number - ---@field sinewave_angle number + ---@field torch_sound SoundMeta[] @size: 4 + ---@field buttons integer[] @size: MAX_PLAYERS ---@class ScreenTeamSelect : Screen - ---@field ana_carrying_torch TextureRenderingInfo + ---@field player_portrait TextureRenderingInfo ---@field scroll_bottom_left TextureRenderingInfo ---@field scrollend_bottom_left TextureRenderingInfo ---@field four_ropes TextureRenderingInfo - ---@field unknown4 TextureRenderingInfo + ---@field gems_above_the_ropes TextureRenderingInfo ---@field four_characters TextureRenderingInfo ---@field left_arrow TextureRenderingInfo ---@field right_arrow TextureRenderingInfo ---@field start_panel TextureRenderingInfo ---@field go_back_wooden_panel TextureRenderingInfo - ---@field start_panel_slide_timer number + ---@field start_panel_slide number + ---@field go_back_wooden_panel_slide number ---@field pulsating_arrows_timer number ---@field selected_player integer ---@field buttons integer @@ -5798,6 +5805,7 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field stats_scroll_horizontal_posaa number ---@field stats_scroll_vertical_pos number ---@field level_completed_pos number + ---@field stats_scroll_unfurl_actualvalue number ---@field stats_scroll_unfurl_targetvalue number ---@field woodpanel1 TextureRenderingInfo ---@field woodpanel2 TextureRenderingInfo @@ -5809,7 +5817,7 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field woodpanel_bottomcutout1 TextureRenderingInfo ---@field woodpanel_bottomcutout2 TextureRenderingInfo ---@field woodpanel_bottomcutout3 TextureRenderingInfo - ---@field unknown_all_forced TextureRenderingInfo + ---@field scroll TextureRenderingInfo ---@field stats_scroll_top_bottom TextureRenderingInfo ---@field killcount_rounded_rect TextureRenderingInfo ---@field level_completed_panel TextureRenderingInfo @@ -5820,6 +5828,7 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field speechbubble TextureRenderingInfo ---@field speechbubble_arrow TextureRenderingInfo ---@field mama_tunnel_fade_targetvalue number + ---@field mama_tunnel_fade_targetvalue number ---@field mama_tunnel_text_id STRINGID ---@field mama_tunnel_choice_visible boolean ---@field mama_tunnel_agree_with_gift boolean @@ -5831,7 +5840,7 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field woodpanel_cutout_big_money2 TextureRenderingInfo ---@field woodpanel_cutout_big_money3 TextureRenderingInfo ---@field big_dollar_sign TextureRenderingInfo - ---@field unknown26 TextureRenderingInfo + ---@field stats_scroll_unfurl_sequence integer ---@field player_stats_scroll_numeric_value integer[] @size: MAX_PLAYERS ---@field player_secondary_icon TextureRenderingInfo[] @size: MAX_PLAYERS ---@field player_icon TextureRenderingInfo[] @size: MAX_PLAYERS @@ -5840,6 +5849,7 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field hourglasses TextureRenderingInfo ---@field small_dollar_signs TextureRenderingInfo ---@field this_level_money_color Color + ---@field buttons integer[] @size: MAX_PLAYERS ---@class ScreenDeath : Screen @@ -5850,6 +5860,7 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field rescuing_ship_entity Entity ---@class ScreenCredits : Screen + ---@field credits_progression number ---@field bg_music_info SoundMeta ---@class ScreenScores : Screen @@ -5884,22 +5895,7 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field searching boolean ---@class ScreenOnlineLobby : Screen - ---@field bottom_woodpanel_slideup_speed number - ---@field bottom_woodpanel_slideup number - ---@field scroll_unfurl number - ---@field bottom_woodpanel_y_offset number - ---@field woodpanel_bottom TextureRenderingInfo - ---@field woodpanel_top TextureRenderingInfo - ---@field scroll TextureRenderingInfo - ---@field left_scroll_handle TextureRenderingInfo - ---@field right_scroll_handle TextureRenderingInfo - ---@field scroll_text STRINGID - ---@field bottom_left_text STRINGID - ---@field bottom_right_text STRINGID - ---@field bottom_middle_text STRINGID - ---@field show_top_woodpanel boolean - ---@field show_bottom_woodpanel boolean - ---@field slide_in_bottom_woodpanel boolean + ---@field screen_panels MenuScreenPanels ---@field players OnlineLobbyScreenPlayer[] @size: 4 ---@field background_image TextureRenderingInfo ---@field topleft_woodpanel_esc TextureRenderingInfo @@ -5926,14 +5922,17 @@ function Quad:is_point_inside(x, y, epsilon) end ---@class PauseUI ---@field menu_slidein_progress number - ---@field blurred_background TextureRenderingInfo @Actually darkened background when you get a prompt asking are you sure about selecting that option + ---@field blurred_background TextureRenderingInfo ---@field woodpanel_left TextureRenderingInfo ---@field woodpanel_middle TextureRenderingInfo ---@field woodpanel_right TextureRenderingInfo ---@field woodpanel_top TextureRenderingInfo ---@field scroll TextureRenderingInfo ---@field confirmation_panel TextureRenderingInfo @Prompt background - ---@field previously_selected_menu_index integer @This is more like selected_option, it's set when you select an option and the game displays the prompt + ---@field selected_option integer @It's set wh game displays the prompt + ---@field prompt_visible boolean + ---@field buttons_actions integer[] @size: MAX_PLAYERS + ---@field buttons_movement integer[] @size: MAX_PLAYERS ---@field visibility integer @0 - Invisible, 1 - Sliding down, 2 - Visible, 3 - Sliding up ---@class JournalUI @@ -5945,10 +5944,9 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field book_background TextureRenderingInfo ---@field arrow_left TextureRenderingInfo ---@field arrow_right TextureRenderingInfo - ---@field unknown23 TextureRenderingInfo ---@field entire_book TextureRenderingInfo - ---@field page_timer integer ---@field fade_timer integer + ---@field page_timer integer ---@field opacity integer ---@field pages JournalPage[] @Stores pages loaded into memeory. It's not cleared after the journal is closed or when you go back to the main (menu) page.
Use `:get_type()` to chcek page type and cast it correctly (see ON.[RENDER_PRE_JOURNAL_PAGE](#ON-RENDER_PRE_JOURNAL_PAGE)) @@ -5996,8 +5994,6 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field trap_icon TextureRenderingInfo ---@field trap_background TextureRenderingInfo ----@class JournalPageStory : JournalPage - ---@class JournalPageFeats : JournalPage ---@field chapter_title_text_info TextRenderingInfo ---@field feat_icons TextureRenderingInfo @@ -6014,8 +6010,6 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field time_text_info TextRenderingInfo ---@field time_value_text_info TextRenderingInfo ----@class JournalPageRecap : JournalPage - ---@class JournalPagePlayerProfile : JournalPage ---@field player_icon TextureRenderingInfo ---@field player_icon_id integer @@ -6053,32 +6047,10 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field sticker_count integer ---@field stickers TextureRenderingInfo[] @size: 20 ----@class ScreenControls - ---@field up boolean - ---@field down boolean - ---@field left boolean - ---@field right boolean - ---@field direction_input integer @-1 - none, 0 - UP, 1 - DOWN, 2 - LEFT, 3 - RIGHT - ---@field hold_down_timer integer @Delay after which fast scroll activates (can stop at different value, only matters when you hold down the direction button) - ---@field fast_scroll_timer integer - ---@class ScreenArenaMenu : Screen ---@field brick_background_animation ScreenZoomAnimation ---@field blurry_border_animation ScreenZoomAnimation - ---@field top_woodpanel_slidein_timer number - ---@field top_scroll_unfurl_timer number - ---@field unknown13 TextureRenderingInfo - ---@field woodpanel_top TextureRenderingInfo - ---@field unknown15 TextureRenderingInfo - ---@field left_scroll_handle TextureRenderingInfo - ---@field right_scroll_handle TextureRenderingInfo - ---@field scroll_text_id STRINGID - ---@field unknown17_text_id STRINGID - ---@field unknown18_text_id STRINGID - ---@field unknown19_text_id STRINGID - ---@field top_woodpanel_visible boolean - ---@field bottom_woodpanel_visible boolean - ---@field woodpanels_toggle boolean + ---@field screen_panels MenuScreenPanels ---@field brick_background TextureRenderingInfo ---@field blurry_border TextureRenderingInfo ---@field blurry_border2 TextureRenderingInfo @@ -6104,28 +6076,15 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field bottom_left_bricks TextureRenderingInfo ---@field top_left_esc_panel TextureRenderingInfo ---@field next_panel TextureRenderingInfo + ---@field option_captions ArenaRulesString[] ---@field center_panels_hor_slide_position number ---@field esc_next_panels_slide_timer number ---@field main_panel_vertical_scroll_position number ---@field selected_option_index integer ---@field contols ScreenControls ----@class ScreenZoomAnimation - ---@field zoom_target number - ---@class ScreenArenaStagesSelect : Screen - ---@field woodenpanel_top_slidein_timer number - ---@field woodenpanel_top_scroll_unfurl_timer number - ---@field woodenpanel_top TextureRenderingInfo - ---@field woodenpanel_top_left_scroll TextureRenderingInfo - ---@field woodenpanel_top_right_scroll TextureRenderingInfo - ---@field text_id_1 STRINGID - ---@field text_id_2 STRINGID - ---@field text_id_3 STRINGID - ---@field text_id_4 STRINGID - ---@field woodenpanel_top_visible boolean - ---@field woodenpanel_bottom_visible boolean - ---@field woodenpanels_toggle boolean + ---@field screen_panels MenuScreenPanels ---@field buttons integer ---@field brick_background TextureRenderingInfo ---@field info_black_background TextureRenderingInfo @@ -6152,24 +6111,14 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field players_turn_scroll TextureRenderingInfo ---@field players_turn_scroll_handle TextureRenderingInfo ---@field grid_player_icon TextureRenderingInfo + ---@field stages_to_gay_out table + ---@field panels_slide_from_both_sides number + ---@field visibility_all_stages number ---@field selected_stage_index integer ---@field contols ScreenControls ---@class ScreenArenaItems : Screen - ---@field woodpanel_top_slidein_timer number - ---@field woodpanel_top_scroll_unfurl_timer number - ---@field unknown9 TextureRenderingInfo - ---@field woodpanel_top TextureRenderingInfo - ---@field unknown11 TextureRenderingInfo - ---@field top_scroll_left_handle TextureRenderingInfo - ---@field top_scroll_right_handle TextureRenderingInfo - ---@field scroll_text_id STRINGID - ---@field text_id_2 STRINGID - ---@field text_id_3 STRINGID - ---@field text_id_4 STRINGID - ---@field woodpanel_top_visible boolean - ---@field woodpanel_bottom_visible boolean - ---@field woodpanels_toggle boolean + ---@field screen_panels MenuScreenPanels ---@field brick_background TextureRenderingInfo ---@field black_background_bottom_right TextureRenderingInfo ---@field woodpanel_bottom TextureRenderingInfo @@ -6185,6 +6134,7 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field item_equipped_badge TextureRenderingInfo ---@field item_off_gray_overlay TextureRenderingInfo ---@field esc_woodpanel TextureRenderingInfo + ---@field items_to_gay_out table ---@field center_panels_horizontal_slide_position number ---@field esc_panel_slide_timer number ---@field selected_item_index integer @@ -6195,27 +6145,33 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field background_colors TextureRenderingInfo ---@field vertical_lines TextureRenderingInfo ---@field vertical_line_electricity_effect TextureRenderingInfo - ---@field unknown_all_forced TextureRenderingInfo ---@field left_scroll TextureRenderingInfo ---@field right_scroll TextureRenderingInfo - ---@field scroll_unfurl_timer number + ---@field scroll_unfurl number ---@field waiting boolean ---@field names_opacity number ---@field line_electricity_effect_timer number ---@field state integer ---@field countdown integer + ---@field particles ParticleEmitterInfo[] @size: 9 ---@class ScreenArenaLevel : Screen ---@field get_ready TextureRenderingInfo ---@field get_ready_gray_background TextureRenderingInfo ---@field get_ready_outline TextureRenderingInfo + ---@field particles ParticleEmitterInfo[] @size: 11 + +---@class ScreenArenaScoreLavaBubble + ---@field x number + ---@field y number + ---@field timer1 integer + ---@field timer2 integer + ---@field visible boolean ---@class ScreenArenaScore : Screen - ---@field woodpanel_slide_timer number - ---@field scroll_unfurl_timer number - ---@field unknown10 TextureRenderingInfo + ---@field woodpanel_slide number + ---@field scroll_unfurl number ---@field woodpanel TextureRenderingInfo - ---@field unknown_all_forced TextureRenderingInfo ---@field woodpanel_left_scroll TextureRenderingInfo ---@field woodpanel_right_scroll TextureRenderingInfo ---@field text_id_1 STRINGID @@ -6231,15 +6187,11 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field bottom_lava TextureRenderingInfo ---@field players TextureRenderingInfo ---@field player_shadows TextureRenderingInfo - ---@field unknown24 TextureRenderingInfo - ---@field unknown25 TextureRenderingInfo ---@field score_counter TextureRenderingInfo - ---@field unknown27 TextureRenderingInfo - ---@field lava_bubbles ScreenArenaScoreLavaBubble[] @size: 15 + ---@field lava_bubbles TextureRenderingInfo ---@field player_won boolean[] @size: MAX_PLAYERS ---@field victory_jump_y_pos number ---@field victory_jump_velocity number - ---@field animation_frame integer ---@field squash_and_celebrate boolean ---@field player_ready boolean[] @size: MAX_PLAYERS ---@field next_transition_timer integer @@ -6247,6 +6199,8 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field player_crushing_pillar_height number[] @size: MAX_PLAYERS ---@field player_create_giblets boolean[] @size: MAX_PLAYERS ---@field next_sidepanel_slidein_timer number + ---@field particles ParticleEmitterInfo[] @size: 13 + ---@field lava_bubbles_positions ScreenArenaScoreLavaBubble[] @size: 15 ---@class UdpServer diff --git a/docs/src/includes/_enums.md b/docs/src/includes/_enums.md index 352f23843..76984f659 100644 --- a/docs/src/includes/_enums.md +++ b/docs/src/includes/_enums.md @@ -846,7 +846,7 @@ Name | Data | Description [RENDER_PRE_DRAW_DEPTH](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ON.RENDER_PRE_DRAW_DEPTH) | ON::RENDER_PRE_DRAW_DEPTH | Params: [VanillaRenderContext](#VanillaRenderContext) render_ctx, int draw_depth
Runs before the entities of the specified draw_depth are drawn on screen. In this event, you can draw textures with the `draw_world_texture` function of the render_ctx. Return `true` to skip rendering.
[RENDER_POST_DRAW_DEPTH](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ON.RENDER_POST_DRAW_DEPTH) | ON::RENDER_POST_DRAW_DEPTH | Params: [VanillaRenderContext](#VanillaRenderContext) render_ctx, int draw_depth
Runs right after the entities of the specified draw_depth are drawn on screen. In this event, you can draw textures with the `draw_world_texture` function of the render_ctx
[RENDER_PRE_JOURNAL_PAGE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ON.RENDER_PRE_JOURNAL_PAGE) | ON::RENDER_PRE_JOURNAL_PAGE | Params: [VanillaRenderContext](#VanillaRenderContext) render_ctx, [JOURNAL_PAGE_TYPE](#JOURNAL_PAGE_TYPE) page_type, [JournalPage](#JournalPage) page
Runs before the journal page is drawn on screen. Return `true` to skip rendering.
-[RENDER_POST_JOURNAL_PAGE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ON.RENDER_POST_JOURNAL_PAGE) | ON::RENDER_POST_JOURNAL_PAGE | Params: [VanillaRenderContext](#VanillaRenderContext) render_ctx, [JOURNAL_PAGE_TYPE](#JOURNAL_PAGE_TYPE) page_type, [JournalPage](#JournalPage) page
Runs after the journal page is drawn on screen. In this event, you can draw textures with the draw_screen_texture function of the [VanillaRenderContext](#VanillaRenderContext)
The [JournalPage](#JournalPage) parameter gives you access to the specific fields of the page. Be sure to cast it to the correct type, the following functions are available to do that:
`page:as_journal_page_progress()`
`page:as_journal_page_journalmenu()`
`page:as_journal_page_places()`
`page:as_journal_page_people()`
`page:as_journal_page_bestiary()`
`page:as_journal_page_items()`
`page:as_journal_page_traps()`
`page:as_journal_page_story()`
`page:as_journal_page_feats()`
`page:as_journal_page_deathcause()`
`page:as_journal_page_deathmenu()`
`page:as_journal_page_recap()`
`page:as_journal_page_playerprofile()`
`page:as_journal_page_lastgameplayed()`
+[RENDER_POST_JOURNAL_PAGE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ON.RENDER_POST_JOURNAL_PAGE) | ON::RENDER_POST_JOURNAL_PAGE | Params: [VanillaRenderContext](#VanillaRenderContext) render_ctx, [JOURNAL_PAGE_TYPE](#JOURNAL_PAGE_TYPE) page_type, [JournalPage](#JournalPage) page
Runs after the journal page is drawn on screen. In this event, you can draw textures with the draw_screen_texture function of the [VanillaRenderContext](#VanillaRenderContext)
The [JournalPage](#JournalPage) parameter gives you access to the specific fields of the page. Be sure to cast it to the correct type, the following functions are available to do that:
`page:as_journal_page_progress()`
`page:as_journal_page_journalmenu()`
`page:as_journal_page_places()`
`page:as_journal_page_people()`
`page:as_journal_page_bestiary()`
`page:as_journal_page_items()`
`page:as_journal_page_traps()`
`page:as_journal_page_feats()`
`page:as_journal_page_deathcause()`
`page:as_journal_page_deathmenu()`
`page:as_journal_page_playerprofile()`
`page:as_journal_page_lastgameplayed()`
[RENDER_PRE_LAYER](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ON.RENDER_PRE_LAYER) | ON::RENDER_PRE_LAYER | Params: [VanillaRenderContext](#VanillaRenderContext) render_ctx, int rendered_layer
Runs before a layer is rendered, runs for both layers during layer door transitions. Return `true` to skip rendering.
[RENDER_POST_LAYER](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ON.RENDER_POST_LAYER) | ON::RENDER_POST_LAYER | Params: [VanillaRenderContext](#VanillaRenderContext) render_ctx, int rendered_layer
Runs after a layer is rendered, runs for both layers during layer door transitions. Things drawn here will be part of the layer transition animation
[RENDER_PRE_LEVEL](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ON.RENDER_PRE_LEVEL) | ON::RENDER_PRE_LEVEL | Params: [VanillaRenderContext](#VanillaRenderContext) render_ctx, int camera_layer
Runs before the level is rendered. Return `true` to skip rendering.
diff --git a/docs/src/includes/_events.md b/docs/src/includes/_events.md index 22491bc72..7c5f07204 100644 --- a/docs/src/includes/_events.md +++ b/docs/src/includes/_events.md @@ -436,7 +436,7 @@ Params: [VanillaRenderContext](#VanillaRenderContext) render_ctx, [JOURNAL_PAGE_ > Search script examples for [ON.RENDER_POST_JOURNAL_PAGE](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ON.RENDER_POST_JOURNAL_PAGE) -Params: [VanillaRenderContext](#VanillaRenderContext) render_ctx, [JOURNAL_PAGE_TYPE](#JOURNAL_PAGE_TYPE) page_type, [JournalPage](#JournalPage) page
Runs after the journal page is drawn on screen. In this event, you can draw textures with the draw_screen_texture function of the [VanillaRenderContext](#VanillaRenderContext)
The [JournalPage](#JournalPage) parameter gives you access to the specific fields of the page. Be sure to cast it to the correct type, the following functions are available to do that:
`page:as_journal_page_progress()`
`page:as_journal_page_journalmenu()`
`page:as_journal_page_places()`
`page:as_journal_page_people()`
`page:as_journal_page_bestiary()`
`page:as_journal_page_items()`
`page:as_journal_page_traps()`
`page:as_journal_page_story()`
`page:as_journal_page_feats()`
`page:as_journal_page_deathcause()`
`page:as_journal_page_deathmenu()`
`page:as_journal_page_recap()`
`page:as_journal_page_playerprofile()`
`page:as_journal_page_lastgameplayed()`
+Params: [VanillaRenderContext](#VanillaRenderContext) render_ctx, [JOURNAL_PAGE_TYPE](#JOURNAL_PAGE_TYPE) page_type, [JournalPage](#JournalPage) page
Runs after the journal page is drawn on screen. In this event, you can draw textures with the draw_screen_texture function of the [VanillaRenderContext](#VanillaRenderContext)
The [JournalPage](#JournalPage) parameter gives you access to the specific fields of the page. Be sure to cast it to the correct type, the following functions are available to do that:
`page:as_journal_page_progress()`
`page:as_journal_page_journalmenu()`
`page:as_journal_page_places()`
`page:as_journal_page_people()`
`page:as_journal_page_bestiary()`
`page:as_journal_page_items()`
`page:as_journal_page_traps()`
`page:as_journal_page_feats()`
`page:as_journal_page_deathcause()`
`page:as_journal_page_deathmenu()`
`page:as_journal_page_playerprofile()`
`page:as_journal_page_lastgameplayed()`
## ON.RENDER_PRE_LAYER diff --git a/docs/src/includes/_types.md b/docs/src/includes/_types.md index 69f08f9c4..60bfbca97 100644 --- a/docs/src/includes/_types.md +++ b/docs/src/includes/_types.md @@ -666,16 +666,6 @@ bool | [pressed](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=presse Type | Name | Description ---- | ---- | ----------- -### GraphicandAudioSettings - - -Type | Name | Description ----- | ---- | ----------- -int | [fullscreen_resolution_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=fullscreen_resolution_id) | -int | [windowed_resolution_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=windowed_resolution_id) | -int | [resolution_scale](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=resolution_scale) | 100 = 1.0 -int | [display_mode](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=display_mode) | 0 = Fullscreen, 1 = Borderless Windowed, 2 = Windowed - ### Hud @@ -1273,22 +1263,6 @@ Type | Name | Description ---- | ---- | ----------- [TextureRenderingInfo](#TextureRenderingInfo) | [coffeestain_top](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=coffeestain_top) | -### JournalPageRecap - -Derived from [JournalPage](#JournalPage) - - -Type | Name | Description ----- | ---- | ----------- - -### JournalPageStory - -Derived from [JournalPage](#JournalPage) - - -Type | Name | Description ----- | ---- | ----------- - ### JournalPageTraps Derived from [JournalPage](#JournalPage) [JournalPageDiscoverable](#JournalPageDiscoverable) @@ -1918,13 +1892,36 @@ int | [max_page_count](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q= [TextureRenderingInfo](#TextureRenderingInfo) | [book_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=book_background) | [TextureRenderingInfo](#TextureRenderingInfo) | [arrow_left](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=arrow_left) | [TextureRenderingInfo](#TextureRenderingInfo) | [arrow_right](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=arrow_right) | -[TextureRenderingInfo](#TextureRenderingInfo) | [unknown23](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=unknown23) | [TextureRenderingInfo](#TextureRenderingInfo) | [entire_book](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=entire_book) | -int | [page_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=page_timer) | int | [fade_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=fade_timer) | +int | [page_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=page_timer) | int | [opacity](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=opacity) | vector<[JournalPage](#JournalPage)> | [pages](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=pages) | Stores pages loaded into memeory. It's not cleared after the journal is closed or when you go back to the main (menu) page.
Use `:get_type()` to chcek page type and cast it correctly (see ON.[RENDER_PRE_JOURNAL_PAGE](#ON-RENDER_PRE_JOURNAL_PAGE)) +### MenuScreenPanels + + +Type | Name | Description +---- | ---- | ----------- +float | [woodpanels_velocity](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanels_velocity) | +float | [woodpanels_progress](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanels_progress) | +float | [scroll_unfurl_progress](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll_unfurl_progress) | +float | [bottom_woodpanel_speed_multiplayer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_speed_multiplayer) | +float | [bottom_woodpanel_y_offset](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_y_offset) | +[TextureRenderingInfo](#TextureRenderingInfo) | [bottom_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel) | +[TextureRenderingInfo](#TextureRenderingInfo) | [top_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_woodpanel) | +[TextureRenderingInfo](#TextureRenderingInfo) | [scroll](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll) | +[TextureRenderingInfo](#TextureRenderingInfo) | [top_woodpanel_left_scrollhandle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_woodpanel_left_scrollhandle) | +[TextureRenderingInfo](#TextureRenderingInfo) | [top_woodpanel_right_scrollhandle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_woodpanel_right_scrollhandle) | +[STRINGID](#Aliases) | [scroll_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll_text) | +[STRINGID](#Aliases) | [bottom_left_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_left_text) | +[STRINGID](#Aliases) | [bottom_right_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_right_text) | +[STRINGID](#Aliases) | [bottom_middle_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_middle_text) | +bool | [top_woodpanel_visible](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_woodpanel_visible) | +bool | [bottom_woodpanel_visible](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_visible) | +bool | [toggle_woodpanel_slidein_animation](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=toggle_woodpanel_slidein_animation) | +bool | [capitalize_scroll_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=capitalize_scroll_text) | + ### OnlineLobbyScreenPlayer @@ -1941,14 +1938,17 @@ bool | [searching](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=sear Type | Name | Description ---- | ---- | ----------- float | [menu_slidein_progress](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=menu_slidein_progress) | -[TextureRenderingInfo](#TextureRenderingInfo) | [blurred_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=blurred_background) | Actually darkened background when you get a prompt asking are you sure about selecting that option +[TextureRenderingInfo](#TextureRenderingInfo) | [blurred_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=blurred_background) | [TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel_left](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_left) | [TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel_middle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_middle) | [TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel_right](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_right) | [TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel_top](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_top) | [TextureRenderingInfo](#TextureRenderingInfo) | [scroll](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll) | [TextureRenderingInfo](#TextureRenderingInfo) | [confirmation_panel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=confirmation_panel) | Prompt background -int | [previously_selected_menu_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=previously_selected_menu_index) | This is more like selected_option, it's set when you select an option and the game displays the prompt +int | [selected_option](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=selected_option) | It's set wh game displays the prompt +bool | [prompt_visible](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=prompt_visible) | +array<int, MAX_PLAYERS> | [buttons_actions](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=buttons_actions) | +array<int, MAX_PLAYERS> | [buttons_movement](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=buttons_movement) | int | [visibility](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=visibility) | 0 - Invisible, 1 - Sliding down, 2 - Visible, 3 - Sliding up ### SaveRelated @@ -1977,15 +1977,15 @@ Type | Name | Description [TextureRenderingInfo](#TextureRenderingInfo) | [background_colors](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=background_colors) | [TextureRenderingInfo](#TextureRenderingInfo) | [vertical_lines](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=vertical_lines) | [TextureRenderingInfo](#TextureRenderingInfo) | [vertical_line_electricity_effect](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=vertical_line_electricity_effect) | -[TextureRenderingInfo](#TextureRenderingInfo) | [unknown_all_forced](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=unknown_all_forced) | [TextureRenderingInfo](#TextureRenderingInfo) | [left_scroll](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=left_scroll) | [TextureRenderingInfo](#TextureRenderingInfo) | [right_scroll](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=right_scroll) | -float | [scroll_unfurl_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll_unfurl_timer) | +float | [scroll_unfurl](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll_unfurl) | bool | [waiting](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=waiting) | float | [names_opacity](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=names_opacity) | float | [line_electricity_effect_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=line_electricity_effect_timer) | int | [state](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=state) | int | [countdown](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=countdown) | +array<[ParticleEmitterInfo](#ParticleEmitterInfo), 9> | [particles](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=particles) | ### ScreenArenaItems @@ -1994,20 +1994,7 @@ Derived from [Screen](#Screen) Type | Name | Description ---- | ---- | ----------- -float | [woodpanel_top_slidein_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_top_slidein_timer) | -float | [woodpanel_top_scroll_unfurl_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_top_scroll_unfurl_timer) | -[TextureRenderingInfo](#TextureRenderingInfo) | [unknown9](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=unknown9) | -[TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel_top](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_top) | -[TextureRenderingInfo](#TextureRenderingInfo) | [unknown11](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=unknown11) | -[TextureRenderingInfo](#TextureRenderingInfo) | [top_scroll_left_handle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_scroll_left_handle) | -[TextureRenderingInfo](#TextureRenderingInfo) | [top_scroll_right_handle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_scroll_right_handle) | -[STRINGID](#Aliases) | [scroll_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll_text_id) | -[STRINGID](#Aliases) | [text_id_2](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=text_id_2) | -[STRINGID](#Aliases) | [text_id_3](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=text_id_3) | -[STRINGID](#Aliases) | [text_id_4](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=text_id_4) | -bool | [woodpanel_top_visible](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_top_visible) | -bool | [woodpanel_bottom_visible](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_bottom_visible) | -bool | [woodpanels_toggle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanels_toggle) | +[MenuScreenPanels](#MenuScreenPanels) | [screen_panels](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_panels) | [TextureRenderingInfo](#TextureRenderingInfo) | [brick_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=brick_background) | [TextureRenderingInfo](#TextureRenderingInfo) | [black_background_bottom_right](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=black_background_bottom_right) | [TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel_bottom](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_bottom) | @@ -2023,6 +2010,7 @@ bool | [woodpanels_toggle](https://github.com/spelunky-fyi/overlunky/search?l=Lu [TextureRenderingInfo](#TextureRenderingInfo) | [item_equipped_badge](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=item_equipped_badge) | [TextureRenderingInfo](#TextureRenderingInfo) | [item_off_gray_overlay](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=item_off_gray_overlay) | [TextureRenderingInfo](#TextureRenderingInfo) | [esc_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=esc_woodpanel) | +map<int, float> | [items_to_gay_out](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=items_to_gay_out) | float | [center_panels_horizontal_slide_position](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=center_panels_horizontal_slide_position) | float | [esc_panel_slide_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=esc_panel_slide_timer) | int | [selected_item_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=selected_item_index) | @@ -2038,6 +2026,7 @@ Type | Name | Description [TextureRenderingInfo](#TextureRenderingInfo) | [get_ready](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=get_ready) | [TextureRenderingInfo](#TextureRenderingInfo) | [get_ready_gray_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=get_ready_gray_background) | [TextureRenderingInfo](#TextureRenderingInfo) | [get_ready_outline](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=get_ready_outline) | +array<[ParticleEmitterInfo](#ParticleEmitterInfo), 11> | [particles](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=particles) | ### ScreenArenaMenu @@ -2046,22 +2035,9 @@ Derived from [Screen](#Screen) Type | Name | Description ---- | ---- | ----------- -[ScreenZoomAnimation](#ScreenZoomAnimation) | [brick_background_animation](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=brick_background_animation) | -[ScreenZoomAnimation](#ScreenZoomAnimation) | [blurry_border_animation](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=blurry_border_animation) | -float | [top_woodpanel_slidein_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_woodpanel_slidein_timer) | -float | [top_scroll_unfurl_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_scroll_unfurl_timer) | -[TextureRenderingInfo](#TextureRenderingInfo) | [unknown13](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=unknown13) | -[TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel_top](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_top) | -[TextureRenderingInfo](#TextureRenderingInfo) | [unknown15](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=unknown15) | -[TextureRenderingInfo](#TextureRenderingInfo) | [left_scroll_handle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=left_scroll_handle) | -[TextureRenderingInfo](#TextureRenderingInfo) | [right_scroll_handle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=right_scroll_handle) | -[STRINGID](#Aliases) | [scroll_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll_text_id) | -[STRINGID](#Aliases) | [unknown17_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=unknown17_text_id) | -[STRINGID](#Aliases) | [unknown18_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=unknown18_text_id) | -[STRINGID](#Aliases) | [unknown19_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=unknown19_text_id) | -bool | [top_woodpanel_visible](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_woodpanel_visible) | -bool | [bottom_woodpanel_visible](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_visible) | -bool | [woodpanels_toggle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanels_toggle) | +ScreenZoomAnimation | [brick_background_animation](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=brick_background_animation) | +ScreenZoomAnimation | [blurry_border_animation](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=blurry_border_animation) | +[MenuScreenPanels](#MenuScreenPanels) | [screen_panels](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_panels) | [TextureRenderingInfo](#TextureRenderingInfo) | [brick_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=brick_background) | [TextureRenderingInfo](#TextureRenderingInfo) | [blurry_border](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=blurry_border) | [TextureRenderingInfo](#TextureRenderingInfo) | [blurry_border2](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=blurry_border2) | @@ -2087,6 +2063,7 @@ bool | [woodpanels_toggle](https://github.com/spelunky-fyi/overlunky/search?l=Lu [TextureRenderingInfo](#TextureRenderingInfo) | [bottom_left_bricks](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_left_bricks) | [TextureRenderingInfo](#TextureRenderingInfo) | [top_left_esc_panel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_left_esc_panel) | [TextureRenderingInfo](#TextureRenderingInfo) | [next_panel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=next_panel) | +vector<ArenaRulesString> | [option_captions](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=option_captions) | float | [center_panels_hor_slide_position](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=center_panels_hor_slide_position) | float | [esc_next_panels_slide_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=esc_next_panels_slide_timer) | float | [main_panel_vertical_scroll_position](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=main_panel_vertical_scroll_position) | @@ -2100,11 +2077,9 @@ Derived from [Screen](#Screen) Type | Name | Description ---- | ---- | ----------- -float | [woodpanel_slide_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_slide_timer) | -float | [scroll_unfurl_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll_unfurl_timer) | -[TextureRenderingInfo](#TextureRenderingInfo) | [unknown10](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=unknown10) | +float | [woodpanel_slide](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_slide) | +float | [scroll_unfurl](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll_unfurl) | [TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel) | -[TextureRenderingInfo](#TextureRenderingInfo) | [unknown_all_forced](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=unknown_all_forced) | [TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel_left_scroll](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_left_scroll) | [TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel_right_scroll](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_right_scroll) | [STRINGID](#Aliases) | [text_id_1](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=text_id_1) | @@ -2120,15 +2095,11 @@ int | [animation_sequence](https://github.com/spelunky-fyi/overlunky/search?l=Lu [TextureRenderingInfo](#TextureRenderingInfo) | [bottom_lava](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_lava) | [TextureRenderingInfo](#TextureRenderingInfo) | [players](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=players) | [TextureRenderingInfo](#TextureRenderingInfo) | [player_shadows](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=player_shadows) | -[TextureRenderingInfo](#TextureRenderingInfo) | [unknown24](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=unknown24) | -[TextureRenderingInfo](#TextureRenderingInfo) | [unknown25](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=unknown25) | [TextureRenderingInfo](#TextureRenderingInfo) | [score_counter](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=score_counter) | -[TextureRenderingInfo](#TextureRenderingInfo) | [unknown27](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=unknown27) | -array<ScreenArenaScoreLavaBubble, 15> | [lava_bubbles](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=lava_bubbles) | +[TextureRenderingInfo](#TextureRenderingInfo) | [lava_bubbles](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=lava_bubbles) | array<bool, MAX_PLAYERS> | [player_won](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=player_won) | float | [victory_jump_y_pos](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=victory_jump_y_pos) | float | [victory_jump_velocity](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=victory_jump_velocity) | -int | [animation_frame](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=animation_frame) | bool | [squash_and_celebrate](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=squash_and_celebrate) | array<bool, MAX_PLAYERS> | [player_ready](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=player_ready) | int | [next_transition_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=next_transition_timer) | @@ -2136,6 +2107,19 @@ array<float, MAX_PLAYERS> | [player_bottom_pillar_offset](https://github.c array<float, MAX_PLAYERS> | [player_crushing_pillar_height](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=player_crushing_pillar_height) | array<bool, MAX_PLAYERS> | [player_create_giblets](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=player_create_giblets) | float | [next_sidepanel_slidein_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=next_sidepanel_slidein_timer) | +array<[ParticleEmitterInfo](#ParticleEmitterInfo), 13> | [particles](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=particles) | +array<[ScreenArenaScoreLavaBubble](#ScreenArenaScoreLavaBubble), 15> | [lava_bubbles_positions](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=lava_bubbles_positions) | + +### ScreenArenaScoreLavaBubble + + +Type | Name | Description +---- | ---- | ----------- +float | [x](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=x) | +float | [y](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=y) | +int | [timer1](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=timer1) | +int | [timer2](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=timer2) | +bool | [visible](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=visible) | ### ScreenArenaStagesSelect @@ -2144,18 +2128,7 @@ Derived from [Screen](#Screen) Type | Name | Description ---- | ---- | ----------- -float | [woodenpanel_top_slidein_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodenpanel_top_slidein_timer) | -float | [woodenpanel_top_scroll_unfurl_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodenpanel_top_scroll_unfurl_timer) | -[TextureRenderingInfo](#TextureRenderingInfo) | [woodenpanel_top](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodenpanel_top) | -[TextureRenderingInfo](#TextureRenderingInfo) | [woodenpanel_top_left_scroll](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodenpanel_top_left_scroll) | -[TextureRenderingInfo](#TextureRenderingInfo) | [woodenpanel_top_right_scroll](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodenpanel_top_right_scroll) | -[STRINGID](#Aliases) | [text_id_1](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=text_id_1) | -[STRINGID](#Aliases) | [text_id_2](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=text_id_2) | -[STRINGID](#Aliases) | [text_id_3](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=text_id_3) | -[STRINGID](#Aliases) | [text_id_4](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=text_id_4) | -bool | [woodenpanel_top_visible](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodenpanel_top_visible) | -bool | [woodenpanel_bottom_visible](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodenpanel_bottom_visible) | -bool | [woodenpanels_toggle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodenpanels_toggle) | +[MenuScreenPanels](#MenuScreenPanels) | [screen_panels](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_panels) | int | [buttons](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=buttons) | [TextureRenderingInfo](#TextureRenderingInfo) | [brick_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=brick_background) | [TextureRenderingInfo](#TextureRenderingInfo) | [info_black_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=info_black_background) | @@ -2182,6 +2155,9 @@ int | [buttons](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=buttons [TextureRenderingInfo](#TextureRenderingInfo) | [players_turn_scroll](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=players_turn_scroll) | [TextureRenderingInfo](#TextureRenderingInfo) | [players_turn_scroll_handle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=players_turn_scroll_handle) | [TextureRenderingInfo](#TextureRenderingInfo) | [grid_player_icon](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=grid_player_icon) | +map<int, float> | [stages_to_gay_out](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=stages_to_gay_out) | +float | [panels_slide_from_both_sides](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=panels_slide_from_both_sides) | +float | [visibility_all_stages](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=visibility_all_stages) | int | [selected_stage_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=selected_stage_index) | [ScreenControls](#ScreenControls) | [contols](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=contols) | @@ -2201,20 +2177,11 @@ Derived from [Screen](#Screen) Type | Name | Description ---- | ---- | ----------- +float | [main_background_zoom_progress](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=main_background_zoom_progress) | float | [main_background_zoom_target](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=main_background_zoom_target) | +float | [blurred_border_zoom_progress](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=blurred_border_zoom_progress) | float | [blurred_border_zoom_target](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=blurred_border_zoom_target) | -float | [top_bottom_woodpanel_slidein_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_bottom_woodpanel_slidein_timer) | -float | [top_scroll_unfurl_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_scroll_unfurl_timer) | -[TextureRenderingInfo](#TextureRenderingInfo) | [bottom_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel) | -[TextureRenderingInfo](#TextureRenderingInfo) | [top_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_woodpanel) | -[TextureRenderingInfo](#TextureRenderingInfo) | [left_scroll_handle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=left_scroll_handle) | -[TextureRenderingInfo](#TextureRenderingInfo) | [right_scroll_handle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=right_scroll_handle) | -[STRINGID](#Aliases) | [left_button_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=left_button_text_id) | -[STRINGID](#Aliases) | [right_button_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=right_button_text_id) | -[STRINGID](#Aliases) | [middle_button_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=middle_button_text_id) | -bool | [top_woodpanel_visible](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_woodpanel_visible) | -bool | [bottom_woodpanel_visible](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_visible) | -bool | [toggle_woodpanel_slidein_animation](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=toggle_woodpanel_slidein_animation) | +[MenuScreenPanels](#MenuScreenPanels) | [screen_panels](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_panels) | [TextureRenderingInfo](#TextureRenderingInfo) | [mine_entrance_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=mine_entrance_background) | [TextureRenderingInfo](#TextureRenderingInfo) | [character](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=character) | [TextureRenderingInfo](#TextureRenderingInfo) | [character_shadow](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=character_shadow) | @@ -2240,16 +2207,18 @@ array<bool, MAX_PLAYERS> | [player_quickselect_shown](https://github.com/s array<float, MAX_PLAYERS> | [player_quickselect_fadein_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=player_quickselect_fadein_timer) | array<array<float, 2>, MAX_PLAYERS> | [player_quickselect_coords](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=player_quickselect_coords) | array<float, MAX_PLAYERS> | [player_quickselect_wiggle_angle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=player_quickselect_wiggle_angle) | -float | [topleft_woodpanel_esc_slidein_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=topleft_woodpanel_esc_slidein_timer) | -float | [start_panel_slidein_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_panel_slidein_timer) | +float | [topleft_woodpanel_esc_slidein](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=topleft_woodpanel_esc_slidein) | +float | [start_panel_slidein](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_panel_slidein) | float | [action_buttons_keycap_size](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=action_buttons_keycap_size) | +int | [next_screen_to_load](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=next_screen_to_load) | bool | [not_ready_to_start_yet](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=not_ready_to_start_yet) | int | [available_mine_entrances](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=available_mine_entrances) | int | [amount_of_mine_entrances_activated](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=amount_of_mine_entrances_activated) | -int | [buttons](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=buttons) | -float | [opacity](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=opacity) | +[TextureRenderingInfo](#TextureRenderingInfo) | [screen_blackout](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_blackout) | +float | [blackout_transparency](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=blackout_transparency) | bool | [start_pressed](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_pressed) | bool | [transition_to_game_started](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=transition_to_game_started) | +bool | [disable_controls](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=disable_controls) | array<[FlyingThing](#FlyingThing), 6> | [flying_things](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=flying_things) | int | [flying_thing_countdown](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=flying_thing_countdown) | [ParticleEmitterInfo](#ParticleEmitterInfo) | [particle_ceilingdust_smoke](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=particle_ceilingdust_smoke) | @@ -2263,7 +2232,8 @@ int | [flying_thing_countdown](https://github.com/spelunky-fyi/overlunky/search? [ParticleEmitterInfo](#ParticleEmitterInfo) | [particle_torchflame_flames3](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=particle_torchflame_flames3) | [ParticleEmitterInfo](#ParticleEmitterInfo) | [particle_torchflame_smoke4](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=particle_torchflame_smoke4) | [ParticleEmitterInfo](#ParticleEmitterInfo) | [particle_torchflame_flames4](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=particle_torchflame_flames4) | -[SoundMeta](#SoundMeta) | [sound](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=sound) | +array<[SoundMeta](#SoundMeta), 4> | [torch_sound](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=torch_sound) | +array<int, MAX_PLAYERS> | [buttons](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=buttons) | ### ScreenCodeInput @@ -2272,19 +2242,11 @@ Derived from [Screen](#Screen) Type | Name | Description ---- | ---- | ----------- -float | [bottom_woodpanel_slideup_speed](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_slideup_speed) | -float | [bottom_woodpanel_slideup_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_slideup_timer) | -float | [bottom_woodpanel_y_offset](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_y_offset) | -[TextureRenderingInfo](#TextureRenderingInfo) | [bottom_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel) | -[STRINGID](#Aliases) | [bottom_left_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_left_text) | -[STRINGID](#Aliases) | [bottom_right_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_right_text) | The only one actually used -[STRINGID](#Aliases) | [bottom_middle_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_middle_text) | -bool | [show_bottom_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=show_bottom_woodpanel) | -bool | [slide_in_bottom_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=slide_in_bottom_woodpanel) | +[MenuScreenPanels](#MenuScreenPanels) | [screen_panels](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_panels) | bool | [allow_random](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=allow_random) | needs to be set before opening the screen to show the correct text at the bottom int | [selected_button_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=selected_button_index) | bool | [pressed_select](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=pressed_select) | -float | [topleft_woodpanel_esc_slidein_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=topleft_woodpanel_esc_slidein_timer) | +float | [topleft_woodpanel_esc_slidein](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=topleft_woodpanel_esc_slidein) | [STRINGID](#Aliases) | [scroll_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll_text_id) | [STRINGID](#Aliases) | [start_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_text_id) | [TextureRenderingInfo](#TextureRenderingInfo) | [main_woodpanel_left_border](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=main_woodpanel_left_border) | @@ -2296,7 +2258,7 @@ float | [topleft_woodpanel_esc_slidein_timer](https://github.com/spelunky-fyi/ov [TextureRenderingInfo](#TextureRenderingInfo) | [key_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=key_background) | [TextureRenderingInfo](#TextureRenderingInfo) | [topleft_woodpanel_esc](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=topleft_woodpanel_esc) | [TextureRenderingInfo](#TextureRenderingInfo) | [start_sidepanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_sidepanel) | -float | [start_sidepanel_slidein_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_sidepanel_slidein_timer) | +float | [start_sidepanel_slidein](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_sidepanel_slidein) | int | [seed_length](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=seed_length) | Current input length (0-8). You probably shouldn't write to this, except to set it to 0. optional<int> | [get_seed()](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=get_seed) | Get the seed currently entered in the seed dialog or nil if nothing is entered. Will also return incomplete seeds, check seed_length to verify it's ready. nil | [set_seed(optional seed, optional length)](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=set_seed) | Set the seed entered in the seed dialog. Call without arguments to clear entered seed. Optionally enter a length to set partial seed. @@ -2359,6 +2321,7 @@ Derived from [Screen](#Screen) Type | Name | Description ---- | ---- | ----------- +float | [credits_progression](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=credits_progression) | [SoundMeta](#SoundMeta) | [bg_music_info](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bg_music_info) | ### ScreenDeath @@ -2388,8 +2351,8 @@ Derived from [Screen](#Screen) Type | Name | Description ---- | ---- | ----------- -[TextureRenderingInfo](#TextureRenderingInfo) | [unknown4](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=unknown4) | -float | [darkness](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=darkness) | +[TextureRenderingInfo](#TextureRenderingInfo) | [blackout_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=blackout_background) | +float | [blackout_alpha](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=blackout_alpha) | bool | [active](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=active) | ends the intro immediately if set to false bool | [skip_prologue](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=skip_prologue) | skips prologue and goes straight to the title screen after the intro @@ -2412,6 +2375,8 @@ Type | Name | Description [TextureRenderingInfo](#TextureRenderingInfo) | [logo_mossmouth](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=logo_mossmouth) | [TextureRenderingInfo](#TextureRenderingInfo) | [logo_blitworks](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=logo_blitworks) | [TextureRenderingInfo](#TextureRenderingInfo) | [logo_fmod](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=logo_fmod) | +int | [state](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=state) | 0 - mossmouth, 1 - blitworks, 2 - fmod, 3 - end (next screen) +int | [timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=timer) | ### ScreenMenu @@ -2446,8 +2411,8 @@ float | [cthulhu_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q int | [selected_menu_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=selected_menu_index) | int | [sides_hold_down_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=sides_hold_down_timer) | int | [sides_fast_scroll_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=sides_fast_scroll_timer) | -bool | [loop](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=loop) | -int | [menu_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=menu_id) | +bool | [loop](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=loop) | Allow going up from first to last option +int | [menu_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=menu_id) | 0 = main menu, 1 = play, 2 = online int | [transfer_to_menu_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=transfer_to_menu_id) | float | [menu_text_opacity](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=menu_text_opacity) | array<float, 6> | [spear_position](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=spear_position) | @@ -2476,22 +2441,7 @@ Derived from [Screen](#Screen) Type | Name | Description ---- | ---- | ----------- -float | [bottom_woodpanel_slideup_speed](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_slideup_speed) | -float | [bottom_woodpanel_slideup](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_slideup) | -float | [scroll_unfurl](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll_unfurl) | -float | [bottom_woodpanel_y_offset](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_y_offset) | -[TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel_bottom](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_bottom) | -[TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel_top](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_top) | -[TextureRenderingInfo](#TextureRenderingInfo) | [scroll](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll) | -[TextureRenderingInfo](#TextureRenderingInfo) | [left_scroll_handle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=left_scroll_handle) | -[TextureRenderingInfo](#TextureRenderingInfo) | [right_scroll_handle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=right_scroll_handle) | -[STRINGID](#Aliases) | [scroll_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll_text) | -[STRINGID](#Aliases) | [bottom_left_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_left_text) | -[STRINGID](#Aliases) | [bottom_right_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_right_text) | -[STRINGID](#Aliases) | [bottom_middle_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_middle_text) | -bool | [show_top_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=show_top_woodpanel) | -bool | [show_bottom_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=show_bottom_woodpanel) | -bool | [slide_in_bottom_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=slide_in_bottom_woodpanel) | +[MenuScreenPanels](#MenuScreenPanels) | [screen_panels](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_panels) | array<[OnlineLobbyScreenPlayer](#OnlineLobbyScreenPlayer), 4> | [players](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=players) | [TextureRenderingInfo](#TextureRenderingInfo) | [background_image](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=background_image) | [TextureRenderingInfo](#TextureRenderingInfo) | [topleft_woodpanel_esc](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=topleft_woodpanel_esc) | @@ -2526,28 +2476,11 @@ int | [fast_scroll_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua int | [selected_menu_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=selected_menu_index) | int | [sides_hold_down_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=sides_hold_down_timer) | int | [sides_fast_scroll_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=sides_fast_scroll_timer) | -bool | [loop](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=loop) | -float | [top_bottom_woodpanels_velocity](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_bottom_woodpanels_velocity) | -float | [top_bottom_woodpanels_progress](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_bottom_woodpanels_progress) | -float | [scroll_unfurl_progress](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll_unfurl_progress) | -float | [bottom_woodpanel_speed_multiplayer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_speed_multiplayer) | -float | [bottom_woodpanel_y_offset](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_y_offset) | -[TextureRenderingInfo](#TextureRenderingInfo) | [bottom_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel) | -[TextureRenderingInfo](#TextureRenderingInfo) | [top_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_woodpanel) | -[TextureRenderingInfo](#TextureRenderingInfo) | [scroll](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll) | -[TextureRenderingInfo](#TextureRenderingInfo) | [top_woodpanel_left_scrollhandle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_woodpanel_left_scrollhandle) | -[TextureRenderingInfo](#TextureRenderingInfo) | [top_woodpanel_right_scrollhandle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_woodpanel_right_scrollhandle) | -[STRINGID](#Aliases) | [scroll_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll_text) | -[STRINGID](#Aliases) | [bottom_left_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_left_text) | -[STRINGID](#Aliases) | [bottom_right_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_right_text) | -[STRINGID](#Aliases) | [bottom_middle_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_middle_text) | -bool | [top_woodpanel_visible](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_woodpanel_visible) | -bool | [bottom_woodpanel_visible](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_woodpanel_visible) | -bool | [toggle_woodpanel_slidein_animation](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=toggle_woodpanel_slidein_animation) | -bool | [capitalize_top_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=capitalize_top_woodpanel) | +bool | [loop](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=loop) | Allow going up from first to last option +[MenuScreenPanels](#MenuScreenPanels) | [screen_panels](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_panels) | int | [menu_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=menu_id) | int | [transfer_to_menu_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=transfer_to_menu_id) | -[GraphicandAudioSettings](#GraphicandAudioSettings) | [graphic_and_audio](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=graphic_and_audio) | +bool | [show_apply_button](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=show_apply_button) | [TextureRenderingInfo](#TextureRenderingInfo) | [topleft_woodpanel_esc](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=topleft_woodpanel_esc) | [TextureRenderingInfo](#TextureRenderingInfo) | [brick_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=brick_background) | [TextureRenderingInfo](#TextureRenderingInfo) | [brick_middlelayer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=brick_middlelayer) | @@ -2562,11 +2495,19 @@ int | [transfer_to_menu_id](https://github.com/spelunky-fyi/overlunky/search?l=L [TextureRenderingInfo](#TextureRenderingInfo) | [progressbar_foreground](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=progressbar_foreground) | [TextureRenderingInfo](#TextureRenderingInfo) | [volume_progressbar_position_indicator](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=volume_progressbar_position_indicator) | [TextureRenderingInfo](#TextureRenderingInfo) | [sectionheader_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=sectionheader_background) | +[TextureRenderingInfo](#TextureRenderingInfo) | [pet_icons](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=pet_icons) | In "Gameplay" menu +[TextureRenderingInfo](#TextureRenderingInfo) | [bottom_scroll](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_scroll) | For the code in the sync menu +[TextureRenderingInfo](#TextureRenderingInfo) | [bottom_left_scrollhandle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_left_scrollhandle) | +[TextureRenderingInfo](#TextureRenderingInfo) | [bottom_right_scrollhandle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_right_scrollhandle) | +float | [topleft_woodpanel_esc_slidein](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=topleft_woodpanel_esc_slidein) | float | [text_fadein](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=text_fadein) | float | [vertical_scroll_effect](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=vertical_scroll_effect) | -bool | [items_visiable](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=items_visiable) | +bool | [options_visiable](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=options_visiable) | bool | [show_highlight](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=show_highlight) | Shows the red background behind the option, the scarab on the left and left/right arrows vector<[STRINGID](#Aliases)> | [tooltip_text](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=tooltip_text) | +bool | [disable_controls](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=disable_controls) | Used for sync progress +int | [sync_progress_state](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=sync_progress_state) | 0 - none, 1 - waiting for the code, 2 - code acquired, 3 - sync in progress, 4 - sync completed +float | [credits_progression](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=credits_progression) | ### ScreenPrologue @@ -2633,17 +2574,18 @@ Derived from [Screen](#Screen) Type | Name | Description ---- | ---- | ----------- -[TextureRenderingInfo](#TextureRenderingInfo) | [ana_carrying_torch](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ana_carrying_torch) | +[TextureRenderingInfo](#TextureRenderingInfo) | [player_portrait](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=player_portrait) | [TextureRenderingInfo](#TextureRenderingInfo) | [scroll_bottom_left](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll_bottom_left) | [TextureRenderingInfo](#TextureRenderingInfo) | [scrollend_bottom_left](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scrollend_bottom_left) | [TextureRenderingInfo](#TextureRenderingInfo) | [four_ropes](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=four_ropes) | -[TextureRenderingInfo](#TextureRenderingInfo) | [unknown4](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=unknown4) | +[TextureRenderingInfo](#TextureRenderingInfo) | [gems_above_the_ropes](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=gems_above_the_ropes) | [TextureRenderingInfo](#TextureRenderingInfo) | [four_characters](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=four_characters) | [TextureRenderingInfo](#TextureRenderingInfo) | [left_arrow](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=left_arrow) | [TextureRenderingInfo](#TextureRenderingInfo) | [right_arrow](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=right_arrow) | [TextureRenderingInfo](#TextureRenderingInfo) | [start_panel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_panel) | [TextureRenderingInfo](#TextureRenderingInfo) | [go_back_wooden_panel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=go_back_wooden_panel) | -float | [start_panel_slide_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_panel_slide_timer) | +float | [start_panel_slide](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=start_panel_slide) | +float | [go_back_wooden_panel_slide](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=go_back_wooden_panel_slide) | float | [pulsating_arrows_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=pulsating_arrows_timer) | int | [selected_player](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=selected_player) | int | [buttons](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=buttons) | @@ -2666,6 +2608,7 @@ Type | Name | Description [ParticleEmitterInfo](#ParticleEmitterInfo) | [particle_torchflame_backflames_animated](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=particle_torchflame_backflames_animated) | [ParticleEmitterInfo](#ParticleEmitterInfo) | [particle_torchflame_flames_animated](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=particle_torchflame_flames_animated) | [ParticleEmitterInfo](#ParticleEmitterInfo) | [particle_torchflame_ash](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=particle_torchflame_ash) | +float | [brightness](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=brightness) | [SoundMeta](#SoundMeta) | [music](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=music) | [SoundMeta](#SoundMeta) | [torch_sound](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=torch_sound) | @@ -2680,6 +2623,7 @@ float | [woodpanel_pos](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q float | [stats_scroll_horizontal_posaa](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=stats_scroll_horizontal_posaa) | float | [stats_scroll_vertical_pos](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=stats_scroll_vertical_pos) | float | [level_completed_pos](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=level_completed_pos) | +float | [stats_scroll_unfurl_actualvalue](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=stats_scroll_unfurl_actualvalue) | float | [stats_scroll_unfurl_targetvalue](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=stats_scroll_unfurl_targetvalue) | [TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel1](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel1) | [TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel2](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel2) | @@ -2691,7 +2635,7 @@ float | [stats_scroll_unfurl_targetvalue](https://github.com/spelunky-fyi/overlu [TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel_bottomcutout1](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_bottomcutout1) | [TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel_bottomcutout2](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_bottomcutout2) | [TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel_bottomcutout3](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_bottomcutout3) | -[TextureRenderingInfo](#TextureRenderingInfo) | [unknown_all_forced](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=unknown_all_forced) | +[TextureRenderingInfo](#TextureRenderingInfo) | [scroll](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=scroll) | [TextureRenderingInfo](#TextureRenderingInfo) | [stats_scroll_top_bottom](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=stats_scroll_top_bottom) | [TextureRenderingInfo](#TextureRenderingInfo) | [killcount_rounded_rect](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=killcount_rounded_rect) | [TextureRenderingInfo](#TextureRenderingInfo) | [level_completed_panel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=level_completed_panel) | @@ -2702,6 +2646,7 @@ bool | [hide_press_to_go_next_level](https://github.com/spelunky-fyi/overlunky/s [TextureRenderingInfo](#TextureRenderingInfo) | [speechbubble](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=speechbubble) | [TextureRenderingInfo](#TextureRenderingInfo) | [speechbubble_arrow](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=speechbubble_arrow) | float | [mama_tunnel_fade_targetvalue](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=mama_tunnel_fade_targetvalue) | +float | [mama_tunnel_fade_targetvalue](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=mama_tunnel_fade_targetvalue) | [STRINGID](#Aliases) | [mama_tunnel_text_id](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=mama_tunnel_text_id) | bool | [mama_tunnel_choice_visible](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=mama_tunnel_choice_visible) | bool | [mama_tunnel_agree_with_gift](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=mama_tunnel_agree_with_gift) | @@ -2713,7 +2658,7 @@ float | [mama_tunnel_face_transparency](https://github.com/spelunky-fyi/overlunk [TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel_cutout_big_money2](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_cutout_big_money2) | [TextureRenderingInfo](#TextureRenderingInfo) | [woodpanel_cutout_big_money3](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=woodpanel_cutout_big_money3) | [TextureRenderingInfo](#TextureRenderingInfo) | [big_dollar_sign](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=big_dollar_sign) | -[TextureRenderingInfo](#TextureRenderingInfo) | [unknown26](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=unknown26) | +int | [stats_scroll_unfurl_sequence](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=stats_scroll_unfurl_sequence) | array<int, MAX_PLAYERS> | [player_stats_scroll_numeric_value](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=player_stats_scroll_numeric_value) | array<[TextureRenderingInfo](#TextureRenderingInfo), MAX_PLAYERS> | [player_secondary_icon](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=player_secondary_icon) | array<[TextureRenderingInfo](#TextureRenderingInfo), MAX_PLAYERS> | [player_icon](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=player_icon) | @@ -2722,6 +2667,7 @@ array<int, MAX_PLAYERS> | [player_icon_index](https://github.com/spelunky- [TextureRenderingInfo](#TextureRenderingInfo) | [hourglasses](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=hourglasses) | [TextureRenderingInfo](#TextureRenderingInfo) | [small_dollar_signs](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=small_dollar_signs) | [Color](#Color) | [this_level_money_color](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=this_level_money_color) | +array<int, MAX_PLAYERS> | [buttons](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=buttons) | ### ScreenWin @@ -2735,13 +2681,6 @@ int | [frame_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=fra int | [animation_state](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=animation_state) | [Entity](#Entity) | [rescuing_ship_entity](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=rescuing_ship_entity) | -### ScreenZoomAnimation - - -Type | Name | Description ----- | ---- | ----------- -float | [zoom_target](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=zoom_target) | - ## Sound types @@ -2846,6 +2785,9 @@ Type | Name | Description [ScreenCodeInput](#ScreenCodeInput) | [screen_seed_input](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_seed_input) | [ScreenCamp](#ScreenCamp) | [screen_camp](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_camp) | [ScreenLevel](#ScreenLevel) | [screen_level](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_level) | +[Screen](#Screen) | [screen_transition](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_transition) | +[Screen](#Screen) | [screen_arena_level](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_arena_level) | +[Screen](#Screen) | [screen_arena_score](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_arena_score) | [ScreenOnlineLoading](#ScreenOnlineLoading) | [screen_online_loading](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_online_loading) | [ScreenOnlineLobby](#ScreenOnlineLobby) | [screen_online_lobby](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_online_lobby) | [PauseUI](#PauseUI) | [pause_ui](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=pause_ui) | diff --git a/src/game_api/game_manager.hpp b/src/game_api/game_manager.hpp index 2d5969762..7ce23b72d 100644 --- a/src/game_api/game_manager.hpp +++ b/src/game_api/game_manager.hpp @@ -34,6 +34,7 @@ struct JournalPopupUI uint32_t entry_to_show; // use the odd entry of the left hand page uint32_t timer; float slide_position; + uint8_t unknown; }; struct SaveRelated @@ -136,9 +137,9 @@ struct GameProps // uint8_t padding_probably1[3]; - int32_t next_player_entrence; - int8_t unknown13a; // -1 (leader player slot?) - int8_t unknown13b; + int32_t next_player_entrence; // unsure? + int8_t unknown13a; // -1 + int8_t unknown13b; // bool? // uint8_t padding_probably2[2]; @@ -189,7 +190,7 @@ struct GameManager size_t unknown_screen_team_select; // available in State ScreenCamp* screen_camp; ScreenLevel* screen_level; - size_t* screen_transition; // available in State, but it's a different object! this one only has a render_timer + Screen* screen_transition; // available in State, but it's a different object! this one only has a render_timer size_t unknown_screen_death; // available in State size_t unknown_screen_spaceship; // (also not) available in State size_t unknown_screen_win; // available in State @@ -203,7 +204,7 @@ struct GameManager size_t unknown_screen_arena_select; // available in State size_t unknown_screen_arena_intro; // available in State Screen* screen_arena_level; // also available in State, but it's a different object! Seams to only call pause function at the start, probably for the intro stuff - size_t* unknown_screen_arena_score; // available in State + Screen* screen_arena_score; // available in State ScreenOnlineLoading* screen_online_loading; ScreenOnlineLobby* screen_online_lobby; PauseUI* pause_ui; diff --git a/src/game_api/screen.hpp b/src/game_api/screen.hpp index c03d4430e..89ad8aa04 100644 --- a/src/game_api/screen.hpp +++ b/src/game_api/screen.hpp @@ -17,6 +17,56 @@ struct SoundMeta; struct MultiLineTextRendering; class Entity; +struct MenuScreenPanels +{ + float woodpanels_velocity; + float woodpanels_progress; + float scroll_unfurl_progress; + float bottom_woodpanel_speed_multiplayer; + float bottom_woodpanel_y_offset; // maybe a resolution thing? + TextureRenderingInfo bottom_woodpanel; + TextureRenderingInfo top_woodpanel; + TextureRenderingInfo scroll; + TextureRenderingInfo top_woodpanel_left_scrollhandle; + TextureRenderingInfo top_woodpanel_right_scrollhandle; + + STRINGID scroll_text; + STRINGID bottom_left_text; + STRINGID bottom_right_text; + STRINGID bottom_middle_text; + bool top_woodpanel_visible; + bool bottom_woodpanel_visible; + bool toggle_woodpanel_slidein_animation; + bool capitalize_scroll_text; +}; + +struct ScreenControls +{ + bool up; + bool down; + bool left; + bool right; + /// -1 - none, 0 - UP, 1 - DOWN, 2 - LEFT, 3 - RIGHT + uint32_t direction_input; + /// Delay after which fast scroll activates (can stop at different value, only matters when you hold down the direction button) + uint32_t hold_down_timer; + uint32_t fast_scroll_timer; +}; + +// probably common thing, right now only used in the arena screen +struct ScreenZoomAnimation +{ + float unknown1; + float unknown2; + float unknown3; + float unknown4; + float unknown5; + uint32_t image; /* unsure*/ // probably wrong + uint32_t unknown6; + float zoom_timer; + float zoom_target; +}; + class Screen { public: @@ -57,8 +107,8 @@ class ScreenLogo : public Screen // ID: 0 class ScreenIntro : public Screen // ID: 1 { public: - TextureRenderingInfo unknown4; - float darkness; + TextureRenderingInfo blackout_background; + float blackout_alpha; /// ends the intro immediately if set to false bool active; /// skips prologue and goes straight to the title screen after the intro @@ -76,29 +126,6 @@ class ScreenPrologue : public Screen // ID: 2 float line3_alpha; }; -struct MenuScreenPanels -{ - float woodpanels_velocity; - float woodpanels_progress; - float scroll_unfurl_progress; - float bottom_woodpanel_speed_multiplayer; - float bottom_woodpanel_y_offset; // maybe a resolution thing? - TextureRenderingInfo bottom_woodpanel; - TextureRenderingInfo top_woodpanel; - TextureRenderingInfo scroll; - TextureRenderingInfo top_woodpanel_left_scrollhandle; - TextureRenderingInfo top_woodpanel_right_scrollhandle; - - STRINGID scroll_text; - STRINGID bottom_left_text; - STRINGID bottom_right_text; - STRINGID bottom_middle_text; - bool top_woodpanel_visible; - bool bottom_woodpanel_visible; - bool toggle_woodpanel_slidein_animation; - bool capitalize_scroll_text; -}; - class ScreenTitle : public Screen // ID: 3 { public: @@ -124,19 +151,6 @@ struct SpearDanglerAnimFrames uint32_t row; }; -struct ScreenControls -{ - bool up; - bool down; - bool left; - bool right; - /// -1 - none, 0 - UP, 1 - DOWN, 2 - LEFT, 3 - RIGHT - uint32_t direction_input; - /// Delay after which fast scroll activates (can stop at different value, only matters when you hold down the direction button) - uint32_t hold_down_timer; - uint32_t fast_scroll_timer; -}; - struct MenuOption { // return and first param are the same, pointer on stack, it really seam to be just two 32bit fields @@ -217,11 +231,13 @@ class ScreenMenu : public Screen // ID: 4 // uint8_t padding_probably[2]; uint32_t unknown27; // pressed direction? 1 = left, 0 = right, no neutral, stays at the last state - bool loop; // allow going up from first to last option + /// Allow going up from first to last option + bool loop; // uint8_t padding_probably[3]; - uint32_t menu_id; // 0 = main menu, 1 = play, 2 = online + /// 0 = main menu, 1 = play, 2 = online + uint32_t menu_id; uint32_t transfer_to_menu_id; float menu_text_opacity; std::array spear_position; @@ -275,6 +291,7 @@ class ScreenOptions : public Screen // ID: 5 uint8_t sides_fast_scroll_timer; // uint16_t probably_padding1; uint32_t unknown0; // pressed direction? 1 = left, 0 = right, no neutral, stays at the last state + /// Allow going up from first to last option bool loop; // uint8_t probably_padding2[3]; @@ -334,7 +351,7 @@ class ScreenOptions : public Screen // ID: 5 float text_fadein; float vertical_scroll_effect; uint8_t unknown49; // small random timer - bool items_visiable; + bool options_visiable; /// Shows the red background behind the option, the scarab on the left and left/right arrows bool show_highlight; // uint8_t padding_probably8[5]; @@ -438,7 +455,7 @@ class ScreenCharacterSelect : public Screen // ID: 9 float main_background_zoom_related1; uint32_t main_background_zoom_related2; uint32_t unknown10; - float main_background_zoom_timer; + float main_background_zoom_progress; float main_background_zoom_target; float blurred_border_zoom; float unknown14; @@ -450,7 +467,7 @@ class ScreenCharacterSelect : public Screen // ID: 9 uint8_t unknown20; uint8_t unknown21; uint8_t unknown22; - float blurred_border_zoom_timer; + float blurred_border_zoom_progress; float blurred_border_zoom_target; MenuScreenPanels screen_panels; @@ -625,7 +642,7 @@ class ScreenTransition : public Screen // ID: 13 float mama_tunnel_fade_actualvalue; float mama_tunnel_fade_targetvalue; STRINGID mama_tunnel_text_id; - uint16_t mama_tunnel_text_buffer[256]; // UTF16 string + char16_t mama_tunnel_text_buffer[256]; // UTF16 string bool mama_tunnel_choice_visible; bool mama_tunnel_agree_with_gift; bool mama_tunnel_face_invisible; @@ -639,8 +656,8 @@ class ScreenTransition : public Screen // ID: 13 TextureRenderingInfo big_dollar_sign; TextureRenderingInfo unknown26; - uint16_t string_buffer[130]; // UTF16 string - uint32_t stats_scroll_unfurl_sequence_timer; + char16_t string_buffer[130]; // UTF16 string + uint32_t stats_scroll_unfurl_sequence; uint32_t unknown30; uint32_t unknown31; @@ -658,12 +675,12 @@ class ScreenTransition : public Screen // ID: 13 TextureRenderingInfo hourglasses; TextureRenderingInfo small_dollar_signs; - uint16_t string_buffer_this_level_time[10]; // UTF16 string - uint16_t string_buffer_total_time[10]; // UTF16 string - uint16_t string_buffer_this_level_milliseconds[5]; // UTF16 string - uint16_t string_buffer_total_milliseconds[5]; // UTF16 string - uint16_t string_buffer_this_level_money[10]; // UTF16 string - uint16_t string_buffer_total_money[10]; // UTF16 string + char16_t string_buffer_this_level_time[10]; // UTF16 string + char16_t string_buffer_total_time[10]; // UTF16 string + char16_t string_buffer_this_level_milliseconds[5]; // UTF16 string + char16_t string_buffer_total_milliseconds[5]; // UTF16 string + char16_t string_buffer_this_level_money[10]; // UTF16 string + char16_t string_buffer_total_money[10]; // UTF16 string Color this_level_money_color; @@ -735,22 +752,6 @@ class ScreenRecap : public Screen // ID: 20 uint32_t unknown2; }; -struct ScreenZoomAnimation -{ - float unknown1; - float unknown2; - float unknown3; - float unknown4; - float unknown5; - uint32_t image; /* unsure*/ - uint32_t unknown6; - float zoom_timer; - float zoom_target; -}; - -// For the ARENA screens, see screen_arena.hpp -// Putting them here makes the compiler run out of heap space - class ScreenOnlineLoading : public Screen // ID: 28 { public: @@ -849,8 +850,7 @@ struct MenuInsert struct PauseUI { float menu_slidein_progress; - /// Actually darkened background when you get a prompt asking are you sure about selecting that option - TextureRenderingInfo blurred_background; + TextureRenderingInfo blackout_background; TextureRenderingInfo woodpanel_left; TextureRenderingInfo woodpanel_middle; TextureRenderingInfo woodpanel_right; @@ -865,8 +865,8 @@ struct PauseUI MenuInsert* prompt_menu; bool unknown8; // uint8_t probably_padding2[3]; - /// This is more like selected_option, it's set when you select an option and the game displays the prompt - uint32_t previously_selected_menu_index; + /// It's set wh game displays the prompt + uint32_t selected_option; bool prompt_visible; std::array buttons_actions; // per player, so no default menu input std::array buttons_movement; // per player, so no default menu input diff --git a/src/game_api/screen_arena.hpp b/src/game_api/screen_arena.hpp index 0ed191e30..faf8aa69b 100644 --- a/src/game_api/screen_arena.hpp +++ b/src/game_api/screen_arena.hpp @@ -142,11 +142,11 @@ class ScreenArenaIntro : public Screen // ID: 25 TextureRenderingInfo background_colors; TextureRenderingInfo vertical_lines; TextureRenderingInfo vertical_line_electricity_effect; - TextureRenderingInfo unknown_all_forced; + TextureRenderingInfo unknown_all_forced; // probably scroll TextureRenderingInfo left_scroll; TextureRenderingInfo right_scroll; TextureRenderingInfo unknown1; - float scroll_unfurl_timer; + float scroll_unfurl; bool waiting; // when false, the cutscene ends and gameplay starts uint8_t unknown10b; uint8_t unknown10c; @@ -252,18 +252,19 @@ struct ScreenArenaScoreUnknown class ScreenArenaScore : public Screen // ID: 27 { public: - uint16_t unknown3a; + uint16_t unknown3a; // probably float uint16_t unknown3b; - float woodpanel_slide_timer; - float scroll_unfurl_timer; + float woodpanel_slide; + float scroll_unfurl; uint32_t unknown6; uint32_t unknown7; uint32_t unknown8; float unknown9; + // similar to the MenuScreenPanels ? TextureRenderingInfo unknown10; TextureRenderingInfo woodpanel; - TextureRenderingInfo unknown_all_forced; + TextureRenderingInfo unknown_all_forced; // probably scroll TextureRenderingInfo woodpanel_left_scroll; TextureRenderingInfo woodpanel_right_scroll; diff --git a/src/game_api/script/lua_vm.cpp b/src/game_api/script/lua_vm.cpp index 9c16ab769..431609537 100644 --- a/src/game_api/script/lua_vm.cpp +++ b/src/game_api/script/lua_vm.cpp @@ -2573,11 +2573,9 @@ end // `page:as_journal_page_bestiary()` // `page:as_journal_page_items()` // `page:as_journal_page_traps()` - // `page:as_journal_page_story()` // `page:as_journal_page_feats()` // `page:as_journal_page_deathcause()` // `page:as_journal_page_deathmenu()` - // `page:as_journal_page_recap()` // `page:as_journal_page_playerprofile()` // `page:as_journal_page_lastgameplayed()` // SPEECH_BUBBLE diff --git a/src/game_api/script/usertypes/game_manager_lua.cpp b/src/game_api/script/usertypes/game_manager_lua.cpp index 4c16e1608..e6c5cdcc2 100644 --- a/src/game_api/script/usertypes/game_manager_lua.cpp +++ b/src/game_api/script/usertypes/game_manager_lua.cpp @@ -66,6 +66,9 @@ void register_usertypes(sol::state& lua) gamemanager_type["screen_seed_input"] = &GameManager::screen_seed_input; gamemanager_type["screen_camp"] = &GameManager::screen_camp; gamemanager_type["screen_level"] = &GameManager::screen_level; + gamemanager_type["screen_transition"] = &GameManager::screen_transition; + gamemanager_type["screen_arena_level"] = &GameManager::screen_arena_level; + gamemanager_type["screen_arena_score"] = &GameManager::screen_arena_score; gamemanager_type["screen_online_loading"] = &GameManager::screen_online_loading; gamemanager_type["screen_online_lobby"] = &GameManager::screen_online_lobby; gamemanager_type["pause_ui"] = &GameManager::pause_ui; diff --git a/src/game_api/script/usertypes/screen_arena_lua.cpp b/src/game_api/script/usertypes/screen_arena_lua.cpp index fe070ec82..2fc2e4655 100644 --- a/src/game_api/script/usertypes/screen_arena_lua.cpp +++ b/src/game_api/script/usertypes/screen_arena_lua.cpp @@ -8,6 +8,7 @@ #include // for move, declval #include // for min, max +#include "particles.hpp" // #include "screen.hpp" // for ScreenZoomAnimation, Screen (ptr only) #include "screen_arena.hpp" // for ScreenArenaMenu, ScreenArenaStagesSelect @@ -15,26 +16,10 @@ namespace NScreenArena { void register_usertypes(sol::state& lua) { - lua.new_usertype( - "ScreenControls", - "up", - &ScreenControls::up, - "down", - &ScreenControls::down, - "left", - &ScreenControls::left, - "right", - &ScreenControls::right, - "direction_input", - &ScreenControls::direction_input, - "hold_down_timer", - &ScreenControls::hold_down_timer, - "fast_scroll_timer", - &ScreenControls::fast_scroll_timer); - auto screenarenamenu_type = lua.new_usertype("ScreenArenaMenu", sol::base_classes, sol::bases()); screenarenamenu_type["brick_background_animation"] = &ScreenArenaMenu::brick_background_animation; screenarenamenu_type["blurry_border_animation"] = &ScreenArenaMenu::blurry_border_animation; + screenarenamenu_type["screen_panels"] = &ScreenArenaMenu::screen_panels; screenarenamenu_type["brick_background"] = &ScreenArenaMenu::brick_background; screenarenamenu_type["blurry_border"] = &ScreenArenaMenu::blurry_border; screenarenamenu_type["blurry_border2"] = &ScreenArenaMenu::blurry_border2; @@ -60,18 +45,15 @@ void register_usertypes(sol::state& lua) screenarenamenu_type["bottom_left_bricks"] = &ScreenArenaMenu::bottom_left_bricks; screenarenamenu_type["top_left_esc_panel"] = &ScreenArenaMenu::top_left_esc_panel; screenarenamenu_type["next_panel"] = &ScreenArenaMenu::next_panel; + screenarenamenu_type["option_captions"] = &ScreenArenaMenu::option_captions; screenarenamenu_type["center_panels_hor_slide_position"] = &ScreenArenaMenu::center_panels_hor_slide_position; screenarenamenu_type["esc_next_panels_slide_timer"] = &ScreenArenaMenu::esc_next_panels_slide_timer; screenarenamenu_type["main_panel_vertical_scroll_position"] = &ScreenArenaMenu::main_panel_vertical_scroll_position; screenarenamenu_type["selected_option_index"] = &ScreenArenaMenu::selected_option_index; screenarenamenu_type["contols"] = &ScreenArenaMenu::contols; - lua.new_usertype( - "ScreenZoomAnimation", - "zoom_target", - &ScreenZoomAnimation::zoom_target); - auto screenarenastagesselect_type = lua.new_usertype("ScreenArenaStagesSelect", sol::base_classes, sol::bases()); + screenarenastagesselect_type["screen_panels"] = &ScreenArenaStagesSelect::screen_panels; screenarenastagesselect_type["buttons"] = &ScreenArenaStagesSelect::buttons; screenarenastagesselect_type["brick_background"] = &ScreenArenaStagesSelect::brick_background; screenarenastagesselect_type["info_black_background"] = &ScreenArenaStagesSelect::info_black_background; @@ -98,10 +80,14 @@ void register_usertypes(sol::state& lua) screenarenastagesselect_type["players_turn_scroll"] = &ScreenArenaStagesSelect::players_turn_scroll; screenarenastagesselect_type["players_turn_scroll_handle"] = &ScreenArenaStagesSelect::players_turn_scroll_handle; screenarenastagesselect_type["grid_player_icon"] = &ScreenArenaStagesSelect::grid_player_icon; + screenarenastagesselect_type["stages_to_gay_out"] = &ScreenArenaStagesSelect::stages_to_gay_out; + screenarenastagesselect_type["panels_slide_from_both_sides"] = &ScreenArenaStagesSelect::panels_slide_from_both_sides; + screenarenastagesselect_type["visibility_all_stages"] = &ScreenArenaStagesSelect::visibility_all_stages; screenarenastagesselect_type["selected_stage_index"] = &ScreenArenaStagesSelect::selected_stage_index; screenarenastagesselect_type["contols"] = &ScreenArenaStagesSelect::contols; auto screenarenaitems_type = lua.new_usertype("ScreenArenaItems", sol::base_classes, sol::bases()); + screenarenaitems_type["screen_panels"] = &ScreenArenaItems::screen_panels; screenarenaitems_type["brick_background"] = &ScreenArenaItems::brick_background; screenarenaitems_type["black_background_bottom_right"] = &ScreenArenaItems::black_background_bottom_right; screenarenaitems_type["woodpanel_bottom"] = &ScreenArenaItems::woodpanel_bottom; @@ -117,6 +103,7 @@ void register_usertypes(sol::state& lua) screenarenaitems_type["item_equipped_badge"] = &ScreenArenaItems::item_equipped_badge; screenarenaitems_type["item_off_gray_overlay"] = &ScreenArenaItems::item_off_gray_overlay; screenarenaitems_type["esc_woodpanel"] = &ScreenArenaItems::esc_woodpanel; + screenarenaitems_type["items_to_gay_out"] = &ScreenArenaItems::items_to_gay_out; screenarenaitems_type["center_panels_horizontal_slide_position"] = &ScreenArenaItems::center_panels_horizontal_slide_position; screenarenaitems_type["esc_panel_slide_timer"] = &ScreenArenaItems::esc_panel_slide_timer; screenarenaitems_type["selected_item_index"] = &ScreenArenaItems::selected_item_index; @@ -127,15 +114,15 @@ void register_usertypes(sol::state& lua) screenarenaintro_type["background_colors"] = &ScreenArenaIntro::background_colors; screenarenaintro_type["vertical_lines"] = &ScreenArenaIntro::vertical_lines; screenarenaintro_type["vertical_line_electricity_effect"] = &ScreenArenaIntro::vertical_line_electricity_effect; - screenarenaintro_type["unknown_all_forced"] = &ScreenArenaIntro::unknown_all_forced; screenarenaintro_type["left_scroll"] = &ScreenArenaIntro::left_scroll; screenarenaintro_type["right_scroll"] = &ScreenArenaIntro::right_scroll; - screenarenaintro_type["scroll_unfurl_timer"] = &ScreenArenaIntro::scroll_unfurl_timer; + screenarenaintro_type["scroll_unfurl"] = &ScreenArenaIntro::scroll_unfurl; screenarenaintro_type["waiting"] = &ScreenArenaIntro::waiting; screenarenaintro_type["names_opacity"] = &ScreenArenaIntro::names_opacity; screenarenaintro_type["line_electricity_effect_timer"] = &ScreenArenaIntro::line_electricity_effect_timer; screenarenaintro_type["state"] = &ScreenArenaIntro::state; screenarenaintro_type["countdown"] = &ScreenArenaIntro::countdown; + screenarenaintro_type["particles"] = &ScreenArenaIntro::particles; lua.new_usertype( "ScreenArenaLevel", @@ -145,15 +132,28 @@ void register_usertypes(sol::state& lua) &ScreenArenaLevel::get_ready_gray_background, "get_ready_outline", &ScreenArenaLevel::get_ready_outline, + "particles", + &ScreenArenaLevel::particles, sol::base_classes, sol::bases()); + lua.new_usertype( + "ScreenArenaScoreLavaBubble", + "x", + &ScreenArenaScoreLavaBubble::x, + "y", + &ScreenArenaScoreLavaBubble::y, + "timer1", + &ScreenArenaScoreLavaBubble::timer1, + "timer2", + &ScreenArenaScoreLavaBubble::timer2, + "visible", + &ScreenArenaScoreLavaBubble::visible); + auto screenarenascore_type = lua.new_usertype("ScreenArenaScore", sol::base_classes, sol::bases()); - screenarenascore_type["woodpanel_slide_timer"] = &ScreenArenaScore::woodpanel_slide_timer; - screenarenascore_type["scroll_unfurl_timer"] = &ScreenArenaScore::scroll_unfurl_timer; - screenarenascore_type["unknown10"] = &ScreenArenaScore::unknown10; + screenarenascore_type["woodpanel_slide"] = &ScreenArenaScore::woodpanel_slide; + screenarenascore_type["scroll_unfurl"] = &ScreenArenaScore::scroll_unfurl; screenarenascore_type["woodpanel"] = &ScreenArenaScore::woodpanel; - screenarenascore_type["unknown_all_forced"] = &ScreenArenaScore::unknown_all_forced; screenarenascore_type["woodpanel_left_scroll"] = &ScreenArenaScore::woodpanel_left_scroll; screenarenascore_type["woodpanel_right_scroll"] = &ScreenArenaScore::woodpanel_right_scroll; screenarenascore_type["text_id_1"] = &ScreenArenaScore::text_id_1; @@ -169,15 +169,11 @@ void register_usertypes(sol::state& lua) screenarenascore_type["bottom_lava"] = &ScreenArenaScore::bottom_lava; screenarenascore_type["players"] = &ScreenArenaScore::players; screenarenascore_type["player_shadows"] = &ScreenArenaScore::player_shadows; - screenarenascore_type["unknown24"] = &ScreenArenaScore::unknown24; - screenarenascore_type["unknown25"] = &ScreenArenaScore::unknown25; screenarenascore_type["score_counter"] = &ScreenArenaScore::score_counter; - screenarenascore_type["unknown27"] = &ScreenArenaScore::unknown27; screenarenascore_type["lava_bubbles"] = &ScreenArenaScore::lava_bubbles; screenarenascore_type["player_won"] = &ScreenArenaScore::player_won; screenarenascore_type["victory_jump_y_pos"] = &ScreenArenaScore::victory_jump_y_pos; screenarenascore_type["victory_jump_velocity"] = &ScreenArenaScore::victory_jump_velocity; - screenarenascore_type["animation_frame"] = &ScreenArenaScore::animation_frame; screenarenascore_type["squash_and_celebrate"] = &ScreenArenaScore::squash_and_celebrate; screenarenascore_type["player_ready"] = &ScreenArenaScore::player_ready; screenarenascore_type["next_transition_timer"] = &ScreenArenaScore::next_transition_timer; @@ -185,5 +181,7 @@ void register_usertypes(sol::state& lua) screenarenascore_type["player_crushing_pillar_height"] = &ScreenArenaScore::player_crushing_pillar_height; screenarenascore_type["player_create_giblets"] = &ScreenArenaScore::player_create_giblets; screenarenascore_type["next_sidepanel_slidein_timer"] = &ScreenArenaScore::next_sidepanel_slidein_timer; + screenarenascore_type["particles"] = &ScreenArenaScore::particles; + screenarenascore_type["lava_bubbles_positions"] = &ScreenArenaScore::lava_bubbles_positions; } } // namespace NScreenArena diff --git a/src/game_api/script/usertypes/screen_lua.cpp b/src/game_api/script/usertypes/screen_lua.cpp index e9c432653..f6ed822b2 100644 --- a/src/game_api/script/usertypes/screen_lua.cpp +++ b/src/game_api/script/usertypes/screen_lua.cpp @@ -31,6 +31,43 @@ void register_usertypes(sol::state& lua) /// Open the journal on a chapter and page. The main Journal spread is pages 0..1, so most chapters start at 2. Use even page numbers only. lua["show_journal"] = show_journal; + auto screenpanels_type = lua.new_usertype("MenuScreenPanels"); + screenpanels_type["woodpanels_velocity"] = &MenuScreenPanels::woodpanels_velocity; + screenpanels_type["woodpanels_progress"] = &MenuScreenPanels::woodpanels_progress; + screenpanels_type["scroll_unfurl_progress"] = &MenuScreenPanels::scroll_unfurl_progress; + screenpanels_type["bottom_woodpanel_speed_multiplayer"] = &MenuScreenPanels::bottom_woodpanel_speed_multiplayer; + screenpanels_type["bottom_woodpanel_y_offset"] = &MenuScreenPanels::bottom_woodpanel_y_offset; + screenpanels_type["bottom_woodpanel"] = &MenuScreenPanels::bottom_woodpanel; + screenpanels_type["top_woodpanel"] = &MenuScreenPanels::top_woodpanel; + screenpanels_type["scroll"] = &MenuScreenPanels::scroll; + screenpanels_type["top_woodpanel_left_scrollhandle"] = &MenuScreenPanels::top_woodpanel_left_scrollhandle; + screenpanels_type["top_woodpanel_right_scrollhandle"] = &MenuScreenPanels::top_woodpanel_right_scrollhandle; + screenpanels_type["scroll_text"] = &MenuScreenPanels::scroll_text; + screenpanels_type["bottom_left_text"] = &MenuScreenPanels::bottom_left_text; + screenpanels_type["bottom_right_text"] = &MenuScreenPanels::bottom_right_text; + screenpanels_type["bottom_middle_text"] = &MenuScreenPanels::bottom_middle_text; + screenpanels_type["top_woodpanel_visible"] = &MenuScreenPanels::top_woodpanel_visible; + screenpanels_type["bottom_woodpanel_visible"] = &MenuScreenPanels::bottom_woodpanel_visible; + screenpanels_type["toggle_woodpanel_slidein_animation"] = &MenuScreenPanels::toggle_woodpanel_slidein_animation; + screenpanels_type["capitalize_scroll_text"] = &MenuScreenPanels::capitalize_scroll_text; + + lua.new_usertype( + "ScreenControls", + "up", + &ScreenControls::up, + "down", + &ScreenControls::down, + "left", + &ScreenControls::left, + "right", + &ScreenControls::right, + "direction_input", + &ScreenControls::direction_input, + "hold_down_timer", + &ScreenControls::hold_down_timer, + "fast_scroll_timer", + &ScreenControls::fast_scroll_timer); + lua.new_usertype( "Screen", "render_timer", @@ -76,15 +113,19 @@ void register_usertypes(sol::state& lua) &ScreenLogo::logo_blitworks, "logo_fmod", &ScreenLogo::logo_fmod, + "state", + &ScreenLogo::state, + "timer", + &ScreenLogo::timer, sol::base_classes, sol::bases()); lua.new_usertype( "ScreenIntro", - "unknown4", - &ScreenIntro::unknown4, - "darkness", - &ScreenIntro::darkness, + "blackout_background", + &ScreenIntro::blackout_background, + "blackout_alpha", + &ScreenIntro::blackout_alpha, "active", &ScreenIntro::active, "skip_prologue", @@ -131,6 +172,8 @@ void register_usertypes(sol::state& lua) &ScreenTitle::particle_torchflame_flames_animated, "particle_torchflame_ash", &ScreenTitle::particle_torchflame_ash, + "brightness", + &ScreenTitle::brightness, "music", &ScreenTitle::music, "torch_sound", @@ -195,9 +238,10 @@ void register_usertypes(sol::state& lua) screenoptions_type["sides_hold_down_timer"] = &ScreenOptions::sides_hold_down_timer; screenoptions_type["sides_fast_scroll_timer"] = &ScreenOptions::sides_fast_scroll_timer; screenoptions_type["loop"] = &ScreenOptions::loop; + screenoptions_type["screen_panels"] = &ScreenOptions::screen_panels; screenoptions_type["menu_id"] = &ScreenOptions::current_menu_id; screenoptions_type["transfer_to_menu_id"] = &ScreenOptions::transfer_to_menu_id; - screenoptions_type["graphic_and_audio"] = &ScreenOptions::graphic_and_audio; + screenoptions_type["show_apply_button"] = &ScreenOptions::show_apply_button; screenoptions_type["topleft_woodpanel_esc"] = &ScreenOptions::topleft_woodpanel_esc; screenoptions_type["brick_background"] = &ScreenOptions::brick_background; screenoptions_type["brick_middlelayer"] = &ScreenOptions::brick_middlelayer; @@ -212,28 +256,26 @@ void register_usertypes(sol::state& lua) screenoptions_type["progressbar_foreground"] = &ScreenOptions::progressbar_foreground; screenoptions_type["volume_progressbar_position_indicator"] = &ScreenOptions::volume_progressbar_position_indicator; screenoptions_type["sectionheader_background"] = &ScreenOptions::sectionheader_background; + screenoptions_type["pet_icons"] = &ScreenOptions::pet_icons; + screenoptions_type["bottom_scroll"] = &ScreenOptions::bottom_scroll; + screenoptions_type["bottom_left_scrollhandle"] = &ScreenOptions::bottom_left_scrollhandle; + screenoptions_type["bottom_right_scrollhandle"] = &ScreenOptions::bottom_right_scrollhandle; + screenoptions_type["topleft_woodpanel_esc_slidein"] = &ScreenOptions::topleft_woodpanel_esc_slidein; screenoptions_type["text_fadein"] = &ScreenOptions::text_fadein; screenoptions_type["vertical_scroll_effect"] = &ScreenOptions::vertical_scroll_effect; - screenoptions_type["items_visiable"] = &ScreenOptions::items_visiable; + screenoptions_type["options_visiable"] = &ScreenOptions::options_visiable; screenoptions_type["show_highlight"] = &ScreenOptions::show_highlight; screenoptions_type["tooltip_text"] = &ScreenOptions::tooltip_text; - - lua.new_usertype( - "GraphicandAudioSettings", - "fullscreen_resolution_id", - &GraphicandAudioSettings::fullscreen_resolution_id, - "windowed_resolution_id", - &GraphicandAudioSettings::windowed_resolution_id, - "resolution_scale", - &GraphicandAudioSettings::resolution_scale, - "display_mode", - &GraphicandAudioSettings::display_mode); + screenoptions_type["disable_controls"] = &ScreenOptions::disable_controls; + screenoptions_type["sync_progress_state"] = &ScreenOptions::sync_progress_state; + screenoptions_type["credits_progression"] = &ScreenOptions::credits_progression; auto screenseedinput_type = lua.new_usertype("ScreenCodeInput", sol::base_classes, sol::bases()); + screenseedinput_type["screen_panels"] = &ScreenCodeInput::screen_panels; screenseedinput_type["allow_random"] = &ScreenCodeInput::allow_random; screenseedinput_type["selected_button_index"] = &ScreenCodeInput::selected_button_index; screenseedinput_type["pressed_select"] = &ScreenCodeInput::pressed_select; - screenseedinput_type["topleft_woodpanel_esc_slidein_timer"] = &ScreenCodeInput::topleft_woodpanel_esc_slidein; + screenseedinput_type["topleft_woodpanel_esc_slidein"] = &ScreenCodeInput::topleft_woodpanel_esc_slidein; screenseedinput_type["scroll_text_id"] = &ScreenCodeInput::scroll_text_id; screenseedinput_type["start_text_id"] = &ScreenCodeInput::start_text_id; screenseedinput_type["main_woodpanel_left_border"] = &ScreenCodeInput::main_woodpanel_left_border; @@ -245,14 +287,38 @@ void register_usertypes(sol::state& lua) screenseedinput_type["key_background"] = &ScreenCodeInput::key_background; screenseedinput_type["topleft_woodpanel_esc"] = &ScreenCodeInput::topleft_woodpanel_esc; screenseedinput_type["start_sidepanel"] = &ScreenCodeInput::start_sidepanel; - screenseedinput_type["start_sidepanel_slidein_timer"] = &ScreenCodeInput::start_sidepanel_slidein; + screenseedinput_type["start_sidepanel_slidein"] = &ScreenCodeInput::start_sidepanel_slidein; screenseedinput_type["seed_length"] = &ScreenCodeInput::code_length; screenseedinput_type["get_seed"] = &ScreenCodeInput::get_seed; screenseedinput_type["set_seed"] = &ScreenCodeInput::set_seed; + lua.new_usertype( + "FlyingThing", + "texture_info", + &FlyingThing::texture_info, + "entity_type", + &FlyingThing::entity_type, + "spritesheet_column", + &FlyingThing::spritesheet_column, + "spritesheet_row", + &FlyingThing::spritesheet_row, + "spritesheet_animation_length", + &FlyingThing::spritesheet_animation_length, + "velocity_x", + &FlyingThing::velocity_x, + "amplitude", + &FlyingThing::amplitude, + "frequency", + &FlyingThing::frequency, + "sinewave_angle", + &FlyingThing::sinewave_angle); + auto screencharacterselect_type = lua.new_usertype("ScreenCharacterSelect", sol::base_classes, sol::bases()); + screencharacterselect_type["main_background_zoom_progress"] = &ScreenCharacterSelect::main_background_zoom_progress; screencharacterselect_type["main_background_zoom_target"] = &ScreenCharacterSelect::main_background_zoom_target; + screencharacterselect_type["blurred_border_zoom_progress"] = &ScreenCharacterSelect::blurred_border_zoom_progress; screencharacterselect_type["blurred_border_zoom_target"] = &ScreenCharacterSelect::blurred_border_zoom_target; + screencharacterselect_type["screen_panels"] = &ScreenCharacterSelect::screen_panels; screencharacterselect_type["mine_entrance_background"] = &ScreenCharacterSelect::mine_entrance_background; screencharacterselect_type["character"] = &ScreenCharacterSelect::character; screencharacterselect_type["character_shadow"] = &ScreenCharacterSelect::character_shadow; @@ -281,12 +347,15 @@ void register_usertypes(sol::state& lua) screencharacterselect_type["topleft_woodpanel_esc_slidein"] = &ScreenCharacterSelect::topleft_woodpanel_esc_slidein; screencharacterselect_type["start_panel_slidein"] = &ScreenCharacterSelect::start_panel_slidein; screencharacterselect_type["action_buttons_keycap_size"] = &ScreenCharacterSelect::action_buttons_keycap_size; + screencharacterselect_type["next_screen_to_load"] = &ScreenCharacterSelect::next_screen_to_load; screencharacterselect_type["not_ready_to_start_yet"] = &ScreenCharacterSelect::not_ready_to_start_yet; screencharacterselect_type["available_mine_entrances"] = &ScreenCharacterSelect::available_mine_entrances; screencharacterselect_type["amount_of_mine_entrances_activated"] = &ScreenCharacterSelect::amount_of_mine_entrances_activated; - screencharacterselect_type["buttons"] = &ScreenCharacterSelect::buttons; + screencharacterselect_type["screen_blackout"] = &ScreenCharacterSelect::screen_blackout; + screencharacterselect_type["blackout_transparency"] = &ScreenCharacterSelect::blackout_transparency; screencharacterselect_type["start_pressed"] = &ScreenCharacterSelect::start_pressed; screencharacterselect_type["transition_to_game_started"] = &ScreenCharacterSelect::transition_to_game_started; + screencharacterselect_type["disable_controls"] = &ScreenCharacterSelect::disable_controls; screencharacterselect_type["flying_things"] = &ScreenCharacterSelect::flying_things; screencharacterselect_type["flying_thing_countdown"] = &ScreenCharacterSelect::flying_thing_countdown; screencharacterselect_type["particle_ceilingdust_smoke"] = &ScreenCharacterSelect::particle_ceilingdust_smoke; @@ -300,37 +369,22 @@ void register_usertypes(sol::state& lua) screencharacterselect_type["particle_torchflame_flames3"] = &ScreenCharacterSelect::particle_torchflame_flames3; screencharacterselect_type["particle_torchflame_smoke4"] = &ScreenCharacterSelect::particle_torchflame_smoke4; screencharacterselect_type["particle_torchflame_flames4"] = &ScreenCharacterSelect::particle_torchflame_flames4; - - lua.new_usertype( - "FlyingThing", - "texture_info", - &FlyingThing::texture_info, - "entity_type", - &FlyingThing::entity_type, - "spritesheet_column", - &FlyingThing::spritesheet_column, - "spritesheet_row", - &FlyingThing::spritesheet_row, - "spritesheet_animation_length", - &FlyingThing::spritesheet_animation_length, - "velocity_x", - &FlyingThing::velocity_x, - "amplitude", - &FlyingThing::amplitude, - "frequency", - &FlyingThing::frequency, - "sinewave_angle", - &FlyingThing::sinewave_angle); + screencharacterselect_type["torch_sound"] = &ScreenCharacterSelect::torch_sound; + screencharacterselect_type["buttons"] = &ScreenCharacterSelect::buttons; auto screenteamselect_type = lua.new_usertype("ScreenTeamSelect", sol::base_classes, sol::bases()); + screenteamselect_type["player_portrait"] = &ScreenTeamSelect::player_portrait; screenteamselect_type["scroll_bottom_left"] = &ScreenTeamSelect::scroll_bottom_left; screenteamselect_type["scrollend_bottom_left"] = &ScreenTeamSelect::scrollend_bottom_left; screenteamselect_type["four_ropes"] = &ScreenTeamSelect::four_ropes; + screenteamselect_type["gems_above_the_ropes"] = &ScreenTeamSelect::gems_above_the_ropes; screenteamselect_type["four_characters"] = &ScreenTeamSelect::four_characters; screenteamselect_type["left_arrow"] = &ScreenTeamSelect::left_arrow; screenteamselect_type["right_arrow"] = &ScreenTeamSelect::right_arrow; screenteamselect_type["start_panel"] = &ScreenTeamSelect::start_panel; screenteamselect_type["go_back_wooden_panel"] = &ScreenTeamSelect::go_back_wooden_panel; + screenteamselect_type["start_panel_slide"] = &ScreenTeamSelect::start_panel_slide; + screenteamselect_type["go_back_wooden_panel_slide"] = &ScreenTeamSelect::go_back_wooden_panel_slide; screenteamselect_type["pulsating_arrows_timer"] = &ScreenTeamSelect::pulsating_arrows_timer; screenteamselect_type["selected_player"] = &ScreenTeamSelect::selected_player; screenteamselect_type["buttons"] = &ScreenTeamSelect::buttons; @@ -371,6 +425,7 @@ void register_usertypes(sol::state& lua) screentransition_type["stats_scroll_horizontal_posaa"] = &ScreenTransition::stats_scroll_horizontal_pos; screentransition_type["stats_scroll_vertical_pos"] = &ScreenTransition::stats_scroll_vertical_pos; screentransition_type["level_completed_pos"] = &ScreenTransition::level_completed_pos; + screentransition_type["stats_scroll_unfurl_actualvalue"] = &ScreenTransition::stats_scroll_unfurl_actualvalue; screentransition_type["stats_scroll_unfurl_targetvalue"] = &ScreenTransition::stats_scroll_unfurl_targetvalue; screentransition_type["woodpanel1"] = &ScreenTransition::woodpanel1; screentransition_type["woodpanel2"] = &ScreenTransition::woodpanel2; @@ -392,6 +447,7 @@ void register_usertypes(sol::state& lua) screentransition_type["mama_tunnel"] = &ScreenTransition::mama_tunnel; screentransition_type["speechbubble"] = &ScreenTransition::speechbubble; screentransition_type["speechbubble_arrow"] = &ScreenTransition::speechbubble_arrow; + screentransition_type["mama_tunnel_fade_targetvalue"] = &ScreenTransition::mama_tunnel_fade_actualvalue; screentransition_type["mama_tunnel_fade_targetvalue"] = &ScreenTransition::mama_tunnel_fade_targetvalue; screentransition_type["mama_tunnel_text_id"] = &ScreenTransition::mama_tunnel_text_id; screentransition_type["mama_tunnel_choice_visible"] = &ScreenTransition::mama_tunnel_choice_visible; @@ -404,7 +460,7 @@ void register_usertypes(sol::state& lua) screentransition_type["woodpanel_cutout_big_money2"] = &ScreenTransition::woodpanel_cutout_big_money2; screentransition_type["woodpanel_cutout_big_money3"] = &ScreenTransition::woodpanel_cutout_big_money3; screentransition_type["big_dollar_sign"] = &ScreenTransition::big_dollar_sign; - screentransition_type["unknown26"] = &ScreenTransition::unknown26; + screentransition_type["stats_scroll_unfurl_sequence"] = &ScreenTransition::stats_scroll_unfurl_sequence; screentransition_type["player_stats_scroll_numeric_value"] = &ScreenTransition::player_stats_scroll_numeric_value; screentransition_type["player_secondary_icon"] = &ScreenTransition::player_secondary_icon; screentransition_type["player_icon"] = &ScreenTransition::player_icon; @@ -413,6 +469,7 @@ void register_usertypes(sol::state& lua) screentransition_type["hourglasses"] = &ScreenTransition::hourglasses; screentransition_type["small_dollar_signs"] = &ScreenTransition::small_dollar_signs; screentransition_type["this_level_money_color"] = &ScreenTransition::this_level_money_color; + screentransition_type["buttons"] = &ScreenTransition::buttons; lua.new_usertype( "ScreenDeath", @@ -434,6 +491,8 @@ void register_usertypes(sol::state& lua) lua.new_usertype( "ScreenCredits", + "credits_progression", + &ScreenCredits::credits_progression, "bg_music_info", &ScreenCredits::bg_music_info, sol::base_classes, @@ -517,6 +576,7 @@ void register_usertypes(sol::state& lua) &OnlineLobbyScreenPlayer::searching); auto screenonlinelobby_type = lua.new_usertype("ScreenOnlineLobby", sol::base_classes, sol::bases()); + screenonlinelobby_type["screen_panels"] = &ScreenOnlineLobby::screen_panels; screenonlinelobby_type["players"] = &ScreenOnlineLobby::players; screenonlinelobby_type["background_image"] = &ScreenOnlineLobby::background_image; screenonlinelobby_type["topleft_woodpanel_esc"] = &ScreenOnlineLobby::topleft_woodpanel_esc; @@ -554,7 +614,7 @@ void register_usertypes(sol::state& lua) "menu_slidein_progress", &PauseUI::menu_slidein_progress, "blurred_background", - &PauseUI::blurred_background, + &PauseUI::blackout_background, "woodpanel_left", &PauseUI::woodpanel_left, "woodpanel_middle", @@ -567,8 +627,14 @@ void register_usertypes(sol::state& lua) &PauseUI::scroll, "confirmation_panel", &PauseUI::confirmation_panel, - "previously_selected_menu_index", - &PauseUI::previously_selected_menu_index, + "selected_option", + &PauseUI::selected_option, + "prompt_visible", + &PauseUI::prompt_visible, + "buttons_actions", + &PauseUI::buttons_actions, + "buttons_movement", + &PauseUI::buttons_movement, "visibility", &PauseUI::visibility); @@ -590,14 +656,12 @@ void register_usertypes(sol::state& lua) &JournalUI::arrow_left, "arrow_right", &JournalUI::arrow_right, - "unknown23", - &JournalUI::unknown23, "entire_book", &JournalUI::entire_book, - "page_timer", - &JournalUI::page_timer, "fade_timer", &JournalUI::fade_timer, + "page_timer", + &JournalUI::page_timer, "opacity", sol::property([](JournalUI& ui) -> float { @@ -633,11 +697,9 @@ void register_usertypes(sol::state& lua) lua["JournalPage"]["as_journal_page_bestiary"] = &JournalPage::as; lua["JournalPage"]["as_journal_page_items"] = &JournalPage::as; lua["JournalPage"]["as_journal_page_traps"] = &JournalPage::as; - lua["JournalPage"]["as_journal_page_story"] = &JournalPage::as; lua["JournalPage"]["as_journal_page_feats"] = &JournalPage::as; lua["JournalPage"]["as_journal_page_deathcause"] = &JournalPage::as; lua["JournalPage"]["as_journal_page_deathmenu"] = &JournalPage::as; - lua["JournalPage"]["as_journal_page_recap"] = &JournalPage::as; lua["JournalPage"]["as_journal_page_playerprofile"] = &JournalPage::as; lua["JournalPage"]["as_journal_page_lastgameplayed"] = &JournalPage::as; @@ -725,11 +787,6 @@ void register_usertypes(sol::state& lua) sol::base_classes, sol::bases()); - lua.new_usertype( - "JournalPageStory", - sol::base_classes, - sol::bases()); - lua.new_usertype( "JournalPageFeats", "chapter_title_text_info", @@ -765,11 +822,6 @@ void register_usertypes(sol::state& lua) sol::base_classes, sol::bases()); - lua.new_usertype( - "JournalPageRecap", - sol::base_classes, - sol::bases()); - auto journalpageplayerprofile_type = lua.new_usertype("JournalPagePlayerProfile", sol::base_classes, sol::bases()); journalpageplayerprofile_type["player_icon"] = &JournalPagePlayerProfile::player_icon; journalpageplayerprofile_type["player_icon_id"] = &JournalPagePlayerProfile::player_icon_id; From 13906d81d2565beda0a518885129160c4d37d22c Mon Sep 17 00:00:00 2001 From: Mr-Auto <36127424+Mr-Auto@users.noreply.github.com> Date: Tue, 14 Nov 2023 23:03:10 +0100 Subject: [PATCH 18/19] fix --- docs/game_data/spel2.lua | 5 +---- docs/src/includes/_types.md | 5 +---- src/game_api/screen.hpp | 2 +- src/game_api/screen_arena.hpp | 8 ++++---- src/game_api/script/usertypes/screen_arena_lua.cpp | 3 --- 5 files changed, 7 insertions(+), 16 deletions(-) diff --git a/docs/game_data/spel2.lua b/docs/game_data/spel2.lua index 2f02e0e44..7fca8460e 100644 --- a/docs/game_data/spel2.lua +++ b/docs/game_data/spel2.lua @@ -5889,7 +5889,7 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field ouroboros_angle number ---@class OnlineLobbyScreenPlayer - ---@field platform_icon integer @16 = PC, 17 = Discord, 18 = Steam, 19 = Xbox, 32 = Switch, 48 = PS, 49 = PS again? + ---@field platform_icon integer @16 = PC, 17 = Discord, 18 = Steam, 19 = Xbox, 32 = switch, 48 = PS, 49 = PS again? ---@field character integer @0 - Ana Spelunky, 1 - Margaret Tunnel, 2 - Colin Northward, 3 - Roffy D. Sloth.. and so on. Same order as in ENT_TYPE ---@field ready boolean ---@field searching boolean @@ -6048,8 +6048,6 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field stickers TextureRenderingInfo[] @size: 20 ---@class ScreenArenaMenu : Screen - ---@field brick_background_animation ScreenZoomAnimation - ---@field blurry_border_animation ScreenZoomAnimation ---@field screen_panels MenuScreenPanels ---@field brick_background TextureRenderingInfo ---@field blurry_border TextureRenderingInfo @@ -6076,7 +6074,6 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field bottom_left_bricks TextureRenderingInfo ---@field top_left_esc_panel TextureRenderingInfo ---@field next_panel TextureRenderingInfo - ---@field option_captions ArenaRulesString[] ---@field center_panels_hor_slide_position number ---@field esc_next_panels_slide_timer number ---@field main_panel_vertical_scroll_position number diff --git a/docs/src/includes/_types.md b/docs/src/includes/_types.md index 60bfbca97..a4b8ff470 100644 --- a/docs/src/includes/_types.md +++ b/docs/src/includes/_types.md @@ -1927,7 +1927,7 @@ bool | [capitalize_scroll_text](https://github.com/spelunky-fyi/overlunky/search Type | Name | Description ---- | ---- | ----------- -int | [platform_icon](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=platform_icon) | 16 = PC, 17 = Discord, 18 = Steam, 19 = Xbox, 32 = [Switch](#Switch), 48 = PS, 49 = PS again? +int | [platform_icon](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=platform_icon) | 16 = PC, 17 = Discord, 18 = Steam, 19 = Xbox, 32 = switch, 48 = PS, 49 = PS again? int | [character](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=character) | 0 - Ana Spelunky, 1 - Margaret Tunnel, 2 - Colin Northward, 3 - Roffy D. Sloth.. and so on. Same order as in [ENT_TYPE](#ENT_TYPE) bool | [ready](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=ready) | bool | [searching](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=searching) | @@ -2035,8 +2035,6 @@ Derived from [Screen](#Screen) Type | Name | Description ---- | ---- | ----------- -ScreenZoomAnimation | [brick_background_animation](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=brick_background_animation) | -ScreenZoomAnimation | [blurry_border_animation](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=blurry_border_animation) | [MenuScreenPanels](#MenuScreenPanels) | [screen_panels](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=screen_panels) | [TextureRenderingInfo](#TextureRenderingInfo) | [brick_background](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=brick_background) | [TextureRenderingInfo](#TextureRenderingInfo) | [blurry_border](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=blurry_border) | @@ -2063,7 +2061,6 @@ ScreenZoomAnimation | [blurry_border_animation](https://github.com/spelunky-fyi/ [TextureRenderingInfo](#TextureRenderingInfo) | [bottom_left_bricks](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=bottom_left_bricks) | [TextureRenderingInfo](#TextureRenderingInfo) | [top_left_esc_panel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=top_left_esc_panel) | [TextureRenderingInfo](#TextureRenderingInfo) | [next_panel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=next_panel) | -vector<ArenaRulesString> | [option_captions](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=option_captions) | float | [center_panels_hor_slide_position](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=center_panels_hor_slide_position) | float | [esc_next_panels_slide_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=esc_next_panels_slide_timer) | float | [main_panel_vertical_scroll_position](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=main_panel_vertical_scroll_position) | diff --git a/src/game_api/screen.hpp b/src/game_api/screen.hpp index 89ad8aa04..2200623c2 100644 --- a/src/game_api/screen.hpp +++ b/src/game_api/screen.hpp @@ -761,7 +761,7 @@ class ScreenOnlineLoading : public Screen // ID: 28 struct OnlineLobbyScreenPlayer { - /// 16 = PC, 17 = Discord, 18 = Steam, 19 = Xbox, 32 = Switch, 48 = PS, 49 = PS again? + /// 16 = PC, 17 = Discord, 18 = Steam, 19 = Xbox, 32 = switch, 48 = PS, 49 = PS again? uint8_t platform_icon; // werid numbers, anything else results in the startd PC icon, maybe it's some actual id /// 0 - Ana Spelunky, 1 - Margaret Tunnel, 2 - Colin Northward, 3 - Roffy D. Sloth.. and so on. Same order as in ENT_TYPE uint8_t character; diff --git a/src/game_api/screen_arena.hpp b/src/game_api/screen_arena.hpp index faf8aa69b..48b6741a0 100644 --- a/src/game_api/screen_arena.hpp +++ b/src/game_api/screen_arena.hpp @@ -5,10 +5,10 @@ struct ArenaRulesString { - STRINGID text_1_id; // StringsTableID - STRINGID text_2_id; // StringsTableID - STRINGID text_3_id; // StringsTableID - STRINGID text_4_id; // StringsTableID + STRINGID text_1; // StringsTableID + STRINGID text_2; // StringsTableID + STRINGID text_3; // StringsTableID + STRINGID text_4; // StringsTableID uint8_t unknown1; uint8_t unknown2; uint8_t unknown3; diff --git a/src/game_api/script/usertypes/screen_arena_lua.cpp b/src/game_api/script/usertypes/screen_arena_lua.cpp index 2fc2e4655..71717c1a2 100644 --- a/src/game_api/script/usertypes/screen_arena_lua.cpp +++ b/src/game_api/script/usertypes/screen_arena_lua.cpp @@ -17,8 +17,6 @@ namespace NScreenArena void register_usertypes(sol::state& lua) { auto screenarenamenu_type = lua.new_usertype("ScreenArenaMenu", sol::base_classes, sol::bases()); - screenarenamenu_type["brick_background_animation"] = &ScreenArenaMenu::brick_background_animation; - screenarenamenu_type["blurry_border_animation"] = &ScreenArenaMenu::blurry_border_animation; screenarenamenu_type["screen_panels"] = &ScreenArenaMenu::screen_panels; screenarenamenu_type["brick_background"] = &ScreenArenaMenu::brick_background; screenarenamenu_type["blurry_border"] = &ScreenArenaMenu::blurry_border; @@ -45,7 +43,6 @@ void register_usertypes(sol::state& lua) screenarenamenu_type["bottom_left_bricks"] = &ScreenArenaMenu::bottom_left_bricks; screenarenamenu_type["top_left_esc_panel"] = &ScreenArenaMenu::top_left_esc_panel; screenarenamenu_type["next_panel"] = &ScreenArenaMenu::next_panel; - screenarenamenu_type["option_captions"] = &ScreenArenaMenu::option_captions; screenarenamenu_type["center_panels_hor_slide_position"] = &ScreenArenaMenu::center_panels_hor_slide_position; screenarenamenu_type["esc_next_panels_slide_timer"] = &ScreenArenaMenu::esc_next_panels_slide_timer; screenarenamenu_type["main_panel_vertical_scroll_position"] = &ScreenArenaMenu::main_panel_vertical_scroll_position; From 826ba37cc436416314d6af4453024199c6275971 Mon Sep 17 00:00:00 2001 From: Mr-Auto <36127424+Mr-Auto@users.noreply.github.com> Date: Wed, 15 Nov 2023 15:27:18 +0100 Subject: [PATCH 19/19] spelling mistakes --- docs/game_data/spel2.lua | 8 ++++---- docs/src/includes/_types.md | 8 ++++---- src/game_api/screen_arena.hpp | 10 +++++----- src/game_api/script/usertypes/screen_arena_lua.cpp | 8 ++++---- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/game_data/spel2.lua b/docs/game_data/spel2.lua index 7fca8460e..4cfe36cf0 100644 --- a/docs/game_data/spel2.lua +++ b/docs/game_data/spel2.lua @@ -6078,7 +6078,7 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field esc_next_panels_slide_timer number ---@field main_panel_vertical_scroll_position number ---@field selected_option_index integer - ---@field contols ScreenControls + ---@field controls ScreenControls ---@class ScreenArenaStagesSelect : Screen ---@field screen_panels MenuScreenPanels @@ -6108,11 +6108,11 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field players_turn_scroll TextureRenderingInfo ---@field players_turn_scroll_handle TextureRenderingInfo ---@field grid_player_icon TextureRenderingInfo - ---@field stages_to_gay_out table + ---@field stages_to_gray_out table ---@field panels_slide_from_both_sides number ---@field visibility_all_stages number ---@field selected_stage_index integer - ---@field contols ScreenControls + ---@field controls ScreenControls ---@class ScreenArenaItems : Screen ---@field screen_panels MenuScreenPanels @@ -6131,7 +6131,7 @@ function Quad:is_point_inside(x, y, epsilon) end ---@field item_equipped_badge TextureRenderingInfo ---@field item_off_gray_overlay TextureRenderingInfo ---@field esc_woodpanel TextureRenderingInfo - ---@field items_to_gay_out table + ---@field items_to_gray_out table ---@field center_panels_horizontal_slide_position number ---@field esc_panel_slide_timer number ---@field selected_item_index integer diff --git a/docs/src/includes/_types.md b/docs/src/includes/_types.md index a4b8ff470..064906e50 100644 --- a/docs/src/includes/_types.md +++ b/docs/src/includes/_types.md @@ -2010,7 +2010,7 @@ Type | Name | Description [TextureRenderingInfo](#TextureRenderingInfo) | [item_equipped_badge](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=item_equipped_badge) | [TextureRenderingInfo](#TextureRenderingInfo) | [item_off_gray_overlay](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=item_off_gray_overlay) | [TextureRenderingInfo](#TextureRenderingInfo) | [esc_woodpanel](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=esc_woodpanel) | -map<int, float> | [items_to_gay_out](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=items_to_gay_out) | +map<int, float> | [items_to_gray_out](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=items_to_gray_out) | float | [center_panels_horizontal_slide_position](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=center_panels_horizontal_slide_position) | float | [esc_panel_slide_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=esc_panel_slide_timer) | int | [selected_item_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=selected_item_index) | @@ -2065,7 +2065,7 @@ float | [center_panels_hor_slide_position](https://github.com/spelunky-fyi/overl float | [esc_next_panels_slide_timer](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=esc_next_panels_slide_timer) | float | [main_panel_vertical_scroll_position](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=main_panel_vertical_scroll_position) | int | [selected_option_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=selected_option_index) | -[ScreenControls](#ScreenControls) | [contols](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=contols) | +[ScreenControls](#ScreenControls) | [controls](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=controls) | ### ScreenArenaScore @@ -2152,11 +2152,11 @@ int | [buttons](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=buttons [TextureRenderingInfo](#TextureRenderingInfo) | [players_turn_scroll](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=players_turn_scroll) | [TextureRenderingInfo](#TextureRenderingInfo) | [players_turn_scroll_handle](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=players_turn_scroll_handle) | [TextureRenderingInfo](#TextureRenderingInfo) | [grid_player_icon](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=grid_player_icon) | -map<int, float> | [stages_to_gay_out](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=stages_to_gay_out) | +map<int, float> | [stages_to_gray_out](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=stages_to_gray_out) | float | [panels_slide_from_both_sides](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=panels_slide_from_both_sides) | float | [visibility_all_stages](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=visibility_all_stages) | int | [selected_stage_index](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=selected_stage_index) | -[ScreenControls](#ScreenControls) | [contols](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=contols) | +[ScreenControls](#ScreenControls) | [controls](https://github.com/spelunky-fyi/overlunky/search?l=Lua&q=controls) | ### ScreenCamp diff --git a/src/game_api/screen_arena.hpp b/src/game_api/screen_arena.hpp index 48b6741a0..7079169c0 100644 --- a/src/game_api/screen_arena.hpp +++ b/src/game_api/screen_arena.hpp @@ -56,7 +56,7 @@ class ScreenArenaMenu : public Screen // ID: 21 float esc_next_panels_slide_timer; float main_panel_vertical_scroll_position; uint32_t selected_option_index; // more like highlighted - ScreenControls contols; + ScreenControls controls; uint8_t unknown57[3]; // some states, like screen depth }; @@ -91,8 +91,8 @@ class ScreenArenaStagesSelect : public Screen // ID: 22 and 24 TextureRenderingInfo players_turn_scroll; TextureRenderingInfo players_turn_scroll_handle; TextureRenderingInfo grid_player_icon; - float unknown30; // padding probably - custom_unordered_map stages_to_gay_out; // key is the stage, float is how gray out it is + float unknown30; // padding probably + custom_unordered_map stages_to_gray_out; // key is the stage, float is how gray out it is uint32_t unknown47; // load state? uint32_t unknown48; @@ -101,7 +101,7 @@ class ScreenArenaStagesSelect : public Screen // ID: 22 and 24 float panels_slide_from_both_sides; float visibility_all_stages; uint32_t selected_stage_index; // more like highlighted - ScreenControls contols; + ScreenControls controls; uint8_t unknown57[3]; // some states, like screen depth }; @@ -125,7 +125,7 @@ class ScreenArenaItems : public Screen // ID: 23 TextureRenderingInfo item_off_gray_overlay; TextureRenderingInfo esc_woodpanel; - custom_unordered_map items_to_gay_out; + custom_unordered_map items_to_gray_out; float unknown33; float center_panels_horizontal_slide_position; diff --git a/src/game_api/script/usertypes/screen_arena_lua.cpp b/src/game_api/script/usertypes/screen_arena_lua.cpp index 71717c1a2..03f9f23d8 100644 --- a/src/game_api/script/usertypes/screen_arena_lua.cpp +++ b/src/game_api/script/usertypes/screen_arena_lua.cpp @@ -47,7 +47,7 @@ void register_usertypes(sol::state& lua) screenarenamenu_type["esc_next_panels_slide_timer"] = &ScreenArenaMenu::esc_next_panels_slide_timer; screenarenamenu_type["main_panel_vertical_scroll_position"] = &ScreenArenaMenu::main_panel_vertical_scroll_position; screenarenamenu_type["selected_option_index"] = &ScreenArenaMenu::selected_option_index; - screenarenamenu_type["contols"] = &ScreenArenaMenu::contols; + screenarenamenu_type["controls"] = &ScreenArenaMenu::controls; auto screenarenastagesselect_type = lua.new_usertype("ScreenArenaStagesSelect", sol::base_classes, sol::bases()); screenarenastagesselect_type["screen_panels"] = &ScreenArenaStagesSelect::screen_panels; @@ -77,11 +77,11 @@ void register_usertypes(sol::state& lua) screenarenastagesselect_type["players_turn_scroll"] = &ScreenArenaStagesSelect::players_turn_scroll; screenarenastagesselect_type["players_turn_scroll_handle"] = &ScreenArenaStagesSelect::players_turn_scroll_handle; screenarenastagesselect_type["grid_player_icon"] = &ScreenArenaStagesSelect::grid_player_icon; - screenarenastagesselect_type["stages_to_gay_out"] = &ScreenArenaStagesSelect::stages_to_gay_out; + screenarenastagesselect_type["stages_to_gray_out"] = &ScreenArenaStagesSelect::stages_to_gray_out; screenarenastagesselect_type["panels_slide_from_both_sides"] = &ScreenArenaStagesSelect::panels_slide_from_both_sides; screenarenastagesselect_type["visibility_all_stages"] = &ScreenArenaStagesSelect::visibility_all_stages; screenarenastagesselect_type["selected_stage_index"] = &ScreenArenaStagesSelect::selected_stage_index; - screenarenastagesselect_type["contols"] = &ScreenArenaStagesSelect::contols; + screenarenastagesselect_type["controls"] = &ScreenArenaStagesSelect::controls; auto screenarenaitems_type = lua.new_usertype("ScreenArenaItems", sol::base_classes, sol::bases()); screenarenaitems_type["screen_panels"] = &ScreenArenaItems::screen_panels; @@ -100,7 +100,7 @@ void register_usertypes(sol::state& lua) screenarenaitems_type["item_equipped_badge"] = &ScreenArenaItems::item_equipped_badge; screenarenaitems_type["item_off_gray_overlay"] = &ScreenArenaItems::item_off_gray_overlay; screenarenaitems_type["esc_woodpanel"] = &ScreenArenaItems::esc_woodpanel; - screenarenaitems_type["items_to_gay_out"] = &ScreenArenaItems::items_to_gay_out; + screenarenaitems_type["items_to_gray_out"] = &ScreenArenaItems::items_to_gray_out; screenarenaitems_type["center_panels_horizontal_slide_position"] = &ScreenArenaItems::center_panels_horizontal_slide_position; screenarenaitems_type["esc_panel_slide_timer"] = &ScreenArenaItems::esc_panel_slide_timer; screenarenaitems_type["selected_item_index"] = &ScreenArenaItems::selected_item_index;