[Scummvm-git-logs] scummvm master -> 487039489a01e8f72ddf5570429fec6598c2f8bc
dreammaster
dreammaster at scummvm.org
Mon Jun 28 00:04:06 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
487039489a AGS: Fix end sequence of MMM 8 aborting partway through
Commit: 487039489a01e8f72ddf5570429fec6598c2f8bc
https://github.com/scummvm/scummvm/commit/487039489a01e8f72ddf5570429fec6598c2f8bc
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2021-06-27T17:03:56-07:00
Commit Message:
AGS: Fix end sequence of MMM 8 aborting partway through
Changed paths:
engines/ags/engine/ac/global_api.cpp
engines/ags/engine/ac/global_character.cpp
engines/ags/engine/ac/global_character.h
diff --git a/engines/ags/engine/ac/global_api.cpp b/engines/ags/engine/ac/global_api.cpp
index ce9c626945..52c99ffa56 100644
--- a/engines/ags/engine/ac/global_api.cpp
+++ b/engines/ags/engine/ac/global_api.cpp
@@ -927,7 +927,7 @@ RuntimeScriptValue Sc_MoveCharacter(const RuntimeScriptValue *params, int32_t pa
// void (int chaa,int xx,int yy,int direct)
RuntimeScriptValue Sc_MoveCharacterBlocking(const RuntimeScriptValue *params, int32_t param_count) {
- API_SCALL_VOID_PINT4(MoveCharacterBlocking);
+ API_SCALL_INT_PINT4(MoveCharacterBlocking);
}
// void (int cc,int xx, int yy)
diff --git a/engines/ags/engine/ac/global_character.cpp b/engines/ags/engine/ac/global_character.cpp
index 1e58ffd41f..2c1288764c 100644
--- a/engines/ags/engine/ac/global_character.cpp
+++ b/engines/ags/engine/ac/global_character.cpp
@@ -350,7 +350,7 @@ void MoveCharacterToHotspot(int chaa, int hotsp) {
GameLoopUntilNotMoving(&_GP(game).chars[chaa].walking);
}
-void MoveCharacterBlocking(int chaa, int xx, int yy, int direct) {
+int MoveCharacterBlocking(int chaa, int xx, int yy, int direct) {
if (!is_valid_character(chaa))
quit("!MoveCharacterBlocking: invalid character");
@@ -358,7 +358,7 @@ void MoveCharacterBlocking(int chaa, int xx, int yy, int direct) {
// ticked -- otherwise this will hang the game
if (_GP(game).chars[chaa].on != 1) {
debug_script_warn("MoveCharacterBlocking: character is turned off (is Hide Player Character selected?) and cannot be moved");
- return;
+ return 0;
}
if (direct)
@@ -367,6 +367,7 @@ void MoveCharacterBlocking(int chaa, int xx, int yy, int direct) {
MoveCharacter(chaa, xx, yy);
GameLoopUntilNotMoving(&_GP(game).chars[chaa].walking);
+ return 1;
}
int GetCharacterSpeechAnimationDelay(CharacterInfo *cha) {
diff --git a/engines/ags/engine/ac/global_character.h b/engines/ags/engine/ac/global_character.h
index b015b55037..24b3cecaaf 100644
--- a/engines/ags/engine/ac/global_character.h
+++ b/engines/ags/engine/ac/global_character.h
@@ -65,7 +65,7 @@ void SetCharacterClickable(int cha, int clik);
void SetCharacterIgnoreWalkbehinds(int cha, int clik);
void MoveCharacterToObject(int chaa, int obbj);
void MoveCharacterToHotspot(int chaa, int hotsp);
-void MoveCharacterBlocking(int chaa, int xx, int yy, int direct);
+int MoveCharacterBlocking(int chaa, int xx, int yy, int direct);
void RunCharacterInteraction(int cc, int mood);
int AreCharObjColliding(int charid, int objid);
More information about the Scummvm-git-logs
mailing list