Skip to content

Commit

Permalink
Merge pull request #757 from Berthalamew/development
Browse files Browse the repository at this point in the history
update cartographer account manager
  • Loading branch information
Berthalamew authored Dec 6, 2024
2 parents e7eba69 + c681484 commit 7a8032e
Show file tree
Hide file tree
Showing 49 changed files with 412 additions and 391 deletions.
4 changes: 2 additions & 2 deletions xlive/Blam/Engine/animations/animation_definitions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ int16 c_model_animation::find_first_key_of_type(const e_frame_event_type event_t
return result;
}

int16 c_model_animation::find_first_sound_event(int32* sound) const
int16 c_model_animation::find_first_sound_event(int16* sound) const
{
int16 frame = 0;
if (this->sound_events.count > 0)
Expand Down Expand Up @@ -252,7 +252,7 @@ size_t c_model_animation::get_sound_events_size(void) const

int16 c_model_animation::get_sound_reference_index(void) const
{
int32 sound = NONE;
int16 sound = NONE;
this->find_first_sound_event(&sound);
return sound;
}
Expand Down
2 changes: 1 addition & 1 deletion xlive/Blam/Engine/animations/animation_definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ class c_model_animation
public:
bool animation_is_world_relative(void) const;
int16 find_first_key_of_type(const e_frame_event_type event_type) const;
int16 find_first_sound_event(int32* sound) const;
int16 find_first_sound_event(int16* sound) const;
int16 find_next_key_of_type(const e_frame_event_type event_type, const int32 frame) const;
e_animation_type get_animation_type(void) const;
real32 get_authored_duration(void) const;
Expand Down
6 changes: 2 additions & 4 deletions xlive/Blam/Engine/game/player_vibration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,9 @@ void __cdecl vibration_update(real32 dt)
}
}

for (uint32 controller_index = 0; controller_index < NUMBEROF(controller_vibration_states); ++controller_index)
for (int16 controller_index = 0; controller_index < NUMBEROF(controller_vibration_states); ++controller_index)
{
const XINPUT_VIBRATION state = controller_vibration_states[controller_index];

input_set_gamepad_rumbler_state(controller_index, state.wLeftMotorSpeed, state.wRightMotorSpeed);
input_set_gamepad_rumbler_state(controller_index, controller_vibration_states[controller_index].wLeftMotorSpeed, controller_vibration_states[controller_index].wRightMotorSpeed);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions xlive/Blam/Engine/interface/interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ void render_splitscreen_line(void)
ASSERT(IN_RANGE(player_window_count, 1, 4));

const s_rasterizer_globals* rasterizer_globals = rasterizer_globals_get();
const int32 resolution_x = rasterizer_globals->resolution_x;
const int32 resolution_y = rasterizer_globals->resolution_y;
const int16 resolution_x = (int16)rasterizer_globals->resolution_x;
const int16 resolution_y = (int16)rasterizer_globals->resolution_y;

// We calculate the size of the line by dividing our resolution by the height the original game ran at
const int32 line_size = resolution_y / 480;
Expand Down
4 changes: 2 additions & 2 deletions xlive/Blam/Engine/interface/new_hud_draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -797,9 +797,9 @@ datum hud_bitmap_tag_index_get(void)
return *Memory::GetAddress<datum*>(0x976678);
}

int32 hud_bitmap_data_index_get(void)
int16 hud_bitmap_data_index_get(void)
{
return *Memory::GetAddress<int32*>(0x97667C);
return *Memory::GetAddress<int16*>(0x97667C);
}

void hud_player_indicators_draw_enabled_set(int32 user_index, bool enabled)
Expand Down
2 changes: 1 addition & 1 deletion xlive/Blam/Engine/interface/new_hud_draw.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ void hud_draw_on_map_load(void);

datum hud_bitmap_tag_index_get(void);

int32 hud_bitmap_data_index_get(void);
int16 hud_bitmap_data_index_get(void);

void hud_player_indicators_draw_enabled_set(int32 user_index, bool enabled);

Expand Down
4 changes: 2 additions & 2 deletions xlive/Blam/Engine/interface/screens/screen_4way_signin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ void c_screen_4way_signin::initialize(s_screen_parameters* parameters)
user_interface_squad_clear_match_playlist();
}

void* c_screen_4way_signin::load_proc()
const void* c_screen_4way_signin::load_proc(void) const
{
switch (this->m_call_context)
{
Expand All @@ -403,7 +403,7 @@ void* c_screen_4way_signin::load_proc()
default:
DISPLAY_ASSERT("unreachable");
}
return nullptr;
return NULL;
}

bool __cdecl user_interface_mainmenu_sign_out_controller_callback(e_controller_index controller_index)
Expand Down
2 changes: 1 addition & 1 deletion xlive/Blam/Engine/interface/screens/screen_4way_signin.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ class c_screen_4way_signin : protected c_screen_widget
virtual void update() override;
virtual bool handle_event(s_event_record* event) override;
virtual void initialize(s_screen_parameters* parameters) override;
virtual void* load_proc() override;
virtual const void* load_proc(void) const override;
};
ASSERT_STRUCT_SIZE(c_screen_4way_signin, 0xA60);
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#include "stdafx.h"

#include "screen_brightness_menu.h"

#include "interface/user_interface_memory.h"

/*
Re-implementation of default brightness menu
Now with the abillity to override base class functions
Expand Down
13 changes: 8 additions & 5 deletions xlive/Blam/Engine/interface/screens/screen_brightness_menu.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#pragma once

#include "interface/user_interface_headers.h"
#include "interface/user_interface_widget.h"
#include "interface/user_interface_widget_list.h"
#include "interface/user_interface_widget_list_item.h"
#include "interface/user_interface_widget_window.h"

class c_brightness_level_edit_list : public c_list_widget
{
Expand Down Expand Up @@ -257,9 +260,9 @@ class c_brightness_menu : protected c_screen_with_menu
INVOKE_VFPTR_FN(_get_vfptr_table, 37, void(class_type::**)(s_screen_state*), state);
}

virtual void* load_proc() override
virtual const void* load_proc(void) const override
{
return INVOKE_VFPTR_FN(_get_vfptr_table, 38, void*(class_type::**)());
return INVOKE_VFPTR_FN(_get_vfptr_table, 38, const void*(class_type::**)() const);
}

virtual bool overlay_effect_is_disabled() override
Expand All @@ -279,9 +282,9 @@ class c_brightness_menu : protected c_screen_with_menu
private:
// reserved name
template<typename T>
static T _get_vfptr_table(DWORD idx)
static const T _get_vfptr_table(DWORD idx)
{
return reinterpret_cast<T>(&Memory::GetAddress<void**>(0x4D7ABC)[idx]);
return reinterpret_cast<const T>(&Memory::GetAddress<const void**>(0x4D7ABC)[idx]);
}
};

Expand Down
Loading

0 comments on commit 7a8032e

Please sign in to comment.