[Scummvm-cvs-logs] CVS: scummvm/queen cutaway.cpp,1.56,1.57 display.cpp,1.22,1.23 display.h,1.17,1.18 logic.cpp,1.81,1.82 logic.h,1.60,1.61 xref.txt,1.33,1.34
David Eriksson
twogood at users.sourceforge.net
Sat Nov 8 03:33:39 CET 2003
Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv16895/queen
Modified Files:
cutaway.cpp display.cpp display.h logic.cpp logic.h xref.txt
Log Message:
Start/stop scenes - fixes missing panel.
Index: cutaway.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/cutaway.cpp,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- cutaway.cpp 7 Nov 2003 16:47:07 -0000 1.56
+++ cutaway.cpp 8 Nov 2003 11:32:32 -0000 1.57
@@ -1198,8 +1198,8 @@
_initialRoom = _temporaryRoom = _logic->currentRoom();
- // XXX if (_comPanel == 0 || _comPanel == 2)
- // XXX SCENE_START(0);
+ if (_comPanel == 0 || _comPanel == 2)
+ _logic->sceneStart(false);
byte *ptr = _objectData;
@@ -1302,7 +1302,7 @@
talk(nextFilename);
if (_comPanel == 0 || (_comPanel == 2 && !_anotherCutaway)) {
- // XXX SCENE_END(1);
+ _logic->sceneStop(true);
_comPanel = 0;
}
Index: display.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/display.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- display.cpp 7 Nov 2003 17:56:23 -0000 1.22
+++ display.cpp 8 Nov 2003 11:32:32 -0000 1.23
@@ -313,11 +313,12 @@
void Display::palFadePanel() {
- int i;
+ int i, j;
uint8 tempPal[256 * 3];
- for (i = 224 * 3; i <= 255 * 3; ++i) {
- tempPal[i] = _pals.screen[i] * 2 / 3;
- }
+ for (i = 224; i < 256; ++i)
+ for (j = 0; j < 3; j++)
+ tempPal[i * 3 + j] = _pals.screen[i * 3 + 1] * 2 / 3;
+
palSet(tempPal, 224, 255, true);
}
Index: display.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/display.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- display.h 6 Nov 2003 08:44:33 -0000 1.17
+++ display.h 8 Nov 2003 11:32:32 -0000 1.18
@@ -79,6 +79,7 @@
void palCustomColors(uint16 roomNum); // check_colors
void palCustomScroll(uint16 roomNum); // check_pal_scroll
void palCustomFlash(); // flashspecial()
+ void palSetAllDirty() { _pals.dirtyMin = 0; _pals.dirtyMax = 255; }
void screenMode(int comPanel, bool inCutaway);
@@ -101,6 +102,8 @@
void fullscreen(bool fs) { _fullscreen = fs; }
bool fullscreen() const { return _fullscreen; }
+
+ void panel(bool on) { _panel = on; }
void handleTimer();
void waitForTimer();
Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.cpp,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -d -r1.81 -r1.82
--- logic.cpp 7 Nov 2003 14:05:45 -0000 1.81
+++ logic.cpp 8 Nov 2003 11:32:32 -0000 1.82
@@ -381,7 +381,7 @@
_settings.speechToggle = true;
_cmd->clear(false);
- // XXX SCENE = 0
+ _scene = 0;
memset(_gameState, 0, sizeof(_gameState));
_graphics->loadPanel();
_graphics->bobSetupControl();
@@ -2302,7 +2302,7 @@
_graphics->cameraBob(0);
// XXX COMPANEL=1;
- // XXX panelflag=1;
+ _display->panel(true);
}
@@ -2315,6 +2315,30 @@
_input->checkKeys();
}
+void Logic::sceneStart(bool showMouseCursor) {
+ _scene++;
+
+ _display->mouseCursorShow(showMouseCursor);
+
+ if (1 == _scene && _input->cutawayRunning()) {
+ _display->panel(false);
+ _display->palFadePanel();
+ }
+
+ update();
+}
+
+void Logic::sceneStop(bool showMouseCursor) {
+ _scene--;
+
+ if (_scene > 0)
+ return;
+
+ _display->palSetAllDirty();
+ _display->panel(true);
+ _display->mouseCursorShow(showMouseCursor);
+ zoneSetupPanel();
+}
} // End of namespace Queen
Index: logic.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.h,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- logic.h 7 Nov 2003 16:44:13 -0000 1.60
+++ logic.h 8 Nov 2003 11:32:32 -0000 1.61
@@ -279,6 +279,8 @@
void inventoryDeleteItem(uint16 itemNum, bool refresh = true);
void inventoryScroll(uint16 count, bool up);
+ void sceneStart(bool showMouseCursor);
+ void sceneStop(bool showMouseCursor);
//! Copy data from dummy object to object
void objectCopy(int dummyObjectIndex, int objectIndex);
@@ -421,6 +423,9 @@
//! Inventory items
int16 _inventoryItem[4];
+
+ //! scene counter
+ int _scene;
Resource *_resource;
Graphics *_graphics;
Index: xref.txt
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/xref.txt,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- xref.txt 7 Nov 2003 16:44:13 -0000 1.33
+++ xref.txt 8 Nov 2003 11:32:32 -0000 1.34
@@ -77,11 +77,11 @@
action_special_move Cutaway::actionSpecialMove
CUTAWAY() Cutaway::run
MAKE_COMPLEX_ANIM() Cutaway::makeComplexAnimation
-SCENE_START()
-SCENE_END()
+SCENE_START() Logic::sceneStart
+SCENE_END() Logic::sceneStop
-
CUTJOEF
-CUTON
+CUTON Input::_cutawayRunning
CUTQUIT Cutaway::_quit (rename and move to Logic?)
FINAL_ROOM Cutaway::_finalRoom
IROOM Cutaway::_initialRoom
@@ -89,7 +89,7 @@
OBJ_ANIM
OLDBANK
PERSON_DATA
-SCENE
+SCENE Logic::_scene
TROOM Cutaway::_temporaryRoom
More information about the Scummvm-git-logs
mailing list