diff options
Diffstat (limited to 'saga/sfuncs.cpp')
| -rw-r--r-- | saga/sfuncs.cpp | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/saga/sfuncs.cpp b/saga/sfuncs.cpp index bf5cb8a993..10186de1af 100644 --- a/saga/sfuncs.cpp +++ b/saga/sfuncs.cpp @@ -1781,19 +1781,25 @@ void Script::sfGetDeltaFrame(SCRIPTFUNC_PARAMS) { // Script function #73 (0x49) void Script::sfShowProtect(SCRIPTFUNC_PARAMS) { - thread->wait(kWaitTypeRequest); + if (_vm->_copyProtection) { + thread->wait(kWaitTypeRequest); - //TODO:protection dialog - thread->_flags &= ~kTFlagWaiting; + _vm->_interface->setMode(kPanelProtect); + } } // Script function #74 (0x4A) void Script::sfProtectResult(SCRIPTFUNC_PARAMS) { - int protectHash; - //cheating - protectHash = thread->pop(); - thread->push(protectHash); - thread->_returnValue = protectHash; + if (_vm->_copyProtection) { + thread->_returnValue = _vm->_interface->getProtectHash(); + } else { + int protectHash; + + //cheating + protectHash = thread->pop(); + thread->push(protectHash); + thread->_returnValue = protectHash; + } } // Script function #75 (0x4b) |
