Implemented some REETODOs. 37 to go

This commit is contained in:
Rick Parrish 2013-02-08 13:01:16 -05:00
parent e2b2ead554
commit 9642f60655
3 changed files with 75 additions and 9 deletions

View File

@ -467,6 +467,7 @@ VAR
VQArea: Boolean; VQArea: Boolean;
{$IFDEF WIN32} {$IFDEF WIN32}
procedure Sound(hz: Word; duration: Word);
function Ticks: LongInt; function Ticks: LongInt;
{$ENDIF} {$ENDIF}
FUNCTION GetC(c: Byte): STRING; FUNCTION GetC(c: Byte): STRING;
@ -677,6 +678,11 @@ USES
; ;
{$IFDEF WIN32} {$IFDEF WIN32}
procedure Sound(hz: Word; duration: Word);
begin
Windows.Beep(hz, duration);
end;
function Ticks: LongInt; function Ticks: LongInt;
begin begin
Ticks := GetTimeMSec div 55; Ticks := GetTimeMSec div 55;

View File

@ -50,7 +50,12 @@ VAR
Infield_Arrow_Exit_Types, Infield_Arrow_Exit_Types,
Infield_Normal_Exit_Keys: STRING; Infield_Normal_Exit_Keys: STRING;
{$IFDEF MSDOS}
PROCEDURE Update_Logo(VAR Addr1,Addr2; BlkLen: Integer); PROCEDURE Update_Logo(VAR Addr1,Addr2; BlkLen: Integer);
{$ENDIF}
{$IFDEF WIN32}
procedure Update_Logo(Data: Array of Char; OriginX, OriginY, DataLength: integer);
{$ENDIF}
PROCEDURE CursorOn(b: BOOLEAN); PROCEDURE CursorOn(b: BOOLEAN);
PROCEDURE infield1(x,y: Byte; VAR s: AStr; Len: Byte); PROCEDURE infield1(x,y: Byte; VAR s: AStr; Len: Byte);
PROCEDURE Infielde(VAR s: AStr; Len: Byte); PROCEDURE Infielde(VAR s: AStr; Len: Byte);
@ -69,7 +74,11 @@ PROCEDURE SetWindow(VAR Wind: WindowRec; TLX,TLY,BRX,BRY,TColr,BColr,BoxType: In
IMPLEMENTATION IMPLEMENTATION
USES USES
Crt; Crt
{$IFDEF WIN32}
,VpSysLow
{$ENDIF}
;
{$IFDEF MSDOS} {$IFDEF MSDOS}
PROCEDURE CursorOn(b: BOOLEAN); ASSEMBLER; PROCEDURE CursorOn(b: BOOLEAN); ASSEMBLER;
@ -570,9 +579,9 @@ BEGIN
Box(BoxType,TLX,TLY,BRX,BRY); { Set the border } Box(BoxType,TLX,TLY,BRX,BRY); { Set the border }
END; END;
{$IFDEF MSDOS}
PROCEDURE Update_Logo(VAR Addr1,Addr2; BlkLen: Integer); PROCEDURE Update_Logo(VAR Addr1,Addr2; BlkLen: Integer);
BEGIN BEGIN
{$IFDEF MSDOS}
INLINE ( INLINE (
$1E/ $1E/
$C5/$B6/ADDR1/ $C5/$B6/ADDR1/
@ -627,10 +636,61 @@ BEGIN
$49/ $49/
$E0/$AA/ $E0/$AA/
$1F); $1F);
END;
{$ENDIF} {$ENDIF}
{$IFDEF WIN32} {$IFDEF WIN32}
WriteLn('REETODO MYIO Update_Logo'); Halt; procedure Update_Logo(Data: Array of Char; OriginX, OriginY, DataLength: integer);
var
i, x, y, count, counter: Integer;
character: Char;
spaces: String;
begin
i := 0;
x := OriginX;
y := OriginY;
spaces := ' '; // 80 spaces
while (i < DataLength) do
begin
case Data[i] of
#0..#15: begin
TextColor(Ord(Data[i]));
end;
#16..#23: begin
TextBackground(Ord(Data[i]) - 16);
end;
#24: begin
x := OriginX;
Inc(y);
end;
#25: begin
Inc(i);
count := Ord(Data[i])+1;
SysWrtCharStrAtt(@spaces[1], count, x-1, y-1, TextAttr);
Inc(x, count);
end;
#26: begin
Inc(i);
count := Ord(Data[i])+1;
Inc(i);
character := Data[i];
for counter := 1 to count do
begin
SysWrtCharStrAtt(@Data[i], 1, x-1, y-1, TextAttr);
Inc(x);
end;
end;
#27: begin
TextAttr := TextAttr XOR $80; // Invert blink flag
end;
#32..#255: begin
SysWrtCharStrAtt(@Data[i], 1, x-1, y-1, TextAttr);
Inc(x);
end;
end;
Inc(i);
end;
end;
{$ENDIF} {$ENDIF}
END;
END. END.

View File

@ -317,7 +317,7 @@ BEGIN
Update_Logo(ANSWER,ScreenAddr[(3*2)+(19*160)-162],ANSWER_LENGTH); Update_Logo(ANSWER,ScreenAddr[(3*2)+(19*160)-162],ANSWER_LENGTH);
{$ENDIF} {$ENDIF}
{$IFDEF WIN32} {$IFDEF WIN32}
WriteLn('REETODO WFCMENU GetConnection'); Halt; Update_logo(ANSWER, 3, 19, ANSWER_LENGTH);
{$ENDIF} {$ENDIF}
rl := 0; rl := 0;
@ -429,14 +429,14 @@ BEGIN
Update_Logo(WFC,ScreenAddr[0],WFC_LENGTH); Update_Logo(WFC,ScreenAddr[0],WFC_LENGTH);
{$ENDIF} {$ENDIF}
{$IFDEF WIN32} {$IFDEF WIN32}
WriteLn('REETODO WFCMENU WFCDraw1'); Halt; Update_logo(WFC, 1, 1, WFC_LENGTH);
{$ENDIF} {$ENDIF}
IF (General.NetworkMode) THEN IF (General.NetworkMode) THEN
{$IFDEF MSDOS} {$IFDEF MSDOS}
Update_Logo(WFCNET,ScreenAddr[(3*2)+(19*160)-162],WFCNET_LENGTH); Update_Logo(WFCNET,ScreenAddr[(3*2)+(19*160)-162],WFCNET_LENGTH);
{$ENDIF} {$ENDIF}
{$IFDEF WIN32} {$IFDEF WIN32}
WriteLn('REETODO WFCMENU WFCDraw2'); Halt; Update_logo(WFCNET, 3, 19, WFCNET_LENGTH);
{$ENDIF} {$ENDIF}
LoadURec(ThisUser,1); LoadURec(ThisUser,1);
@ -611,7 +611,7 @@ BEGIN
Update_Logo(WFC0,ScreenAddr[0],WFC0_LENGTH); Update_Logo(WFC0,ScreenAddr[0],WFC0_LENGTH);
{$ENDIF} {$ENDIF}
{$IFDEF WIN32} {$IFDEF WIN32}
WriteLn('REETODO WFCMENU WFCDraw3'); Halt; Update_logo(WFC0, 1, 1, WFC0_LENGTH);
{$ENDIF} {$ENDIF}
END; END;
END; END;
@ -747,7 +747,7 @@ VAR
NoSound; NoSound;
{$ENDIF} {$ENDIF}
{$IFDEF WIN32} {$IFDEF WIN32}
WriteLn('REETODO WFCMENU BeepHim'); Halt; Sound(1000, 60);
{$ENDIF} {$ENDIF}
rl1 := Timer; rl1 := Timer;
WHILE (ABS(rl1 - Timer) < 0.9) AND (NOT KeyPressed) DO; WHILE (ABS(rl1 - Timer) < 0.9) AND (NOT KeyPressed) DO;