diff options
author | Eugene Sandulenko | 2014-05-10 09:30:09 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2014-05-10 09:30:09 +0300 |
commit | 0549ae8259f25a3bd86e6dabfb822d96c5b40416 (patch) | |
tree | 13392bdfbf9e7ed622146797bb97a7bab1ff8d8a /engines/fullpipe | |
parent | 9cc67a997eddc87d1fe0cae502c632e748667ee0 (diff) | |
download | scummvm-rg350-0549ae8259f25a3bd86e6dabfb822d96c5b40416.tar.gz scummvm-rg350-0549ae8259f25a3bd86e6dabfb822d96c5b40416.tar.bz2 scummvm-rg350-0549ae8259f25a3bd86e6dabfb822d96c5b40416.zip |
FULLPIPE: Started MovGraph::doWalkTo() implementation
Diffstat (limited to 'engines/fullpipe')
-rw-r--r-- | engines/fullpipe/motion.cpp | 88 | ||||
-rw-r--r-- | engines/fullpipe/motion.h | 9 |
2 files changed, 96 insertions, 1 deletions
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp index a565eb1146..c9d0130746 100644 --- a/engines/fullpipe/motion.cpp +++ b/engines/fullpipe/motion.cpp @@ -628,6 +628,94 @@ int MovGraph::method44() { } MessageQueue *MovGraph::doWalkTo(StaticANIObject *subj, int xpos, int ypos, int fuzzyMatch, int staticsId) { +#if 0 + PicAniInfo picAniInfo; + int ss; + + MovItem *v9 = method28(subj, xpos, ypos, fuzzyMatch, &ss); + subj->getPicAniInfo(&picAniInfo); + if ( v9 ) { + v41 = this->_callback1(subj, v9, ss); + v40 = 0; + v10 = MovGraph_getItemIndexByStaticAni(this, subj) << 6; + v42 = v10; + v11 = (MovGraphItem *)((char *)this->_items + v10); + if ( v11->count > 0 ) { + ptr = 0; + do { + if ( *(MovArr **)((char *)&v11->items->movarr + ptr) == v41 ) { + v12 = subj->_movement; + if ( v12 ) { + v13 = v12->_staticsObj1->_staticsId; + v14 = StaticANIObject_calcStepLen(&p, subj); + v15 = MovGraph_sub_451D50(this, subj, subj->_ox - v14->x, subj->._oy - v14->y, v13, (int)xpos, ypos, 0, fuzzyMatch); + v16 = v15; + if ( !v15 || !MessageQueue_getExCommandByIndex(v15, 0) ) + goto return_0; + v17 = MessageQueue_getExCommandByIndex(v16, 0); + v18 = v17->msg._messageKind; + if ( v18 != 1 && v18 != 20 || (v19 = subj->_movement, v17->_messageNum != v19->go._id) || (v20 = v17->msg._field_14, v20 >= 1) && v20 <= v19->_currDynamicPhaseIndex ) + subj->playIdle(); + } + } + v11 = (MovGraphItem *)((char *)this->_items + v42); + ++v40; + v21 = v11->count; + ptr += 16; + } while ( v40 < v21 ); + } + } + v22 = method28(subj, xpos, ypos, fuzzyMatch, &ss); + if ( v22 + && (v23 = this->_callback1(subj, v22, ss), + v24 = MovGraph_getItemIndexByStaticAni(this, subj), + v25 = 0, + v24 <<= 6, + v26 = (MovGraphItem *)((char *)this->_items + v24), + ptr = v24, + v27 = v26->count, + v27 > 0) ) { + v28 = v26->items; + while ( v28->movarr != v23 ) { + ++v25; + ++v28; + if ( v25 >= v27 ) + goto LABEL_20; + } + v30 = v26->items; + v31 = v26->movarr; + v32 = v25; + v33 = v30[v32].movarr; + xpos = v30[v32].movarr; + if ( v31 ) + CObjectFree(v31); + memcpy((char *)&this->_items->movarr + ptr, v33, 0x20u); + v34 = xpos; + v35 = (MovArr *)operator new(8 * xpos->_movStepCount); + v36 = ptr; + *(MovArr **)((char *)&this->_items->movarr + ptr) = v35; + memcpy(*(void **)((char *)&this->_items->movarr + v36), v34->_movSteps, 8 * v34->_movStepCount); + *(int *)((char *)&this->_items->field_10 + v36) = -1; + *(int *)((char *)&this->_items->field_14 + v36) = 0; + MessageQueue *mq = fillMGMinfo(*(StaticANIObject **)((char *)&this->_items->ani + v36), (MovArr *)((char *)&this->_items->movarr + v36), staticsId); + if (mq) { + ExCommand *ex = new ExCommand(); + ex->_messageKind = 17; + ex->_messageNum = 54; + ex->_parentId = subj->_id; + ex->_field_3C = 1; + mq->addExCommandToEnd(ex); + } + subj->setPicAniInfo(&picAniInfo); + result = mq; + } else { + LABEL_20: + subj->setPicAniInfo(&picAniInfo); + return_0: + result = 0; + } + return result; +#endif warning("STUB: MovGraph::doWalkTo()"); return 0; diff --git a/engines/fullpipe/motion.h b/engines/fullpipe/motion.h index 38632c14b7..94cd274c0d 100644 --- a/engines/fullpipe/motion.h +++ b/engines/fullpipe/motion.h @@ -308,6 +308,13 @@ struct MovArr { Common::Point _point; }; +struct MovItem { + MovArr *movarr; + int _mfield_4; + int _mfield_8; + int _mfield_C; +}; + struct MovGraphItem { StaticANIObject *ani; int field_4; @@ -319,7 +326,7 @@ struct MovGraphItem { int field_1C; int field_20; int field_24; - int items; + MovItem *items; int count; int field_30; int field_34; |