aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
authorEugene Sandulenko2013-12-20 16:08:02 +0200
committerEugene Sandulenko2013-12-21 16:42:49 +0200
commit90532c78a29bd3fd4a097dec852b67fd3234c227 (patch)
tree3b81e12b8b6cb23b060f37c25553a1c6b68026aa /engines/fullpipe
parent9816794f8c08d6a9f4f49fba0e05d20dc0b8746b (diff)
downloadscummvm-rg350-90532c78a29bd3fd4a097dec852b67fd3234c227.tar.gz
scummvm-rg350-90532c78a29bd3fd4a097dec852b67fd3234c227.tar.bz2
scummvm-rg350-90532c78a29bd3fd4a097dec852b67fd3234c227.zip
FULLPIPE: g_fullpipe -> g_fp for brevity
Diffstat (limited to 'engines/fullpipe')
-rw-r--r--engines/fullpipe/behavior.cpp10
-rw-r--r--engines/fullpipe/fullpipe.cpp4
-rw-r--r--engines/fullpipe/fullpipe.h2
-rw-r--r--engines/fullpipe/gameloader.cpp54
-rw-r--r--engines/fullpipe/gfx.cpp64
-rw-r--r--engines/fullpipe/input.cpp12
-rw-r--r--engines/fullpipe/interaction.cpp18
-rw-r--r--engines/fullpipe/inventory.cpp18
-rw-r--r--engines/fullpipe/lift.cpp2
-rw-r--r--engines/fullpipe/messagehandlers.cpp240
-rw-r--r--engines/fullpipe/messages.cpp84
-rw-r--r--engines/fullpipe/modal.cpp40
-rw-r--r--engines/fullpipe/motion.cpp14
-rw-r--r--engines/fullpipe/ngiarchive.cpp4
-rw-r--r--engines/fullpipe/scene.cpp100
-rw-r--r--engines/fullpipe/scenes.cpp4
-rw-r--r--engines/fullpipe/scenes/scene01.cpp22
-rw-r--r--engines/fullpipe/scenes/scene02.cpp52
-rw-r--r--engines/fullpipe/scenes/scene03.cpp70
-rw-r--r--engines/fullpipe/scenes/scene04.cpp240
-rw-r--r--engines/fullpipe/scenes/scene05.cpp98
-rw-r--r--engines/fullpipe/scenes/scene06.cpp206
-rw-r--r--engines/fullpipe/scenes/scene07.cpp46
-rw-r--r--engines/fullpipe/scenes/scene08.cpp70
-rw-r--r--engines/fullpipe/scenes/sceneDbg.cpp26
-rw-r--r--engines/fullpipe/scenes/sceneIntro.cpp14
-rw-r--r--engines/fullpipe/sound.cpp2
-rw-r--r--engines/fullpipe/stateloader.cpp16
-rw-r--r--engines/fullpipe/statics.cpp44
-rw-r--r--engines/fullpipe/utils.cpp14
30 files changed, 795 insertions, 795 deletions
diff --git a/engines/fullpipe/behavior.cpp b/engines/fullpipe/behavior.cpp
index bcf5f0d7bb..abea906d9b 100644
--- a/engines/fullpipe/behavior.cpp
+++ b/engines/fullpipe/behavior.cpp
@@ -132,7 +132,7 @@ void BehaviorManager::updateBehavior(BehaviorInfo *behaviorInfo, BehaviorEntry *
mq->sendNextCommand();
bhi->_flags &= 0xFFFFFFFD;
- } else if (behaviorInfo->_counter >= bhi->_delay && bhi->_percent && g_fullpipe->_rnd->getRandomNumber(32767) <= entry->_items[i]->_percent) {
+ } else if (behaviorInfo->_counter >= bhi->_delay && bhi->_percent && g_fp->_rnd->getRandomNumber(32767) <= entry->_items[i]->_percent) {
MessageQueue *mq = new MessageQueue(bhi->_messageQueue, 0, 1);
mq->sendNextCommand();
@@ -149,7 +149,7 @@ void BehaviorManager::updateStaticAniBehavior(StaticANIObject *ani, int delay, B
MessageQueue *mq = 0;
if (bhe->_flags & 1) {
- uint rnd = g_fullpipe->_rnd->getRandomNumber(32767);
+ uint rnd = g_fp->_rnd->getRandomNumber(32767);
uint runPercent = 0;
for (int i = 0; i < bhe->_itemsCount; i++) {
if (!(bhe->_items[i]->_flags & 1) && bhe->_items[i]->_percent) {
@@ -164,7 +164,7 @@ void BehaviorManager::updateStaticAniBehavior(StaticANIObject *ani, int delay, B
for (int i = 0; i < bhe->_itemsCount; i++) {
if (!(bhe->_items[i]->_flags & 1) && delay >= bhe->_items[i]->_delay) {
if (bhe->_items[i]->_percent) {
- if (g_fullpipe->_rnd->getRandomNumber(32767) <= bhe->_items[i]->_percent) {
+ if (g_fp->_rnd->getRandomNumber(32767) <= bhe->_items[i]->_percent) {
mq = new MessageQueue(bhe->_items[i]->_messageQueue, 0, 1);
break;
}
@@ -252,11 +252,11 @@ void BehaviorInfo::initObjectBehavior(GameVar *var, Scene *sc, StaticANIObject *
if (strcmp(var->_value.stringValue, "ROOT"))
break;
- GameVar *v1 = g_fullpipe->getGameLoaderGameVar()->getSubVarByName("BEHAVIOR")->getSubVarByName(ani->getName());
+ GameVar *v1 = g_fp->getGameLoaderGameVar()->getSubVarByName("BEHAVIOR")->getSubVarByName(ani->getName());
if (v1 == var)
return;
- sc = g_fullpipe->accessScene(ani->_sceneId);
+ sc = g_fp->accessScene(ani->_sceneId);
clear();
var = v1;
_itemsCount = var->getSubVarsCount();
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index 674f67fe55..d02ce4796b 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -40,7 +40,7 @@
namespace Fullpipe {
-FullpipeEngine *g_fullpipe = 0;
+FullpipeEngine *g_fp = 0;
Vars *g_vars = 0;
FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {
@@ -157,7 +157,7 @@ FullpipeEngine::FullpipeEngine(OSystem *syst, const ADGameDescription *gameDesc)
_isSaveAllowed = true;
- g_fullpipe = this;
+ g_fp = this;
g_vars = new Vars;
}
diff --git a/engines/fullpipe/fullpipe.h b/engines/fullpipe/fullpipe.h
index aa42fd01cc..f4ac84b454 100644
--- a/engines/fullpipe/fullpipe.h
+++ b/engines/fullpipe/fullpipe.h
@@ -279,7 +279,7 @@ public:
};
-extern FullpipeEngine *g_fullpipe;
+extern FullpipeEngine *g_fp;
extern Vars *g_vars;
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/gameloader.cpp b/engines/fullpipe/gameloader.cpp
index 0b667124ef..57c1b23f66 100644
--- a/engines/fullpipe/gameloader.cpp
+++ b/engines/fullpipe/gameloader.cpp
@@ -32,19 +32,19 @@
namespace Fullpipe {
Inventory2 *getGameLoaderInventory() {
- return &g_fullpipe->_gameLoader->_inventory;
+ return &g_fp->_gameLoader->_inventory;
}
MctlCompound *getSc2MctlCompoundBySceneId(int16 sceneId) {
- for (uint i = 0; i < g_fullpipe->_gameLoader->_sc2array.size(); i++)
- if (g_fullpipe->_gameLoader->_sc2array[i]._sceneId == sceneId)
- return (MctlCompound *)g_fullpipe->_gameLoader->_sc2array[i]._motionController;
+ for (uint i = 0; i < g_fp->_gameLoader->_sc2array.size(); i++)
+ if (g_fp->_gameLoader->_sc2array[i]._sceneId == sceneId)
+ return (MctlCompound *)g_fp->_gameLoader->_sc2array[i]._motionController;
return 0;
}
InteractionController *getGameLoaderInteractionController() {
- return g_fullpipe->_gameLoader->_interactionController;
+ return g_fp->_gameLoader->_interactionController;
}
GameLoader::GameLoader() {
@@ -68,10 +68,10 @@ GameLoader::GameLoader() {
_preloadEntranceId = 0;
_updateCounter = 0;
- g_fullpipe->_msgX = 0;
- g_fullpipe->_msgY = 0;
- g_fullpipe->_msgObjectId2 = 0;
- g_fullpipe->_msgId = 0;
+ g_fp->_msgX = 0;
+ g_fp->_msgY = 0;
+ g_fp->_msgObjectId2 = 0;
+ g_fp->_msgId = 0;
}
GameLoader::~GameLoader() {
@@ -91,10 +91,10 @@ bool GameLoader::load(MfcArchive &file) {
_gameProject->load(file);
- g_fullpipe->_gameProject = _gameProject;
+ g_fp->_gameProject = _gameProject;
- if (g_fullpipe->_gameProjectVersion < 12) {
- error("Old gameProjectVersion: %d", g_fullpipe->_gameProjectVersion);
+ if (g_fp->_gameProjectVersion < 12) {
+ error("Old gameProjectVersion: %d", g_fp->_gameProjectVersion);
}
_gameName = file.readPascalString();
@@ -167,7 +167,7 @@ bool GameLoader::gotoScene(int sceneId, int entranceId) {
return false;
if (_sc2array[sc2idx]._entranceDataCount < 1) {
- g_fullpipe->_currentScene = st->_scene;
+ g_fp->_currentScene = st->_scene;
return true;
}
@@ -186,20 +186,20 @@ bool GameLoader::gotoScene(int sceneId, int entranceId) {
if (sg || (sg = _gameVar->getSubVarByName("OBJSTATES")->addSubVarAsInt("SAVEGAME", 0)) != 0)
sg->setSubVarAsInt("Entrance", entranceId);
- if (!g_fullpipe->sceneSwitcher(_sc2array[sc2idx]._entranceData[entranceIdx]))
+ if (!g_fp->sceneSwitcher(_sc2array[sc2idx]._entranceData[entranceIdx]))
return false;
- g_fullpipe->_msgObjectId2 = 0;
- g_fullpipe->_msgY = -1;
- g_fullpipe->_msgX = -1;
+ g_fp->_msgObjectId2 = 0;
+ g_fp->_msgY = -1;
+ g_fp->_msgX = -1;
- g_fullpipe->_currentScene = st->_scene;
+ g_fp->_currentScene = st->_scene;
- MessageQueue *mq1 = g_fullpipe->_currentScene->getMessageQueueById(_sc2array[sc2idx]._entranceData[entranceIdx]->_messageQueueId);
+ MessageQueue *mq1 = g_fp->_currentScene->getMessageQueueById(_sc2array[sc2idx]._entranceData[entranceIdx]->_messageQueueId);
if (mq1) {
MessageQueue *mq = new MessageQueue(mq1, 0, 0);
- StaticANIObject *stobj = g_fullpipe->_currentScene->getStaticANIObject1ById(_field_FA, -1);
+ StaticANIObject *stobj = g_fp->_currentScene->getStaticANIObject1ById(_field_FA, -1);
if (stobj) {
stobj->_flags &= 0x100;
@@ -220,7 +220,7 @@ bool GameLoader::gotoScene(int sceneId, int entranceId) {
return false;
}
} else {
- StaticANIObject *stobj = g_fullpipe->_currentScene->getStaticANIObject1ById(_field_FA, -1);
+ StaticANIObject *stobj = g_fp->_currentScene->getStaticANIObject1ById(_field_FA, -1);
if (stobj)
stobj->_flags &= 0xfeff;
}
@@ -262,8 +262,8 @@ bool GameLoader::preloadScene(int sceneId, int entranceId) {
return false;
}
- if (g_fullpipe->_currentScene && g_fullpipe->_currentScene->_sceneId == sceneId)
- g_fullpipe->_currentScene = 0;
+ if (g_fp->_currentScene && g_fp->_currentScene->_sceneId == sceneId)
+ g_fp->_currentScene = 0;
saveScenePicAniInfos(sceneId);
clearGlobalMessageQueueList1();
@@ -358,7 +358,7 @@ void GameLoader::applyPicAniInfos(Scene *sc, PicAniInfo **picAniInfo, int picAni
if (!(picAniInfo[i]->type & 1))
continue;
- Scene *scNew = g_fullpipe->accessScene(picAniInfo[i]->sceneId);
+ Scene *scNew = g_fp->accessScene(picAniInfo[i]->sceneId);
if (!scNew)
continue;
@@ -386,8 +386,8 @@ void GameLoader::saveScenePicAniInfos(int sceneId) {
}
void GameLoader::updateSystems(int counterdiff) {
- if (g_fullpipe->_currentScene) {
- g_fullpipe->_currentScene->update(counterdiff);
+ if (g_fp->_currentScene) {
+ g_fp->_currentScene->update(counterdiff);
_exCommand._messageKind = 17;
_updateCounter++;
@@ -511,7 +511,7 @@ InputController *FullpipeEngine::getGameLoaderInputController() {
}
MotionController *getCurrSceneSc2MotionController() {
- return getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId);
+ return getSc2MctlCompoundBySceneId(g_fp->_currentScene->_sceneId);
}
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp
index d54f7591b4..9aa4f219a6 100644
--- a/engines/fullpipe/gfx.cpp
+++ b/engines/fullpipe/gfx.cpp
@@ -100,11 +100,11 @@ bool Background::load(MfcArchive &file) {
addPictureObject(pct);
}
- assert(g_fullpipe->_gameProjectVersion >= 4);
+ assert(g_fp->_gameProjectVersion >= 4);
_bigPictureArray1Count = file.readUint32LE();
- assert(g_fullpipe->_gameProjectVersion >= 5);
+ assert(g_fp->_gameProjectVersion >= 5);
_bigPictureArray2Count = file.readUint32LE();
@@ -313,7 +313,7 @@ bool GameObject::load(MfcArchive &file) {
_oy = file.readUint32LE();
_priority = file.readUint16LE();
- if (g_fullpipe->_gameProjectVersion >= 11) {
+ if (g_fp->_gameProjectVersion >= 11) {
_field_8 = file.readUint32LE();
}
@@ -494,7 +494,7 @@ bool Picture::load(MfcArchive &file) {
_y = file.readUint32LE();
_field_44 = file.readUint16LE();
- assert(g_fullpipe->_gameProjectVersion >= 2);
+ assert(g_fp->_gameProjectVersion >= 2);
_width = file.readUint32LE();
_height = file.readUint32LE();
@@ -508,7 +508,7 @@ bool Picture::load(MfcArchive &file) {
setAOIDs();
}
- assert (g_fullpipe->_gameProjectVersion >= 12);
+ assert (g_fp->_gameProjectVersion >= 12);
_alpha = file.readUint32LE() & 0xff;
@@ -527,8 +527,8 @@ bool Picture::load(MfcArchive &file) {
}
void Picture::setAOIDs() {
- int w = (g_fullpipe->_pictureScale + _width - 1) / g_fullpipe->_pictureScale;
- int h = (g_fullpipe->_pictureScale + _height - 1) / g_fullpipe->_pictureScale;
+ int w = (g_fp->_pictureScale + _width - 1) / g_fp->_pictureScale;
+ int h = (g_fp->_pictureScale + _height - 1) / g_fp->_pictureScale;
_memoryObject2->_rows = (byte **)malloc(w * sizeof(int *));
@@ -618,7 +618,7 @@ void Picture::draw(int x, int y, int style, int angle) {
if (!pal) {
//warning("Picture:draw: using global palette");
- pal = g_fullpipe->_globalPalette;
+ pal = g_fp->_globalPalette;
}
Common::Point point;
@@ -650,7 +650,7 @@ void Picture::drawRotated(int x, int y, int angle) {
}
void Picture::displayPicture() {
- if (!g_fullpipe->_gameContinue)
+ if (!g_fp->_gameContinue)
return;
getData();
@@ -659,22 +659,22 @@ void Picture::displayPicture() {
if (!_dataSize)
return;
- g_fullpipe->_backgroundSurface.fillRect(Common::Rect(0, 0, 800, 600), 0);
- g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(0, 0), g_fullpipe->_backgroundSurface.pitch, 0, 0, 800, 600);
+ g_fp->_backgroundSurface.fillRect(Common::Rect(0, 0, 800, 600), 0);
+ g_fp->_system->copyRectToScreen(g_fp->_backgroundSurface.getBasePtr(0, 0), g_fp->_backgroundSurface.pitch, 0, 0, 800, 600);
draw(0, 0, 0, 0);
- g_fullpipe->updateEvents();
- g_fullpipe->_system->delayMillis(10);
- g_fullpipe->_system->updateScreen();
+ g_fp->updateEvents();
+ g_fp->_system->delayMillis(10);
+ g_fp->_system->updateScreen();
- while (g_fullpipe->_gameContinue) {
- g_fullpipe->updateEvents();
- g_fullpipe->_system->delayMillis(10);
- g_fullpipe->_system->updateScreen();
+ while (g_fp->_gameContinue) {
+ g_fp->updateEvents();
+ g_fp->_system->delayMillis(10);
+ g_fp->_system->updateScreen();
- if (g_fullpipe->_keyState == ' ') {
- g_fullpipe->_keyState = Common::KEYCODE_INVALID;
+ if (g_fp->_keyState == ' ') {
+ g_fp->_keyState = Common::KEYCODE_INVALID;
break;
}
}
@@ -722,7 +722,7 @@ bool Picture::isPixelHitAtPos(int x, int y) {
}
int Picture::getPixelAtPos(int x, int y) {
- return getPixelAtPosEx(x / g_fullpipe->_pictureScale, y / g_fullpipe->_pictureScale);
+ return getPixelAtPosEx(x / g_fp->_pictureScale, y / g_fp->_pictureScale);
return false;
}
@@ -731,8 +731,8 @@ int Picture::getPixelAtPosEx(int x, int y) {
if (x < 0 || y < 0)
return 0;
- if (x < (g_fullpipe->_pictureScale + _width - 1) / g_fullpipe->_pictureScale &&
- y < (g_fullpipe->_pictureScale + _height - 1) / g_fullpipe->_pictureScale &&
+ if (x < (g_fp->_pictureScale + _width - 1) / g_fp->_pictureScale &&
+ y < (g_fp->_pictureScale + _height - 1) / g_fp->_pictureScale &&
_memoryObject2 != 0 && _memoryObject2->_rows != 0)
return _memoryObject2->_rows[x][2 * y];
@@ -785,8 +785,8 @@ bool Bitmap::isPixelAtHitPosRB(int x, int y) {
void Bitmap::putDib(int x, int y, int32 *palette) {
debug(7, "Bitmap::putDib(%d, %d)", x, y);
- _x = x - g_fullpipe->_sceneRect.left;
- _y = y - g_fullpipe->_sceneRect.top;
+ _x = x - g_fp->_sceneRect.left;
+ _y = y - g_fp->_sceneRect.top;
if (_type == MKTAG('R', 'B', '\0', '\0'))
putDibRB(palette);
@@ -879,7 +879,7 @@ bool Bitmap::putDibRB(int32 *palette, int pX, int pY) {
if (y <= endy) {
if (pX == -1) {
int bgcolor = palette[(pixel >> 8) & 0xff];
- curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start1, y);
+ curDestPtr = (uint16 *)g_fp->_backgroundSurface.getBasePtr(start1, y);
colorFill(curDestPtr, fillLen, bgcolor);
} else {
if (y == pY && pX >= start1 && pX < start1 + fillLen)
@@ -910,7 +910,7 @@ bool Bitmap::putDibRB(int32 *palette, int pX, int pY) {
if (y <= endy) {
if (pX == -1) {
- curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(start1, y);
+ curDestPtr = (uint16 *)g_fp->_backgroundSurface.getBasePtr(start1, y);
paletteFill(curDestPtr, (byte *)srcPtr2, fillLen, (int32 *)palette);
} else {
if (y == pY && pX >= start1 && pX < start1 + fillLen)
@@ -922,7 +922,7 @@ bool Bitmap::putDibRB(int32 *palette, int pX, int pY) {
}
if (pX == -1)
- g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(startx, starty), g_fullpipe->_backgroundSurface.pitch, startx, starty, endx + 1 - startx, endy + 1 - starty);
+ g_fp->_system->copyRectToScreen(g_fp->_backgroundSurface.getBasePtr(startx, starty), g_fp->_backgroundSurface.pitch, startx, starty, endx + 1 - startx, endy + 1 - starty);
return false;
}
@@ -973,17 +973,17 @@ void Bitmap::putDibCB(int32 *palette) {
if (_flags & 0x1000000) {
for (int y = starty; y < endy; srcPtr -= pitch, y++) {
- curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(startx, y);
+ curDestPtr = (uint16 *)g_fp->_backgroundSurface.getBasePtr(startx, y);
copierKeyColor(curDestPtr, srcPtr, endx - startx + 1, _flags & 0xff, (int32 *)palette, cb05_format);
}
} else {
for (int y = starty; y <= endy; srcPtr -= pitch, y++) {
- curDestPtr = (uint16 *)g_fullpipe->_backgroundSurface.getBasePtr(startx, y);
+ curDestPtr = (uint16 *)g_fp->_backgroundSurface.getBasePtr(startx, y);
copier(curDestPtr, srcPtr, endx - startx + 1, (int32 *)palette, cb05_format);
}
}
- g_fullpipe->_system->copyRectToScreen(g_fullpipe->_backgroundSurface.getBasePtr(startx, starty), g_fullpipe->_backgroundSurface.pitch, startx, starty, endx + 1 - startx, endy + 1 - starty);
+ g_fp->_system->copyRectToScreen(g_fp->_backgroundSurface.getBasePtr(startx, starty), g_fp->_backgroundSurface.pitch, startx, starty, endx + 1 - startx, endy + 1 - starty);
}
void Bitmap::colorFill(uint16 *dest, int len, int32 color) {
@@ -1194,7 +1194,7 @@ bool Shadows::load(MfcArchive &file) {
}
void Shadows::init() {
- Scene *scene = g_fullpipe->accessScene(_sceneId);
+ Scene *scene = g_fp->accessScene(_sceneId);
StaticANIObject *st;
Movement *mov;
diff --git a/engines/fullpipe/input.cpp b/engines/fullpipe/input.cpp
index 60b6f621ea..5294c4b4ea 100644
--- a/engines/fullpipe/input.cpp
+++ b/engines/fullpipe/input.cpp
@@ -34,7 +34,7 @@
namespace Fullpipe {
InputController::InputController() {
- g_fullpipe->_inputController = this;
+ g_fp->_inputController = this;
_flag = 0;
_cursorHandle = 0;
@@ -55,16 +55,16 @@ InputController::InputController() {
InputController::~InputController() {
removeMessageHandler(126, -1);
- g_fullpipe->_inputController = 0;
+ g_fp->_inputController = 0;
}
void InputController::setInputDisabled(bool state) {
_flag = state;
- g_fullpipe->_inputDisabled = state;
+ g_fp->_inputDisabled = state;
}
void setInputDisabled(bool state) {
- g_fullpipe->_inputController->setInputDisabled(state);
+ g_fp->_inputController->setInputDisabled(state);
}
void InputController::addCursor(CursorInfo *cursor) {
@@ -93,8 +93,8 @@ void InputController::drawCursor(int x, int y) {
if (_cursorIndex == -1)
return;
- _cursorBounds.left = g_fullpipe->_sceneRect.left + x - _cursorsArray[_cursorIndex]->hotspotX;
- _cursorBounds.top = g_fullpipe->_sceneRect.top + y - _cursorsArray[_cursorIndex]->hotspotY;
+ _cursorBounds.left = g_fp->_sceneRect.left + x - _cursorsArray[_cursorIndex]->hotspotX;
+ _cursorBounds.top = g_fp->_sceneRect.top + y - _cursorsArray[_cursorIndex]->hotspotY;
_cursorBounds.right = _cursorBounds.left + _cursorsArray[_cursorIndex]->width;
_cursorBounds.bottom = _cursorBounds.top + _cursorsArray[_cursorIndex]->height;
diff --git a/engines/fullpipe/interaction.cpp b/engines/fullpipe/interaction.cpp
index cd9aad5b22..9d92638328 100644
--- a/engines/fullpipe/interaction.cpp
+++ b/engines/fullpipe/interaction.cpp
@@ -36,8 +36,8 @@ int handleObjectInteraction(StaticANIObject *subject, GameObject *object, int in
bool canInteractAny(GameObject *obj1, GameObject *obj2, int invId) {
int sceneId = 0;
- if (g_fullpipe->_currentScene)
- sceneId = g_fullpipe->_currentScene->_sceneId;
+ if (g_fp->_currentScene)
+ sceneId = g_fp->_currentScene->_sceneId;
InteractionController *intC = getGameLoaderInteractionController();
for (ObList::iterator i = intC->_interactions.begin(); i != intC->_interactions.end(); ++i) {
@@ -137,7 +137,7 @@ bool InteractionController::handleInteraction(StaticANIObject *subj, GameObject
obj->setPicAniInfo(&aniInfo);
if (abs(xpos - subj->_ox) > 1 || abs(ypos - subj->_oy) > 1) {
- mq = getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId)->doWalkTo(subj, xpos, ypos, 1, cinter->_staticsId2);
+ mq = getSc2MctlCompoundBySceneId(g_fp->_currentScene->_sceneId)->doWalkTo(subj, xpos, ypos, 1, cinter->_staticsId2);
if (mq) {
dur = mq->calcDuration(subj);
delete mq;
@@ -305,7 +305,7 @@ LABEL_38:
if (abs(xpos - subj->_ox) > 1 || abs(ypos - subj->_oy) > 1
|| (inter->_staticsId2 != 0 && (subj->_statics == 0 || subj->_statics->_staticsId != inter->_staticsId2))) {
- mq = getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId)->method34(subj, xpos, ypos, 1, inter->_staticsId2);
+ mq = getSc2MctlCompoundBySceneId(g_fp->_currentScene->_sceneId)->method34(subj, xpos, ypos, 1, inter->_staticsId2);
if (!mq)
return false;
@@ -444,7 +444,7 @@ bool Interaction::load(MfcArchive &file) {
}
bool Interaction::canInteract(GameObject *obj1, GameObject *obj2, int invId) {
- if (_sceneId > 0 && g_fullpipe->_currentScene && g_fullpipe->_currentScene->_sceneId != _sceneId)
+ if (_sceneId > 0 && g_fp->_currentScene && g_fp->_currentScene->_sceneId != _sceneId)
return false;
if (_flags & 0x20000)
@@ -476,20 +476,20 @@ bool Interaction::canInteract(GameObject *obj1, GameObject *obj2, int invId) {
if (_objectState1) {
if (_flags & 0x10) {
- if ((g_fullpipe->getObjectState(obj1->getName()) & _objectState1) == 0)
+ if ((g_fp->getObjectState(obj1->getName()) & _objectState1) == 0)
return false;
} else {
- if (g_fullpipe->getObjectState(obj1->getName()) != _objectState1)
+ if (g_fp->getObjectState(obj1->getName()) != _objectState1)
return false;
}
}
if (_objectState2) {
if (_flags & 0x10) {
- if ((g_fullpipe->getObjectState(obj2->getName()) & _objectState2) == 0)
+ if ((g_fp->getObjectState(obj2->getName()) & _objectState2) == 0)
return false;
} else {
- if (g_fullpipe->getObjectState(obj2->getName()) != _objectState2)
+ if (g_fp->getObjectState(obj2->getName()) != _objectState2)
return false;
}
}
diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp
index 18ef3c4d97..3e22f8526d 100644
--- a/engines/fullpipe/inventory.cpp
+++ b/engines/fullpipe/inventory.cpp
@@ -161,7 +161,7 @@ int Inventory2::getItemFlags(int itemId) {
}
void Inventory2::rebuildItemRects() {
- _scene = g_fullpipe->accessScene(_sceneId);
+ _scene = g_fp->accessScene(_sceneId);
if (!_scene)
return;
@@ -226,11 +226,11 @@ void Inventory2::draw() {
if (!_scene)
return;
- int oldScLeft = g_fullpipe->_sceneRect.left;
- int oldScTop = g_fullpipe->_sceneRect.top;
+ int oldScLeft = g_fp->_sceneRect.left;
+ int oldScTop = g_fp->_sceneRect.top;
- g_fullpipe->_sceneRect.top = -_topOffset;
- g_fullpipe->_sceneRect.left = 0;
+ g_fp->_sceneRect.top = -_topOffset;
+ g_fp->_sceneRect.left = 0;
_picture->draw(-1, -1, 0, 0);
@@ -290,8 +290,8 @@ LABEL_25:
reset:
- g_fullpipe->_sceneRect.top = oldScTop;
- g_fullpipe->_sceneRect.left = oldScLeft;
+ g_fp->_sceneRect.top = oldScTop;
+ g_fp->_sceneRect.left = oldScLeft;
}
@@ -365,7 +365,7 @@ int Inventory2::selectItem(int itemId) {
int idx = getInventoryPoolItemIndexById(itemId);
Picture *pic = _scene->getPictureObjectById(_itemsPool[idx]->pictureObjectId1, 0)->_picture;
- g_fullpipe->getGameLoaderInputController()->setCursorItemPicture(pic);
+ g_fp->getGameLoaderInputController()->setCursorItemPicture(pic);
}
return _selectedId;
@@ -382,7 +382,7 @@ bool Inventory2::unselectItem(bool flag) {
_inventoryIcons[i]->isSelected = false;
}
- g_fullpipe->getGameLoaderInputController()->setCursorItemPicture(0);
+ g_fp->getGameLoaderInputController()->setCursorItemPicture(0);
return true;
}
diff --git a/engines/fullpipe/lift.cpp b/engines/fullpipe/lift.cpp
index 1d6d986977..ca23d8223a 100644
--- a/engines/fullpipe/lift.cpp
+++ b/engines/fullpipe/lift.cpp
@@ -67,7 +67,7 @@ int FullpipeEngine::lift_getButtonIdP(int objid) {
}
void FullpipeEngine::lift_setButton(const char *name, int state) {
- GameVar *var = g_fullpipe->getGameLoaderGameVar()->getSubVarByName("OBJSTATES")->getSubVarByName(sO_LiftButtons);
+ GameVar *var = g_fp->getGameLoaderGameVar()->getSubVarByName("OBJSTATES")->getSubVarByName(sO_LiftButtons);
if (var)
var->setSubVarAsInt(name, state);
diff --git a/engines/fullpipe/messagehandlers.cpp b/engines/fullpipe/messagehandlers.cpp
index fc57109f07..a9872a5a23 100644
--- a/engines/fullpipe/messagehandlers.cpp
+++ b/engines/fullpipe/messagehandlers.cpp
@@ -55,7 +55,7 @@ int global_messageHandler1(ExCommand *cmd) {
cmd->_messageNum = MV_MAN_STOPLADDER2;
}
- if (g_fullpipe->_inputDisabled) {
+ if (g_fp->_inputDisabled) {
if (cmd->_messageKind == 17) {
switch (cmd->_messageNum) {
case 29:
@@ -71,25 +71,25 @@ int global_messageHandler1(ExCommand *cmd) {
} else if (cmd->_messageKind == 17) {
switch (cmd->_messageNum) {
case MSG_MANSHADOWSON:
- g_fullpipe->_aniMan->_shadowsOn = 1;
+ g_fp->_aniMan->_shadowsOn = 1;
break;
case MSG_HMRKICK_STUCCO:
global_messageHandler_KickStucco();
break;
case MSG_MANSHADOWSOFF:
- g_fullpipe->_aniMan->_shadowsOn = 0;
+ g_fp->_aniMan->_shadowsOn = 0;
break;
case MSG_DISABLESAVES:
- g_fullpipe->disableSaves(cmd);
+ g_fp->disableSaves(cmd);
break;
case MSG_ENABLESAVES:
- g_fullpipe->enableSaves();
+ g_fp->enableSaves();
break;
case MSG_HMRKICK_METAL:
global_messageHandler_KickMetal();
break;
case 29: // left mouse
- if (g_fullpipe->_inventoryScene) {
+ if (g_fp->_inventoryScene) {
if (getGameLoaderInventory()->handleLeftClick(cmd))
cmd->_messageKind = 0;
}
@@ -101,22 +101,22 @@ int global_messageHandler1(ExCommand *cmd) {
}
break;
case 36: // keydown
- g_fullpipe->defHandleKeyDown(cmd->_keyCode);
+ g_fp->defHandleKeyDown(cmd->_keyCode);
switch (cmd->_keyCode) {
case '\x1B': // ESC
- if (g_fullpipe->_currentScene) {
+ if (g_fp->_currentScene) {
getGameLoaderInventory()->unselectItem(0);
- g_fullpipe->openMainMenu();
+ g_fp->openMainMenu();
cmd->_messageKind = 0;
}
break;
case 't':
- g_fullpipe->stopAllSounds();
+ g_fp->stopAllSounds();
cmd->_messageKind = 0;
break;
case 'u':
- g_fullpipe->toggleMute();
+ g_fp->toggleMute();
cmd->_messageKind = 0;
break;
case ' ':
@@ -130,13 +130,13 @@ int global_messageHandler1(ExCommand *cmd) {
}
break;
case '\t':
- if (g_fullpipe->_flgCanOpenMap)
- g_fullpipe->openMap();
+ if (g_fp->_flgCanOpenMap)
+ g_fp->openMap();
cmd->_messageKind = 0;
break;
case 'p':
- if (g_fullpipe->_flgCanOpenMap)
- g_fullpipe->openHelp();
+ if (g_fp->_flgCanOpenMap)
+ g_fp->openHelp();
cmd->_messageKind = 0;
break;
default:
@@ -144,47 +144,47 @@ int global_messageHandler1(ExCommand *cmd) {
}
break;
case 33:
- if (!g_fullpipe->_inventoryScene)
+ if (!g_fp->_inventoryScene)
break;
int invItem;
- if (g_fullpipe->_updateFlag && (invItem = g_fullpipe->_inventory->getHoveredItem(&g_fullpipe->_mouseScreenPos))) {
- g_fullpipe->_cursorId = PIC_CSR_ITN;
- if (!g_fullpipe->_currSelectedInventoryItemId && !g_fullpipe->_aniMan->_movement &&
- !(g_fullpipe->_aniMan->_flags & 0x100) && g_fullpipe->_aniMan->isIdle()) {
- int st = g_fullpipe->_aniMan->_statics->_staticsId;
+ if (g_fp->_updateFlag && (invItem = g_fp->_inventory->getHoveredItem(&g_fp->_mouseScreenPos))) {
+ g_fp->_cursorId = PIC_CSR_ITN;
+ if (!g_fp->_currSelectedInventoryItemId && !g_fp->_aniMan->_movement &&
+ !(g_fp->_aniMan->_flags & 0x100) && g_fp->_aniMan->isIdle()) {
+ int st = g_fp->_aniMan->_statics->_staticsId;
ExCommand *newex = 0;
if (st == ST_MAN_RIGHT) {
- newex = new ExCommand(g_fullpipe->_aniMan->_id, 1, rMV_MAN_LOOKUP, 0, 0, 0, 1, 0, 0, 0);
+ newex = new ExCommand(g_fp->_aniMan->_id, 1, rMV_MAN_LOOKUP, 0, 0, 0, 1, 0, 0, 0);
} else if (st == (0x4000 | ST_MAN_RIGHT)) {
- newex = new ExCommand(g_fullpipe->_aniMan->_id, 1, MV_MAN_LOOKUP, 0, 0, 0, 1, 0, 0, 0);
+ newex = new ExCommand(g_fp->_aniMan->_id, 1, MV_MAN_LOOKUP, 0, 0, 0, 1, 0, 0, 0);
}
if (newex) {
- newex->_keyCode = g_fullpipe->_aniMan->_okeyCode;
+ newex->_keyCode = g_fp->_aniMan->_okeyCode;
newex->_excFlags |= 3;
newex->postMessage();
}
}
- if (g_fullpipe->_currSelectedInventoryItemId != invItem)
- g_fullpipe->playSound(SND_CMN_070, 0);
+ if (g_fp->_currSelectedInventoryItemId != invItem)
+ g_fp->playSound(SND_CMN_070, 0);
- g_fullpipe->_currSelectedInventoryItemId = invItem;
- g_fullpipe->setCursor(g_fullpipe->_cursorId);
+ g_fp->_currSelectedInventoryItemId = invItem;
+ g_fp->setCursor(g_fp->_cursorId);
break;
}
- if (g_fullpipe->_updateCursorCallback)
- g_fullpipe->_updateCursorCallback();
+ if (g_fp->_updateCursorCallback)
+ g_fp->_updateCursorCallback();
- g_fullpipe->_currSelectedInventoryItemId = 0;
- g_fullpipe->setCursor(g_fullpipe->_cursorId);
+ g_fp->_currSelectedInventoryItemId = 0;
+ g_fp->setCursor(g_fp->_cursorId);
break;
case 65: // open map
- if (cmd->_field_2C == 11 && cmd->_field_14 == ANI_INV_MAP && g_fullpipe->_flgCanOpenMap)
- g_fullpipe->openMap();
+ if (cmd->_field_2C == 11 && cmd->_field_14 == ANI_INV_MAP && g_fp->_flgCanOpenMap)
+ g_fp->openMap();
break;
default:
break;
@@ -228,13 +228,13 @@ int global_messageHandler2(ExCommand *cmd) {
break;
case 28:
- ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
+ ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
if (ani)
ani->_priority = cmd->_field_14;
break;
case 25:
- ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
+ ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
if (ani) {
if (cmd->_field_14) {
ani->setFlags40(true);
@@ -247,7 +247,7 @@ int global_messageHandler2(ExCommand *cmd) {
break;
case 26:
- ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
+ ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
if (ani) {
Movement *mov = ani->_movement;
if (mov)
@@ -258,7 +258,7 @@ int global_messageHandler2(ExCommand *cmd) {
default:
#if 0
// We never put anything into _defMsgArray
- while (::iterator it = g_fullpipe->_defMsgArray.begin(); it != g_fullpipe->_defMsgArray.end(); ++it)
+ while (::iterator it = g_fp->_defMsgArray.begin(); it != g_fp->_defMsgArray.end(); ++it)
if (((ExCommand *)*it)->_field_24 == _messageNum) {
((ExCommand *)*it)->firef34(v13);
res = 1;
@@ -267,11 +267,11 @@ int global_messageHandler2(ExCommand *cmd) {
//debug_msg(_messageNum);
- if (!g_fullpipe->_soundEnabled || cmd->_messageNum != 33 || g_fullpipe->_currSoundListCount <= 0)
+ if (!g_fp->_soundEnabled || cmd->_messageNum != 33 || g_fp->_currSoundListCount <= 0)
return res;
- for (int snd = 0; snd < g_fullpipe->_currSoundListCount; snd++) {
- SoundList *s = g_fullpipe->_currSoundList1[snd];
+ for (int snd = 0; snd < g_fp->_currSoundListCount; snd++) {
+ SoundList *s = g_fp->_currSoundList1[snd];
int ms = s->getCount();
for (int i = 0; i < ms; i++) {
s->getSoundByIndex(i)->setPanAndVolumeByStaticAni();
@@ -292,7 +292,7 @@ int global_messageHandler3(ExCommand *cmd) {
case 31:
case 32:
case 36:
- if (g_fullpipe->_inputDisabled)
+ if (g_fp->_inputDisabled)
cmd->_messageKind = 0;
break;
default:
@@ -306,41 +306,41 @@ int global_messageHandler3(ExCommand *cmd) {
case 17:
switch (cmd->_messageNum) {
case 61:
- return g_fullpipe->_gameLoader->preloadScene(cmd->_parentId, cmd->_keyCode);
+ return g_fp->_gameLoader->preloadScene(cmd->_parentId, cmd->_keyCode);
case 62:
- return g_fullpipe->_gameLoader->gotoScene(cmd->_parentId, cmd->_keyCode);
+ return g_fp->_gameLoader->gotoScene(cmd->_parentId, cmd->_keyCode);
case 64:
- if (g_fullpipe->_currentScene && g_fullpipe->_msgObjectId2
- && (!(cmd->_keyCode & 4) || g_fullpipe->_msgObjectId2 != cmd->_field_14 || g_fullpipe->_msgId != cmd->_field_20)) {
- ani = g_fullpipe->_currentScene->getStaticANIObject1ById(g_fullpipe->_msgObjectId2, g_fullpipe->_msgId);
+ if (g_fp->_currentScene && g_fp->_msgObjectId2
+ && (!(cmd->_keyCode & 4) || g_fp->_msgObjectId2 != cmd->_field_14 || g_fp->_msgId != cmd->_field_20)) {
+ ani = g_fp->_currentScene->getStaticANIObject1ById(g_fp->_msgObjectId2, g_fp->_msgId);
if (ani) {
ani->_flags &= 0xFF7F;
ani->_flags &= 0xFEFF;
ani->deleteFromGlobalMessageQueue();
}
}
- g_fullpipe->_msgX = 0;
- g_fullpipe->_msgY = 0;
- g_fullpipe->_msgObjectId2 = 0;
- g_fullpipe->_msgId = 0;
+ g_fp->_msgX = 0;
+ g_fp->_msgY = 0;
+ g_fp->_msgObjectId2 = 0;
+ g_fp->_msgId = 0;
if ((cmd->_keyCode & 1) || (cmd->_keyCode & 2)) {
- g_fullpipe->_msgX = cmd->_x;
- g_fullpipe->_msgY = cmd->_y;
+ g_fp->_msgX = cmd->_x;
+ g_fp->_msgY = cmd->_y;
}
if (cmd->_keyCode & 4) {
- g_fullpipe->_msgObjectId2 = cmd->_field_14;
- g_fullpipe->_msgId = cmd->_field_20;
+ g_fp->_msgObjectId2 = cmd->_field_14;
+ g_fp->_msgId = cmd->_field_20;
}
return result;
case 29:
- if (!g_fullpipe->_currentScene)
+ if (!g_fp->_currentScene)
return result;
- if (g_fullpipe->_gameLoader->_interactionController->_flag24) {
- ani = g_fullpipe->_currentScene->getStaticANIObjectAtPos(cmd->_sceneClickX, cmd->_sceneClickY);
- ani2 = g_fullpipe->_currentScene->getStaticANIObject1ById(g_fullpipe->_gameLoader->_field_FA, -1);
+ if (g_fp->_gameLoader->_interactionController->_flag24) {
+ ani = g_fp->_currentScene->getStaticANIObjectAtPos(cmd->_sceneClickX, cmd->_sceneClickY);
+ ani2 = g_fp->_currentScene->getStaticANIObject1ById(g_fp->_gameLoader->_field_FA, -1);
if (ani) {
- if (g_fullpipe->_msgObjectId2 == ani->_id && g_fullpipe->_msgId == ani->_okeyCode) {
+ if (g_fp->_msgObjectId2 == ani->_id && g_fp->_msgId == ani->_okeyCode) {
cmd->_messageKind = 0;
return result;
}
@@ -349,10 +349,10 @@ int global_messageHandler3(ExCommand *cmd) {
return 1;
}
} else {
- int id = g_fullpipe->_currentScene->getPictureObjectIdAtPos(cmd->_sceneClickX, cmd->_sceneClickY);
- PictureObject *pic = g_fullpipe->_currentScene->getPictureObjectById(id, 0);
+ int id = g_fp->_currentScene->getPictureObjectIdAtPos(cmd->_sceneClickX, cmd->_sceneClickY);
+ PictureObject *pic = g_fp->_currentScene->getPictureObjectById(id, 0);
if (pic) {
- if (g_fullpipe->_msgObjectId2 == pic->_id && g_fullpipe->_msgId == pic->_okeyCode) {
+ if (g_fp->_msgObjectId2 == pic->_id && g_fp->_msgId == pic->_okeyCode) {
cmd->_messageKind = 0;
return result;
}
@@ -364,13 +364,13 @@ int global_messageHandler3(ExCommand *cmd) {
}
}
}
- if (getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId)->_isEnabled && cmd->_keyCode <= 0) {
- if (g_fullpipe->_msgX != cmd->_sceneClickX || g_fullpipe->_msgY != cmd->_sceneClickY) {
- ani = g_fullpipe->_currentScene->getStaticANIObject1ById(g_fullpipe->_gameLoader->_field_FA, -1);
+ if (getSc2MctlCompoundBySceneId(g_fp->_currentScene->_sceneId)->_isEnabled && cmd->_keyCode <= 0) {
+ if (g_fp->_msgX != cmd->_sceneClickX || g_fp->_msgY != cmd->_sceneClickY) {
+ ani = g_fp->_currentScene->getStaticANIObject1ById(g_fp->_gameLoader->_field_FA, -1);
if (!ani || (ani->isIdle() && !(ani->_flags & 0x80) && !(ani->_flags & 0x100))) {
- result = startWalkTo(g_fullpipe->_gameLoader->_field_FA, -1, cmd->_sceneClickX, cmd->_sceneClickY, 0);
+ result = startWalkTo(g_fp->_gameLoader->_field_FA, -1, cmd->_sceneClickX, cmd->_sceneClickY, 0);
if (result) {
- ExCommand *ex = new ExCommand(g_fullpipe->_gameLoader->_field_FA, 17, 64, 0, 0, 0, 1, 0, 0, 0);
+ ExCommand *ex = new ExCommand(g_fp->_gameLoader->_field_FA, 17, 64, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = 1;
ex->_excFlags |= 3;
@@ -388,7 +388,7 @@ int global_messageHandler3(ExCommand *cmd) {
return result;
}
case 58:
- g_fullpipe->setCursor(cmd->_keyCode);
+ g_fp->setCursor(cmd->_keyCode);
return result;
case 59:
setInputDisabled(1);
@@ -398,7 +398,7 @@ int global_messageHandler3(ExCommand *cmd) {
return result;
case 56:
if (cmd->_field_2C) {
- ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
+ ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
if (ani) {
getGameLoaderInventory()->addItem2(ani);
result = 1;
@@ -412,13 +412,13 @@ int global_messageHandler3(ExCommand *cmd) {
case 57:
if (cmd->_field_2C) {
if (!cmd->_field_20) {
- getGameLoaderInventory()->removeItem2(g_fullpipe->_currentScene, cmd->_parentId, cmd->_x, cmd->_y, cmd->_field_14);
+ getGameLoaderInventory()->removeItem2(g_fp->_currentScene, cmd->_parentId, cmd->_x, cmd->_y, cmd->_field_14);
getGameLoaderInventory()->rebuildItemRects();
return 1;
}
- ani = g_fullpipe->_currentScene->getStaticANIObject1ById(g_fullpipe->_gameLoader->_field_FA, -1);
+ ani = g_fp->_currentScene->getStaticANIObject1ById(g_fp->_gameLoader->_field_FA, -1);
if (ani) {
- getGameLoaderInventory()->removeItem2(g_fullpipe->_currentScene, cmd->_parentId, ani->_ox + cmd->_x, ani->_oy + cmd->_y, ani->_priority + cmd->_field_14);
+ getGameLoaderInventory()->removeItem2(g_fp->_currentScene, cmd->_parentId, ani->_ox + cmd->_x, ani->_oy + cmd->_y, ani->_priority + cmd->_field_14);
getGameLoaderInventory()->rebuildItemRects();
return 1;
}
@@ -428,13 +428,13 @@ int global_messageHandler3(ExCommand *cmd) {
getGameLoaderInventory()->rebuildItemRects();
return 1;
case 55:
- if (g_fullpipe->_currentScene) {
+ if (g_fp->_currentScene) {
GameObject *obj;
if (cmd->_field_14)
- obj = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_x, cmd->_y);
+ obj = g_fp->_currentScene->getStaticANIObject1ById(cmd->_x, cmd->_y);
else
- obj = g_fullpipe->_currentScene->getPictureObjectById(cmd->_x, cmd->_y);
- handleObjectInteraction(g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode), obj, cmd->_field_20);
+ obj = g_fp->_currentScene->getPictureObjectById(cmd->_x, cmd->_y);
+ handleObjectInteraction(g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode), obj, cmd->_field_20);
result = 1;
}
return result;
@@ -448,7 +448,7 @@ int global_messageHandler3(ExCommand *cmd) {
if (cmd->_objtype == kObjTypeObjstateCommand) {
ObjstateCommand *c = (ObjstateCommand *)cmd;
result = 1;
- g_fullpipe->setObjectState(c->_objCommandName, c->_value);
+ g_fp->setObjectState(c->_objCommandName, c->_value);
}
return result;
default:
@@ -461,7 +461,7 @@ int global_messageHandler4(ExCommand *cmd) {
switch (cmd->_messageKind) {
case 18: {
- MessageQueue *mq = new MessageQueue(g_fullpipe->_currentScene->getMessageQueueById(cmd->_messageNum), cmd->_parId, 0);
+ MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(cmd->_messageNum), cmd->_parId, 0);
if (cmd->_excFlags & 1)
mq->_flag1 = 1;
@@ -472,10 +472,10 @@ int global_messageHandler4(ExCommand *cmd) {
break;
}
case 2:
- if (!g_fullpipe->_currentScene)
+ if (!g_fp->_currentScene)
break;
- ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
+ ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
if (!ani)
break;
@@ -483,10 +483,10 @@ int global_messageHandler4(ExCommand *cmd) {
break;
case 1: {
- if (!g_fullpipe->_currentScene)
+ if (!g_fp->_currentScene)
break;
- ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
+ ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
if (!ani)
break;
@@ -502,10 +502,10 @@ int global_messageHandler4(ExCommand *cmd) {
break;
}
case 8:
- if (!g_fullpipe->_currentScene)
+ if (!g_fp->_currentScene)
break;
- ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
+ ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
if (!ani)
break;
@@ -513,10 +513,10 @@ int global_messageHandler4(ExCommand *cmd) {
break;
case 20: {
- if (!g_fullpipe->_currentScene)
+ if (!g_fp->_currentScene)
break;
- ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
+ ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
if (!ani)
break;
@@ -534,10 +534,10 @@ int global_messageHandler4(ExCommand *cmd) {
break;
}
case 21:
- if (!g_fullpipe->_currentScene)
+ if (!g_fp->_currentScene)
break;
- ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
+ ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
if (!ani)
break;
@@ -548,17 +548,17 @@ int global_messageHandler4(ExCommand *cmd) {
// Nop in original
break;
case 3:
- g_fullpipe->_currentScene->_y = cmd->_messageNum - cmd->_messageNum % g_fullpipe->_scrollSpeed;
+ g_fp->_currentScene->_y = cmd->_messageNum - cmd->_messageNum % g_fp->_scrollSpeed;
break;
case 4:
- g_fullpipe->_currentScene->_x = cmd->_messageNum - cmd->_messageNum % g_fullpipe->_scrollSpeed;
+ g_fp->_currentScene->_x = cmd->_messageNum - cmd->_messageNum % g_fp->_scrollSpeed;
break;
case 19: {
- if (!g_fullpipe->_currentScene)
+ if (!g_fp->_currentScene)
break;
- ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
+ ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
if (!ani)
break;
@@ -573,10 +573,10 @@ int global_messageHandler4(ExCommand *cmd) {
break;
}
case 22:
- if (!g_fullpipe->_currentScene)
+ if (!g_fp->_currentScene)
break;
- ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
+ ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
if (!ani)
break;
@@ -585,10 +585,10 @@ int global_messageHandler4(ExCommand *cmd) {
break;
case 6:
- if (!g_fullpipe->_currentScene)
+ if (!g_fp->_currentScene)
break;
- ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
+ ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
if (!ani)
break;
@@ -596,18 +596,18 @@ int global_messageHandler4(ExCommand *cmd) {
break;
case 27:
- if (!g_fullpipe->_currentScene || g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode) == 0) {
- ani = g_fullpipe->accessScene(cmd->_field_20)->getStaticANIObject1ById(cmd->_parentId, -1);
+ if (!g_fp->_currentScene || g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode) == 0) {
+ ani = g_fp->accessScene(cmd->_field_20)->getStaticANIObject1ById(cmd->_parentId, -1);
if (ani) {
ani = new StaticANIObject(ani);
- g_fullpipe->_currentScene->addStaticANIObject(ani, 1);
+ g_fp->_currentScene->addStaticANIObject(ani, 1);
}
}
// fall through
case 5:
- if (g_fullpipe->_currentScene)
- ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
+ if (g_fp->_currentScene)
+ ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
if (!ani)
break;
@@ -619,10 +619,10 @@ int global_messageHandler4(ExCommand *cmd) {
break;
case 10:
- if (!g_fullpipe->_currentScene)
+ if (!g_fp->_currentScene)
break;
- ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
+ ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
if (!ani)
break;
@@ -633,34 +633,34 @@ int global_messageHandler4(ExCommand *cmd) {
break;
case 7: {
- if (!g_fullpipe->_currentScene->_picObjList.size())
+ if (!g_fp->_currentScene->_picObjList.size())
break;
- int offX = g_fullpipe->_scrollSpeed * (cmd->_x / g_fullpipe->_scrollSpeed);
- int offY = g_fullpipe->_scrollSpeed * (cmd->_y / g_fullpipe->_scrollSpeed);
+ int offX = g_fp->_scrollSpeed * (cmd->_x / g_fp->_scrollSpeed);
+ int offY = g_fp->_scrollSpeed * (cmd->_y / g_fp->_scrollSpeed);
if (cmd->_messageNum) {
- g_fullpipe->_currentScene->_x = offX - g_fullpipe->_sceneRect.left;
- g_fullpipe->_currentScene->_y = offY - g_fullpipe->_sceneRect.top;
+ g_fp->_currentScene->_x = offX - g_fp->_sceneRect.left;
+ g_fp->_currentScene->_y = offY - g_fp->_sceneRect.top;
if (cmd->_field_24) {
- g_fullpipe->_currentScene->_messageQueueId = cmd->_parId;
+ g_fp->_currentScene->_messageQueueId = cmd->_parId;
}
} else {
- g_fullpipe->_sceneRect.moveTo(offX, offY);
+ g_fp->_sceneRect.moveTo(offX, offY);
- g_fullpipe->_currentScene->_x = 0;
- g_fullpipe->_currentScene->_y = 0;
+ g_fp->_currentScene->_x = 0;
+ g_fp->_currentScene->_y = 0;
- g_fullpipe->_currentScene->updateScrolling2();
+ g_fp->_currentScene->updateScrolling2();
}
break;
}
case 34:
- if (!g_fullpipe->_currentScene)
+ if (!g_fp->_currentScene)
break;
- ani = g_fullpipe->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
+ ani = g_fp->_currentScene->getStaticANIObject1ById(cmd->_parentId, cmd->_keyCode);
if (!ani)
break;
@@ -690,15 +690,15 @@ int MovGraph_messageHandler(ExCommand *cmd) {
if (cmd->_messageNum != 33)
return 0;
- StaticANIObject *ani = g_fullpipe->_currentScene->getStaticANIObject1ById(g_fullpipe->_gameLoader->_field_FA, -1);
+ StaticANIObject *ani = g_fp->_currentScene->getStaticANIObject1ById(g_fp->_gameLoader->_field_FA, -1);
- if (!getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId))
+ if (!getSc2MctlCompoundBySceneId(g_fp->_currentScene->_sceneId))
return 0;
- if (getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId)->_objtype != kObjTypeMovGraph || !ani)
+ if (getSc2MctlCompoundBySceneId(g_fp->_currentScene->_sceneId)->_objtype != kObjTypeMovGraph || !ani)
return 0;
- MovGraph *gr = (MovGraph *)getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId);
+ MovGraph *gr = (MovGraph *)getSc2MctlCompoundBySceneId(g_fp->_currentScene->_sceneId);
MovGraphLink *link = 0;
double mindistance = 1.0e10;
diff --git a/engines/fullpipe/messages.cpp b/engines/fullpipe/messages.cpp
index 8ea94ff1eb..8ca416bb9e 100644
--- a/engines/fullpipe/messages.cpp
+++ b/engines/fullpipe/messages.cpp
@@ -73,7 +73,7 @@ bool ExCommand::load(MfcArchive &file) {
_field_3C = 0;
- if (g_fullpipe->_gameProjectVersion >= 12) {
+ if (g_fp->_gameProjectVersion >= 12) {
_excFlags = file.readUint32LE();
_parId = file.readUint32LE();
}
@@ -83,12 +83,12 @@ bool ExCommand::load(MfcArchive &file) {
bool ExCommand::handleMessage() {
int cnt = 0;
- for (MessageHandler *m = g_fullpipe->_messageHandlers; m; m = m->nextItem)
+ for (MessageHandler *m = g_fp->_messageHandlers; m; m = m->nextItem)
cnt += m->callback(this);
if (_messageKind == 17 || (_excFlags & 1)) {
if (_parId) {
- MessageQueue *mq = g_fullpipe->_globalMessageQueueList->getMessageQueueById(_parId);
+ MessageQueue *mq = g_fp->_globalMessageQueueList->getMessageQueueById(_parId);
if (mq)
mq->update();
}
@@ -101,18 +101,18 @@ bool ExCommand::handleMessage() {
}
void ExCommand::sendMessage() {
- g_fullpipe->_exCommandList.push_back(this);
+ g_fp->_exCommandList.push_back(this);
processMessages();
}
void ExCommand::postMessage() {
- g_fullpipe->_exCommandList.push_back(this);
+ g_fp->_exCommandList.push_back(this);
}
void ExCommand::handle() {
- if (g_fullpipe->_modalObject) {
- g_fullpipe->_modalObject->handleMessage(this);
+ if (g_fp->_modalObject) {
+ g_fp->_modalObject->handleMessage(this);
delete this;
} else {
@@ -205,7 +205,7 @@ MessageQueue::MessageQueue(int dataId) {
_field_14 = 0;
_parId = 0;
_dataId = dataId;
- _id = g_fullpipe->_globalMessageQueueList->compact();
+ _id = g_fp->_globalMessageQueueList->compact();
_isFinished = 0;
_flags = 0;
_queueName = 0;
@@ -231,11 +231,11 @@ MessageQueue::MessageQueue(MessageQueue *src, int parId, int field_38) {
else
_parId = src->_parId;
- _id = g_fullpipe->_globalMessageQueueList->compact();
+ _id = g_fp->_globalMessageQueueList->compact();
_dataId = src->_dataId;
_flags = src->_flags;
- g_fullpipe->_globalMessageQueueList->addMessageQueue(this);
+ g_fp->_globalMessageQueueList->addMessageQueue(this);
_isFinished = 0;
_flag1 = 0;
@@ -255,7 +255,7 @@ MessageQueue::~MessageQueue() {
delete _field_14;
if (_flags & 2) {
- g_fullpipe->_globalMessageQueueList->removeQueueById(_id);
+ g_fp->_globalMessageQueueList->removeQueueById(_id);
}
finish();
@@ -270,7 +270,7 @@ bool MessageQueue::load(MfcArchive &file) {
int count = file.readUint16LE();
- assert(g_fullpipe->_gameProjectVersion >= 12);
+ assert(g_fp->_gameProjectVersion >= 12);
_queueName = file.readPascalString();
@@ -291,7 +291,7 @@ bool MessageQueue::load(MfcArchive &file) {
bool MessageQueue::chain(StaticANIObject *ani) {
if (checkGlobalExCommandList1() && checkGlobalExCommandList2()) {
if (!(getFlags() & 2)) {
- g_fullpipe->_globalMessageQueueList->addMessageQueue(this);
+ g_fp->_globalMessageQueueList->addMessageQueue(this);
_flags |= 2;
}
if (ani) {
@@ -398,7 +398,7 @@ bool MessageQueue::checkGlobalExCommandList1() {
if (ex->_messageKind != 1 && ex->_messageKind != 20 && ex->_messageKind != 5 && ex->_messageKind != 27)
continue;
- for (Common::List<ExCommand *>::iterator it = g_fullpipe->_exCommandList.begin(); it != g_fullpipe->_exCommandList.end(); it++) {
+ for (Common::List<ExCommand *>::iterator it = g_fp->_exCommandList.begin(); it != g_fp->_exCommandList.end(); it++) {
ex1 = *it;
if (ex1->_messageKind != 1 && ex1->_messageKind != 20 && ex1->_messageKind != 5 && ex1->_messageKind != 27)
@@ -407,7 +407,7 @@ bool MessageQueue::checkGlobalExCommandList1() {
if (ex1->_keyCode != ex->_keyCode && ex1->_keyCode != -1 && ex->_keyCode != -1)
continue;
- MessageQueue *mq = g_fullpipe->_globalMessageQueueList->getMessageQueueById(ex1->_parId);
+ MessageQueue *mq = g_fp->_globalMessageQueueList->getMessageQueueById(ex1->_parId);
if (mq) {
if (mq->getFlags() & 1)
@@ -427,7 +427,7 @@ bool MessageQueue::checkGlobalExCommandList2() {
if (ex->_messageKind != 1 && ex->_messageKind != 20 && ex->_messageKind != 5 && ex->_messageKind != 27)
continue;
- for (Common::List<ExCommand *>::iterator it = g_fullpipe->_exCommandList.begin(); it != g_fullpipe->_exCommandList.end();) {
+ for (Common::List<ExCommand *>::iterator it = g_fp->_exCommandList.begin(); it != g_fp->_exCommandList.end();) {
ex1 = *it;
if (ex1->_messageKind != 1 && ex1->_messageKind != 20 && ex1->_messageKind != 5 && ex1->_messageKind != 27) {
@@ -440,7 +440,7 @@ bool MessageQueue::checkGlobalExCommandList2() {
continue;
}
- MessageQueue *mq = g_fullpipe->_globalMessageQueueList->getMessageQueueById(ex1->_parId);
+ MessageQueue *mq = g_fp->_globalMessageQueueList->getMessageQueueById(ex1->_parId);
if (mq) {
if (mq->getFlags() & 1)
@@ -449,7 +449,7 @@ bool MessageQueue::checkGlobalExCommandList2() {
delete mq;
}
- it = g_fullpipe->_exCommandList.erase(it);
+ it = g_fp->_exCommandList.erase(it);
if (ex1->_excFlags & 2) {
delete ex1;
@@ -463,7 +463,7 @@ void MessageQueue::finish() {
if (!_parId)
return;
- MessageQueue *mq = g_fullpipe->_globalMessageQueueList->getMessageQueueById(_parId);
+ MessageQueue *mq = g_fp->_globalMessageQueueList->getMessageQueueById(_parId);
_parId = 0;
@@ -602,8 +602,8 @@ void clearGlobalMessageQueueList1() {
}
bool removeMessageHandler(int16 id, int pos) {
- if (g_fullpipe->_messageHandlers) {
- MessageHandler *curItem = g_fullpipe->_messageHandlers;
+ if (g_fp->_messageHandlers) {
+ MessageHandler *curItem = g_fp->_messageHandlers;
MessageHandler *prevItem = 0;
int curPos = 0;
@@ -637,13 +637,13 @@ void addMessageHandler(int (*callback)(ExCommand *), int16 id) {
if (getMessageHandlerById(id))
return;
- MessageHandler *curItem = g_fullpipe->_messageHandlers;
+ MessageHandler *curItem = g_fp->_messageHandlers;
if (!curItem)
return;
int index = 0;
- for (MessageHandler *i = g_fullpipe->_messageHandlers->nextItem; i; i = i->nextItem) {
+ for (MessageHandler *i = g_fp->_messageHandlers->nextItem; i; i = i->nextItem) {
curItem = i;
index++;
}
@@ -655,7 +655,7 @@ void addMessageHandler(int (*callback)(ExCommand *), int16 id) {
}
MessageHandler *getMessageHandlerById(int16 id) {
- MessageHandler *curItem = g_fullpipe->_messageHandlers;
+ MessageHandler *curItem = g_fp->_messageHandlers;
if (!curItem)
return 0;
@@ -685,7 +685,7 @@ bool allocMessageHandler(MessageHandler *where, int16 id, int (*callback)(ExComm
msg->callback = callback;
msg->index = 0;
- g_fullpipe->_messageHandlers = msg;
+ g_fp->_messageHandlers = msg;
}
return true;
@@ -693,7 +693,7 @@ bool allocMessageHandler(MessageHandler *where, int16 id, int (*callback)(ExComm
int getMessageHandlersCount() {
int result;
- MessageHandler *curItem = g_fullpipe->_messageHandlers;
+ MessageHandler *curItem = g_fp->_messageHandlers;
for (result = 0; curItem; result++)
curItem = curItem->nextItem;
@@ -706,7 +706,7 @@ bool addMessageHandlerByIndex(int (*callback)(ExCommand *), int index, int16 id)
return false;
if (index) {
- MessageHandler *curItem = g_fullpipe->_messageHandlers;
+ MessageHandler *curItem = g_fp->_messageHandlers;
for (int i = index - 1; i > 0; i--)
if (curItem)
@@ -724,13 +724,13 @@ bool addMessageHandlerByIndex(int (*callback)(ExCommand *), int index, int16 id)
} else {
MessageHandler *newItem = new MessageHandler;
- newItem->nextItem = g_fullpipe->_messageHandlers;
+ newItem->nextItem = g_fp->_messageHandlers;
newItem->id = id;
newItem->callback = callback;
newItem->index = 0;
- updateMessageHandlerIndex(g_fullpipe->_messageHandlers, 1);
- g_fullpipe->_messageHandlers = newItem;
+ updateMessageHandlerIndex(g_fp->_messageHandlers, 1);
+ g_fp->_messageHandlers = newItem;
return true;
}
@@ -740,7 +740,7 @@ bool insertMessageHandler(int (*callback)(ExCommand *), int index, int16 id) {
if (getMessageHandlerById(id))
return false;
- MessageHandler *curItem = g_fullpipe->_messageHandlers;
+ MessageHandler *curItem = g_fp->_messageHandlers;
for (int i = index; i > 0; i--)
if (curItem)
@@ -757,7 +757,7 @@ void clearMessageHandlers() {
MessageHandler *curItem;
MessageHandler *nextItem;
- curItem = g_fullpipe->_messageHandlers;
+ curItem = g_fp->_messageHandlers;
if (curItem) {
do {
nextItem = curItem->nextItem;
@@ -767,32 +767,32 @@ void clearMessageHandlers() {
curItem = nextItem;
} while (nextItem);
- g_fullpipe->_messageHandlers = 0;
+ g_fp->_messageHandlers = 0;
}
}
void processMessages() {
- if (!g_fullpipe->_isProcessingMessages) {
- g_fullpipe->_isProcessingMessages = true;
+ if (!g_fp->_isProcessingMessages) {
+ g_fp->_isProcessingMessages = true;
- while (g_fullpipe->_exCommandList.size()) {
- ExCommand *ex = g_fullpipe->_exCommandList.front();
- g_fullpipe->_exCommandList.pop_front();
+ while (g_fp->_exCommandList.size()) {
+ ExCommand *ex = g_fp->_exCommandList.front();
+ g_fp->_exCommandList.pop_front();
ex->handleMessage();
}
- g_fullpipe->_isProcessingMessages = false;
+ g_fp->_isProcessingMessages = false;
}
}
void updateGlobalMessageQueue(int id, int objid) {
- MessageQueue *m = g_fullpipe->_globalMessageQueueList->getMessageQueueById(id);
+ MessageQueue *m = g_fp->_globalMessageQueueList->getMessageQueueById(id);
if (m) {
m->update();
}
}
bool chainQueue(int queueId, int flags) {
- MessageQueue *mq = g_fullpipe->_currentScene->getMessageQueueById(queueId);
+ MessageQueue *mq = g_fp->_currentScene->getMessageQueueById(queueId);
if (!mq)
return false;
@@ -811,7 +811,7 @@ bool chainQueue(int queueId, int flags) {
}
bool chainObjQueue(StaticANIObject *obj, int queueId, int flags) {
- MessageQueue *mq = g_fullpipe->_currentScene->getMessageQueueById(queueId);
+ MessageQueue *mq = g_fp->_currentScene->getMessageQueueById(queueId);
if (!mq)
return false;
diff --git a/engines/fullpipe/modal.cpp b/engines/fullpipe/modal.cpp
index f766be3eac..b98f7314bc 100644
--- a/engines/fullpipe/modal.cpp
+++ b/engines/fullpipe/modal.cpp
@@ -40,17 +40,17 @@ ModalIntro::ModalIntro() {
_introFlags = 33;
_countDown = 150;
- PictureObject *pict = g_fullpipe->accessScene(SC_INTRO1)->getPictureObjectById(PIC_IN1_PIPETITLE, 0);
+ PictureObject *pict = g_fp->accessScene(SC_INTRO1)->getPictureObjectById(PIC_IN1_PIPETITLE, 0);
pict->setFlags(pict->_flags & 0xFFFB);
}
g_vars->sceneIntro_skipIntro = false;
- _sfxVolume = g_fullpipe->_sfxVolume;
+ _sfxVolume = g_fp->_sfxVolume;
}
ModalIntro::~ModalIntro() {
- g_fullpipe->stopAllSounds();
- g_fullpipe->_sfxVolume = _sfxVolume;
+ g_fp->stopAllSounds();
+ g_fp->_sfxVolume = _sfxVolume;
}
bool ModalIntro::handleMessage(ExCommand *message) {
@@ -84,7 +84,7 @@ bool ModalIntro::init(int counterdiff) {
}
if (_introFlags & 0x10)
- g_fullpipe->_gameLoader->updateSystems(42);
+ g_fp->_gameLoader->updateSystems(42);
_introFlags |= 2;
@@ -94,7 +94,7 @@ bool ModalIntro::init(int counterdiff) {
if (_introFlags & 4) {
ModalVideoPlayer *player = new ModalVideoPlayer();
- g_fullpipe->_modalObject = player;
+ g_fp->_modalObject = player;
player->_parentObj = this;
player->play("intro.avi");
@@ -118,7 +118,7 @@ bool ModalIntro::init(int counterdiff) {
if (_introFlags & 0x40) {
ModalVideoPlayer *player = new ModalVideoPlayer();
- g_fullpipe->_modalObject = player;
+ g_fp->_modalObject = player;
player->_parentObj = this;
player->play("intro2.avi");
@@ -151,7 +151,7 @@ bool ModalIntro::init(int counterdiff) {
_countDown = 150;
_introFlags = (_introFlags & 0xf7) | 0x21;
- g_fullpipe->accessScene(SC_INTRO1)->getPictureObjectById(PIC_IN1_PIPETITLE, 0)->_flags &= 0xfffb;
+ g_fp->accessScene(SC_INTRO1)->getPictureObjectById(PIC_IN1_PIPETITLE, 0)->_flags &= 0xfffb;
}
if (!(_introFlags & 0x20)) {
@@ -159,12 +159,12 @@ bool ModalIntro::init(int counterdiff) {
if (!_stillRunning) {
_introFlags |= 1;
- g_fullpipe->accessScene(SC_INTRO1)->getPictureObjectById(PIC_IN1_PIPETITLE, 0)->_flags &= 0xfffb;
- g_fullpipe->accessScene(SC_INTRO1)->getPictureObjectById(PIC_IN1_GAMETITLE, 0)->_flags &= 0xfffb;
+ g_fp->accessScene(SC_INTRO1)->getPictureObjectById(PIC_IN1_PIPETITLE, 0)->_flags &= 0xfffb;
+ g_fp->accessScene(SC_INTRO1)->getPictureObjectById(PIC_IN1_GAMETITLE, 0)->_flags &= 0xfffb;
chainQueue(QU_INTR_STARTINTRO, 1);
}
- g_fullpipe->_gameLoader->updateSystems(42);
+ g_fp->_gameLoader->updateSystems(42);
}
return true;
}
@@ -180,7 +180,7 @@ bool ModalIntro::init(int counterdiff) {
_introFlags = (_introFlags & 0xdf) | 0x10;
- g_fullpipe->accessScene(SC_INTRO1)->getPictureObjectById(PIC_IN1_GAMETITLE, 0)->_flags &= 0xfffb;
+ g_fp->accessScene(SC_INTRO1)->getPictureObjectById(PIC_IN1_GAMETITLE, 0)->_flags &= 0xfffb;
_stillRunning = 0;
}
@@ -189,14 +189,14 @@ bool ModalIntro::init(int counterdiff) {
}
void ModalIntro::update() {
- if (g_fullpipe->_currentScene) {
+ if (g_fp->_currentScene) {
if (_introFlags & 1) {
//sceneFade(virt, g_currentScene, 1);
_stillRunning = 255;
_introFlags &= 0xfe;
if (_introFlags & 0x20)
- g_fullpipe->playSound(SND_INTR_019, 0);
+ g_fp->playSound(SND_INTR_019, 0);
} else if (_introFlags & 2) {
if (g_vars->sceneIntro_needBlackout) {
//vrtRectangle(*(_DWORD *)virt, 0, 0, 0, 800, 600);
@@ -209,18 +209,18 @@ void ModalIntro::update() {
_introFlags &= 0xfd;
}
} else if (_stillRunning) {
- g_fullpipe->_currentScene->draw();
+ g_fp->_currentScene->draw();
}
}
}
void ModalIntro::finish() {
- g_fullpipe->_gameLoader->unloadScene(SC_INTRO2);
- g_fullpipe->_currentScene = g_fullpipe->accessScene(SC_INTRO1);
- g_fullpipe->_gameLoader->preloadScene(SC_INTRO1, TrubaDown);
+ g_fp->_gameLoader->unloadScene(SC_INTRO2);
+ g_fp->_currentScene = g_fp->accessScene(SC_INTRO1);
+ g_fp->_gameLoader->preloadScene(SC_INTRO1, TrubaDown);
- if (g_fullpipe->_currentScene)
- g_fullpipe->_gameLoader->updateSystems(42);
+ if (g_fp->_currentScene)
+ g_fp->_gameLoader->updateSystems(42);
}
void ModalVideoPlayer::play(const char *fname) {
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 727cb4c40c..1ecb973066 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -258,7 +258,7 @@ int MctlLadder::findObjectPos(StaticANIObject *obj) {
}
bool MctlLadder::initMovement(StaticANIObject *ani, MctlLadderMovement *movement) {
- GameVar *v = g_fullpipe->getGameLoaderGameVar()->getSubVarByName(ani->getName());
+ GameVar *v = g_fp->getGameLoaderGameVar()->getSubVarByName(ani->getName());
if (!v)
return false;
@@ -567,7 +567,7 @@ bool MovGraph2::initDirections(StaticANIObject *obj, MovGraph2Item *item) {
item->_obj = obj;
item->_objectId = obj->_id;
- GameVar *var = g_fullpipe->getGameLoaderGameVar()->getSubVarByName(obj->_objectName);
+ GameVar *var = g_fp->getGameLoaderGameVar()->getSubVarByName(obj->_objectName);
if (!var)
return false;
@@ -828,7 +828,7 @@ MessageQueue *MovGraph2::buildMovInfo1MessageQueue(MovInfo1 *movInfo) {
int curY = movInfo->pt1.y;
int curDistance = movInfo->distance1;
- MessageQueue *mq = new MessageQueue(g_fullpipe->_globalMessageQueueList->compact());
+ MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
for (int i = 0; i < movInfo->itemsCount - 1; i++) {
if (movInfo->items[i + 1]->subIndex != 10) {
@@ -1064,7 +1064,7 @@ MessageQueue *MovGraph2::doWalkTo(StaticANIObject *obj, int xpos, int ypos, int
}
if (obj->_ox == xpos && obj->_oy == ypos) {
- g_fullpipe->_globalMessageQueueList->compact();
+ g_fp->_globalMessageQueueList->compact();
MessageQueue *mq = new MessageQueue();
@@ -1530,7 +1530,7 @@ void MGM::rebuildTables(int objId) {
_items[idx]->movements1.clear();
_items[idx]->movements2.clear();
- StaticANIObject *obj = g_fullpipe->_currentScene->getStaticANIObject1ById(objId, -1);
+ StaticANIObject *obj = g_fp->_currentScene->getStaticANIObject1ById(objId, -1);
if (!obj)
return;
@@ -1841,10 +1841,10 @@ bool MovGraphReact::pointInRegion(int x, int y) {
}
int startWalkTo(int objId, int objKey, int x, int y, int a5) {
- MctlCompound *mc = getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId);
+ MctlCompound *mc = getSc2MctlCompoundBySceneId(g_fp->_currentScene->_sceneId);
if (mc)
- return (mc->method34(g_fullpipe->_currentScene->getStaticANIObject1ById(objId, objKey), x, y, a5, 0) != 0);
+ return (mc->method34(g_fp->_currentScene->getStaticANIObject1ById(objId, objKey), x, y, a5, 0) != 0);
return 0;
}
diff --git a/engines/fullpipe/ngiarchive.cpp b/engines/fullpipe/ngiarchive.cpp
index 5d895c17a0..132f4758d3 100644
--- a/engines/fullpipe/ngiarchive.cpp
+++ b/engines/fullpipe/ngiarchive.cpp
@@ -91,7 +91,7 @@ NGIArchive::NGIArchive(const Common::String &filename) : _ngiFilename(filename)
free(fat);
- g_fullpipe->_currArchive = this;
+ g_fp->_currArchive = this;
debug(0, "NGIArchive::NGIArchive(%s): Located %d files", filename.c_str(), _headers.size());
}
@@ -103,7 +103,7 @@ NGIArchive::~NGIArchive() {
delete it->_value;
}
- g_fullpipe->_currArchive = 0;
+ g_fp->_currArchive = 0;
}
bool NGIArchive::hasFile(const Common::String &name) const {
diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp
index a5a286cfcb..558a90978a 100644
--- a/engines/fullpipe/scene.cpp
+++ b/engines/fullpipe/scene.cpp
@@ -114,7 +114,7 @@ void SceneTag::loadScene() {
delete file;
- g_fullpipe->_currArchive = 0;
+ g_fp->_currArchive = 0;
free(fname);
free(archname);
@@ -146,7 +146,7 @@ bool Scene::load(MfcArchive &file) {
int aniNum = file.readUint16LE();
char *aniname = genFileName(0, aniNum, "ani");
- Common::SeekableReadStream *f = g_fullpipe->_currArchive->createReadStreamForMember(aniname);
+ Common::SeekableReadStream *f = g_fp->_currArchive->createReadStreamForMember(aniname);
StaticANIObject *ani = new StaticANIObject();
@@ -168,7 +168,7 @@ bool Scene::load(MfcArchive &file) {
int qNum = file.readUint16LE();
char *qname = genFileName(0, qNum, "qu");
- Common::SeekableReadStream *f = g_fullpipe->_currArchive->createReadStreamForMember(qname);
+ Common::SeekableReadStream *f = g_fp->_currArchive->createReadStreamForMember(qname);
MfcArchive archive(f);
archive.readUint16LE(); // Skip 2 bytes
@@ -191,7 +191,7 @@ bool Scene::load(MfcArchive &file) {
assert(0);
}
- _libHandle = g_fullpipe->_currArchive;
+ _libHandle = g_fp->_currArchive;
if (_picObjList.size() > 0 && _bgname && strlen(_bgname) > 1) {
char fname[260];
@@ -216,10 +216,10 @@ bool Scene::load(MfcArchive &file) {
char *slsname = genFileName(0, _sceneId, "sls");
- if (g_fullpipe->_soundEnabled) {
+ if (g_fp->_soundEnabled) {
_soundList = new SoundList();
- if (g_fullpipe->_flgSoundList) {
+ if (g_fp->_flgSoundList) {
char *nlname = genFileName(17, _sceneId, "nl");
_soundList->loadFile(slsname, nlname);
@@ -249,7 +249,7 @@ void Scene::init() {
_x = 0;
_y = 0;
- g_fullpipe->_sceneRect.moveTo(0, 0);
+ g_fp->_sceneRect.moveTo(0, 0);
for (uint i = 0; i < _picObjList.size(); i++)
((PictureObject *)_picObjList[i])->clearFlags();
@@ -398,7 +398,7 @@ void Scene::preloadMovements(GameVar *var) {
}
void Scene::initObjectCursors(const char *varname) {
- GameVar *cursorsVar = g_fullpipe->getGameLoaderGameVar()->getSubVarByName(varname)->getSubVarByName("CURSORS");
+ GameVar *cursorsVar = g_fp->getGameLoaderGameVar()->getSubVarByName(varname)->getSubVarByName("CURSORS");
if (!cursorsVar || !cursorsVar->_subVars)
return;
@@ -417,10 +417,10 @@ void Scene::initObjectCursors(const char *varname) {
}
}
- g_fullpipe->_minCursorId = minId;
- g_fullpipe->_maxCursorId = maxId;
+ g_fp->_minCursorId = minId;
+ g_fp->_maxCursorId = maxId;
- g_fullpipe->_objectIdCursors.resize(maxId - minId + 1);
+ g_fp->_objectIdCursors.resize(maxId - minId + 1);
for (GameVar *sub = cursorsVar->_subVars; sub; sub = sub->_nextVarObj) {
GameObject *obj = getPictureObjectByName(sub->_varName, -1);
@@ -431,7 +431,7 @@ void Scene::initObjectCursors(const char *varname) {
PictureObject *pic = getGameLoaderInventory()->getScene()->getPictureObjectByName(sub->_value.stringValue, -1);
if (obj && pic)
- g_fullpipe->_objectIdCursors[obj->_id - minId] = pic->_id;
+ g_fp->_objectIdCursors[obj->_id - minId] = pic->_id;
}
}
@@ -451,7 +451,7 @@ void Scene::draw() {
updateScrolling();
// Clean previous stuff
- g_fullpipe->_backgroundSurface.fillRect(Common::Rect(0, 0, 800, 600), 0);
+ g_fp->_backgroundSurface.fillRect(Common::Rect(0, 0, 800, 600), 0);
drawContent(60000, 0, true);
@@ -474,7 +474,7 @@ void Scene::draw() {
void Scene::updateScrolling() {
if (_messageQueueId && !_x && !_y) {
- MessageQueue *mq = g_fullpipe->_globalMessageQueueList->getMessageQueueById(_messageQueueId);
+ MessageQueue *mq = g_fp->_globalMessageQueueList->getMessageQueueById(_messageQueueId);
if (mq)
mq->update();
@@ -487,31 +487,31 @@ void Scene::updateScrolling() {
int offsetY = 0;
if (_x < 0) {
- if (!g_fullpipe->_sceneRect.left && !(((PictureObject *)_picObjList[0])->_flags & 2))
+ if (!g_fp->_sceneRect.left && !(((PictureObject *)_picObjList[0])->_flags & 2))
_x = 0;
- if (_x <= -g_fullpipe->_scrollSpeed) {
- offsetX = -g_fullpipe->_scrollSpeed;
- _x += g_fullpipe->_scrollSpeed;
+ if (_x <= -g_fp->_scrollSpeed) {
+ offsetX = -g_fp->_scrollSpeed;
+ _x += g_fp->_scrollSpeed;
}
- } else if (_x >= g_fullpipe->_scrollSpeed) {
- offsetX = g_fullpipe->_scrollSpeed;
- _x -= g_fullpipe->_scrollSpeed;
+ } else if (_x >= g_fp->_scrollSpeed) {
+ offsetX = g_fp->_scrollSpeed;
+ _x -= g_fp->_scrollSpeed;
} else {
_x = 0;
}
if (_y > 0) {
- offsetY = g_fullpipe->_scrollSpeed;
- _y -= g_fullpipe->_scrollSpeed;
+ offsetY = g_fp->_scrollSpeed;
+ _y -= g_fp->_scrollSpeed;
}
if (_y < 0) {
- offsetY -= g_fullpipe->_scrollSpeed;
- _y += g_fullpipe->_scrollSpeed;
+ offsetY -= g_fp->_scrollSpeed;
+ _y += g_fp->_scrollSpeed;
}
- g_fullpipe->_sceneRect.translate(offsetX, offsetY);
+ g_fp->_sceneRect.translate(offsetX, offsetY);
}
updateScrolling2();
@@ -527,19 +527,19 @@ void Scene::updateScrolling2() {
int flags = ((PictureObject *)_picObjList[0])->_flags;
- if (g_fullpipe->_sceneRect.left < 0 && !(flags & 2))
- offsetX = -g_fullpipe->_sceneRect.left;
+ if (g_fp->_sceneRect.left < 0 && !(flags & 2))
+ offsetX = -g_fp->_sceneRect.left;
- if (g_fullpipe->_sceneRect.top < 0 && !(flags & 0x20))
- offsetY = -g_fullpipe->_sceneRect.top;
+ if (g_fp->_sceneRect.top < 0 && !(flags & 0x20))
+ offsetY = -g_fp->_sceneRect.top;
- if (g_fullpipe->_sceneRect.right > point.x - 1 && g_fullpipe->_sceneRect.left > 0 && !(flags & 2))
- offsetX = point.x - g_fullpipe->_sceneRect.right - 1;
+ if (g_fp->_sceneRect.right > point.x - 1 && g_fp->_sceneRect.left > 0 && !(flags & 2))
+ offsetX = point.x - g_fp->_sceneRect.right - 1;
- if (g_fullpipe->_sceneRect.bottom > point.y - 1 && g_fullpipe->_sceneRect.top > 0 && !(flags & 0x20))
- offsetY = point.y - g_fullpipe->_sceneRect.bottom - 1;
+ if (g_fp->_sceneRect.bottom > point.y - 1 && g_fp->_sceneRect.top > 0 && !(flags & 0x20))
+ offsetY = point.y - g_fp->_sceneRect.bottom - 1;
- g_fullpipe->_sceneRect.translate(offsetX, offsetY);
+ g_fp->_sceneRect.translate(offsetX, offsetY);
}
}
@@ -602,7 +602,7 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) {
return;
if (_palette) {
- g_fullpipe->_globalPalette = _palette->_data;
+ g_fp->_globalPalette = _palette->_data;
}
debug(8, "Scene::drawContent(>%d, <%d, %d)", minPri, maxPri, drawBg);
@@ -635,7 +635,7 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) {
debug(8, "w2: %d h2:%d", point.x, point.y);
- int bgStX = g_fullpipe->_sceneRect.left % point.x;
+ int bgStX = g_fp->_sceneRect.left % point.x;
if (bgStX < 0)
bgStX += point.x;
@@ -643,7 +643,7 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) {
int bgNumX = bgStX / width;
int bgOffsetX = bgStX % width;
- int bgStY = g_fullpipe->_sceneRect.top % point.y;
+ int bgStY = g_fp->_sceneRect.top % point.y;
if (bgStY < 0)
bgStY += point.y;
@@ -651,12 +651,12 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) {
int bgNumY = bgStY / height;
int bgOffsetY = bgStY % height;
- int bgPosX = g_fullpipe->_sceneRect.left - bgOffsetX;
+ int bgPosX = g_fp->_sceneRect.left - bgOffsetX;
- if (bgPosX < g_fullpipe->_sceneRect.right - 1) {
+ if (bgPosX < g_fp->_sceneRect.right - 1) {
while (1) {
int v25 = bgNumY;
- for (int y = g_fullpipe->_sceneRect.top - bgOffsetY; y < g_fullpipe->_sceneRect.bottom - 1;) {
+ for (int y = g_fp->_sceneRect.top - bgOffsetY; y < g_fp->_sceneRect.bottom - 1;) {
BigPicture *v27 = _bigPictureArray[bgNumX][v25];
v27->draw(bgPosX, y, 0, 0);
y += v27->getDimensions(&point)->y;
@@ -678,7 +678,7 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) {
break;
bgNumX = 0;
}
- if (oldx >= g_fullpipe->_sceneRect.right - 1)
+ if (oldx >= g_fp->_sceneRect.right - 1)
break;
}
}
@@ -703,22 +703,22 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) {
int height = point.y;
if (obj->_flags & 8) {
- while (objX > g_fullpipe->_sceneRect.right) {
+ while (objX > g_fp->_sceneRect.right) {
objX -= width;
obj->setOXY(objX, objY);
}
- for (int j = width + objX; width + objX < g_fullpipe->_sceneRect.left; j = width + objX) {
+ for (int j = width + objX; width + objX < g_fp->_sceneRect.left; j = width + objX) {
objX = j;
obj->setOXY(j, objY);
}
}
if (obj->_flags & 0x10) {
- while (objY > g_fullpipe->_sceneRect.bottom) {
+ while (objY > g_fp->_sceneRect.bottom) {
objY -= height;
obj->setOXY(objX, objY);
}
- for (int j = objY + height; objY + height < g_fullpipe->_sceneRect.top; j = objY + height) {
+ for (int j = objY + height; objY + height < g_fp->_sceneRect.top; j = objY + height) {
objY = j;
obj->setOXY(objX, j);
}
@@ -727,12 +727,12 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) {
obj->draw();
if (obj->_flags & 2) {
- if (objX > g_fullpipe->_sceneRect.left) {
+ if (objX > g_fp->_sceneRect.left) {
obj->setOXY(objX - width, objY);
obj->draw();
obj->setOXY(objX, objY);
}
- if (width + objX < g_fullpipe->_sceneRect.right) {
+ if (width + objX < g_fp->_sceneRect.right) {
obj->setOXY(width + objX, objY);
obj->draw();
obj->setOXY(objX, objY);
@@ -740,12 +740,12 @@ void Scene::drawContent(int minPri, int maxPri, bool drawBg) {
}
if (obj->_flags & 0x20) {
- if (objY > g_fullpipe->_sceneRect.top) {
+ if (objY > g_fp->_sceneRect.top) {
obj->setOXY(objX, objY - height);
obj->draw();
obj->setOXY(objX, objY);
}
- if (height + objY < g_fullpipe->_sceneRect.bottom) {
+ if (height + objY < g_fp->_sceneRect.bottom) {
obj->setOXY(objX, height + objY);
obj->draw();
obj->setOXY(objX, objY);
diff --git a/engines/fullpipe/scenes.cpp b/engines/fullpipe/scenes.cpp
index 50142dd918..b8a88eb484 100644
--- a/engines/fullpipe/scenes.cpp
+++ b/engines/fullpipe/scenes.cpp
@@ -754,9 +754,9 @@ bool FullpipeEngine::sceneSwitcher(EntranceInfo *entrance) {
}
int defaultUpdateCursor() {
- g_fullpipe->updateCursorCommon();
+ g_fp->updateCursorCommon();
- return g_fullpipe->_cursorId;
+ return g_fp->_cursorId;
}
void FullpipeEngine::processArcade(ExCommand *ex) {
diff --git a/engines/fullpipe/scenes/scene01.cpp b/engines/fullpipe/scenes/scene01.cpp
index 4181bbffe3..c6f7ba303c 100644
--- a/engines/fullpipe/scenes/scene01.cpp
+++ b/engines/fullpipe/scenes/scene01.cpp
@@ -36,7 +36,7 @@
namespace Fullpipe {
void scene01_fixEntrance() {
- GameVar *var = g_fullpipe->getGameLoaderGameVar()->getSubVarByName("OBJSTATES")->getSubVarByName("SAVEGAME");
+ GameVar *var = g_fp->getGameLoaderGameVar()->getSubVarByName("OBJSTATES")->getSubVarByName("SAVEGAME");
if (var->getSubVarAsInt("Entrance") == TrubaLeft)
var->setSubVarAsInt("Entrance", TrubaRight);
}
@@ -48,7 +48,7 @@ void scene01_initScene(Scene *sc, int entrance) {
g_vars->scene01_picSc01Osk2 = sc->getPictureObjectById(PIC_SC1_OSK2, 0);
g_vars->scene01_picSc01Osk2->_flags &= 0xFFFB;
- if (g_fullpipe->getObjectState(sO_EggCracker) == g_fullpipe->getObjectEnumState(sO_EggCracker, sO_DidNotCrackEgg)) {
+ if (g_fp->getObjectState(sO_EggCracker) == g_fp->getObjectEnumState(sO_EggCracker, sO_DidNotCrackEgg)) {
PictureObject *pic = sc->getPictureObjectById(PIC_SC1_KUCHKA, 0);
if (pic)
pic->_flags &= 0xFFFB;
@@ -60,7 +60,7 @@ void scene01_initScene(Scene *sc, int entrance) {
bootAnim->_flags &= ~0x04;
}
- g_fullpipe->lift_setButton(sO_Level2, ST_LBN_2N);
+ g_fp->lift_setButton(sO_Level2, ST_LBN_2N);
}
int sceneHandler01(ExCommand *cmd) {
@@ -71,7 +71,7 @@ int sceneHandler01(ExCommand *cmd) {
if (cmd->_messageNum > MSG_SC1_SHOWOSK) {
if (cmd->_messageNum == MSG_SC1_UTRUBACLICK)
- handleObjectInteraction(g_fullpipe->_aniMan, g_fullpipe->_currentScene->getPictureObjectById(PIC_SC1_LADDER, 0), 0);
+ handleObjectInteraction(g_fp->_aniMan, g_fp->_currentScene->getPictureObjectById(PIC_SC1_LADDER, 0), 0);
return 0;
}
@@ -97,19 +97,19 @@ int sceneHandler01(ExCommand *cmd) {
return 0;
}
- if (g_fullpipe->_aniMan2) {
- if (g_fullpipe->_aniMan2->_ox < g_fullpipe->_sceneRect.left + 200) {
- g_fullpipe->_currentScene->_x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.left - 300;
+ if (g_fp->_aniMan2) {
+ if (g_fp->_aniMan2->_ox < g_fp->_sceneRect.left + 200) {
+ g_fp->_currentScene->_x = g_fp->_aniMan2->_ox - g_fp->_sceneRect.left - 300;
}
- if (g_fullpipe->_aniMan2->_ox > g_fullpipe->_sceneRect.right - 200)
- g_fullpipe->_currentScene->_x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.right + 300;
+ if (g_fp->_aniMan2->_ox > g_fp->_sceneRect.right - 200)
+ g_fp->_currentScene->_x = g_fp->_aniMan2->_ox - g_fp->_sceneRect.right + 300;
res = 1;
}
- g_fullpipe->_behaviorManager->updateBehaviors();
+ g_fp->_behaviorManager->updateBehaviors();
- g_fullpipe->startSceneTrack();
+ g_fp->startSceneTrack();
return res;
}
diff --git a/engines/fullpipe/scenes/scene02.cpp b/engines/fullpipe/scenes/scene02.cpp
index 3ca28cb0d1..845a53e1d1 100644
--- a/engines/fullpipe/scenes/scene02.cpp
+++ b/engines/fullpipe/scenes/scene02.cpp
@@ -39,12 +39,12 @@ namespace Fullpipe {
void scene02_initScene(Scene *sc) {
g_vars->scene02_guvTheDrawer = sc->getStaticANIObject1ById(ANI_DADAYASHIK, -1);
- if (g_fullpipe->getObjectState(sO_GuvTheDrawer) == g_fullpipe->getObjectEnumState(sO_GuvTheDrawer, sO_IsSleeping)) {
- Scene *s = g_fullpipe->_currentScene;
+ if (g_fp->getObjectState(sO_GuvTheDrawer) == g_fp->getObjectEnumState(sO_GuvTheDrawer, sO_IsSleeping)) {
+ Scene *s = g_fp->_currentScene;
- g_fullpipe->_currentScene = sc;
+ g_fp->_currentScene = sc;
g_vars->scene02_guvTheDrawer->changeStatics2(ST_DYAS_LIES);
- g_fullpipe->_currentScene = s;
+ g_fp->_currentScene = s;
}
g_vars->scene02_boxDelay = 0;
@@ -55,23 +55,23 @@ void scene02_initScene(Scene *sc) {
g_vars->scene02_boxOpen = false;
} else {
g_vars->scene02_boxOpen = true;
- g_vars->scene02_boxDelay = 100 * g_fullpipe->_rnd->getRandomNumber(32767) + 150;
+ g_vars->scene02_boxDelay = 100 * g_fp->_rnd->getRandomNumber(32767) + 150;
}
- g_fullpipe->_floaters->init(g_fullpipe->_gameLoader->_gameVar->getSubVarByName("SC_2"));
+ g_fp->_floaters->init(g_fp->_gameLoader->_gameVar->getSubVarByName("SC_2"));
}
void sceneHandler02_ladderClick() {
- handleObjectInteraction(g_fullpipe->_aniMan2, g_fullpipe->_currentScene->getPictureObjectById(PIC_SC2_DTRUBA, 0), 0);
+ handleObjectInteraction(g_fp->_aniMan2, g_fp->_currentScene->getPictureObjectById(PIC_SC2_DTRUBA, 0), 0);
}
void sceneHandler02_showLadder() {
- g_fullpipe->_currentScene->getPictureObjectById(PIC_SC2_LADDER, 0)->_flags |= 4;
+ g_fp->_currentScene->getPictureObjectById(PIC_SC2_LADDER, 0)->_flags |= 4;
}
void sceneHandler02_hideLadder() {
- g_fullpipe->_currentScene->getPictureObjectById(PIC_SC2_LADDER, 0)->_flags &= 0xfffb;
- g_fullpipe->_aniMan2->_priority = 25;
+ g_fp->_currentScene->getPictureObjectById(PIC_SC2_LADDER, 0)->_flags &= 0xfffb;
+ g_fp->_aniMan2->_priority = 25;
}
int sceneHandler02(ExCommand *ex) {
@@ -90,7 +90,7 @@ int sceneHandler02(ExCommand *ex) {
return 0;
case MSG_SC2_PUTMANUP:
- g_fullpipe->_aniMan2->_priority = 0;
+ g_fp->_aniMan2->_priority = 0;
return 0;
case MSG_SC2_HIDELADDER:
@@ -98,12 +98,12 @@ int sceneHandler02(ExCommand *ex) {
return 0;
case 33:
- if (g_fullpipe->_aniMan2) {
- if (g_fullpipe->_aniMan2->_ox < g_fullpipe->_sceneRect.left + 200)
- g_fullpipe->_currentScene->_x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.left - 300;
+ if (g_fp->_aniMan2) {
+ if (g_fp->_aniMan2->_ox < g_fp->_sceneRect.left + 200)
+ g_fp->_currentScene->_x = g_fp->_aniMan2->_ox - g_fp->_sceneRect.left - 300;
- if (g_fullpipe->_aniMan2->_ox > g_fullpipe->_sceneRect.right - 200)
- g_fullpipe->_currentScene->_x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.right + 300;
+ if (g_fp->_aniMan2->_ox > g_fp->_sceneRect.right - 200)
+ g_fp->_currentScene->_x = g_fp->_aniMan2->_ox - g_fp->_sceneRect.right + 300;
res = 1;
}
@@ -111,24 +111,24 @@ int sceneHandler02(ExCommand *ex) {
if (g_vars->scene02_boxOpen) {
if (g_vars->scene02_boxDelay >= 1) {
--g_vars->scene02_boxDelay;
- } else if (g_fullpipe->_floaters->_array2.size() >= 1) {
- if (g_fullpipe->_floaters->_array2[0]->val5 == -50) {
- g_fullpipe->_floaters->stopAll();
+ } else if (g_fp->_floaters->_array2.size() >= 1) {
+ if (g_fp->_floaters->_array2[0]->val5 == -50) {
+ g_fp->_floaters->stopAll();
g_vars->scene02_boxOpen = false;
- g_vars->scene02_boxDelay = 100 * g_fullpipe->_rnd->getRandomNumber(32767) + 150;
+ g_vars->scene02_boxDelay = 100 * g_fp->_rnd->getRandomNumber(32767) + 150;
} else {
- g_fullpipe->_floaters->_array2[0]->val3 = -50;
+ g_fp->_floaters->_array2[0]->val3 = -50;
}
} else {
- g_fullpipe->_floaters->genFlies(g_fullpipe->_currentScene, g_fullpipe->_rnd->getRandomNumber(700) + 100, -50, 0, 0);
- g_vars->scene02_boxDelay = 500 * g_fullpipe->_rnd->getRandomNumber(32767) + 1000;
+ g_fp->_floaters->genFlies(g_fp->_currentScene, g_fp->_rnd->getRandomNumber(700) + 100, -50, 0, 0);
+ g_vars->scene02_boxDelay = 500 * g_fp->_rnd->getRandomNumber(32767) + 1000;
}
}
- g_fullpipe->_floaters->update();
- g_fullpipe->_behaviorManager->updateBehaviors();
+ g_fp->_floaters->update();
+ g_fp->_behaviorManager->updateBehaviors();
- g_fullpipe->startSceneTrack();
+ g_fp->startSceneTrack();
}
return res;
diff --git a/engines/fullpipe/scenes/scene03.cpp b/engines/fullpipe/scenes/scene03.cpp
index 1bfd8b8fcc..4d4f05764d 100644
--- a/engines/fullpipe/scenes/scene03.cpp
+++ b/engines/fullpipe/scenes/scene03.cpp
@@ -50,34 +50,34 @@ void scene03_initScene(Scene *sc) {
g_vars->scene03_eggeater = sc->getStaticANIObject1ById(ANI_EGGEATER, -1);
g_vars->scene03_domino = sc->getStaticANIObject1ById(ANI_DOMINO_3, -1);
- GameVar *v = g_fullpipe->_gameLoader->_gameVar->getSubVarByName("OBJSTATES")->getSubVarByName(sO_GulpedEggs);
+ GameVar *v = g_fp->_gameLoader->_gameVar->getSubVarByName("OBJSTATES")->getSubVarByName(sO_GulpedEggs);
g_vars->swallowedEgg1 = v->getSubVarByName(sO_Egg1);
g_vars->swallowedEgg2 = v->getSubVarByName(sO_Egg2);
g_vars->swallowedEgg3 = v->getSubVarByName(sO_Egg3);
- g_fullpipe->lift_setButton(sO_Level2, ST_LBN_2N);
+ g_fp->lift_setButton(sO_Level2, ST_LBN_2N);
- g_fullpipe->lift_sub5(sc, QU_SC3_ENTERLIFT, QU_SC3_EXITLIFT);
+ g_fp->lift_sub5(sc, QU_SC3_ENTERLIFT, QU_SC3_EXITLIFT);
}
void scene03_setEaterState() {
- if (g_fullpipe->getObjectState(sO_EggGulperGaveCoin) == g_fullpipe->getObjectEnumState(sO_EggGulperGaveCoin, sO_Yes)) {
- g_fullpipe->_behaviorManager->setBehaviorEnabled(g_vars->scene03_eggeater, ST_EGTR_SLIM, QU_EGTR_SLIMSHOW, 0);
- g_fullpipe->_behaviorManager->setBehaviorEnabled(g_vars->scene03_eggeater, ST_EGTR_MID1, QU_EGTR_MD1_SHOW, 0);
- g_fullpipe->_behaviorManager->setBehaviorEnabled(g_vars->scene03_eggeater, ST_EGTR_MID2, QU_EGTR_MD2_SHOW, 0);
+ if (g_fp->getObjectState(sO_EggGulperGaveCoin) == g_fp->getObjectEnumState(sO_EggGulperGaveCoin, sO_Yes)) {
+ g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene03_eggeater, ST_EGTR_SLIM, QU_EGTR_SLIMSHOW, 0);
+ g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene03_eggeater, ST_EGTR_MID1, QU_EGTR_MD1_SHOW, 0);
+ g_fp->_behaviorManager->setBehaviorEnabled(g_vars->scene03_eggeater, ST_EGTR_MID2, QU_EGTR_MD2_SHOW, 0);
}
}
int scene03_updateCursor() {
- g_fullpipe->updateCursorCommon();
+ g_fp->updateCursorCommon();
- if (g_fullpipe->_cursorId == PIC_CSR_DEFAULT && g_fullpipe->_objectIdAtCursor == PIC_SC3_DOMIN && g_vars->scene03_domino) {
+ if (g_fp->_cursorId == PIC_CSR_DEFAULT && g_fp->_objectIdAtCursor == PIC_SC3_DOMIN && g_vars->scene03_domino) {
if (g_vars->scene03_domino->_flags & 4)
- g_fullpipe->_cursorId = PIC_CSR_ITN;
+ g_fp->_cursorId = PIC_CSR_ITN;
}
- return g_fullpipe->_cursorId;
+ return g_fp->_cursorId;
}
void sceneHandler03_eaterFat() {
@@ -94,7 +94,7 @@ void sceneHandler03_swallowEgg(int item) {
} else if (!g_vars->swallowedEgg3->_value.intValue) {
g_vars->swallowedEgg3->_value.intValue = item;
- g_fullpipe->setObjectState(sO_EggGulperGaveCoin, g_fullpipe->getObjectEnumState(sO_EggGulperGaveCoin, sO_Yes));
+ g_fp->setObjectState(sO_EggGulperGaveCoin, g_fp->getObjectEnumState(sO_EggGulperGaveCoin, sO_Yes));
scene03_setEaterState();
}
@@ -112,7 +112,7 @@ int sceneHandler03_swallowedEgg1State() {
}
void sceneHandler03_giveCoin(ExCommand *ex) {
- MessageQueue *mq = g_fullpipe->_globalMessageQueueList->getMessageQueueById(ex->_parId);
+ MessageQueue *mq = g_fp->_globalMessageQueueList->getMessageQueueById(ex->_parId);
if (mq && mq->getCount() > 0) {
ExCommand *ex0 = mq->getExCommandByIndex(0);
@@ -136,7 +136,7 @@ void sceneHandler03_giveCoin(ExCommand *ex) {
}
void sceneHandler03_goLadder() {
- handleObjectInteraction(g_fullpipe->_aniMan, g_fullpipe->_currentScene->getPictureObjectById(PIC_SC3_LADDER, 0), 0);
+ handleObjectInteraction(g_fp->_aniMan, g_fp->_currentScene->getPictureObjectById(PIC_SC3_LADDER, 0), 0);
}
void sceneHandler03_pushEggStack() {
@@ -158,7 +158,7 @@ void sceneHandler03_releaseEgg() {
}
void sceneHandler03_takeEgg(ExCommand *ex) {
- MessageQueue *mq = g_fullpipe->_globalMessageQueueList->getMessageQueueById(ex->_parId);
+ MessageQueue *mq = g_fp->_globalMessageQueueList->getMessageQueueById(ex->_parId);
if (mq && mq->getCount() > 0) {
ExCommand *ex0 = mq->getExCommandByIndex(0);
@@ -179,7 +179,7 @@ void sceneHandler03_takeEgg(ExCommand *ex) {
if (ex1->_objtype == kObjTypeObjstateCommand) {
ObjstateCommand *com = (ObjstateCommand *)ex1;
- com->_value = g_fullpipe->getObjectEnumState(sO_EggGulper, sO_WantsNothing);
+ com->_value = g_fp->getObjectEnumState(sO_EggGulper, sO_WantsNothing);
}
}
}
@@ -194,11 +194,11 @@ int sceneHandler03(ExCommand *ex) {
switch (ex->_messageNum) {
case MSG_LIFT_EXITLIFT:
- g_fullpipe->lift_exitSeq(ex);
+ g_fp->lift_exitSeq(ex);
break;
case MSG_LIFT_CLOSEDOOR:
- g_fullpipe->lift_closedoorSeq();
+ g_fp->lift_closedoorSeq();
break;
case MSG_SC3_ONTAKECOIN:
@@ -206,7 +206,7 @@ int sceneHandler03(ExCommand *ex) {
break;
case MSG_LIFT_STARTEXITQUEUE:
- g_fullpipe->lift_startExitQueue();
+ g_fp->lift_startExitQueue();
break;
case MSG_SC3_RELEASEEGG:
@@ -214,7 +214,7 @@ int sceneHandler03(ExCommand *ex) {
break;
case MSG_LIFT_CLICKBUTTON:
- g_fullpipe->lift_animation3();
+ g_fp->lift_animation3();
break;
case MSG_SC3_HIDEDOMINO:
@@ -226,7 +226,7 @@ int sceneHandler03(ExCommand *ex) {
break;
case MSG_LIFT_GO:
- g_fullpipe->lift_goAnimation();
+ g_fp->lift_goAnimation();
break;
case MSG_SC3_UTRUBACLICK:
@@ -238,25 +238,25 @@ int sceneHandler03(ExCommand *ex) {
break;
case 64:
- g_fullpipe->lift_sub05(ex);
+ g_fp->lift_sub05(ex);
break;
case 29:
{
- StaticANIObject *ani = g_fullpipe->_currentScene->getStaticANIObjectAtPos(ex->_sceneClickX, ex->_sceneClickY);
+ StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(ex->_sceneClickX, ex->_sceneClickY);
if (ani && ani->_id == ANI_LIFTBUTTON) {
- g_fullpipe->lift_sub1(ani);
+ g_fp->lift_sub1(ani);
ex->_messageKind = 0;
return 0;
}
- if (g_fullpipe->_currentScene->getPictureObjectIdAtPos(ex->_sceneClickX, ex->_sceneClickY) == PIC_SC3_DOMIN) {
+ if (g_fp->_currentScene->getPictureObjectIdAtPos(ex->_sceneClickX, ex->_sceneClickY) == PIC_SC3_DOMIN) {
if (g_vars->scene03_domino)
if (g_vars->scene03_domino->_flags & 4)
- if (g_fullpipe->_aniMan->isIdle())
- if (!(g_fullpipe->_aniMan->_flags & 0x100) && g_fullpipe->_msgObjectId2 != g_vars->scene03_domino->_id) {
- handleObjectInteraction(g_fullpipe->_aniMan, g_vars->scene03_domino, ex->_keyCode);
+ if (g_fp->_aniMan->isIdle())
+ if (!(g_fp->_aniMan->_flags & 0x100) && g_fp->_msgObjectId2 != g_vars->scene03_domino->_id) {
+ handleObjectInteraction(g_fp->_aniMan, g_vars->scene03_domino, ex->_keyCode);
ex->_messageKind = 0;
return 0;
@@ -270,19 +270,19 @@ int sceneHandler03(ExCommand *ex) {
{
int res = 0;
- if (g_fullpipe->_aniMan2) {
- if (g_fullpipe->_aniMan2->_ox < g_fullpipe->_sceneRect.left + 200)
- g_fullpipe->_currentScene->_x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.left - 300;
+ if (g_fp->_aniMan2) {
+ if (g_fp->_aniMan2->_ox < g_fp->_sceneRect.left + 200)
+ g_fp->_currentScene->_x = g_fp->_aniMan2->_ox - g_fp->_sceneRect.left - 300;
- if (g_fullpipe->_aniMan2->_ox > g_fullpipe->_sceneRect.right - 200)
- g_fullpipe->_currentScene->_x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.right + 300;
+ if (g_fp->_aniMan2->_ox > g_fp->_sceneRect.right - 200)
+ g_fp->_currentScene->_x = g_fp->_aniMan2->_ox - g_fp->_sceneRect.right + 300;
res = 1;
}
- g_fullpipe->_behaviorManager->updateBehaviors();
+ g_fp->_behaviorManager->updateBehaviors();
- g_fullpipe->startSceneTrack();
+ g_fp->startSceneTrack();
return res;
}
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index 6c9e9c69ea..3218324a75 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -52,7 +52,7 @@ void scene04_speakerCallback(int *phase) {
if (scene04_speakerPhases[g_vars->scene04_speakerPhase + 6 * g_vars->scene04_speakerVariant] < 0) {
g_vars->scene04_speakerPhase = 0;
- g_vars->scene04_speakerVariant = g_fullpipe->_rnd->getRandomNumber(2);
+ g_vars->scene04_speakerVariant = g_fp->_rnd->getRandomNumber(2);
}
} else {
++g_vars->scene04_speakerPhase;
@@ -113,7 +113,7 @@ void scene04_initScene(Scene *sc) {
if (plank)
plank->_flags |= 8;
- if (g_fullpipe->getObjectState(sO_Jar_4) == g_fullpipe->getObjectEnumState(sO_Jar_4, sO_UpsideDown)) {
+ if (g_fp->getObjectState(sO_Jar_4) == g_fp->getObjectEnumState(sO_Jar_4, sO_UpsideDown)) {
g_vars->scene04_bottleObjList.clear();
g_vars->scene04_kozyawkiObjList.clear();
@@ -169,7 +169,7 @@ void scene04_initScene(Scene *sc) {
g_vars->scene04_kozyawkiAni.clear();
- g_fullpipe->setObjectState(sO_LowerPipe, g_fullpipe->getObjectEnumState(sO_LowerPipe, sO_IsClosed));
+ g_fp->setObjectState(sO_LowerPipe, g_fp->getObjectEnumState(sO_LowerPipe, sO_IsClosed));
g_vars->scene04_var07 = false;
g_vars->scene04_ladderClickable = false;
@@ -182,7 +182,7 @@ void scene04_initScene(Scene *sc) {
g_vars->scene04_bigBallCounter = 0;
g_vars->scene04_bigBallFromLeft = true;
- if (g_fullpipe->getObjectState(sO_BigMumsy) != g_fullpipe->getObjectEnumState(sO_BigMumsy, sO_IsGone))
+ if (g_fp->getObjectState(sO_BigMumsy) != g_fp->getObjectEnumState(sO_BigMumsy, sO_IsGone))
g_vars->scene04_mamasha->hide();
g_vars->scene04_speaker = sc->getStaticANIObject1ById(ANI_SPEAKER_4, -1);
@@ -192,12 +192,12 @@ void scene04_initScene(Scene *sc) {
g_vars->scene04_speakerVariant = 0;
g_vars->scene04_speakerPhase = 0;
- g_fullpipe->initArcadeKeys("SC_4");
+ g_fp->initArcadeKeys("SC_4");
}
bool sceneHandler04_friesAreWalking() {
- if (g_vars->scene04_dudeOnLadder && g_fullpipe->_aniMan->isIdle() && !(g_fullpipe->_aniMan->_flags & 0x100)) {
- int col = g_vars->scene04_ladder->collisionDetection(g_fullpipe->_aniMan);
+ if (g_vars->scene04_dudeOnLadder && g_fp->_aniMan->isIdle() && !(g_fp->_aniMan->_flags & 0x100)) {
+ int col = g_vars->scene04_ladder->collisionDetection(g_fp->_aniMan);
if (col >= 3 && col <= 6 ) {
Movement *koz;
@@ -214,38 +214,38 @@ bool sceneHandler04_friesAreWalking() {
}
int scene04_updateCursor() {
- g_fullpipe->updateCursorCommon();
+ g_fp->updateCursorCommon();
- if (g_fullpipe->_objectIdAtCursor == PIC_SC4_LRTRUBA) {
+ if (g_fp->_objectIdAtCursor == PIC_SC4_LRTRUBA) {
if (!g_vars->scene04_objectIsTaken) {
- g_fullpipe->_cursorId = PIC_CSR_DEFAULT;
+ g_fp->_cursorId = PIC_CSR_DEFAULT;
- return g_fullpipe->_cursorId;
+ return g_fp->_cursorId;
}
- } else if (g_fullpipe->_objectIdAtCursor == ANI_PLANK || g_fullpipe->_objectIdAtCursor == PIC_SC4_PLANK) {
- if (g_fullpipe->_objectIdAtCursor == ANI_PLANK && g_fullpipe->_cursorId != PIC_CSR_ITN)
- return g_fullpipe->_cursorId;
+ } else if (g_fp->_objectIdAtCursor == ANI_PLANK || g_fp->_objectIdAtCursor == PIC_SC4_PLANK) {
+ if (g_fp->_objectIdAtCursor == ANI_PLANK && g_fp->_cursorId != PIC_CSR_ITN)
+ return g_fp->_cursorId;
- if (g_fullpipe->_objectIdAtCursor == ANI_PLANK || (g_fullpipe->_objectIdAtCursor == PIC_SC4_PLANK && g_fullpipe->_cursorId == PIC_CSR_DEFAULT)) {
+ if (g_fp->_objectIdAtCursor == ANI_PLANK || (g_fp->_objectIdAtCursor == PIC_SC4_PLANK && g_fp->_cursorId == PIC_CSR_DEFAULT)) {
if (sceneHandler04_friesAreWalking()) {
- g_fullpipe->_cursorId = PIC_CSR_ARCADE1;
- return g_fullpipe->_cursorId;
+ g_fp->_cursorId = PIC_CSR_ARCADE1;
+ return g_fp->_cursorId;
}
if (g_vars->scene04_soundPlaying) {
- g_fullpipe->_cursorId = PIC_CSR_DEFAULT;
- return g_fullpipe->_cursorId;
+ g_fp->_cursorId = PIC_CSR_DEFAULT;
+ return g_fp->_cursorId;
}
}
}
- if (g_fullpipe->_objectIdAtCursor == PIC_CSR_ITN && g_fullpipe->_objectIdAtCursor == PIC_SC4_DOWNTRUBA)
- g_fullpipe->_cursorId = PIC_CSR_GOD;
+ if (g_fp->_objectIdAtCursor == PIC_CSR_ITN && g_fp->_objectIdAtCursor == PIC_SC4_DOWNTRUBA)
+ g_fp->_cursorId = PIC_CSR_GOD;
- return g_fullpipe->_cursorId;
+ return g_fp->_cursorId;
}
void sceneHandler04_checkBigBallClick() {
- StaticANIObject *ball = g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_BIGBALL, -1);
+ StaticANIObject *ball = g_fp->_currentScene->getStaticANIObject1ById(ANI_BIGBALL, -1);
if (ball)
for (uint i = 0; i < ball->_movements.size(); i++)
@@ -260,7 +260,7 @@ void sceneHandler04_clickBottle() {
}
void sceneHandler04_clickButton() {
- StaticANIObject *but = g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_BUTTON, -1);
+ StaticANIObject *but = g_fp->_currentScene->getStaticANIObject1ById(ANI_BUTTON, -1);
if (but) {
if (!g_vars->scene04_clock->_movement ||
@@ -275,22 +275,22 @@ void sceneHandler04_clickButton() {
}
void sceneHandler04_downLadder(int x, int y) {
- g_vars->scene04_ladder->method34(g_fullpipe->_aniMan, x + g_vars->scene04_ladder->_ladder_field_20, y + g_vars->scene04_ladder->_ladder_field_24, 0, 0);
+ g_vars->scene04_ladder->method34(g_fp->_aniMan, x + g_vars->scene04_ladder->_ladder_field_20, y + g_vars->scene04_ladder->_ladder_field_24, 0, 0);
}
void sceneHandler04_walkClimbLadder(ExCommand *ex) {
- MessageQueue *mq = new MessageQueue(g_fullpipe->_globalMessageQueueList->compact());
+ MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
ExCommand *ex1 = new ExCommand(ANI_MAN, 1, MV_MAN_TOLADDER, 0, 0, 0, 1, 0, 0, 0);
- ex1->_keyCode = g_fullpipe->_aniMan->_okeyCode;
+ ex1->_keyCode = g_fp->_aniMan->_okeyCode;
ex1->_excFlags |= 2;
mq->addExCommandToEnd(ex1);
ExCommand *ex2 = new ExCommand(ANI_MAN, 1, MV_MAN_STOPLADDER, 0, 0, 0, 1, 0, 0, 0);
- ex2->_keyCode = g_fullpipe->_aniMan->_okeyCode;
+ ex2->_keyCode = g_fp->_aniMan->_okeyCode;
ex2->_excFlags |= 2;
mq->addExCommandToEnd(ex2);
@@ -321,7 +321,7 @@ void sceneHandler04_walkClimbLadder(ExCommand *ex) {
g_vars->scene04_ladder->_ladder_field_20 = 0;
g_vars->scene04_ladder->_ladder_field_24 = -60;
- g_vars->scene04_ladder->addObject(g_fullpipe->_aniMan);
+ g_vars->scene04_ladder->addObject(g_fp->_aniMan);
if (g_vars->scene04_soundPlaying) {
g_vars->scene04_ladder->_movements.front()->movVars->varUpStart = MV_MAN_STARTLADDER2;
@@ -335,18 +335,18 @@ void sceneHandler04_walkClimbLadder(ExCommand *ex) {
g_vars->scene04_ladder->_movements.front()->staticIds[2] = ST_MAN_GOLADDER;
}
- g_fullpipe->_aniMan->_priority = 12;
+ g_fp->_aniMan->_priority = 12;
- getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId)->clearEnabled();
+ getSc2MctlCompoundBySceneId(g_fp->_currentScene->_sceneId)->clearEnabled();
getGameLoaderInteractionController()->disableFlag24();
}
void sceneHandler04_clickLadder() {
- g_vars->scene04_dudePosX = g_fullpipe->_aniMan->_ox;
- g_vars->scene04_dudePosY = g_fullpipe->_aniMan->_oy;
+ g_vars->scene04_dudePosX = g_fp->_aniMan->_ox;
+ g_vars->scene04_dudePosY = g_fp->_aniMan->_oy;
if (g_vars->scene04_dudeOnLadder) {
- if (!g_fullpipe->_aniMan->isIdle() || (g_fullpipe->_aniMan->_flags & 0x100)) {
+ if (!g_fp->_aniMan->isIdle() || (g_fp->_aniMan->_flags & 0x100)) {
g_vars->scene04_ladderClickable = true;
} else {
int h3 = 3 * g_vars->scene04_ladder->_height;
@@ -366,16 +366,16 @@ void sceneHandler04_clickLadder() {
g_vars->scene04_ladderClickable = false;
}
} else {
- if (g_fullpipe->_aniMan->isIdle() && !(g_fullpipe->_aniMan->_flags & 0x100)) {
+ if (g_fp->_aniMan->isIdle() && !(g_fp->_aniMan->_flags & 0x100)) {
if (abs(1095 - g_vars->scene04_dudePosX) > 1 || abs(434 - g_vars->scene04_dudePosY) > 1) {
- MessageQueue *mq = getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId)->method34(g_fullpipe->_aniMan, 1095, 434, 1, ST_MAN_UP);
+ MessageQueue *mq = getSc2MctlCompoundBySceneId(g_fp->_currentScene->_sceneId)->method34(g_fp->_aniMan, 1095, 434, 1, ST_MAN_UP);
if (mq) {
ExCommand *ex = new ExCommand(0, 17, MSG_SC4_CLICKLADDER, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags = 3;
mq->addExCommandToEnd(ex);
- postExCommand(g_fullpipe->_aniMan->_id, 2, 1095, 434, 0, -1);
+ postExCommand(g_fp->_aniMan->_id, 2, 1095, 434, 0, -1);
}
} else {
sceneHandler04_walkClimbLadder(0);
@@ -385,22 +385,22 @@ void sceneHandler04_clickLadder() {
}
void sceneHandler04_jumpOnLadder() {
- if (g_fullpipe->_aniMan->_movement && g_fullpipe->_aniMan->_movement->_id != MV_MAN_LOOKLADDER)
+ if (g_fp->_aniMan->_movement && g_fp->_aniMan->_movement->_id != MV_MAN_LOOKLADDER)
return;
- if (g_fullpipe->_aniMan->_statics->_staticsId != ST_MAN_STANDLADDER && g_fullpipe->_aniMan->_statics->_staticsId != ST_MAN_LADDERDOWN)
+ if (g_fp->_aniMan->_statics->_staticsId != ST_MAN_STANDLADDER && g_fp->_aniMan->_statics->_staticsId != ST_MAN_LADDERDOWN)
return;
- g_fullpipe->_aniMan->changeStatics2(ST_MAN_LADDERDOWN);
+ g_fp->_aniMan->changeStatics2(ST_MAN_LADDERDOWN);
- g_fullpipe->_aniMan->_flags |= 1;
+ g_fp->_aniMan->_flags |= 1;
MGM mgm;
MGMInfo mgminfo;
mgm.addItem(ANI_MAN);
- mgminfo.ani = g_fullpipe->_aniMan;
+ mgminfo.ani = g_fp->_aniMan;
mgminfo.staticsId2 = ST_MAN_ONPLANK;
mgminfo.x1 = 938;
mgminfo.y1 = 442;
@@ -414,20 +414,20 @@ void sceneHandler04_jumpOnLadder() {
if (mq) {
mq->_flags |= 1;
- if (!mq->chain(g_fullpipe->_aniMan))
+ if (!mq->chain(g_fp->_aniMan))
delete mq;
- g_fullpipe->_aniMan->_priority = 10;
+ g_fp->_aniMan->_priority = 10;
}
- g_vars->scene04_ladderOffset = g_vars->scene04_ladder->collisionDetection(g_fullpipe->_aniMan);
+ g_vars->scene04_ladderOffset = g_vars->scene04_ladder->collisionDetection(g_fp->_aniMan);
}
void sceneHandler04_clickPlank() {
if (sceneHandler04_friesAreWalking())
sceneHandler04_jumpOnLadder();
else if (g_vars->scene04_dudeOnLadder)
- g_fullpipe->playSound(SND_4_033, 0);
+ g_fp->playSound(SND_4_033, 0);
else if (!g_vars->scene04_soundPlaying)
chainQueue(QU_PNK_CLICK, 0);
}
@@ -465,7 +465,7 @@ void sceneHandler04_gotoLadder(ExCommand *ex) {
mgm.addItem(ANI_MAN);
- mgminfo.ani = g_fullpipe->_aniMan;
+ mgminfo.ani = g_fp->_aniMan;
mgminfo.staticsId2 = ST_MAN_UP;
mgminfo.x1 = 1095;
mgminfo.y1 = 434;
@@ -491,7 +491,7 @@ void sceneHandler04_gotoLadder(ExCommand *ex) {
ex2->_keyCode = -1;
mq->addExCommandToEnd(ex2);
- ExCommand *ex3 = new ExCommand(g_fullpipe->_aniMan->_id, 34, 256, 0, 0, 0, 1, 0, 0, 0);
+ ExCommand *ex3 = new ExCommand(g_fp->_aniMan->_id, 34, 256, 0, 0, 0, 1, 0, 0, 0);
ex3->_field_14 = 256;
ex3->_messageNum = 0;
ex3->_excFlags |= 3;
@@ -505,9 +505,9 @@ void sceneHandler04_gotoLadder(ExCommand *ex) {
mq->setFlags(mq->getFlags() | 1);
- if (mq->chain(g_fullpipe->_aniMan)) {
- g_fullpipe->_aniMan->_priority = 12;
- g_fullpipe->_aniMan->_flags |= 1;
+ if (mq->chain(g_fp->_aniMan)) {
+ g_fp->_aniMan->_priority = 12;
+ g_fp->_aniMan->_flags |= 1;
} else {
delete mq;
}
@@ -522,7 +522,7 @@ void sceneHandler04_lowerPlank() {
void sceneHandler04_manFromBottle() {
for (Common::List<GameObject *>::iterator it = g_vars->scene04_bottleObjList.begin(); it != g_vars->scene04_bottleObjList.end(); ++it)
- if (*it == g_fullpipe->_aniMan) {
+ if (*it == g_fp->_aniMan) {
g_vars->scene04_bottleObjList.erase(it);
g_vars->scene04_bottleWeight -= 9;
break;
@@ -533,15 +533,15 @@ void sceneHandler04_manFromBottle() {
g_vars->scene04_ladder = 0;
- getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId)->setEnabled();
+ getSc2MctlCompoundBySceneId(g_fp->_currentScene->_sceneId)->setEnabled();
getGameLoaderInteractionController()->enableFlag24();
}
void sceneHandler04_manToBottle() {
- g_vars->scene04_bottleObjList.push_back(g_fullpipe->_aniMan);
+ g_vars->scene04_bottleObjList.push_back(g_fp->_aniMan);
g_vars->scene04_springOffset = 5;
g_vars->scene04_bottleWeight += 9;
- g_fullpipe->_aniMan2 = g_fullpipe->_aniMan;
+ g_fp->_aniMan2 = g_fp->_aniMan;
g_vars->scene04_dudeInBottle = 1;
}
@@ -673,9 +673,9 @@ MessageQueue *sceneHandler04_kozFly6(StaticANIObject *ani) {
mgminfo.ani = ani;
mgminfo.staticsId2 = ST_KZW_SIT;
- mgminfo.x1 = 397 - 4 * g_fullpipe->_rnd->getRandomNumber(1);
+ mgminfo.x1 = 397 - 4 * g_fp->_rnd->getRandomNumber(1);
mgminfo.field_1C = ani->_priority;
- mgminfo.y1 = g_vars->scene04_bottle->_oy - 4 * g_fullpipe->_rnd->getRandomNumber(1) + 109;
+ mgminfo.y1 = g_vars->scene04_bottle->_oy - 4 * g_fp->_rnd->getRandomNumber(1) + 109;
mgminfo.field_10 = 1;
mgminfo.flags = 78;
mgminfo.movementId = MV_KZW_JUMPROTATE;
@@ -863,13 +863,13 @@ void sceneHandler04_shootKozyawka() {
}
if (g_vars->scene04_ladderOffset > 3)
- g_fullpipe->_aniMan->changeStatics1(ST_MAN_LOOKPLANK);
+ g_fp->_aniMan->changeStatics1(ST_MAN_LOOKPLANK);
g_vars->scene04_kozyawkaOnLadder = true;
}
void sceneHandler04_showCoin() {
- StaticANIObject *ani = g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_SC4_COIN, -1);
+ StaticANIObject *ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_SC4_COIN, -1);
if (ani) {
ani->show1(MV_BDG_OPEN, MV_MAN_GOU, MV_SC4_COIN_default, 0);
@@ -885,9 +885,9 @@ void sceneHandler04_stopSound() {
}
void sceneHandler04_animOutOfBottle(ExCommand *ex) {
- g_fullpipe->_aniMan->changeStatics2(ST_MAN_SIT);
+ g_fp->_aniMan->changeStatics2(ST_MAN_SIT);
- MessageQueue *mq = new MessageQueue(g_fullpipe->_currentScene->getMessageQueueById(QU_SC4_MANFROMBOTTLE), 0, 0);
+ MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC4_MANFROMBOTTLE), 0, 0);
if (ex) {
ExCommand *newex = new ExCommand(ex);
@@ -899,7 +899,7 @@ void sceneHandler04_animOutOfBottle(ExCommand *ex) {
mq->chain(0);
g_vars->scene04_dudeInBottle = false;
- g_fullpipe->_behaviorManager->setFlagByStaticAniObject(g_fullpipe->_aniMan, 1);
+ g_fp->_behaviorManager->setFlagByStaticAniObject(g_fp->_aniMan, 1);
}
void sceneHandler04_walkKozyawka() {
@@ -907,7 +907,7 @@ void sceneHandler04_walkKozyawka() {
g_vars->scene04_walkingKozyawka = g_vars->scene04_kozyawkiObjList.front();
g_vars->scene04_kozyawkiObjList.pop_front();
- MessageQueue *mq = new MessageQueue(g_fullpipe->_currentScene->getMessageQueueById(QU_KOZAW_WALK), 0, 1);
+ MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_KOZAW_WALK), 0, 1);
mq->replaceKeyCode(-1, g_vars->scene04_walkingKozyawka->_okeyCode);
mq->chain(0);
}
@@ -970,9 +970,9 @@ void sceneHandler04_springWobble() {
}
void sceneHandler04_leaveScene() {
- g_fullpipe->_aniMan2 = 0;
+ g_fp->_aniMan2 = 0;
- MessageQueue *mq = new MessageQueue(g_fullpipe->_currentScene->getMessageQueueById(QU_SC4_MANTOBOTTLE), 0, 0);
+ MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC4_MANTOBOTTLE), 0, 0);
ExCommand *ex = 0;
for (uint i = 0; i < mq->getCount(); i++) {
@@ -993,9 +993,9 @@ void sceneHandler04_leaveScene() {
g_vars->scene04_var07 = false;
g_vars->scene04_dudeOnLadder = 0;
- g_fullpipe->_behaviorManager->setFlagByStaticAniObject(g_fullpipe->_aniMan, 0);
+ g_fp->_behaviorManager->setFlagByStaticAniObject(g_fp->_aniMan, 0);
- g_fullpipe->updateMapPiece(PIC_MAP_P03, 1);
+ g_fp->updateMapPiece(PIC_MAP_P03, 1);
}
void sceneHandler04_liftBottle() {
@@ -1018,7 +1018,7 @@ void sceneHandler04_liftBottle() {
g_vars->scene04_springOffset = 10;
g_vars->scene04_bottleIsTaken = false;
- g_fullpipe->setObjectState(sO_LowerPipe, g_fullpipe->getObjectEnumState(sO_LowerPipe, sO_IsClosed));
+ g_fp->setObjectState(sO_LowerPipe, g_fp->getObjectEnumState(sO_LowerPipe, sO_IsClosed));
}
}
@@ -1036,7 +1036,7 @@ void sceneHandler04_goClock() {
g_vars->scene04_soundPlaying = true;
g_vars->scene04_coinPut = false;
- g_fullpipe->stopAllSoundStreams();
+ g_fp->stopAllSoundStreams();
sceneHandler04_startSounds("sc4_start.ogg", "sc4_loop.ogg", "sc4_stop2.ogg");
@@ -1044,7 +1044,7 @@ void sceneHandler04_goClock() {
}
void sceneHandler04_bigBallOut() {
- StaticANIObject *ball = g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_BIGBALL, -1);
+ StaticANIObject *ball = g_fp->_currentScene->getStaticANIObject1ById(ANI_BIGBALL, -1);
if (ball && ball->_flags & 4)
for (uint i = 0; i < ball->_movements.size(); i++)
@@ -1054,21 +1054,21 @@ void sceneHandler04_bigBallOut() {
}
void sceneHandler04_leaveLadder(ExCommand *ex) {
- if (!g_fullpipe->_aniMan->isIdle())
+ if (!g_fp->_aniMan->isIdle())
return;
- if (!(g_fullpipe->_aniMan->_flags & 0x100)) {
- if (getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId)->_objtype == kObjTypeMctlCompound) {
- MctlCompound *mc = (MctlCompound *)getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId);
+ if (!(g_fp->_aniMan->_flags & 0x100)) {
+ if (getSc2MctlCompoundBySceneId(g_fp->_currentScene->_sceneId)->_objtype == kObjTypeMctlCompound) {
+ MctlCompound *mc = (MctlCompound *)getSc2MctlCompoundBySceneId(g_fp->_currentScene->_sceneId);
- if (mc->_motionControllers[0]->_movGraphReactObj->pointInRegion(g_fullpipe->_sceneRect.left + ex->_x, g_fullpipe->_sceneRect.top + ex->_y)) {
- if (g_vars->scene04_ladder->collisionDetection(g_fullpipe->_aniMan)) {
- MessageQueue *mq = g_vars->scene04_ladder->controllerWalkTo(g_fullpipe->_aniMan, 0);
+ if (mc->_motionControllers[0]->_movGraphReactObj->pointInRegion(g_fp->_sceneRect.left + ex->_x, g_fp->_sceneRect.top + ex->_y)) {
+ if (g_vars->scene04_ladder->collisionDetection(g_fp->_aniMan)) {
+ MessageQueue *mq = g_vars->scene04_ladder->controllerWalkTo(g_fp->_aniMan, 0);
if (mq) {
mq->addExCommandToEnd(new ExCommand(ex));
- if (mq->chain(g_fullpipe->_aniMan) )
+ if (mq->chain(g_fp->_aniMan) )
ex->_messageKind = 0;
else
delete mq;
@@ -1079,23 +1079,23 @@ void sceneHandler04_leaveLadder(ExCommand *ex) {
}
}
} else {
- MessageQueue *mq = new MessageQueue(g_fullpipe->_globalMessageQueueList->compact());
+ MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
ExCommand *ex1;
- if (g_fullpipe->_aniMan->_statics->_staticsId == ST_MAN_LADDERDOWN) {
+ if (g_fp->_aniMan->_statics->_staticsId == ST_MAN_LADDERDOWN) {
ex1 = new ExCommand(ANI_MAN, 1, MV_MAN_LOOKLADDERRV, 0, 0, 0, 1, 0, 0, 0);
- ex1->_keyCode = g_fullpipe->_aniMan->_okeyCode;
+ ex1->_keyCode = g_fp->_aniMan->_okeyCode;
ex1->_excFlags |= 2;
mq->addExCommandToEnd(ex1);
}
ex1 = new ExCommand(ANI_MAN, 1, MV_MAN_STARTLADDERD, 0, 0, 0, 1, 0, 0, 0);
- ex1->_keyCode = g_fullpipe->_aniMan->_okeyCode;
+ ex1->_keyCode = g_fp->_aniMan->_okeyCode;
ex1->_excFlags |= 2;
mq->addExCommandToEnd(ex1);
ex1 = new ExCommand(ANI_MAN, 1, MV_MAN_FROMLADDER, 0, 0, 0, 1, 0, 0, 0);
- ex1->_keyCode = g_fullpipe->_aniMan->_okeyCode;
+ ex1->_keyCode = g_fp->_aniMan->_okeyCode;
ex1->_excFlags |= 2;
mq->addExCommandToEnd(ex1);
@@ -1104,7 +1104,7 @@ void sceneHandler04_leaveLadder(ExCommand *ex) {
mq->setFlags(mq->getFlags() | 1);
- if (mq->chain(g_fullpipe->_aniMan)) {
+ if (mq->chain(g_fp->_aniMan)) {
if (g_vars->scene04_ladder)
delete g_vars->scene04_ladder;
@@ -1166,13 +1166,13 @@ void sceneHandler04_putKozyawkaBack(StaticANIObject *ani) {
}
void sceneHandler04_bigBallWalkIn() {
- StaticANIObject *ball = g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_BIGBALL, -1);
+ StaticANIObject *ball = g_fp->_currentScene->getStaticANIObject1ById(ANI_BIGBALL, -1);
if (g_vars->scene04_dudeOnLadder
&& (!ball || !(ball->_flags & 4))
- && g_vars->scene04_ladder->collisionDetection(g_fullpipe->_aniMan) > 3) {
+ && g_vars->scene04_ladder->collisionDetection(g_fp->_aniMan) > 3) {
- if (!g_fullpipe->_rnd->getRandomNumber(49)) {
+ if (!g_fp->_rnd->getRandomNumber(49)) {
if (g_vars->scene04_bigBallFromLeft)
chainQueue(QU_BALL_WALKR, 0);
else
@@ -1191,7 +1191,7 @@ void sceneHandler04_takeBottle() {
g_vars->scene04_bottleIsTaken = true;
g_vars->scene04_hand->_priority = 5;
- g_fullpipe->setObjectState(sO_LowerPipe, g_fullpipe->getObjectEnumState(sO_LowerPipe, sO_IsOpened));
+ g_fp->setObjectState(sO_LowerPipe, g_fp->getObjectEnumState(sO_LowerPipe, sO_IsOpened));
}
void sceneHandler04_takeKozyawka() {
@@ -1220,7 +1220,7 @@ void sceneHandler04_takeKozyawka() {
}
void sceneHandler04_testPlank(ExCommand *ex) {
- MessageQueue *mq = g_fullpipe->_globalMessageQueueList->getMessageQueueById(ex->_parId);
+ MessageQueue *mq = g_fp->_globalMessageQueueList->getMessageQueueById(ex->_parId);
if (!mq)
return;
@@ -1250,7 +1250,7 @@ void sceneHandler04_updateBottle() {
}
void sceneHandler04_winArcade() {
- if (g_fullpipe->getObjectState(sO_LowerPipe) == g_fullpipe->getObjectEnumState(sO_LowerPipe, sO_IsClosed)
+ if (g_fp->getObjectState(sO_LowerPipe) == g_fp->getObjectEnumState(sO_LowerPipe, sO_IsClosed)
&& g_vars->scene04_soundPlaying) {
g_vars->scene04_clock->changeStatics2(ST_CLK_CLOSED);
g_vars->scene04_hand->changeStatics2(ST_HND_EMPTY);
@@ -1268,11 +1268,11 @@ void sceneHandler04_winArcade() {
g_vars->scene04_objectIsTaken = false;
g_vars->scene04_soundPlaying = false;
- getSc2MctlCompoundBySceneId(g_fullpipe->_currentScene->_sceneId)->setEnabled();
+ getSc2MctlCompoundBySceneId(g_fp->_currentScene->_sceneId)->setEnabled();
getGameLoaderInteractionController()->enableFlag24();
- g_fullpipe->stopSoundStream2();
+ g_fp->stopSoundStream2();
}
}
@@ -1347,35 +1347,35 @@ int sceneHandler04(ExCommand *ex) {
case 33:
{
- g_vars->scene04_dudePosX = g_fullpipe->_aniMan->_ox;
- g_vars->scene04_dudePosY = g_fullpipe->_aniMan->_oy;
+ g_vars->scene04_dudePosX = g_fp->_aniMan->_ox;
+ g_vars->scene04_dudePosY = g_fp->_aniMan->_oy;
int res = 0;
- if (g_fullpipe->_aniMan2) {
- if (g_fullpipe->_aniMan->_ox < g_fullpipe->_sceneRect.left + 200) {
- g_fullpipe->_currentScene->_x = g_fullpipe->_aniMan->_ox - g_fullpipe->_sceneRect.left - 300;
- g_fullpipe->_aniMan->_ox = g_vars->scene04_dudePosX;
+ if (g_fp->_aniMan2) {
+ if (g_fp->_aniMan->_ox < g_fp->_sceneRect.left + 200) {
+ g_fp->_currentScene->_x = g_fp->_aniMan->_ox - g_fp->_sceneRect.left - 300;
+ g_fp->_aniMan->_ox = g_vars->scene04_dudePosX;
}
- if (g_fullpipe->_aniMan->_ox > g_fullpipe->_sceneRect.right - 200) {
- g_fullpipe->_currentScene->_x = g_fullpipe->_aniMan->_ox - g_fullpipe->_sceneRect.right + 300;
+ if (g_fp->_aniMan->_ox > g_fp->_sceneRect.right - 200) {
+ g_fp->_currentScene->_x = g_fp->_aniMan->_ox - g_fp->_sceneRect.right + 300;
}
res = 1;
if (g_vars->scene04_soundPlaying) {
- if (g_fullpipe->_aniMan->_movement) {
- if (g_fullpipe->_aniMan->_movement->_id == MV_MAN_TOLADDER) {
- g_fullpipe->_aniMan2 = 0;
+ if (g_fp->_aniMan->_movement) {
+ if (g_fp->_aniMan->_movement->_id == MV_MAN_TOLADDER) {
+ g_fp->_aniMan2 = 0;
- if (g_fullpipe->_sceneRect.left > 380)
- g_fullpipe->_currentScene->_x = 380 - g_fullpipe->_sceneRect.left;
+ if (g_fp->_sceneRect.left > 380)
+ g_fp->_currentScene->_x = 380 - g_fp->_sceneRect.left;
}
}
}
} else {
- if (g_fullpipe->_aniMan->_movement && g_fullpipe->_aniMan->_movement->_id == MV_MAN_GOD)
- g_fullpipe->_aniMan2 = g_fullpipe->_aniMan;
+ if (g_fp->_aniMan->_movement && g_fp->_aniMan->_movement->_id == MV_MAN_GOD)
+ g_fp->_aniMan2 = g_fp->_aniMan;
}
sceneHandler04_springWobble();
@@ -1397,9 +1397,9 @@ int sceneHandler04(ExCommand *ex) {
if (g_vars->scene04_dudeOnLadder) {
if (!g_vars->scene04_soundPlaying) {
- g_fullpipe->startSceneTrack();
+ g_fp->startSceneTrack();
- g_fullpipe->_behaviorManager->updateBehaviors();
+ g_fp->_behaviorManager->updateBehaviors();
return res;
}
@@ -1410,21 +1410,21 @@ int sceneHandler04(ExCommand *ex) {
}
if (g_vars->scene04_soundPlaying) {
- g_fullpipe->_behaviorManager->updateBehaviors();
+ g_fp->_behaviorManager->updateBehaviors();
return res;
}
- g_fullpipe->startSceneTrack();
+ g_fp->startSceneTrack();
- g_fullpipe->_behaviorManager->updateBehaviors();
+ g_fp->_behaviorManager->updateBehaviors();
return res;
}
case 29:
{
- int picid = g_fullpipe->_currentScene->getPictureObjectIdAtPos(ex->_sceneClickX, ex->_sceneClickY);
+ int picid = g_fp->_currentScene->getPictureObjectIdAtPos(ex->_sceneClickX, ex->_sceneClickY);
if (g_vars->scene04_dudeInBottle) {
sceneHandler04_animOutOfBottle(ex);
@@ -1449,7 +1449,7 @@ int sceneHandler04(ExCommand *ex) {
break;
}
- StaticANIObject *ani = g_fullpipe->_currentScene->getStaticANIObjectAtPos(ex->_sceneClickX, ex->_sceneClickY);
+ StaticANIObject *ani = g_fp->_currentScene->getStaticANIObjectAtPos(ex->_sceneClickX, ex->_sceneClickY);
if ((ani && ani->_id == ANI_PLANK) || picid == PIC_SC4_PLANK) {
sceneHandler04_clickPlank();
@@ -1457,13 +1457,13 @@ int sceneHandler04(ExCommand *ex) {
ex->_messageKind = 0;
} else if (g_vars->scene04_dudeOnLadder) {
sceneHandler04_leaveLadder(ex);
- } else if (!ani || !canInteractAny(g_fullpipe->_aniMan, ani, ex->_keyCode)) {
- PictureObject *pic = g_fullpipe->_currentScene->getPictureObjectById(picid, 0);
+ } else if (!ani || !canInteractAny(g_fp->_aniMan, ani, ex->_keyCode)) {
+ PictureObject *pic = g_fp->_currentScene->getPictureObjectById(picid, 0);
- if (!pic || !canInteractAny(g_fullpipe->_aniMan, pic,ex->_keyCode)) {
- if ((g_fullpipe->_sceneRect.right - ex->_sceneClickX < 47 && g_fullpipe->_sceneRect.right < g_fullpipe->_sceneWidth - 1)
- || (ex->_sceneClickX - g_fullpipe->_sceneRect.left < 47 && g_fullpipe->_sceneRect.left > 0))
- g_fullpipe->processArcade(ex);
+ if (!pic || !canInteractAny(g_fp->_aniMan, pic,ex->_keyCode)) {
+ if ((g_fp->_sceneRect.right - ex->_sceneClickX < 47 && g_fp->_sceneRect.right < g_fp->_sceneWidth - 1)
+ || (ex->_sceneClickX - g_fp->_sceneRect.left < 47 && g_fp->_sceneRect.left > 0))
+ g_fp->processArcade(ex);
}
}
}
diff --git a/engines/fullpipe/scenes/scene05.cpp b/engines/fullpipe/scenes/scene05.cpp
index faf53fcae4..20443edb5f 100644
--- a/engines/fullpipe/scenes/scene05.cpp
+++ b/engines/fullpipe/scenes/scene05.cpp
@@ -44,17 +44,17 @@ void scene05_initScene(Scene *sc) {
g_vars->scene05_handleFlipper = 1;
g_vars->scene05_floatersTicker = 1000;
- Scene *oldscene = g_fullpipe->_currentScene;
+ Scene *oldscene = g_fp->_currentScene;
- g_fullpipe->_currentScene = sc;
+ g_fp->_currentScene = sc;
- if (g_fullpipe->getObjectState(sO_WeirdWacko) == g_fullpipe->getObjectEnumState(sO_WeirdWacko, sO_InGlasses)) {
+ if (g_fp->getObjectState(sO_WeirdWacko) == g_fp->getObjectEnumState(sO_WeirdWacko, sO_InGlasses)) {
g_vars->scene05_wacko->changeStatics2(ST_OTM_GLS_LEFT);
g_vars->scene05_bigHatch->changeStatics2(ST_BLK_CLOSED);
g_vars->scene05_handle->changeStatics2(ST_HDL_UP);
g_vars->scene05_handle->_flags |= 4;
- } else if (g_fullpipe->getObjectState(sO_WeirdWacko) == g_fullpipe->getObjectEnumState(sO_WeirdWacko, sO_WithDrawer)) {
+ } else if (g_fp->getObjectState(sO_WeirdWacko) == g_fp->getObjectEnumState(sO_WeirdWacko, sO_WithDrawer)) {
g_vars->scene05_wacko->changeStatics2(ST_OTM_BOX_LEFT);
g_vars->scene05_bigHatch->changeStatics2(ST_BLK_CLOSED);
g_vars->scene05_handle->changeStatics2(ST_HDL_UP);
@@ -62,13 +62,13 @@ void scene05_initScene(Scene *sc) {
} else {
g_vars->scene05_wacko->changeStatics2(ST_OTM_VNT_LEFT);
- if (g_fullpipe->getObjectState(sO_WeirdWacko) != g_fullpipe->getObjectEnumState(sO_WeirdWacko, sO_WithPlunger)) {
+ if (g_fp->getObjectState(sO_WeirdWacko) != g_fp->getObjectEnumState(sO_WeirdWacko, sO_WithPlunger)) {
g_vars->scene05_handle->changeStatics2(ST_HDL_BROKEN);
g_vars->scene05_bigHatch->changeStatics2(ST_BLK_CLOSED);
}
}
- g_fullpipe->_currentScene = oldscene;
+ g_fp->_currentScene = oldscene;
}
void sceneHandler05_makeManFlight() {
@@ -79,7 +79,7 @@ void sceneHandler05_makeManFlight() {
else
qid = QU_SC5_MANFLY;
- MessageQueue *mq = new MessageQueue(g_fullpipe->_currentScene->getMessageQueueById(qid), 0, 0);
+ MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(qid), 0, 0);
mq->setFlags(mq->getFlags() | 1);
@@ -90,10 +90,10 @@ void sceneHandler05_makeWackoFeedback() {
int staticsId1;
int staticsId2;
- if (g_fullpipe->getObjectState(sO_WeirdWacko) == g_fullpipe->getObjectEnumState(sO_WeirdWacko, sO_InGlasses)) {
+ if (g_fp->getObjectState(sO_WeirdWacko) == g_fp->getObjectEnumState(sO_WeirdWacko, sO_InGlasses)) {
staticsId1 = ST_OTM_GLS_LEFT;
staticsId2 = (g_vars->scene05_handle->_statics->_staticsId == ST_HDL_DOWN) ? MV_OTM_HANDLEUP : MV_OTM_HANDLEDOWN;
- } else if (g_fullpipe->getObjectState(sO_WeirdWacko) != g_fullpipe->getObjectEnumState(sO_WeirdWacko, sO_WithDrawer)) {
+ } else if (g_fp->getObjectState(sO_WeirdWacko) != g_fp->getObjectEnumState(sO_WeirdWacko, sO_WithDrawer)) {
return;
} else {
staticsId1 = ST_OTM_BOX_LEFT;
@@ -122,9 +122,9 @@ void sceneHandler05_makeWackoFeedback() {
}
void sceneHandler05_resetTicks() {
- if (g_fullpipe->_aniMan->_movement && (g_fullpipe->_aniMan->_movement->_id == MV_MANHDL_HANDLEUP
- || g_fullpipe->_aniMan->_movement->_id == MV_MANHDL_HANDLEDOWN))
- g_vars->scene05_wackoTicker = g_fullpipe->_updateTicks;
+ if (g_fp->_aniMan->_movement && (g_fp->_aniMan->_movement->_id == MV_MANHDL_HANDLEUP
+ || g_fp->_aniMan->_movement->_id == MV_MANHDL_HANDLEDOWN))
+ g_vars->scene05_wackoTicker = g_fp->_updateTicks;
else
g_vars->scene05_wackoTicker = 0;
}
@@ -133,17 +133,17 @@ void sceneHandler05_genFlies() {
if (g_vars->scene05_floatersTicker <= 1000)
return;
- if (g_fullpipe->_rnd->getRandomNumber(1)) {
- int numFlies = g_fullpipe->_rnd->getRandomNumber(3) + 1;
+ if (g_fp->_rnd->getRandomNumber(1)) {
+ int numFlies = g_fp->_rnd->getRandomNumber(3) + 1;
for (int i = 0; i < numFlies; i++) {
- int x = g_fullpipe->_rnd->getRandomNumber(55) + 538;
- int y = g_fullpipe->_rnd->getRandomNumber(60) + i * 30 + 520;
+ int x = g_fp->_rnd->getRandomNumber(55) + 538;
+ int y = g_fp->_rnd->getRandomNumber(60) + i * 30 + 520;
- g_fullpipe->_floaters->genFlies(g_fullpipe->_currentScene, x, y, 5, 1);
- g_fullpipe->_floaters->_array2.back()->val2 = 585;
- g_fullpipe->_floaters->_array2.back()->val3 = -70;
- g_fullpipe->_floaters->_array2.back()->val11 = 8.0;
+ g_fp->_floaters->genFlies(g_fp->_currentScene, x, y, 5, 1);
+ g_fp->_floaters->_array2.back()->val2 = 585;
+ g_fp->_floaters->_array2.back()->val3 = -70;
+ g_fp->_floaters->_array2.back()->val11 = 8.0;
}
}
@@ -151,11 +151,11 @@ void sceneHandler05_genFlies() {
}
void sceneHandler05_showHandle() {
- g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_HANDLE, -1)->show1(-1, -1, -1, 0);
+ g_fp->_currentScene->getStaticANIObject1ById(ANI_HANDLE, -1)->show1(-1, -1, -1, 0);
}
void sceneHandler05_handleDown() {
- StaticANIObject *hatch = g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_BIGLUK, -1);
+ StaticANIObject *hatch = g_fp->_currentScene->getStaticANIObject1ById(ANI_BIGLUK, -1);
hatch->changeStatics2(ST_BLK_CLOSED);
hatch->startAnim(MV_BLK_OPEN, 0, -1);
@@ -165,11 +165,11 @@ void sceneHandler05_handleDown() {
}
void sceneHandler05_hideHandle() {
- g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_HANDLE, -1)->hide();
+ g_fp->_currentScene->getStaticANIObject1ById(ANI_HANDLE, -1)->hide();
}
void sceneHandler05_handleUp() {
- StaticANIObject *hatch = g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_BIGLUK, -1);
+ StaticANIObject *hatch = g_fp->_currentScene->getStaticANIObject1ById(ANI_BIGLUK, -1);
hatch->changeStatics2(ST_BLK_OPEN);
hatch->startAnim(MV_BLK_CLOSE, 0, -1);
@@ -180,7 +180,7 @@ void sceneHandler05_handleUp() {
void sceneHandler05_testHatch(ExCommand *inex) {
ExCommand *ex;
- if (g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_BIGLUK, -1)->_statics->_staticsId == ST_BLK_CLOSED) {
+ if (g_fp->_currentScene->getStaticANIObject1ById(ANI_BIGLUK, -1)->_statics->_staticsId == ST_BLK_CLOSED) {
ex = new ExCommand(SC_5, 17, 61, 0, 0, 0, 1, 0, 0, 0);
ex->_keyCode = TrubaLeft;
ex->_excFlags |= 2;
@@ -189,13 +189,13 @@ void sceneHandler05_testHatch(ExCommand *inex) {
return;
}
- StaticANIObject *wacko = g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_OTMOROZ, -1);
+ StaticANIObject *wacko = g_fp->_currentScene->getStaticANIObject1ById(ANI_OTMOROZ, -1);
if (wacko->_movement)
wacko->changeStatics2(wacko->_movement->_staticsObj2->_staticsId);
- if (g_fullpipe->getObjectState(sO_WeirdWacko) == g_fullpipe->getObjectEnumState(sO_WeirdWacko, sO_InGlasses)) {
- MessageQueue *mq = g_fullpipe->_globalMessageQueueList->getMessageQueueById(inex->_parId);
+ if (g_fp->getObjectState(sO_WeirdWacko) == g_fp->getObjectEnumState(sO_WeirdWacko, sO_InGlasses)) {
+ MessageQueue *mq = g_fp->_globalMessageQueueList->getMessageQueueById(inex->_parId);
if (mq)
mq->deleteExCommandByIndex(mq->getCount() - 1, 1);
@@ -205,7 +205,7 @@ void sceneHandler05_testHatch(ExCommand *inex) {
if (!mq) {
wacko->changeStatics2(ST_OTM_GLS_LEFT);
- mq = new MessageQueue(g_fullpipe->_globalMessageQueueList->compact());
+ mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
}
mq->setFlags(mq->getFlags() | 1);
@@ -223,7 +223,7 @@ void sceneHandler05_testHatch(ExCommand *inex) {
return;
}
- mq = new MessageQueue(g_fullpipe->_globalMessageQueueList->compact());
+ mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
mq->setFlags(mq->getFlags() | 1);
ex = new ExCommand(ANI_OTMOROZ, 1, MV_OTM_HANDLEUP, 0, 0, 0, 1, 0, 0, 0);
@@ -237,8 +237,8 @@ void sceneHandler05_testHatch(ExCommand *inex) {
if (!mq->chain(wacko))
delete mq;
- } else if (g_fullpipe->getObjectState(sO_WeirdWacko) == g_fullpipe->getObjectEnumState(sO_WeirdWacko, sO_WithDrawer)) {
- MessageQueue *mq = g_fullpipe->_globalMessageQueueList->getMessageQueueById(inex->_parId);
+ } else if (g_fp->getObjectState(sO_WeirdWacko) == g_fp->getObjectEnumState(sO_WeirdWacko, sO_WithDrawer)) {
+ MessageQueue *mq = g_fp->_globalMessageQueueList->getMessageQueueById(inex->_parId);
if (mq)
mq->deleteExCommandByIndex(mq->getCount() - 1, 1);
@@ -247,7 +247,7 @@ void sceneHandler05_testHatch(ExCommand *inex) {
mq = wacko->changeStatics1(ST_OTM_BOX_LEFT);
if (!mq) {
wacko->changeStatics2(ST_OTM_BOX_LEFT);
- mq = new MessageQueue(g_fullpipe->_globalMessageQueueList->compact());
+ mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
}
mq->setFlags(mq->getFlags() | 1);
@@ -266,7 +266,7 @@ void sceneHandler05_testHatch(ExCommand *inex) {
return;
}
- mq = new MessageQueue(g_fullpipe->_globalMessageQueueList->compact());
+ mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
mq->setFlags(mq->getFlags() | 1);
ex = new ExCommand(ANI_OTMOROZ, 1, MV_OTM_BOXHANDLEUP, 0, 0, 0, 1, 0, 0, 0);
@@ -299,11 +299,11 @@ int sceneHandler05(ExCommand *ex) {
switch (ex->_messageNum) {
case MSG_SC5_BGRSOUNDOFF:
- g_fullpipe->stopAllSoundInstances(SND_5_026);
+ g_fp->stopAllSoundInstances(SND_5_026);
break;
case MSG_SC5_BGRSOUNDON:
- g_fullpipe->playSound(SND_5_026, 1);
+ g_fp->playSound(SND_5_026, 1);
break;
case MSG_SC5_MAKEMANFLIGHT:
@@ -311,8 +311,8 @@ int sceneHandler05(ExCommand *ex) {
break;
case MSG_SC5_MAKEOTMFEEDBACK:
- if (!g_fullpipe->_aniMan->_movement || (g_fullpipe->_aniMan->_movement->_id != MV_MANHDL_HANDLEUP
- && g_fullpipe->_aniMan->_movement->_id != MV_MANHDL_HANDLEDOWN)) {
+ if (!g_fp->_aniMan->_movement || (g_fp->_aniMan->_movement->_id != MV_MANHDL_HANDLEUP
+ && g_fp->_aniMan->_movement->_id != MV_MANHDL_HANDLEDOWN)) {
sceneHandler05_makeWackoFeedback();
g_vars->scene05_wackoTicker = 0;
}
@@ -343,20 +343,20 @@ int sceneHandler05(ExCommand *ex) {
case 33:
{
int res = 0;
- if (g_fullpipe->_aniMan2) {
- if (g_fullpipe->_aniMan2->_ox < g_fullpipe->_sceneRect.left + 200)
- g_fullpipe->_currentScene->_x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.left - 300;
+ if (g_fp->_aniMan2) {
+ if (g_fp->_aniMan2->_ox < g_fp->_sceneRect.left + 200)
+ g_fp->_currentScene->_x = g_fp->_aniMan2->_ox - g_fp->_sceneRect.left - 300;
- if (g_fullpipe->_aniMan2->_ox > g_fullpipe->_sceneRect.right - 200)
- g_fullpipe->_currentScene->_x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.right + 300;
+ if (g_fp->_aniMan2->_ox > g_fp->_sceneRect.right - 200)
+ g_fp->_currentScene->_x = g_fp->_aniMan2->_ox - g_fp->_sceneRect.right + 300;
res = 1;
}
if (g_vars->scene05_wackoTicker) {
- if ((g_fullpipe->_updateTicks - g_vars->scene05_wackoTicker) > 62) {
- if (!g_fullpipe->_aniMan->_movement || (g_fullpipe->_aniMan->_movement->_id != MV_MANHDL_HANDLEUP
- && g_fullpipe->_aniMan->_movement->_id != MV_MANHDL_HANDLEDOWN)) {
+ if ((g_fp->_updateTicks - g_vars->scene05_wackoTicker) > 62) {
+ if (!g_fp->_aniMan->_movement || (g_fp->_aniMan->_movement->_id != MV_MANHDL_HANDLEUP
+ && g_fp->_aniMan->_movement->_id != MV_MANHDL_HANDLEDOWN)) {
if (g_vars->scene05_handleFlipper % 2)
sceneHandler05_makeWackoFeedback();
@@ -369,11 +369,11 @@ int sceneHandler05(ExCommand *ex) {
++g_vars->scene05_floatersTicker;
- g_fullpipe->_floaters->update();
+ g_fp->_floaters->update();
- g_fullpipe->_behaviorManager->updateBehaviors();
+ g_fp->_behaviorManager->updateBehaviors();
- g_fullpipe->startSceneTrack();
+ g_fp->startSceneTrack();
return res;
}
diff --git a/engines/fullpipe/scenes/scene06.cpp b/engines/fullpipe/scenes/scene06.cpp
index 5bbd280fdd..2b7678b10a 100644
--- a/engines/fullpipe/scenes/scene06.cpp
+++ b/engines/fullpipe/scenes/scene06.cpp
@@ -38,53 +38,53 @@
namespace Fullpipe {
void scene06_initMumsy() {
- g_vars->scene06_mumsyJumpFw = g_fullpipe->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(g_vars->scene06_mumsy, ST_MOM_STANDS, QU_MOM_JUMPFW);
- g_vars->scene06_mumsyJumpBk = g_fullpipe->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(g_vars->scene06_mumsy, ST_MOM_STANDS, QU_MOM_JUMPBK);
+ g_vars->scene06_mumsyJumpFw = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(g_vars->scene06_mumsy, ST_MOM_STANDS, QU_MOM_JUMPFW);
+ g_vars->scene06_mumsyJumpBk = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(g_vars->scene06_mumsy, ST_MOM_STANDS, QU_MOM_JUMPBK);
g_vars->scene06_mumsyJumpFwPercent = g_vars->scene06_mumsyJumpFw->_percent;
g_vars->scene06_mumsyJumpBkPercent = g_vars->scene06_mumsyJumpBk->_percent;
}
int scene06_updateCursor() {
- g_fullpipe->updateCursorCommon();
+ g_fp->updateCursorCommon();
if (g_vars->scene06_arcadeEnabled) {
if (g_vars->scene06_aimingBall) {
- g_fullpipe->_cursorId = PIC_CSR_ARCADE2_D;
+ g_fp->_cursorId = PIC_CSR_ARCADE2_D;
return PIC_CSR_ARCADE2_D;
}
- if (g_fullpipe->_aniMan == (StaticANIObject *)g_fullpipe->_objectAtCursor) {
- if (g_fullpipe->_aniMan->_statics->_staticsId == ST_MAN6_BALL && g_fullpipe->_cursorId == PIC_CSR_DEFAULT) {
- g_fullpipe->_cursorId = PIC_CSR_ITN;
+ if (g_fp->_aniMan == (StaticANIObject *)g_fp->_objectAtCursor) {
+ if (g_fp->_aniMan->_statics->_staticsId == ST_MAN6_BALL && g_fp->_cursorId == PIC_CSR_DEFAULT) {
+ g_fp->_cursorId = PIC_CSR_ITN;
return PIC_CSR_ITN;
}
- } else if (g_fullpipe->_objectAtCursor && (StaticANIObject *)g_fullpipe->_objectAtCursor == g_vars->scene06_currentBall
- && g_fullpipe->_cursorId == PIC_CSR_DEFAULT) {
- g_fullpipe->_cursorId = PIC_CSR_ITN;
+ } else if (g_fp->_objectAtCursor && (StaticANIObject *)g_fp->_objectAtCursor == g_vars->scene06_currentBall
+ && g_fp->_cursorId == PIC_CSR_DEFAULT) {
+ g_fp->_cursorId = PIC_CSR_ITN;
}
}
- return g_fullpipe->_cursorId;
+ return g_fp->_cursorId;
}
void sceneHandler06_setExits(Scene *sc) {
MotionController *mc = getSc2MctlCompoundBySceneId(sc->_sceneId);
- mc->enableLinks(sO_CloseThing, (g_fullpipe->getObjectState(sO_BigMumsy) != g_fullpipe->getObjectEnumState(sO_BigMumsy, sO_IsGone)));
+ mc->enableLinks(sO_CloseThing, (g_fp->getObjectState(sO_BigMumsy) != g_fp->getObjectEnumState(sO_BigMumsy, sO_IsGone)));
mc->enableLinks(sO_CloseThing2, g_vars->scene06_arcadeEnabled);
}
void sceneHandler06_winArcade() {
- g_fullpipe->setObjectState(sO_BigMumsy, g_fullpipe->getObjectEnumState(sO_BigMumsy, sO_IsGone));
+ g_fp->setObjectState(sO_BigMumsy, g_fp->getObjectEnumState(sO_BigMumsy, sO_IsGone));
- if (g_fullpipe->getObjectState(sO_ClockAxis) == g_fullpipe->getObjectEnumState(sO_ClockAxis, sO_IsNotAvailable))
- g_fullpipe->setObjectState(sO_ClockAxis, g_fullpipe->getObjectEnumState(sO_ClockAxis, sO_WithoutHandle));
+ if (g_fp->getObjectState(sO_ClockAxis) == g_fp->getObjectEnumState(sO_ClockAxis, sO_IsNotAvailable))
+ g_fp->setObjectState(sO_ClockAxis, g_fp->getObjectEnumState(sO_ClockAxis, sO_WithoutHandle));
if (g_vars->scene06_arcadeEnabled) {
- g_fullpipe->_aniMan->_callback2 = 0;
+ g_fp->_aniMan->_callback2 = 0;
- g_fullpipe->_aniMan->changeStatics2(ST_MAN_RIGHT | 0x4000);
+ g_fp->_aniMan->changeStatics2(ST_MAN_RIGHT | 0x4000);
if (g_vars->scene06_someBall) {
g_vars->scene06_someBall->_flags &= 0xFFFB;
@@ -116,7 +116,7 @@ void sceneHandler06_winArcade() {
g_vars->scene06_mumsy->_flags &= 0xFFFB;
- sceneHandler06_setExits(g_fullpipe->_currentScene);
+ sceneHandler06_setExits(g_fp->_currentScene);
getCurrSceneSc2MotionController()->setEnabled();
getGameLoaderInteractionController()->enableFlag24();
@@ -126,7 +126,7 @@ void sceneHandler06_enableDrops() {
chainQueue(QU_SC6_DROPS, 0);
g_vars->scene06_mumsy->changeStatics2(ST_MOM_SITS);
- g_fullpipe->setObjectState(sO_BigMumsy, g_fullpipe->getObjectEnumState(sO_BigMumsy, sO_IsPlaying));
+ g_fp->setObjectState(sO_BigMumsy, g_fp->getObjectEnumState(sO_BigMumsy, sO_IsPlaying));
chainQueue(QU_MOM_STANDUP, 1);
@@ -136,7 +136,7 @@ void sceneHandler06_enableDrops() {
g_vars->scene06_mumsyNumBalls = 0;
g_vars->scene06_mumsyGotBall = false;
- sceneHandler06_setExits(g_fullpipe->_currentScene);
+ sceneHandler06_setExits(g_fp->_currentScene);
}
void sceneHandler06_mumsyBallTake() {
@@ -160,7 +160,7 @@ void sceneHandler06_mumsyBallTake() {
break;
}
- MessageQueue *mq = new MessageQueue(g_fullpipe->_globalMessageQueueList->compact());
+ MessageQueue *mq = new MessageQueue(g_fp->_globalMessageQueueList->compact());
ExCommand *ex = new ExCommand(ANI_MAMASHA, 2, 50, 0, 0, 0, 1, 0, 0, 0);
@@ -168,10 +168,10 @@ void sceneHandler06_mumsyBallTake() {
mq->addExCommandToEnd(ex);
if (g_vars->scene06_mumsyNumBalls >= 5) {
- g_fullpipe->setObjectState(sO_BigMumsy, g_fullpipe->getObjectEnumState(sO_BigMumsy, sO_IsGone));
+ g_fp->setObjectState(sO_BigMumsy, g_fp->getObjectEnumState(sO_BigMumsy, sO_IsGone));
- if (g_fullpipe->getObjectState(sO_ClockAxis) == g_fullpipe->getObjectEnumState(sO_ClockAxis, sO_IsNotAvailable))
- g_fullpipe->setObjectState(sO_ClockAxis, g_fullpipe->getObjectEnumState(sO_ClockAxis, sO_WithoutHandle));
+ if (g_fp->getObjectState(sO_ClockAxis) == g_fp->getObjectEnumState(sO_ClockAxis, sO_IsNotAvailable))
+ g_fp->setObjectState(sO_ClockAxis, g_fp->getObjectEnumState(sO_ClockAxis, sO_WithoutHandle));
ex = new ExCommand(ANI_MAMASHA, 1, momAni, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags |= 2;
@@ -228,29 +228,29 @@ void sceneHandler06_mumsyBallTake() {
g_vars->scene06_mumsyNumBalls = 0;
g_vars->scene06_arcadeEnabled = false;
- g_fullpipe->_aniMan2 = 0;
+ g_fp->_aniMan2 = 0;
}
void sceneHandler06_spinHandle() {
- int tummy = g_fullpipe->getObjectState(sO_TummyTrampie);
-
- if (tummy == g_fullpipe->getObjectEnumState(sO_TummyTrampie, sO_IsEating))
- g_fullpipe->setObjectState(sO_TummyTrampie, g_fullpipe->getObjectEnumState(sO_TummyTrampie, sO_IsSleeping));
- else if (tummy == g_fullpipe->getObjectEnumState(sO_TummyTrampie, sO_IsSleeping))
- g_fullpipe->setObjectState(sO_TummyTrampie, g_fullpipe->getObjectEnumState(sO_TummyTrampie, sO_IsDrinking));
- else if (tummy == g_fullpipe->getObjectEnumState(sO_TummyTrampie, sO_IsDrinking))
- g_fullpipe->setObjectState(sO_TummyTrampie, g_fullpipe->getObjectEnumState(sO_TummyTrampie, sO_IsScratchingBelly));
- else if (tummy == g_fullpipe->getObjectEnumState(sO_TummyTrampie, sO_IsScratchingBelly))
- g_fullpipe->setObjectState(sO_TummyTrampie, g_fullpipe->getObjectEnumState(sO_TummyTrampie, sO_IsEating));
+ int tummy = g_fp->getObjectState(sO_TummyTrampie);
+
+ if (tummy == g_fp->getObjectEnumState(sO_TummyTrampie, sO_IsEating))
+ g_fp->setObjectState(sO_TummyTrampie, g_fp->getObjectEnumState(sO_TummyTrampie, sO_IsSleeping));
+ else if (tummy == g_fp->getObjectEnumState(sO_TummyTrampie, sO_IsSleeping))
+ g_fp->setObjectState(sO_TummyTrampie, g_fp->getObjectEnumState(sO_TummyTrampie, sO_IsDrinking));
+ else if (tummy == g_fp->getObjectEnumState(sO_TummyTrampie, sO_IsDrinking))
+ g_fp->setObjectState(sO_TummyTrampie, g_fp->getObjectEnumState(sO_TummyTrampie, sO_IsScratchingBelly));
+ else if (tummy == g_fp->getObjectEnumState(sO_TummyTrampie, sO_IsScratchingBelly))
+ g_fp->setObjectState(sO_TummyTrampie, g_fp->getObjectEnumState(sO_TummyTrampie, sO_IsEating));
}
void sceneHandler06_uPipeClick() {
if (getGameLoaderInteractionController()->_flag24)
- handleObjectInteraction(g_fullpipe->_aniMan2, g_fullpipe->_currentScene->getPictureObjectById(PIC_SC6_LADDER, 0), 0);
+ handleObjectInteraction(g_fp->_aniMan2, g_fp->_currentScene->getPictureObjectById(PIC_SC6_LADDER, 0), 0);
}
void sceneHandler06_buttonPush() {
- g_vars->scene06_invHandle = g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_INV_HANDLE, -1);
+ g_vars->scene06_invHandle = g_fp->_currentScene->getStaticANIObject1ById(ANI_INV_HANDLE, -1);
if (g_vars->scene06_invHandle)
if (g_vars->scene06_invHandle->_flags & 4)
@@ -264,7 +264,7 @@ void sceneHandler06_showNextBall() {
g_vars->scene06_currentBall = new StaticANIObject(g_vars->scene06_balls.front());
g_vars->scene06_balls.remove_at(0);
- MessageQueue *mq = new MessageQueue(g_fullpipe->_currentScene->getMessageQueueById(QU_SC6_SHOWNEXTBALL), 0, 1);
+ MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC6_SHOWNEXTBALL), 0, 1);
mq->replaceKeyCode(-1, g_vars->scene06_currentBall->_okeyCode);
mq->chain(0);
@@ -280,10 +280,10 @@ void sceneHandler06_installHandle() {
int sceneHandler06_updateScreenCallback() {
int res;
- res = g_fullpipe->drawArcadeOverlay(g_vars->scene06_arcadeEnabled);
+ res = g_fp->drawArcadeOverlay(g_vars->scene06_arcadeEnabled);
if (!res)
- g_fullpipe->_updateScreenCallback = 0;
+ g_fp->_updateScreenCallback = 0;
return res;
}
@@ -292,13 +292,13 @@ void sceneHandler06_startAiming() {
if (g_vars->scene06_currentBall) {
g_vars->scene06_currentBall->hide();
- g_fullpipe->_aniMan->startAnim(MV_MAN6_TAKEBALL, 0, -1);
+ g_fp->_aniMan->startAnim(MV_MAN6_TAKEBALL, 0, -1);
g_vars->scene06_ballInHands = g_vars->scene06_currentBall;
g_vars->scene06_currentBall = 0;
if (getCurrSceneSc2MotionController()->_isEnabled)
- g_fullpipe->_updateScreenCallback = sceneHandler06_updateScreenCallback;
+ g_fp->_updateScreenCallback = sceneHandler06_updateScreenCallback;
getCurrSceneSc2MotionController()->clearEnabled();
getGameLoaderInteractionController()->disableFlag24();
@@ -309,18 +309,18 @@ void sceneHandler06_startAiming() {
void sceneHandler06_takeBall() {
if (g_vars->scene06_currentBall && !g_vars->scene06_currentBall->_movement && g_vars->scene06_currentBall->_statics->_staticsId == ST_NBL_NORM) {
- if (abs(1158 - g_fullpipe->_aniMan->_ox) > 1
- || abs(452 - g_fullpipe->_aniMan->_oy) > 1
- || g_fullpipe->_aniMan->_movement
- || g_fullpipe->_aniMan->_statics->_staticsId != (0x4000 | ST_MAN_RIGHT)) {
- MessageQueue *mq = getCurrSceneSc2MotionController()->method34(g_fullpipe->_aniMan, 1158, 452, 1, (0x4000 | ST_MAN_RIGHT));
+ if (abs(1158 - g_fp->_aniMan->_ox) > 1
+ || abs(452 - g_fp->_aniMan->_oy) > 1
+ || g_fp->_aniMan->_movement
+ || g_fp->_aniMan->_statics->_staticsId != (0x4000 | ST_MAN_RIGHT)) {
+ MessageQueue *mq = getCurrSceneSc2MotionController()->method34(g_fp->_aniMan, 1158, 452, 1, (0x4000 | ST_MAN_RIGHT));
if (mq) {
ExCommand *ex = new ExCommand(0, 17, MSG_SC6_TAKEBALL, 0, 0, 0, 1, 0, 0, 0);
ex->_excFlags |= 3;
mq->addExCommandToEnd(ex);
- postExCommand(g_fullpipe->_aniMan->_id, 2, 1158, 452, 0, -1);
+ postExCommand(g_fp->_aniMan->_id, 2, 1158, 452, 0, -1);
}
} else {
sceneHandler06_startAiming();
@@ -330,18 +330,18 @@ void sceneHandler06_takeBall() {
void sceneHandler06_aiming() {
if (g_vars->scene06_ballInHands) {
- g_vars->scene06_ballDeltaX = 4 * g_fullpipe->_aniMan->_movement->_currDynamicPhaseIndex + 16;
- g_vars->scene06_ballDeltaY = 5 * (g_fullpipe->_aniMan->_movement->_currDynamicPhaseIndex + 4);
+ g_vars->scene06_ballDeltaX = 4 * g_fp->_aniMan->_movement->_currDynamicPhaseIndex + 16;
+ g_vars->scene06_ballDeltaY = 5 * (g_fp->_aniMan->_movement->_currDynamicPhaseIndex + 4);
- if (g_fullpipe->_aniMan->_movement->_currDynamicPhaseIndex < 4) {
- g_fullpipe->_aniMan->_movement->setDynamicPhaseIndex(11);
+ if (g_fp->_aniMan->_movement->_currDynamicPhaseIndex < 4) {
+ g_fp->_aniMan->_movement->setDynamicPhaseIndex(11);
g_vars->scene06_aimingBall = false;
return;
}
- g_fullpipe->_aniMan->_movement->setDynamicPhaseIndex(9);
+ g_fp->_aniMan->_movement->setDynamicPhaseIndex(9);
}
g_vars->scene06_aimingBall = false;
@@ -351,7 +351,7 @@ void sceneHandler06_ballStartFly() {
if (g_vars->scene06_ballInHands) {
g_vars->scene06_flyingBall = g_vars->scene06_ballInHands;
g_vars->scene06_ballInHands = 0;
- g_vars->scene06_flyingBall->show1(g_fullpipe->_aniMan->_ox - 60, g_fullpipe->_aniMan->_oy - 60, -1, 0);
+ g_vars->scene06_flyingBall->show1(g_fp->_aniMan->_ox - 60, g_fp->_aniMan->_oy - 60, -1, 0);
g_vars->scene06_flyingBall->_priority = 27;
}
@@ -359,10 +359,10 @@ void sceneHandler06_ballStartFly() {
void sceneHandler06_throwCallback(int *arg) {
if (g_vars->scene06_aimingBall) {
- int dist = (g_fullpipe->_mouseVirtY - g_vars->scene06_sceneClickY)
- * (g_fullpipe->_mouseVirtY - g_vars->scene06_sceneClickY)
- + (g_fullpipe->_mouseVirtX - g_vars->scene06_sceneClickX)
- * (g_fullpipe->_mouseVirtX - g_vars->scene06_sceneClickX);
+ int dist = (g_fp->_mouseVirtY - g_vars->scene06_sceneClickY)
+ * (g_fp->_mouseVirtY - g_vars->scene06_sceneClickY)
+ + (g_fp->_mouseVirtX - g_vars->scene06_sceneClickX)
+ * (g_fp->_mouseVirtX - g_vars->scene06_sceneClickX);
*arg = (int)(sqrt((double)dist) * 0.1);
@@ -376,15 +376,15 @@ void sceneHandler06_throwCallback(int *arg) {
}
void sceneHandler06_throwBall() {
- g_fullpipe->_aniMan->_callback2 = sceneHandler06_throwCallback;
- g_fullpipe->_aniMan->startAnim(MV_MAN6_THROWBALL, 0, -1);
+ g_fp->_aniMan->_callback2 = sceneHandler06_throwCallback;
+ g_fp->_aniMan->startAnim(MV_MAN6_THROWBALL, 0, -1);
g_vars->scene06_aimingBall = true;
}
void sceneHandler06_eggieWalk() {
- if (15 - g_vars->scene06_numBallsGiven >= 4 && !g_fullpipe->_rnd->getRandomNumber(9)) {
- StaticANIObject *ani = g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_EGGIE, -1);
+ if (15 - g_vars->scene06_numBallsGiven >= 4 && !g_fp->_rnd->getRandomNumber(9)) {
+ StaticANIObject *ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_EGGIE, -1);
if (!ani || !(ani->_flags & 4)) {
if (g_vars->scene06_eggieDirection)
@@ -410,7 +410,7 @@ void sceneHandler06_fallBall() {
g_vars->scene06_flyingBall->setOXY(g_vars->scene06_ballX, g_vars->scene06_ballY);
- MessageQueue *mq = new MessageQueue(g_fullpipe->_currentScene->getMessageQueueById(QU_SC6_FALLBALL), 0, 1);
+ MessageQueue *mq = new MessageQueue(g_fp->_currentScene->getMessageQueueById(QU_SC6_FALLBALL), 0, 1);
mq->replaceKeyCode(-1, g_vars->scene06_flyingBall->_okeyCode);
mq->chain(0);
@@ -524,19 +524,19 @@ void scene06_initScene(Scene *sc) {
g_vars->scene06_balls.push_back(ball2);
}
- if (g_fullpipe->getObjectState(sO_BigMumsy) == g_fullpipe->getObjectEnumState(sO_BigMumsy, sO_IsPlaying))
- g_fullpipe->setObjectState(sO_BigMumsy, g_fullpipe->getObjectEnumState(sO_BigMumsy, sO_IsSleeping));
+ if (g_fp->getObjectState(sO_BigMumsy) == g_fp->getObjectEnumState(sO_BigMumsy, sO_IsPlaying))
+ g_fp->setObjectState(sO_BigMumsy, g_fp->getObjectEnumState(sO_BigMumsy, sO_IsSleeping));
- if (g_fullpipe->getObjectState(sO_BigMumsy) != g_fullpipe->getObjectEnumState(sO_BigMumsy, sO_IsSleeping))
+ if (g_fp->getObjectState(sO_BigMumsy) != g_fp->getObjectEnumState(sO_BigMumsy, sO_IsSleeping))
g_vars->scene06_mumsy->hide();
- g_fullpipe->lift_setButton(sO_Level3, ST_LBN_3N);
- g_fullpipe->lift_sub5(sc, QU_SC6_ENTERLIFT, QU_SC6_EXITLIFT);
- g_fullpipe->initArcadeKeys("SC_6");
+ g_fp->lift_setButton(sO_Level3, ST_LBN_3N);
+ g_fp->lift_sub5(sc, QU_SC6_ENTERLIFT, QU_SC6_EXITLIFT);
+ g_fp->initArcadeKeys("SC_6");
sceneHandler06_setExits(sc);
- g_fullpipe->setArcadeOverlay(PIC_CSR_ARCADE2);
+ g_fp->setArcadeOverlay(PIC_CSR_ARCADE2);
}
int sceneHandler06(ExCommand *ex) {
@@ -545,11 +545,11 @@ int sceneHandler06(ExCommand *ex) {
switch(ex->_messageNum) {
case MSG_LIFT_CLOSEDOOR:
- g_fullpipe->lift_closedoorSeq();
+ g_fp->lift_closedoorSeq();
break;
case MSG_LIFT_EXITLIFT:
- g_fullpipe->lift_exitSeq(ex);
+ g_fp->lift_exitSeq(ex);
break;
case MSG_CMN_WINARCADE:
@@ -557,18 +557,18 @@ int sceneHandler06(ExCommand *ex) {
break;
case MSG_LIFT_STARTEXITQUEUE:
- g_fullpipe->lift_startExitQueue();
+ g_fp->lift_startExitQueue();
break;
case MSG_SC6_RESTORESCROLL:
- g_fullpipe->_aniMan2 = g_fullpipe->_aniMan;
+ g_fp->_aniMan2 = g_fp->_aniMan;
getCurrSceneSc2MotionController()->setEnabled();
getGameLoaderInteractionController()->enableFlag24();
- sceneHandler06_setExits(g_fullpipe->_currentScene);
+ sceneHandler06_setExits(g_fp->_currentScene);
break;
case MSG_SC6_STARTDROPS:
- if (g_fullpipe->getObjectState(sO_BigMumsy) == g_fullpipe->getObjectEnumState(sO_BigMumsy, sO_IsSleeping))
+ if (g_fp->getObjectState(sO_BigMumsy) == g_fp->getObjectEnumState(sO_BigMumsy, sO_IsSleeping))
sceneHandler06_enableDrops();
break;
@@ -590,7 +590,7 @@ int sceneHandler06(ExCommand *ex) {
break;
case MSG_LIFT_CLICKBUTTON:
- g_fullpipe->lift_animation3();
+ g_fp->lift_animation3();
break;
case MSG_SPINHANDLE:
@@ -598,7 +598,7 @@ int sceneHandler06(ExCommand *ex) {
break;
case MSG_LIFT_GO:
- g_fullpipe->lift_goAnimation();
+ g_fp->lift_goAnimation();
break;
case MSG_SC6_UTRUBACLICK:
@@ -622,7 +622,7 @@ int sceneHandler06(ExCommand *ex) {
break;
case 64:
- g_fullpipe->lift_sub05(ex);
+ g_fp->lift_sub05(ex);
break;
case MSG_SC6_TAKEBALL:
@@ -643,11 +643,11 @@ int sceneHandler06(ExCommand *ex) {
case 29:
{
- StaticANIObject *st = g_fullpipe->_currentScene->getStaticANIObjectAtPos(ex->_sceneClickX, ex->_sceneClickY);
+ StaticANIObject *st = g_fp->_currentScene->getStaticANIObjectAtPos(ex->_sceneClickX, ex->_sceneClickY);
if (st) {
if (!g_vars->scene06_arcadeEnabled && st->_id == ANI_LIFTBUTTON) {
- g_fullpipe->lift_sub1(st);
+ g_fp->lift_sub1(st);
ex->_messageKind = 0;
return 0;
}
@@ -657,7 +657,7 @@ int sceneHandler06(ExCommand *ex) {
sceneHandler06_takeBall();
ex->_messageKind = 0;
- } else if (g_vars->scene06_ballInHands && g_fullpipe->_aniMan == st && !g_fullpipe->_aniMan->_movement && g_fullpipe->_aniMan->_statics->_staticsId == ST_MAN6_BALL) {
+ } else if (g_vars->scene06_ballInHands && g_fp->_aniMan == st && !g_fp->_aniMan->_movement && g_fp->_aniMan->_statics->_staticsId == ST_MAN6_BALL) {
g_vars->scene06_sceneClickX = ex->_sceneClickX;
g_vars->scene06_sceneClickY = ex->_sceneClickY;
@@ -665,15 +665,15 @@ int sceneHandler06(ExCommand *ex) {
}
}
- if (!st || !canInteractAny(g_fullpipe->_aniMan, st, ex->_keyCode)) {
- int picId = g_fullpipe->_currentScene->getPictureObjectIdAtPos(ex->_sceneClickX, ex->_sceneClickY);
- PictureObject *pic = g_fullpipe->_currentScene->getPictureObjectById(picId, 0);
+ if (!st || !canInteractAny(g_fp->_aniMan, st, ex->_keyCode)) {
+ int picId = g_fp->_currentScene->getPictureObjectIdAtPos(ex->_sceneClickX, ex->_sceneClickY);
+ PictureObject *pic = g_fp->_currentScene->getPictureObjectById(picId, 0);
- if (!pic || !canInteractAny(g_fullpipe->_aniMan, pic, ex->_keyCode)) {
- if ((g_fullpipe->_sceneRect.right - ex->_sceneClickX < 47
- && g_fullpipe->_sceneRect.right < g_fullpipe->_sceneWidth - 1)
- || (ex->_sceneClickX - g_fullpipe->_sceneRect.left < 47 && g_fullpipe->_sceneRect.left > 0)) {
- g_fullpipe->processArcade(ex);
+ if (!pic || !canInteractAny(g_fp->_aniMan, pic, ex->_keyCode)) {
+ if ((g_fp->_sceneRect.right - ex->_sceneClickX < 47
+ && g_fp->_sceneRect.right < g_fp->_sceneWidth - 1)
+ || (ex->_sceneClickX - g_fp->_sceneRect.left < 47 && g_fp->_sceneRect.left > 0)) {
+ g_fp->processArcade(ex);
return 0;
}
}
@@ -686,29 +686,29 @@ int sceneHandler06(ExCommand *ex) {
{
int res = 0;
- if (g_fullpipe->_aniMan2) {
- int ox = g_fullpipe->_aniMan2->_ox;
- int oy = g_fullpipe->_aniMan2->_oy;
+ if (g_fp->_aniMan2) {
+ int ox = g_fp->_aniMan2->_ox;
+ int oy = g_fp->_aniMan2->_oy;
g_vars->scene06_manX = ox;
g_vars->scene06_manY = oy;
if (g_vars->scene06_arcadeEnabled && oy <= 470 && ox >= 1088) {
- if (ox < g_fullpipe->_sceneRect.left + 600) {
- g_fullpipe->_currentScene->_x = ox - g_fullpipe->_sceneRect.left - 700;
+ if (ox < g_fp->_sceneRect.left + 600) {
+ g_fp->_currentScene->_x = ox - g_fp->_sceneRect.left - 700;
ox = g_vars->scene06_manX;
}
- if (ox > g_fullpipe->_sceneRect.right - 50)
- g_fullpipe->_currentScene->_x = ox - g_fullpipe->_sceneRect.right + 70;
+ if (ox > g_fp->_sceneRect.right - 50)
+ g_fp->_currentScene->_x = ox - g_fp->_sceneRect.right + 70;
} else {
- if (ox < g_fullpipe->_sceneRect.left + 200) {
- g_fullpipe->_currentScene->_x = ox - g_fullpipe->_sceneRect.left - 300;
+ if (ox < g_fp->_sceneRect.left + 200) {
+ g_fp->_currentScene->_x = ox - g_fp->_sceneRect.left - 300;
ox = g_vars->scene06_manX;
}
- if (ox > g_fullpipe->_sceneRect.right - 200)
- g_fullpipe->_currentScene->_x = ox - g_fullpipe->_sceneRect.right + 300;
+ if (ox > g_fp->_sceneRect.right - 200)
+ g_fp->_currentScene->_x = ox - g_fp->_sceneRect.right + 300;
}
res = 1;
@@ -757,8 +757,8 @@ int sceneHandler06(ExCommand *ex) {
&& !g_vars->scene06_mumsy->_movement
&& !g_vars->scene06_mumsyGotBall)
sceneHandler06_mumsyBallTake();
- g_fullpipe->_behaviorManager->updateBehaviors();
- g_fullpipe->startSceneTrack();
+ g_fp->_behaviorManager->updateBehaviors();
+ g_fp->startSceneTrack();
return res;
}
diff --git a/engines/fullpipe/scenes/scene07.cpp b/engines/fullpipe/scenes/scene07.cpp
index 60d6a9b3df..ba4121944e 100644
--- a/engines/fullpipe/scenes/scene07.cpp
+++ b/engines/fullpipe/scenes/scene07.cpp
@@ -38,24 +38,24 @@ void scene07_initScene(Scene *sc) {
g_vars->scene07_lukePercent = 0;
g_vars->scene07_plusMinus = sc->getStaticANIObject1ById(ANI_PLUSMINUS, -1);
- if (g_fullpipe->getObjectState(sO_Guard_1) == g_fullpipe->getObjectEnumState(sO_Guard_1, sO_Off))
+ if (g_fp->getObjectState(sO_Guard_1) == g_fp->getObjectEnumState(sO_Guard_1, sO_Off))
g_vars->scene07_plusMinus->_statics = g_vars->scene07_plusMinus->getStaticsById(ST_PMS_MINUS);
else
g_vars->scene07_plusMinus->_statics = g_vars->scene07_plusMinus->getStaticsById(ST_PMS_PLUS);
- if (g_fullpipe->getObjectState(sO_HareTheNooksiter) == g_fullpipe->getObjectEnumState(sO_HareTheNooksiter, sO_WithoutHandle)) {
- Scene *oldsc = g_fullpipe->_currentScene;
+ if (g_fp->getObjectState(sO_HareTheNooksiter) == g_fp->getObjectEnumState(sO_HareTheNooksiter, sO_WithoutHandle)) {
+ Scene *oldsc = g_fp->_currentScene;
- g_fullpipe->_currentScene = sc;
+ g_fp->_currentScene = sc;
sc->getStaticANIObject1ById(ANI_CORNERSITTER, -1)->changeStatics2(ST_CST_HANDLELESS);
- g_fullpipe->_currentScene = oldsc;
+ g_fp->_currentScene = oldsc;
}
}
void sceneHandler07_openLuke() {
- StaticANIObject *luke = g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_LUKE, -1);
+ StaticANIObject *luke = g_fp->_currentScene->getStaticANIObject1ById(ANI_LUKE, -1);
luke->changeStatics2(ST_LUK_OPEN);
luke->show1(-1, -1, -1, 0);
@@ -63,40 +63,40 @@ void sceneHandler07_openLuke() {
if (g_vars->scene07_lukeAnim) {
g_vars->scene07_lukeAnim->_percent = g_vars->scene07_lukePercent;
} else {
- StaticANIObject *ani = g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_CORNERSITTER, -1);
+ StaticANIObject *ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_CORNERSITTER, -1);
- g_vars->scene07_lukeAnim = g_fullpipe->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(ani, ST_CST_HANDLELESS, QU_CST_CLOSELUKE);
+ g_vars->scene07_lukeAnim = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(ani, ST_CST_HANDLELESS, QU_CST_CLOSELUKE);
g_vars->scene07_lukeAnim->_percent = g_vars->scene07_lukePercent;
}
}
void sceneHandler07_closeLuke() {
- g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_LUKE, -1)->changeStatics2(ST_LUK_CLOSED);
+ g_fp->_currentScene->getStaticANIObject1ById(ANI_LUKE, -1)->changeStatics2(ST_LUK_CLOSED);
if (!g_vars->scene07_lukeAnim) {
- StaticANIObject *ani = g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_CORNERSITTER, -1);
+ StaticANIObject *ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_CORNERSITTER, -1);
- g_vars->scene07_lukeAnim = g_fullpipe->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(ani, ST_CST_HANDLELESS, QU_CST_CLOSELUKE);
+ g_vars->scene07_lukeAnim = g_fp->_behaviorManager->getBehaviorEntryInfoByMessageQueueDataId(ani, ST_CST_HANDLELESS, QU_CST_CLOSELUKE);
}
g_vars->scene07_lukePercent = g_vars->scene07_lukeAnim->_percent;
g_vars->scene07_lukeAnim->_percent = 0;
- StaticANIObject *ani = g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_HOOLIGAN, -1);
+ StaticANIObject *ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_HOOLIGAN, -1);
ani->changeStatics2(ST_HGN_LUKE);
ani->show1(-1, -1, -1, 0);
}
void sceneHandler07_hideLuke() {
- g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_LUKE, -1)->hide();
+ g_fp->_currentScene->getStaticANIObject1ById(ANI_LUKE, -1)->hide();
- Movement *mov = g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_CORNERSITTER, -1)->_movement;
+ Movement *mov = g_fp->_currentScene->getStaticANIObject1ById(ANI_CORNERSITTER, -1)->_movement;
if (mov) {
if (mov->_id == MV_CST_CLOSELUKE) {
- StaticANIObject *ani = g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_HOOLIGAN, -1);
+ StaticANIObject *ani = g_fp->_currentScene->getStaticANIObject1ById(ANI_HOOLIGAN, -1);
ani->changeStatics2(ST_HGN_LOOK);
ani->_flags &= 0xFFFB;
@@ -105,14 +105,14 @@ void sceneHandler07_hideLuke() {
}
void sceneHandler07_showBox() {
- StaticANIObject *box = g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_SC7_BOX, -1);
+ StaticANIObject *box = g_fp->_currentScene->getStaticANIObject1ById(ANI_SC7_BOX, -1);
box->show1(492, 474, MV_SC7_BOX_default, 0);
box->_priority = 25;
}
void sceneHandler07_hideBox() {
- g_fullpipe->_currentScene->getStaticANIObject1ById(ANI_SC7_BOX, -1)->hide();
+ g_fp->_currentScene->getStaticANIObject1ById(ANI_SC7_BOX, -1)->hide();
}
int sceneHandler07(ExCommand *ex) {
@@ -152,17 +152,17 @@ int sceneHandler07(ExCommand *ex) {
{
int res = 0;
- if (g_fullpipe->_aniMan2) {
- if (g_fullpipe->_aniMan2->_ox < g_fullpipe->_sceneRect.left + 200)
- g_fullpipe->_currentScene->_x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.left - 300;
+ if (g_fp->_aniMan2) {
+ if (g_fp->_aniMan2->_ox < g_fp->_sceneRect.left + 200)
+ g_fp->_currentScene->_x = g_fp->_aniMan2->_ox - g_fp->_sceneRect.left - 300;
- if (g_fullpipe->_aniMan2->_ox > g_fullpipe->_sceneRect.right - 200)
- g_fullpipe->_currentScene->_x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.right + 300;
+ if (g_fp->_aniMan2->_ox > g_fp->_sceneRect.right - 200)
+ g_fp->_currentScene->_x = g_fp->_aniMan2->_ox - g_fp->_sceneRect.right + 300;
res = 1;
}
- g_fullpipe->_behaviorManager->updateBehaviors();
+ g_fp->_behaviorManager->updateBehaviors();
return res;
}
diff --git a/engines/fullpipe/scenes/scene08.cpp b/engines/fullpipe/scenes/scene08.cpp
index e9bc1e6467..b6670b76c7 100644
--- a/engines/fullpipe/scenes/scene08.cpp
+++ b/engines/fullpipe/scenes/scene08.cpp
@@ -46,28 +46,28 @@ void scene08_initScene(Scene *sc) {
g_vars->scene08_var04 = -37;
g_vars->scene08_var05 = -1;
- Scene *oldsc = g_fullpipe->_currentScene;
- g_fullpipe->_currentScene = sc;
+ Scene *oldsc = g_fp->_currentScene;
+ g_fp->_currentScene = sc;
- int batuta = g_fullpipe->getObjectState(sO_TummyTrampie);
+ int batuta = g_fp->getObjectState(sO_TummyTrampie);
MovGraphLink *lock = getSc2MctlCompoundBySceneId(sc->_sceneId)->getLinkByName(sO_CloseThing);
if (lock)
lock->_flags &= 0xDFFFFFFF;
- if (batuta == g_fullpipe->getObjectEnumState(sO_TummyTrampie, sO_IsEating)) {
+ if (batuta == g_fp->getObjectEnumState(sO_TummyTrampie, sO_IsEating)) {
g_vars->scene08_batuta->changeStatics2(ST_BTT_SPOON);
- } else if (batuta == g_fullpipe->getObjectEnumState(sO_TummyTrampie, sO_IsDrinking)) {
+ } else if (batuta == g_fp->getObjectEnumState(sO_TummyTrampie, sO_IsDrinking)) {
g_vars->scene08_batuta->changeStatics2(ST_BTT_NOSPOON);
g_vars->scene08_clock->startAnim(MV_CLK8_GO, 0, -1);
g_vars->scene08_clock->_movement->setDynamicPhaseIndex(3);
- } else if (batuta== g_fullpipe->getObjectEnumState(sO_TummyTrampie, sO_IsScratchingBelly)) {
+ } else if (batuta== g_fp->getObjectEnumState(sO_TummyTrampie, sO_IsScratchingBelly)) {
g_vars->scene08_batuta->changeStatics2(ST_BTT_CHESHET);
g_vars->scene08_clock->startAnim(MV_CLK8_GO, 0, -1);
g_vars->scene08_clock->_movement->setDynamicPhaseIndex(8);
- } else if (batuta == g_fullpipe->getObjectEnumState(sO_TummyTrampie, sO_IsSleeping)) {
+ } else if (batuta == g_fp->getObjectEnumState(sO_TummyTrampie, sO_IsSleeping)) {
g_vars->scene08_batuta->changeStatics2(ST_BTT_SLEEPS);
g_vars->scene08_clock->startAnim(MV_CLK8_GO, 0, -1);
@@ -81,7 +81,7 @@ void scene08_initScene(Scene *sc) {
g_vars->scene08_clock->_callback2 = 0;
- if (g_fullpipe->getObjectState(sO_StairsUp_8) == g_fullpipe->getObjectEnumState(sO_StairsUp_8, sO_Broken)) {
+ if (g_fp->getObjectState(sO_StairsUp_8) == g_fp->getObjectEnumState(sO_StairsUp_8, sO_Broken)) {
g_vars->scene08_var07 = 0;
sc->getPictureObjectById(PIC_SC8_LADDER, 0)->_flags &= 0xFFFB;
@@ -93,12 +93,12 @@ void scene08_initScene(Scene *sc) {
sc->getPictureObjectById(PIC_SC8_ARCADENOW, 0)->_flags &= 0xFFFB;
- g_fullpipe->_currentScene = oldsc;
+ g_fp->_currentScene = oldsc;
- g_fullpipe->_floaters->init(g_fullpipe->getGameLoaderGameVar()->getSubVarByName("SC_8"));
- g_fullpipe->_floaters->genFlies(sc, 100, 100, 0, 0);
+ g_fp->_floaters->init(g_fp->getGameLoaderGameVar()->getSubVarByName("SC_8"));
+ g_fp->_floaters->genFlies(sc, 100, 100, 0, 0);
- g_fullpipe->setArcadeOverlay(PIC_CSR_ARCADE3);
+ g_fp->setArcadeOverlay(PIC_CSR_ARCADE3);
}
void scene08_setupMusic() {
@@ -108,9 +108,9 @@ void scene08_setupMusic() {
int scene08_updateCursor() {
warning("STUB: scene08_updateCursor()");
- g_fullpipe->updateCursorCommon();
+ g_fp->updateCursorCommon();
- return g_fullpipe->_cursorId;
+ return g_fp->_cursorId;
}
void sceneHandler08_winArcade() {
@@ -245,52 +245,52 @@ int sceneHandler08(ExCommand *cmd) {
{
int res = 0;
- if (g_fullpipe->_aniMan2) {
+ if (g_fp->_aniMan2) {
if (g_vars->scene08_var06) {
- int scHeight = g_fullpipe->_sceneRect.bottom - g_fullpipe->_sceneRect.top;
+ int scHeight = g_fp->_sceneRect.bottom - g_fp->_sceneRect.top;
- if (g_fullpipe->_aniMan2->_oy < g_fullpipe->_sceneRect.top + 200) {
- g_fullpipe->_sceneRect.top = g_fullpipe->_aniMan2->_oy - 200;
+ if (g_fp->_aniMan2->_oy < g_fp->_sceneRect.top + 200) {
+ g_fp->_sceneRect.top = g_fp->_aniMan2->_oy - 200;
- if (g_fullpipe->_sceneRect.top < 0)
- g_fullpipe->_sceneRect.top = 0;
+ if (g_fp->_sceneRect.top < 0)
+ g_fp->_sceneRect.top = 0;
- g_fullpipe->_sceneRect.bottom = scHeight + g_fullpipe->_sceneRect.top;
+ g_fp->_sceneRect.bottom = scHeight + g_fp->_sceneRect.top;
}
- if (g_fullpipe->_aniMan2->_oy > g_fullpipe->_sceneRect.bottom - 350) {
- g_fullpipe->_sceneRect.bottom = g_fullpipe->_aniMan2->_oy + 350;
- g_fullpipe->_sceneRect.top = g_fullpipe->_aniMan2->_oy + 350 - scHeight;
+ if (g_fp->_aniMan2->_oy > g_fp->_sceneRect.bottom - 350) {
+ g_fp->_sceneRect.bottom = g_fp->_aniMan2->_oy + 350;
+ g_fp->_sceneRect.top = g_fp->_aniMan2->_oy + 350 - scHeight;
}
} else {
- if (g_fullpipe->_aniMan2->_ox < g_fullpipe->_sceneRect.left + 200)
- g_fullpipe->_currentScene->_x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.left - 300;
+ if (g_fp->_aniMan2->_ox < g_fp->_sceneRect.left + 200)
+ g_fp->_currentScene->_x = g_fp->_aniMan2->_ox - g_fp->_sceneRect.left - 300;
- if (g_fullpipe->_aniMan2->_ox > g_fullpipe->_sceneRect.right - 200)
- g_fullpipe->_currentScene->_x = g_fullpipe->_aniMan2->_ox - g_fullpipe->_sceneRect.right + 300;
+ if (g_fp->_aniMan2->_ox > g_fp->_sceneRect.right - 200)
+ g_fp->_currentScene->_x = g_fp->_aniMan2->_ox - g_fp->_sceneRect.right + 300;
res = 1;
}
}
- g_fullpipe->_floaters->update();
+ g_fp->_floaters->update();
if (g_vars->scene08_var06) {
if (g_vars->scene08_var01)
sceneHandler08_calcFlight();
} else {
- Movement *mov = g_fullpipe->_aniMan->_movement;
+ Movement *mov = g_fp->_aniMan->_movement;
if (mov) {
if (mov->_id == MV_MAN_TOLADDERD && mov->_currDynamicPhaseIndex == 8)
- g_fullpipe->_aniMan->_priority = 2;
+ g_fp->_aniMan->_priority = 2;
if (mov && mov->_id == MV_MAN_FROMLADDERUP && mov->_currDynamicPhaseIndex == 13)
- g_fullpipe->_aniMan->_priority = 20;
+ g_fp->_aniMan->_priority = 20;
}
- g_fullpipe->_behaviorManager->updateBehaviors();
- g_fullpipe->startSceneTrack();
+ g_fp->_behaviorManager->updateBehaviors();
+ g_fp->startSceneTrack();
}
if (g_vars->scene08_var02)
@@ -300,7 +300,7 @@ int sceneHandler08(ExCommand *cmd) {
g_vars->scene08_var05--;
if (!g_vars->scene08_var05) {
- g_fullpipe->playSound(SND_8_014, 0);
+ g_fp->playSound(SND_8_014, 0);
g_vars->scene08_var05 = 71;
}
diff --git a/engines/fullpipe/scenes/sceneDbg.cpp b/engines/fullpipe/scenes/sceneDbg.cpp
index 83f3b64ee5..518ef0d13b 100644
--- a/engines/fullpipe/scenes/sceneDbg.cpp
+++ b/engines/fullpipe/scenes/sceneDbg.cpp
@@ -40,9 +40,9 @@ void sceneDbgMenu_initScene(Scene *sc) {
}
GameObject *sceneHandlerDbgMenu_getObjectAtXY(int x, int y) {
- if (g_fullpipe->_currentScene)
- for (uint i = 0; i < g_fullpipe->_currentScene->_picObjList.size(); i++) {
- PictureObject *pic = (PictureObject *)g_fullpipe->_currentScene->_picObjList[i];
+ if (g_fp->_currentScene)
+ for (uint i = 0; i < g_fp->_currentScene->_picObjList.size(); i++) {
+ PictureObject *pic = (PictureObject *)g_fp->_currentScene->_picObjList[i];
if (x >= pic->_ox && y >= pic->_oy) {
Common::Point point;
@@ -61,8 +61,8 @@ int sceneHandlerDbgMenu(ExCommand *ex) {
if (ex->_messageKind != 17)
return 0;
- int mx = g_fullpipe->_mouseScreenPos.x + g_fullpipe->_sceneRect.left;
- int my = g_fullpipe->_mouseScreenPos.y + g_fullpipe->_sceneRect.top;
+ int mx = g_fp->_mouseScreenPos.x + g_fp->_sceneRect.left;
+ int my = g_fp->_mouseScreenPos.y + g_fp->_sceneRect.top;
if (ex->_messageNum == 29) {
GameObject *obj = sceneHandlerDbgMenu_getObjectAtXY(mx, my);
@@ -74,18 +74,18 @@ int sceneHandlerDbgMenu(ExCommand *ex) {
}
if (ex->_messageNum != 33) {
if (ex->_messageNum == MSG_RESTARTGAME) {
- g_fullpipe->_needRestart = true;
+ g_fp->_needRestart = true;
return 0;
}
return 0;
}
- g_fullpipe->_cursorId = PIC_CSR_DEFAULT;
- GameObject *obj = g_fullpipe->_currentScene->getStaticANIObjectAtPos(mx, my);
+ g_fp->_cursorId = PIC_CSR_DEFAULT;
+ GameObject *obj = g_fp->_currentScene->getStaticANIObjectAtPos(mx, my);
if (obj) {
if (canInteractAny(0, obj, -3)) {
- g_fullpipe->_cursorId = PIC_CSR_DEFAULT;
- g_fullpipe->setCursor(PIC_CSR_DEFAULT);
+ g_fp->_cursorId = PIC_CSR_DEFAULT;
+ g_fp->setCursor(PIC_CSR_DEFAULT);
return 0;
}
} else {
@@ -93,13 +93,13 @@ int sceneHandlerDbgMenu(ExCommand *ex) {
if (obj && canInteractAny(0, obj, -3) ) {
g_vars->selector->_flags |= 4;
g_vars->selector->setOXY(obj->_ox, obj->_oy);
- g_fullpipe->_cursorId = PIC_CSR_DEFAULT;
- g_fullpipe->setCursor(PIC_CSR_DEFAULT);
+ g_fp->_cursorId = PIC_CSR_DEFAULT;
+ g_fp->setCursor(PIC_CSR_DEFAULT);
return 0;
}
g_vars->selector->_flags &= 0xFFFB;
}
- g_fullpipe->setCursor(g_fullpipe->_cursorId);
+ g_fp->setCursor(g_fp->_cursorId);
return 0;
}
diff --git a/engines/fullpipe/scenes/sceneIntro.cpp b/engines/fullpipe/scenes/sceneIntro.cpp
index d60f90faf7..368ca43abd 100644
--- a/engines/fullpipe/scenes/sceneIntro.cpp
+++ b/engines/fullpipe/scenes/sceneIntro.cpp
@@ -31,13 +31,13 @@
namespace Fullpipe {
int sceneIntro_updateCursor() {
- g_fullpipe->_cursorId = 0;
+ g_fp->_cursorId = 0;
return 0;
}
void sceneIntro_initScene(Scene *sc) {
- g_fullpipe->_gameLoader->loadScene(SC_INTRO2);
+ g_fp->_gameLoader->loadScene(SC_INTRO2);
g_vars->sceneIntro_aniin1man = sc->getStaticANIObject1ById(ANI_IN1MAN, -1);
g_vars->sceneIntro_needSleep = true;
@@ -45,19 +45,19 @@ void sceneIntro_initScene(Scene *sc) {
g_vars->sceneIntro_playing = true;
g_vars->sceneIntro_needBlackout = false;
- if (g_fullpipe->_recordEvents || g_fullpipe->_inputArFlag)
+ if (g_fp->_recordEvents || g_fp->_inputArFlag)
g_vars->sceneIntro_skipIntro = false;
- g_fullpipe->_modalObject = new ModalIntro;
+ g_fp->_modalObject = new ModalIntro;
}
void sceneHandlerIntro_part1() {
- g_fullpipe->_currentScene = g_fullpipe->accessScene(SC_INTRO1);
+ g_fp->_currentScene = g_fp->accessScene(SC_INTRO1);
chainQueue(QU_INTR_FINISH, 0);
}
void sceneHandlerIntro_part2() {
- g_fullpipe->_currentScene = g_fullpipe->accessScene(SC_INTRO2);
+ g_fp->_currentScene = g_fp->accessScene(SC_INTRO2);
chainQueue(QU_IN2_DO, 0);
}
@@ -101,7 +101,7 @@ int sceneHandlerIntro(ExCommand *ex) {
chainQueue(QU_INTR_GETUPMAN, 0);
}
- g_fullpipe->startSceneTrack();
+ g_fp->startSceneTrack();
return 0;
}
diff --git a/engines/fullpipe/sound.cpp b/engines/fullpipe/sound.cpp
index 36f6030935..de0a666974 100644
--- a/engines/fullpipe/sound.cpp
+++ b/engines/fullpipe/sound.cpp
@@ -86,7 +86,7 @@ bool Sound::load(MfcArchive &file, NGIArchive *archive) {
_id = file.readUint32LE();
_description = file.readPascalString();
- assert(g_fullpipe->_gameProjectVersion >= 6);
+ assert(g_fp->_gameProjectVersion >= 6);
_objectId = file.readUint16LE();
diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp
index 747015e9a1..6a56ffd662 100644
--- a/engines/fullpipe/stateloader.cpp
+++ b/engines/fullpipe/stateloader.cpp
@@ -115,25 +115,25 @@ bool GameProject::load(MfcArchive &file) {
_headerFilename = 0;
_field_10 = 12;
- g_fullpipe->_gameProjectVersion = file.readUint32LE();
- g_fullpipe->_pictureScale = file.readUint16LE();
- g_fullpipe->_scrollSpeed = file.readUint32LE();
+ g_fp->_gameProjectVersion = file.readUint32LE();
+ g_fp->_pictureScale = file.readUint16LE();
+ g_fp->_scrollSpeed = file.readUint32LE();
_headerFilename = file.readPascalString();
- debug(1, "_gameProjectVersion = %d", g_fullpipe->_gameProjectVersion);
- debug(1, "_pictureScale = %d", g_fullpipe->_pictureScale);
- debug(1, "_scrollSpeed = %d", g_fullpipe->_scrollSpeed);
+ debug(1, "_gameProjectVersion = %d", g_fp->_gameProjectVersion);
+ debug(1, "_pictureScale = %d", g_fp->_pictureScale);
+ debug(1, "_scrollSpeed = %d", g_fp->_scrollSpeed);
debug(1, "_headerFilename = %s", _headerFilename);
_sceneTagList = new SceneTagList();
_sceneTagList->load(file);
- if (g_fullpipe->_gameProjectVersion >= 3)
+ if (g_fp->_gameProjectVersion >= 3)
_field_4 = file.readUint32LE();
- if (g_fullpipe->_gameProjectVersion >= 5) {
+ if (g_fp->_gameProjectVersion >= 5) {
file.readUint32LE();
file.readUint32LE();
}
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index 12c56fe429..2af9cff743 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -191,7 +191,7 @@ bool StaticANIObject::load(MfcArchive &file) {
char *movname = genFileName(_id, movNum, "mov");
- Common::SeekableReadStream *f = g_fullpipe->_currArchive->createReadStreamForMember(movname);
+ Common::SeekableReadStream *f = g_fp->_currArchive->createReadStreamForMember(movname);
Movement *mov = new Movement();
@@ -249,11 +249,11 @@ void StaticANIObject::setFlags40(bool state) {
void StaticANIObject::deleteFromGlobalMessageQueue() {
while (_messageQueueId) {
- if (g_fullpipe->_globalMessageQueueList->getMessageQueueById(_messageQueueId)) {
+ if (g_fp->_globalMessageQueueList->getMessageQueueById(_messageQueueId)) {
if (!isIdle())
return;
- g_fullpipe->_globalMessageQueueList->deleteQueueById(_messageQueueId);
+ g_fp->_globalMessageQueueList->deleteQueueById(_messageQueueId);
} else {
_messageQueueId = 0;
}
@@ -285,7 +285,7 @@ MessageQueue *StaticANIObject::getMessageQueue() {
if (this->_messageQueueId <= 0)
return 0;
- return g_fullpipe->_globalMessageQueueList->getMessageQueueById(_messageQueueId);
+ return g_fp->_globalMessageQueueList->getMessageQueueById(_messageQueueId);
}
bool StaticANIObject::trySetMessageQueue(int msgNum, int qId) {
@@ -304,7 +304,7 @@ bool StaticANIObject::trySetMessageQueue(int msgNum, int qId) {
bool StaticANIObject::isIdle() {
if (_messageQueueId) {
- MessageQueue *m = g_fullpipe->_globalMessageQueueList->getMessageQueueById(_messageQueueId);
+ MessageQueue *m = g_fp->_globalMessageQueueList->getMessageQueueById(_messageQueueId);
if (m && m->getFlags() & 1)
return false;
@@ -429,7 +429,7 @@ void Movement::draw(bool flipFlag, int angle) {
int y = _oy - point.y;
if (_currDynamicPhase->getPaletteData())
- g_fullpipe->_globalPalette = _currDynamicPhase->getPaletteData();
+ g_fp->_globalPalette = _currDynamicPhase->getPaletteData();
if (_currDynamicPhase->getAlpha() < 0xFF) {
warning("Movement::draw: alpha < 0xff: %d", _currDynamicPhase->getAlpha());
@@ -499,7 +499,7 @@ void StaticANIObject::draw() {
debug(6, "StaticANIObject::draw() (%s) [%d] [%d, %d]", transCyrillic((byte *)_objectName), _id, _ox, _oy);
- if (_shadowsOn && g_fullpipe->_currentScene && g_fullpipe->_currentScene->_shadows
+ if (_shadowsOn && g_fp->_currentScene && g_fp->_currentScene->_shadows
&& (getCurrDimensions(point)->x != 1 || getCurrDimensions(point)->y != 1)) {
DynamicPhase *dyn;
@@ -517,7 +517,7 @@ void StaticANIObject::draw() {
if (dyn->getDynFlags() & 4) {
rect = *dyn->_rect;
- DynamicPhase *shd = g_fullpipe->_currentScene->_shadows->findSize(rect.width(), rect.height());
+ DynamicPhase *shd = g_fp->_currentScene->_shadows->findSize(rect.width(), rect.height());
if (shd) {
shd->getDimensions(&point);
int midx = _ox - point.x / 2 - dyn->_someX;
@@ -573,7 +573,7 @@ void StaticANIObject::draw2() {
}
MovTable *StaticANIObject::countMovements() {
- GameVar *preloadSubVar = g_fullpipe->getGameLoaderGameVar()->getSubVarByName(getName())->getSubVarByName("PRELOAD");
+ GameVar *preloadSubVar = g_fp->getGameLoaderGameVar()->getSubVarByName(getName())->getSubVarByName("PRELOAD");
if (!preloadSubVar || preloadSubVar->getSubVarsCount() == 0)
return 0;
@@ -599,7 +599,7 @@ MovTable *StaticANIObject::countMovements() {
}
void StaticANIObject::setSpeed(int speed) {
- GameVar *var = g_fullpipe->getGameLoaderGameVar()->getSubVarByName(getName())->getSubVarByName("SpeedUp");
+ GameVar *var = g_fp->getGameLoaderGameVar()->getSubVarByName(getName())->getSubVarByName("SpeedUp");
if (!var)
return;
@@ -886,15 +886,15 @@ void StaticANIObject::changeStatics2(int objId) {
deleteFromGlobalMessageQueue();
if (_movement || _statics) {
- g_fullpipe->_mgm->addItem(_id);
- g_fullpipe->_mgm->updateAnimStatics(this, objId);
+ g_fp->_mgm->addItem(_id);
+ g_fp->_mgm->updateAnimStatics(this, objId);
} else {
_statics = getStaticsById(objId);
}
if (_messageQueueId) {
- if (g_fullpipe->_globalMessageQueueList->getMessageQueueById(_messageQueueId))
- g_fullpipe->_globalMessageQueueList->deleteQueueById(_messageQueueId);
+ if (g_fp->_globalMessageQueueList->getMessageQueueById(_messageQueueId))
+ g_fp->_globalMessageQueueList->deleteQueueById(_messageQueueId);
_messageQueueId = 0;
}
@@ -1376,10 +1376,10 @@ bool Movement::load(MfcArchive &file, StaticANIObject *ani) {
_flipFlag = 1;
}
- if (g_fullpipe->_gameProjectVersion >= 8)
+ if (g_fp->_gameProjectVersion >= 8)
_field_50 = file.readUint32LE();
- if (g_fullpipe->_gameProjectVersion < 12)
+ if (g_fp->_gameProjectVersion < 12)
_counterMax = 83;
else
_counterMax = file.readUint32LE();
@@ -1817,9 +1817,9 @@ DynamicPhase::DynamicPhase(DynamicPhase *src, bool reverse) {
_data = _bitmap->_pixels;
_dataSize = src->_dataSize;
- if (g_fullpipe->_currArchive) {
+ if (g_fp->_currArchive) {
_mfield_14 = 0;
- _libHandle = g_fullpipe->_currArchive;
+ _libHandle = g_fp->_currArchive;
}
_mflags |= 1;
@@ -1877,12 +1877,12 @@ bool DynamicPhase::load(MfcArchive &file) {
_rect->right = file.readUint32LE();
_rect->bottom = file.readUint32LE();
- assert (g_fullpipe->_gameProjectVersion >= 1);
+ assert (g_fp->_gameProjectVersion >= 1);
_someX = file.readUint32LE();
_someY = file.readUint32LE();
- assert (g_fullpipe->_gameProjectVersion >= 12);
+ assert (g_fp->_gameProjectVersion >= 12);
_dynFlags = file.readUint32LE();
@@ -1909,13 +1909,13 @@ bool StaticPhase::load(MfcArchive &file) {
_initialCountdown = file.readUint16LE();
_field_6A = file.readUint16LE();
- if (g_fullpipe->_gameProjectVersion >= 12) {
+ if (g_fp->_gameProjectVersion >= 12) {
_exCommand = (ExCommand *)file.readClass();
return true;
}
- assert (g_fullpipe->_gameProjectVersion >= 12);
+ assert (g_fp->_gameProjectVersion >= 12);
return true;
}
diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp
index 3a65801951..b3668ea362 100644
--- a/engines/fullpipe/utils.cpp
+++ b/engines/fullpipe/utils.cpp
@@ -138,9 +138,9 @@ bool MemoryObject::load(MfcArchive &file) {
}
}
- if (g_fullpipe->_currArchive) {
+ if (g_fp->_currArchive) {
_mfield_14 = 0;
- _libHandle = g_fullpipe->_currArchive;
+ _libHandle = g_fp->_currArchive;
}
return true;
@@ -153,12 +153,12 @@ void MemoryObject::loadFile(char *filename) {
return;
if (!_data) {
- NGIArchive *arr = g_fullpipe->_currArchive;
+ NGIArchive *arr = g_fp->_currArchive;
- if (g_fullpipe->_currArchive != _libHandle && _libHandle)
- g_fullpipe->_currArchive = _libHandle;
+ if (g_fp->_currArchive != _libHandle && _libHandle)
+ g_fp->_currArchive = _libHandle;
- Common::SeekableReadStream *s = g_fullpipe->_currArchive->createReadStreamForMember(filename);
+ Common::SeekableReadStream *s = g_fp->_currArchive->createReadStreamForMember(filename);
if (s) {
assert(s->size() > 0);
@@ -174,7 +174,7 @@ void MemoryObject::loadFile(char *filename) {
warning("MemoryObject::loadFile(): reading failure");
}
- g_fullpipe->_currArchive = arr;
+ g_fp->_currArchive = arr;
}
}