|
Trace Engine
A Raycaster Engine in C
|
#include "pop_up_windows.h"#include <stdio.h>#include "nuklear_includes.h"#include "log.h"#include "trc_timer.h"#include "game_state.h"Macros | |
| #define | FPS_IN_CHART 33 /** How many last FPS to show in the performance graph, think of it as a FPS history count */ |
Functions | |
| void | start_nk_input_hanlder (void) |
| void | run_nk_input_hanlder (SDL_Event *event) |
| void | stop_nk_input_hanlder (void) |
| void | update_fps_history (void) |
| void | init_nk_windows (SDL_Window *current_window) |
| void | close_nk (void) |
| void | show_debug_console (void) |
| void | set_style (const nk_theme_t theme) |
Variables | |
| const char * | themes_names [THEME_COUNT] |
| nk_theme_t | current_theme = THEME_RED |
| struct nk_context * | nk_ctx = NULL |
| trc_timer_t | debug_fps_timer |
| int | last_fps [FPS_IN_CHART] = {0} |
| #define FPS_IN_CHART 33 /** How many last FPS to show in the performance graph, think of it as a FPS history count */ |
| void close_nk | ( | void | ) |
Close all Nuklear functionality
| void init_nk_windows | ( | SDL_Window * | current_window | ) |
Initialize everything for the Nuklear windows (like themes)
| void run_nk_input_hanlder | ( | SDL_Event * | event | ) |
Nuklear hanlder for an SDL_Event, call it every frame
| void set_style | ( | const nk_theme_t | theme | ) |
Sets the given theme to the floating windows, sliders, buttons and stuff
| void show_debug_console | ( | void | ) |
It creates the debug console, from which you can access all the data and info of the engine
| void start_nk_input_hanlder | ( | void | ) |
Nuklear needs to start seeing mouse and keyboard input, call it every frame
| void stop_nk_input_hanlder | ( | void | ) |
Nuklear needs to stop seeing mouse and keyboard input, call it every frame
| void update_fps_history | ( | void | ) |
Update the current FPS history, you can see the chart in the debug window
| nk_theme_t current_theme = THEME_RED |
| trc_timer_t debug_fps_timer |
| int last_fps[FPS_IN_CHART] = {0} |
| struct nk_context* nk_ctx = NULL |
The context for Nuklear, it is necessary to create all the windows
| const char* themes_names[THEME_COUNT] |