home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / HTMIX20.ZIP / SE.ZIP / LOADSCR.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1992-07-14  |  2.0 KB  |  47 lines

  1. program LoadScreen;
  2. {┌──────────────────────────────── INFO ────────────────────────────────────┐}
  3. {│ File    : LOADSCR.PAS                                                    │}
  4. {│ Author  : Harald Thunem                                                  │}
  5. {│ Purpose : Load a VGA text screen image from file.                        │}
  6. {│ Updated : July 13 1992                                                   │}
  7. {└──────────────────────────────────────────────────────────────────────────┘}
  8.  
  9. {────────────────────────── Compiler directives ─────────────────────────────}
  10. {$A+   Word align data                                                       }
  11. {$B-   Short-circuit Boolean expression evaluation                           }
  12. {$E-   Disable linking with 8087-emulating run-time library                  }
  13. {$G+   Enable 80286 code generation                                          }
  14. {$R-   Disable generation of range-checking code                             }
  15. {$S-   Disable generation of stack-overflow checking code                    }
  16. {$V-   String variable checking                                              }
  17. {$X-   Disable Turbo Pascal's extended syntax                                }
  18. {$N+   80x87 code generation                                                 }
  19. {$D-   Disable generation of debug information                               }
  20. {────────────────────────────────────────────────────────────────────────────}
  21.  
  22. uses  Dos,
  23.       Strings,
  24.       Screen;
  25.  
  26. var   Path : PathStr;
  27.       Dir  : DirStr;
  28.       Name : NameStr;
  29.       Ext  : ExtStr;
  30.  
  31. begin
  32.   WriteLn('Load Screen v2.0');
  33.   WriteLn;
  34.   if ParamCount<>1 then
  35.   begin
  36.     WriteLn('Wrong number of parameters.');
  37.     WriteLn('Usage : LOADSCR filename[.ext]');
  38.     Halt(1);
  39.   end;
  40.   Path := UpcaseStr(ParamStr(1));
  41.   FSplit(Path,Dir,Name,Ext);
  42.   if Ext='' then
  43.     Path := Dir+Name+'.SCR';
  44.   if LoadScreenFromFile(Path) then
  45.   else WriteLn('Error loading screenfile ',Path);
  46. end.
  47.