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

lephilousophe lephilousophe at users.noreply.github.com
Wed Jul 21 10:16:40 UTC 2021


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:
b477db94b3 AGS: Fix int/int32 build failures
f9ece38aec AGS: Fix build when Vorbis is not available


Commit: b477db94b393fde5c02528b231f13537449fdb35
    https://github.com/scummvm/scummvm/commit/b477db94b393fde5c02528b231f13537449fdb35
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2021-07-21T12:14:52+02:00

Commit Message:
AGS: Fix int/int32 build failures

Changed paths:
    engines/ags/plugins/ags_waves/draw.cpp
    engines/ags/plugins/ags_waves/vars.h
    engines/ags/plugins/ags_waves/warper.cpp
    engines/ags/plugins/ags_waves/weather.cpp


diff --git a/engines/ags/plugins/ags_waves/draw.cpp b/engines/ags/plugins/ags_waves/draw.cpp
index 85c55b0110..80acdd67ae 100644
--- a/engines/ags/plugins/ags_waves/draw.cpp
+++ b/engines/ags/plugins/ags_waves/draw.cpp
@@ -43,9 +43,9 @@ void AGSWaves::DrawBlur(ScriptMethodParams &params) {
 	uint32 *pixelb = (uint32 *)_engine->GetRawBitmapSurface(src);
 	uint32 *pixela = (uint32 *)_engine->GetRawBitmapSurface(src2);
 	_engine->ReleaseBitmapSurface(src2);
-	int src_width = 640;
-	int src_height = 360;
-	int src_depth = 32;
+	int32 src_width = 640;
+	int32 src_height = 360;
+	int32 src_depth = 32;
 
 	_engine->GetBitmapDimensions(src, &src_width, &src_height, &src_depth);
 
@@ -147,9 +147,9 @@ void AGSWaves::DrawTunnel(ScriptMethodParams &params) {
 	d_time = speed;
 	BITMAP *src = _engine->GetSpriteGraphic(spriteD);
 	uint32 *pixela = (uint32 *)_engine->GetRawBitmapSurface(src);
-	int src_width = 640;
-	int src_height = 360;
-	int src_depth = 32;
+	int32 src_width = 640;
+	int32 src_height = 360;
+	int32 src_depth = 32;
 	_engine->GetBitmapDimensions(src, &src_width, &src_height, &src_depth);
 
 	BITMAP *src2 = _engine->GetSpriteGraphic(int(scale));
@@ -199,9 +199,9 @@ void AGSWaves::DrawCylinder(ScriptMethodParams &params) {
 
 	BITMAP *src = _engine->GetSpriteGraphic(spriteD);
 	uint32 *pixela = (uint32 *)_engine->GetRawBitmapSurface(src);
-	int src_width = 640;
-	int src_height = 640;
-	int src_depth = 32;
+	int32 src_width = 640;
+	int32 src_height = 640;
+	int32 src_depth = 32;
 	_engine->GetBitmapDimensions(src, &src_width, &src_height, &src_depth);
 
 	BITMAP *src2 = _engine->GetSpriteGraphic(ogsprite);
@@ -261,9 +261,9 @@ void AGSWaves::DrawForceField(ScriptMethodParams &params) {
 
 	uint32 *pixelb = (uint32 *)_engine->GetRawBitmapSurface(src);
 
-	int src_width = 640;
-	int src_height = 360;
-	int src_depth = 32;
+	int32 src_width = 640;
+	int32 src_height = 360;
+	int32 src_depth = 32;
 
 	_engine->GetBitmapDimensions(src, &src_width, &src_height, &src_depth);
 
@@ -326,9 +326,9 @@ void AGSWaves::SpriteSkew(ScriptMethodParams &params) {
 	BITMAP *src = _engine->GetSpriteGraphic(sprite);
 	uint32 *pixel_src = (uint32 *)_engine->GetRawBitmapSurface(src);
 
-	int src_width = 640;
-	int src_height = 360;
-	int src_depth = 32;
+	int32 src_width = 640;
+	int32 src_height = 360;
+	int32 src_depth = 32;
 	_engine->GetBitmapDimensions(src, &src_width, &src_height, &src_depth);
 	_engine->ReleaseBitmapSurface(src);
 
@@ -407,9 +407,9 @@ void AGSWaves::Grayscale(ScriptMethodParams &params) {
 	BITMAP *src = _engine->GetSpriteGraphic(sprite);
 	uint32 *pixels = (uint32 *)_engine->GetRawBitmapSurface(src);
 
-	int src_width = 640;
-	int src_height = 360;
-	int src_depth = 32;
+	int32 src_width = 640;
+	int32 src_height = 360;
+	int32 src_depth = 32;
 
 	_engine->GetBitmapDimensions(src, &src_width, &src_height, &src_depth);
 
@@ -429,16 +429,16 @@ void AGSWaves::BlendTwoSprites(ScriptMethodParams &params) {
 	PARAMS2(int, graphic, int, refgraphic);
 
 	BITMAP *src = _engine->GetSpriteGraphic(graphic);
-	int src_width = 640;
-	int src_height = 360;
-	int src_depth = 32;
+	int32 src_width = 640;
+	int32 src_height = 360;
+	int32 src_depth = 32;
 	_engine->GetBitmapDimensions(src, &src_width, &src_height, &src_depth);
 	uint32 *sprite_pixels = (uint32 *)_engine->GetRawBitmapSurface(src);
 
 	BITMAP *refsrc = _engine->GetSpriteGraphic(refgraphic);
-	int refsrc_width = 640;
-	int refsrc_height = 360;
-	int refsrc_depth = 32;
+	int32 refsrc_width = 640;
+	int32 refsrc_height = 360;
+	int32 refsrc_depth = 32;
 	_engine->GetBitmapDimensions(refsrc, &refsrc_width, &refsrc_height, &refsrc_depth);
 	uint32 *refsprite_pixels = (uint32 *)_engine->GetRawBitmapSurface(refsrc);
 	_engine->ReleaseBitmapSurface(refsrc);
@@ -474,16 +474,16 @@ void AGSWaves::Blend(ScriptMethodParams &params) {
 	PARAMS4(int, graphic, int, refgraphic, bool, screen, int, perc);
 
 	BITMAP *src = _engine->GetSpriteGraphic(graphic);
-	int src_width = 640;
-	int src_height = 360;
-	int src_depth = 32;
+	int32 src_width = 640;
+	int32 src_height = 360;
+	int32 src_depth = 32;
 	_engine->GetBitmapDimensions(src, &src_width, &src_height, &src_depth);
 	uint32 *sprite_pixels = (uint32 *)_engine->GetRawBitmapSurface(src);
 
 	BITMAP *refsrc = _engine->GetSpriteGraphic(refgraphic);
-	int refsrc_width = 640;
-	int refsrc_height = 360;
-	int refsrc_depth = 32;
+	int32 refsrc_width = 640;
+	int32 refsrc_height = 360;
+	int32 refsrc_depth = 32;
 	_engine->GetBitmapDimensions(refsrc, &refsrc_width, &refsrc_height, &refsrc_depth);
 	uint32 *refsprite_pixels = (uint32 *)_engine->GetRawBitmapSurface(refsrc);
 	_engine->ReleaseBitmapSurface(refsrc);
@@ -529,16 +529,16 @@ void AGSWaves::Dissolve(ScriptMethodParams &params) {
 	PARAMS3(int, graphic, int, noisegraphic, int, disvalue);
 
 	BITMAP *src = _engine->GetSpriteGraphic(graphic);
-	int src_width = 640;
-	int src_height = 360;
-	int src_depth = 32;
+	int32 src_width = 640;
+	int32 src_height = 360;
+	int32 src_depth = 32;
 	_engine->GetBitmapDimensions(src, &src_width, &src_height, &src_depth);
 	uint32 *sprite_pixels = (uint32 *)_engine->GetRawBitmapSurface(src);
 
 	BITMAP *noisesrc = _engine->GetSpriteGraphic(noisegraphic);
-	int noisesrc_width = 640;
-	int noisesrc_height = 360;
-	int noisesrc_depth = 32;
+	int32 noisesrc_width = 640;
+	int32 noisesrc_height = 360;
+	int32 noisesrc_depth = 32;
 	_engine->GetBitmapDimensions(noisesrc, &noisesrc_width, &noisesrc_height, &noisesrc_depth);
 	uint32 *noise_pixels = (uint32 *)_engine->GetRawBitmapSurface(noisesrc);
 	_engine->ReleaseBitmapSurface(noisesrc);
@@ -589,17 +589,17 @@ void AGSWaves::ReverseTransparency(ScriptMethodParams &params) {
 	PARAMS1(int, graphic);
 
 	BITMAP *noisesrc = _engine->GetSpriteGraphic(graphic);
-	int noisesrc_width = 640;
-	int noisesrc_height = 360;
-	int noisesrc_depth = 32;
+	int32 noisesrc_width = 640;
+	int32 noisesrc_height = 360;
+	int32 noisesrc_depth = 32;
 	_engine->GetBitmapDimensions(noisesrc, &noisesrc_width, &noisesrc_height, &noisesrc_depth);
 	uint32 *noise_pixels = (uint32 *)_engine->GetRawBitmapSurface(noisesrc);
 	_engine->ReleaseBitmapSurface(noisesrc);
 
 	BITMAP *src = _engine->GetSpriteGraphic(graphic);
-	int src_width = 640;
-	int src_height = 360;
-	int src_depth = 32;
+	int32 src_width = 640;
+	int32 src_height = 360;
+	int32 src_depth = 32;
 	_engine->GetBitmapDimensions(src, &src_width, &src_height, &src_depth);
 	uint32 *sprite_pixels = (uint32 *)_engine->GetRawBitmapSurface(src);
 
@@ -633,9 +633,9 @@ void AGSWaves::TintProper(ScriptMethodParams &params) {
 	uint32 *pixelb = (uint32 *)_engine->GetRawBitmapSurface(src);
 	uint32 *pixela = (uint32 *)_engine->GetRawBitmapSurface(src2);
 	_engine->ReleaseBitmapSurface(src2);
-	int src_width = 640;
-	int src_height = 360;
-	int src_depth = 32;
+	int32 src_width = 640;
+	int32 src_height = 360;
+	int32 src_depth = 32;
 
 	_engine->GetBitmapDimensions(src, &src_width, &src_height, &src_depth);
 
@@ -744,9 +744,9 @@ void AGSWaves::ReadWalkBehindIntoSprite(ScriptMethodParams &params) {
 
 	BITMAP *src = _engine->GetSpriteGraphic(sprite);
 	BITMAP *bgsrc = _engine->GetSpriteGraphic(bgsprite);
-	int src_width = 640;
-	int src_height = 360;
-	int src_depth = 32;
+	int32 src_width = 640;
+	int32 src_height = 360;
+	int32 src_depth = 32;
 
 	_engine->GetBitmapDimensions(src, &src_width, &src_height, &src_depth);
 	BITMAP *wbh = _engine->GetRoomMask(MASK_WALKBEHIND);
@@ -782,9 +782,9 @@ void AGSWaves::AdjustSpriteFont(ScriptMethodParams &params) {
 	BITMAP *src = _engine->GetSpriteGraphic(sprite);
 	uint32 *pixel_src = (uint32 *)_engine->GetRawBitmapSurface(src);
 
-	int src_width = 640;
-	int src_height = 360;
-	int src_depth = 32;
+	int32 src_width = 640;
+	int32 src_height = 360;
+	int32 src_depth = 32;
 	_engine->GetBitmapDimensions(src, &src_width, &src_height, &src_depth);
 
 	int x, y;
@@ -837,9 +837,9 @@ void AGSWaves::SpriteGradient(ScriptMethodParams &params) {
 	BITMAP *src = _engine->GetSpriteGraphic(sprite);
 	uint32 *pixel_src = (uint32 *)_engine->GetRawBitmapSurface(src);
 
-	int src_width = 640;
-	int src_height = 360;
-	int src_depth = 32;
+	int32 src_width = 640;
+	int32 src_height = 360;
+	int32 src_depth = 32;
 	_engine->GetBitmapDimensions(src, &src_width, &src_height, &src_depth);
 
 	int x, y;
@@ -871,9 +871,9 @@ void AGSWaves::Outline(ScriptMethodParams &params) {
 	BITMAP *src = _engine->GetSpriteGraphic(sprite);
 	uint32 *pixel_src = (uint32 *)_engine->GetRawBitmapSurface(src);
 
-	int src_width = 640;
-	int src_height = 360;
-	int src_depth = 32;
+	int32 src_width = 640;
+	int32 src_height = 360;
+	int32 src_depth = 32;
 	_engine->GetBitmapDimensions(src, &src_width, &src_height, &src_depth);
 
 	//OUTLINE
@@ -928,9 +928,9 @@ void AGSWaves::OutlineOnly(ScriptMethodParams &params) {
 	BITMAP *src = _engine->GetSpriteGraphic(refsprite);
 	uint32 *pixel_src = (uint32 *)_engine->GetRawBitmapSurface(src);
 
-	int src_width = 640;
-	int src_height = 360;
-	int src_depth = 32;
+	int32 src_width = 640;
+	int32 src_height = 360;
+	int32 src_depth = 32;
 	_engine->GetBitmapDimensions(src, &src_width, &src_height, &src_depth);
 
 	// OUTLINE
@@ -984,9 +984,9 @@ void AGSWaves::NoiseCreator(ScriptMethodParams &params) {
 	PARAMS2(int, graphic, int, setA);
 
 	BITMAP *src = _engine->GetSpriteGraphic(graphic);
-	int src_width = 640;
-	int src_height = 360;
-	int src_depth = 32;
+	int32 src_width = 640;
+	int32 src_height = 360;
+	int32 src_depth = 32;
 	_engine->GetBitmapDimensions(src, &src_width, &src_height, &src_depth);
 	uint32 *sprite_pixels = (uint32 *)_engine->GetRawBitmapSurface(src);
 
diff --git a/engines/ags/plugins/ags_waves/vars.h b/engines/ags/plugins/ags_waves/vars.h
index 6da288a32c..93ec9d7202 100644
--- a/engines/ags/plugins/ags_waves/vars.h
+++ b/engines/ags/plugins/ags_waves/vars.h
@@ -143,9 +143,9 @@ struct DustParticle {
 };
 
 struct Vars {
-	int screen_width = 640;
-	int screen_height = 360;
-	int screen_color_depth = 32;
+	int32 screen_width = 640;
+	int32 screen_height = 360;
+	int32 screen_color_depth = 32;
 	AGSCharacter *playerCharacter = nullptr;
 
 	PluginMethod Character_GetX;
diff --git a/engines/ags/plugins/ags_waves/warper.cpp b/engines/ags/plugins/ags_waves/warper.cpp
index 9baf71061d..3a8b8d3ff1 100644
--- a/engines/ags/plugins/ags_waves/warper.cpp
+++ b/engines/ags/plugins/ags_waves/warper.cpp
@@ -53,9 +53,9 @@ void AGSWaves::Warper(ScriptMethodParams &params) {
 	int h = int(max4(ay, by, cy, dy)) + 1;
 
 	BITMAP *refsrc = _engine->GetSpriteGraphic(swarp);
-	int refsrc_width = 640;
-	int refsrc_height = 360;
-	int refsrc_depth = 32;
+	int32 refsrc_width = 640;
+	int32 refsrc_height = 360;
+	int32 refsrc_depth = 32;
 	_engine->GetBitmapDimensions(refsrc, &refsrc_width, &refsrc_height, &refsrc_depth);
 	unsigned int **refsprite_pixels = (unsigned int **)_engine->GetRawBitmapSurface(refsrc);
 	_engine->ReleaseBitmapSurface(refsrc);
@@ -63,9 +63,9 @@ void AGSWaves::Warper(ScriptMethodParams &params) {
 
 	// create temporary sprite holding the warped version
 	BITMAP *resizeb = _engine->GetSpriteGraphic(sadjust);
-	int src_width = 640;
-	int src_height = 360;
-	int src_depth = 32;
+	int32 src_width = 640;
+	int32 src_height = 360;
+	int32 src_depth = 32;
 	_engine->GetBitmapDimensions(resizeb, &src_width, &src_height, &src_depth);
 	unsigned int **sprite_pixels = (unsigned int **)_engine->GetRawBitmapSurface(resizeb);
 
diff --git a/engines/ags/plugins/ags_waves/weather.cpp b/engines/ags/plugins/ags_waves/weather.cpp
index de74fe174f..26c44749a3 100644
--- a/engines/ags/plugins/ags_waves/weather.cpp
+++ b/engines/ags/plugins/ags_waves/weather.cpp
@@ -31,9 +31,9 @@ void AGSWaves::FireUpdate(ScriptMethodParams &params) {
 
 	BITMAP *src = _engine->GetSpriteGraphic(getDynamicSprite);
 	uint32 **pixel_src = (uint32 **)_engine->GetRawBitmapSurface(src);
-	int src_width = 640;
-	int src_height = 360;
-	int src_depth = 32;
+	int32 src_width = 640;
+	int32 src_height = 360;
+	int32 src_depth = 32;
 	_engine->GetBitmapDimensions(src, &src_width, &src_height, &src_depth);
 
 	//OUTLINE
@@ -111,9 +111,9 @@ void AGSWaves::WindUpdate(ScriptMethodParams &params) {
 	PARAMS4(int, ForceX, int, ForceY, int, Transparency, int, sprite);
 
 	BITMAP *src = _engine->GetSpriteGraphic(sprite);
-	int src_width = 640;
-	int src_height = 360;
-	int src_depth = 32;
+	int32 src_width = 640;
+	int32 src_height = 360;
+	int32 src_depth = 32;
 	_engine->GetBitmapDimensions(src, &src_width, &src_height, &src_depth);
 	uint32 **sprite_pixels = (uint32 **)_engine->GetRawBitmapSurface(src);
 
@@ -179,9 +179,9 @@ void AGSWaves::WindUpdate(ScriptMethodParams &params) {
 				BITMAP *src2 = _engine->GetSpriteGraphic(pgraph + particles[h].frame);
 
 
-				int src2_width = 640;
-				int src2_height = 360;
-				int src2_depth = 32;
+				int32 src2_width = 640;
+				int32 src2_height = 360;
+				int32 src2_depth = 32;
 				_engine->GetBitmapDimensions(src2, &src2_width, &src2_height, &src2_depth);
 				uint32 **sprite_pixels2 = (uint32 **)_engine->GetRawBitmapSurface(src2);
 				_engine->ReleaseBitmapSurface(src2);
@@ -295,9 +295,9 @@ void AGSWaves::WindUpdate(ScriptMethodParams &params) {
 			if (tp != 100) {
 
 				BITMAP *src2 = _engine->GetSpriteGraphic(pgraph + particlesF[h].frame);
-				int src2_width = 640;
-				int src2_height = 360;
-				int src2_depth = 32;
+				int32 src2_width = 640;
+				int32 src2_height = 360;
+				int32 src2_depth = 32;
 				_engine->GetBitmapDimensions(src2, &src2_width, &src2_height, &src2_depth);
 				uint32 **sprite_pixels2 = (uint32 **)_engine->GetRawBitmapSurface(src2);
 				_engine->ReleaseBitmapSurface(src2);
@@ -397,9 +397,9 @@ void AGSWaves::WindUpdate(ScriptMethodParams &params) {
 					BITMAP *src2 = _engine->GetSpriteGraphic(pgraph + particles2[h].frame);
 
 
-					int src2_width = 640;
-					int src2_height = 360;
-					int src2_depth = 32;
+					int32 src2_width = 640;
+					int32 src2_height = 360;
+					int32 src2_depth = 32;
 					_engine->GetBitmapDimensions(src2, &src2_width, &src2_height, &src2_depth);
 					uint32 **sprite_pixels2 = (uint32 **)_engine->GetRawBitmapSurface(src2);
 					_engine->ReleaseBitmapSurface(src2);
@@ -529,9 +529,9 @@ void AGSWaves::RainUpdate(ScriptMethodParams &params) {
 	}
 
 	BITMAP *src = _engine->GetSpriteGraphic(graphic);
-	int src_width = 640;
-	int src_height = 360;
-	int src_depth = 32;
+	int32 src_width = 640;
+	int32 src_height = 360;
+	int32 src_depth = 32;
 	_engine->GetBitmapDimensions(src, &src_width, &src_height, &src_depth);
 //	uint32 **sprite_pixels = (uint32 **)_engine->GetRawBitmapSurface(src);
 
@@ -694,9 +694,9 @@ void AGSWaves::RainUpdate(ScriptMethodParams &params) {
 void AGSWaves::DrawLineCustom(int x1, int y1, int x2, int y2, int graphic, int setR, int setG, int setB, int setA, int TranDif) {
 	int ALine = 0;
 	BITMAP *src = _engine->GetSpriteGraphic(graphic);
-	int src_width = 640;
-	int src_height = 360;
-	int src_depth = 32;
+	int32 src_width = 640;
+	int32 src_height = 360;
+	int32 src_depth = 32;
 	_engine->GetBitmapDimensions(src, &src_width, &src_height, &src_depth);
 	uint32 **sprite_pixels = (uint32 **)_engine->GetRawBitmapSurface(src);
 


Commit: f9ece38aec8f0c680c4a9818b81172ea8adeecd2
    https://github.com/scummvm/scummvm/commit/f9ece38aec8f0c680c4a9818b81172ea8adeecd2
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2021-07-21T12:15:18+02:00

Commit Message:
AGS: Fix build when Vorbis is not available

Changed paths:
    engines/ags/plugins/ags_waves/sound.cpp


diff --git a/engines/ags/plugins/ags_waves/sound.cpp b/engines/ags/plugins/ags_waves/sound.cpp
index 7ea08bc533..b2f0599678 100644
--- a/engines/ags/plugins/ags_waves/sound.cpp
+++ b/engines/ags/plugins/ags_waves/sound.cpp
@@ -196,6 +196,7 @@ void AGSWaves::LoadSFX(int i) {
 	Common::FSNode fsNode = ::AGS::g_vm->getGameFolder().getChild(
 		"sounds").getChild(Common::String::format("sound%d.sfx", i));
 
+#ifdef USE_VORBIS
 	if (fsNode.exists()) {
 		Common::File *soundFile = new Common::File();
 		if (!soundFile->open(fsNode))
@@ -204,6 +205,7 @@ void AGSWaves::LoadSFX(int i) {
 		SFX[i]._stream = Audio::makeVorbisStream(soundFile, DisposeAfterUse::YES);
 		assert(SFX[i]._stream);
 	}
+#endif
 }
 
 void AGSWaves::UnloadSFX(int i) {




More information about the Scummvm-git-logs mailing list