Skip to content

Commit 556d98e

Browse files
committed
Added gui_screen_game_options (WIP)
1 parent 7bf6e44 commit 556d98e

4 files changed

Lines changed: 226 additions & 0 deletions

File tree

game/game.vcxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ copy /b $(ProjectDir)source\config\version.cpp +,, $(ProjectDir)source\config\ve
283283
<ClCompile Include="source\interface\gui_screens\campaign\gui_screen_campaign_select_skulls.cpp" />
284284
<ClCompile Include="source\interface\gui_screens\campaign\gui_screen_campaign_settings.cpp" />
285285
<ClCompile Include="source\interface\gui_screens\error_dialogs\screen_error_dialog_ok.cpp" />
286+
<ClCompile Include="source\interface\gui_screens\game_options\gui_screen_game_options.cpp" />
286287
<ClCompile Include="source\interface\gui_screens\player_select\gui_player_select_screen_widget.cpp" />
287288
<ClCompile Include="source\interface\gui_screens\pregame_lobby\advanced_screen\gui_screen_matchmaking_advanced_options.cpp" />
288289
<ClCompile Include="source\interface\gui_screens\pregame_lobby\gui_screen_pregame_lobby_campaign.cpp" />
@@ -1004,6 +1005,7 @@ copy /b $(ProjectDir)source\config\version.cpp +,, $(ProjectDir)source\config\ve
10041005
<ClInclude Include="source\interface\gui_pregame_setup_manager.hpp" />
10051006
<ClInclude Include="source\interface\gui_screens\error_dialogs\screen_error_dialog.hpp" />
10061007
<ClInclude Include="source\interface\gui_screens\error_dialogs\screen_error_dialog_ok.hpp" />
1008+
<ClInclude Include="source\interface\gui_screens\game_options\gui_screen_game_options.hpp" />
10071009
<ClInclude Include="source\interface\gui_selected_items_saved_screenshot.hpp" />
10081010
<ClInclude Include="source\interface\gui_screens\boot_betrayer\gui_screen_boot_betrayer.hpp" />
10091011
<ClInclude Include="source\interface\gui_screens\campaign\gui_screen_campaign_select_difficulty.hpp" />

game/game.vcxproj.filters

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1971,6 +1971,9 @@
19711971
<ClCompile Include="source\interface\user_interface_window_manager_debug.cpp">
19721972
<Filter>Source Files</Filter>
19731973
</ClCompile>
1974+
<ClCompile Include="source\interface\gui_screens\game_options\gui_screen_game_options.cpp">
1975+
<Filter>Source Files</Filter>
1976+
</ClCompile>
19741977
</ItemGroup>
19751978
<ItemGroup>
19761979
<ClInclude Include="source\camera\camera.hpp">
@@ -4385,6 +4388,9 @@
43854388
<ClInclude Include="source\interface\user_interface_window_manager_debug.hpp">
43864389
<Filter>Header Files</Filter>
43874390
</ClInclude>
4391+
<ClInclude Include="source\interface\gui_screens\game_options\gui_screen_game_options.hpp">
4392+
<Filter>Header Files</Filter>
4393+
</ClInclude>
43884394
</ItemGroup>
43894395
<ItemGroup>
43904396
<ResourceCompile Include="resource\resource.rc">
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
#include "interface/gui_screens/game_options/gui_screen_game_options.hpp"
2+
3+
//.text:00B0AEA0 ;
4+
//.text:00B0AEC0 ;
5+
//.text:00B0AEE0 ;
6+
//.text:00B0AEF0 ;
7+
//.text:00B0AF00 ; public: c_game_options_category_datasource::c_game_options_category_datasource(e_game_engine_category, e_game_engine_category, const c_game_variant*)
8+
//.text:00B0AF40 ; public: c_game_options_parameter_datasource::c_game_options_parameter_datasource(e_game_variant_parameter)
9+
//.text:00B0AF70 ; public: c_gui_screen_game_options::c_gui_screen_game_options(int32)
10+
//.text:00B0B140 ; public: c_load_game_options_screen_message::c_load_game_options_screen_message(int32, e_controller_index, e_window_index, int32, const c_game_variant*, const c_game_variant*, e_game_engine_category, e_game_engine_category, int32, s_game_options_history_stack_node*, int32)
11+
//.text:00B0B270 ;
12+
//.text:00B0B280 ;
13+
//.text:00B0B290 ;
14+
//.text:00B0B2A0 ; public: virtual c_gui_screen_game_options::~c_gui_screen_game_options()
15+
//.text:00B0B300 ;
16+
//.text:00B0B310 ; public: virtual void* c_game_options_category_datasource::`vector deleting destructor'(unsigned int)
17+
//.text:00B0B340 ; public: virtual void* c_game_options_parameter_datasource::`vector deleting destructor'(unsigned int)
18+
//.text:00B0B370 ; public: virtual void* c_gui_screen_game_options::`vector deleting destructor'(unsigned int)
19+
//.text:00B0B3E0 ; public: virtual void* c_load_game_options_screen_message::`vector deleting destructor'(unsigned int)
20+
//.text:00B0B410 ; private: bool c_gui_screen_game_options::allow_user_to_transition()
21+
//.text:00B0B4D0 ; public: void c_gui_screen_game_options::apply_initial_state(const c_game_variant*, const c_game_variant*, e_game_engine_category, e_game_engine_category, int32, const s_game_options_history_stack_node*, int32, int32)
22+
//.text:00B0B590 ; public: virtual void c_load_game_options_screen_message::apply_initial_state(c_gui_screen_widget*) const
23+
//.text:00B0B5D0 ; protected: bool c_gui_screen_game_options::back_out_from_current_editing_category(e_controller_index)
24+
//.text:00B0B780 ; protected: void c_gui_screen_game_options::begin_rename_edited_variant(e_controller_index)
25+
//.text:00B0B920 ; protected: void c_gui_screen_game_options::begin_save_as_current_edited_variant(e_controller_index)
26+
//.text:00B0BAE0 ; protected: void c_gui_screen_game_options::begin_save_current_edited_variant(e_controller_index)
27+
//.text:00B0BC30 ;
28+
//.text:00B0BC40 ;
29+
//.text:00B0BC70 ;
30+
//.text:00B0BC80 ; protected: void c_gui_screen_game_options::finish_editing_setting()
31+
//.text:00B0BC90 ; public: virtual void c_game_options_category_datasource::get_column_names(int32* const, int32*)
32+
//.text:00B0BCB0 ; public: virtual void c_game_options_parameter_datasource::get_column_names(int32* const, int32*)
33+
//.text:00B0BCF0 ; protected: virtual int32 c_game_options_category_datasource::get_current_item_count_internal()
34+
//.text:00B0BD20 ; protected: virtual int32 c_game_options_parameter_datasource::get_current_item_count_internal()
35+
//.text:00B0BD40 ;
36+
//.text:00B0BD50 ; public: virtual bool c_game_options_category_datasource::get_element(int32, void*, int32)
37+
//.text:00B0BDC0 ; public: virtual bool c_game_options_parameter_datasource::get_integer_value(int32, int32, int32*)
38+
//.text:00B0BE10 ; public: e_game_engine_category c_gui_screen_game_options::get_interface_setting() const
39+
//.text:00B0BE30 ; public: virtual bool c_game_options_category_datasource::get_string_id_value(int32, int32, int32*)
40+
//.text:00B0C010 ; public: virtual bool c_game_options_parameter_datasource::get_string_id_value(int32, int32, int32*)
41+
//.text:00B0C090 ; public: e_game_engine_category c_gui_screen_game_options::get_template_setting() const
42+
//.text:00B0C0B0 ; public: virtual bool c_gui_screen_game_options::handle_controller_input_message(const c_controller_input_message*)
43+
//.text:00B0C200 ; public: virtual bool c_gui_screen_game_options::handle_dialog_result(const c_dialog_result_message*)
44+
//.text:00B0C470 ; public: virtual bool c_gui_screen_game_options::handle_list_item_chosen(const c_controller_input_message*, int32, c_gui_list_item_widget*, c_gui_data*)
45+
//.text:00B0CA70 ; public: virtual void c_gui_screen_game_options::initialize()
46+
//.text:00B0CB20 ; public: virtual void c_gui_screen_game_options::initialize_datasource()
47+
//.text:00B0CD10 ; protected: void c_gui_screen_game_options::load_progress_ui(e_controller_index)
48+
//.text:00B0CDB0 ; bool __cdecl parse_current_selected_item_nugget(void*, int32, wchar_t*, int32)
49+
//.text:00B0CEA0 ; bool __cdecl parse_current_selected_name(void*, wchar_t*, int32)
50+
//.text:00B0CEC0 ; bool __cdecl parse_current_selected_value(void*, wchar_t*, int32)
51+
//.text:00B0CEE0 ; public: virtual void c_gui_screen_game_options::post_initialize()
52+
//.text:00B0CF30 ; protected: void c_gui_screen_game_options::propagate_changes_from_newly_created_game_variant_file(e_controller_index, int32, e_saved_game_file_type)
53+
//.text:00B0D070 ; protected: void c_gui_screen_game_options::propagate_changes_to_currently_selected_game_variant_file(e_controller_index)
54+
//.text:00B0D180 ; protected: void c_gui_screen_game_options::revert_current_edited_variant(e_controller_index)
55+
//.text:00B0D190 ; protected: bool c_gui_screen_game_options::saved_game_variant_file_already_exists(e_controller_index, const wchar_t*) const
56+
//.text:00B0D1C0 ; protected: void c_gui_screen_game_options::set_editing_parameter(e_game_variant_parameter)
57+
//.text:00B0D1D0 ;
58+
//.text:00B0D1F0 ; private: void c_gui_screen_game_options::setup_game_variant_for_write(s_blffile_game_variant*, const wchar_t*, const c_game_variant*)
59+
//.text:00B0D330 ; private: bool c_gui_screen_game_options::start_create_game_variant(const wchar_t*)
60+
//.text:00B0D3E0 ;
61+
//.text:00B0D410 ; public: virtual void c_gui_screen_game_options::update(uns32)
62+
//.text:00B0D520 ; public: void c_gui_screen_game_options::update_rename_operation()
63+
//.text:00B0D8C0 ; public: void c_gui_screen_game_options::update_revert_changes_operation()
64+
//.text:00B0D900 ; public: void c_gui_screen_game_options::update_save_as_new_operation()
65+
//.text:00B0DED0 ; public: void c_gui_screen_game_options::update_save_operation()
66+
//.text:00B0DFF0 ; protected: bool c_gui_screen_game_options::user_is_editing_setting() const
67+
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
#pragma once
2+
3+
#include "game/game_engine_variant.hpp"
4+
#include "interface/c_gui_screen_widget.hpp"
5+
#include "interface/user_interface_data.hpp"
6+
#include "interface/user_interface_messages.hpp"
7+
#include "main/global_preferences.hpp"
8+
#include "multithreading/synchronized_value.hpp"
9+
#include "networking/online/online_guide_pc.hpp"
10+
#include "networking/tools/network_blf.hpp"
11+
12+
class c_virtual_keyboard_task;
13+
14+
struct s_game_options_history_stack_node
15+
{
16+
e_game_engine_category template_category;
17+
e_game_engine_category interface_category;
18+
int32 focused_element_handle;
19+
};
20+
static_assert(sizeof(s_game_options_history_stack_node) == 0xC);
21+
22+
class c_game_options_category_datasource :
23+
public c_gui_ordered_data
24+
{
25+
public:
26+
//virtual ~c_game_options_category_datasource();
27+
//virtual void get_column_names(int32*, int32);
28+
//virtual bool get_element(int32, void*, int32);
29+
//virtual bool get_string_id_value(int32, int32, int32*);
30+
31+
protected:
32+
//virtual int32 get_current_item_count_internal();
33+
34+
public:
35+
//c_game_options_category_datasource(const c_game_options_category_datasource&);
36+
//c_game_options_category_datasource(e_game_engine_category, e_game_engine_category, const c_game_variant*);
37+
//c_game_options_category_datasource& operator=(const c_game_options_category_datasource&);
38+
39+
private:
40+
const c_game_variant* m_edit_variant;
41+
e_game_engine_category m_template_category;
42+
e_game_engine_category m_interface_category;
43+
};
44+
45+
class c_game_options_parameter_datasource :
46+
public c_gui_ordered_data
47+
{
48+
public:
49+
//virtual ~c_game_options_parameter_datasource();
50+
//virtual void get_column_names(int32* const column_names, int32* column_count) override;
51+
//virtual bool get_integer_value(int32 element_handle, int32 value_name, int32* value) override;
52+
//virtual bool get_string_id_value(int32 element_handle, int32 value_name, int32* value) override;
53+
//virtual int32 get_current_item_count_internal() override;
54+
55+
private:
56+
e_game_variant_parameter m_parameter;
57+
};
58+
static_assert(sizeof(s_game_options_history_stack_node) == 0xC);
59+
60+
class c_load_game_options_screen_message :
61+
public c_load_screen_message
62+
{
63+
public:
64+
//virtual ~c_load_game_options_screen_message();
65+
//virtual void apply_initial_state(c_gui_screen_widget* screen) const override;
66+
67+
private:
68+
c_game_variant m_edit_game_variant;
69+
c_game_variant m_revert_game_variant;
70+
e_game_engine_category m_template_category;
71+
e_game_engine_category m_interface_category;
72+
int32 m_focused_element_handle;
73+
s_game_options_history_stack_node m_settings_history_stack[16];
74+
int32 m_history_stack_depth;
75+
int32 m_layered_position;
76+
};
77+
78+
class c_gui_screen_game_options :
79+
public c_gui_screen_widget
80+
{
81+
public:
82+
enum e_asynchronous_operation
83+
{
84+
_operation_none = 0,
85+
_operation_save,
86+
_operation_save_as_new,
87+
_operation_rename,
88+
_operation_revert_changes,
89+
90+
k_number_of_variant_desired_operations,
91+
};
92+
93+
enum e_destructive_action_confirmation_result
94+
{
95+
_result_indeterminate = 0,
96+
_result_confirmation,
97+
_result_cancellation,
98+
};
99+
100+
enum e_variant_save_options_dialog_result
101+
{
102+
_save = 0,
103+
_save_as_new,
104+
_revert,
105+
_cancel,
106+
107+
k_number_of_variant_save_options_dialog_results,
108+
109+
_invalid_result = NONE,
110+
};
111+
112+
public:
113+
//virtual ~c_gui_screen_game_options();
114+
//virtual void initialize() override;
115+
//virtual void post_initialize() override;
116+
//virtual void update(uns32 current_milliseconds) override;
117+
//virtual bool handle_controller_input_message(const c_controller_input_message* message) override;
118+
//virtual void initialize_datasource();
119+
//virtual bool handle_list_item_chosen(const c_controller_input_message* message, int32 list_name, c_gui_list_item_widget* list_item_widget, c_gui_data* datasource);
120+
//virtual bool handle_dialog_result(const c_dialog_result_message* message);
121+
122+
private:
123+
c_game_variant m_edit_game_variant;
124+
c_game_variant m_revert_game_variant;
125+
e_game_variant_parameter m_editing_parameter;
126+
s_game_options_history_stack_node m_settings_history_stack[16];
127+
int32 m_setting_stack_depth;
128+
int32 m_layered_position;
129+
e_asynchronous_operation m_asynchronous_operation;
130+
e_variant_save_options_dialog_result m_confirmation_action;
131+
e_destructive_action_confirmation_result m_confirmation_result;
132+
s_blffile_game_variant m_variant_on_disk;
133+
e_controller_index m_asynchronous_operation_controller;
134+
c_virtual_keyboard_task* m_keyboard_task;
135+
wchar_t m_virtual_keyboard_results_buffer[256];
136+
c_string_verify_task m_string_verify_task;
137+
wchar_t m_saved_game_name_buffer[128];
138+
wchar_t m_saved_game_description_buffer[128];
139+
s_gui_game_setup_storage::s_multiplayer_settings m_multiplayer_setup;
140+
int32 m_create_new_variant_task;
141+
int32 m_write_new_variant_task;
142+
int32 m_delete_edit_variant_task;
143+
int32 m_write_variant_task;
144+
c_synchronized_long m_async_success;
145+
c_synchronized_long m_async_complete;
146+
c_synchronized_long m_content_item_index;
147+
uns32 m_progress_dialog_start_time_milliseconds;
148+
};
149+
static_assert(sizeof(c_gui_screen_game_options) == 0x11758);
150+
static_assert(sizeof(c_gui_screen_game_options) == sizeof(c_gui_screen_widget) + 0xFCB8);
151+

0 commit comments

Comments
 (0)