; Corin

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

[Constants]
global $active = 0
global $creditinfo = 0

[Present]
post $active = 0

[Constants]
global persist $swapvara = 0
global persist $swapvarb = 0
global persist $swapvarc = 0

[KeySwapa]
condition = $active == 1
key = ctrl no_alt 5
type = cycle
$swapvara = 0,1

[KeySwapb]
condition = $active == 1
key = ctrl no_alt 6
type = cycle
$swapvarb = 0,1,2

[KeySwapc]
condition = $active == 1
key = ctrl no_alt 7
type = cycle
$swapvarc = 0,1

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

[TextureOverrideCorinHairBlend]
hash = 5fa50113
; hash = 8d999156
handling = skip
vb2 = ResourceCorinHairBlend
if DRAW_TYPE == 1
	vb0 = ResourceCorinHairPosition
	draw = 2413,0
endif
$active = 1

[TextureOverrideCorinHairTexcoord]
hash = abc95b03
; hash = 2cf242f4
vb1 = ResourceCorinHairTexcoord

[TextureOverrideCorinHairVertexLimitRaise]
hash = d345e472
override_vertex_count = 2413
override_byte_stride = 92

[TextureOverrideCorinBodyBlend]
hash = aa71e514
handling = skip
vb2 = ResourceCorinBodyBlend
if DRAW_TYPE == 1
	vb0 = ResourceCorinBodyPosition
	draw = 50896,0
endif
$active = 1

[TextureOverrideCorinBodyTexcoord]
hash = 4c6b7bda
vb1 = ResourceCorinBodyTexcoord

[TextureOverrideCorinBodyVertexLimitRaise]
hash = 2eb162ef
override_vertex_count = 50896
override_byte_stride = 92

[TextureOverrideCorinBearBlend]
hash = 6ffea6f6
handling = skip
vb2 = ResourceCorinBearBlend
if DRAW_TYPE == 1
	vb0 = ResourceCorinBearPosition
	draw = 1717,0
endif
$active = 1

[TextureOverrideCorinBearTexcoord]
hash = 21987873
vb1 = ResourceCorinBearTexcoord

[TextureOverrideCorinBearVertexLimitRaise]
hash = 1a7ee1b5
override_vertex_count = 1717
override_byte_stride = 92

[TextureOverrideCorinHairIB]
hash = 5a839fb2
handling = skip
drawindexed = auto

[TextureOverrideCorinHairA]
hash = 5a839fb2
match_first_index = 0
run = CommandListSkinTexture
ib = ResourceCorinHairAIB

[TextureOverrideCorinHairADiffuse]
hash = 60526444
this = ResourceCorinHairADiffuse

[TextureOverrideCorin.HairA.Diffuse.1024]
hash = 651e96f8
this = ResourceCorinHairADiffuse

[TextureOverrideCorinHairANormalMap]
hash = 4a68ef99
this = ResourceCorinHairANormalMap

[TextureOverrideCorin.HairA.NormalMap.1024]
hash = ab8956c8
this = ResourceCorinHairANormalMap

[TextureOverrideCorinHairALightMap]
hash = 929aca42
this = ResourceCorinHairALightMap

[TextureOverrideCorin.HairA.LightMap.1024]
hash = edff2372
this = ResourceCorinHairALightMap

[TextureOverrideCorinHairAMaterialMap]
hash = 23b4c60d
this = ResourceCorinHairAMaterialMap

[TextureOverrideCorinBodyIB]
hash = e74620b5
handling = skip

[TextureOverrideCorinBodyA]
hash = e74620b5
match_first_index = 0
run = CommandListSkinTexture
ib = ResourceCorinBodyAIB
; CorinBodyA
	; Apron (7456)
	if $swapvara == 0
	drawindexed = 35922, 0, 0
	else
	handling = skip
	endif
	; Bandaid (7436)
	if $swapvarb == 1
	drawindexed = 41904, 35922, 0
	else
	handling = skip
	endif
	; Body (14438)
	drawindexed = 68976, 77826, 0
	; Pantie (8984)
	if $swapvarb == 0
	drawindexed = 50394, 146802, 0
	else
	handlinf = skip
	endif
	; Pussy (7367)
	if $swapvarb == 2
	drawindexed = 41616, 197196, 0
	else
	handling = skip
	endif
	; Topless (5215)
	if $swapvara == 1
	drawindexed = 28620, 238812, 0
	else
	handling = skip
	endif

[TextureOverrideCorinBodyADiffuse]
hash = af9d845a
this = ResourceCorinBodyADiffuse

[TextureOverrideCorin.BodyA.Diffuse.1024]
hash = 681f5162
this = ResourceCorinBodyADiffuse

[TextureOverrideCorinBodyANormalMap]
hash = 289f4c58
this = ResourceCorinBodyANormalMap

[TextureOverrideCorin.BodyA.NormalMap.1024]
hash = 640141d4
this = ResourceCorinBodyANormalMap

[TextureOverrideCorinBodyALightMap]
hash = e1c1718f
this = ResourceCorinBodyALightMap

[TextureOverrideCorin.BodyA.LightMap.1024]
hash = af7eda82
this = ResourceCorinBodyALightMap

[TextureOverrideCorinBodyAMaterialMap]
hash = 50a0faea
this = ResourceCorinBodyAMaterialMap

[TextureOverrideCorin.BodyA.MaterialMap.1024]
hash = 9dc9c0f6
this = ResourceCorinBodyAMaterialMap

[TextureOverrideCorinBearIB]
hash = 5f803336
handling = skip

[TextureOverrideCorinBearA]
hash = 5f803336
match_first_index = 0
run = CommandListSkinTexture
ib = ResourceCorinBearAIB
; CorinBearA
	; Bear (1717)
	if $swapvarc == 0
	drawindexed = 5826, 0, 0
	else
	handling = skip
	endif

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

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

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

[ResourceCorinHairPosition]
type = Buffer
stride = 40
filename = CorinHairPosition.buf

[ResourceCorinHairBlend]
type = Buffer
stride = 32
filename = CorinHairBlend.buf

[ResourceCorinHairTexcoord]
type = Buffer
stride = 20
filename = CorinHairTexcoord.buf

[ResourceCorinBodyPosition]
type = Buffer
stride = 40
filename = CorinBodyPosition.buf

[ResourceCorinBodyBlend]
type = Buffer
stride = 32
filename = CorinBodyBlend.buf

[ResourceCorinBodyTexcoord]
type = Buffer
stride = 20
filename = CorinBodyTexcoord.buf

[ResourceCorinBearPosition]
type = Buffer
stride = 40
filename = CorinBearPosition.buf

[ResourceCorinBearBlend]
type = Buffer
stride = 32
filename = CorinBearBlend.buf

[ResourceCorinBearTexcoord]
type = Buffer
stride = 20
filename = CorinBearTexcoord.buf

[ResourceCorinHairAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = CorinHairA.ib

[ResourceCorinBodyAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = CorinBodyA.ib

[ResourceCorinBearAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = CorinBearA.ib

[ResourceCorinHairADiffuse]
filename = CorinHairADiffuse.dds

[ResourceCorinHairANormalMap]
filename = CorinHairANormalMap.dds

[ResourceCorinHairALightMap]
filename = CorinHairALightMap.dds

[ResourceCorinHairAMaterialMap]
filename = CorinHairAMaterialMap.dds

[ResourceCorinBodyADiffuse]
filename = CorinBodyADiffuse.dds

[ResourceCorinBodyANormalMap]
filename = CorinBodyANormalMap.dds

[ResourceCorinBodyALightMap]
filename = CorinBodyALightMap.dds

[ResourceCorinBodyAMaterialMap]
filename = CorinBodyAMaterialMap.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