return Def.ActorFrame{
  Name= "xtl_actor_sh",
  OnCommand= function(self)

if not ten_shakenum then
	ten_shakenum = 1;
else

	ten_shakenum=ten_shakenum+1
end

end,
  Def.Quad{
    Name= "xtl_actor_th",
    InitCommand= function(self)


		end,
    OnCommand= cmd(visible,false),
  },
  Def.ActorFrame{
    Name= "xtl_actor_uh",
    OnCommand= cmd(),
    Def.ActorFrameTexture{
      Name= "xtl_actor_vh",
      InitCommand= function(self)

			--SCREENMAN:GetTopScreen():zoom(1);
			--SCREENMAN:GetTopScreen():x(0);

			--ten_wa_p1:zoom(1);

			--self:SetTextureName( 'ten_shake_output'..ten_shakenum )
			self:SetWidth( SCREEN_WIDTH );
			self:SetHeight( SCREEN_HEIGHT );
			self:EnableDepthBuffer( false );
			self:EnableAlphaBuffer( false );
			self:EnableFloat( false );
			self:EnablePreserveTexture( true );

			self:visible(true);

			self:Create();

			--self:Draw()

			ten_shakeTex = self;

		end,
		Def.Quad{
			OnCommand= cmd(diffuse,color('0,0,0,1');zoomto,SCREEN_WIDTH,SCREEN_HEIGHT;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y),
		},
		--For some reason. nITG's AFT texture gets squished into the model? I'm not sure how to easilly replicate that, so I'll just use positioning for a similar effect. -Kid
		Def.Sprite{
			ProxyThisMessageCommand= function(self)
			ten_shakeTexBase = self
				self:SetTexture(ten_base_aft:GetTexture()):Center():customtexturerect(0,0,ten_aft_width_ratio,ten_aft_height_ratio):addy(20*(SCREEN_HEIGHT/480))
			end,
		},
		Def.ActorProxy{
			ProxyThisMessageCommand= function(self)
				ten_tilesaprox = self
				if ten_tilesa_af then
					self:SetTarget(ten_tilesa_af):visible(false):addy(20*(SCREEN_HEIGHT/480))
				end
			end,
		},
    },
    Def.Quad{
      Name= "xtl_actor_wh",
      OnCommand= cmd(diffuse,color('0,0,0,1');zoomto,SCREEN_WIDTH*4,SCREEN_HEIGHT;x,SCREEN_CENTER_X;y,SCREEN_CENTER_Y),
    },
	--AMV for wacky. -Kid
	Def.ActorMultiVertex{
		Name= "Tester",
		Texture= "bg1.png",
		OnCommand= function(self)
			ten_wacky0 = self
			self:SetVertices(ten_GetVerts('ten_wacky_j'))
			self:SetDrawState({Mode='DrawMode_Triangles', First= 1, Num= -1})
			self:cullmode('CullMode_Back')--Because of the zoomy. -Kid
			--Then bring in the AFT texture. -Kid
			self:SetTexture(ten_shakeTex:GetTexture()):zoomy(-1)
			self:x(SCREEN_CENTER_X+0):y(SCREEN_CENTER_Y-20*(SCREEN_HEIGHT/480)):z(0):visible(false);
			MESSAGEMAN:Broadcast("ProxyThisAMVWacky")--For the AFT. -Kid
		end,
	},
	Def.ActorProxy{
		ProxyThisAMVWackyMessageCommand= function(self)
			ten_wacky1 = self;
			self:SetTarget(ten_wacky0):x(-SCREEN_WIDTH):visible(false)
		end,
	},
	Def.ActorProxy{
		ProxyThisAMVWackyMessageCommand= function(self)
			ten_wacky2 = self;
			self:SetTarget(ten_wacky0):x(SCREEN_WIDTH):visible(false)
		end,
	},
	--AMV for shakeplane. -Kid
	Def.ActorMultiVertex{
		Name= "Tester",
		Texture= "bg1.png",
		OnCommand= function(self)
			ten_shake0 = self
			self:SetVertices(ten_GetVerts('ten_shake_j'))
			self:SetDrawState({Mode='DrawMode_Triangles', First= 1, Num= -1})
			self:cullmode('CullMode_Back')--Because of the zoomy. -Kid
			--Then bring in the AFT texture. -Kid
			self:SetTexture(ten_shakeTex:GetTexture()):zoomy(-1)
			self:x(SCREEN_CENTER_X+0):y(SCREEN_CENTER_Y-32*(SCREEN_HEIGHT/480)):z(0):visible(false);
			MESSAGEMAN:Broadcast("ProxyThisAMVShake")--For the AFT. -Kid
		end,
	},
	Def.ActorProxy{
		ProxyThisAMVShakeMessageCommand= function(self)
			ten_shake1 = self;
			self:SetTarget(ten_shake0):x(-SCREEN_WIDTH):visible(false)
		end,
	},
	Def.ActorProxy{
		ProxyThisAMVShakeMessageCommand= function(self)
			ten_shake2 = self;
			self:SetTarget(ten_shake0):x(SCREEN_WIDTH):visible(false)
		end,
	},
	--Original model usage. -Kid
    --[[Def.Model{
      Name= "xtl_actor_xh",
      Bones= "wacky.txt",
      Materials= "wacky.txt",
      Meshes= "wacky.txt",
      OnCommand= function(self)
				ten_wacky0=self;
				self:visible(false);
				self:z(0);
				self:zoomx(1);
				self:zoomy(1);
				self:diffusealpha(1);
				self:rotationx(0);
				self:x(SCREEN_CENTER_X+0);
				self:y(SCREEN_CENTER_Y-20);
				self:playanimation('default',0.01);
				self:sleep(1);
				--self:wag();
				self:effectmagnitude(20,2,2);
				self:effectclock('bgm');
				self:effectperiod(10);
				self:queuemessage('blood_do');
			end,
      blood_doMessageCommand= function(self)
				self:SetTexture(0,ten_shakeTex:GetTexture());
				--self:SetTexture(0,testsprite:GetTexture());
				self:SetTextureScaleX(0,DISPLAY:GetDisplayWidth()/1024);
				self:SetTextureScaleY(0,-math.pow(480/DISPLAY:GetDisplayHeight(),2));
				self:SetTextureTranslateY(0,((-DISPLAY:GetDisplayHeight()/480)+1)*1.5);
				--self:SetTextureScaleY(0,-1);
			end,
    },
    Def.Model{
      Name= "xtl_actor_yh",
      Bones= "wacky.txt",
      Materials= "wacky.txt",
      Meshes= "wacky.txt",
      OnCommand= function(self)
				ten_wacky1=self;
				self:visible(false);
				self:z(0);
				self:zoomx(1);
				self:zoomy(1);
				self:diffusealpha(1);
				self:rotationx(0);
				self:x(SCREEN_CENTER_X+0);
				self:y(SCREEN_CENTER_Y-20);
				self:playanimation('default',0.01);
				self:sleep(1);
				--self:wag();
				self:effectmagnitude(20,2,2);
				self:effectclock('bgm');
				self:effectperiod(10);
				self:queuemessage('blood_do');
			end,
      blood_doMessageCommand= function(self)
				self:SetTexture(0,ten_shakeTex:GetTexture());
				--self:SetTexture(0,testsprite:GetTexture());
				self:SetTextureScaleX(0,DISPLAY:GetDisplayWidth()/1024);
				self:SetTextureScaleY(0,-math.pow(480/DISPLAY:GetDisplayHeight(),2));
				self:SetTextureTranslateY(0,((-DISPLAY:GetDisplayHeight()/480)+1)*1.5);
				--self:SetTextureScaleY(0,-1);
			end,
    },
    Def.Model{
      Name= "xtl_actor_zh",
      Bones= "wacky.txt",
      Materials= "wacky.txt",
      Meshes= "wacky.txt",
      OnCommand= function(self)
				ten_wacky2=self;
				self:visible(false);
				self:z(0);
				self:zoomx(1);
				self:zoomy(1);
				self:diffusealpha(1);
				self:rotationx(0);
				self:x(SCREEN_CENTER_X+0);
				self:y(SCREEN_CENTER_Y-20);
				self:playanimation('default',0.01);
				self:sleep(1);
				--self:wag();
				self:effectmagnitude(20,2,2);
				self:effectclock('bgm');
				self:effectperiod(10);
				self:queuemessage('blood_do');
			end,
      blood_doMessageCommand= function(self)
				self:SetTexture(0,ten_shakeTex:GetTexture());
				--self:SetTexture(0,testsprite:GetTexture());
				self:SetTextureScaleX(0,DISPLAY:GetDisplayWidth()/1024);
				self:SetTextureScaleY(0,-math.pow(480/DISPLAY:GetDisplayHeight(),2));
				self:SetTextureTranslateY(0,((-DISPLAY:GetDisplayHeight()/480)+1)*1.5);
				--self:SetTextureScaleY(0,-1);
			end,
    },
    Def.Model{
      Name= "xtl_actor_ai",
      Bones= "shakeplane.txt",
      Materials= "shakeplane.txt",
      Meshes= "shakeplane.txt",
      OnCommand= function(self)
				ten_shake0=self;
				self:visible(false);
				self:z(0);
				self:zoomx(1);
				self:zoomy(1);
				self:diffusealpha(1);
				self:rotationx(0);
				self:x(SCREEN_CENTER_X+0);
				self:y(SCREEN_CENTER_Y-32);
				self:playanimation('default',1.5);
				self:sleep(1);
				--self:wag();
				self:effectmagnitude(20,2,2);
				self:effectclock('bgm');
				self:effectperiod(10);
				self:queuemessage('blood_does');
			end,
      blood_doesMessageCommand= function(self)
				self:SetTexture(0,ten_shakeTex:GetTexture());
				--self:SetTexture(0,testsprite:GetTexture());
				self:SetTextureScaleX(0,DISPLAY:GetDisplayWidth()/1024);
				self:SetTextureScaleY(0,-math.pow(480/DISPLAY:GetDisplayHeight(),2));
				self:SetTextureTranslateY(0,((-DISPLAY:GetDisplayHeight()/480)+1)*1.5);
				--self:SetTextureScaleY(0,-1);
			end,
    },
    Def.Model{
      Name= "xtl_actor_bi",
      Bones= "shakeplane.txt",
      Materials= "shakeplane.txt",
      Meshes= "shakeplane.txt",
      OnCommand= function(self)
				ten_shake1=self;
				self:visible(false);
				self:z(0);
				self:zoomx(1);
				self:zoomy(1);
				self:diffusealpha(1);
				self:rotationx(0);
				self:x(SCREEN_CENTER_X+0);
				self:y(SCREEN_CENTER_Y-32);
				self:playanimation('default',1.5);
				self:sleep(1);
				--self:wag();
				self:effectmagnitude(20,2,2);
				self:effectclock('bgm');
				self:effectperiod(10);
				--self:queuemessage('blood_does');
			end,
      blood_doesMessageCommand= function(self)

				self:SetTexture(0,ten_shakeTex:GetTexture());

				--self:SetTextureScaleX(0,640/DISPLAY:GetDisplayWidth());
				--self:SetTextureScaleY(0,-480/DISPLAY:GetDisplayHeight() * sh/sw);
				--self:SetTextureTranslateY(0,-0.25);

				self:SetTexture(0,ten_shakeTex:GetTexture());
				--self:SetTexture(0,testsprite:GetTexture());
				self:SetTextureScaleX(0,DISPLAY:GetDisplayWidth()/1024);
				self:SetTextureScaleY(0,-math.pow(480/DISPLAY:GetDisplayHeight(),2));
				self:SetTextureTranslateY(0,((-DISPLAY:GetDisplayHeight()/480)+1)*1.5);
				--self:SetTextureScaleY(0,-1);

			end,
    },
    Def.Model{
      Name= "xtl_actor_ci",
      Bones= "shakeplane.txt",
      Materials= "shakeplane.txt",
      Meshes= "shakeplane.txt",
      OnCommand= function(self)
				ten_shake2=self;
				self:visible(false);
				self:z(0);
				self:zoomx(1);
				self:zoomy(1);
				self:diffusealpha(1);
				self:rotationx(0);
				self:x(SCREEN_CENTER_X+0);
				self:y(SCREEN_CENTER_Y-32);
				self:playanimation('default',1.5);
				self:sleep(1);
				--self:wag();
				self:effectmagnitude(20,2,2);
				self:effectclock('bgm');
				self:effectperiod(10);
				--self:queuemessage('blood_does');
			end,
      blood_doesMessageCommand= function(self)
				self:SetTexture(0,ten_shakeTex:GetTexture());
				--self:SetTexture(0,testsprite:GetTexture());
				self:SetTextureScaleX(0,DISPLAY:GetDisplayWidth()/1024);
				self:SetTextureScaleY(0,-math.pow(480/DISPLAY:GetDisplayHeight(),2));
				self:SetTextureTranslateY(0,((-DISPLAY:GetDisplayHeight()/480)+1)*1.5);
				--self:SetTextureScaleY(0,-1);
			end,
    },]]
  },
  Def.ActorFrameTexture{
    Name= "xtl_actor_di",
    InitCommand= function(self)

			self:SetWidth( SCREEN_WIDTH );
			self:SetHeight( SCREEN_HEIGHT );
			self:EnableDepthBuffer( false );
			self:EnableAlphaBuffer( false );
			self:EnableFloat( false );
			self:EnablePreserveTexture( true );

			self:visible(true);

			self:Create();

			--self:Draw()

			ten_freezef1 = self;

		end,
		Def.Sprite{
			ProxyThisMessageCommand= function(self)
				self:SetTexture(ten_shakeTex:GetTexture()):Center():customtexturerect(0,0,ten_aft_width_ratio,ten_aft_height_ratio)
			end,
		},
		Def.ActorProxy{
			ProxyThisMessageCommand= function(self)
				if ten_shake0 then
					self:SetTarget(ten_shake0):visible(true)
				end
			end,
		},
		Def.ActorProxy{
			ProxyThisMessageCommand= function(self)
				if ten_shake1 then
					self:SetTarget(ten_shake1):visible(true)
				end
			end,
		},
		Def.ActorProxy{
			ProxyThisMessageCommand= function(self)
				if ten_shake2 then
					self:SetTarget(ten_shake2):visible(true)
				end
			end,
		},
  },
  Def.ActorFrameTexture{
    Name= "xtl_actor_ei",
    InitCommand= function(self)

			self:SetWidth( SCREEN_WIDTH );
			self:SetHeight( SCREEN_HEIGHT );
			self:EnableDepthBuffer( false );
			self:EnableAlphaBuffer( false );
			self:EnableFloat( false );
			self:EnablePreserveTexture( true );

			self:visible(true);

			self:Create();

			--self:Draw()

			ten_freezef2 = self;

		end,
		Def.Sprite{
			ProxyThisMessageCommand= function(self)
				self:SetTexture(ten_shakeTex:GetTexture()):Center():customtexturerect(0,0,ten_aft_width_ratio,ten_aft_height_ratio)
			end,
		},
		Def.ActorProxy{
			ProxyThisMessageCommand= function(self)
				if ten_shake0 then
					self:SetTarget(ten_shake0):visible(true)
				end
			end,
		},
		Def.ActorProxy{
			ProxyThisMessageCommand= function(self)
				if ten_shake0 then
					self:SetTarget(ten_shake0):visible(true)
				end
			end,
		},
		Def.ActorProxy{
			ProxyThisMessageCommand= function(self)
				if ten_shake0 then
					self:SetTarget(ten_shake0):visible(true)
				end
			end,
		},
  },
  Def.Sprite{
    Name= "xtl_actor_fi",
    OnCommand= function(self)
	self:SetTexture(ten_freezef2:GetTexture());
		ten_frozen2 = self;
		self:x(SCREEN_CENTER_X)
		self:y(SCREEN_CENTER_Y)
		self:visible(false)
		self:customtexturerect(0,0,ten_aft_width_ratio,ten_aft_height_ratio)
	end,
    Texture= "white",
  },
  Def.Sprite{
    Name= "xtl_actor_gi",
    OnCommand= function(self)
	self:SetTexture(ten_freezef1:GetTexture());
		ten_frozen1 = self;
		self:x(SCREEN_CENTER_X)
		self:y(SCREEN_CENTER_Y)
		self:visible(false)
		self:customtexturerect(0,0,ten_aft_width_ratio,ten_aft_height_ratio)
	end,
    Texture= "white",
  },
}
