Skip to content

Commit

Permalink
h2: force making splitscreen works with more than 2 players
Browse files Browse the repository at this point in the history
h3: bit view for unit flag
  • Loading branch information
WinterSquire committed Jul 27, 2024
1 parent 6ec9de4 commit baefba7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/mcc/module/CModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ static struct {
{"splitscreen_patch1", "", OFFSET_HALO2_PF_PLAYER_VALID, "\x31\xC0\xB0\x01\xC3\x90", true},
{"splitscreen_patch2", "", OFFSET_HALO2_PF_PLAYER_COUNT1, "\x04", true},
{"splitscreen_patch3", "", OFFSET_HALO2_PF_PLAYER_COUNT2, "\x04", true},
{"splitscreen_patch4", "force making splitscreen works with more than 2 players", 0x5153E, "\x83\xF8\x01\x74\x04", true},
}}, {Halo3EntrySet(), {
{"splitscreen_patch1", "", OFFSET_HALO3_PF_COOP_JOIN, "\x31\xC0\xC3\x90", true},
{"Remove Black Bar1", "remove black bar", 0x8AD160, "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80\x3F", true},
Expand Down
11 changes: 9 additions & 2 deletions src/render/imgui/game/halo3/context_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ static void print_object(int index) {
)";
const char* unit_format = R"(
Unit:
Flag: %hX
Flag[%hX]: | %hhd %hhd %hhd %hhd | %hhd %hhd %hhd %hhd | %hhd %hhd %hhd %hhd | %hhd %hhd %hhd %hhd |
Actor: %X
Player: %X
Aim Target: %X
Expand Down Expand Up @@ -148,8 +148,15 @@ static void print_object(int index) {
//============================== UNIT ==============================
if (p_unit == nullptr) return;

long flags = p_unit->biped_flags;

sprintf(buffer, unit_format,
p_unit->biped_flags, p_unit->actor_index, p_unit->player_index,
flags,
_bittest(&flags, 0), _bittest(&flags, 1), _bittest(&flags, 2), _bittest(&flags, 3),
_bittest(&flags, 4), _bittest(&flags, 5), _bittest(&flags, 6), _bittest(&flags, 7),
_bittest(&flags, 8), _bittest(&flags, 9), _bittest(&flags, 10), _bittest(&flags, 11),
_bittest(&flags, 12), _bittest(&flags, 13), _bittest(&flags, 14), _bittest(&flags, 15),
p_unit->actor_index, p_unit->player_index,
p_unit->aim_target, p_unit->bump_target, p_unit->bump_close
);

Expand Down

0 comments on commit baefba7

Please sign in to comment.