(English see below the german version)

              JBDLib 1.0 - 1999 by Skyfighter Productions

        Danke fr das Download dieses Programms. Ich
          hoffe, da Sie es nicht bedauern werden.

     bersicht:

     (1) FREEWARE
     (2) Voraussetzungen(geistl. / hardware)
     (3) Starterklrung
     (4) was enthlt die LIB / die QLB?
     (5) Kontakt

(1) FREEWARE Konzept
--------------------
Ich habe die Libary als FREEWARE erstellt. Jeder kann sie frei benutzen
und weitergeben, mu aber, falls er sie in ein Programm einbaut, meinen
Namen (im Programm!) erwhnen.
- nderungen an der Libary oder an diesem Text sind nicht erlaubt.
- Weitergabe einer so genderten Libary/Text ist nicht erlaut.
- Das umwandeln der LIB oder QLB-Datei in eine Quellcodedatei(egal wel-
  cher Programmiersprache) ist VERBOTEN.
- das Verndern der JBDLib.bi - Datei ist untersagt.

Falls Sie noch Fragen haben, knnen Sie mir eine EMAIL schreiben(s. 5.)

(2) Voraussetzungen:
--------------------
Vorausgesetzt wird eigentlich nur ein PC mit QB45 und einer VGA-Karte.
RAM sollte man mindestens(nach starten von QB und laden der LIB) noch
100 KB frei haben(Wert geschtzt). Und man braucht natrlich JBDs oder
GIFs um etwas zu erreichen. Wer dann noch etwas Festplattenspeicher
frei hat, sollte eigentlich keine Probleme mit der Libary haben.

(3) Start und laden der Libary:
-------------------------------
Eine Libary wird beim Start Ihres QBASIC/QB-Compilers geladen. Um die
JBDLib zu laden geben Sie die .exe-Datei des Compilers + "/L jbdlib"
ein. Voraussetzung ist, da sich JBDLib.QLB im gleichen(QB) Verzeichnis
wie der Compiler befindet.
Dann sollte der bliche Start erfolgen.
Um die LIBARY nun in Ihrem Programm zu benutzen, mssen Sie noch eine
Zeile an den Anfang des Programms schreiben:
'$INCLUDE: 'JBDLIB.BI'
oder
REM $INCLUDE: 'JBDLIB.BI'
Als letztes mssen Sie noch die Zeile   SCREEN 13    ins Programm
aufnehmen, um den Grafikmodus 320*200 mit 256 Farben zu setzen.
Das wars. Kommen wir zum Inhalt der LIB:

(4) Inhalt der Libary:
----------------------
Die Libary enthlt eigentlich alles, was man braucht um einigermaen
Grafik zu programmieren.

Hinweis: Sie knnen Dateien auf allen Zugriffsnummern verwenden, da die
SUBS einen AutoDetect durchfhren. Es mssen jedoch bei JBDLoad und
MakeJBD eine freie Datei, und bei GIF2JBD 2 freie Dateien zur Verfgung
stehen. Bitte setzen Sie den FILES= Wert in Ihrer CONFIG.SYS so, da
diese Voraussetzung gegeben ist.

Die einzelnen SUBs sind hier aufgelistet.

 - JBD-Loader:
  Aufruf:             JBDLoad FILE$, X%, Y%
  Erklrung:
   JBDLoad ldt eine JBD-Datei, die in FILE$ angegeben ist.
   Sollte die Datei keine gltige JBD-Datei sein, wird die SUB
   abgebrochen.

   FILE$    - die Datei, die geladen werden soll
   X%       - linker Rand des Bildes, zentriert, falls negativer Wert
   Y%       - oberer Rand des Bildes, zentriert, falls negativer Wert

   Wenn die JBD eine JBD BINARY 2 - Datei ist, mu das korrekte Pass-
   wort in JBDPass$ vor dem Aufruf gespeichert sein. Es ist nicht mg-
   lich, das Passwort aus der JBD zu lesen, da es verschlsselt ist.
   (fr Hacker wahrscheinlich trotzdem ein leichtes Spiel)

   Deshalb vergebe ich auch nie Quellcode fr den Modus 2.

  Wichtig: der JBDLoader funktioniert auch, nachdem Sie FadeOut verwen-
           det haben. die Palette wird dann einfach in TempPal% ge-
           schrieben, so da das Bild nach einem FadeIn korrekt ange-
           zeigt wird.

 - GIF2JBD - Konverter:
  Aufruf:             GIF2JBD "Datei1.GIF", "Datei2.JBD", JBDMode%
  Erklrung:
    Die SUB wandelt eine .GIF-Datei in eine .JBD-Datei um. Dabei wird
    leider der Bildschirm(/Palette) berschrieben. Die SUB ist deshalb
    wahrscheinlich eher zum Erstellen der JBDs, jedoch nicht in ferti-
    gen Programmen interressant.

    Datei1.GIF  -  Quelldatei, mu GIF 87a / 89a sein.

    Datei2.JBD  -  die Zieldatei wird im JBD-Format gespeichert.
                   (bestehende Dateien werden berschrieben!!!)

    JBDMode%    -  gibt an, ob die Zieldatei eine JBD BINARY 1 oder
                   eine JBD BINARY 2 sein soll. bei der JBD BINARY 2
                   knnen Sie sich ein Passwort aussuchen, das Sie in
                   die SHARED-Variable JBDPass$ speichern.
                   Merken(!!) Sie sich dieses Passwort. Es ist aus der
                   JBD-Datei nicht ersichtlich, da unkenntlich gemacht.

 - MakeJBD (FILE$, X1%, Y1%, X2%, Y2%, JBDMode%)
    Speichert einen Bildschirmausschnitt in einer JBD-Datei

    FILE$ - JBD-Datei(falls vorhanden wird sie berschrieben)

    X1%,Y1%,X2%,Y2% - Koordinaten des Bildes

    JBDMode% - gibt an, ob das Bild BINARY 1 oder BINARY 2 sein soll
    (details s. GIF2JBD)

 - FadeOut - Routine
    Blendet das Bild auf dem Bildschirm aus(nur im Grafikmodus 13
    getestet).

    Delay%      -  bestimmt, wie lange die Routine braucht(0=NoDelay)

    siehe -> waitfor

 - FadeIn - Routine
    Blendet das Bild auf dem Bildschirm wieder ein(nur im Grafikmodus
    13 getestet).

    Delay%      -  bestimmt, wie lange die Routine braucht(0=NoDelay)

    siehe -> waitfor

    Es lassen sich gute Effekte mit JBDLoad und FadeIn erzeugen:
    (Beispielprogramm):

    '$INCLUDE: 'JBDlib.bi'
    SCREEN 13             'Grafikmodus 13h setzen
    PRINT "Fading-Demo": SLEEP 1
    FadeOut 3
    LOCATE 1: PRINT"           "
    JBDLoad "datei1.jbd", -1, -1
    FadeIn 3
    LOCATE 24,1:PRINT "Fertig(Taste...)."; : SLEEP: SYSTEM

 - waitfor (Delay%)
  ist eine intern benutzte SUB um ein maschinenunabhngiges DELAY zu
  erzeugen. Diese SUB stammt nicht von mir, so da ich hier den Quell-
  code aufliste(Autor unbekannt)

  DEFINT A-Z
  SUB waitfor (Delay%)
   FOR I% = 1 TO Delay%: WAIT &H3DA, 8, 8: WAIT &H3DA, 8: NEXT
  END SUB

 - GetJoy (J%, X%, Y%, B1%, B2%)
  gibt die Koordinaten(+Buttons) der Joysticks zurck
  (Demoprogramm:)
  '$INCLUDE: 'JBDlib.bi'
  DO
   LOCATE 1
   GetJoy 1, X%, Y%, B1%, B2%                 'Aufruf: 1 fr Joystick A

   PRINT "Joystick A: X ="; X%; " Y ="; 
   PRINT Y%; " Button1 ="; B1%; " Button2 ="; B2%

   GetJoy 2, X%, Y%, B1%, B2%                 'Aufruf: 2 fr Joystick B

   PRINT "Joystick B: X ="; X%; " Y ="; 
   PRINT Y%; " Button1 ="; B1%; " Button2 ="; B2%
  LOOP WHILE INKEY$ = ""
  (einfach mal ausprobieren)

(5) Kontakt:
------------
Falls Sie Fragen haben wenden Sie sich bitte an mich:

Homepage: www.skyfighter.de.cx
Email   : sky@xgm.de

Oder treffen Sie mich in irgendeinem CHAT unter dem NICK Skyfighter.














              JBDLib 1.0 - 1999 by Skyfighter Productions

                Thanx for downloading this program. I
               hope that you don't feel sorry for that.

     Overview:

     (1) FREEWARE
     (2) Conditions(brain / hardware)
     (3) start descriptions
     (4) What does the libary contain?
     (5) Contact

(1) FREEWARE Concept
--------------------
I made the libary as FREEWARE. That means to you that you can use it
for free and that you can give it to other people without breaking any
law. But if you put it into your program you have to give CREDITS for
it IN! the program. That means(for example): You write a great game
with using my lib. Then you must mention my name, like "Graphics
 routines by Jan Hollburg".
- All changings on the lib or on this text are forbidden.
- Copying of a changed LIB/text are forbidden.
- the translation of the .LIB or .QLB file to a source code file(any
  programming language) is forbidden.
- the change of the JBDLib.bi - file is forbidden.

If you have any questions you can write me a EMAIL(see point 5)

(2) Conditions:
---------------
All you need is a PC with QB 4.5 and a VGA-Card. After the loading of
the compiler you should have at lease 100 K of free conventional memory
(value is estimated)
And, naturally you will need some JBDs or GIFs to work with it.
The persons who have, afer all, a little bit free disk space, they
should,'t have any problems with the lib.

(3) start and loading the lib:
------------------------------
A libary will be loaded when you start your QBASIC/QB Compiler. To load
the JBDLib type the .exe-file of the compiler + "/l jbdlib".
Then it should start properly
To use the LIBARY in your programs you need to add the line
'$INCLUDE: 'JBDLIB.BI'
or
REM $INCLUDE: 'JBDLIB.BI'
to the top of your program.
The last thing to do is to set the &H13 mode:
SCREEN 13
That's all. Here is the content of the lib:


(4) What does the libary contain?
---------------------------------
The libary contains all that you need to make a little bit like gra-
phics.

WARNING: Do not set a value > 63 in the TempPal%(C%,RGB%) variable!!!
  This WILL run the FadeIn routine in an endless loop!!!!!

  Next Version I will make that this is possible
  ( DO:
    IF TempPal%(C%,RGB%)>63 THEN TempPal%(C%,RGB%)=TempPal%(C%,RGB%)-64
    LOOP WHILE TempPal%(C%,RGB%)>63  )

HINT: You can use files on all numbers(#1, #2,...), because of the fact
  that the SUBs automatically test(with the FREEFILE command).
  But you need to have files free:
   JBDLoad, MakeJBD - 1 FILE   (jbd-file to load / save)
   GIF2JBD          - 2 FILEs  (gif-file to load and jbd-file to save)
  Please make sure that this is ok before you run one of these subs.
  To increase the number of files which can be opened at the same time,
  open you CONFIG.SYS file and set a higher value in the FILES= vari-
  able.

Here are the SUBs in the libary:

 - JBD-Loader:
  Call:             JBDLoad FILE$, X%, Y%
  Description:
   JBDLoad loads a JBD-file. If the file isn't a JBD then the SUB will
   break and you will return to your program.

   FILE$    - the file which will be loaded
   X%       - left border of the pic, center if it is < 0
   Y%       - top of the pic, center if it is < 0

   If the JBD is a JBD BINARY 2 - file, then you need to set the cor-
   rect password in JBDPass$ BEFORE(!!) you call the SUB.
   It's not possible to open the JBD and read out the password because
   it's scrambled. (If you are a hacker, it may be no problem for you.)

   Because of this fact I don't give the source of JBD 2 to anyone.

  Attention: The JBD-loader also works if you used FadeOut before you
       run it. The palette will be stored in TempPal and then, if you
       use FadeIn, it will be loaded.(see FadeIn for example)


 - GIF2JBD - converter:
  Call:             GIF2JBD "FILE1.GIF", "FILE2.JBD", JBDMode%
  Description:
    The SUB converts a .GIF-file into a .JBD-file. I'm sorry, but the
    screen (+ palette) will be overwritten. Because of this fact the
    SUB is more intresting to make JBDs for JBDLoad, but not in a com-
    plete program.

    FILE1.GIF  -  Source file, must be a GIF 87a / 89a .

    FILE2.JBD  -  file for saving the pic.
                  (existing files will be overwritten!!!)

    JBDMode%    -  tells the SUB if the JBD should be a JBD BINARY 1
                   or a JBD BINARY 2. If you use JBD BINARY 2, it's in-
                   tresting that it provides a password-funcion. The
                   password isn't given as a parameter. You must store
                   it in JBDPass$. (see JBDLoad)

 - MakeJBD (FILE$, X1%, Y1%, X2%, Y2%, JBDMode%)
    Saves a part of the screen in the JBD-File(+ the palette)

    FILE$ - JBD-file(if existing it will be overwritten !!!)

    X1%,Y1%,X2%,Y2% - coordinates of the pic

    JBDMode% - see GIF2JBD-routine

 - FadeOut - Routine
    Fade out the screen(tested in screen mode 13h)

    Delay% - gives the DELAY(0 = no delay)
             calls waitfor(Delay%)
             see -> waitfor

 - FadeIn - Routine
    Fade in the picture on the screen(tested in screen mode 13h)

    Delay% - gives the DELAY(0 = no delay)
             calls waitfor(Delay%)
             see -> waitfor

    You can do interesting effects with JBDLoad and FadeIn:
    (demo source:)

    '$INCLUDE: 'JBDlib.bi'
    SCREEN 13             'set up screen mode 13h
    PRINT "Fading-Demo": SLEEP 1
    FadeOut 3
    LOCATE 1: PRINT"           "
    JBDLoad "file1.jbd", -1, -1    'please create this file first!!!
    FadeIn 3
    LOCATE 24,1:PRINT "Complete(Key...)."; : SLEEP: SYSTEM

 - waitfor (Delay%)
  is a internal used SUB which makes a machine independant DELAY.
  The SUB isn't from me so that I list the source code below
  (Author unknown)

  DEFINT A-Z
  SUB waitfor (Delay%)
   FOR I% = 1 TO Delay%: WAIT &H3DA, 8, 8: WAIT &H3DA, 8: NEXT
  END SUB

 - GetJoy (J%, X%, Y%, B1%, B2%)
  gets the coordinates(+ buttons) of the joysticks.
  (demo program:)

  '$INCLUDE: 'JBDlib.bi'
  DO
   LOCATE 1
   GetJoy 1, X%, Y%, B1%, B2%                   'Call: 1 for joystick A

   PRINT "Joystick A: X ="; X%; " Y ="; 
   PRINT Y%; " Button1 ="; B1%; " Button2 ="; B2%

   GetJoy 2, X%, Y%, B1%, B2%                   'Call: 2 for joystick B

   PRINT "Joystick B: X ="; X%; " Y ="; 
   PRINT Y%; " Button1 ="; B1%; " Button2 ="; B2%
  LOOP WHILE INKEY$ = ""
  (einfach mal ausprobieren)

(5) Contact:
------------
If you have any question please contact me:

Homepage: www.skyfighter.de.cx
Email   : sky@xgm.de

or you can see me in a chat(nickname Skyfighter)