aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Comstedt2014-01-09 23:26:31 +0100
committerMarcus Comstedt2014-01-10 15:56:52 +0100
commit66ad9e76eeda77f2ca4d10db82cfd31dba38d127 (patch)
treee6335a3ac4feac7b32acf193c88ca64a20c51b78
parent62828f86a14994b1be503abc141f5eb73857530c (diff)
downloadscummvm-rg350-66ad9e76eeda77f2ca4d10db82cfd31dba38d127.tar.gz
scummvm-rg350-66ad9e76eeda77f2ca4d10db82cfd31dba38d127.tar.bz2
scummvm-rg350-66ad9e76eeda77f2ca4d10db82cfd31dba38d127.zip
DC: Silenced some stupid warnings
-rw-r--r--backends/platform/dc/dc.h2
-rw-r--r--backends/platform/dc/dcmain.cpp6
-rw-r--r--backends/platform/dc/icon.cpp4
-rw-r--r--backends/platform/dc/input.cpp11
-rw-r--r--backends/platform/dc/softkbd.h1
5 files changed, 15 insertions, 9 deletions
diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h
index d62ced02e1..ba60c7740e 100644
--- a/backends/platform/dc/dc.h
+++ b/backends/platform/dc/dc.h
@@ -43,7 +43,9 @@ class Interactive
public:
virtual int key(int k, byte &shiftFlags) = 0;
virtual void mouse(int x, int y) = 0;
+ virtual ~Interactive() = 0;
};
+inline Interactive::~Interactive() { }
#include "softkbd.h"
diff --git a/backends/platform/dc/dcmain.cpp b/backends/platform/dc/dcmain.cpp
index bec1fdae3a..36a22c4b5c 100644
--- a/backends/platform/dc/dcmain.cpp
+++ b/backends/platform/dc/dcmain.cpp
@@ -79,13 +79,14 @@ static bool find_track(int track, int &first_sec, int &last_sec)
if (first < 1 || last > 99 || first > last)
return false;
for (i=first; i<=last; i++)
- if (!(TOC_CTRL(toc->entry[i-1])&4))
+ if (!(TOC_CTRL(toc->entry[i-1])&4)) {
if (track==1) {
first_sec = TOC_LBA(toc->entry[i-1]);
last_sec = TOC_LBA(toc->entry[i]);
return true;
} else
--track;
+ }
return false;
}
@@ -281,7 +282,7 @@ namespace DC_Flash {
if((r = syscall_read_flash(info[0] + (bmb++ << 6), bm, 64))<0)
return r;
}
- if(!(bm[(b>>3)&63] & (0x80>>(b&7))))
+ if(!(bm[(b>>3)&63] & (0x80>>(b&7)))) {
if((r = syscall_read_flash(info[0] + ((b+1) << 6), buf, 64))<0)
return r;
else if((s=*(unsigned short *)(buf+0)) == sec &&
@@ -289,6 +290,7 @@ namespace DC_Flash {
memcpy(dst+(s-sec)*60, buf+2, 60);
got=1;
}
+ }
}
return got;
}
diff --git a/backends/platform/dc/icon.cpp b/backends/platform/dc/icon.cpp
index cf7afc82e0..28edf27f4f 100644
--- a/backends/platform/dc/icon.cpp
+++ b/backends/platform/dc/icon.cpp
@@ -47,8 +47,8 @@ void Icon::create_vmicon(void *buffer)
void Icon::create_texture()
{
- static char tt[16] = { 0, 1, 4, 5, 16, 17, 20, 21,
- 64, 65, 68, 69, 80, 81, 84, 85 };
+ static unsigned char tt[16] = { 0, 1, 4, 5, 16, 17, 20, 21,
+ 64, 65, 68, 69, 80, 81, 84, 85 };
unsigned short *tex = (unsigned short *)ta_txalloc(512);
unsigned short *linebase;
unsigned char *src = bitmap+sizeof(bitmap)-17;
diff --git a/backends/platform/dc/input.cpp b/backends/platform/dc/input.cpp
index 7b21c76efa..5c6adf6c7c 100644
--- a/backends/platform/dc/input.cpp
+++ b/backends/platform/dc/input.cpp
@@ -50,10 +50,10 @@ int handleInput(struct mapledev *pad, int &mouse_x, int &mouse_y,
else if (!(buttons & 512)) newkey = ' ';
else if (!(buttons & 1024)) newkey = numpadmap[(buttons>>4)&15];
- if (!(buttons & 128)) if (inter) newkey = 1001; else mouse_x++;
- if (!(buttons & 64)) if (inter) newkey = 1002; else mouse_x--;
- if (!(buttons & 32)) if (inter) newkey = 1003; else mouse_y++;
- if (!(buttons & 16)) if (inter) newkey = 1004; else mouse_y--;
+ if (!(buttons & 128)) { if (inter) newkey = 1001; else mouse_x++; }
+ if (!(buttons & 64)) { if (inter) newkey = 1002; else mouse_x--; }
+ if (!(buttons & 32)) { if (inter) newkey = 1003; else mouse_y++; }
+ if (!(buttons & 16)) { if (inter) newkey = 1004; else mouse_y--; }
mouse_x += ((int)pad->cond.controller.joyx-128)>>4;
mouse_y += ((int)pad->cond.controller.joyy-128)>>4;
@@ -157,7 +157,7 @@ int handleInput(struct mapledev *pad, int &mouse_x, int &mouse_y,
return -Common::EVENT_RBUTTONUP;
}
- if (mouse_wheel != lastwheel)
+ if (mouse_wheel != lastwheel) {
if (((int8)(mouse_wheel - lastwheel)) > 0) {
lastwheel++;
return -Common::EVENT_WHEELDOWN;
@@ -165,6 +165,7 @@ int handleInput(struct mapledev *pad, int &mouse_x, int &mouse_y,
--lastwheel;
return -Common::EVENT_WHEELUP;
}
+ }
if (newkey && inter && newkey != lastkey) {
int transkey = inter->key(newkey, shiftFlags);
diff --git a/backends/platform/dc/softkbd.h b/backends/platform/dc/softkbd.h
index 8f87d12baa..27826c2744 100644
--- a/backends/platform/dc/softkbd.h
+++ b/backends/platform/dc/softkbd.h
@@ -40,6 +40,7 @@ class SoftKeyboard : public Interactive
public:
SoftKeyboard(const OSystem_Dreamcast *os);
+ virtual ~SoftKeyboard() {}
void draw(float x, float y, int transp = 0);
int key(int k, byte &shiftFlags);