diff --git a/source-code/source/plugins/TLAC/Components/Drawing.h b/source-code/source/plugins/TLAC/Components/Drawing.h index 342800c..d651c3a 100644 --- a/source-code/source/plugins/TLAC/Components/Drawing.h +++ b/source-code/source/plugins/TLAC/Components/Drawing.h @@ -248,9 +248,10 @@ namespace TLAC::Components }; // draw an aet layer (with all settings) - int createAetLayer(int32_t unk1, uint32_t drawLayer, createAetFlags flags, const char* name, const Point* loc, int32_t unk2, const char* animation, const char* animation2, float animationInTime, float animationOutTime, const Point* scale, int32_t unk5) + // aetSpeedCallback is actually a pointer to a class or struct with the callback address at offset +0x8 + int createAetLayer(int32_t unk1, uint32_t drawLayer, createAetFlags flags, const char* name, const Point* loc, int32_t unk2, const char* animation, const char* animation2, float animationInTime, float animationOutTime, const Point* scale, const void* aetSpeedCallback) { - return ((int(*)(int32_t, uint32_t, createAetFlags, const char*, const Point*, int32_t, const char*, const char*, float, float, const Point*, int32_t))0x14013be60)(unk1, drawLayer, flags, name, loc, unk2, animation, animation2, animationInTime, animationOutTime, scale, unk5); + return ((int(*)(int32_t, uint32_t, createAetFlags, const char*, const Point*, int32_t, const char*, const char*, float, float, const Point*, const void*))0x14013be60)(unk1, drawLayer, flags, name, loc, unk2, animation, animation2, animationInTime, animationOutTime, scale, aetSpeedCallback); } // draw an aet layer (with animation timing override) int createAetLayer(uint32_t drawLayer, createAetFlags flags, const char* name, const Point* loc, float animationInTime, float animationOutTime) diff --git a/source-code/source/plugins/TLAC/Components/Pause.cpp b/source-code/source/plugins/TLAC/Components/Pause.cpp index 74bfa82..b554b70 100644 --- a/source-code/source/plugins/TLAC/Components/Pause.cpp +++ b/source-code/source/plugins/TLAC/Components/Pause.cpp @@ -327,47 +327,35 @@ namespace TLAC::Components fontInfo.setSize(18, 18); dtParams.originLoc = { 32, 720 - 40 }; dtParams.currentLoc = dtParams.originLoc; - //const float spriteSize = 18; - //const float halfSpriteSize = spriteSize / 2; - //Point spriteLoc = { 0, dtParams.originLoc.y + halfSpriteSize }; - //Point spriteScale = { spriteSize / 64, spriteSize / 64 }; // just approximated + const float spriteSize = 18; + const float halfSpriteSize = spriteSize / 2; + Point spriteLoc = { 0, dtParams.originLoc.y + halfSpriteSize }; + const Point spriteScale = { spriteSize / 64, spriteSize / 64 }; // just approximated dtParams.colour = 0xffffffff; drawTextW(&dtParams, (drawTextFlags)(DRAWTEXT_ENABLE_LAYOUT), L"L/R:Move "); if (curMenuSet != MENUSET_MAIN) { - //spriteLoc.x = dtParams.originLoc.x + halfSpriteSize; - //triangleAet = createAetLayer(3, 0x19, CREATEAET_20000, "button_sankaku", &spriteLoc, 0, nullptr, nullptr, 0, 0, &spriteScale, 0); - //dtParams.originLoc.x += spriteSize; - dtParams.colour = 0xff80ff40; - drawTextW(&dtParams, (drawTextFlags)(DRAWTEXT_ENABLE_LAYOUT), L"△"); - dtParams.colour = 0xffffffff; + spriteLoc.x = dtParams.originLoc.x + halfSpriteSize; + triangleAet = createAetLayer(3, 0x19, CREATEAET_20000, "button_sankaku", &spriteLoc, 0, nullptr, nullptr, 0, 0, &spriteScale, nullptr); + dtParams.originLoc.x += spriteSize; drawTextW(&dtParams, (drawTextFlags)(DRAWTEXT_ENABLE_LAYOUT), L":Back "); } - //spriteLoc.x = dtParams.originLoc.x + halfSpriteSize; - //squareAet = createAetLayer(3, 0x19, CREATEAET_20000, "button_shikaku", &spriteLoc, 0, nullptr, nullptr, 0, 0, &spriteScale, 0); - //dtParams.originLoc.x += spriteSize; - dtParams.colour = 0xffc080ff; - drawTextW(&dtParams, (drawTextFlags)(DRAWTEXT_ENABLE_LAYOUT), L"□"); - dtParams.colour = 0xffffffff; + spriteLoc.x = dtParams.originLoc.x + halfSpriteSize; + squareAet = createAetLayer(3, 0x19, CREATEAET_20000, "button_shikaku", &spriteLoc, 0, nullptr, nullptr, 0, 0, &spriteScale, nullptr); + dtParams.originLoc.x += spriteSize; drawTextW(&dtParams, (drawTextFlags)(DRAWTEXT_ENABLE_LAYOUT), L":Hide Menu "); - //spriteLoc.x = dtParams.originLoc.x + halfSpriteSize; - //crossAet = createAetLayer(3, 0x19, CREATEAET_20000, "button_batsu", &spriteLoc, 0, nullptr, nullptr, 0, 0, &spriteScale, 0); - //dtParams.originLoc.x += spriteSize; - dtParams.colour = 0xffff8040; - drawTextW(&dtParams, (drawTextFlags)(DRAWTEXT_ENABLE_LAYOUT), L"×"); - dtParams.colour = 0xffffffff; + spriteLoc.x = dtParams.originLoc.x + halfSpriteSize; + crossAet = createAetLayer(3, 0x19, CREATEAET_20000, "button_batsu", &spriteLoc, 0, nullptr, nullptr, 0, 0, &spriteScale, nullptr); + dtParams.originLoc.x += spriteSize; drawTextW(&dtParams, (drawTextFlags)(DRAWTEXT_ENABLE_LAYOUT), L":Close "); - //spriteLoc.x = dtParams.originLoc.x + halfSpriteSize; - //circleAet = createAetLayer(3, 0x19, CREATEAET_20000, "button_maru", &spriteLoc, 0, nullptr, nullptr, 0, 0, &spriteScale, 0); - //dtParams.originLoc.x += spriteSize; - dtParams.colour = 0xff6040ff; - drawTextW(&dtParams, (drawTextFlags)(DRAWTEXT_ENABLE_LAYOUT), L"○"); - dtParams.colour = 0xffffffff; + spriteLoc.x = dtParams.originLoc.x + halfSpriteSize; + circleAet = createAetLayer(3, 0x19, CREATEAET_20000, "button_maru", &spriteLoc, 0, nullptr, nullptr, 0, 0, &spriteScale, nullptr); + dtParams.originLoc.x += spriteSize; drawTextW(&dtParams, (drawTextFlags)(DRAWTEXT_ENABLE_LAYOUT), L":Select"); } }