[Scummvm-cvs-logs] SF.net SVN: scummvm: [25941] scummvm/trunk/engines/queen
cyx at users.sourceforge.net
cyx at users.sourceforge.net
Sat Mar 3 00:47:50 CET 2007
Revision: 25941
http://scummvm.svn.sourceforge.net/scummvm/?rev=25941&view=rev
Author: cyx
Date: 2007-03-02 15:47:49 -0800 (Fri, 02 Mar 2007)
Log Message:
-----------
added other code differences for Amiga FOTAQ versions, full game is now completable under ScummVM
Modified Paths:
--------------
scummvm/trunk/engines/queen/bankman.cpp
scummvm/trunk/engines/queen/command.cpp
scummvm/trunk/engines/queen/credits.cpp
scummvm/trunk/engines/queen/display.cpp
scummvm/trunk/engines/queen/graphics.cpp
scummvm/trunk/engines/queen/graphics.h
scummvm/trunk/engines/queen/logic.cpp
scummvm/trunk/engines/queen/queen.cpp
scummvm/trunk/engines/queen/resource.cpp
scummvm/trunk/engines/queen/talk.cpp
Modified: scummvm/trunk/engines/queen/bankman.cpp
===================================================================
--- scummvm/trunk/engines/queen/bankman.cpp 2007-03-02 23:13:13 UTC (rev 25940)
+++ scummvm/trunk/engines/queen/bankman.cpp 2007-03-02 23:47:49 UTC (rev 25941)
@@ -62,9 +62,10 @@
if (_res->getPlatform() == Common::kPlatformAmiga) {
uint16 entries = READ_BE_UINT16(bank->data + 4);
+ debug(9, "BankManager::load() entries = %d", entries);
assert(entries < MAX_BANK_SIZE);
- debug(9, "BankManager::load() entries = %d", entries);
uint32 offset = 6;
+ _banks[bankslot].indexes[0] = offset;
for (uint16 i = 1; i <= entries; ++i) {
_banks[bankslot].indexes[i] = offset;
uint16 dataSize = READ_BE_UINT16(bank->data + offset + 10);
@@ -72,9 +73,10 @@
}
} else {
uint16 entries = READ_LE_UINT16(bank->data);
+ debug(9, "BankManager::load() entries = %d", entries);
assert(entries < MAX_BANK_SIZE);
- debug(9, "BankManager::load() entries = %d", entries);
uint32 offset = 2;
+ _banks[bankslot].indexes[0] = offset;
for (uint16 i = 1; i <= entries; ++i) {
_banks[bankslot].indexes[i] = offset;
uint16 w = READ_LE_UINT16(bank->data + offset + 0);
@@ -152,8 +154,10 @@
bf->height = h;
uint32 size = bf->width * bf->height;
- bf->data = new uint8[ size ];
- convertPlanarBitmap(bf->data, bf->width, p + 12, w, h, plane);
+ if (size != 0) {
+ bf->data = new uint8[ size ];
+ convertPlanarBitmap(bf->data, bf->width, p + 12, w, h, plane);
+ }
} else {
bf->width = READ_LE_UINT16(p + 0);
bf->height = READ_LE_UINT16(p + 2);
@@ -161,8 +165,10 @@
bf->yhotspot = READ_LE_UINT16(p + 6);
uint32 size = bf->width * bf->height;
- bf->data = new uint8[ size ];
- memcpy(bf->data, p + 8, size);
+ if (size != 0) {
+ bf->data = new uint8[ size ];
+ memcpy(bf->data, p + 8, size);
+ }
}
}
@@ -216,7 +222,7 @@
debug(9, "BankManager::fetchFrame(%d)", index);
assert(index < MAX_FRAMES_NUMBER);
BobFrame *bf = &_frames[index];
- assert(bf->data != 0);
+ assert((bf->width == 0 && bf->height == 0) || bf->data != 0);
return bf;
}
Modified: scummvm/trunk/engines/queen/command.cpp
===================================================================
--- scummvm/trunk/engines/queen/command.cpp 2007-03-02 23:13:13 UTC (rev 25940)
+++ scummvm/trunk/engines/queen/command.cpp 2007-03-02 23:47:49 UTC (rev 25941)
@@ -1212,8 +1212,9 @@
break;
}
}
-
- _vm->logic()->makeJoeSpeak(desc, true);
+ if (desc != 0) {
+ _vm->logic()->makeJoeSpeak(desc, true);
+ }
_vm->logic()->joeFace();
}
Modified: scummvm/trunk/engines/queen/credits.cpp
===================================================================
--- scummvm/trunk/engines/queen/credits.cpp 2007-03-02 23:13:13 UTC (rev 25940)
+++ scummvm/trunk/engines/queen/credits.cpp 2007-03-02 23:47:49 UTC (rev 25941)
@@ -98,6 +98,9 @@
return;
case 'i' :
_color = atoi(&line[3]);
+ if (_vm->resource()->getPlatform() == Common::kPlatformAmiga) {
+ _color &= 31;
+ }
break;
case '1' :
case '2' :
Modified: scummvm/trunk/engines/queen/display.cpp
===================================================================
--- scummvm/trunk/engines/queen/display.cpp 2007-03-02 23:13:13 UTC (rev 25940)
+++ scummvm/trunk/engines/queen/display.cpp 2007-03-02 23:47:49 UTC (rev 25941)
@@ -356,9 +356,9 @@
switch (roomNum) {
case 4:
if ((scrollx & 1) == 0) {
- palScroll(24, 64);
+ palScroll(24, 26);
loPal = 24;
- hiPal = 64;
+ hiPal = 26;
}
break;
case 74:
Modified: scummvm/trunk/engines/queen/graphics.cpp
===================================================================
--- scummvm/trunk/engines/queen/graphics.cpp 2007-03-02 23:13:13 UTC (rev 25940)
+++ scummvm/trunk/engines/queen/graphics.cpp 2007-03-02 23:47:49 UTC (rev 25941)
@@ -594,6 +594,15 @@
else if ((x + maxLineWidth) > 320)
x = 320 - maxLineWidth - 4;
+ // remap some colors for the Amiga
+ if (_vm->resource()->getPlatform() == Common::kPlatformAmiga) {
+ if (color == 5) {
+ color = (_vm->logic()->currentRoom() == 9) ? 15 : 11;
+ } else if (color == 10 && _vm->logic()->currentRoom() == 100) {
+ color = 11;
+ }
+ }
+
_vm->display()->textCurrentColor(color);
for (i = 0; i < lineCount; i++) {
@@ -1068,7 +1077,6 @@
curBob = 20 + _numFurnitureStatic + numObjectStatic;
++curImage;
bob(curBob)->clear();
-
_vm->bankMan()->unpack(pgd->firstFrame, curImage, 15);
++_numFrames;
if (pod->name > 0) {
@@ -1165,6 +1173,9 @@
BamScene::BamScene(QueenEngine *vm)
: _flag(F_STOP), _screenShaked(false), _fightData(_fight1Data), _vm(vm) {
+ if (_vm->resource()->getPlatform() == Common::kPlatformAmiga) {
+ _fightData = _fight4Data;
+ }
}
void BamScene::playSfx() {
@@ -1278,7 +1289,9 @@
break;
case 99: // end of BAM data
_lastSoundIndex = _index = 0;
- _fightData = fightDataBlocks[_vm->randomizer.getRandomNumber(2)];
+ if (_vm->resource()->getPlatform() == Common::kPlatformPC) {
+ _fightData = fightDataBlocks[_vm->randomizer.getRandomNumber(2)];
+ }
if (_flag == F_REQ_STOP) {
_flag = F_STOP;
}
@@ -1562,6 +1575,58 @@
{ { 75, 96, 1 }, { 187, 96, -23 }, { 183, 41, 47 }, 0 },
{ { 75, 96, 1 }, { 187, 96, -23 }, { 183, 41, 47 }, 99 }
};
+
+const BamScene::BamDataBlock BamScene::_fight4Data[] = {
+ { { 75, 96, 1 }, { 187, 96, -23 }, { 150, 45, 35 }, 0 },
+ { { 75, 96, 1 }, { 187, 96, -23 }, { 150, 45, 35 }, 0 },
+ { { 75, 96, 1 }, { 187, 96, -23 }, { 150, 45, 35 }, 0 },
+ { { 75, 96, 5 }, { 187, 96, -23 }, { 150, 45, 35 }, 0 },
+ { { 75, 96, 5 }, { 187, 96, -23 }, { 150, 45, 35 }, 0 },
+ { { 75, 96, 6 }, { 187, 96, -24 }, { 150, 45, 35 }, 0 },
+ { { 75, 96, 6 }, { 187, 96, -24 }, { 150, 45, 35 }, 0 },
+ { { 75, 96, 7 }, { 187, 96, -24 }, { 150, 45, 35 }, 0 },
+ { { 75, 96, 8 }, { 187, 96, -25 }, { 79, 101, 59 }, 0 },
+ { { 75, 96, 9 }, { 187, 96, -25 }, { 95, 104, 66 }, 0 },
+ { { 75, 96, 10 }, { 187, 96, -25 }, { 129, 104, 65 }, 0 },
+ { { 75, 96, 10 }, { 187, 96, -25 }, { 160, 104, 64 }, 0 },
+ { { 75, 96, 6 }, { 187, 96, -25 }, { 179, 104, 63 }, 0 },
+ { { 75, 96, 6 }, { 187, 96, -23 }, { 188, 104, 62 }, 0 },
+ { { 75, 96, 6 }, { 187, 96, -29 }, { 191, 104, 36 }, 0 },
+ { { 75, 96, 6 }, { 187, 96, -29 }, { 195, 104, 37 }, 0 },
+ { { 75, 96, 6 }, { 187, 96, -31 }, { 202, 104, 38 }, 0 },
+ { { 75, 96, 5 }, { 187, 96, -32 }, { 210, 104, 39 }, 0 },
+ { { 75, 96, 5 }, { 187, 98, -32 }, { 216, 104, 40 }, 0 },
+ { { 75, 96, 5 }, { 187, 96, -32 }, { 223, 104, 42 }, 0 },
+ { { 75, 96, 5 }, { 187, 98, -32 }, { 223, 104, 42 }, 0 },
+ { { 75, 96, 5 }, { 187, 97, -33 }, { 223, 104, 42 }, 0 },
+ { { 75, 96, 5 }, { 187, 96, -34 }, { 223, 104, 42 }, 0 },
+ { { 75, 96, 5 }, { 187, 96, -23 }, { 223, 104, 42 }, 0 },
+ { { 75, 96, 5 }, { 187, 96, -23 }, { 223, 104, 42 }, 0 },
+ { { 75, 96, 6 }, { 187, 96, -23 }, { 223, 104, 42 }, 0 },
+ { { 75, 96, 6 }, { 187, 96, -24 }, { 223, 104, 42 }, 0 },
+ { { 75, 96, 6 }, { 187, 96, -24 }, { 223, 104, 42 }, 0 },
+ { { 75, 96, 5 }, { 187, 96, -25 }, { 223, 104, 42 }, 0 },
+ { { 75, 96, 5 }, { 187, 96, -25 }, { 223, 104, 42 }, 0 },
+ { { 75, 96, 5 }, { 187, 96, -26 }, { 175, 98, 36 }, 0 },
+ { { 75, 96, 5 }, { 187, 96, -26 }, { 152, 98, 36 }, 0 },
+ { { 75, 96, 6 }, { 187, 96, -27 }, { 124, 98, 37 }, 0 },
+ { { 75, 96, 6 }, { 187, 96, -28 }, { 105, 98, 38 }, 0 },
+ { { 75, 96, 11 }, { 187, 96, -23 }, { 77, 98, 39 }, 0 },
+ { { 75, 96, 13 }, { 187, 96, -23 }, { 63, 98, 40 }, 0 },
+ { { 75, 96, 14 }, { 187, 96, -23 }, { 51, 98, 41 }, 0 },
+ { { 75, 98, 14 }, { 187, 96, -23 }, { 51, 98, 42 }, 0 },
+ { { 75, 94, 14 }, { 187, 96, -23 }, { 0, 0, 0 }, 0 },
+ { { 75, 98, 14 }, { 187, 96, -23 }, { 0, 0, 0 }, 0 },
+ { { 75, 96, 15 }, { 187, 96, -23 }, { 0, 0, 0 }, 0 },
+ { { 75, 96, 1 }, { 187, 96, -23 }, { 0, 0, 0 }, 0 },
+ { { 75, 96, 1 }, { 187, 96, -23 }, { 0, 0, 0 }, 0 },
+ { { 75, 96, 1 }, { 187, 96, -23 }, { 0, 0, 0 }, 0 },
+ { { 75, 96, 1 }, { 187, 96, -23 }, { 0, 0, 0 }, 0 },
+ { { 75, 96, 1 }, { 187, 96, -23 }, { 0, 0, 0 }, 0 },
+ { { 75, 96, 1 }, { 187, 96, -23 }, { 0, 0, 0 }, 0 },
+ { { 75, 96, 1 }, { 187, 96, -23 }, { 0, 0, 0 }, 0 },
+ { { 75, 96, 1 }, { 187, 96, -23 }, { 0, 0, 0 }, 99 }
+};
#endif
} // End of namespace Queen
Modified: scummvm/trunk/engines/queen/graphics.h
===================================================================
--- scummvm/trunk/engines/queen/graphics.h 2007-03-02 23:13:13 UTC (rev 25940)
+++ scummvm/trunk/engines/queen/graphics.h 2007-03-02 23:47:49 UTC (rev 25941)
@@ -285,6 +285,7 @@
static const BamDataBlock _fight1Data[];
static const BamDataBlock _fight2Data[];
static const BamDataBlock _fight3Data[];
+ static const BamDataBlock _fight4Data[];
#endif
};
Modified: scummvm/trunk/engines/queen/logic.cpp
===================================================================
--- scummvm/trunk/engines/queen/logic.cpp 2007-03-02 23:13:13 UTC (rev 25940)
+++ scummvm/trunk/engines/queen/logic.cpp 2007-03-02 23:47:49 UTC (rev 25941)
@@ -1476,9 +1476,10 @@
BobSlot *bobFrank = _vm->graphics()->bob(5);
bobFrank->frameNum = 38;
if (_vm->resource()->getPlatform() == Common::kPlatformAmiga) {
+ bobFrank->active = true;
bobFrank->x = 160;
bobFrank->scale = 100;
- for (int i = 300; i >= 200; i -= 5) {
+ for (int i = 350; i >= 200; i -= 5) {
bobFrank->y = i;
_vm->update();
}
@@ -1506,6 +1507,7 @@
BobSlot *bobRobot = _vm->graphics()->bob(5);
bobRobot->frameNum = 38;
if (_vm->resource()->getPlatform() == Common::kPlatformAmiga) {
+ bobRobot->active = true;
bobRobot->x = 160;
bobRobot->scale = 100;
for (int i = 350; i >= 200; i -= 5) {
@@ -2168,7 +2170,6 @@
_specialMoves[29] = &LogicGame::asmScaleBlimp;
_specialMoves[30] = &LogicGame::asmScaleEnding;
_specialMoves[31] = &LogicGame::asmWaitForCarPosition;
- _specialMoves[32] = &LogicGame::asmShakeScreen;
_specialMoves[33] = &LogicGame::asmAttemptPuzzle;
_specialMoves[34] = &LogicGame::asmScrollTitle;
if (_vm->resource()->getPlatform() == Common::kPlatformPC) {
@@ -2178,6 +2179,7 @@
_specialMoves[17] = &LogicGame::asmAltIntroPanRight; // cintr.cut
_specialMoves[18] = &LogicGame::asmAltIntroPanLeft; // cintr.cut
_specialMoves[27] = &LogicGame::asmSmooch;
+ _specialMoves[32] = &LogicGame::asmShakeScreen;
_specialMoves[34] = &LogicGame::asmScaleTitle;
_specialMoves[36] = &LogicGame::asmPanRightToHugh;
_specialMoves[37] = &LogicGame::asmMakeWhiteFlash;
Modified: scummvm/trunk/engines/queen/queen.cpp
===================================================================
--- scummvm/trunk/engines/queen/queen.cpp 2007-03-02 23:13:13 UTC (rev 25940)
+++ scummvm/trunk/engines/queen/queen.cpp 2007-03-02 23:47:49 UTC (rev 25941)
@@ -362,8 +362,9 @@
_system->initSize(GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT);
_system->endGFXTransaction();
+ _resource = new Resource();
+
_bam = new BamScene(this);
- _resource = new Resource();
_bankMan = new BankManager(_resource);
_command = new Command(this);
_debugger = new Debugger(this);
Modified: scummvm/trunk/engines/queen/resource.cpp
===================================================================
--- scummvm/trunk/engines/queen/resource.cpp 2007-03-02 23:13:13 UTC (rev 25940)
+++ scummvm/trunk/engines/queen/resource.cpp 2007-03-02 23:47:49 UTC (rev 25941)
@@ -160,11 +160,13 @@
// Handle game versions for which versionStr information is irrevelant
if (gameVersion == &_gameVersions[VER_AMI_DEMO]) { // CE101
+ ver->language = Common::EN_ANY;
ver->features |= GF_FLOPPY | GF_DEMO;
ver->platform = Common::kPlatformAmiga;
return true;
}
if (gameVersion == &_gameVersions[VER_AMI_INTERVIEW]) { // PE100
+ ver->language = Common::EN_ANY;
ver->features |= GF_FLOPPY | GF_INTERVIEW;
ver->platform = Common::kPlatformAmiga;
return true;
@@ -227,7 +229,8 @@
void Resource::checkJASVersion() {
if (_version.platform == Common::kPlatformAmiga) {
- warning("Resource::checkJASVersion() disabled for Amiga versions");
+ // don't bother verifying the JAS version string with these versions,
+ // it will be done at the end of Logic::readQueenJas, anyway
return;
}
ResourceEntry *re = resourceEntry("QUEEN.JAS");
Modified: scummvm/trunk/engines/queen/talk.cpp
===================================================================
--- scummvm/trunk/engines/queen/talk.cpp 2007-03-02 23:13:13 UTC (rev 25940)
+++ scummvm/trunk/engines/queen/talk.cpp 2007-03-02 23:47:49 UTC (rev 25941)
@@ -852,11 +852,22 @@
// talk.c lines 1491-1533
switch (_vm->logic()->currentRoom()) {
case FAYE_HEAD:
+ textX = 15;
+ if (_vm->resource()->getPlatform() == Common::kPlatformAmiga) {
+ color = isJoe ? 15 : 29;
+ }
+ break;
case AZURA_HEAD:
textX = 15;
+ if (_vm->resource()->getPlatform() == Common::kPlatformAmiga) {
+ color = isJoe ? 6 : 30;
+ }
break;
default: // FRANK_HEAD
textX = 150;
+ if (_vm->resource()->getPlatform() == Common::kPlatformAmiga) {
+ color = 17;
+ }
break;
}
textY = isJoe ? 30 : 60;
@@ -1029,7 +1040,6 @@
const SpeechParameters *iterator = _speechParameters;
if (faceDirection == DIR_RIGHT)
faceDirection = DIR_LEFT;
-
while (iterator->name[0] != '*') {
if (0 == scumm_stricmp(iterator->name, name) &&
iterator->state == state &&
@@ -1037,7 +1047,6 @@
break;
iterator++;
}
-
return iterator;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list