67 lines
1.4 KiB
C
67 lines
1.4 KiB
C
/******
|
|
Example entry for state
|
|
******/
|
|
#include "state_blank.h"
|
|
|
|
/*
|
|
================================
|
|
void initBlankState()
|
|
|
|
Called once when switching to this state. Used to load whatever data used during process.
|
|
================================
|
|
*/
|
|
void initBlankState() {
|
|
|
|
}
|
|
|
|
/*
|
|
================================
|
|
void freeBlankState()
|
|
|
|
Called when switching out of this state. Free any data loading during init or process here.
|
|
================================
|
|
*/
|
|
void freeBlankState() {
|
|
|
|
}
|
|
|
|
/*
|
|
================================
|
|
void processState(int delta)
|
|
|
|
This function is our state's processing loop. It takes delta since last process in nanoseconds. This is where game logic occurs.
|
|
================================
|
|
*/
|
|
void processBlankState(int delta) {
|
|
}
|
|
|
|
/*
|
|
================================
|
|
void renderBlankState()
|
|
|
|
Our render state, called a variable amount of times per second. Make render calls here, bb.
|
|
================================
|
|
*/
|
|
void renderBlankState() {
|
|
g_renderSprite(menu_bg, g_screen, 0, s_bg_offset, 0);
|
|
g_renderElements(s_focus_elements);
|
|
}
|
|
|
|
/*
|
|
================================
|
|
void handleBlankState(struct TSEvent event)
|
|
|
|
This function handles user input. Likely to be removed and merged with processState.
|
|
================================
|
|
*/
|
|
void handleBlankState(struct TSEvent event) {
|
|
switch(event.type) {
|
|
case TS_KEYBOARD:
|
|
break;
|
|
case TS_MOUSECLICK:
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
}
|