; Shenhe

; Constants -------------------------
[Constants]
global persist $Face = 0
global persist $TieTu = 0
global persist $TouFa = 0
global persist $TouShi = 0
global persist $TouShi2 = 0
global persist $TouShi3 = 0
global persist $TouShi4 = 0
global persist $YanJin = 0
global persist $ShenZhiYan = 0
global persist $YinDiHuan = 0
global persist $XieZi = 0
global persist $XiangQuan = 0
global persist $BiHuan = 0
global persist $GanGou = 0
global persist $ShenTi = 0
global persist $Tie = 0
global persist $MianJu = 0

[Present]
post $active = 0

[KeyFace]
condition = $active == 1
type = cycle
key = y
$Face = 0,1

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

[KeyTouFa]
condition = $active == 1
type = cycle
key = 5
$TouFa = 0,1,2

[KeyTouShi]
condition = $active == 1
type = cycle
key = 6
$TouShi = 0,1

[KeyTouShi2]
condition = $active == 1
type = cycle
key = 7
$TouShi2 = 0,1

[KeyTouShi3]
condition = $active == 1
type = cycle
key = 8
$TouShi3 = 0,1

[KeyTouShi4]
condition = $active == 1
type = cycle
key = 9
$TouShi4 = 0,1

[KeyYanJin]
condition = $active == 1
type = cycle
key = 0
$YanJin = 0,1

[KeyShenZhiYan]
condition = $active == 1
type = cycle
key = _
$ShenZhiYan = 0,1

[KeyYinDiHuan]
condition = $active == 1
type = cycle
key = =
$YinDiHuan = 0,1

[KeyXieZi]
condition = $active == 1
type = cycle
key = p
$XieZi = 0,1

[KeyXiangQuan]
condition = $active == 1
type = cycle
key = 
$XiangQuan = 0,1

[KeyBiHuan]
condition = $active == 1
type = cycle
key = VK_LEFT
$BiHuan = 0,1

[KeyGanGou]
condition = $active == 1
type = cycle
key = VK_DOWN
$GanGou = 0,1

[KeyShenTi]
condition = $active == 1
type = cycle
key = 
$ShenTi = 0,1

[KeyTie]
condition = $active == 1
type = cycle
key = VK_RIGHT
$Tie = 0,1

[KeyMianJu]
condition = $active == 1
type = cycle
key = VK_UP
$MianJu = 0,1

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

[TextureOverrideShenheFaceHeadDiffuse]
hash = f5f393cb
$active = 1
if $Face == 0
ps-t0 = ResourceShenheFaceHeadDiffuse
else if $Face == 1
ps-t0 = ResourceShenheFaceHeadDiffuse2
endif

[TextureOverrideShenhePosition]
hash = e44b58b5
vb0 = ResourceShenhePosition

[TextureOverrideShenheBlend]
hash = 541cf273
vb1 = ResourceShenheBlend
handling = skip
draw = 124642,0 

[TextureOverrideShenheTexcoord]
hash = 86c4f5ec
vb1 = ResourceShenheTexcoord

[TextureOverrideShenheVertexLimitRaise]
hash = 7404bef0
; override_vertex_count = 3
; override_byte_stride = 92

[TextureOverrideShenheIB]
hash = 33a92492
handling = skip

[TextureOverrideShenheHead]
hash = 33a92492
match_first_index = 0
ib = ResourceShenheHeadIB
$active = 1
ps-t0 = ResourceShenheHeadDiffuse
ps-t1 = ResourceShenheHeadLightMap
; ShenheHead-vb0=e44b58b5.txt (3)
drawindexed = 3, 0, 0
; ShenheHead A
	; 乳穴塞 (3839)
	drawindexed = 21828, 3, 0
	endif
	; 头发 (2893)
	if $TouFa == 0
		drawindexed = 10947, 21831, 0
	; 头发.001 (7813)
	else if $TouFa == 1
		drawindexed = 36159, 32778, 0
	; 头发.002 (3663)
	else if $TouFa == 2
		drawindexed = 15906, 68937, 0
	endif
	; 头饰.001 (367)
	if $TouShi == 0
		drawindexed = 1170, 84843, 0
	endif
	; 头饰.002 (6146)
	if $TouShi2 == 0
		drawindexed = 35448, 86013, 0
	endif
	; 头饰.003 (3049)
	if $TouShi3 == 0
		drawindexed = 17700, 121461, 0
	endif
	; 头饰.004 (2240)
	if $TouShi4 == 0
		drawindexed = 9384, 139161, 0
	endif
	; 眼睛 (124)
	if $YanJin == 0
		drawindexed = 480, 148545, 0
	; 眼睛.001 (1265)
	else if $YanJin == 1
		drawindexed = 6744, 149025, 0
	endif
	; 神之眼 (90)
	if $ShenZhiYan == 0
		drawindexed = 408, 155769, 0
	endif
	; 阴蒂环 (1196)
	if $YinDiHuan == 0
		drawindexed = 6336, 156177, 0
	endif
	; 鞋子 (40274)
	if $XieZi == 0
		drawindexed = 187176, 162513, 0
	endif
	; 项圈 (3574)
	if $XiangQuan == 0
		drawindexed = 20220, 349689, 0
	endif
	; 鼻环 (1196)
	if $BiHuan == 0
		drawindexed = 6336, 369909, 0
	endif

[TextureOverrideShenheBody]
hash = 33a92492
match_first_index = 14385
ib = ResourceShenheBodyIB
if $TieTu == 0
ps-t0 = ResourceShenheBodyDiffuse
ps-t1 = ResourceShenheBodyLightMap
else if $TieTu == 1
ps-t0 = ResourceShenheBodyDiffuse2
ps-t1 = ResourceShenheBodyLightMap
else if $TieTu == 2
ps-t0 = ResourceShenheBodyDiffuse3
ps-t1 = ResourceShenheBodyLightMap
else if $TieTu == 3
ps-t0 = ResourceShenheBodyDiffuse4
ps-t1 = ResourceShenheBodyLightMap
else if $TieTu == 4
ps-t0 = ResourceShenheBodyDiffuse5
ps-t1 = ResourceShenheBodyLightMap1
else if $TieTu == 5
ps-t0 = ResourceShenheBodyDiffuse6
ps-t1 = ResourceShenheBodyLightMap2
else if $TieTu == 6
ps-t0 = ResourceShenheBodyDiffuse7
ps-t1 = ResourceShenheBodyLightMap2
else if $TieTu == 7
ps-t0 = ResourceShenheBodyDiffuse8
ps-t1 = ResourceShenheBodyLightMap3
endif

; ShenheBody-vb0=e44b58b5.txt (3)
drawindexed = 3, 0, 0
; ShenheBody
	; 肛钩 (3633)
	if $GanGou == 0
	drawindexed = 18996, 3, 0
	endif
	; 身体 (16679)
	if $ShenTi == 0
	drawindexed = 89148, 18999, 0
	endif
	; 身体贴 (24381)
	if $Tie == 0
	drawindexed = 139104, 108147, 0
	endif
	; 面具 (2211)
	if $MianJu == 0
	drawindexed = 12576, 247251, 0
	endif

[TextureOverrideShenheDress]
hash = 33a92492
match_first_index = 48753
ib = ResourceShenheDressIB
ps-t0 = ResourceShenheDressDiffuse
ps-t1 = ResourceShenheDressLightMap
; ShenheDress-vb0=e44b58b5.txt (3)
drawindexed = 3, 0, 0

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

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

[ResourceShenhePosition]
type = Buffer
stride = 40
filename = ShenhePosition.buf

[ResourceShenheBlend]
type = Buffer
stride = 32
filename = ShenheBlend.buf

[ResourceShenheTexcoord]
type = Buffer
stride = 20
filename = ShenheTexcoord.buf

[ResourceShenheHeadIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = ShenheHead.ib

[ResourceShenheBodyIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = ShenheBody.ib

[ResourceShenheDressIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = ShenheDress.ib

[ResourceShenheHeadDiffuse]
filename = ShenheHeadDiffuse.dds

[ResourceShenheHeadLightMap]
filename = ShenheHeadLightMap.dds

[ResourceShenheBodyDiffuse]
filename = ShenheBodyDiffuse.dds

[ResourceShenheBodyDiffuse2]
filename = ShenheBodyDiffuse2.dds

[ResourceShenheBodyDiffuse3]
filename = ShenheBodyDiffuse3.dds

[ResourceShenheBodyDiffuse4]
filename = ShenheBodyDiffuse4.dds

[ResourceShenheBodyDiffuse5]
filename = ShenheBodyDiffuse5.dds

[ResourceShenheBodyDiffuse6]
filename = ShenheBodyDiffuse6.dds

[ResourceShenheBodyDiffuse7]
filename = ShenheBodyDiffuse7.dds

[ResourceShenheBodyDiffuse8]
filename = ShenheBodyDiffuse8.dds

[ResourceShenheBodyLightMap]
filename = ShenheBodyLightMap.dds

[ResourceShenheBodyLightMap1]
filename = ShenheBodyLightMap1.dds

[ResourceShenheBodyLightMap2]
filename = ShenheBodyLightMap2.dds

[ResourceShenheBodyLightMap3]
filename = ShenheBodyLightMap3.dds

[ResourceShenheDressDiffuse]
filename = ShenheDressDiffuse.dds

[ResourceShenheDressLightMap]
filename = ShenheDressLightMap.dds

[ResourceShenheFaceHeadDiffuse]
filename = ShenheFaceHeadDiffuse.dds

[ResourceShenheFaceHeadDiffuse2]
filename = ShenheFaceHeadDiffuse2.dds


; .ini generated by XXMI (XX-Model-Importer)
; If you have any issues or find any bugs, please open a ticket at https://github.com/leotorrez/XXMI-Tools/issues