Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs3-24sp
project01
Commits
80c82965
Commit
80c82965
authored
3 years ago
by
Sarah Acadia Dunbar
Browse files
Options
Download
Email Patches
Plain Diff
Add new file - state.h
parent
bfc69e07
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/state.h
+31
-0
include/state.h
with
31 additions
and
0 deletions
+31
-0
include/state.h
0 → 100644
View file @
80c82965
#include <stdio.h>
#include <stdlib.h>
#include "sdl_wrapper.h"
#include "polygon.h"
#include <math.h>
/**
* Stores the demo state
* Use this to store any variable needed every 'tick' of your demo
*/
typedef
struct
state
state_t
;
/**
* Initializes sdl as well as the variables needed
* Creates and stores all necessary variables for the demo in a created state variable
* Returns the pointer to this state
* (This is the state emscripten_main and emscripten_free work with)
*/
state_t
*
emscripten_init
();
/**
* Called on each tick of the program
* Updates the state variables and display as necessary, depending on the time that has passed
*/
void
emscripten_main
(
state_t
*
state
);
/**
* Frees anything allocated in the demo
* Should free everything in state as well as state itself.
*/
void
emscripten_free
(
state_t
*
state
);
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment