[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.476,2.477 object.cpp,1.236,1.237 script_v100he.cpp,2.145,2.146 script_v72he.cpp,2.280,2.281 script_v7he.cpp,2.150,2.151 script_v80he.cpp,2.105,2.106 script_v90he.cpp,2.244,2.245 wiz_he.cpp,2.74,2.75 wiz_he.h,2.20,2.21
kirben
kirben at users.sourceforge.net
Sat May 7 00:59:02 CEST 2005
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7150/scumm
Modified Files:
intern.h object.cpp script_v100he.cpp script_v72he.cpp
script_v7he.cpp script_v80he.cpp script_v90he.cpp wiz_he.cpp
wiz_he.h
Log Message:
Add missing opcode details
Fix regression (Fields not initied)
Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.476
retrieving revision 2.477
diff -u -d -r2.476 -r2.477
--- intern.h 5 May 2005 13:16:48 -0000 2.476
+++ intern.h 7 May 2005 07:57:56 -0000 2.477
@@ -932,7 +932,7 @@
void o72_getPixel();
void o72_pickVarRandom();
void o72_redimArray();
- void o72_checkGlobQueue();
+ void o72_isResourceLoaded();
void o72_readINI();
void o72_writeINI();
void o72_getResourceSize();
@@ -1300,6 +1300,7 @@
void o100_cursorCommand();
void o100_wait();
void o100_writeFile();
+ void o100_isResourceLoaded();
void o100_getResourceSize();
void o100_getSpriteGroupInfo();
void o100_getPaletteData();
Index: object.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/object.cpp,v
retrieving revision 1.236
retrieving revision 1.237
diff -u -d -r1.236 -r1.237
--- object.cpp 28 Apr 2005 22:34:55 -0000 1.236
+++ object.cpp 7 May 2005 07:57:57 -0000 1.237
@@ -875,7 +875,7 @@
void ScummEngine_v80he::clearDrawQueues() {
ScummEngine_v70he::clearDrawQueues();
- _wiz.imageNumClear();
+ _wiz.clearWizBuffer();
}
Index: script_v100he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v100he.cpp,v
retrieving revision 2.145
retrieving revision 2.146
diff -u -d -r2.145 -r2.146
--- script_v100he.cpp 2 May 2005 02:12:00 -0000 2.145
+++ script_v100he.cpp 7 May 2005 07:57:57 -0000 2.146
@@ -269,7 +269,7 @@
/* B4 */
OPCODE(o72_getNumFreeArrays),
OPCODE(o72_getArrayDimSize),
- OPCODE(o72_checkGlobQueue),
+ OPCODE(o100_isResourceLoaded),
OPCODE(o100_getResourceSize),
/* B8 */
OPCODE(o100_getSpriteGroupInfo),
@@ -2198,6 +2198,36 @@
debug(1, "o100_writeFile: slot %d, subOp %d", slot, subOp);
}
+void ScummEngine_v100he::o100_isResourceLoaded() {
+ // Reports percentage of resource loaded by queue
+ int type;
+
+ byte subOp = fetchScriptByte();
+ int idx = pop();
+
+ switch (subOp) {
+ case 25:
+ type = rtCostume;
+ break;
+ case 41:
+ type = rtImage;
+ break;
+ case 62:
+ type = rtRoom;
+ break;
+ case 66:
+ type = rtScript;
+ break;
+ case 72:
+ type = rtSound;
+ break;
+ default:
+ error("o100_isResourceLoaded: default case %d", subOp);
+ }
+
+ push (res.isResourceLoaded(type, idx) ? 100 : 0);
+}
+
void ScummEngine_v100he::o100_getResourceSize() {
const byte *ptr;
int size, type;
Index: script_v72he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v72he.cpp,v
retrieving revision 2.280
retrieving revision 2.281
diff -u -d -r2.280 -r2.281
--- script_v72he.cpp 2 May 2005 07:20:44 -0000 2.280
+++ script_v72he.cpp 7 May 2005 07:57:57 -0000 2.281
@@ -346,7 +346,7 @@
/* F0 */
OPCODE(o70_concatString),
OPCODE(o70_compareString),
- OPCODE(o72_checkGlobQueue),
+ OPCODE(o72_isResourceLoaded),
OPCODE(o72_readINI),
/* F4 */
OPCODE(o72_writeINI),
@@ -2107,12 +2107,34 @@
}
}
-void ScummEngine_v72he::o72_checkGlobQueue() {
+void ScummEngine_v72he::o72_isResourceLoaded() {
+ // Reports percentage of resource loaded by queue
+ int type;
+
byte subOp = fetchScriptByte();
int idx = pop();
- debug(1,"o72_checkGlobQueue stub (%d, %d)", subOp, idx);
- push(100);
+ switch (subOp) {
+ case 18:
+ type = rtImage;
+ break;
+ case 226:
+ type = rtRoom;
+ break;
+ case 227:
+ type = rtCostume;
+ break;
+ case 228:
+ type = rtSound;
+ break;
+ case 229:
+ type = rtScript;
+ break;
+ default:
+ error("o72_isResourceLoaded: default case %d", subOp);
+ }
+
+ push (res.isResourceLoaded(type, idx) ? 100 : 0);
}
void ScummEngine_v72he::o72_readINI() {
Index: script_v7he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v7he.cpp,v
retrieving revision 2.150
retrieving revision 2.151
diff -u -d -r2.150 -r2.151
--- script_v7he.cpp 2 May 2005 02:12:00 -0000 2.150
+++ script_v7he.cpp 7 May 2005 07:57:57 -0000 2.151
@@ -512,6 +512,7 @@
subOp = fetchScriptByte();
+ debug(0, "o70_resourceRoutines: case %d", subOp);
switch (subOp) {
case 100: // SO_LOAD_SCRIPT
resid = pop();
@@ -605,22 +606,27 @@
case 120:
// Queue load script
resid = pop();
+ ensureResourceLoaded(rtScript, resid);
break;
case 121:
// Queue load sound
resid = pop();
+ ensureResourceLoaded(rtSound, resid);
break;
case 122:
// Queue load costume
resid = pop();
+ ensureResourceLoaded(rtCostume, resid);
break;
case 123:
// Queue load room image
resid = pop();
+ ensureResourceLoaded(rtRoomImage, resid);
break;
case 203:
// Queue load image
resid = pop();
+ ensureResourceLoaded(rtImage, resid);
break;
case 159:
resid = pop();
Index: script_v80he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v80he.cpp,v
retrieving revision 2.105
retrieving revision 2.106
diff -u -d -r2.105 -r2.106
--- script_v80he.cpp 1 May 2005 01:30:19 -0000 2.105
+++ script_v80he.cpp 7 May 2005 07:57:58 -0000 2.106
@@ -346,7 +346,7 @@
/* F0 */
OPCODE(o70_concatString),
OPCODE(o70_compareString),
- OPCODE(o72_checkGlobQueue),
+ OPCODE(o72_isResourceLoaded),
OPCODE(o72_readINI),
/* F4 */
OPCODE(o72_writeINI),
Index: script_v90he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v90he.cpp,v
retrieving revision 2.244
retrieving revision 2.245
diff -u -d -r2.244 -r2.245
--- script_v90he.cpp 1 May 2005 11:09:30 -0000 2.244
+++ script_v90he.cpp 7 May 2005 07:57:59 -0000 2.245
@@ -344,7 +344,7 @@
/* F0 */
OPCODE(o70_concatString),
OPCODE(o70_compareString),
- OPCODE(o72_checkGlobQueue),
+ OPCODE(o72_isResourceLoaded),
OPCODE(o72_readINI),
/* F4 */
OPCODE(o72_writeINI),
Index: wiz_he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/wiz_he.cpp,v
retrieving revision 2.74
retrieving revision 2.75
diff -u -d -r2.74 -r2.75
--- wiz_he.cpp 5 May 2005 15:19:30 -0000 2.74
+++ wiz_he.cpp 7 May 2005 07:57:59 -0000 2.75
@@ -36,7 +36,7 @@
_rectOverrideEnabled = false;
}
-void Wiz::imageNumClear() {
+void Wiz::clearWizBuffer() {
_imagesNum = 0;
}
@@ -948,13 +948,22 @@
void ScummEngine_v72he::displayWizImage(WizImage *pwi) {
if (_fullRedraw) {
assert(_wiz._imagesNum < ARRAYSIZE(_wiz._images));
- memcpy(&_wiz._images[_wiz._imagesNum], pwi, sizeof(WizImage));
+ WizImage *wi = &_wiz._images[_wiz._imagesNum];
+ wi->resNum = pwi->resNum;
+ wi->x1 = pwi->x1;
+ wi->y1 = pwi->y1;
+ wi->zorder = 0;
+ wi->state = pwi->state;
+ wi->flags = pwi->flags;
+ wi->xmapNum = 0;
+ wi->field_390 = 0;
+ wi->paletteNum = 0;
++_wiz._imagesNum;
} else if (pwi->flags & kWIFIsPolygon) {
- drawWizPolygon(pwi->resNum, pwi->state, pwi->x1, pwi->flags, pwi->xmapNum, 0, 0);
+ drawWizPolygon(pwi->resNum, pwi->state, pwi->x1, pwi->flags, 0, 0, 0);
} else {
const Common::Rect *r = NULL;
- drawWizImage(pwi->resNum, pwi->state, pwi->x1, pwi->y1, pwi->zorder, pwi->xmapNum, pwi->field_390, r, pwi->flags, 0, 0);
+ drawWizImage(pwi->resNum, pwi->state, pwi->x1, pwi->y1, 0, 0, 0, r, pwi->flags, 0, 0);
}
}
Index: wiz_he.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/wiz_he.h,v
retrieving revision 2.20
retrieving revision 2.21
diff -u -d -r2.20 -r2.21
--- wiz_he.h 2 May 2005 07:36:23 -0000 2.20
+++ wiz_he.h 7 May 2005 07:57:59 -0000 2.21
@@ -144,7 +144,7 @@
WizPolygon _polygons[NUM_POLYGONS];
Wiz();
- void imageNumClear();
+ void clearWizBuffer();
Common::Rect _rectOverride;
bool _rectOverrideEnabled;
More information about the Scummvm-git-logs
mailing list