TWINE: fixed free camera movement in other scenes

This commit is contained in:
Martin Gerhardy 2020-11-15 18:25:49 +01:00
parent 5f0c807a05
commit cde33bd76f
3 changed files with 3 additions and 3 deletions

View file

@ -39,8 +39,6 @@ void DebugGrid::changeGridCamera() {
return; return;
} }
ScopedKeyMap scopedKeyMap(_engine, mainKeyMapId);
if (_engine->_input->isActionActive(TwinEActionType::DebugGridCameraPressUp)) { if (_engine->_input->isActionActive(TwinEActionType::DebugGridCameraPressUp)) {
_engine->_grid->newCameraZ--; _engine->_grid->newCameraZ--;
_engine->_redraw->reqBgRedraw = true; _engine->_redraw->reqBgRedraw = true;

View file

@ -437,6 +437,7 @@ void Redraw::redrawEngineActions(int32 bgRedraw) { // fullRedraw
// Drawing unknown // Drawing unknown
else if (flags < 0x1000) { else if (flags < 0x1000) {
// TODO reverse this part of the code // TODO reverse this part of the code
warning("Not yet reversed part of the rendering code");
} }
// Drawing sprite actors // Drawing sprite actors
else if (flags == 0x1000) { else if (flags == 0x1000) {

View file

@ -26,6 +26,7 @@
#include "common/util.h" #include "common/util.h"
#include "twine/actor.h" #include "twine/actor.h"
#include "twine/animations.h" #include "twine/animations.h"
#include "twine/debug_grid.h"
#include "twine/extra.h" #include "twine/extra.h"
#include "twine/gamestate.h" #include "twine/gamestate.h"
#include "twine/grid.h" #include "twine/grid.h"
@ -449,7 +450,7 @@ void Scene::processActorZones(int32 actorIdx) {
} }
break; break;
case kCamera: case kCamera:
if (currentlyFollowedActor == actorIdx) { if (currentlyFollowedActor == actorIdx && !_engine->_debugGrid->useFreeCamera) {
_engine->disableScreenRecenter = true; _engine->disableScreenRecenter = true;
if (_engine->_grid->newCameraX != zone->infoData.CameraView.x || _engine->_grid->newCameraY != zone->infoData.CameraView.y || _engine->_grid->newCameraZ != zone->infoData.CameraView.z) { if (_engine->_grid->newCameraX != zone->infoData.CameraView.x || _engine->_grid->newCameraY != zone->infoData.CameraView.y || _engine->_grid->newCameraZ != zone->infoData.CameraView.z) {
_engine->_grid->newCameraX = zone->infoData.CameraView.x; _engine->_grid->newCameraX = zone->infoData.CameraView.x;