Lines Matching refs:position
155 SDL_Rect position;
160 position.x = x-(light->w/2);
161 position.y = y-(light->h/2);
162 position.w = light->w;
163 position.h = light->h;
165 SDL_BlitSurface(light, NULL, screen, &position);
167 SDL_UpdateRects(screen, 1, &position);
177 static SDL_Rect position;
229 /* Set the initial position of the sprite */
230 position.x = (screen->w-sprite->w)/2;
231 position.y = (screen->h-sprite->h)/2;
232 position.w = sprite->w;
233 position.h = sprite->h;
243 x_vel = ((int)x-position.x)/10;
244 y_vel = ((int)y-position.y)/10;
254 updates[0] = position;
273 position.x += x_vel;
274 if ( (position.x < 0) || (position.x >= screen->w) ) {
276 position.x += x_vel;
278 position.y += y_vel;
279 if ( (position.y < 0) || (position.y >= screen->h) ) {
281 position.y += y_vel;
295 updates[1] = position;
299 updates[1] = position;
311 updates[0] = position;
313 position.x = x-sprite->w/2; /* Center about X */
314 position.y = y-sprite->h/2; /* Center about Y */
315 updates[1] = position;
317 updates[1] = position;