; Nekomata

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

[Constants]
global $active = 0
global persist $th = 0
global persist $main = 0
global persist $glov = 0
global persist $heel = 0
global persist $low = 0
global persist $tail = 0
global persist $skin = 0
global persist $top = 0
global persist $leo = 0
global $creditinfo = 0

[KeySwap]
condition = $active == 1
key = no_ctrl no_shift alt VK_DOWN
type = cycle
$th = 0,1

[KeySwap0]
condition = $active == 1
Key = ctrl no_shift no_alt VK_UP
type = cycle
$main = 0,1

[KeySwap1]
condition = $active == 1
Key = ctrl no_shift no_alt VK_RIGHT
type = cycle
$glov = 0,1,2

[KeySwap2]
condition = $active == 1
Key = ctrl no_shift alt VK_DOWN
type = cycle
$heel = 0,1

[KeySwap3]
condition = $active == 1
Key = ctrl no_shift no_alt VK_DOWN
type = cycle
$low = 0,1,2

[KeySwap4]
condition = $active == 1
Key = ctrl no_shift no_alt VK_LEFT
type = cycle
$tail = 0,1

[KeySwap5]
condition = $active == 1
Key = ctrl no_shift alt VK_UP
type = cycle
$skin = 0,1

[KeySwap6]
condition = $active == 1
Key = no_ctrl no_shift alt VK_UP
type = cycle
$top = 0,1,2

[KeySwap7]
condition = $active == 1
Key = no_ctrl shift no_alt VK_UP
type = cycle
$leo = 0,1

[Present]
post $active = 0
run = CommandListCreditInfo

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

[TextureOverrideNekomataBodyBlend]
hash = d27d0e6b
handling = skip
vb2 = ResourceNekomataBodyBlend
if DRAW_TYPE == 1
	vb0 = ResourceNekomataBodyPosition
	draw = 42368, 0

	$active = 1
endif

[TextureOverrideNekomataBodyTexcoord]
hash = f589a51f
vb1 = ResourceNekomataBodyTexcoord

[TextureOverrideNekomataBodyVertexLimitRaise]
hash = 0c01e6a5
override_vertex_count = 42368
override_byte_stride = 40

[TextureOverrideNekomataLegsBlend]
hash = f5efd8b1
handling = skip
vb2 = ResourceNekomataLegsBlend
if DRAW_TYPE == 1
	vb0 = ResourceNekomataLegsPosition
	draw = 17325, 0

	$active = 1
endif

[TextureOverrideNekomataLegsTexcoord]
hash = 2a4f8c9e
vb1 = ResourceNekomataLegsTexcoord

[TextureOverrideNekomataLegsVertexLimitRaise]
hash = 99132d05
override_vertex_count = 17325
override_byte_stride = 40

[TextureOverrideNekomataBodyIB]
hash = 26a487ff
handling = skip

[TextureOverrideNekomataBodyA]
hash = 26a487ff
match_first_index = 0
ib = ResourceNekomataBodyAIB
if $skin == 0
	Resource\ZZMI\Diffuse = ref ResourceNekomataBHDiffuse
else if $skin == 1
	Resource\ZZMI\Diffuse = ref ResourceNekomataBHDiffuse2
endif
Resource\ZZMI\NormalMap = ref ResourceNekomataBHNormal
Resource\ZZMI\LightMap = ref ResourceNekomataBHLight
Resource\ZZMI\MaterialMap = ref ResourceNekomataBHMat
run = CommandList\ZZMI\SetTextures
; Arms (744)
if $glov == 2
	drawindexed = 4008, 0, 0
endif

; BaseBody (12824)
drawindexed = 67698, 4008, 0

; BodyChest (779)
if $main == 1 || $leo == 1 || $top == 1 || $top == 2
	drawindexed = 4164, 71706, 0
endif
; Fluff (1181)
if $low == 0
	drawindexed = 2439, 75870, 0
endif

; Gloves (1802)
if $glov == 0 || $glov == 1
	drawindexed = 8748, 78309, 0
endif

; Legs (1670)
if $th == 1
	drawindexed = 9216, 87057, 0
endif
; Leotard (2549)
if $leo == 0
	drawindexed = 13464, 96273, 0
endif
; Nipples (742)
if $top == 2 && $leo == 1
	drawindexed = 4224, 109737, 0
endif
; P (1883)
if $low == 2 && $leo == 1
	drawindexed = 10020, 113961, 0
endif
; Shorts (5176)
if $low == 0 || $low == 1
	drawindexed = 17136, 123981, 0
endif

; Sleeves (2270)
if $glov == 0
	drawindexed = 8814, 141117, 0
endif
; Tails (296)
if $tail == 0
	drawindexed = 1440, 149931, 0
endif
; ThighHighs (2086)
if $th == 0
	drawindexed = 11136, 151371, 0
endif
; Thighs (1140)
if $th == 1
	drawindexed = 6048, 162507, 0
endif
; ThighsTH (1140)
if $th == 0
	drawindexed = 6048, 168555, 0
endif
; Top (3934)
if $main == 0
	drawindexed = 14736, 174603, 0
endif
; Top2 (1946)
if $top == 0 || $top == 1
	drawindexed = 7548, 189339, 0
endif
; Top3 (428)
if $top == 0 && $leo == 1
	drawindexed = 1248, 196887, 0
endif

[TextureOverrideNekomataLegsIB]
hash = 74688145
handling = skip

[TextureOverrideNekomataLegsA]
hash = 74688145
match_first_index = 0
ib = ResourceNekomataLegsAIB
if $skin == 0
	Resource\ZZMI\Diffuse = ref ResourceNekomataBHDiffuse
else if $skin == 1
	Resource\ZZMI\Diffuse = ref ResourceNekomataBHDiffuse2
endif
Resource\ZZMI\LightMap = ref ResourceNekomataBHLight
Resource\ZZMI\MaterialMap = ref ResourceNekomataBHMat
Resource\ZZMI\NormalMap = ref ResourceNekomataBHNormal
run = CommandList\ZZMI\SetTextures
; HighHeels (4066)
if $heel == 1
	drawindexed = 16836, 0, 0
endif
; HumanLegs (550)
if $th == 1 && $heel == 1
	drawindexed = 2880, 16836, 0
endif
; OGLegs (11242)
if $heel == 0
	drawindexed = 43164, 19716, 0
endif
; ThighHighs2 (2899)
if $th == 0 && $heel == 1
	drawindexed = 7488, 62880, 0
endif

[TextureOverrideNekomataBHFace]
hash = 37119851
if $skin == 0
	Resource\ZZMI\Diffuse = ref ResourceNekomataBHFace
else if $skin == 1
	Resource\ZZMI\Diffuse = ref ResourceNekomataBHFace2
endif
run = CommandList\ZZMI\SetTextures

; 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 + 7.0
	$creditinfo = 1
endif

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

[ResourceNekomataBodyPosition]
type = Buffer
stride = 40
filename = NekomataBodyPosition.buf

[ResourceNekomataBodyBlend]
type = Buffer
stride = 32
filename = NekomataBodyBlend.buf

[ResourceNekomataBodyTexcoord]
type = Buffer
stride = 24
filename = NekomataBodyTexcoord.buf

[ResourceNekomataBodyAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = NekomataBodyA.ib

[ResourceNekomataLegsPosition]
type = Buffer
stride = 40
filename = NekomataLegsPosition.buf

[ResourceNekomataLegsBlend]
type = Buffer
stride = 32
filename = NekomataLegsBlend.buf

[ResourceNekomataLegsTexcoord]
type = Buffer
stride = 24
filename = NekomataLegsTexcoord.buf

[ResourceNekomataLegsAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = NekomataLegsA.ib

[ResourceNekomataBHDiffuse]
filename = Diffuse.dds

[ResourceNekomataBHDiffuse2]
filename = Diffuse2.dds

[ResourceNekomataBHLight]
filename = Light.dds

[ResourceNekomataBHMat]
filename = Material.dds

[ResourceNekomataBHNormal]
filename = Normal.dds

[ResourceNekomataBHFace]
filename = Face.dds

[ResourceNekomataBHFace2]
filename = Face2.dds

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

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