The latest improvements introduced a little bit of regression, now mostly fixed.
The basic monochrome function base is now available for all the targets featuring the TMS9918 VDP.
The MSX and SVI targets can reduce the program size and get extra features specifying the "-lmsxbios" or "-lsvibios" library options.
The text mode environment is still slightly target specific, if in trouble please consider to use the ANSI VT library (e.g. -clib=ansi).
If you enjoyed the past example programs I suggest to try the new graphics/hawk.c one, it features a nice trick with bksave()/bkrestore() to animate big pictures in a partially portable way.
Monochrome graphics library fixed
I tried it. It works well.
Code: Select all
#include <graphics.h>
#include <math.h>
#include <stdio.h>
void main() {
int x, y;
clg();
for (x=0; x<=getmaxx(); x+=2) {
plot(x, getmaxy() / 2);
}
for (x=0; x<=getmaxx(); x++) {
y = (int)((getmaxy() / 2) * (1.0 - sin(M_PI * 2.0 * x / getmaxx())));
if (x==0){
plot(x, y);
} else {
drawto(x, y);
}
}
while (getk() < 1){}
}
Code: Select all
zcc +msx -lm -lndos -lmsxbios -create-app -subtype=disk -bn sin sin.c