; Cipher

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

[Constants]
global persist $costume = 0
global $active

[KeySwapCostume]
key = ]
condition = $active == 1
type = cycle
$costume = 0,1

[Present]
post $active = 0

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

[TextureOverrideCipherBodyBlend]
hash = c011f88a
$active = 1
handling = skip
vb2 = ResourceCipherBodyBlend
if DRAW_TYPE == 1
	vb0 = ResourceCipherBodyPosition
	draw = 46541,0
endif
ResourceCipherDrawCS = copy ResourceCipherDrawCS
if DRAW_TYPE == 8    
	Resource\SRMI\PositionBuffer = ref ResourceCipherBodyPositionCS
	Resource\SRMI\BlendBuffer = ref ResourceCipherBodyBlendCS
	Resource\SRMI\DrawBuffer = ref ResourceCipherDrawCS
	$\SRMI\vertcount = 46541
elif DRAW_TYPE != 1
	$_blend_ = 2
endif

[TextureOverrideCipherBodyTexcoord]
hash = c7bc18f1
vb1 = ResourceCipherBodyTexcoord

[TextureOverrideCipherBodyVertexLimitRaise]
hash = 1df7f900
override_vertex_count = 46541
override_byte_stride = 92
if DRAW_TYPE != 8 && DRAW_TYPE != 1 && $_blend_ > 0
	$_blend_ = $_blend_ - 1
	this = ref ResourceCipherDrawCS
endif

[TextureOverrideCipherBodyIB]
hash = 81e7d584
handling = skip

[TextureOverrideCipherBodyA]
hash = 81e7d584
match_first_index = 0
ib = ResourceCipherBodyAIB
; CipherBodyA
if $costume == 0
	; part0 (18668)
	drawindexed = 90732, 0, 0
else if $costume == 1
	; part1 (15227)
	drawindexed = 95100, 90732, 0
endif

[TextureOverrideCipherBodyADiffuse]
hash = 723fc996
if $costume == 0
this = ResourceCipherBodyADiffuse
else if $costume == 1
this = ResourceCipherBodyADiffuse.1
endif

[TextureOverrideCipherBodyALightMap]
hash = 6c50501d
if $costume == 0
this = ResourceCipherBodyALightMap
else if $costume == 1
this = ResourceCipherBodyALightMap.1
endif

[TextureOverrideCipherBodyB]
hash = 81e7d584
match_first_index = 72141
ib = ResourceCipherBodyBIB
; CipherBodyB
	; part0_0 (1350)
if $costume == 0
	drawindexed = 5472, 0, 0
	; part1_0 (394)
else if $costume == 1
	drawindexed = 1332, 5472, 0
endif

; CommandList -----------------------

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

[ResourceCipherBodyPosition]
type = Buffer
stride = 40
filename = CipherBodyPosition.buf

[ResourceCipherBodyBlend]
type = Buffer
stride = 32
filename = CipherBodyBlend.buf

[ResourceCipherBodyTexcoord]
type = Buffer
stride = 20
filename = CipherBodyTexcoord.buf

[ResourceCipherBodyAIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = CipherBodyA.ib

[ResourceCipherBodyBIB]
type = Buffer
format = DXGI_FORMAT_R32_UINT
filename = CipherBodyB.ib

[ResourceCipherBodyADiffuse]
filename = CipherBodyADiffuse.dds

[ResourceCipherBodyALightMap]
filename = CipherBodyALightMap.dds

[ResourceCipherBodyADiffuse.1]
filename = CipherBodyADiffuse1.dds

[ResourceCipherBodyALightMap.1]
filename = CipherBodyALightMap1.dds






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

[Constants]
global $_blend_ = 0

; -------------------- Auto-generated CS resources --------------------

[ResourceCipherDrawCS]
type = RWStructuredBuffer
array = 46541
data = R32_FLOAT 1 2 3 4 5 6 7 8 9 10

[ResourceCipherBodyPositionCS]
type = StructuredBuffer
stride = 40
filename = CipherBodyPosition.buf

[ResourceCipherBodyBlendCS]
type = StructuredBuffer
stride = 32
filename = CipherBodyBlend.buf