#8282 closed patch
Simple 8.3 Scumm Save Filename Truncation.
Reported by: | djwillis | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | Ports |
Version: | Keywords: | ||
Cc: | Game: |
Description
This is a quick patch that alters
ScummEngine::makeSavegameName in /scumm/saveload.cpp
to support 8.3 filenames if SHORT_SAVENAMES is defined.
Currently the only CVS platform that requires 8.3 save files is the GP32 and this patch is intended for that. However any other ports that require 8.3 filenames (RiscOS maybe) should be able to use this code. I have not done patches for any of the other game engines as there save files are (to the best of my knowledge) 8.3 compliant.
If required for other engines in the future the same define could be used to ensure consistent support at compile time. I checked the patch against 0.5.1 release code and 03/10/03 CVS (and changed slightly) for reference.
The #Define SHORT_SAVENAMES will also need to be added to the backends/gp32/build.rules however there are other issues with the current GP32 CVS code that prevent compiling currently anyway.
<code snippet> void ScummEngine::makeSavegameName(char *out, int slot, bool compatible) { #ifdef SHORT_SAVENAMES //DJWillis - Hack to ensure filenames are not over 8:3 for the GP32's SMC filesystem, could also be used by other ports. _game_name[8] = '\0'; // Truncate char with NULL value to break it at 8. #else sprintf(out, "%s.%c%.2d", _game_name, compatible ? 'c' : 's', slot); #endif } </code snippet> This is a quick patch that alters
ScummEngine::makeSavegameName in /scumm/saveload.cpp
to support 8.3 filenames if SHORT_SAVENAMES is defined.
Currently the only CVS platform that requires 8.3 save files is the GP32 and this patch is intended for that. However any other ports that require 8.3 filenames (RiscOS maybe) should be able to use this code. I have not done patches for any of the other game engines as there save files are (to the best of my knowledge) 8.3 compliant.
If required for other engines in the future the same define could be used to ensure consistent support at compile time. I checked the patch against 0.5.1 release code and 03/10/03 CVS (and changed slightly) for reference.
The #Define SHORT_SAVENAMES will also need to be added to the backends/gp32/build.rules however there are other issues with the current GP32 CVS code that prevent compiling currently anyway.
<code snippet> void ScummEngine::makeSavegameName(char *out, int slot, bool compatible) { #ifdef SHORT_SAVENAMES //DJWillis - Hack to ensure filenames are not over 8:3 for the GP32's SMC filesystem, could also be used by other ports. _game_name[8] = '\0'; // Truncate char with NULL value to break it at 8. #else sprintf(out, "%s.%c%.2d", _game_name, compatible ? 'c' : 's', slot); #endif } </code snippet>
Ticket imported from: #818230. Ticket imported from: patches/387.
Change History (3)
comment:1 by , 21 years ago
Status: | new → closed |
---|
comment:2 by , 21 years ago
comment:3 by , 6 years ago
Component: | → Ports |
---|
There is no patch attached.