home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Stars of Shareware: Programmierung
/
SOURCE.mdf
/
programm
/
msdos
/
c
/
playfli
/
playfli.doc
< prev
next >
Wrap
Text File
|
1994-06-29
|
6KB
|
159 lines
The source code and executables for both the MODEX and VESA fli players are
in the public domain. (As well as all the MODEX routines(Written by Matt
Pritchard) and the Miscellaneous routines (Written by the author, Dean Beeler).
It's that simple.....
Ok, the program PLAYFLI6.BAS or PLAYFLI6.EXE is a 320x200x256 fli player.
(Done in MODEX)
I made the program much more efficient, and fixed a few bugs....
The program PLAYFLI8.BAS or PLAYFLI8.EXE is a 640x400x256 fli player.
(Done in VESA)
The VESA routines are as fast as I could get them in QB4.5, but if you have
any faster routines, (even if they are in or for C or ASM or Pascal), send
them to me, I would appreciate it a lot.
My address is:
Dean Beeler
4308 Landsdowne North
Owensboro, KY 42303
The routines contained in MENULIB.BAS or MENULIB.OBJ or MENULIB.LIB or
MENULIB.QLB do the following things:
SUB Writedot (x, y, c)
x - the horizontal coordinate for the pixel to be drawn
y - the vertical coordinate for the pixel to be drawn
c - the color for the pixel to be drawn
NOTE: You must first use the sub SETVESA(This sub does not check for VESA
compatibility) and you must DEF SEG = &HA000 .
SUB Setvesa (Mode)
Mode - a number 0 - 3 representing the mode wanted, you can also use the
constants that I have in the .BI:
Vesa640x400 = 0 = 640x400x256
Vesa640x480 = 1 = 640x480x256
Vesa800x600 = 2 = 800x600x256
Vesa1024x768 = 3 = 1024x768x256
Delay (Times!)
A sort of improved version of the SLEEP command.
FUNCTION Mouseinit%
Sets up the mouse in the current video mode
FUNCTION Getvect& (Interrup%)
Returns a 32-bit(LONG integer) pointer for the specified interrupt
FUNCTION Findfirst% (Filename$, Attr%, Buf as ANY)
Returns if the specified file was found.
The Buf is a type defined in the MENULIB.BI:
TYPE Filefind
Internal AS STRING * 21
Attr AS STRING * 1
Ftime AS INTEGER
Fdate AS INTEGER
Size AS LONG
Namext AS STRING * 13
END TYPE
The Namext is the full name of the file found
FUNCTION Findnext% (Buf as ANY)
Generally the same as Findfirst%, but the only parameter is the TYPEd array
of Buf. (DOS already knows what your looking for from the first call to
Findfirst%)
NOTE: Findfirst% must be called before this routine in order for DOS
to know what you are looking for.
FUNCTION Offp% (Pntr&)
Returns the offset of a 32-bit(LONG integer) pointer.
Imagine that, I gave BASIC pointers!!! The operate just as the do in C,
except that they are just normal LONG integers. The pointers only work
when using my routines.
FUNCTION Segp% (Pntr&)
Returns the segment of a 32-bit(LONG integer) pointer.
FUNCTION Ptr&(Array%())
Returns a 32-bit(LONG integer) pointer to an array.
FUNCTION Long2int% (Number&)
Forces a 32-bit LONG integer into a 16-bit integer.
NOTE: This truncates the most significant 16 bits.
FUNCTION Sbinit%(Port%, Irq%, Dmach%, Version%)
Returns if a Sound Blaster exists in a machine and the Port, Irq, Dma Channel,
and Version number.
NOTE: This uses the BLASTER environment variable.
(If it can not find it, it will only return the correct Port if a SB exists!)
FUNCTION Dmastat% (Dmach%)
Returns and UNSIGNED integer the current offset of a DMA transfer on a
specific channel.
FUNCTION Int2Long&(Integ%)
Forces a 16-bit integer into a 32-bit LONG integer.
You might say, why don't just use Long& = int%. My reason is that when you
do that, if the integer is > than 0x8000 (&H8000) it will make the LONG int
negative as well. This function doesn't do that, it gives the unsigned
value of the integer to the LONG integer. For example. If set the LONG int
to 0x8000 just by using an equal sign, the value of the LONG integer would be
-32767. But with this function, it would be 32768!
FUNCTION Dosread% (Pnt&, Size%, Handle%)
This returns the number of bytes actually read from the file.(Which is
less than the specified size of the read if the EOF is reached.) The handle
of a file opened with BASIC can be found if use the FILEATTR function. (This
is a BASIC function)
The Pnt& is a 32-bit pointer created with the Ptr& function (My function).
FUNCTION Doswrite% (Pnt&, Size%, Handle%)
This is generally the same as Dosread% except that it writes to a file
and returns the number of bytes written.
SUB Hidemouse
This hides the mouse's cursor so that screen writes may be done without errors.
(If the mouse is hidden multiple times without reshowing it, it will require
the same number of calls to the Showmouse routine to make it reappear.)
SUB Showmouse
This Shows the mouse's cursor after it has been hid or the mouse has be
initialized.
NOTE: The mouse driver's automatic cursor won't work in MODEX or VESA.
(It must be done manually)
SUB Mousestat (x%, y%, b%)
This returns the mouse's x and y coordinate and the button status in their
respective variables. The first bit of b% if set if the left button is press,
the second bit if the right button is pressed, and the third bit if the
middle button is pressed.
SUB MaxMousex (Minx%, Maxx%)
This sets the Minimal and Maximum horizontal coordinate of the mouse.
SUB MaxMousey (Miny%, Maxy%)
This sets the Minimal and Maximum vertical coordinate of the mouse.
SUB Outsb (Baseport%, Writeval%)
This sends a command to the Baseport + 0x0C (or &H0C) of the Sound Blaster.
Baseport + 0x0C is used to control the SB.
For any more specific information write to me via MAIL or my Compuserve
address. (The BASEPORT is a number line 0x220 or 0x240!)
SUB ResetSB (Baseport%)
This resets the Sound Blaster.
Well that's it...
Obviously, you can see a skeleton for many different type of programs.
(A VOC player, VESA graphics, MOUSE control, etc.)
If you want the specifics, just write to me... My address is:
Dean Beeler
4308 Landsdowne North
Owensboro, KY 42303
Or my COMPUSERVE address.
I use it under my dad's name (GERALD W. BEELER):
73223, 3130.