19#include <emscripten/emscripten.h>
24#define WINDOW_WIDTH 640
25#define WINDOW_HEIGHT 480
26#define NUM_SPRITES 100
109 position->
x += velocity->
x;
111 velocity->
x = -velocity->
x;
112 position->
x += velocity->
x;
114 position->
y += velocity->
y;
116 velocity->
y = -velocity->
y;
117 position->
y += velocity->
y;
141 emscripten_cancel_main_loop();
183 emscripten_set_main_loop(
loop, 0, 1);
#define SDL_RenderPresent
#define SDL_SetRenderDrawColor
#define SDL_CreateTextureFromSurface
#define SDL_LogSetPriority
#define SDL_CreateWindowAndRenderer
@ SDL_LOG_CATEGORY_APPLICATION
GLint GLint GLint GLint GLint GLint y
GLint GLint GLint GLint GLint x
#define SDL_LoadBMP(file)
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
EGLSurface EGLnsecsANDROID time
EGLSurface EGLNativeWindowType * window
A rectangle, with the origin at the upper left (integer).
A collection of pixels used in software blitting.
The type used to identify a window.
int main(int argc, char *argv[])
static SDL_Rect velocities[NUM_SPRITES]
static SDL_Rect positions[NUM_SPRITES]
int LoadSprite(char *file, SDL_Renderer *renderer)
static SDL_Texture * sprite
void MoveSprites(SDL_Renderer *renderer, SDL_Texture *sprite)