mirror of
https://github.com/cc65/cc65.git
synced 2025-01-11 11:30:13 +00:00
Cache aspect ratio like already done with resolution.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5012 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
b47113ad80
commit
2552a7c117
@ -22,6 +22,7 @@
|
|||||||
/* Driver stuff */
|
/* Driver stuff */
|
||||||
static unsigned MaxX;
|
static unsigned MaxX;
|
||||||
static unsigned MaxY;
|
static unsigned MaxY;
|
||||||
|
static unsigned AspectRatio;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -71,7 +72,7 @@ static void DoCircles (void)
|
|||||||
tgi_line (0, MaxY, MaxX, 0);
|
tgi_line (0, MaxY, MaxX, 0);
|
||||||
tgi_setcolor (Color);
|
tgi_setcolor (Color);
|
||||||
for (I = 10; I < 240; I += 10) {
|
for (I = 10; I < 240; I += 10) {
|
||||||
tgi_ellipse (X, Y, I, tgi_imulround (I, tgi_getaspectratio ()));
|
tgi_ellipse (X, Y, I, tgi_imulround (I, AspectRatio));
|
||||||
}
|
}
|
||||||
Color = Color == COLOR_FORE ? COLOR_BACK : COLOR_FORE;
|
Color = Color == COLOR_FORE ? COLOR_BACK : COLOR_FORE;
|
||||||
}
|
}
|
||||||
@ -192,6 +193,7 @@ int main (void)
|
|||||||
/* Get stuff from the driver */
|
/* Get stuff from the driver */
|
||||||
MaxX = tgi_getmaxx ();
|
MaxX = tgi_getmaxx ();
|
||||||
MaxY = tgi_getmaxy ();
|
MaxY = tgi_getmaxy ();
|
||||||
|
AspectRatio = tgi_getaspectratio ();
|
||||||
|
|
||||||
/* Set the palette, set the border color */
|
/* Set the palette, set the border color */
|
||||||
Border = bordercolor (COLOR_BLACK);
|
Border = bordercolor (COLOR_BLACK);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user