[Scummvm-cvs-logs] CVS: scummvm/queen cutaway.cpp,1.33,1.34 display.cpp,1.7,1.8 display.h,1.4,1.5 logic.cpp,1.47,1.48 logic.h,1.34,1.35

David Eriksson twogood at users.sourceforge.net
Sat Oct 18 09:31:03 CEST 2003


Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv15267

Modified Files:
	cutaway.cpp display.cpp display.h logic.cpp logic.h 
Log Message:
Special actions for cdint.cut


Index: cutaway.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/cutaway.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- cutaway.cpp	18 Oct 2003 12:59:44 -0000	1.33
+++ cutaway.cpp	18 Oct 2003 14:01:43 -0000	1.34
@@ -21,6 +21,7 @@
 
 #include "stdafx.h"
 #include "cutaway.h"
+#include "display.h"
 #include "graphics.h"
 #include "talk.h"
 #include "walk.h"
@@ -284,11 +285,110 @@
 
 void Cutaway::actionSpecialMove(int index) {
 
-//	switch (index) {
-//		default:
+	switch (index) {
+
+		// cdint.cut
+		case 36:
+			break;
+		
+		// cdint.cut - flash white
+		case 37:
+			// XXX flashspecial();
+			break;
+
+		// cdint.cut - pan right
+		case 38:
+			{
+				Display *display = _logic->display();
+
+				BobSlot *bob_box   = _graphics->bob(20);
+				BobSlot *bob_beam  = _graphics->bob(21);
+				BobSlot *bob_crate = _graphics->bob(22);
+				BobSlot *bob_clock = _graphics->bob(23);
+				BobSlot *bob_hands = _graphics->bob(24);
+
+				// XXX _graphics->cameraBob(-1);
+				// XXX fastmode = 1;
+					
+				_graphics->update();
+
+				bob_box  ->x += 280 * 2;
+				bob_beam ->x += 30;
+				bob_crate->x += 180 * 3;
+
+				int horizontalScroll = display->horizontalScroll();
+
+				int i = 1;
+				while (horizontalScroll < 290) {
+
+					horizontalScroll = horizontalScroll + i;
+					if (horizontalScroll > 290)
+						horizontalScroll = 290;
+
+					//debug(0, "horizontalScroll = %i", horizontalScroll);
+
+					display->horizontalScroll(horizontalScroll);
+
+					bob_box  ->x -= i * 2;
+					bob_beam ->x -= i;
+					bob_crate->x -= i * 3;
+					bob_clock->x -= i * 2;
+					bob_hands->x -= i * 2;
+
+					_graphics->update();
+
+					if (_quit)
+						return;
+
+				}
+
+				// XXX fastmode = 0;
+			}
+			break;
+
+		// cdint.cut - pan left to bomb
+		case 39: 
+			{
+				Display *display = _logic->display();
+
+				BobSlot *bob21 = _graphics->bob(21);
+				BobSlot *bob22 = _graphics->bob(22);
+
+				// XXX _graphics->cameraBob(-1);
+				// XXX fastmode = 1;
+				
+				int horizontalScroll = display->horizontalScroll();
+
+				int i = 5;
+				while (horizontalScroll > 0 || bob21->x < 136) {
+
+					horizontalScroll -= i;
+					if (horizontalScroll < 0)
+						horizontalScroll = 0;
+
+					debug(0, "horizontalScroll = %i", horizontalScroll);
+					display->horizontalScroll(horizontalScroll);
+
+					if (horizontalScroll < 272 && bob21->x < 136)
+						bob21->x += (i/2);
+
+					bob22->x += i;
+
+					_graphics->update();
+
+					if (_quit)
+						return;
+
+				}
+
+				// XXX fastmode = 0;
+			}
+			break;
+
+		default:
 			warning("Unhandled special move: %i", index);
-//			break;
-//	}
+			break;
+	}
 }
 
 byte *Cutaway::turnOnPeople(byte *ptr, CutawayObject &object) {

Index: display.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/display.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- display.cpp	17 Oct 2003 14:26:05 -0000	1.7
+++ display.cpp	18 Oct 2003 14:01:43 -0000	1.8
@@ -724,7 +724,7 @@
 }
 
 
-void Display::horizontalScrollUpdate(uint16 xCamera) {
+void Display::horizontalScrollUpdate(int16 xCamera) {
 
 	debug(9, "Display::horizontalScrollUpdate(%d)", xCamera);
 	_horizontalScroll = 0;
@@ -739,7 +739,7 @@
 }
 
 
-void Display::horizontalScroll(uint16 scroll) {
+void Display::horizontalScroll(int16 scroll) {
 
 	_horizontalScroll = scroll;
 }

Index: display.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/display.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- display.h	17 Oct 2003 14:26:05 -0000	1.4
+++ display.h	18 Oct 2003 14:01:43 -0000	1.5
@@ -86,9 +86,9 @@
 	void textDraw(uint16 x, uint16 y, uint8 color, const char *text, bool outlined = true);
 	uint16 textWidth(const char *text) const;
 
-	void horizontalScrollUpdate(uint16 xCamera); // calc_screen_scroll
-	void horizontalScroll(uint16 scroll);
-	uint16 horizontalScroll() const { return _horizontalScroll; }
+	void horizontalScrollUpdate(int16 xCamera); // calc_screen_scroll
+	void horizontalScroll(int16 scroll);
+	int16 horizontalScroll() const { return _horizontalScroll; }
 
 	bool fullscreen() const { return _fullscreen; }
 

Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- logic.cpp	17 Oct 2003 13:12:50 -0000	1.47
+++ logic.cpp	18 Oct 2003 14:01:43 -0000	1.48
@@ -29,8 +29,8 @@
 
 namespace Queen {
 
-Logic::Logic(Resource *resource, Graphics *graphics, Display *display)
-	: _resource(resource), _graphics(graphics), _display(display), _talkSpeed(DEFAULT_TALK_SPEED) {
+Logic::Logic(Resource *resource, Graphics *graphics, Display *theDisplay)
+	: _resource(resource), _graphics(graphics), _display(theDisplay), _talkSpeed(DEFAULT_TALK_SPEED) {
 	_jas = _resource->loadFile("QUEEN.JAS", 20);
 	_joe.x = _joe.y = 0;
 	_joe.scale = 100;

Index: logic.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.h,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- logic.h	16 Oct 2003 19:40:28 -0000	1.34
+++ logic.h	18 Oct 2003 14:01:43 -0000	1.35
@@ -149,6 +149,8 @@
 	//! FACE_JOE()
 	uint16 joeFace();
 
+	Display *display() { return _display; }
+
 protected:
 	bool _textToggle;
 	bool _speechToggle;





More information about the Scummvm-git-logs mailing list