Home | History | Annotate | Download | only in test

Lines Matching full:boat

136     SDL_Surface *boat[2];
178 if((boat[0] = SDL_LoadBMP("sail.bmp")) == NULL)
180 /* We've chosen magenta (#ff00ff) as colour key for the boat */
181 SDL_SetColorKey(boat[0], SDL_SRCCOLORKEY | SDL_RLEACCEL,
182 SDL_MapRGB(boat[0]->format, 0xff, 0x00, 0xff));
183 boatcols = boat[0]->format->palette->ncolors;
184 boat[1] = hflip(boat[0]);
185 SDL_SetColorKey(boat[1], SDL_SRCCOLORKEY | SDL_RLEACCEL,
186 SDL_MapRGB(boat[1]->format, 0xff, 0x00, 0xff));
199 * index 0..(boatcols-1): used for the boat
203 boat[0]->format->palette->colors, 0, boatcols);
222 /* determine initial boat placements */
224 boatx[i] = (rand() % (SCRW + boat[0]->w)) - boat[0]->w;
225 boaty[i] = i * (SCRH - boat[0]->h) / (NBOATS - 1);
252 /* update boat position */
254 if(boatx[i] <= -boat[0]->w || boatx[i] >= SCRW)
257 /* paint over the old boat position */
260 r.w = boat[0]->w;
261 r.h = boat[0]->h;
268 updates[i].w = boat[0]->w + SPEED;
269 updates[i].h = boat[0]->h;
280 /* paint boat on new position */
283 if(SDL_BlitSurface(boat[(boatdir[i] + 1) / 2], NULL,
285 sdlerr("blitting boat");