; Miyabi

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

[Constants]
global $active = 0
global $creditinfo = 0
global persist $Corset = 0
global persist $Base1 = 1
global persist $Base2 = 1
global persist $Stocking = 0
global persist $Feet = 1
global persist $Legs = 1
global persist $Shoes = 0


[KeySwap0]
key = ctrl down
condition = $active == 1
type = cycle
$Stocking = 0,0,1
$Feet = 1,0,0
$Legs = 1,1,0
$Shoes = 0,1,0

[KeySwap1]
key = p
condition = $active == 1
type = cycle
$yifu = 0,1
$Corset = 0,1

[Present]
post $active = 0
run = CommandListCreditInfo

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

[TextureOverrideMiyabiBody1Blend]
hash = 9a4227c8
handling = skip
vb2 = ResourceMiyabiBody1Blend
if DRAW_TYPE == 1
	vb0 = ResourceMiyabiBody1Position
	draw = 14581,0
endif
$active = 1

[TextureOverrideMiyabiBody1Texcoord]
hash = 303fb1b6
vb1 = ResourceMiyabiBody1Texcoord

[TextureOverrideMiyabiBody1VertexLimitRaise]
hash = 6201dd9e
override_vertex_count = 14581
override_byte_stride = 96

[TextureOverrideMiyabiBody2Blend]
hash = bc586fd9
handling = skip
vb2 = ResourceMiyabiBody2Blend
if DRAW_TYPE == 1
	vb0 = ResourceMiyabiBody2Position
	draw = 49195,0
endif
$active = 1

[TextureOverrideMiyabiBody2Texcoord]
hash = fb94d66c
vb1 = ResourceMiyabiBody2Texcoord

[TextureOverrideMiyabiBody2VertexLimitRaise]
hash = 8336ded4
override_vertex_count = 49195
override_byte_stride = 92

[TextureOverrideMiyabiBody1IB]
hash = 981c1a1e
handling = skip

[ResourceBodyVB]
[TextureOverrideMiyabiBody1A]
hash = 981c1a1e
match_first_index = 0
ResourceBodyVB = copy vb0
run = CommandListSkinTexture
ib = ResourceMiyabiBody1AIB
If $Corset == 1
	; 1 (2638)
	drawindexed = 7974, 0, 0
endif

[TextureOverrideMiyabiBody1ADiffuse]
hash = 09a2bbd1
this = ResourceMiyabiBody1ADiffuse

[TextureOverrideMiyabiBody1ANormalMap]
hash = ebac056e
this = ResourceMiyabiBody1ANormalMap

[TextureOverrideMiyabiBody1ALightMap]
hash = fd289380
this = ResourceMiyabiBody1ALightMap

[TextureOverrideMiyabiBody1AMaterialMap]
hash = 450770fd
this = ResourceMiyabiBody1AMaterialMap

[TextureOverrideMiyabiBody2IB]
hash = d8003df3
handling = skip

[TextureOverrideMiyabiBody2A]
hash = d8003df3
match_first_index = 0
run = CommandListSkinTexture
ib = ResourceMiyabiBody2AIB
; MiyabiBody2A
	; base (27463)
If $Base2 == 1
	drawindexed = 159612, 0, 0
endif
If $Stocking == 1
	; 丝袜 (2871)
	drawindexed = 10590, 159612, 0
endif
If $Feet == 1
	; 脚 (10566)
	drawindexed = 57744, 170202, 0
endif
If $Legs == 1
	; 腿 (4958)
	drawindexed = 28656, 227946, 0
endif
If $Shoes == 1
	; 鞋 (2241)
	drawindexed = 7218, 256602, 0
endif

ib = ResourceMiyabiBody1AIB
vb0 = ResourceBodyVB
vb1 = ResourceMiyabiBody1Texcoord
vb2 = ResourceMiyabiBody1Blend
vb3 = ResourceBodyVB

; MiyabiBody1A
If $Base1 == 1
	; 2 (12998)
	drawindexed = 67782, 7974, 0
endif

[TextureOverrideMiyabiBody2ADiffuse]
hash = 012e84e9
this = ResourceMiyabiBody2ADiffuse

[TextureOverrideMiyabiBody2ALightMap]
hash = a6ea6d83
this = ResourceMiyabiBody2ALightMap

[TextureOverrideMiyabiBody2AMaterialMap]
hash = d5462e37
this = ResourceMiyabiBody2AMaterialMap

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

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

[ResourceMiyabiBody1Position]
type = Buffer
stride = 40
filename = MiyabiBody1Position.buf

[ResourceMiyabiBody1Blend]
type = Buffer
stride = 32
filename = MiyabiBody1Blend.buf

[ResourceMiyabiBody1Texcoord]
type = Buffer
stride = 24
filename = MiyabiBody1Texcoord.buf

[ResourceMiyabiBody2Position]
type = Buffer
stride = 40
filename = MiyabiBody2Position.buf

[ResourceMiyabiBody2Blend]
type = Buffer
stride = 32
filename = MiyabiBody2Blend.buf

[ResourceMiyabiBody2Texcoord]
type = Buffer
stride = 20
filename = MiyabiBody2Texcoord.buf

[ResourceMiyabiBody1AIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = MiyabiBody1A.ib

[ResourceMiyabiBody2AIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = MiyabiBody2A.ib

[ResourceMiyabiBody1ADiffuse]
filename = MiyabiBody1ADiffuse.dds

[ResourceMiyabiBody1ANormalMap]
filename = MiyabiBody1ANormalMap.jpg

[ResourceMiyabiBody1ALightMap]
filename = MiyabiBody1ALightMap.dds

[ResourceMiyabiBody1AMaterialMap]
filename = MiyabiBody1AMaterialMap.dds

[ResourceMiyabiBody2ADiffuse]
filename = MiyabiBody2ADiffuse.dds

[ResourceMiyabiBody2ALightMap]
filename = MiyabiBody2ALightMap.dds

[ResourceMiyabiBody2AMaterialMap]
filename = MiyabiBody2AMaterialMap.dds

[ResourceCreditInfo]
type = Buffer
data = "Created by monsoon.fanbox.cc"

; .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