namespace = DummyInSpot

;ログハウス

[Constants]
global $c_LogHouse_LayoutType_Param = 0
;!OnFloor/OnBed 2桁
global $c_LogHouse_OnFloorPosition_Param = 1
global $c_LogHouse_OnBedPosition_Param = 3

global $c_LogHouse_OnFloorPosition_Max = 1
global $c_LogHouse_OnBedPosition_Max = 1


global $LogHouse_LayoutType
global $LogHouse_OnFloorPosition = 4
global $LogHouse_OnBedPosition

;-影のモード(0:ノーマル,1:部屋内のみ影を描画しない、2:すべての影を描画しない)
persist global $LogHouse_ShadowMode = 1
persist global $LogHouse_IsDrawWindowGrass = 0

;- 全て Resource_pscb2 を使う時 1
persist global $LogHouse_IsDefaultPscb2 = 0

;表示フラグ
;-東西南北のアイテム表示を行うか
persist global $LH_ShowSouthSide = 1
persist global $LH_ShowNorthSide = 1
persist global $LH_ShowEastSide = 1
persist global $LH_ShowWestSide = 1
;-カーテンのopen(1)/close(0)
persist global $LH_IsCurtain = 1
;-内壁の種類
persist global $LH_InnnerType
;-ガラスの透過
persist global $LH_IsGrassTransparent = 1
;-2Fの描画
persist global $LH_IsDraw2ndFloor = 1

global $Pier_LogHouse_Param1 = 0



;--テスト用キー設定
[Key_LogHouse_ShadowMode]
condition =  ($Pier_Layout == $c_Pier_Layout_LogHouse)
key = no_ctrl no_shift no_alt 1
type = cycle
$LogHouse_ShadowMode = 0,1,2
;type = activate

[Key_LogHouse_DefaultPscb2]
condition =  ($Pier_Layout == $c_Pier_Layout_LogHouse)
key = no_ctrl no_shift no_alt 2
type = cycle
$LogHouse_IsDefaultPscb2 = 0,1

[Key_LogHouse_ShowSouthSide]
condition =  ($Pier_Layout == $c_Pier_Layout_LogHouse)
key = no_ctrl no_shift no_alt 3
type = cycle
$LH_ShowSouthSide = 0,1

[Key_LogHouse_ShowNorthSide]
condition =  ($Pier_Layout == $c_Pier_Layout_LogHouse)
key = no_ctrl no_shift no_alt 4
type = cycle
$LH_ShowNorthSide = 0,1

[Key_LogHouse_ShowEastSide]
condition =  ($Pier_Layout == $c_Pier_Layout_LogHouse)
key = no_ctrl no_shift no_alt 5
type = cycle
$LH_ShowEastSide = 0,1

[Key_LogHouse_ShowWestSide]
condition =  ($Pier_Layout == $c_Pier_Layout_LogHouse)
key = no_ctrl no_shift no_alt 6
type = cycle
$LH_ShowWestSide = 0,1

[Key_LogHouse_IsCurtain]
condition =  ($Pier_Layout == $c_Pier_Layout_LogHouse)
key = no_ctrl no_shift no_alt 7
type = cycle
$LH_IsCurtain = 0,1

[Key_LogHouse_InnnerType]
condition =  ($Pier_Layout == $c_Pier_Layout_LogHouse)
key = no_ctrl no_shift no_alt 8
type = cycle
$LH_InnnerType = 0,1,2

[Key_LogHouse_GrassTransparent]
condition =  ($Pier_Layout == $c_Pier_Layout_LogHouse)
key = no_ctrl no_shift no_alt 9
type = cycle
$LH_IsGrassTransparent = 0,1

[Key_LogHouse_Draw2ndFloor]
condition =  ($Pier_Layout == $c_Pier_Layout_LogHouse)
key = no_ctrl no_shift no_alt 0
type = cycle
$LH_IsDraw2ndFloor = 0,1

;--確認用
[Present]
if ($Pier_Layout == $c_Pier_Layout_LogHouse) && $\mlc\IsDebugEnable && !$\MisakiLove\IsHomeScreen && !$\MisakiLove\IsLoadingScreen&& !$\MisakiLove\IsEventScreen
	$\mlc\FP_xp = 1
	$\mlc\FP_yp = -1.5
	$\mlc\FP_ValueXP = $\mlc\FP_xp + 7
	$\mlc\IsDrawTextResetParam = $false
	$\mlc\BackColor = $\mlc\Red
	$\mlc\MinBackgroundWidth = 13
	$\mlc\IsProportional = $true

	;-1:ShadowMode
	$\mlc\FP_Text1 = 457954
	$\mlc\FP_Text2 = 40108
	$\mlc\FP_Text3 = 392315
	$\mlc\FP_Text4 = 50415
	$\mlc\FP_Value = $LogHouse_ShadowMode
	$\mlc\FP_yp = $\mlc\FP_yp + 1
	run = CommandList\mlc\_DrawDebugValue_New

	;-2:IsDefaultPscb
	$\mlc\FP_Text1 = 357955
	$\mlc\FP_Text2 = 53019
	$\mlc\FP_Text3 = 210106
	$\mlc\FP_Text4 = 422012
	$\mlc\FP_Text5 = 20319
	$\mlc\FP_Value = $LogHouse_IsDefaultPscb2
	$\mlc\FP_yp = $\mlc\FP_yp + 1
	run = CommandList\mlc\_DrawDebugValue_New

	;-3:ShowSouthSide
	$\mlc\FP_Text1 = 457956
	$\mlc\FP_Text2 = 231508
	$\mlc\FP_Text3 = 211545
	$\mlc\FP_Text4 = 450820
	$\mlc\FP_Text5 = 50409
	$\mlc\FP_Text6 = 9700
	$\mlc\FP_Value = $LH_ShowSouthSide
	$\mlc\FP_yp = $\mlc\FP_yp + 1
	run = CommandList\mlc\_DrawDebugValue_New

	;-4:ShowNorthSide
	$\mlc\FP_Text1 = 457957
	$\mlc\FP_Text2 = 231508
	$\mlc\FP_Text3 = 181540
	$\mlc\FP_Text4 = 450820
	$\mlc\FP_Text5 = 50409
	$\mlc\FP_Value = $LH_ShowNorthSide
	$\mlc\FP_yp = $\mlc\FP_yp + 1
	run = CommandList\mlc\_DrawDebugValue_New

	;-5:ShowEastSide
	$\mlc\FP_Text1 = 457958
	$\mlc\FP_Text2 = 231508
	$\mlc\FP_Text3 = 190131
	$\mlc\FP_Text4 = 94520
	$\mlc\FP_Text5 = 504
	$\mlc\FP_Value = $LH_ShowEastSide
	$\mlc\FP_yp = $\mlc\FP_yp + 1
	run = CommandList\mlc\_DrawDebugValue_New

	;-6:ShowWestSide
	$\mlc\FP_Text1 = 457959
	$\mlc\FP_Text2 = 231508
	$\mlc\FP_Text3 = 190549
	$\mlc\FP_Text4 = 94520
	$\mlc\FP_Text5 = 504
	$\mlc\FP_Text6 = 97
	$\mlc\FP_Value = $LH_ShowWestSide
	$\mlc\FP_yp = $\mlc\FP_yp + 1
	run = CommandList\mlc\_DrawDebugValue_New

	;-7:IsCurtain
	$\mlc\FP_Text1 = 357960
	$\mlc\FP_Text2 = 212919
	$\mlc\FP_Text3 = 12018
	$\mlc\FP_Text4 = 1409
	$\mlc\FP_Value = $LH_IsCurtain
	$\mlc\FP_yp = $\mlc\FP_yp + 1
	run = CommandList\mlc\_DrawDebugValue_New

	;-8:InnnerType
	$\mlc\FP_Text1 = 357961
	$\mlc\FP_Text2 = 141414
	$\mlc\FP_Text3 = 461805
	$\mlc\FP_Text4 = 51625
	$\mlc\FP_Value = $LH_InnnerType
	$\mlc\FP_yp = $\mlc\FP_yp + 1
	run = CommandList\mlc\_DrawDebugValue_New
	;-9.Grass
	$\mlc\FP_Text1 = 337762
	$\mlc\FP_Text2 = 190118
	$\mlc\FP_Text3 = 19
	$\mlc\FP_Value = $LH_IsGrassTransparent
	$\mlc\FP_yp = $\mlc\FP_yp + 1
	run = CommandList\mlc\_DrawDebugValue_New
	;-0.2ndFloor
	$\mlc\FP_Text1 = 557753
	$\mlc\FP_Text2 = 320414
	$\mlc\FP_Text3 = 151512
	$\mlc\FP_Text4 = 18
	$\mlc\FP_Value = $LH_IsDraw2ndFloor
	$\mlc\FP_yp = $\mlc\FP_yp + 1
	run = CommandList\mlc\_DrawDebugValue_New
endif



;--設定
;初期化
[CommandList_LogHouse_Init]

;このベッドタイプに変更する
[CommandList_Select_LogHouse]
if $Pier_Layout != $c_Pier_Layout_LogHouse && ($IsInit != 0)
	$Pier_Layout = $c_Pier_Layout_LogHouse

	run = CommandList_LogHouse_LoadParam

	$IsOriginalPierDelete = $true
endif

;オプションパラメータのロード
[CommandList_LogHouse_LoadParam]
$FPR_OptionParam = $Pier_LogHouse_Param1

$FP_OptionNo = $c_LogHouse_LayoutType_Param
run = CommandList_GetOptionParam
$LogHouse_LayoutType = $FR_Result
$CurrentSpot_LayoutType = $LogHouse_LayoutType

;$FP_OptionNo = $c_LogHouse_OnFloorPosition_Param
;run = CommandList_GetOptionParam2
;$LogHouse_OnFloorPosition = $FR_Result
;if ($LogHouse_OnFloorPosition < 1) || ($LogHouse_OnFloorPosition > $c_LogHouse_OnFloorPosition_Max)
;	$LogHouse_OnFloorPosition = 1
;endif

$FP_OptionNo = $c_LogHouse_OnBedPosition_Param
run = CommandList_GetOptionParam2
$LogHouse_OnBedPosition = $FR_Result
if ($LogHouse_OnBedPosition < 1) || ($LogHouse_OnBedPosition > $c_LogHouse_OnBedPosition_Max)
	$LogHouse_OnBedPosition = 1
endif

run = CommandList_LogHouse_SetLayout_Resource

;オプションパラメータの保存
[CommandList_LogHouse_SaveParam]
if ($FP_OptionNo == $c_LogHouse_LayoutType_Param)
	$LogHouse_LayoutType = $FP_SetOptionVal
	run = CommandList_LogHouse_CheckParam
;elif ($FP_OptionNo == $c_LogHouse_OnFloorPosition_Param)
;	$LogHouse_OnFloorPosition = $FP_SetOptionVal
;	run = CommandList_LogHouse_CheckParam
elif ($FP_OptionNo == $c_LogHouse_OnBedPosition_Param)
	$LogHouse_OnBedPosition = $FP_SetOptionVal
	run = CommandList_LogHouse_CheckParam
endif


run = CommandList_LogHouse_SetLayout_Resource


if $FP_OptionNo < 7
	$FPR_OptionParam = $Pier_LogHouse_Param1
;elif $FP_OptionNo < 14
;	$FPR_OptionParam = $Pier_LogHouse_Param2
;elif $FP_OptionNo < 21
;	$FPR_OptionParam = $Pier_LogHouse_Param3
;elif $FP_OptionNo < 28
;	$FPR_OptionParam = $Pier_LogHouse_Param4
;else
;	$FPR_OptionParam = $Pier_LogHouse_Param5
endif


if ($FP_OptionNo == $c_LogHouse_OnFloorPosition_Param) || ($FP_OptionNo == $c_LogHouse_OnBedPosition_Param)
	;-二桁のオプション
	run = CommandList_SetOptionParam2
else
	run = CommandList_SetOptionParam
endif

if $FP_OptionNo < 7
	$Pier_LogHouse_Param1 = $FPR_OptionParam
;elif $FP_OptionNo < 14
;	$Pier_LogHouse_Param2 = $FPR_OptionParam
;elif $FP_OptionNo < 21
;	$Pier_LogHouse_Param3 = $FPR_OptionParam
;elif $FP_OptionNo < 28
;	$Pier_LogHouse_Param4 = $FPR_OptionParam
;else
;	$Pier_LogHouse_Param5 = $FPR_OptionParam
endif

;LayoutType/Position変更時の各パラメータチェック
[CommandList_LogHouse_CheckParam]
;-各パラメータの最大値のチェックを行うのならここで


;ポジションの取得
[CommandList_LogHouse_GetPosition]
if $LogHouse_LayoutType == $c_LayoutType_OnFloor
	$FR_Result = $LogHouse_OnFloorPosition
elif $LogHouse_LayoutType == $c_LayoutType_OnBed
	$FR_Result = $LogHouse_OnBedPosition
endif

;ポジションの設定
[CommandList_LogHouse_ChangePosition]
$MinValue = 1
if $LogHouse_LayoutType == $c_LayoutType_OnFloor
	$FR_Result = $LogHouse_OnFloorPosition
	$MaxValue = $c_LogHouse_OnFloorPosition_Max
	$FP_OptionNo = $c_LogHouse_OnFloorPosition_Param
elif $LogHouse_LayoutType == $c_LayoutType_OnBed
	$FR_Result = $LogHouse_OnBedPosition
	$MaxValue = $c_LogHouse_OnBedPosition_Max
	$FP_OptionNo = $c_LogHouse_OnBedPosition_Param
endif
run = CommandList_IncDecOptionVal

$FP_SetOptionVal = $FR_Result
run = CommandList_LogHouse_SaveParam


;オプションメニューパネルの描画
[CommandList_Draw_LogHouse_OptionPanel]
;if $BeachType == $c_BeachType_Terrace
;	if ($LogHouse_LayoutType == $c_LayoutType_OnFloor)
;		if ($LogHouse_OnFloorPosition == 1)
;			$FP_PanelType = $c_PanelType_OptionParam
;			$FP_PanelNo = $c_LogHouse_ExItems_Param
;			run = CommandList_SetColPanel
;			run = CustomShader_MenuPanel
;			$FP_Value = $LogHouse_ExItems
;			run = CommandList_ShowParamValue

;			$FP_PanelType = $c_PanelType_OptionParam
;			$FP_PanelNo = $c_LogHouse_Fence_Param
;			run = CommandList_SetColPanel
;			run = CustomShader_MenuPanel
;			$FP_Value = $LogHouse_Fence
;			run = CommandList_ShowParamValue
;		endif

;		$FP_PanelType = $c_PanelType_OptionParam
;		$FP_PanelNo = $c_LogHouse_Ceil_Param
;		run = CommandList_SetColPanel
;		run = CustomShader_MenuPanel
;		$FP_Value = $LogHouse_Ceil
;		run = CommandList_ShowParamValue
;	endif
;else
;	if ($LogHouse_LayoutType == $c_LayoutType_OnFloor)
;		if ($LogHouse_OnFloorPosition == 4)
;			$FP_PanelType = $c_PanelType_OptionParam
;			$FP_PanelNo = $c_LogHouse_ExItems_Param
;			run = CommandList_SetColPanel
;			run = CustomShader_MenuPanel
;			$FP_Value = $LogHouse_ExItems
;			run = CommandList_ShowParamValue
;		elif ($LogHouse_OnFloorPosition == 7)
;			$FP_PanelType = $c_PanelType_OptionParam
;			$FP_PanelNo = $c_LogHouse_Window_Param
;			run = CommandList_SetColPanel
;			run = CustomShader_MenuPanel
;			$FP_Value = $LogHouse_Window
;			run = CommandList_ShowParamValue
;		elif ($LogHouse_OnFloorPosition == 8)
;			$FP_PanelType = $c_PanelType_OptionParam
;			$FP_PanelNo = $c_LogHouse_Layout_F08_Param
;			run = CommandList_SetColPanel
;			run = CustomShader_MenuPanel
;			$FP_Value = $LogHouse_Layout_F08
;			run = CommandList_ShowParamValue

;			$FP_PanelType = $c_PanelType_OptionParam
;			$FP_PanelNo = $c_LogHouse_Door_Param
;			run = CommandList_SetColPanel
;			run = CustomShader_MenuPanel
;			$FP_Value = $LogHouse_Door
;			run = CommandList_ShowParamValue
;		elif ($LogHouse_OnFloorPosition == 9) || ($LogHouse_OnFloorPosition == 10)
;			$FP_PanelType = $c_PanelType_OptionParam
;			$FP_PanelNo = $c_LogHouse_Layout_F09_Param
;			if ($LogHouse_OnFloorPosition == 10)
;				$FP_PanelNo = $c_LogHouse_Layout_F10_Param
;			endif
;			run = CommandList_SetColPanel
;			run = CustomShader_MenuPanel
;			$FP_Value = $LogHouse_Layout_F09
;			if ($LogHouse_OnFloorPosition == 10)
;				$FP_Value = $LogHouse_Layout_F10
;			endif
;			run = CommandList_ShowParamValue
;			$FP_PanelType = $c_PanelType_OptionParam
;			$FP_PanelNo = $c_LogHouse_Window_Param
;			run = CommandList_SetColPanel
;			run = CustomShader_MenuPanel
;			$FP_Value = $LogHouse_Window
;			run = CommandList_ShowParamValue
;		endif

;		if ($LogHouse_OnFloorPosition >= 3) && ($LogHouse_OnFloorPosition < 6)
;			$FP_PanelType = $c_PanelType_OptionParam
;			$FP_PanelNo = $c_LogHouse_Fence_Param
;			run = CommandList_SetColPanel
;			run = CustomShader_MenuPanel
;			$FP_Value = $LogHouse_Fence
;			run = CommandList_ShowParamValue
;		endif

;		$FP_PanelType = $c_PanelType_OptionParam
;		$FP_PanelNo = $c_LogHouse_Ceil_Param
;		run = CommandList_SetColPanel
;		run = CustomShader_MenuPanel
;		$FP_Value = $LogHouse_Ceil
;		run = CommandList_ShowParamValue
;	elif ($LogHouse_LayoutType == $c_LayoutType_OnBed)
;		if ($LogHouse_OnBedPosition == 1)
;			$FP_DrawWidthRate = 0.7
;			$FP_PanelType = $c_PanelType_OptionParam
;			$FP_PanelNo = $c_LogHouse_Layout_B01_Param
;			run = CommandList_SetColPanel
;			run = CustomShader_MenuPanel
;			$FP_Value = $LogHouse_Layout_B01
;			run = CommandList_ShowParamValue
;			$FP_PanelNo = $c_LogHouse_Pillow_Param
;			run = CommandList_SetColPanel
;			run = CustomShader_MenuPanel
;			$FP_Value = $LogHouse_Pillow
;			run = CommandList_ShowParamValue
;			$FP_PanelType = $c_PanelType_OptionParam
;			$FP_PanelNo = $c_LogHouse_Window_Param
;			run = CommandList_SetColPanel
;			run = CustomShader_MenuPanel
;			$FP_Value = $LogHouse_Window
;			run = CommandList_ShowParamValue
;		elif ($LogHouse_OnBedPosition == 2)
;			$FP_PanelType = $c_PanelType_OptionParam
;			$FP_PanelNo = $c_LogHouse_Sofa_Param
;			run = CommandList_SetColPanel
;			run = CustomShader_MenuPanel
;			$FP_Value = $LogHouse_Sofa
;			run = CommandList_ShowParamValue
;		elif ($LogHouse_OnBedPosition == 3)
;			$FP_PanelType = $c_PanelType_OptionParam
;			$FP_PanelNo = $c_LogHouse_Layout_B03_Param
;			run = CommandList_SetColPanel
;			run = CustomShader_MenuPanel
;			$FP_Value = $LogHouse_Layout_B03
;			run = CommandList_ShowParamValue

;			$FP_PanelNo = $c_LogHouse_ItemPos_Param
;			run = CommandList_SetColPanel
;			run = CustomShader_MenuPanel
;			$FP_Value = $LogHouse_ItemPos
;			run = CommandList_ShowParamValue

;			$FP_PanelNo = $c_LogHouse_Fence_Param
;			run = CommandList_SetColPanel
;			run = CustomShader_MenuPanel
;			$FP_Value = $LogHouse_Fence
;			run = CommandList_ShowParamValue
;		elif ($LogHouse_OnBedPosition == 4)
;			$FP_PanelType = $c_PanelType_OptionParam
;			$FP_PanelNo = $c_LogHouse_Layout_B04_Param
;			run = CommandList_SetColPanel
;			run = CustomShader_MenuPanel
;			$FP_Value = $LogHouse_Layout_B04
;			run = CommandList_ShowParamValue

;			$FP_PanelType = $c_PanelType_OptionParam
;			$FP_PanelNo = $c_LogHouse_Door_Param
;			run = CommandList_SetColPanel
;			run = CustomShader_MenuPanel
;			$FP_Value = $LogHouse_Door
;			run = CommandList_ShowParamValue
;		elif ($LogHouse_OnBedPosition == 5)
;			$FP_DrawWidthRate = 0.7
;			$FP_PanelType = $c_PanelType_OptionParam
;			$FP_PanelNo = $c_LogHouse_Layout_B05_Param
;			run = CommandList_SetColPanel
;			run = CustomShader_MenuPanel
;			$FP_Value = $LogHouse_Layout_B05
;			run = CommandList_ShowParamValue

;			if ($LogHouse_Layout_B05 == 1)
;				$FP_PanelType = $c_PanelType_OptionParam
;				$FP_PanelNo = $c_LogHouse_BedHeight_Param
;				run = CommandList_SetColPanel
;				run = CustomShader_MenuPanel
;				$FP_Value = $LogHouse_BedHeight
;				run = CommandList_ShowParamValue

;				$FP_PanelType = $c_PanelType_OptionParam
;				$FP_PanelNo = $c_LogHouse_Pillow_Param
;				run = CommandList_SetColPanel
;				run = CustomShader_MenuPanel
;				$FP_Value = $LogHouse_Pillow
;				run = CommandList_ShowParamValue
;			endif
;			if ($LogHouse_Layout_B05 == 3)
;				$FP_PanelType = $c_PanelType_OptionParam
;				$FP_PanelNo = $c_LogHouse_ItemPos_Param
;				run = CommandList_SetColPanel
;				run = CustomShader_MenuPanel
;				$FP_Value = $LogHouse_ItemPos
;				run = CommandList_ShowParamValue
;			endif
;			if ($LogHouse_Layout_B05 == 0) || ($LogHouse_Layout_B05 == 2)
;				$FP_PanelType = $c_PanelType_OptionParam
;				$FP_PanelNo = $c_LogHouse_BedHeight_Param
;				run = CommandList_SetColPanel
;				run = CustomShader_MenuPanel
;				$FP_Value = $LogHouse_BedHeight
;				run = CommandList_ShowParamValue

;				if $LogHouse_BedHeight == 0
;					$FP_PanelType = $c_PanelType_OptionParam
;					$FP_PanelNo = $c_LogHouse_Blanket_Param
;					run = CommandList_SetColPanel
;					run = CustomShader_MenuPanel
;					$FP_Value = $LogHouse_Blanket
;					run = CommandList_ShowParamValue

;					$FP_PanelType = $c_PanelType_OptionParam
;					$FP_PanelNo = $c_LogHouse_Blanket_Transparency_Param
;					run = CommandList_SetColPanel
;					run = CustomShader_MenuPanel
;					$FP_Value = $LogHouse_Blanket_Transparency
;					run = CommandList_ShowParamValue

;					$FP_PanelType = $c_PanelType_OptionParam
;					$FP_PanelNo = $c_LogHouse_Pillow_Param
;					run = CommandList_SetColPanel
;					run = CustomShader_MenuPanel
;					$FP_Value = $LogHouse_Pillow
;					run = CommandList_ShowParamValue
;				endif
;			endif

;			if ($LogHouse_Layout_B05 == 0) || ($LogHouse_Layout_B05 == 2)
;				$FP_width = $c_Panel_Width_Small
;				$FP_DrawWidthRate = 0.9
;			endif
;			$FP_PanelType = $c_PanelType_OptionParam
;			$FP_PanelNo = $c_LogHouse_Window_Param
;			run = CommandList_SetColPanel
;			run = CustomShader_MenuPanel
;			$FP_Value = $LogHouse_Window
;			run = CommandList_ShowParamValue
;		elif ($LogHouse_OnBedPosition == 6)
;			$FP_DrawWidthRate = 0.7
;			$FP_PanelType = $c_PanelType_OptionParam
;			$FP_PanelNo = $c_LogHouse_Layout_B06_Param
;			run = CommandList_SetColPanel
;			run = CustomShader_MenuPanel
;			$FP_Value = $LogHouse_Layout_B06
;			run = CommandList_ShowParamValue

;			$FP_PanelType = $c_PanelType_OptionParam
;			$FP_PanelNo = $c_LogHouse_Sofa_Param
;			run = CommandList_SetColPanel
;			run = CustomShader_MenuPanel
;			$FP_Value = $LogHouse_Sofa
;			run = CommandList_ShowParamValue

;			$FP_PanelType = $c_PanelType_OptionParam
;			$FP_PanelNo = $c_LogHouse_Window_Param
;			run = CommandList_SetColPanel
;			run = CustomShader_MenuPanel
;			$FP_Value = $LogHouse_Window
;			run = CommandList_ShowParamValue
;		endif

;		$FP_PanelType = $c_PanelType_OptionParam
;		$FP_PanelNo = $c_LogHouse_Ceil_Param
;		run = CommandList_SetColPanel
;		run = CustomShader_MenuPanel
;		$FP_Value = $LogHouse_Ceil
;		run = CommandList_ShowParamValue
;	endif
;endif

[CommandList_LogHouse_OptionPanelImage]

;オプションパラメータの変更
[CommandList_LogHouse_ChangeOptionParam]




;--レイアウトリソースの設定
[CommandList_LogHouse_SetLayout_Resource]
run = CommandList_LogHouse_ResetLayout_Resource
if $LogHouse_LayoutType == $c_LayoutType_OnFloor
	if $LogHouse_OnFloorPosition == 1
		run = CommandList_LogHouse_SetOnFloor_Pos1_Resource
	elif $LogHouse_OnFloorPosition == 2
		run = CommandList_LogHouse_SetOnFloor_Pos2_Resource
	elif $LogHouse_OnFloorPosition == 3
		run = CommandList_LogHouse_SetOnFloor_Pos3_Resource
	elif $LogHouse_OnFloorPosition == 4
		run = CommandList_LogHouse_SetOnFloor_Pos4_Resource
	endif
else
endif

[CommandList_LogHouse_ResetLayout_Resource]

run = CommandList_LogHouse_Reset_House
run = CommandList_LogHouse_Reset_Balcony
run = CommandList_LogHouse_Reset_BathRoom
run = CommandList_LogHouse_Reset_WashRoom
run = CommandList_LogHouse_Reset_Kitchen

Resource_LogHouse_Entrance_01_VB = null
Resource_LogHouse_Entrance_01_IB = null
Resource_LogHouse_Entrance_02_VB = null
Resource_LogHouse_Entrance_02_IB = null
Resource_LogHouse_Entrance_03_VB = null
Resource_LogHouse_Entrance_03_IB = null
Resource_LogHouse_Entrance_04_VB = null
Resource_LogHouse_Entrance_04_IB = null
Resource_LogHouse_Entrance_05_VB = null
Resource_LogHouse_Entrance_05_IB = null
Resource_LogHouse_Entrance_06_VB = null
Resource_LogHouse_Entrance_06_IB = null
Resource_LogHouse_Entrance_07_VB = null
Resource_LogHouse_Entrance_07_IB = null
Resource_LogHouse_Entrance_08_VB = null
Resource_LogHouse_Entrance_08_IB = null
Resource_LogHouse_Entrance_09_VB = null
Resource_LogHouse_Entrance_09_IB = null
Resource_LogHouse_Entrance_10_VB = null
Resource_LogHouse_Entrance_10_IB = null




[CommandList_LogHouse_SetOnFloor_Pos1_Resource]
;- 家屋
run = CommandList_LogHouse_Layout1_Pos1_House_Resource
;- バルコニー
run = CommandList_LogHouse_Layout1_Pos1_Balcony_Resource
;- バスルーム
run = CommandList_LogHouse_Layout1_Pos1_BathRoom_Resource
;- 洗面所
run = CommandList_LogHouse_Layout1_Pos1_WashRoom_Resource
;- キッチン
run = CommandList_LogHouse_Layout1_Pos1_Kitchen_Resource

;;-Entrance
;Resource_LogHouse_Entrance_01_VB = ref Resource_LogHouse_Layout1_Pos1_Entrance_01_VB
;Resource_LogHouse_Entrance_01_IB = ref Resource_LogHouse_Layout1_Pos1_Entrance_01_IB
;Resource_LogHouse_Entrance_02_VB = ref Resource_LogHouse_Layout1_Pos1_Entrance_02_VB
;Resource_LogHouse_Entrance_02_IB = ref Resource_LogHouse_Layout1_Pos1_Entrance_02_IB
;Resource_LogHouse_Entrance_03_VB = ref Resource_LogHouse_Layout1_Pos1_Entrance_03_VB
;Resource_LogHouse_Entrance_03_IB = ref Resource_LogHouse_Layout1_Pos1_Entrance_03_IB
;Resource_LogHouse_Entrance_04_VB = ref Resource_LogHouse_Layout1_Pos1_Entrance_04_VB
;Resource_LogHouse_Entrance_04_IB = ref Resource_LogHouse_Layout1_Pos1_Entrance_04_IB



[CommandList_LogHouse_SetOnFloor_Pos2_Resource]
;- 家屋
run = CommandList_LogHouse_Layout1_Pos2_House_Resource
;- バルコニー
run = CommandList_LogHouse_Layout1_Pos2_Balcony_Resource
;- バスルーム
run = CommandList_LogHouse_Layout1_Pos2_BathRoom_Resource
;- 洗面所
run = CommandList_LogHouse_Layout1_Pos2_WashRoom_Resource
;- キッチン
run = CommandList_LogHouse_Layout1_Pos2_Kitchen_Resource

[CommandList_LogHouse_SetOnFloor_Pos3_Resource]
;- 家屋
run = CommandList_LogHouse_Layout1_Pos3_House_Resource
;- バルコニー
run = CommandList_LogHouse_Layout1_Pos3_Balcony_Resource
;- バスルーム
run = CommandList_LogHouse_Layout1_Pos3_BathRoom_Resource
;- 洗面所
run = CommandList_LogHouse_Layout1_Pos3_WashRoom_Resource
;- キッチン
run = CommandList_LogHouse_Layout1_Pos3_Kitchen_Resource

[CommandList_LogHouse_SetOnFloor_Pos4_Resource]
;- 家屋
run = CommandList_LogHouse_Layout1_Pos4_House_Resource
;- バルコニー
run = CommandList_LogHouse_Layout1_Pos4_Balcony_Resource
;- バスルーム
run = CommandList_LogHouse_Layout1_Pos4_BathRoom_Resource
;- 洗面所
run = CommandList_LogHouse_Layout1_Pos4_WashRoom_Resource
;;- キッチン
;run = CommandList_LogHouse_Layout1_Pos4_Kitchen_Resource





[Constants]
global $LogHouse_DrawCounter = 0
global $LogHouse_IsDraw = 0

[Present]
$LogHouse_DrawCounter = 0


[CommandList_LogHouse_DrawCount]
$LogHouse_DrawCounter = $LogHouse_DrawCounter + 1
	
;--描画
[TextureOverride_LogHouse]
run = CommandList_LogHouse_DrawCount
;$\mlc\Debug_ShiftDown_Value = $LogHouse_DrawCounter
;run = CommandList\mlc\_DebugShiftDown

if $IsActive && ($Pier_Layout == $c_Pier_Layout_LogHouse)

	$LogHouse_IsDraw = ($LogHouse_ShadowMode == 0) || ($LogHouse_DrawCounter == 4)

	hash = c7a0d68b
	match_first_index = 111864
	match_priority = 0
;	skipはしない
;	handling = skip


	ps-cb2 = ref Resource_pscb2

	;-家屋基礎
	run = CommandList_LogHouse_Draw_House

	;-バルコニー
	run = CommandList_LogHouse_Draw_Balcony

	;-バスルーム
	run = CommandList_LogHouse_Draw_BathRoom

	;-洗面所
	run = CommandList_LogHouse_Draw_WashRoom

	;-家具
	run = CommandList_LogHouse_Draw_Furniture

;	;-キッチン
;	run = CommandList_LogHouse_Draw_Kitchen





endif




;共通描画
;-カーテン描画
;[Resource_LogHouse_Curtain_VB]
;[Resource_LogHouse_Curtain_IB]
;[Resource_LogHouse_CurtainHem_VB]
;[Resource_LogHouse_CurtainHem_IB]

;[CommandList_LogHouse_Draw_Curtain]
;ps-t0 = ref Resource_LogHouse_Cloth_Curtain_Tex0
;ps-t1 = ref Resource_LogHouse_Cloth_Curtain_Tex1
;ps-cb2 = ref Resource_LogHouse_Cloth_Curtain_pscb2
;vb0 = ref Resource_LogHouse_Curtain_VB
;ib = ref Resource_LogHouse_Curtain_IB
;run = CommandList_LogHouse_Draw

;ps-t0 = ref Resource_LogHouse_Cloth_CurtainHem_Tex0
;ps-t1 = ref Resource_LogHouse_Cloth_CurtainHem_Tex1
;ps-cb2 = ref Resource_LogHouse_Cloth_CurtainHem_pscb2
;vb0 = ref Resource_LogHouse_CurtainHem_VB
;ib = ref Resource_LogHouse_CurtainHem_IB
;run = CommandList_LogHouse_Draw




;共通テクスチャー

;-外壁のテクスチャーをセット
[CommandList_LogHouse_OuterWall_Tex]
ps-t0 = ref Resource_LogHouse_Wood_Mokume1_Tex0
ps-t1 = ref Resource_LogHouse_Wood_Mokume1_Tex1
ps-cb2 = ref Resource_LogHouse_Wood_Mokume1_pscb2

;-内壁のテクスチャーをセット
[CommandList_LogHouse_InnerWall_Tex]
ps-t0 = ref Resource_LogHouse_Wood_Syuuseizai6_Tex0
if $LH_InnnerType > 0
	ps-t0 = ref Resource_LogHouse_Wood_Syuuseizai6D_Tex0
endif
ps-t1 = ref Resource_LogHouse_Wood_Syuuseizai6_Tex1
;ps-cb2 = ref Resource_LogHouse_Wood_Syuuseizai6_pscb2
ps-cb2 = ref Resource_pscb2

;-窓枠（アルミ)のテクスチャーをセット
[CommandList_LogHouse_WindowMetalFrame_Tex]
ps-t0 = ref Resource_LogHouse_Metal_Alumi1_Tex0
ps-t1 = ref Resource_LogHouse_Metal_Alumi1_Tex1
ps-cb2 = ref Resource_LogHouse_Metal_Alumi1_pscb2

;-窓枠（木枠)のテクスチャーをセット
[CommandList_LogHouse_WindowWoodFrame_Tex]
ps-t0 = ref Resource_LogHouse_Wood_Mokume6_Tex0
ps-t1 = ref Resource_LogHouse_Wood_Mokume6_Tex1
ps-cb2 = ref Resource_LogHouse_Wood_Mokume6_pscb2

;-カーテンのテクスチャーをセット
[CommandList_LogHouse_Curtain_Tex]
;ps-t0 = ref Resource_LogHouse_Cloth_Beige_Tex0
;ps-t1 = ref Resource\MisakiLove\_Default_Tex1
;ps-cb2 = ref Resource_LogHouse_Cloth_pscb2
ps-t0 = ref Resource_LogHouse_Cloth_Curtain_Tex0
ps-t1 = ref Resource_LogHouse_Cloth_Curtain_Tex1
ps-cb2 = ref Resource_LogHouse_Cloth_Curtain_pscb2



;;ガラスの描画
[TextureOverride_LogHouse_Grass]
if $IsActive && ($Pier_Layout == $c_Pier_Layout_LogHouse)
	hash = c7a0d68b
	match_first_index = 111864
	match_priority = 1
;	skipはしない
;	handling = skip
	run = CommandList\MLC\_Resource_Save
	ps-cb2 = ref Resource_pscb2

	;-家屋基礎
	run = CommandList_LogHouse_Draw_Grass_House

	;-バスルーム
	run = CommandList_LogHouse_Draw_Grass_BathRoom

	run = CommandList\MLC\_Resource_Restore
endif

[Constants]
global $FP_IsForcePscb2 = 0
[CommandList_LogHouse_Draw]
if $LogHouse_IsDefaultPscb2 && !$FP_IsForcePscb2
	ps-cb2 = ref Resource_pscb2
endif
drawindexed = auto

[CustomShaderTransparencyDraw_Grass]
blend[0] = ADD BLEND_FACTOR INV_BLEND_FACTOR
blend_factor[0] = 0.8
blend_factor[1] = 0.8
blend_factor[2] = 0.8
blend_factor[3] = 1
drawindexed = auto

[CustomShaderTransparencyDraw_Grass1]
blend[0] = ADD BLEND_FACTOR INV_BLEND_FACTOR
blend_factor[0] = 0.1
blend_factor[1] = 0.1
blend_factor[2] = 0.1
blend_factor[3] = 1
drawindexed = auto

;屋外のシャワー関連を非表示に
[TextureOverride_LogHouse_Del_01]
if (($LogHouse_LayoutType == $c_LayoutType_OnFloor) && ($LogHouse_OnFloorPosition == 4))
	hash =b447d277
	handling =skip
	match_Priority = 1
endif
[TextureOverride_LogHouse_Del_02]
if (($LogHouse_LayoutType == $c_LayoutType_OnFloor) && ($LogHouse_OnFloorPosition == 4))
	hash =25cb8524
	handling =skip
	match_Priority = 2
endif
[TextureOverride_LogHouse_Del_03]
if (($LogHouse_LayoutType == $c_LayoutType_OnFloor) && ($LogHouse_OnFloorPosition == 4))
	hash =0a55e4b0
	handling =skip
	match_Priority = 3
endif
[TextureOverride_LogHouse_Del_04]
if (($LogHouse_LayoutType == $c_LayoutType_OnFloor) && ($LogHouse_OnFloorPosition == 4))
	hash =9cdc4fb9
	handling =skip
	match_Priority = 4
endif

[TextureOverride_LogHouse_Del_05]
if (($LogHouse_LayoutType == $c_LayoutType_OnFloor) && ($LogHouse_OnFloorPosition == 4))
	hash =a52b55fa
	handling =skip
	match_Priority = 1
endif

[TextureOverride_LogHouse_Del_06]
if (($LogHouse_LayoutType == $c_LayoutType_OnFloor) && ($LogHouse_OnFloorPosition == 4))
	hash =25cb8524
	handling =skip
	match_Priority = 2
endif

[TextureOverride_LogHouse_Del_07]
if (($LogHouse_LayoutType == $c_LayoutType_OnFloor) && ($LogHouse_OnFloorPosition == 4))
	hash =d049baee
	handling =skip
	match_Priority = 3
endif




