AVALANCHE: Remove logger
This commit is contained in:
parent
666d3eecfc
commit
543c4f59da
11 changed files with 1 additions and 411 deletions
|
@ -1603,7 +1603,6 @@ void Acci::doThat() {
|
|||
_vm->_gyro->dna.playednim++;
|
||||
|
||||
// You won - strange!
|
||||
_vm->_logger->log_aside("You won.");
|
||||
_vm->_visa->dixi('Q', 7); // You won! Give us a lute!
|
||||
_vm->_gyro->dna.obj[_vm->_gyro->lute - 1] = true;
|
||||
_vm->_lucerna->objectlist();
|
||||
|
|
|
@ -66,7 +66,6 @@ AvalancheEngine::~AvalancheEngine() {
|
|||
delete _avalot;
|
||||
delete _gyro;
|
||||
delete _enhanced;
|
||||
delete _logger;
|
||||
delete _pingo;
|
||||
delete _scrolls;
|
||||
delete _visa;
|
||||
|
@ -88,7 +87,6 @@ Common::ErrorCode AvalancheEngine::initialize() {
|
|||
_avalot = new Avalot(this);
|
||||
_gyro = new Gyro(this);
|
||||
_enhanced = new Enhanced(this);
|
||||
_logger = new Logger(this);
|
||||
_pingo = new Pingo(this);
|
||||
_scrolls = new Scrolls(this);
|
||||
_visa = new Visa(this);
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#include "avalanche/avalot.h"
|
||||
#include "avalanche/gyro2.h"
|
||||
#include "avalanche/enhanced2.h"
|
||||
#include "avalanche/logger2.h"
|
||||
#include "avalanche/pingo2.h"
|
||||
#include "avalanche/scrolls2.h"
|
||||
#include "avalanche/visa2.h"
|
||||
|
@ -77,7 +76,6 @@ public:
|
|||
Avalot *_avalot;
|
||||
Gyro *_gyro;
|
||||
Enhanced *_enhanced;
|
||||
Logger *_logger;
|
||||
Pingo *_pingo;
|
||||
Scrolls *_scrolls;
|
||||
Visa *_visa;
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
#include "avalanche/scrolls2.h"
|
||||
#include "avalanche/dropdown2.h"
|
||||
#include "avalanche/pingo2.h"
|
||||
#include "avalanche/logger2.h"
|
||||
#include "avalanche/timeout2.h"
|
||||
#include "avalanche/celer2.h"
|
||||
#include "avalanche/enid2.h"
|
||||
|
|
|
@ -559,7 +559,7 @@ public:
|
|||
Common::String roomname; /* Name of this room */
|
||||
|
||||
//text logfile; // http://wiki.freepascal.org/Text
|
||||
bool logging, log_epson;
|
||||
bool log_epson;
|
||||
|
||||
bool cl_override;
|
||||
|
||||
|
|
|
@ -1,289 +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.
|
||||
*/
|
||||
|
||||
/* LOGGER Handles the logging. */
|
||||
|
||||
#include "avalanche/avalanche.h"
|
||||
|
||||
#include "avalanche/logger2.h"
|
||||
#include "avalanche/gyro2.h"
|
||||
#include "avalanche/trip6.h"
|
||||
|
||||
#include "common/textconsole.h"
|
||||
|
||||
namespace Avalanche {
|
||||
const char Logger::divide[] = "--- oOo ---";
|
||||
|
||||
/* Epson codes:
|
||||
|
||||
startwith='';
|
||||
endwith='';
|
||||
double_width = #14; { shift out (SO) }
|
||||
double_off = #20; { device control 4 (DC4) }
|
||||
italic = #27+'4'; { switches italics on... }
|
||||
italic_off = #27+'5'; { and off. }
|
||||
emph_on = #27+#69;
|
||||
emph_off = #27+#70;
|
||||
divide_indent = 15;
|
||||
|
||||
*/
|
||||
|
||||
/* L'jet codes: */
|
||||
|
||||
// Not sure if these will be needed at all...
|
||||
|
||||
const Common::String startwith = Common::String(33) + 50 + "10J" + 130;
|
||||
const Common::String endwith = Common::String(33) + 105;
|
||||
const Common::String italic = Common::String(33) + 50 + 163 + 61 + 123; /* switches italics on... */
|
||||
const Common::String italic_off = Common::String(33) + 50 + 163 + 60 + 123; /* and off. */
|
||||
const Common::String emph_on = Common::String(33) + 50 + 163 + 63 + 102;
|
||||
const Common::String emph_off = Common::String(33) + 50 + 163 + 60 + 102;
|
||||
|
||||
const Common::String double_width = emph_on; /* There IS no double-width. */
|
||||
const Common::String double_off = emph_off; /* So we'll have to use bold. */
|
||||
|
||||
|
||||
|
||||
const Common::String Logger::quote = "ª";
|
||||
const Common::String Logger::unquote = "º";
|
||||
const Common::String Logger::copyright = "(c)";
|
||||
const int16 Logger::divide_indent = 30;
|
||||
|
||||
|
||||
|
||||
Logger::Logger(AvalancheEngine *vm) {
|
||||
_vm = vm;
|
||||
}
|
||||
|
||||
void Logger::centre(byte size, byte x) { /* Prints req'd number of spaces. */
|
||||
byte fv;
|
||||
|
||||
if (!_vm->_gyro->logging)
|
||||
return;
|
||||
|
||||
warning("STUB: Logger::centre()");
|
||||
/*for (fv = 1; fv <= size - (x / 2); fv++)
|
||||
output << logfile << ' ';*/
|
||||
}
|
||||
|
||||
void Logger::log_setup(Common::String name, bool printing) { /* Sets up. */
|
||||
|
||||
warning("STUB: Logger::log_setup()");
|
||||
|
||||
/* assign(logfile, name);
|
||||
rewrite(logfile);
|
||||
output << logfile << startwith;
|
||||
log_epson = printing;
|
||||
logging = true;
|
||||
|
||||
if (!printing) {
|
||||
quote = '"';
|
||||
unquote = '"';
|
||||
copyright = "(c)";
|
||||
}*/
|
||||
}
|
||||
|
||||
void Logger::log_divider() { /* Prints the divider sign. */
|
||||
byte fv;
|
||||
if (!_vm->_gyro->logging)
|
||||
return;
|
||||
|
||||
warning("STUB: Logger::log_divider()");
|
||||
|
||||
/*
|
||||
if (_vm->_gyro->log_epson) {
|
||||
output << logfile << Common::String(' ') + double_width;
|
||||
for (fv = 1; fv <= divide_indent; fv++)
|
||||
output << logfile << ' ';
|
||||
output << logfile << Common::String(' ') + double_off;
|
||||
} else {
|
||||
for (fv = 1; fv <= 36; fv++)
|
||||
output << logfile << ' ';
|
||||
}
|
||||
output << logfile << divide << NL;
|
||||
*/
|
||||
}
|
||||
|
||||
void Logger::log_command(Common::String x) { /* Prints a command */
|
||||
if (!_vm->_gyro->logging)
|
||||
return;
|
||||
|
||||
warning("STUB: Logger::log_command()");
|
||||
|
||||
/*if (_vm->_gyro->log_epson)
|
||||
output << logfile << double_width + '>' + double_off + ' ' + italic + x + italic_off << NL;
|
||||
else
|
||||
output << logfile << Common::String("> ") + x << NL;*/
|
||||
}
|
||||
|
||||
void Logger::log_addstuff(Common::String x) {
|
||||
if (!_vm->_gyro->logging)
|
||||
return;
|
||||
|
||||
scroll_line += x;
|
||||
}
|
||||
|
||||
void Logger::log_scrollchar(Common::String x) { /* print one character */
|
||||
Common::String z;
|
||||
if (!_vm->_gyro->logging)
|
||||
return;
|
||||
|
||||
switch (x[0]) {
|
||||
case '\'':
|
||||
z = quote;
|
||||
break; /* Open quotes: "66" */
|
||||
case '\"':
|
||||
z = unquote;
|
||||
break; /* Close quotes: "99" */
|
||||
case 239:
|
||||
z = copyright;
|
||||
break; /* Copyright sign. */
|
||||
default:
|
||||
z = x;
|
||||
}
|
||||
log_addstuff(z);
|
||||
scroll_line_length += z.size();
|
||||
}
|
||||
|
||||
void Logger::log_italic() {
|
||||
if (!_vm->_gyro->logging)
|
||||
return;
|
||||
|
||||
warning("STUB: Logger::log_italic()");
|
||||
|
||||
/*if (_vm->_gyro->log_epson)
|
||||
log_addstuff(italic);
|
||||
else
|
||||
log_addstuff("*");*/
|
||||
}
|
||||
|
||||
void Logger::log_roman() {
|
||||
if (!_vm->_gyro->logging)
|
||||
return;
|
||||
|
||||
warning("STUB: Logger::log_roman()");
|
||||
|
||||
/* if (_vm->_gyro->log_epson)
|
||||
log_addstuff(italic_off);
|
||||
else
|
||||
log_addstuff("*");*/
|
||||
}
|
||||
|
||||
void Logger::log_epsonroman() { /* This only sends the Roman code if you're on Epson.*/
|
||||
if (!_vm->_gyro->logging)
|
||||
return;
|
||||
|
||||
if (_vm->_gyro->log_epson)
|
||||
log_addstuff(italic_off);
|
||||
}
|
||||
|
||||
void Logger::log_scrollline() { /* Set up a line for the scroll driver */
|
||||
scroll_line_length = 0;
|
||||
scroll_line = "";
|
||||
}
|
||||
|
||||
void Logger::log_scrollendline(bool centred) {
|
||||
byte x, fv;
|
||||
if (!_vm->_gyro->logging)
|
||||
return;
|
||||
x = 17;
|
||||
if (centred)
|
||||
x += (50 - scroll_line_length) / 2;
|
||||
|
||||
warning("STUB: Logger::log_scrollendline()");
|
||||
|
||||
/*for (fv = 1; fv <= x; fv++)
|
||||
output << logfile << ' ';
|
||||
output << logfile << scroll_line << NL;*/
|
||||
}
|
||||
|
||||
void Logger::log_bubbleline(byte linenum, byte whom, Common::String x) {
|
||||
byte fv;
|
||||
if (!_vm->_gyro->logging)
|
||||
return;
|
||||
|
||||
warning("STUB: Logger::log_bubbleline()");
|
||||
|
||||
/*if (linenum == 1) {
|
||||
for (fv = 1; fv <= 15; fv++)
|
||||
output << logfile << ' ';
|
||||
output << logfile << italic + tr[whom].a.name + ": " + italic_off + x << NL;
|
||||
} else {
|
||||
for (fv = 1; fv <= 17; fv++)
|
||||
output << logfile << ' ';
|
||||
output << logfile << x << NL;
|
||||
}*/
|
||||
}
|
||||
|
||||
void Logger::log_newline() {
|
||||
warning("STUB: Logger::log_newline()");
|
||||
|
||||
//if (_vm->_gyro->logging)
|
||||
// output << logfile << NL;
|
||||
}
|
||||
|
||||
void Logger::log_newroom(Common::String where) {
|
||||
byte fv;
|
||||
if (!_vm->_gyro->logging)
|
||||
return;
|
||||
|
||||
warning("STUB: Logger::log_newroom()");
|
||||
|
||||
/*for (fv = 1; fv <= 20; fv++)
|
||||
output << logfile << ' ';
|
||||
if (_vm->_gyro->log_epson)
|
||||
output << logfile << emph_on;
|
||||
output << logfile << Common::String('(') + where + ')';
|
||||
if (_vm->_gyro->log_epson)
|
||||
output << logfile << emph_off;
|
||||
output << logfile << NL;*/
|
||||
}
|
||||
|
||||
void Logger::log_aside(Common::String what) {
|
||||
/* This writes "asides" to the printer. For example, moves in Nim. */
|
||||
if (!_vm->_gyro->logging)
|
||||
return;
|
||||
|
||||
warning("STUB: Logger::log_aside()");
|
||||
|
||||
//output << logfile << " (" << italic << what << italic_off << ')' << NL;
|
||||
/* "What" is what to write. */
|
||||
}
|
||||
|
||||
void Logger::log_score(uint16 credit, uint16 now) {
|
||||
byte fv;
|
||||
if (!_vm->_gyro->logging)
|
||||
return;
|
||||
|
||||
warning("STUB: Logger::log_score()");
|
||||
|
||||
/*for (fv = 1; fv <= 50; fv++)
|
||||
output << logfile << ' ';
|
||||
output << logfile << "Score " << italic << "credit : " << credit << italic_off << " total : " << now << NL;*/
|
||||
}
|
||||
|
||||
} // End of namespace Avalanche
|
|
@ -1,92 +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.
|
||||
*/
|
||||
|
||||
/* LOGGER Handles the logging. */
|
||||
|
||||
#ifndef LOGGER2_H
|
||||
#define LOGGER2_H
|
||||
|
||||
#include "common/scummsys.h"
|
||||
#include "common/str.h"
|
||||
|
||||
namespace Avalanche {
|
||||
class AvalancheEngine;
|
||||
|
||||
class Logger {
|
||||
public:
|
||||
Logger(AvalancheEngine *vm);
|
||||
|
||||
void log_setup(Common::String name, bool printing);
|
||||
|
||||
void log_divider(); /* Prints the divider sign. */
|
||||
|
||||
void log_command(Common::String x); /* Prints a command */
|
||||
|
||||
void log_scrollchar(Common::String x); /* print one character */
|
||||
|
||||
void log_italic();
|
||||
|
||||
void log_roman();
|
||||
|
||||
void log_epsonroman();
|
||||
|
||||
void log_scrollline(); /* Set up a line for the scroll driver */
|
||||
|
||||
void log_scrollendline(bool centred);
|
||||
|
||||
void log_bubbleline(byte linenum, byte whom, Common::String x);
|
||||
|
||||
void log_newline();
|
||||
|
||||
void log_newroom(Common::String where);
|
||||
|
||||
void log_aside(Common::String what);
|
||||
|
||||
void log_score(uint16 credit, uint16 now);
|
||||
|
||||
private:
|
||||
AvalancheEngine *_vm;
|
||||
|
||||
static const char divide[];
|
||||
|
||||
static const Common::String quote;
|
||||
static const Common::String unquote;
|
||||
static const Common::String copyright;
|
||||
static const int16 divide_indent;
|
||||
|
||||
Common::String scroll_line;
|
||||
byte scroll_line_length;
|
||||
|
||||
void centre(byte size, byte x);
|
||||
|
||||
void log_addstuff(Common::String x);
|
||||
|
||||
};
|
||||
|
||||
} // End of namespace Avalanche
|
||||
|
||||
#endif // LOGGER2_H
|
|
@ -32,7 +32,6 @@
|
|||
#include "avalanche/lucerna2.h"
|
||||
#include "avalanche/gyro2.h"
|
||||
#include "avalanche/scrolls2.h"
|
||||
#include "avalanche/logger2.h"
|
||||
#include "avalanche/enhanced2.h"
|
||||
#include "avalanche/visa2.h"
|
||||
#include "avalanche/timeout2.h"
|
||||
|
@ -266,8 +265,6 @@ void Lucerna::load(byte n) { /* Load2, actually */
|
|||
|
||||
bit = *_vm->_graphics->getPixel(0,0);
|
||||
|
||||
_vm->_logger->log_newroom(_vm->_gyro->roomname);
|
||||
|
||||
CursorMan.showMouse(true);
|
||||
}
|
||||
|
||||
|
@ -942,7 +939,6 @@ void Lucerna::points(byte num) { /* Add on no. of points */
|
|||
}
|
||||
warning("STUB: Lucerna::points()");
|
||||
|
||||
_vm->_logger->log_score(num, _vm->_gyro->dna.score);
|
||||
showscore();
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ MODULE_OBJS = \
|
|||
detection.o \
|
||||
gyro2.o \
|
||||
enhanced2.o \
|
||||
logger2.o \
|
||||
pingo2.o \
|
||||
scrolls2.o \
|
||||
visa2.o \
|
||||
|
|
|
@ -80,8 +80,6 @@ void Parser::handleReturn() {
|
|||
if (_vm->_dropdown->ddm_o.menunow)
|
||||
_vm->_parser->tryDropdown();
|
||||
else {
|
||||
_vm->_logger->log_command(_inputText);
|
||||
|
||||
if (!_inputText.empty()) {
|
||||
_inputTextBackup = _inputText;
|
||||
_vm->_acci->parse();
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
|
||||
#include "avalanche/scrolls2.h"
|
||||
#include "avalanche/gyro2.h"
|
||||
#include "avalanche/logger2.h"
|
||||
#include "avalanche/enhanced2.h"
|
||||
#include "avalanche/lucerna2.h"
|
||||
#include "avalanche/trip6.h"
|
||||
|
@ -105,8 +104,6 @@ void Scrolls::say(int16 x, int16 y, Common::String z) { /* Fancy FAST screenwrit
|
|||
fontType itw;
|
||||
byte lz = z.size();
|
||||
|
||||
_vm->_logger->log_scrollline();
|
||||
|
||||
bool offset = x % 8 == 4;
|
||||
x = x / 8;
|
||||
y++;
|
||||
|
@ -115,12 +112,10 @@ void Scrolls::say(int16 x, int16 y, Common::String z) { /* Fancy FAST screenwrit
|
|||
switch (z[xx]) {
|
||||
case kControlRoman: {
|
||||
cfont = roman;
|
||||
_vm->_logger->log_roman();
|
||||
}
|
||||
break;
|
||||
case kControlItalic: {
|
||||
cfont = italic;
|
||||
_vm->_logger->log_italic();
|
||||
}
|
||||
break;
|
||||
default: {
|
||||
|
@ -131,8 +126,6 @@ void Scrolls::say(int16 x, int16 y, Common::String z) { /* Fancy FAST screenwrit
|
|||
i++;
|
||||
Common::String chr(z[xx]);
|
||||
_vm->_graphics->drawText(_vm->_graphics->_scrolls, chr, itw, 12, (x - 1) * 8 + offset * 4 + i * 8, y, black);
|
||||
|
||||
_vm->_logger->log_scrollchar(Common::String(z[xx]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -269,7 +262,6 @@ void Scrolls::music_scroll() {
|
|||
void Scrolls::resetscrolldriver() { /* phew */
|
||||
_vm->_gyro->scrollbells = 0;
|
||||
cfont = roman;
|
||||
_vm->_logger->log_epsonroman();
|
||||
use_icon = 0;
|
||||
_vm->_gyro->interrogation = 0; /* always reset after a scroll comes up. */
|
||||
}
|
||||
|
@ -353,7 +345,6 @@ void Scrolls::drawscroll(func2 gotoit) { // This is one of the oldest procs in t
|
|||
//setvisualpage(cp);
|
||||
//setactivepage(1 - cp);
|
||||
_vm->_gyro->oncandopageswap = false; /* On can now no longer swap pages. So we can do what we want without its interference! */
|
||||
_vm->_logger->log_epsonroman(); /* Scrolls always START with Roman. */
|
||||
|
||||
lx = 0;
|
||||
ly = (_vm->_gyro->scrolln) * 6;
|
||||
|
@ -459,7 +450,6 @@ void Scrolls::drawscroll(func2 gotoit) { // This is one of the oldest procs in t
|
|||
else
|
||||
say(mx + icon_indent, my, _vm->_gyro->scroll[b]);
|
||||
|
||||
_vm->_logger->log_scrollendline(centre);
|
||||
my += 12;
|
||||
}
|
||||
|
||||
|
@ -474,7 +464,6 @@ void Scrolls::drawscroll(func2 gotoit) { // This is one of the oldest procs in t
|
|||
|
||||
undodgem();
|
||||
_vm->_gyro->dropsok = true;
|
||||
_vm->_logger->log_divider();
|
||||
//setvisualpage(cp);
|
||||
//mousepage(cp);
|
||||
CursorMan.showMouse(false);
|
||||
|
@ -562,11 +551,6 @@ void Scrolls::bubble(func2 gotoit) {
|
|||
_vm->_graphics->drawText(_vm->_graphics->_scrolls, _vm->_gyro->scroll[fv], _vm->_gyro->characters, 8, x - offset * 4, (fv * 10) + 12, _vm->_gyro->talkf);
|
||||
}
|
||||
|
||||
for (fv = 0; fv < _vm->_gyro->scrolln; fv++) /* These should be separate loops. */
|
||||
_vm->_logger->log_bubbleline(fv, param, _vm->_gyro->scroll[fv]);
|
||||
|
||||
_vm->_logger->log_divider();
|
||||
|
||||
//setvisualpage(1 - cp);
|
||||
dingdongbell();
|
||||
_vm->_gyro->oncandopageswap = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue