Change Engine/src to Engine/Source.
This commit is contained in:
26
Engine/Source/Runtime/Core/public/StartingPoint/EntryPoint.h
Normal file
26
Engine/Source/Runtime/Core/public/StartingPoint/EntryPoint.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#pragma once
|
||||
// Entry point for Phanes game
|
||||
|
||||
#if defined(P_WIN_BUILD)
|
||||
|
||||
extern Phanes::Core::Application::PhanesProject* Phanes::Core::Application::CreatePhanesGame();
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
Phanes::Core::Logging::Init();
|
||||
PENGINE_LOG_INFO("Logger initialized!");
|
||||
PENGINE_LOG_INFO("Welcome to PhanesEngine!");
|
||||
|
||||
|
||||
auto phanes_game = Phanes::Core::Application::CreatePhanesGame();
|
||||
|
||||
PENGINE_LOG_INFO("Loading project {0}...", phanes_game->GetName());
|
||||
|
||||
phanes_game->Run();
|
||||
|
||||
delete phanes_game;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
#include "PhanesEnginePCH.h"
|
||||
|
||||
#include "Core/Core.h"
|
||||
|
||||
// Entrypoint class for any Phanes game.
|
||||
|
||||
namespace Phanes::Core::Application
|
||||
{
|
||||
class PHANES_CORE PhanesProject
|
||||
{
|
||||
|
||||
private:
|
||||
|
||||
std::string projectName;
|
||||
|
||||
public:
|
||||
|
||||
PhanesProject(std::string _ProjectName);
|
||||
virtual ~PhanesProject();
|
||||
|
||||
/**
|
||||
* PhanesEngine main loop.
|
||||
*/
|
||||
void Run();
|
||||
|
||||
/**
|
||||
* Getter for project name;
|
||||
*/
|
||||
|
||||
FORCEINLINE std::string GetName();
|
||||
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Function to be overwriten by client.
|
||||
*/
|
||||
|
||||
PhanesProject* CreatePhanesGame();
|
||||
}
|
Reference in New Issue
Block a user