1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 /*
24  * This code is based on the original source code of Lord Avalot d'Argent version 1.3.
25  * Copyright (c) 1994-1995 Mike, Mark and Thomas Thurman.
26  */
27 
28 /* CLOSING		The closing screen and error handler. */
29 
30 #include "avalanche/avalanche.h"
31 #include "avalanche/closing.h"
32 
33 #include "common/random.h"
34 
35 namespace Avalanche {
36 
Closing(AvalancheEngine * vm)37 Closing::Closing(AvalancheEngine *vm) {
38 	_vm = vm;
39 	warning("STUB: Closing::Closing()");
40 }
41 
getScreen(ScreenType which)42 void Closing::getScreen(ScreenType which) {
43 	warning("STUB: Closing::getScreen()");
44 }
45 
showScreen()46 void Closing::showScreen() {
47 	warning("STUB: Closing::showScreen()");
48 }
49 
putIn(Common::String str,uint16 where)50 void Closing::putIn(Common::String str, uint16 where) {
51 	warning("STUB: Closing::putIn()");
52 }
53 
exitGame()54 void Closing::exitGame() {
55 	static const char nouns[12][14] = {
56 		"sackbut", "harpsichord", "camel",   "conscience", "ice-cream", "serf",
57 		"abacus",  "castle",      "carrots", "megaphone",  "manticore", "drawbridge"
58 	};
59 
60 	static const char verbs[12][12] = {
61 		"haunt",    "daunt",  "tickle",   "gobble",    "erase",    "provoke",
62 		"surprise", "ignore", "stare at", "shriek at", "frighten", "quieten"
63 	};
64 
65 	_vm->_sound->stopSound();
66 
67 	getScreen(kScreenNagScreen);
68 	byte nounId = _vm->_rnd->getRandomNumber(11);
69 	byte verbId = _vm->_rnd->getRandomNumber(11);
70 	Common::String result = Common::String::format("%s will %s you", nouns[nounId], verbs[verbId]);
71 	putIn(result, 1628);
72 	showScreen(); // No halt- it's already set up.
73 }
74 
75 } // End of namespace Avalanche.
76