-- file: MFOctantsImpl2.mesa
-- Pascal-to-Mesa translator output, translated at October 31, 1985 4:28:01 pm PST


DIRECTORY
  PascalBasic,
  PascalWizardFiles,
  MFTypes,
  MFProcArray,
  MFMemory,
  MFOctants,
  MFContours;

MFOctantsImpl2: PROGRAM IMPORTS MFProcArray, MFMemory, MFOctants, MFContours EXPORTS MFOctants = PUBLIC
BEGIN OPEN PascalBasic, PascalWizardFiles, MFTypes, MFProcArray, MFMemory, MFOctants, MFContours;
--:398----402:----405:-- RemoveCubic: PROCEDURE[P: Halfword] = 
BEGIN Q:Halfword;
 Q←Mem[P]↑.Hh.Rh;Mem[P]↑.Hh.B1←Mem[Q]↑.Hh.B1;
Mem[P]↑.Hh.Rh←Mem[Q]↑.Hh.Rh;Mem[ INT[P]+1]↑.Int←Mem[ INT[Q]+1]↑.Int;
Mem[ INT[P]+2]↑.Int←Mem[ INT[Q]+2]↑.Int;Mem[ INT[P]+5]↑.Int←Mem[ INT[Q]+5]↑.Int;
Mem[ INT[P]+6]↑.Int←Mem[ INT[Q]+6]↑.Int;FreeNode[Q,7]; END;--:405----406:----410:
 NewBoundary: PROCEDURE[P: Halfword,
Octant: SmallNumber] = 
BEGIN Q, R:Halfword; Q←Mem[P]↑.Hh.Rh;
R←GetNode[7];Mem[R]↑.Hh.Rh←Q;Mem[P]↑.Hh.Rh←R;
Mem[R]↑.Hh.B0←Mem[Q]↑.Hh.B0;Mem[ INT[R]+3]↑.Int←Mem[ INT[Q]+3]↑.Int;
Mem[ INT[R]+4]↑.Int←Mem[ INT[Q]+4]↑.Int;Mem[R]↑.Hh.B1←0;Mem[Q]↑.Hh.B0←0;
Mem[ INT[R]+5]↑.Int←Octant;Mem[ INT[Q]+3]↑.Int←Mem[Q]↑.Hh.B1;
Unskew[Mem[ INT[Q]+1]↑.Int,Mem[ INT[Q]+2]↑.Int,Mem[Q]↑.Hh.B1];Skew[CurX,CurY,Octant];
Mem[ INT[R]+1]↑.Int←CurX;Mem[ INT[R]+2]↑.Int←CurY; END;--:451

END.