12 #define FRICTION 0.0008f 13 #define GRAVITY_CONSTANT 0.004f 16 #ifndef SDL_IPHONE_MAX_GFORCE 17 #define SDL_IPHONE_MAX_GFORCE 5.0f 35 double deltaMilliseconds = deltaTime * 1000;
48 #define SINT16_MAX ((float)(0x7FFF)) 69 if (speed -
FRICTION * deltaMilliseconds > 0) {
121 if (bmp_surface ==
NULL) {
143 if (bmp_surface ==
NULL) {
183 fatalError(
"Could not open joystick (accelerometer)");
185 printf(
"joystick number of axis = %d\n",
187 printf(
"joystick number of hats = %d\n",
189 printf(
"joystick number of balls = %d\n",
191 printf(
"joystick number of buttons = %d\n",
213 render(renderer, w, h, deltaTime);
double updateDeltaTime(void)
#define SDL_LoadBMP(file)
#define SDL_INIT_JOYSTICK
void fatalError(const char *string)
int main(int argc, char *argv[])
GLfloat GLfloat GLfloat GLfloat h
A collection of pixels used in software blitting.
#define SDL_SetTextureBlendMode
static SDL_Joystick * accelerometer
#define SDL_JoystickNumButtons
void render(SDL_Renderer *renderer, int w, int h, double deltaTime)
static struct @61 shipData
void initializeTextures(SDL_Renderer *renderer)
#define SDL_JoystickNumAxes
#define SDL_GetWindowSize
#define SDL_CreateTextureFromSurface
#define SDL_IPHONE_MAX_GFORCE
static SDL_Renderer * renderer
#define SDL_RenderSetLogicalSize
static SDL_Texture * space
GLubyte GLubyte GLubyte GLubyte w
#define SDL_JoystickNumHats
#define SDL_JoystickGetAxis
EGLSurface EGLNativeWindowType * window
#define SDL_DestroyTexture
The type used to identify a window.
static SDL_Texture * ship
#define SDL_JoystickNumBalls
#define SDL_CreateRenderer
A rectangle, with the origin at the upper left.
#define SDL_RenderPresent