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"
17 jsr _tgi_done ; Switch off graphics if needed
18 jsr tgi_init ; Go into graphics mode
19 jsr tgi_geterror ; Get the error code
20 sta _tgi_error ; Save for later reference
22 bne @L9 ; Jump on error
24 inc _tgi_gmode ; Remember that graph mode is active
26 ; Do driver initialization. First set the default palette.
28 jsr tgi_getdefpalette ; Get the default palette into A/X
31 ora ptr1+1 ; Do we have a default palette?
33 jsr tgi_setpalette ; Set the default palette
35 ; Set the drawing color to the maximum color
37 @L1: ldx _tgi_colorcount
40 jsr _tgi_setcolor ; tgi_setcolor (tgi_getmaxcolor ());
44 lda #TGI_TEXT_HORIZONTAL
50 jsr tgi_textstyle ; Tell the driver about the text style