Elaztek Developer Hub
Blamite Game Engine - blam!  00357.06.18.22.0809.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 
14 #ifdef BLAM_EXPORTS
15 #define BLAM_EXT_API __declspec(dllexport)
16 #else
17 #define BLAM_EXT_API __declspec(dllimport)
18 #endif
19 
20 #ifndef BLAM
21 #define BLAM
22 #endif
23 
24 class BlamVector2;
25 class BlamVector3;
26 
27 namespace Blam
28 {
38  BLAM bool GetEngineHookState();
39 
46  namespace InteropAPI
47  {
62 
72  BLAM_EXT_API int StartEngine(int args_count, char *args[], SDL_Window* window);
73 
77  BLAM_EXT_API void MainLoop();
78 
85 
90  }
91 
98  namespace API
99  {
107  BLAM_EXT_API void SetEngineHookState(bool hook_state);
108 
114  BLAM_EXT_API void ExecuteConsoleCommand(const char* command);
115 
122  BLAM_EXT_API void ResizeViewport(int width, int height);
123 
129  BLAM_EXT_API BlamVector3 GetDirectorPosition();
130 
137 
143  BLAM_EXT_API BlamVector2 GetMousePosition2D();
144 
152  BLAM_EXT_API BlamVector3 GetMousePosition3D();
153 
160  BLAM_EXT_API void SetEngineViewportActive(bool viewport_active);
161 
168 
174  BLAM_EXT_API BlamVector2 GetGameResolution();
175 
182  }
183 }
Blam
Namespace surrounding all major engine components.
Definition: blam_api.h:27
BLAM
#define BLAM
Definition: blam_api.h:21
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:43
Blam::API::SetEngineViewportActive
BLAM_EXT_API void SetEngineViewportActive(bool viewport_active)
API wrapper around ImGui_ImplSDL2_SetActiveWindowOverride.
Definition: blam_api.cpp:73
Blam::API::ExecuteConsoleCommand
BLAM_EXT_API void ExecuteConsoleCommand(const char *command)
Runs a command through the engine's console.
Definition: blam_api.cpp:21
world.h
Blam::API::ResizeViewport
BLAM_EXT_API void ResizeViewport(int width, int height)
Resizes the engine's viewport resolution.
Definition: blam_api.cpp:26
Blam::InteropAPI::CleanupEngineResources
BLAM_EXT_API void CleanupEngineResources()
Instructs the engine to clean up any resources.
Definition: main.cpp:651
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:605
Blam::API::GetMousePosition3D
BLAM_EXT_API BlamVector3 GetMousePosition3D()
Retrieves the 3D position of the mouse pointer.
Definition: blam_api.cpp:68
Blam::GetEngineHookState
BLAM bool GetEngineHookState()
Retrieves the engine's hook state.
Definition: blam_api.cpp:16
Blam::API::GetDirectorPosition
BLAM_EXT_API BlamVector3 GetDirectorPosition()
Retrieves the current position of the debug director.
Definition: blam_api.cpp:31
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:11
Blam::InteropAPI::MainWindowProcedure
BLAM_EXT_API bool MainWindowProcedure(SDL_Event event)
Window Procedure for the main application window.
Definition: main.cpp:96
Blam::API::GetGameResolution
BLAM_EXT_API BlamVector2 GetGameResolution()
Retrieves the current render resolution for the engine.
Definition: blam_api.cpp:88
Blam::API::GetWorldState
BLAM_EXT_API BlamWorldState * GetWorldState()
Retrieves the current world state.
Definition: blam_api.cpp:99
BLAM_EXT_API
#define BLAM_EXT_API
Definition: blam_api.h:17
Blam::API::GetMousePosition2D
BLAM_EXT_API BlamVector2 GetMousePosition2D()
Retrieves the 2D position of the mouse pointer.
Definition: blam_api.cpp:55
Blam::API::IsMouseCapturedByDirector
BLAM_EXT_API bool IsMouseCapturedByDirector()
Checks if the mouse is currently captured by the debug director.
Definition: blam_api.cpp:78
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:626
Blam::InteropAPI::StartEngine
BLAM_EXT_API int StartEngine(int args_count, char *args[], SDL_Window *window)
Entry point for the engine.
Definition: main.cpp:343
SDL_Event
Definition: SdlEmulationLayer.h:735
BlamWorldState
Class representing a world state.
Definition: world.h:128