Elaztek Developer Hub
Blamite Game Engine - blam!  00346.12.11.21.0529.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 
12 #ifdef BLAM_EXPORTS
13 #define BLAM_EXT_API __declspec(dllexport)
14 #else
15 #define BLAM_EXT_API __declspec(dllimport)
16 #endif
17 
18 class BlamVector2;
19 class BlamVector3;
20 
21 namespace Blam
22 {
29  namespace InteropAPI
30  {
36  namespace DotNETHelpers
37  {
38  BLAM_EXT_API LPARAM CreateLParam(int low, int high);
39  BLAM_EXT_API WPARAM CreateWParam(int low, int high);
40  }
41 
56 
66  BLAM_EXT_API int StartEngine(int args_count, char *args[], SDL_Window* window);
67 
71  BLAM_EXT_API void MainLoop();
72 
79 
84  }
85 
92  namespace API
93  {
99  BLAM_EXT_API void ExecuteConsoleCommand(const char* command);
100 
107  BLAM_EXT_API void ResizeViewport(int width, int height);
108 
114  BLAM_EXT_API BlamVector3 GetDirectorPosition();
115 
122 
128  BLAM_EXT_API BlamVector2 GetMousePosition2D();
129 
137  BLAM_EXT_API BlamVector3 GetMousePosition3D();
138 
145  BLAM_EXT_API void SetEngineViewportActive(bool viewport_active);
146  }
147 }
Blam
Namespace surrounding all major engine components.
Definition: blam_api.h:21
SDL_Event
union SDL_Event SDL_Event
Definition: imgui_impl_sdl.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:41
Blam::API::SetEngineViewportActive
BLAM_EXT_API void SetEngineViewportActive(bool viewport_active)
API wrapper around ImGui_ImplSDL2_SetActiveWindowOverride.
Definition: blam_api.cpp:71
Blam::API::ExecuteConsoleCommand
BLAM_EXT_API void ExecuteConsoleCommand(const char *command)
Runs a command through the engine's console.
Definition: blam_api.cpp:19
Blam::InteropAPI::DotNETHelpers::CreateWParam
BLAM_EXT_API WPARAM CreateWParam(int low, int high)
Definition: blam_api.cpp:14
Blam::API::ResizeViewport
BLAM_EXT_API void ResizeViewport(int width, int height)
Resizes the engine's viewport resolution.
Definition: blam_api.cpp:24
Blam::InteropAPI::CleanupEngineResources
BLAM_EXT_API void CleanupEngineResources()
Instructs the engine to clean up any resources.
Definition: main.cpp:671
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:615
Blam::API::GetMousePosition3D
BLAM_EXT_API BlamVector3 GetMousePosition3D()
Retrieves the 3D position of the mouse pointer.
Definition: blam_api.cpp:66
Blam::API::GetDirectorPosition
BLAM_EXT_API BlamVector3 GetDirectorPosition()
Retrieves the current position of the debug director.
Definition: blam_api.cpp:29
Blam::InteropAPI::MainWindowProcedure
BLAM_EXT_API bool MainWindowProcedure(SDL_Event event)
Window Procedure for the main application window.
Definition: main.cpp:94
BLAM_EXT_API
#define BLAM_EXT_API
Definition: blam_api.h:15
Blam::API::GetMousePosition2D
BLAM_EXT_API BlamVector2 GetMousePosition2D()
Retrieves the 2D position of the mouse pointer.
Definition: blam_api.cpp:53
Blam::InteropAPI::DotNETHelpers::CreateLParam
BLAM_EXT_API LPARAM CreateLParam(int low, int high)
Definition: blam_api.cpp:9
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:640
Blam::InteropAPI::StartEngine
BLAM_EXT_API int StartEngine(int args_count, char *args[], SDL_Window *window)
Entry point for the engine.
Definition: main.cpp:361