pause: move entire UI to in-engine sprites, make give up work, DrawText.h->Drawing.h, make framespeed modification robust
(code's still a mess tho)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#pragma once
|
||||
#include "../Constants.h"
|
||||
#include "EmulatorComponent.h"
|
||||
#include <vector>
|
||||
|
||||
@@ -16,31 +17,39 @@ namespace TLAC::Components
|
||||
virtual void Update() override;
|
||||
virtual void UpdatePostInput() override;
|
||||
virtual void UpdateDrawSprites() override;
|
||||
virtual void UpdatePostDraw() override;
|
||||
|
||||
static bool isPaused;
|
||||
static bool giveUp;
|
||||
static void setPaused(bool pause);
|
||||
private:
|
||||
// this is a mess of static so that menuItems can work
|
||||
static bool isPauseKeyTapped();
|
||||
static bool isUnpauseKeyTapped();
|
||||
static void setPaused(bool pause);
|
||||
static std::vector<bool> streamPlayStates;
|
||||
static void InjectCode(void* address, const std::vector<uint8_t> data);
|
||||
|
||||
static std::vector<uint8_t> origAetMovOp;
|
||||
static constexpr uint8_t* aetMovPatchAddress = (uint8_t*)0x1401703b3;
|
||||
|
||||
static std::vector<uint8_t> origFramespeedOp;
|
||||
static constexpr uint8_t* framespeedPatchAddress = (uint8_t*)0x140192D50;
|
||||
|
||||
static bool hookedGiveUpFunc(void* cls);
|
||||
|
||||
static const int menuX = 640;
|
||||
static const int menuY = 360;
|
||||
static const int menuItemHeight = 36;
|
||||
static const int menuTextSize = 24;
|
||||
|
||||
bool showUI = true;
|
||||
unsigned int menuPos = 0;
|
||||
static bool showUI;
|
||||
static unsigned int menuPos;
|
||||
|
||||
static void unpause() { setPaused(false); };
|
||||
static void giveup() { giveUp = true; };
|
||||
|
||||
std::vector<std::pair<std::string, void(*)()>> menuItems = {
|
||||
std::pair<std::string, void(*)()>(std::string("RESUME"), &unpause),
|
||||
//std::pair<std::string, void(*)()>(std::string("GIVE UP"), &unpause),
|
||||
std::pair<std::string, void(*)()>(std::string("GIVE UP"), &giveup),
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user