Elaztek Developer Hub
Blamite Game Engine - blam!  00406.12.10.23.1457.blamite
The core library for the Blamite Game Engine.
Blam Namespace Reference

Namespace surrounding all major engine components. More...

Namespaces

 Animation
 Namespace for animation data.
 
 API
 
 Cache
 Namespace containing functions related to caching.
 
 Content
 
 CrashScreen
 Namespace for the engine's crash screen and error handling.
 
 Diagnostics
 Namespace containing functions related to engine diagnostics, profiling, error handling, and logging.
 
 DialogHelpers
 Namespace containing helper functions for Win32 dialogs.
 
 Dialogs
 Namespace containing things related to the displaying of Win32 dialogs.
 
 Director
 Namespace for things related to the debug camera (director).
 
 DiscordRPC
 Namespace containing things related to Discord Rich Presence.
 
 EngineDefs
 Namespace containing core engine information.
 
 EngineText
 Namespace for things related to game engine strings.
 
 Extensions
 Namespace containing functions for extensions.
 
 Globals
 Namespace containing functions relating to game engine globals.
 
 Input
 Namespace containing functions for handling input from keyboards, mice, etc.
 
 Logger
 Namespace containing things related to the Blamite Logger.
 
 Modules
 
 Network
 Namespace containing things related to networking.
 
 Networking
 
 Placeholders
 Namespace containing things related to the Placeholders system.
 
 Reader
 
 Rendering
 Namespace for things relating to rendering.
 
 Resources
 
 Sentry
 Namespace for things relating to Sentry.
 
 Settings
 Namespace containing functions used to access various game engine settings.
 
 Tick
 Namespace containing components relating to the game tick.
 
 UI
 Namespace containing functions relating to the Blamite UI system.
 
 User
 TBA.
 
 Utils
 Namespace containing general-purpose utilities.
 
 World
 Namespace containing functions for interacting with the current world state.
 
 Writer
 

Classes

struct  Endpoint
 
struct  LinearAllocator
 
struct  Socket
 

Functions

BLAM void Assert (const char *expression, const char *file, int line)
 Forces an engine assertion failure, and shows the crash screen. More...
 
BLAM void Assert (const char *expression, const char *file, int line, std::string message)
 Forces an engine assertion failure, and shows the crash screen, with additional details. More...
 
BLAM void linearAllocCreate (Blam::LinearAllocator *alloc, UINT64 size)
 
BLAM UINT8 * linearAlloc (Blam::LinearAllocator *alloc, UINT64 size)
 
BLAM BlamRuntimeConfiguration GetCurrentRuntimeConfig ()
 Retrieves the current runtime configuration. More...
 
BLAM BlamContentSource GetContentSource ()
 Retrieves the current content source. More...
 
BLAM HWND GetWin32MainWindowHandle ()
 Retrieves the main window handle of the application. More...
 
BLAM HMODULE GetEngineDLLHandle ()
 Retrieves the module handle for the engine. More...
 
BLAM SDL_Window * GetMainWindowHandle ()
 Retrieves the main window handle of the application, when using SDL. More...
 
BLAM bool MainWindowProcedure (SDL_Event event)
 Window procedure for the main application window. More...
 
BLAM int StartEngine (int args_count, char *args[], SDL_Window *window)
 Entry point for the engine. More...
 
BLAM int EngineThreadInit ()
 Performs any additional engine initialization that needs to be called within the engine loop thread. More...
 
BLAM void MainLoop ()
 Function for the engine's main loop. More...
 
BLAM void CleanupEngineResources ()
 Instructs the engine to clean up any resources. More...
 

Detailed Description

Namespace surrounding all major engine components.

Function Documentation

◆ Assert() [1/2]

void Blam::Assert ( const char *  expression,
const char *  file,
int  line 
)

Forces an engine assertion failure, and shows the crash screen.

This function should NOT be called directly - use the BLAM_ASSERT macro instead.

Parameters
exc- The value, function, or equation that failed to return true.
file- The .cpp file that caused the assertion.
line- The line number of the .cpp file that caused the assertion.
+ Here is the call graph for this function:

◆ Assert() [2/2]

void Blam::Assert ( const char *  expression,
const char *  file,
int  line,
std::string  message 
)

Forces an engine assertion failure, and shows the crash screen, with additional details.

This function should NOT be called directly - use the BLAM_ASSERTM macro instead.

Parameters
exc- The value, function, or equation that failed to return true.
file- The .cpp file that caused the assertion.
line- The line number of the .cpp file that caused the assertion.
message- A message shown to the user containing any additional related information.
+ Here is the call graph for this function:

◆ CleanupEngineResources()

void Blam::CleanupEngineResources ( )

Instructs the engine to clean up any resources.

Should be called at shutdown.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ EngineThreadInit()

int Blam::EngineThreadInit ( )

Performs any additional engine initialization that needs to be called within the engine loop thread.

When using multiple threads for engine and main loop, this MUST be called from the same thread that MainLoop is called from.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetContentSource()

BlamContentSource Blam::GetContentSource ( )

Retrieves the current content source.

When running under different runtime configurations, the engine will load content from loose tag files, or from cache files. For cases where we don't need the exact runtime configuration and simply need to know how to load content, we can use this as an easier check.

Returns
The current content source.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetCurrentRuntimeConfig()

BlamRuntimeConfiguration Blam::GetCurrentRuntimeConfig ( )

Retrieves the current runtime configuration.

The value of this will depend on the configuration used to compile the engine. See BlamRuntimeConfiguration for details.

Returns
The current runtime configuration.
+ Here is the caller graph for this function:

◆ GetEngineDLLHandle()

HMODULE Blam::GetEngineDLLHandle ( )

Retrieves the module handle for the engine.

+ Here is the caller graph for this function:

◆ GetMainWindowHandle()

SDL_Window * Blam::GetMainWindowHandle ( )

Retrieves the main window handle of the application, when using SDL.

+ Here is the caller graph for this function:

◆ GetWin32MainWindowHandle()

HWND Blam::GetWin32MainWindowHandle ( )

Retrieves the main window handle of the application.

Deprecated:
This returns the native window handle that the engine is using as its primary display, and should only be used in cases where the native window handle is absolutely needed. Whenever possible, please use Blam::GetMainWindowHandle instead.
Note
Formerly named Blam::GetMainWindowHandle, was renamed as SDL is now used for window creation instead.
+ Here is the caller graph for this function:

◆ linearAlloc()

UINT8 * Blam::linearAlloc ( Blam::LinearAllocator alloc,
UINT64  size 
)
+ Here is the caller graph for this function:

◆ linearAllocCreate()

void Blam::linearAllocCreate ( Blam::LinearAllocator alloc,
UINT64  size 
)
+ Here is the caller graph for this function:

◆ MainLoop()

void Blam::MainLoop ( )

Function for the engine's main loop.

Should be called from the parent application's message loop.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MainWindowProcedure()

bool Blam::MainWindowProcedure ( SDL_Event  event)

Window procedure for the main application window.

Parameters
event- The SDL event that was fired.
Returns
false if the window should start closing, otherwise returns true.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ StartEngine()

int Blam::StartEngine ( int  args_count,
char *  args[],
SDL_Window *  window 
)

Entry point for the engine.

Parameters
args_count- Number of command-line arguments passed to the application.
args- Array of command-line arguments passed to the application.
window- Pointer to the window handle to run the game engine within.
Todo:
Show firstboot dialog
+ Here is the call graph for this function:
+ Here is the caller graph for this function: