aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe/scenes
diff options
context:
space:
mode:
authorColin Snover2017-11-14 22:30:35 -0600
committerEugene Sandulenko2017-11-18 22:35:12 +0100
commite2367f3ed2060b273559200b3e40f75a98bb6a6f (patch)
treecfea744f09c075bedb9b3f4a3e9489bf5b14d829 /engines/fullpipe/scenes
parent39ea2f66ac635613c3a817c16f80b11ac207d320 (diff)
downloadscummvm-rg350-e2367f3ed2060b273559200b3e40f75a98bb6a6f.tar.gz
scummvm-rg350-e2367f3ed2060b273559200b3e40f75a98bb6a6f.tar.bz2
scummvm-rg350-e2367f3ed2060b273559200b3e40f75a98bb6a6f.zip
FULLPIPE: Remove unnecessary and unsafe C-style casts
Diffstat (limited to 'engines/fullpipe/scenes')
-rw-r--r--engines/fullpipe/scenes/scene03.cpp2
-rw-r--r--engines/fullpipe/scenes/scene04.cpp4
-rw-r--r--engines/fullpipe/scenes/scene06.cpp4
-rw-r--r--engines/fullpipe/scenes/scene11.cpp7
-rw-r--r--engines/fullpipe/scenes/scene33.cpp2
-rw-r--r--engines/fullpipe/scenes/sceneDbg.cpp2
6 files changed, 9 insertions, 12 deletions
diff --git a/engines/fullpipe/scenes/scene03.cpp b/engines/fullpipe/scenes/scene03.cpp
index 25b48dea3c..1882ecf459 100644
--- a/engines/fullpipe/scenes/scene03.cpp
+++ b/engines/fullpipe/scenes/scene03.cpp
@@ -210,7 +210,7 @@ void sceneHandler03_takeEgg(ExCommand *ex) {
&& ex1) {
if (ex1->_objtype == kObjTypeObjstateCommand) {
- ObjstateCommand *com = (ObjstateCommand *)ex1;
+ ObjstateCommand *com = static_cast<ObjstateCommand *>(ex1);
com->_value = g_fp->getObjectEnumState(sO_EggGulper, sO_WantsNothing);
}
diff --git a/engines/fullpipe/scenes/scene04.cpp b/engines/fullpipe/scenes/scene04.cpp
index ae8e5674f7..c899e46ab9 100644
--- a/engines/fullpipe/scenes/scene04.cpp
+++ b/engines/fullpipe/scenes/scene04.cpp
@@ -958,7 +958,7 @@ void sceneHandler04_walkKozyawka() {
void sceneHandler04_bottleUpdateObjects(int off) {
for (Common::List<GameObject *>::iterator it = g_vars->scene04_bottleObjList.begin(); it != g_vars->scene04_bottleObjList.end(); ++it) {
if ((*it)->_objtype == kObjTypeStaticANIObject) {
- StaticANIObject *st = (StaticANIObject *)*it;
+ StaticANIObject *st = static_cast<StaticANIObject *>(*it);
st->setOXY(st->_ox, off + st->_oy);
} else {
@@ -1138,7 +1138,7 @@ void sceneHandler04_leaveLadder(ExCommand *ex) {
if (!(g_fp->_aniMan->_flags & 0x100)) {
if (getSc2MctlCompoundBySceneId(g_fp->_currentScene->_sceneId)->_objtype == kObjTypeMctlCompound) {
- MctlCompound *mc = (MctlCompound *)getSc2MctlCompoundBySceneId(g_fp->_currentScene->_sceneId);
+ MctlCompound *mc = static_cast<MctlCompound *>(getSc2MctlCompoundBySceneId(g_fp->_currentScene->_sceneId));
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)) {
diff --git a/engines/fullpipe/scenes/scene06.cpp b/engines/fullpipe/scenes/scene06.cpp
index f434848c05..54b3fb7ed5 100644
--- a/engines/fullpipe/scenes/scene06.cpp
+++ b/engines/fullpipe/scenes/scene06.cpp
@@ -53,13 +53,13 @@ int scene06_updateCursor() {
return PIC_CSR_ARCADE2_D;
}
- if (g_fp->_aniMan == (StaticANIObject *)g_fp->_objectAtCursor) {
+ if (g_fp->_aniMan == 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_fp->_objectAtCursor && (StaticANIObject *)g_fp->_objectAtCursor == g_vars->scene06_currentBall
+ } else if (g_fp->_objectAtCursor && g_fp->_objectAtCursor == g_vars->scene06_currentBall
&& g_fp->_cursorId == PIC_CSR_DEFAULT) {
g_fp->_cursorId = PIC_CSR_ITN;
}
diff --git a/engines/fullpipe/scenes/scene11.cpp b/engines/fullpipe/scenes/scene11.cpp
index 72af59aacf..6a08677571 100644
--- a/engines/fullpipe/scenes/scene11.cpp
+++ b/engines/fullpipe/scenes/scene11.cpp
@@ -134,9 +134,7 @@ void scene11_initScene(Scene *sc) {
getCurrSceneSc2MotionController()->enableLinks(sO_CloseThing1, 1);
getCurrSceneSc2MotionController()->enableLinks(sO_CloseThing2, 1);
getCurrSceneSc2MotionController()->enableLinks(sO_CloseThing3, 0);
-
- ((MctlCompound *)getCurrSceneSc2MotionController())->replaceNodeX(805, 905);
-
+ getCurrSceneSc2MotionController()->replaceNodeX(805, 905);
getSc2MctlCompoundBySceneId(sc->_sceneId)->replaceNodeX(303, 353);
} else if (swingie == g_fp->getObjectEnumState(sO_Swingie, sO_IsStandingInBoots)
|| swingie == g_fp->getObjectEnumState(sO_Swingie, sO_IsStandingInCorner)) {
@@ -148,8 +146,7 @@ void scene11_initScene(Scene *sc) {
getCurrSceneSc2MotionController()->enableLinks(sO_CloseThing1, 0);
getCurrSceneSc2MotionController()->enableLinks(sO_CloseThing2, 1);
getCurrSceneSc2MotionController()->enableLinks(sO_CloseThing3, 0);
-
- ((MctlCompound *)getCurrSceneSc2MotionController())->replaceNodeX(905, 805);
+ getCurrSceneSc2MotionController()->replaceNodeX(905, 805);
} else {
g_vars->scene11_swingIsSwinging = false;
g_vars->scene11_swingieStands = false;
diff --git a/engines/fullpipe/scenes/scene33.cpp b/engines/fullpipe/scenes/scene33.cpp
index 717e9f6572..6719673c7b 100644
--- a/engines/fullpipe/scenes/scene33.cpp
+++ b/engines/fullpipe/scenes/scene33.cpp
@@ -211,7 +211,7 @@ void sceneHandler33_clickZones(ExCommand *cmd) {
double mindist = 1e10;
for (uint i = 0; i < g_fp->_currentScene->_staticANIObjectList1.size(); i++) {
- StaticANIObject *ani = (StaticANIObject *)g_fp->_currentScene->_staticANIObjectList1[i];
+ StaticANIObject *ani = g_fp->_currentScene->_staticANIObjectList1[i];
if (ani->_id == ANI_VENT_33) {
int dx = ani->_ox - cmd->_sceneClickX;
diff --git a/engines/fullpipe/scenes/sceneDbg.cpp b/engines/fullpipe/scenes/sceneDbg.cpp
index 4d061e603c..759480d1f0 100644
--- a/engines/fullpipe/scenes/sceneDbg.cpp
+++ b/engines/fullpipe/scenes/sceneDbg.cpp
@@ -45,7 +45,7 @@ GameObject *sceneHandlerDbgMenu_getObjectAtXY(int x, int y) {
return 0;
for (uint i = 1; i < g_fp->_currentScene->_picObjList.size(); i++) {
- PictureObject *pic = (PictureObject *)g_fp->_currentScene->_picObjList[i];
+ PictureObject *pic = g_fp->_currentScene->_picObjList[i];
if (x >= pic->_ox && y >= pic->_oy) {
const Dims dims = pic->getDimensions();