[Scummvm-cvs-logs] SF.net SVN: scummvm:[36063] scummvm/trunk/engines/tucker
cyx at users.sourceforge.net
cyx at users.sourceforge.net
Sun Jan 25 19:08:27 CET 2009
Revision: 36063
http://scummvm.svn.sourceforge.net/scummvm/?rev=36063&view=rev
Author: cyx
Date: 2009-01-25 18:08:26 +0000 (Sun, 25 Jan 2009)
Log Message:
-----------
added a few more code differences, demo version is now completable
Modified Paths:
--------------
scummvm/trunk/engines/tucker/resource.cpp
scummvm/trunk/engines/tucker/staticres.cpp
scummvm/trunk/engines/tucker/tucker.cpp
scummvm/trunk/engines/tucker/tucker.h
Modified: scummvm/trunk/engines/tucker/resource.cpp
===================================================================
--- scummvm/trunk/engines/tucker/resource.cpp 2009-01-25 12:27:57 UTC (rev 36062)
+++ scummvm/trunk/engines/tucker/resource.cpp 2009-01-25 18:08:26 UTC (rev 36063)
@@ -415,9 +415,11 @@
}
int start = 0;
_spriteAnimationsTable[entry].firstFrameIndex = i;
- // 9999 is also used as the end marker in the demo version
- while (start != 999 && start != 9999) {
+ while (start != 999) {
start = t.getNextInteger();
+ if (start == 9999) { // end marker in the demo version
+ start = 999;
+ }
_spriteAnimationFramesTable[i] = start;
++i;
}
@@ -452,7 +454,7 @@
copyLocBitmap(filename, 0, false);
Graphics::copyRect(_quadBackgroundGfxBuf + 89600, 320, _locationBackgroundGfxBuf, 640, 320, 140);
}
- if ((_gameFlags & kGameFlagDemo) == 0 && _locationNum == 1) {
+ if (_locationNum == 1) {
_loadLocBufPtr = _quadBackgroundGfxBuf + 89600;
loadImage("rochpath.pcx", _loadLocBufPtr, 0);
}
Modified: scummvm/trunk/engines/tucker/staticres.cpp
===================================================================
--- scummvm/trunk/engines/tucker/staticres.cpp 2009-01-25 12:27:57 UTC (rev 36062)
+++ scummvm/trunk/engines/tucker/staticres.cpp 2009-01-25 18:08:26 UTC (rev 36063)
@@ -28,7 +28,7 @@
namespace Tucker {
-const int TuckerEngine::_locationWidthTable[85] = {
+const uint8 TuckerEngine::_locationWidthTableGame[85] = {
1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 4, 2, 1,
1, 2, 1, 2, 4, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 4, 1,
@@ -36,6 +36,13 @@
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0
};
+const uint8 TuckerEngine::_locationWidthTableDemo[70] = {
+ 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1,
+ 1, 2, 1, 2, 4, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1,
+ 1, 1, 1, 1, 2, 1, 2, 2, 2, 4, 4, 2, 2, 1, 1, 0
+};
+
const uint8 TuckerEngine::_sprA02LookupTable[88] = {
0, 6, 2, 8, 1, 0, 6, 0, 2, 2, 2, 1, 2, 0, 1, 1, 6, 0,
1, 2, 1, 2, 3, 0, 6, 12, 7, 7, 1, 8, 1, 0, 3, 0, 4,
@@ -165,7 +172,7 @@
0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000
};
-int TuckerEngine::_locationHeightTable[80] = {
+uint8 TuckerEngine::_locationHeightTableGame[80] = {
0x00, 0x1C, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x3C, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -173,6 +180,14 @@
0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
+uint8 TuckerEngine::_locationHeightTableDemo[70] = {
+ 0x00, 0x1C, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x3C, 0x00, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
int TuckerEngine::_objectKeysPosXTable[80] = {
0x000, 0x0A0, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000, 0x12B, 0x000, 0x000, 0x000, 0x000, 0x000, 0x000,
0x000, 0x000, 0x000, 0x140, 0x000, 0x000, 0x000, 0x000, 0x09E, 0x060, 0x0C0, 0x040, 0x0A0, 0x12C, 0x068, 0x098,
Modified: scummvm/trunk/engines/tucker/tucker.cpp
===================================================================
--- scummvm/trunk/engines/tucker/tucker.cpp 2009-01-25 12:27:57 UTC (rev 36062)
+++ scummvm/trunk/engines/tucker/tucker.cpp 2009-01-25 18:08:26 UTC (rev 36063)
@@ -143,6 +143,14 @@
_gameHintsDisplayText = 0;
_gameHintsStringNum = 0;
+ if ((_gameFlags & kGameFlagDemo) == 0) {
+ _locationWidthTable = _locationWidthTableGame;
+ _locationHeightTable = _locationHeightTableGame;
+ } else {
+ _locationWidthTable = _locationWidthTableDemo;
+ _locationHeightTable = _locationHeightTableDemo;
+ }
+
memset(_sprA02Table, 0, sizeof(_sprA02Table));
memset(_sprC02Table, 0, sizeof(_sprC02Table));
memset(_actionsTable, 0, sizeof(_actionsTable));
@@ -1527,9 +1535,7 @@
void TuckerEngine::execData3PreUpdate() {
switch (_locationNum) {
case 1:
- if ((_gameFlags & kGameFlagDemo) == 0) {
- execData3PreUpdate_locationNum1();
- }
+ execData3PreUpdate_locationNum1();
break;
case 2:
execData3PreUpdate_locationNum2();
@@ -2819,7 +2825,7 @@
offset += _charWidthTable[chr];
++pos;
}
- addDirtyRect(startOffset % 640, startOffset / 640, (offset - startOffset) % 640, Graphics::_charset.charH);
+ addDirtyRect(startOffset % 640, startOffset / 640, Graphics::_charset.charW * pos, Graphics::_charset.charH);
}
void TuckerEngine::drawItemString(int offset, int num, const uint8 *str) {
@@ -3776,13 +3782,13 @@
void TuckerEngine::drawSpeechTextLine(const uint8 *dataPtr, int pos, int count, int dstOffset, uint8 color) {
int startOffset = dstOffset;
- while (count > 0 && dataPtr[pos] != '\n') {
+ int i = 0;
+ for (; i < count && dataPtr[pos] != '\n'; ++i) {
Graphics::drawStringChar(_locationBackgroundGfxBuf + dstOffset, dataPtr[pos], 640, color, _charsetGfxBuf);
dstOffset += _charWidthTable[dataPtr[pos]];
++pos;
- --count;
}
- addDirtyRect(startOffset % 640, startOffset / 640, (dstOffset - startOffset) % 640, Graphics::_charset.charH);
+ addDirtyRect(startOffset % 640, startOffset / 640, Graphics::_charset.charW * i, Graphics::_charset.charH);
}
void TuckerEngine::redrawScreen(int offset) {
Modified: scummvm/trunk/engines/tucker/tucker.h
===================================================================
--- scummvm/trunk/engines/tucker/tucker.h 2009-01-25 12:27:57 UTC (rev 36062)
+++ scummvm/trunk/engines/tucker/tucker.h 2009-01-25 18:08:26 UTC (rev 36063)
@@ -624,6 +624,8 @@
uint8 *_csDataBuf;
int _csDataSize;
uint8 _charWidthTable[256];
+ const uint8 *_locationWidthTable;
+ uint8 *_locationHeightTable;
int _mousePosX, _mousePosY;
int _prevMousePosX, _prevMousePosY;
@@ -817,12 +819,14 @@
int _updateLocation70StringLen;
uint8 _updateLocation70String[20];
- static const int _locationWidthTable[85];
+ static const uint8 _locationWidthTableGame[85];
+ static const uint8 _locationWidthTableDemo[70];
static const uint8 _sprA02LookupTable[88];
static const uint8 _sprC02LookupTable[100];
static const uint8 _sprC02LookupTable2[100];
static const int _staticData3Table[1600];
- static int _locationHeightTable[80];
+ static uint8 _locationHeightTableGame[80];
+ static uint8 _locationHeightTableDemo[70];
static int _objectKeysPosXTable[80];
static int _objectKeysPosYTable[80];
static int _objectKeysLocationTable[80];
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