Skip to content

Conversation

@Kantanomo
Copy link
Collaborator

@Kantanomo Kantanomo commented Jul 26, 2025

detailed commit history for all changes in initial commit view

https://github.com/Kantanomo/cartographer/tree/game-engine-3

{

variant->variant_game_engine_index = _game_engine_type_headhunter;
variant->game_engine_flags.set_unsafe(variant->game_engine_flags.get_unsafe() & ~0xFFEu | 0xFFA);
Copy link
Contributor

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

Copy link
Collaborator Author

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
Copy link
Collaborator

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

Copy link
Collaborator Author

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.


/* constants */

constexpr real_point2d k_observer_default_cross_hair_position{ {0.f, 0.138f} };
Copy link
Collaborator

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

Copy link
Collaborator Author

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.

Copy link
Collaborator

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"
Copy link
Collaborator

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

}
}

void weapons_apply_patches()
Copy link
Collaborator

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);
Copy link
Collaborator

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()
Copy link
Collaborator

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"
Copy link
Collaborator

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Collaborator Author

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"
Copy link
Collaborator

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
Copy link
Collaborator

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"
Copy link
Collaborator

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

Copy link
Collaborator Author

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

Copy link
Collaborator

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] =
Copy link
Collaborator

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

Comment on lines +4 to +19
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;
Copy link

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;
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants