1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00

Added Game Speed command

This commit is contained in:
Robert Jordan
2015-06-25 11:19:23 -04:00
parent 937b887a91
commit 5645d8bd8a
9 changed files with 129 additions and 41 deletions

View File

@@ -1567,6 +1567,9 @@ static void title_sequence_open(const char *path, const char *customName)
} else if (_stricmp(token, "ZOOM") == 0) {
command.command = TITLE_SCRIPT_ZOOM;
command.zoom = atoi(part1) & 0xFF;
} else if (_stricmp(token, "SPEED") == 0) {
command.command = TITLE_SCRIPT_SPEED;
command.speed = max(1, min(4, atoi(part1) & 0xFF));
} else if (_stricmp(token, "WAIT") == 0) {
command.command = TITLE_SCRIPT_WAIT;
command.seconds = atoi(part1) & 0xFF;
@@ -1624,6 +1627,9 @@ void title_sequence_save_preset_script(int preset)
case TITLE_SCRIPT_ZOOM:
fprintf(file, "ZOOM %i\r\n", command->zoom);
break;
case TITLE_SCRIPT_SPEED:
fprintf(file, "SPEED %i\r\n", command->speed);
break;
case TITLE_SCRIPT_WAIT:
fprintf(file, "WAIT %i\r\n\r\n", command->seconds);
break;