GameScreen.textures_path = "graphics/screens/04_secretroom/location/"

GameScreen.hint_table = {
    {obj = {"hall_door_hint", 616, 451}, fun = function() if(GetState(CURRENT_SCREEN, "state") == "opened") then return true end end},
    {obj = {"safe_hint", 845, 524}, fun = function() if(GetState(CURRENT_SCREEN, "state") == "chandel") then return true end end},
    {obj = {"safe_hint", -845, -524}, fun = function() if(GetState(CURRENT_SCREEN, "state") == "dark") then return true end end, tool = "matches_003"},
  --{obj = {"buttons_hint", 285, 383}, fun = function() if(GetState(CURRENT_SCREEN, "state") == "opened") then return true end end},

}

GameScreen.inv_fun = {}

function GameScreen:RestoreScene()
                    
    ItemSetOpacity("04_light_off", 0.0)
    ItemSetOpacity("04_darkness", 0.0)
    ItemSetOpacity("04_candle", 0.0)
    ItemSetOpacity("04_escape", 0.0)

     if(GetState(CURRENT_SCREEN, "ho") ~= "completed") then
         MusicPlay({"sound/ambient/01_04_31_ambient.ogg", "sound/ambient/04_ambient.ogg"}, 4) 
         
        ItemSetOpacity("note_04_part_dark", 0.0)
        ItemSetOpacity("note_04_part_nolight", 0.0)
        ------------------------------------------------------------------------------------------------------------------------------ 
        --список возможных предметов для ХО
        local locker_click = function()
            SetState(CURRENT_SCREEN, "locker", "hide")
            SoundPlay("sound/small_metal_door.ogg")
            self:RemoveItem("locker");
            self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "locker_open", "graphics/screens/04_secretroom/location/locker_open", 1282, 758);
            self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "first_aid_kit_shadow", "graphics/screens/04_secretroom/location/first_aid_kit_shadow", 1298, 807);
            self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "first_aid_kit", "graphics/screens/04_secretroom/location/first_aid_kit_part", 1302, 822);
        end
        
        self.item_list = {
                {obj = {"tape_measure", {x = 290, y = 957}}, },
                {obj = {"map", {x = 14, y = 454}}, },
                {obj = {"binocular", {x = 867, y = 359}}, },
                {obj = {"remote_control", {x = 1385, y = 689}}, },
                {obj = {"flask", {x = 140, y = 264}}, },
                {obj = {"safety_fuse", {x = 1320, y = 158}}, inv = "safety_fuse_004"},
                {obj = {"wrench", {x = 559, y = 182}}, hint = {x = 555, y = 178}},
                {obj = {"audio_tape", {x = 1042, y = 191}}, },
                {obj = {"key", {x = 1272, y = 553}}, inv = "security_key_004"},
                {obj = {"bag", {x = 920, y = 535}}, },
                {obj = {"profile", {x = 1161, y = 155}}, wallpaper = {"profile_full", 427, 9}},
                {obj = {"first_aid_kit", {x = 1263, y = 787}, true}, intaractive = {"locker", "locker_hint", 1273, 787, locker_click}}
            }
        
        local end_fun = function() 
            ItemSetType("chief_eye", OBJ_TYPE.NO_ACTIVE)
            ItemSetType("hall_door_hand", OBJ_TYPE.NO_ACTIVE)
            ItemSetOpacity("chief_eye", 0.0)
            ItemSetOpacity("hall_door_hand", 0.0)
            
            SetState(CURRENT_SCREEN, "ho", "completed")
            SetState(CURRENT_SCREEN, "state", "dark")
            Inventory:save_tool("safety_fuse_004", true)
            Inventory:save_tool("security_key_004", true)
            
            clApplication.curret_win = clScreenManager:add_screen("tool_found_screen") 
            clApplication.curret_win._resource = "graphics/screens/04_secretroom/location/object_found_04"
            clApplication.curret_win.end_fun = function()
                Inventory:ToolFound("safety_fuse_004", 800, 600)
                DelayedExec(0.5, function()
                    Inventory:ToolFound("security_key_004", 800, 600)
                end, 113)
                
                DelayedExec(1.0,function()
                    self:LightOff();
                end, 113)
            end
        end
        
        if(GetState(CURRENT_SCREEN, "locker") == "hide") then
            self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "locker_open", "graphics/screens/04_secretroom/location/locker_open", 1282, 758);
            self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "first_aid_kit_shadow", "graphics/screens/04_secretroom/location/first_aid_kit_shadow", 1298, 807);
            self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "first_aid_kit", "graphics/screens/04_secretroom/location/first_aid_kit_part", 1302, 822);
        end
        
        DelayedExec(2.0, function()
            self:SetItemCursor("locker", "eye")
            self:SetMiniGame(mgt_hidden_object)   
            self.mini_game:Init(self.item_list, end_fun);
        end, 113)
        
        self:CreateObj(OBJ_TYPE.TRIGGER, "hall_door_hand", "graphics/screens/04_secretroom/location/hall_door_hand", 627, 461);
        self:CreateObj(OBJ_TYPE.TRIGGER, "chief_eye", "graphics/screens/04_secretroom/location/chief_eye", 495, 288);
        self:CreateLocationPortal("chief_eye", "003_chief", "eye")
        self:CreateLocationPortal("hall_door_hand", "002_hall", "hand")
    else
        MusicPlay({"sound/ambient/01_04_31_ambient.ogg", "sound/music/hospital.ogg"}, 4.1) 
        self:RemoveItem("locker");
    end
    
    if(GetState(CURRENT_SCREEN, "state") == "dark") then
        self:LightOff(true)
    elseif(GetState(CURRENT_SCREEN, "state") == "chandel") then
        self:CandleLighting(true)
    elseif(GetState(CURRENT_SCREEN, "state") == "opened") then
        self:DoorOpen(true)
    end
    
    for found_item in string.gmatch(GetState(CURRENT_SCREEN, "found_obj"), "[_%a%d]+") do
		ItemRemove(self.name, found_item)
		ItemRemove(self.name, found_item.."_shadow")
    end 
    
end

function GameScreen:InitScreen()
    self:LoadScreen()
    
    self.crystal_found_fun = function()
        SetState(CURRENT_SCREEN, "found_obj", GetState(CURRENT_SCREEN,"found_obj").." crystal_04")
        SetState(CURRENT_SCREEN, "found_obj", GetState(CURRENT_SCREEN,"found_obj").." crystal_04_dark")
        SetState(CURRENT_SCREEN, "found_obj", GetState(CURRENT_SCREEN,"found_obj").." crystal_04_nolight")
        SetState(CURRENT_SCREEN, "crystal", "found")
    end
    self:AddHiddenCrystal("crystal_04", self.crystal_found_fun)

    self:SetItemCursor("note_04_part", "eye")
    self:SetItemCursor("note_04_part_nolight", "eye")
    self:SetItemCursor("note_04_part_dark", "eye")
    self:SetItemCursor("profile_fake", "eye")
    self:SetItemCursor("profile_part_nolight", "eye")
    self:SetItemCursor("profile_part_dark", "eye")
    
    self:CreateWallpaperPortal("note_04_part", "note_04_full", 430, 218)
    self:CreateWallpaperPortal("note_04_part_nolight", "note_04_full", 430, 218)
    self:CreateWallpaperPortal("note_04_part_dark", "note_04_full", 430, 218)
    
    self:CreateWallpaperPortal("profile_fake", "profile_full", 427, 9)
    self:CreateWallpaperPortal("profile_part_nolight", "profile_full", 427, 9)
    self:CreateWallpaperPortal("profile_part_dark", "profile_full", 427, 9)  
 
    self:RestoreScene();
        
    self:SetItemSound("bottle_04", "sound/bottle_04.ogg");
    self:SetItemSound("bottle_02", "sound/bottle_03.ogg");
    self:SetItemSound("bottle_03", "sound/bottle_02.ogg");
    self:SetItemSound("bottle_01", "sound/bottle_01.ogg");
    self:SetItemSound("papers", {"sound/paper_rustle.ogg", "sound/paper_rustle_01.ogg"});
    self:SetItemSound("oscillator", {"sound/oscillator_on.ogg", "sound/oscillator_frequency.ogg"});
    self:SetItemSound("radio", {"sound/radio_tuning.ogg", "sound/radio_tuning_01.ogg"});
    self:SetItemSound("shotgun", "sound/shotgun.ogg");
    self:SetItemSound("pistol_big", "sound/pistol_big.ogg");
    self:SetItemSound("pistol_small", "sound/pistol_small.ogg");
    self:SetItemSound("drill", "sound/drill.ogg");
end

function GameScreen:TakeMatch()
    self.drag_obj = {}
    
    SoundPlay("sound/match_fire.ogg")
    DragObject.active = true;
    ItemRemove(self.name, "dark_") 
    self:CreateObj(OBJ_TYPE.NO_ACTIVE, "match_light", "graphics/screens/04_secretroom/location/match_light", 432, 200);
    ItemSetOpacity("match_light", 0.8)
    ItemSetHotSpot("match_light", 144, 108)
    ItemSetScale("match_light", 20.0)
    self.drag_obj.light = "match_light";
    
    DragObject:CreateObj(OBJ_TYPE.NO_ACTIVE, "match", "graphics/screens/04_secretroom/location/match", 432, 200);
    self.drag_obj.match = "match"
    SetVisibleCursor(false)
    ItemSetDepth("match", LAYERS.FRONT_MOST)--[[
    self.match_fire = CreateZoneParticles(HUDScreen, "match", "gfx/match_fire.lua", -52, -35);--]]
    self.match_visible = true
    DragObject:CreateAnim(OBJ_TYPE.NO_ACTIVE, "fire_anim", "graphics/screens/04_secretroom/location/fire_anim", 380, 150);
    ItemSetDepth("fire_anim", LAYERS.FRONT_MOST)
    clApplication.ignore_lock_obj = "candelabre";
end

function GameScreen:LightOff(immediately) 
    Inventory:add_tool("matches_003")
    ItemRemove(self.name, "chief_eye")
    MusicPlay({"sound/music/hospital.ogg", "sound/ambient/01_04_31_ambient.ogg"}, 4.2)

    ItemSetType("chief_eye", OBJ_TYPE.NO_ACTIVE)
    ItemSetType("hall_door_hand", OBJ_TYPE.NO_ACTIVE)
    ItemSetOpacity("chief_eye", 0.0)
    ItemSetOpacity("hall_door_hand", 0.0)
            
    self.inv_fun["matches_003"] = function()
        Inventory:ClueAndHide()   
        HUDScreen:SetMiniGameMode()
        CurrentScreen:TakeMatch()
    end

    ItemRemove(self.name, "locker_open")
    ItemRemove(self.name, "background")
    self:CreateObj(OBJ_TYPE.NO_ACTIVE, "04_light_off", "graphics/screens/04_secretroom/location/04_light_off", 0, 0);
    self:CreateObj(OBJ_TYPE.NO_ACTIVE, "04_darkness", "graphics/screens/04_secretroom/location/04_darkness", 0, 0);
    
    self:CreateObj(OBJ_TYPE.NO_ACTIVE, "bookcase_dark", "graphics/screens/04_secretroom/location/bookcase_dark", 203, 282);
	self:CreateObj(OBJ_TYPE.NO_ACTIVE, "bookcase_cover_01", "graphics/screens/04_secretroom/location/bookcase_cover_01", 157, 266);
	self:CreateObj(OBJ_TYPE.NO_ACTIVE, "bookcase_cover_02", "graphics/screens/04_secretroom/location/bookcase_cover_02", 157, 266);
	self:CreateObj(OBJ_TYPE.TRIGGER, "candelabre", "graphics/screens/04_secretroom/location/candelabre", 1170, 459);
	self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "note_04_part_nolight", "graphics/screens/04_secretroom/location/note_04_part_nolight", 1024, 1049);
	self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "profile_part_nolight", "graphics/screens/04_secretroom/location/profile_part_nolight", 1178, 197);
	
	if(GetState(CURRENT_SCREEN, "crystal") ~= "found") then
   	    self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "crystal_04_nolight_shadow", "graphics/screens/04_secretroom/location/crystal_04_shadow_nolight", 1138, 917);
	    self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "crystal_04_nolight", "graphics/screens/04_secretroom/location/crystal_04_part_nolight", 1137, 889);
	    self:AddHiddenCrystal("crystal_04_nolight", self.crystal_found_fun)
    end
    
	self:CreateObj(OBJ_TYPE.NO_ACTIVE, "dark_", "graphics/trigger", 0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);
	
	local match_apply = function()
	    self:CandleLighting()
	end
	self:AddToolApplyZone("candelabre", "matches_003", match_apply, true);
	
	if(immediately) then
	    ItemSetOpacity("dark_", 0.8)
	    ItemSetPosition("bookcase_dark", 494, 283)
	    ItemRemove(self.name, "crystal_04")
        ItemRemove(self.name, "crystal_04_shadow")
        ItemRemove(self.name, "note_04_part")
	else
	    DelayedExec(2.0, function()
	        HUDScreen:ShowTips({path = self.textures_path.."text_04", x = 320, y = 1112})
            ItemRemove(self.name, "crystal_04", 0.3)
            ItemRemove(self.name, "crystal_04_shadow", 0.3)
            ItemRemove(self.name, "note_04_part", 0.3)
        end, 113)
        
        SoundPlay("sound/secret_door.ogg")
	    PlaySfx("sound/lamp_off.ogg")
        ItemSetOpacity("dark_", 0.0)
        ItemChangeOpacity("dark_", 0.8, 2.0)
        
        ItemSetOpacity("04_darkness", 0)
        ItemChangeOpacity("04_darkness", 1.0, 2.0)
        ItemSetOpacity("bookcase_cover_02", 0)
        ItemChangeOpacity("bookcase_cover_02", 1.0, 2.0)
        ItemSetOpacity("note_04_part_nolight", 0)
        ItemChangeOpacity("note_04_part_nolight", 1.0, 2.0)
        ItemSetOpacity("crystal_04_nolight_shadow", 0)
        ItemChangeOpacity("crystal_04_nolight_shadow", 1.0, 2.0)
        ItemSetOpacity("crystal_04_nolight", 0)
        ItemChangeOpacity("crystal_04_nolight", 1.0, 2.0)
        ItemMove("bookcase_dark", 290, 0, 2.0)
        SetState(CURRENT_SCREEN, "state", "dark")
    end
end

function GameScreen:CandleLighting(immediately)
    SetVisibleCursor(true)
    Inventory:ActiveToolApply()
    HUDScreen:SetDefaultMode()
    self.drag_obj = nil
    DragObject.active = false;
    
    ItemRemove(HUDScreen.name, "match")
    ItemRemove(self.name, "match_light")
    ItemRemove(HUDScreen.name, "fire_anim")
     
    self:CreateObj(OBJ_TYPE.NO_ACTIVE, "04_candle", "graphics/screens/04_secretroom/location/04_candle", 0, 0);
    self:CreateObj(OBJ_TYPE.NO_ACTIVE, "bookcase_candle", "graphics/screens/04_secretroom/location/bookcase_candle", 488, 284);
    self:CreateObj(OBJ_TYPE.NO_ACTIVE, "candle_shadow", "graphics/screens/04_secretroom/location/candle_shadow", 678, 286);
    self:CreateObj(OBJ_TYPE.NO_ACTIVE, "bookcase_cover_03", "graphics/screens/04_secretroom/location/bookcase_cover_03", 157, 266);
    self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "note_04_part_dark", "graphics/screens/04_secretroom/location/note_04_part_dark", 1024, 1049);
    self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "profile_part_dark", "graphics/screens/04_secretroom/location/profile_part_dark", 1178, 197);
    
    if(GetState(CURRENT_SCREEN, "crystal") ~= "found") then
        self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "crystal_04_dark_shadow", "graphics/screens/04_secretroom/location/crystal_04_shadow_dark", 1138, 917);
	    self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "crystal_04_dark", "graphics/screens/04_secretroom/location/crystal_04_part_dark", 1137, 889);
	    self:AddHiddenCrystal("crystal_04_dark", self.crystal_found_fun)
	end
    if(immediately) then
        ItemRemove(self.name, "04_darkness", 0.3)
        ItemRemove(self.name, "bookcase_cover_02", 0.3)
        ItemRemove(self.name, "bookcase_dark", 0.3)
    else
        SetState(CURRENT_SCREEN, "state", "chandel")
        DelayedExec(2.0, function()
            ItemRemove(self.name, "04_darkness", 0.3)
            ItemRemove(self.name, "bookcase_cover_02", 0.3)
            ItemRemove(self.name, "bookcase_dark", 0.3)
            ItemRemove(self.name, "note_04_part_nolight", 0.3)
            ItemRemove(self.name, "crystal_04_nolight", 0.3)
            ItemRemove(self.name, "crystal_04_shadow_nolight", 0.3)
HUDScreen:ShowTips({path = "graphics/screens/04_secretroom/location/text_04a", x = 318, y = 1112})
        end, 113)
    
        ItemSetOpacity("04_candle", 0)
        ItemChangeOpacity("04_candle", 1.0, 2.0)
        ItemSetOpacity("bookcase_candle", 0)
        ItemChangeOpacity("bookcase_candle", 1.0, 2.0)
        ItemSetOpacity("candle_shadow", 0)
        ItemChangeOpacity("candle_shadow", 1.0, 2.0)
        ItemSetOpacity("bookcase_cover_03", 0)
        ItemChangeOpacity("bookcase_cover_03", 1.0, 2.0)
        ItemSetOpacity("note_04_part_dark", 0)
        ItemChangeOpacity("note_04_part_dark", 1.0, 2.0)
        ItemSetOpacity("crystal_04_dark_shadow", 0)
        ItemChangeOpacity("crystal_04_dark_shadow", 1.0, 2.0)
        ItemSetOpacity("crystal_04_dark", 0)
        ItemChangeOpacity("crystal_04_dark", 1.0, 2.0)
        --RemoveGFX(HUDScreen, self.match_fire)
	end
    
    CreateZoneParticles(self, "04_candle", "gfx/match_fire2.lua", 384, -135);

    self:ZoomZoneLink("safe_eye", "004_secretroom_zoom_safe");
    ItemSetDepth("safe_eye", LAYERS.FRONT_MOST)
end

function GameScreen:DoorOpen(immediately)
    SetState("screen_003_chief", "hint", "true")
    self:CreateObj(OBJ_TYPE.NO_ACTIVE, "04_escape", "graphics/screens/04_secretroom/location/04_escape", 0, 0);
    self:CreateObj(OBJ_TYPE.TRIGGER, "hall_door_hand", "graphics/screens/04_secretroom/location/hall_door_hand", 627, 461);
    self:CreateObj(OBJ_TYPE.NO_ACTIVE, "bookcase_cover_04", "graphics/screens/04_secretroom/location/bookcase_cover_04", 157, 266);
    self:CreateLocationPortal("hall_door_hand", "002_hall", "hand")
    
    self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "note_04_part_dark", "graphics/screens/04_secretroom/location/note_04_part_dark", 1024, 1049);
    self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "profile_part_dark", "graphics/screens/04_secretroom/location/profile_part_dark", 1178, 197);
    
    if(GetState(CURRENT_SCREEN, "crystal") ~= "found") then
        self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "crystal_04_dark_shadow", "graphics/screens/04_secretroom/location/crystal_04_shadow_dark", 1138, 917);
        self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "crystal_04_dark", "graphics/screens/04_secretroom/location/crystal_04_part_dark", 1137, 889);
        self:AddHiddenCrystal("crystal_04_dark", self.crystal_found_fun)
    end
    CreateZoneParticles(self, "04_escape", "gfx/match_fire2.lua", 384, -135);
    
    if(immediately) then
        ItemSetType("chief_eye", OBJ_TYPE.TRIGGER)
        ItemSetType("hall_door_hand", OBJ_TYPE.TRIGGER)
        ItemSetOpacity("chief_eye", 1.0)
        ItemSetOpacity("hall_door_hand", 1.0)
    else
        ItemSetDepthByOther("04_escape", "04_candle")
        DelayedExec(2.0, function()
            ItemSetType("chief_eye", OBJ_TYPE.TRIGGER)
            ItemSetType("hall_door_hand", OBJ_TYPE.TRIGGER)
            ItemSetOpacity("chief_eye", 1.0)
            ItemSetOpacity("hall_door_hand", 1.0)
            ItemRemove(self.name, "04_candle")
            ItemRemove(self.name, "bookcase_cover_03")
            ItemRemove(self.name, "crystal_04_dark", 0.3)
            ItemRemove(self.name, "crystal_04_dark_shadow", 0.3)
        end, 113)
        ItemRemove(self.name, "candle_shadow", 2.0)
        ItemMove("bookcase_candle", -320, 0, 2.0)
        SoundPlay("sound/secret_door.ogg")
        ItemSetOpacity("04_escape", 0.0)
        ItemChangeOpacity("04_escape", 1.0, 2.0)
        ItemSetOpacity("bookcase_cover_04", 0.0)
        ItemChangeOpacity("bookcase_cover_04", 1.0, 2.0)
    end
    
    self:CreateObj(OBJ_TYPE.TRIGGER, "chief_eye", "graphics/screens/04_secretroom/location/chief_eye", 495, 288);
    self:CreateLocationPortal("chief_eye", "003_chief", "eye")
end

function GameScreen:OnSkip()
    if(GetState(CURRENT_SCREEN, "state") == "dark") then
        self:CandleLighting()
    end
end

function GameScreen:onObjectClick(item_name)
    if(item_name == "hall_door_hand") then
        SoundPlay("sound/chief_door_open_02.ogg")
    end
end 

function GameScreen:Update()
    if(clApplication.game_pause) then return end
    
    if(self.drag_obj) then
        ItemSetPosition(self.drag_obj.light, messenger_table.mouse_X  - 144, messenger_table.mouse_Y - 108);
        ItemSetPosition(self.drag_obj.match, messenger_table.mouse_X - 5, messenger_table.mouse_Y - 5);
        ItemSetPosition("fire_anim", messenger_table.mouse_X - 25, messenger_table.mouse_Y - 110);
    end
end


------------------------------------------------------------------------------------------------------
-------------------------------------------Mouse functions--------------------------------------------
------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------
function GameScreen:LoadScreen()
	--[[---Background---]]--
	if(GetState(CURRENT_SCREEN, "ho") ~= "completed") then
	    self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "background", "graphics/screens/04_secretroom/location/04_secretroom", 0, 0);
	end
	
	
	self:CreateObj(OBJ_TYPE.TRIGGER, "bottle_04", "graphics/screens/04_secretroom/location/bottle_04", 1248, 564);
	self:CreateObj(OBJ_TYPE.TRIGGER, "bottle_03", "graphics/screens/04_secretroom/location/bottle_03", 1208, 308);
	self:CreateObj(OBJ_TYPE.TRIGGER, "bottle_02", "graphics/screens/04_secretroom/location/bottle_02", 1144, 509);
	self:CreateObj(OBJ_TYPE.TRIGGER, "bottle_01", "graphics/screens/04_secretroom/location/bottle_01", 1178, 678);
	self:CreateObj(OBJ_TYPE.TRIGGER, "papers", "graphics/screens/04_secretroom/location/papers", 100, 372);
	self:CreateObj(OBJ_TYPE.TRIGGER, "oscillator", "graphics/screens/04_secretroom/location/oscillator", 1370, 648);
	self:CreateObj(OBJ_TYPE.TRIGGER, "radio", "graphics/screens/04_secretroom/location/radio", 1237, 95);
	self:CreateObj(OBJ_TYPE.TRIGGER, "shotgun", "graphics/screens/04_secretroom/location/shotgun", 1427, 189);
	self:CreateObj(OBJ_TYPE.TRIGGER, "pistol_big", "graphics/screens/04_secretroom/location/pistol_big", 1411, 443);
	self:CreateObj(OBJ_TYPE.TRIGGER, "pistol_small", "graphics/screens/04_secretroom/location/pistol_small", 1414, 359);
	self:CreateObj(OBJ_TYPE.TRIGGER, "drill", "graphics/screens/04_secretroom/location/drill", 925, 952);
-------------------------------------
	self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "escape", "graphics/screens/04_secretroom/location/escape", 488, 284);
	self:CreateObj(OBJ_TYPE.TRIGGER, "safe_eye", "graphics/screens/04_secretroom/zoom_safe/safe_eye", 860, 538);
    
	self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "crystal_04_shadow", "graphics/screens/04_secretroom/location/crystal_04_shadow", 1132, 883);
	self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "crystal_04", "graphics/screens/04_secretroom/location/crystal_04_part", 1132, 885);

	--self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "profile_shadow_fake", "graphics/screens/04_secretroom/location/profile_shadow", 1178, 197);
	self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "profile_fake", "graphics/screens/04_secretroom/location/profile_part", 1178, 197);
      -----------------------HO
    self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "tape_measure", "graphics/screens/04_secretroom/location/tape_measure_part", 317, 1016);
	self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "map_shadow", "graphics/screens/04_secretroom/location/map_shadow", 109, 570);
	self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "map", "graphics/screens/04_secretroom/location/map_part", 93, 497);
	self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "binocular", "graphics/screens/04_secretroom/location/binocular_part", 910, 383);
	self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "remote_control", "graphics/screens/04_secretroom/location/remote_control_part", 1422, 735);
	self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "flask", "graphics/screens/04_secretroom/location/flask_part", 155, 344);
	self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "safety_fuse", "graphics/screens/04_secretroom/location/safety_fuse_part", 1340, 212);
	self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "wrench", "graphics/screens/04_secretroom/location/wrench_part", 636, 183);
	self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "audio_tape", "graphics/screens/04_secretroom/location/audio_tape_part", 1077, 223);
	self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "key", "graphics/screens/04_secretroom/location/key_part", 1294, 575);
	self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "bag_shadow", "graphics/screens/04_secretroom/location/bag_shadow", 935, 581);
	self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "bag", "graphics/screens/04_secretroom/location/bag_part", 936, 589);
	--self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "profile_shadow", "graphics/screens/04_secretroom/location/profile_shadow", 1140, 398);
	self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "profile", "graphics/screens/04_secretroom/location/profile_part", 1178, 197);
	

	---------------------------------------
	
	self:CreateObj(OBJ_TYPE.TRIGGER, "locker", "graphics/screens/04_secretroom/location/locker_eye", 1288, 802);

	self:CreateObj(OBJ_TYPE.ACTIVE_ALL, "note_04_part", "graphics/screens/04_secretroom/location/note_04_part", 1024, 1049);
    
    clScreenManager:add_screen("hud") 
end