aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2013-07-06 22:56:11 +0300
committerEugene Sandulenko2013-09-06 14:48:17 +0300
commitc2103bb9cd4b8b2958ea99c7797df2cd4f0905d5 (patch)
tree61c40f7e340c77d58244be0f2cba19c38fa56a9c /engines
parent69946ce96355e5e07ad7a21ab3eb2f2831dfc002 (diff)
downloadscummvm-rg350-c2103bb9cd4b8b2958ea99c7797df2cd4f0905d5.tar.gz
scummvm-rg350-c2103bb9cd4b8b2958ea99c7797df2cd4f0905d5.tar.bz2
scummvm-rg350-c2103bb9cd4b8b2958ea99c7797df2cd4f0905d5.zip
FULLPIPE: Fix indentation
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/fullpipe.cpp250
-rw-r--r--engines/fullpipe/gfx.cpp10
-rw-r--r--engines/fullpipe/motion.cpp198
-rw-r--r--engines/fullpipe/scene.cpp5
-rw-r--r--engines/fullpipe/stateloader.cpp184
-rw-r--r--engines/fullpipe/statics.cpp4
-rw-r--r--engines/fullpipe/utils.cpp32
7 files changed, 341 insertions, 342 deletions
diff --git a/engines/fullpipe/fullpipe.cpp b/engines/fullpipe/fullpipe.cpp
index 9db96ae01d..23a93cf3f9 100644
--- a/engines/fullpipe/fullpipe.cpp
+++ b/engines/fullpipe/fullpipe.cpp
@@ -97,150 +97,150 @@ void FullpipeEngine::updateEvents() {
}
void FullpipeEngine::initObjectStates() {
- setLevelStates();
-
- setObjectState(sO_Dude, getObjectEnumState(sO_Dude, sO_NotCarryingEgg));
- setObjectState(sO_EggCracker, getObjectEnumState(sO_EggCracker, sO_NotCrackedEggs));
- setObjectState(sO_GuvTheDrawer, getObjectEnumState(sO_GuvTheDrawer, sO_Awaken));
- setObjectState(sO_EggGulper, getObjectEnumState(sO_EggGulper, sO_First));
- setObjectState(sO_EggGulperGaveCoin, getObjectEnumState(sO_EggGulperGaveCoin, sO_No));
- setObjectState(sO_Jar_4, getObjectEnumState(sO_Jar_4, sO_OnTheSpring));
- setObjectState(sO_GulpedEggs, getObjectEnumState(sO_GulpedEgg, sO_NotPresent));
-
- setSwallowedEggsState();
-
- setObjectState(sO_WeirdWacko, getObjectEnumState(sO_WeirdWacko, sO_InGlasses));
- setObjectState(sO_TumyTrampie, getObjectEnumState(sO_TumyTrampie, sO_Drinking));
- setObjectState(sO_StairsUp_8, getObjectEnumState(sO_StairsUp_8, sO_NotBroken));
- setObjectState(sO_HareTheNooksiter, getObjectEnumState(sO_HareTheNooksiter, sO_WithHandle));
- setObjectState(sO_Elephantine, getObjectEnumState(sO_Elephantine, sO_WithBoot));
- setObjectState(sO_Fly_12, 0);
- setObjectState(sO_ClockAxis, getObjectEnumState(sO_ClockAxis, sO_NotAvailable));
- setObjectState(sO_ClockHandle, getObjectEnumState(sO_ClockHandle, sO_In_7));
- setObjectState(sO_BigMumsy, getObjectEnumState(sO_BigMumsy, sO_Sleeping));
- setObjectState(sO_CoinSlot_1, getObjectEnumState(sO_CoinSlot_1, sO_Empty));
- setObjectState(sO_FriesPit, getObjectEnumState(sO_FriesPit, sO_WithApple));
- setObjectState(sO_Jug, getObjectEnumState(sO_Jug, sO_Blocked));
- setObjectState(sO_RightStairs_9, getObjectEnumState(sO_RightStairs_9, sO_ClosedShe));
- setObjectState(sO_Pipe_9, getObjectEnumState(sO_Pipe_9, sO_WithJug));
- setObjectState(sO_Inflater, getObjectEnumState(sO_Inflater, sO_WithGum));
- setObjectState(sO_Swingie, getObjectEnumState(sO_Swingie, sO_Swinging));
- setObjectState(sO_DudeJumped, getObjectEnumState(sO_DudeJumped, sO_No));
- setObjectState(sO_Bridge, getObjectEnumState(sO_Bridge, sO_Convoluted));
- setObjectState(sO_Guardian, getObjectEnumState(sO_Guardian, sO_OnRight));
- setObjectState(sO_Grandma, getObjectEnumState(sO_Grandma, sO_In_14));
- setObjectState(sO_Boot_15, getObjectEnumState(sO_Boot_15, sO_NotPresent));
- setObjectState(sO_LeftPipe_15, getObjectEnumState(sO_LeftPipe_15, sO_OpenedShe));
- setObjectState(sO_Pedestal_16, getObjectEnumState(sO_Pedestal_16, sO_IsFree));
- setObjectState(sO_Cup, getObjectEnumState(sO_Cup, sO_InSmokeRoom));
- setObjectState(sO_Pedestal_17, getObjectEnumState(sO_Pedestal_17, sO_IsFree));
- setObjectState(sO_UsherHand, getObjectEnumState(sO_UsherHand, sO_WithoutCoin));
- setObjectState(sO_RightPipe_17, getObjectEnumState(sO_RightPipe_17, sO_ClosedShe));
- setObjectState(sO_Fly_17, 1);
- setObjectState(sO_DudeSwinged, 0);
- setObjectState(sO_Girl, getObjectEnumState(sO_Girl, sO_Swinging));
- setObjectState(sO_Sugar, getObjectEnumState(sO_Sugar, sO_Present));
- setObjectState(sO_Janitors, getObjectEnumState(sO_Janitors, sO_Together));
- setObjectState(sO_Bag_22, getObjectEnumState(sO_Bag_22, sO_NotFallen));
- setObjectState(sO_Grandpa, getObjectEnumState(sO_Grandpa, sO_InSock));
- setObjectState(sO_CoinSlot_22, getObjectEnumState(sO_CoinSlot_22, sO_Empty));
- setObjectState(sO_UpperHatch_23, getObjectEnumState(sO_UpperHatch_23, sO_Closed));
- setObjectState(sO_LowerHatch_23, getObjectEnumState(sO_LowerHatch_23, sO_Closed));
- setObjectState(sO_Lever_23, getObjectEnumState(sO_Lever_23, sO_NotTaken));
- setObjectState(sO_LeverHandle_23, getObjectEnumState(sO_LeverHandle_23, sO_WithoutStool));
- setObjectState(sO_LowerPipe_21, getObjectEnumState(sO_LowerPipe_21, sO_ClosedShe));
- setObjectState(sO_StarsDown_24, getObjectEnumState(sO_StarsDown_24, sO_OpenedShe));
- setObjectState(sO_Hatch_26, getObjectEnumState(sO_Hatch_26, sO_Closed));
- setObjectState(sO_Sock_26, getObjectEnumState(sO_Sock_26, sO_NotHanging));
- setObjectState(sO_LeftPipe_26, getObjectEnumState(sO_LeftPipe_26, sO_ClosedShe));
- setObjectState(sO_Valve1_26, getObjectEnumState(sO_Valve1_26, sO_Opened));
- setObjectState(sO_Valve2_26, getObjectEnumState(sO_Valve2_26, sO_Closed));
- setObjectState(sO_Valve3_26, getObjectEnumState(sO_Valve3_26, sO_Closed));
- setObjectState(sO_Valve4_26, getObjectEnumState(sO_Valve4_26, sO_Closed));
- setObjectState(sO_Valve5_26, getObjectEnumState(sO_Valve5_26, sO_Opened));
- setObjectState(sO_Pool, getObjectEnumState(sO_Pool, sO_Overfull));
- setObjectState(sO_Plank_25, getObjectEnumState(sO_Plank_25, sO_NearDudesStairs));
- setObjectState(sO_Driver, getObjectEnumState(sO_Driver, sO_WithSteering));
- setObjectState(sO_Janitress, getObjectEnumState(sO_Janitress, sO_WithMop));
- setObjectState(sO_LeftPipe_29, getObjectEnumState(sO_LeftPipe_29, sO_ClosedShe));
- setObjectState(sO_LeftPipe_30, getObjectEnumState(sO_LeftPipe_30, sO_ClosedShe));
- setObjectState(sO_Leg, getObjectEnumState(sO_Leg, sO_ShowingHeel));
- setObjectState(sO_Tub, getObjectEnumState(sO_Tub, sO_EmptyShe));
- setObjectState(sO_Cactus, getObjectEnumState(sO_Cactus, sO_NotGrown));
- setObjectState(sO_Fireman, getObjectEnumState(sO_Fireman, sO_WithHose));
- setObjectState(sO_Cube, getObjectEnumState(sO_Cube, sO_In_33));
- setObjectState(sO_MommyOfHandle_32, getObjectEnumState(sO_MommyOfHandle_32, sO_WithoutHandle));
- setObjectState(sO_Pedestal_33, getObjectEnumState(sO_Pedestal_33, sO_IsFree));
- setObjectState(sO_Valve_34, getObjectEnumState(sO_Valve_34, sO_WithNothing));
- setObjectState(sO_Stool_34, getObjectEnumState(sO_Stool_34, sO_WithoutDrawer));
- setObjectState(sO_Plank_34, getObjectEnumState(sO_Plank_34, sO_Passive));
- setObjectState(sO_Hatch_34, getObjectEnumState(sO_Hatch_34, sO_Closed));
- setObjectState(sO_Valve_35, getObjectEnumState(sO_Valve_35, sO_TurnedOff));
- setObjectState(sO_Carpet_35, getObjectEnumState(sO_Carpet_35, sO_CannotTake));
- setObjectState(sO_CoinSlot_35, getObjectEnumState(sO_CoinSlot_35, sO_WithCoin));
- setObjectState(sO_BellyInflater, getObjectEnumState(sO_BellyInflater, sO_WithCork));
- setObjectState(sO_Jawcrucnher, getObjectEnumState(sO_Jawcrucnher, sO_WithoutCarpet));
- setObjectState(sO_Guard_1, getObjectEnumState(sO_Guard_1, sO_On));
- setObjectState(sO_Gurad_2, getObjectEnumState(sO_Gurad_2, sO_On));
- setObjectState(sO_Guard_3, getObjectEnumState(sO_Guard_3, sO_On));
- setObjectState(sO_Bottle_38, getObjectEnumState(sO_Bottle_38, sO_OnTheTable));
- setObjectState(sO_Boss, getObjectEnumState(sO_Boss, sO_WithHammer));
+ setLevelStates();
+
+ setObjectState(sO_Dude, getObjectEnumState(sO_Dude, sO_NotCarryingEgg));
+ setObjectState(sO_EggCracker, getObjectEnumState(sO_EggCracker, sO_NotCrackedEggs));
+ setObjectState(sO_GuvTheDrawer, getObjectEnumState(sO_GuvTheDrawer, sO_Awaken));
+ setObjectState(sO_EggGulper, getObjectEnumState(sO_EggGulper, sO_First));
+ setObjectState(sO_EggGulperGaveCoin, getObjectEnumState(sO_EggGulperGaveCoin, sO_No));
+ setObjectState(sO_Jar_4, getObjectEnumState(sO_Jar_4, sO_OnTheSpring));
+ setObjectState(sO_GulpedEggs, getObjectEnumState(sO_GulpedEgg, sO_NotPresent));
+
+ setSwallowedEggsState();
+
+ setObjectState(sO_WeirdWacko, getObjectEnumState(sO_WeirdWacko, sO_InGlasses));
+ setObjectState(sO_TumyTrampie, getObjectEnumState(sO_TumyTrampie, sO_Drinking));
+ setObjectState(sO_StairsUp_8, getObjectEnumState(sO_StairsUp_8, sO_NotBroken));
+ setObjectState(sO_HareTheNooksiter, getObjectEnumState(sO_HareTheNooksiter, sO_WithHandle));
+ setObjectState(sO_Elephantine, getObjectEnumState(sO_Elephantine, sO_WithBoot));
+ setObjectState(sO_Fly_12, 0);
+ setObjectState(sO_ClockAxis, getObjectEnumState(sO_ClockAxis, sO_NotAvailable));
+ setObjectState(sO_ClockHandle, getObjectEnumState(sO_ClockHandle, sO_In_7));
+ setObjectState(sO_BigMumsy, getObjectEnumState(sO_BigMumsy, sO_Sleeping));
+ setObjectState(sO_CoinSlot_1, getObjectEnumState(sO_CoinSlot_1, sO_Empty));
+ setObjectState(sO_FriesPit, getObjectEnumState(sO_FriesPit, sO_WithApple));
+ setObjectState(sO_Jug, getObjectEnumState(sO_Jug, sO_Blocked));
+ setObjectState(sO_RightStairs_9, getObjectEnumState(sO_RightStairs_9, sO_ClosedShe));
+ setObjectState(sO_Pipe_9, getObjectEnumState(sO_Pipe_9, sO_WithJug));
+ setObjectState(sO_Inflater, getObjectEnumState(sO_Inflater, sO_WithGum));
+ setObjectState(sO_Swingie, getObjectEnumState(sO_Swingie, sO_Swinging));
+ setObjectState(sO_DudeJumped, getObjectEnumState(sO_DudeJumped, sO_No));
+ setObjectState(sO_Bridge, getObjectEnumState(sO_Bridge, sO_Convoluted));
+ setObjectState(sO_Guardian, getObjectEnumState(sO_Guardian, sO_OnRight));
+ setObjectState(sO_Grandma, getObjectEnumState(sO_Grandma, sO_In_14));
+ setObjectState(sO_Boot_15, getObjectEnumState(sO_Boot_15, sO_NotPresent));
+ setObjectState(sO_LeftPipe_15, getObjectEnumState(sO_LeftPipe_15, sO_OpenedShe));
+ setObjectState(sO_Pedestal_16, getObjectEnumState(sO_Pedestal_16, sO_IsFree));
+ setObjectState(sO_Cup, getObjectEnumState(sO_Cup, sO_InSmokeRoom));
+ setObjectState(sO_Pedestal_17, getObjectEnumState(sO_Pedestal_17, sO_IsFree));
+ setObjectState(sO_UsherHand, getObjectEnumState(sO_UsherHand, sO_WithoutCoin));
+ setObjectState(sO_RightPipe_17, getObjectEnumState(sO_RightPipe_17, sO_ClosedShe));
+ setObjectState(sO_Fly_17, 1);
+ setObjectState(sO_DudeSwinged, 0);
+ setObjectState(sO_Girl, getObjectEnumState(sO_Girl, sO_Swinging));
+ setObjectState(sO_Sugar, getObjectEnumState(sO_Sugar, sO_Present));
+ setObjectState(sO_Janitors, getObjectEnumState(sO_Janitors, sO_Together));
+ setObjectState(sO_Bag_22, getObjectEnumState(sO_Bag_22, sO_NotFallen));
+ setObjectState(sO_Grandpa, getObjectEnumState(sO_Grandpa, sO_InSock));
+ setObjectState(sO_CoinSlot_22, getObjectEnumState(sO_CoinSlot_22, sO_Empty));
+ setObjectState(sO_UpperHatch_23, getObjectEnumState(sO_UpperHatch_23, sO_Closed));
+ setObjectState(sO_LowerHatch_23, getObjectEnumState(sO_LowerHatch_23, sO_Closed));
+ setObjectState(sO_Lever_23, getObjectEnumState(sO_Lever_23, sO_NotTaken));
+ setObjectState(sO_LeverHandle_23, getObjectEnumState(sO_LeverHandle_23, sO_WithoutStool));
+ setObjectState(sO_LowerPipe_21, getObjectEnumState(sO_LowerPipe_21, sO_ClosedShe));
+ setObjectState(sO_StarsDown_24, getObjectEnumState(sO_StarsDown_24, sO_OpenedShe));
+ setObjectState(sO_Hatch_26, getObjectEnumState(sO_Hatch_26, sO_Closed));
+ setObjectState(sO_Sock_26, getObjectEnumState(sO_Sock_26, sO_NotHanging));
+ setObjectState(sO_LeftPipe_26, getObjectEnumState(sO_LeftPipe_26, sO_ClosedShe));
+ setObjectState(sO_Valve1_26, getObjectEnumState(sO_Valve1_26, sO_Opened));
+ setObjectState(sO_Valve2_26, getObjectEnumState(sO_Valve2_26, sO_Closed));
+ setObjectState(sO_Valve3_26, getObjectEnumState(sO_Valve3_26, sO_Closed));
+ setObjectState(sO_Valve4_26, getObjectEnumState(sO_Valve4_26, sO_Closed));
+ setObjectState(sO_Valve5_26, getObjectEnumState(sO_Valve5_26, sO_Opened));
+ setObjectState(sO_Pool, getObjectEnumState(sO_Pool, sO_Overfull));
+ setObjectState(sO_Plank_25, getObjectEnumState(sO_Plank_25, sO_NearDudesStairs));
+ setObjectState(sO_Driver, getObjectEnumState(sO_Driver, sO_WithSteering));
+ setObjectState(sO_Janitress, getObjectEnumState(sO_Janitress, sO_WithMop));
+ setObjectState(sO_LeftPipe_29, getObjectEnumState(sO_LeftPipe_29, sO_ClosedShe));
+ setObjectState(sO_LeftPipe_30, getObjectEnumState(sO_LeftPipe_30, sO_ClosedShe));
+ setObjectState(sO_Leg, getObjectEnumState(sO_Leg, sO_ShowingHeel));
+ setObjectState(sO_Tub, getObjectEnumState(sO_Tub, sO_EmptyShe));
+ setObjectState(sO_Cactus, getObjectEnumState(sO_Cactus, sO_NotGrown));
+ setObjectState(sO_Fireman, getObjectEnumState(sO_Fireman, sO_WithHose));
+ setObjectState(sO_Cube, getObjectEnumState(sO_Cube, sO_In_33));
+ setObjectState(sO_MommyOfHandle_32, getObjectEnumState(sO_MommyOfHandle_32, sO_WithoutHandle));
+ setObjectState(sO_Pedestal_33, getObjectEnumState(sO_Pedestal_33, sO_IsFree));
+ setObjectState(sO_Valve_34, getObjectEnumState(sO_Valve_34, sO_WithNothing));
+ setObjectState(sO_Stool_34, getObjectEnumState(sO_Stool_34, sO_WithoutDrawer));
+ setObjectState(sO_Plank_34, getObjectEnumState(sO_Plank_34, sO_Passive));
+ setObjectState(sO_Hatch_34, getObjectEnumState(sO_Hatch_34, sO_Closed));
+ setObjectState(sO_Valve_35, getObjectEnumState(sO_Valve_35, sO_TurnedOff));
+ setObjectState(sO_Carpet_35, getObjectEnumState(sO_Carpet_35, sO_CannotTake));
+ setObjectState(sO_CoinSlot_35, getObjectEnumState(sO_CoinSlot_35, sO_WithCoin));
+ setObjectState(sO_BellyInflater, getObjectEnumState(sO_BellyInflater, sO_WithCork));
+ setObjectState(sO_Jawcrucnher, getObjectEnumState(sO_Jawcrucnher, sO_WithoutCarpet));
+ setObjectState(sO_Guard_1, getObjectEnumState(sO_Guard_1, sO_On));
+ setObjectState(sO_Gurad_2, getObjectEnumState(sO_Gurad_2, sO_On));
+ setObjectState(sO_Guard_3, getObjectEnumState(sO_Guard_3, sO_On));
+ setObjectState(sO_Bottle_38, getObjectEnumState(sO_Bottle_38, sO_OnTheTable));
+ setObjectState(sO_Boss, getObjectEnumState(sO_Boss, sO_WithHammer));
}
void FullpipeEngine::setLevelStates() {
- CGameVar *v = _gameLoader->_gameVar->getSubVarByName("OBJSTATES")->getSubVarByName(sO_LiftButtons);
-
- if (v) {
- v->setSubVarAsInt(sO_Level0, 2833);
- v->setSubVarAsInt(sO_Level1, 2754);
- v->setSubVarAsInt(sO_Level2, 2757);
- v->setSubVarAsInt(sO_Level3, 2760);
- v->setSubVarAsInt(sO_Level4, 2763);
- v->setSubVarAsInt(sO_Level5, 2766);
- v->setSubVarAsInt(sO_Level6, 2769);
- v->setSubVarAsInt(sO_Level7, 2772);
- v->setSubVarAsInt(sO_Level8, 2775);
- v->setSubVarAsInt(sO_Level9, 2778);
- }
+ CGameVar *v = _gameLoader->_gameVar->getSubVarByName("OBJSTATES")->getSubVarByName(sO_LiftButtons);
+
+ if (v) {
+ v->setSubVarAsInt(sO_Level0, 2833);
+ v->setSubVarAsInt(sO_Level1, 2754);
+ v->setSubVarAsInt(sO_Level2, 2757);
+ v->setSubVarAsInt(sO_Level3, 2760);
+ v->setSubVarAsInt(sO_Level4, 2763);
+ v->setSubVarAsInt(sO_Level5, 2766);
+ v->setSubVarAsInt(sO_Level6, 2769);
+ v->setSubVarAsInt(sO_Level7, 2772);
+ v->setSubVarAsInt(sO_Level8, 2775);
+ v->setSubVarAsInt(sO_Level9, 2778);
+ }
}
void FullpipeEngine::setSwallowedEggsState() {
- CGameVar *v = _gameLoader->_gameVar->getSubVarByName("OBJSTATES")->getSubVarByName(sO_GulpedEggs);
+ CGameVar *v = _gameLoader->_gameVar->getSubVarByName("OBJSTATES")->getSubVarByName(sO_GulpedEggs);
- _swallowedEgg1 = v->getSubVarByName(sO_Egg1);
- _swallowedEgg2 = v->getSubVarByName(sO_Egg2);
- _swallowedEgg3 = v->getSubVarByName(sO_Egg3);
+ _swallowedEgg1 = v->getSubVarByName(sO_Egg1);
+ _swallowedEgg2 = v->getSubVarByName(sO_Egg2);
+ _swallowedEgg3 = v->getSubVarByName(sO_Egg3);
- _swallowedEgg1->_value.intValue = 0;
- _swallowedEgg2->_value.intValue = 0;
- _swallowedEgg3->_value.intValue = 0;
+ _swallowedEgg1->_value.intValue = 0;
+ _swallowedEgg2->_value.intValue = 0;
+ _swallowedEgg3->_value.intValue = 0;
}
int FullpipeEngine::getObjectEnumState(const char *name, const char *state) {
- CGameVar *var = _gameLoader->_gameVar->getSubVarByName("OBJSTATES");
+ CGameVar *var = _gameLoader->_gameVar->getSubVarByName("OBJSTATES");
- if (!var) {
- var = _gameLoader->_gameVar->addSubVarAsInt("OBJSTATES", 0);
- }
+ if (!var) {
+ var = _gameLoader->_gameVar->addSubVarAsInt("OBJSTATES", 0);
+ }
- var = var->getSubVarByName(name);
- if (var) {
- var = var->getSubVarByName("ENUMSTATES");
- if (var)
- return var->getSubVarAsInt(state);
- }
+ var = var->getSubVarByName(name);
+ if (var) {
+ var = var->getSubVarByName("ENUMSTATES");
+ if (var)
+ return var->getSubVarAsInt(state);
+ }
- return 0;
+ return 0;
}
void FullpipeEngine::setObjectState(const char *name, int state) {
- CGameVar *var = _gameLoader->_gameVar->getSubVarByName("OBJSTATES");
+ CGameVar *var = _gameLoader->_gameVar->getSubVarByName("OBJSTATES");
- if (!var) {
- var = _gameLoader->_gameVar->addSubVarAsInt("OBJSTATES", 0);
- }
+ if (!var) {
+ var = _gameLoader->_gameVar->addSubVarAsInt("OBJSTATES", 0);
+ }
- var->setSubVarAsInt(name, state);
+ var->setSubVarAsInt(name, state);
}
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp
index 74037da238..15a3defa59 100644
--- a/engines/fullpipe/gfx.cpp
+++ b/engines/fullpipe/gfx.cpp
@@ -64,9 +64,9 @@ bool Background::load(MfcArchive &file) {
for (int i = 0; i < _bigPictureArray1Count; i++) {
_bigPictureArray[i] = (BigPicture **)calloc(_bigPictureArray2Count, sizeof(BigPicture *));
for (int j = 0; j < _bigPictureArray2Count; j++) {
- _bigPictureArray[i][j] = new BigPicture();
+ _bigPictureArray[i][j] = new BigPicture();
- _bigPictureArray[i][j]->load(file);
+ _bigPictureArray[i][j]->load(file);
}
}
@@ -80,7 +80,7 @@ void Background::addPictureObject(PictureObject *pct) {
bool inserted = false;
for (uint i = 0; i < _picObjList.size(); i++) {
if (((PictureObject *)_picObjList[i])->_priority == pct->_priority) {
- _picObjList.insert_at(i, pct);
+ _picObjList.insert_at(i, pct);
inserted = true;
break;
}
@@ -92,7 +92,7 @@ void Background::addPictureObject(PictureObject *pct) {
}
void Background::renumPictures(PictureObject *pct) {
- int *buf = (int *)calloc(_picObjList.size() + 2, sizeof(int));
+ int *buf = (int *)calloc(_picObjList.size() + 2, sizeof(int));
for (uint i = 0; i < _picObjList.size(); i++) {
if (pct->_id == ((PictureObject *)_picObjList[i])->_id)
@@ -166,7 +166,7 @@ bool GameObject::load(MfcArchive &file) {
_priority = file.readUint16LE();
if (g_fullpipe->_gameProjectVersion >= 11) {
- _field_8 = file.readUint32LE();
+ _field_8 = file.readUint32LE();
}
return true;
diff --git a/engines/fullpipe/motion.cpp b/engines/fullpipe/motion.cpp
index 3ff61816ef..4acf568328 100644
--- a/engines/fullpipe/motion.cpp
+++ b/engines/fullpipe/motion.cpp
@@ -44,26 +44,26 @@ bool CMctlCompound::load(MfcArchive &file) {
debug(6, "CMctlCompound::count = %d", count);
for (int i = 0; i < count; i++) {
- debug(6, "CompoundArray[%d]", i);
- CMctlCompoundArrayItem *obj = (CMctlCompoundArrayItem *)file.readClass();
+ debug(6, "CompoundArray[%d]", i);
+ CMctlCompoundArrayItem *obj = (CMctlCompoundArrayItem *)file.readClass();
- int count1 = file.readUint32LE();
+ int count1 = file.readUint32LE();
- debug(6, "ConnectionPoint::count: %d", count1);
- for (int j = 0; j < count1; j++) {
- debug(6, "ConnectionPoint[%d]", j);
- CMctlConnectionPoint *obj1 = (CMctlConnectionPoint *)file.readClass();
+ debug(6, "ConnectionPoint::count: %d", count1);
+ for (int j = 0; j < count1; j++) {
+ debug(6, "ConnectionPoint[%d]", j);
+ CMctlConnectionPoint *obj1 = (CMctlConnectionPoint *)file.readClass();
- obj->_connectionPoints.push_back(*obj1);
- }
+ obj->_connectionPoints.push_back(*obj1);
+ }
- obj->_field_20 = file.readUint32LE();
- obj->_field_24 = file.readUint32LE();
+ obj->_field_20 = file.readUint32LE();
+ obj->_field_24 = file.readUint32LE();
- debug(6, "graphReact");
- obj->_movGraphReactObj = (CMovGraphReact *)file.readClass();
+ debug(6, "graphReact");
+ obj->_movGraphReactObj = (CMovGraphReact *)file.readClass();
- _motionControllers.push_back(*obj);
+ _motionControllers.push_back(*obj);
}
return true;
@@ -80,144 +80,144 @@ bool CMctlCompoundArray::load(MfcArchive &file) {
}
CMovGraph::CMovGraph() {
- _itemsCount = 0;
- _items = 0;
- //_callback1 = CMovGraphCallback1; // TODO
- _field_44 = 0;
- // insertMessageHandler(CMovGraph_messageHandler, getMessageHandlersCount() - 1, 129);
+ _itemsCount = 0;
+ _items = 0;
+ //_callback1 = CMovGraphCallback1; // TODO
+ _field_44 = 0;
+ // insertMessageHandler(CMovGraph_messageHandler, getMessageHandlersCount() - 1, 129);
}
bool CMovGraph::load(MfcArchive &file) {
- _links.load(file);
- _nodes.load(file);
+ _links.load(file);
+ _nodes.load(file);
- return true;
+ return true;
}
CMovGraphLink::CMovGraphLink() {
- _distance = 0;
- _angle = 0;
- _flags = 0x10000000;
- _movGraphNode2 = 0;
- _movGraphNode1 = 0;
- _field_3C = 0;
- _field_38 = 0;
- _movGraphReact = 0;
+ _distance = 0;
+ _angle = 0;
+ _flags = 0x10000000;
+ _movGraphNode2 = 0;
+ _movGraphNode1 = 0;
+ _field_3C = 0;
+ _field_38 = 0;
+ _movGraphReact = 0;
}
bool CMovGraphLink::load(MfcArchive &file) {
- _dwordArray1.load(file);
- _dwordArray2.load(file);
+ _dwordArray1.load(file);
+ _dwordArray2.load(file);
- _flags = file.readUint32LE();
+ _flags = file.readUint32LE();
- debug(8, "GraphNode1");
- _movGraphNode1 = (CMovGraphNode *)file.readClass();
- debug(8, "GraphNode2");
- _movGraphNode2 = (CMovGraphNode *)file.readClass();
+ debug(8, "GraphNode1");
+ _movGraphNode1 = (CMovGraphNode *)file.readClass();
+ debug(8, "GraphNode2");
+ _movGraphNode2 = (CMovGraphNode *)file.readClass();
- _distance = file.readDouble();
- _angle = file.readDouble();
+ _distance = file.readDouble();
+ _angle = file.readDouble();
- debug(8, "distance: %g, angle: %g", _distance, _angle);
+ debug(8, "distance: %g, angle: %g", _distance, _angle);
- _movGraphReact = (CMovGraphReact *)file.readClass();
- _name = file.readPascalString();
+ _movGraphReact = (CMovGraphReact *)file.readClass();
+ _name = file.readPascalString();
- return true;
+ return true;
}
bool CMovGraphNode::load(MfcArchive &file) {
- _field_14 = file.readUint32LE();
- _x = file.readUint32LE();
- _y = file.readUint32LE();
- _distance = file.readUint32LE();
+ _field_14 = file.readUint32LE();
+ _x = file.readUint32LE();
+ _y = file.readUint32LE();
+ _distance = file.readUint32LE();
- return true;
+ return true;
}
CReactParallel::CReactParallel() {
- _x1 = 0;
- _x2 = 0;
- _dy = 0;
- _dx = 0;
- _points = 0;
- _y1 = 0;
- _y2 = 0;
+ _x1 = 0;
+ _x2 = 0;
+ _dy = 0;
+ _dx = 0;
+ _points = 0;
+ _y1 = 0;
+ _y2 = 0;
}
bool CReactParallel::load(MfcArchive &file) {
- _x1 = file.readUint32LE();
- _y1 = file.readUint32LE();
- _x2 = file.readUint32LE();
- _y2 = file.readUint32LE();
- _dx = file.readUint32LE();
- _dy = file.readUint32LE();
+ _x1 = file.readUint32LE();
+ _y1 = file.readUint32LE();
+ _x2 = file.readUint32LE();
+ _y2 = file.readUint32LE();
+ _dx = file.readUint32LE();
+ _dy = file.readUint32LE();
- createRegion();
+ createRegion();
- return true;
+ return true;
}
void CReactParallel::createRegion() {
- _points = (Common::Point **)malloc(sizeof(Common::Point *) * 4);
+ _points = (Common::Point **)malloc(sizeof(Common::Point *) * 4);
+
+ for (int i = 0; i < 4; i++)
+ _points[i] = new Common::Point;
- for (int i = 0; i < 4; i++)
- _points[i] = new Common::Point;
+ double at = atan2(_x1 - _x2, _y1 - _y2) + 1.570796;
+ double sn = sin(at);
+ double cs = cos(at);
- double at = atan2(_x1 - _x2, _y1 - _y2) + 1.570796;
- double sn = sin(at);
- double cs = cos(at);
+ _points[0]->x = (int16)(_x1 - _dx * cs);
+ _points[0]->y = (int16)(_y1 - _dx * sn);
- _points[0]->x = (int16)(_x1 - _dx * cs);
- _points[0]->y = (int16)(_y1 - _dx * sn);
+ _points[1]->x = (int16)(_x2 - _dx * cs);
+ _points[1]->y = (int16)(_y2 - _dx * sn);
- _points[1]->x = (int16)(_x2 - _dx * cs);
- _points[1]->y = (int16)(_y2 - _dx * sn);
-
- _points[2]->x = (int16)(_x1 + _dy * cs);
- _points[2]->y = (int16)(_y2 + _dy * sn);
+ _points[2]->x = (int16)(_x1 + _dy * cs);
+ _points[2]->y = (int16)(_y2 + _dy * sn);
- _points[3]->x = (int16)(_x1 + _dy * cs);
- _points[3]->y = (int16)(_y1 + _dy * sn);
+ _points[3]->x = (int16)(_x1 + _dy * cs);
+ _points[3]->y = (int16)(_y1 + _dy * sn);
- // GdiObject::Attach(_rgn, CreatePolygonRgn(_points, 4, 2);
+ // GdiObject::Attach(_rgn, CreatePolygonRgn(_points, 4, 2);
}
CReactPolygonal::CReactPolygonal() {
- _field_C = 0;
- _points = 0;
- _pointCount = 0;
- _field_10 = 0;
+ _field_C = 0;
+ _points = 0;
+ _pointCount = 0;
+ _field_10 = 0;
}
bool CReactPolygonal::load(MfcArchive &file) {
- _field_C = file.readUint32LE();
- _field_10 = file.readUint32LE();
- _pointCount = file.readUint32LE();
+ _field_C = file.readUint32LE();
+ _field_10 = file.readUint32LE();
+ _pointCount = file.readUint32LE();
- if (_pointCount > 0) {
- _points = (Common::Point **)malloc(sizeof(Common::Point *) * _pointCount);
+ if (_pointCount > 0) {
+ _points = (Common::Point **)malloc(sizeof(Common::Point *) * _pointCount);
- for (int i = 0; i < _pointCount; i++) {
- _points[i] = new Common::Point;
+ for (int i = 0; i < _pointCount; i++) {
+ _points[i] = new Common::Point;
- _points[i]->x = file.readUint32LE();
- _points[i]->y = file.readUint32LE();
- }
+ _points[i]->x = file.readUint32LE();
+ _points[i]->y = file.readUint32LE();
+ }
- }
+ }
- createRegion();
+ createRegion();
- return true;
+ return true;
}
void CReactPolygonal::createRegion() {
- if (_points) {
+ if (_points) {
- // GdiObject::Attach(_rgn, CreatePolygonRgn(_points, _pointCount, 2);
- }
+ // GdiObject::Attach(_rgn, CreatePolygonRgn(_points, _pointCount, 2);
+ }
}
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/scene.cpp b/engines/fullpipe/scene.cpp
index 7a5d663bc3..4d8f9617f0 100644
--- a/engines/fullpipe/scene.cpp
+++ b/engines/fullpipe/scene.cpp
@@ -180,11 +180,10 @@ bool Scene::load(MfcArchive &file) {
strcpy(fname, _stringObj);
strcpy(strrchr(fname, '.') + 1, "col");
- MemoryObject *col = new MemoryObject();
+ MemoryObject *col = new MemoryObject();
col->loadFile(fname);
_colorMemoryObj = col;
-
}
char *shdname = genFileName(0, _sceneId, "shd");
@@ -203,7 +202,7 @@ bool Scene::load(MfcArchive &file) {
if (g_fullpipe->_flgSoundList) {
char *nlname = genFileName(17, _sceneId, "nl");
-
+
_soundList->loadFile(slsname, nlname);
free(nlname);
diff --git a/engines/fullpipe/stateloader.cpp b/engines/fullpipe/stateloader.cpp
index 57e3921ba5..47952babfe 100644
--- a/engines/fullpipe/stateloader.cpp
+++ b/engines/fullpipe/stateloader.cpp
@@ -469,82 +469,82 @@ bool CGameVar::load(MfcArchive &file) {
}
CGameVar *CGameVar::getSubVarByName(const char *name) {
- CGameVar *sv = 0;
+ CGameVar *sv = 0;
- if (_subVars != 0) {
- sv = _subVars;
- for (;sv && scumm_stricmp(sv->_stringObj, name); sv = sv->_nextVarObj)
- ;
- }
- return sv;
+ if (_subVars != 0) {
+ sv = _subVars;
+ for (;sv && scumm_stricmp(sv->_stringObj, name); sv = sv->_nextVarObj)
+ ;
+ }
+ return sv;
}
bool CGameVar::setSubVarAsInt(const char *name, int value) {
- CGameVar *var = getSubVarByName(name);
+ CGameVar *var = getSubVarByName(name);
- if (var) {
- if (var->_varType == 0) {
- var->_value.intValue = value;
+ if (var) {
+ if (var->_varType == 0) {
+ var->_value.intValue = value;
- return true;
- }
- return false;
- }
+ return true;
+ }
+ return false;
+ }
- var = new CGameVar();
- var->_varType = 0;
- var->_value.intValue = value;
- var->_stringObj = (char *)calloc(strlen(name) + 1, 1);
- strcpy(var->_stringObj, name);
+ var = new CGameVar();
+ var->_varType = 0;
+ var->_value.intValue = value;
+ var->_stringObj = (char *)calloc(strlen(name) + 1, 1);
+ strcpy(var->_stringObj, name);
- return addSubVar(var);
+ return addSubVar(var);
}
int CGameVar::getSubVarAsInt(const char *name) {
- CGameVar *var = getSubVarByName(name);
+ CGameVar *var = getSubVarByName(name);
- if (var)
- return var->_value.intValue;
- else
- return 0;
+ if (var)
+ return var->_value.intValue;
+ else
+ return 0;
}
CGameVar *CGameVar::addSubVarAsInt(const char *name, int value) {
- if (getSubVarByName(name)) {
- return 0;
- } else {
- CGameVar *var = new CGameVar();
+ if (getSubVarByName(name)) {
+ return 0;
+ } else {
+ CGameVar *var = new CGameVar();
- var->_varType = 0;
- var->_value.intValue = value;
+ var->_varType = 0;
+ var->_value.intValue = value;
- var->_stringObj = (char *)calloc(strlen(name) + 1, 1);
- strcpy(var->_stringObj, name);
+ var->_stringObj = (char *)calloc(strlen(name) + 1, 1);
+ strcpy(var->_stringObj, name);
- return (addSubVar(var) != 0) ? var : 0;
- }
+ return (addSubVar(var) != 0) ? var : 0;
+ }
}
bool CGameVar::addSubVar(CGameVar *subvar) {
- CGameVar *var = _subVars;
+ CGameVar *var = _subVars;
- if (var) {
- for (CGameVar *i = var->_nextVarObj; i; i = i->_nextVarObj)
- var = i;
+ if (var) {
+ for (CGameVar *i = var->_nextVarObj; i; i = i->_nextVarObj)
+ var = i;
- var->_nextVarObj = subvar;
- subvar->_prevVarObj = var;
- subvar->_parentVarObj = var;
-
- return true;
- } else {
- var->_subVars = subvar;
- subvar->_parentVarObj = var;
+ var->_nextVarObj = subvar;
+ subvar->_prevVarObj = var;
+ subvar->_parentVarObj = var;
- return true;
- }
+ return true;
+ } else {
+ var->_subVars = subvar;
+ subvar->_parentVarObj = var;
- return false;
+ return true;
+ }
+
+ return false;
}
Sc2::Sc2() {
@@ -571,27 +571,27 @@ bool Sc2::load(MfcArchive &file) {
_count1 = file.readUint32LE();
debug(4, "count1: %d", _count1);
if (_count1 > 0) {
- _data1 = (int32 *)malloc(_count1 * sizeof(int32));
-
- for (int i = 0; i < _count1; i++) {
- _data1[i] = file.readUint32LE();
- }
+ _data1 = (int32 *)malloc(_count1 * sizeof(int32));
+
+ for (int i = 0; i < _count1; i++) {
+ _data1[i] = file.readUint32LE();
+ }
} else {
- _data1 = 0;
+ _data1 = 0;
}
_defPicAniInfosCount = file.readUint32LE();
debug(4, "defPicAniInfos: %d", _defPicAniInfosCount);
if (_defPicAniInfosCount > 0) {
- _defPicAniInfos = (PicAniInfo **)malloc(_defPicAniInfosCount * sizeof(PicAniInfo *));
+ _defPicAniInfos = (PicAniInfo **)malloc(_defPicAniInfosCount * sizeof(PicAniInfo *));
- for (int i = 0; i < _defPicAniInfosCount; i++) {
- _defPicAniInfos[i] = new PicAniInfo();
+ for (int i = 0; i < _defPicAniInfosCount; i++) {
+ _defPicAniInfos[i] = new PicAniInfo();
- _defPicAniInfos[i]->load(file);
- }
+ _defPicAniInfos[i]->load(file);
+ }
} else {
- _defPicAniInfos = 0;
+ _defPicAniInfos = 0;
}
_picAniInfos = 0;
@@ -601,14 +601,14 @@ bool Sc2::load(MfcArchive &file) {
debug(4, "_entranceData: %d", _entranceDataCount);
if (_entranceDataCount > 0) {
- _entranceData = (EntranceInfo **)malloc(_defPicAniInfosCount * sizeof(EntranceInfo *));
+ _entranceData = (EntranceInfo **)malloc(_defPicAniInfosCount * sizeof(EntranceInfo *));
- for (int i = 0; i < _entranceDataCount; i++) {
- _entranceData[i] = new EntranceInfo();
- _entranceData[i]->load(file);
- }
+ for (int i = 0; i < _entranceDataCount; i++) {
+ _entranceData[i] = new EntranceInfo();
+ _entranceData[i]->load(file);
+ }
} else {
- _entranceData = 0;
+ _entranceData = 0;
}
debug(4, "pos: %d, 0x%x: %d", file.size(), file.pos(), file.size() - file.pos());
@@ -617,33 +617,33 @@ bool Sc2::load(MfcArchive &file) {
}
bool PicAniInfo::load(MfcArchive &file) {
- type = file.readUint32LE();
- objectId = file.readUint16LE();
- field_6 = file.readUint16LE();
- field_8 = file.readUint32LE();
- field_C = file.readUint16LE();
- field_E = file.readUint16LE();
- ox = file.readUint32LE();
- oy = file.readUint32LE();
- priority = file.readUint32LE();
- staticsId = file.readUint16LE();
- movementId = file.readUint16LE();
- dynamicPhaseIndex = file.readUint16LE();
- flags = file.readUint16LE();
- field_24 = file.readUint32LE();
- someDynamicPhaseIndex = file.readUint32LE();
-
- return true;
+ type = file.readUint32LE();
+ objectId = file.readUint16LE();
+ field_6 = file.readUint16LE();
+ field_8 = file.readUint32LE();
+ field_C = file.readUint16LE();
+ field_E = file.readUint16LE();
+ ox = file.readUint32LE();
+ oy = file.readUint32LE();
+ priority = file.readUint32LE();
+ staticsId = file.readUint16LE();
+ movementId = file.readUint16LE();
+ dynamicPhaseIndex = file.readUint16LE();
+ flags = file.readUint16LE();
+ field_24 = file.readUint32LE();
+ someDynamicPhaseIndex = file.readUint32LE();
+
+ return true;
}
bool EntranceInfo::load(MfcArchive &file) {
- sceneId = file.readUint32LE();
- field_4 = file.readUint32LE();
- messageQueueId = file.readUint32LE();
- file.read(gap_C, 292); // FIXME, Ugh
- field_130 = file.readUint32LE();
+ sceneId = file.readUint32LE();
+ field_4 = file.readUint32LE();
+ messageQueueId = file.readUint32LE();
+ file.read(gap_C, 292); // FIXME, Ugh
+ field_130 = file.readUint32LE();
- return true;
+ return true;
}
} // End of namespace Fullpipe
diff --git a/engines/fullpipe/statics.cpp b/engines/fullpipe/statics.cpp
index 04aa8cf85c..f59342e3e9 100644
--- a/engines/fullpipe/statics.cpp
+++ b/engines/fullpipe/statics.cpp
@@ -53,7 +53,7 @@ bool StaticANIObject::load(MfcArchive &file) {
for (int i = 0; i < count; i++) {
Statics *st = new Statics();
-
+
st->load(file);
_staticsList.push_back(st);
}
@@ -62,7 +62,7 @@ bool StaticANIObject::load(MfcArchive &file) {
debug(7, "Movements: %d", count);
for (int i = 0; i < count; i++) {
- int movNum = file.readUint16LE();
+ int movNum = file.readUint16LE();
char *movname = genFileName(_id, movNum, "mov");
diff --git a/engines/fullpipe/utils.cpp b/engines/fullpipe/utils.cpp
index 0b75ab5ede..88a21a08fe 100644
--- a/engines/fullpipe/utils.cpp
+++ b/engines/fullpipe/utils.cpp
@@ -105,7 +105,7 @@ char *MfcArchive::readPascalString(bool twoByte) {
}
MemoryObject::MemoryObject() {
- _filename = 0;
+ _filename = 0;
_field_8 = 0;
_field_C = 0;
_field_10 = -1;
@@ -169,20 +169,20 @@ int MfcArchive::readCount() {
}
double MfcArchive::readDouble() {
- // FIXME: This is utterly cruel and unportable
-
- union {
- struct {
- int32 a;
- int32 b;
- } i;
- double d;
- } tmp;
-
- tmp.i.a = readUint32LE();
- tmp.i.b = readUint32LE();
-
- return tmp.d;
+ // FIXME: This is utterly cruel and unportable
+
+ union {
+ struct {
+ int32 a;
+ int32 b;
+ } i;
+ double d;
+ } tmp;
+
+ tmp.i.a = readUint32LE();
+ tmp.i.b = readUint32LE();
+
+ return tmp.d;
}
enum {
@@ -380,7 +380,7 @@ byte *transCyrillic(byte *s) {
0xf1, 0xd181, 0xf2, 0xd182, 0xf3, 0xd183, 0xf4, 0xd184,
0xf5, 0xd185, 0xf6, 0xd186, 0xf7, 0xd187, 0xf8, 0xd188,
0xf9, 0xd189, 0xfa, 0xd18a, 0xfb, 0xd18b, 0xfc, 0xd18c,
- 0xfd, 0xd18d, 0xfe, 0xd18e, 0xff, 0xd18f };
+ 0xfd, 0xd18d, 0xfe, 0xd18e, 0xff, 0xd18f };
int i = 0;