This directory contains example code showing how to use the
d3 demo library.

These examples are in the public domain, but note that except for
change_viewpoint, they are still covered by the GNU GPL because
they use the d3 demo library.

Here is the list of examples currently included:

capdemo
	Limits the amount of frames per second in a demo. The method
	used is rather cheap because no data is recalculated; it merely
	takes out frames until the time difference is large enough.
	Despite this, it can still be useful to reduce the framerate
	on demos which were recorded with a lot of FPS.

change_viewpoint
	Changes the base viewpoint in a demo. While it's possible to
	cycle between players by hitting P during playback, the view
	always switches back whenever the base player respawns. Also,
	the rear view is buggy; when turned on during playback it shows
	the base player's rear view.

	This utility helps to get rid of these annoyances if you like
	watching a certain demo from a different player's point of view.
	Note that this is not a real example in that it doesn't use the
	d3 demo library - it's a standalone program - but the examples
	directory seemed to be the best place for it. Also, it changes
	a demo directly instead of rewriting a modified version like
	some other examples do; this is not possible with the current
	d3demo interface.

copydemo
	Reads and parses a demo and writes it to a new file, unmodified;
	the resulting demo file should be identical to the original.

fixdemo
	Takes out event data that may cause D3 to crash during playback
	of the demo. This currently only takes out one specific type of
	event on a certain condition and is nowhere near a utility that
	can fix any demo, but I have used it to fix one and decided to
	include it as an example and as a base for an improved demo
	fixing utility.

fps
	Prints some simple statistics on the framerate of a demo.

interpolate
	Interpolates one object's rotation in a demo. It too uses a
	rather cheap method, but produces interesting output. The first
	parameter should be the object ID to interpolate, meaning the
	ID part of the object handle (or handle & 0xfff). The result
	may look a bit jittery; I think this is because the movement is
	not interpolated. Like most of the others, this utility is
	included as an example and as a base for improvement.

print_hud_messages
	Prints all HUD messages in a demo.

remove_screen_messages
	Removes all screen messages from a demo (for most multiplayer
	demos this means the annoying "Press space bar to continue..."
	messages that appear when the recording player dies, but never
	disappear).
