Move SYSINPUT_* and TRANSITION_* to SagaEngine class

svn-id: r14555
This commit is contained in:
Eugene Sandulenko 2004-08-11 14:04:12 +00:00
parent c41b0ad99a
commit 23d5d1fb82
5 changed files with 20 additions and 21 deletions

View file

@ -173,9 +173,9 @@ int Events::handleContinuous(R_EVENT *event) {
case EVENT_DISSOLVE:
_vm->_render->getBufferInfo(&buf_info);
_vm->_scene->getBGInfo(&bg_info);
TRANSITION_Dissolve(buf_info.r_bg_buf, buf_info.r_bg_buf_w, buf_info.r_bg_buf_h,
buf_info.r_bg_buf_w, bg_info.bg_buf, bg_info.bg_w,
bg_info.bg_h, bg_info.bg_p, 0, 0, 0, event_pc);
_vm->transitionDissolve(buf_info.r_bg_buf, buf_info.r_bg_buf_w,
buf_info.r_bg_buf_h, buf_info.r_bg_buf_w, bg_info.bg_buf, bg_info.bg_w,
bg_info.bg_h, bg_info.bg_p, 0, 0, 0, event_pc);
break;
case EVENT_DISSOLVE_BGMASK:
// we dissolve it centered.
@ -186,9 +186,9 @@ int Events::handleContinuous(R_EVENT *event) {
_vm->_render->getBufferInfo(&buf_info);
_vm->_scene->getBGMaskInfo(&w, &h, &mask_buf, &len);
TRANSITION_Dissolve(buf_info.r_bg_buf, buf_info.r_bg_buf_w, buf_info.r_bg_buf_h,
buf_info.r_bg_buf_w, mask_buf, w, h, 0, 1, (320 - w) / 2,
(200 - h) / 2, event_pc);
_vm->transitionDissolve(buf_info.r_bg_buf, buf_info.r_bg_buf_w,
buf_info.r_bg_buf_h, buf_info.r_bg_buf_w, mask_buf, w, h, 0, 1,
(320 - w) / 2, (200 - h) / 2, event_pc);
break;
default:
break;

View file

@ -28,13 +28,10 @@
#include "saga/interface.h"
#include "saga/render.h"
#include "saga/scene.h"
#include "saga/script_mod.h"
namespace Saga {
static R_POINT _mousePos;
int SYSINPUT_ProcessInput() {
int SagaEngine::processInput() {
OSystem::Event event;
R_POINT imouse_pt;
@ -131,7 +128,7 @@ int SYSINPUT_ProcessInput() {
return R_SUCCESS;
}
R_POINT SYSINPUT_GetMousePos() {
R_POINT SagaEngine::getMousePos() {
return _mousePos;
}

View file

@ -124,7 +124,7 @@ int Render::drawScene() {
backbuf_surface = _backbuf_surface;
// Get mouse coordinates
mouse_pt = SYSINPUT_GetMousePos();
mouse_pt = _vm->getMousePos();
_vm->_scene->getBGInfo(&bg_info);
GAME_GetDisplayInfo(&disp_info);
@ -149,7 +149,7 @@ int Render::drawScene() {
_vm->textDrawList(scene_info.text_list, backbuf_surface);
// Handle user input
SYSINPUT_ProcessInput();
_vm->processInput();
// Display rendering information
if (_flags & RF_SHOW_FPS) {

View file

@ -80,13 +80,6 @@ enum SAGAGameId {
GID_IHNM
};
int TRANSITION_Dissolve(byte *dst_img, int dst_w, int dst_h, int dst_p, const byte *src_img,
int src_w, int src_h, int src_p, int flags, int x, int y,
double percent);
int SYSINPUT_ProcessInput(void);
R_POINT SYSINPUT_GetMousePos();
class SagaEngine : public Engine {
void errorString(const char *buf_input, char *buf_output);
@ -145,6 +138,15 @@ public:
int effect_color, int flags);
int textProcessList(R_TEXTLIST *textlist, long ms);
int transitionDissolve(byte *dst_img, int dst_w, int dst_h, int dst_p,
const byte *src_img, int src_w, int src_h, int src_p, int flags, int x, int y,
double percent);
int processInput(void);
R_POINT getMousePos();
private:
R_POINT _mousePos;
};
// FIXME: Global var. We use it until everything will be turned into objects

View file

@ -30,7 +30,7 @@ namespace Saga {
@param flag if set to 1, do zero masking
*/
int TRANSITION_Dissolve(byte *dst_img, int dst_w, int dst_h, int dst_p, const byte *src_img,
int SagaEngine::transitionDissolve(byte *dst_img, int dst_w, int dst_h, int dst_p, const byte *src_img,
int src_w, int src_h, int src_p, int flags, int x, int y,
double percent) {
#define XOR_MASK 0xB400;