22 #define NUM_SPRITES 100
26 #ifdef TEST_NATIVE_WINDOWS
27 &WindowsWindowFactory,
29 #ifdef TEST_NATIVE_X11
32 #ifdef TEST_NATIVE_COCOA
101 position = &positions[
i];
102 velocity = &velocities[
i];
103 position->
x += velocity->
x;
104 if ((position->
x < 0) || (position->
x >= (viewport.
w - sprite_w))) {
105 velocity->
x = -velocity->
x;
106 position->
x += velocity->
x;
108 position->
y += velocity->
y;
109 if ((position->
y < 0) || (position->
y >= (viewport.
h - sprite_h))) {
110 velocity->
y = -velocity->
y;
111 position->
y += velocity->
y;
145 for (i = 0; factories[
i]; ++
i) {
146 if (
SDL_strcmp(driver, factories[i]->tag) == 0) {
147 factory = factories[
i];
156 SDL_Log(
"Creating native window for %s driver\n", driver);
190 if (!positions || !velocities) {
196 positions[
i].
x = rand() % (window_w -
sprite_w);
197 positions[
i].
y = rand() % (window_h -
sprite_h);
202 while (!velocities[i].
x && !velocities[i].
y) {
213 switch (event.
type) {