Add project files.
This commit is contained in:
@@ -0,0 +1,86 @@
|
||||
#include "cEvent.hpp"
|
||||
|
||||
/*** Custom Header Files ***/
|
||||
#include "../InputEngine/cInput.hpp"
|
||||
#include "../MathEngine/iVector/iVector2.hpp"
|
||||
#include "../GUIEngine/cGUI.hpp"
|
||||
|
||||
using EventEngine::cEvent;
|
||||
using MathEngine::iVector2;
|
||||
|
||||
/*static*/ cEvent* cEvent::sp_inst = nullptr;
|
||||
|
||||
//Private
|
||||
cEvent::cEvent()
|
||||
{}
|
||||
|
||||
cEvent::~cEvent()
|
||||
{
|
||||
CleanUp();
|
||||
}
|
||||
|
||||
//Public
|
||||
/*static*/ cEvent& cEvent::Inst()
|
||||
{
|
||||
if (sp_inst == nullptr)
|
||||
sp_inst = new cEvent();
|
||||
return *sp_inst;
|
||||
}
|
||||
|
||||
/*static*/ void cEvent::Delete()
|
||||
{
|
||||
delete sp_inst;
|
||||
sp_inst = nullptr;
|
||||
}
|
||||
|
||||
//Functions
|
||||
const bool cEvent::Initialize() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
const bool cEvent::Setup()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void cEvent::CleanUp()
|
||||
{
|
||||
}
|
||||
|
||||
/* Checks for Events */
|
||||
void cEvent::CheckEvents()
|
||||
{
|
||||
while ( SDL_PollEvent(&m_event)) {
|
||||
iVector2 location = { 0, 0 };
|
||||
switch (m_event.type)
|
||||
{
|
||||
case SDL_KEYUP:
|
||||
case SDL_KEYDOWN:
|
||||
case SDL_JOYAXISMOTION:
|
||||
case SDL_JOYBALLMOTION:
|
||||
case SDL_JOYHATMOTION:
|
||||
case SDL_JOYBUTTONDOWN:
|
||||
case SDL_JOYBUTTONUP:
|
||||
InputEngine::cInput::Inst().CheckInputs(m_event);
|
||||
break;
|
||||
case SDL_MOUSEBUTTONDOWN:
|
||||
|
||||
SDL_GetMouseState(&location.x, &location.y);
|
||||
GUIEngine::cGUI::Inst().Event(location, GUIEngine::cGUI::eGUIEventType::MouseButton1);
|
||||
break;
|
||||
case SDL_MOUSEBUTTONUP:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
///Sets
|
||||
|
||||
///Gets
|
||||
/* Gets return true if Event was initialized */
|
||||
const bool cEvent::IsInit() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.23107.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TrooperEngineDLL", "TrooperEngineDLL\TrooperEngineDLL.vcxproj", "{B6513FAA-8BDE-45AA-9F1E-326BCBE5D2E8}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TrooperEngineTest", "TrooperEngineTest\TrooperEngineTest.vcxproj", "{9225E043-EE77-43AA-A140-C9C2F85B1013}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{B6513FAA-8BDE-45AA-9F1E-326BCBE5D2E8} = {B6513FAA-8BDE-45AA-9F1E-326BCBE5D2E8}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SDLPongCPP", "SDLPongCPP\SDLPongCPP.vcxproj", "{D0670630-6CBB-4894-BAC6-35FD775E8D8E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SubversionScc) = preSolution
|
||||
Svn-Managed = True
|
||||
Manager = AnkhSVN - Subversion Support for Visual Studio
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Win32 = Release|Win32
|
||||
Release|x64 = Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B6513FAA-8BDE-45AA-9F1E-326BCBE5D2E8}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B6513FAA-8BDE-45AA-9F1E-326BCBE5D2E8}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B6513FAA-8BDE-45AA-9F1E-326BCBE5D2E8}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{B6513FAA-8BDE-45AA-9F1E-326BCBE5D2E8}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B6513FAA-8BDE-45AA-9F1E-326BCBE5D2E8}.Release|Win32.Build.0 = Release|Win32
|
||||
{B6513FAA-8BDE-45AA-9F1E-326BCBE5D2E8}.Release|x64.ActiveCfg = Release|Win32
|
||||
{9225E043-EE77-43AA-A140-C9C2F85B1013}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{9225E043-EE77-43AA-A140-C9C2F85B1013}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{9225E043-EE77-43AA-A140-C9C2F85B1013}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{9225E043-EE77-43AA-A140-C9C2F85B1013}.Debug|x64.Build.0 = Debug|x64
|
||||
{9225E043-EE77-43AA-A140-C9C2F85B1013}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{9225E043-EE77-43AA-A140-C9C2F85B1013}.Release|Win32.Build.0 = Release|Win32
|
||||
{9225E043-EE77-43AA-A140-C9C2F85B1013}.Release|x64.ActiveCfg = Release|x64
|
||||
{9225E043-EE77-43AA-A140-C9C2F85B1013}.Release|x64.Build.0 = Release|x64
|
||||
{D0670630-6CBB-4894-BAC6-35FD775E8D8E}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{D0670630-6CBB-4894-BAC6-35FD775E8D8E}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{D0670630-6CBB-4894-BAC6-35FD775E8D8E}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{D0670630-6CBB-4894-BAC6-35FD775E8D8E}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{D0670630-6CBB-4894-BAC6-35FD775E8D8E}.Release|Win32.Build.0 = Release|Win32
|
||||
{D0670630-6CBB-4894-BAC6-35FD775E8D8E}.Release|x64.ActiveCfg = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
Reference in New Issue
Block a user