Skip to content

Commit

Permalink
FULLPIPE: Implement scene22_setBagState() and updateCursor()
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Jan 2, 2014
1 parent b3a9832 commit 073fe02
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
5 changes: 5 additions & 0 deletions engines/fullpipe/constants.h
Expand Up @@ -732,6 +732,8 @@ namespace Fullpipe {

// Scene 21
#define ANI_GIRAFFE_BOTTOM 1633
#define ANI_INV_BOX 890
#define ANI_INV_STOOL 1780
#define MSG_SC21_UPDATEASS 4211
#define PIC_SC21_DTRUBA 1823
#define ST_GRFB_SIT 1687
Expand All @@ -740,8 +742,11 @@ namespace Fullpipe {
// Scene 22
#define ANI_GIRAFFE_MIDDLE 1981
#define ANI_MESHOK 1754
#define QU_MSH_CRANEOUT 1811
#define QU_MSH_MOVE 1812
#define ST_GRFM_AFTER 3472
#define ST_GRFM_NORM 1983
#define ST_MSH_SIT 1756

// Scene 24
#define ANI_DROP_24 3505
Expand Down
31 changes: 31 additions & 0 deletions engines/fullpipe/scenes/scene22.cpp
Expand Up @@ -74,4 +74,35 @@ void scene22_initScene(Scene *sc) {
g_fp->initArcadeKeys("SC_22");
}

int scene22_updateCursor() {
g_fp->updateCursorCommon();

if (g_fp->_objectIdAtCursor != ANI_HANDLE_L)
return g_fp->_cursorId;

int sel = g_fp->_inventory->getSelectedItemId();

if (!sel) {
g_fp->_cursorId = PIC_CSR_ITN;
return g_fp->_cursorId;
}

if (g_vars->scene22_var07 || (sel != ANI_INV_STOOL && sel != ANI_INV_BOX))
; //empty
else
g_fp->_cursorId = PIC_CSR_ITN_INV;

return g_fp->_cursorId;
}

void scene22_setBagState() {
if (g_vars->scene22_var10) {
g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene22_bag, ST_MSH_SIT, QU_MSH_CRANEOUT, 1);
g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene22_bag, ST_MSH_SIT, QU_MSH_MOVE, 0);
} else {
g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene22_bag, ST_MSH_SIT, QU_MSH_CRANEOUT, 0);
g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene22_bag, ST_MSH_SIT, QU_MSH_MOVE, 1);
}
}

} // End of namespace Fullpipe

0 comments on commit 073fe02

Please sign in to comment.