id summary reporter owner description type status priority component version resolution keywords cc game 8282 Simple 8.3 Scumm Save Filename Truncation. djwillis "{{{#!Markdown 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> }}} {{{#!div style=""font-size: 75%"" Ticket imported from: !#818230. Ticket imported from: patches/387. }}}" patch closed normal Ports