Originally posted by RandomTiger
I believe its a seperate compile option thats not been checked for ages so what little functionality was there is probably broken.
I'm not entirely sure if that code will work without major changes or not. (And remember, all my info is based freespace2_public rather then fs2_open.) The demo recording/playback code is marked by ifdefs in some places, other places have checks to make sure it doesn't check certain things while it's playing back a demo. (Said checks seem to exist in the release versions as well, though they'd always do the non-demo playback stuff.) And the demo playback is only enabled for a debug build as is. (See the call to demo_start_playback() from main_hall_do() in MainHallMenu.cpp.)
Setting the demo recorder on or off would be done using the debug console. As I can't compile the code and don't know how to use the debug console, I can't really test it. The demo file itself, as the code stands, would be test.fsd.
To enable demo recording you would have to make a #define for DEMO_SYSTEM and change demo_make to 1 either via code or using the debug console. Demo playback is done by hitting "KEY_DEBUGGED" (defined as 0x8000) plus d. I'm not sure what that debug key actually is because I'm not sure what key that hex value is associated with.
The function calls that I believe are needed to actually record the demo are present in Freespace.cpp, again associated with the DEMO_SYSTEM define. As far as I can tell without trying it, it looks like the demo system's code is still in place and might work. The one thing I am not sure about is game_level_init() which seems to have an integer argument that would only be set by the demo playback code, used to set the random number generator to the same number used in making the demo, but when called the function isn't passed any variables so it would never set that. I'm not sure if that even matters though. (It may be that was from an earlier version of the demo code and isn't used anymore.) In any event, it looks like the demo code could use some cleanup. (Just take a look at the #define for DEMO_DATA and you'll see what I mean.
)