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

aquadran aquadran at gmail.com
Mon Mar 8 05:48:39 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:
b06aabcd34 ICB: Fixed few compiler warnings


Commit: b06aabcd3435fe4e1b5bb2eb95eb217368104ad2
    https://github.com/scummvm/scummvm/commit/b06aabcd3435fe4e1b5bb2eb95eb217368104ad2
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2021-03-08T06:48:33+01:00

Commit Message:
ICB: Fixed few compiler warnings

Changed paths:
    engines/icb/actor_fx_pc.cpp
    engines/icb/actor_pc.cpp
    engines/icb/barriers.cpp
    engines/icb/camera.cpp
    engines/icb/chi.cpp
    engines/icb/cluster_manager_pc.cpp
    engines/icb/drawpoly_pc.cpp
    engines/icb/fn_animation.cpp


diff --git a/engines/icb/actor_fx_pc.cpp b/engines/icb/actor_fx_pc.cpp
index ad55e3467f..3106f66914 100644
--- a/engines/icb/actor_fx_pc.cpp
+++ b/engines/icb/actor_fx_pc.cpp
@@ -76,7 +76,6 @@ int32 DrawActorSpecialEffectsPC(int32 mflash, SVECTOR *mfpos, int32 mfh, int32 m
 	}
 
 	if (bullet) {
-		int32 col;
 		int32 b;
 
 		// get difference between actual brightness and the min level
@@ -89,9 +88,6 @@ int32 DrawActorSpecialEffectsPC(int32 mflash, SVECTOR *mfpos, int32 mfh, int32 m
 		else if (b > (VERY_BRIGHT - NOT_VERY_BRIGHT))
 			b = (VERY_BRIGHT - NOT_VERY_BRIGHT);
 
-		// now use the brightness slider to do proportion of bullet col which has come in
-		col = bulletCol * b / (VERY_BRIGHT - NOT_VERY_BRIGHT);
-
 		DrawCartridgeCasePC(bulletPos, bulletCol);
 	}
 
diff --git a/engines/icb/actor_pc.cpp b/engines/icb/actor_pc.cpp
index ab4d983853..73124e782a 100644
--- a/engines/icb/actor_pc.cpp
+++ b/engines/icb/actor_pc.cpp
@@ -314,13 +314,6 @@ void DrawActor4PC(psxActor *actor, psxCamera *camera, Bone_Frame *frame, rap_API
 
 	gte_MulMatrix0_pc(&cam_pc, &act_pc, local2screen);
 
-	// make the ls trans vector
-	//  = world2screen * local2world_trans + world2screen_trans
-	SVECTORPC sv;
-	sv.vx = (int16)actor->lw.t[0];
-	sv.vy = (int16)actor->lw.t[1];
-	sv.vz = (int16)actor->lw.t[2];
-
 	ApplyMatrixLV_pc(&cam_pc, (VECTOR *)&(actor->lw.t[0]), (VECTOR *)&(local2screen->t[0]));
 	local2screen->t[0] += cam_pc.t[0];
 	local2screen->t[1] += cam_pc.t[1];
@@ -561,7 +554,6 @@ void DrawModel4PC(rap_API *mrap, int32 poseBone, MATRIXPC *lw, MATRIXPC *local2s
 
 	int32 flag, p;
 	int32 i;
-	SVECTORPC *v0;
 	SVECTOR *pbbox;
 
 	// Convert the bounding box from local co-ordinates into screen co-ordinates
@@ -627,7 +619,6 @@ void DrawModel4PC(rap_API *mrap, int32 poseBone, MATRIXPC *lw, MATRIXPC *local2s
 	}
 
 	// Loop over the vector pool converting them all to screen co-ordinates
-	v0 = local;
 	if (debug == 0) {
 		ConvertToScreenCoords(local, screen, nVertices);
 	}
@@ -956,14 +947,13 @@ void drawBboxPC(SVECTOR *scrn, CVECTOR colour) {
 	// 1->7->5
 	// 6->4->5
 
-	int32 z0;
 	LINE_F3 *line = (LINE_F3 *)drawpacket;
 	setLineF3(line);
 	setRGB0(line, colour.r, colour.g, colour.b);
 	// Pair0: 0->1->3
 	setXY3(line, scrn[0].vx, scrn[0].vy, scrn[1].vx, scrn[1].vy, scrn[3].vx, scrn[3].vy);
 
-	z0 = myAddPrimClip(scrn[3].vz, drawpacket);
+	myAddPrimClip(scrn[3].vz, drawpacket);
 	myAddPacket(sizeof(LINE_F3));
 
 	// Pair1: 2->3->5
@@ -971,7 +961,7 @@ void drawBboxPC(SVECTOR *scrn, CVECTOR colour) {
 	setLineF3(line);
 	setRGB0(line, colour.r, colour.g, colour.b);
 	setXY3(line, scrn[2].vx, scrn[2].vy, scrn[3].vx, scrn[3].vy, scrn[5].vx, scrn[5].vy);
-	z0 = myAddPrimClip(scrn[5].vz, drawpacket);
+	myAddPrimClip(scrn[5].vz, drawpacket);
 	myAddPacket(sizeof(LINE_F3));
 
 	// Pair2: 0->2->4
@@ -979,7 +969,7 @@ void drawBboxPC(SVECTOR *scrn, CVECTOR colour) {
 	setLineF3(line);
 	setRGB0(line, colour.r, colour.g, colour.b);
 	setXY3(line, scrn[0].vx, scrn[0].vy, scrn[2].vx, scrn[2].vy, scrn[4].vx, scrn[4].vy);
-	z0 = myAddPrimClip(scrn[5].vz, drawpacket);
+	myAddPrimClip(scrn[5].vz, drawpacket);
 	myAddPacket(sizeof(LINE_F3));
 
 	// Pair3: 0->6->7
@@ -987,7 +977,7 @@ void drawBboxPC(SVECTOR *scrn, CVECTOR colour) {
 	setLineF3(line);
 	setRGB0(line, colour.r, colour.g, colour.b);
 	setXY3(line, scrn[0].vx, scrn[0].vy, scrn[6].vx, scrn[6].vy, scrn[7].vx, scrn[7].vy);
-	z0 = myAddPrimClip(scrn[7].vz, drawpacket);
+	myAddPrimClip(scrn[7].vz, drawpacket);
 	myAddPacket(sizeof(LINE_F3));
 
 	// Pair4: 1->7->5
@@ -995,7 +985,7 @@ void drawBboxPC(SVECTOR *scrn, CVECTOR colour) {
 	setLineF3(line);
 	setRGB0(line, colour.r, colour.g, colour.b);
 	setXY3(line, scrn[1].vx, scrn[1].vy, scrn[7].vx, scrn[7].vy, scrn[5].vx, scrn[5].vy);
-	z0 = myAddPrimClip(scrn[5].vz, drawpacket);
+	myAddPrimClip(scrn[5].vz, drawpacket);
 	myAddPacket(sizeof(LINE_F3));
 
 	// Pair5: 6->4->5
@@ -1003,7 +993,7 @@ void drawBboxPC(SVECTOR *scrn, CVECTOR colour) {
 	setLineF3(line);
 	setRGB0(line, colour.r, colour.g, colour.b);
 	setXY3(line, scrn[6].vx, scrn[6].vy, scrn[4].vx, scrn[4].vy, scrn[5].vx, scrn[5].vy);
-	z0 = myAddPrimClip(scrn[5].vz, drawpacket);
+	myAddPrimClip(scrn[5].vz, drawpacket);
 	myAddPacket(sizeof(LINE_F3));
 }
 
diff --git a/engines/icb/barriers.cpp b/engines/icb/barriers.cpp
index 5dbfcb6a4c..2261e96ab7 100644
--- a/engines/icb/barriers.cpp
+++ b/engines/icb/barriers.cpp
@@ -421,7 +421,6 @@ __barrier_result _game_session::Check_barrier_bump_and_bounce(PXreal newx, PXrea
 }
 
 __barrier_result _game_session::Check_this_barrier(_route_barrier *bar, PXreal newx, PXreal newz, PXreal /* oldx */, PXreal /* oldz */, PXreal bar_close, int32 *ignoreThis) {
-	PXreal lpan;
 	PXfloat delta;
 	PXfloat delta2;
 	PXfloat barrier_tolerance = BARRIER_TOLERANCE; // 1/8 of a turn = 45 degress
@@ -447,7 +446,6 @@ __barrier_result _game_session::Check_this_barrier(_route_barrier *bar, PXreal n
 
 				// we are going to hit this barrier
 				// but, if the angle is narrow we can aquire the barriers pan and continue unmolested
-				lpan = L->pan;
 				delta = remainder(L->pan - bar->pan(), FULL_TURN, HALF_TURN);
 				delta2 = delta;
 
diff --git a/engines/icb/camera.cpp b/engines/icb/camera.cpp
index 6d6b7a8e55..3312de63aa 100644
--- a/engines/icb/camera.cpp
+++ b/engines/icb/camera.cpp
@@ -531,13 +531,12 @@ mcodeFunctionReturnCodes _game_session::fn_is_current_camera(int32 &result, int3
 mcodeFunctionReturnCodes _game_session::fn_is_current_location(int32 &result, int32 *params) {
 	char h_buf[8];
 	uint32 len;
-	uint32 nPlayerFloorIndex, nPlayerLocationHash;
+	uint32 nPlayerFloorIndex;
 	const char *location_name = (const char *)MemoryUtil::resolvePtr(params[0]);
 
 	// First we need to know which location the player is in, because the information level
 	// for this is automatically at full.
 	nPlayerFloorIndex = MS->logic_structs[MS->player.Fetch_player_id()]->owner_floor_rect;
-	nPlayerLocationHash = MS->floor_def->Fetch_floor_number(nPlayerFloorIndex)->map_location_hash;
 
 	Message_box("is %s current location?", location_name);
 
diff --git a/engines/icb/chi.cpp b/engines/icb/chi.cpp
index 7fbfe53a63..47f552df85 100644
--- a/engines/icb/chi.cpp
+++ b/engines/icb/chi.cpp
@@ -256,7 +256,6 @@ bool8 _game_session::Process_chi() {
 	int32 result;
 	bool8 res;
 	PXreal sub1, sub2, cord_dist;
-	bool8 currently_stood;
 	bool8 route_res;
 
 	switch (chi_do_mode) {
@@ -697,8 +696,6 @@ bool8 _game_session::Process_chi() {
 						x = logic_structs[player.Fetch_player_id()]->mega->actor_xyz.x;
 						z = logic_structs[player.Fetch_player_id()]->mega->actor_xyz.z;
 
-						currently_stood = FALSE8;
-
 						bool8 run = TRUE8;
 						bool8 eos = FALSE8;
 						if (Cord_dist() < (400 * 400)) {
@@ -740,6 +737,7 @@ bool8 _game_session::Process_chi() {
 				chi_think_mode = __FOLLOWING; // set mode
 				Tdebug("chi.txt", "chi is finds cord again - chi=%d, player=%d", chi_history, cur_history);
 			}
+			/* fall through */
 
 		case __NOTHING:
 			// dummy mode for when switched to custom logics
diff --git a/engines/icb/cluster_manager_pc.cpp b/engines/icb/cluster_manager_pc.cpp
index ed07dc38ea..1c6708b918 100644
--- a/engines/icb/cluster_manager_pc.cpp
+++ b/engines/icb/cluster_manager_pc.cpp
@@ -95,7 +95,7 @@ ClusterManager::ClusterManager() {
 
 	m_installDone = FALSE8;
 
-	memset(m_progressBits, 0, NUMBER_OF_PROGRESS_BITS);
+	memset(m_progressBits, 0, sizeof(PROGRESS_BIT) * NUMBER_OF_PROGRESS_BITS);
 	m_bitsDone = 0;
 	m_frameCounter = 0;
 	m_currentLanguage = T_ENGLISH;
diff --git a/engines/icb/drawpoly_pc.cpp b/engines/icb/drawpoly_pc.cpp
index 5e6fbb7792..b44b3c48ee 100644
--- a/engines/icb/drawpoly_pc.cpp
+++ b/engines/icb/drawpoly_pc.cpp
@@ -3391,12 +3391,6 @@ void fastDrawGTL3PC(uint32 *polyStart, const uint32 n, SVECTORPC *pVertex, SVECT
 	CVECTOR rgbIn = {128, 128, 128, 0};
 	CVECTOR rgb0, rgb1, rgb2;
 
-	int32 my_minUsedZpos;
-	int32 my_maxUsedZpos;
-
-	my_minUsedZpos = minUsedZpos;
-	my_maxUsedZpos = maxUsedZpos;
-
 	POLY_GT3 *poly;
 	uint32 *pPoly;
 
diff --git a/engines/icb/fn_animation.cpp b/engines/icb/fn_animation.cpp
index ff4512b53a..e70a05527d 100644
--- a/engines/icb/fn_animation.cpp
+++ b/engines/icb/fn_animation.cpp
@@ -735,7 +735,6 @@ mcodeFunctionReturnCodes _game_session::fn_easy_play_generic_anim(int32 &, int32
 	// return    IR_CONT or
 	//			IR_REPEAT
 
-	bool8 ret;
 	const char *anim_name = NULL;
 	if (params && params[0]) {
 		anim_name = (const char *)MemoryUtil::resolvePtr(params[0]);
@@ -789,7 +788,7 @@ mcodeFunctionReturnCodes _game_session::fn_easy_play_generic_anim(int32 &, int32
 	}
 
 	// shift character and frame forward by the amount appropriate
-	ret = MS->Easy_frame_and_motion(L->cur_anim_type, 0, M->anim_speed);
+	MS->Easy_frame_and_motion(L->cur_anim_type, 0, M->anim_speed);
 
 	// more to do - come back again next cycle
 	return (IR_REPEAT);
@@ -803,7 +802,6 @@ mcodeFunctionReturnCodes _game_session::fn_easy_play_generic_anim_with_pan(int32
 	// return    IR_CONT or
 	//			IR_REPEAT
 
-	bool8 ret;
 	const char *anim_name = (const char *)MemoryUtil::resolvePtr(params[0]);
 
 	if (!L->looping) {
@@ -856,7 +854,7 @@ mcodeFunctionReturnCodes _game_session::fn_easy_play_generic_anim_with_pan(int32
 	}
 
 	// shift character and frame forward by the amount appropriate
-	ret = MS->Easy_frame_motion_and_pan(L->cur_anim_type, 0);
+	MS->Easy_frame_motion_and_pan(L->cur_anim_type, 0);
 
 	// more to do - come back again next cycle
 	return (IR_REPEAT);
@@ -871,8 +869,6 @@ mcodeFunctionReturnCodes _game_session::fn_easy_play_custom_anim_with_pan(int32
 	// return    IR_CONT or
 	//			IR_REPEAT
 
-	bool8 ret;
-
 	const char *anim_name = (const char *)MemoryUtil::resolvePtr(params[0]);
 
 	Zdebug("fn_easy_play_custom_anim_with_pan %s %s", object->GetName(), anim_name);
@@ -917,7 +913,7 @@ mcodeFunctionReturnCodes _game_session::fn_easy_play_custom_anim_with_pan(int32
 	}
 
 	// shift character and frame forward by the amount appropriate
-	ret = MS->Easy_frame_motion_and_pan(L->cur_anim_type, 0);
+	MS->Easy_frame_motion_and_pan(L->cur_anim_type, 0);
 
 	// more to do - come back again next cycle
 	return (IR_REPEAT);




More information about the Scummvm-git-logs mailing list