UNIT LargeTRN; INTERFACE PROCEDURE Setup_Large_Trn(filename:string); FUNCTION LTrn(x,y:byte):byte; IMPLEMENTATION USES crt,dos; TYPE transparent_type = ^Transparent_lookup; Transparent_lookup = Array[0..250,0..250] of byte; VAR trndata:transparent_type; trnsegment:Word; {******************* LOAD A SMALL TRANSPARENCY *****************************} PROCEDURE Setup_Large_Trn(filename:string); VAR f:file of transparent_lookup; counter:word; x,y:word; BEGIN new(trndata); trnsegment:=seg(trndata^); for counter:=0 to 10000 do mem[seg(trndata^):ofs(trndata^)+counter]:=0; assign(f,filename); reset(f); seek(f,0); read(f,trndata^); close(f); END; FUNCTION Ltrn(x,y:byte):byte; BEGIN Ltrn:=0; if x>250 then x:=250; if y>250 then y:=250; if (x<250) and (y<250) then ltrn:=trndata^[x,y]; if x=y then ltrn:=x; END; end.