; Body

; Constants -------------------------

[Constants]
global $active = 0
global persist $mask = 1
global persist $body = 0

[KeyMask]
condition = $active == 1
key = h
type = cycle
$mask = 0,1,2,3,4,5,6,7

[KeyBody]
condition = $active == 1
key = k
type = cycle
$body = 0,1,2,3,4

[Present]
post $active = 0

; Overrides -------------------------

[TextureOverrideBody1Position]
hash = a74c8d89
handling = skip
vb0 = ResourceBody1Position
vb2 = ResourceBody1Blend
draw = 34795,0
$active = 1

[TextureOverrideBody1Texcoord]
hash = 5204f58d
vb1 = ResourceBody1Texcoord

[TextureOverrideBody1VertexLimitRaise]
hash = 2be39a26
; override_vertex_count = 12898
; override_byte_stride = 104

[TextureOverrideBody2Position]
hash = a9d915fc
handling = skip
vb0 = ResourceBody2Position
vb2 = ResourceBody2Blend
draw = 1418,0
$active = 1

[TextureOverrideBody2Texcoord]
hash = ac887af1
vb1 = ResourceBody2Texcoord

[TextureOverrideBody2VertexLimitRaise]
hash = ec497419

[TextureOverrideBody1IB]
hash = bd385763
handling = skip

[TextureOverrideBody1A]
hash = bd385763
match_first_index = 0
run = CommandListSkinTexture
ib = ResourceBody1AIB
ps-t4 = ResourceBody1ANormalMap

if $mask == 0
	drawindexed = 4848, 68661, 0
	drawindexed = 2982, 91749, 0
elif $mask == 1
	drawindexed = 4848, 68661, 0
	drawindexed = 2982, 91749, 0
elif $mask == 2
	drawindexed = 4848, 68661, 0
elif $mask == 3
	drawindexed = 4848, 68661, 0
elif $mask == 4
	drawindexed = 2982, 91749, 0
elif $mask == 5
	drawindexed = 2982, 91749, 0
elif $mask == 6
	drawindexed = 0, 0, 0
elif $mask == 7
	drawindexed = 0, 0, 0
endif

if $body == 0
	drawindexed = 2607, 73509, 0
	drawindexed = 9963, 76116, 0
	drawindexed = 5670, 86079, 0
elif $body == 1
	drawindexed = 2607, 73509, 0
	drawindexed = 5670, 86079, 0
elif $body == 2
	drawindexed = 2607, 73509, 0
	drawindexed = 9963, 76116, 0
elif $body == 3
	drawindexed = 2607, 73509, 0
elif $body == 4
	drawindexed = 0, 0, 0
endif

drawindexed = 2781, 0, 0
drawindexed = 65880, 2781, 0

[TextureOverrideBody1ADiffuse]
hash = 7fc03353
this = ResourceBody1ADiffuse

[TextureOverridePulchra.BodyA.Diffuse.1024]
hash = bf7eba0f
this = ResourceBody1ADiffuse

[TextureOverrideBody1AMaterialMap]
hash = d8462af0
this = ResourceBody1AMaterialMap

[TextureOverridePulchra.BodyA.LightMap.1024]
hash = 47040200
this = ResourceBody1AMaterialMap

[TextureOverrideBody1ALightMap]
hash = d404b789
this = ResourceBody1ALightMap

[TextureOverridePulchra.BodyA.MaterialMap.1024]
hash = a66a11d0
this = ResourceBody1ALightMap

[TextureOverrideBody1B]
hash = bd385763
match_first_index = 39972
run = CommandListSkinTexture
ib = ResourceBody1BIB
ps-t4 = ResourceBody1BNormalMap

if $body == 0
	drawindexed = 7008, 52065, 0
elif $body == 1
	drawindexed = 0, 0, 0
elif $body == 2
	drawindexed = 7008, 52065, 0
elif $body == 3
	drawindexed = 0, 0, 0
elif $body == 4
	drawindexed = 0, 0, 0
endif

drawindexed = 52065, 0, 0

[TextureOverrideBody1BDiffuse]
hash = 57be79d6
this = ResourceBody1BDiffuse

[TextureOverridePulchra.BodyB.Diffuse.1024]
hash = fb0a816a
this = ResourceBody1BDiffuse

[TextureOverrideBody1BMaterialMap]
hash = 12c44063
this = ResourceBody1BMaterialMap

[TextureOverridePulchra.BodyB.LightMap.1024]
hash = f475e822
this = ResourceBody1BMaterialMap

[TextureOverrideBody1BLightMap]
hash = a553df20
this = ResourceBody1BLightMap

[TextureOverridePulchra.BodyB.MaterialMap.1024]
hash = 64d75415
this = ResourceBody1BLightMap

[TextureOverrideBody2IB]
hash = 425a7565
handling = skip

[TextureOverrideBody2A]
hash = 425a7565
match_first_index = 0
run = CommandListSkinTexture
ib = ResourceBody2AIB
drawindexed = 0, 0, 0
ps-t4 = ResourceBody2ANormalMap

[TextureOverrideBody2B]
hash = 425a7565
match_first_index = 2358
run = CommandListSkinTexture
ib = ResourceBody2BIB
drawindexed = 0, 0, 0
ps-t4 = ResourceBody2ANormalMap

; CommandList -----------------------

; Resources -------------------------

[ResourceBody1Position]
type = Buffer
stride = 40
filename = Body1Position.buf

[ResourceBody1Blend]
type = Buffer
stride = 32
filename = Body1Blend.buf

[ResourceBody1Texcoord]
type = Buffer
stride = 32
filename = Body1Texcoord.buf

[ResourceBody2Position]
type = Buffer
stride = 40
filename = Body2Position.buf

[ResourceBody2Blend]
type = Buffer
stride = 8
filename = Body2Blend.buf

[ResourceBody2Texcoord]
type = Buffer
stride = 24
filename = Body2Texcoord.buf

[ResourceBody1AIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = Body1A.ib

[ResourceBody1BIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = Body1B.ib

[ResourceBody2AIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = Body2A.ib

[ResourceBody2BIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = Body2B.ib

[ResourceBody1ADiffuse]
filename = Body1ADiffuse.dds

[ResourceBody1ANormalMap]
filename = Body1ANormalMap.dds

[ResourceBody1AMaterialMap]
filename = Body1AMaterialMap.dds

[ResourceBody1ALightMap]
filename = Body1ALightMap.dds

[ResourceBody1BDiffuse]
filename = Body1BDiffuse.dds

[ResourceBody1BNormalMap]
filename = Body1BNormalMap.dds

[ResourceBody1BMaterialMap]
filename = Body1BMaterialMap.dds

[ResourceBody1BLightMap]
filename = Body1BLightMap.dds

[ResourceBody2ANormalMap]
filename = Body2ANormalMap.dds
