diff options
-rw-r--r-- | engine/flatland.cpp | 10 | ||||
-rw-r--r-- | engine/flatserial.cpp | 2 | ||||
-rw-r--r-- | engine/flatsurface.cpp | 4 | ||||
-rw-r--r-- | engine/flatwindow.cpp | 6 | ||||
-rw-r--r-- | engine/include/flatbound.h | 2 | ||||
-rw-r--r-- | engine/include/flatcollector.h | 2 | ||||
-rw-r--r-- | engine/include/flatcomponent.h | 2 | ||||
-rw-r--r-- | engine/include/flatevolvable.h | 2 | ||||
-rw-r--r-- | engine/include/flatserial.h | 4 | ||||
-rw-r--r-- | engine/include/flatsurface.h | 6 | ||||
-rw-r--r-- | engine/include/flattask.h | 2 | ||||
-rw-r--r-- | engine/include/flatwindow.h | 4 | ||||
-rw-r--r-- | engine/include/object.hpp | 2 | ||||
-rw-r--r-- | engine/include/serial/focusable.h | 6 | ||||
-rw-r--r-- | engine/include/serial/keyfocusable.h | 2 | ||||
-rw-r--r-- | engine/include/signal.hpp | 4 | ||||
-rw-r--r-- | engine/include/types.hpp | 9 | ||||
-rw-r--r-- | engine/keyfocusable.cpp | 2 | ||||
-rw-r--r-- | engine/object.cpp | 2 |
19 files changed, 40 insertions, 33 deletions
diff --git a/engine/flatland.cpp b/engine/flatland.cpp index b53f8e4..628331b 100644 --- a/engine/flatland.cpp +++ b/engine/flatland.cpp @@ -29,9 +29,9 @@ flat_status status; float fps; float fps_pause = 5; -Uint32 status_to_flags(const flat_status& s) +uint32_t status_to_flags(const flat_status& s) { - Uint32 flags = 0; + uint32_t flags = 0; if (s.audio) flags |= SDL_INIT_AUDIO; @@ -97,7 +97,7 @@ int init_flatland(FlatWindow* w, gameloop loop, const flat_status& s, float _fps cout << "Flatland: Initializing SDL" << endl; - Uint32 flags = status_to_flags(s); + uint32_t flags = status_to_flags(s); if ( SDL_Init(flags | SDL_INIT_NOPARACHUTE) < 0) { @@ -170,13 +170,13 @@ int init_flatland(FlatWindow* w, gameloop loop, const flat_status& s, float _fps quit_flatland(); } - SDL_Delay((Uint32) (1000.0f / fps)); + SDL_Delay((uint32_t) (1000.0f / fps)); delay -= clock(); } while (status.loop); - SDL_Delay((Uint32)(1000 / fps_pause)); + SDL_Delay((uint32_t)(1000 / fps_pause)); } while(status.running); diff --git a/engine/flatserial.cpp b/engine/flatserial.cpp index 9c49787..7259bf1 100644 --- a/engine/flatserial.cpp +++ b/engine/flatserial.cpp @@ -62,7 +62,7 @@ void SDL_EventCollector::erase(void*) user.clear(); } -const std::vector<SDL_Event>& SDL_EventCollector::getStack(Uint32 id) const +const std::vector<SDL_Event>& SDL_EventCollector::getStack(uint32_t id) const { switch(id) { diff --git a/engine/flatsurface.cpp b/engine/flatsurface.cpp index 7b1ee5a..b3291d6 100644 --- a/engine/flatsurface.cpp +++ b/engine/flatsurface.cpp @@ -4,7 +4,7 @@ using namespace std; -FlatSurface::FlatSurface(const char *filename, Uint32 format, SDL_Surface *parent) +FlatSurface::FlatSurface(const char *filename, uint32_t format, SDL_Surface *parent) : flat::core::object(), parent(parent), hide(false) { @@ -146,7 +146,7 @@ void FlatSurface::blit() SDL_BlitSurface(surface, viewport, parent, offset); } -SDL_Surface * FlatSurface::loadOptimizedSurface(const char *filename, Uint32 format) +SDL_Surface * FlatSurface::loadOptimizedSurface(const char *filename, uint32_t format) { SDL_Surface * optimized = 0; diff --git a/engine/flatwindow.cpp b/engine/flatwindow.cpp index 2ff99dc..2fa051b 100644 --- a/engine/flatwindow.cpp +++ b/engine/flatwindow.cpp @@ -68,7 +68,7 @@ FlatWindow::~FlatWindow() int FlatWindow::open() { - Uint32 win_flags = winstatus_to_flags(status); + uint32_t win_flags = winstatus_to_flags(status); sdl_window = SDL_CreateWindow( title.c_str(), bounds->x, @@ -171,9 +171,9 @@ void FlatWindow::key_cb(const SDL_KeyboardEvent *event) } } -Uint32 FlatWindow::winstatus_to_flags(window_status s) +uint32_t FlatWindow::winstatus_to_flags(window_status s) { - Uint32 flags = 0; + uint32_t flags = 0; if (s.fullscreen) flags |= SDL_WINDOW_FULLSCREEN; diff --git a/engine/include/flatbound.h b/engine/include/flatbound.h index 5028acc..f5a2c0d 100644 --- a/engine/include/flatbound.h +++ b/engine/include/flatbound.h @@ -1,7 +1,7 @@ #ifndef __FLATBOUND_H__ #define __FLATBOUND_H__ -#include "object.h" +#include "object.hpp" #include "svector.h" typedef SVector<int, 2> pixel; diff --git a/engine/include/flatcollector.h b/engine/include/flatcollector.h index cef49db..d7edf55 100644 --- a/engine/include/flatcollector.h +++ b/engine/include/flatcollector.h @@ -1,7 +1,7 @@ #ifndef __FLATCOLLECTOR_H__ #define __FLATCOLLECTOR_H__ -#include "object.h" +#include "object.hpp" #include <set> class FlatCollector : virtual public flat::core::object diff --git a/engine/include/flatcomponent.h b/engine/include/flatcomponent.h index 9e596bf..807bcaa 100644 --- a/engine/include/flatcomponent.h +++ b/engine/include/flatcomponent.h @@ -1,7 +1,7 @@ #ifndef __FLAT_COMPONENT_H__ #define __FLAT_COMPONENT_H__ -#include "object.h" +#include "object.hpp" #include <string> class Component : virtual public flat::core::object diff --git a/engine/include/flatevolvable.h b/engine/include/flatevolvable.h index a9cc102..b79ef2b 100644 --- a/engine/include/flatevolvable.h +++ b/engine/include/flatevolvable.h @@ -1,7 +1,7 @@ #ifndef __FLATEVOLVABLE_H__ #define __FLATEVOLVABLE_H__ -#include "object.h" +#include "object.hpp" class task_s; diff --git a/engine/include/flatserial.h b/engine/include/flatserial.h index f034690..b9e003f 100644 --- a/engine/include/flatserial.h +++ b/engine/include/flatserial.h @@ -1,7 +1,7 @@ #ifndef __FLATSERIAL_H__ #define __FLATSERIAL_H__ -#include "types.h" +#include "types.hpp" #include <vector> #include "SDL2/SDL.h" @@ -33,7 +33,7 @@ struct SDL_EventCollector void collect(void*); void erase(void*); - const std::vector<SDL_Event>& getStack(Uint32 id) const; + const std::vector<SDL_Event>& getStack(uint32_t id) const; }; namespace FlatSerial { diff --git a/engine/include/flatsurface.h b/engine/include/flatsurface.h index 4c6ee1b..3b64734 100644 --- a/engine/include/flatsurface.h +++ b/engine/include/flatsurface.h @@ -1,7 +1,7 @@ #ifndef __FLATSURFACE_H__ #define __FLATSURFACE_H__ -#include "object.h" +#include "object.hpp" #include <SDL2/SDL.h> class FlatSurface : public flat::core::object @@ -16,7 +16,7 @@ class FlatSurface : public flat::core::object public: - FlatSurface(const char *filename, Uint32 format = SDL_PIXELFORMAT_RGBA32, SDL_Surface *parent = 0); + FlatSurface(const char *filename, uint32_t format = SDL_PIXELFORMAT_RGBA32, SDL_Surface *parent = 0); FlatSurface(SDL_Surface *surface, SDL_Surface *parent = 0); FlatSurface(const FlatSurface&); @@ -47,7 +47,7 @@ public: void blit(); - static SDL_Surface * loadOptimizedSurface(const char* filename, Uint32 format); + static SDL_Surface * loadOptimizedSurface(const char* filename, uint32_t format); static SDL_Surface * copySurface(SDL_Surface*); }; diff --git a/engine/include/flattask.h b/engine/include/flattask.h index 3f5c475..bba5b1a 100644 --- a/engine/include/flattask.h +++ b/engine/include/flattask.h @@ -2,7 +2,7 @@ #define __FLAT_TASK_H__ #include <set> -#include "types.h" +#include "types.hpp" struct task_prior { diff --git a/engine/include/flatwindow.h b/engine/include/flatwindow.h index b3734f4..c03a3a9 100644 --- a/engine/include/flatwindow.h +++ b/engine/include/flatwindow.h @@ -26,7 +26,7 @@ struct window_status unsigned char focus:1; }; -#include "object.h" +#include "object.hpp" #include "serial/keyfocusable.h" class SDL_Window; @@ -91,7 +91,7 @@ public: void setWindowStatus(window_status); - static Uint32 winstatus_to_flags(window_status); + static uint32_t winstatus_to_flags(window_status); }; #endif diff --git a/engine/include/object.hpp b/engine/include/object.hpp index cb7ef36..1992d2a 100644 --- a/engine/include/object.hpp +++ b/engine/include/object.hpp @@ -5,7 +5,7 @@ #include <string> #include <initializer_list> -#include "types.h" +#include "types.hpp" namespace flat { diff --git a/engine/include/serial/focusable.h b/engine/include/serial/focusable.h index a334e79..4880ff8 100644 --- a/engine/include/serial/focusable.h +++ b/engine/include/serial/focusable.h @@ -1,8 +1,8 @@ #ifndef __FOCUSABLE_H__ #define __FOCUSABLE_H__ -#include "object.h" -#include "types.h" +#include "object.hpp" +#include "types.hpp" class task_s; union SDL_Event; @@ -19,7 +19,7 @@ protected: virtual void serial_cb(const SDL_Event*) = 0; /* Event stack specification */ - virtual Uint32 stackID() const = 0; + virtual uint32_t stackID() const = 0; public: diff --git a/engine/include/serial/keyfocusable.h b/engine/include/serial/keyfocusable.h index c97c791..44c1f1b 100644 --- a/engine/include/serial/keyfocusable.h +++ b/engine/include/serial/keyfocusable.h @@ -10,7 +10,7 @@ class KeyFocusable : virtual public Focusable virtual void serial_cb(const SDL_Event*) override; - virtual Uint32 stackID() const override; + virtual uint32_t stackID() const override; protected: diff --git a/engine/include/signal.hpp b/engine/include/signal.hpp index 24d240d..ab0467a 100644 --- a/engine/include/signal.hpp +++ b/engine/include/signal.hpp @@ -4,9 +4,9 @@ #include <list> #include <set> #include <initializer_list> -#include "object.hpp" +#include "object.hpppp" #include "task.hpp" -#include "types.hpp" +#include "types.hpppp" namespace flat { diff --git a/engine/include/types.hpp b/engine/include/types.hpp index 87c4d26..436cc7c 100644 --- a/engine/include/types.hpp +++ b/engine/include/types.hpp @@ -3,7 +3,14 @@ /* Flatland types */ -class flat::core::object; +namespace flat +{ + namespace core + { + class object; + } + +} class FlatActor; class FlatSprite; diff --git a/engine/keyfocusable.cpp b/engine/keyfocusable.cpp index 39f4b01..29271dc 100644 --- a/engine/keyfocusable.cpp +++ b/engine/keyfocusable.cpp @@ -6,7 +6,7 @@ void KeyFocusable::serial_cb(const SDL_Event *event) key_cb(&event->key); } -Uint32 KeyFocusable::stackID() const +uint32_t KeyFocusable::stackID() const { // Set SDL_KEYDOWN by default return SDL_KEYDOWN; diff --git a/engine/object.cpp b/engine/object.cpp index abaf6cd..990c403 100644 --- a/engine/object.cpp +++ b/engine/object.cpp @@ -1,4 +1,4 @@ -#include "object.h" +#include "object.hpp" #include <stdlib.h> |