Skip to content
This repository was archived by the owner on Jun 28, 2025. It is now read-only.

Commit fb9b460

Browse files
committed
No need to set the protection variables with the Anniversary editions
Game bytecode was modified to skip the checks: 0147: // func_0147 0147: (05) ret // RETURN FROM CALL 0148: (01) VAR(0xF8) = VAR(0xBC) 014B: (14) VAR(0xF8) &= 16 014F: (05) ret // RETURN FROM CALL 0150: (0A) jmpIf(VAR(0xF8) == 0, @015E) 0156: (0A) jmpIf(VAR(0xF2) != 4000, @015E) 015D: (05) ret // RETURN FROM CALL 015E: loc_015E: 015E: (0C) changeTasksState(start=0,end=63,type=2)
1 parent 705f8a1 commit fb9b460

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

script.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void Script::init() {
2828
_scriptVars[0xDB] = 1;
2929
_scriptVars[0xE2] = 1;
3030
_scriptVars[0xF2] = 6000;
31-
} else {
31+
} else if (_res->getDataType() != Resource::DT_15TH_EDITION && _res->getDataType() != Resource::DT_20TH_EDITION) {
3232
_scriptVars[VAR_RANDOM_SEED] = time(0);
3333
#ifdef BYPASS_PROTECTION
3434
// these 3 variables are set by the game code
@@ -271,7 +271,7 @@ void Script::op_updateDisplay() {
271271

272272
#ifndef BYPASS_PROTECTION
273273
// entered protection symbols match the expected values
274-
if (_res->_currentPart == 16000 && _scriptVars[0x67] == 1) {
274+
if (_res->_currentPart == kPartCopyProtection && _scriptVars[0x67] == 1) {
275275
_scriptVars[0xDC] = 33;
276276
}
277277
#endif

0 commit comments

Comments
 (0)