You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
1.4 KiB
C++
64 lines
1.4 KiB
C++
/******************************************************************************
|
|
* File - tester.cpp
|
|
* Author - Joey Pollack
|
|
* Date - 2021/09/15 (y/m/d)
|
|
* Mod Date - 2021/09/15 (y/m/d)
|
|
* Description - Run a series of tests to verify engine functionality
|
|
******************************************************************************/
|
|
|
|
#include "tester.h"
|
|
#include "scenes/simpleRenderScene.h"
|
|
#include "scenes/physicsScene.h"
|
|
|
|
#include <utils/logger.h>
|
|
#include <graphics/igraphics.h>
|
|
#include <LunariumConfig.h>
|
|
|
|
namespace lunarium
|
|
{
|
|
Tester::Tester()
|
|
: mpScene(nullptr)
|
|
{
|
|
|
|
}
|
|
|
|
OpRes Tester::Initialize()
|
|
{
|
|
// return OpRes::Fail("Tester::Initialize not implemented");
|
|
|
|
mLogCat = Logger::RegisterCategory("TESTER");
|
|
|
|
#if BUILD_NO_EDITOR
|
|
Logger::Log(mLogCat, LogLevel::INFO, "BUILDING NO EDITOR!");
|
|
#else
|
|
Logger::Log(mLogCat, LogLevel::INFO, "BUILDING WITH THE EDITOR!");
|
|
#endif
|
|
|
|
// mpScene = new SimpleRenderScene(mLogCat);
|
|
mpScene = new PhysicsScene(mLogCat);
|
|
mpScene->OnLoad();
|
|
|
|
|
|
return OpRes::OK();
|
|
}
|
|
|
|
void Tester::Shutdown()
|
|
{
|
|
delete mpScene;
|
|
mpScene = nullptr;
|
|
}
|
|
|
|
void Tester::OnTick(double delta)
|
|
{
|
|
mpScene->OnTick(delta);
|
|
}
|
|
|
|
void Tester::OnRender(IGraphics* g)
|
|
{
|
|
mpScene->OnRender(g);
|
|
}
|
|
|
|
}
|
|
|
|
|