[Scummvm-cvs-logs] CVS: scummvm/queen graphics.h,1.35,1.36 graphics.cpp,1.41,1.42 cutaway.cpp,1.54,1.55 logic.h,1.59,1.60 xref.txt,1.32,1.33
Gregory Montoir
cyx at users.sourceforge.net
Fri Nov 7 08:45:23 CET 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/gui launcher.cpp,1.75,1.76 options.cpp,1.40,1.41 options.h,1.10,1.11 widget.cpp,1.28,1.29
- Next message: [Scummvm-cvs-logs] CVS: scummvm/queen cutaway.cpp,1.55,1.56
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv31584
Modified Files:
graphics.h graphics.cpp cutaway.cpp logic.h xref.txt
Log Message:
add bob parallax stuff for room 74 (carbam)
Index: graphics.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/graphics.h,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- graphics.h 6 Nov 2003 08:44:33 -0000 1.35
+++ graphics.h 7 Nov 2003 16:44:12 -0000 1.36
@@ -108,6 +108,29 @@
};
+struct CarBamData {
+ struct Obj {
+ int16 x, y;
+ uint16 frame;
+ };
+ Obj truck;
+ Obj rico;
+ Obj fx;
+ int16 sfx;
+};
+
+
+struct BamData {
+ bool enable;
+ int16 index;
+ int16 sfx;
+
+ BamData()
+ : enable(false), index(0), sfx(0) {
+ }
+};
+
+
class Display;
class Input;
@@ -167,6 +190,11 @@
void cameraBob(int bobNum) { _cameraBob = bobNum; }
int cameraBob() const { return _cameraBob; }
+ BamData *bamData() { return &_bam; }
+ void initCarBamScene();
+ void updateCarBamScene();
+ void cleanupCarBamScene(uint16 i);
+
void update(uint16 room);
@@ -205,9 +233,13 @@
int _cameraBob; // cambob
+ BamData _bam;
+
Display *_display;
Input *_input;
Resource *_resource;
+
+ static const CarBamData CARBAM_DATA[];
};
Index: graphics.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/graphics.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- graphics.cpp 6 Nov 2003 08:44:33 -0000 1.41
+++ graphics.cpp 7 Nov 2003 16:44:13 -0000 1.42
@@ -627,7 +627,7 @@
}
break;
case 74 : // Carbam
- warning("Graphics::bobCustomParallax() - room 74 not handled");
+ updateCarBamScene();
break;
case 69 : // Fight1
warning("Graphics::bobCustomParallax() - room 69 not handled");
@@ -824,6 +824,58 @@
}
+void Graphics::initCarBamScene() {
+
+ bobClear(5);
+ bobClear(6);
+ bobClear(7);
+ _bam.enable = true;
+ _bam.index = 0;
+}
+
+
+void Graphics::updateCarBamScene() {
+
+ if (_bam.enable) {
+ const CarBamData *cb = &CARBAM_DATA[_bam.index];
+ BobSlot *pbob;
+
+ // Truck
+ pbob = &_bobs[5];
+ pbob->curPos(cb->truck.x, cb->truck.y);
+ pbob->frameNum = 40 + cb->truck.frame;
+
+ // Rico
+ pbob = &_bobs[6];
+ pbob->curPos(cb->rico.x, cb->rico.y);
+ pbob->frameNum = 30 + cb->rico.frame;
+
+ // FX
+ pbob = &_bobs[7];
+ pbob->curPos(cb->fx.x, cb->fx.y);
+ pbob->frameNum = 41 + cb->fx.frame;
+
+ _bam.sfx = cb->sfx;
+ if (_bam.sfx == 99) {
+ _bam.index = 0;
+ }
+ else {
+ ++_bam.index;
+ }
+ // XXX if(bamsfx==2) // Play BKG SFX if(SFXTOGGLE) sfxplay(NULLstr);
+ }
+}
+
+
+void Graphics::cleanupCarBamScene(uint16 oilBobNum) {
+
+ _bam.enable = false;
+ //CR 2 - Turn off big oil splat and gun shots!
+ _bobs[oilBobNum].active = false;
+ _bobs[7].active = false;
+}
+
+
void Graphics::update(uint16 room) {
bobSortAll();
@@ -955,6 +1007,86 @@
int Graphics::textCenterX(const char *text) const {
return 160 - textWidth(text) / 2;
}
+
+
+
+const CarBamData Graphics::CARBAM_DATA[] = {
+ { { 310, 105, 1 }, { 314, 106, 17 }, { 366, 101, 1 }, 0 },
+ { { 303, 105, 1 }, { 307, 106, 17 }, { 214, 0, 10 }, 0 },
+ { { 297, 104, 1 }, { 301, 105, 17 }, { 214, 0, 10 }, 0 },
+ { { 294, 103, 1 }, { 298, 104, 17 }, { 214, 0, 10 }, 0 },
+ { { 291, 102, 1 }, { 295, 103, 18 }, { 214, 0, 10 }, 0 },
+ { { 287, 101, 1 }, { 291, 102, 18 }, { 266, 51, 10 }, 2 },
+ { { 283, 100, 1 }, { 287, 101, 19 }, { 279, 47, 11 }, 0 },
+ { { 279, 99, 1 }, { 283, 100, 20 }, { 294, 46, 12 }, 0 },
+ { { 274, 98, 1 }, { 278, 99, 20 }, { 305, 44, 13 }, 0 },
+ { { 269, 98, 1 }, { 273, 99, 20 }, { 320, 42, 14 }, 0 },
+ { { 264, 98, 1 }, { 268, 99, 17 }, { 214, 0, 10 }, 0 },
+ { { 261, 98, 1 }, { 265, 99, 17 }, { 214, 0, 10 }, 0 },
+ { { 259, 98, 1 }, { 263, 99, 17 }, { 214, 0, 10 }, 0 },
+ { { 258, 98, 1 }, { 262, 99, 17 }, { 214, 0, 10 }, 0 },
+ { { 257, 98, 2 }, { 260, 99, 17 }, { 214, 0, 10 }, 0 },
+ { { 255, 99, 3 }, { 258, 100, 17 }, { 214, 0, 10 }, 0 },
+ { { 258, 99, 4 }, { 257, 100, 17 }, { 214, 0, 10 }, 0 },
+ { { 264, 102, 4 }, { 263, 103, 17 }, { 214, 0, 10 }, 0 },
+ { { 272, 105, 5 }, { 274, 106, 17 }, { 214, 0, 10 }, 0 },
+ { { 276, 107, 5 }, { 277, 108, 17 }, { 214, 0, 10 }, 0 },
+ { { 283, 108, 5 }, { 284, 109, 17 }, { 214, 0, 10 }, 0 },
+ { { 288, 109, 5 }, { 288, 110, 17 }, { 214, 0, 10 }, 0 },
+ { { 293, 110, 5 }, { 293, 111, 18 }, { 266, 59, 10 }, 2 },
+ { { 298, 110, 5 }, { 299, 111, 18 }, { 277, 56, 11 }, 0 },
+ { { 303, 110, 5 }, { 304, 111, 19 }, { 285, 55, 12 }, 0 },
+ { { 308, 110, 4 }, { 307, 111, 20 }, { 296, 54, 13 }, 0 },
+ { { 309, 110, 3 }, { 312, 111, 20 }, { 304, 53, 14 }, 0 },
+ { { 310, 110, 3 }, { 313, 111, 20 }, { 214, 0, 10 }, 0 },
+ { { 311, 110, 3 }, { 314, 111, 17 }, { 214, 0, 10 }, 0 },
+ { { 309, 110, 2 }, { 312, 111, 17 }, { 214, 0, 10 }, 0 },
+ { { 304, 111, 2 }, { 307, 112, 17 }, { 214, 0, 10 }, 0 },
+ { { 300, 110, 2 }, { 303, 111, 17 }, { 214, 0, 10 }, 0 },
+ { { 296, 109, 2 }, { 299, 110, 17 }, { 214, 0, 10 }, 0 },
+ { { 292, 108, 1 }, { 296, 109, 17 }, { 214, 0, 10 }, 0 },
+ { { 285, 107, 2 }, { 289, 108, 17 }, { 214, 0, 10 }, 0 },
+ { { 282, 107, 3 }, { 285, 108, 17 }, { 214, 0, 10 }, 0 },
+ { { 278, 107, 4 }, { 277, 108, 18 }, { 214, 0, 10 }, 0 },
+ { { 279, 108, 4 }, { 278, 109, 18 }, { 252, 57, 10 }, 2 },
+ { { 281, 108, 5 }, { 283, 109, 18 }, { 265, 55, 11 }, 0 },
+ { { 284, 109, 5 }, { 285, 110, 19 }, { 277, 55, 12 }, 0 },
+ { { 287, 110, 5 }, { 288, 111, 20 }, { 288, 54, 13 }, 0 },
+ { { 289, 111, 5 }, { 290, 112, 20 }, { 299, 54, 14 }, 0 },
+ { { 291, 112, 4 }, { 290, 113, 20 }, { 214, 0, 10 }, 0 },
+ { { 293, 113, 3 }, { 295, 114, 17 }, { 214, 0, 10 }, 0 },
+ { { 296, 114, 2 }, { 299, 115, 17 }, { 214, 0, 10 }, 0 },
+ { { 295, 115, 2 }, { 298, 116, 17 }, { 214, 0, 10 }, 0 },
+ { { 293, 116, 1 }, { 297, 117, 17 }, { 214, 0, 10 }, 0 },
+ { { 289, 116, 1 }, { 292, 117, 17 }, { 214, 0, 10 }, 0 },
+ { { 285, 115, 1 }, { 289, 116, 17 }, { 214, 0, 10 }, 0 },
+ { { 281, 114, 1 }, { 284, 115, 17 }, { 214, 0, 10 }, 0 },
+ { { 277, 113, 1 }, { 280, 114, 17 }, { 214, 0, 10 }, 0 },
+ { { 274, 112, 1 }, { 277, 113, 17 }, { 214, 0, 10 }, 0 },
+ { { 271, 111, 1 }, { 274, 112, 17 }, { 214, 0, 10 }, 0 },
+ { { 267, 110, 1 }, { 270, 111, 17 }, { 214, 0, 10 }, 0 },
+ { { 263, 109, 1 }, { 266, 110, 17 }, { 214, 0, 10 }, 0 },
+ { { 260, 108, 1 }, { 263, 109, 17 }, { 214, 0, 10 }, 0 },
+ { { 254, 108, 2 }, { 256, 109, 17 }, { 214, 0, 10 }, 0 },
+ { { 252, 107, 3 }, { 254, 108, 17 }, { 214, 0, 10 }, 0 },
+ { { 253, 108, 3 }, { 255, 109, 17 }, { 214, 0, 10 }, 0 },
+ { { 255, 109, 3 }, { 257, 110, 18 }, { 231, 59, 10 }, 2 },
+ { { 258, 111, 3 }, { 260, 112, 18 }, { 242, 57, 11 }, 0 },
+ { { 263, 112, 4 }, { 262, 113, 19 }, { 256, 57, 12 }, 0 },
+ { { 270, 111, 4 }, { 269, 112, 20 }, { 267, 57, 13 }, 0 },
+ { { 274, 112, 5 }, { 276, 113, 20 }, { 281, 56, 14 }, 0 },
+ { { 280, 111, 6 }, { 282, 112, 19 }, { 214, 0, 10 }, 0 },
+ { { 284, 109, 6 }, { 285, 110, 17 }, { 214, 0, 10 }, 0 },
+ { { 289, 108, 6 }, { 291, 109, 17 }, { 214, 0, 10 }, 0 },
+ { { 294, 107, 6 }, { 296, 108, 17 }, { 214, 0, 10 }, 0 },
+ { { 294, 107, 5 }, { 296, 108, 18 }, { 272, 57, 10 }, 2 },
+ { { 295, 107, 5 }, { 297, 108, 18 }, { 282, 57, 11 }, 0 },
+ { { 296, 108, 5 }, { 298, 109, 19 }, { 295, 57, 12 }, 0 },
+ { { 300, 108, 4 }, { 299, 109, 20 }, { 303, 57, 13 }, 0 },
+ { { 303, 108, 3 }, { 306, 109, 20 }, { 313, 57, 14 }, 0 },
+ { { 307, 109, 2 }, { 311, 110, 17 }, { 214, 0, 10 }, 0 },
+ { { 310, 110, 1 }, { 314, 111, 17 }, { 214, 0, 10 }, 99 }
+};
} // End of namespace Queen
Index: cutaway.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/cutaway.cpp,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- cutaway.cpp 7 Nov 2003 15:34:51 -0000 1.54
+++ cutaway.cpp 7 Nov 2003 16:44:13 -0000 1.55
@@ -317,22 +317,11 @@
// c73e.cut - carbam background animation
case 7:
- _graphics->bobClear(5); // Car
- _graphics->bobClear(6); // FX
- _graphics->bobClear(7); // Rico
- _graphics->bob(5)->active = true;
- _graphics->bob(6)->active = true;
- _graphics->bob(7)->active = true;
+ _graphics->initCarBamScene();
break;
- // c74a.cut - Turn off big oil splat and gun shots!
case 8:
- {
- // XXX bamflag=0;
- uint16 oilBobIndex = _logic->findBob(594);
- _graphics->bob(oilBobIndex)->active = false;
- _graphics->bob(7)->active = false;
- }
+ _graphics->cleanupCarBamScene(_logic->findBob(594)); // Oil object
break;
// cdint.cut - put camera on Joe
Index: logic.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.h,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- logic.h 6 Nov 2003 21:06:00 -0000 1.59
+++ logic.h 7 Nov 2003 16:44:13 -0000 1.60
@@ -279,6 +279,7 @@
void inventoryDeleteItem(uint16 itemNum, bool refresh = true);
void inventoryScroll(uint16 count, bool up);
+
//! Copy data from dummy object to object
void objectCopy(int dummyObjectIndex, int objectIndex);
Index: xref.txt
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/xref.txt,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- xref.txt 5 Nov 2003 10:11:37 -0000 1.32
+++ xref.txt 7 Nov 2003 16:44:13 -0000 1.33
@@ -232,6 +232,8 @@
ACTOR_DATA_MAX Logic::_numActors
AREA Logic::_area
AREAMAX Logic::_areaMax
+bamflag Graphics::_bam.enable
+bamindex Graphics::_bam.index
DESCTOT Logic::_numDescriptions
ENTRY_OBJ Logic::_entryObj
FMAX Logic::_numFurnitureStatic
@@ -331,8 +333,6 @@
sfxbusy()
sfxplay()
-
-bamflag
-bamindex
CURRSONG
SFXNAME Logic::_sfxName
tmpbamflag
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/gui launcher.cpp,1.75,1.76 options.cpp,1.40,1.41 options.h,1.10,1.11 widget.cpp,1.28,1.29
- Next message: [Scummvm-cvs-logs] CVS: scummvm/queen cutaway.cpp,1.55,1.56
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list