[Scummvm-git-logs] scummvm master -> a28e064dfeea30341a8d848d31098f785148262d

lephilousophe noreply at scummvm.org
Thu Oct 31 08:06:11 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:
55fe1525ac AGS: Fix int vs int32 discrepancies
a28e064dfe AGS: Add missing stub when Freetype is not available


Commit: 55fe1525aca5fc48ad274ac08ae618b46b562eda
    https://github.com/scummvm/scummvm/commit/55fe1525aca5fc48ad274ac08ae618b46b562eda
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2024-10-31T08:53:43+01:00

Commit Message:
AGS: Fix int vs int32 discrepancies

Changed paths:
    engines/ags/engine/ac/draw.cpp
    engines/ags/engine/ac/dynobj/cc_serializer.cpp
    engines/ags/engine/ac/dynobj/cc_serializer.h
    engines/ags/engine/ac/lip_sync.h
    engines/ags/shared/ac/game_setup_struct.cpp
    engines/ags/shared/ac/game_setup_struct.h
    engines/ags/shared/ac/game_setup_struct_base.h


diff --git a/engines/ags/engine/ac/draw.cpp b/engines/ags/engine/ac/draw.cpp
index 6a58a778a14..0c3ed7581ba 100644
--- a/engines/ags/engine/ac/draw.cpp
+++ b/engines/ags/engine/ac/draw.cpp
@@ -843,7 +843,7 @@ static void sync_object_texture(ObjTexture &obj, bool has_alpha = false, bool op
 			}
 		} else { // if does not exist, then create and share one
 			obj.SpriteNotify.reset(new (uint32_t)(obj.SpriteID));
-			_G(drawstate).SpriteNotifyMap.insert(std::make_pair((int)obj.SpriteID, obj.SpriteNotify));
+			_G(drawstate).SpriteNotifyMap.insert(std::make_pair((sprkey_t)obj.SpriteID, obj.SpriteNotify));
 		}
 	} else {
 		obj.SpriteNotify = nullptr; // reset, for static sprite or without ID
diff --git a/engines/ags/engine/ac/dynobj/cc_serializer.cpp b/engines/ags/engine/ac/dynobj/cc_serializer.cpp
index 6a61249a5c3..c7d0af36ee0 100644
--- a/engines/ags/engine/ac/dynobj/cc_serializer.cpp
+++ b/engines/ags/engine/ac/dynobj/cc_serializer.cpp
@@ -41,7 +41,7 @@ using namespace AGS::Shared;
 
 // *** De-serialization of script objects
 
-void AGSDeSerializer::Unserialize(int index, const char *objectType, const char *serializedData, int dataSize) {
+void AGSDeSerializer::Unserialize(int32_t index, const char *objectType, const char *serializedData, int dataSize) {
 	if (dataSize < 0) {
 		quitprintf("Unserialise: invalid data size (%d) for object type '%s'", dataSize, objectType);
 		return; // TODO: don't quit, return error
diff --git a/engines/ags/engine/ac/dynobj/cc_serializer.h b/engines/ags/engine/ac/dynobj/cc_serializer.h
index 1f2cb973b19..c0d167412f9 100644
--- a/engines/ags/engine/ac/dynobj/cc_serializer.h
+++ b/engines/ags/engine/ac/dynobj/cc_serializer.h
@@ -27,7 +27,7 @@
 namespace AGS3 {
 
 struct AGSDeSerializer : ICCObjectCollectionReader {
-	void Unserialize(int index, const char *objectType, const char *serializedData, int dataSize) override;
+	void Unserialize(int32_t index, const char *objectType, const char *serializedData, int dataSize) override;
 };
 
 } // namespace AGS3
diff --git a/engines/ags/engine/ac/lip_sync.h b/engines/ags/engine/ac/lip_sync.h
index ba847339efe..6910f027a90 100644
--- a/engines/ags/engine/ac/lip_sync.h
+++ b/engines/ags/engine/ac/lip_sync.h
@@ -26,7 +26,7 @@ namespace AGS3 {
 
 struct SpeechLipSyncLine {
 	char  filename[14];
-	std::vector<int> endtimeoffs;
+	std::vector<int32_t> endtimeoffs;
 	std::vector<short> frame;
 	short numPhonemes;
 };
diff --git a/engines/ags/shared/ac/game_setup_struct.cpp b/engines/ags/shared/ac/game_setup_struct.cpp
index 5e2d64772aa..d3a4ef2f011 100644
--- a/engines/ags/shared/ac/game_setup_struct.cpp
+++ b/engines/ags/shared/ac/game_setup_struct.cpp
@@ -214,7 +214,7 @@ void GameSetupStruct::read_lipsync(Shared::Stream *in, GameDataVersion data_ver)
 		in->ReadArray(&lipSyncFrameLetters[0][0], MAXLIPSYNCFRAMES, 50);
 }
 
-void GameSetupStruct::read_messages(Shared::Stream *in, const std::array<int> &load_messages, GameDataVersion data_ver) {
+void GameSetupStruct::read_messages(Shared::Stream *in, const std::array<int32_t> &load_messages, GameDataVersion data_ver) {
 	char mbuf[GLOBALMESLENGTH];
 	for (int i = 0; i < MAXGLOBALMES; ++i) {
 		if (!load_messages[i])
diff --git a/engines/ags/shared/ac/game_setup_struct.h b/engines/ags/shared/ac/game_setup_struct.h
index 88174ab5f54..177e9b935c5 100644
--- a/engines/ags/shared/ac/game_setup_struct.h
+++ b/engines/ags/shared/ac/game_setup_struct.h
@@ -155,7 +155,7 @@ struct GameSetupStruct : public GameSetupStructBase {
 	// Part 2
 	void read_characters(Shared::Stream *in);
 	void read_lipsync(Shared::Stream *in, GameDataVersion data_ver);
-	void read_messages(Shared::Stream *in, const std::array<int> &load_messages, GameDataVersion data_ver);
+	void read_messages(Shared::Stream *in, const std::array<int32_t> &load_messages, GameDataVersion data_ver);
 
 	void ReadCharacters(Shared::Stream *in);
 	void WriteCharacters(Shared::Stream *out);
diff --git a/engines/ags/shared/ac/game_setup_struct_base.h b/engines/ags/shared/ac/game_setup_struct_base.h
index c4c209ec83b..b8281a3d26b 100644
--- a/engines/ags/shared/ac/game_setup_struct_base.h
+++ b/engines/ags/shared/ac/game_setup_struct_base.h
@@ -103,7 +103,7 @@ struct GameSetupStructBase {
 	struct SerializeInfo {
 		bool HasCCScript = false;
 		bool HasWordsDict = false;
-		std::array<int> HasMessages;
+		std::array<int32_t> HasMessages;
 		// File offset at which game data extensions begin
 		uint32_t ExtensionOffset = 0u;
 


Commit: a28e064dfeea30341a8d848d31098f785148262d
    https://github.com/scummvm/scummvm/commit/a28e064dfeea30341a8d848d31098f785148262d
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2024-10-31T08:59:33+01:00

Commit Message:
AGS: Add missing stub when Freetype is not available

Changed paths:
    engines/ags/lib/alfont/alfont.cpp


diff --git a/engines/ags/lib/alfont/alfont.cpp b/engines/ags/lib/alfont/alfont.cpp
index b201695639b..f9e657dac59 100644
--- a/engines/ags/lib/alfont/alfont.cpp
+++ b/engines/ags/lib/alfont/alfont.cpp
@@ -5192,6 +5192,7 @@ int alfont_set_font_size(ALFONT_FONT *f, int h) { return 0; }
 int alfont_set_font_size_ex(ALFONT_FONT *f, int h, int flags) { return 0; }
 int alfont_get_font_height(ALFONT_FONT *f) { return 0; }
 int alfont_get_font_real_height(ALFONT_FONT *f) { return 0; }
+void alfont_get_font_real_vextent(ALFONT_FONT *f, int *top, int *bottom) { *top = 0; *bottom = 0; }
 int alfont_text_mode(int mode) { return 0; }
 void alfont_textout_aa(BITMAP *bmp, ALFONT_FONT *f, const char *s, int x, int y, int color) {}
 void alfont_textout(BITMAP *bmp, ALFONT_FONT *f, const char *s, int x, int y, int color) {}




More information about the Scummvm-git-logs mailing list