From c5fc05df506d2aef1c0f3fbdfabf4036dcecefcc Mon Sep 17 00:00:00 2001 From: Neo Date: Mon, 30 May 2022 16:15:40 +0100 Subject: [PATCH] Band aid fix for log --- build.bat | 2 +- src/Config.h | 2 +- src/MagiaClient.cpp | 14 ++++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/build.bat b/build.bat index e7d1317..379a853 100644 --- a/build.bat +++ b/build.bat @@ -48,7 +48,7 @@ REM call copy /Y "%~dp0\patches\images\story_ui_sprites00_patch.png" "%~dp0\buil call copy /Y "%~dp0\patches\koruri-semibold.ttf" "%~dp0\build\app\assets\fonts\koruri-semibold.ttf" echo Updating sprites and AndroidManifest.xml... -call python buildassets.py +call python3 buildassets.py :build echo Copying new smali files... diff --git a/src/Config.h b/src/Config.h index b01c743..5ffe387 100644 --- a/src/Config.h +++ b/src/Config.h @@ -7,6 +7,6 @@ /************************** * Magia Translate Ver * **************************/ -#define MT_VERSION 116 +#define MT_VERSION 117 #endif \ No newline at end of file diff --git a/src/MagiaClient.cpp b/src/MagiaClient.cpp index 67c170e..0bd2242 100644 --- a/src/MagiaClient.cpp +++ b/src/MagiaClient.cpp @@ -317,24 +317,26 @@ void *setPositionNew(uintptr_t label, cocos2d::Vec2 const& position) { // History if (storyLogUnitAddMessageOffset != 0 && addr >= storyLogUnitAddMessageOffset) { uintptr_t difference = addr - storyLogUnitAddMessageOffset; - //LOGI("LOG MESSAGE: %.2f %.2f", position.x, position.y); - //LOGI("Difference: %p", (void *)difference); - if (position.y >= 55.50 && position.y <= 56.50 && difference <= 0x800) { + LOGD("LOG MESSAGE: %.2f %.2f", position.x, position.y); + LOGD("Difference: %p", (void *)difference); + //if (position.y >= 55.50 && position.y <= 56.50 && difference <= 0x1000) { + if (position.y >= 37.5 && position.y <= 39.5 && difference <= 0x1000) { float newPosX = position.x + 125.0; - //LOGD("Moved log text from %.2f to %.2f", position.x, newPosX); + LOGD("Moved log text from %.2f to %.2f", position.x, newPosX); cocos2d::Vec2 newPosition = cocos2d::Vec2(newPosX, 66.50); return setPositionHooked(label, newPosition); } else if (difference <= 0x200 && position.x == 70.00) { LOGD("Moving left-aligned name down in the log."); - auto newY = position.y - 15.0; + auto newY = position.y; cocos2d::Vec2 newPosition = cocos2d::Vec2(position.x, newY); return setPositionHooked(label, newPosition); } else if (difference <= 0x200 && position.x == 500.00) { // Names on the right LOGD("Moving name further to the right in log."); auto newX = position.x + 200; - auto newY = position.y - 15.0; + //auto newY = position.y - 15.0; + auto newY = position.y; cocos2d::Vec2 newPosition = cocos2d::Vec2(newX, newY); return setPositionHooked(label, newPosition); }