1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-22 04:37:46 +00:00
astra/launcher/include/gameparser.h
Joshua Goins 16420b7421 Complete rewrite to Kirigami
Giant commit overhauling the interface to use KDE's Kirigami framework,
which is based on Qt Quick. The logic is all but rewritten, allowing
accounts to be separate from profiles.
2023-07-30 08:49:34 -04:00

35 lines
No EOL
702 B
C++

#pragma once
#include <QImage>
#include <leptonica/allheaders.h>
#include <tesseract/baseapi.h>
enum class ScreenState { Splash, LobbyError, WorldFull, ConnectingToDataCenter, EnteredTitleScreen, InLoginQueue };
struct GameParseResult {
ScreenState state;
int playersInQueue = -1;
};
inline bool operator==(const GameParseResult a, const GameParseResult b)
{
return a.state == b.state && a.playersInQueue == b.playersInQueue;
}
inline bool operator!=(const GameParseResult a, const GameParseResult b)
{
return !(a == b);
}
class GameParser
{
public:
GameParser();
~GameParser();
GameParseResult parseImage(QImage image);
private:
tesseract::TessBaseAPI *api;
};