Maze Builder Docs
8.2.1
Loading...
Searching...
No Matches
loading_state.h
Go to the documentation of this file.
1
#ifndef LOADING_STATE_H
2
#define LOADING_STATE_H
3
4
#include <
MazeBuilder/resource_identifiers.h
>
5
#include <
MazeBuilder/state.h
>
6
7
#include <mutex>
8
#include <optional>
9
12
namespace
mazes
13
{
14
class
args;
15
class
runtime_stack;
16
18
class
loading_state
final :
public
state
19
{
20
public
:
21
// constructor
22
explicit
loading_state
(
const
runtime_app::context
& ctx,
runtime_stack
* rs);
23
24
void
draw()
const
noexcept
override
;
25
30
bool
update
(
const
std::optional<args>&
args
,
double
delta_time)
noexcept
override
;
31
32
private
:
35
void
load_resources(
const
std::optional<args>&
args
)
const
noexcept
;
36
37
grid_manager
* grid_mapper;
38
processed_text_manager
* processed_text_mapper;
39
40
std::once_flag resource_loaded_flag;
41
bool
has_finished{
false
};
42
};
43
}
// namespace mazes
44
45
#endif
// LOADING_STATE_H
mazes::args
Command-line argument handler with JSON support.
Definition
args.h:19
mazes::loading_state
State for loading and pre-generating mazes.
Definition
loading_state.h:19
mazes::loading_state::update
bool update(const std::optional< args > &args, double delta_time) noexcept override
Updates the state of the loading process.
mazes::resource_management< grid_interface, grid_identifier >
mazes::runtime_stack
Class representing the runtime stack of states in the maze builder application.
Definition
runtime_stack.h:23
resource_identifiers.h
state.h
mazes::runtime_app::context
struct representing the context passed to states in the runtime_app stack
Definition
runtime_app.h:34
mazes::state
struct representing a state in the runtime stack
Definition
state.h:18
include
MazeBuilder
loading_state.h
Generated by
1.12.0