Elaztek Developer Hub
Blamite Game Engine - blam!  00368.02.12.23.1347.blamite
The core library for the Blamite Game Engine.
blam_api.h
Go to the documentation of this file.
1 // Blamite Game Engine - API Header //
3 // Copyright (c) Elaztek Studios 2013-2020 //
5 
6 #pragma once
7 
8 #include <Windows.h>
9 #include <string>
10 #include <sdl2/SDL.h>
11 
13 #include <Strings/components/diagnostics/errors/errors.h>
14 
15 #ifdef BLAM_EXPORTS
16 #define BLAM_EXT_API __declspec(dllexport)
17 #else
18 #define BLAM_EXT_API __declspec(dllimport)
19 #endif
20 
21 #ifndef BLAM
22 #define BLAM
23 #endif
24 
25 class BlamVector2;
26 class BlamVector3;
27 
28 namespace Blam
29 {
39  BLAM bool GetEngineHookState();
40 
47  namespace InteropAPI
48  {
63 
73  BLAM_EXT_API int StartEngine(int args_count, char *args[], SDL_Window* window);
74 
78  BLAM_EXT_API void MainLoop();
79 
86 
91  }
92 
99  namespace API
100  {
108  BLAM_EXT_API void SetEngineHookState(bool hook_state);
109 
115  BLAM_EXT_API void ExecuteConsoleCommand(const char* command);
116 
123  BLAM_EXT_API void ResizeViewport(int width, int height);
124 
130  BLAM_EXT_API BlamVector3 GetDirectorPosition();
131 
138 
144  BLAM_EXT_API BlamVector2 GetMousePosition2D();
145 
153  BLAM_EXT_API BlamVector3 GetMousePosition3D();
154 
161  BLAM_EXT_API void SetEngineViewportActive(bool viewport_active);
162 
169 
175  BLAM_EXT_API BlamVector2 GetGameResolution();
176 
183 
184  BLAM_EXT_API BlamResult LoadTagFromMemory(char* address, int size, const char* tag_path);
185  }
186 }
Blam
Namespace surrounding all major engine components.
Definition: blam_api.h:28
BLAM
#define BLAM
Definition: blam_api.h:22
width
int width
Definition: bgfx.cpp:19
Blam::API::GetDirectorSpeed
BLAM_EXT_API float GetDirectorSpeed()
Retrieves the current speed of the debug director.
Definition: blam_api.cpp:44
Blam::API::SetEngineViewportActive
BLAM_EXT_API void SetEngineViewportActive(bool viewport_active)
API wrapper around ImGui_ImplSDL2_SetActiveWindowOverride.
Definition: blam_api.cpp:74
Blam::API::LoadTagFromMemory
BLAM_EXT_API BlamResult LoadTagFromMemory(char *address, int size, const char *tag_path)
Definition: blam_api.cpp:105
Blam::API::ExecuteConsoleCommand
BLAM_EXT_API void ExecuteConsoleCommand(const char *command)
Runs a command through the engine's console.
Definition: blam_api.cpp:22
world.h
Blam::API::ResizeViewport
BLAM_EXT_API void ResizeViewport(int width, int height)
Resizes the engine's viewport resolution.
Definition: blam_api.cpp:27
Blam::InteropAPI::CleanupEngineResources
BLAM_EXT_API void CleanupEngineResources()
Instructs the engine to clean up any resources.
Definition: main.cpp:667
Blam::InteropAPI::EngineThreadInit
BLAM_EXT_API int EngineThreadInit()
Performs any additional engine initialization that needs to be called within the engine loop thread.
Definition: main.cpp:618
Blam::API::GetMousePosition3D
BLAM_EXT_API BlamVector3 GetMousePosition3D()
Retrieves the 3D position of the mouse pointer.
Definition: blam_api.cpp:69
Blam::GetEngineHookState
BLAM bool GetEngineHookState()
Retrieves the engine's hook state.
Definition: blam_api.cpp:17
Blam::API::GetDirectorPosition
BLAM_EXT_API BlamVector3 GetDirectorPosition()
Retrieves the current position of the debug director.
Definition: blam_api.cpp:32
Blam::API::SetEngineHookState
BLAM_EXT_API void SetEngineHookState(bool hook_state)
Sets whether or not the engine is hooked via Qt.
Definition: blam_api.cpp:12
Blam::InteropAPI::MainWindowProcedure
BLAM_EXT_API bool MainWindowProcedure(SDL_Event event)
Window Procedure for the main application window.
Definition: main.cpp:97
Blam::API::GetGameResolution
BLAM_EXT_API BlamVector2 GetGameResolution()
Retrieves the current render resolution for the engine.
Definition: blam_api.cpp:89
Blam::API::GetWorldState
BLAM_EXT_API BlamWorldState * GetWorldState()
Retrieves the current world state.
Definition: blam_api.cpp:100
BLAM_EXT_API
#define BLAM_EXT_API
Definition: blam_api.h:18
Blam::API::GetMousePosition2D
BLAM_EXT_API BlamVector2 GetMousePosition2D()
Retrieves the 2D position of the mouse pointer.
Definition: blam_api.cpp:56
Blam::API::IsMouseCapturedByDirector
BLAM_EXT_API bool IsMouseCapturedByDirector()
Checks if the mouse is currently captured by the debug director.
Definition: blam_api.cpp:79
height
int height
Definition: bgfx.cpp:20
Blam::InteropAPI::MainLoop
BLAM_EXT_API void MainLoop()
Function for the engine's main loop.
Definition: main.cpp:639
Blam::InteropAPI::StartEngine
BLAM_EXT_API int StartEngine(int args_count, char *args[], SDL_Window *window)
Entry point for the engine.
Definition: main.cpp:354
SDL_Event
Definition: SdlEmulationLayer.h:735
BlamWorldState
Class representing a world state.
Definition: world.h:128