TGI_FONT_VECTOR = 1
TGI_TEXT_HORIZONTAL = 0
-TGI_TEXT_VERTICAL = 1
+TGI_TEXT_VERTICAL = 1
;----------------------------------------------------------------------------
; Results of tgi_outcode
.global _tgi_clear
.global _tgi_done
.global _tgi_ellipse
+ .global _tgi_getaspectratio
.global _tgi_getcolor
.global _tgi_getcolorcount
.global _tgi_getdefpalette
.global _tgi_load_driver
.global _tgi_outtext
.global _tgi_outtextxy
- .global _tgi_pieslice
+ .global _tgi_pieslice
+ .global _tgi_getaspectratio
.global _tgi_setcolor
.global _tgi_setdrawpage
.global _tgi_setpalette
* getmaxy() + 1
*/
+unsigned __fastcall__ tgi_getaspectratio (void);
+/* Returns the aspect ratio for the loaded driver. The aspect ratio is an
+ * 8.8 fixed point value.
+ */
+
+void __fastcall__ tgi_setaspectratio (unsigned aspectratio);
+/* Set a new aspect ratio for the loaded driver. The aspect ratio is an
+ * 8.8 fixed point value.
+ */
+
unsigned char __fastcall__ tgi_getpixel (int x, int y);
/* Get the color value of a pixel. */
tgi_done.o \
tgi_ellipse.o \
tgi_free_vectorfont.o \
+ tgi_getaspectratio.o \
tgi_getcolor.o \
tgi_getcolorcount.o \
tgi_getdefpalette.o \
tgi_outtextxy.o \
tgi_popxy.o \
tgi_popxy2.o \
+ tgi_setaspectratio.o \
tgi_setcolor.o \
tgi_setdrawpage.o \
tgi_setpalette.o \
--- /dev/null
+;
+; Ullrich von Bassewitz, 2011-05-01
+;
+; unsigned __fastcall__ tgi_getaspectratio (void);
+; /* Returns the aspect ratio for the loaded driver. The aspect ratio is an
+; * 8.8 fixed point value.
+; */
+;
+
+ .include "tgi-kernel.inc"
+
+.proc _tgi_getaspectratio
+
+ lda _tgi_aspectratio
+ ldx _tgi_aspectratio+1
+ rts
+
+.endproc
+
--- /dev/null
+;
+; Ullrich von Bassewitz, 2011-05-01
+;
+; void __fastcall__ tgi_setaspectratio (unsigned aspectratio);
+; /* Set a new aspect ratio for the loaded driver. The aspect ratio is an
+; * 8.8 fixed point value.
+; */
+;
+
+ .include "tgi-kernel.inc"
+
+.proc _tgi_setaspectratio
+
+ sta _tgi_aspectratio
+ stx _tgi_aspectratio+1
+ rts
+
+.endproc
+
tgi_line (0, MaxY, MaxX, 0);
tgi_setcolor (Color);
for (I = 10; I < 240; I += 10) {
- tgi_ellipse (X, Y, I, tgi_imulround (I, tgi_aspectratio));
+ tgi_ellipse (X, Y, I, tgi_imulround (I, tgi_getaspectratio ()));
}
Color = Color == COLOR_FORE ? COLOR_BACK : COLOR_FORE;
}