⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 silly face.ai

📁 Flash游戏编程非常好的源代码,游戏种类丰富,涉及游戏编程的各个重要领域:物理学/人工智能/碰撞检测等。
💻 AI
📖 第 1 页 / 共 5 页
字号:
			}ifelse
		}ifelse
	}def
	/setCStop{
		/_colorStyle exch pt
		_colorStyle 0 eq{
			1 exch sub
			0 0 0
			4 -1 roll
		}if
		
		_colorStyle 2 eq{
			setrgbcolor 4 npop
		}if
		
		_colorStyle 3 eq{
			1 exch sub /_tmp xp
			pop
			4{
				_tmp mul 4 1 roll
			}repeat
		}if
		
		_colorStyle 4 eq{
			3 -1 roll pop pop
			1 exch sub /_tmp xp
			3{
				1 exch sub _tmp mul 1 exch sub 3 1 roll
			}repeat
			setrgbcolor 
			4 npop
		}if
		_colorStyle 2 ne _colorStyle 4 ne and{
			null nsetcustomcolor
		}if
	}def
	/nsetcustomcolor
	{
		pop setcmykcolor
	}def
	/nsetcustomcolorend
	{
	}def
	/ncolorimage{
		pop 
		/_colorimage load 10 execImage
	}def
	_noImage not _level2PS not and{
		/linealFill{
			8 setImageParms
			_color{
				currentcmykcolor
				4{
					makeByte8 4 1 roll
				}repeat
				true 4 null ncolorimage
			}{
				currentgray makeByte8 null bwImage
			}ifelse
		}def
	}if
	/getRampColorSpace{
		_nSamples 1 gt{ 
			/_ndx 0 pt
			[blendColor] cvx exec
		}if
		/_C0 [currentcolor] pt
		/_C0_Space currentcolorspace pt
		
		_nSamples 1 gt{ 
			/_ndx _nSamples 1 sub pt
			[blendColor] cvx exec
		}if
		/_C1 [currentcolor] pt
		/_C1_Space currentcolorspace pt
		
		/_rampColorSpace _C0_Space pt
		
		_spotColor{
			nsetcustomcolorend
		}if
	}def
}def
/npop{
	{pop}repeat
}def
/xd{
	exch def
}def
/nd{
	null def
}def
/pt{
	AGM_Gradient_private 3 1 roll put
}def
/xp{
	exch pt
}def
/xput{
	dup load dup length exch maxlength eq{
		dup dup load dup
		length 2 mul dict copy def
	}if
	load begin
		def
  end
}def
/mySave{
	save /_sSave xp
}def
/myRestore{
	_sSave type /savetype eq{
		_sSave restore
	}if
}def
/gMark{
	counttomark 2 add -1 roll
}def
/execImage{
	/_tmp xp
	{
		exec
	}stopped{
		$error /errorname get /undefinedresult ne{
			stop
		}{
			_tmp npop
		}ifelse
	}if
}def
/pushBSpace{
	newpath gsave
	_bUMatrix astore concat 
}def
/popBSpace{
	grestore
}def
/makeByte8{
	/_tmp 0 pt
	255 mul cvi
	8 string 8{
		dup _tmp 3 index put 
		/_tmp _tmp 1 add pt
	}repeat
	exch pop
}def
/setImageParms{
	1 8 2 index 0 0 1 0 0 _imageMatrix astore
}def
/linealFill{
	0 0 1 1 rectfill
}def
/testCMYKColorThrough{
	gsave
	setcmykcolor currentcmykcolor
	grestore
	add add add 0 ne
}def
/expandOne	{
	/_tmp xp
	dup type /stringtype ne{
		_tmp string
		exch
		dup 0 ne{
			255 mul cvi
			0 1 _tmp 1 sub{
				3 copy
				exch put pop
			}for
		}if
		pop
	}if
}def
/expandColor{
	/_channels xp
	/_len xp
	_channels{
		_len expandOne _channels 1 roll
	}repeat
}def
/blendColor{
	
	_color{
		_rgbRamp _producingSeps not and{
			_redData dup type /stringtype eq{
				/_ndx cvx /get cvx _d255 /exch cvx /get cvx
			}if
			_greenData dup type /stringtype eq{
				/_ndx cvx /get cvx _d255 /exch cvx /get cvx
			}if
			_blueData dup type /stringtype eq{
				/_ndx cvx /get cvx _d255 /exch cvx /get cvx
			}if
			/setrgbcolor cvx
		}{
			_cyanData dup type /stringtype eq{
				/_ndx cvx /get cvx _d255 /exch cvx /get cvx
			}if
			_magentaData dup type /stringtype eq{
				/_ndx cvx /get cvx _d255 /exch cvx /get cvx
			}if
			_yellowData dup type /stringtype eq{
				/_ndx cvx /get cvx _d255 /exch cvx /get cvx
			}if
			_blackData dup type /stringtype eq{
				/_ndx cvx /get cvx _d255 /exch cvx /get cvx
			}if
	
			_spotColor{
				_rampSD begin
					/_rampSD cvx /begin cvx
	
					spot1 begin
						tintImage dup type /stringtype eq{
							/_ndx cvx /get cvx _d255- /exch cvx /get cvx
						}{
							dup null ne{
								name type /nametype ne{
									1 exch sub
								}if
							}if
						}ifelse
				 end
					/spot1 cvx /tintValue 3 -1 /roll cvx /put cvx
	
					spot2 begin
						tintImage dup type /stringtype eq{
							/_ndx cvx /get cvx _d255- /exch cvx /get cvx
						}{
							dup null ne{
								name type /nametype ne{
									1 exch sub
								}if
							}if
						}ifelse
				 end
					/spot2 cvx /tintValue 3 -1 /roll cvx /put cvx
					/end cvx
			 end
				/_rampSD cvx
				/nsetcustomcolor cvx
			}{
				/setcmykcolor cvx
			}ifelse
		}ifelse
	}{
		_blackData dup type /stringtype eq{
			/_ndx cvx /get cvx _d255 /exch cvx /get cvx
		}if
		
		_enabledSmoothShade{
			1 /exch cvx /sub cvx 0 0 0 4 -1 /roll cvx /setcmykcolor cvx
		}{
			 /setgray cvx
		}ifelse
	}ifelse
}def
/useRectImage{
	_subSampleOK _usingSmoothShade not and{
		{
			mark
			0 1 dtransform atan cvi 90 mod 0 eq
			1 0 dtransform atan cvi 90 mod 0 eq
		} stopped
		{
			cleartomark
			false
		}
		{
			and exch pop
		} ifelse
	}{
		false
	}ifelse
}def
/linealImage{
	_noImage{
		rectImage
	}{
		_producingSeps{
				AGM_Gradient_Sep/AGM_Gradient_Sep_private get
				/rampImage get exec
		}{
			useRectImage{
				rectImage
			}{
				rampImage
			}ifelse
		}ifelse
	}ifelse
}def
/linealRamp{
	pushBSpace
	_ramp{
		linealImage
	}{
		linealFill
	}ifelse
	popBSpace
	/_rampIndex _rampIndex 1 sub pt
	_rampIndex 0 gt{
		getRampData
	}if
}def
/radialGrad{
	/_firstShell true pt
	_enabledSmoothShade not{
		fill
	}if
	pushBSpace
	
	_radHilite{
		_xHi _yHi _bUMatrix idtransform /_yHi xp /_xHi xp
		_rampPoint 1 lt{
			1 _rampPoint sub dup _xHi mul exch _yHi mul translate
		}if
	}if
	_rampIndex{
			radialRamp
		/_rampIndex _rampIndex 1 sub pt
		_rampIndex 0 gt{
			getRampData
		}if
	}repeat
	
	popBSpace
	
}def
/getNSamples{
	0 exch
	{
		dup type /stringtype eq{
			length exch pop exit
		}if
		pop
	}forall
	dup 0 eq{
		pop 1
	}if
}def
/getRampData{
	/_rampType gMark pt
	/_color _rampType 0 gt pt
	/_ccRGB _rampType 5 eq _rampType 6 eq or pt
	/_rgbRamp _rampType 4 eq _ccRGB or pt
	/_ccProcess _rampType 2 eq _rampType 3 eq or pt
	_producingSeps{
		_rampSD initSpotDict
		/_spotColor _ccProcess _ccRGB or pt
	}{
		/_spotColor false pt
	}ifelse
	/_ramp true pt
	100 div /_rampPoint xp
	100 div /_midPoint xp
	
	dup /_colorStyle xp
	_colorStyle 0 eq{ 
		2
	}{
		_colorStyle 1 eq{ 
			5
		}{
			_colorStyle 2 eq{
				8
			}{
				_colorStyle 3 eq{
					_producingSeps{
						_rampSD /spot1 get begin
							/name 3 index def
							/spot_K 4 index def
							/spot_Y 5 index def
							/spot_M 6 index def
							/spot_C 7 index def
					 end
					}if
					7
				}{
					_producingSeps{
						_rampSD/spot1 get begin
							/name 4 index def
							/spot_K 8 index def
							/spot_Y 9 index def
							/spot_M 10 index def
							/spot_C 11 index def
					 end
					}if
					11
				} ifelse
			}ifelse
		}ifelse
	}ifelse
	/_tmp xp
	_tmp index 100 div /_endPoint xp
	
	_gradType 1 eq{
		_tmp 1 add index 100 div /_midPoint xp
	}if
	
	_producingSeps{
		_tmp 2 add index /_nextColorStyle xp
		_nextColorStyle 3 eq{
			/_tmp _tmp 4 add pt
			_tmp index dup
			_rampSD/spot1 get /name get ne{
				_rampSD /spot2 get begin
					/name xd
					/spot_K _tmp 2 add index def
					/spot_Y _tmp 3 add index def
					/spot_M _tmp 4 add index def
					/spot_C _tmp 5 add index def
			 end
			}{
				pop
			}ifelse
		}if
		_nextColorStyle 4 eq{
			/_tmp _tmp 5 add pt
			_tmp index dup
			_rampSD/spot1 get /name get ne{
				_rampSD /spot2 get begin
					/name xd
					/spot_K _tmp 5 add index def
					/spot_Y _tmp 6 add index def
					/spot_M _tmp 7 add index def
					/spot_C _tmp 8 add index def
			 end
			}{
				pop
			}ifelse
		}if
	}if
	_rampType 3 eq _rampType 6 eq or{
		/_tint2Data gMark pt
	}if
	_ccProcess _ccRGB or{
		/_tint1Data gMark pt
	}if
	_rgbRamp{
		/_blueData gMark pt
		/_greenData gMark pt
		/_redData gMark pt
	}if
	
	_producingSeps{
		_ccProcess _ccRGB or{
			_rampType 3 eq _rampType 6 eq or{
				_rampSD /spot2 get begin
					/tintImage _gradType 0 eq{
						_tint2Data
					}{
						_tint1Data
					}ifelse
					def
					name null eq{
						/name /Black def
					}if
			 end
			}if
			_rampSD /spot1 get begin
				/tintImage _gradType 0 eq _rampType 2 eq or _rampType 5 eq or{
					_tint1Data
				}{
					_tint2Data
				}ifelse
				def
				_rampType 2 eq _rampType 5 eq or{
					name null eq{
						/name _rampSD/spot2 get /name get def
						/spot_C _rampSD/spot2 get /spot_C get def
						/spot_M _rampSD/spot2 get /spot_M get def
						/spot_Y _rampSD/spot2 get /spot_Y get def
						/spot_K _rampSD/spot2 get /spot_K get def
						_rampSD/spot2 get /name null put
					}if
				}{
					name null eq{
						/name /Black def
					}if
				}ifelse
		 end
		}if
	}if
	/_blackData gMark pt
	_rampType 0 gt{
		counttomark 4 add -3 roll
		/_yellowData xp
		/_magentaData xp
		/_cyanData xp
	}if
	_ramp{
		/_nSamples
			[
			_rampType 0 eq {_blackData}if
			_rampType 1 eq {_cyanData _magentaData _yellowData _blackData}if
			_rampType 2 eq {_cyanData _magentaData _yellowData _blackData _tint1Data}if
			_rampType 3 eq {_cyanData _magentaData _yellowData _blackData _tint1Data _tint2Data}if
			_rampType 4 eq {_cyanData _magentaData _yellowData _blackData _redData _greenData _blueData}if
			_rampType 5 eq {_cyanData _magentaData _yellowData _blackData _redData _greenData _blueData _tint1Data}if
			_rampType 6 eq {_cyanData _magentaData _yellowData _blackData _redData _greenData _blueData _tint1Data _tint2Data}if
			] getNSamples pt
		_enabledSmoothShade not {/_ramp _nSamples 1 gt pt} if
	} if
	
	setCStop
}def
/rectImage{
	gsave
	/_sInc 1 pt
	/_bInc 1 _nSamples div pt
	/_nSubSamples _nSamples pt
	
	_subSampleOK{
		/_uRampLen 1 0 dtransform _dUserSpace idtransform dup mul exch dup mul add sqrt pt
		/_pChange _uRampLen 0 eq{0}{_nSamples _uRampLen div}ifelse pt
		
		_pChange .5 gt dup /_optimize xp{
			/_nSubSamples _uRampLen 2 div round cvi dup 1 le{pop 2}if pt
			/_bInc 1 _nSubSamples div pt
			/_sInc _nSamples 1 sub _nSubSamples 1 sub div pt
		}if
	}if
	0
	_nSubSamples
	[
	/dup cvx
	_optimize {
		/round cvx /cvi cvx
	} if
	/_ndx /exch cvx /pt cvx
	blendColor
	0 0 _bInc 1 /rectfill cvx
	_bInc 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -