[Scummvm-cvs-logs] SF.net SVN: scummvm: [22214] scummvm/trunk/engines/simon
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Sat Apr 29 05:26:16 CEST 2006
Revision: 22214
Author: kirben
Date: 2006-04-29 05:25:15 -0700 (Sat, 29 Apr 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=22214&view=rev
Log Message:
-----------
Merge fadeToBlack() into o1_specialFade() and cleanup
Modified Paths:
--------------
scummvm/trunk/engines/simon/items.cpp
scummvm/trunk/engines/simon/simon.cpp
scummvm/trunk/engines/simon/simon.h
scummvm/trunk/engines/simon/vga.cpp
Modified: scummvm/trunk/engines/simon/items.cpp
===================================================================
--- scummvm/trunk/engines/simon/items.cpp 2006-04-29 12:21:47 UTC (rev 22213)
+++ scummvm/trunk/engines/simon/items.cpp 2006-04-29 12:25:15 UTC (rev 22214)
@@ -1618,7 +1618,24 @@
void SimonEngine::o1_specialFade() {
// 187: fade to black
- fadeToBlack();
+ uint i;
+
+ memcpy(_videoBuf1, _paletteBackup, 1024);
+
+ i = NUM_PALETTE_FADEOUT;
+ do {
+ palette_fadeout((uint32 *)_videoBuf1, 32);
+ palette_fadeout((uint32 *)_videoBuf1 + 32 + 16, 144);
+ palette_fadeout((uint32 *)_videoBuf1 + 32 + 16 + 144 + 16, 48);
+
+ _system->setPalette(_videoBuf1, 0, 256);
+ if (_fade)
+ _system->updateScreen();
+ delay(5);
+ } while (--i);
+
+ memcpy(_paletteBackup, _videoBuf1, 1024);
+ memcpy(_palette, _videoBuf1, 1024);
}
// -----------------------------------------------------------------------
Modified: scummvm/trunk/engines/simon/simon.cpp
===================================================================
--- scummvm/trunk/engines/simon/simon.cpp 2006-04-29 12:21:47 UTC (rev 22213)
+++ scummvm/trunk/engines/simon/simon.cpp 2006-04-29 12:25:15 UTC (rev 22214)
@@ -2337,27 +2337,6 @@
}
}
-void SimonEngine::fadeToBlack() {
- uint i;
-
- memcpy(_videoBuf1, _paletteBackup, 1024);
-
- i = NUM_PALETTE_FADEOUT;
- do {
- palette_fadeout((uint32 *)_videoBuf1, 32);
- palette_fadeout((uint32 *)_videoBuf1 + 32 + 16, 144);
- palette_fadeout((uint32 *)_videoBuf1 + 32 + 16 + 144 + 16, 48);
-
- _system->setPalette(_videoBuf1, 0, 256);
- if (_fade)
- _system->updateScreen();
- delay(5);
- } while (--i);
-
- memcpy(_paletteBackup, _videoBuf1, 1024);
- memcpy(_palette, _videoBuf1, 1024);
-}
-
void SimonEngine::addVgaEvent(uint16 num, const byte *code_ptr, uint16 cur_sprite, uint16 curZoneNum, int32 param) {
VgaTimerEntry *vte;
@@ -2863,44 +2842,6 @@
}
}
-bool SimonEngine::itemIsSiblingOf(uint16 a) {
- Item *item;
-
- CHECK_BOUNDS(a, _objectArray);
-
- item = _objectArray[a];
- if (item == NULL)
- return true;
-
- return me()->parent == item->parent;
-}
-
-bool SimonEngine::itemIsParentOf(uint16 a, uint16 b) {
- Item *item_a, *item_b;
-
- CHECK_BOUNDS(a, _objectArray);
- CHECK_BOUNDS(b, _objectArray);
-
- item_a = _objectArray[a];
- item_b = _objectArray[b];
-
- if (item_a == NULL || item_b == NULL)
- return true;
-
- return derefItem(item_a->parent) == item_b;
-}
-
-bool SimonEngine::vc_maybe_skip_proc_1(uint16 a, int16 b) {
- Item *item;
-
- CHECK_BOUNDS(a, _objectArray);
-
- item = _objectArray[a];
- if (item == NULL)
- return true;
- return item->state == b;
-}
-
void SimonEngine::closeWindow(uint a) {
if (_windowArray[a] == NULL)
return;
Modified: scummvm/trunk/engines/simon/simon.h
===================================================================
--- scummvm/trunk/engines/simon/simon.h 2006-04-29 12:21:47 UTC (rev 22213)
+++ scummvm/trunk/engines/simon/simon.h 2006-04-29 12:25:15 UTC (rev 22214)
@@ -602,7 +602,6 @@
void scriptMouseOn();
void scriptMouseOff();
void unfreezeBottom();
- void fadeToBlack();
TextLocation *getTextLocation(uint a);
void setup_cond_c_helper();
Modified: scummvm/trunk/engines/simon/vga.cpp
===================================================================
--- scummvm/trunk/engines/simon/vga.cpp 2006-04-29 12:21:47 UTC (rev 22213)
+++ scummvm/trunk/engines/simon/vga.cpp 2006-04-29 12:25:15 UTC (rev 22214)
@@ -152,6 +152,44 @@
}
}
+bool SimonEngine::itemIsSiblingOf(uint16 a) {
+ Item *item;
+
+ CHECK_BOUNDS(a, _objectArray);
+
+ item = _objectArray[a];
+ if (item == NULL)
+ return true;
+
+ return me()->parent == item->parent;
+}
+
+bool SimonEngine::itemIsParentOf(uint16 a, uint16 b) {
+ Item *item_a, *item_b;
+
+ CHECK_BOUNDS(a, _objectArray);
+ CHECK_BOUNDS(b, _objectArray);
+
+ item_a = _objectArray[a];
+ item_b = _objectArray[b];
+
+ if (item_a == NULL || item_b == NULL)
+ return true;
+
+ return derefItem(item_a->parent) == item_b;
+}
+
+bool SimonEngine::vc_maybe_skip_proc_1(uint16 a, int16 b) {
+ Item *item;
+
+ CHECK_BOUNDS(a, _objectArray);
+
+ item = _objectArray[a];
+ if (item == NULL)
+ return true;
+ return item->state == b;
+}
+
int SimonEngine::vcReadVarOrWord() {
int16 var = vcReadNextWord();
if (var < 0)
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