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"
16 jsr _tgi_done ; Switch off graphics if needed
17 jsr tgi_init ; Go into graphics mode
18 jsr tgi_geterror ; Get the error code
19 sta _tgi_error ; Save for later reference
21 bne @L9 ; Jump on error
23 inc _tgi_gmode ; Remember that graph mode is active
25 ; Do driver initialization. Set draw and view pages.
32 ; Set the default palette.
34 jsr tgi_getdefpalette ; Get the default palette into A/X
37 jsr tgi_setpalette ; Set the default palette.
38 jsr tgi_geterror ; Clear a possible error code
40 ; Set the drawing color to white
42 @L1: lda #TGI_COLOR_WHITE
43 jsr _tgi_setcolor ; tgi_setcolor (TGI_COLOR_WHITE);
49 jsr pushax ; Width scale
50 jsr pushax ; Heigh scale
51 jsr _tgi_textstyle ; A = Direction = TEXT_VERTICAL