diff options
Diffstat (limited to 'src')
56 files changed, 131 insertions, 117 deletions
diff --git a/src/jinc.cpp b/src/jinc.cpp index 86744a1..53ee178 100644 --- a/src/jinc.cpp +++ b/src/jinc.cpp @@ -1,7 +1,6 @@ -// luabinaryУɿִļ #include <string> bool compile(std::string directory) { return 0; -} +}
\ No newline at end of file diff --git a/src/libjin/Audio/Audio.cpp b/src/libjin/Audio/Audio.cpp index 5fb10da..1ccafcd 100644 --- a/src/libjin/Audio/Audio.cpp +++ b/src/libjin/Audio/Audio.cpp @@ -9,7 +9,7 @@ namespace jin namespace audio { -} -} +} // audio +} // jin #endif // JIN_MODULES_AUDIO
\ No newline at end of file diff --git a/src/libjin/Audio/Audio.h b/src/libjin/Audio/Audio.h index 6c3468e..255f88b 100644 --- a/src/libjin/Audio/Audio.h +++ b/src/libjin/Audio/Audio.h @@ -12,6 +12,7 @@ namespace jin { namespace audio { + class Source; template<class SubAudio> @@ -46,8 +47,8 @@ namespace audio State state; }; -} -} +} // audio +} // jin #endif // JIN_MODULES_AUDIO #endif // __JIN_AUDIO_H
\ No newline at end of file diff --git a/src/libjin/Audio/SDL/SDLAudio.cpp b/src/libjin/Audio/SDL/SDLAudio.cpp index 040ca96..46a80de 100644 --- a/src/libjin/Audio/SDL/SDLAudio.cpp +++ b/src/libjin/Audio/SDL/SDLAudio.cpp @@ -135,7 +135,7 @@ namespace audio this->volume = clamp(volume, 0.0f, 1.0f); } -} -} +} // audio +} // jin #endif // JIN_MODULES_AUDIO && JIN_AUDIO_SDLAUDIO
\ No newline at end of file diff --git a/src/libjin/Audio/SDL/SDLAudio.h b/src/libjin/Audio/SDL/SDLAudio.h index f2a4fab..a8067ba 100644 --- a/src/libjin/Audio/SDL/SDLAudio.h +++ b/src/libjin/Audio/SDL/SDLAudio.h @@ -58,8 +58,8 @@ namespace audio }; -} -} +} // audio +} // jin #endif // JIN_MODULES_AUDIO && JIN_AUDIO_SDLAUDIO #endif // __JIN_AUDIO_SDL_H
\ No newline at end of file diff --git a/src/libjin/Audio/SDL/SDLSource.cpp b/src/libjin/Audio/SDL/SDLSource.cpp index 5c6abb8..13f9c18 100644 --- a/src/libjin/Audio/SDL/SDLSource.cpp +++ b/src/libjin/Audio/SDL/SDLSource.cpp @@ -393,7 +393,7 @@ Manager::get()->pushCommand(cmd); \ } -} -} +} // audio +} // jin #endif // JIN_MODULES_AUDIO && JIN_AUDIO_SDLAUDIO
\ No newline at end of file diff --git a/src/libjin/Audio/SDL/SDLSource.h b/src/libjin/Audio/SDL/SDLSource.h index dd792c7..c45d7e5 100644 --- a/src/libjin/Audio/SDL/SDLSource.h +++ b/src/libjin/Audio/SDL/SDLSource.h @@ -111,8 +111,8 @@ namespace audio } }; -} -} +} // audio +} // jin #endif // JIN_MODULES_AUDIO && JIN_AUDIO_SDLAUDIO #endif // __JIN_SOURCE_SDL_H
\ No newline at end of file diff --git a/src/libjin/Audio/Source.cpp b/src/libjin/Audio/Source.cpp index 61f4055..ae3c19b 100644 --- a/src/libjin/Audio/Source.cpp +++ b/src/libjin/Audio/Source.cpp @@ -23,6 +23,7 @@ namespace audio return SourceType::INVALID; } -} -} +} // audio +} // jin + #endif // JIN_MODULES_AUDIO
\ No newline at end of file diff --git a/src/libjin/Audio/Source.h b/src/libjin/Audio/Source.h index 3abe7de..70d6fae 100644 --- a/src/libjin/Audio/Source.h +++ b/src/libjin/Audio/Source.h @@ -44,8 +44,8 @@ namespace audio }; -} -} +} // audio +} // jin #endif // JIN_MODULES_AUDIO #endif // __JIN_AUDIO_SOURCE_H
\ No newline at end of file diff --git a/src/libjin/Common/Object.h b/src/libjin/Common/Object.h index 9ac1b5a..6c9d093 100644 --- a/src/libjin/Common/Object.h +++ b/src/libjin/Common/Object.h @@ -44,6 +44,6 @@ namespace jin }; // Object -} +} // jin #endif
\ No newline at end of file diff --git a/src/libjin/Common/StringMap.hpp b/src/libjin/Common/StringMap.hpp index bebd94d..d301a0c 100644 --- a/src/libjin/Common/StringMap.hpp +++ b/src/libjin/Common/StringMap.hpp @@ -138,6 +138,6 @@ namespace jin }; // StringMap -} +} // jin #endif
\ No newline at end of file diff --git a/src/libjin/Common/utf8.h b/src/libjin/Common/utf8.h index 7f26841..f023e91 100644 --- a/src/libjin/Common/utf8.h +++ b/src/libjin/Common/utf8.h @@ -25,7 +25,7 @@ namespace jin **/ void replace_char(std::string & str, char find, char replace); -} +} // jin #endif // JIN_OS == JIN_WINDOWS #endif // __JIN_COMMON_UTF8_H
\ No newline at end of file diff --git a/src/libjin/Graphics/Shapes.cpp b/src/libjin/Graphics/Shapes.cpp index 4b136a1..aef4a1c 100644 --- a/src/libjin/Graphics/Shapes.cpp +++ b/src/libjin/Graphics/Shapes.cpp @@ -116,7 +116,7 @@ namespace graphics } } -} -} +} // graphics +} // jin #endif // JIN_MODULES_RENDER
\ No newline at end of file diff --git a/src/libjin/Input/Event.cpp b/src/libjin/Input/Event.cpp index 8eb45e6..3edff01 100644 --- a/src/libjin/Input/Event.cpp +++ b/src/libjin/Input/Event.cpp @@ -4,4 +4,4 @@ namespace jin { -}
\ No newline at end of file +} // jin
\ No newline at end of file diff --git a/src/libjin/Input/Joypad.h b/src/libjin/Input/Joypad.h index e8d309b..62ce076 100644 --- a/src/libjin/Input/Joypad.h +++ b/src/libjin/Input/Joypad.h @@ -8,7 +8,7 @@ namespace input -} -} +} // input +} // jin #endif
\ No newline at end of file diff --git a/src/libjin/Input/Keyboard.h b/src/libjin/Input/Keyboard.h index 3e78ab1..49ee90f 100644 --- a/src/libjin/Input/Keyboard.h +++ b/src/libjin/Input/Keyboard.h @@ -5,11 +5,13 @@ namespace jin { namespace input { + class Keyboard { }; -} -} + +} // input +} // jin #endif // __JIN_KEYBOARD_H
\ No newline at end of file diff --git a/src/libjin/Input/Mouse.cpp b/src/libjin/Input/Mouse.cpp index 98c4a39..a3c8e27 100644 --- a/src/libjin/Input/Mouse.cpp +++ b/src/libjin/Input/Mouse.cpp @@ -11,12 +11,12 @@ namespace input void Mouse::getState(int* x, int* y) { -#ifdef JIN_INPUT_SDL + #ifdef JIN_INPUT_SDL SDL_GetMouseState(x, y); -#endif // JIN_INPUT_SDL + #endif // JIN_INPUT_SDL } } // input } // jin -#endif // JIN_MODULES_INPUT
\ No newline at end of file +#endif // JIN_MODULES_INPUT
\ No newline at end of file diff --git a/src/libjin/Input/Mouse.h b/src/libjin/Input/Mouse.h index 5fc6b47..584c516 100644 --- a/src/libjin/Input/Mouse.h +++ b/src/libjin/Input/Mouse.h @@ -9,21 +9,22 @@ namespace jin { namespace input { + class Mouse : public Singleton<Mouse> { public: - - // void getState(int* x, int* y); private: + SINGLETON(Mouse); + Mouse() {}; ~Mouse() {}; - SINGLETON(Mouse); }; -} -} + +} // input +} // jin #endif // JIN_MODULES_INPUT #endif // __JIN_MOUSE_H
\ No newline at end of file diff --git a/src/libjin/Math/Math.h b/src/libjin/Math/Math.h index 2bc8ed9..d496b85 100644 --- a/src/libjin/Math/Math.h +++ b/src/libjin/Math/Math.h @@ -71,7 +71,7 @@ namespace math return a + t * (b - a); } -} -} +} // math +} // jin #endif
\ No newline at end of file diff --git a/src/libjin/Math/Matrix.cpp b/src/libjin/Math/Matrix.cpp index 97e9178..39042f0 100644 --- a/src/libjin/Math/Matrix.cpp +++ b/src/libjin/Math/Matrix.cpp @@ -173,5 +173,5 @@ namespace math } } -} -}
\ No newline at end of file +} // math +} // jin
\ No newline at end of file diff --git a/src/libjin/Math/Matrix.h b/src/libjin/Math/Matrix.h index ff4a51a..8e5d1f1 100644 --- a/src/libjin/Math/Matrix.h +++ b/src/libjin/Math/Matrix.h @@ -147,7 +147,7 @@ namespace math }; -} -} +} // math +} // jin -#endif +#endif
\ No newline at end of file diff --git a/src/libjin/Math/Quad.h b/src/libjin/Math/Quad.h index a50cc9e..350a0d9 100644 --- a/src/libjin/Math/Quad.h +++ b/src/libjin/Math/Quad.h @@ -11,7 +11,7 @@ namespace math float x, y, w, h; }; -} -} +} // math +} // jin -#endif +#endif
\ No newline at end of file diff --git a/src/libjin/Math/Vector.cpp b/src/libjin/Math/Vector.cpp index 3e44d70..b4e347a 100644 --- a/src/libjin/Math/Vector.cpp +++ b/src/libjin/Math/Vector.cpp @@ -20,5 +20,5 @@ namespace math { } -} -}
\ No newline at end of file +} // math +} // jin
\ No newline at end of file diff --git a/src/libjin/Net/Net.cpp b/src/libjin/Net/Net.cpp index db39be7..511de1a 100644 --- a/src/libjin/Net/Net.cpp +++ b/src/libjin/Net/Net.cpp @@ -20,5 +20,5 @@ namespace net } -} -} +} // net +} // jin
\ No newline at end of file diff --git a/src/libjin/Net/Net.h b/src/libjin/Net/Net.h index 54ffede..b10f5f2 100644 --- a/src/libjin/Net/Net.h +++ b/src/libjin/Net/Net.h @@ -23,8 +23,8 @@ namespace net void quitSystem() override; }; -} -} +} // net +} // jin #endif // JIN_MODULES_NET #endif // __JIN_NET_H
\ No newline at end of file diff --git a/src/libjin/Net/Socket.cpp b/src/libjin/Net/Socket.cpp index cfc593a..dfa793d 100644 --- a/src/libjin/Net/Socket.cpp +++ b/src/libjin/Net/Socket.cpp @@ -186,5 +186,5 @@ namespace net } } -} -}
\ No newline at end of file +} // net +} // jin
\ No newline at end of file diff --git a/src/libjin/Net/net.cpp b/src/libjin/Net/net.cpp index db39be7..511de1a 100644 --- a/src/libjin/Net/net.cpp +++ b/src/libjin/Net/net.cpp @@ -20,5 +20,5 @@ namespace net } -} -} +} // net +} // jin
\ No newline at end of file diff --git a/src/libjin/Net/net.h b/src/libjin/Net/net.h index 54ffede..b10f5f2 100644 --- a/src/libjin/Net/net.h +++ b/src/libjin/Net/net.h @@ -23,8 +23,8 @@ namespace net void quitSystem() override; }; -} -} +} // net +} // jin #endif // JIN_MODULES_NET #endif // __JIN_NET_H
\ No newline at end of file diff --git a/src/libjin/Time/Timer.cpp b/src/libjin/Time/Timer.cpp index cfdb4bd..a178ae5 100644 --- a/src/libjin/Time/Timer.cpp +++ b/src/libjin/Time/Timer.cpp @@ -94,7 +94,7 @@ namespace time return true; } -} -} +} // time +} // jin #endif // JIN_MODULES_TIME
\ No newline at end of file diff --git a/src/libjin/audio/audio.cpp b/src/libjin/audio/audio.cpp index 5fb10da..1ccafcd 100644 --- a/src/libjin/audio/audio.cpp +++ b/src/libjin/audio/audio.cpp @@ -9,7 +9,7 @@ namespace jin namespace audio { -} -} +} // audio +} // jin #endif // JIN_MODULES_AUDIO
\ No newline at end of file diff --git a/src/libjin/audio/audio.h b/src/libjin/audio/audio.h index 6c3468e..255f88b 100644 --- a/src/libjin/audio/audio.h +++ b/src/libjin/audio/audio.h @@ -12,6 +12,7 @@ namespace jin { namespace audio { + class Source; template<class SubAudio> @@ -46,8 +47,8 @@ namespace audio State state; }; -} -} +} // audio +} // jin #endif // JIN_MODULES_AUDIO #endif // __JIN_AUDIO_H
\ No newline at end of file diff --git a/src/libjin/audio/source.cpp b/src/libjin/audio/source.cpp index 61f4055..ae3c19b 100644 --- a/src/libjin/audio/source.cpp +++ b/src/libjin/audio/source.cpp @@ -23,6 +23,7 @@ namespace audio return SourceType::INVALID; } -} -} +} // audio +} // jin + #endif // JIN_MODULES_AUDIO
\ No newline at end of file diff --git a/src/libjin/audio/source.h b/src/libjin/audio/source.h index 3abe7de..70d6fae 100644 --- a/src/libjin/audio/source.h +++ b/src/libjin/audio/source.h @@ -44,8 +44,8 @@ namespace audio }; -} -} +} // audio +} // jin #endif // JIN_MODULES_AUDIO #endif // __JIN_AUDIO_SOURCE_H
\ No newline at end of file diff --git a/src/libjin/input/event.cpp b/src/libjin/input/event.cpp index 8eb45e6..3edff01 100644 --- a/src/libjin/input/event.cpp +++ b/src/libjin/input/event.cpp @@ -4,4 +4,4 @@ namespace jin { -}
\ No newline at end of file +} // jin
\ No newline at end of file diff --git a/src/libjin/input/joypad.h b/src/libjin/input/joypad.h index e8d309b..62ce076 100644 --- a/src/libjin/input/joypad.h +++ b/src/libjin/input/joypad.h @@ -8,7 +8,7 @@ namespace input -} -} +} // input +} // jin #endif
\ No newline at end of file diff --git a/src/libjin/input/keyboard.h b/src/libjin/input/keyboard.h index 3e78ab1..49ee90f 100644 --- a/src/libjin/input/keyboard.h +++ b/src/libjin/input/keyboard.h @@ -5,11 +5,13 @@ namespace jin { namespace input { + class Keyboard { }; -} -} + +} // input +} // jin #endif // __JIN_KEYBOARD_H
\ No newline at end of file diff --git a/src/libjin/input/mouse.cpp b/src/libjin/input/mouse.cpp index 98c4a39..a3c8e27 100644 --- a/src/libjin/input/mouse.cpp +++ b/src/libjin/input/mouse.cpp @@ -11,12 +11,12 @@ namespace input void Mouse::getState(int* x, int* y) { -#ifdef JIN_INPUT_SDL + #ifdef JIN_INPUT_SDL SDL_GetMouseState(x, y); -#endif // JIN_INPUT_SDL + #endif // JIN_INPUT_SDL } } // input } // jin -#endif // JIN_MODULES_INPUT
\ No newline at end of file +#endif // JIN_MODULES_INPUT
\ No newline at end of file diff --git a/src/libjin/input/mouse.h b/src/libjin/input/mouse.h index 5fc6b47..584c516 100644 --- a/src/libjin/input/mouse.h +++ b/src/libjin/input/mouse.h @@ -9,21 +9,22 @@ namespace jin { namespace input { + class Mouse : public Singleton<Mouse> { public: - - // void getState(int* x, int* y); private: + SINGLETON(Mouse); + Mouse() {}; ~Mouse() {}; - SINGLETON(Mouse); }; -} -} + +} // input +} // jin #endif // JIN_MODULES_INPUT #endif // __JIN_MOUSE_H
\ No newline at end of file diff --git a/src/libjin/math/math.h b/src/libjin/math/math.h index 2bc8ed9..d496b85 100644 --- a/src/libjin/math/math.h +++ b/src/libjin/math/math.h @@ -71,7 +71,7 @@ namespace math return a + t * (b - a); } -} -} +} // math +} // jin #endif
\ No newline at end of file diff --git a/src/libjin/math/matrix.cpp b/src/libjin/math/matrix.cpp index 97e9178..39042f0 100644 --- a/src/libjin/math/matrix.cpp +++ b/src/libjin/math/matrix.cpp @@ -173,5 +173,5 @@ namespace math } } -} -}
\ No newline at end of file +} // math +} // jin
\ No newline at end of file diff --git a/src/libjin/math/matrix.h b/src/libjin/math/matrix.h index ff4a51a..8e5d1f1 100644 --- a/src/libjin/math/matrix.h +++ b/src/libjin/math/matrix.h @@ -147,7 +147,7 @@ namespace math }; -} -} +} // math +} // jin -#endif +#endif
\ No newline at end of file diff --git a/src/libjin/math/quad.h b/src/libjin/math/quad.h index a50cc9e..350a0d9 100644 --- a/src/libjin/math/quad.h +++ b/src/libjin/math/quad.h @@ -11,7 +11,7 @@ namespace math float x, y, w, h; }; -} -} +} // math +} // jin -#endif +#endif
\ No newline at end of file diff --git a/src/libjin/math/vector.cpp b/src/libjin/math/vector.cpp index 3e44d70..b4e347a 100644 --- a/src/libjin/math/vector.cpp +++ b/src/libjin/math/vector.cpp @@ -20,5 +20,5 @@ namespace math { } -} -}
\ No newline at end of file +} // math +} // jin
\ No newline at end of file diff --git a/src/libjin/net/net.cpp b/src/libjin/net/net.cpp index db39be7..511de1a 100644 --- a/src/libjin/net/net.cpp +++ b/src/libjin/net/net.cpp @@ -20,5 +20,5 @@ namespace net } -} -} +} // net +} // jin
\ No newline at end of file diff --git a/src/libjin/net/net.h b/src/libjin/net/net.h index 54ffede..b10f5f2 100644 --- a/src/libjin/net/net.h +++ b/src/libjin/net/net.h @@ -23,8 +23,8 @@ namespace net void quitSystem() override; }; -} -} +} // net +} // jin #endif // JIN_MODULES_NET #endif // __JIN_NET_H
\ No newline at end of file diff --git a/src/lua/modules/audio/audio.cpp b/src/lua/modules/audio/audio.cpp index 8e11b88..3d29e17 100644 --- a/src/lua/modules/audio/audio.cpp +++ b/src/lua/modules/audio/audio.cpp @@ -106,5 +106,6 @@ namespace lua return 1; } -} -}
\ No newline at end of file + +} // lua +} // jin
\ No newline at end of file diff --git a/src/lua/modules/bit/bit.cpp b/src/lua/modules/bit/bit.cpp index 5b18125..c1ca840 100644 --- a/src/lua/modules/bit/bit.cpp +++ b/src/lua/modules/bit/bit.cpp @@ -80,5 +80,5 @@ namespace lua return 1; } -} -}
\ No newline at end of file +} // lua +} // jin
\ No newline at end of file diff --git a/src/lua/modules/core/core.cpp b/src/lua/modules/core/core.cpp index 0243554..4a370db 100644 --- a/src/lua/modules/core/core.cpp +++ b/src/lua/modules/core/core.cpp @@ -5,6 +5,7 @@ namespace jin { namespace lua { + using namespace jin::core; static int l_running(lua_State* L) @@ -40,5 +41,6 @@ namespace lua return 1; } -} -}
\ No newline at end of file + +} // lua +} // jin
\ No newline at end of file diff --git a/src/lua/modules/filesystem/filesystem.cpp b/src/lua/modules/filesystem/filesystem.cpp index e1d496e..f377f0c 100644 --- a/src/lua/modules/filesystem/filesystem.cpp +++ b/src/lua/modules/filesystem/filesystem.cpp @@ -135,5 +135,5 @@ namespace lua return 0; } -} // filesystem +} // lua } // jin
\ No newline at end of file diff --git a/src/lua/modules/graphics/canvas.cpp b/src/lua/modules/graphics/canvas.cpp index f42dfba..85ac49a 100644 --- a/src/lua/modules/graphics/canvas.cpp +++ b/src/lua/modules/graphics/canvas.cpp @@ -71,5 +71,5 @@ namespace lua return 0; } -}// lua -}// jin
\ No newline at end of file +} // lua +} // jin
\ No newline at end of file diff --git a/src/lua/modules/graphics/texture.cpp b/src/lua/modules/graphics/texture.cpp index 5bc208a..d1d187d 100644 --- a/src/lua/modules/graphics/texture.cpp +++ b/src/lua/modules/graphics/texture.cpp @@ -85,5 +85,5 @@ namespace lua return 0; } -}// graphics +}// lua }// jin
\ No newline at end of file diff --git a/src/lua/modules/joypad/joypad.cpp b/src/lua/modules/joypad/joypad.cpp index d305878..e951702 100644 --- a/src/lua/modules/joypad/joypad.cpp +++ b/src/lua/modules/joypad/joypad.cpp @@ -17,5 +17,5 @@ namespace lua return 1; } -} -}
\ No newline at end of file +} // lua +} // jin
\ No newline at end of file diff --git a/src/lua/modules/keyboard/keyboard.cpp b/src/lua/modules/keyboard/keyboard.cpp index 0df9562..1866211 100644 --- a/src/lua/modules/keyboard/keyboard.cpp +++ b/src/lua/modules/keyboard/keyboard.cpp @@ -13,5 +13,5 @@ namespace lua return 1; } -} -}
\ No newline at end of file +} // lua +} // jin
\ No newline at end of file diff --git a/src/lua/modules/math/math.cpp b/src/lua/modules/math/math.cpp index fa59e04..dafec72 100644 --- a/src/lua/modules/math/math.cpp +++ b/src/lua/modules/math/math.cpp @@ -26,5 +26,5 @@ namespace lua return 1; } -} -}
\ No newline at end of file +} // lua +} // jin
\ No newline at end of file diff --git a/src/lua/modules/mouse/mouse.cpp b/src/lua/modules/mouse/mouse.cpp index b7ce933..a43c275 100644 --- a/src/lua/modules/mouse/mouse.cpp +++ b/src/lua/modules/mouse/mouse.cpp @@ -5,6 +5,7 @@ namespace jin { namespace lua { + using namespace jin::input; static int l_pos(lua_State* L) @@ -35,5 +36,6 @@ namespace lua luax_newlib(L, f); return 1; } -} -}
\ No newline at end of file + +} // lua +} // jin
\ No newline at end of file diff --git a/src/main.cpp b/src/main.cpp index 8bd308b..f0abd16 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,6 @@ #ifdef _WIN32 -# include <SDL2/SDL_Main.h> -# include <direct.h> +#include <SDL2/SDL_Main.h> +#include <direct.h> #endif #include "lua/modules/luax.h" |