; Pulchra
; Constants -------------------------
[Constants]
global $creditinfo = 0
global $active = 0
global $fps = 30
global $frameStart= 1
global $frameEnd = 29
global persist $swapvarAnimFrame = 0
global persist $swapvarTop = 0
global persist $swapvarCorset = 0
global persist $swapvarNipple = 0
global persist $swapvarTopBelts = 0
global persist $swapvarPanties = 0
global persist $swapvarPants = 0
global persist $swapvarBottomBelts = 0
global persist $swapvarFeetToes = 0
global persist $swapvarThighAccessories = 0
global persist $swapvarHair = 0
global persist $swapvarMask = 0
global persist $swapvarTail = 0
global persist $swapvarEars = 0
global persist $swapvarHand = 0
global persist $swapvarNails = 0
global persist $swapvarColor = 0
global persist $swapvarAccessories = 0
global persist $swapvarShoes = 0
global persist $swapvarHairColor = 0
[KeySwapswapvarTop]
condition = $active == 1
key = no_alt no_ctrl VK_UP
type = cycle
$swapvarTop = 0,1,2,3
[KeySwapswapvarCorset]
condition = $active == 1
key = alt ctrl VK_UP
type = cycle
$swapvarCorset = 0,1
[KeySwapswapvarNipple]
condition = $active == 1
key = alt no_ctrl VK_UP
type = cycle
$swapvarNipple = 0,1,2
[KeySwapswapvarTopBelts]
condition = $active == 1
key = no_alt ctrl VK_UP
type = cycle
$swapvarTopBelts = 0,1,2
[KeySwapswapvarPanties]
condition = $active == 1
key = alt no_ctrl VK_DOWN
type = cycle
$swapvarPanties = 0,1,2
[KeySwapswapvarPants]
condition = $active == 1
key = no_alt no_ctrl VK_DOWN
type = cycle
$swapvarPants = 0,1,2
[KeySwapswapvarBottomBelts]
condition = $active == 1
key = no_alt ctrl VK_DOWN
type = cycle
$swapvarBottomBelts = 0,1
[KeySwapswapvarFeetToes]
condition = $active == 1
key = alt no_ctrl VK_RIGHT
type = cycle
$swapvarFeetToes = 0,1
[KeySwapswapvarThighAccessories]
condition = $active == 1
key = no_alt no_ctrl VK_RIGHT
type = cycle
$swapvarThighAccessories = 0,1,2
[KeySwapswapvarHair]
condition = $active == 1
key = no_alt ctrl VK_LEFT
type = cycle
$swapvarHair = 0,1
[KeySwapswapvarMask]
condition = $active == 1
key = alt ctrl VK_LEFT
type = cycle
$swapvarMask = 0,1,2
[KeySwapswapvarTail]
condition = $active == 1
key = alt ctrl VK_RIGHT
type = cycle
$swapvarTail = 0,1,2
[KeySwapswapvarEars]
condition = $active == 1
key = alt ctrl VK_DOWN
type = cycle
$swapvarEars = 0,1,2
[KeySwapswapvarHand]
condition = $active == 1
key = no_alt no_ctrl VK_LEFT
type = cycle
$swapvarHand = 0,1
[KeySwapswapvarNails]
condition = $active == 1
key = no_alt no_ctrl ,
type = cycle
$swapvarNails = 0,1
[KeySwapswapvarColor]
condition = $active == 1
key = no_alt no_ctrl .
type = cycle
$swapvarColor = 0,1,2,3,4,5
[KeySwapswapvarAccessories]
condition = $active == 1
key = no_alt no_ctrl ;
type = cycle
$swapvarAccessories = 0,1
[KeySwapswapvarShoes]
condition = $active == 1
key = no_alt ctrl VK_RIGHT
type = cycle
$swapvarShoes = 0,1
[KeySwapswapvarHairColor]
condition = $active == 1
key = alt no_ctrl VK_LEFT
type = cycle
$swapvarHairColor = 0,1,2,3,4,5
[Present]
post $active = 0
run = CommandListCreditInfo
[Present]
post $active = 0
run = CommandListCreditInfo
; Overrides -------------------------
[TextureOverridePulchraMaskBlend]
hash = 0db288cb
handling = skip
vb2 = ResourcePulchraMaskBlend
if DRAW_TYPE == 1
	vb0 = ResourcePulchraMaskPosition
	draw = 584,0
endif
$active = 1
[TextureOverridePulchraMaskTexcoord]
hash = 0e117b28
vb1 = ResourcePulchraMaskTexcoord
[TextureOverridePulchraMaskVertexLimitRaise]
hash = 992028e7
override_vertex_count = 584
override_byte_stride = 72
[TextureOverridePulchraBodyBlend]
hash = 9381fa0b
handling = skip
vb2 = ResourcePulchraBodyBlend
if DRAW_TYPE == 1
	vb0 = ResourcePulchraBodyPosition
	draw = 100662,0
endif
$active = 1
[TextureOverridePulchraBodyTexcoord]
hash = 5204f58d
vb1 = ResourcePulchraBodyTexcoord
[TextureOverridePulchraBodyVertexLimitRaise]
hash = 2be39a26
override_vertex_count = 100662
override_byte_stride = 104
[TextureOverridePulchraMaskIB]
hash = 5b30f4da
handling = skip
[TextureOverridePulchraMaskA]
hash = 5b30f4da
match_first_index = 0
run = CommandListSkinTexture
ib = ResourcePulchraMaskAIB
ps-t4 = ResourcePulchraBodyANormalMap
; PulchraMaskA
	; Mask
	if $swapvarMask == 0 || $swapvarColor == 3
	    drawindexed = 1740, 0, 0
	endif
[TextureOverridePulchraMaskADiffuse]
hash = 46bab365
this = ResourcePulchraMaskADiffuse

[TextureOverridePulchra.Mask.Diffuse.1024]
hash = 128c8f2e
this = ResourcePulchraMaskADiffuse
[TextureOverridePulchraMaskANormalMap]
hash = ebac056e
this = ResourcePulchraMaskANormalMap
[TextureOverridePulchraMaskALightMap]
hash = 03d28ecd
this = ResourcePulchraMaskALightMap

[TextureOverridePulchra.Mask.LightMap.1024]
hash = e522177c
this = ResourcePulchraMaskALightMap
[TextureOverridePulchraMaskAMaterialMap]
hash = 320a1179
this = ResourcePulchraMaskAMaterialMap

[TextureOverridePulchra.Mask.MaterialMap.1024]
hash = 820ded20
this = ResourcePulchraMaskAMaterialMap
[TextureOverridePulchraBodyIB]
hash = bd385763
handling = skip
[TextureOverridePulchraBodyA]
hash = bd385763
match_first_index = 0
run = CommandListSkinTexture
ib = ResourcePulchraBodyAIB
ps-t4 = ResourcePulchraBodyANormalMap
; PulchraBodyA
	; AltEars
	if $swapvarEars == 1 && $swapvarColor != 4
	    drawindexed = 2262, 0, 0
	endif
	; Ears
	if $swapvarEars == 0 && $swapvarColor != 4
	    drawindexed = 2262, 2262, 0
	endif
	; Hair0
	if $swapvarHair == 0
	    drawindexed = 10608, 4524, 0
	endif
	; Hair1
	if $swapvarHair == 1
	    drawindexed = 8439, 15132, 0
	endif
	; Tail
	if $swapvarTail == 0
	    drawindexed = 2607, 23571, 0
	endif
[TextureOverridePulchraBodyADiffuse]
hash = 7fc03353
if $swapvarHairColor == 0
this = ResourcePulchraBlack
elif $swapvarHairColor == 1
this = ResourcePulchraYellow
elif $swapvarHairColor == 2
this = ResourcePulchraRed
elif $swapvarHairColor == 3
this = ResourcePulchraSkin
elif $swapvarHairColor == 4
this = ResourcePulchraCow
elif $swapvarHairColor == 5
this = ResourcePulchraWhite
else 
this = ResourcePulchraBlack
endif

[TextureOverridePulchra.BodyA.Diffuse.1024]
hash = bf7eba0f
if $swapvarHairColor == 0
this = ResourcePulchraBlack
elif $swapvarHairColor == 1
this = ResourcePulchraYellow
elif $swapvarHairColor == 2
this = ResourcePulchraRed
elif $swapvarHairColor == 3
this = ResourcePulchraSkin
elif $swapvarHairColor == 4
this = ResourcePulchraCow
elif $swapvarHairColor == 5
this = ResourcePulchraWhite
else 
this = ResourcePulchraBlack
endif
[TextureOverridePulchraBodyALightMap]
hash = d8462af0
this = ResourcePulchraBodyALightMap

[TextureOverridePulchra.BodyA.LightMap.1024]
hash = 47040200
this = ResourcePulchraBodyALightMap
[TextureOverridePulchraBodyAMaterialMap]
hash = d404b789
this = ResourcePulchraBodyAMaterialMap

[TextureOverridePulchra.BodyA.MaterialMap.1024]
hash = a66a11d0
this = ResourcePulchraBodyAMaterialMap
[TextureOverridePulchraBodyB]
hash = bd385763
match_first_index = 39972
run = CommandListSkinTexture
ib = ResourcePulchraBodyBIB
ps-t4 = ResourcePulchraBodyANormalMap
	; BodyBase
		; BodyDown
		if $swapvarPants == 1 || $swapvarPants == 2 || $swapvarPants == 3
		    drawindexed = 13170, 0, 0
		endif
		; BodyDownLeg
		if $swapvarPants == 0
		    drawindexed = 2592, 13170, 0
		endif
		; BodyUP (4246)
		drawindexed = 22068, 15762, 0
		; Boots0.001
		if $swapvarColor != 3 && $swapvarShoes == 0
		    drawindexed = 906, 37830, 0
		endif
		; Neck (173)
		drawindexed = 600, 38736, 0
		; Pussy
		if $swapvarColor == 3 && $swapvarCorset == 1 && $swapvarPanties == 2 && $swapvarPants != 0 && $swapvarPants != 1
		    drawindexed = 3252, 39336, 0
		endif
	; Top
		; BeltUP
		if $swapvarTop != 0 && $swapvarTopBelts == 0 || $swapvarTop != 0 && $swapvarTopBelts == 1
		    drawindexed = 2016, 42588, 0
		endif
		; BreastBelt
		if $swapvarTopBelts == 1 || $swapvarTopBelts == 0 
		    drawindexed = 5064, 44604, 0
		endif
		; Corset
		if $swapvarCorset == 0 && $swapvarPants != 0 && $swapvarPants != 1
		    drawindexed = 2616, 49668, 0
		endif
		; CorsetMini
		if $swapvarTopBelts == 0 && $swapvarCorset != 0
		    drawindexed = 900, 52284, 0
		endif
		; RingNoseCow
		if $swapvarMask == 1 && $swapvarColor == 4
		    drawindexed = 1080, 53184, 0
		endif
		; RingNoseSmall
		if $swapvarMask == 1 && $swapvarColor != 4
		    drawindexed = 1080, 54264, 0
		endif
		; Top0.001
		if $swapvarTop == 0
		    drawindexed = 18192, 55344, 0
		endif
		; Top1
		if $swapvarTop == 1
		    drawindexed = 9429, 73536, 0
		endif
		; Top2
		if $swapvarTop == 2 && $swapvarTopBelts != 2
		    drawindexed = 1272, 82965, 0
		endif
	; Legs
		; Leg0
		if $swapvarThighAccessories == 0
		    drawindexed = 5076, 84237, 0
		endif
		; LegDec
		if $swapvarThighAccessories == 0
		    drawindexed = 1272, 89313, 0
		endif
		; Pants
		if $swapvarPants == 0
		    drawindexed = 11562, 90585, 0
		endif
		; Shorts
		if $swapvarPants == 1
		    drawindexed = 12672, 102147, 0
		endif
		; ThighsBelt1
		if $swapvarThighAccessories == 1 && $swapvarPants != 0 || $swapvarThighAccessories == 0 && $swapvarPants != 0
		    drawindexed = 6912, 114819, 0
		endif
		; ThighsBelt1.001
		if $swapvarThighAccessories == 1 && $swapvarPants != 0
		    drawindexed = 960, 121731, 0
		endif
	; Feet
		; Boots0
		if $swapvarColor != 3 && $swapvarShoes == 0
		    drawindexed = 4272, 122691, 0
		endif
		; Boots0-1
		if $swapvarFeetToes == 0 && $swapvarColor != 3 && $swapvarShoes == 0
		    drawindexed = 726, 126963, 0
		endif
		; Boots0-1.001
		if $swapvarFeetToes == 0 && $swapvarColor == 3 && $swapvarShoes == 0
		    drawindexed = 726, 127689, 0
		endif
		; Boots0.002
		if $swapvarColor == 3 && $swapvarShoes == 0
		    drawindexed = 4272, 128415, 0
		endif
	; Tail
		; CapTail
		if $swapvarTailE == 0 || $swapvarTailE == 1 || $swapvarPants == 0
		    drawindexed = 240, 132687, 0
		endif
		; CowTail
		if $swapvarTail == 1 && $swapvarColor == 4
		    drawindexed = 5412, 132927, 0
		endif
	; Head
		; EarsCow
		if $swapvarColor == 4
		    drawindexed = 1140, 138339, 0
		endif
	; Accessories
		; BellCow
		if $swapvarColor == 4
		    drawindexed = 17238, 139479, 0
		endif
		; Earrings
		if $swapvarAccessories == 0 && $swapvarEars == 0 && $swapvarColor != 4
		    drawindexed = 3240, 156717, 0
		endif
		; Earrings.001
		if $swapvarAccessories == 0
		    drawindexed = 4320, 159957, 0
		endif
		; Earrings.002
		if $swapvarAccessories == 0 && $swapvarColor == 3 && $swapvarShoes == 0
		    drawindexed = 1080, 164277, 0
		endif
		; Earrings.003
		if $swapvarAccessories == 0 && $swapvarFeetToes == 1 && $swapvarColor != 3 && $swapvarShoes != 1
		    drawindexed = 1080, 165357, 0
		endif
		; Earrings.004
		if $swapvarAccessories == 0 && $swapvarEars == 1 && $swapvarColor != 4
		    drawindexed = 2160, 166437, 0
		endif
		; Earrings.005
		if $swapvarAccessories == 0 && $swapvarColor == 4
		    drawindexed = 3240, 168597, 0
		endif
		; Earrings.006
		if $swapvarAccessories == 0 && $swapvarShoes == 1 && $swapvarColor != 3
		    drawindexed = 1080, 171837, 0
		endif
		; Earrings.007
		if $swapvarAccessories == 0 && $swapvarColor == 3 && $swapvarShoes == 1
		    drawindexed = 1080, 172917, 0
		endif
		; HandBelt
		if $swapvarHand == 0
		    drawindexed = 360, 173997, 0
		endif
		; HornsCow
		if $swapvarColor == 4
		    drawindexed = 2784, 174357, 0
		endif
		; NeckDec (212)
		drawindexed = 420, 177141, 0
		; NipDec1
		if $swapvarNipple == 1 && $swapvarTop != 0
		    drawindexed = 1296, 177561, 0
		endif
		; NipDec2
		if $swapvarNipple == 2 && $swapvarTop != 0 && $swapvarTop != 1
		    drawindexed = 6756, 178857, 0
		endif
		; TagCow
		if $swapvarColor == 4
		    drawindexed = 27186, 185613, 0
		endif
	; Pelvis
		; Panties0
		if $swapvarPanties == 0 && $swapvarPants != 0 && $swapvarCorset != 0 && $swapvarPants != 1
		    drawindexed = 4512, 212799, 0
		endif
		; Panties1
		if $swapvarPanties == 1 && $swapvarPants != 0 && $swapvarCorset != 0 && $swapvarPants != 1
		    drawindexed = 5874, 217311, 0
		endif
		; ThighsBelt0
		if $swapvarPants != 0 && $swapvarBottomBelts == 0 && $swapvarPants != 1
		    drawindexed = 2592, 223185, 0
		endif
	; Furr
		; LegFurr0
		if $swapvarThighAccessories != 0 && $swapvarColor != 3 && $swapvarShoes == 0
		    drawindexed = 351, 225777, 0
		endif
		; LegFurr1
		if $swapvarColor != 3 && $swapvarShoes == 0
		    drawindexed = 351, 226128, 0
		endif
		; LegFurr1.001
		if $swapvarPants != 0 && $swapvarColor != 3
		    if $swapvarPanties == 0 || $swapvarPants == 1
		        drawindexed = 702, 226479, 0
		    endif
		endif
		; LegFurr1.002
		if $swapvarPants != 0 && $swapvarColor != 3
		    if $swapvarBottomBelts == 0 || $swapvarPants == 1
		        drawindexed = 702, 227181, 0
		    endif
		endif
		; LegFurr1.003
		if $swapvarTop != 0 && $swapvarColor != 3
		    drawindexed = 402, 227883, 0
		endif
		; LegFurr1.005
		if $swapvarColor != 3
		    drawindexed = 2628, 228285, 0
		endif
		; LegFurr1.006
		if $swapvarColor != 3 && $swapvarPants != 0
		    drawindexed = 2436, 230913, 0
		endif
		; LegFurr1.007
		if $swapvarTop != 0 && $swapvarColor != 3
		    drawindexed = 2628, 233349, 0
		endif
	; Paws
		; Feet
		if $swapvarColor == 3 && $swapvarShoes == 0
		    drawindexed = 6804, 235977, 0
		endif
		; FeetNaked
		if $swapvarColor == 3 && $swapvarShoes != 0
		    drawindexed = 6804, 242781, 0
		endif
		; PawFeet
		if $swapvarColor != 3 && $swapvarColor != 4 && $swapvarShoes == 0 && $swapvarFeetToes != 0 
		    drawindexed = 13836, 249585, 0
		endif
		; PawFeetCow
		if $swapvarColor != 3 && $swapvarColor == 4 && $swapvarShoes == 0 && $swapvarFeetToes != 0 
		    drawindexed = 13452, 263421, 0
		endif
		; PawFeetCowNaked
		if $swapvarColor == 4 && $swapvarShoes == 1
		    drawindexed = 13452, 276873, 0
		endif
		; PawFeetNaked
		if $swapvarColor != 3 && $swapvarColor != 4 && $swapvarShoes == 1
		    drawindexed = 13836, 290325, 0
		endif
	; Nails
		; Fangs
		if $swapvarColor != 3 && $swapvarNails == 0
		    drawindexed = 696, 304161, 0
		endif
		; Fangs Black
		if $swapvarColor != 3 && $swapvarNails == 1
		    drawindexed = 696, 304857, 0
		endif
		; Nails
		if $swapvarColor == 3 && $swapvarNails == 0
		    drawindexed = 720, 305553, 0
		endif
		; NailsBlack
		if $swapvarColor == 3 && $swapvarNails == 1
		    drawindexed = 720, 306273, 0
		endif
		; ToeNails
		if $swapvarColor == 3 && $swapvarNails == 0  && $swapvarShoes == 0
		    drawindexed = 240, 306993, 0
		endif
		; ToeNails.001
		if $swapvarColor == 3 && $swapvarNails == 0  && $swapvarShoes == 1
		    drawindexed = 240, 307233, 0
		endif
		; ToeNailsBlack
		if $swapvarColor == 3 && $swapvarNails == 1 && $swapvarShoes == 0
		    drawindexed = 240, 307473, 0
		endif
		; ToeNailsBlack.001
		if $swapvarColor == 3 && $swapvarNails == 1 && $swapvarShoes == 1
		    drawindexed = 240, 307713, 0
		endif
[TextureOverridePulchraBodyBDiffuse]
hash = 57be79d6
if $swapvarColor == 0
this = ResourcePulchraBlack
elif $swapvarColor == 1
this = ResourcePulchraYellow
elif $swapvarColor == 2
this = ResourcePulchraRed
elif $swapvarColor == 3
this = ResourcePulchraSkin
elif $swapvarColor == 4
this = ResourcePulchraCow
elif $swapvarColor == 5
this = ResourcePulchraWhite
else 
this = ResourcePulchraBlack
endif

[TextureOverridePulchra.BodyB.Diffuse.1024]
hash = fb0a816a
if $swapvarColor == 0
this = ResourcePulchraBlack
elif $swapvarColor == 1
this = ResourcePulchraYellow
elif $swapvarColor == 2
this = ResourcePulchraRed
elif $swapvarColor == 3
this = ResourcePulchraSkin
elif $swapvarColor == 4
this = ResourcePulchraCow
elif $swapvarColor == 5
this = ResourcePulchraWhite
else 
this = ResourcePulchraBlack
endif
[TextureOverridePulchraBodyBLightMap]
hash = 12c44063
this = ResourcePulchraBodyBLightMap

[TextureOverridePulchra.BodyB.LightMap.1024]
hash = f475e822
this = ResourcePulchraBodyBLightMap
[TextureOverridePulchraBodyBMaterialMap]
hash = a553df20
this = ResourcePulchraBodyBMaterialMap

[TextureOverridePulchra.BodyB.MaterialMap.1024]
hash = 64d75415
this = ResourcePulchraBodyBMaterialMap
[TextureOverridePulchraFaceAIB]
hash = 62de5837
run = CommandListSkinTexture
[TextureOverridePulchraFaceADiffuse]
hash = 1626aafe
if $swapvarColor == 0
this = ResourcePulchraFaceBlack
elif $swapvarColor == 1
this = ResourcePulchraFaceYellow
elif $swapvarColor == 2
this = ResourcePulchraFaceRed
elif $swapvarColor == 3
this = ResourcePulchraFaceSkin
elif $swapvarColor == 4
this = ResourcePulchraFaceCow
elif $swapvarColor == 5
this = ResourcePulchraFaceWhite
else 
this = ResourcePulchraFaceBlack
endif

[TextureOverridePulchra.FaceA.Diffuse.1024]
hash = 32f923f1
if $swapvarColor == 0
this = ResourcePulchraFaceBlack
elif $swapvarColor == 1
this = ResourcePulchraFaceYellow
elif $swapvarColor == 2
this = ResourcePulchraFaceRed
elif $swapvarColor == 3
this = ResourcePulchraFaceSkin
elif $swapvarColor == 4
this = ResourcePulchraFaceCow
elif $swapvarColor == 5
this = ResourcePulchraFaceWhite
else 
this = ResourcePulchraFaceBlack
endif
; CommandList -----------------------
[CommandListCreditInfo]
if $creditinfo == 0 && $active == 1 && $disablecredits == 0
    if $lasttime == 0
    $lasttime = time
    endif
    $credits = time - $lasttime
    $credits = $credits * 20.0
    run = CommandListCreditPlateSDX
    if $credits >= 40
        $credits = 0
        $creditinfo = 1
    endif
endif
;Credit -------------------------
[Constants]
global $cmx = 0.02
global $cmy = 0.83
global $credits = 0
global persist $disablecredits = 0
global $lasttime = 0
[KeySwapDisableCredits]
condition = $active == 1
key = alt ctrl /
type = cycle
$disablecredits = 0,1
[CommandListDimensionsCredit]
if window_width != 0
  $ww = window_width
  $wh = window_height
else
  if $ww != 0
    $ww = rt_width
    $wh = rt_height
  else
    $ww = res_width
    $wh = res_height
  endif
endif
if cursor_x != 0 && cursor_y != 0
  $cpx = cursor_x
  $cpy = cursor_y
else
  if cursor_window_x != 0 && cursor_window_y != 0
    $cpx = cursor_window_x / $ww
    $cpy = cursor_window_y / $wh
  else
    $cpx = cursor_screen_x / $ww
    $cpy = cursor_screen_y / $wh
  endif
endif
[CommandListCreditPlateSDX]
run = CommandListDimensionsCredit
run = CommandListCreditPlate
[CommandListCreditPlate]
local $cox
local $coy
x88 = $credits
ps-t100 = ResourceCredit
y87 = 128 / $wh
x87 = 512 / $ww
z87 = $cmx
w87 = $cmy
run = CustomShaderCredit
[CustomShaderCredit]
vs = .\UIResources\Credit\CreditRender.hlsl
ps = .\UIResources\Credit\CreditRender.hlsl
run = BuiltInCommandListUnbindAllRenderTargets
blend = ADD SRC_ALPHA INV_SRC_ALPHA
cull = none
topology = triangle_strip
o0 = set_viewport bb
Draw = 4,0
[ResourceCredit]
filename = .\UIResources\Credit\Credit.png
; Resources -------------------------
[ResourcePulchraMaskPosition]
type = Buffer
stride = 40
filename = .\Meshes\PulchraMaskPosition.buf
[ResourcePulchraMaskBlend]
type = Buffer
stride = 8
filename = .\Meshes\PulchraMaskBlend.buf
[ResourcePulchraMaskTexcoord]
type = Buffer
stride = 24
filename = .\Meshes\PulchraMaskTexcoord.buf
[ResourcePulchraBodyPosition]
type = Buffer
stride = 40
filename = .\Meshes\PulchraBodyPosition.buf
[ResourcePulchraBodyBlend]
type = Buffer
stride = 32
filename = .\Meshes\PulchraBodyBlend.buf
[ResourcePulchraBodyTexcoord]
type = Buffer
stride = 32
filename = .\Meshes\PulchraBodyTexcoord.buf
[ResourcePulchraMaskAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\Meshes\PulchraMaskA.ib
[ResourcePulchraBodyAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\Meshes\PulchraBodyA.ib
[ResourcePulchraBodyBIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = .\Meshes\PulchraBodyB.ib
[ResourcePulchraMaskADiffuse]
filename = .\Textures\PulchraMaskADiffuse.dds
[ResourcePulchraMaskANormalMap]
filename = .\Textures\PulchraMaskANormalMap.dds
[ResourcePulchraMaskALightMap]
filename = .\Textures\PulchraMaskALightMap.dds
[ResourcePulchraMaskAMaterialMap]
filename = .\Textures\PulchraMaskAMaterialMap.dds
[ResourcePulchraBlack]
filename = .\Textures\Black.dds
[ResourcePulchraYellow]
filename = .\Textures\Yellow.dds
[ResourcePulchraRed]
filename = .\Textures\Red.dds
[ResourcePulchraSkin]
filename = .\Textures\Skin.dds
[ResourcePulchraCow]
filename = .\Textures\Cow.dds
[ResourcePulchraWhite]
filename = .\Textures\White.dds
[ResourcePulchraBodyALightMap]
filename = .\Textures\PulchraBodyALightMap.dds
[ResourcePulchraBodyANormalMap]
filename = .\Textures\PulchraBodyANormalMap.dds
[ResourcePulchraBodyAMaterialMap]
filename = .\Textures\PulchraBodyAMaterialMap.dds
[ResourcePulchraBodyBLightMap]
filename = .\Textures\PulchraBodyALightMap.dds
[ResourcePulchraBodyBMaterialMap]
filename = .\Textures\PulchraBodyAMaterialMap.dds
[ResourcePulchraFaceBlack]
filename = .\Textures\FaceBlack.dds
[ResourcePulchraFaceYellow]
filename = .\Textures\FaceYellow.dds
[ResourcePulchraFaceRed]
filename = .\Textures\FaceRed.dds
[ResourcePulchraFaceSkin]
filename = .\Textures\FaceSkin.dds
[ResourcePulchraFaceCow]
filename = .\Textures\FaceCow.dds
[ResourcePulchraFaceWhite]
filename = .\Textures\FaceWhite.dds
[ResourceCreditInfo]
type = Buffer
data = "Created by FleurNaive"

;UI ------------------
[Constants]
global persist $menu = 0
global $hold
global $holdShape
global $drag
global $hovering
global $slot
global $hoveredSlot
global $clickedSlot
global $selectedSlot = 0
global persist $mx = 0.05
global persist $my = 0.25
global $ww
global $wh
global $cpx
global $cpy
global $dt
global $ts

global $UIfps = 11
global $UIframeStart= 0
global $UIframeEnd = 10
global persist $swapvarUIAnim = 0

[KeyShowMenuAlt]
condition = $active == 1
key = no_alt no_ctrl /
type = cycle
$menu = 0,1

[KeyMenu.ResetPosition]
condition = $menu == 1
key = \
run = CommandListResetMenuPos

[KeyHold]
condition = $menu == 1 && $hovering == 0
key = no_ctrl no_shift VK_LBUTTON
key = no_ctrl no_shift VK_RBUTTON
type = hold
$hold = 1

[KeyHoldShape]
condition = $menu == 1 && $hovering > 1
key = no_ctrl no_shift VK_LBUTTON
key = no_ctrl no_shift VK_RBUTTON
type = hold
run = CommandListHoldShape

[CommandListHoldShape]
$holdShape = $hovering
post $holdShape = 0

[KeyClickedSlot]
condition = $hovering == 1 && $menu == 1
key = no_ctrl no_shift VK_LBUTTON
key = no_ctrl no_shift VK_RBUTTON
run = CommandListClickedSlot

[CommandListUIAnimation]
$swapvarUIAnim = (time * $UIfps % ($UIframeEnd - $UIframeStart + 1) + $UIframeStart) // 1
if $active
  $dt = time - $ts
  $ts = time
  if $menu
    run = CommandListOutfitMenu
  endif
endif

[Present]
post $active = 0
run = CommandListUIAnimation
[CommandListDimensions]
if window_width != 0
  $ww = window_width
  $wh = window_height
else
  if $ww != 0
    $ww = rt_width
    $wh = rt_height
  else
    $ww = res_width
    $wh = res_height
  endif
endif

if cursor_x != 0 && cursor_y != 0
  $cpx = cursor_x
  $cpy = cursor_y
else
  if cursor_window_x != 0 && cursor_window_y != 0
    $cpx = cursor_window_x / $ww
    $cpy = cursor_window_y / $wh
  else
    $cpx = cursor_screen_x / $ww
    $cpy = cursor_screen_y / $wh
  endif
endif

[CommandListOutfitMenu]
run = CommandListDimensions
run = CommandListBackground

[CommandListBackground]
local $cox
local $coy

x88 = $swapvarUIAnim
ps-t100 = ResourceMenu

y87 = 768 / $wh
x87 = 256 / $ww
if $hovering == 0
    if $drag == 0
        if $cpx > $mx + 0.0125 && $cpx < ($mx+x87-0.0035) && $cpy > $my && $cpy < ($my+y87-0.0035)
            if $hold
                $cox = $cpx - $mx
                $coy = $cpy - $my
                $drag = 1
            endif
        endif
    else
        if $hold
            $mx = $cpx - $cox
            $my = $cpy - $coy
        else
            $drag = 0
        endif
    endif
endif
z87 = $mx
w87 = $my
run = CustomShaderElementMenu
run = CommandListDrawToggles

[CommandListSlot]
$slot = $slot + 1
run = CommandListSlotItemImage

if $cpx > z87 && $cpx < (z87 + x87 - 0.0035) && $cpy > w87 && $cpy < (w87 + y87 - 0.0035)
    ps-t100 = ResourceItemSlotHover.SlotHover
    $hovering = 1
    $hoveredSlot = $slot
    $selectedSlot = 0
else
    if $slot == $selectedSlot
        $hoveredSlot = $slot
        ps-t100 = ResourceItemSlotHover.SlotHover
    else
        ps-t100 = ResourceItemSlot
    endif
endif

run = CustomShaderElement

if $clickedSlot == $slot
    ps-t100 = ResourceItemSlotHover.SlotClicked
    run = CustomShaderElement
    $clickedSlot = 0
endif

[CommandListResetMenuPos]
$mx = 50 / $ww
$my = 0.5 - 360 / $wh

[CustomShaderElementMenu]
vs = .\UIResources\AnimatedMenu\MenuRender.hlsl
ps = .\UIResources\AnimatedMenu\MenuRender.hlsl
run = BuiltInCommandListUnbindAllRenderTargets
blend = ADD SRC_ALPHA INV_SRC_ALPHA
cull = none
topology = triangle_strip
o0 = set_viewport bb
Draw = 4,0

[CustomShaderElement]
vs = .\UIResources\RenderUI.hlsl
ps = .\UIResources\RenderUI.hlsl
run = BuiltInCommandListUnbindAllRenderTargets
blend = ADD SRC_ALPHA INV_SRC_ALPHA
cull = none
topology = triangle_strip
o0 = set_viewport bb
Draw = 4,0

[ResourceMenu]
filename = .\UIResources\AnimatedMenu\Menu.png

[ResourceItemSlot]
filename = .\UIResources\Slot.png

[ResourceItemSlotHover.SlotHover]
filename = .\UIResources\Slot_Hover.png

[ResourceItemSlotHover.SlotClicked]
filename = .\UIResources\Slot_Hover_2.png

[CommandListClickedSlot]
$clickedSlot = $hoveredSlot

if $clickedSlot == 1
  $swapvarTop = $swapvarTop + 1
  if $swapvarTop > 3
    $swapvarTop = 0
  endif
elif $clickedSlot == 2
  $swapvarCorset = $swapvarCorset + 1
  if $swapvarCorset > 1
    $swapvarCorset = 0
  endif
elif $clickedSlot == 3
  $swapvarNipple = $swapvarNipple + 1
  if $swapvarNipple > 2
    $swapvarNipple = 0
  endif
elif $clickedSlot == 4
  $swapvarTopBelts = $swapvarTopBelts + 1
  if $swapvarTopBelts > 2
    $swapvarTopBelts = 0
  endif
elif $clickedSlot == 5
  $swapvarPanties = $swapvarPanties + 1
  if $swapvarPanties > 2
    $swapvarPanties = 0
  endif
elif $clickedSlot == 6
  $swapvarPants = $swapvarPants + 1
  if $swapvarPants > 2
    $swapvarPants = 0
  endif
elif $clickedSlot == 7
  $swapvarBottomBelts = $swapvarBottomBelts + 1
  if $swapvarBottomBelts > 1
    $swapvarBottomBelts = 0
  endif
elif $clickedSlot == 8
  $swapvarFeetToes = $swapvarFeetToes + 1
  if $swapvarFeetToes > 1
    $swapvarFeetToes = 0
  endif
elif $clickedSlot == 9
  $swapvarThighAccessories = $swapvarThighAccessories + 1
  if $swapvarThighAccessories > 2
    $swapvarThighAccessories = 0
  endif
elif $clickedSlot == 10
  $swapvarHair = $swapvarHair + 1
  if $swapvarHair > 1
    $swapvarHair = 0
  endif
elif $clickedSlot == 11
  $swapvarMask = $swapvarMask + 1
  if $swapvarMask > 2
    $swapvarMask = 0
  endif
elif $clickedSlot == 12
  $swapvarTail = $swapvarTail + 1
  if $swapvarTail > 2
    $swapvarTail = 0
  endif
elif $clickedSlot == 13
  $swapvarEars = $swapvarEars + 1
  if $swapvarEars > 2
    $swapvarEars = 0
  endif
elif $clickedSlot == 14
  $swapvarHand = $swapvarHand + 1
  if $swapvarHand > 1
    $swapvarHand = 0
  endif
elif $clickedSlot == 15
  $swapvarNails = $swapvarNails + 1
  if $swapvarNails > 1
    $swapvarNails = 0
  endif
elif $clickedSlot == 16
  $swapvarColor = $swapvarColor + 1
  if $swapvarColor > 5
    $swapvarColor = 0
  endif
elif $clickedSlot == 17
  $swapvarAccessories = $swapvarAccessories + 1
  if $swapvarAccessories > 1
    $swapvarAccessories = 0
  endif
elif $clickedSlot == 18
  $swapvarShoes = $swapvarShoes + 1
  if $swapvarShoes > 1
    $swapvarShoes = 0
  endif
elif $clickedSlot == 19
  $swapvarHairColor = $swapvarHairColor + 1
  if $swapvarHairColor > 5
    $swapvarHairColor = 0
  endif
endif

[CommandListDrawToggles]
local $z0 = z87 + 25 / $ww
local $z1 = $z0 + 70 / $ww

local $wo = 75 / $wh

$hovering = 0
$slot = 0
x87 = 64 / $ww
y87 = 64 / $wh

local $zbase = $z1
local $wbase = w87

local $xof = 130

;Top
z87 = $zbase + 0.0*75 / $wh
w87 = $wbase + $xof/ $wh + 0.0*75 / $wh
run = CommandListSlot
;Corset
z87 = $zbase + 0.0*75 / $wh
w87 = $wbase + $xof/ $wh + 1.0*75 / $wh
run = CommandListSlot
;Nipple
z87 = $zbase + 0.0*75 / $wh
w87 = $wbase + $xof/ $wh + 2.0*75 / $wh
run = CommandListSlot
;TopBelts
z87 = $zbase + 0.0*75 / $wh
w87 = $wbase + $xof/ $wh + 3.0*75 / $wh
run = CommandListSlot
;Panties
z87 = $zbase + 0.55*75 / $wh
w87 = $wbase + $xof/ $wh + 0.0*75 / $wh
run = CommandListSlot
;Pants
z87 = $zbase + 0.55*75 / $wh
w87 = $wbase + $xof/ $wh + 1.0*75 / $wh
run = CommandListSlot
;BottomBelts
z87 = $zbase + 0.55*75 / $wh
w87 = $wbase + $xof/ $wh + 2.0*75 / $wh
run = CommandListSlot
;FeetToes
z87 = $zbase + 0.55*75 / $wh
w87 = $wbase + $xof/ $wh + 3.0*75 / $wh
run = CommandListSlot
;ThighAccessories
z87 = $zbase + 0.55*75 / $wh
w87 = $wbase + $xof/ $wh + 4.0*75 / $wh
run = CommandListSlot
;Hair
z87 = $zbase + -0.55*75 / $wh
w87 = $wbase + $xof/ $wh + 0.0*75 / $wh
run = CommandListSlot
;Mask
z87 = $zbase + -0.55*75 / $wh
w87 = $wbase + $xof/ $wh + 1.0*75 / $wh
run = CommandListSlot
;Tail
z87 = $zbase + -0.55*75 / $wh
w87 = $wbase + $xof/ $wh + 2.0*75 / $wh
run = CommandListSlot
;Ears
z87 = $zbase + -0.55*75 / $wh
w87 = $wbase + $xof/ $wh + 3.0*75 / $wh
run = CommandListSlot
;Hand
z87 = $zbase + -0.55*75 / $wh
w87 = $wbase + $xof/ $wh + 4.0*75 / $wh
run = CommandListSlot
;Nails
z87 = $zbase + -0.55*75 / $wh
w87 = $wbase + $xof/ $wh + 5.0*75 / $wh
run = CommandListSlot
;Color
z87 = $zbase + 0.0*75 / $wh
w87 = $wbase + $xof/ $wh + 7.0*75 / $wh
run = CommandListSlot
;Accessories
z87 = $zbase + 0.0*75 / $wh
w87 = $wbase + $xof/ $wh + 5.0*75 / $wh
run = CommandListSlot
;Shoes
z87 = $zbase + 0.55*75 / $wh
w87 = $wbase + $xof/ $wh + 5.0*75 / $wh
run = CommandListSlot
;HairColor
z87 = $zbase + 0.0*75 / $wh
w87 = $wbase + $xof/ $wh + 6.0*75 / $wh
run = CommandListSlot
[CommandListSlotItemImage]
x87 = 52 / $ww 
y87 = 52 / $wh
z87 = z87 + 6 / $ww
w87 = w87 + 12 / $ww


if $slot == 1
  ps-t100 = ResourceMenuItem.Top
elif $slot == 2
  ps-t100 = ResourceMenuItem.Corset
elif $slot == 3
  ps-t100 = ResourceMenuItem.Nipple
elif $slot == 4
  ps-t100 = ResourceMenuItem.TopBelts
elif $slot == 5
  ps-t100 = ResourceMenuItem.Panties
elif $slot == 6
  ps-t100 = ResourceMenuItem.Pants
elif $slot == 7
  ps-t100 = ResourceMenuItem.BottomBelts
elif $slot == 8
  ps-t100 = ResourceMenuItem.FeetToes
elif $slot == 9
  ps-t100 = ResourceMenuItem.ThighAccessories
elif $slot == 10
  ps-t100 = ResourceMenuItem.Hair
elif $slot == 11
  ps-t100 = ResourceMenuItem.Mask
elif $slot == 12
  ps-t100 = ResourceMenuItem.Tail
elif $slot == 13
  ps-t100 = ResourceMenuItem.Ears
elif $slot == 14
  ps-t100 = ResourceMenuItem.Hand
elif $slot == 15
  ps-t100 = ResourceMenuItem.Nails
elif $slot == 16
  ps-t100 = ResourceMenuItem.Color
elif $slot == 17
  ps-t100 = ResourceMenuItem.Accessories
elif $slot == 18
  ps-t100 = ResourceMenuItem.Shoes
elif $slot == 19
  ps-t100 = ResourceMenuItem.HairColor
endif
run = CustomShaderElement

x87 = 64 / $ww 
y87 = 64 / $wh
z87 = z87 - 6 / $ww
w87 = w87 - 12 / $ww


[ResourceMenuItem.Top]
  filename = .\UIResources\Top.png
[ResourceMenuItem.Corset]
  filename = .\UIResources\Corset.png
[ResourceMenuItem.Nipple]
  filename = .\UIResources\Nipple.png
[ResourceMenuItem.TopBelts]
  filename = .\UIResources\TopBelts.png
[ResourceMenuItem.Panties]
  filename = .\UIResources\Panties.png
[ResourceMenuItem.Pants]
  filename = .\UIResources\Pants.png
[ResourceMenuItem.BottomBelts]
  filename = .\UIResources\BottomBelts.png
[ResourceMenuItem.FeetToes]
  filename = .\UIResources\FeetToes.png
[ResourceMenuItem.ThighAccessories]
  filename = .\UIResources\ThighAccessories.png
[ResourceMenuItem.Hair]
  filename = .\UIResources\Hair.png
[ResourceMenuItem.Mask]
  filename = .\UIResources\Mask.png
[ResourceMenuItem.Tail]
  filename = .\UIResources\Tail.png
[ResourceMenuItem.Ears]
  filename = .\UIResources\Ears.png
[ResourceMenuItem.Hand]
  filename = .\UIResources\Hand.png
[ResourceMenuItem.Nails]
  filename = .\UIResources\Nails.png
[ResourceMenuItem.Color]
  filename = .\UIResources\Color.png
[ResourceMenuItem.Accessories]
  filename = .\UIResources\Accessories.png
[ResourceMenuItem.Shoes]
  filename = .\UIResources\Shoes.png
[ResourceMenuItem.HairColor]
  filename = .\UIResources\HairColor.png
[TextureOverrideHand]
hash = 55119041
handling = skip

[TextureOverrideCapsule]
hash = 425a7565
handling = skip