Elaztek Developer Hub
Blamite Game Engine - Keystone  00390.07.02.23.1947.blamite
A library that enables the use of Qt in Blamite's editing tools.
tick.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <cstdint>
4 #include <Windows.h>
5 
6 #ifndef BLAM
7 #define BLAM
8 #endif
9 
16 {
20  BLAM void PrepareTick();
21 
27  BLAM void TickThread();
28 
36  BLAM uint64_t GetCurrentTickRate();
37 
43  BLAM int MaxTicksPerSecond();
44 
48  BLAM void ResumeTickLoop();
49 
56  BLAM void PauseTickLoop();
57 
63  BLAM void EndTickLoop();
64 
72  BLAM bool HasTickStopped();
73 
79  BLAM bool IsTickLoopRunning();
80 
86  BLAM void SetCurrentTickRate(int tickrate);
87 }
editor_clock_frequency
LARGE_INTEGER editor_clock_frequency
The frequency of the CPU clock. Used in calculations for tick rate.
Definition: tick.cpp:26
BlamEditorDocument_Tag
Class representing a Tag document.
Definition: tag.h:15
BlamEditorDocument::GetDocumentType
BlamEditorDocumentType GetDocumentType()
Retrieves the type of this document.
Definition: BlamEditorDocument.cpp:17
BLAM
#define BLAM
Definition: tick.h:7
editor_data.h
BlamKeystone::EditorData::Workspace::ConvertDocumentTypeToString
KEYSTONE std::string ConvertDocumentTypeToString(BlamEditorDocumentType document_type)
Definition: workspace.cpp:73
BlamEditorWindow::GetActiveDocument
BlamEditorDocument * GetActiveDocument()
Get the current active document.
Definition: BlamEditorWindow.cpp:343
BlamEditorDocumentType::GameWindow
@ GameWindow
Special document type used for the Game Viewport window.
editor_seconds_per_tick
float editor_seconds_per_tick
The number of seconds within a single tick. Usually much less than 1 second.
Definition: tick.cpp:27
BlamKeystone::Tick::IsTickLoopRunning
BLAM bool IsTickLoopRunning()
Determines whether or not the tick loop is currently running - NOT whether it is paused.
Definition: tick.cpp:172
BlamEditorToolWindowType::Unspecified
@ Unspecified
BlamKeystone::EditorData::Workspace::ConvertStringToDockWidgetArea
KEYSTONE Qt::DockWidgetArea ConvertStringToDockWidgetArea(std::string value)
Definition: workspace.cpp:49
BlamKeystone::Tick::HasTickStopped
BLAM bool HasTickStopped()
Determines whether or not the tick loop has finished terminating.
Definition: tick.cpp:167
free
Font Awesome Free License Font Awesome Free is free
Definition: LICENSE.txt:4
editor_total_runtime_ticks
uint64_t editor_total_runtime_ticks
Number of game ticks that have been run during entire program execution.
Definition: tick.cpp:23
BlamKeystone::Tick::PrepareTick
BLAM void PrepareTick()
Prepares required data for the tick loop.
Definition: tick.cpp:34
BlamEditorToolWindowType::HierarchyView
@ HierarchyView
BlamEditorDocumentType
BlamEditorDocumentType
Enumerator containing all possible editor document types.
Definition: BlamEditorDocument.h:23
BlamKeystone::Engine::GetViewportWidget
KEYSTONE BlamEngineViewportWidget * GetViewportWidget()
Retrieves the engine viewport widget.
Definition: engine.cpp:92
editor_total_elapsed_time
float editor_total_elapsed_time
The total amount of time elapsed this second. Used to determine how many ticks have run this second.
Definition: tick.cpp:28
BlamEditorToolWindowType::ExplorerClassic
@ ExplorerClassic
BlamKeystone::Tick::MaxTicksPerSecond
BLAM int MaxTicksPerSecond()
Retrieves the maximum number of ticks per second.
Definition: tick.cpp:177
BlamKeystone::Tick::SetCurrentTickRate
BLAM void SetCurrentTickRate(int tickrate)
Stops the editor tick, updates the tick rate, and re-starts the editor tick.
Definition: tick.cpp:182
editor_pause_tick
bool editor_pause_tick
Whether or not to temporarily pause the game tick.
Definition: tick.cpp:31
BlamEngineViewportWidget::UpdateStatusBar
void UpdateStatusBar()
Updates the viewport status bar information.
Definition: BlamEngineViewportWidget.cpp:215
doTick
void doTick()
Fires a #Blam::Events::TickEvent event to inform all listeners to update based on the game tick.
Definition: tick.cpp:62
BlamKeystone::EditorData::Workspace::ConvertStringToToolWindowType
KEYSTONE BlamEditorToolWindowType ConvertStringToToolWindowType(std::string value)
Definition: workspace.cpp:21
BlamKeystone::Tick::ResumeTickLoop
BLAM void ResumeTickLoop()
Resumes the tick loop if it has been paused.
Definition: tick.cpp:152
BlamKeystone::EditorData::Workspace::ConvertToolWindowTypeToString
KEYSTONE std::string ConvertToolWindowTypeToString(BlamEditorToolWindowType window_type)
Definition: workspace.cpp:91
tick.h
BlamEditorDocumentType::Tag
@ Tag
Indicates the document represents a tag file.
BlamEditorToolWindowType
BlamEditorToolWindowType
Enumerator containing all possible editor tool window types.
Definition: BlamEditorToolWindow.h:21
BlamKeystone::Tick::PauseTickLoop
BLAM void PauseTickLoop()
Temporarily pauses the tick loop.
Definition: tick.cpp:157
BlamEditorToolWindowType::StyleEditor
@ StyleEditor
editor_max_tickrate
int editor_max_tickrate
Maximum number of times doTick() should be run per second.
Definition: tick.cpp:21
BlamKeystone::EditorData::Workspace::ConvertStringToDocumentType
KEYSTONE BlamEditorDocumentType ConvertStringToDocumentType(std::string value)
Definition: workspace.cpp:5
BlamKeystone::EditorData::GetMainEditorWindow
KEYSTONE BlamEditorWindow * GetMainEditorWindow()
Retrieves the main editor window.
Definition: editor_data.cpp:32
editor_has_tick_stopped
bool editor_has_tick_stopped
Whether or not the game tick loop has terminated.
Definition: tick.cpp:32
BlamKeystone::Tick::GetCurrentTickRate
BLAM uint64_t GetCurrentTickRate()
Retrieves the current tick rate.
Definition: tick.cpp:42
checkElapsedTime
float checkElapsedTime()
Definition: tick.cpp:50
editor_ticks_this_second
int editor_ticks_this_second
Number of game ticks that have been run this second.
Definition: tick.cpp:22
BlamEditorDocument
Interface class that any types of editor documents inherit from.
Definition: BlamEditorDocument.h:37
BlamKeystone::Tick::EndTickLoop
BLAM void EndTickLoop()
Terminates the tick loop.
Definition: tick.cpp:162
BlamEditorDocument_Tag::needs_update
bool needs_update
Whether or not this tag needs to be updated in-engine. Ignored if live_update is false.
Definition: tag.h:24
BlamKeystone::EditorData::Workspace::ConvertDockWidgetAreaToString
KEYSTONE std::string ConvertDockWidgetAreaToString(Qt::DockWidgetArea dock_position)
Definition: workspace.cpp:121
BlamEditorDocumentType::Unspecified
@ Unspecified
Indicates the document type is unspecified or invalid.
BlamEditorWorkspace.h
tag.h
engine.h
BlamEditorDocument_Tag::tag
BlamTag * tag
The tag associated with this document.
Definition: tag.h:19
BlamEditorToolWindowType::Output
@ Output
editor_last_second_time
LARGE_INTEGER editor_last_second_time
Timestamp of previous second/tick counter reset.
Definition: tick.cpp:25
BlamKeystone::Engine::GetEngineActiveState
KEYSTONE bool GetEngineActiveState()
Checks whether or not the engine is currently running.
Definition: engine.cpp:102
BlamKeystone::Tick
Namespace containing components relating to the editor tick.
Definition: tick.h:15
BlamEditorToolWindowType::PropertiesPalette
@ PropertiesPalette
editor_run_tick_loop
bool editor_run_tick_loop
Whether or not to continue running the game tick loop.
Definition: tick.cpp:30
BlamKeystone::Tick::TickThread
BLAM void TickThread()
Function containing the tick loop.
Definition: tick.cpp:108
BlamEditorDocument_Tag::live_update
bool live_update
Whether or not this tag should be continuously updated ingame for realtime editing.
Definition: tag.h:23