Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct e_primary_skull
- {
- enum : __int32
- {
- _iron = 0,
- _black_eye,
- _tough_luck,
- _catch,
- _fog,
- _famine,
- _thunderstorm,
- _tilt,
- _mythic,
- k_number_of_primary_skulls
- } value;
- bool enabled = false;
- const char *GetName()
- {
- const char *names[] {
- "iron",
- "black eye",
- "tough luck",
- "catch",
- "fog",
- "famine",
- "thunderstorm",
- "tilt",
- "mythic"
- };
- return names[value];
- }
- };
- std::vector<e_primary_skull> primary_skulls = {
- { e_primary_skull::_iron, false },
- { e_primary_skull::_black_eye, false },
- { e_primary_skull::_tough_luck, false },
- { e_primary_skull::_catch, false },
- { e_primary_skull::_fog, false },
- { e_primary_skull::_famine, false },
- { e_primary_skull::_thunderstorm, false },
- { e_primary_skull::_tilt, false },
- { e_primary_skull::_mythic, false }
- };
- void primary_skull_toggle_hook(__int16 skull, char enable)
- {
- if (skull < e_primary_skull::k_number_of_primary_skulls)
- primary_skulls[skull].enabled = enable ? true : false;
- }
- bool __cdecl primary_skull_is_active_hook(__int16 skull)
- {
- if (skull < e_primary_skull::k_number_of_primary_skulls)
- return primary_skulls[skull].enabled;
- return false;
- }
- struct e_secondary_skull
- {
- enum : __int32
- {
- _assassin = 0,
- _blind,
- _superman,
- _birthday_party,
- _daddy,
- _third_person,
- _directors_cut,
- k_number_of_secondary_skulls,
- } value;
- bool enabled = false;
- const char *GetName()
- {
- const char *names[] {
- "assassin",
- "blind",
- "superman",
- "birthday party",
- "daddy",
- "third person",
- "directors cut"
- };
- return names[value];
- }
- };
- std::vector<e_secondary_skull> secondary_skulls = {
- { e_secondary_skull::_assassin, false },
- { e_secondary_skull::_blind, false },
- { e_secondary_skull::_superman, false },
- { e_secondary_skull::_birthday_party, false },
- { e_secondary_skull::_daddy, false },
- { e_secondary_skull::_third_person, false },
- { e_secondary_skull::_directors_cut, false }
- };
- void secondary_skull_toggle_hook(__int16 skull, char enable)
- {
- if (skull < e_secondary_skull::k_number_of_secondary_skulls)
- secondary_skulls[skull].enabled = enable ? true : false;
- }
- bool __cdecl secondary_skull_is_active_hook(__int16 skull)
- {
- if (skull < e_secondary_skull::k_number_of_secondary_skulls)
- return secondary_skulls[skull].enabled;
- return false;
- }
- inline void AddMiscHooks()
- {
- AddHook({ 0x132B50 }, &primary_skull_toggle_hook, "primary_skull_toggle");
- AddHook({ 0x132EE0 }, &secondary_skull_toggle_hook, "secondary_skull_toggle");
- AddHook({ 0x20AE20 }, &primary_skull_is_active_hook, "primary_skull_is_active");
- AddHook({ 0x20AE50 }, &secondary_skull_is_active_hook, "secondary_skull_is_active");
- }
Add Comment
Please, Sign In to add comment