Logically, an A-code source is a single file, usually with the .acd suffix. (The suffix is optional; if present, it can be omitted when nominating to acdc the A-code file to be processed.
In practice, A-code source can be split into a number files, which are incorporated in the "main" one by means of the A-code include major directive. Again, such include files are conventionally suffixed with .acd, which suffix may be omitted in include statements.
Obtaining is easy: here's the 91K gzipped tarball acode.tgz, which contains the ANSI C source code of acdc (and or the A-code kernel too). Building is also easy. The tarball includes a Unix/Linux makefile, but essentially all you need to do is to compile and link all acdc source files contained in the tarball. Any ANSI C compiler should do. Just remember to instruct the compiler to produce a 32bit executable, since acdc has a reson to care about the size of its pointers. For gcc this simply means adding the -m32 option to the compilation/linking command line.
The acdc executable optionally takes some command line arguments (in any order):
Derived ANSI C sources are created in the directory from which acdc is run, except that if a sub-directory called C is found, the derived sources are placed in there.
The A-code kernel consists of one source file adv00.c and one header file adv0.h. Both can be found in the above linked A-code tarball. Copy them alongside the C sources created by acdc, and you'll have the complete C source required to build an executable.
NB: The kernel sources as supplied are equivalent to, but not compatible with the "uglified" sources which I distribute as A-code game C sources. Do not mix them!
Building a simple adevnture executable from the derived C sources is simplicity itself: just compile and link the lot together with any ANSI C compiler. But the resulting executable will be "dumb", lacking command history and editing facilities, and not windows-aware. If that's good enough for you, fine. but if you hit problems, or want a more sophisticated version, read the guide to building A-code games from intermediate C sources.
| Back to A-code page Back to main page |
Mike Arnautov, Tuesday, 01-Jan-2008 05:17:33 MST |