[Scummvm-cvs-logs] CVS: scummvm scummvm.proj,NONE,1.1 readme.txt,1.24,1.25 sdl.cpp,1.94,1.95
James Brown
ender at users.sourceforge.net
Wed Apr 17 04:21:16 CEST 2002
Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv26054
Modified Files:
readme.txt sdl.cpp
Added Files:
scummvm.proj
Log Message:
Add BeIDE project file (update readme accordingly).
Readd shaking support. It doesn't work properly - probably due to the
removal of redrawLines(). Ludde? You vanished before I could confirm this
with you.. is there a new function to call?
--- NEW FILE: scummvm.proj ---
MIDE
Index: readme.txt
===================================================================
RCS file: /cvsroot/scummvm/scummvm/readme.txt,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** readme.txt 16 Apr 2002 12:23:55 -0000 1.24
--- readme.txt 17 Apr 2002 11:20:55 -0000 1.25
***************
*** 76,81 ****
AmigaOS - SDL/AGA
MorphOS - SDL
Acorn (RiscOS) - ???
- BeOS - ???
Dreamcast - ???
--- 76,81 ----
AmigaOS - SDL/AGA
MorphOS - SDL
+ BeOS - SDL
Acorn (RiscOS) - ???
Dreamcast - ???
***************
*** 97,100 ****
--- 97,102 ----
- Some overlap may occur in graphics, expecially the intro
- Music does not work in adlib mode, use midi
+ - The dark-light torch does not work in the Tunnel of Love.
+ You'll have to guess where to throw :)
Loom (256 Talkie):
***************
*** 148,152 ****
--- 150,157 ----
* Now it should compile successfully.
+ BeOS:
+ * Open the 'scummvm.proj' file in BeIDE. Compile as normal.
+
Running:
--------
Index: sdl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sdl.cpp,v
retrieving revision 1.94
retrieving revision 1.95
diff -C2 -d -r1.94 -r1.95
*** sdl.cpp 16 Apr 2002 12:18:50 -0000 1.94
--- sdl.cpp 17 Apr 2002 11:20:55 -0000 1.95
***************
*** 8,12 ****
#include <SDL.h>
!
class OSystem_SDL : public OSystem {
--- 8,13 ----
#include <SDL.h>
! #define MAX(a,b) (((a)<(b)) ? (b) : (a))
! #define MIN(a,b) (((a)>(b)) ? (b) : (a))
class OSystem_SDL : public OSystem {
***************
*** 568,572 ****
area += r->w * r->h;
! /* scale the rect to fit in SDL_UpdateRects */
r->x <<= 1;
r->y <<= 1;
--- 569,573 ----
area += r->w * r->h;
! /* scaling the rect to fit in SDL_UpdateRects */
r->x <<= 1;
r->y <<= 1;
***************
*** 625,628 ****
--- 626,666 ----
void OSystem_SDL::set_shake_pos(int shake_pos) {
+ int old_shake_pos = _current_shake_pos;
+ int dirty_height, dirty_blackheight;
+ int dirty_top, dirty_blacktop;
+
+ if (shake_pos != old_shake_pos) {
+ _current_shake_pos = shake_pos;
+ force_full = true;
+
+ /* Old shake pos was current_shake_pos, new is shake_pos.
+ * Move the screen up or down to account for the change.
+ */
+ SDL_Rect dstr = { 0, shake_pos*scaling, 320*scaling, 200*scaling };
+ SDL_Rect srcr = { 0, old_shake_pos*scaling, 320*scaling, 200*scaling };
+ SDL_BlitSurface(sdl_screen, &srcr, sdl_screen, &dstr);
+
+ /* Refresh either the upper part of the screen,
+ * or the lower part */
+ if (shake_pos > old_shake_pos) {
+ dirty_height = MIN(shake_pos, 0) - MIN(old_shake_pos, 0);
+ dirty_top = -MIN(shake_pos, 0);
+ dirty_blackheight = MAX(shake_pos, 0) - MAX(old_shake_pos, 0);
+ dirty_blacktop = MAX(old_shake_pos, 0);
+ } else {
+ dirty_height = MAX(old_shake_pos, 0) - MAX(shake_pos, 0);
+ dirty_top = 200 - MAX(old_shake_pos, 0);
+ dirty_blackheight = MIN(old_shake_pos, 0) - MIN(shake_pos, 0);
+ dirty_blacktop = 200 + MIN(shake_pos, 0);
+ }
+
+ /* Fill the dirty area with blackness or the scumm image */
+ SDL_Rect blackrect = {0, dirty_blacktop*scaling, 320*scaling, dirty_blackheight*scaling};
+ SDL_FillRect(sdl_screen, &blackrect, 0);
+
+ /* FIXME: Um, screen seems to glitch since this
+ 'not needed' function was removed */
+ //g_scumm->redrawLines(dirty_top, dirty_top + dirty_height);
+ }
}
More information about the Scummvm-git-logs
mailing list