Removed unused stuff; cleanup

svn-id: r14052
This commit is contained in:
Max Horn 2004-06-25 20:01:31 +00:00
parent c399ca8486
commit bb3ef09efa
6 changed files with 10 additions and 49 deletions

View file

@ -68,7 +68,7 @@ int GFX_Init(OSystem *system, int width, int height) {
// For now, always show the mouse cursor.
GFX_SetCursor(1);
SYSINPUT_ShowMouse();
g_system->showMouse(true);
return R_SUCCESS;
}

View file

@ -32,11 +32,7 @@
namespace Saga {
static int _mouse_x, _mouse_y;
int SYSINPUT_Init() {
return R_SUCCESS;
}
static R_POINT _mousePos;
int SYSINPUT_ProcessInput() {
OSystem::Event event;
@ -120,10 +116,9 @@ int SYSINPUT_ProcessInput() {
INTERFACE_Update(&imouse_pt, UPDATE_MOUSECLICK);
break;
case OSystem::EVENT_MOUSEMOVE:
_mouse_x = event.mouse.x;
_mouse_y = event.mouse.y;
imouse_pt.x = _mouse_x;
imouse_pt.y = _mouse_y;
_mousePos.x = event.mouse.x;
_mousePos.y = event.mouse.y;
imouse_pt = _mousePos;
break;
case OSystem::EVENT_QUIT:
g_system->quit();
@ -136,23 +131,8 @@ int SYSINPUT_ProcessInput() {
return R_SUCCESS;
}
int SYSINPUT_GetMousePos(int *mouse_x, int *mouse_y) {
*mouse_x = _mouse_x;
*mouse_y = _mouse_y;
return R_SUCCESS;
}
int SYSINPUT_HideMouse() {
g_system->showMouse(false);
return R_SUCCESS;
}
int SYSINPUT_ShowMouse() {
g_system->showMouse(true);
return R_SUCCESS;
R_POINT SYSINPUT_GetMousePos() {
return _mousePos;
}
} // End of namespace Saga

View file

@ -71,14 +71,6 @@ struct R_SURFACE {
#define R_RGB_GREEN 0x0000FF00UL
#define R_RGB_BLUE 0x000000FFUL
struct SAGA_COLOR {
byte r;
byte g;
byte b;
};
#define SAGA_COLOR_LEN 3
struct PALENTRY {
byte red;
byte green;
@ -86,7 +78,6 @@ struct PALENTRY {
};
enum R_ERRORCODE {
R_STOP = -3,
R_MEM = -2,
R_FAILURE = -1,
R_SUCCESS = 0
@ -102,7 +93,6 @@ int TRANSITION_Dissolve(byte *dst_img, int dst_w, int dst_h,
#define R_PAL_ENTRIES 256
int GFX_Init(OSystem *system, int width, int height);
R_SURFACE *GFX_GetScreenSurface();
R_SURFACE *GFX_GetBackBuffer();
int GFX_GetWhite();
int GFX_GetBlack();
@ -113,11 +103,8 @@ int GFX_PalToBlack(R_SURFACE *surface, PALENTRY *src_pal, double percent);
int GFX_BlackToPal(R_SURFACE *surface, PALENTRY *src_pal, double percent);
// System : Input
int SYSINPUT_Init();
int SYSINPUT_ProcessInput(void);
int SYSINPUT_GetMousePos(int *mouse_x, int *mouse_y);
int SYSINPUT_HideMouse(void);
int SYSINPUT_ShowMouse(void);
R_POINT SYSINPUT_GetMousePos();
} // End of namespace Saga

View file

@ -112,7 +112,6 @@ int RENDER_DrawScene() {
char txt_buf[20];
int fps_width;
R_POINT mouse_pt;
int mouse_x, mouse_y;
if (!RenderModule.initialized) {
return R_FAILURE;
@ -123,10 +122,7 @@ int RENDER_DrawScene() {
backbuf_surface = RenderModule.r_backbuf_surface;
// Get mouse coordinates
SYSINPUT_GetMousePos(&mouse_x, &mouse_y);
mouse_pt.x = mouse_x;
mouse_pt.y = mouse_y;
mouse_pt = SYSINPUT_GetMousePos();
SCENE_GetBGInfo(&bg_info);
GAME_GetDisplayInfo(&disp_info);

View file

@ -206,8 +206,6 @@ void SagaEngine::go() {
debug(0, "Sound disabled.");
}
SYSINPUT_Init();
SYSTIMER_ResetMSCounter();
// Begin Main Engine Loop

View file

@ -42,7 +42,7 @@ class SndRes;
class Sound;
class Music;
typedef Common::MemoryReadStream MemoryReadStream;
using Common::MemoryReadStream;
#define R_PBOUNDS(n,max) (((n)>=(0))&&((n)<(max)))