aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/.vs/libjin/v14/.suobin227328 -> 116224 bytes
-rw-r--r--build/libjin/libjin.vcxproj25
-rw-r--r--build/libjin/libjin.vcxproj.filters82
-rw-r--r--libjin/Common/Object.cpp32
-rw-r--r--libjin/Common/Object.h49
-rw-r--r--libjin/Common/StringMap.hpp143
-rw-r--r--libjin/Common/utf8.cpp40
-rw-r--r--libjin/Common/utf8.h31
-rw-r--r--libjin/Core/Game.cpp4
-rw-r--r--libjin/Thread/Thread.h14
-rw-r--r--libjin/Utils/CSV/CSV.cpp (renamed from libjin/Tools/CSV/CSV.cpp)0
-rw-r--r--libjin/Utils/CSV/CSV.h (renamed from libjin/Tools/CSV/CSV.h)0
-rw-r--r--libjin/Utils/Component/Component.h (renamed from libjin/Tools/Component/Component.h)2
-rw-r--r--libjin/Utils/Component/GameObject.h (renamed from libjin/Tools/Component/GameObject.h)2
-rw-r--r--libjin/Utils/EventMsgCenter/EventMsgCenter.h (renamed from libjin/Tools/EventMsgCenter/EventMsgCenter.h)2
-rw-r--r--libjin/Utils/EventMsgCenter/Events.h (renamed from libjin/Tools/EventMsgCenter/Events.h)2
-rw-r--r--libjin/Utils/Json/Json.cpp (renamed from libjin/Tools/Json/Json.cpp)0
-rw-r--r--libjin/Utils/Json/Json.h (renamed from libjin/Tools/Json/Json.h)0
-rw-r--r--libjin/Utils/XML/XML.cpp (renamed from libjin/Tools/XML/XML.cpp)0
-rw-r--r--libjin/Utils/XML/XML.h (renamed from libjin/Tools/XML/XML.h)0
-rw-r--r--libjin/jin.h8
-rw-r--r--libjin/modules.h13
-rw-r--r--test/01HelloWorld/main.cpp4
23 files changed, 394 insertions, 59 deletions
diff --git a/build/.vs/libjin/v14/.suo b/build/.vs/libjin/v14/.suo
index 90cd23a..50ddad7 100644
--- a/build/.vs/libjin/v14/.suo
+++ b/build/.vs/libjin/v14/.suo
Binary files differ
diff --git a/build/libjin/libjin.vcxproj b/build/libjin/libjin.vcxproj
index 32422b3..4f90bf7 100644
--- a/build/libjin/libjin.vcxproj
+++ b/build/libjin/libjin.vcxproj
@@ -30,6 +30,8 @@
<ClCompile Include="..\..\libjin\Audio\SDL\SDLAudio.cpp" />
<ClCompile Include="..\..\libjin\Audio\SDL\SDLSource.cpp" />
<ClCompile Include="..\..\libjin\Audio\Source.cpp" />
+ <ClCompile Include="..\..\libjin\Common\Object.cpp" />
+ <ClCompile Include="..\..\libjin\Common\utf8.cpp" />
<ClCompile Include="..\..\libjin\Core\Game.cpp" />
<ClCompile Include="..\..\libjin\Filesystem\Filesystem.cpp" />
<ClCompile Include="..\..\libjin\Graphics\Canvas.cpp" />
@@ -49,11 +51,11 @@
<ClCompile Include="..\..\libjin\Thread\Thread.cpp" />
<ClCompile Include="..\..\libjin\Tilemap\Tilemap.cpp" />
<ClCompile Include="..\..\libjin\Time\Timer.cpp" />
- <ClCompile Include="..\..\libjin\Tools\CSV\CSV.cpp" />
- <ClCompile Include="..\..\libjin\Tools\Json\Json.cpp" />
- <ClCompile Include="..\..\libjin\Tools\XML\XML.cpp" />
+ <ClCompile Include="..\..\libjin\Utils\CSV\CSV.cpp" />
+ <ClCompile Include="..\..\libjin\Utils\Json\Json.cpp" />
<ClCompile Include="..\..\libjin\Utils\Log.cpp" />
<ClCompile Include="..\..\libjin\Utils\unittest.cpp" />
+ <ClCompile Include="..\..\libjin\Utils\XML\XML.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\libjin\3rdparty\GLee\GLee.h" />
@@ -71,8 +73,11 @@
<ClInclude Include="..\..\libjin\Audio\SDL\SDLSource.h" />
<ClInclude Include="..\..\libjin\Audio\Source.h" />
<ClInclude Include="..\..\libjin\Common\Data.h" />
+ <ClInclude Include="..\..\libjin\Common\Object.h" />
<ClInclude Include="..\..\libjin\Common\Singleton.hpp" />
+ <ClInclude Include="..\..\libjin\Common\StringMap.hpp" />
<ClInclude Include="..\..\libjin\Common\Subsystem.hpp" />
+ <ClInclude Include="..\..\libjin\Common\utf8.h" />
<ClInclude Include="..\..\libjin\Core\Core.h" />
<ClInclude Include="..\..\libjin\Core\Game.h" />
<ClInclude Include="..\..\libjin\Debug\Debug.h" />
@@ -106,18 +111,18 @@
<ClInclude Include="..\..\libjin\Thread\Thread.h" />
<ClInclude Include="..\..\libjin\Tilemap\Tilemap.h" />
<ClInclude Include="..\..\libjin\Time\Timer.h" />
- <ClInclude Include="..\..\libjin\Tools\Component\Component.h" />
- <ClInclude Include="..\..\libjin\Tools\Component\GameObject.h" />
- <ClInclude Include="..\..\libjin\Tools\CSV\CSV.h" />
- <ClInclude Include="..\..\libjin\Tools\EventMsgCenter\EventMsgCenter.h" />
- <ClInclude Include="..\..\libjin\Tools\EventMsgCenter\Events.h" />
- <ClInclude Include="..\..\libjin\Tools\Json\Json.h" />
- <ClInclude Include="..\..\libjin\Tools\XML\XML.h" />
<ClInclude Include="..\..\libjin\UI\UI.h" />
+ <ClInclude Include="..\..\libjin\Utils\Component\Component.h" />
+ <ClInclude Include="..\..\libjin\Utils\Component\GameObject.h" />
+ <ClInclude Include="..\..\libjin\Utils\CSV\CSV.h" />
<ClInclude Include="..\..\libjin\Utils\endian.h" />
+ <ClInclude Include="..\..\libjin\Utils\EventMsgCenter\EventMsgCenter.h" />
+ <ClInclude Include="..\..\libjin\Utils\EventMsgCenter\Events.h" />
+ <ClInclude Include="..\..\libjin\Utils\Json\Json.h" />
<ClInclude Include="..\..\libjin\Utils\Log.h" />
<ClInclude Include="..\..\libjin\Utils\macros.h" />
<ClInclude Include="..\..\libjin\Utils\utils.h" />
+ <ClInclude Include="..\..\libjin\Utils\XML\XML.h" />
</ItemGroup>
<ItemGroup>
<None Include="..\..\libjin\README.md" />
diff --git a/build/libjin/libjin.vcxproj.filters b/build/libjin/libjin.vcxproj.filters
index c302314..da3ea05 100644
--- a/build/libjin/libjin.vcxproj.filters
+++ b/build/libjin/libjin.vcxproj.filters
@@ -55,9 +55,6 @@
<Filter Include="Tilemap">
<UniqueIdentifier>{ea9c11c8-1d83-441b-a1aa-e7fb85abd615}</UniqueIdentifier>
</Filter>
- <Filter Include="Tools">
- <UniqueIdentifier>{1819939a-8bb4-4635-938d-4b054de6da5e}</UniqueIdentifier>
- </Filter>
<Filter Include="UI">
<UniqueIdentifier>{32b0ca98-fc83-411a-8668-e65fb2ac3381}</UniqueIdentifier>
</Filter>
@@ -70,23 +67,23 @@
<Filter Include="Audio\OpenAL">
<UniqueIdentifier>{c2b1ec18-2952-4461-92d3-79226870e1a2}</UniqueIdentifier>
</Filter>
- <Filter Include="Tools\EventMsgCenter">
- <UniqueIdentifier>{024367d0-1607-463c-b094-41f2c0fd1e99}</UniqueIdentifier>
- </Filter>
<Filter Include="Time">
<UniqueIdentifier>{53e06a65-a5ba-41d8-a1f6-6fb5680207ba}</UniqueIdentifier>
</Filter>
- <Filter Include="Tools\Component">
- <UniqueIdentifier>{5685d2ab-4373-4b9c-9cd1-634b1916b09c}</UniqueIdentifier>
+ <Filter Include="Utils\Component">
+ <UniqueIdentifier>{4d34f3cf-9165-41c5-9070-10442e9fed73}</UniqueIdentifier>
</Filter>
- <Filter Include="Tools\XML">
- <UniqueIdentifier>{712750f2-e78b-46a4-b837-55fd4486b3bd}</UniqueIdentifier>
+ <Filter Include="Utils\CSV">
+ <UniqueIdentifier>{fc249b2b-dbab-41f0-b507-331ce4db0899}</UniqueIdentifier>
</Filter>
- <Filter Include="Tools\Json">
- <UniqueIdentifier>{0fb5fedc-24df-47f0-a90f-a20e21baa90c}</UniqueIdentifier>
+ <Filter Include="Utils\EventMsgCenter">
+ <UniqueIdentifier>{bd893cbe-82a4-4c49-a398-a126a312d4fb}</UniqueIdentifier>
</Filter>
- <Filter Include="Tools\CSV">
- <UniqueIdentifier>{52a242f9-da0d-4c1d-a6ea-5ad17557feae}</UniqueIdentifier>
+ <Filter Include="Utils\Json">
+ <UniqueIdentifier>{5b6076d6-40ea-4ca3-a427-77def412d945}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="Utils\XML">
+ <UniqueIdentifier>{5b1e81c7-866a-414e-a976-48aebfd57225}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
@@ -186,14 +183,20 @@
<ClCompile Include="..\..\libjin\Tilemap\Tilemap.cpp">
<Filter>Tilemap</Filter>
</ClCompile>
- <ClCompile Include="..\..\libjin\Tools\XML\XML.cpp">
- <Filter>Tools\XML</Filter>
+ <ClCompile Include="..\..\libjin\Common\Object.cpp">
+ <Filter>Common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\libjin\Common\utf8.cpp">
+ <Filter>Common</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\libjin\Utils\CSV\CSV.cpp">
+ <Filter>Utils\CSV</Filter>
</ClCompile>
- <ClCompile Include="..\..\libjin\Tools\Json\Json.cpp">
- <Filter>Tools\Json</Filter>
+ <ClCompile Include="..\..\libjin\Utils\Json\Json.cpp">
+ <Filter>Utils\Json</Filter>
</ClCompile>
- <ClCompile Include="..\..\libjin\Tools\CSV\CSV.cpp">
- <Filter>Tools\CSV</Filter>
+ <ClCompile Include="..\..\libjin\Utils\XML\XML.cpp">
+ <Filter>Utils\XML</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
@@ -335,9 +338,6 @@
<ClInclude Include="..\..\libjin\UI\UI.h">
<Filter>UI</Filter>
</ClInclude>
- <ClInclude Include="..\..\libjin\Tools\EventMsgCenter\EventMsgCenter.h">
- <Filter>Tools\EventMsgCenter</Filter>
- </ClInclude>
<ClInclude Include="..\..\libjin\Tilemap\Tilemap.h">
<Filter>Tilemap</Filter>
</ClInclude>
@@ -361,23 +361,35 @@
<ClInclude Include="..\..\libjin\Common\Singleton.hpp">
<Filter>Common</Filter>
</ClInclude>
- <ClInclude Include="..\..\libjin\Tools\Component\GameObject.h">
- <Filter>Tools\Component</Filter>
+ <ClInclude Include="..\..\libjin\Common\Object.h">
+ <Filter>Common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\libjin\Common\utf8.h">
+ <Filter>Common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\libjin\Common\StringMap.hpp">
+ <Filter>Common</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\libjin\Utils\Component\Component.h">
+ <Filter>Utils\Component</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\libjin\Utils\Component\GameObject.h">
+ <Filter>Utils\Component</Filter>
</ClInclude>
- <ClInclude Include="..\..\libjin\Tools\Component\Component.h">
- <Filter>Tools\Component</Filter>
+ <ClInclude Include="..\..\libjin\Utils\CSV\CSV.h">
+ <Filter>Utils\CSV</Filter>
</ClInclude>
- <ClInclude Include="..\..\libjin\Tools\EventMsgCenter\Events.h">
- <Filter>Tools\EventMsgCenter</Filter>
+ <ClInclude Include="..\..\libjin\Utils\EventMsgCenter\EventMsgCenter.h">
+ <Filter>Utils\EventMsgCenter</Filter>
</ClInclude>
- <ClInclude Include="..\..\libjin\Tools\XML\XML.h">
- <Filter>Tools\XML</Filter>
+ <ClInclude Include="..\..\libjin\Utils\EventMsgCenter\Events.h">
+ <Filter>Utils\EventMsgCenter</Filter>
</ClInclude>
- <ClInclude Include="..\..\libjin\Tools\Json\Json.h">
- <Filter>Tools\Json</Filter>
+ <ClInclude Include="..\..\libjin\Utils\Json\Json.h">
+ <Filter>Utils\Json</Filter>
</ClInclude>
- <ClInclude Include="..\..\libjin\Tools\CSV\CSV.h">
- <Filter>Tools\CSV</Filter>
+ <ClInclude Include="..\..\libjin\Utils\XML\XML.h">
+ <Filter>Utils\XML</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
diff --git a/libjin/Common/Object.cpp b/libjin/Common/Object.cpp
new file mode 100644
index 0000000..6c3b667
--- /dev/null
+++ b/libjin/Common/Object.cpp
@@ -0,0 +1,32 @@
+// LOVE
+#include "Object.h"
+
+namespace jin
+{
+
+ Object::Object()
+ : count(1)
+ {
+ }
+
+ Object::~Object()
+ {
+ }
+
+ int Object::getReferenceCount() const
+ {
+ return count;
+ }
+
+ void Object::retain()
+ {
+ ++count;
+ }
+
+ void Object::release()
+ {
+ if (--count <= 0)
+ delete this;
+ }
+
+} // love
diff --git a/libjin/Common/Object.h b/libjin/Common/Object.h
new file mode 100644
index 0000000..9ac1b5a
--- /dev/null
+++ b/libjin/Common/Object.h
@@ -0,0 +1,49 @@
+#ifndef __JIN_COMMON_OBJECT_H
+#define __JIN_COMMON_OBJECT_H
+
+namespace jin
+{
+
+ class Object
+ {
+ private:
+
+ // The reference count.
+ int count;
+
+ public:
+
+ /**
+ * Constructor. Sets reference count to one.
+ **/
+ Object();
+
+ /**
+ * Destructor.
+ **/
+ virtual ~Object() = 0;
+
+ /**
+ * Gets the reference count of this Object.
+ * @returns The reference count.
+ **/
+ int getReferenceCount() const;
+
+ /**
+ * Retains the Object, i.e. increases the
+ * reference count by one.
+ **/
+ void retain();
+
+ /**
+ * Releases one reference to the Object, i.e. decrements the
+ * reference count by one, and potentially deletes the Object
+ * if there are no more references.
+ **/
+ void release();
+
+ }; // Object
+
+}
+
+#endif \ No newline at end of file
diff --git a/libjin/Common/StringMap.hpp b/libjin/Common/StringMap.hpp
new file mode 100644
index 0000000..bebd94d
--- /dev/null
+++ b/libjin/Common/StringMap.hpp
@@ -0,0 +1,143 @@
+#ifndef __JIN_COMMON_SREINGMAP_H
+#define __JIN_COMMON_SREINGMAP_H
+
+namespace jin
+{
+
+ template<typename T, unsigned SIZE>
+ class StringMap
+ {
+ private:
+
+ struct Record
+ {
+ const char * key;
+ T value;
+ bool set;
+ Record() : set(false) {}
+ };
+
+ const static unsigned MAX = SIZE * 2;
+
+ Record records[MAX];
+ const char * reverse[SIZE];
+
+ public:
+
+ struct Entry
+ {
+ const char * key;
+ T value;
+ };
+
+ StringMap(Entry * entries, unsigned num)
+ {
+
+ for (unsigned i = 0; i < SIZE; ++i)
+ reverse[i] = 0;
+
+ unsigned n = num / sizeof(Entry);
+
+ for (unsigned i = 0; i < n; ++i)
+ {
+ add(entries[i].key, entries[i].value);
+ }
+ }
+
+ bool streq(const char * a, const char * b)
+ {
+ while (*a != 0 && *b != 0)
+ {
+ if (*a != *b)
+ return false;
+ ++a;
+ ++b;
+ }
+
+ return (*a == 0 && *b == 0);
+ }
+
+ bool find(const char * key, T & t)
+ {
+ //unsigned str_hash = djb2(key);
+
+ for (unsigned i = 0; i < MAX; ++i)
+ {
+ //unsigned str_i = (str_hash + i) % MAX; //this isn't used, is this intentional?
+
+ if (records[i].set && streq(records[i].key, key))
+ {
+ t = records[i].value;
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ bool find(T key, const char *& str)
+ {
+ unsigned index = (unsigned)key;
+
+ if (index >= SIZE)
+ return false;
+
+ if (reverse[index] != 0)
+ {
+ str = reverse[index];
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ bool add(const char * key, T value)
+ {
+ unsigned str_hash = djb2(key);
+ bool inserted = false;
+
+ for (unsigned i = 0; i < MAX; ++i)
+ {
+ unsigned str_i = (str_hash + i) % MAX;
+
+ if (!records[str_i].set)
+ {
+ inserted = true;
+ records[str_i].set = true;
+ records[str_i].key = key;
+ records[str_i].value = value;
+ break;
+ }
+ }
+
+ unsigned index = (unsigned)value;
+
+ if (index >= SIZE)
+ {
+ printf("\nConstant %s out of bounds with %i!\n", key, index);
+ return false;
+ }
+
+ reverse[index] = key;
+
+ return inserted;
+ }
+
+ unsigned djb2(const char * key)
+ {
+ unsigned hash = 5381;
+ int c;
+
+ while ((c = *key++))
+ hash = ((hash << 5) + hash) + c;
+
+ return hash;
+ }
+
+ }; // StringMap
+
+}
+
+#endif \ No newline at end of file
diff --git a/libjin/Common/utf8.cpp b/libjin/Common/utf8.cpp
new file mode 100644
index 0000000..3826d20
--- /dev/null
+++ b/libjin/Common/utf8.cpp
@@ -0,0 +1,40 @@
+#include "../modules.h"
+#if JIN_OS == JIN_WINDOWS
+
+#include "utf8.h"
+
+namespace jin
+{
+ std::string to_utf8(LPCWSTR wstr)
+ {
+ size_t wide_len = wcslen(wstr) + 1;
+
+ // Get size in UTF-8.
+ int utf8_size = WideCharToMultiByte(CP_UTF8, 0, wstr, wide_len, 0, 0, 0, 0);
+
+ char * utf8_str = new char[utf8_size];
+
+ // Convert to UTF-8.
+ int ok = WideCharToMultiByte(CP_UTF8, 0, wstr, wide_len, utf8_str, utf8_size, 0, 0);
+
+ if (!ok)
+ {
+ delete[] utf8_str;
+ }
+
+ return ok ? std::string(utf8_str) : std::string();
+ }
+
+ void replace_char(std::string & str, char find, char replace)
+ {
+ int length = str.length();
+
+ for (int i = 0; i<length; i++)
+ {
+ if (str[i] == find)
+ str[i] = replace;
+ }
+ }
+}
+
+#endif // JIN_OS == JIN_WINDOWS \ No newline at end of file
diff --git a/libjin/Common/utf8.h b/libjin/Common/utf8.h
new file mode 100644
index 0000000..7f26841
--- /dev/null
+++ b/libjin/Common/utf8.h
@@ -0,0 +1,31 @@
+#ifndef __JIN_COMMON_UTF8_H
+#define __JIN_COMMON_UTF8_H
+
+#include "../modules.h"
+#if JIN_OS == JIN_WINDOWS
+
+#include <string>
+#include <windows.h>
+
+namespace jin
+{
+
+ /**
+ * Convert the wide string to a UTF-8 encoded string.
+ * @param wstr The wide-char string.
+ * @return A UTF-8 string.
+ **/
+ std::string to_utf8(LPCWSTR wstr);
+
+ /**
+ * Replace all occurences of 'find' with 'replace' in a string.
+ * @param str The string to modify.
+ * @param find The character to match.
+ * @param replace The character to replace matches.
+ **/
+ void replace_char(std::string & str, char find, char replace);
+
+}
+
+#endif // JIN_OS == JIN_WINDOWS
+#endif // __JIN_COMMON_UTF8_H \ No newline at end of file
diff --git a/libjin/Core/Game.cpp b/libjin/Core/Game.cpp
index c5dd5a5..b480b12 100644
--- a/libjin/Core/Game.cpp
+++ b/libjin/Core/Game.cpp
@@ -32,7 +32,7 @@ namespace core
while (jin::input::pollEvent(&e))
{
SAFECALL(_onEvent, &e);
- if (!_running) goto stoploop;
+ if (!_running) goto quitloop;
}
SAFECALL(_onUpdate, dt);
SAFECALL(_onDraw);
@@ -49,7 +49,7 @@ namespace core
else
previous = current;
}
- stoploop:;
+ quitloop:;
}
bool Game::initSystem(const SettingBase* setting)
diff --git a/libjin/Thread/Thread.h b/libjin/Thread/Thread.h
index f736407..9d38d72 100644
--- a/libjin/Thread/Thread.h
+++ b/libjin/Thread/Thread.h
@@ -3,6 +3,10 @@
#include "../modules.h"
#if JIN_MODULES_THREAD
+#if JIN_THREAD_SDL
+#include "SDL2/SDL_thread.h"
+#endif // JIN_THREAD_SDL
+
namespace jin
{
namespace thread
@@ -10,7 +14,15 @@ namespace thread
class Thread
{
-
+ public:
+ void start();
+ void kill();
+ void wait();
+ const char* getName() const;
+ void recerive();
+ void demand();
+ void peek();
+ void send();
};
}
diff --git a/libjin/Tools/CSV/CSV.cpp b/libjin/Utils/CSV/CSV.cpp
index e69de29..e69de29 100644
--- a/libjin/Tools/CSV/CSV.cpp
+++ b/libjin/Utils/CSV/CSV.cpp
diff --git a/libjin/Tools/CSV/CSV.h b/libjin/Utils/CSV/CSV.h
index 6f70f09..6f70f09 100644
--- a/libjin/Tools/CSV/CSV.h
+++ b/libjin/Utils/CSV/CSV.h
diff --git a/libjin/Tools/Component/Component.h b/libjin/Utils/Component/Component.h
index 12c347a..f63fb59 100644
--- a/libjin/Tools/Component/Component.h
+++ b/libjin/Utils/Component/Component.h
@@ -5,7 +5,7 @@
namespace jin
{
-namespace tools
+namespace utils
{
class GameObject;
diff --git a/libjin/Tools/Component/GameObject.h b/libjin/Utils/Component/GameObject.h
index aac9e6b..e4f3aa5 100644
--- a/libjin/Tools/Component/GameObject.h
+++ b/libjin/Utils/Component/GameObject.h
@@ -8,7 +8,7 @@
namespace jin
{
-namespace tools
+namespace utils
{
class GameObject
diff --git a/libjin/Tools/EventMsgCenter/EventMsgCenter.h b/libjin/Utils/EventMsgCenter/EventMsgCenter.h
index a679f06..6717b83 100644
--- a/libjin/Tools/EventMsgCenter/EventMsgCenter.h
+++ b/libjin/Utils/EventMsgCenter/EventMsgCenter.h
@@ -5,7 +5,7 @@
namespace jin
{
-namespace tools
+namespace utils
{
class EventMSGCenter
diff --git a/libjin/Tools/EventMsgCenter/Events.h b/libjin/Utils/EventMsgCenter/Events.h
index 698dfbc..9ebc30d 100644
--- a/libjin/Tools/EventMsgCenter/Events.h
+++ b/libjin/Utils/EventMsgCenter/Events.h
@@ -5,7 +5,7 @@
namespace jin
{
-namespace tools
+namespace utils
{
enum Event
diff --git a/libjin/Tools/Json/Json.cpp b/libjin/Utils/Json/Json.cpp
index e69de29..e69de29 100644
--- a/libjin/Tools/Json/Json.cpp
+++ b/libjin/Utils/Json/Json.cpp
diff --git a/libjin/Tools/Json/Json.h b/libjin/Utils/Json/Json.h
index 6f70f09..6f70f09 100644
--- a/libjin/Tools/Json/Json.h
+++ b/libjin/Utils/Json/Json.h
diff --git a/libjin/Tools/XML/XML.cpp b/libjin/Utils/XML/XML.cpp
index e69de29..e69de29 100644
--- a/libjin/Tools/XML/XML.cpp
+++ b/libjin/Utils/XML/XML.cpp
diff --git a/libjin/Tools/XML/XML.h b/libjin/Utils/XML/XML.h
index 6f70f09..6f70f09 100644
--- a/libjin/Tools/XML/XML.h
+++ b/libjin/Utils/XML/XML.h
diff --git a/libjin/jin.h b/libjin/jin.h
index d32731d..4624669 100644
--- a/libjin/jin.h
+++ b/libjin/jin.h
@@ -14,9 +14,9 @@
#include "Graphics/Graphics.h"
#include "Time/Timer.h"
-#define JIN_VERSION "Jin 0.1"
-#define JIN_RELEASE "Jin 0.1.1"
-#define JIN_VERSION_NUM 101
-#define JIN_AUTHOR "Chai"
+const char* JIN_VERSION = "Jin 0.1";
+const char* JIN_AUTHOR = "Chai";
+const char* JIN_RELEASE = "Jin 0.1.1";
+const int JIN_VERSION_NUM = 101;
#endif // __JIN_H \ No newline at end of file
diff --git a/libjin/modules.h b/libjin/modules.h
index 171c691..3e830b1 100644
--- a/libjin/modules.h
+++ b/libjin/modules.h
@@ -37,14 +37,25 @@
#define JIN_TOOLS_JSON 1
#define JIN_MODULES_THREAD 1
+#define JIN_THREAD_SDL 1
#define JIN_MODULES_TIME 1
#define JIN_TIME_SDL 1
/*
-* Debug
+* Open libjin debug
*/
#define JIN_DEBUG 1
+/*
+* Operating system
+*/
+
+#define JIN_WINDOWS 1
+#define JIN_MACOS 2
+#define JIN_LINUX 3
+
+#define JIN_OS JIN_WINDOWS
+
#endif \ No newline at end of file
diff --git a/test/01HelloWorld/main.cpp b/test/01HelloWorld/main.cpp
index a1b1a70..62c059f 100644
--- a/test/01HelloWorld/main.cpp
+++ b/test/01HelloWorld/main.cpp
@@ -12,14 +12,14 @@ void onEvent(jin::input::Event* e)
game->stop();
}
-void onUpdate(int dt)
+void onUpdate(int ms)
{
}
void onDraw()
{
-
+
}
int main(int argc, char* argv[])