Skip to content

Commit

Permalink
ClassicZoo 4.37
Browse files Browse the repository at this point in the history
  • Loading branch information
asiekierka committed Nov 20, 2022
1 parent 176bce6 commit d60628d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 10 deletions.
4 changes: 2 additions & 2 deletions DOC/ABOUT.HLP
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$ _ __
$/ `| _ _ _. _ / _ _ November 19th, 2022
$\_,|(_|_\_\|(_/_(_)(_) Version 4.36
$/ `| _ _ _. _ / _ _ November 20th, 2022
$\_,|(_|_\_\|(_/_(_)(_) Version 4.37

$Table of Contents

Expand Down
4 changes: 4 additions & 0 deletions DOC/CHANGES.HLP
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Legend:
- Removals / Bugfixes
[] Platform {} Engine

$< ClassicZoo 4.37 >

/ Fixed configuration option list bug.

$< ClassicZoo 4.36 >

+ New cheats:
Expand Down
21 changes: 15 additions & 6 deletions SRC/E_SUPERZ/OOP.PAS
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion SRC/GAMECONF.PAS
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion build.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
NAME=ClassicZoo
VERSION=4.36
VERSION=4.37
COPYRIGHT=Copyright (c) 2022 Adrian Siekierka

0 comments on commit d60628d

Please sign in to comment.