Ticket #6276: groovie-savenames.diff

File groovie-savenames.diff, 1.1 KB (added by bluegr, 9 years ago)
  • engines/groovie/saveload.cpp

    diff --git a/engines/groovie/saveload.cpp b/engines/groovie/saveload.cpp
    index 78b79cf..75eacd7 100644
    a b Common::InSaveFile *SaveLoad::openForLoading(const Common::String &target, int s  
    118118                                case 0:
    119119                                        break;
    120120                                case 16: // @
     121                                case 254: // . (generated when pressing space)
    121122                                        c = ' ';
    122123                                        break;
    123124                                case 244: // $
  • engines/groovie/script.cpp

    diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp
    index 7625151..2ef6c21 100644
    a b void Script::savegame(uint slot) {  
    408408        // Cache the saved name
    409409        for (int i = 0; i < 15; i++) {
    410410                newchar = _variables[i] + 0x30;
    411                 if ((newchar < 0x30 || newchar > 0x39) && (newchar < 0x41 || newchar > 0x7A)) {
     411                if ((newchar < 0x30 || newchar > 0x39) && (newchar < 0x41 || newchar > 0x7A) && newchar != 0x2E) {
    412412                        save[i] = '\0';
    413413                        break;
     414                } else if (newchar == 0x2E) { // '.', generated when space is pressed
     415                        save[i] = ' ';
    414416                } else {
    415417                        save[i] = newchar;
    416418                }