Add project files.
This commit is contained in:
@@ -0,0 +1,147 @@
|
||||
#include "cTrooperEngineCore.hpp"
|
||||
|
||||
/*** Custom Header Files ***/
|
||||
#include "../VideoEngine/cVideo.hpp"
|
||||
#include "../AudioEngine/cAudio.hpp"
|
||||
#include "../InputEngine/cInput.hpp"
|
||||
|
||||
#include "../TimingEngine/cTiming.hpp"
|
||||
|
||||
#include "../TextTypeEngine/cTextType.hpp"
|
||||
|
||||
#include "../MathEngine/cRandom.hpp"
|
||||
|
||||
#include "../EventEngine/cEvent.hpp"
|
||||
|
||||
#include "../UtilityEngine/cUtility.hpp"
|
||||
|
||||
using TrooperEngineCore::cTrooperEngineCore;
|
||||
|
||||
/*static*/ cTrooperEngineCore* cTrooperEngineCore::sp_inst = nullptr;
|
||||
|
||||
cTrooperEngineCore::cTrooperEngineCore()
|
||||
{
|
||||
}
|
||||
|
||||
cTrooperEngineCore::~cTrooperEngineCore()
|
||||
{
|
||||
CleanUp();
|
||||
VideoEngine::cVideo::Delete();
|
||||
AudioEngine::cAudio::Delete();
|
||||
InputEngine::cInput::Delete();
|
||||
TimingEngine::cTiming::Delete();
|
||||
|
||||
TextTypeEngine::cTextType::Delete();
|
||||
MathEngine::cRandom::Delete();
|
||||
EventEngine::cEvent::Delete();
|
||||
SDL_Quit();
|
||||
UtilityEngine::cUtility::Inst().Message("SDL shut down!");
|
||||
UtilityEngine::cUtility::Delete();
|
||||
}
|
||||
|
||||
///Functions
|
||||
/*static*/ const char* cTrooperEngineCore::Version()
|
||||
{
|
||||
return __TROOPERENGINE__VERSION;
|
||||
}
|
||||
|
||||
/*static*/ cTrooperEngineCore& cTrooperEngineCore::Inst()
|
||||
{
|
||||
if (sp_inst == nullptr)
|
||||
sp_inst = new cTrooperEngineCore();
|
||||
return *sp_inst;
|
||||
}
|
||||
|
||||
/*static*/ void cTrooperEngineCore::Delete()
|
||||
{
|
||||
delete sp_inst;
|
||||
sp_inst = nullptr;
|
||||
}
|
||||
|
||||
const bool cTrooperEngineCore::VideoInit()
|
||||
{
|
||||
return VideoEngine::cVideo::Inst().Initialize();
|
||||
}
|
||||
|
||||
const bool cTrooperEngineCore::AudioInit()
|
||||
{
|
||||
return AudioEngine::cAudio::Inst().Initialize();
|
||||
}
|
||||
|
||||
const bool cTrooperEngineCore::InputInit()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
const bool cTrooperEngineCore::JoystickInit()
|
||||
{
|
||||
return InputEngine::cInput::Inst().Initialize();
|
||||
}
|
||||
|
||||
const bool cTrooperEngineCore::TimerInit()
|
||||
{
|
||||
return TimingEngine::cTiming::Inst().Initialize();
|
||||
}
|
||||
|
||||
const bool cTrooperEngineCore::TextTypeInit()
|
||||
{
|
||||
return TextTypeEngine::cTextType::Inst().Initialize();
|
||||
}
|
||||
|
||||
const bool cTrooperEngineCore::EventInit()
|
||||
{
|
||||
return EventEngine::cEvent::Inst().Initialize();
|
||||
}
|
||||
|
||||
/* Print lib versions */
|
||||
void cTrooperEngineCore::PrintSDLVersion() const
|
||||
{
|
||||
UtilityEngine::cUtility::Inst().PrintVersion();
|
||||
}
|
||||
|
||||
void cTrooperEngineCore::CleanUp()
|
||||
{
|
||||
VideoEngine::cVideo::Inst().CleanUp();
|
||||
AudioEngine::cAudio::Inst().CleanUp();
|
||||
TimingEngine::cTiming::Inst().CleanUp();
|
||||
TextTypeEngine::cTextType::Inst().CleanUp();
|
||||
InputEngine::cInput::Inst().CleanUp();
|
||||
EventEngine::cEvent::Inst().CleanUp();
|
||||
}
|
||||
|
||||
///Gets
|
||||
const bool cTrooperEngineCore::getVideo() const
|
||||
{
|
||||
return VideoEngine::cVideo::Inst().IsInit();
|
||||
}
|
||||
|
||||
const bool cTrooperEngineCore::getAudio() const
|
||||
{
|
||||
return AudioEngine::cAudio::Inst().IsInit();
|
||||
}
|
||||
|
||||
const bool cTrooperEngineCore::getInput() const
|
||||
{
|
||||
return InputEngine::cInput::Inst().IsInit();
|
||||
}
|
||||
|
||||
const bool cTrooperEngineCore::getJoystick() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
const bool cTrooperEngineCore::getTimer() const
|
||||
{
|
||||
return TimingEngine::cTiming::Inst().IsInit();
|
||||
}
|
||||
|
||||
const bool cTrooperEngineCore::getText() const
|
||||
{
|
||||
return TextTypeEngine::cTextType::Inst().IsInit();
|
||||
}
|
||||
|
||||
const bool cTrooperEngineCore::getEvent() const
|
||||
{
|
||||
return EventEngine::cEvent::Inst().IsInit();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/* Copyright (C) 2010 Richard W. Allen
|
||||
Program Name: SDL Pong C++
|
||||
Author: Richard W. Allen
|
||||
Version: V1.0
|
||||
Date Started: August 24, 2009
|
||||
Date End:
|
||||
Webpage: http://www.richardallenonline.com
|
||||
IDE: Visual Studio 2010
|
||||
Compiler: C\C++ 2010
|
||||
Langage: C++
|
||||
License: GNU GENERAL PUBLIC LICENSE Version 2
|
||||
see license.txt for details
|
||||
|
||||
SDL Pong C++ Copyright (C) 2010 Richard W. Allen DEATH VALLEY
|
||||
Comes with ABSOLUTELY NO WARRANTY;
|
||||
SDL Pong C++ is licensed under the GNU GENERAL PUBLIC LICENSE Version 2.
|
||||
for details see the license.txt include with this program.
|
||||
*/
|
||||
|
||||
/*** SDL Header Files ***/
|
||||
#include "SDL.h"
|
||||
|
||||
#include "../Game/PongStart/cPongStart.hpp"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argc, argv;
|
||||
|
||||
PongStart::cPongStart pong;
|
||||
pong.Main();
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user