; WWMI BETA-2 INI

; Mod State -------------------------

[Constants]
global $required_wwmi_version = 0.91
global $object_guid = 95769
global $mesh_vertex_count = 28600
global $shapekey_vertex_count = 0
global $mod_id = -1000
global $mod_enabled = 0
global $object_detected = 0

[Present]
if $object_detected
    if $mod_enabled
        post $object_detected = 0
    else
        if $mod_id == -1000
            run = CommandListRegisterMod
        endif
    endif
endif

[CommandListRegisterMod]
$\WWMIv1\required_wwmi_version = $required_wwmi_version
$\WWMIv1\object_guid = $object_guid
Resource\WWMIv1\ModName = ref ResourceModName
Resource\WWMIv1\ModAuthor = ref ResourceModAuthor
Resource\WWMIv1\ModDesc = ref ResourceModDesc
Resource\WWMIv1\ModLink = ref ResourceModLink
Resource\WWMIv1\ModLogo = ref ResourceModLogo
run = CommandList\WWMIv1\RegisterMod
$mod_id = $\WWMIv1\mod_id
if $mod_id >= 0
    $mod_enabled = 1
endif

; Resources: Mod Info -------------------------

[ResourceModName]
type = Buffer
data = "slap_Mod"

[ResourceModAuthor]
type = Buffer
data = "slap"

[ResourceModDesc]
; type = Buffer
; data = "Empty Mod Description"

[ResourceModLink]
type = Buffer
data = "https://slapmod.fanbox.cc"

[ResourceModLogo]
; filename = Textures/Logo.dds

; Shading: Draw Call Stacks Processing -------------------------

[CommandListTriggerResourceOverrides]
CheckTextureOverride = ps-t0
CheckTextureOverride = ps-t1
CheckTextureOverride = ps-t2
CheckTextureOverride = ps-t3
CheckTextureOverride = ps-t4
CheckTextureOverride = ps-t5
CheckTextureOverride = ps-t6
CheckTextureOverride = ps-t7

[CommandListOverrideSharedResources]
ResourceBypassVB0 = ref vb0
ib = ResourceIndexBuffer
vb0 = ResourcePositionBuffer
vb1 = ResourceVectorBuffer
vb2 = ResourceTexcoordBuffer
vb3 = ResourceColorBuffer
vb4 = ResourceBlendBuffer

[CommandListCleanupSharedResources]
vb0 = ref ResourceBypassVB0

[TextureOverrideComponent0]
hash = 92791b2f
match_first_index = 0
match_index_count = 23295
$object_detected = 1
if $mod_enabled
    handling = skip
    run = CommandListTriggerResourceOverrides
    run = CommandListOverrideSharedResources
	; Draw Component 0
	drawindexed = 41184, 0, 0
	; Draw Component 0.001
	drawindexed = 6042, 41184, 0
    run = CommandListCleanupSharedResources
endif

[TextureOverrideComponent1]
hash = 92791b2f
match_first_index = 23295
match_index_count = 17832
$object_detected = 1
if $mod_enabled
    handling = skip
    run = CommandListTriggerResourceOverrides
    run = CommandListOverrideSharedResources
	; Draw Component 1.腿部
	drawindexed = 43872, 47226, 0
    run = CommandListCleanupSharedResources
endif

[TextureOverrideComponent2]
hash = 92791b2f
match_first_index = 41127
match_index_count = 17352
$object_detected = 1
if $mod_enabled
    handling = skip
    run = CommandListTriggerResourceOverrides
    run = CommandListOverrideSharedResources
	; Draw Component 2
	drawindexed = 17352, 91098, 0
    run = CommandListCleanupSharedResources
endif

[TextureOverrideComponent3]
hash = 92791b2f
match_first_index = 58479
match_index_count = 11907
$object_detected = 1
if $mod_enabled
    handling = skip
    run = CommandListTriggerResourceOverrides
    run = CommandListOverrideSharedResources
	; Draw Component 3
	drawindexed = 6915, 108450, 0
	; Draw Component 3.shou
	drawindexed = 4992, 115365, 0
    run = CommandListCleanupSharedResources
endif

[TextureOverrideComponent4]
hash = 92791b2f
match_first_index = 70386
match_index_count = 3879
$object_detected = 1
if $mod_enabled
    handling = skip
    ; run = CommandListTriggerResourceOverrides
    ; run = CommandListOverrideSharedResources
    ; Draw skipped: No matching custom components found
    ; run = CommandListCleanupSharedResources
endif

[TextureOverrideComponent5]
hash = 92791b2f
match_first_index = 74265
match_index_count = 2004
$object_detected = 1
if $mod_enabled
    handling = skip
    ; run = CommandListTriggerResourceOverrides
    ; run = CommandListOverrideSharedResources
    ; Draw skipped: No matching custom components found
    ; run = CommandListCleanupSharedResources
endif

[TextureOverrideComponent6]
hash = 92791b2f
match_first_index = 76269
match_index_count = 11424
$object_detected = 1
if $mod_enabled
    handling = skip
    run = CommandListTriggerResourceOverrides
    run = CommandListOverrideSharedResources
	; Draw Component 6
	drawindexed = 6036, 120357, 0
    run = CommandListCleanupSharedResources
endif

[TextureOverrideComponent7]
hash = 92791b2f
match_first_index = 87693
match_index_count = 8076
$object_detected = 1
if $mod_enabled
    handling = skip
    run = CommandListTriggerResourceOverrides
    run = CommandListOverrideSharedResources
	; Draw Component 7
	drawindexed = 8076, 126393, 0
    run = CommandListCleanupSharedResources
endif

; Shading: Textures -------------------------



; Resources: Buffers -------------------------

[ResourceBypassVB0]

[ResourceIndexBuffer]
type = Buffer
format = DXGI_FORMAT_R32_UINT
stride = 12
filename = Meshes/Index.buf

[ResourcePositionBuffer]
type = Buffer
format = DXGI_FORMAT_R32G32B32_FLOAT
stride = 12
filename = Meshes/Position.buf

[ResourceBlendBuffer]
type = Buffer
format = DXGI_FORMAT_R8_UINT
stride = 8
filename = Meshes/Blend.buf

[ResourceVectorBuffer]
type = Buffer
format = DXGI_FORMAT_R8G8B8A8_SNORM
stride = 8
filename = Meshes/Vector.buf

[ResourceColorBuffer]
type = Buffer
format = DXGI_FORMAT_R8G8B8A8_UNORM
stride = 4
filename = Meshes/Color.buf

[ResourceTexCoordBuffer]
type = Buffer
format = DXGI_FORMAT_R16G16_FLOAT
stride = 16
filename = Meshes/TexCoord.buf

; Autogenerated -------------------------

; XXMI Launcher GameBanana: https://gamebanana.com/tools/17252
; XXMI Launcher GitHub: https://github.com/SpectrumQT/XXMI-Launcher
; WWMI Package GitHub: https://github.com/SpectrumQT/WWMI-Package
; WWMI Tools GameBanana: https://gamebanana.com/tools/17289
; WWMI Tools GitHub: https://github.com/SpectrumQT/WWMI_Tools
; AGMG Modding Community Discord: https://discord.com/invite/agmg
; SHA256 CHECKSUM: dfef13b98d56bb859c6ca95f95c57a0f3ffffb1e6cb713ce696d41265bdbeada
