summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorancarola <raffaele.ancarola@epfl.ch>2018-11-17 22:46:15 +0100
committerancarola <raffaele.ancarola@epfl.ch>2018-11-17 22:46:15 +0100
commitce7b39f47a1112941b3579f6502dd4e950cb099a (patch)
tree1d2a46f7dde690415302539c989f21067f270324 /test
downloadflatland-ce7b39f47a1112941b3579f6502dd4e950cb099a.tar.gz
flatland-ce7b39f47a1112941b3579f6502dd4e950cb099a.zip
initialization
Diffstat (limited to 'test')
-rw-r--r--test/main.cpp30
-rw-r--r--test/makefile11
-rwxr-xr-xtest/testbin0 -> 14624 bytes
3 files changed, 41 insertions, 0 deletions
diff --git a/test/main.cpp b/test/main.cpp
new file mode 100644
index 0000000..c30e5f9
--- /dev/null
+++ b/test/main.cpp
@@ -0,0 +1,30 @@
+#include "flatland.h"
+#include "flatwindow.h"
+
+int count = 0;
+
+void loop(float);
+
+int main()
+{
+ FlatWindow win(600, 900, "Stocazzo");
+ flat_status status;
+
+ init_flatland(win, loop, status, 60);
+
+ return 0;
+}
+
+#include <iostream>
+
+using namespace std;
+
+void loop(float dt)
+{
+ ++count;
+
+ if (count == 100)
+ quit_flatland();
+
+ cout << "Loop number: " << count << endl;
+}
diff --git a/test/makefile b/test/makefile
new file mode 100644
index 0000000..f4c4ba1
--- /dev/null
+++ b/test/makefile
@@ -0,0 +1,11 @@
+
+BIN:= test
+SRC:= main.cpp
+INCLUDE:= -I ../engine/include
+LIBS:= -lSDL ../bin/libflatland.so
+
+$(BIN):
+ g++ -o $(BIN) $(SRC) $(INCLUDE) $(LIBS) -std=c++11
+
+all: $(BIN)
+
diff --git a/test/test b/test/test
new file mode 100755
index 0000000..7357057
--- /dev/null
+++ b/test/test
Binary files differ