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. Set draw and view pages.
31 ; Set the default palette.
33 jsr tgi_getdefpalette ; Get the default palette into A/X
36 jsr tgi_setpalette ; Set the default palette.
37 jsr tgi_geterror ; Clear a possible error code
39 ; Set the drawing color to the maximum color
41 @L1: ldx _tgi_colorcount
44 jsr _tgi_setcolor ; tgi_setcolor (tgi_getmaxcolor ());
48 lda #TGI_TEXT_HORIZONTAL
54 jsr tgi_textstyle ; Tell the driver about the text style