![]() |
FAT-Engine - SDK | (c) 2001/2002 TiCT |
How To Start Programming A FAT-Client |
I suppose you have already installed TIGCC (GNU C Compiler for TI+89/TI-92+). If not check the official homepage of the TIGCC-Team at http://tigcc.ticalc.org to get the latest version and install the compiler.
The simplest way to get started with FAT-Client Programming is to use one of the examples of the SDK as template.
- Make a new directory
- Copy the example sourcecode into it. You need three files from src/examples: utils.c, indices.h and fatdX.c (X = a number).
- Copy fat.h from src/includes into your new directory.
- Rename the fatdX.c file to anything you want.
- Open the renamed file and change line #include "../includes/fat.h" to #include "fat.h"
- Compile your program with (suppose myprog is the name you have chosen): tigcc myprog.c -pack mydata
That's it. Your program should compile now without any problems.
To start it do the following:
- Upload fatlib.89y and fatdtx.89y (the texturefile used by the demos) from directory bin89 to your TI-89 OR upload fatlib.9xy and fatdtx.9xy (the texturefile used by the demos) from directory bin92p to your TI-92p.
- Upload myprog.89z and mydata.89y from the directory you have created to your TI-89 OR Upload myprog.9xz and mydata.9xy from the directory you have created to your TI-92p.
- Run it by typing myprog() followed by [ENTER].
At least you have now a working prototype for your program. Try to use a larger map or different data in the map. Try to modify the movement code in utils.c. There are many ideas, you can start with. Just be creative ;-)
... and don't forget to examine the other demos, too. The demos itself are kept all very simple by intention and most of them focus just on one feature of the FAT-Engine. Combine a few of the features and improve them to become more "intelligent"!
Adding new textures to the texture file (fatdtx) or replacing the old ones isn't complicated, too. Just copy file src/examples/textures.txt to your directory. Modify it and generate a new version using tool TexMaker from directory bin. Yet the demos look for a file called fatdtx. So if you don't change this, too, you have to call texmaker like this:
texmaker -i indices.h textures.txt fatdtx
Just play around with it. The FAT-Engine won't bite ;-)