Leviathan  0.8.0.0
Leviathan game engine
Engine.cpp File Reference
#include "Engine.h"
#include "Addons/GameModuleLoader.h"
#include "Application/AppDefine.h"
#include "Application/Application.h"
#include "Application/ConsoleInput.h"
#include "Common/DataStoring/DataStore.h"
#include "Common/StringOperations.h"
#include "Common/Types.h"
#include "Editor/Editor.h"
#include "Editor/Importer.h"
#include "Entities/GameWorld.h"
#include "Entities/GameWorldFactory.h"
#include "Events/EventHandler.h"
#include "FileSystem.h"
#include "GUI/GuiManager.h"
#include "GlobalCEFHandler.h"
#include "Handlers/IDFactory.h"
#include "Handlers/OutOfMemoryHandler.h"
#include "Handlers/ResourceRefreshHandler.h"
#include "Iterators/StringIterator.h"
#include "Networking/NetworkHandler.h"
#include "Networking/RemoteConsole.h"
#include "ObjectFiles/ObjectFileProcessor.h"
#include "Rendering/Graphics.h"
#include "Script/Console.h"
#include "Sound/SoundDevice.h"
#include "Statistics/RenderingStatistics.h"
#include "Statistics/TimingMonitor.h"
#include "Threading/QueuedTask.h"
#include "Threading/ThreadingManager.h"
#include "TimeIncludes.h"
#include "Utility/HybridGraphicsUseDedicated.h"
#include "Utility/Random.h"
#include "Window.h"
#include "utf8.h"
#include <SDL.h>
#include "boost/program_options.hpp"
#include <chrono>
#include <future>

Go to the source code of this file.

Functions

int TestCrash (int writenum)
 

Variables

static thread_local int MainThreadMagic = 0
 Used to detect when accessed from main thread. More...
 
constexpr auto THREAD_MAGIC = 42
 
static std::atomic< int > WindowNameCounter = {1}
 Used for automatic unique window names. More...
 

Function Documentation

◆ TestCrash()

int TestCrash ( int  writenum)

Definition at line 1285 of file Engine.cpp.

1286 {
1287  volatile int* target = nullptr;
1288  (*target) = writenum;
1289 
1290  Logger::Get()->Write("It didn't crash...");
1291  return 42;
1292 }

Variable Documentation

◆ MainThreadMagic

thread_local int MainThreadMagic = 0
static

Used to detect when accessed from main thread.

Definition at line 57 of file Engine.cpp.

◆ THREAD_MAGIC

constexpr auto THREAD_MAGIC = 42

Definition at line 58 of file Engine.cpp.

◆ WindowNameCounter

std::atomic<int> WindowNameCounter = {1}
static

Used for automatic unique window names.

Definition at line 61 of file Engine.cpp.