; Dori

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

[Constants]
global $active = 0
global persist $hat = 0
global persist $legs = 0
global persist $main = 0
global persist $arms = 0
global persist $glasses = 0
global $creditinfo = 0

[Present]
post $active = 0
run = CommandListCreditInfo

[KeySwap0]
condition = $active == 1
key = VK_UP
type = cycle
$hat = 0,1

[KeySwap1]
condition = $active == 1
key = VK_DOWN
type = cycle
$legs = 0,1,2

[KeySwap2]
condition = $active == 1
key = VK_RIGHT
back = VK_LEFT
type = cycle
$main = 0,1,2,3,4,5,6,7,8

[KeySwap3]
condition = $active == 1
key = 0
type = cycle
$arms = 0,1

[KeySwap4]
condition = $active == 1
key = 9
type = cycle
$glasses = 0,1

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

[TextureOverrideDoriPosition]
hash = 2a2a63ab
vb0 = ResourceDoriPosition
$active = 1

[TextureOverrideDoriBlend]
hash = b0c49997
handling = skip
vb1 = ResourceDoriBlend
draw = 85249, 0

[TextureOverrideDoriTexcoord]
hash = 1339b941
vb1 = ResourceDoriTexcoord

[TextureOverrideDoriVertexLimitRaise]
hash = 86e25bac
override_vertex_count = 85249
override_byte_stride = 40

[TextureOverrideDoriIB]
hash = 04929496
handling = skip

[TextureOverrideDoriHead]
hash = 04929496
match_first_index = 0
ib = ResourceDoriHeadIB
ps-t0 = ResourceDoriHeadNormalMap
ps-t1 = ResourceDoriHeadDiffuse
ps-t2 = ResourceDoriHeadLightMap
run = CommandList\global\ORFix\ORFix
; DoriHead-vb0=2a2a63ab.txt (3498)
drawindexed = 13815, 0, 0
; DoriHead
; Glasses (206)
if $glasses == 0
drawindexed = 408, 13815, 0
endif
; Hat (2990)
if $hat == 0
drawindexed = 8718, 14223, 0
endif

[TextureOverrideDoriBody]
hash = 04929496
match_first_index = 22941
ib = ResourceDoriBodyIB
ps-t0 = ResourceDoriBodyNormalMap
ps-t1 = ResourceDoriBodyDiffuse
ps-t2 = ResourceDoriBodyLightMap
run = CommandList\global\ORFix\ORFix
; DoriBody-vb0=2a2a63ab.txt (28210)
drawindexed = 158028, 0, 0
; DoriBody
; Heels (13545)
if $legs == 0
else if $legs == 1
drawindexed = 67416, 158028, 0
else if $legs == 2
endif
; Heels-Stockings (12533)
if $legs == 0
drawindexed = 57780, 225444, 0
else if $legs == 1
else if $legs == 2
endif
; Legs (16080)
if $legs == 0
else if $legs == 1
else if $legs == 2
drawindexed = 90768, 283224, 0
endif
; Necklace (74)
if $main == 0
drawindexed = 282, 373992, 0
else if $main == 1
drawindexed = 282, 373992, 0
else if $main == 2
drawindexed = 282, 373992, 0
else if $main == 3
drawindexed = 282, 373992, 0
else if $main == 4
drawindexed = 282, 373992, 0
else if $main == 5
drawindexed = 282, 373992, 0
else if $main == 6
drawindexed = 282, 373992, 0
else if $main == 7
drawindexed = 282, 373992, 0
else if $main == 8
endif
; Sleeves (2788)
if $arms == 0
drawindexed = 7704, 374274, 0
endif
; Strap (880)
if $main == 0
drawindexed = 3120, 381978, 0
else if $main == 1
drawindexed = 3120, 381978, 0
else if $main == 2
else if $main == 3
else if $main == 4
else if $main == 5
else if $main == 6
else if $main == 7
else if $main == 8
endif
; Suit (2738)
if $main == 0
drawindexed = 9264, 385098, 0
else if $main == 1
drawindexed = 9264, 385098, 0
else if $main == 2
drawindexed = 9264, 385098, 0
else if $main == 3
drawindexed = 9264, 385098, 0
else if $main == 4
else if $main == 5
else if $main == 6
else if $main == 7
else if $main == 8
endif
; TieNecklace (349)
if $main == 0
drawindexed = 690, 394362, 0
else if $main == 1
else if $main == 2
drawindexed = 690, 394362, 0
else if $main == 3
else if $main == 4
drawindexed = 690, 394362, 0
else if $main == 5
else if $main == 6
drawindexed = 690, 394362, 0
else if $main == 7
else if $main == 8
endif
; Top (1358)
if $main == 0
drawindexed = 6936, 395052, 0
else if $main == 1
drawindexed = 6936, 395052, 0
else if $main == 2
drawindexed = 6936, 395052, 0
else if $main == 3
drawindexed = 6936, 395052, 0
else if $main == 4
drawindexed = 6936, 395052, 0
else if $main == 5
drawindexed = 6936, 395052, 0
else if $main == 6
else if $main == 7
else if $main == 8
endif

[TextureOverrideDoriFaceHeadDiffuse]
hash = 2021c2b9
this = ResourceDoriFaceHeadDiffuse

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

[ResourceDoriPosition]
type = Buffer
stride = 40
filename = DoriPosition.buf

[ResourceDoriBlend]
type = Buffer
stride = 32
filename = DoriBlend.buf

[ResourceDoriTexcoord]
type = Buffer
stride = 12
filename = DoriTexcoord.buf

[ResourceDoriHeadIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = DoriHead.ib

[ResourceDoriBodyIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = DoriBody.ib

[ResourceDoriHeadNormalMap]
filename = DoriHeadNormalMap.dds

[ResourceDoriHeadDiffuse]
filename = DoriHeadDiffuse.dds

[ResourceDoriHeadLightMap]
filename = DoriHeadLightMap.dds

[ResourceDoriBodyNormalMap]
filename = DoriBodyNormalMap.dds

[ResourceDoriBodyDiffuse]
filename = DoriBodyDiffuse.dds

[ResourceDoriBodyLightMap]
filename = DoriBodyLightMap.dds

[ResourceDoriFaceHeadDiffuse]
filename = DoriFaceHeadDiffuse.dds

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

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