Just some convenience junk by Shark Byte<wajamala@yahoo.com>
some of these may have already been done by someone else,
but then again, some of them may not have...

Some of these are are standalone,
while some have includes for other files listed here.
For those that do, their includes are listed here.

Some of the files have explanations in the .e or .ex files

-----------------------------------------------------------------------------
                plain demos           
-----------------------------------------------------------------------------
kaos.ex      -- simple triangle fractal demo
                (requires modesel.e)

glife.ex     -- cellular life in 320x200 mode graphics
                usage: ex glife somebitmapfilename
life.bmp     -- a sample 320x200 bitmap to use with glife


-----------------------------------------------------------------------------
               procedure queueing: (multithreading for dos?)
-----------------------------------------------------------------------------
queue.e      -- round-robin manually timed multithreader
                (or is this a quasipseudomultithreader?)
                see queue.txt for documentation

qinput.e     -- a queued line input procedure that allows
                other queued procedures to run while you
                are typing in a line of text.
                (requires queue.e)

bkmusic.e    -- queued pc-speaker music that plays while
                allowing other queued procedures their turn
                (requires queue.e)
*.mb         -- sample pc music (single block)
*.mus        -- sample pc music (multiple block)
                (use pcmus.ex to edit these music files)

Queue demos:
 play.ex     -- uses bkmusic to play a pc music file

 foof.ex     -- some dots moving, and some stupid random notes
                press q to make them shutup
                (look at foof.ex before you run it)

 qtest.ex    -- shows the use of qinput, as you type in
                a line of text while some music is playing
                type the name of another music file
                (include the extension) and it will change
                the music to that file.


-----------------------------------------------------------------------------
                          file usage conveniences
-----------------------------------------------------------------------------
pak.e        -- read files that are inside id-style pak files
                (as in quake's pak0.pak)
    loadpakdir: give it the name of an id-style pak file
                and it returns the directory of that pak file.
                (or -1 on error)
  loadpakentry: give it the sequence that loadpakdir returned,
                and the name of what you want out of that pakfile,
                and it returns a string
                containing the file-within-a-pakfile you named.
                (or -1 on error)
        note -- if your program looks at the pakdir, and you want to
                give loadpakentry the position within the pakdir,
                rather than the name, of what you want, that will work too.

copyfile.e   -- 3 functions on binary files
      loadfile: give it a filename,
                it returns a string
                containing all the bytes from that file.
      savefile: give it a filename, and a STRING
                (thats a sequence of integers from 0 to 255, with NO nesting)
                and it writes the file.
      copyfile: give it 2 filenames,
                and it copies the contents of the first file
                onto the second (without shelling to system)
                (requires types.e)

textfile.e   -- 2 functions on text files
load_text_file: give it the name of a text file,
                and it returns the entire contents of that file
                as a sequence of strings
                where each string is one line of text from the file.
save_text_file: give it a filename
                and a sequence of strings,
                and it writes the text file.
                (requires types.e)

fgetput.e    -- 2 functions on files that contain 1 EU object.
       getfile: give it a filename,
                it returns the first object from that file.
                (for use with files that only have 1 object in them)
        note -- getfile returns {} on error, because in all likelyhood
                if you have a file with just one object in it, that object
                is not going to be {}
                (and if it is, the file is empty anyway)
       putfile: give it a filename,
                and an object to put in it,
                and it writes the file.
                (requires put.e)


-----------------------------------------------------------------------------
      Something to help you write your own text based adventure games
-----------------------------------------------------------------------------
tbag.e       -- T.B.A.G. = Text Based Adventure Games
                some routines to make those things easier to write

story1.ex    -- a sample (unfinished) interactive story
                (requires tbag.e)


-----------------------------------------------------------------------------
   small conveniences: stuff you easily could do manually, but why bother?
-----------------------------------------------------------------------------
dim.e       -- conveniently pre-dimension a sequence like a standard array
               with as many dimensions as you want
               example:  s = dim(3,5) makes s a predimensioned 3x5 array
               (easier than nesting repeats, i think, but it is
               limited to straight-dimensioned arrays only)

delay.e     -- fractional second version of misc.e's "sleep"
               using the time() function.
               usage: delay(a) where a can be less than 1 second
               (you've probably written a similar one yourself)

split.e     -- just like perl's split function
               give it a separator and a string,
               and it returns a list of strings.
               example: split(' ',"this is a test")
               would return {"this","is","a","test"}
               just as it would in a perl program

modesel.e   -- presents you with a menu from which to select a video mode
               usage: a=modesel() -- returns mode# of the one u selected


-----------------------------------------------------------------------------
                            other misc. stuff
-----------------------------------------------------------------------------
pcmus.ex     -- an editor for the queued music that bkmusic.e plays
                (requires delay.e)
                (pcmus may still be a bit buggy)

types.e      -- defines 2 types:
                char: an integer from 0 to 255
                string: a non-nested sequence of chars

retrace.e    -- ported from fpc pascal -- wait for vert. retrace of monitor
                usage: call(retrace)  DOS, VGA

----------------------------------------------------------------------------
You may have noticed that all of my .ex files have as their first line
-- %0
or
-- %0 %1 %2 %3 or whatever if they take some cmd line parameters
on my pc, i have them named as .bat
and i have a file in my util subdir(which is on the path)
called "--.bat"
containing the lines:

@echo off
if %eudir%. == . set eudir=d:\prog\eu2
%eudir%\bin\ex %1.bat %2 %3 %4 %5 %6 %7 %8 %9

(d:\prog\eu2 is where my euphoria subdir is;
 if you want to use a --.bat, you'll need put where yours is instead)

Thats just for a bit of convenience: i type myprog instead of ex myprog
----------------------------------------------------------------------------

pkzip listing:

 Length  Method   Size  Ratio   Date    Time    CRC-32  Attr  Name
 ------  ------   ----- -----   ----    ----   -------- ----  ----
   7920  DeflatN   2551  68%  11-12-00  21:23  4b09744b --w-  EU.TXT
   1248  DeflatN    658  48%  08-20-00  21:49  13ebe584 --w-  KAOS.EX
   2512  DeflatN    773  70%  10-28-00  19:57  bb53eeef --w-  GLIFE.EX
   1002  DeflatN    504  50%  11-10-00  23:30  e3ca3d9c --w-  PLAY.EX
  65078  DeflatN    746  99%  11-12-00  19:55  c3f714a6 --w-  LIFE.BMP
   3225  DeflatN   1258  61%  11-10-00  23:29  151fc592 --w-  QUEUE.E
   1859  DeflatN    770  59%  11-10-00  23:31  18a61e82 --w-  QINPUT.E
   2065  DeflatN    883  58%  11-10-00  23:25  ce38bf57 --w-  BKMUSIC.E
   1323  DeflatN    527  61%  11-10-00  23:30  5efab519 --w-  FOOF.EX
   1227  DeflatN    538  57%  11-12-00  20:44  c2352e6e --w-  QTEST.EX
   7840  DeflatN   1857  77%  11-09-00  19:41  84a799f6 --w-  PCMUS.EX
   2988  DeflatN   1134  63%  11-10-00  19:33  eb62ac06 --w-  PAK.E
   1285  DeflatN    521  60%  10-03-00  18:54  6f9c87ee --w-  COPYFILE.E
   1193  DeflatN    523  57%  10-03-00  20:15  d9519d37 --w-  TEXTFILE.E
    568  DeflatN    276  52%  11-08-00  20:35  5964979d --w-  FGETPUT.E
    358  DeflatN    215  40%  10-04-00  21:31  10cd42ca --w-  DIM.E
    135  DeflatN    113  17%  08-05-00  18:18  fe22a57b --w-  DELAY.E
    288  DeflatN    219  24%  10-04-00  21:40  7bd0a92e --w-  SPLIT.E
   1158  DeflatN    489  58%  08-20-00  22:00  09cdb98c --w-  MODESEL.E
  13267  DeflatN   4142  69%  11-12-00  21:15  1851a155 --w-  STORY1.EX
    371  DeflatN    196  48%  08-13-00  19:05  f2fc1990 --w-  TYPES.E
    568  DeflatN    277  52%  10-28-00  22:30  2ba8b33e --w-  RETRACE.E
    114  DeflatN     47  59%  11-09-00  19:39  a32eb417 --w-  TUNE01.MB
   1441  DeflatN    391  73%  11-06-00  21:28  66bcdf5a --w-  BLEAH.MB
   1411  DeflatN    420  71%  11-03-00  20:05  cc57b131 --w-  WEIRD.MB
    660  DeflatN    161  76%  11-03-00  20:12  ee831891 --w-  BLIPPY.MB
   1175  DeflatN    270  78%  11-04-00  00:59  90cf6cd8 --w-  BOC.MB
   1290  DeflatN    362  72%  11-03-00  20:40  bfd5b666 --w-  HORROR.MB
   1398  DeflatN    384  73%  11-03-00  20:13  ec3fa3bd --w-  PANIC.MB
    395  DeflatN    100  75%  11-05-00  17:09  9a868bd7 --w-  MINOR.MB
    386  DeflatN    110  72%  11-05-00  17:21  6695e775 --w-  BLOX.MUS
   1107  DeflatN    504  55%  10-28-00  20:34  9ad5c763 --w-  PAK.TXT
   9665  DeflatN   2946  70%  11-10-00  23:41  be95797f --w-  QUEUE.TXT
  10168  DeflatN   2979  71%  10-01-00  21:40  f44d5ad0 --w-  TBAG.E
    118  DeflatN     90  24%  11-12-00  21:03  f4910910 --w-  EX.ERR
    841  DeflatN    428  50%  08-13-00  19:58  8733ad48 --w-  PUT.E
    687  DeflatN    319  54%  11-12-00  21:04  28921a34 --w-  GMODE.E
    694  DeflatN    440  37%  11-12-00  21:31  654f8127 --w-  SUBMIT.TXT
 ------          ------  ---                                  -------
 149028           29121  81%                                       38
