summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorancarola <raffaele.ancarola@epfl.ch>2019-01-22 01:56:51 +0100
committerancarola <raffaele.ancarola@epfl.ch>2019-01-22 01:56:51 +0100
commit844926711489c4f87c68ceab3ea245161228ad78 (patch)
tree2d983c826131b33a207db83f95e365b044227dad
parentSignal change (diff)
downloadflatland-844926711489c4f87c68ceab3ea245161228ad78.tar.gz
flatland-844926711489c4f87c68ceab3ea245161228ad78.zip
Fin qui tutto bene
-rw-r--r--engine/flatcomponent.cpp4
-rw-r--r--engine/flatland.cpp6
-rw-r--r--engine/flatsurface.cpp6
-rw-r--r--engine/flatwindow.cpp4
-rw-r--r--engine/include/flatbound.h4
-rw-r--r--engine/include/flatcollector.h4
-rw-r--r--engine/include/flatcomponent.h4
-rw-r--r--engine/include/flatevolvable.h4
-rw-r--r--engine/include/flatsurface.h4
-rw-r--r--engine/include/flatwindow.h4
-rw-r--r--engine/include/object.hpp (renamed from engine/include/object.h)0
-rw-r--r--engine/include/serial/focusable.h4
-rw-r--r--engine/include/signal.hpp (renamed from engine/include/signal.h)2
-rw-r--r--engine/include/types.hpp (renamed from engine/include/types.h)2
-rw-r--r--engine/object.cpp2
-rw-r--r--engine/signal.cpp2
16 files changed, 28 insertions, 28 deletions
diff --git a/engine/flatcomponent.cpp b/engine/flatcomponent.cpp
index 33cfbbc..06b558c 100644
--- a/engine/flatcomponent.cpp
+++ b/engine/flatcomponent.cpp
@@ -1,5 +1,5 @@
#include "flatcomponent.h"
-#include "flatsignal.h"
+#include "signal.h"
Component::Component(Component *parent, const std::string& id)
: parent(parent)
@@ -7,7 +7,7 @@ Component::Component(Component *parent, const std::string& id)
// TODO, check flatland initialization
if (id.empty())
- setID(FlatObject::randomID());
+ setID(flat::core::object::randomID());
if (parent == 0)
{
diff --git a/engine/flatland.cpp b/engine/flatland.cpp
index 2f1c920..b53f8e4 100644
--- a/engine/flatland.cpp
+++ b/engine/flatland.cpp
@@ -10,14 +10,14 @@
using namespace std;
#include "flattask.h"
-#include "flatsignal.h"
+#include "signal.h"
#include "flatwindow.h"
#include "flatexception.h"
#include "exceptions/forcequit.h"
float flatland_dt;
-set<FlatObject*> objects;
+set<flat::core::object*> objects;
FlatWindow * window = 0;
SignalChannel * core = 0;
@@ -60,7 +60,7 @@ Uint32 status_to_flags(const flat_status& s)
/* Listen to simple quit calls */
class QuitListener : public FlatListener
{
- virtual void callback(FlatObject*, void*) override
+ virtual void callback(flat::core::object*, void*) override
{
/* Order to quit */
quit_flatland();
diff --git a/engine/flatsurface.cpp b/engine/flatsurface.cpp
index 1970b71..7b1ee5a 100644
--- a/engine/flatsurface.cpp
+++ b/engine/flatsurface.cpp
@@ -6,7 +6,7 @@ using namespace std;
FlatSurface::FlatSurface(const char *filename, Uint32 format, SDL_Surface *parent)
- : FlatObject(), parent(parent), hide(false)
+ : flat::core::object(), parent(parent), hide(false)
{
setID(filename);
@@ -35,7 +35,7 @@ FlatSurface::FlatSurface(const char *filename, Uint32 format, SDL_Surface *paren
FlatSurface::FlatSurface(SDL_Surface *surface, SDL_Surface *parent)
- : FlatObject(), parent(parent), hide(false)
+ : flat::core::object(), parent(parent), hide(false)
{
this->surface = new SDL_Surface(*surface);
@@ -56,7 +56,7 @@ FlatSurface::FlatSurface(SDL_Surface *surface, SDL_Surface *parent)
FlatSurface::FlatSurface(const FlatSurface &sprite)
- : FlatObject(sprite), parent(sprite.parent),
+ : flat::core::object(sprite), parent(sprite.parent),
hide(sprite.hide)
{
offset = new SDL_Rect(*sprite.offset);
diff --git a/engine/flatwindow.cpp b/engine/flatwindow.cpp
index ff17274..2ff99dc 100644
--- a/engine/flatwindow.cpp
+++ b/engine/flatwindow.cpp
@@ -3,7 +3,7 @@
#include <SDL2/SDL.h>
#include <iostream>
#include "flatlayer.h"
-#include "flatsignal.h"
+#include "signal.h"
using namespace std;
@@ -47,7 +47,7 @@ FlatWindow::FlatWindow( int width, int height,
FlatWindow::FlatWindow(const FlatWindow& win)
- : FlatObject(win),
+ : flat::core::object(win),
title(win.title), status(win.status),
sdl_window(0), screen(0)
{
diff --git a/engine/include/flatbound.h b/engine/include/flatbound.h
index a80cd6e..5028acc 100644
--- a/engine/include/flatbound.h
+++ b/engine/include/flatbound.h
@@ -1,12 +1,12 @@
#ifndef __FLATBOUND_H__
#define __FLATBOUND_H__
-#include "flatobject.h"
+#include "object.h"
#include "svector.h"
typedef SVector<int, 2> pixel;
-class FlatBound : virtual public FlatObject
+class FlatBound : virtual public flat::core::object
{
pixel location;
diff --git a/engine/include/flatcollector.h b/engine/include/flatcollector.h
index ed9a824..cef49db 100644
--- a/engine/include/flatcollector.h
+++ b/engine/include/flatcollector.h
@@ -1,10 +1,10 @@
#ifndef __FLATCOLLECTOR_H__
#define __FLATCOLLECTOR_H__
-#include "flatobject.h"
+#include "object.h"
#include <set>
-class FlatCollector : virtual public FlatObject
+class FlatCollector : virtual public flat::core::object
{
FlatCollector * parent;
diff --git a/engine/include/flatcomponent.h b/engine/include/flatcomponent.h
index 8a14d90..9e596bf 100644
--- a/engine/include/flatcomponent.h
+++ b/engine/include/flatcomponent.h
@@ -1,10 +1,10 @@
#ifndef __FLAT_COMPONENT_H__
#define __FLAT_COMPONENT_H__
-#include "flatobject.h"
+#include "object.h"
#include <string>
-class Component : virtual public FlatObject
+class Component : virtual public flat::core::object
{
Component * parent;
diff --git a/engine/include/flatevolvable.h b/engine/include/flatevolvable.h
index 71aaf0f..a9cc102 100644
--- a/engine/include/flatevolvable.h
+++ b/engine/include/flatevolvable.h
@@ -1,11 +1,11 @@
#ifndef __FLATEVOLVABLE_H__
#define __FLATEVOLVABLE_H__
-#include "flatobject.h"
+#include "object.h"
class task_s;
-class FlatEvolvable : virtual public FlatObject
+class FlatEvolvable : virtual public flat::core::object
{
task_s * task;
diff --git a/engine/include/flatsurface.h b/engine/include/flatsurface.h
index bc04385..4c6ee1b 100644
--- a/engine/include/flatsurface.h
+++ b/engine/include/flatsurface.h
@@ -1,10 +1,10 @@
#ifndef __FLATSURFACE_H__
#define __FLATSURFACE_H__
-#include "flatobject.h"
+#include "object.h"
#include <SDL2/SDL.h>
-class FlatSurface : public FlatObject
+class FlatSurface : public flat::core::object
{
SDL_Surface * surface;
SDL_Surface * parent;
diff --git a/engine/include/flatwindow.h b/engine/include/flatwindow.h
index 11d7134..b3734f4 100644
--- a/engine/include/flatwindow.h
+++ b/engine/include/flatwindow.h
@@ -26,7 +26,7 @@ struct window_status
unsigned char focus:1;
};
-#include "flatobject.h"
+#include "object.h"
#include "serial/keyfocusable.h"
class SDL_Window;
@@ -34,7 +34,7 @@ class FlatLayer;
class SDL_KeyEvent;
-class FlatWindow : virtual public FlatObject, public KeyFocusable
+class FlatWindow : virtual public flat::core::object, public KeyFocusable
{
std::string title;
window_status status;
diff --git a/engine/include/object.h b/engine/include/object.hpp
index cb7ef36..cb7ef36 100644
--- a/engine/include/object.h
+++ b/engine/include/object.hpp
diff --git a/engine/include/serial/focusable.h b/engine/include/serial/focusable.h
index 6478ed4..a334e79 100644
--- a/engine/include/serial/focusable.h
+++ b/engine/include/serial/focusable.h
@@ -1,13 +1,13 @@
#ifndef __FOCUSABLE_H__
#define __FOCUSABLE_H__
-#include "flatobject.h"
+#include "object.h"
#include "types.h"
class task_s;
union SDL_Event;
-class Focusable : virtual public FlatObject
+class Focusable : virtual public flat::core::object
{
bool focused;
diff --git a/engine/include/signal.h b/engine/include/signal.hpp
index 0f16726..24d240d 100644
--- a/engine/include/signal.h
+++ b/engine/include/signal.hpp
@@ -6,7 +6,7 @@
#include <initializer_list>
#include "object.hpp"
#include "task.hpp"
-#include "types.h"
+#include "types.hpp"
namespace flat
{
diff --git a/engine/include/types.h b/engine/include/types.hpp
index 9482a46..87c4d26 100644
--- a/engine/include/types.h
+++ b/engine/include/types.hpp
@@ -3,7 +3,7 @@
/* Flatland types */
-class FlatObject;
+class flat::core::object;
class FlatActor;
class FlatSprite;
diff --git a/engine/object.cpp b/engine/object.cpp
index eb74e1a..abaf6cd 100644
--- a/engine/object.cpp
+++ b/engine/object.cpp
@@ -1,4 +1,4 @@
-#include "flatobject.h"
+#include "object.h"
#include <stdlib.h>
diff --git a/engine/signal.cpp b/engine/signal.cpp
index 0a3d887..d20d840 100644
--- a/engine/signal.cpp
+++ b/engine/signal.cpp
@@ -100,7 +100,7 @@ void channel::post_processing(void*)
/* signal class */
-signal::signal(FlatObject *sender, const string& id, void *data, Uint8 priority)
+signal::signal(flat::core::object *sender, const string& id, void *data, Uint8 priority)
: sender(sender), data(data), priority(priority)
{
set_id(id);