2 ; Ullrich von Bassewitz, 21.06.2002
4 ; void __fastcall__ tgi_init (void);
5 ; /* Initialize the already loaded graphics driver */
8 .include "tgi-kernel.inc"
9 .include "tgi-error.inc"
15 jsr _tgi_done ; Switch off graphics if needed
16 jsr tgi_init ; Go into graphics mode
17 jsr tgi_geterror ; Get the error code
18 sta _tgi_error ; Save for later reference
20 bne @L9 ; Jump on error
22 inc _tgi_gmode ; Remember that graph mode is active
24 ; Do driver initialization. First set the default palette.
26 jsr tgi_getdefpalette ; Get the default palette into A/X
29 ora ptr1+1 ; Do we have a default palette?
31 jsr tgi_setpalette ; Set the default palette
33 ; Set the drawing color to the maximum color
35 @L1: ldx _tgi_colorcount
38 jsr _tgi_setcolor ; tgi_setcolor (tgi_getmaxcolor ());
42 lda #TGI_TEXT_HORIZONTAL
48 jsr tgi_textstyle ; Tell the driver about the text style