Leviathan  0.8.0.0
Leviathan game engine
Define.h File Reference
#include "Include.h"
#include "ForwardDeclarations.h"
#include "Entities/EntityCommon.h"
#include <string>

Go to the source code of this file.

Namespaces

 Leviathan
 The access mask controls which registered functions and classes a script sees.
 

Macros

#define NETWORK_USE_SNAPSHOTS
 
#define REFERENCE_HANDLE_UNCOUNTED_TYPE(x)   static constexpr auto ANGELSCRIPT_TYPE = #x "@";
 
#define REFERENCE_HANDLE_UNCOUNTED_TYPE_NAMED(x, y)
 
#define VALUE_TYPE(x)   static constexpr auto ANGELSCRIPT_TYPE = #x;
 
#define VALUE_TYPE_NAMED(x, y)   static constexpr auto ANGELSCRIPT_TYPE = #y;
 
#define LOG_INFO(x)   Logger::Get()->Info(x);
 
#define LOG_WARNING(x)   Logger::Get()->Warning(x);
 
#define LOG_ERROR(x)   Logger::Get()->Error(x);
 
#define LOG_WRITE(x)   Logger::Get()->Write(x);
 
#define LOG_FATAL(x)   Logger::Get()->Fatal(x + (", at: " __FILE__ "(" + std::to_string(__LINE__) + ")"));
 
#define SAFE_RELEASE(x)   {if(x){(x)->Release();(x)=NULL;}}
 
#define SAFE_RELEASEDEL(x)   {if(x){(x)->Release();delete (x);(x)=NULL;}}
 
#define SAFE_DELETE(x)   {if(x){delete (x);(x)=NULL;}}
 
#define SAFE_DELETE_ARRAY(x)   {if(x){delete[] (x);(x)=NULL;}}
 
#define SAFE_RELEASE_VECTOR(x)
 
#define SAFE_DELETE_VECTOR(x)
 
#define UNUSED(x)   ((void)x);
 

Variables

constexpr auto Leviathan::TICKSPEED = 50
 Number of milliseconds between engine and world ticks. More...
 
constexpr auto Leviathan::INTERPOLATION_TIME = 100
 
constexpr auto Leviathan::HEARTBEATS_MILLISECOND = 180
 
constexpr auto Leviathan::DEFAULT_MAXCONNECT_TRIES = 5
 
constexpr auto Leviathan::MAX_SERVERCOMMAND_LENGTH = 550
 
constexpr auto Leviathan::BASESENDABLE_STORED_RECEIVED_STATES = 6
 
constexpr auto Leviathan::PACKET_LOST_AFTER_MILLISECONDS = 1000
 
constexpr auto Leviathan::PACKET_LOST_AFTER_RECEIVED_NEWER = 4
 
constexpr auto Leviathan::CRITICAL_PACKET_MAX_TRIES = 8
 
constexpr float Leviathan::NORMALIZATION_TOLERANCE = 1e-6f
 For checking vector normalization. More...
 
constexpr auto Leviathan::MICROSECONDS_IN_SECOND = 1000000
 
constexpr float Leviathan::PI = 3.14159265f
 
constexpr float Leviathan::DEGREES_TO_RADIANS = PI/180.f
 
constexpr float Leviathan::RADIANS_TO_DEGREES = 180.f/PI
 
constexpr float Leviathan::EPSILON = 0.00000001f
 

Macro Definition Documentation

◆ LOG_ERROR

#define LOG_ERROR (   x)    Logger::Get()->Error(x);

Definition at line 83 of file Define.h.

◆ LOG_FATAL

#define LOG_FATAL (   x)    Logger::Get()->Fatal(x + (", at: " __FILE__ "(" + std::to_string(__LINE__) + ")"));

Definition at line 85 of file Define.h.

◆ LOG_INFO

#define LOG_INFO (   x)    Logger::Get()->Info(x);

Definition at line 81 of file Define.h.

◆ LOG_WARNING

#define LOG_WARNING (   x)    Logger::Get()->Warning(x);

Definition at line 82 of file Define.h.

◆ LOG_WRITE

#define LOG_WRITE (   x)    Logger::Get()->Write(x);

Definition at line 84 of file Define.h.

◆ NETWORK_USE_SNAPSHOTS

#define NETWORK_USE_SNAPSHOTS

Defines the networking mode In this mode the server sends snapshots of moving entities to all clients which then interpolate between states. Input will not be replicated on all clients. Clients locally simulate their own inputs. Server uses resimulation to simulate clients taking actions in the past.

Definition at line 14 of file Define.h.

◆ REFERENCE_HANDLE_UNCOUNTED_TYPE

#define REFERENCE_HANDLE_UNCOUNTED_TYPE (   x)    static constexpr auto ANGELSCRIPT_TYPE = #x "@";

Definition at line 67 of file Define.h.

◆ REFERENCE_HANDLE_UNCOUNTED_TYPE_NAMED

#define REFERENCE_HANDLE_UNCOUNTED_TYPE_NAMED (   x,
 
)
Value:
static constexpr auto ANGELSCRIPT_TYPE \
= #y "@";

Definition at line 69 of file Define.h.

◆ SAFE_DELETE

#define SAFE_DELETE (   x)    {if(x){delete (x);(x)=NULL;}}

Definition at line 116 of file Define.h.

◆ SAFE_DELETE_ARRAY

#define SAFE_DELETE_ARRAY (   x)    {if(x){delete[] (x);(x)=NULL;}}

Definition at line 117 of file Define.h.

◆ SAFE_DELETE_VECTOR

#define SAFE_DELETE_VECTOR (   x)
Value:
for(size_t vdind = 0; vdind < x.size(); ++vdind){ \
if(x[vdind]){delete x[vdind];}}; \
x.clear();

Definition at line 123 of file Define.h.

◆ SAFE_RELEASE

#define SAFE_RELEASE (   x)    {if(x){(x)->Release();(x)=NULL;}}

Definition at line 114 of file Define.h.

◆ SAFE_RELEASE_VECTOR

#define SAFE_RELEASE_VECTOR (   x)
Value:
{for(auto iter = x.begin(); iter != x.end(); ++iter) \
if(*iter){ (*iter)->Release(); } \
x.clear();}

Definition at line 119 of file Define.h.

◆ SAFE_RELEASEDEL

#define SAFE_RELEASEDEL (   x)    {if(x){(x)->Release();delete (x);(x)=NULL;}}

Definition at line 115 of file Define.h.

◆ UNUSED

#define UNUSED (   x)    ((void)x);

Definition at line 127 of file Define.h.

◆ VALUE_TYPE

#define VALUE_TYPE (   x)    static constexpr auto ANGELSCRIPT_TYPE = #x;

Definition at line 71 of file Define.h.

◆ VALUE_TYPE_NAMED

#define VALUE_TYPE_NAMED (   x,
 
)    static constexpr auto ANGELSCRIPT_TYPE = #y;

Definition at line 72 of file Define.h.