TWINE: renamed scene patch variable to _enableEnhancements

scumm engine is using this wording, and we should keep it in sync if we ever expose
this option more globally
This commit is contained in:
Martin Gerhardy 2022-04-18 10:56:41 +02:00
parent b51b2519d8
commit 337eac68fd
5 changed files with 8 additions and 8 deletions

View File

@ -71,7 +71,7 @@ TwinEConsole::TwinEConsole(TwinEEngine *engine) : _engine(engine), GUI::Debugger
registerCmd("set_holomap_flag", WRAP_METHOD(TwinEConsole, doSetHolomapFlag));
registerCmd("set_holomap_trajectory", WRAP_METHOD(TwinEConsole, doSetHolomapTrajectory));
registerCmd("show_holomap_flag", WRAP_METHOD(TwinEConsole, doPrintGameFlag));
registerCmd("toggle_scene_patches", WRAP_METHOD(TwinEConsole, doToggleScenePatches));
registerCmd("toggle_enhancements", WRAP_METHOD(TwinEConsole, doToggleEnhancements));
}
TwinEConsole::~TwinEConsole() {
@ -109,8 +109,8 @@ bool TwinEConsole::doToggleGodMode(int argc, const char **argv) {
return true;
}
bool TwinEConsole::doToggleScenePatches(int argc, const char **argv) {
TOGGLE_DEBUG(_engine->_scene->_useScenePatches, "use scene patches\n")
bool TwinEConsole::doToggleEnhancements(int argc, const char **argv) {
TOGGLE_DEBUG(_engine->_scene->_enableEnhancements, "enable enhancements\n")
return true;
}

View File

@ -57,7 +57,7 @@ private:
bool doToggleActorRendering(int argc, const char **argv);
bool doToggleTrackRendering(int argc, const char **argv);
bool doToggleGodMode(int argc, const char **argv);
bool doToggleScenePatches(int argc, const char **argv);
bool doToggleEnhancements(int argc, const char **argv);
bool doToggleFreeCamera(int argc, const char **argv);
bool doToggleSceneChanges(int argc, const char **argv);
bool doToggleSceneRendering(int argc, const char **argv);

View File

@ -392,7 +392,7 @@ bool Scene::loadSceneLBA1() {
point->z = (int16)stream.readUint16LE();
}
if (_useScenePatches) {
if (_enableEnhancements) {
switch (_currentSceneIdx) {
case LBA1SceneId::Hamalayi_Mountains_landing_place:
_sceneActors[21]._pos.x = _sceneActors[21]._collisionPos.x = 6656 + 256;
@ -483,7 +483,7 @@ void Scene::dumpSceneScripts() const {
void Scene::changeScene() {
if (_engine->isLBA1()) {
if (_useScenePatches) {
if (_enableEnhancements) {
if (_currentSceneIdx == LBA1SceneId::Citadel_Island_Harbor && _needChangeScene == LBA1SceneId::Principal_Island_Harbor) {
if (_sceneNumZones >= 15 && _sceneNumTracks >= 8) {
const ZoneStruct *zone = &_sceneZones[15];

View File

@ -195,7 +195,7 @@ public:
int16 _currentlyFollowedActor = OWN_ACTOR_SCENE_INDEX;
/** Current actor in zone - climbing a ladder */
bool _currentActorInZone = false;
bool _useScenePatches = false;
bool _enableEnhancements = false;
/** Current actor manipulated in scripts */
int16 _currentScriptValue = 0;

View File

@ -1233,7 +1233,7 @@ static int32 lZOOM(TwinEEngine *engine, LifeScriptContext &ctx) {
static int32 lPOS_POINT(TwinEEngine *engine, LifeScriptContext &ctx) {
const int32 trackIdx = ctx.stream.readByte();
debugC(3, kDebugLevels::kDebugScripts, "LIFE::POS_POINT(%i)", (int)trackIdx);
if (engine->_scene->_useScenePatches) {
if (engine->_scene->_enableEnhancements) {
if (IS_HERO(ctx.actorIdx) && engine->_scene->_currentSceneIdx == LBA1SceneId::Citadel_Island_Harbor && trackIdx == 8) {
ctx.stream.rewind(2);
ctx.stream.writeByte(0x34); // CHANGE_CUBE