aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/parallaction/dialogue.cpp6
-rw-r--r--engines/parallaction/inventory.cpp26
-rw-r--r--engines/parallaction/menu.cpp2
-rw-r--r--engines/parallaction/parallaction.cpp37
-rw-r--r--engines/parallaction/parallaction.h6
5 files changed, 39 insertions, 38 deletions
diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp
index 0682b471d9..eb879119b0 100644
--- a/engines/parallaction/dialogue.cpp
+++ b/engines/parallaction/dialogue.cpp
@@ -226,7 +226,7 @@ void runDialogue(SpeakData *data) {
/*
// the only character which can have a dialogue inside the museum location is Dino
if (!scumm_stricmp(_location, "museum")) {
- _vm->_graphics->freeCnv( &_tempFrames );
+ _vm->_graphics->freeCnv( &_characterFrames );
debugC(1, kDebugDialogue, "runDialogue: special trick for 'museum' location");
}
*/
@@ -509,9 +509,9 @@ void runDialogue(SpeakData *data) {
// that's why this hack (with hardcoded Dino) works
if (!scumm_stricmp(_location, "museum")) {
_vm->_disk->selectArchive("disk1");
- _vm->_disk->loadFrames(_dinoName, &_tempFrames);
+ _vm->_disk->loadFrames(_dinoName, &_characterFrames);
- memcpy(&_yourself._cnv, &_tempFrames, sizeof(Cnv));
+ memcpy(&_yourself._cnv, &_characterFrames, sizeof(Cnv));
debugC(1, kDebugDialogue, "runDialogue: special trick for 'museum' location ok");
}
diff --git a/engines/parallaction/inventory.cpp b/engines/parallaction/inventory.cpp
index f8dbcf04ab..526db323d7 100644
--- a/engines/parallaction/inventory.cpp
+++ b/engines/parallaction/inventory.cpp
@@ -51,7 +51,7 @@ namespace Parallaction {
#define INVENTORY_WIDTH (INVENTORY_ITEMS_PER_LINE*INVENTORYITEM_WIDTH)
#define INVENTORY_HEIGHT (INVENTORY_LINES*INVENTORYITEM_HEIGHT)
-Cnv _characterInventory;
+extern Cnv _yourObjects;
uint16 _numInvLines = 0;
static Point _invPosition = { 0, 0 };
@@ -190,10 +190,10 @@ void drawInventoryItem(uint16 pos, InventoryItem *item) {
_vm->_graphics->copyRect(
Graphics::kBit3,
col * INVENTORYITEM_WIDTH,
- line * _characterInventory._height,
+ line * _yourObjects._height,
INVENTORYITEM_WIDTH,
- _characterInventory._height,
- _characterInventory._array[item->_index],
+ _yourObjects._height,
+ _yourObjects._array[item->_index],
INVENTORYITEM_PITCH
);
@@ -216,9 +216,9 @@ void highlightInventoryItem(int16 pos, byte color) {
_vm->_graphics->drawBorder(
Graphics::kBit3,
col * INVENTORYITEM_WIDTH,
- line * _characterInventory._height,
+ line * _yourObjects._height,
INVENTORYITEM_WIDTH,
- _characterInventory._height,
+ _yourObjects._height,
color
);
@@ -238,9 +238,9 @@ void extractInventoryGraphics(int16 pos, byte *dst) {
Graphics::kBit3,
dst,
col * INVENTORYITEM_WIDTH,
- line * _characterInventory._height,
+ line * _yourObjects._height,
INVENTORYITEM_WIDTH,
- _characterInventory._height,
+ _yourObjects._height,
INVENTORYITEM_PITCH
);
@@ -355,7 +355,7 @@ void redrawInventory() {
}
void initInventory() {
- _characterInventory._count = 0;
+ _yourObjects._count = 0;
}
void cleanInventory() {
@@ -372,18 +372,18 @@ void cleanInventory() {
void refreshInventory(const char *character) {
- _vm->_disk->loadObjects(character, &_characterInventory);
+// _vm->_disk->loadObjects(character, &_characterInventory);
redrawInventory();
- _vm->_graphics->freeCnv(&_characterInventory);
+// _vm->_graphics->freeCnv(&_yourObjects);
return;
}
void refreshInventoryItem(const char *character, uint16 index) {
- _vm->_disk->loadObjects(character, &_characterInventory);
+// _vm->_disk->loadObjects(character, &_yourObjects);
drawInventoryItem(index, &_inventory[index]);
- _vm->_graphics->freeCnv(&_characterInventory);
+// _vm->_graphics->freeCnv(&_characterInventory);
return;
}
diff --git a/engines/parallaction/menu.cpp b/engines/parallaction/menu.cpp
index 55b5caa659..fa24231a56 100644
--- a/engines/parallaction/menu.cpp
+++ b/engines/parallaction/menu.cpp
@@ -408,7 +408,7 @@ void Menu::selectCharacter() {
free(v14._data0);
- refreshInventory(_vm->_characterName);
+// refreshInventory(_vm->_characterName);
return;
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index b1e78e4b85..48103775ec 100644
--- a/engines/parallaction/parallaction.cpp
+++ b/engines/parallaction/parallaction.cpp
@@ -55,9 +55,14 @@ char _location[100] = "fogne";
uint32 _engineFlags = 0;
char *_objectsNames[100];
Zone *_activeZone = NULL;
-Animation _yourself;
-StaticCnv _yourHead;
-Cnv _yourTalk;
+
+Animation _yourself;
+StaticCnv _yourHead;
+Cnv _yourTalk;
+Cnv _characterFrames;
+static Cnv _miniCharacterFrames;
+Cnv _yourObjects;
+
uint16 _score = 1;
Command *_locationACommands = NULL;
Command *_locationCommands = NULL;
@@ -136,7 +141,6 @@ uint16 _firstFrame = 0;
byte _mouseHidden = 0;
Node _locationWalkNodes = { 0, 0 };
uint32 _commandFlags = 0;
-Cnv _tempFrames;
uint16 _introSarcData3 = 200;
uint16 _introSarcData2 = 1;
@@ -151,7 +155,7 @@ Job *_jEraseLabel = NULL;
Zone *_hoverZone = NULL;
static Job *_jRunScripts = NULL;
-static Cnv _miniCharacterFrames;
+
static Job _jobs = { { NULL, NULL }, 0, 0, 0, NULL, 0 };
@@ -827,13 +831,14 @@ void Parallaction::changeCursor(int32 index) {
void freeCharacterFrames() {
- _vm->_graphics->freeCnv(&_tempFrames);
+ _vm->_graphics->freeCnv(&_characterFrames);
if (!IS_DUMMY_CHARACTER(_vm->_characterName)) {
_vm->_graphics->freeCnv(&_miniCharacterFrames);
_vm->freeTable(_objectsNames);
_vm->_graphics->freeCnv(&_yourTalk);
_vm->_graphics->freeStaticCnv(&_yourHead);
+ _vm->_graphics->freeCnv(&_yourObjects);
}
return;
@@ -867,27 +872,24 @@ void Parallaction::changeCharacter(const char *name) {
char v32[20];
strcpy(v32, name);
-
-
- if (_engineFlags & kEngineTransformedDonna) {
+ if (_engineFlags & kEngineTransformedDonna)
strcat(v32, "tras");
- }
if (scumm_stricmp(v32, _characterName1)) {
- if (scumm_stricmp(_characterName1, "null")) {
+ if (scumm_stricmp(_characterName1, "null"))
freeCharacterFrames();
- }
_disk->selectArchive("disk1");
char path[PATH_LEN];
strcpy(path, v32);
- _disk->loadFrames(path, &_tempFrames);
+ _disk->loadFrames(path, &_characterFrames);
if (!IS_DUMMY_CHARACTER(name)) {
_disk->loadHead(path, &_yourHead);
_disk->loadTalk(path, &_yourTalk);
+ _disk->loadObjects(name, &_yourObjects);
sprintf(path, "mini%s", v32);
_disk->loadFrames(path, &_miniCharacterFrames);
@@ -899,16 +901,13 @@ void Parallaction::changeCharacter(const char *name) {
if (scumm_stricmp(name, "night") && scumm_stricmp(name, "intsushi"))
selectCharacterMusic(name);
-
}
-
}
- if (miniCharacter) {
+ if (miniCharacter)
memcpy(&_yourself._cnv, &_miniCharacterFrames, sizeof(Cnv));
- } else {
- memcpy(&_yourself._cnv, &_tempFrames, sizeof(Cnv));
- }
+ else
+ memcpy(&_yourself._cnv, &_characterFrames, sizeof(Cnv));
strcpy(_characterName1, v32);
diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h
index b96100d1dc..cdf8b08195 100644
--- a/engines/parallaction/parallaction.h
+++ b/engines/parallaction/parallaction.h
@@ -119,10 +119,12 @@ extern char *_globalTable[];
extern char _saveData1[];
extern Point _firstPosition; // starting position after load game??
extern uint16 _firstFrame; // starting frame after load game??
-extern Cnv _yourTalk;
extern byte _mouseHidden;
extern uint32 _commandFlags;
-extern Cnv _tempFrames;
+
+extern Cnv _yourTalk;
+
+extern Cnv _characterFrames;
extern char _location[];
extern Node _locationWalkNodes;