This section will explain what parameters are required by the functions that are needed to use TOD files. This will help you understand what data you need at hand for writing your own program. Remember an example program is at the end of this tutorial.
void InitialiseModelLink(pointer to the object, Maximum RSD, Number of TOD, X, Y, Z, Models Address);
The parameters for this function are a pointer to the structure of itself, the amount of objects in the TMD file then its initial position (X,Y,Z). Also the physical memory address of the TMD is needed as well as the number of animations that will be associated with this object.
void InitTod (pointer to the object, TOD number, ID list, TOD Address);
The first parameter is a pointer to the object structure. The next two parameters are the TOD number and its physical memory address. The TOD number is what will associate which animation is being referred to and can be any number from 0 to the Number of TOD files value set when initializing this model. The ID list can be ignored as this is usually set to a null value.
void ResetTod(pointer to the object , TOD number);
reset to the first frame of the TOD.
void DrawObjectLink(the object table);
The only parameter required by this function is the object’s object table itself.
u_long NextFrame(pointer to the object, loop);
This function needs to return a value indicating whether the animation has reached the end or not. Again a point to the object needs to be passed to the function. The function also needs to know if you want the animation to loop when it completes the animation or if you want it to stop until it is reset.
![]() |
Creating an animation on 3D Studio Max. |