[Scummvm-git-logs] scummvm master -> 5752cb110d343d7219d55c65c33253c406dfc893
sev-
sev at scummvm.org
Sat Apr 4 11:52:46 UTC 2020
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:
4829527810 DIRECTOR: More robust preprocessing for `sound` command
5752cb110d CRYO: Use ScummVM packing headers instead of direct #pragmas
Commit: 482952781028a7f5544843ada60214a03f4295e7
https://github.com/scummvm/scummvm/commit/482952781028a7f5544843ada60214a03f4295e7
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-04T13:52:25+02:00
Commit Message:
DIRECTOR: More robust preprocessing for `sound` command
Changed paths:
engines/director/lingo/lingo-preprocessor.cpp
diff --git a/engines/director/lingo/lingo-preprocessor.cpp b/engines/director/lingo/lingo-preprocessor.cpp
index b7b10e8f16..2b3b8dbb4d 100644
--- a/engines/director/lingo/lingo-preprocessor.cpp
+++ b/engines/director/lingo/lingo-preprocessor.cpp
@@ -341,6 +341,10 @@ const char *strcasestr(const char *s, const char *find) {
}
#endif
+// "hello" & return && "world" -> "hello" & scummvm_return && "world"
+//
+// This is to let the grammar not confuse RETURN constant with
+// return command
Common::String preprocessReturn(Common::String in) {
Common::String res, prev, next;
const char *ptr = in.c_str();
@@ -375,6 +379,7 @@ Common::String preprocessReturn(Common::String in) {
return res;
}
+// play done -> play #done
Common::String preprocessPlay(Common::String in) {
Common::String res, next;
const char *ptr = in.c_str();
@@ -404,6 +409,7 @@ Common::String preprocessPlay(Common::String in) {
return res;
}
+// sound fadeIn 5, 10 -> sound #fadeIn, 5, 10
Common::String preprocessSound(Common::String in) {
Common::String res, next;
const char *ptr = in.c_str();
@@ -417,16 +423,20 @@ Common::String preprocessSound(Common::String in) {
debugC(2, kDebugLingoParse, "SOUND: nexttok: %s", next.c_str());
+ bool modified = false;
+
if (next.equalsIgnoreCase("close") ||
next.equalsIgnoreCase("fadeIn") ||
next.equalsIgnoreCase("fadeOut") ||
next.equalsIgnoreCase("playFile") ||
next.equalsIgnoreCase("stop")) {
res += '#'; // Turn it into SYMBOL
+ modified = true;
}
res += next;
- res += ',';
+ if (modified)
+ res += ',';
ptr += next.size();
beg = ptr;
}
Commit: 5752cb110d343d7219d55c65c33253c406dfc893
https://github.com/scummvm/scummvm/commit/5752cb110d343d7219d55c65c33253c406dfc893
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-04T13:52:25+02:00
Commit Message:
CRYO: Use ScummVM packing headers instead of direct #pragmas
Changed paths:
engines/cryo/defs.h
diff --git a/engines/cryo/defs.h b/engines/cryo/defs.h
index 370dfc46a5..0f78fe8b12 100644
--- a/engines/cryo/defs.h
+++ b/engines/cryo/defs.h
@@ -305,7 +305,8 @@ enum PersonFlags {
};
}
-#pragma pack(push, 1)
+#include "common/pack-start.h"
+
struct perso_t {
uint16 _roomNum; // room this person currently in
uint16 _actionId; // TODO: checkme
@@ -596,7 +597,7 @@ struct global_t {
uint16 _party;
uint16 _partyOutside;
uint16 _metPersonsMask2;
- uint16 _var1C; //TODO: write-only?
+ uint16 _var1C; //TODO: write-only?
uint16 _phaseActionsCount;
uint16 _curAreaFlags;
uint16 _curItemsMask;
@@ -756,7 +757,8 @@ public:
uint16 _count;
PakHeaderItem* _files;
};
-#pragma pack(pop)
+
+#include "common/pack-end.h"
struct Citadel {
int16 _id;
More information about the Scummvm-git-logs
mailing list