home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Underground
/
UNDERGROUND.ISO
/
graphic
/
voxel.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-08-01
|
975b
|
33 lines
{$G+}
Uses Crt,Gif,ModeXLib;
Var x,y:Integer; {Coordinates of the trapezoid}
Procedure Draw_Voxel;external;
{$l voxel.obj}
Begin
asm mov ax,0; int 33h End; {reset mouse driver}
Init_ModeX; {enable Mode X}
LoadGif('landsc3'); {load landscape}
x:=195; {define start coordinate}
y:=130;
Repeat
ClrX($0f); {clear screen}
Draw_Voxel; {draw landscape}
Switch; {activate completed video page}
WaitRetrace; {wait for retrace}
asm
mov ax,000bh {Function 0bh: read relative coordinates}
int 33h
sar cx,2 {Division by 2}
sar dx,2
add x,cx
add y,dx
End;
If x < 0 Then x:=0; If x > 130 Then x:=130;
If y < 0 Then y:=0; If y > 130 Then y:=130;
Until KeyPressed; {until key}
TextMode(3);
End.