-- directory strings ----------------------------------------------------------
-- previously defined --
--main_dir = "D:/My Programming Projects/Art Thief/"
--media_dir = "./media/"
--src_dir = "./src/"

data_dir = "./data/"
E.set_typeface(media_dir .. "VeraBd.ttf", 5)

-- setup camera/display settings
-- default_host = E.add_host("default", viewport.x, viewport.y, viewport.w, viewport.h)
-- E.set_host_flags(default_host, E.host_flag_full, true)

-- global variables -----------------------------------------------------------
-- define variables here that will be read in game.lua to set up player context
-- define variables that will set up joystick controls, display etc.
-- knowledge nuggets
know_start_dialog = 100
know_nothing = 0
know_ask_map = 1
know_has_map = 2
know_name = 3
know_not_italian = 4
know_russian = 5
know_painter = 6
know_not_social_realism = 7
know_abstract1 = 8
know_abstract2 = 9
know_abstract3 = 10
know_spirituality = 11
know_time = 12
know_title = 13

know_everything = 14

player_pos = { }
player_view = { }
player_dir = { }

if not load_game_num then
	player_pos.x, player_pos.y, player_pos.z = 40, 3, 35 -- position player above floor
	player_view.x, player_view.y, player_view.z = 0,90,0
	player_dir.x, player_dir.y, player_dir.z = 0,0,0
	player_knowledge = know_nothing
	--player_knowledge = know_not_social_realism
	
	first_talk_states = nil
	start_opening_dialog = true
	-- load fresh player context, they haven't done anything
else
	start_opening_dialog = false
	-- TODO load from config file
	-- load player context from file, what have they accomplished, where are they located?
    load_state = io.open(media_dir .. "game_state" .. tostring(load_game_num) .. ".sav")
    player_pos.x, player_pos.y, player_pos.z, player_view.y, player_knowledge = load_state:read("*number", "*number", "*number", "*number", "*number")
    player_view.x, player_view.z = 0,0
    assert( load_state:close() )
end
