tibia-client/src/otclient/core/game.h

39 lines
810 B
C
Raw Normal View History

2011-08-15 16:11:24 +02:00
#ifndef GAME_H
#define GAME_H
2011-08-15 23:02:52 +02:00
#include "declarations.h"
#include <otclient/net/declarations.h>
2011-08-15 16:11:24 +02:00
class Game
{
public:
2011-08-16 02:30:31 +02:00
void init();
void terminate();
void loginWorld(const std::string& account,
const std::string& password,
2011-08-26 20:00:22 +02:00
const std::string& worldHost, int worldPort,
2011-08-16 02:30:31 +02:00
const std::string& characterName);
void logout();
2011-08-15 16:11:24 +02:00
2011-08-15 23:02:52 +02:00
void onLogin();
void onLogout();
void walk(Direction direction);
void turn(Direction direction);
2011-08-15 23:02:52 +02:00
bool isOnline() { return m_online; }
2011-08-15 16:11:24 +02:00
2011-08-15 23:02:52 +02:00
LocalPlayerPtr getLocalPlayer() { return m_localPlayer; }
2011-08-16 02:30:31 +02:00
ProtocolGamePtr getProtocolGame() { return m_protocolGame; }
2011-08-15 16:11:24 +02:00
private:
2011-08-15 23:02:52 +02:00
LocalPlayerPtr m_localPlayer;
2011-08-15 16:11:24 +02:00
ProtocolGamePtr m_protocolGame;
bool m_online;
};
extern Game g_game;
2011-08-15 23:02:52 +02:00
#endif