Mercurial > sdl-ios-xcode
comparison src/video/qtopia/SDL_QWin.cc @ 1664:cd3db072ba8a SDL-1.3
more indent cleanup
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 28 May 2006 18:16:36 +0000 |
parents | 11775724e3fe |
children | 28193f833b2b |
comparison
equal
deleted
inserted
replaced
1663:11775724e3fe | 1664:cd3db072ba8a |
---|---|
263 dp2 += rowadd; | 263 dp2 += rowadd; |
264 } | 264 } |
265 } | 265 } |
266 | 266 |
267 // desktop, SL-A300 etc | 267 // desktop, SL-A300 etc |
268 bool | 268 /* *INDENT-OFF* */ |
269 SDL_QWin::repaintRotation0 (const QRect & rect) | 269 bool SDL_QWin::repaintRotation0 (const QRect & rect) |
270 { | 270 { |
271 if (my_image->width () == width ()) { | 271 if (my_image->width () == width ()) { |
272 uchar *fb = (uchar *) my_painter->frameBuffer (); | 272 uchar * fb = (uchar *) my_painter->frameBuffer (); |
273 uchar *buf = (uchar *) my_image->bits (); | 273 uchar * buf = (uchar *) my_image->bits (); |
274 if (rect == my_image->rect ()) { | 274 if (rect == my_image->rect ()) { |
275 SDL_memcpy (fb, buf, width () * height () * 2); | 275 SDL_memcpy (fb, buf, width () * height () * 2); |
276 } else { | 276 } else { |
277 int h = rect.height (); | 277 int h = rect.height (); |
278 int wd = rect.width () << 1; | 278 int wd = rect.width () << 1; |
279 int fblineadd = my_painter->lineStep (); | 279 int fblineadd = my_painter->lineStep (); |
280 int buflineadd = my_image->bytesPerLine (); | 280 int buflineadd = my_image->bytesPerLine (); |
281 fb += (rect.left () << 1) + rect.top () * my_painter->lineStep (); | 281 fb += (rect.left () << 1) + rect.top () * my_painter->lineStep (); |
282 buf += | 282 buf += (rect.left () << 1) + rect.top () * my_image->bytesPerLine (); |
283 (rect.left () << 1) + rect.top () * my_image->bytesPerLine (); | |
284 while (h--) { | 283 while (h--) { |
285 SDL_memcpy (fb, buf, wd); | 284 SDL_memcpy (fb, buf, wd); |
286 fb += fblineadd; | 285 fb += fblineadd; |
287 buf += buflineadd; | 286 buf += buflineadd; |
288 } | 287 } |
293 #ifdef __i386__ | 292 #ifdef __i386__ |
294 my_painter->fillRect (rect, QBrush (Qt::NoBrush)); | 293 my_painter->fillRect (rect, QBrush (Qt::NoBrush)); |
295 #endif | 294 #endif |
296 return true; | 295 return true; |
297 } | 296 } |
297 /* *INDENT-ON* */ | |
298 | 298 |
299 | 299 |
300 // Sharp Zaurus SL-5500 etc | 300 // Sharp Zaurus SL-5500 etc |
301 bool | 301 /* *INDENT-OFF* */ |
302 SDL_QWin::repaintRotation3 (const QRect & rect) | 302 bool SDL_QWin::repaintRotation3 (const QRect & rect) |
303 { | 303 { |
304 if (my_image->width () == width ()) { | 304 if (my_image->width () == width ()) { |
305 ushort *fb = (ushort *) my_painter->frameBuffer (); | 305 ushort * fb = (ushort *) my_painter->frameBuffer (); |
306 ushort *buf = (ushort *) my_image->bits (); | 306 ushort * buf = (ushort *) my_image->bits (); |
307 gs_fastRotateBlit_3 (fb, buf, rect); | 307 gs_fastRotateBlit_3 (fb, buf, rect); |
308 } else { | 308 } else { |
309 // landscape mode | 309 // landscape mode |
310 if (screenRotation == SDL_QT_ROTATION_90) { | 310 if (screenRotation == SDL_QT_ROTATION_90) { |
311 uchar *fb = (uchar *) my_painter->frameBuffer (); | 311 uchar * fb = (uchar *) my_painter->frameBuffer (); |
312 uchar *buf = (uchar *) my_image->bits (); | 312 uchar * buf = (uchar *) my_image->bits (); |
313 if (rect == my_image->rect ()) { | 313 if (rect == my_image->rect ()) { |
314 SDL_memcpy (fb, buf, width () * height () * 2); | 314 SDL_memcpy (fb, buf, width () * height () * 2); |
315 } else { | 315 } else { |
316 int h = rect.height (); | 316 int h = rect.height (); |
317 int wd = rect.width () << 1; | 317 int wd = rect.width () << 1; |
334 int wd = rect.width (); | 334 int wd = rect.width (); |
335 int fblineadd = my_painter->lineStep () - (rect.width () << 1); | 335 int fblineadd = my_painter->lineStep () - (rect.width () << 1); |
336 int buflineadd = my_image->bytesPerLine () - (rect.width () << 1); | 336 int buflineadd = my_image->bytesPerLine () - (rect.width () << 1); |
337 int w; | 337 int w; |
338 | 338 |
339 uchar *fb = (uchar *) my_painter->frameBuffer (); | 339 uchar * fb = (uchar *) my_painter->frameBuffer (); |
340 uchar *buf = (uchar *) my_image->bits (); | 340 uchar * buf = (uchar *) my_image->bits (); |
341 | 341 |
342 fb += | 342 fb += |
343 ((my_painter->width () - | 343 ((my_painter->width () - |
344 (rect.top () + | 344 (rect.top () + |
345 rect.height ())) * my_painter->lineStep ()) + | 345 rect.height ())) * my_painter->lineStep ()) + |
361 } | 361 } |
362 } | 362 } |
363 } | 363 } |
364 return true; | 364 return true; |
365 } | 365 } |
366 /* *INDENT-ON* */ | |
366 | 367 |
367 // ipaq 3800... | 368 // ipaq 3800... |
368 bool | 369 /* *INDENT-OFF* */ |
369 SDL_QWin::repaintRotation1 (const QRect & rect) | 370 bool SDL_QWin::repaintRotation1 (const QRect & rect) |
370 { | 371 { |
371 if (my_image->width () == width ()) { | 372 if (my_image->width () == width ()) { |
372 ushort *fb = (ushort *) my_painter->frameBuffer (); | 373 ushort *fb = (ushort *) my_painter->frameBuffer (); |
373 ushort *buf = (ushort *) my_image->bits (); | 374 ushort *buf = (ushort *) my_image->bits (); |
374 gs_fastRotateBlit_1 (fb, buf, rect); | 375 gs_fastRotateBlit_1 (fb, buf, rect); |
375 } else { | 376 } else { |
376 return false; // FIXME: landscape mode | 377 return false; // FIXME: landscape mode |
377 } | 378 } |
378 return true; | 379 return true; |
379 } | 380 } |
381 /* *INDENT-ON* */ | |
380 | 382 |
381 void | 383 void |
382 SDL_QWin::repaintRect (const QRect & rect) | 384 SDL_QWin::repaintRect (const QRect & rect) |
383 { | 385 { |
384 if (!my_painter || !rect.width () || !rect.height ()) { | 386 if (!my_painter || !rect.width () || !rect.height ()) { |