[Scummvm-git-logs] scummvm master -> d0d366de50883d5d6ac902c979de715c554e3054
mgerhardy
noreply at scummvm.org
Fri Oct 11 08:37:55 UTC 2024
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
26b4e3bc3e TWINE: added missing condition logging for channel scripts
d0d366de50 COMMON: fixed whitespaces
Commit: 26b4e3bc3e79a7ecd72e1c62fc820b6728c17eb1
https://github.com/scummvm/scummvm/commit/26b4e3bc3e79a7ecd72e1c62fc820b6728c17eb1
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2024-10-11T10:35:00+02:00
Commit Message:
TWINE: added missing condition logging for channel scripts
Changed paths:
engines/twine/script/script_life.cpp
diff --git a/engines/twine/script/script_life.cpp b/engines/twine/script/script_life.cpp
index 3fac184d70e..5ae58c3c1ca 100644
--- a/engines/twine/script/script_life.cpp
+++ b/engines/twine/script/script_life.cpp
@@ -399,34 +399,41 @@ static ReturnType processLifeConditions(TwinEEngine *engine, LifeScriptContext &
case kcRND: {
int32 val = ctx.stream.readByte();
engine->_scene->_currentScriptValue = engine->getRandomNumber(val);
+ debugCN(3, kDebugLevels::kDebugScripts, "rand(%i, ", val);
conditionValueSize = ReturnType::RET_U8;
break;
}
case kcBETA:
engine->_scene->_currentScriptValue = ctx.actor->_beta;
+ debugCN(3, kDebugLevels::kDebugScripts, "beta(");
conditionValueSize = ReturnType::RET_S16;
break;
case kcBETA_OBJ: {
int32 actorIdx = ctx.stream.readByte();
+ debugCN(3, kDebugLevels::kDebugScripts, "beta_obj(%i", actorIdx);
engine->_scene->_currentScriptValue = engine->_scene->getActor(actorIdx)->_beta;
conditionValueSize = ReturnType::RET_S16;
break;
}
case kcDEMO:
+ debugCN(3, kDebugLevels::kDebugScripts, "isdemo(");
engine->_scene->_currentScriptValue = engine->isDemo() ? 1 : 0; // TODO: slide demo is 2
break;
case kcOBJECT_DISPLAYED: {
int32 actorIdx = ctx.stream.readByte();
+ debugCN(3, kDebugLevels::kDebugScripts, "drawn_obj(%i", actorIdx);
engine->_scene->_currentScriptValue = engine->_scene->getActor(actorIdx)->_workFlags.bWasDrawn ? 1 : 0;
break;
}
case kcPROCESSOR:
// TODO psx = 2, pentium = 0, 486 = 1
+ debugCN(3, kDebugLevels::kDebugScripts, "processor(");
engine->_scene->_currentScriptValue = 0;
break;
case kcANGLE: {
conditionValueSize = ReturnType::RET_S16;
int32 actorIdx = ctx.stream.readByte();
+ debugCN(3, kDebugLevels::kDebugScripts, "angle(%i, %i", ctx.actorIdx, actorIdx);
ActorStruct *otherActor = engine->_scene->getActor(actorIdx);
if (otherActor->_workFlags.bIsDead) {
engine->_scene->_currentScriptValue = MAX_TARGET_ACTOR_DISTANCE;
@@ -442,6 +449,7 @@ static ReturnType processLifeConditions(TwinEEngine *engine, LifeScriptContext &
case kcANGLE_OBJ: {
conditionValueSize = ReturnType::RET_S16;
int32 actorIdx = ctx.stream.readByte();
+ debugCN(3, kDebugLevels::kDebugScripts, "angle_obj(%i, %i", actorIdx, ctx.actorIdx);
ActorStruct *otherActor = engine->_scene->getActor(actorIdx);
if (otherActor->_workFlags.bIsDead) {
engine->_scene->_currentScriptValue = MAX_TARGET_ACTOR_DISTANCE;
@@ -457,6 +465,7 @@ static ReturnType processLifeConditions(TwinEEngine *engine, LifeScriptContext &
case kcREAL_ANGLE: {
conditionValueSize = ReturnType::RET_S16;
int32 actorIdx = ctx.stream.readByte();
+ debugCN(3, kDebugLevels::kDebugScripts, "real_angle(%i", actorIdx);
ActorStruct *otherActor = engine->_scene->getActor(actorIdx);
if (otherActor->_workFlags.bIsDead) {
engine->_scene->_currentScriptValue = MAX_TARGET_ACTOR_DISTANCE;
@@ -472,6 +481,7 @@ static ReturnType processLifeConditions(TwinEEngine *engine, LifeScriptContext &
break;
}
case kcCOL_DECORS:
+ debugCN(3, kDebugLevels::kDebugScripts, "col_decors(");
if (ctx.actor->_workFlags.bIsDead) {
engine->_scene->_currentScriptValue = 255;
break;
@@ -481,6 +491,7 @@ static ReturnType processLifeConditions(TwinEEngine *engine, LifeScriptContext &
break;
case kcCOL_DECORS_OBJ: {
int32 actorIdx = ctx.stream.readByte();
+ debugCN(3, kDebugLevels::kDebugScripts, "col_decors_obj(%i", actorIdx);
ActorStruct *otherActor = engine->_scene->getActor(actorIdx);
if (otherActor->_workFlags.bIsDead) {
engine->_scene->_currentScriptValue = 255;
@@ -492,6 +503,7 @@ static ReturnType processLifeConditions(TwinEEngine *engine, LifeScriptContext &
}
case kcLADDER: {
int32 num = ctx.stream.readByte();
+ debugCN(3, kDebugLevels::kDebugScripts, "ladder(%i", num);
int n = 0;
engine->_scene->_currentScriptValue = 2;
while (engine->_scene->_currentScriptValue == 2 && n < engine->_scene->_sceneNumZones) {
Commit: d0d366de50883d5d6ac902c979de715c554e3054
https://github.com/scummvm/scummvm/commit/d0d366de50883d5d6ac902c979de715c554e3054
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2024-10-11T10:36:14+02:00
Commit Message:
COMMON: fixed whitespaces
Changed paths:
common/debug.cpp
diff --git a/common/debug.cpp b/common/debug.cpp
index 3e763e017b7..3dc37c8b212 100644
--- a/common/debug.cpp
+++ b/common/debug.cpp
@@ -197,7 +197,7 @@ static void debugHelper(const char *s, va_list va, int level, uint32 debugChanne
Common::LogWatcher logWatcher = Common::getLogWatcher();
if (logWatcher)
- (*logWatcher)(LogMessageType::kDebug, level, debugChannels, buf.c_str());
+ (*logWatcher)(LogMessageType::kDebug, level, debugChannels, buf.c_str());
if (g_system)
g_system->logMessage(LogMessageType::kDebug, buf.c_str());
More information about the Scummvm-git-logs
mailing list