Go to the documentation of this file.
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;
139 #ifdef __EMSCRIPTEN__
141 emscripten_cancel_main_loop();
182 #ifdef __EMSCRIPTEN__
183 emscripten_set_main_loop(
loop, 0, 1);
#define SDL_RenderPresent
A collection of pixels used in software blitting.
EGLSurface EGLnsecsANDROID time
static SDL_Texture * sprite
@ SDL_LOG_CATEGORY_APPLICATION
static SDL_Rect positions[NUM_SPRITES]
int LoadSprite(char *file, SDL_Renderer *renderer)
The type used to identify a window.
#define SDL_CreateTextureFromSurface
static SDL_Rect velocities[NUM_SPRITES]
GLint GLint GLint GLint GLint x
void MoveSprites(SDL_Renderer *renderer, SDL_Texture *sprite)
EGLSurface EGLNativeWindowType * window
#define SDL_LoadBMP(file)
GLint GLint GLint GLint GLint GLint y
#define SDL_CreateWindowAndRenderer
#define SDL_LogSetPriority
A rectangle, with the origin at the upper left.
#define SDL_SetRenderDrawColor
int main(int argc, char *argv[])
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)