aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2018-11-23 19:47:34 -0800
committerPaul Gilbert2018-12-08 19:05:59 -0800
commitf92b82664dd099ac4d4439f614188a6544bfff2c (patch)
tree3b8557333c20c1cb6bd76ded4128c4f47129d15f /engines
parenta334cd704e21044e0660f918e1c9e3a5040c5837 (diff)
downloadscummvm-rg350-f92b82664dd099ac4d4439f614188a6544bfff2c.tar.gz
scummvm-rg350-f92b82664dd099ac4d4439f614188a6544bfff2c.tar.bz2
scummvm-rg350-f92b82664dd099ac4d4439f614188a6544bfff2c.zip
GLK: Fix gcc warnings
Diffstat (limited to 'engines')
-rw-r--r--engines/glk/blorb.cpp2
-rw-r--r--engines/glk/picture.cpp15
-rw-r--r--engines/glk/picture.h4
3 files changed, 12 insertions, 9 deletions
diff --git a/engines/glk/blorb.cpp b/engines/glk/blorb.cpp
index f8a8cbd7c3..5c1f0bd962 100644
--- a/engines/glk/blorb.cpp
+++ b/engines/glk/blorb.cpp
@@ -47,7 +47,7 @@ enum {
ID_WAVE = MKTAG('W', 'A', 'V', 'E'),
ID_AIFF = MKTAG('A', 'I', 'F', 'F'),
ID_OGG = MKTAG('O', 'G', 'G', ' '),
- ID_MOD = MKTAG('M', 'O', 'D', ' '),
+ ID_MOD = MKTAG('M', 'O', 'D', ' ')
};
/*--------------------------------------------------------------------------*/
diff --git a/engines/glk/picture.cpp b/engines/glk/picture.cpp
index 7770bb892b..6d8fce9c03 100644
--- a/engines/glk/picture.cpp
+++ b/engines/glk/picture.cpp
@@ -109,22 +109,25 @@ Picture *Pictures::load(uint32 id) {
Picture *pic;
// Check if the picture is already in the store
- pic = retrieve(id, false);
- if (pic)
- return pic;
+ pic = retrieve(id, false);
+ if (pic)
+ return pic;
Common::File f;
- if (f.open(Common::String::format("PIC%lu.png", id))) {
+ if (f.open(Common::String::format("PIC%u.png", id))) {
png.loadStream(f);
img = png.getSurface();
palette = png.getPalette();
- } else if (f.open(Common::String::format("PIC%lu.jpg", id))) {
+ } else if (f.open(Common::String::format("PIC%u.jpg", id))) {
jpg.loadStream(f);
img = jpg.getSurface();
- } else if (f.open(Common::String::format("PIC%lu.raw", id))) {
+ } else if (f.open(Common::String::format("PIC%u.raw", id))) {
raw.loadStream(f);
img = raw.getSurface();
palette = raw.getPalette();
+ } else {
+ // No such picture
+ return nullptr;
}
pic = new Picture();
diff --git a/engines/glk/picture.h b/engines/glk/picture.h
index f221569368..06d598b771 100644
--- a/engines/glk/picture.h
+++ b/engines/glk/picture.h
@@ -45,8 +45,8 @@ public:
/**
* Constructor
*/
- Picture(int width, int height, const Graphics::PixelFormat &format) :
- Graphics::ManagedSurface(width, height, format), _refCount(0), _id(0), _scaled(false) {}
+ Picture(int width, int height, const Graphics::PixelFormat &fmt) :
+ Graphics::ManagedSurface(width, height, fmt), _refCount(0), _id(0), _scaled(false) {}
/**
* Increment reference counter