[Constants]
global persist $SWL = 0
global persist $SWR = 0
global persist $SWU = 0
global persist $SWD = 0
global persist $SWM = 0
global persist $SWH = 0
global persist $SWT = 0
global persist $RST = 0
global persist $SWTR = 0
global $girl = 0



[KeySWL]
Key = ctrl no_shift no_alt VK_LEFT
Back= no_ctrl shift no_alt VK_LEFT
$SWL = 0, 1,2,3,4
type = cycle

[KeySWR]
Key = ctrl no_shift no_alt VK_RIGHT
Back= no_ctrl shift no_alt VK_RIGHT
$SWR = 0, 1,2,3,4
type = cycle

[KeySWU]
Key = ctrl no_shift no_alt VK_UP
Back= no_ctrl shift no_alt VK_UP
$SWU = 0, 1,2,3,4
type = cycle

[KeySWD]
Key = ctrl no_shift no_alt VK_DOWN
Back= no_ctrl shift no_alt VK_DOWN

$SWD = 0, 1,2,3,4
type = cycle

[KeySWM]
Key = ctrl no_shift no_alt /
Back= no_ctrl shift no_alt /

$SWM = 0, 1,2,3,4
type = cycle

[KeySWH]
Key = ctrl no_shift no_alt h
Back= no_ctrl shift no_alt h

$SWH = 0, 1,2,3,4
type = cycle

[KeySWT]
Key = ctrl no_shift no_alt t
Back= no_ctrl shift no_alt t

$SWT = 0, 1,2,3,4
type = cycle


[KeySWTR]
Key =  no_ctrl shift no_alt s
$SWTR = 0, 1,2
type = cycle

[KeyRST]
Key = ctrl shift no_alt z
$RST = 0, 1,2
type = cycle

; ------------------------------------------------------------


;*****************************************


[TextureOverrideDelglass]

if $RST ==2
$SWL = 0
$SWR = 0
$SWU = 0
$SWD = 0
$SWM = 0
$RST = 0
$SWH = 0
$SWT = 0

elif $RST ==1

vb0 = ResourceSPL02VB
ib = ResourceSPL02IB
run = CommandListChangeColor
drawindexed = auto

vb0 = ResourceSPL03VB
ib = ResourceSPL03IB
run = CommandListChangeColor
drawindexed = auto

vb0 = ResourceSPR02VB
ib = ResourceSPR02IB
run = CommandListChangeColor
drawindexed = auto

vb0 = ResourceSPR03VB
ib = ResourceSPR03IB
run = CommandListChangeColor
drawindexed = auto

vb0 = ResourceSPU02VB
ib = ResourceSPU02IB
run = CommandListChangeColor
drawindexed = auto

vb0 = ResourceSPU03VB
ib = ResourceSPU03IB
run = CommandListChangeColor
drawindexed = auto

vb0 = ResourceSPD00VB
ib = ResourceSPD00IB
run = CommandListChangeColor
drawindexed = auto

vb0 = ResourceSPD01VB
ib = ResourceSPD01IB
run = CommandListChangeColor
drawindexed = auto

vb0 = ResourceSPD02VB
ib = ResourceSPD02IB
run = CommandListChangeColor
drawindexed = auto

vb0 = ResourceSPH00VB
ib = ResourceSPH00IB
run = CommandListChangeColor
drawindexed = auto

vb0 = ResourceSPH01VB
ib = ResourceSPH01IB
run = CommandListChangeColor
drawindexed = auto

vb0 = ResourceSPH02VB
ib = ResourceSPH02IB
run = CommandListChangeColor
drawindexed = auto

endif

;if ($SWL >= 1  || $SWR >= 1 || $SWU >= 1  || $SWD >= 1|| $SWM >= 1)
hash = 7e18dc47
match_priority = -1
handling = skip

if $SWL ==1

vb0 = ResourceSPL00VB
ib = ResourceSPL00IB
run = CommandListChangeColor
drawindexed = auto

elif $SWL ==2

vb0 = ResourceSPL01VB
ib = ResourceSPL01IB
run = CommandListChangeColor
drawindexed = auto

elif $SWL ==3

vb0 = ResourceSPL02VB
ib = ResourceSPL02IB
run = CommandListChangeColor
drawindexed = auto

elif $SWL ==4

vb0 = ResourceSPL03VB
ib = ResourceSPL03IB
run = CommandListChangeColor
drawindexed = auto


endif

if $SWR ==1

vb0 = ResourceSPR00VB
ib = ResourceSPR00IB
run = CommandListChangeColor
drawindexed = auto

elif $SWR ==2

vb0 = ResourceSPR01VB
ib = ResourceSPR01IB
run = CommandListChangeColor
drawindexed = auto

elif $SWR ==3

vb0 = ResourceSPR02VB
ib = ResourceSPR02IB
run = CommandListChangeColor
drawindexed = auto

elif $SWR ==4

vb0 = ResourceSPR03VB
ib = ResourceSPR03IB
run = CommandListChangeColor
drawindexed = auto

endif

if $SWU ==1

vb0 = ResourceSPU00VB
ib = ResourceSPU00IB
run = CommandListChangeColor
drawindexed = auto

elif $SWU ==2

vb0 = ResourceSPU01VB
ib = ResourceSPU01IB
run = CommandListChangeColor
drawindexed = auto

elif $SWU ==3

vb0 = ResourceSPU02VB
ib = ResourceSPU02IB
run = CommandListChangeColor
drawindexed = auto

elif $SWU ==4

vb0 = ResourceSPU03VB
ib = ResourceSPU03IB
run = CommandListChangeColor
drawindexed = auto


endif


if $SWD ==1

vb0 = ResourceSPD00VB
ib = ResourceSPD00IB
run = CommandListChangeColor
drawindexed = auto

elif $SWD ==2

vb0 = ResourceSPD01VB
ib = ResourceSPD01IB
run = CommandListChangeColor
drawindexed = auto

elif $SWD ==3

vb0 = ResourceSPD02VB
ib = ResourceSPD02IB
run = CommandListChangeColor
drawindexed = auto

elif $SWD ==4

vb0 = ResourceSPD03VB
ib = ResourceSPD03IB
run = CommandListChangeColor
drawindexed = auto


endif

if $SWM ==1

vb0 = ResourceSPM00VB
ib = ResourceSPM00IB
run = CommandListChangeColor
drawindexed = auto

elif $SWM ==2

vb0 = ResourceSPM01VB
ib = ResourceSPM01IB
run = CommandListChangeColor
drawindexed = auto

elif $SWM ==3

vb0 = ResourceSPM02VB
ib = ResourceSPM02IB
run = CommandListChangeColor
drawindexed = auto

elif $SWM ==4

vb0 = ResourceSPM03VB
ib = ResourceSPM03IB
run = CommandListChangeColor
drawindexed = auto

endif

;H

if $SWH ==1

vb0 = ResourceSPH00VB
ib = ResourceSPH00IB
run = CommandListChangeColor
drawindexed = auto


elif $SWH ==2

vb0 = ResourceSPH01VB
ib = ResourceSPH01IB
run = CommandListChangeColor
drawindexed = auto

elif $SWH ==3

vb0 = ResourceSPH02VB
ib = ResourceSPH02IB
run = CommandListChangeColor
drawindexed = auto

elif $SWH ==4

vb0 = ResourceSPH03VB
ib = ResourceSPH03IB
run = CommandListChangeColor
drawindexed = auto


endif

;T

if $SWT ==1

vb0 = ResourceSPT00VB
ib = ResourceSPT00IB
run = CommandListChangeColor
drawindexed = auto


elif $SWT ==2

vb0 = ResourceSPT01VB
ib = ResourceSPT01IB
run = CommandListChangeColor
drawindexed = auto

elif $SWT ==3
vb0 = ResourceSPT02VB
ib = ResourceSPT02IB
run = CommandListChangeColor
drawindexed = auto
elif $SWT ==4


endif


;フレーム除去
[TextureOverrideFlame]
hash = f18f717c
match_priority = -1
;if ($SWL >= 1  || $SWR >= 1 || $SWU >= 1  || $SWD >= 1|| $SWM >= 1)

handling = skip
;endif

;濃さ
[CommandListChangeColor]
if $SWTR == 0
ps-t0 = ResourceSP15TEX
elif $SWTR == 1
ps-t0 = ResourceSP20TEX
elif $SWTR == 2
ps-t0 = ResourceSP30TEX
endif


;--リソース
;L

[ResourceSPL00VB]
type = Buffer
stride = 28
filename = spL0.vb

[ResourceSPL00IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spL0.ib

[ResourceSPL01VB]
type = Buffer
stride = 28
filename = spL01.vb

[ResourceSPL01IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spL01.ib


[ResourceSPL02VB]
type = Buffer
stride = 28
filename = spL02.vb

[ResourceSPL02IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spL02.ib


[ResourceSPL03VB]
type = Buffer
stride = 28
filename = spL03.vb

[ResourceSPL03IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spL03.ib



;R

[ResourceSPR00VB]
type = Buffer
stride = 28
filename = spR0.vb

[ResourceSPR00IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spR0.ib

[ResourceSPR01VB]
type = Buffer
stride = 28
filename = spR01.vb

[ResourceSPR01IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spR01.ib

[ResourceSPR02VB]
type = Buffer
stride = 28
filename = spR02.vb

[ResourceSPR02IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spR02.ib


[ResourceSPR03VB]
type = Buffer
stride = 28
filename = spR03.vb

[ResourceSPR03IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spR03.ib



;U

[ResourceSPU00VB]
type = Buffer
stride = 28
filename = spU0.vb

[ResourceSPU00IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spU0.ib

[ResourceSPU01VB]
type = Buffer
stride = 28
filename = spU01.vb

[ResourceSPU01IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spU01.ib


[ResourceSPU02VB]
type = Buffer
stride = 28
filename = spU02.vb

[ResourceSPU02IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spU02.ib


[ResourceSPU03VB]
type = Buffer
stride = 28
filename = spU03.vb

[ResourceSPU03IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spU03.ib

;D

[ResourceSPD00VB]
type = Buffer
stride = 28
filename = spD0.vb

[ResourceSPD00IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spD0.ib

[ResourceSPD01VB]
type = Buffer
stride = 28
filename = spD01.vb

[ResourceSPD01IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spD01.ib

[ResourceSPD02VB]
type = Buffer
stride = 28
filename = spD02.vb

[ResourceSPD02IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spD02.ib

[ResourceSPD03VB]
type = Buffer
stride = 28
filename = spD03.vb

[ResourceSPD03IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spD03.ib




;M

[ResourceSPM00VB]
type = Buffer
stride = 28
filename = spM0.vb

[ResourceSPM00IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spM0.ib

[ResourceSPM01VB]
type = Buffer
stride = 28
filename = spM01.vb

[ResourceSPM01IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spM01.ib


[ResourceSPM02VB]
type = Buffer
stride = 28
filename = spM02.vb

[ResourceSPM02IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spM02.ib

[ResourceSPM03VB]
type = Buffer
stride = 28
filename = spM03.vb

[ResourceSPM03IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spM03.ib

;H

[ResourceSPH00VB]
type = Buffer
stride = 28
filename = spH0.vb

[ResourceSPH00IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spH0.ib

[ResourceSPH01VB]
type = Buffer
stride = 28
filename = spH01.vb

[ResourceSPH01IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spH01.ib

[ResourceSPH02VB]
type = Buffer
stride = 28
filename = spH02.vb

[ResourceSPH02IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spH02.ib

[ResourceSPH03VB]
type = Buffer
stride = 28
filename = spH03.vb

[ResourceSPH03IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spH03.ib

;T
[ResourceSPT00VB]
type = Buffer
stride = 28
filename = spT0.vb

[ResourceSPT00IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spT0.ib

[ResourceSPT01VB]
type = Buffer
stride = 28
filename = spT01.vb

[ResourceSPT01IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spT01.ib

[ResourceSPT02VB]
type = Buffer
stride = 28
filename = spT02.vb

[ResourceSPT02IB]
type = Buffer
format = DXGI_FORMAT_R16_UINT
filename = spT02.ib

;tex

[ResourceSP30TEX]
filename = sp30.dds

[ResourceSP20TEX]
filename = sp20.dds

[ResourceSP15TEX]
filename = sp15.dds


[CustomShaderTransparency0]
blend[0] = ADD BLEND_FACTOR INV_BLEND_FACTOR
blend_factor[0] = 0.09
blend_factor[1] = 0.09
blend_factor[2] = 0.09
blend_factor[3] = 1
draw = from_caller
handling = skip










