--Made with reference to https://github.com/dns/imbalance/blob/master/libms3d/src/MilkShape%203D%20ASCII.txt
--How this will work is: I have a function, it has a table of vertices.
--The function returns a table of triangles (clusters of three vertices per triangle).
--The idea is to replicate what milkshape3d does in it's ascii file. -Kid

local ten_width_ratio = SCREEN_WIDTH/640
local ten_height_ratio = SCREEN_HEIGHT/480

function ten_stopjoints(bonevar)
	--Bail out if we somehow got something bad. -Kid
	if type(bonevar) ~= "string" then return end

	for i=1,24 do
		_G[bonevar..i]:stoptweening()
	end
end

function ten_GetVerts(bonevar)
	--Bail out if we somehow got something bad. -Kid
	if type(bonevar) ~= "string" then return end

	--Made with ms3dascii-vert2amvtable.py! -Kid
	--Albeit, with slight spacing edits for lining up things, scaling of texture coords and adding vertex movement. -Kid
	local VerTex=
	{
		--{{x,y,z},{r,g,b,a},{texturecoordx,texturecoordy}},
		{{-319.801697*ten_width_ratio+_G[bonevar..24]:GetX()*ten_height_ratio, 240.660126*ten_height_ratio+_G[bonevar..24]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,0.000000*ten_aft_height_ratio}},--bone index 24
		{{-319.801697*ten_width_ratio+_G[bonevar..23]:GetX()*ten_height_ratio, 220.618454*ten_height_ratio+_G[bonevar..23]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,0.041667*ten_aft_height_ratio}},--bone index 23
		{{ 320.198303*ten_width_ratio+_G[bonevar..23]:GetX()*ten_height_ratio, 220.618454*ten_height_ratio+_G[bonevar..23]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,0.041667*ten_aft_height_ratio}},--bone index 23
		{{ 320.198303*ten_width_ratio+_G[bonevar..24]:GetX()*ten_height_ratio, 240.660126*ten_height_ratio+_G[bonevar..24]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,0.000000*ten_aft_height_ratio}},--bone index 24
		{{-319.801697*ten_width_ratio+_G[bonevar..22]:GetX()*ten_height_ratio, 200.576797*ten_height_ratio+_G[bonevar..22]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,0.083333*ten_aft_height_ratio}},--bone index 22
		{{ 320.198303*ten_width_ratio+_G[bonevar..22]:GetX()*ten_height_ratio, 200.576797*ten_height_ratio+_G[bonevar..22]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,0.083333*ten_aft_height_ratio}},--bone index 22
		{{-319.801697*ten_width_ratio+_G[bonevar..21]:GetX()*ten_height_ratio, 180.535126*ten_height_ratio+_G[bonevar..21]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,0.125000*ten_aft_height_ratio}},--bone index 21
		{{ 320.198303*ten_width_ratio+_G[bonevar..21]:GetX()*ten_height_ratio, 180.535126*ten_height_ratio+_G[bonevar..21]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,0.125000*ten_aft_height_ratio}},--bone index 21
		{{-319.801697*ten_width_ratio+_G[bonevar..20]:GetX()*ten_height_ratio, 160.493469*ten_height_ratio+_G[bonevar..20]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,0.166667*ten_aft_height_ratio}},--bone index 20
		{{ 320.198303*ten_width_ratio+_G[bonevar..20]:GetX()*ten_height_ratio, 160.493469*ten_height_ratio+_G[bonevar..20]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,0.166667*ten_aft_height_ratio}},--bone index 20
		{{-319.801697*ten_width_ratio+_G[bonevar..19]:GetX()*ten_height_ratio, 140.451797*ten_height_ratio+_G[bonevar..19]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,0.208333*ten_aft_height_ratio}},--bone index 19
		{{ 320.198303*ten_width_ratio+_G[bonevar..19]:GetX()*ten_height_ratio, 140.451797*ten_height_ratio+_G[bonevar..19]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,0.208333*ten_aft_height_ratio}},--bone index 19
		{{-319.801697*ten_width_ratio+_G[bonevar..18]:GetX()*ten_height_ratio, 120.410126*ten_height_ratio+_G[bonevar..18]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,0.250000*ten_aft_height_ratio}},--bone index 18
		{{ 320.198303*ten_width_ratio+_G[bonevar..18]:GetX()*ten_height_ratio, 120.410126*ten_height_ratio+_G[bonevar..18]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,0.250000*ten_aft_height_ratio}},--bone index 18
		{{-319.801697*ten_width_ratio+_G[bonevar..17]:GetX()*ten_height_ratio, 100.368462*ten_height_ratio+_G[bonevar..17]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,0.291667*ten_aft_height_ratio}},--bone index 17
		{{ 320.198303*ten_width_ratio+_G[bonevar..17]:GetX()*ten_height_ratio, 100.368462*ten_height_ratio+_G[bonevar..17]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,0.291667*ten_aft_height_ratio}},--bone index 17
		{{-319.801697*ten_width_ratio+_G[bonevar..16]:GetX()*ten_height_ratio,  80.326797*ten_height_ratio+_G[bonevar..16]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,0.333333*ten_aft_height_ratio}},--bone index 16
		{{ 320.198303*ten_width_ratio+_G[bonevar..16]:GetX()*ten_height_ratio,  80.326797*ten_height_ratio+_G[bonevar..16]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,0.333333*ten_aft_height_ratio}},--bone index 16
		{{-319.801697*ten_width_ratio+_G[bonevar..15]:GetX()*ten_height_ratio,  60.285133*ten_height_ratio+_G[bonevar..15]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,0.375000*ten_aft_height_ratio}},--bone index 15
		{{ 320.198303*ten_width_ratio+_G[bonevar..15]:GetX()*ten_height_ratio,  60.285133*ten_height_ratio+_G[bonevar..15]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,0.375000*ten_aft_height_ratio}},--bone index 15
		{{-319.801697*ten_width_ratio+_G[bonevar..14]:GetX()*ten_height_ratio,  40.243465*ten_height_ratio+_G[bonevar..14]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,0.416667*ten_aft_height_ratio}},--bone index 14
		{{ 320.198303*ten_width_ratio+_G[bonevar..14]:GetX()*ten_height_ratio,  40.243465*ten_height_ratio+_G[bonevar..14]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,0.416667*ten_aft_height_ratio}},--bone index 14
		{{-319.801697*ten_width_ratio+_G[bonevar..13]:GetX()*ten_height_ratio,  20.201799*ten_height_ratio+_G[bonevar..13]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,0.458333*ten_aft_height_ratio}},--bone index 13
		{{ 320.198303*ten_width_ratio+_G[bonevar..13]:GetX()*ten_height_ratio,  20.201799*ten_height_ratio+_G[bonevar..13]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,0.458333*ten_aft_height_ratio}},--bone index 13
		{{-319.801697*ten_width_ratio+_G[bonevar..12]:GetX()*ten_height_ratio,   0.160133*ten_height_ratio+_G[bonevar..12]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,0.500000*ten_aft_height_ratio}},--bone index 12
		{{ 320.198303*ten_width_ratio+_G[bonevar..12]:GetX()*ten_height_ratio,   0.160133*ten_height_ratio+_G[bonevar..12]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,0.500000*ten_aft_height_ratio}},--bone index 12
		{{-319.801697*ten_width_ratio+_G[bonevar..11]:GetX()*ten_height_ratio, -19.881533*ten_height_ratio+_G[bonevar..11]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,0.541667*ten_aft_height_ratio}},--bone index 11
		{{ 320.198303*ten_width_ratio+_G[bonevar..11]:GetX()*ten_height_ratio, -19.881533*ten_height_ratio+_G[bonevar..11]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,0.541667*ten_aft_height_ratio}},--bone index 11
		{{-319.801697*ten_width_ratio+_G[bonevar..10]:GetX()*ten_height_ratio, -39.923199*ten_height_ratio+_G[bonevar..10]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,0.583333*ten_aft_height_ratio}},--bone index 10
		{{ 320.198303*ten_width_ratio+_G[bonevar..10]:GetX()*ten_height_ratio, -39.923199*ten_height_ratio+_G[bonevar..10]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,0.583333*ten_aft_height_ratio}},--bone index 10
		{{-319.801697*ten_width_ratio+_G[bonevar..9 ]:GetX()*ten_height_ratio, -59.964867*ten_height_ratio+_G[bonevar..9 ]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,0.625000*ten_aft_height_ratio}},--bone index 9
		{{ 320.198303*ten_width_ratio+_G[bonevar..9 ]:GetX()*ten_height_ratio, -59.964867*ten_height_ratio+_G[bonevar..9 ]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,0.625000*ten_aft_height_ratio}},--bone index 9
		{{-319.801697*ten_width_ratio+_G[bonevar..8 ]:GetX()*ten_height_ratio, -80.006531*ten_height_ratio+_G[bonevar..8 ]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,0.666667*ten_aft_height_ratio}},--bone index 8
		{{ 320.198303*ten_width_ratio+_G[bonevar..8 ]:GetX()*ten_height_ratio, -80.006531*ten_height_ratio+_G[bonevar..8 ]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,0.666667*ten_aft_height_ratio}},--bone index 8
		{{-319.801697*ten_width_ratio+_G[bonevar..7 ]:GetX()*ten_height_ratio,-100.048195*ten_height_ratio+_G[bonevar..7 ]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,0.708333*ten_aft_height_ratio}},--bone index 7
		{{ 320.198303*ten_width_ratio+_G[bonevar..7 ]:GetX()*ten_height_ratio,-100.048195*ten_height_ratio+_G[bonevar..7 ]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,0.708333*ten_aft_height_ratio}},--bone index 7
		{{-319.801697*ten_width_ratio+_G[bonevar..6 ]:GetX()*ten_height_ratio,-120.089859*ten_height_ratio+_G[bonevar..6 ]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,0.750000*ten_aft_height_ratio}},--bone index 6
		{{ 320.198303*ten_width_ratio+_G[bonevar..6 ]:GetX()*ten_height_ratio,-120.089859*ten_height_ratio+_G[bonevar..6 ]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,0.750000*ten_aft_height_ratio}},--bone index 6
		{{-319.801697*ten_width_ratio+_G[bonevar..5 ]:GetX()*ten_height_ratio,-140.131531*ten_height_ratio+_G[bonevar..5 ]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,0.791667*ten_aft_height_ratio}},--bone index 5
		{{ 320.198303*ten_width_ratio+_G[bonevar..5 ]:GetX()*ten_height_ratio,-140.131531*ten_height_ratio+_G[bonevar..5 ]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,0.791667*ten_aft_height_ratio}},--bone index 5
		{{-319.801697*ten_width_ratio+_G[bonevar..4 ]:GetX()*ten_height_ratio,-160.173187*ten_height_ratio+_G[bonevar..4 ]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,0.833333*ten_aft_height_ratio}},--bone index 4
		{{ 320.198303*ten_width_ratio+_G[bonevar..4 ]:GetX()*ten_height_ratio,-160.173187*ten_height_ratio+_G[bonevar..4 ]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,0.833333*ten_aft_height_ratio}},--bone index 4
		{{-319.801697*ten_width_ratio+_G[bonevar..3 ]:GetX()*ten_height_ratio,-180.214859*ten_height_ratio+_G[bonevar..3 ]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,0.875000*ten_aft_height_ratio}},--bone index 3
		{{ 320.198303*ten_width_ratio+_G[bonevar..3 ]:GetX()*ten_height_ratio,-180.214859*ten_height_ratio+_G[bonevar..3 ]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,0.875000*ten_aft_height_ratio}},--bone index 3
		{{-319.801697*ten_width_ratio+_G[bonevar..2 ]:GetX()*ten_height_ratio,-200.256531*ten_height_ratio+_G[bonevar..2 ]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,0.916667*ten_aft_height_ratio}},--bone index 2
		{{ 320.198303*ten_width_ratio+_G[bonevar..2 ]:GetX()*ten_height_ratio,-200.256531*ten_height_ratio+_G[bonevar..2 ]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,0.916667*ten_aft_height_ratio}},--bone index 2
		{{-319.801697*ten_width_ratio+_G[bonevar..1 ]:GetX()*ten_height_ratio,-220.298187*ten_height_ratio+_G[bonevar..1 ]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,0.958333*ten_aft_height_ratio}},--bone index 1
		{{ 320.198303*ten_width_ratio+_G[bonevar..1 ]:GetX()*ten_height_ratio,-220.298187*ten_height_ratio+_G[bonevar..1 ]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,0.958333*ten_aft_height_ratio}},--bone index 1
		{{-319.801697*ten_width_ratio+_G[bonevar..0 ]:GetX()*ten_height_ratio,-240.339859*ten_height_ratio+_G[bonevar..0 ]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{0,1.000000*ten_aft_height_ratio}},--bone index 0
		{{ 320.198303*ten_width_ratio+_G[bonevar..0 ]:GetX()*ten_height_ratio,-240.339859*ten_height_ratio+_G[bonevar..0 ]:GetY()*ten_height_ratio,0.000000},{1,1,1,1},{ten_aft_width_ratio,1.000000*ten_aft_height_ratio}},--bone index 0
	}

	--Made with ms3dascii-tri2amvtable.py! -Kid
	return {
		VerTex[1],VerTex[2],VerTex[3],--norm: 0, smoothing group: 1
		VerTex[1],VerTex[3],VerTex[4],--norm: 0, smoothing group: 1
		VerTex[5],VerTex[6],VerTex[3],--norm: 0, smoothing group: 1
		VerTex[5],VerTex[3],VerTex[2],--norm: 0, smoothing group: 1
		VerTex[5],VerTex[7],VerTex[8],--norm: 0, smoothing group: 1
		VerTex[5],VerTex[8],VerTex[6],--norm: 0, smoothing group: 1
		VerTex[9],VerTex[10],VerTex[8],--norm: 0, smoothing group: 1
		VerTex[9],VerTex[8],VerTex[7],--norm: 0, smoothing group: 1
		VerTex[9],VerTex[11],VerTex[12],--norm: 0, smoothing group: 1
		VerTex[9],VerTex[12],VerTex[10],--norm: 0, smoothing group: 1
		VerTex[13],VerTex[14],VerTex[12],--norm: 0, smoothing group: 1
		VerTex[13],VerTex[12],VerTex[11],--norm: 0, smoothing group: 1
		VerTex[13],VerTex[15],VerTex[16],--norm: 0, smoothing group: 1
		VerTex[13],VerTex[16],VerTex[14],--norm: 0, smoothing group: 1
		VerTex[17],VerTex[18],VerTex[16],--norm: 0, smoothing group: 1
		VerTex[17],VerTex[16],VerTex[15],--norm: 0, smoothing group: 1
		VerTex[17],VerTex[19],VerTex[20],--norm: 0, smoothing group: 1
		VerTex[17],VerTex[20],VerTex[18],--norm: 0, smoothing group: 1
		VerTex[21],VerTex[22],VerTex[20],--norm: 0, smoothing group: 1
		VerTex[21],VerTex[20],VerTex[19],--norm: 0, smoothing group: 1
		VerTex[21],VerTex[23],VerTex[24],--norm: 0, smoothing group: 1
		VerTex[21],VerTex[24],VerTex[22],--norm: 0, smoothing group: 1
		VerTex[25],VerTex[26],VerTex[24],--norm: 0, smoothing group: 1
		VerTex[25],VerTex[24],VerTex[23],--norm: 0, smoothing group: 1
		VerTex[25],VerTex[27],VerTex[28],--norm: 0, smoothing group: 1
		VerTex[25],VerTex[28],VerTex[26],--norm: 0, smoothing group: 1
		VerTex[29],VerTex[30],VerTex[28],--norm: 0, smoothing group: 1
		VerTex[29],VerTex[28],VerTex[27],--norm: 0, smoothing group: 1
		VerTex[29],VerTex[31],VerTex[32],--norm: 0, smoothing group: 1
		VerTex[29],VerTex[32],VerTex[30],--norm: 0, smoothing group: 1
		VerTex[33],VerTex[34],VerTex[32],--norm: 0, smoothing group: 1
		VerTex[33],VerTex[32],VerTex[31],--norm: 0, smoothing group: 1
		VerTex[33],VerTex[35],VerTex[36],--norm: 0, smoothing group: 1
		VerTex[33],VerTex[36],VerTex[34],--norm: 0, smoothing group: 1
		VerTex[37],VerTex[38],VerTex[36],--norm: 0, smoothing group: 1
		VerTex[37],VerTex[36],VerTex[35],--norm: 0, smoothing group: 1
		VerTex[37],VerTex[39],VerTex[40],--norm: 0, smoothing group: 1
		VerTex[37],VerTex[40],VerTex[38],--norm: 0, smoothing group: 1
		VerTex[41],VerTex[42],VerTex[40],--norm: 0, smoothing group: 1
		VerTex[41],VerTex[40],VerTex[39],--norm: 0, smoothing group: 1
		VerTex[41],VerTex[43],VerTex[44],--norm: 0, smoothing group: 1
		VerTex[41],VerTex[44],VerTex[42],--norm: 0, smoothing group: 1
		VerTex[45],VerTex[46],VerTex[44],--norm: 0, smoothing group: 1
		VerTex[45],VerTex[44],VerTex[43],--norm: 0, smoothing group: 1
		VerTex[45],VerTex[47],VerTex[48],--norm: 0, smoothing group: 1
		VerTex[45],VerTex[48],VerTex[46],--norm: 0, smoothing group: 1
		VerTex[49],VerTex[50],VerTex[48],--norm: 0, smoothing group: 1
		VerTex[49],VerTex[48],VerTex[47],--norm: 0, smoothing group: 1
	}
end
