From f09d248f7dbede4497b8e3e1bc991e557d16562f Mon Sep 17 00:00:00 2001 From: user95401 Date: Sun, 14 Apr 2024 13:51:25 +0400 Subject: [PATCH] asdas --- _Headers/Header1.hpp | 1 + _Src/controllers.cpp | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/_Headers/Header1.hpp b/_Headers/Header1.hpp index 54faa8e..8a04a80 100644 --- a/_Headers/Header1.hpp +++ b/_Headers/Header1.hpp @@ -1,6 +1,7 @@ #pragma once #include #include +#include "SimpleIni.h" std::string FilePathFromModFolder(std::string fname); GJGameLevel* processOutLevelByConfig(int id, GJGameLevel* pGJGameLevel); std::string saveToMainLevel(int id, GJGameLevel* pGJGameLevel); diff --git a/_Src/controllers.cpp b/_Src/controllers.cpp index 571d77f..0d3650f 100644 --- a/_Src/controllers.cpp +++ b/_Src/controllers.cpp @@ -3,10 +3,6 @@ using namespace geode::prelude; #include "Header1.hpp" -#include "SimpleIni.h" - -#include - void WriteProcMem(uintptr_t address, ByteVector const& data) { for (auto catgirl : Mod::get()->getPatches()) { if (catgirl and catgirl->getAddress() == address) { @@ -102,7 +98,8 @@ void UpdatePagesSetup() { //.text:003EBDA4 BNE loc_3EBD88 //.text : 003EBDA6 MOV.W R10, #3 //WriteProcMem(geode::base::get() + 0x3ebda2, { 0xba, 0xf1, (uint8_t)cmp_amount }); - WriteProcMem(geode::addresser::getNonVirtual(geode::modifier::AsStaticFunction_init()) + 0x2e2, { 0xba, 0xf1, (uint8_t)cmp_amount }); + auto addr = geode::addresser::getNonVirtual(geode::modifier::Resolve::func(&LevelSelectLayer::init)) + 0x2e2; + WriteProcMem(addr, { 0xba, 0xf1, (uint8_t)cmp_amount }); #endif }