DC: Silenced some stupid warnings
This commit is contained in:
parent
62828f86a1
commit
66ad9e76ee
5 changed files with 15 additions and 9 deletions
|
@ -43,7 +43,9 @@ class Interactive
|
||||||
public:
|
public:
|
||||||
virtual int key(int k, byte &shiftFlags) = 0;
|
virtual int key(int k, byte &shiftFlags) = 0;
|
||||||
virtual void mouse(int x, int y) = 0;
|
virtual void mouse(int x, int y) = 0;
|
||||||
|
virtual ~Interactive() = 0;
|
||||||
};
|
};
|
||||||
|
inline Interactive::~Interactive() { }
|
||||||
|
|
||||||
#include "softkbd.h"
|
#include "softkbd.h"
|
||||||
|
|
||||||
|
|
|
@ -79,13 +79,14 @@ static bool find_track(int track, int &first_sec, int &last_sec)
|
||||||
if (first < 1 || last > 99 || first > last)
|
if (first < 1 || last > 99 || first > last)
|
||||||
return false;
|
return false;
|
||||||
for (i=first; i<=last; i++)
|
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) {
|
if (track==1) {
|
||||||
first_sec = TOC_LBA(toc->entry[i-1]);
|
first_sec = TOC_LBA(toc->entry[i-1]);
|
||||||
last_sec = TOC_LBA(toc->entry[i]);
|
last_sec = TOC_LBA(toc->entry[i]);
|
||||||
return true;
|
return true;
|
||||||
} else
|
} else
|
||||||
--track;
|
--track;
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -281,7 +282,7 @@ namespace DC_Flash {
|
||||||
if((r = syscall_read_flash(info[0] + (bmb++ << 6), bm, 64))<0)
|
if((r = syscall_read_flash(info[0] + (bmb++ << 6), bm, 64))<0)
|
||||||
return r;
|
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)
|
if((r = syscall_read_flash(info[0] + ((b+1) << 6), buf, 64))<0)
|
||||||
return r;
|
return r;
|
||||||
else if((s=*(unsigned short *)(buf+0)) == sec &&
|
else if((s=*(unsigned short *)(buf+0)) == sec &&
|
||||||
|
@ -289,6 +290,7 @@ namespace DC_Flash {
|
||||||
memcpy(dst+(s-sec)*60, buf+2, 60);
|
memcpy(dst+(s-sec)*60, buf+2, 60);
|
||||||
got=1;
|
got=1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return got;
|
return got;
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,8 +47,8 @@ void Icon::create_vmicon(void *buffer)
|
||||||
|
|
||||||
void Icon::create_texture()
|
void Icon::create_texture()
|
||||||
{
|
{
|
||||||
static char tt[16] = { 0, 1, 4, 5, 16, 17, 20, 21,
|
static unsigned char tt[16] = { 0, 1, 4, 5, 16, 17, 20, 21,
|
||||||
64, 65, 68, 69, 80, 81, 84, 85 };
|
64, 65, 68, 69, 80, 81, 84, 85 };
|
||||||
unsigned short *tex = (unsigned short *)ta_txalloc(512);
|
unsigned short *tex = (unsigned short *)ta_txalloc(512);
|
||||||
unsigned short *linebase;
|
unsigned short *linebase;
|
||||||
unsigned char *src = bitmap+sizeof(bitmap)-17;
|
unsigned char *src = bitmap+sizeof(bitmap)-17;
|
||||||
|
|
|
@ -50,10 +50,10 @@ int handleInput(struct mapledev *pad, int &mouse_x, int &mouse_y,
|
||||||
else if (!(buttons & 512)) newkey = ' ';
|
else if (!(buttons & 512)) newkey = ' ';
|
||||||
else if (!(buttons & 1024)) newkey = numpadmap[(buttons>>4)&15];
|
else if (!(buttons & 1024)) newkey = numpadmap[(buttons>>4)&15];
|
||||||
|
|
||||||
if (!(buttons & 128)) if (inter) newkey = 1001; else mouse_x++;
|
if (!(buttons & 128)) { if (inter) newkey = 1001; else mouse_x++; }
|
||||||
if (!(buttons & 64)) if (inter) newkey = 1002; 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 & 32)) { if (inter) newkey = 1003; else mouse_y++; }
|
||||||
if (!(buttons & 16)) if (inter) newkey = 1004; else mouse_y--;
|
if (!(buttons & 16)) { if (inter) newkey = 1004; else mouse_y--; }
|
||||||
|
|
||||||
mouse_x += ((int)pad->cond.controller.joyx-128)>>4;
|
mouse_x += ((int)pad->cond.controller.joyx-128)>>4;
|
||||||
mouse_y += ((int)pad->cond.controller.joyy-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;
|
return -Common::EVENT_RBUTTONUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mouse_wheel != lastwheel)
|
if (mouse_wheel != lastwheel) {
|
||||||
if (((int8)(mouse_wheel - lastwheel)) > 0) {
|
if (((int8)(mouse_wheel - lastwheel)) > 0) {
|
||||||
lastwheel++;
|
lastwheel++;
|
||||||
return -Common::EVENT_WHEELDOWN;
|
return -Common::EVENT_WHEELDOWN;
|
||||||
|
@ -165,6 +165,7 @@ int handleInput(struct mapledev *pad, int &mouse_x, int &mouse_y,
|
||||||
--lastwheel;
|
--lastwheel;
|
||||||
return -Common::EVENT_WHEELUP;
|
return -Common::EVENT_WHEELUP;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (newkey && inter && newkey != lastkey) {
|
if (newkey && inter && newkey != lastkey) {
|
||||||
int transkey = inter->key(newkey, shiftFlags);
|
int transkey = inter->key(newkey, shiftFlags);
|
||||||
|
|
|
@ -40,6 +40,7 @@ class SoftKeyboard : public Interactive
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SoftKeyboard(const OSystem_Dreamcast *os);
|
SoftKeyboard(const OSystem_Dreamcast *os);
|
||||||
|
virtual ~SoftKeyboard() {}
|
||||||
|
|
||||||
void draw(float x, float y, int transp = 0);
|
void draw(float x, float y, int transp = 0);
|
||||||
int key(int k, byte &shiftFlags);
|
int key(int k, byte &shiftFlags);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue