$ od -c -N 50000 [_CDMiwok_01_]<bonsai2.0>cedar>release>CII>ciiicecream.c!2 0000000 / * c i i i c e c r e a m . c 0000020 \n * * C o p y r i g h t 323 0000040 1 9 9 0 , 1 9 9 3 b y X e 0000060 r o x C o r p o r a t i o n . 0000100 A l l r i g h t s r e s 0000120 e r v e d . \n * * M i c h a e 0000140 l P l a s s , S e p t e m b 0000160 e r 2 8 , 1 9 9 3 1 1 : 3 0000200 4 a m P D T \n * / \n # d e f 0000220 i n e T E S T V E R S I O N \n 0000240 # i n c l u d e " c i i . h " 0000260 \n # i n c l u d e " c i i _ m 0000300 a t r i x . h " \n \n s t a t i c 0000320 v o i d \n S h a p e 1 ( C I I 0000340 _ P a t h G e n e r a t o r s 0000360 e l f , C I I _ P a t h S i n 0000400 k s i n k ) \n { \n \t C I I _ R 0000420 e c t a n g l e R e p * r e c 0000440 t = s e l f - > d a t a ; \n 0000460 \t C I I _ V e c t o r R e p p 0000500 ; \n \t C I I _ V e c t o r R e p 0000520 c [ 3 ] ; \n \t p . x = r e 0000540 c t - > x ; \n \t p . y = r e 0000560 c t - > y ; \n \t C I I _ M o v e 0000600 T o ( s i n k , & p ) ; \n \t c 0000620 [ 0 ] . x = r e c t - > x ; 0000640 \n \t c [ 0 ] . y = r e c t - 0000660 > y + r e c t - > h ; \n \t c 0000700 [ 1 ] . x = r e c t - > x 0000720 + r e c t - > w ; \n \t c [ 1 ] 0000740 . y = r e c t - > y + r 0000760 e c t - > h ; \n \t c [ 2 ] . x 0001000 = r e c t - > x + r e c t 0001020 - > w ; \n \t c [ 2 ] . y = r 0001040 e c t - > y ; \n \t C I I _ C u r 0001060 v e T o ( s i n k , c ) ; \n } 0001100 \n \n f l o a t r e d [ 3 ] 0001120 = { 1 . 0 , 0 . 0 , 0 . 0001140 0 } ; \n f l o a t g r e e n [ 0001160 3 ] = { 0 . 0 , 1 . 0 , 0001200 0 . 0 } ; \n f l o a t b l u e 0001220 [ 3 ] = { 0 . 0 , 0 . 0 0001240 , 1 . 0 } ; \n \n f l o a t c 0001260 o n e R G B [ 3 ] = { 0 . 4 0001300 , 0 . 3 , 0 . 2 5 } ; \n f l o a 0001320 t s t r o k e R G B [ 3 ] = 0001340 { 0 . 0 , 0 . 0 , 0 . 1 } ; \n 0001360 \t \n s t a t i c C I I _ R E S 0001400 \n C o n e P a t h ( C I I _ P a 0001420 t h G e n e r a t o r s e l f 0001440 , C I I _ P a t h S i n k s 0001460 i n k ) \n { \n \t C I I _ V e c t 0001500 o r R e p p 0 = { 7 0 . 0 0001520 , 7 5 . 0 } ; \n \t C I I _ V e 0001540 c t o r R e p p 1 = { 5 0 0001560 . 0 , 2 5 . 0 } ; \n \t C I I _ 0001600 V e c t o r R e p p 2 = { 0001620 3 0 . 0 , 7 5 . 0 } ; \n \t C I 0001640 I _ M o v e T o ( s i n k , & 0001660 p 0 ) ; \n \t C I I _ L i n e T o 0001700 ( s i n k , & p 1 ) ; \n \t C I 0001720 I _ L i n e T o ( s i n k , & 0001740 p 2 ) ; \n } \n \n s t a t i c C 0001760 I I _ R E S \n I c e C r e a m P 0002000 a t h ( C I I _ P a t h G e n e 0002020 r a t o r s e l f , C I I _ 0002040 P a t h S i n k s i n k ) \n { 0002060 \n \t C I I _ V e c t o r R e p 0002100 p 0 = { 3 0 . 0 , 7 5 . 0 0002120 } ; \n \t C I I _ C o n i c C o n 0002140 t r o l R e p c 1 = { { 5 0002160 0 . 0 , 2 5 . 0 } , { 7 0 . 0002200 0 , 7 5 . 0 } , 0 . 1 } ; \n 0002220 \t C I I _ V e c t o r R e p c 0002240 2 [ 3 ] = { { 8 0 . 0 , 8 0002260 0 . 0 } , { 8 0 . 0 , 9 0 . 0002300 0 } , { 7 2 . 0 , 8 7 . 0 } 0002320 } ; \n \t C I I _ C o n i c C o n 0002340 t r o l R e p c 3 = { { 8 0002360 8 . 8 4 0 9 3 , 1 2 2 . 0 } , 0002400 { 5 0 . 0 , 1 2 2 . 0 } , 0002420 0 . 3 4 7 3 3 1 4 } ; \n \t C I I 0002440 _ C o n i c C o n t r o l R e p 0002460 c 4 = { { 1 1 . 1 5 9 0 8 0002500 , 1 2 2 . 0 } , { 2 8 . 0 , 0002520 8 7 . 0 } , 0 . 3 4 7 3 3 1 0002540 5 } ; \n \t C I I _ C o n i c C o 0002560 n t r o l R e p c 5 = { { 0002600 1 5 . 0 , 9 0 . 0 } , { 3 0 0002620 . 0 , 7 5 . 0 } , 0 . 5 } ; 0002640 \n \t C I I _ M o v e T o ( s i n 0002660 k , & p 0 ) ; \n \t C I I _ C o 0002700 n i c T o ( s i n k , & c 1 ) 0002720 ; \n \t C I I _ C u r v e T o ( s 0002740 i n k , c 2 ) ; \n \t C I I _ C 0002760 o n i c T o ( s i n k , & c 3 0003000 ) ; \n \t C I I _ C o n i c T o ( 0003020 s i n k , & c 4 ) ; \n \t C I I 0003040 _ C o n i c T o ( s i n k , & 0003060 c 5 ) ; \n } \n \n s t a t i c v 0003100 o i d \n I c e C r e a m C o n e 0003120 ( d e v , m p , f l a v o r 0003140 ) \n \t C I I _ H a n d l e d e 0003160 v ; \n \t f l o a t m p [ ] ; \n 0003200 \t f l o a t f l a v o r [ ] ; 0003220 \n { \n \t C I I _ S t r o k e C o 0003240 n t r o l R e p s t r o k e 0003260 = C I I _ I N I T I A L S T R 0003300 O K E C O N T R O L ; \n \t C I I 0003320 _ P a t h G e n e r a t o r O b 0003340 j e c t R e p p ; \n \t s t r o 0003360 k e . s t r o k e T y p e = 0003400 C I I _ C L O S E D _ S T R O K 0003420 E ; \n \t s t r o k e . e n d = 0003440 C I I _ S Q U A R E _ E N D ; 0003460 \n \t s t r o k e . j o i n t = 0003500 C I I _ B E V E L _ J O I N T 0003520 ; \n \t s t r o k e . s t r o k e 0003540 W i d t h = 2 . 0 ; \n \t C I 0003560 I _ S e t M a t r i x ( d e v , 0003600 m p ) ; \n \t p . d a t a = 0003620 ( v o i d * ) 0 ; \n \t p . G e n 0003640 e r a t e P a t h = & C o n 0003660 e P a t h ; \n \t C I I _ S e t R 0003700 G B ( d e v , c o n e R G B ) 0003720 ; \n \t C I I _ M a s k F i l l ( 0003740 d e v , & p , C I I _ N O N 0003760 Z E R O _ F I L L ) ; \n \t p . G 0004000 e n e r a t e P a t h = & I 0004020 c e C r e a m P a t h ; \n \t C I 0004040 I _ S e t H S V ( d e v , f l 0004060 a v o r ) ; \n \t C I I _ M a s k 0004100 F i l l ( d e v , & p , C I 0004120 I _ N O N Z E R O _ F I L L ) ; 0004140 \n \t C I I _ S e t R G B ( d e v 0004160 , s t r o k e R G B ) ; \n \t C 0004200 I I _ M a s k S t r o k e ( d e 0004220 v , & p , & s t r o k e ) ; 0004240 \n } \n \n s t a t i c v o i d \n 0004260 T C o n e ( d e v , m p , f 0004300 l a v o r ) \n \t C I I _ H a n d 0004320 l e d e v ; \n \t f l o a t m 0004340 p [ ] ; \n \t f l o a t f l a v 0004360 o r [ ] ; \n { \n \t f l o a t t 0004400 [ 6 ] ; \n \t C I I _ V e c t o r 0004420 R e p t 0 = { 0 . 0 , 2 0004440 0 0 . 0 } ; \n \t f l o a t r 0 0004460 = - 2 2 . 0 ; \n \t C I I _ V 0004500 e c t o r R e p t 1 = { - 0004520 5 0 . 0 , - 2 5 . 0 } ; \n \t C 0004540 I U _ M a k e S c a l e ( 1 . 0 0004560 , t ) ; \n \t C I U _ A p p l y 0004600 P r e C o n c a t ( m p , t ) 0004620 ; \n \t C I U _ A p p l y P r e T 0004640 r a n s l a t e ( t 0 . x , t 0004660 0 . y , t ) ; \n \t C I U _ A p 0004700 p l y P r e R o t a t e ( r 0 , 0004720 t ) ; \n \t C I U _ A p p l y P 0004740 r e T r a n s l a t e ( t 1 . x 0004760 , t 1 . y , t ) ; \n \t I c e 0005000 C r e a m C o n e ( d e v , & 0005020 t , f l a v o r ) ; \n } \n \n s 0005040 t a t i c v o i d \n S i x C o 0005060 n e s ( d e v , m p , h , 0005100 s ) \n \t C I I _ H a n d l e d 0005120 e v ; \n \t f l o a t m p [ ] ; 0005140 \n \t f l o a t h , s ; \n { \n 0005160 \t f l o a t t [ 6 ] ; \n \t f l 0005200 o a t f l a v o r [ 3 ] = 0005220 { 1 . 0 , 1 . 0 , 0 . 8 } ; 0005240 \n \t C I I _ V e c t o r R e p 0005260 t 0 = { 0 . 0 , 2 0 0 . 0 0005300 } ; \n \t f l o a t r 0 = 6 0005320 0 . 0 ; \n \t C I I _ V e c t o r 0005340 R e p t 1 = { - 5 0 . 0 , 0005360 - 2 5 . 0 } ; \n \t i n t i 0005400 = 6 ; \n \t C I U _ M a k e S c 0005420 a l e ( 1 . 0 , t ) ; \n \t C I 0005440 U _ A p p l y P r e C o n c a t 0005460 ( m p , t ) ; \n \t w h i l e 0005500 ( i > 0 ) { \n \t \t f l a v 0005520 o r [ 0 ] = h ; \n \t \t f l a 0005540 v o r [ 1 ] = s ; \n \t \t I c 0005560 e C r e a m C o n e ( d e v , 0005600 t , f l a v o r ) ; \n \t \t C I 0005620 U _ A p p l y P r e R o t a t e 0005640 ( r 0 , t ) ; \n \t \t h + = 0005660 1 . 0 / 6 . 0 ; i f ( h > 0005700 1 . 0 ) { h - = 1 . 0 ; 0005720 } ; \n \t \t f l a v o r [ 0 ] = 0005740 h ; \n \t \t i - = 1 ; \n \t } 0005760 ; \n } \n \n s t a t i c C I I _ 0006000 R E S \n C i r c l e P a t h ( C 0006020 I I _ P a t h G e n e r a t o r 0006040 s e l f , C I I _ P a t h S 0006060 i n k s i n k ) \n { \n \t C I I 0006100 _ V e c t o r R e p p = { 0006120 1 0 0 . 0 , 0 . 0 } ; \n \t i n 0006140 t i ; \n \t C I I _ M o v e T o 0006160 ( s i n k , & p ) ; \n \t i = 0006200 1 ; \n \t w h i l e ( i < = 0006220 4 ) { \n \t \t C I I _ C o n i 0006240 c C o n t r o l R e p c c ; \n 0006260 \t \t f l o a t x , y ; \n \t \t 0006300 x = - p . y ; \n \t \t y = 0006320 p . x ; \n \t \t c c . p 1 . x = 0006340 p . x + x ; \n \t \t c c . p 0006360 1 . y = p . y + y ; \n \t 0006400 \t c c . p 2 . x = x ; \n \t \t 0006420 c c . p 2 . y = y ; \n \t \t c 0006440 c . s = 0 . 4 1 4 2 ; \n \t \t 0006460 C I I _ C o n i c T o ( s i n k 0006500 , & c c ) ; \n \t \t p . x = 0006520 x ; \n \t \t p . y = y ; \n \t \t 0006540 i = i + 1 ; \n \t } \n } \n 0006560 \n s t a t i c v o i d \n C i r 0006600 c l e C l i p ( d e v ) \n \t C I 0006620 I _ H a n d l e d e v ; \n { \n 0006640 \t C I I _ P a t h G e n e r a t 0006660 o r O b j e c t R e p p ; \n \t 0006700 p . d a t a = ( v o i d * ) 0006720 0 ; \n \t p . G e n e r a t e P a 0006740 t h = & C i r c l e P a t h 0006760 ; \n \t C I I _ C l i p ( d e v , 0007000 & p , C I I _ N O N Z E R O 0007020 _ F I L L ) ; \n } \n \n C I I _ V 0007040 e c t o r R e p c e n t e r 0007060 = { 3 0 0 . 0 , 4 0 0 . 0 } 0007100 ; \n C I I _ V e c t o r R e p 0007120 s c a l e = { 4 . 0 , 4 . 0007140 0 } ; \n \n e x t e r n v o i d 0007160 \n r u n _ c i i i c e c r e a m 0007200 ( d e v ) \n \t C I I _ H a n d l 0007220 e d e v ; \n { \n \t f l o a t 0007240 r 0 = 2 5 . 0 ; \n \t f l o a 0007260 t m [ 6 ] ; \n \t f l o a t s 0007300 a v e [ 6 ] ; \n \t f l o a t h 0007320 , s ; \n \t f l o a t s h r i 0007340 n k = 0 . 7 ; \n \t i n t i 0007360 = 1 6 ; \n \t C I I _ G e t M 0007400 a t r i x ( d e v , m ) ; \n \t 0007420 C I I _ G e t M a t r i x ( d e 0007440 v , s a v e ) ; \n \t C I U _ A 0007460 p p l y P r e T r a n s l a t e 0007500 ( c e n t e r . x , c e n t e 0007520 r . y , m ) ; \n \t C I U _ A p 0007540 p l y P r e S c a l e ( ( f l o 0007560 a t ) 4 . 0 , m ) ; \n \t C I I 0007600 _ S e t M a t r i x ( d e v , 0007620 m ) ; \n \t h = 1 . 0 ; \n \t s 0007640 = 1 . 0 ; \n \t C i r c l e C 0007660 l i p ( d e v ) ; \n \t w h i l e 0007700 ( i > 0 ) { \n \t \t S i x 0007720 C o n e s ( d e v , m , h , 0007740 s ) ; \n \t \t C I U _ A p p l y 0007760 P r e R o t a t e ( r 0 , m ) 0010000 ; \n \t \t C I U _ A p p l y P r e 0010020 S c a l e ( s h r i n k , m ) 0010040 ; \n \t \t h + = 1 . 0 / 1 8 . 0010060 0 ; i f ( h > 1 . 0 ) 0010100 { h - = 1 . 0 ; } ; \n \t \t s 0010120 * = s h r i n k ; \n \t \t i 0010140 - = 1 ; \n \t } ; \n \t C I I _ S 0010160 e t M a t r i x ( d e v , s a 0010200 v e ) ; \n } \n \n v o i d \n X R _ 0010220 r u n _ c i i i c e c r e a m ( 0010240 ) \n { \n # i f d e f T E S T V 0010260 E R S I O N \n \t C I I _ H a n d 0010300 l e d e v = ( C I I _ H a 0010320 n d l e ) C I I _ T e s t D e v 0010340 i c e ( ) ; \n \t f l o a t t [ 0010360 6 ] ; \n \t C I I _ G e t I n i t 0010400 i a l M a t r i x ( d e v , t 0010420 ) ; \n \t C I I _ S e t M a t r i 0010440 x ( d e v , t ) ; \n \t r u n _ 0010460 c i i i c e c r e a m ( d e v ) 0010500 ; \n \t C I I _ D e s t r o y ( d 0010520 e v ) ; \n # e n d i f \n } \n 0010536