diff --git a/max.cpp b/max.cpp index c70aced..5ca9e55 100644 --- a/max.cpp +++ b/max.cpp @@ -626,6 +626,10 @@ uint8_t *Max::portals() { return (uint8_t *)(slot() + 0x418 + 0x223); } uint8_t *Max::shards() { return (uint8_t *)(slot() + 0x418 + 0x1F4 + 0xa); } +uint16_t *Max::progress() { return (uint16_t *)(slot() + 0x418 + 0x21c); } + +uint8_t *Max::manticore() { return (uint8_t *)(slot() + 0x418 + 0x1F0); } + Pause *Max::pause() { return (Pause *)((*(size_t *)get_address("slots") + 0x93608)); }; diff --git a/max.h b/max.h index d27ae72..b92abb7 100644 --- a/max.h +++ b/max.h @@ -262,6 +262,8 @@ struct Max { uint16_t *squirrels(); uint8_t *portals(); uint8_t *shards(); + uint16_t *progress(); + uint8_t *manticore(); Pause *pause(); uint32_t *timer(); void save_game(); diff --git a/ui.cpp b/ui.cpp index 2a91882..2f4cd5d 100644 --- a/ui.cpp +++ b/ui.cpp @@ -26,7 +26,7 @@ const char s8_zero = 0, s8_one = 1, s8_fifty = 50, s8_min = -128, s8_max = 127; const ImU8 u8_zero = 0, u8_one = 1, u8_fifty = 50, u8_min = 0, u8_max = 255, - u8_five = 5; + u8_five = 5, u8_two = 2; const short s16_zero = 0, s16_one = 1, s16_fifty = 50, s16_min = -32768, s16_max = 32767; const ImU16 u16_zero = 0, u16_one = 1, u16_fifty = 50, u16_min = 0, @@ -221,6 +221,10 @@ std::array asset_type_names{ "Text", "Binary", "PNG", "Ogg", "4", "Sprite", "6", "Shader", "Font", }; +std::array progress_names{ + "Game Started", "Unknown", "Ready to hatch", "Show HP", "Drop House Key", +}; + const std::map notes{ {"A4", (PLAYER_INPUT)(PLAYER_INPUT::RIGHT | PLAYER_INPUT::LB)}, {"A#4", @@ -655,6 +659,19 @@ void UI::DrawPlayer() { } } } + { + bool all = *Max::get().manticore() == 2 && *(Max::get().manticore() + 1); + if (ImGui::Checkbox("Tame both manticores##TameAllManticores2", &all) || + everything) { + if (everything || all) { + *Max::get().manticore() = 2; + *(Max::get().manticore() + 1) = 2; + } else { + *Max::get().manticore() = 0; + *(Max::get().manticore() + 1) = 0; + } + } + } { bool all = (*Max::get().portals() & 0xfe) == 0xfe; if (ImGui::Checkbox("Unlock all portals##UnlockAllPortals2", &all) || @@ -820,6 +837,12 @@ void UI::DrawPlayer() { } ImGui::PopID(); } + if (ImGui::CollapsingHeader("Progress##PlayerProgress")) { + ImGui::PushID("PlayerSectionProgress"); + DebugPtr(Max::get().progress()); + Flags(progress_names, Max::get().progress()); + ImGui::PopID(); + } if (ImGui::CollapsingHeader("Eggs##PlayerEggs")) { ImGui::PushID("PlayerSectionEggs"); DebugPtr(Max::get().eggs()); @@ -1024,6 +1047,25 @@ void UI::DrawPlayer() { } ImGui::PopID(); } + if (ImGui::CollapsingHeader("Manticores##PlayerManticores")) { + ImGui::PushID("PlayerSectionManticores"); + DebugPtr(Max::get().manticore()); + bool all = *Max::get().manticore() == 2 && *(Max::get().manticore() + 1); + if (ImGui::Checkbox("Tame both manticores##TameAllManticores", &all)) { + if (all) { + *Max::get().manticore() = 2; + *(Max::get().manticore() + 1) = 2; + } else { + *Max::get().manticore() = 0; + *(Max::get().manticore() + 1) = 0; + } + } + ImGui::SliderScalar("Blue##BlueManticoreSlider", ImGuiDataType_U8, + Max::get().manticore(), &u8_zero, &u8_two); + ImGui::SliderScalar("Red##RedManticoreSlider", ImGuiDataType_U8, + Max::get().manticore() + 1, &u8_zero, &u8_two); + ImGui::PopID(); + } if (ImGui::CollapsingHeader("Animal head portals##PlayerPortals")) { ImGui::PushID("PlayerSectionPortals"); DebugPtr(Max::get().portals()); @@ -2644,7 +2686,7 @@ void UI::Cheats() { *(Max::get().player_hp() + 1) = 4; *Max::get().keys() = 9; *(Max::get().keys() + 1) = 9; - *(Max::get().keys() + 2) = 255; + *(Max::get().keys() + 2) = 6; } }