-
Notifications
You must be signed in to change notification settings - Fork 50
(Do not merge) Game Engine #887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development-new
Are you sure you want to change the base?
Conversation
xlive/Blam/Engine/interface/multiplayer_variant_interface_headhunter_strings.h
Outdated
Show resolved
Hide resolved
xlive/Blam/Engine/simulation/game_interface/simulation_game_events.cpp
Outdated
Show resolved
Hide resolved
xlive/Blam/Engine/simulation/game_interface/simulation_game_engine_slayer.h
Outdated
Show resolved
Hide resolved
| { | ||
|
|
||
| variant->variant_game_engine_index = _game_engine_type_headhunter; | ||
| variant->game_engine_flags.set_unsafe(variant->game_engine_flags.get_unsafe() & ~0xFFEu | 0xFFA); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use e_game_engine_flags to make it more readable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no equivalent I don't know exactly what the purpose of this code was.
| int32 setting_storage4[6]; | ||
| }; | ||
|
|
||
| union s_game_variant |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave the variant structure the way it was
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switched back to the original struct and moved the cartographer settings.
xlive/Blam/Engine/interface/screens/screen_network_squad_browser.cpp
Outdated
Show resolved
Hide resolved
|
|
||
| /* constants */ | ||
|
|
||
| constexpr real_point2d k_observer_default_cross_hair_position{ {0.f, 0.138f} }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a constant instead of constexpr
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
constantexpr in this context is the same as constant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it's duplicated in 2 TUs right now, keep it as a constant assigned in the cpp file and have it as an extern in the header
| #pragma once | ||
| #include "user_interface_shared_globals.h" | ||
| #include "saved_games/game_variant.h" | ||
| #include "saved_games/saved_game_files.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove saved game includes and put struct infront of the parameter and return types in the prototypes below
89378f9 to
10ce031
Compare
for detailed git history of the changes in this commit view https://github.com/Kantanomo/cartographer/tree/game-engine-3
10ce031 to
e12bcb2
Compare
| } | ||
| } | ||
|
|
||
| void weapons_apply_patches() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apply patch functions should be the first public function in the cpp
| bool network_session_interface_set_local_user_character_type(int32 user_index, e_character_type character_type); | ||
| bool network_session_interface_get_local_user_identifier(int32 user_index, s_player_identifier* out_identifier); | ||
| void network_session_interface_set_local_user_rank(int32 user_index, int8 rank); | ||
| bool __cdecl network_session_get_scenario_id(uint32* out_1, uint32* out_2, uint32* out_3, s_custom_map_id** out_custom_map); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove map_repository include from here and have the parameter as struct s_custom_map_id**
| return; | ||
| } | ||
|
|
||
| void simulation_type_collection_apply_patches() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first function in object
| #include "interface/user_interface_widget_button.h" | ||
| #include "interface/user_interface_widget_text_entry.h" | ||
| #include "interface/signal_slot.h" | ||
| #include "saved_games/game_variant.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this and use struct s_game_variant* variant in globals_set_variant
| _ui_error_xblive_user_not_authorized, | ||
| _window_4, | ||
| NONE,// allow all controllers | ||
| (uint16)NONE,// allow all controllers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was throwing a warning that prevented compilation at one point, I am not sure why it's not throwing the warning anymore will revert.
| @@ -1,11 +1,14 @@ | |||
| #pragma once | |||
| #include "game_variant.h" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this include
| #pragma once | ||
|
|
||
| #define k_game_engine_oddball_maximum_balls 3 | ||
| #define k_multiplayer_variant_headhunter_parameter_count 7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put these into a private enum and add constants section comment
| #pragma once | ||
| #include "saved_games/player_profile.h" | ||
| #include "memory/bitstream.h" | ||
| #include "saved_games/game_variant.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove these two added includes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bitstream include cannot be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it can.
Ex. class c_bitstream* packet, struct s_game_variant* variant
|
|
||
| /* const */ | ||
|
|
||
| const static wchar_t* g_multiplayer_variant_interface_bool_value_strings[k_language_count][2] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These need to move to the cpp
| class c_entity_update_encode_helper | ||
| { | ||
| private: | ||
| c_bitstream* m_bitstream; | ||
| uint32 m_update_component_first_index; | ||
| uint32 m_update_component_count; | ||
| uint32 m_update_mask; | ||
| uint32 m_update_considered_mask; | ||
| uint32 m_update_written_mask; | ||
| uint32 m_update_skipped_mask; | ||
| uint32 m_update_overflowed_mask; | ||
| bool m_able_to_write_update; | ||
| uint32 m_current_update_component_index; | ||
| const char* m_block_name; | ||
| uint32 m_required_leave_space_bits; | ||
| uint32 m_current_leave_space_bits; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some types should be signed, this is halo 3s
class c_entity_update_encode_helper
{
private:
c_bitstream* m_bitstream;
int32 m_update_component_first_index;
int32 m_update_component_count;
uint32 m_update_mask;
uint32 m_update_considered_mask;
uint32 m_update_written_mask;
uint32 m_update_skipped_mask;
uint32 m_update_overflowed_mask;
bool m_able_to_write_update;
uint32 m_current_update_component_index;
const char* m_current_update_component_name;
int32 m_required_leave_space_bits;
int32 m_current_leave_space_bits;
};
detailed commit history for all changes in initial commit view
https://github.com/Kantanomo/cartographer/tree/game-engine-3