Unpack this anywhere. If the directory where you leave this is in "dir", you must add "dir\include;dir\include\3.1" to the EUINC environment variable for EUPHORIA 3.1 to work. The demos will work out of the box EUPHORIA 4.0 because of the eu.cfg in demo. You need to include similar lines for any program that should use DosRescue by putting "-i dir\include -i dir\include\4.0" to an eu.cfg file in the same directory as your program.
You can run seteuinc.bat in a DOS box to set the EUINC variable (but only in this dos box). You can then run most DOS programs that use graphics without modification!
Dosrescue is now a drop in replacement for some of the includes found in the "include" directory of your EUPHORIA 3.1 ior EUPHORIA 4.0 install. Here 'ior' is inclusive or. They override your standard routines so that you can do DOS style graphics using Windows' GDI.
You don't need to overwrite the files physically, modification of the EUINC variable is enough to cause EUPHORIA to no longer look in C:\EUPHORIA\INCLUDE and use these files instead. Most of the demos are from EUPHORIA's old demos when it was only a DOS program.
Legend: + implemented - not implemented yet ~ implemented with some restrictions 0 stub Console in-out routines + procedure print(integer fn, object x) - print a Euphoria object on one line, with braces and commas {,,} to show the structure + procedure printf(integer fn, sequence fmt, object x) - formatted print to a file or device + procedure puts(integer fn, object x) - output a string sequence to a file or device + function getc(integer fn) - read the next character from a file or device + function gets(integer fn) - read the next line from a file or device + function get_key() - check for key pressed by the user, don't wait + function wait_key() - wait for user to press a key Mouse support + function get_mouse() - return mouse "events" (clicks, movements) + procedure mouse_events(integer events) - select mouse events to watch for 0 procedure mouse_pointer(integer on_off) - display or hide the mouse pointer Console and graphics routines + procedure clear_screen() - clear the screen + procedure position(integer line, integer column) - set cursor line and column + function get_position() - return cursor line and column + function graphics_mode(integer m) - select a new pixel-graphics or text mode + function video_config() - return parameters of current mode + procedure scroll(integer lines, integer top, integer bottom) - scroll text up or down + procedure wrap(integer on) - control line wrap at right edge of screen + procedure text_color(integer color) - set foreground text color + procedure bk_color(integer color) - set background color + function palette(integer i, sequence rgb) - change color for one color number + procedure all_palette(sequence s) - change color for all color numbers + procedure get_all_palette() - get the palette values for all colors + function read_bitmap(sequence filename) - read a bitmap (.bmp) file and return a palette and a 2-d sequence of pixels + function save_bitmap(sequence s, sequence filename) - create a bitmap (.bmp) file, given a palette and a 2-d sequence of pixels 0 function get_active_page() - return the page currently being written to 0 procedure set_active_page(integer i) - change the page currently being written to 0 function get_display_page() - return the page currently being displayed 0 procedure set_display_page(integer i) - change the page currently being displayed ~ procedure sound(integer freq) - make a sound on the PC speaker (fixed duration) + procedure cursor(integer i) - select cursor shape + function text_rows(integer i) - set number of lines on text screen + function get_screen_char(integer line, integer column) - get one character from the screen + procedure put_screen_char(integer line, integer column, sequence s) - put one or more characters on the screen + save_text_image - save a rectangular region from a text screen + display_text_image - display an image on the text screen + procedure pixel(object colors, sequence location) - set color of a pixel or set of pixels + function get_pixel(sequence s) - read color of a pixel or set of pixels + procedure draw_line(integer color, sequence s) - connect a series of graphics points with a line + procedure polygon(integer color, sequence s) - draw an n-sided figure + procedure ellipse(integer color, integer fill, sequence xy1, sequence xy2) - draw an ellipse or circle + function save_screen(object x, sequence filename) - save the screen to a bitmap (.bmp) file + function save_image(sequence xy1, sequence xy2) - save a rectangular region from a pixel-graphics screen + procedure display_image(sequence xy, sequence s) - display an image on the pixel-graphics screen ~ procedure use_vesa(integer i) - force the use of the VESA graphics standard Auxialary routines: procedure pass_key(object key) - emulate key-press, adds the key to the char_buf queue procedure add_custom_handler(integer id) - add custom window event handler to the custom_handlers queue. The usage see in mouse_rescue.ew procedure set_title(sequence title) - set window's title procedure set_delay(integer i) - set delay in ms to slow down execution (default 1) Problem Differences between DOS32 and DOS Rescue which probably wont be fixed : Sound will not wait for you to call sound(0) before turning the sound. The sound is fixed. Some Colors indexes in hardware are used for flashing on and off. This is not implemented. Other Differences : This will work on Vista. (Yay!) Known bugs: There is some unknown problem causing lines.exw to not function like it's DOS32 counter part. Font sizes are wrong.
Both Euphoria 4.0.2 and Euphoria 3.1 work with these routines, provided you setup your EUINC variable and your eu.cfg variable.
DOS32 | Dos Rescue | |
---|---|---|
DOS (no duh!), Windows 9x, Windows NT, 2000, XP(tested), 2003? | All Windows (XP tested) including Vista and 7 | |
![]() This was captured from a screen shot of bitmap.ex displaying the mode 5 palette and saved into this 24-bit gif |
![]() This was captured from a screen shot of bitmap.ex displaying the mode 5 palette and saved into this 24-bit gif |
|
![]() | ![]() |
|
![]() | ![]() |
|
DOS32 | Dos Rescue | |
![]() This was captured from a screen shot of bitmap.ex displaying the mode 15 palette and saved into this 24-bit gif |
![]() This was captured from a screen shot of bitmap.ex displaying the mode 15 palette and saved into this 24-bit gif |
|
![]() | ![]() |
|
DOS32 | Dos Rescue | |
mode 17 640x480x1 GREY | ![]() |
![]() |
DOS32 | Dos Rescue | |
mode X (19) 320x200x8 COLOR | ![]() | ![]() |
mode 257 640x480x8 COLOR | ![]() | ![]() |
Earlier versions of the dos_rescue.ew: * The original dos_rescue.ew by Robert Craig as a part of "Language War for Windows" (http://rapideuphoria.com/langwar.zip) * "Dos Rescue with small fix" (http://rapideuphoria.com/dosrescue.zip) by Marco Achury