252 |
//---------------------------------------------------------------------- |
//---------------------------------------------------------------------- |
253 |
namespace |
namespace |
254 |
{ |
{ |
255 |
Video_SDL *video_engine; |
Video_SDL *video_engine = 0; |
256 |
MouseCursor cursor; |
MouseCursor cursor; |
257 |
|
Surface *back_buffer = 0; |
258 |
} |
} |
259 |
|
|
260 |
/* This function is installed as an event filter by video::Init. It |
/* This function is installed as an event filter by video::Init. It |
357 |
return s->format->BitsPerPixel; |
return s->format->BitsPerPixel; |
358 |
} |
} |
359 |
|
|
360 |
|
Surface* |
361 |
|
video::BackBuffer() |
362 |
|
{ |
363 |
|
if (back_buffer==0) { |
364 |
|
back_buffer= Duplicate(GetScreen()); |
365 |
|
} |
366 |
|
return back_buffer; |
367 |
|
} |
368 |
|
|
369 |
void |
void |
370 |
video::Init() |
video::Init() |
533 |
void |
void |
534 |
video::FX_Push (Surface *newscr, int originx, int originy) |
video::FX_Push (Surface *newscr, int originx, int originy) |
535 |
{ |
{ |
536 |
double rest_time = 0.5; |
double rest_time = 0.7; |
537 |
|
|
538 |
double velx = -2 * originx / rest_time; |
double velx = -2 * originx / rest_time; |
539 |
double vely = -2 * originy / rest_time; |
double vely = -2 * originy / rest_time; |