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"
11 .import pushax, pusha, decax1
15 ;----------------------------------------------------------------------------
20 jsr _tgi_done ; Switch off graphics if needed
21 jsr tgi_init ; Go into graphics mode
22 jsr tgi_geterror ; Get the error code
23 sta _tgi_error ; Save for later reference
25 bne @L9 ; Jump on error
27 inc _tgi_gmode ; Remember that graph mode is active
29 ; Get the maximum X and Y coordinate
41 ; Do driver initialization. Set draw and view pages.
48 ; Set the default palette.
50 jsr tgi_getdefpalette ; Get the default palette into A/X
53 jsr tgi_setpalette ; Set the default palette.
54 jsr tgi_geterror ; Clear a possible error code
56 ; Set the drawing color to white
58 @L1: lda #TGI_COLOR_WHITE
59 jsr _tgi_setcolor ; tgi_setcolor (TGI_COLOR_WHITE);
65 jsr pushax ; Width scale
66 jsr pushax ; Heigh scale
67 jsr pusha ; Text direction = TGI_TEXT_VERTICAL
68 jmp _tgi_textstyle ; A = Font = TGI_FONT_BITMAP