Using the Code
To get started using the code, at least be familiar
The file "creation.cpp"
is not actually part of the Lilith system - it drives the demo. It uses
the lilith code just like a game would. "creation.cpp" shows
how just about all the functionality of the engine works.
The file "scriptplayer.cpp"
parses an XML file and uses it to run the engine. It is not as complete
as creation.cpp, but shows (simply) how to use and access the features
of the system. The functionality in scriptplayer.cpp is broken down into
atomic blocks, which makes it more clear to see what is going on.
Startup and Shutdown Sequence
- Initialize SDL to use OpenGL
- Load the textures to the
system. These include both textures used by the game, and textures that
Lilith requires. The API docs for the Lilith3D list the required textures.
- Load the models. These include
game models and models used by the engine. The API docs for the Lilith3D
list the required models.
- Construct the Lilith3D object.
- Main loop: Call methods
of Lilith3D, followed by calls to BeginDraw(), Draw(), and EndDraw()
- Delete the Lilith object,
followed by the ResourcePool.