[Scummvm-cvs-logs] CVS: scummvm/kyra saveload.cpp,NONE,1.1 animator.h,1.2,1.3 kyra.cpp,1.109,1.110 kyra.h,1.62,1.63 module.mk,1.11,1.12 staticres.cpp,1.32,1.33
Johannes Schickel
lordhoto at users.sourceforge.net
Tue Jan 3 15:43:00 CET 2006
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/gob anim.cpp,1.4,1.5 anim.h,1.5,1.6 cdrom.cpp,1.4,1.5 cdrom.h,1.2,1.3 dataio.cpp,1.11,1.12 dataio.h,1.7,1.8 draw.cpp,1.14,1.15 draw.h,1.6,1.7 driver_vga.cpp,1.12,1.13 driver_vga.h,1.6,1.7 game.cpp,1.28,1.29 game.h,1.6,1.7 global.cpp,1.9,1.10 global.h,1.8,1.9 gob.cpp,1.27,1.28 gob.h,1.11,1.12 goblin.cpp,1.24,1.25 goblin.h,1.6,1.7 init.cpp,1.12,1.13 init.h,1.4,1.5 inter.cpp,1.25,1.26 inter.h,1.4,1.5 map.cpp,1.17,1.18 map.h,1.11,1.12 mult.cpp,1.13,1.14 mult.h,1.6,1.7 pack.cpp,1.6,1.7 pack.h,1.4,1.5 palanim.cpp,1.11,1.12 palanim.h,1.4,1.5 parse.cpp,1.15,1.16 parse.h,1.4,1.5 scenery.cpp,1.20,1.21 scenery.h,1.7,1.8 sound.cpp,1.13,1.14 sound.h,1.9,1.10 timer.cpp,1.7,1.8 timer.h,1.4,1.5 util.cpp,1.18,1.19 util.h,1.6,1.7 video.cpp,1.16,1.17 video.h,1.10,1.11
- Next message: [Scummvm-cvs-logs] CVS: scummvm AUTHORS,1.27,1.28
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/kyra
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6902
Modified Files:
animator.h kyra.cpp kyra.h module.mk staticres.cpp
Added Files:
saveload.cpp
Log Message:
Fixed wrong formatting in animator.h
Reworked the savefiles and extracted the save/load code to saveload.cpp.
--- NEW FILE: saveload.cpp ---
/* ScummVM - Scumm Interpreter
* Copyright (C) 2005 The ScummVM project
*
* 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.
*
* $Header: /cvsroot/scummvm/scummvm/kyra/saveload.cpp,v 1.1 2006/01/03 23:41:52 lordhoto Exp $
*
*/
#include "kyra/kyra.h"
#include "kyra/animator.h"
#include "kyra/screen.h"
#include "common/savefile.h"
#include "common/system.h"
#define CURRENT_VERSION 1
namespace Kyra {
void KyraEngine::loadGame(const char *fileName) {
debug(9, "loadGame('%s')", fileName);
Common::InSaveFile *in;
if (!(in = _saveFileMan->openForLoading(fileName))) {
warning("Can't open file '%s', game not loaded", fileName);
return;
}
uint32 type = in->readUint32BE();
if (type != MKID('KYRA'))
return;
uint32 version = in->readUint32BE();
if (version < CURRENT_VERSION) {
warning("Savegame is not the right version (%d)", version);
delete in;
return;
}
char saveName[31];
in->read(saveName, 31);
int brandonX = 0, brandonY = 0;
for (int i = 0; i < 11; i++) {
_characterList[i].sceneId = in->readUint16BE();
_characterList[i].height = in->readByte();
_characterList[i].facing = in->readByte();
_characterList[i].currentAnimFrame = in->readUint16BE();
//_characterList[i].unk6 = in->readUint32BE();
in->read(_characterList[i].inventoryItems, 10);
_characterList[i].x1 = in->readSint16BE();
_characterList[i].y1 = in->readSint16BE();
_characterList[i].x2 = in->readSint16BE();
_characterList[i].y2 = in->readSint16BE();
if (i == 0) {
brandonX = _characterList[i].x1;
brandonY = _characterList[i].y1;
}
//_characterList[i].field_20 = in->readUint16BE();
//_characterList[i].field_23 = in->readUint16BE();
}
_marbleVaseItem = in->readSint16BE();
_itemInHand = in->readByte();
for (int i = 0; i < 4; ++i) {
_birthstoneGemTable[i] = in->readByte();
}
for (int i = 0; i < 3; ++i) {
_idolGemsTable[i] = in->readByte();
}
for (int i = 0; i < 3; ++i) {
_foyerItemTable[i] = in->readByte();
}
_cauldronState = in->readByte();
for (int i = 0; i < 2; ++i) {
_crystalState[i] = in->readByte();
}
_brandonStatusBit = in->readUint16BE();
_brandonStatusBit0x02Flag = in->readByte();
_brandonStatusBit0x20Flag = in->readByte();
in->read(_brandonPoisonFlagsGFX, 256);
_brandonInvFlag = in->readSint16BE();
_poisonDeathCounter = in->readByte();
_brandonDrawFrame = in->readUint16BE();
for (int i = 0; i < 32; i++) {
_timers[i].active = in->readByte();
_timers[i].countdown = in->readSint32BE();
_timers[i].nextRun = in->readUint32BE();
if (_timers[i].nextRun != 0)
_timers[i].nextRun += _system->getMillis();
}
_timerNextRun = 0;
uint32 flagsSize = in->readUint32BE();
assert(flagsSize == sizeof(_flagsTable));
in->read(_flagsTable, flagsSize);
for (int i = 0; i < _roomTableSize; ++i) {
for (int item = 0; item < 12; ++item) {
_roomTable[i].itemsTable[item] = 0xFF;
_roomTable[i].itemsXPos[item] = 0xFFFF;
_roomTable[i].itemsYPos[item] = 0xFF;
_roomTable[i].needInit[item] = 0;
}
}
uint16 sceneId = 0;
while (true) {
sceneId = in->readUint16BE();
if (sceneId == 0xFFFF)
break;
assert(sceneId < _roomTableSize);
_roomTable[sceneId].nameIndex = in->readByte();
for (int i = 0; i < 12; i++) {
_roomTable[sceneId].itemsTable[i] = in->readByte();
_roomTable[sceneId].itemsXPos[i] = in->readUint16BE();
_roomTable[sceneId].itemsYPos[i] = in->readUint16BE();
_roomTable[sceneId].needInit[i] = in->readByte();
}
}
if (queryGameFlag(0x2D)) {
loadMainScreen(8);
loadBitmap("AMULET3.CPS", 10, 10, 0);
if (!queryGameFlag(0xF1)) {
for (int i = 0x55; i <= 0x5A; ++i) {
if (queryGameFlag(i)) {
seq_createAmuletJewel(i-0x55, 10, 1, 1);
}
}
}
_screen->copyRegion(0, 0, 0, 0, 320, 200, 10, 8);
uint8 *_pageSrc = _screen->getPagePtr(8);
uint8 *_pageDst = _screen->getPagePtr(0);
memcpy(_pageDst, _pageSrc, 320*200);
} else {
loadMainScreen(8);
}
createMouseItem(_itemInHand);
setBrandonAnimSeqSize(5, 48);
_animator->_noDrawShapesFlag = 1;
enterNewScene(_currentCharacter->sceneId, _currentCharacter->facing, 0, 0, 1);
_animator->_noDrawShapesFlag = 0;
_currentCharacter->x1 = brandonX;
_currentCharacter->y1 = brandonY;
animRefreshNPC(0);
_animator->restoreAllObjectBackgrounds();
_animator->preserveAnyChangedBackgrounds();
_animator->prepDrawAllObjects();
_animator->copyChangedObjectsForward(0);
_screen->copyRegion(8, 8, 8, 8, 304, 128, 2, 0);
redrawInventory(0);
_abortWalkFlag = true;
_abortWalkFlag2 = false;
_mousePressFlag = false;
_mouseX = brandonX;
_mouseY = brandonY;
_system->warpMouse(brandonX, brandonY);
if (in->ioFailed())
error("Load failed.");
else
debug(1, "Loaded savegame '%s.'", saveName);
delete in;
}
void KyraEngine::saveGame(const char *fileName, const char *saveName) {
debug(9, "saveGame('%s', '%s')", fileName, saveName);
Common::OutSaveFile *out;
if (!(out = _saveFileMan->openForSaving(fileName))) {
warning("Can't create file '%s', game not saved", fileName);
return;
}
// Savegame version
out->writeUint32BE(MKID('KYRA'));
out->writeUint32BE(CURRENT_VERSION);
out->write(saveName, 31);
for (int i = 0; i < 11; i++) {
out->writeUint16BE(_characterList[i].sceneId);
out->writeByte(_characterList[i].height);
out->writeByte(_characterList[i].facing);
out->writeUint16BE(_characterList[i].currentAnimFrame);
//out->writeUint32BE(_characterList[i].unk6);
out->write(_characterList[i].inventoryItems, 10);
out->writeSint16BE(_characterList[i].x1);
out->writeSint16BE(_characterList[i].y1);
out->writeSint16BE(_characterList[i].x2);
out->writeSint16BE(_characterList[i].y2);
//out->writeUint16BE(_characterList[i].field_20);
//out->writeUint16BE(_characterList[i].field_23);
}
out->writeSint16BE(_marbleVaseItem);
out->writeByte(_itemInHand);
for (int i = 0; i < 4; ++i) {
out->writeByte(_birthstoneGemTable[i]);
}
for (int i = 0; i < 3; ++i) {
out->writeByte(_idolGemsTable[i]);
}
for (int i = 0; i < 3; ++i) {
out->writeByte(_foyerItemTable[i]);
}
out->writeByte(_cauldronState);
for (int i = 0; i < 2; ++i) {
out->writeByte(_crystalState[i]);
}
out->writeUint16BE(_brandonStatusBit);
out->writeByte(_brandonStatusBit0x02Flag);
out->writeByte(_brandonStatusBit0x20Flag);
out->write(_brandonPoisonFlagsGFX, 256);
out->writeSint16BE(_brandonInvFlag);
out->writeByte(_poisonDeathCounter);
out->writeUint16BE(_brandonDrawFrame);
for (int i = 0; i < 32; i++) {
out->writeByte(_timers[i].active);
out->writeSint32BE(_timers[i].countdown);
if (_system->getMillis() >= _timers[i].nextRun) {
out->writeUint32BE(0);
} else {
out->writeUint32BE(_timers[i].nextRun - _system->getMillis());
}
}
out->writeUint32BE(sizeof(_flagsTable));
out->write(_flagsTable, sizeof(_flagsTable));
for (uint16 i = 0; i < _roomTableSize; i++) {
out->writeUint16BE(i);
out->writeByte(_roomTable[i].nameIndex);
for (int a = 0; a < 12; a++) {
out->writeByte(_roomTable[i].itemsTable[a]);
out->writeUint16BE(_roomTable[i].itemsXPos[a]);
out->writeUint16BE(_roomTable[i].itemsYPos[a]);
out->writeByte(_roomTable[i].needInit[a]);
}
}
// room table terminator
out->writeUint16BE(0xFFFF);
out->flush();
// check for errors
if (out->ioFailed())
warning("Can't write file '%s'. (Disk full?)", fileName);
else
debug(1, "Saved game '%s.'", saveName);
delete out;
}
} // end of namespace Kyra
Index: animator.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/kyra/animator.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- animator.h 3 Jan 2006 19:03:08 -0000 1.2
+++ animator.h 3 Jan 2006 23:41:52 -0000 1.3
@@ -27,25 +27,25 @@
class Screen;
struct AnimObject {
- uint8 index;
- uint32 active;
- uint32 refreshFlag;
- uint32 bkgdChangeFlag;
- uint32 unk1;
- uint32 flags;
- int16 drawY;
- uint8 *sceneAnimPtr;
- int16 animFrameNumber;
- uint8 *background;
- uint16 rectSize;
- int16 x1, y1;
- int16 x2, y2;
- uint16 width;
- uint16 height;
- uint16 width2;
- uint16 height2;
- AnimObject *nextAnimObject;
- };
+ uint8 index;
+ uint32 active;
+ uint32 refreshFlag;
+ uint32 bkgdChangeFlag;
+ uint32 unk1;
+ uint32 flags;
+ int16 drawY;
+ uint8 *sceneAnimPtr;
+ int16 animFrameNumber;
+ uint8 *background;
+ uint16 rectSize;
+ int16 x1, y1;
+ int16 x2, y2;
+ uint16 width;
+ uint16 height;
+ uint16 width2;
+ uint16 height2;
+ AnimObject *nextAnimObject;
+};
class ScreenAnimator {
public:
Index: kyra.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/kyra/kyra.cpp,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -d -r1.109 -r1.110
--- kyra.cpp 3 Jan 2006 19:03:09 -0000 1.109
+++ kyra.cpp 3 Jan 2006 23:41:52 -0000 1.110
@@ -398,6 +398,8 @@
memset(_specialPalettes, 0, sizeof(_specialPalettes));
_mousePressFlag = false;
+
+ _targetName = detector._targetName;
return 0;
}
@@ -523,7 +525,7 @@
_roomTable[i].itemsTable[item] = 0xFF;
_roomTable[i].itemsXPos[item] = 0xFFFF;
_roomTable[i].itemsYPos[item] = 0xFF;
- _roomTable[i].unkField3[item] = 0;
+ _roomTable[i].needInit[item] = 0;
}
}
loadCharacterShapes();
@@ -579,7 +581,7 @@
_debugger->attach();
} else if (event.kbd.keycode >= '0' && event.kbd.keycode <= '9' &&
(event.kbd.flags == OSystem::KBD_CTRL || event.kbd.flags == OSystem::KBD_ALT)) {
- sprintf(saveLoadSlot, "KYRA1.00%i", event.kbd.keycode - '0');
+ sprintf(saveLoadSlot, "%s.00%d", _targetName.c_str(), event.kbd.keycode - '0');
if (event.kbd.flags == OSystem::KBD_CTRL)
loadGame(saveLoadSlot);
else
@@ -1331,6 +1333,7 @@
delayWithTicks(10);
_brandonInvFlag -= 0x10;
}
+ _brandonInvFlag = 0;
_brandonStatusBit &= 0xFF9F;
_screen->showMouse();
}
@@ -1716,27 +1719,27 @@
}
}
-void KyraEngine::loadMainScreen() {
+void KyraEngine::loadMainScreen(int page) {
if ((_features & GF_ENGLISH) && (_features & GF_TALKIE))
- loadBitmap("MAIN_ENG.CPS", 3, 3, 0);
+ loadBitmap("MAIN_ENG.CPS", page, page, 0);
else if(_features & GF_FRENCH)
- loadBitmap("MAIN_FRE.CPS", 3, 3, 0);
+ loadBitmap("MAIN_FRE.CPS", page, page, 0);
else if(_features & GF_GERMAN)
- loadBitmap("MAIN_GER.CPS", 3, 3, 0);
+ loadBitmap("MAIN_GER.CPS", page, page, 0);
else if ((_features & GF_ENGLISH) && (_features & GF_FLOPPY))
- loadBitmap("MAIN15.CPS", 3, 3, 0);
+ loadBitmap("MAIN15.CPS", page, page, 0);
else if (_features & GF_SPANISH)
- loadBitmap("MAIN_SPA.CPS", 3, 3, 0);
+ loadBitmap("MAIN_SPA.CPS", page, page, 0);
else
warning("no main graphics file found");
- uint8 *_page3 = _screen->getPagePtr(3);
- uint8 *_page0 = _screen->getPagePtr(0);
- memcpy(_page0, _page3, 320*200);
+ uint8 *_pageSrc = _screen->getPagePtr(page);
+ uint8 *_pageDst = _screen->getPagePtr(0);
+ memcpy(_pageDst, _pageSrc, 320*200);
}
void KyraEngine::setCharactersInDefaultScene() {
- static uint32 defaultSceneTable[][4] = {
+ static const uint32 defaultSceneTable[][4] = {
{ 0xFFFF, 0x0004, 0x0003, 0xFFFF },
{ 0xFFFF, 0x0022, 0xFFFF, 0x0000 },
{ 0xFFFF, 0x001D, 0x0021, 0xFFFF },
@@ -1745,14 +1748,14 @@
for (int i = 1; i < 5; ++i) {
Character *cur = &_characterList[i];
- cur->field_20 = 0;
- uint32 *curTable = defaultSceneTable[i-1];
+ //cur->field_20 = 0;
+ const uint32 *curTable = defaultSceneTable[i-1];
cur->sceneId = curTable[0];
if (cur->sceneId == _currentCharacter->sceneId) {
- ++cur->field_20;
- cur->sceneId = curTable[cur->field_20];
+ //++cur->field_20;
+ cur->sceneId = curTable[1/*cur->field_20*/];
}
- cur->field_23 = curTable[cur->field_20+1];
+ //cur->field_23 = curTable[cur->field_20+1];
}
}
@@ -1765,7 +1768,7 @@
edit->sceneId = 0xFFFF;
edit->facing = 0;
edit->currentAnimFrame = initFrameTable[character];
- edit->unk6 = 1;
+ // edit->unk6 = 1;
}
void KyraEngine::setCharactersPositions(int character) {
@@ -3242,7 +3245,7 @@
Room *currentRoom = &_roomTable[sceneId];
for (int i = 0; i < 12; ++i) {
uint8 item = currentRoom->itemsTable[i];
- if (item == 0xFF || !currentRoom->unkField3[i]) {
+ if (item == 0xFF || !currentRoom->needInit[i]) {
continue;
}
@@ -3269,7 +3272,7 @@
break;
}
} else {
- currentRoom->unkField3[i] = 0;
+ currentRoom->needInit[i] = 0;
}
}
}
@@ -3483,7 +3486,7 @@
currentRoom->itemsTable[itemIndex] = item;
currentRoom->itemsXPos[itemIndex] = x;
currentRoom->itemsYPos[itemIndex] = y;
- currentRoom->unkField3[itemIndex] = 1;
+ currentRoom->needInit[itemIndex] = 1;
}
int KyraEngine::checkNoDropRects(int x, int y) {
@@ -5342,156 +5345,4 @@
_scriptInterpreter->runScript(_npcScript);
}
}
-
-#pragma mark -
-#pragma mark - Saving/loading
-#pragma mark -
-
-void KyraEngine::loadGame(const char *fileName) {
- debug(9, "loadGame('%s')", fileName);
- Common::InSaveFile *in;
-
- if (!(in = _saveFileMan->openForLoading(fileName))) {
- warning("Can't open file '%s', game not loaded", fileName);
- return;
- }
-
- if (in->readByte() != 1) {
- warning("Savegame is not the right version");
- delete in;
- return;
- }
-
- char saveName[31];
- in->read(saveName, 31);
-
- for (int i = 0; i < 11; i++) {
- _characterList[i].sceneId = in->readUint16BE();
- _characterList[i].height = in->readByte();
- _characterList[i].facing = in->readByte();
- _characterList[i].currentAnimFrame = in->readUint16BE();
- _characterList[i].unk6 = in->readUint32BE();
- in->read(_characterList[i].inventoryItems, 10);
- _characterList[i].x1 = in->readSint16BE();
- _characterList[i].y1 = in->readSint16BE();
- _characterList[i].x2 = in->readSint16BE();
- _characterList[i].y1 = in->readSint16BE();
- _characterList[i].field_20 = in->readUint16BE();
- _characterList[i].field_23 = in->readUint16BE();
- }
-
- _marbleVaseItem = in->readSint16BE();
- _itemInHand = in->readByte();
-
- for (int i = 0; i < 32; i++) {
- _timers[i].countdown = in->readSint32BE();
- _timers[i].nextRun = in->readUint32BE();
- }
- _timerNextRun = 0;
-
- in->read(_flagsTable, sizeof(_flagsTable));
-
- for (int i = 0; i < _roomTableSize; ++i) {
- for (int item = 0; item < 12; ++item) {
- _roomTable[i].itemsTable[item] = 0xFF;
- _roomTable[i].itemsXPos[item] = 0xFFFF;
- _roomTable[i].itemsYPos[item] = 0xFF;
- _roomTable[i].unkField3[item] = 0;
- }
- }
-
- uint16 sceneId;
- uint8 itemCount;
-
- while (!in->eos()) {
- sceneId = in->readUint16BE();
- if (sceneId == 0xffff)
- break;
-
- itemCount = in->readByte();
- for (int i = 0; i < itemCount; i++) {
- _roomTable[sceneId].itemsTable[i] = in->readByte();
- _roomTable[sceneId].itemsXPos[i] = in->readUint16BE();
- _roomTable[sceneId].itemsYPos[i] = in->readUint16BE();
- _roomTable[sceneId].unkField3[i] = in->readUint32BE();
-
- }
- }
-
- createMouseItem(_itemInHand);
- enterNewScene(_currentCharacter->sceneId, _currentCharacter->facing, 0, 0, 1);
-
- if (in->ioFailed())
- error("Load failed.");
- else
- debug(1, "Loaded savegame '%s.'", saveName);
-
- delete in;
-}
-
-void KyraEngine::saveGame(const char *fileName, const char *saveName) {
- debug(9, "saveGame('%s', '%s')", fileName, saveName);
- Common::OutSaveFile *out;
-
- if (!(out = _saveFileMan->openForSaving(fileName))) {
- warning("Can't create file '%s', game not saved", fileName);
- return;
- }
-
- // Savegame version
- out->writeByte(1);
- out->write(saveName, 31);
-
- for (int i = 0; i < 11; i++) {
- out->writeUint16BE(_characterList[i].sceneId);
- out->writeByte(_characterList[i].height);
- out->writeByte(_characterList[i].facing);
- out->writeUint16BE(_characterList[i].currentAnimFrame);
- out->writeUint32BE(_characterList[i].unk6);
- out->write(_characterList[i].inventoryItems, 10);
- out->writeSint16BE(_characterList[i].x1);
- out->writeSint16BE(_characterList[i].y1);
- out->writeSint16BE(_characterList[i].x2);
- out->writeSint16BE(_characterList[i].y1);
- out->writeUint16BE(_characterList[i].field_20);
- out->writeUint16BE(_characterList[i].field_23);
- }
-
- out->writeSint16BE(_marbleVaseItem);
- out->writeByte(_itemInHand);
-
- for (int i = 0; i < 32; i++) {
- out->writeSint32BE(_timers[i].countdown);
- out->writeUint32BE(_timers[i].nextRun);
- }
-
- out->write(_flagsTable, sizeof(_flagsTable));
-
- uint8 itemCount;
- for (int i = 0; i < _roomTableSize; i++) {
- itemCount = countItemsInScene(i);
- if (itemCount > 0) {
- out->writeUint16BE(i);
- out->writeByte(itemCount);
- for (int a = 0; a < 12; a++) {
- if (_roomTable[i].itemsTable[a] != 0xff) {
- out->writeByte(_roomTable[i].itemsTable[a]);
- out->writeUint16BE(_roomTable[i].itemsXPos[a]);
- out->writeUint16BE(_roomTable[i].itemsYPos[a]);
- out->writeUint32BE(_roomTable[i].unkField3[a]);
- }
- }
- }
- }
-
- out->flush();
-
- // check for errors
- if (out->ioFailed())
- warning("Can't write file '%s'. (Disk full?)", fileName);
- else
- debug(1, "Saved game '%s.'", saveName);
-
- delete out;
-}
} // End of namespace Kyra
Index: kyra.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/kyra/kyra.h,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- kyra.h 3 Jan 2006 19:03:09 -0000 1.62
+++ kyra.h 3 Jan 2006 23:41:52 -0000 1.63
@@ -53,11 +53,8 @@
uint8 height;
uint8 facing;
uint16 currentAnimFrame;
- uint32 unk6;
uint8 inventoryItems[10];
int16 x1, y1, x2, y2;
- uint16 field_20;
- uint16 field_23;
};
struct Shape {
@@ -75,7 +72,7 @@
uint8 itemsTable[12];
uint16 itemsXPos[12];
uint8 itemsYPos[12];
- uint32 unkField3[12];
+ uint8 needInit[12];
};
struct Rect {
@@ -123,7 +120,7 @@
class KyraEngine;
struct Timer {
- bool active;
+ uint8 active;
int32 countdown;
uint32 nextRun;
void (KyraEngine::*func)(int timerNum);
@@ -549,7 +546,7 @@
void loadItems();
void loadButtonShapes();
void initMainButtonList();
- void loadMainScreen();
+ void loadMainScreen(int page = 3);
void setCharactersInDefaultScene();
void resetBrandonPosionFlags();
void initAnimStateList();
@@ -625,17 +622,17 @@
int8 _crystalState[2];
uint16 _brandonStatusBit;
- int _brandonStatusBit0x02Flag;
- int _brandonStatusBit0x20Flag;
+ uint8 _brandonStatusBit0x02Flag;
+ uint8 _brandonStatusBit0x20Flag;
uint8 _brandonPoisonFlagsGFX[256];
uint8 _deathHandler;
- int _brandonInvFlag;
- int8 _poisonDeathCounter;
+ int16 _brandonInvFlag;
+ uint8 _poisonDeathCounter;
int _brandonPosX;
int _brandonPosY;
int _brandonScaleX;
int _brandonScaleY;
- int _brandonDrawFrame;
+ uint16 _brandonDrawFrame;
uint16 _currentChatPartnerBackupFrame;
uint16 _currentCharAnimFrame;
@@ -671,6 +668,8 @@
uint8 _configTalkspeed;
+ Common::String _targetName;
+
int _curMusicTheme;
int _newMusicTheme;
AudioStream *_currentVocFile;
Index: module.mk
===================================================================
RCS file: /cvsroot/scummvm/scummvm/kyra/module.mk,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- module.mk 2 Jan 2006 22:58:59 -0000 1.11
+++ module.mk 3 Jan 2006 23:41:52 -0000 1.12
@@ -15,7 +15,8 @@
kyra/animator.o \
kyra/gui.o \
kyra/text.o \
- kyra/timer.o
+ kyra/timer.o \
+ kyra/saveload.o
MODULE_DIRS += \
kyra
Index: staticres.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/kyra/staticres.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- staticres.cpp 31 Dec 2005 17:25:47 -0000 1.32
+++ staticres.cpp 3 Jan 2006 23:41:52 -0000 1.33
@@ -409,7 +409,7 @@
memset(&(*loadTo)[i].itemsTable[6], 0, sizeof(byte)*6);
memset((*loadTo)[i].itemsXPos, 0, sizeof(uint16)*12);
memset((*loadTo)[i].itemsYPos, 0, sizeof(uint8)*12);
- memset((*loadTo)[i].unkField3, 0, sizeof((*loadTo)[i].unkField3));
+ memset((*loadTo)[i].needInit, 0, sizeof((*loadTo)[i].needInit));
}
}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/gob anim.cpp,1.4,1.5 anim.h,1.5,1.6 cdrom.cpp,1.4,1.5 cdrom.h,1.2,1.3 dataio.cpp,1.11,1.12 dataio.h,1.7,1.8 draw.cpp,1.14,1.15 draw.h,1.6,1.7 driver_vga.cpp,1.12,1.13 driver_vga.h,1.6,1.7 game.cpp,1.28,1.29 game.h,1.6,1.7 global.cpp,1.9,1.10 global.h,1.8,1.9 gob.cpp,1.27,1.28 gob.h,1.11,1.12 goblin.cpp,1.24,1.25 goblin.h,1.6,1.7 init.cpp,1.12,1.13 init.h,1.4,1.5 inter.cpp,1.25,1.26 inter.h,1.4,1.5 map.cpp,1.17,1.18 map.h,1.11,1.12 mult.cpp,1.13,1.14 mult.h,1.6,1.7 pack.cpp,1.6,1.7 pack.h,1.4,1.5 palanim.cpp,1.11,1.12 palanim.h,1.4,1.5 parse.cpp,1.15,1.16 parse.h,1.4,1.5 scenery.cpp,1.20,1.21 scenery.h,1.7,1.8 sound.cpp,1.13,1.14 sound.h,1.9,1.10 timer.cpp,1.7,1.8 timer.h,1.4,1.5 util.cpp,1.18,1.19 util.h,1.6,1.7 video.cpp,1.16,1.17 video.h,1.10,1.11
- Next message: [Scummvm-cvs-logs] CVS: scummvm AUTHORS,1.27,1.28
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list