/gamedata.pas
unit GameData;
interface
type
City = (Chicago, Manchester, Hamburg, Yokohama, Delhi, Melbourne,
Beijing, RioDeJaneiro, Mombasa, StPetersburg);
CityParam = record
city: City;
person: Byte; { 'personN.cbi' }
talkClue: Byte; { index into talkClues }
researchClue: Byte; { index into researchClues }
lookClue: Byte; { index into lookClues }
end;
GameState = record
game: Byte; { index into gameName }
currentCity: City; { current city }
totalCities: Byte; { total number of cities in session }
progress: Byte; { index into cities; increments when successfully guessed }
hours: Word; { just for fun }
path: array[0..9] of CityParam; { list of cities to visit }
end;
ClueList = array[0..2] of String;
PClueStr = ^String;
const days: array[0..6] of String = ('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');
const cityName: array[City] of String = (
'Chicago',
'Manchester',
'Hamburg',
'Yokohama',
'Delhi',
'Melbourne',
'Beijing',
'Rio de Janeiro',
'Mombasa',
'St. Petersburg'
);
const cityDetail: array[City] of String = (
'Wrigley Field',
'Old Trafford',
'St. Pauli Piers',
'Minato Mirai 21',
'Jama Masjid',
'Williamstown Park',
'The Palace Museum',
'Botafogo Bay',
'Old Town',
'Church of the Savior'
);
const cityCountry: array[City] of String = (
'USA',
'UK',
'Germany',
'Japan',
'India',
'Australia',
'China',
'Brazil',
'Kenya',
'Russia'
);
const cityBackgrounds: array[City] of String = (
'chicago',
'manchest',
'hamburg',
'yokohama',
'delhi',
'melbourn',
'beijing',
'riodejan',
'mombasa',
'stpeters'
);
const citySongs: array[City] of String = (
'funk',
'elise',
'polkatim',
'soshunfu',
'lisztwal',
'btlboog',
'gavotte',
'song3',
'stomp',
'fndngio'
);
const gameName: array[0..9] of String = (
'Return to Castle Wolfenstein',
'Corncob 3D',
'Elite',
'Thexder',
'Altered Beast',
'Shufflepuck Cafe',
'Prince of Persia',
'Adventure',
'Oregon Trail',
'Where in the World is Carmen Sandiego'
);
const talkClues: array[City] of ClueList = (
{ Chicago } (
'He hooted about getting a hot dog without ketchup.',
'It''s weird that an owl wants to hang out with bears and cubs.',
'He seemed excited about visiting the birthplace of House music.'
),
{ Manchester } (
'He seemed excited to see a football match.',
'I guess he''s a big fan of Oasis? Wanted to see where they''re from.',
'That owl said he was going to the city where both Jane Eyre and The Communist Manifesto were started.'
),
{ Hamburg } (
'He wanted to take a walk through the Planten un Blomen park. Do owls even walk?',
'He said he was in for a long night of museums.',
'I guess he was hungry because he kept talking about hamburgers.'
),
{ Yokohama } (
'I forget where he said he was going but I think it was a kind of car tire?',
'He went on and on about his favorite pro wrestler, Natsupoi.',
'He said he was excited to see the CupNoodles Museum.'
),
{ Delhi } (
'He said he had a hankerin'' for some butter chicken.',
'He said he was going to meet a Dilliwalla friend',
'He was excited to meet other birds in this city''s many ponds'
),
{ Melbourne } (
'He''s a big fan of the movie Mad Max. He went to see where it was filmed.',
'He said to "Meet me under the clocks". Plural. More than one clock.',
'He said he wanted to get an espresso at ST. ALi.'
),
{ Beijing } (
'He said they were famous for their ducks. Maybe he has a cousin there?',
'He told me about how he was there for the Olympics in 2008.',
'He was going to a forbidden city? Don''t know how he expects to get in.'
),
{ Rio } (
'He said it was nothing like the movie with all the birds.',
'He says you have to make it out for Carnival at least once in your life.',
'I don''t think I''d want to live somewhere where a statue of Jesus is always looking down on me.'
),
{ Mombasa } (
'He said he was headed for the white and blue city.',
'He said he wanted to listen to safari sound and them mushrooms. Whatever that means.',
'I didn''t peg him for a religious owl, but he said he was going to Fort Jesus.'
),
{ St. Petersburg } (
'He said he was on his way to the "Venice of the North".',
'I forget where he said he was going. Petrograd? Leningrad? Something like that.',
'He said he was headed north but I think it was a city in Florida?'
)
);
const researchClues: array[City] of ClueList = (
{ Chicago } (
'This city is known for its elevated rail.',
'It had the tallest building in the world from 1973 to 1998.',
'It''s famous for fires despite being built on a swamp.'
),
{ Manchester } (
'This city is the sister city to Los Angeles and Amsterdam.',
'It was the world''s first industrialized city.',
'It''s the home of the largest theater in the round in its country.'
),
{ Hamburg } (
'It''s probably named after a castle ordered to be built by Empereror Charlemagne in 808.',
'It is a major port on the River Elbe.',
'It houses the headquarters of the world''s oldest merchant bank.'
),
{ Yokohama } (
'It has the global headquarters of Nissan.',
'It was the site of its country''s first global port, opened in 1859.',
'It was featured in Around the World in Eighty Days even though Jules Verne had never been there.'
),
{ Delhi } (
'It is situated on the Yamuna River.',
'It is home of the International Mango Festival.',
'It is the second largest metropolitan area in the world.'
),
{ Melbourne } (
'It was founded by John Batman.',
'It is the birthplace of Chris Hemsworth and Cate Blanchett.',
'This city grew hugely due to the Victorian gold rush.'
),
{ Beijing } (
'This city used to be home to the emperor',
'Like a tree, this city''s growth is marked by rings - six roads spreading out from its center.',
'This city has several rivers flowing through it, which flow into the Bohai Sea.'
),
{ Rio } (
'This city was founded by the Portugese in 1565.',
'This city is known for both samba and bossa nova.',
'You''ve arrived when you pass Sugarloaf Mountain.'
),
{ Mombasa } (
'This city is centered on an island and is separated from the mainland by Port Reitz and Tudor Creek.',
'It is the sister city of Seattle and Long Beach.',
'It is the birthplace of Mercedes Iman Diamond.'
),
{ St. Petersburg } (
'It is situated on the Neva River.',
'The city was founded by Peter the Great',
'This was the birthplace of Anton Yelchin.'
)
);
const lookClues: array[City] of ClueList = (
{ Chicago } (
'a peeled off label for Green River soda',
'a half eaten pizza puff',
'an old ticket for a game at Wrigley Field'
),
{ Manchester } (
'a newspaper clipping from The Guardian, 1959',
'a ticket for the Metrolink',
'a piece of letterhead for THG plc'
),
{ Hamburg } (
'a ripped cover from an issue of Der Spiegel',
'a ticket for the U-Bahn',
'a photo of a half-assembled Airbus A320'
),
{ Yokohama } (
'a biography of journalist Lily Abegg',
'an old ticket for Stardom Mid Summer Champions 2023',
'a copy of Pokemon Green with a note that says "Vermilion City"'
),
{ Delhi } (
'a ticket for a cricket match at Arun Jaitley Stadium',
'an advertisement for the Jantar Mantar',
'a map showing directions to Gali Paranthe Wali'
),
{ Melbourne } (
'a jar of Vegemite',
'the original black box flight recorder',
'a flyer from the Midsumma Festival'
),
{ Beijing } (
'a flyer for the gardens at Beihai Park',
'a ticket for the Temple of Heaven',
'a cassette tape for a band called Black Panther'
),
{ Rio } (
'a signed portrait of Nelson Piquet, dated March 21, 1982',
'a copy of A Moreninha checked out from the National Library',
'a ferry ticket to Charitas'
),
{ Mombasa } (
'a ticket for Mbaraki Sports Grounds',
'a picture of two pairs of tusks arcing over a roadway',
'a copy of Halo 3: ODST'
),
{ St. Petersburg } (
'Mendeleev''s periodic table of elements',
'a very old theremin',
'a ticket for The State Hermitage Museum'
)
);
const Dunno: array[0..4] of String = (
'An owl took your floppy disk? Are you feeling alright?',
'I haven''t seen any owls, man.',
'Sure is a nice day, huh?',
'You seem kinda lost, buddy.',
'How about that local sports team?'
);
var gs: GameState;
;
;
;
: boolean;
: PClueStr;
: PClueStr;
: PClueStr;
implementation
uses GfxText;
;
var i, j, k: Integer;
p: ^Byte;
label restart;
begin
Randomize;
gs.game := Random(10);
gs.totalCities := 5;
gs.progress := 0;
gs.hours := 16 + Random(5);
for i := 0 to gs.totalCities do begin
restart:
gs.path[i].city := City(Random(Word(High(City)) + 1)); { yikes }
if i > 0 then
for j := 0 to i - 1 do
if gs.path[j].city = gs.path[i].city then
Goto restart;
with gs.path[i] do begin
person := Random(10);
talkClue := Random(3);
researchClue := Random(3);
lookClue := Random(3);
end;
end;
gs.currentCity := gs.path[0].city;
end;
;
var i: Integer;
s1, s2: String;
c: City;
begin
WriteLine(0, 0, 'Lost game: ' + gameName[gs.game], 50);
Str(gs.progress + 1, s1);
Str(gs.totalCities, s2);
WriteLine(0, 1, 'Currently in ' + cityName[gs.currentCity] + '. Completed ' + s1 + ' of ' + s2 + ' cities', 50);
for i := 0 to gs.totalCities - 1 do begin
c := gs.path[i].city;
WriteLine(0, i * 4 + 2, cityName[c] + ':', 50);
WriteLine(2, i * 4 + 3, 't:' + talkClues[c, gs.path[i].talkClue], 50);
WriteLine(2, i * 4 + 4, 'r:' + researchClues[c, gs.path[i].researchClue], 50);
WriteLine(2, i * 4 + 5, 'l:' + lookClues[c, gs.path[i].lookClue], 50);
end;
end;
;
begin
if (gs.progress < gs.totalCities) AND (gs.currentCity = gs.path[gs.progress + 1].city) then begin
Inc(gs.progress);
gs.hours := gs.hours + 5 + Random(20);
end;
end;
: boolean;
begin
OnPath := gs.currentCity = gs.path[gs.progress].city;
end;
: boolean;
begin
EndGame := gs.progress = gs.totalCities - 1;
end;
: PClueStr;
var c: City;
begin
if OnPath then begin
c := gs.path[Succ(gs.progress)].city;
GetTalkClue := @talkClues[c, gs.path[Succ(gs.progress)].talkClue];
end
else
GetTalkClue := @Dunno[Random(5)];
end;
: PClueStr;
var c: City;
begin
if OnPath then begin
c := gs.path[Succ(gs.progress)].city;
GetResearchClue := @researchClues[c, gs.path[Succ(gs.progress)].researchClue];
end
else
GetResearchClue := nil;
end;
: PClueStr;
var c: City;
begin
if OnPath then begin
c := gs.path[Succ(gs.progress)].city;
GetLookClue := @lookClues[c, gs.path[Succ(gs.progress)].researchClue]
end
else
GetLookClue := nil
end;
end.