i'm not a C user but on a real MSX for making a box you must use screen 2
screen 0 ans screen 1 are text mode
I wrote:
#include stdio.h #include glib.h int main() { screen(2); boxline(10,10,100,100,16,PSET); return 0; }
but I obtained the same messages:
in "main" calls "screen" : 1st argument conflict in "main" calls "boxline" : 5st argument conflict
Why this problem?
try:
#include <stdio.h> #include <glib.h> int main() { screen((TINY)2); ginit(); color((TINY)15,(TINY)0,(TINY)0); cls(); boxline(10,10,100,100,(TINY)6,PSET); getchar(); screen((TINY)0); return 0; }
also read http://www.msx.org/forum/msx-talk/development/msx-c-qa-offic... it contains some nice examples.
It work !!
Now I want to know what number of screen() I have to put for display both the graphic objects and the words.
Do you know that ?
I gift:
/*screen(0);*/ boxline(10,10,100,100,15,PSET);
and I obtained the follow messages:
in "main" calls "boxline" : 5th argument conflict
Why this problem?
The last two parameters of boxline() are of type TINY. When you pass numeric values in MSX-C they're always passed as ints by default. Cast the value used for the fifth parameter like this:
boxline(10,10,100,100,(TINY)15,PSET);
I wrote:
[...] screen(2); [...]
but I obtained the same messages:
in "main" calls "screen" : 1st argument conflict in "main" calls "boxline" : 5st argument conflict
Why this problem?
Here you have to cast the parameter as well:
screen((TINY)2);
My code now is this:
#include #include int main() { screen((TINY)2); ginit(); color((TINY)15,(TINY)0,(TINY)0); boxline(10,10,20,20,(TINY)15,PSET); putspr((TINY)0,50,50,(TINY)2,(TINY)1); return 0; }
When I run the xtetris.com I obtain than the sprite doesn't appair.
Why?
in basic you must declare the datas off sprite
i think you have no datas
It's like Jipe said, what sprite would you expect since you didn't declare one
Have a look at the game examples at https://github.com/sndpl/msx-c-intro/