This morning I got implemented a little code, that can be used to get timestamp based on ANSI C code using Monkey 2 programming language’s libc. Let’s take first look at the Monkey 2 code: Namespace myapp #Import “<std>” #Import “<libc>” Using std.. Using libc.. Function Main() Local seconds:time_t Local p:tm_t Ptr Local date:String libc.time(VarptrContinue reading “How to get timestamp in Monkey 2 with libc and in C”
Category Archives: C programming
Using C and DLLs in BlitzMax
BlitzMax apps can be made faster by using C. Also using DLLs in BlitzMax is possible, but that isn’t documented in BlitzMax’s documentation at all. First, an example of using C code in BlitzMax. As an example we generate the Mandlebrot set using C code to determine does the point belong to the set (seeContinue reading “Using C and DLLs in BlitzMax”
Hex 2 Dec
In many programming languages there is built-in command or function to convert a decimal value to a hex value. But at least in BlitzMax there isn’t a command or function to convert a hex value to a dec value. In this post I present my little function to convert a hex value to dec valueContinue reading “Hex 2 Dec”
How to retrieve the %AppData% folder
AppData folder is used to store data like hiscores, config, etc. of a game (or app). The AppData folder is a special folder that’s location is related to Windows version one is using. This is why AppData folder must be retrieved with the aid of the system. In Blitz3D retrieving the AppData folder is asContinue reading “How to retrieve the %AppData% folder”