624 |
#include "SDL_gfxPrimitives.h" |
#include "SDL_gfxPrimitives.h" |
625 |
|
|
626 |
void |
void |
627 |
DL_Lines::draw (px::GC &gc, const WorldArea &a, int /*x*/, int /*y*/) |
DL_Lines::draw (px::GC &gc, const WorldArea &a, int x, int y) |
628 |
{ |
{ |
629 |
clip (gc, get_engine()->world_to_screen(a)); |
clip (gc, get_engine()->world_to_screen(a)); |
|
draw_lines(gc); |
|
|
} |
|
|
|
|
630 |
|
|
|
void |
|
|
DL_Lines::draw_lines (GC &/*gc*/) |
|
|
{ |
|
631 |
SDL_Surface *surf = video::GetScreen()->get_surface(); |
SDL_Surface *surf = video::GetScreen()->get_surface(); |
632 |
|
|
633 |
Rect r = get_engine()->get_area(); |
Rect r = get_engine()->world_to_screen (a); |
634 |
SDL_Rect s; |
SDL_Rect s; |
635 |
sdl::copy_rect(s, r); |
sdl::copy_rect(s, r); |
636 |
SDL_SetClipRect (surf, &s); |
SDL_SetClipRect (surf, &s); |
640 |
int x1, y1, x2, y2; |
int x1, y1, x2, y2; |
641 |
get_engine()->world_to_screen (i->second.start, &x1, &y1); |
get_engine()->world_to_screen (i->second.start, &x1, &y1); |
642 |
get_engine()->world_to_screen (i->second.end, &x2, &y2); |
get_engine()->world_to_screen (i->second.end, &x2, &y2); |
643 |
aalineRGBA(surf, x1, y1, x2, y2, 240,140,20,255); |
//aalineRGBA(surf, x1, y1, x2, y2, 240,140,20,255); |
644 |
|
lineRGBA(surf, x1, y1, x2, y2, 240,140,20,255); |
645 |
} |
} |
646 |
SDL_SetClipRect (surf, NULL); |
SDL_SetClipRect (surf, NULL); |
647 |
} |
} |
1433 |
{ |
{ |
1434 |
CommonDisplay::new_world (w, h); |
CommonDisplay::new_world (w, h); |
1435 |
status_bar->new_world(); |
status_bar->new_world(); |
1436 |
set_follow_mode (FOLLOW_NONE); |
set_follow_mode (FOLLOW_SCREEN); |
1437 |
|
|
1438 |
// shadow_layer->new_world(w,h); |
// shadow_layer->new_world(w,h); |
1439 |
ScrollX = ScrollY = 0; |
ScrollX = ScrollY = 0; |