diff --git a/DOC/ABOUT.HLP b/DOC/ABOUT.HLP index 8303a5e..9cd33df 100644 --- a/DOC/ABOUT.HLP +++ b/DOC/ABOUT.HLP @@ -1,6 +1,6 @@ $ _ __ -$/ `| _ _ _. _ / _ _ November 19th, 2022 -$\_,|(_|_\_\|(_/_(_)(_) Version 4.36 +$/ `| _ _ _. _ / _ _ November 20th, 2022 +$\_,|(_|_\_\|(_/_(_)(_) Version 4.37 $Table of Contents diff --git a/DOC/CHANGES.HLP b/DOC/CHANGES.HLP index 9520b60..4918e05 100644 --- a/DOC/CHANGES.HLP +++ b/DOC/CHANGES.HLP @@ -6,6 +6,10 @@ Legend: - Removals / Bugfixes [] Platform {} Engine +$< ClassicZoo 4.37 > + +/ Fixed configuration option list bug. + $< ClassicZoo 4.36 > + New cheats: diff --git a/SRC/E_SUPERZ/OOP.PAS b/SRC/E_SUPERZ/OOP.PAS index f47b28e..0958a69 100644 --- a/SRC/E_SUPERZ/OOP.PAS +++ b/SRC/E_SUPERZ/OOP.PAS @@ -209,23 +209,32 @@ procedure OopReadDirection(statId: integer; var position: integer; var dx, dy: i OopError(statId, 'Bad direction'); end; -function OopFindString(statId: integer; s: string): integer; +function OopFindString(statId: integer; startPos: integer; s: string): integer; var pos, wordPos, cmpPos: integer; + maxPos: integer; label NoMatch; begin for pos := 1 to Length(s) do s[pos] := UpCase(s[pos]); with Board.Stats[statId] do begin - pos := 0; - while pos <= DataLen do begin + pos := startPos; + maxPos := DataLen - Length(s); + while pos <= maxPos do begin wordPos := 1; cmpPos := pos; repeat - OopReadChar(statId, cmpPos); + {$IFNDEF FPC} + { On Turbo Pascal, the array pointer is actually } + { a poiter to a string. } + OopChar := Data^[cmpPos]; + {$ELSE} + OopChar := Data[cmpPos]; + {$ENDIF} if s[wordPos] <> UpCase(OopChar) then goto NoMatch; Inc(wordPos); + Inc(cmpPos); until wordPos > Length(s); { string matches } @@ -321,7 +330,7 @@ function OopFindLabel(statId: integer; sendLabel: string; var iStat, iDataPos: i if objectMessage = 'RESTART' then begin iDataPos := 0; end else begin - iDataPos := OopFindString(iStat, labelPrefix + objectMessage); + iDataPos := OopFindString(iStat, 0, labelPrefix + objectMessage); { if lookup target exists, there may be more stats } if (iDataPos < 0) and (targetSplitPos > 0) then goto FindNextStat; @@ -764,7 +773,7 @@ function OopExecute(statId: integer; var position: integer; name: TSmallString): Char(labelPtr^) := ':'; - labelDataPos := OopFindString(labelStatId, #13#39 + OopWord + #13); + labelDataPos := OopFindString(labelStatId, labelDataPos + 1, #13#39 + OopWord + #13); until labelDataPos <= 0; end else if OopWord = 'LOCK' then begin P3 := 1; diff --git a/SRC/GAMECONF.PAS b/SRC/GAMECONF.PAS index 2c3be0a..49102ee 100644 --- a/SRC/GAMECONF.PAS +++ b/SRC/GAMECONF.PAS @@ -754,7 +754,7 @@ function ConfigInputCustomAction: boolean; {$ENDIF} const - ConfigEntryCount = 8 + ConfigEntryCount = 9 {$IFDEF MSDOS} + 3 {$ENDIF} {$IFDEF PLAYSTEP} + 1 {$ENDIF} {$IFDEF FASTVID} + 2 {$ENDIF} diff --git a/build.properties b/build.properties index 6e107aa..74c40ae 100644 --- a/build.properties +++ b/build.properties @@ -1,3 +1,3 @@ NAME=ClassicZoo -VERSION=4.36 +VERSION=4.37 COPYRIGHT=Copyright (c) 2022 Adrian Siekierka