TOOL+HUGO: Misc modifications

- Fix H1 Dos bug (animations not showing in Hall and after)
- Get rid of _textSchedule and everything related
H1 Dos shoud now be completable (not tested yet)

svn-id: r54218
This commit is contained in:
Arnaud Boutonné 2010-11-12 18:05:23 +00:00
parent 103ac9c566
commit fd82c3783d
10 changed files with 11 additions and 71 deletions

Binary file not shown.

View file

@ -66,6 +66,7 @@ void FileManager_v1d::readOverlay(int screenNum, image_pt image, ovl_t overlayTy
if (!fileExists(buf)) {
for (uint32 i = 0; i < OVL_SIZE; i++)
image[i] = 0;
warning("File not found: %s", buf);
return;
}

View file

@ -62,11 +62,11 @@ char _textBoxBuffer[MAX_BOX]; // Buffer for text box
command_t _line; // Line of user text input
HugoEngine::HugoEngine(OSystem *syst, const HugoGameDescription *gd) : Engine(syst), _gameDescription(gd), _mouseX(0), _mouseY(0),
_textData(0), _stringtData(0), _screenNames(0), _textEngine(0), _textIntro(0), _textMouse(0), _textParser(0), _textSchedule(0),
_textUtil(0), _arrayNouns(0), _arrayVerbs(0), _arrayReqs(0), _hotspots(0), _invent(0), _uses(0), _catchallList(0),
_backgroundObjects(0), _points(0), _cmdList(0), _screenActs(0), _heroImage(0), _defltTunes(0), _introX(0),
_introY(0), _maxInvent(0), _numBonuses(0), _numScreens(0), _tunesNbr(0), _soundSilence(0), _soundTest(0), _screenStates(0),
_score(0), _maxscore(0), _backgroundObjectsSize(0), _screenActsSize(0), _usesSize(0)
_textData(0), _stringtData(0), _screenNames(0), _textEngine(0), _textIntro(0), _textMouse(0), _textParser(0), _textUtil(0),
_arrayNouns(0), _arrayVerbs(0), _arrayReqs(0), _hotspots(0), _invent(0), _uses(0), _catchallList(0), _backgroundObjects(0),
_points(0), _cmdList(0), _screenActs(0), _heroImage(0), _defltTunes(0), _introX(0), _introY(0), _maxInvent(0), _numBonuses(0),
_numScreens(0), _tunesNbr(0), _soundSilence(0), _soundTest(0), _screenStates(0), _score(0), _maxscore(0),
_backgroundObjectsSize(0), _screenActsSize(0), _usesSize(0)
{
DebugMan.addDebugChannel(kDebugSchedule, "Schedule", "Script Schedule debug level");
@ -106,7 +106,6 @@ HugoEngine::~HugoEngine() {
free(_introY);
freeTexts(_textMouse);
freeTexts(_textParser);
freeTexts(_textSchedule);
freeTexts(_textUtil);
if (_arrayReqs) {
@ -460,9 +459,6 @@ bool HugoEngine::loadHugoDat() {
// Read textParser
_textParser = loadTexts(in);
// Read textSchedule
_textSchedule = loadTexts(in);
// Read textUtil
_textUtil = loadTextsVariante(in, 0);

View file

@ -34,7 +34,7 @@
#include "hugo/game.h"
#define HUGO_DAT_VER_MAJ 0 // 1 byte
#define HUGO_DAT_VER_MIN 28 // 1 byte
#define HUGO_DAT_VER_MIN 29 // 1 byte
#define DATAALIGNMENT 4
#define EDGE 10 // Closest object can get to edge of screen
#define EDGE2 (EDGE * 2) // Push object further back on edge collision
@ -137,7 +137,6 @@ public:
char **_textIntro;
char **_textMouse;
char **_textParser;
char **_textSchedule;
char **_textUtil;
char ***_arrayNouns;
char ***_arrayVerbs;

View file

@ -172,8 +172,8 @@ void Scheduler::newScreen(int screenIndex) {
if (!_vm->isPacked()) {
char line[32];
if (!_vm->_file->fileExists(strcat(strncat(strcpy(line, _vm->_picDir), _vm->_screenNames[screenIndex], NAME_LEN), BKGEXT)) &&
!_vm->_file->fileExists(strcat(strcpy(line, _vm->_screenNames[screenIndex]), ".ART"))) {
Utils::Box(BOX_ANY, "%s", _vm->_textSchedule[kSsNoBackground]);
!_vm->_file->fileExists(strcat(strcpy(line, _vm->_screenNames[screenIndex]), ".ART"))) {
error("Unable to find background file for %s", _vm->_screenNames[screenIndex]);
return;
}
}

View file

@ -72,11 +72,6 @@ public:
protected:
HugoEngine *_vm;
enum seqTextSchedule {
kSsNoBackground = 0,
kSsBadSaveGame = 1
};
uint16 _actListArrSize;
uint16 _alNewscrIndex;

View file

@ -50,7 +50,6 @@
#include "staticintro.h"
#include "staticmouse.h"
#include "staticparser.h"
#include "staticschedule.h"
#include "staticutil.h"
#include "staticfont.h"
@ -365,9 +364,6 @@ int main(int argc, char *argv[]) {
// Write textParser
writeTextArray(outFile, textParser, NUM_PARSER_TEXT);
// Write textSchedule
writeTextArray(outFile, textSchedule, NUM_SCHEDULE_TEXT);
// Write textUtil
writeTextArray(outFile, textUtil_v1w, NUM_UTIL_TEXT);
writeTextArray(outFile, textUtil_v1w, NUM_UTIL_TEXT);
@ -816,7 +812,7 @@ int main(int argc, char *argv[]) {
writeUint16BE(outFile, LASTOBJ_1w);
writeUint16BE(outFile, LASTOBJ_2w);
writeUint16BE(outFile, LASTOBJ_3w);
writeUint16BE(outFile, NUM_PICS_1d); //(not set in original, as Hugo1 DOS doesn't use a DAT file to pack the screens)
writeUint16BE(outFile, LASTOBJ_1d); //(not set in original, as Hugo1 DOS doesn't use a DAT file to pack the screens)
writeUint16BE(outFile, LASTOBJ_2d);
writeUint16BE(outFile, LASTOBJ_3d);

View file

@ -31,7 +31,7 @@
#define DATAALIGNMENT 4
#define HUGO_DAT_VER_MAJ 0 // 1 byte
#define HUGO_DAT_VER_MIN 28 // 1 byte
#define HUGO_DAT_VER_MIN 29 // 1 byte
typedef unsigned char uint8;
typedef unsigned char byte;

View file

@ -209,10 +209,6 @@
RelativePath="..\..\staticparser.h"
>
</File>
<File
RelativePath="..\..\staticschedule.h"
>
</File>
<File
RelativePath="..\..\staticutil.h"
>

View file

@ -1,43 +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.
*
* $URL$
* $Id$
*
*/
/*
* This code is based on original Hugo Trilogy source code
*
* Copyright (c) 1989-1995 David P. Gray
*
*/
#ifndef STATICSCHEDULE_H
#define STATICSCHEDULE_H
#define NUM_SCHEDULE_TEXT 2
const char *textSchedule[NUM_SCHEDULE_TEXT] = {
"Can't find background file!",
"Obsolete saved game format will be converted!"
};
#endif