Browse Source

- added new Mouse / Keyboard module

Patrick-Christopher Mattulat 3 years ago
parent
commit
61b53a32ce
36 changed files with 605 additions and 623 deletions
  1. 23 23
      CMakeLists.txt
  2. 7 15
      LynarMoon/engine/LynarMoon.cpp
  3. 13 15
      LynarMoon/engine/LynarMoon.h
  4. 2 2
      LynarMoon/engine/Module/Font/FontModule.cpp
  5. 1 1
      LynarMoon/engine/Module/Font/FontModule.h
  6. 0 0
      LynarMoon/engine/Module/Keyboard/KeyboardKeys.h
  7. 455 453
      LynarMoon/engine/Module/Keyboard/KeyboardModule.cpp
  8. 5 8
      LynarMoon/engine/Module/Keyboard/KeyboardModule.h
  9. 1 1
      LynarMoon/engine/Module/Line/LineModule.cpp
  10. 4 4
      LynarMoon/engine/Module/Line/LineModule.h
  11. 0 0
      LynarMoon/engine/Module/Model/ModelCloneModule.cpp
  12. 2 2
      LynarMoon/engine/Module/Model/ModelCloneModule.h
  13. 4 4
      LynarMoon/engine/Module/Model/ModelModule.cpp
  14. 4 4
      LynarMoon/engine/Module/Model/ModelModule.h
  15. 33 37
      LynarMoon/engine/Module/Mouse/MouseModule.cpp
  16. 7 10
      LynarMoon/engine/Module/Mouse/MouseModule.h
  17. 2 2
      LynarMoon/engine/Module/Music/MusicModule.cpp
  18. 1 1
      LynarMoon/engine/Module/Music/MusicModule.h
  19. 1 1
      LynarMoon/engine/Module/Point/PointModule.cpp
  20. 5 5
      LynarMoon/engine/Module/Point/PointModule.h
  21. 2 2
      LynarMoon/engine/Module/Sound/SoundModule.cpp
  22. 1 1
      LynarMoon/engine/Module/Sound/SoundModule.h
  23. 2 2
      LynarMoon/engine/Module/Text/TextModule.cpp
  24. 6 6
      LynarMoon/engine/Module/Text/TextModule.h
  25. 1 1
      LynarMoon/engine/Module/TimeEvent/TimeEventModule.cpp
  26. 1 1
      LynarMoon/engine/Module/TimeEvent/TimeEventModule.h
  27. 1 1
      LynarMoon/engine/Renderer/ModelRendererInfo.h
  28. 12 12
      LynarMoon/lib/SDL/src/SDL2/Xcode-iOS/Demos/Demos.xcodeproj/project.pbxproj
  29. 1 1
      LynarMoon/lib/SDL/src/SDL2/Xcode-iOS/Demos/README
  30. 1 1
      LynarMoon/lib/SDL/src/SDL2/docs/README-ios.md
  31. 1 1
      LynarMoon/lib/SDL/src/SDL2/docs/README-psp.md
  32. 1 1
      LynarMoon/lib/SDL/src/SDL2/docs/README-winrt.md
  33. 2 2
      LynarMoon/lib/SDL/src/SDL2/include/SDL_events.h
  34. 1 1
      LynarMoon/lib/SDL/src/SDL2_image/external/libwebp-0.6.0/README
  35. 1 1
      LynarMoon/lib/SDL/src/SDL2_ttf/external/freetype-2.4.12/ChangeLog.23
  36. 1 1
      LynarMoon/lib/SDL/src/SDL2_ttf/external/freetype-2.4.12/src/gxvalid/README

+ 23 - 23
CMakeLists.txt

@@ -107,51 +107,51 @@ add_library(${TARGET}
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/tools/MessageBox/MessageBox.h
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/tools/MessageBox/MessageBox.cpp
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Error/ErrorHandler.cpp
-        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Mouse/Mouse.h
-        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Mouse/Mouse.cpp
-        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Keyboard/Keyboard.h
-        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Keyboard/Keyboard.cpp
-        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Keyboard/KeyboardKeys.h
+        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/Mouse/MouseModule.h
+        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/Mouse/MouseModule.cpp
+        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/Keyboard/KeyboardModule.h
+        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/Keyboard/KeyboardModule.cpp
+        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/Keyboard/KeyboardKeys.h
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/tools/Color/Color.h
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/tools/Color/ColorValue.h
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/tools/Color/Color.cpp
-        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/TimeEventModule.h
-        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/TimeEventModule.cpp
+        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/TimeEvent/TimeEventModule.h
+        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/TimeEvent/TimeEventModule.cpp
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/tools/List/SmartList.h
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Interface/IdentifiedObject.h
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/ModuleLayer/TimeEventLayer.cpp
-        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/SoundModule.cpp
-        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/SoundModule.h
+        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/Sound/SoundModule.cpp
+        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/Sound/SoundModule.h
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/ModuleLayer/SoundLayer.cpp
-        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/MusicModule.h
-        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/MusicModule.cpp
+        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/Music/MusicModule.h
+        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/Music/MusicModule.cpp
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/ModuleLayer/MusicLayer.cpp
-        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/FontModule.h
-        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/FontModule.cpp
+        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/Font/FontModule.h
+        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/Font/FontModule.cpp
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/ModuleLayer/FontLayer.cpp
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Zindex/ZindexInfo.h
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/Module.h
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Zindex/Zindex.h
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Zindex/Zindex.cpp
-        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/LineModule.h
-        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/LineModule.cpp
+        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/Line/LineModule.h
+        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/Line/LineModule.cpp
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/ModuleLayer/LineLayer.cpp
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Renderer/LineRendererInfo.h
-        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/PointModule.h
+        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/Point/PointModule.h
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Renderer/PointRendererInfo.h
-        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/PointModule.cpp
+        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/Point/PointModule.cpp
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Transformation/Direction.h
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Transformation/Direction.cpp
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/ModuleLayer/PointLayer.cpp
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Renderer/TextRendererInfo.h
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Texture/Texture.h
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Texture/Texture.cpp
-        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/TextModule.h
-        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/TextModule.cpp
+        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/Text/TextModule.h
+        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/Text/TextModule.cpp
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/ModuleLayer/TextLayer.cpp
-        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/ModelModule.h
+        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/Model/ModelModule.h
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Renderer/ModelRendererInfo.h
-        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/ModelModule.cpp
+        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/Model/ModelModule.cpp
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/ModuleLayer/ModelLayer.cpp
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/SetUp/SetUp.h
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/SetUp/SetUp.cpp
@@ -160,8 +160,8 @@ add_library(${TARGET}
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Texture/PartialTextureArea.cpp
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/SDLCommunicator/SDLCommunicator.h
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/SDLCommunicator/SDLCommunicator.cpp
-        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/ModelCloneModule.h
-        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/ModelCloneModule.cpp
+        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/Model/ModelCloneModule.h
+        ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Module/Model/ModelCloneModule.cpp
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/Renderer/ModelCloneRendererInfo.h
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/SDLHandler/SDLHandler.h
         ${CMAKE_CURRENT_LIST_DIR}/LynarMoon/engine/SDLHandler/SDLHandler.cpp

+ 7 - 15
LynarMoon/engine/LynarMoon.cpp

@@ -43,6 +43,8 @@ timestamp(0),
 timestep(0.0f)
 {
   this->setup = SetUp("SetUp.txt");
+  this->Keyboard = std::make_shared<KeyboardModule>();
+  this->Mouse = std::make_shared<MouseModule>();
 }
 
 LynarMoon::~LynarMoon()
@@ -441,9 +443,9 @@ int LynarMoon::writeVersion()
 void LynarMoon::beginFrame()
 {
   this->timestamp.store(this->getTimestamp());
-  this->scanKeyboard(this->event);
-  this->scanMouse(this->event);
-  this->getMouseState();
+  this->Keyboard->scanKeys(this->event);
+  this->Mouse->scanKeys(this->event);
+  this->Mouse->getMouseState();
 }
 
 void LynarMoon::delay(uint32_t milliseconds)
@@ -506,8 +508,8 @@ void LynarMoon::endFrame()
     this->fps.store(1000 / (uint32_t) (this->timestep.load() * 1000));
   }
 
-  this->freeKeyboard();
-  this->freeMouse();
+  this->Keyboard->freeKeys();
+  this->Mouse->freeKeys();
 }
 
 uint32_t LynarMoon::getAmountOfSoundChannels()
@@ -530,21 +532,11 @@ uint32_t LynarMoon::getFps()
   return (this->fps.load() >= this->getMaxFrameRate()) ? this->getMaxFrameRate() : this->fps.load();
 }
 
-Keyboard LynarMoon::getKeyboard()
-{
-  return this->keyboard;
-}
-
 int LynarMoon::getMaxFrameRate()
 {
   return this->window->getDisplayMode().refresh_rate;
 }
 
-Mouse LynarMoon::getMouse()
-{
-  return this->mouse;
-}
-
 const std::string LynarMoon::getPrefPath()
 {
   return this->prefPath;

+ 13 - 15
LynarMoon/engine/LynarMoon.h

@@ -18,22 +18,22 @@
 #include "../tools/File/LogFileHandler.h"
 #include "Error/ErrorHandler.h"
 #include "../tools/ThreadSafety/ThreadSafeSharedPtr.h"
-#include "Mouse/Mouse.h"
+#include "Module/Mouse/MouseModule.h"
 #include "../tools/Color/Color.h"
 #include "../tools/List/SmartList.h"
-#include "Module/TimeEventModule.h"
-#include "Module/SoundModule.h"
-#include "Module/MusicModule.h"
-#include "Keyboard/Keyboard.h"
-#include "Module/FontModule.h"
-#include "Module/LineModule.h"
+#include "Module/TimeEvent/TimeEventModule.h"
+#include "Module/Sound/SoundModule.h"
+#include "Module/Music/MusicModule.h"
+#include "Module/Keyboard/KeyboardModule.h"
+#include "Module/Font/FontModule.h"
+#include "Module/Line/LineModule.h"
 #include "Zindex/Zindex.h"
-#include "Module/PointModule.h"
-#include "Module/TextModule.h"
-#include "Module/ModelModule.h"
+#include "Module/Point/PointModule.h"
+#include "Module/Text/TextModule.h"
+#include "Module/Model/ModelModule.h"
 #include "SetUp/SetUp.h"
 
-class LynarMoon : Mouse, Keyboard
+class LynarMoon
 {
   private:
 
@@ -345,11 +345,9 @@ class LynarMoon : Mouse, Keyboard
     std::atomic<bool> initializedIMG;
     std::atomic<bool> initializedSound;
     std::atomic<bool> initializedTTF;
-    Keyboard keyboard;
     std::shared_ptr<SmartList<LineModule>> lineModuleList;
     std::string logFileName;
     std::shared_ptr<SmartList<ModelModule>> modelModuleList;
-    Mouse mouse;
     std::atomic<uint32_t> numberOfSoundChannels;
     std::atomic<uint8_t> operatingSystem;
     std::shared_ptr<SmartList<PointModule>> pointModuleList;
@@ -388,9 +386,7 @@ class LynarMoon : Mouse, Keyboard
     const std::string getAppName();
     _ColorValue_d getBackgroundColor();
     uint32_t getFps();
-    Keyboard getKeyboard();
     int getMaxFrameRate();
-    Mouse getMouse();
     const std::string getPrefPath();
     int getScreenHeight();
     int getScreenWidth();
@@ -408,8 +404,10 @@ class LynarMoon : Mouse, Keyboard
     // modules
 
     std::shared_ptr<FontLayer> Font;
+    std::shared_ptr<KeyboardModule> Keyboard;
     std::shared_ptr<LineLayer> Line;
     std::shared_ptr<ModelLayer> Model;
+    std::shared_ptr<MouseModule> Mouse;
     std::shared_ptr<MusicLayer> Music;
     std::shared_ptr<PointLayer> Point;
     std::shared_ptr<SoundLayer> Sound;

+ 2 - 2
LynarMoon/engine/Module/FontModule.cpp → LynarMoon/engine/Module/Font/FontModule.cpp

@@ -6,8 +6,8 @@
  */
 
 #include "FontModule.h"
-#include "../Error/ErrorCodes.h"
-#include "Module.h"
+#include "../../Error/ErrorCodes.h"
+#include "../Module.h"
 
 //////////////////////////////////////////////////
 //////////////////////////////////////////////////

+ 1 - 1
LynarMoon/engine/Module/FontModule.h → LynarMoon/engine/Module/Font/FontModule.h

@@ -12,7 +12,7 @@
 #include <SDL_ttf.h>
 #include <memory>
 #include <mutex>
-#include "../Interface/IdentifiedObject.h"
+#include "../../Interface/IdentifiedObject.h"
 
 class FontModule : public IdentifiedObject
 {

+ 0 - 0
LynarMoon/engine/Keyboard/KeyboardKeys.h → LynarMoon/engine/Module/Keyboard/KeyboardKeys.h


File diff suppressed because it is too large
+ 455 - 453
LynarMoon/engine/Module/Keyboard/KeyboardModule.cpp


+ 5 - 8
LynarMoon/engine/Keyboard/Keyboard.h → LynarMoon/engine/Module/Keyboard/KeyboardModule.h

@@ -28,7 +28,7 @@
 //////////////////////////////////////////////////
 //////////////////////////////////////////////////
 
-class Keyboard
+class KeyboardModule
 {
   private:
 
@@ -36,17 +36,14 @@ class Keyboard
 
     void freeKeyboardKey(uint8_t&);
 
-  protected:
-
-    void freeKeyboard();
-    void scanKeyboard(SDL_Event);
-
   public:
 
-    Keyboard();
-    ~Keyboard();
+    KeyboardModule();
+    ~KeyboardModule();
 
+    void freeKeys();
     bool hasEvent(uint32_t, SDL_Keycode);
+    void scanKeys(SDL_Event);
 };
 
 #endif

+ 1 - 1
LynarMoon/engine/Module/LineModule.cpp → LynarMoon/engine/Module/Line/LineModule.cpp

@@ -6,7 +6,7 @@
  */
 
 #include "LineModule.h"
-#include "Module.h"
+#include "../Module.h"
 
 //////////////////////////////////////////////////
 //////////////////////////////////////////////////

+ 4 - 4
LynarMoon/engine/Module/LineModule.h → LynarMoon/engine/Module/Line/LineModule.h

@@ -8,10 +8,10 @@
 #ifndef LINEMODULE_H
 #define LINEMODULE_H
 
-#include "../Interface/IdentifiedObject.h"
-#include "../Zindex/ZindexInfo.h"
-#include "../../tools/Color/Color.h"
-#include "../Renderer/LineRendererInfo.h"
+#include "../../Interface/IdentifiedObject.h"
+#include "../../Zindex/ZindexInfo.h"
+#include "../../../tools/Color/Color.h"
+#include "../../Renderer/LineRendererInfo.h"
 #include <LynarMathStructs.h>
 #include <atomic>
 

+ 0 - 0
LynarMoon/engine/Module/ModelCloneModule.cpp → LynarMoon/engine/Module/Model/ModelCloneModule.cpp


+ 2 - 2
LynarMoon/engine/Module/ModelCloneModule.h → LynarMoon/engine/Module/Model/ModelCloneModule.h

@@ -9,8 +9,8 @@
 #define MODELCLONEMODULE_H
 
 #include <atomic>
-#include "../Interface/IdentifiedObject.h"
-#include "../Renderer/ModelCloneRendererInfo.h"
+#include "../../Interface/IdentifiedObject.h"
+#include "../../Renderer/ModelCloneRendererInfo.h"
 
 class ModelCloneModule : IdentifiedObject
 {

+ 4 - 4
LynarMoon/engine/Module/ModelModule.cpp → LynarMoon/engine/Module/Model/ModelModule.cpp

@@ -6,10 +6,10 @@
  */
 
 #include "ModelModule.h"
-#include "../Sort/Sort.h"
-#include "../SDLCommunicator/SDLCommunicator.h"
-#include "../SDLHandler/SDLHandler.h"
-#include "../../tools/Color/ColorMask.h"
+#include "../../Sort/Sort.h"
+#include "../../SDLCommunicator/SDLCommunicator.h"
+#include "../../SDLHandler/SDLHandler.h"
+#include "../../../tools/Color/ColorMask.h"
 
 //////////////////////////////////////////////////
 //////////////////////////////////////////////////

+ 4 - 4
LynarMoon/engine/Module/ModelModule.h → LynarMoon/engine/Module/Model/ModelModule.h

@@ -9,10 +9,10 @@
 #define MODULEMODEL_H
 
 #include <LynarMathStructs.h>
-#include "../Interface/IdentifiedObject.h"
-#include "../Zindex/ZindexInfo.h"
-#include "../Renderer/ModelRendererInfo.h"
-#include "../Transformation/Direction.h"
+#include "../../Interface/IdentifiedObject.h"
+#include "../../Zindex/ZindexInfo.h"
+#include "../../Renderer/ModelRendererInfo.h"
+#include "../../Transformation/Direction.h"
 
 class ModelModule : IdentifiedObject
 {

+ 33 - 37
LynarMoon/engine/Mouse/Mouse.cpp → LynarMoon/engine/Module/Mouse/MouseModule.cpp

@@ -5,7 +5,7 @@
  * last updated:      25.08.2018
  */
 
-#include "Mouse.h"
+#include "MouseModule.h"
 #include <SDL.h>
 
 //////////////////////////////////////////////////
@@ -14,20 +14,22 @@
 //////////////////////////////////////////////////
 //////////////////////////////////////////////////
 
-Mouse::Mouse()
+MouseModule::MouseModule():
+leftButton(0),
+rightButton(0)
 {
   this->position = {0.0f, 0.0f};
 }
 
-Mouse::~Mouse() = default;
+MouseModule::~MouseModule() = default;
 
 //////////////////////////////////////////////////
 //////////////////////////////////////////////////
-//// protected
+//// public
 //////////////////////////////////////////////////
 //////////////////////////////////////////////////
 
-void Mouse::freeMouse()
+void MouseModule::freeKeys()
 {
   if(this->leftButton == LE_MOUSE_BUTTON_RELEASED) {
     this->leftButton = LE_MOUSE_BUTTON_INACTIVE;
@@ -38,27 +40,34 @@ void Mouse::freeMouse()
   }
 }
 
-void Mouse::getMouseState()
+void MouseModule::getMouseState()
 {
   SDL_Point point = {(int) this->position.x, (int) this->position.y};
   SDL_GetMouseState(&(point.x), &(point.y));
 }
 
-void Mouse::scanMouse(SDL_Event event)
+LynarMath::_Point_d MouseModule::getPosition()
 {
-  switch(event.type)
+  return this->position;
+}
+
+bool MouseModule::hasEvent(uint32_t state, uint8_t button)
+{
+  bool flag = false;
+
+  switch(state)
   {
     case SDL_MOUSEBUTTONDOWN:
     {
-      switch(event.button.button)
+      switch(button)
       {
         case SDL_BUTTON_LEFT:
         {
-          this->leftButton = LE_MOUSE_BUTTON_PRESSED;
+          flag = (this->leftButton == LE_MOUSE_BUTTON_PRESSED);
         } break;
         case SDL_BUTTON_RIGHT:
         {
-          this->rightButton = LE_MOUSE_BUTTON_PRESSED;
+          flag = (this->rightButton == LE_MOUSE_BUTTON_PRESSED);
         } break;
         default:
         {} break;
@@ -66,15 +75,15 @@ void Mouse::scanMouse(SDL_Event event)
     } break;
     case SDL_MOUSEBUTTONUP:
     {
-      switch(event.button.button)
+      switch(button)
       {
         case SDL_BUTTON_LEFT:
         {
-          this->leftButton = LE_MOUSE_BUTTON_RELEASED;
+          flag = (this->leftButton == LE_MOUSE_BUTTON_RELEASED);
         } break;
         case SDL_BUTTON_RIGHT:
         {
-          this->rightButton = LE_MOUSE_BUTTON_RELEASED;
+          flag = (this->rightButton == LE_MOUSE_BUTTON_RELEASED);
         } break;
         default:
         {} break;
@@ -83,31 +92,25 @@ void Mouse::scanMouse(SDL_Event event)
     default:
     {} break;
   };
-}
 
-//////////////////////////////////////////////////
-//////////////////////////////////////////////////
-//// public
-//////////////////////////////////////////////////
-//////////////////////////////////////////////////
+  return flag;
+}
 
-bool Mouse::hasEvent(uint32_t state, uint8_t button)
+void MouseModule::scanKeys(SDL_Event event)
 {
-  bool flag = false;
-
-  switch(state)
+  switch(event.type)
   {
     case SDL_MOUSEBUTTONDOWN:
     {
-      switch(button)
+      switch(event.button.button)
       {
         case SDL_BUTTON_LEFT:
         {
-          flag = (this->leftButton == LE_MOUSE_BUTTON_PRESSED);
+          this->leftButton = LE_MOUSE_BUTTON_PRESSED;
         } break;
         case SDL_BUTTON_RIGHT:
         {
-          flag = (this->rightButton == LE_MOUSE_BUTTON_PRESSED);
+          this->rightButton = LE_MOUSE_BUTTON_PRESSED;
         } break;
         default:
         {} break;
@@ -115,15 +118,15 @@ bool Mouse::hasEvent(uint32_t state, uint8_t button)
     } break;
     case SDL_MOUSEBUTTONUP:
     {
-      switch(button)
+      switch(event.button.button)
       {
         case SDL_BUTTON_LEFT:
         {
-          flag = (this->leftButton == LE_MOUSE_BUTTON_RELEASED);
+          this->leftButton = LE_MOUSE_BUTTON_RELEASED;
         } break;
         case SDL_BUTTON_RIGHT:
         {
-          flag = (this->rightButton == LE_MOUSE_BUTTON_RELEASED);
+          this->rightButton = LE_MOUSE_BUTTON_RELEASED;
         } break;
         default:
         {} break;
@@ -132,11 +135,4 @@ bool Mouse::hasEvent(uint32_t state, uint8_t button)
     default:
     {} break;
   };
-
-  return flag;
-}
-
-LynarMath::_Point_d Mouse::getPosition()
-{
-  return this->position;
 }

+ 7 - 10
LynarMoon/engine/Mouse/Mouse.h → LynarMoon/engine/Module/Mouse/MouseModule.h

@@ -27,7 +27,7 @@
 //////////////////////////////////////////////////
 //////////////////////////////////////////////////
 
-class Mouse
+class MouseModule
 {
   private:
 
@@ -35,19 +35,16 @@ class Mouse
     uint8_t leftButton;
     uint8_t rightButton;
 
-  protected:
-
-    void freeMouse();
-    void getMouseState();
-    void scanMouse(SDL_Event);
-
   public:
 
-    Mouse();
-    ~Mouse();
+    MouseModule();
+    ~MouseModule();
 
-    bool hasEvent(uint32_t, uint8_t);
+    void freeKeys();
+    void getMouseState();
     LynarMath::_Point_d getPosition();
+    bool hasEvent(uint32_t, uint8_t);
+    void scanKeys(SDL_Event);
 };
 
 #endif

+ 2 - 2
LynarMoon/engine/Module/MusicModule.cpp → LynarMoon/engine/Module/Music/MusicModule.cpp

@@ -7,8 +7,8 @@
 
 #include <SDL_mixer.h>
 #include "MusicModule.h"
-#include "../../engine/Error/ErrorCodes.h"
-#include "Module.h"
+#include "../../Error/ErrorCodes.h"
+#include "../../Module/Module.h"
 
 //////////////////////////////////////////////////
 //////////////////////////////////////////////////

+ 1 - 1
LynarMoon/engine/Module/MusicModule.h → LynarMoon/engine/Module/Music/MusicModule.h

@@ -13,7 +13,7 @@
 #include <mutex>
 #include <memory>
 #include <SDL_mixer.h>
-#include "../Interface/IdentifiedObject.h"
+#include "../../Interface/IdentifiedObject.h"
 
 class MusicModule : public IdentifiedObject
 {

+ 1 - 1
LynarMoon/engine/Module/PointModule.cpp → LynarMoon/engine/Module/Point/PointModule.cpp

@@ -6,7 +6,7 @@
  */
 
 #include "PointModule.h"
-#include "Module.h"
+#include "../Module.h"
 
 //////////////////////////////////////////////////
 //////////////////////////////////////////////////

+ 5 - 5
LynarMoon/engine/Module/PointModule.h → LynarMoon/engine/Module/Point/PointModule.h

@@ -11,11 +11,11 @@
 #include <atomic>
 #include <vector>
 #include <mutex>
-#include "../Interface/IdentifiedObject.h"
-#include "../Zindex/ZindexInfo.h"
-#include "../Renderer/PointRendererInfo.h"
-#include "../../tools/List/SmartList.h"
-#include "../Transformation/Direction.h"
+#include "../../Interface/IdentifiedObject.h"
+#include "../../Zindex/ZindexInfo.h"
+#include "../../Renderer/PointRendererInfo.h"
+#include "../../../tools/List/SmartList.h"
+#include "../../Transformation/Direction.h"
 
 class PointModule : IdentifiedObject
 {

+ 2 - 2
LynarMoon/engine/Module/SoundModule.cpp → LynarMoon/engine/Module/Sound/SoundModule.cpp

@@ -7,8 +7,8 @@
 
 #include <SDL_mixer.h>
 #include "SoundModule.h"
-#include "../../engine/Error/ErrorCodes.h"
-#include "Module.h"
+#include "../../Error/ErrorCodes.h"
+#include "../Module.h"
 
 //////////////////////////////////////////////////
 //////////////////////////////////////////////////

+ 1 - 1
LynarMoon/engine/Module/SoundModule.h → LynarMoon/engine/Module/Sound/SoundModule.h

@@ -13,7 +13,7 @@
 #include <mutex>
 #include <memory>
 #include <SDL_mixer.h>
-#include "../Interface/IdentifiedObject.h"
+#include "../../Interface/IdentifiedObject.h"
 
 class SoundModule : public IdentifiedObject
 {

+ 2 - 2
LynarMoon/engine/Module/TextModule.cpp → LynarMoon/engine/Module/Text/TextModule.cpp

@@ -6,8 +6,8 @@
  */
 
 #include "TextModule.h"
-#include "../SDLCommunicator/SDLCommunicator.h"
-#include "../SDLHandler/SDLHandler.h"
+#include "../../SDLCommunicator/SDLCommunicator.h"
+#include "../../SDLHandler/SDLHandler.h"
 
 //////////////////////////////////////////////////
 //////////////////////////////////////////////////

+ 6 - 6
LynarMoon/engine/Module/TextModule.h → LynarMoon/engine/Module/Text/TextModule.h

@@ -9,12 +9,12 @@
 #define TEXTMODULE_H
 
 #include <atomic>
-#include "../Interface/IdentifiedObject.h"
-#include "../Renderer/TextRendererInfo.h"
-#include "../Transformation/Direction.h"
-#include "../../tools/List/SmartList.h"
-#include "../Zindex/ZindexInfo.h"
-#include "FontModule.h"
+#include "../../Interface/IdentifiedObject.h"
+#include "../../Renderer/TextRendererInfo.h"
+#include "../../Transformation/Direction.h"
+#include "../../../tools/List/SmartList.h"
+#include "../../Zindex/ZindexInfo.h"
+#include "../../Module/Font/FontModule.h"
 
 //////////////////////////////////////////////////
 //////////////////////////////////////////////////

+ 1 - 1
LynarMoon/engine/Module/TimeEventModule.cpp → LynarMoon/engine/Module/TimeEvent/TimeEventModule.cpp

@@ -6,7 +6,7 @@
  */
 
 #include "TimeEventModule.h"
-#include "Module.h"
+#include "../Module.h"
 
 //////////////////////////////////////////////////
 //////////////////////////////////////////////////

+ 1 - 1
LynarMoon/engine/Module/TimeEventModule.h → LynarMoon/engine/Module/TimeEvent/TimeEventModule.h

@@ -10,7 +10,7 @@
 
 #include <cstdint>
 #include <atomic>
-#include "../Interface/IdentifiedObject.h"
+#include "../../Interface/IdentifiedObject.h"
 
 class TimeEventModule : public IdentifiedObject
 {

+ 1 - 1
LynarMoon/engine/Renderer/ModelRendererInfo.h

@@ -11,7 +11,7 @@
 #include "../Texture/Texture.h"
 #include "../../tools/List/SmartList.h"
 #include "../Zindex/Zindex.h"
-#include "../Module/ModelCloneModule.h"
+#include "../Module/Model/ModelCloneModule.h"
 
 //////////////////////////////////////////////////
 //////////////////////////////////////////////////

+ 12 - 12
LynarMoon/lib/SDL/src/SDL2/Xcode-iOS/Demos/Demos.xcodeproj/project.pbxproj

@@ -253,7 +253,7 @@
 		FDB651CD0E43D19800F688B5 /* ship.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = ship.bmp; sourceTree = "<group>"; };
 		FDB651CE0E43D19800F688B5 /* space.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = space.bmp; sourceTree = "<group>"; };
 		FDB651CF0E43D19800F688B5 /* stroke.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = stroke.bmp; sourceTree = "<group>"; };
-		FDB6520C0E43D1F300F688B5 /* Keyboard.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Keyboard.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		FDB6520C0E43D1F300F688B5 /* KeyboardModule.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = KeyboardModule.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		FDB652110E43D21A00F688B5 /* keyboard.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = keyboard.c; sourceTree = "<group>"; };
 		FDB652C60E43E25900F688B5 /* kromasky_16x16.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = kromasky_16x16.bmp; sourceTree = "<group>"; };
 		FDB96ED30DEFC9C700FAF19F /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
@@ -422,7 +422,7 @@
 				FDC202EE0E107B1200ABAC90 /* Touch.app */,
 				FDF0D6A40E12D05400247964 /* Mixer.app */,
 				FDC52EDE0E2843D6008D768C /* Fireworks.app */,
-				FDB6520C0E43D1F300F688B5 /* Keyboard.app */,
+				FDB6520C0E43D1F300F688B5 /* KeyboardModule.app */,
 				FA30DE961BBF59D9009C397F /* Happy-TV.app */,
 			);
 			name = Products;
@@ -603,9 +603,9 @@
 			productReference = FD5F9BE40E0DEBEA008E885B /* Accel.app */;
 			productType = "com.apple.product-type.application";
 		};
-		FDB651F70E43D1F300F688B5 /* Keyboard */ = {
+		FDB651F70E43D1F300F688B5 /* KeyboardModule */ = {
 			isa = PBXNativeTarget;
-			buildConfigurationList = FDB652090E43D1F300F688B5 /* Build configuration list for PBXNativeTarget "Keyboard" */;
+			buildConfigurationList = FDB652090E43D1F300F688B5 /* Build configuration list for PBXNativeTarget "KeyboardModule" */;
 			buildPhases = (
 				FDB651F80E43D1F300F688B5 /* Resources */,
 				FDB651FC0E43D1F300F688B5 /* Sources */,
@@ -616,9 +616,9 @@
 			dependencies = (
 				049F36A1130CD8A000FF080F /* PBXTargetDependency */,
 			);
-			name = Keyboard;
+			name = KeyboardModule;
 			productName = Accelerometer;
-			productReference = FDB6520C0E43D1F300F688B5 /* Keyboard.app */;
+			productReference = FDB6520C0E43D1F300F688B5 /* KeyboardModule.app */;
 			productType = "com.apple.product-type.application";
 		};
 		FDC202DD0E107B1200ABAC90 /* Touch */ = {
@@ -719,7 +719,7 @@
 				FDC202DD0E107B1200ABAC90 /* Touch */,
 				FDF0D6920E12D05400247964 /* Mixer */,
 				FDC52EC60E2843D6008D768C /* Fireworks */,
-				FDB651F70E43D1F300F688B5 /* Keyboard */,
+				FDB651F70E43D1F300F688B5 /* KeyboardModule */,
 			);
 		};
 /* End PBXProject section */
@@ -1129,8 +1129,8 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				INFOPLIST_FILE = Info.plist;
-				PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Keyboard;
-				PRODUCT_NAME = Keyboard;
+				PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.KeyboardModule;
+				PRODUCT_NAME = KeyboardModule;
 				SDKROOT = iphoneos;
 			};
 			name = Debug;
@@ -1139,8 +1139,8 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				INFOPLIST_FILE = Info.plist;
-				PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Keyboard;
-				PRODUCT_NAME = Keyboard;
+				PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.KeyboardModule;
+				PRODUCT_NAME = KeyboardModule;
 				SDKROOT = iphoneos;
 			};
 			name = Release;
@@ -1257,7 +1257,7 @@
 			defaultConfigurationIsVisible = 0;
 			defaultConfigurationName = Release;
 		};
-		FDB652090E43D1F300F688B5 /* Build configuration list for PBXNativeTarget "Keyboard" */ = {
+		FDB652090E43D1F300F688B5 /* Build configuration list for PBXNativeTarget "KeyboardModule" */ = {
 			isa = XCConfigurationList;
 			buildConfigurations = (
 				FDB6520A0E43D1F300F688B5 /* Debug */,

+ 1 - 1
LynarMoon/lib/SDL/src/SDL2/Xcode-iOS/Demos/README

@@ -28,7 +28,7 @@ Mixer (mixer.c):
 
 	Displays several rectangular buttons which can be used as a virtual drumkit.  Demonstrates how you can play .wav sounds in SDL and how you can use SDL_MixAudioFormat to build a software mixer that can play multiple sounds at once.
 
-Keyboard (keyboard.c):
+KeyboardModule (keyboard.c):
 
 	Loads a bitmap font and let's the user type words, numbers, and symbols using the iPhone's virtual keyboard.  The iPhone's onscreen keyboard visibility is toggled when the user taps the screen.  If the user types ':)' a happy face is displayed.  Demonstrates how to use functions added to the iPhone implementation of SDL to toggle keyboard onscreen visibility.
 

+ 1 - 1
LynarMoon/lib/SDL/src/SDL2/docs/README-ios.md

@@ -180,7 +180,7 @@ OpenGL ES on iOS doesn't use the traditional system-framebuffer setup provided i
 The above objects can be obtained via SDL_GetWindowWMInfo() (in SDL_syswm.h).
 
 ==============================================================================
-Notes -- Keyboard
+Notes -- KeyboardModule
 ==============================================================================
 
 The SDL keyboard API has been extended to support on-screen keyboards:

+ 1 - 1
LynarMoon/lib/SDL/src/SDL2/docs/README-psp.md

@@ -16,4 +16,4 @@ To build for the PSP, make sure psp-config is in the path and run:
 
 To Do
 ------
-PSP Screen Keyboard
+PSP Screen KeyboardModule

+ 1 - 1
LynarMoon/lib/SDL/src/SDL2/docs/README-winrt.md

@@ -484,7 +484,7 @@ section.
     /nodefaultlib:vccorlibd /nodefaultlib:msvcrtd vccorlibd.lib msvcrtd.lib
 
 
-#### Mouse-motion events fail to get sent, or SDL_GetMouseState() fails to return updated values
+#### MouseModule-motion events fail to get sent, or SDL_GetMouseState() fails to return updated values
 
 This may be caused by a bug in Windows itself, whereby hiding the mouse
 cursor can cause mouse-position reporting to fail.

+ 2 - 2
LynarMoon/lib/SDL/src/SDL2/include/SDL_events.h

@@ -89,7 +89,7 @@ typedef enum
     SDL_WINDOWEVENT    = 0x200, /**< Window state change */
     SDL_SYSWMEVENT,             /**< System specific event */
 
-    /* Keyboard events */
+    /* KeyboardModule events */
     SDL_KEYDOWN        = 0x300, /**< Key pressed */
     SDL_KEYUP,                  /**< Key released */
     SDL_TEXTEDITING,            /**< Keyboard text editing (composition) */
@@ -98,7 +98,7 @@ typedef enum
                                      input language or keyboard layout change.
                                 */
 
-    /* Mouse events */
+    /* MouseModule events */
     SDL_MOUSEMOTION    = 0x400, /**< Mouse moved */
     SDL_MOUSEBUTTONDOWN,        /**< Mouse button pressed */
     SDL_MOUSEBUTTONUP,          /**< Mouse button released */

+ 1 - 1
LynarMoon/lib/SDL/src/SDL2_image/external/libwebp-0.6.0/README

@@ -382,7 +382,7 @@ Options are:
   -info ........ print info
   -h ........... this help message
 
-Keyboard shortcuts:
+KeyboardModule shortcuts:
   'c' ................ toggle use of color profile
   'i' ................ overlay file information
   'd' ................ disable blending & disposal (debug)

+ 1 - 1
LynarMoon/lib/SDL/src/SDL2_ttf/external/freetype-2.4.12/ChangeLog.23

@@ -1946,7 +1946,7 @@
 2009-07-09  suzuki toshiya  <mpsuzuki@hiroshima-u.ac.jp>
 
 	smooth: Check glyph size by width/height, instead of pitch/height.
-	Suggested by der Mouse <mouse@Rodents-Montreal.ORG>.
+	Suggested by der MouseModule <mouse@Rodents-Montreal.ORG>.
 
 	* src/smooth/ftsmooth.c (ft_smooth_render_generic): Improve
 	the check for too large glyph.  Replace the pair of `pitch' and

+ 1 - 1
LynarMoon/lib/SDL/src/SDL2_ttf/external/freetype-2.4.12/src/gxvalid/README

@@ -327,7 +327,7 @@ gxvalid: TrueType GX validator
     If  a TrueType  font is  stored  in the  resource fork  or in  dfont
     format, the data must be tagged as `sfnt' in the resource fork index
     to invoke TrueType font handler for the data.  But the TrueType font
-    data  in   `Keyboard.dfont'  is  tagged   as  `kbd',  and   that  in
+    data  in   `KeyboardModule.dfont'  is  tagged   as  `kbd',  and   that  in
     `LastResort.dfont' is tagged as  `lst'.  Apple font tools can detect
     that the data is in  TrueType format and successfully validate them.
     Maybe  this is possible  because they  are known  to be  dfont.  The

Some files were not shown because too many files changed in this diff