mirror of
https://github.com/edubart/otclient.git
synced 2025-10-19 14:03:26 +02:00
ahn?
This commit is contained in:
@@ -22,8 +22,9 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "configs.h"
|
||||
#include "resources.h"
|
||||
#include <prerequisites.h>
|
||||
#include <core/configs.h>
|
||||
#include <core/resources.h>
|
||||
|
||||
Configs g_configs;
|
||||
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#ifndef CONFIGS_H
|
||||
#define CONFIGS_H
|
||||
|
||||
#include "prerequisites.h"
|
||||
#include <prerequisites.h>
|
||||
|
||||
class Configs
|
||||
{
|
||||
|
@@ -22,9 +22,9 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "dispatcher.h"
|
||||
#include "platform.h"
|
||||
#include "engine.h"
|
||||
#include <prerequisites.h>
|
||||
#include <core/dispatcher.h>
|
||||
#include <core/engine.h>
|
||||
|
||||
Dispatcher g_dispatcher;
|
||||
|
||||
@@ -32,7 +32,7 @@ void Dispatcher::poll()
|
||||
{
|
||||
while(!m_taskList.empty()) {
|
||||
Task *task = m_taskList.top();
|
||||
if(g_engine.getLastFrameTicks() < task->ticks)
|
||||
if(g_engine.getCurrentFrameTicks() < task->ticks)
|
||||
break;
|
||||
|
||||
task->callback();
|
||||
@@ -43,7 +43,7 @@ void Dispatcher::poll()
|
||||
|
||||
void Dispatcher::scheduleTask(const Callback& callback, int delay)
|
||||
{
|
||||
m_taskList.push(new Task(Platform::getTicks() + delay, callback));
|
||||
m_taskList.push(new Task(g_engine.getCurrentFrameTicks() + delay, callback));
|
||||
}
|
||||
|
||||
void Dispatcher::addTask(const Callback& callback)
|
||||
|
@@ -25,9 +25,7 @@
|
||||
#ifndef DISPATCHER_H
|
||||
#define DISPATCHER_H
|
||||
|
||||
#include "prerequisites.h"
|
||||
|
||||
#include <queue>
|
||||
#include <prerequisites.h>
|
||||
|
||||
class Task {
|
||||
public:
|
||||
|
@@ -22,15 +22,14 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "engine.h"
|
||||
#include "graphics/fonts.h"
|
||||
#include "platform.h"
|
||||
#include "graphics/graphics.h"
|
||||
#include "configs.h"
|
||||
#include "dispatcher.h"
|
||||
#include "net/connections.h"
|
||||
#include "ui/uicontainer.h"
|
||||
#include "graphics/fonts.h"
|
||||
#include <prerequisites.h>
|
||||
#include <core/engine.h>
|
||||
#include <core/platform.h>
|
||||
#include <core/dispatcher.h>
|
||||
#include <graphics/graphics.h>
|
||||
#include <graphics/fonts.h>
|
||||
#include <ui/uicontainer.h>
|
||||
//#include <net/connection.h>
|
||||
|
||||
Engine g_engine;
|
||||
|
||||
@@ -70,7 +69,7 @@ void Engine::run()
|
||||
Platform::poll();
|
||||
|
||||
// poll network events
|
||||
g_connections.poll();
|
||||
//Connection::poll();
|
||||
|
||||
// poll diaptcher tasks
|
||||
g_dispatcher.poll();
|
||||
|
@@ -25,8 +25,8 @@
|
||||
#ifndef ENGINE_H
|
||||
#define ENGINE_H
|
||||
|
||||
#include "prerequisites.h"
|
||||
#include "gamestate.h"
|
||||
#include <prerequisites.h>
|
||||
#include <core/gamestate.h>
|
||||
|
||||
class Engine
|
||||
{
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
/// Enable FPS counter on screen
|
||||
void enableFpsCounter(bool enable = true) { m_calculateFps = enable; };
|
||||
|
||||
int getLastFrameTicks() const { return m_lastFrameTicks; }
|
||||
int getCurrentFrameTicks() const { return m_lastFrameTicks; }
|
||||
|
||||
private:
|
||||
/// Called to render every frame
|
||||
|
@@ -25,8 +25,8 @@
|
||||
#ifndef GAMESTATE_H
|
||||
#define GAMESTATE_H
|
||||
|
||||
#include "prerequisites.h"
|
||||
#include "input.h"
|
||||
#include <prerequisites.h>
|
||||
#include <core/input.h>
|
||||
|
||||
struct InputEvent;
|
||||
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#ifndef INPUT_H
|
||||
#define INPUT_H
|
||||
|
||||
#include "prerequisites.h"
|
||||
#include <prerequisites.h>
|
||||
|
||||
enum EKeyCode {
|
||||
KC_UNKNOWN = 0x00,
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#ifndef PLATFORM_H
|
||||
#define PLATFORM_H
|
||||
|
||||
#include "prerequisites.h"
|
||||
#include <prerequisites.h>
|
||||
|
||||
namespace Platform
|
||||
{
|
||||
|
@@ -22,7 +22,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#include "resources.h"
|
||||
#include <prerequisites.h>
|
||||
#include <core/resources.h>
|
||||
|
||||
#include <physfs.h>
|
||||
|
||||
|
@@ -25,7 +25,7 @@
|
||||
#ifndef RESOURCES_H
|
||||
#define RESOURCES_H
|
||||
|
||||
#include "prerequisites.h"
|
||||
#include <prerequisites.h>
|
||||
|
||||
class Resources
|
||||
{
|
||||
|
Reference in New Issue
Block a user