header for the Oblivision API.
More...
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdint.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_ttf.h>
#include "colors.h"
Go to the source code of this file.
|
#define | SDL_MAIN_HANDLED |
|
#define | OV_DEBUG_ENABLE 1 |
|
#define | MAXWID 7680 |
|
#define | MAXHEI 4320 |
|
#define | MAX_WIGS 256 |
|
|
typedef struct color_s | OV_COLOR |
| A "non-proprietary" typedef holding colordata.
|
|
typedef struct vec2_s | vec2 |
| Vector data for things like window position/sizes.
|
|
|
void | OV_colorTest () |
| Runs a simple color tester.
|
|
void | OV_setBackground (OV_COLOR bg_color) |
| Sets the background color of your Oblivision window.
|
|
int | OV_createWindow (int width, int height, vec2 pos, const char *name) |
| Initializes and creates an Oblivision window.
|
|
void | OV_pollEvent (SDL_Event event) |
| runs the SDL event poll loop to register key events and update window positions
|
|
void | OV_renderFrame (SDL_Event event) |
|
void | OV_setFlags (int flag) |
|
void | OV_setFont (const char *font) |
|
int | OVInit (SDL_Window *window, int width, int height, const char *winname) |
|
void | OV_free () |
|
header for the Oblivision API.
- Author
- Tristan Wellman
◆ OV_colorTest()
Runs a simple color tester.
- Note
- Oblivision should be initialized prior to OV_colorTest()
◆ OV_createWindow()
int OV_createWindow |
( |
int |
width, |
|
|
int |
height, |
|
|
vec2 |
pos, |
|
|
const char * |
name |
|
) |
| |
Initializes and creates an Oblivision window.
- Note
- Oblivision should be initialized prior to OV_createWindow
- Parameters
-
width | the desired width of the window |
height | the desired height of the window |
pos | vector holding the x & y position for the OV window; |
name | name initialized as an ID with the window |
◆ OV_pollEvent()
void OV_pollEvent |
( |
SDL_Event |
event | ) |
|
runs the SDL event poll loop to register key events and update window positions
- Note
- Requires an initialized & running session of Oblivision.
- Parameters
-
event | SDL_Event used to poll key & mouse events as well as positions |
◆ OV_setBackground()
void OV_setBackground |
( |
OV_COLOR |
bg_color | ) |
|
Sets the background color of your Oblivision window.
- Parameters
-
bg_color | the RGBA8888 color set for the background |