mirror of
https://github.com/elliotnunn/mac-rom.git
synced 2024-12-28 16:31:01 +00:00
124 lines
3.8 KiB
Plaintext
124 lines
3.8 KiB
Plaintext
|
;
|
|||
|
; File: Graf3D.a
|
|||
|
;
|
|||
|
; Assembler Interface to the Macintosh Libraries
|
|||
|
;
|
|||
|
; Copyright: <09> 1984-1992 by Apple Computer, Inc., all rights reserved.
|
|||
|
;
|
|||
|
; Change History (most recent first):
|
|||
|
;
|
|||
|
; <8> 7/1/92 DCL Obsoleted Graf3DEqu.a which now includes this file.
|
|||
|
; <7> 8/15/91 MH re-format Import declarations and Pascal function prototype
|
|||
|
; comments
|
|||
|
; <6> 1/30/91 gbm sab, #38: Change the <20>already including this file<6C> variable to
|
|||
|
; all uppercase (for security reasons)
|
|||
|
|
|||
|
;
|
|||
|
; 1.0 CCH 11/ 9/1988 Adding to EASE.
|
|||
|
; END EASE MODIFICATION HISTORY
|
|||
|
;<3B>1.1 CCH 9/14/1988 Updated EASE with the current rev of this file.
|
|||
|
;-------------------------------------------------------------------------
|
|||
|
|
|||
|
IF &TYPE('__INCLUDINGGRAF3D__') = 'UNDEFINED' THEN
|
|||
|
__INCLUDINGGRAF3DEQU__ SET 1
|
|||
|
|
|||
|
; Equates for Graf3D
|
|||
|
; Three-dimensional graphics routines layered on top of QuickDraw
|
|||
|
FixRad EQU 3754936 ;radConst = 57.29578
|
|||
|
FracRad EQU 1073741824
|
|||
|
;offsets
|
|||
|
;Point3D and Point2D
|
|||
|
x EQU 0 ;Fixed
|
|||
|
y EQU 4 ;Fixed
|
|||
|
z EQU 8 ;Fixed
|
|||
|
;XfMatrix = ARRAY[0..3,0..3] OF fixed
|
|||
|
xf00 EQU 0
|
|||
|
xf01 EQU 4
|
|||
|
xf02 EQU 8
|
|||
|
xf03 EQU 12
|
|||
|
xf10 EQU 16
|
|||
|
xf11 EQU 20
|
|||
|
xf12 EQU 24
|
|||
|
xf13 EQU 28
|
|||
|
xf20 EQU 32
|
|||
|
xf21 EQU 36
|
|||
|
xf22 EQU 40
|
|||
|
xf23 EQU 44
|
|||
|
xf30 EQU 48
|
|||
|
xf31 EQU 52
|
|||
|
xf32 EQU 56
|
|||
|
xf33 EQU 60
|
|||
|
;Port3D
|
|||
|
GrPort EQU 0 ;GrafPtr
|
|||
|
viewRect EQU 4 ;Rect
|
|||
|
xLeft EQU 12 ;Fixed
|
|||
|
yTop EQU 16 ;Fixed
|
|||
|
xRight EQU 20 ;Fixed
|
|||
|
yBottom EQU 24 ;Fixed
|
|||
|
pen EQU 28 ;Point3D
|
|||
|
penPrime EQU 40 ;Point3D
|
|||
|
eye EQU 52 ;Point3D
|
|||
|
hSize EQU 64 ;Fixed
|
|||
|
vSize EQU 68 ;Fixed
|
|||
|
hCenter EQU 72 ;Fixed
|
|||
|
vCenter EQU 76 ;Fixed
|
|||
|
xCotan EQU 80 ;Fixed
|
|||
|
yCotan EQU 84 ;Fixed
|
|||
|
ident EQU 88 ;BOOLEAN
|
|||
|
xForm EQU 90 ;XfMatrix
|
|||
|
szPort3D EQU 154 ;size of Port3D
|
|||
|
|
|||
|
;PROCEDURE InitGrf3D (globalPtr: Ptr);
|
|||
|
IMPORT InitGrf3D
|
|||
|
;PROCEDURE Open3DPort (port: Port3DPtr);
|
|||
|
IMPORT Open3DPort
|
|||
|
;PROCEDURE SetPort3D (port: Port3DPtr);
|
|||
|
IMPORT SetPort3D
|
|||
|
;PROCEDURE GetPort3D (VAR port: Port3DPtr);
|
|||
|
IMPORT GetPort3D
|
|||
|
;PROCEDURE MoveTo2D (x,y: Fixed);
|
|||
|
IMPORT MoveTo2D
|
|||
|
;PROCEDURE MoveTo3D (x,y,z: Fixed);
|
|||
|
IMPORT MoveTo3D
|
|||
|
;PROCEDURE LineTo2D (x,y: Fixed);
|
|||
|
IMPORT LineTo2D
|
|||
|
;PROCEDURE LineTo3D (x,y,z: Fixed);
|
|||
|
IMPORT LineTo3D
|
|||
|
;PROCEDURE Move2D (dx,dy: Fixed);
|
|||
|
IMPORT Move2D
|
|||
|
;PROCEDURE Move3D (dx,dy,dz: Fixed);
|
|||
|
IMPORT Move3D
|
|||
|
;PROCEDURE Line2D (dx,dy: Fixed);
|
|||
|
IMPORT Line2D
|
|||
|
;PROCEDURE Line3D (dx,dy,dz: Fixed);
|
|||
|
IMPORT Line3D
|
|||
|
;PROCEDURE ViewPort (r: Rect);
|
|||
|
IMPORT ViewPort
|
|||
|
;PROCEDURE LookAt (left,top,right,bottom: Fixed);
|
|||
|
IMPORT LookAt
|
|||
|
;PROCEDURE ViewAngle (angle: Fixed);
|
|||
|
IMPORT ViewAngle
|
|||
|
;PROCEDURE Identity;
|
|||
|
IMPORT Identity
|
|||
|
;PROCEDURE Scale (xFactor,yFactor,zFactor: Fixed);
|
|||
|
IMPORT Scale
|
|||
|
;PROCEDURE Translate (dx,dy,dz: Fixed);
|
|||
|
IMPORT Translate
|
|||
|
;PROCEDURE Pitch (xAngle: Fixed);
|
|||
|
IMPORT Pitch
|
|||
|
;PROCEDURE Yaw (yAngle: Fixed);
|
|||
|
IMPORT Yaw
|
|||
|
;PROCEDURE Roll (zAngle: Fixed);
|
|||
|
IMPORT Roll
|
|||
|
;PROCEDURE Skew (zAngle: Fixed);
|
|||
|
IMPORT Skew
|
|||
|
;PROCEDURE TransForm (src: Point3D; VAR dst: Point3D);
|
|||
|
IMPORT TransForm
|
|||
|
;FUNCTION Clip3D (src1,src2: Point3D; VAR dst1,dst2: POINT): BOOLEAN;
|
|||
|
IMPORT Clip3D
|
|||
|
;PROCEDURE SetPt3D (VAR pt3D: Point3D; x,y,z: fixed);
|
|||
|
IMPORT SetPt3D
|
|||
|
;PROCEDURE SetPt2D (VAR pt2D: Point2D; x,y: fixed);
|
|||
|
IMPORT SetPt2D
|
|||
|
|
|||
|
ENDIF ; ...already included
|