Thanks @aoineko.
Yes, that worked in my own code, but I could not get it to work in the printf-code that comes in the lib provided by Fusion-C. Not sure what I did wrong, so that's why I passed this on to the provider(s) of Fusion-C to come up with something that works for everybody.
What you can do (doesn’t work for me)
1- go to fusion-c/lib/
Save the actual library file (fusion.lib)
2- Go to fusion-c/sources/lib/
Edit the printf.c file, and replace old function names by the new names by a search and replace inside the text.
3- Open a dos prompt, CD to the same folder as previously
And call the library compilation script _build_lib.bat
When I tried, the library was badly recompiled and unusable. But perhaps it is a problem from my side.
Let me know...
Sorry that this is a bit off topic.
I just started learning C with Fusion. I'm aiming to make a game for the GFX9000, just for my own amusement.
Could anyone help me with these two questions:
1 - How can I disable key click within the code?
2 - How do I make a pause? I.e. in milliseconds or something, just so I can adjust the speed of the program.
P.S. Thanks Eric for the great work you've put into this.
for the keyclick
use the KeySound() function
here an example of waiting routine
2 - How do I make a pause? I.e. in milliseconds or something, just so I can adjust the speed of the program.
The "right" way to do that is to wait for screen synchronisation (so your game loop will be at a constant frequency of 50/60 images per seconde).
here an example of waiting routine (Brut)
When I tried, the library was badly recompiled and unusable. But perhaps it is a problem from my side.
Let me know...
I tried that as well, didn't work for me either :-(
Until a clean solution is found, you may be able to create a clone of the missing functions on your own.
void __itoa(int value, char * str, unsigned char base) { _itoa(value, str, base); }
I don't know the exact _itoa() function prototype, but I hope you get the idea.
Thanks for your replies, aoineko and ericb59
For some reason I get compilation errors using Vsynch(), but I got it to work replacing it with HALT() or G9WaitVsync().
@bengalack
OK... It seems there was a bug in my Library compilation script for Windows.
Please edit the _build_lib.bat script and replace by this one :
http://msx.ebsoft.fr/fusion-c/_build_lib.bat
Let me know if it works now ...