diff options
Diffstat (limited to 'engines/avalanche/highs.cpp')
-rw-r--r-- | engines/avalanche/highs.cpp | 141 |
1 files changed, 0 insertions, 141 deletions
diff --git a/engines/avalanche/highs.cpp b/engines/avalanche/highs.cpp deleted file mode 100644 index bd8a5c3ce4..0000000000 --- a/engines/avalanche/highs.cpp +++ /dev/null @@ -1,141 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - */ - -/* - * This code is based on the original source code of Lord Avalot d'Argent version 1.3. - * Copyright (c) 1994-1995 Mike, Mark and Thomas Thurman. - */ - -/* - ÛßÜ ÛßÜ ÜßßÜ ßÛß Ûßß Üß ßÛß ÜßÛßÜ ßÛß ÛÜ Û ÜÛßß ßÛß ÛßÜ Ûßß Û - Ûß ÛÛ Û Û Ü Û Ûßß ßÜ Û Û Û Û Û Û ÛÜÛ ßßßÜ Û ÛÛ Ûßß Û - ß ß ß ßß ßß ßßß ß ß ß ß ß ßßß ß ßß ßßß ß ß ß ßßß ßßß - - HIGHS This handles the high-scores. */ - -#define __highs_implementation__ - - -#include "highs.h" - - -/*#include "Gyro.h"*/ -/*#include "Scrolls.h"*/ - -namespace Avalanche { - -typedef array < 1, 12, struct A1 { - varying_string<30> name; - word score; - varying_string<12> rank; -} > highscoretype; - -highscoretype h; - -void get_new_highs() { - byte fv; - for (fv = 1; fv <= 12; fv ++) { - A1 &with = h[fv]; - with.score = 32 - fv * 2; - with.rank = "..."; - } - h[1].name = "Mike"; - h[2].name = "Liz"; - h[3].name = "Thomas"; - h[4].name = "Mark"; - h[5].name = "Mandy"; - h[6].name = "Andrew"; - h[7].name = "Lucy Tryphena"; - h[8].name = "Tammy the dog"; - h[9].name = "Avaricius"; - h[10].name = "Spellchick"; - h[11].name = "Caddelli"; - h[12].name = "Spludwick"; -} - -void show_highs() -/* This procedure shows the high-scores. */ -{ - byte fv; - varying_string<40> x; - varying_string<5> y; - display("HIGH SCORERS\3\r Name\n\nScore Rank\r \"\"\"\"\n\n\"\"\"\"\" \"\"\"\"\f\4"); - for (fv = 1; fv <= 12; fv ++) { - A1 &with = h[fv]; - display(string('\15') + with.name + '\4'); - fillchar(x, sizeof(x), '\40'); - y = strf(with.score); - x[0] = chr(29 - (length(with.name + y))); - display(x + y + ' ' + with.rank + '\4'); - } - - display(""); -} - -void store_high(string who) -/* This procedure shows the high-scores. */ -{ - byte fv, ff; - - for (fv = 1; fv <= 12; fv ++) - if (h[fv].score < dna.score) flush(); - - /* Shift all the lower scores down a space. */ - for (ff = fv; ff <= 11; ff ++) - h[ff + 1] = h[ff]; - - { - A1 &with = h[fv]; - with.name = who; - with.score = dna.score; - } - -} - -void get_highs() { - file<highscoretype> f; - /*$I-*/ - assign(f, "scores.avd"); - reset(f); - /* Did we get it? */ - - if (ioresult != 0) { - ; /* No. */ - get_new_highs(); /* Invent one. */ - } else { - ; /* Yes. */ - f >> h; - close(f); - } -} - -class unit_highs_initialize { -public: - unit_highs_initialize(); -}; -static unit_highs_initialize highs_constructor; - -unit_highs_initialize::unit_highs_initialize() { - get_highs(); -} - -} // End of namespace Avalanche.
\ No newline at end of file |