Skip to content

Commit

Permalink
Merge branch 'master' into csharp-api
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Sep 19, 2024
2 parents 331022b + 870f190 commit be798d9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/mods/Graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,20 @@ bool Graphics::on_pre_gui_draw_element(REComponent* gui_element, void* primitive
auto game_object = utility::re_component::get_game_object(gui_element);
static auto letter_box_behavior_t = sdk::find_type_definition("app.LetterBoxBehavior");
static auto letter_box_behavior_retype = letter_box_behavior_t != nullptr ? letter_box_behavior_t->get_type() : nullptr;
static auto csmaskui_t = sdk::find_type_definition("app.solid.gui.CSMaskUI");
static auto csmaskui_retype = csmaskui_t != nullptr ? csmaskui_t->get_type() : nullptr;

if (game_object != nullptr && game_object->transform != nullptr) {
// Ultrawide for Dead Rising Deluxe Remaster
if (csmaskui_retype != nullptr) {
auto csmaskui = utility::re_component::find<REComponent*>(game_object->transform, csmaskui_retype);

if (csmaskui != nullptr) {
game_object->shouldDraw = false;
return false;
}
}

const auto name = utility::re_string::get_string(game_object->name);
const auto name_hash = utility::hash(name);

Expand Down
8 changes: 8 additions & 0 deletions src/mods/Graphics.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,15 @@ class Graphics : public Mod {

const ModToggle::Ptr m_ultrawide_fix{ ModToggle::create(generate_name("UltrawideFix"), false) };
const ModToggle::Ptr m_ultrawide_vertical_fov{ ModToggle::create(generate_name("UltrawideFixVerticalFOV_V2"), false) };

// There is a trend with newer games where there actually is Ultrawide support, so we don't want to actually touch the FOV by default
// And sometimes messing with the FOV causes permanent issues with the UI, so don't touch it by default
#if TDB_VER >= 73
const ModToggle::Ptr m_ultrawide_custom_fov{ModToggle::create(generate_name("UltrawideCustomFOV"), true)};
#else
const ModToggle::Ptr m_ultrawide_custom_fov{ModToggle::create(generate_name("UltrawideCustomFOV"), false)};
#endif

const ModToggle::Ptr m_ultrawide_constrain_ui{ModToggle::create(generate_name("UltrawideConstrainUI"), false)};
const ModToggle::Ptr m_ultrawide_constrain_child_ui{ModToggle::create(generate_name("UltrawideConstrainChildUI"), false)};
const ModSlider::Ptr m_ultrawide_fov_multiplier{ ModSlider::create(generate_name("UltrawideFOVMultiplier_V2"), 0.01f, 3.0f, 1.0f) };
Expand Down
5 changes: 5 additions & 0 deletions src/mods/IntegrityCheckBypass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,11 @@ void IntegrityCheckBypass::disable_update_timers(std::string_view name) const {
void IntegrityCheckBypass::ignore_application_entries() {
Hooks::get()->ignore_application_entry(0x76b8100bec7c12c3);
Hooks::get()->ignore_application_entry(0x9f63c0fc4eea6626);

#if TDB_VER >= 73
Hooks::get()->ignore_application_entry(0x00c0ab9309584734);
Hooks::get()->ignore_application_entry(0xa474f1d3a294e6a4);
#endif
}

void IntegrityCheckBypass::immediate_patch_re8() {
Expand Down

0 comments on commit be798d9

Please sign in to comment.