DecadePromptHeading = ID_PROMPT_1_OFFSET;

-----------------------------------------------------------------------------------------
-- SetCamPos. A standard wrapped function for setting up initial camera positions
-----------------------------------------------------------------------------------------
function SetCamPos(x, y, z, lx, ly, lz)
	Camera.SetMode(FREECAM);
	Camera.x = x;
	Camera.y = y;
	Camera.z = z;
	Camera.lx = lx;
	Camera.ly = ly;
	Camera.lz = lz;
end;

-----------------------------------------------------------------------------------------
-- used to register prompts for future appearances
-----------------------------------------------------------------------------------------
function RegisterPrompt(a, day, hours, mins)
	numticks = (day-1)*GAME_YEAR + (hours-HOUR_9)*GAME_HOUR + mins*GAME_MINUTE;
	C_TriggerEventAbsolute("CreatePrompt", numticks, a);
end;

-----------------------------------------------------------------------------------------
-- BlockCam. A standard event to set Block Camera
-----------------------------------------------------------------------------------------
function EVENT_BlockCam(a)
	Camera.SetMode(BLOCKCAM, a);
end;

-----------------------------------------------------------------------------------------
-- OrbitCam. A standard event to set Orbit Camera
-----------------------------------------------------------------------------------------
function EVENT_OrbitCam(a)
	Camera.SetMode(ORBITCAM, a);
end;

-----------------------------------------------------------------------------------------
-- DistrictCam. A standard event to set District Camera
-----------------------------------------------------------------------------------------
function EVENT_DistrictCam(a)
	Camera.SetMode(DISTRICTCAM, a);
end;

function EVENT_SetPlanView()
	Camera.SetPlanView();
end;


-----------------------------------------------------------------------------------------
-- Takes a list and an entry, and returns the value at that entry.
-----------------------------------------------------------------------------------------
function GetListEntry(t, a)
	local count = 0;
	a = (t.n - a) + 1;
	if a < 0 then return nil end
	for i,v in t do
		count = count + 1
		if count == a then
			return v;
		end;
	end;
	return nil;
end;

------------------------------------------------
-- INTRODUCTION OF BUSINESSES AND COMMODITIES --
------------------------------------------------

function EVENT_BusinessIntro1940(bypass)
	BusinessInfo[ANTIQUE_STORE].available = true;
	Commodity[ANTIQUES].active = true;
	BusinessInfo[POOL_HALL].available = true;
	Commodity[GAMING].active = true;
	BusinessInfo[ICECREAM_PARLOUR].available = true;
	Commodity[SWEETS].active = true;
	BusinessInfo[NIGHTCLUB].available = true;
	if not bypass then
		Interface.CreatePrompt(DecadePromptHeading+1, DecadePromptHeading+2, 0, DecadePromptHeading+3);
		C_PlaySound("harpstrum.wav");
	end
end;

function EVENT_BusinessIntro1950(bypass)
	BusinessInfo[FAST_FOOD_OUTLET].available = true;
	Commodity[FASTFOOD].active = true;
	BusinessInfo[MUSIC_STORE].available = true;
	Commodity[MUSIC_TAPES].active = true;
	BusinessInfo[DELI].available = true;
	BusinessInfo[SPORTS_STORE].available = true;
	Commodity[RECREATIONAL_GOODS].active = true;
	if not bypass then
		Interface.CreatePrompt(DecadePromptHeading+1, DecadePromptHeading+2, 0, DecadePromptHeading+4);
		C_PlaySound("harpstrum.wav");
	end;
end;

function EVENT_BusinessIntro1960(bypass)
	BusinessInfo[PHARMACY].available = true;
	BusinessInfo[BOWLING_ALLEY].available = true;
	BusinessInfo[TRAVEL_AGENCY].available = true;
	Commodity[VACATIONS].active = true;
	BusinessInfo[GENERAL_STORE].available = true;
	if not bypass then
		Interface.CreatePrompt(DecadePromptHeading+1, DecadePromptHeading+2, 0, DecadePromptHeading+5);
		C_PlaySound("harpstrum.wav");
	end;
end;

function EVENT_BusinessIntro1970(bypass)
	BusinessInfo[VIDEO_STORE].available = true;
	Commodity[VIDEOS].active = true;
	BusinessInfo[HEALTH_CLINIC].available = true;
	BusinessInfo[AMUSEMENT_ARCADE].available = true;
	BusinessInfo[DEPARTMENT_STORE].available = true;
	if not bypass then
		Interface.CreatePrompt(DecadePromptHeading+1, DecadePromptHeading+2, 0, DecadePromptHeading+6);
		C_PlaySound("harpstrum.wav");
	end;
end;

function EVENT_BusinessIntro1980(bypass)
	BusinessInfo[SUPERMARKET].available = true;
	BusinessInfo[COMPUTER_STORE].available = true;
	Commodity[COMPUTERS].active = true;
	BusinessInfo[PHONE_SHOP].available = true;
	Commodity[CELL_PHONES].active = true;
	BusinessInfo[ELECTRICAL_SUPERSTORE].available = true;
	if not bypass then
		Interface.CreatePrompt(DecadePromptHeading+1, DecadePromptHeading+2, 0, DecadePromptHeading+7);
		C_PlaySound("harpstrum.wav");
	end;
end;
