No you don't have to change the code at all. All you have to change is the file.
In my Blood and Plunder Gauntlet Clone for the replay I did as the others have suggested:
In 'record' mode store each action/button press in a 'type', at the end of the session save the data out to a file. Then when in demo mode it would read in the data into a 'type' then act on those actions in sequence during the demo.
No code needs to be changed. You will have to change the data file's contents regardless of whether you use virtual key or generate the data file by playing the game yourself or simply changing them in a text file.
In my Blood and Plunder Gauntlet Clone for the replay I did as the others have suggested:
In 'record' mode store each action/button press in a 'type', at the end of the session save the data out to a file. Then when in demo mode it would read in the data into a 'type' then act on those actions in sequence during the demo.
No code needs to be changed. You will have to change the data file's contents regardless of whether you use virtual key or generate the data file by playing the game yourself or simply changing them in a text file.