aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/psp
diff options
context:
space:
mode:
authorMax Horn2007-03-17 19:02:05 +0000
committerMax Horn2007-03-17 19:02:05 +0000
commited54ea9155961d8ca5d5fb3c7777fc57a29f2751 (patch)
tree467b926af11cd4129ba003d04ba01de044c7a6df /backends/platform/psp
parentf272d1957084098c5b53975ad3501074f6971af8 (diff)
downloadscummvm-rg350-ed54ea9155961d8ca5d5fb3c7777fc57a29f2751.tar.gz
scummvm-rg350-ed54ea9155961d8ca5d5fb3c7777fc57a29f2751.tar.bz2
scummvm-rg350-ed54ea9155961d8ca5d5fb3c7777fc57a29f2751.zip
Moved Event/EventType/keyboard enum from common/system.h (part of class OSystem) to common/events.h (part of namespace Common). Porters may have to make minor changes to their backends to get them to compile again
svn-id: r26180
Diffstat (limited to 'backends/platform/psp')
-rw-r--r--backends/platform/psp/osys_psp.cpp10
-rw-r--r--backends/platform/psp/osys_psp.h2
-rw-r--r--backends/platform/psp/osys_psp_gu.cpp7
-rw-r--r--backends/platform/psp/osys_psp_gu.h2
4 files changed, 11 insertions, 10 deletions
diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp
index 42e066b543..27cfa0fefb 100644
--- a/backends/platform/psp/osys_psp.cpp
+++ b/backends/platform/psp/osys_psp.cpp
@@ -417,7 +417,7 @@ void OSystem_PSP::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX,
#define PAD_CHECK_TIME 40
#define PAD_DIR_MASK (PSP_CTRL_UP | PSP_CTRL_DOWN | PSP_CTRL_LEFT | PSP_CTRL_RIGHT)
-bool OSystem_PSP::pollEvent(Event &event) {
+bool OSystem_PSP::pollEvent(Common::Event &event) {
s8 analogStepAmountX = 0;
s8 analogStepAmountY = 0;
/*
@@ -431,14 +431,14 @@ bool OSystem_PSP::pollEvent(Event &event) {
if (buttonsChanged & (PSP_CTRL_CROSS | PSP_CTRL_CIRCLE | PSP_CTRL_LTRIGGER | PSP_CTRL_RTRIGGER | PSP_CTRL_START | PSP_CTRL_SELECT | PSP_CTRL_SQUARE)) {
if (buttonsChanged & PSP_CTRL_CROSS) {
- event.type = (pad.Buttons & PSP_CTRL_CROSS) ? OSystem::EVENT_LBUTTONDOWN : OSystem::EVENT_LBUTTONUP;
+ event.type = (pad.Buttons & PSP_CTRL_CROSS) ? Common::EVENT_LBUTTONDOWN : OSystem::EVENT_LBUTTONUP;
}
else if (buttonsChanged & PSP_CTRL_CIRCLE) {
- event.type = (pad.Buttons & PSP_CTRL_CIRCLE) ? OSystem::EVENT_RBUTTONDOWN : OSystem::EVENT_RBUTTONUP;
+ event.type = (pad.Buttons & PSP_CTRL_CIRCLE) ? Common::EVENT_RBUTTONDOWN : OSystem::EVENT_RBUTTONUP;
}
else {
//any of the other buttons.
- event.type = buttonsChanged & pad.Buttons ? OSystem::EVENT_KEYDOWN : OSystem::EVENT_KEYUP;
+ event.type = buttonsChanged & pad.Buttons ? Common::EVENT_KEYDOWN : OSystem::EVENT_KEYUP;
event.kbd.flags = 0;
if (buttonsChanged & PSP_CTRL_LTRIGGER) {
@@ -537,7 +537,7 @@ bool OSystem_PSP::pollEvent(Event &event) {
}
if ((_mouseX != newX) || (_mouseY != newY)) {
- event.type = OSystem::EVENT_MOUSEMOVE;
+ event.type = Common::EVENT_MOUSEMOVE;
event.mouse.x = _mouseX = newX;
event.mouse.y = _mouseY = newY;
return true;
diff --git a/backends/platform/psp/osys_psp.h b/backends/platform/psp/osys_psp.h
index d8c92da431..fe5d5f3195 100644
--- a/backends/platform/psp/osys_psp.h
+++ b/backends/platform/psp/osys_psp.h
@@ -123,7 +123,7 @@ public:
virtual void warpMouse(int x, int y);
virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, byte keycolor = 255, int cursorTargetScale = 1);
- virtual bool pollEvent(Event &event);
+ virtual bool pollEvent(Common::Event &event);
virtual uint32 getMillis();
virtual void delayMillis(uint msecs);
diff --git a/backends/platform/psp/osys_psp_gu.cpp b/backends/platform/psp/osys_psp_gu.cpp
index 7553140118..871d93acba 100644
--- a/backends/platform/psp/osys_psp_gu.cpp
+++ b/backends/platform/psp/osys_psp_gu.cpp
@@ -25,6 +25,7 @@
#include <zlib.h>
#include "osys_psp_gu.h"
#include "./trace.h"
+#include "common/events.h"
#define PIXEL_SIZE (4)
#define BUF_WIDTH (512)
@@ -451,7 +452,7 @@ void OSystem_PSP_GU::updateScreen() {
//sceKernelDcacheWritebackAll();
}
-bool OSystem_PSP_GU::pollEvent(Event &event) {
+bool OSystem_PSP_GU::pollEvent(Common::Event &event) {
float nub_angle = -1;
int x, y;
@@ -522,7 +523,7 @@ bool OSystem_PSP_GU::pollEvent(Event &event) {
_kbdClut[_keySelected] = 0xffff;
if (buttonsChanged & PSP_CTRL_CROSS) {
- event.type = (pad.Buttons & PSP_CTRL_CROSS) ? OSystem::EVENT_KEYDOWN : OSystem::EVENT_KEYUP;
+ event.type = (pad.Buttons & PSP_CTRL_CROSS) ? Common::EVENT_KEYDOWN : OSystem::EVENT_KEYUP;
if(_keySelected > 26) {
event.kbd.flags = 0;
switch(_keySelected) {
@@ -553,7 +554,7 @@ bool OSystem_PSP_GU::pollEvent(Event &event) {
case CAPS_LOCK:
event.kbd.ascii = 'A'+_keySelected-1;
event.kbd.keycode = SDLK_a + _keySelected-1;
- event.kbd.flags = KBD_SHIFT;
+ event.kbd.flags = Common::KBD_SHIFT;
break;
case SYMBOLS:
if (_keySelected < 21) {
diff --git a/backends/platform/psp/osys_psp_gu.h b/backends/platform/psp/osys_psp_gu.h
index b1445a520e..1a9a6d9ee1 100644
--- a/backends/platform/psp/osys_psp_gu.h
+++ b/backends/platform/psp/osys_psp_gu.h
@@ -48,7 +48,7 @@ public:
void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, byte keycolor, int cursorTargetScale);
void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) ;
void setPalette(const byte *colors, uint start, uint num);
- bool pollEvent(Event &event);
+ bool pollEvent(Common::Event &event);
int _graphicMode;
struct Vertex *_vertices;
unsigned short* _clut;