[Scummvm-cvs-logs] CVS: scummvm/saga events.cpp,1.23,1.24 input.cpp,1.10,1.11 render.cpp,1.30,1.31 saga.h,1.36,1.37 transitions.cpp,1.8,1.9
Eugene Sandulenko
sev at users.sourceforge.net
Wed Aug 11 07:06:56 CEST 2004
Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32194
Modified Files:
events.cpp input.cpp render.cpp saga.h transitions.cpp
Log Message:
Move SYSINPUT_* and TRANSITION_* to SagaEngine class
Index: events.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/events.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- events.cpp 10 Aug 2004 23:04:52 -0000 1.23
+++ events.cpp 11 Aug 2004 14:04:12 -0000 1.24
@@ -173,9 +173,9 @@
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 @@
_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;
Index: input.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/input.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- input.cpp 10 Aug 2004 18:31:32 -0000 1.10
+++ input.cpp 11 Aug 2004 14:04:12 -0000 1.11
@@ -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 @@
return R_SUCCESS;
}
-R_POINT SYSINPUT_GetMousePos() {
+R_POINT SagaEngine::getMousePos() {
return _mousePos;
}
Index: render.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/render.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- render.cpp 10 Aug 2004 18:31:32 -0000 1.30
+++ render.cpp 11 Aug 2004 14:04:12 -0000 1.31
@@ -124,7 +124,7 @@
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 @@
_vm->textDrawList(scene_info.text_list, backbuf_surface);
// Handle user input
- SYSINPUT_ProcessInput();
+ _vm->processInput();
// Display rendering information
if (_flags & RF_SHOW_FPS) {
Index: saga.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/saga.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- saga.h 10 Aug 2004 23:04:52 -0000 1.36
+++ saga.h 11 Aug 2004 14:04:12 -0000 1.37
@@ -80,13 +80,6 @@
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 @@
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
Index: transitions.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/transitions.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- transitions.cpp 10 Aug 2004 23:04:52 -0000 1.8
+++ transitions.cpp 11 Aug 2004 14:04:12 -0000 1.9
@@ -30,7 +30,7 @@
@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;
More information about the Scummvm-git-logs
mailing list