home *** CD-ROM | disk | FTP | other *** search
/ ST-Computer Leser 2002 January / STC_CD_01_2002.iso / SCENE / IMATROLL / SRC / 3D.S next >
Text File  |  2001-12-10  |  15KB  |  620 lines

  1.     
  2.     section     text
  3.  
  4. ;==============================================================================;
  5. ;                                                                              ;
  6. ;   Original x86 Assembler Program By Vulture.
  7. ;   68k conversion & modifications by Matt'Us Alem.                                              ;
  8. ;   
  9. ;   3D-system example. Use the following formulas to rotate a point:           ;
  10. ;                                                                              ;
  11. ;        Rotate around x-axis                                                  ;
  12. ;        YT = Y * COS(xang) - Z * SIN(xang) / 256                              ;
  13. ;        ZT = Y * SIN(xang) + Z * COS(xang) / 256                              ;
  14. ;        Y = YT                                                                ;
  15. ;        Z = ZT                                                                ;
  16. ;                                                                              ;
  17. ;        Rotate around y-axis                                                  ;
  18. ;        XT = X * COS(yang) - Z * SIN(yang) / 256                              ;
  19. ;        ZT = X * SIN(yang) + Z * COS(yang) / 256                              ;
  20. ;        X = XT                                                                ;
  21. ;        Z = ZT                                                                ;
  22. ;                                                                              ;
  23. ;        Rotate around z-axis                                                  ;
  24. ;        XT = X * COS(zang) - Y * SIN(zang) / 256                              ;
  25. ;        YT = X * SIN(zang) + Y * COS(zang) / 256                              ;
  26. ;        X = XT                                                                ;
  27. ;        Y = YT                                                                ;
  28. ;                                                                              ;
  29. ;   Divide by 256 coz we have multiplyd our sin values with 256 too.           ;
  30. ;   This example isn't too fast right now but it'll work just fine.            ;
  31. ;                                                                              ;
  32. ;       Current Date: 6-9-95         Vulture
  33. ;       Conversion Date : 20-11-01   Matt'US Alem
  34. ;                                                                              ;
  35. ;==============================================================================;
  36.  
  37. init_3Drot:        ; Called only one time before main loop 
  38.         ; initialize axxis speed rotations
  39.  
  40.            move.w  #1,DeltaX              ; Initial speed of rotation
  41.            move.w  #1,DeltaY              ; Change this and watch what
  42.             move.w  #1,DeltaZ              ; happens. It's fun!
  43.  
  44.         ; perspective distances
  45.  
  46.             move.w   #256,Xoff
  47.             move.w   #256,Yoff             ; Used for calculating vga-pos
  48.            move.w   #300,Zoff             ; Distance from viewer
  49.  
  50.         ; initialize to zeros EraseTable (needed ?)
  51.         
  52.             ;clr.w    d7        ; initialize Erase table
  53.             ;move.w    MaxPoints,d6
  54.         ;lea    EraseTable,a0
  55. ;.Fill:        
  56.         ;move.l    #0,(a0,d7.w*4)
  57.         ;add.w    #1,d7
  58.         
  59.         ;dbra    d6,.Fill
  60.  
  61.         ; Create a precalc 320x table (from 0 to 240) 
  62.  
  63.         clr.w    d7
  64.         move.w    #240,d6
  65.         lea     Mul320Table,a0
  66.  
  67. .FillTable:        move.w    d7,d5
  68.         mulu    #320,d5
  69.         move.l    d5,(a0,d7.w*4)
  70.         addq.w    #1,d7
  71.  
  72.         dbra    d6,.FillTable    
  73.  
  74.         ; Create a precalc 6x table (from 0 to MaxPoints+1)
  75.  
  76.         clr.w    d7
  77.         move.w    MaxPoints,d6    ; 124
  78.         addq.w    #1,d6        ; 125 :)
  79.         lea     Mul6Table,a0
  80.  
  81. .FillTable2:    move.w    d7,d5
  82.         mulu    #6,d5
  83.         move.w    d5,(a0,d7.w*2)
  84.         addq.w    #1,d7
  85.  
  86.         dbra    d6,.FillTable2    
  87.  
  88.         ; Calculate first rotation angles
  89.  
  90.         bsr     sb3D_UpdateAngles     ; Calculate new angles
  91.             bsr         sb3D_SetRotation      ; Find Sine & CoSine of those angles
  92.  
  93.         rts
  94.  
  95. ; Calculates new x,y,z angles
  96. ; to rotate around
  97. sb3D_UpdateAngles:    move.w     XAngle,d0           ; Load current angle
  98.         add.w      DeltaX,d0            ; Add velocity
  99.         andi.w     #%11111111,d0        ; Range from 0..255
  100.         move.w     d0,XAngle            ; Update X
  101.             
  102.         move.w     YAngle,d0
  103.         add.w      DeltaY,d0            ; Add velocity
  104.         andi.w     #%11111111,d0        ; Range from 0..255
  105.         move.w     d0,YAngle            ; Update Y
  106.         
  107.         move.w     ZAngle,d0
  108.         add.w      DeltaZ,d0            ; Add velocity
  109.         andi.w     #%11111111,d0        ; Range from 0..255
  110.         move.w     d0,ZAngle            ; Update Z
  111.     
  112.         rts
  113.  
  114. ; Needed : d0.w = angle (0..255)
  115. ; Returns: d1.w = Sin   d2.w = Cos
  116. ; used : d1,d2,a0
  117. ;
  118. sb3D_GetSinCos:    lea    SinCos,a0        ; load SinCos table
  119.         move.w    d0,d2        ; Save angle (use as pointer)
  120.         move.w      (a0,d2*2),d1    ; get Sine
  121.         add.w    #64,d2        ; add 64 (-> pi/4)
  122.         and.w    #%11111111,d2    ; Range from 0..255
  123.         move.w    (a0,d2*2),d2    ; get Cosine
  124.         
  125.         rts
  126.  
  127. ; Set sine & cosine of x,y,z
  128. ; used d0,d1,d2
  129. sb3D_SetRotation:    move.w    XAngle,d0        ; Grab angle
  130.         bsr    sb3D_GetSinCos    ; Get the sine&cosine : d1 & d2
  131.         move.w    d1,XSin        ; Save sin
  132.         move.w    d2,XCos        ; Save cos
  133.         
  134.         move.w    YAngle,d0        ; Grab angle
  135.         bsr    sb3D_GetSinCos    ; Get the sine&cosine : d1 & d2
  136.         move.w    d1,YSin        ; Save sin
  137.         move.w    d2,YCos        ; Save Cos
  138.         
  139.         move.w    ZAngle,d0        ; Grab angle
  140.         bsr    sb3D_GetSinCos    ; Get the Sine&CoSine : d1 & d2
  141.         move.w    d1,ZSin        ; Save Sin
  142.         move.w    d2,ZCos        ; Save Cos
  143.         
  144.         rts
  145.  
  146. ; Rotates the point around x,y,z
  147. ; Gets original x,y,z values
  148. ; This can be done elsewhere
  149. ; in : d7.w : offset
  150. ;      a5 : 6x precalc table (3 coords * word size)
  151. ; used a0 - d0,d1,d2
  152. sb3D_RotatePoint:    lea    Figure,a0
  153.         move.w    (a5,d7.w*2),d1    ; use precalc 6x table to replace mulu #3*2,d1 
  154.         ;move.w    d7,d1
  155.         ;mulu     #3,d1
  156.  
  157.         move.w    (a0,d1.w),d0    ; get X and move 1 byte 
  158.         adda.l    #2,a0
  159.         move.w    d0,X        ; save in current X
  160.         
  161.         move.w    (a0,d1.w),d0    ; get Y and move 1 byte 
  162.         move.w    d0,Y        ; save in current Y
  163.         adda.l    #2,a0        
  164.  
  165.         move.w    (a0,d1.w),d0    ; get Z
  166.         move.w    d0,Z        ; save in current Z
  167.         
  168. ; Rotate around x-axis
  169. ; YT = Y * Cos(xang) - Z * Sin(xang) / 256
  170. ; ZT = Y * Sin(xang) + Z * Cos(xang) / 256
  171. ; Y = YT
  172. ; Z = ZT
  173.  
  174.         move.w    Y,d0
  175.         move.w    XCos,d1
  176.         muls.w    d1,d0        ; d0 = Y * Cos(xang)
  177.  
  178.         move.w    Z,d1
  179.         move.w    XSin,d2
  180.         muls.w    d2,d1        ; d1 = Z * Sin(xang)
  181.         sub.l    d1,d0        ; d0 = Y * Cos(xang) - Z * Sin(xang)
  182.         asr.l    #8,d0        ; d0 = Y * Cos(xang) - Z * Sin(xang) / 256
  183.         
  184.         move.w    d0,Yt        
  185.         
  186.         move.w    Y,d0
  187.         move.w    XSin,d1
  188.         muls.w    d1,d0        ; d0 = Y * Sin(xang)
  189.         move.w    Z,d1
  190.  
  191.         move.w    XCos,d2
  192.         muls.w    d2,d1        ; d1 = Z * Cos(xang)
  193.         add.l    d0,d1        ; d1 = Y * Sin(xang) + Z * Cos(xang)
  194.         asr.l    #8,d1        ; d1 = Y * Sin(xang) + Z * Cos(xang) / 256
  195.         move.w    d1,Zt
  196.         
  197.         move.w    Yt,d0        ; Switch values Y=Yt,...
  198.         move.w    d0,Y
  199.         move.w    Zt,d0
  200.         move.w    d0,Z
  201.  
  202. ; Rotate around y-axis
  203. ; XT = X * Cos(yang) - Z * Sin(yang) / 256
  204. ; ZT = X * Sin(yang) + Z * Cos(yang) / 256
  205. ; X = XT
  206. ; Z = ZT
  207.  
  208.         move.w    X,d0
  209.         move.w    YCos,d1
  210.         muls.w    d1,d0        ; d0 = X * Cos(xang)
  211.         
  212.         move.w    Z,d1
  213.         move.w    YSin,d2
  214.         muls.w    d2,d1        ; d1 = Z * Sin(xang)
  215.         sub.l    d1,d0        ; d0 = X * Cos(xang) - Z * Sin(xang)
  216.         asr.l    #8,d0        ; d0 = X * Cos(xang) - Z * Sin(xang) / 256
  217.         
  218.         move.w    d0,Xt        
  219.         move.w    X,d0
  220.  
  221.         move.w    YSin,d1
  222.         muls.w    d1,d0        ; d0 = X * Sin(xang)
  223.         move.w    Z,d1
  224.         move.w    YCos,d2
  225.         muls.w    d2,d1        ; d1 = Z * Cos(xang)
  226.         add.l    d0,d1        ; d1 = X * Sin(xang) + Z * Cos(xang)
  227.         asr.l    #8,d1        ; d1 = X * Sin(xang) + Z * Cos(xang) / 256
  228.         move.w    d1,Zt
  229.         
  230.         move.w    Xt,d0        ; Switch values X=Xt,...
  231.         move.w    d0,X
  232.         move.w    Zt,d0
  233.         move.w    d0,Z
  234.  
  235. ; Rotate around z-axis
  236. ; XT = X * Cos(zang) - Y * Sin(zang) / 256
  237. ; YT = X * Sin(zang) + Y * Cos(zang) / 256
  238. ; X = XT
  239. ; Y = YT
  240.     
  241.         move.w    X,d0
  242.         move.w    ZCos,d1
  243.         muls.w    d1,d0        ; d0 = X * Cos(xang)
  244.         
  245.         move.w    Y,d1
  246.         move.w    ZSin,d2
  247.         muls.w    d2,d1        ; d1 = Y * Sin(xang)
  248.         sub.l    d1,d0        ; d0 = X * Cos(xang) - Y * Sin(xang)
  249.         asr.l    #8,d0        ; d0 = X * Cos(xang) - Y * Sin(xang) / 256
  250.         
  251.         move.w    d0,Xt        
  252.         
  253.         move.w    X,d0
  254.         move.w    ZSin,d1
  255.         muls.w    d1,d0        ; d0 = X * Sin(xang)
  256.         move.w    Y,d1
  257.         move.w    ZCos,d2
  258.         muls.w    d2,d1        ; d1 = Y * Cos(xang)
  259.         add.l    d0,d1        ; d1 = X * Sin(xang) + Y * Cos(xang)
  260.         asr.l    #8,d1        ; d1 = X * Sin(xang) + Y * Cos(xang) / 256
  261.         move.w    d1,Yt
  262.         
  263.         move.w    Xt,d0        ; Switch values X=Xt,...
  264.         move.w    d0,X
  265.         move.w    Yt,d0
  266.         move.w    d0,Y    
  267.     
  268.         rts
  269.  
  270. ; Calculates screenposition and
  271. ; plots the point on the screen
  272. ; d0,d1,d2        
  273. sb3D_ShowPoint:    move.w    Xoff,d0        ; Xoff*X / Z+Zoff = screen x
  274.         move.w    X,d1
  275.         muls.w    d0,d1
  276.         move.w    Z,d0
  277.         add.w    Zoff,d0        ; distance
  278.         ext.l    d0
  279.         divs.l    d0,d1        
  280.         move.l    Mx,d0        
  281.         ext.l    d1
  282.         add.l    d0,d1        ; Center on screen
  283.         
  284.         move.w    Yoff,d0        ; Yoff*Y / Z+Zoff = screen y
  285.         move.w    Y,d2
  286.         muls.w    d0,d2
  287.         move.w    Z,d0
  288.         add.w    Zoff,d0
  289.         ext.l    d0
  290.         divs.l    d0,d2    
  291.         move.l    My,d0
  292.         ext.l    d2
  293.         add.l    d0,d2        ; Center on screen
  294.         
  295.         move.l    (a4,d2.w*4),d3    ; use precalc 320x table to replace mulu #320,d2 
  296.         add.l    d1,d3        ; d2 = (y*320)+x
  297.         
  298.         ; manage the color / Z
  299.         
  300.         move.w    Z,d0        ; get Z
  301.         add.w    #70,d0        ; add 70 to be >0
  302.         clr.w    d1        ; get only lower byte           
  303.         move.b    d0,d1
  304.         lsr.w    #4,d1        ; divide by 16 to be between 0 and 16
  305.         
  306.         move.w    (a2,d1.w*2),(a1,d3.l*2)    ; get & plot this color at this index    
  307.         
  308.         move.l    (a3,d7.w*4),(a6,d7.w*4)    ; save older position
  309.         move.l    d3,(a3,d7.w*4)    ; Save position to erase
  310.         
  311.         rts
  312. ;
  313. ; set background
  314. ;
  315. sb3D_back:        moveq.w    #0,d0    ; trace line(0,50;320,50) color White
  316.         move.w    #50,d1
  317.         move.w    #319,d2
  318.         move.w    #50,d3
  319.         move.w    #%0111101111101111,d4    
  320.         bsr     tc_line
  321.         moveq.w    #0,d0    ; trace line(0,190;320,190) color White
  322.         move.w    #190,d1
  323.         move.w    #319,d2
  324.         move.w    #190,d3
  325.         move.w    #%0111101111101111,d4    
  326.         bsr     tc_line
  327.  
  328.         move.l    screen_adr,a0    ; screen pointer
  329.  
  330.         lea    sb3D_text1,a1
  331.         bsr    display_text
  332.  
  333.         move.l    screen_adr,a0    ; screen pointer
  334.  
  335.         lea    sb3D_text2,a1
  336.         bsr    display_text
  337.  
  338.         rts
  339.  
  340.         
  341. sb3D_Main:        move.l    screen_adr,a1
  342.  
  343.         lea    EraseTable,a3
  344.         lea    EraseTable2,a6
  345.         
  346.         ; clearing previous plots (t-2)
  347.  
  348.             clr.w    d7        ; Starting with point 0
  349.             move.w    MaxPoints,d6
  350.  
  351. .Deletion1:        move.l    (a6,d7.w*4),d0    ; old point pos
  352.         move.w    #0,(a1,d0.l*2)    ; erase it (black)
  353.         addq.w    #1,d7
  354.         
  355.         dbra    d6,.Deletion1        
  356.  
  357.         ; clearing previous plots
  358.  
  359.             clr.w    d7        ; Starting with point 0
  360.             move.w    MaxPoints,d6
  361.         
  362.  
  363. .Deletion2:        move.l    (a3,d7.w*4),d0    ; old point pos
  364.         move.w    #0,(a1,d0.l*2)    ; erase it (black)
  365.         addq.w    #1,d7
  366.         
  367.         dbra    d6,.Deletion2
  368.  
  369.         ; Calculate new coords + plot dots        
  370.  
  371.         lea    ColorTable,a2    ; 16 grey color table
  372.         lea    Mul320Table,a4    ; 320x precalc table
  373.         lea    Mul6Table,a5    ; 6x precalc table
  374.         
  375.         clr.w    d7        ; Starting with point 0
  376.         move.w    MaxPoints,d6
  377.         
  378. .Loop:        bsr    sb3D_RotatePoint      ; Rotates the point uSing above formulas
  379.             bsr        sb3D_ShowPoint        ; Shows the point
  380.             addq.w       #1,d7              ; Next 3d-point
  381.             
  382.             dbra    d6,.Loop    
  383.  
  384.         ; Calculate next rotation angles
  385.  
  386.         bsr     sb3D_UpdateAngles     ; Calculate new angles
  387.             bsr         sb3D_SetRotation      ; Find Sine & CoSine of those angles
  388.  
  389.    
  390.         rts
  391. ;
  392. ; DATA
  393. ;
  394. ;
  395.  
  396.         section    data
  397.  
  398.         
  399. Figure:            ; The 3d points : 5x*5y*5z (=125) points : Cube       
  400.             dc.w -35,-35,-35
  401.         dc.w -15,-35,-35
  402.         dc.w 5,-35,-35
  403.         dc.w 25,-35,-35
  404.         dc.w 45,-35,-35
  405.  
  406.         dc.w -35,-15,-35
  407.         dc.w -15,-15,-35
  408.         dc.w 5,-15,-35
  409.         dc.w 25,-15,-35
  410.         dc.w 45,-15,-35
  411.  
  412.         dc.w -35,5,-35
  413.         dc.w -15,5,-35
  414.         dc.w 5,5,-35
  415.         dc.w 25,5,-35
  416.         dc.w 45,5,-35
  417.  
  418.         dc.w -35,25,-35
  419.         dc.w -15,25,-35
  420.         dc.w 5,25,-35
  421.         dc.w 25,25,-35
  422.         dc.w 45,25,-35
  423.  
  424.         dc.w -35,45,-35
  425.         dc.w -15,45,-35
  426.         dc.w 5,45,-35
  427.         dc.w 25,45,-35
  428.         dc.w 45,45,-35
  429.  
  430.         dc.w -35,-35,-15
  431.         dc.w -15,-35,-15
  432.         dc.w 5,-35,-15
  433.         dc.w 25,-35,-15
  434.         dc.w 45,-35,-15
  435.  
  436.         dc.w -35,-15,-15
  437.         dc.w -15,-15,-15
  438.         dc.w 5,-15,-15
  439.         dc.w 25,-15,-15
  440.         dc.w 45,-15,-15
  441.  
  442.         dc.w -35,5,-15
  443.         dc.w -15,5,-15
  444.         dc.w 5,5,-15
  445.         dc.w 25,5,-15
  446.         dc.w 45,5,-15
  447.  
  448.         dc.w -35,25,-15
  449.         dc.w -15,25,-15
  450.         dc.w 5,25,-15
  451.         dc.w 25,25,-15
  452.         dc.w 45,25,-15
  453.  
  454.         dc.w -35,45,-15
  455.         dc.w -15,45,-15
  456.         dc.w 5,45,-15
  457.         dc.w 25,45,-15
  458.         dc.w 45,45,-15
  459.  
  460.         dc.w -35,-35,5
  461.         dc.w -15,-35,5
  462.         dc.w 5,-35,5
  463.         dc.w 25,-35,5
  464.         dc.w 45,-35,5
  465.  
  466.         dc.w -35,-15,5
  467.         dc.w -15,-15,5
  468.         dc.w 5,-15,5
  469.         dc.w 25,-15,5
  470.         dc.w 45,-15,5
  471.  
  472.         dc.w -35,5,5
  473.         dc.w -15,5,5
  474.         dc.w 5,5,5
  475.         dc.w 25,5,5
  476.         dc.w 45,5,5
  477.  
  478.         dc.w -35,25,5
  479.         dc.w -15,25,5
  480.         dc.w 5,25,5
  481.         dc.w 25,25,5
  482.         dc.w 45,25,5
  483.  
  484.         dc.w -35,45,5
  485.         dc.w -15,45,5
  486.         dc.w 5,45,5
  487.         dc.w 25,45,5
  488.         dc.w 45,45,5  
  489.  
  490.         dc.w -35,-35,25
  491.         dc.w -15,-35,25
  492.         dc.w 5,-35,25
  493.         dc.w 25,-35,25
  494.         dc.w 45,-35,25
  495.  
  496.         dc.w -35,-15,25
  497.         dc.w -15,-15,25
  498.         dc.w 5,-15,25
  499.         dc.w 25,-15,25
  500.         dc.w 45,-15,25
  501.  
  502.         dc.w -35,5,25
  503.         dc.w -15,5,25
  504.         dc.w 5,5,25
  505.         dc.w 25,5,25
  506.         dc.w 45,5,25
  507.  
  508.         dc.w -35,25,25
  509.         dc.w -15,25,25
  510.         dc.w 5,25,25
  511.         dc.w 25,25,25
  512.         dc.w 45,25,25
  513.  
  514.         dc.w -35,45,25
  515.         dc.w -15,45,25
  516.         dc.w 5,45,25
  517.         dc.w 25,45,25
  518.         dc.w 45,45,25
  519.  
  520.         dc.w -35,-35,45
  521.         dc.w -15,-35,45
  522.         dc.w 5,-35,45
  523.         dc.w 25,-35,45
  524.         dc.w 45,-35,45
  525.  
  526.         dc.w -35,-15,45
  527.         dc.w -15,-15,45
  528.         dc.w 5,-15,45
  529.         dc.w 25,-15,45
  530.         dc.w 45,-15,45
  531.  
  532.         dc.w -35,5,45
  533.         dc.w -15,5,45
  534.         dc.w 5,5,45
  535.         dc.w 25,5,45
  536.         dc.w 45,5,45
  537.  
  538.         dc.w -35,25,45
  539.         dc.w -15,25,45
  540.         dc.w 5,25,45
  541.         dc.w 25,25,45
  542.         dc.w 45,25,45
  543.  
  544.         dc.w -35,45,45
  545.         dc.w -15,45,45
  546.         dc.w 5,45,45
  547.         dc.w 25,45,45
  548.         dc.w 45,45,45    
  549.         EVEN
  550. ;c equ -35            
  551. ;    rept 5
  552. ;        b equ -35
  553. ;        rept 5
  554. ;           a equ -35
  555. ;           rept 5
  556. ;             dc.w a,b,c
  557. ;             a = a + 20
  558. ;           endr
  559. ;           b = b + 20
  560. ;        endr
  561. ;       c = c + 20
  562. ;    endr
  563.  
  564.        
  565. XAngle         dc.w 0          ; Angle to rotate around x
  566. YAngle         dc.w 0
  567. ZAngle         dc.w 0
  568.                
  569. Mx             dc.l 160                ; Middle of the screen
  570. My             dc.l 120
  571.                
  572. MaxPoints        dc.w 124            ; Number of 3d Points
  573.  
  574. sb3D_text1:        dc.w 0,9,9
  575.         dc.b "OLDSCHOOL",92,0
  576.         EVEN
  577. sb3D_text2:        dc.w 0,199,9
  578.         dc.b "KEEP",94,"COOL",91,0
  579.         EVEN
  580.  
  581. ColorTable:        dc.w    %1111111111111111
  582.         dc.w    %1111111111111111,%1111111111111111
  583.         dc.w    %0111101111101111,%0111101111101111
  584.         dc.w    %0011100111100111,%0011100111100111
  585.         dc.w    %0001100011100011,%0001100011100011        
  586.         dc.w    %0000100001100001,%0000100001100001
  587.         dc.w    %0000100001100001,%0000000000100000
  588.         dc.w    %0000000000000000,%0000000000000000
  589.         dc.w    %0000000000000000,%0000000000000000
  590.        
  591.                section     bss
  592.        
  593. X              ds.w 1                 ; X variable for formula
  594. Y              ds.w 1
  595. Z              ds.w 1
  596. Xt             ds.w 1                 ; Temporary variable for x
  597. Yt             ds.w 1
  598. Zt             ds.w 1
  599.    
  600. DeltaX         ds.w 1                 ; Amound Xangle is increased each time
  601. DeltaY         ds.w 1
  602. DeltaZ         ds.w 1
  603.        
  604. Xoff           ds.w 1
  605. Yoff           ds.w 1
  606. Zoff           ds.w 1                 ; Distance from viewer
  607.        
  608. XSin           ds.w 1                 ; Sine and CoSine of angle to rotate around
  609. XCos           ds.w 1
  610. YSin           ds.w 1
  611. YCos           ds.w 1
  612. ZSin           ds.w 1
  613. ZCos           ds.w 1
  614.        
  615. EraseTable:        ds.l 125*3         ; Array for deletion screenpoints
  616. EraseTable2:    ds.l 125*3
  617. Mul320Table:    ds.l 241        ; Precalc 320x table    
  618. Mul6Table:        ds.w 126        ; Precalc 6x table            
  619.         
  620.     section     text