|
Arch Game Engine
0.2
|
Class for declaring an engine, which does basic SDL commands like creating the window and renderer. More...
#include <engine.h>
Classes | |
| struct | color |
Public Member Functions | |
| ~Engine () | |
| Decontructs renderer and window and then quits SDL. | |
| void | setGravity (double g) |
| void | setFrameRate (int f) |
| double | getGravity () const |
| SDL_Renderer * | init (string s, const int &w, const int &h, int flag) |
| Create a window with a given name, width, height, and anyother SDL_Window flags. | |
| SDL_Renderer * | init (string s, const int &w, const int &h, int flag, int it) |
| Create a window with a given name, width, height, SDL_Window flags, and specified SDL_Init flags. | |
| SDL_Renderer * | init (string s, const int &w, const int &h, int flag, int x, int y) |
| Create a window with a given name, width, height, SDL_Window flags, and specified x and y coordinate. | |
| SDL_Renderer * | init (string s, const int &w, const int &h, int flag, int x, int y, int it) |
| Create a window with a given name, width, height, SDL_Window flags, specified x and y coordinate, and SDL_Init flags. | |
| void | setName (string s) |
| Set window name. | |
| void | setPos (int x, int y) |
| Set window position. | |
| void | setSize (int w, int y) |
| Set window size. | |
| SDL_Renderer * | getRenderer () |
| Returns screen renderer. | |
| SDL_Window * | getWindow () const |
| Returns screen window. | |
| void | setColor (Uint8 r, Uint8 g, Uint8 b) |
| Sets SDL color. | |
| void | loopStart () |
| Call this at the beginning of a loop to initilaize the loop. | |
| void | render () |
| Call this at the end of the game loop to render. | |
| void | update () |
| Get fps. More... | |
| void | setBackground (Background b) |
| Set background. | |
| void | setBackground (string filename) |
| Set background with filename. | |
| Background | getBackground () const |
| Get background. | |
| void | drawBackground () |
| Draw background. | |
| void | draw (Object obj) |
| Draw an object on the screen. | |
| void | draw (vector< Object > objs) |
| Draw a vector of Objects. | |
| void | draw (vector< vector< Object >> objs) |
| void | draw (Object obj, int key) |
| Draw an object with a pass key before/during splash. | |
| void | draw (Level lvl) |
| Draw the level. | |
| void | draw (const char *text, int x, int y, int r, int g, int b) |
| Write to the screen with a char, coordinates, color, ttf file. | |
| void | splash () |
| Calls splashscreen at the beginning of the game. This is automatically called unless deactivated. | |
| void | bypassSplash (int key) |
| Deactives the splashscreen, requires key. | |
| bool | hasSplashed () |
| Check if the splashscreen has occured. | |
| void | debugMode (bool d) |
| Active debugger with Boolean. | |
| void | loadFont (char *font_path) |
| void | hideMouse () |
| void | showMouse () |
| bool | getRunning () const |
| void | setRunning (bool r) |
| void | setGLView (int a, int b, int c, int d, int e, int f, int g, int h, int i) |
| void | setGLMode (bool m) |
| int | getFPS () const |
| void | loop () |
| int | getTicks () |
| void | delay (int time) |
| void | enableTransparency () |
| void | setGamestate (int s) |
| int | getGameState () |
| void | setSplashColor (int r, int g, int b) |
Class for declaring an engine, which does basic SDL commands like creating the window and renderer.
| void Engine::update | ( | ) |
Get fps.
Update loop time.
Definition at line 134 of file engine.cpp.
1.8.11