Conquer Space 0.0.0
A space themed grand strategy game set in the near future, with realistic orbital mechanics, and an emphasis on economics and politics.
|
#include <application.h>
Classes | |
class | CqspEventInstancer |
class | CqspEventListener |
Public Types | |
typedef void(* | EventListener) (Rml::Event &) |
Public Member Functions | |
Application (int _argc, char *_argv[]) | |
void | run () |
client::ClientOptions & | GetClientOptions () |
int | GetWindowHeight () const |
int | GetWindowWidth () const |
double | GetDeltaTime () const |
double | GetFps () const |
cqsp::asset::AssetManager & | GetAssetManager () |
bool | ShouldExit () |
void | ExitApplication () |
template<class T > | |
void | SetScene () |
cqsp::engine::GameState * | GetGame () |
cqsp::engine::audio::IAudioInterface & | GetAudioInterface () |
bool | ButtonIsHeld (int btn) |
bool | ButtonIsHeld (KeyInput btn) |
bool | ButtonIsReleased (int btn) |
bool | ButtonIsReleased (KeyInput btn) |
bool | ButtonIsPressed (int btn) |
bool | ButtonIsPressed (KeyInput btn) |
double | MouseButtonLastReleased (int btn) |
bool | MouseButtonDoubleClicked (int btn) |
double | GetScrollAmount () |
double | GetMouseX () |
double | GetMouseY () |
bool | MouseButtonIsHeld (int btn) |
bool | MouseButtonIsReleased (int btn) |
bool | MouseButtonIsPressed (int btn) |
Rml::ElementDocument * | LoadDocument (const std::string &path) |
void | CloseDocument (const std::string &path) |
Rml::ElementDocument * | ReloadDocument (const std::string &path) |
Reloads the document from the file How to hotload the a document. More... | |
Window * | GetWindow () |
cqsp::asset::Font *& | GetFont () |
void | DrawText (const std::string &text, float x, float y) |
void | DrawText (const std::string &text, const glm::vec3 &color, float x, float y) |
void | DrawText (const std::string &text, float x, float y, float size) |
void | DrawText (const std::string &text, const glm::vec3 &color, float x, float y, float size) |
void | DrawTextNormalized (const std::string &text, float x, float y) |
void | SetFont (cqsp::asset::Font *font) |
void | SetFontShader (cqsp::asset::ShaderProgram *shader) |
double | GetTime () |
Time since glfw was initialized in seconds More... | |
bool | MouseDragged () |
void | SetWindowDimensions (int width, int height) |
void | SetFullScreen (bool screen) |
glm::mat4 | Get2DProj () |
glm::mat4 | Get3DProj () |
glm::mat4 | GetRmlUiProj () |
std::vector< std::string > & | GetCmdLineArgs () |
bool | HasCmdLineArgs (const std::string &arg) |
bool | Screenshot (const char *path=NULL) |
Screenshots the current framebuffer to the filename More... | |
Rml::Context * | GetRmlUiContext () |
template<class T > | |
void | InitGame () |
Private Member Functions | |
void | InitFonts () |
void | SetIcon () |
void | GlInit () |
void | LoggerInit () |
void | LogInfo () |
void | InitRmlUi () |
void | InitImgui () |
void | ProcessRmlUiUserInput () |
void | InitAudio () |
int | init () |
void | ResetGame () |
int | destroy () |
void | CalculateProjections () |
Private Attributes | |
std::vector< std::string > | cmd_line_args |
bool | full_screen |
Window * | m_window |
std::string | icon_path |
Rml::Context * | rml_context |
std::unique_ptr< SystemInterface_GLFW > | m_system_interface |
std::unique_ptr< Rml::RenderInterface > | m_render_interface |
ax::NodeEditor::EditorContext * | m_ne_context = nullptr |
std::unique_ptr< CqspEventInstancer > | m_event_instancer |
cqsp::engine::SceneManager | m_scene_manager |
client::ClientOptions | m_client_options |
double | fps |
double | deltaTime |
double | lastFrame |
std::string | locale |
cqsp::asset::AssetManager | manager |
std::unique_ptr< cqsp::engine::GameState > | m_game |
cqsp::asset::Font * | m_font = nullptr |
cqsp::asset::ShaderProgram * | fontShader = nullptr |
std::map< std::string, std::string > | properties |
cqsp::engine::audio::IAudioInterface * | m_audio_interface |
std::map< std::string, Rml::ElementDocument * > | loaded_documents |
glm::mat4 | two_dim_projection |
glm::mat4 | three_dim_projection |
glm::mat4 | rmlui_projection |
bool | to_halt |
bool | draw_fps = false |
typedef void(* cqsp::engine::Application::EventListener) (Rml::Event &) |
cqsp::engine::Application::Application | ( | int | _argc, |
char * | _argv[] | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
void cqsp::engine::Application::CloseDocument | ( | const std::string & | path | ) |
|
private |
void cqsp::engine::Application::DrawText | ( | const std::string & | text, |
const glm::vec3 & | color, | ||
float | x, | ||
float | y | ||
) |
void cqsp::engine::Application::DrawText | ( | const std::string & | text, |
const glm::vec3 & | color, | ||
float | x, | ||
float | y, | ||
float | size | ||
) |
void cqsp::engine::Application::DrawText | ( | const std::string & | text, |
float | x, | ||
float | y | ||
) |
void cqsp::engine::Application::DrawText | ( | const std::string & | text, |
float | x, | ||
float | y, | ||
float | size | ||
) |
void cqsp::engine::Application::DrawTextNormalized | ( | const std::string & | text, |
float | x, | ||
float | y | ||
) |
void cqsp::engine::Application::ExitApplication | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
double cqsp::engine::Application::GetTime | ( | ) |
Time since glfw was initialized in seconds
|
inline |
|
inline |
|
inline |
|
private |
|
inline |
|
private |
|
private |
|
private |
|
inline |
|
private |
|
private |
Rml::ElementDocument * cqsp::engine::Application::LoadDocument | ( | const std::string & | path | ) |
|
private |
|
private |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
Rml::ElementDocument * cqsp::engine::Application::ReloadDocument | ( | const std::string & | path | ) |
Reloads the document from the file How to hotload the a document.
Approximately how to use it After loading it with app.LoadDocument()
, you can reload it, and remember to set the document variable that you may have, or it will be pointing to something empty.
path |
|
inlineprivate |
void cqsp::engine::Application::run | ( | ) |
bool cqsp::engine::Application::Screenshot | ( | const char * | path = NULL | ) |
Screenshots the current framebuffer to the filename
If it's null, it will put the screenshot into the default folder, with
path |
|
inline |
|
inline |
void cqsp::engine::Application::SetFullScreen | ( | bool | screen | ) |
|
private |
|
inline |
void cqsp::engine::Application::SetWindowDimensions | ( | int | width, |
int | height | ||
) |
bool cqsp::engine::Application::ShouldExit | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |