program bitmap; {$M 8192,0,0} { Leave memory for child process } uses crt,dos,open,graphics; var count,h, s, s2, m, hund : Word; mode : byte; begin mode:=0; if (paramstr(1)='/?') or (paramstr(1)='') then begin writeln; Writeln('BITMAP FOR DOS Written by Franz Ayestaran (c)1997'); writeln('--------------'); writeln('The program loads 256 colour and greyscale bitmaps of upto'); writeln('1024x768 pixels in size, the <.bmp> extension is not required.'); writeln('A <.wav> file with the same name as the bitmap can also be'); writeln('played while displaying the bitmap when using the option.'); writeln('The system must have a Creative Soundblaster or aw32 card'); writeln('installed, with the file in the same directory.'); writeln; writeln('BITMAP

'); writeln; writeln('graphic_modes> 1: 320x200 - 2: 640x400 - 3: 800x600 - 4: 1024x768'); writeln; writeln('/p = Waits for key to be pressed when bitmap is displayed,'); writeln(' else the bitmap will be displayed for 10 seconds'); writeln('/f = Fades bitmap/palette in and out.'); writeln('/g = Only displays bimap palette.'); writeln('/s = Play <.wav> file with same filename as bitmap,'); writeln(' to stop playback press [ESC] the any key to exit.'); writeln('/? = Displays this screen when used in place of filename.'); end; if paramstr(2)='1' then mode:=1; if paramstr(2)='2' then mode:=2; if paramstr(2)='3' then mode:=3; if paramstr(2)='4' then mode:=4; if (paramstr(1)<>'/?') and (paramstr(1)<>'') then if Does_File_Exist(paramstr(1)+'.bmp') then begin if authentic_bitmap(paramstr(1)+'.bmp',mode) then begin asminitgraphics(mode); if (paramstr(3)='/g') or (paramstr(4)='/g') or (paramstr(5)='/g') or (paramstr(6)='/g') then begin clearpalettearray; asminitpalette; Load_Bitmap_palette(paramstr(1)+'.bmp'); palettegraph(mode); end; if (paramstr(3)<>'/g') and (paramstr(4)<>'/g') and (paramstr(5)<>'/g') and (paramstr(6)<>'/g') then Load_Bitmap(paramstr(1)+'.bmp',mode); if (paramstr(3)='/f') or (paramstr(4)='/f') or (paramstr(5)='/f') or (paramstr(6)='/f') then fadein(200) else asminitpalette; if (paramstr(3)='/s') or (paramstr(4)='/s') or (paramstr(5)='/s') or (paramstr(6)='/s') then begin if does_file_exist('play.exe') then if does_file_exist(paramstr(1)+'.wav') then exec_dos_command('play '+paramstr(1)+'.wav'); end; if (paramstr(3)='/p') or (paramstr(4)='/p') or (paramstr(5)='/p') or (paramstr(6)='/p') then repeat until keypressed else begin for count := 1 to 10 do begin GetTime(h,m,s,hund); repeat GetTime(h,m,s2,hund); until s2<>s; end; end; if (paramstr(3)='/f') or (paramstr(4)='/f') or (paramstr(5)='/f') or (paramstr(6)='/f') then fadeout(200); asmclosegraph; end; end else writeln('File not found!'); end.