unit zbuffun; interface type stt=array[0..15999] of single; zbuffo=object private p1,p2,p3,p4:^stt; count:word; public constructor init; destructor dest; function ki(a,b:word):single; procedure be(a,b:word;data:single); procedure torol; end; implementation constructor zbuffo.init; begin new(p1); new(p2); new(p3); new(p4); end; destructor zbuffo.dest; begin dispose(p4); dispose(p3); dispose(p2); dispose(p1); end; function zbuffo.ki(a,b:word):single; begin count:=b*320+a; if b<50 then ki:=p1^[count] else if b<100 then ki:=p2^[count-16000] else if b<150 then ki:=p3^[count-32000] else ki:=p4^[count-48000]; end; procedure zbuffo.be(a,b:word;data:single); begin count:=b*320+a; if b<50 then p1^[count]:=data else if b<100 then p2^[count-16000]:=data else if b<150 then p3^[count-32000]:=data else p4^[count-48000]:=data; end; procedure zbuffo.torol; var c:word; begin for c:=0 to 15999 do begin p1^[c]:=-10000; p2^[c]:=-10000; p3^[c]:=-10000; p4^[c]:=-10000; end; end; end.