[Scummvm-git-logs] scummvm master -> aefe3b5957aeb2de7f4d68c5785c177950af7d2d
digitall
noreply at scummvm.org
Thu Jun 23 21:45:38 UTC 2022
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:
aefe3b5957 GLK: SCOTT: Fix Various GCC Compiler Warnings
Commit: aefe3b5957aeb2de7f4d68c5785c177950af7d2d
https://github.com/scummvm/scummvm/commit/aefe3b5957aeb2de7f4d68c5785c177950af7d2d
Author: D G Turner (digitall at scummvm.org)
Date: 2022-06-23T22:45:11+01:00
Commit Message:
GLK: SCOTT: Fix Various GCC Compiler Warnings
Changed paths:
engines/glk/scott/c64_checksums.cpp
engines/glk/scott/resource.cpp
engines/glk/scott/robin_of_sherwood.cpp
engines/glk/scott/seas_of_blood.cpp
engines/glk/scott/unp64/6502_emu.cpp
engines/glk/scott/unp64/unp64.cpp
diff --git a/engines/glk/scott/c64_checksums.cpp b/engines/glk/scott/c64_checksums.cpp
index 6ef49b89065..b241023fee6 100644
--- a/engines/glk/scott/c64_checksums.cpp
+++ b/engines/glk/scott/c64_checksums.cpp
@@ -240,7 +240,7 @@ int savageIslandMenu(uint8_t **sf, size_t *extent, int recIndex) {
}
void appendSIfiles(uint8_t **sf, size_t *extent) {
- int totalLength = *extent + _G(_saveIslandAppendix1Length) + _G(_saveIslandAppendix2Length);
+ //int totalLength = *extent + _G(_saveIslandAppendix1Length) + _G(_saveIslandAppendix2Length);
uint8_t *megabuf = new uint8_t[0xFFFF];
memcpy(megabuf, *sf, *extent);
diff --git a/engines/glk/scott/resource.cpp b/engines/glk/scott/resource.cpp
index ddddb02ab17..dd57a852b71 100644
--- a/engines/glk/scott/resource.cpp
+++ b/engines/glk/scott/resource.cpp
@@ -943,7 +943,7 @@ int tryLoading(GameInfo info, int dictStart, int loud) {
const char *t = strchr(ip->_autoGet.c_str(), '.');
if (t)
ip->_autoGet = Common::String(ip->_autoGet.c_str(), t);
- for (int i = 1; i < ip->_autoGet.size(); i++)
+ for (uint i = 1; i < ip->_autoGet.size(); i++)
ip->_autoGet.replace(i, 1, Common::String(toupper(ip->_autoGet[i])));
}
}
diff --git a/engines/glk/scott/robin_of_sherwood.cpp b/engines/glk/scott/robin_of_sherwood.cpp
index 610bd29bd7b..bb725bb354a 100644
--- a/engines/glk/scott/robin_of_sherwood.cpp
+++ b/engines/glk/scott/robin_of_sherwood.cpp
@@ -260,14 +260,10 @@ void updateRobinOfSherwoodAnimations(void) {
}
GameIDType loadExtraSherwoodData(void) {
-
-#pragma mark room images
-
int offset = 0x3d99 + _G(_fileBaselineOffset);
uint8_t *ptr;
/* Load the room images */
-jumpRoomImages:
ptr = seekToPos(_G(_entireFile), offset);
if (ptr == 0)
return UNKNOWN_GAME;
@@ -286,8 +282,6 @@ jumpRoomImages:
}
}
-#pragma mark rooms
-
ct = 0;
rp = &_G(_rooms)[0];
@@ -346,13 +340,10 @@ GameIDType loadExtraSherwoodData64(void) {
// white_colour = 1;
// blue = 6;
-#pragma mark room images
-
int offset = 0x1ffd + _G(_fileBaselineOffset);
uint8_t *ptr;
/* Load the room images */
-jumpHereRoomImages:
ptr = seekToPos(_G(_entireFile), offset);
if (ptr == 0)
return UNKNOWN_GAME;
@@ -372,8 +363,6 @@ jumpHereRoomImages:
}
}
-#pragma mark rooms
-
ct = 0;
rp = &_G(_rooms)[0];
@@ -440,7 +429,6 @@ jumpHereRoomImages:
_G(_sys)[MESSAGE_DELIMITER] = ". ";
offset = 0x2300 + _G(_fileBaselineOffset);
-jumpForestImages:
ptr = seekToPos(_G(_entireFile), offset);
if (ptr == 0)
diff --git a/engines/glk/scott/seas_of_blood.cpp b/engines/glk/scott/seas_of_blood.cpp
index f2d8ebb5506..593fdf339c1 100644
--- a/engines/glk/scott/seas_of_blood.cpp
+++ b/engines/glk/scott/seas_of_blood.cpp
@@ -249,7 +249,7 @@ static void SOBPrint(winid_t w, const char *fmt, ...) {
g_scott->glk_put_string_stream(g_scott->glk_window_get_stream(w), msg);
}
-const glui32 optimalDicePixelSize(glui32 *width, glui32 *height) {
+glui32 optimalDicePixelSize(glui32 *width, glui32 *height) {
int idealWidth = 8;
int idealHeight = 8;
@@ -281,10 +281,10 @@ static void drawBorder(winid_t win) {
width -= 2;
g_scott->glk_window_move_cursor(win, 0, 0);
g_scott->glk_put_char_uni(0x250F); // Top left corner
- for (int i = 1; i < width; i++)
+ for (glui32 i = 1; i < width; i++)
g_scott->glk_put_char_uni(0x2501); // Top
g_scott->glk_put_char_uni(0x2513); // Top right corner
- for (int i = 1; i < height; i++) {
+ for (glui32 i = 1; i < height; i++) {
g_scott->glk_window_move_cursor(win, 0, i);
g_scott->glk_put_char_uni(0x2503);
g_scott->glk_window_move_cursor(win, width, i);
@@ -292,7 +292,7 @@ static void drawBorder(winid_t win) {
}
g_scott->glk_window_move_cursor(win, 0, height);
g_scott->glk_put_char_uni(0x2517);
- for (int i = 1; i < width; i++)
+ for (glui32 i = 1; i < width; i++)
g_scott->glk_put_char_uni(0x2501);
g_scott->glk_put_char_uni(0x251B);
}
@@ -791,7 +791,6 @@ int loadExtraSeasOfBlood64Data(void) {
offset = 0x3fee + _G(_fileBaselineOffset);
uint8_t *ptr;
-jumpEnemyTable:
ptr = seekToPos(_G(_entireFile), offset);
int ct;
diff --git a/engines/glk/scott/unp64/6502_emu.cpp b/engines/glk/scott/unp64/6502_emu.cpp
index ae46e960bff..3d375b4dc61 100644
--- a/engines/glk/scott/unp64/6502_emu.cpp
+++ b/engines/glk/scott/unp64/6502_emu.cpp
@@ -1139,7 +1139,6 @@ int flipspace(void) {
int nextInst(CpuCtx* r) {
InstArg arg[1];
- int oldpc = r->_pc;
int opCode = r->_mem[r->_pc];
InstInfo *info = g_ops + opCode;
int mode, WriteToIO = 0;
diff --git a/engines/glk/scott/unp64/unp64.cpp b/engines/glk/scott/unp64/unp64.cpp
index 7b857a58c8d..de646a6bbff 100644
--- a/engines/glk/scott/unp64/unp64.cpp
+++ b/engines/glk/scott/unp64/unp64.cpp
@@ -64,6 +64,8 @@ Follows original disclaimer
#include "glk/scott/unp64/exo_util.h"
#include "glk/scott/unp64/unp64.h"
+#include "common/util.h"
+
namespace Glk {
namespace Scott {
@@ -346,7 +348,7 @@ int unp64(uint8_t *compressed, size_t length, uint8_t *destinationBuffer, size_t
static unsigned char fpressedchars[] = {0x20, 0, 0x4e, 0, 3, 0, 0x5f, 0, 0x11, 00, 0x0d, 0, 0x31, 0};
flipspe4++;
- if (flipspe4 > (sizeof(fpressedchars) / sizeof(*fpressedchars)))
+ if (flipspe4 > ARRAYSIZE(fpressedchars))
flipspe4 = 0;
r->_a = fpressedchars[flipspe4];
More information about the Scummvm-git-logs
mailing list