More efficiency updates. Removed references to Genesis Engine

This commit is contained in:
mysticbbs 2012-02-15 15:01:43 -05:00
parent 937aa27915
commit 2d05fe7992
1 changed files with 22 additions and 11 deletions

View File

@ -20,16 +20,16 @@ Uses
bbs_Ansi_MenuBox; bbs_Ansi_MenuBox;
Const Const
geMaxHelpTest = 200; mysMaxHelpTest = 200;
geMaxHelpKeyLen = 20; mysMaxHelpKeyLen = 20;
geMaxHelpLineLinks = 10; mysMaxHelpLineLinks = 10;
Type Type
TLineInfoRec = Record // make into pointer TLineInfoRec = Record // make into pointer
Text : String; // make into pointer of string Text : String; // make into pointer of string
Links : Byte; Links : Byte;
Link : Array[1..geMaxHelpLineLinks] of Record //make into pointer Link : Array[1..mysMaxHelpLineLinks] of Record //make into pointer
Key : String[geMaxHelpKeyLen]; Key : String[mysMaxHelpKeyLen];
LinkPos : Byte; LinkPos : Byte;
LinkLen : Byte; LinkLen : Byte;
End; End;
@ -38,8 +38,8 @@ Type
TAnsiMenuHelp = Class TAnsiMenuHelp = Class
Box : TAnsiMenuBox; Box : TAnsiMenuBox;
HelpFile : Text; HelpFile : Text;
CurKey : String[geMaxHelpKeyLen]; CurKey : String[mysMaxHelpKeyLen];
Text : Array[1..geMaxHelpTest] of TLineInfoRec; Text : Array[1..mysMaxHelpTest] of TLineInfoRec;
Lines : Word; Lines : Word;
Constructor Create; Constructor Create;
@ -167,7 +167,7 @@ Var
CurLPos : Byte; CurLPos : Byte;
WinSize : Integer; WinSize : Integer;
LastPos : Byte; LastPos : Byte;
LastKey : Array[1..10] of String[geMaxHelpKeyLen]; LastKey : Array[1..10] of String[mysMaxHelpKeyLen];
Procedure LinkOFF (LineNum: Word; YPos, LPos: Byte); Procedure LinkOFF (LineNum: Word; YPos, LPos: Byte);
Var Var
@ -320,7 +320,7 @@ Begin
Dec (TopPage, WinSize); Dec (TopPage, WinSize);
DrawPage; DrawPage;
UpdateCursor; UpdateCursor;
End Else If TopPage > 1 Then Begin End Else If CurLine > 1 Then Begin
TopPage := 1; TopPage := 1;
CurLine := 1; CurLine := 1;
DrawPage; DrawPage;
@ -337,12 +337,17 @@ Begin
Inc(CurLPos); Inc(CurLPos);
LinkON; LinkON;
End; End;
#79 : Begin #79 : If TopPage + WinSize <= Lines Then Begin
Repeat Repeat
PageDown; PageDown;
Until TopPage >= Lines - WinSize - 1; Until TopPage >= Lines - WinSize - 1;
DrawPage; DrawPage;
UpdateCursor; UpdateCursor;
End Else
If TopPage + CurLine <= Lines Then Begin
LinkOFF (TopPage + CurLine - 1, CurLine + 1, CurLPos);
CurLine := Lines - TopPage + 1;
UpdateCursor;
End; End;
#80 : Begin #80 : Begin
If (CurLine = WinSize) and (TopPage + WinSize <= Lines) Then Begin If (CurLine = WinSize) and (TopPage + WinSize <= Lines) Then Begin
@ -356,11 +361,17 @@ Begin
UpdateCursor; UpdateCursor;
End; End;
End; End;
#81 : Begin #81 : If TopPage + WinSize <= Lines Then Begin
PageDown; PageDown;
DrawPage; DrawPage;
UpdateCursor; UpdateCursor;
End Else
If TopPage + CurLine <= Lines Then Begin
LinkOFF (TopPage + CurLine - 1, CurLine + 1, CurLPos);
CurLine := Lines - TopPage + 1;
UpdateCursor;
End; End;
End; End;
End Else Begin End Else Begin
Case Ch of Case Ch of