A-code games are, naturally enough, written in A-code, but as the first step of building an executable out of the A-code source, my A-code-to-C translator creates self-contained, intermediate ANSI C source, which can be then compiled and linked as any C program would be. This allows A-code games to be distributed in a highly portable C-source format.
I assume that you already have an A-code game C source, either from one of the A-code games adventure downloads page, or as the result of translating some A-code source by running acdc. If so, all you need now is an ANSI C compiler, though a pre-ANSI (K&R) compiler would probably do too.
To ditch the data file, you need to use the -preload command line option when running acdc. Instead of creating the .dat file, it will then create the adv6.h header file, which will be automatically incorporated in the executable, when you compile and link the derived C source -- assuming you machine/compiler can handle it.
If you subsequently decide that this was a bad idea after all, or if you got from somewhere else a derived C source which includes the adv6.h header file and no .dat file, and your compiler can't stomach it, don't worry. Just compile the C source with one of the symbols specifying a particular way of handling the data file, even though there is none (i.e. use -DSWAP, -DMEMORY or -DFILE, as explained above). This will exclude adv6.h from being incorporated into the executable. What is more, when run, the executable will attempt to open the data file, and finding none will try to open the header file and to construct the .dat file out of that -- after which it will proceed to treat the file in the way you requested.
If you don't have a Glk library, you can try using these Glk bundles -- one for Linux and one for Windows.
| Back to A-code page Back to main page |
Mike Arnautov, Tuesday, 01-Jan-2008 05:17:33 MST |