; Sparxie

; Constants -------------------------
[Constants]
global $active = 0
global persist $neck = 0
global persist $shoe = 0
global persist $cloth = 0
global persist $panty = 0
global persist $thigh = 0



[KeyNeck]
condition = $active == 1
key = NO_ALT NO_SHIFT VK_UP
type = cycle
$neck = 0,1

[KeyShoe]
condition = $active == 1
key = NO_ALT NO_SHIFT VK_DOWN
type = cycle
$shoe = 0,1

[KeyCloth]
condition = $active == 1
key = NO_ALT NO_SHIFT VK_LEFT
type = cycle
$cloth = 0,1

[KeyPanty]
condition = $active == 1
key = ALT NO_SHIFT VK_DOWN
type = cycle
$panty = 0,1

[KeyThigh]
condition = $active == 1
key = NO_ALT NO_SHIFT VK_RIGHT
type = cycle
$thigh = 0,1

[Present]
post $active = 0

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

[TextureOverrideSparxiebodyBlend]
hash = df489315
match_priority = 1
if $\Sparxie\Master\swapvarZ==1
	handling = skip
	vb2 = ResourceSparxiebodyBlend
	if DRAW_TYPE == 1
		vb0 = ResourceSparxiebodyPosition
		draw = 31738, 0
	elif DRAW_TYPE == 8
		Resource\SRMI\PositionBuffer = ref ResourceSparxiebodyPositionCS
		Resource\SRMI\BlendBuffer = ref ResourceSparxiebodyBlendCS
		$\SRMI\vertex_count = 31738
	endif
	$active = 1
endif

	
[TextureOverrideSparxiebodyTexcoord]
hash = a0dfb1ac
match_priority = 1
if $\Sparxie\Master\swapvarZ==1
	vb1 = ResourceSparxiebodyTexcoord
endif

	
[TextureOverrideSparxiebodyDraw]
hash = 337f7de8
match_priority = 1
if $\Sparxie\Master\swapvarZ==1
	override_vertex_count = 31738
	override_byte_stride = 40
	uav_byte_stride = 4
endif

	
[TextureOverrideSparxiebodyIB]
hash = 4dcbf0c8
match_priority = 1
if $\Sparxie\Master\swapvarZ==1
	handling = skip
endif

	
[TextureOverrideSparxiebodyA]
hash = 4dcbf0c8
match_priority = 1
if $\Sparxie\Master\swapvarZ==1
	match_first_index = 0
	ib = ResourceSparxiebodyAIB
	
	if $cloth == 1
; UpperCloth (2040)
drawindexed = 7089, 0, 0
	endif
endif

	
[TextureOverrideSparxiebodyB]
hash = 4dcbf0c8
match_priority = 1
if $\Sparxie\Master\swapvarZ==1
	match_first_index = 12495
	ib = ResourceSparxiebodyBIB
	; HatAcc (1586)
	drawindexed = 4635, 0, 0
	
	; ND (12606)
	drawindexed = 68652, 4635, 0
	
	if $neck == 1
	; N_NeckRibbon (708)
	drawindexed = 2220, 73287, 0
	endif 
	if $shoe == 0
	; S_BarefootFlat (2918)
	drawindexed = 14520, 75507, 0
	elif $shoe == 1
	; S_Shoes (2704)
	drawindexed = 8094, 90027, 0
	endif 
	
	if $thigh == 0
	; T_Thigh (135)
	drawindexed = 624, 98121, 0
	elif $thigh == 1
	; T_ThighRinged (351)
	drawindexed = 1872, 98745, 0
	; ThighRing (242)
	drawindexed = 468, 100617, 0
	endif
endif

	
[TextureOverrideSparxiebodyC]
hash = 4dcbf0c8
match_priority = 1
if $\Sparxie\Master\swapvarZ==1
	match_first_index = 78261
	ib = ResourceSparxiebodyCIB
	; Lens (16)
	drawindexed = 42, 0, 0
	
	if $panty == 1
	; Trans_Panties (1061)
	drawindexed = 4134, 42, 0
	endif 
	
	if $cloth == 1
	; Trans_Upper (7371)
	drawindexed = 23529, 4176, 0
	endif
endif

[TextureOverrideSparxiebodyADiffuse]
hash = 13412fd3
match_priority = 1
if $\Sparxie\Master\swapvarZ==1
	this = ResourceSparxiebodyADiffuse
endif

	
[TextureOverrideSparxiebodyALightMap]
hash = aff129e7
match_priority = 1
if $\Sparxie\Master\swapvarZ==1
	this = ResourceSparxiebodyALightMap
endif

	
	
; CommandList -----------------------
	
	
; Resources -------------------------
	
[ResourceSparxiebodyPosition]
type = Buffer
stride = 40
filename = SparxiebodyPosition.buf

[ResourceSparxiebodyBlend]
type = Buffer
stride = 32
filename = SparxiebodyBlend.buf

[ResourceSparxiebodyTexcoord]
type = Buffer
stride = 20
filename = SparxiebodyTexcoord.buf

[ResourceSparxiebodyPositionCS]
type = StructuredBuffer
stride = 40
filename = SparxiebodyPosition.buf

[ResourceSparxiebodyBlendCS]
type = StructuredBuffer
stride = 32
filename = SparxiebodyBlend.buf

[ResourceSparxiebodyAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = SparxiebodyA.ib

[ResourceSparxiebodyBIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = SparxiebodyB.ib

[ResourceSparxiebodyCIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = SparxiebodyC.ib

[ResourceSparxiebodyADiffuse]
filename = SparxiebodyADiffuse.dds

[ResourceSparxiebodyALightMap]
filename = SparxiebodyALightMap.dds


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