[Scummvm-cvs-logs] SF.net SVN: scummvm:[44781] scummvm/trunk/engines/sci/gui
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Thu Oct 8 12:35:12 CEST 2009
Revision: 44781
http://scummvm.svn.sourceforge.net/scummvm/?rev=44781&view=rev
Author: m_kiewitz
Date: 2009-10-08 10:35:12 +0000 (Thu, 08 Oct 2009)
Log Message:
-----------
SCI/newgui: kAnimate - more implemented, cels are now drawn but isnt working correctly currently
Modified Paths:
--------------
scummvm/trunk/engines/sci/gui/gui.cpp
scummvm/trunk/engines/sci/gui/gui_gfx.cpp
scummvm/trunk/engines/sci/gui/gui_gfx.h
Modified: scummvm/trunk/engines/sci/gui/gui.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui.cpp 2009-10-08 10:02:26 UTC (rev 44780)
+++ scummvm/trunk/engines/sci/gui/gui.cpp 2009-10-08 10:35:12 UTC (rev 44781)
@@ -405,7 +405,7 @@
_gfx->AnimateUpdate();
}
- _gfx->AnimateDrawCels();
+ _gfx->AnimateDrawCels(list);
if (_screen->_picNotValid) {
//(this->*ShowPic)(_showMap, _showStyle);
Modified: scummvm/trunk/engines/sci/gui/gui_gfx.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_gfx.cpp 2009-10-08 10:02:26 UTC (rev 44780)
+++ scummvm/trunk/engines/sci/gui/gui_gfx.cpp 2009-10-08 10:35:12 UTC (rev 44781)
@@ -1115,7 +1115,7 @@
while (curNode) {
curObject = curNode->value;
- // Get cel data...
+ // Get animation data...
viewId = GET_SEL32V(curObject, view);
loopNo = GET_SEL32V(curObject, loop);
celNo = GET_SEL32V(curObject, cel);
@@ -1200,7 +1200,63 @@
void SciGuiGfx::AnimateUpdate() {
}
-void SciGuiGfx::AnimateDrawCels() {
+void SciGuiGfx::AnimateDrawCels(List *list) {
+ SegManager *segMan = _s->_segMan;
+ reg_t curAddress = list->first;
+ Node *curNode = _s->_segMan->lookupNode(curAddress);
+ reg_t curObject;
+ SciGuiView *view = NULL;
+ GuiResourceId viewId;
+ GuiViewLoopNo loopNo;
+ GuiViewCelNo celNo;
+ int16 x, y, priority;
+ Common::Rect rect;
+ uint16 mask, paletteNo;
+ reg_t hSaved;
+
+ while (curNode) {
+ curObject = curNode->value;
+
+ mask = GET_SEL32V(curObject, signal);
+ if (!(mask & (SCI_ANIMATE_MASK_NOUPDATE | SCI_ANIMATE_MASK_HIDDEN | SCI_ANIMATE_MASK_ALWAYSUPDATE))) {
+ // Get animation data...
+ viewId = GET_SEL32V(curObject, view);
+ loopNo = GET_SEL32V(curObject, loop);
+ celNo = GET_SEL32V(curObject, cel);
+ x = GET_SEL32V(curObject, x);
+ y = GET_SEL32V(curObject, y);
+ priority = GET_SEL32V(curObject, priority);
+ paletteNo = GET_SEL32V(curObject, palette);
+
+ //rect = (Common::Rect *)&cobj[_objOfs[8]];
+
+ //hSaved = SaveBits(rect, SCI_SCREEN_MASK_ALL);
+ //PUT_SEL32V(curObject, 11, hSaved.toUint16());
+
+ // draw corresponding cel
+ drawCel(viewId, loopNo, celNo, x, y, priority, paletteNo);
+
+ // arr1[inx] = 1;
+ if (mask & SCI_ANIMATE_MASK_REMOVEVIEW) {
+ mask &= 0xFFFF ^ GFX_REMOVEVIEW;
+ PUT_SEL32V(curObject, signal, mask);
+ }
+
+// HEAPHANDLE hNewCast = heapNewPtr(sizeof(sciCast), kDataCast);
+// sciCast *pNewCast = (sciCast *)heap2Ptr(hNewCast);
+// pNewCast->view = view;
+// pNewCast->loop = loop;
+// pNewCast->cel = cel;
+// pNewCast->z = z;
+// pNewCast->pal = pal;
+// pNewCast->hSaved = 0;
+// pNewCast->rect = *rect;
+// _lastCast->AddToEnd(hNewCast);
+ }
+
+ curAddress = curNode->succ;
+ curNode = _s->_segMan->lookupNode(curAddress);
+ }
}
void SciGuiGfx::AnimateRestoreAndDelete() {
Modified: scummvm/trunk/engines/sci/gui/gui_gfx.h
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_gfx.h 2009-10-08 10:02:26 UTC (rev 44780)
+++ scummvm/trunk/engines/sci/gui/gui_gfx.h 2009-10-08 10:35:12 UTC (rev 44781)
@@ -109,7 +109,7 @@
void AnimateFill(List *list, byte &oldPicNotValid);
Common::List<GuiAnimateList> *AnimateMakeSortedList(List *list);
void AnimateUpdate();
- void AnimateDrawCels();
+ void AnimateDrawCels(List *list);
void AnimateRestoreAndDelete();
void SetNowSeen(reg_t objectReference);
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