Ticket #8628: loadFromCommand.diff

File loadFromCommand.diff, 443 bytes (added by SF/mthreepwood, 14 years ago)

Patch for Command Line Loading

  • agi.cpp

     
    420420        if (ec == errOK)
    421421                ec = _loader->loadResource(rLOGIC, 0);
    422422
     423
     424        if (ConfMan.hasKey("save_slot")) {
     425                char saveNameBuffer[256];
     426
     427                sprintf (saveNameBuffer, "%s.%03d", _targetName.c_str(), ConfMan.getInt("save_slot"));
     428
     429                loadGame(saveNameBuffer);
     430        }
     431
    423432        return ec;
    424433}
    425434