X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fmsdos.c;h=5b037e0287befbf489d097cbdbbeba580d10434e;hb=998be01ad92a672b69b11e24d472f6c0c076817f;hp=16bbe771c3024842a5e62a1070269aa3938eabbe;hpb=3d07b68a314ce189f207e42d95f786979662410d;p=rocksndiamonds.git diff --git a/src/libgame/msdos.c b/src/libgame/msdos.c index 16bbe771..5b037e02 100644 --- a/src/libgame/msdos.c +++ b/src/libgame/msdos.c @@ -1,15 +1,14 @@ /*********************************************************** -* Rocks'n'Diamonds -- McDuffin Strikes Back! * +* Artsoft Retro-Game Library * *----------------------------------------------------------* -* ©1995 Artsoft Development * -* Holger Schemel * -* 33659 Bielefeld-Senne * -* Telefon: (0521) 493245 * -* eMail: aeglos@valinor.owl.de * -* aeglos@uni-paderborn.de * -* q99492@pbhrzx.uni-paderborn.de * +* (c) 1994-2000 Artsoft Entertainment * +* Holger Schemel * +* Detmolder Strasse 189 * +* 33604 Bielefeld * +* Germany * +* e-mail: info@artsoft.org * *----------------------------------------------------------* -* msdos.c * +* msdos.c * ***********************************************************/ #include "system.h" @@ -920,6 +919,39 @@ void XAutoRepeatOff(Display *display) keyboard_auto_repeat = FALSE; } +void AllegroDrawLine(Drawable d, int from_x, int from_y, int to_x, int to_y, + Pixel color) +{ + boolean mouse_off = FALSE; + + if ((BITMAP *)d == video_bitmap) + { + int dx = AllegroDefaultScreen().x; + int dy = AllegroDefaultScreen().y; + int x1, y1, x2, y2; + + from_x += dx; + from_y += dy; + to_x += dx; + to_y += dy; + + x1 = (from_x < to_x ? from_x : to_x); + y1 = (from_y < to_y ? from_y : to_y); + x2 = (from_x < to_x ? to_x : from_x); + y2 = (from_y < to_y ? to_y : from_y); + + freeze_mouse_flag = TRUE; + mouse_off = hide_mouse(display, x1, y1, x2 - x1 + 1, y2 - y1 + 1); + } + + line((BITMAP *)d, from_x, from_y, to_x, to_y, color); + + if (mouse_off) + unhide_mouse(display); + + freeze_mouse_flag = FALSE; +} + Bool MSDOSOpenAudio(void) { return allegro_init_audio();