; Skin

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

[Constants]
global $active = 0
global $creditinfo = 0
global persist $up = 0
global persist $down = 0
global persist $right = 0
global persist $left = 0

[KeyUp]
condition = $active == 1
key = vk_up
type = cycle
$up = 0,1

[KeyDown]
condition = $active == 1
key = vk_down
type = cycle
$down = 0,1

[KeyRight]
condition = $active == 1
key = vk_right
type = cycle
$right = 0,1

[KeyLeft]
condition = $active == 1
key = vk_left
type = cycle
$left = 0,1

[Present]
post $active = 0
run = CommandListCreditInfo

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

[TextureOverrideSkin1Blend]
hash = 987395ef
handling = skip
vb2 = ResourceSkin1Blend
if DRAW_TYPE == 1
	vb0 = ResourceSkin1Position
	draw = 24144, 0

	$active = 1
endif

[TextureOverrideSkin1Texcoord]
hash = 3e19f179
vb1 = ResourceSkin1Texcoord

[TextureOverrideSkin1VertexLimitRaise]
hash = 76ceb325
override_vertex_count = 24144
override_byte_stride = 40

[TextureOverrideSkin2Blend]
hash = 57192494
handling = skip
vb2 = ResourceSkin2Blend
if DRAW_TYPE == 1
	vb0 = ResourceSkin2Position
	draw = 273, 0

	$active = 1
endif

[TextureOverrideSkin2Texcoord]
hash = 07a15f8e
vb1 = ResourceSkin2Texcoord

[TextureOverrideSkin2VertexLimitRaise]
hash = 0e72bdb7
override_vertex_count = 273
override_byte_stride = 40

[TextureOverrideSkin3Blend]
hash = f83e837a
handling = skip
vb2 = ResourceSkin3Blend
if DRAW_TYPE == 1
	vb0 = ResourceSkin3Position
	draw = 480, 0

	$active = 1
endif

[TextureOverrideSkin3Texcoord]
hash = 88e81d00
vb1 = ResourceSkin3Texcoord

[TextureOverrideSkin3VertexLimitRaise]
hash = c0ee97be
override_vertex_count = 480
override_byte_stride = 40

[TextureOverrideSkin4Blend]
hash = 82c81803
handling = skip
vb2 = ResourceSkin4Blend
if DRAW_TYPE == 1
	vb0 = ResourceSkin4Position
	draw = 1083, 0

	$active = 1
endif

[TextureOverrideSkin4Texcoord]
hash = 1cfe1205
vb1 = ResourceSkin4Texcoord

[TextureOverrideSkin4VertexLimitRaise]
hash = f6ed0e7b
override_vertex_count = 1083
override_byte_stride = 40

[TextureOverrideSkin1IB]
hash = feb1c4cd
handling = skip

[TextureOverrideSkin1A]
hash = feb1c4cd
match_first_index = 0
ib = ResourceSkin1AIB
Resource\ZZMI\Diffuse = ref ResourceSkin1ADiffuse
Resource\ZZMI\NormalMap = ref ResourceSkin1ANormalMap
Resource\ZZMI\LightMap = ref ResourceSkin1ALightMap
Resource\ZZMI\MaterialMap = ref ResourceSkin1AMaterialMap
run = CommandList\ZZMI\SetTextures
; 1 (5048)
drawindexed = 20802, 0, 0
; 身体 (18484)
drawindexed = 104640, 20802, 0
; 领口 (612)
drawindexed = 2064, 125442, 0

[TextureOverrideSkin2IB]
hash = a6431856
handling = skip

[TextureOverrideSkin2A]
hash = a6431856
match_first_index = 0
ib = ResourceSkin2AIB
Resource\ZZMI\Diffuse = ref ResourceSkin1ADiffuse
Resource\ZZMI\NormalMap = ref ResourceSkin1ANormalMap
Resource\ZZMI\LightMap = ref ResourceSkin1ALightMap
Resource\ZZMI\MaterialMap = ref ResourceSkin1AMaterialMap
run = CommandList\ZZMI\SetTextures
; Skin2A-vb0=d5c6a50f.txt (273)
drawindexed = 1020, 0, 0

[TextureOverrideSkin3IB]
hash = b946c37f
handling = skip

[TextureOverrideSkin3A]
hash = b946c37f
match_first_index = 0
ib = ResourceSkin3AIB
run = CommandList\ZZMI\SetTextures
; Skin3A-vb0=6aa2848f.txt (480)
drawindexed = 1458, 0, 0

[TextureOverrideSkin4IB]
hash = a318b3c6
handling = skip

[TextureOverrideSkin4A]
hash = a318b3c6
match_first_index = 0
ib = ResourceSkin4AIB
run = CommandList\ZZMI\SetTextures
; Skin4A-vb0=d9087948.txt (1083)
;drawindexed = 3594, 0, 0

[TextureOverrideskip]
hash = b4ffae2e
handling = skip

[TextureOverrideskip2]
hash = 73d5bfdb
handling = skip

[TextureOverrideskip3]
hash = 0a843a8f
if $up == 1
handling = skip
endif

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

[CommandListCreditInfo]
if $creditinfo == 0 && $active > 0
	pre Resource\ShaderFixes\help.ini\Notification = ResourceCreditInfo
	pre run = CustomShader\ShaderFixes\help.ini\FormatText
	pre $\ShaderFixes\help.ini\notification_timeout = time + 5.0
	$creditinfo = 1
endif

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

[ResourceSkin1Position]
type = Buffer
stride = 40
filename = Skin1Position.buf

[ResourceSkin1Blend]
type = Buffer
stride = 32
filename = Skin1Blend.buf

[ResourceSkin1Texcoord]
type = Buffer
stride = 32
filename = Skin1Texcoord.buf

[ResourceSkin1AIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = Skin1A.ib

[ResourceSkin2Position]
type = Buffer
stride = 40
filename = Skin2Position.buf

[ResourceSkin2Blend]
type = Buffer
stride = 32
filename = Skin2Blend.buf

[ResourceSkin2Texcoord]
type = Buffer
stride = 52
filename = Skin2Texcoord.buf

[ResourceSkin2AIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = Skin2A.ib

[ResourceSkin3Position]
type = Buffer
stride = 40
filename = Skin3Position.buf

[ResourceSkin3Blend]
type = Buffer
stride = 32
filename = Skin3Blend.buf

[ResourceSkin3Texcoord]
type = Buffer
stride = 20
filename = Skin3Texcoord.buf

[ResourceSkin3AIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = Skin3A.ib

[ResourceSkin4Position]
type = Buffer
stride = 40
filename = Skin4Position.buf

[ResourceSkin4Blend]
type = Buffer
stride = 16
filename = Skin4Blend.buf

[ResourceSkin4Texcoord]
type = Buffer
stride = 24
filename = Skin4Texcoord.buf

[ResourceSkin4AIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = Skin4A.ib

[ResourceSkin1ADiffuse]
filename = Skin1ADiffuse.dds

[ResourceSkin1ANormalMap]
filename = Skin1ANormalMap.dds

[ResourceSkin1ALightMap]
filename = Skin1ALightMap.dds

[ResourceSkin1AMaterialMap]
filename = Skin1AMaterialMap.dds

[ResourceCreditInfo]
type = Buffer
data = "Created by mingchen"

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