summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--event.cpp4
-rw-r--r--include/event.hpp2
-rw-r--r--include/video.hpp2
-rw-r--r--include/wsdl2.hpp (renamed from include/wrapsdl2.hpp)2
-rw-r--r--test/window_test.cpp8
-rw-r--r--video.cpp2
-rw-r--r--wrapsdl2.cpp8
7 files changed, 14 insertions, 14 deletions
diff --git a/event.cpp b/event.cpp
index 72de51c..60d432e 100644
--- a/event.cpp
+++ b/event.cpp
@@ -6,11 +6,11 @@ extern "C" {
#include <SDL2/SDL.h>
}
-wrapsdl2::event::event(const SDL_Event& e) {
+wsdl2::event::event(const SDL_Event& e) {
m_event = e;
}
-std::optional<wrapsdl2::event> wrapsdl2::poll_event() {
+std::optional<wsdl2::event> wsdl2::poll_event() {
SDL_Event ev;
if (SDL_PollEvent(&ev) != 0) {
diff --git a/include/event.hpp b/include/event.hpp
index b992852..9932cb8 100644
--- a/include/event.hpp
+++ b/include/event.hpp
@@ -6,7 +6,7 @@ extern "C" {
#include <SDL2/SDL_events.h>
}
-namespace wrapsdl2 {
+namespace wsdl2 {
class event {
public:
using type = SDL_EventType;
diff --git a/include/video.hpp b/include/video.hpp
index 2749d11..a00f77e 100644
--- a/include/video.hpp
+++ b/include/video.hpp
@@ -8,7 +8,7 @@ extern "C" {
#include <SDL2/SDL_render.h>
}
-namespace wrapsdl2 {
+namespace wsdl2 {
typedef SDL_Point point;
typedef SDL_Rect rect;
diff --git a/include/wrapsdl2.hpp b/include/wsdl2.hpp
index 2f28890..16564ac 100644
--- a/include/wrapsdl2.hpp
+++ b/include/wsdl2.hpp
@@ -4,7 +4,7 @@ extern "C" {
#include <SDL2/SDL.h>
}
-namespace wrapsdl2 {
+namespace wsdl2 {
bool initialize(void);
void quit(void);
diff --git a/test/window_test.cpp b/test/window_test.cpp
index c473a34..17c7cf4 100644
--- a/test/window_test.cpp
+++ b/test/window_test.cpp
@@ -1,6 +1,6 @@
#include "../debug.hpp"
-#include "wrapsdl2.hpp"
+#include "wsdl2.hpp"
#include "video.hpp"
#include "event.hpp"
@@ -10,9 +10,9 @@
int main(int argc, char *argv[]) {
- using namespace wrapsdl2;
+ using namespace wsdl2;
- wrapsdl2::initialize();
+ wsdl2::initialize();
window win("Window Test", 800, 600);
std::mutex win_mutex;
@@ -47,6 +47,6 @@ int main(int argc, char *argv[]) {
win_update.join();
- wrapsdl2::quit();
+ wsdl2::quit();
return 0;
}
diff --git a/video.cpp b/video.cpp
index 71544fe..68beff7 100644
--- a/video.cpp
+++ b/video.cpp
@@ -8,7 +8,7 @@ extern "C" {
#include <SDL2/SDL.h>
}
-using namespace wrapsdl2;
+using namespace wsdl2;
/* class window */
diff --git a/wrapsdl2.cpp b/wrapsdl2.cpp
index 3828abc..a0fa624 100644
--- a/wrapsdl2.cpp
+++ b/wrapsdl2.cpp
@@ -1,4 +1,4 @@
-#include "wrapsdl2.hpp"
+#include "wsdl2.hpp"
#include "debug.hpp"
#ifdef WRAPSDL2_EXCEPTIONS
@@ -9,7 +9,7 @@ extern "C" {
#include <SDL2/SDL.h>
}
-bool wrapsdl2::initialize(void) {
+bool wsdl2::initialize(void) {
if (SDL_InitSubSystem(SDL_INIT_VIDEO) < 0) {
#ifdef WRAPSDL2_EXCEPTIONS
throw std::runtime_error("failed to initialize sdl video subsystem");
@@ -29,7 +29,7 @@ bool wrapsdl2::initialize(void) {
return true;
}
-void wrapsdl2::quit(void) {
+void wsdl2::quit(void) {
if (SDL_WasInit(SDL_INIT_VIDEO))
SDL_QuitSubSystem(SDL_INIT_VIDEO);
@@ -43,6 +43,6 @@ void wrapsdl2::quit(void) {
-void wrapsdl2::delay(unsigned ms) {
+void wsdl2::delay(unsigned ms) {
SDL_Delay(ms);
} \ No newline at end of file