[Scummvm-cvs-logs] CVS: scummvm actor.cpp,1.31,1.32 akos.cpp,1.7,1.8 debug.cpp,1.16,1.17 gfx.cpp,1.39,1.40 object.cpp,1.34,1.35 script.cpp,1.27,1.28 script_v2.cpp,1.29,1.30 scumm.h,1.64,1.65 scummvm.cpp,1.61,1.62 scummvm.dsp,1.19,1.20 sdl.cpp,1.35,1.36 stdafx.h,1.8,1.9 string.cpp,1.26,1.27 windows.cpp,1.27,1.28 x11.cpp,1.1,1.2
James Brown
ender at users.sourceforge.net
Wed Mar 6 04:26:03 CET 2002
Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv15241
Modified Files:
actor.cpp akos.cpp debug.cpp gfx.cpp object.cpp script.cpp
script_v2.cpp scumm.h scummvm.cpp scummvm.dsp sdl.cpp stdafx.h
string.cpp windows.cpp x11.cpp
Log Message:
Applied cleanup and scaling patch by Rob.
Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/actor.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** actor.cpp 6 Mar 2002 10:35:38 -0000 1.31
--- actor.cpp 6 Mar 2002 12:24:56 -0000 1.32
***************
*** 157,163 ****
if(_gameId==GID_DIG) {
! float temp;
temp = atan2 (XYFactor, -YXFactor);
! a->newDirection = normalizeAngle(temp * 1.8e2 / 3.14);
} else {
a->newDirection = getAngleFromPos(XYFactor, YXFactor);
--- 157,163 ----
if(_gameId==GID_DIG) {
! double temp;
temp = atan2 (XYFactor, -YXFactor);
! a->newDirection = normalizeAngle((int)(temp * 1.8e2 / 3.14));
} else {
a->newDirection = getAngleFromPos(XYFactor, YXFactor);
***************
*** 466,470 ****
uint threshold;
uint best;
! int box, iterations; /* Use inerations for those odd times we get stuck in the loop */
byte flags, b;
--- 466,470 ----
uint threshold;
uint best;
! int box, iterations = 0; /* Use inerations for those odd times we get stuck in the loop */
byte flags, b;
***************
*** 481,485 ****
while(1) {
iterations++;
! if (iterations > 1000) return abr; /* Safety net */
box = getNumBoxes() - 1;
best = (uint)0xFFFF;
--- 481,485 ----
while(1) {
iterations++;
! if (iterations > 3000000) return abr; /* Safety net */
box = getNumBoxes() - 1;
best = (uint)0xFFFF;
Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/akos.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** akos.cpp 6 Mar 2002 09:40:21 -0000 1.7
--- akos.cpp 6 Mar 2002 12:24:56 -0000 1.8
***************
*** 40,44 ****
int32 direction;
int32 temp;
! int32 temp_facing;
temp=many_direction_tab[ManyDirection];
direction=temp + ManyDirection * 8;
--- 40,44 ----
int32 direction;
int32 temp;
!
temp=many_direction_tab[ManyDirection];
direction=temp + ManyDirection * 8;
Index: debug.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/debug.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** debug.cpp 6 Mar 2002 10:02:59 -0000 1.16
--- debug.cpp 6 Mar 2002 12:24:56 -0000 1.17
***************
*** 150,153 ****
--- 150,154 ----
default: /* this line is never reached */
error("Unknown debug command");
+ return true;
}
}
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gfx.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** gfx.cpp 6 Mar 2002 09:40:21 -0000 1.39
--- gfx.cpp 6 Mar 2002 12:24:56 -0000 1.40
***************
*** 554,558 ****
int val;
CameraData *cd = &camera;
! int diff; // Full throttle hack
if (!(_features & GF_AFTER_V7))
--- 554,558 ----
int val;
CameraData *cd = &camera;
! int diff;
if (!(_features & GF_AFTER_V7))
***************
*** 2370,2374 ****
do {
! byte color,code;
uint len, num;
uint x;
--- 2370,2374 ----
do {
! byte color;
uint len, num;
uint x;
Index: object.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/object.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** object.cpp 6 Mar 2002 09:40:21 -0000 1.34
--- object.cpp 6 Mar 2002 12:24:56 -0000 1.35
***************
*** 492,496 ****
void Scumm::setupRoomObject(ObjectData *od, byte *room) {
CodeHeader *cdhd;
! ImageHeader *imhd; // Full throttle hack
if(_features & GF_SMALL_HEADER) {
--- 492,496 ----
void Scumm::setupRoomObject(ObjectData *od, byte *room) {
CodeHeader *cdhd;
! ImageHeader *imhd;
if(_features & GF_SMALL_HEADER) {
Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** script.cpp 6 Mar 2002 10:03:00 -0000 1.27
--- script.cpp 6 Mar 2002 12:24:56 -0000 1.28
***************
*** 335,339 ****
_vars[var] = value;
! if ((_varwatch == var) || (_varwatch == 0))
printf("vars[%d] = %d (via script %d)\n", var, value, &vm.slot[_currentScript].number);
return;
--- 335,339 ----
_vars[var] = value;
! if ((_varwatch == (int)var) || (_varwatch == 0))
printf("vars[%d] = %d (via script %d)\n", var, value, &vm.slot[_currentScript].number);
return;
Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v2.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** script_v2.cpp 6 Mar 2002 10:35:38 -0000 1.29
--- script_v2.cpp 6 Mar 2002 12:24:56 -0000 1.30
***************
*** 2612,2616 ****
case 117:
! error("stub o6_miscOps_117()");
break;
--- 2612,2616 ----
case 117:
! warning("stub o6_miscOps_117()");
break;
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm.h,v
retrieving revision 1.64
retrieving revision 1.65
diff -C2 -d -r1.64 -r1.65
*** scumm.h 6 Mar 2002 10:03:00 -0000 1.64
--- scumm.h 6 Mar 2002 12:24:56 -0000 1.65
***************
*** 957,960 ****
--- 957,963 ----
uint16 _debugMode;
+ uint16 _noSubtitles; // skip all subtitles?
+ unsigned int _scale; // multiplier to resolution (2 is default)
+
byte *_messagePtr;
***************
*** 2215,2219 ****
void CDECL debug(int level, const char *s, ...);
void checkHeap();
! void initGraphics(Scumm *s, bool fullScreen);
void updateScreen(Scumm *s);
void drawMouse(Scumm *s, int x, int y, int color, byte *mask, bool visible);
--- 2218,2222 ----
void CDECL debug(int level, const char *s, ...);
void checkHeap();
! void initGraphics(Scumm *s, bool fullScreen, unsigned int scaleFactor = 2);
void updateScreen(Scumm *s);
void drawMouse(Scumm *s, int x, int y, int color, byte *mask, bool visible);
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.cpp,v
retrieving revision 1.61
retrieving revision 1.62
diff -C2 -d -r1.61 -r1.62
*** scummvm.cpp 6 Mar 2002 10:03:00 -0000 1.61
--- scummvm.cpp 6 Mar 2002 12:24:56 -0000 1.62
***************
*** 192,196 ****
_fileHandle = NULL;
! _debugMode = 1;
_maxHeapThreshold = 450000;
--- 192,198 ----
_fileHandle = NULL;
! _debugMode = 0; // off by default...
! _noSubtitles = 0; // use by default - should this depend on soundtrack?
! _scale = 2; // double size by default
_maxHeapThreshold = 450000;
***************
*** 235,239 ****
// }
! initGraphics(this, _fullScreen);
if (_features & GF_SMALL_HEADER)
--- 237,241 ----
// }
! initGraphics(this, _fullScreen, _scale);
if (_features & GF_SMALL_HEADER)
***************
*** 398,405 ****
--- 400,429 ----
}
+
+ #define USAGE_STRING "ScummVM - Scumm Interpreter\n" \
+ "Syntax:\n" \
+ "\tscummvm [-v] [-d] [-n] [-b<num>] [-t<num>] [-s<num>] [-p<path>] [-m<num>] [-f] game\n" \
+ "Flags:\n" \
+ "\tv - show version info and exit\n" \
+ "\td - enable debug output\n" \
+ "\tn - no subtitles for speech\n" \
+ "\tb<num> - start in room <num>\n" \
+ "\tt<num> - Set music tempo. Suggested: 1F0000\n" \
+ "\ts<num> - Set scale factor to <num> (1, 2, or 3 - 2 by default)\n" \
+ "\tp<path> - look for game in <path>\n" \
+ "\tm<num> - Set music volume to <num> (0-100)\n" \
+ "\tf - fullscreen mode\n"
+
void Scumm::parseCommandLine(int argc, char **argv) {
int i;
char *s;
+ // check for arguments
+ if (argc < 2)
+ {
+ printf( USAGE_STRING );
+ exit(1);
+ }
+
/* Parse the arguments */
for (i=1; i < argc; i++) {
***************
*** 411,414 ****
--- 435,440 ----
switch(tolower(*s)) {
case 'b':
+ if (*(s+1) == '\0')
+ goto ShowHelpAndExit;
_bootParam = atoi(s+1);
goto NextArg;
***************
*** 416,429 ****
_fullScreen = true;
break;
case 'v':
printf("ScummVM " SCUMMVM_VERSION "\nBuilt on " __DATE__ " " __TIME__ "\n");
exit(1);
case 'p':
! _gameDataPath = argv[++i];
! break;
case 't':
_gameTempo = atoi(s+1);
goto NextArg;
case 'm': {
SoundEngine *se = (SoundEngine*)_soundEngine;
if (se)
--- 442,481 ----
_fullScreen = true;
break;
+ case 'd':
+ _debugMode = true;
+ break;
+ case 'n':
+ _noSubtitles = true;
+ break;
+ case 's':
+ if (*(s+1) == '\0')
+ goto ShowHelpAndExit;
+ _scale = atoi(s+1);
+ if (_scale == 0 || _scale > 3)
+ {
+ // bad scale - only 1, 2, 3 work for now
+ printf("Invalid scale '%s' - valid values are 1, 2, 3\n", s+1);
+ exit(1);
+ }
+ goto NextArg;
case 'v':
printf("ScummVM " SCUMMVM_VERSION "\nBuilt on " __DATE__ " " __TIME__ "\n");
+ #ifdef SCUMMVM_PLATFORM_VERSION
+ printf(" " SCUMMVM_PLATFORM_VERSION "\n");
+ #endif
exit(1);
case 'p':
! if (*(s+1) == '\0')
! goto ShowHelpAndExit;
! _gameDataPath = s+1;
! goto NextArg;
case 't':
+ if (*(s+1) == '\0')
+ goto ShowHelpAndExit;
_gameTempo = atoi(s+1);
goto NextArg;
case 'm': {
+ if (*(s+1) == '\0')
+ goto ShowHelpAndExit;
SoundEngine *se = (SoundEngine*)_soundEngine;
if (se)
***************
*** 433,445 ****
default:
ShowHelpAndExit:;
! printf(
! "ScummVM - Scumm Interpreter\n"
! "Syntax:\n"
! "\tscummvm [-b<num>] [-p path] [-f] [-m<num>] [-t<num>] game\n"
! "Flags:\n"
! "\tm<num> - Set music volume (0-100)\n"
! "\tt<num> - Set music tempo (Default: 2031616)\n"
! "\tb<num> - start in that room\n"
! "\tf - fullscreen mode\n");
exit(1);
}
--- 485,489 ----
default:
ShowHelpAndExit:;
! printf( USAGE_STRING );
exit(1);
}
***************
*** 1158,1162 ****
if (scumm._currentScript != 0xFF) {
ScriptSlot *ss = &scumm.vm.slot[scumm._currentScript];
! fprintf(stderr, "Error(%d:%d:0x%X): %s!\nPress a key to quit.\n",
scumm._roomResource,
ss->number,
--- 1202,1206 ----
if (scumm._currentScript != 0xFF) {
ScriptSlot *ss = &scumm.vm.slot[scumm._currentScript];
! fprintf(stderr, "Error(%d:%d:0x%X): %s!\n",
scumm._roomResource,
ss->number,
***************
*** 1164,1169 ****
buf);
} else {
! fprintf(stderr, "Error: %s!\nPress a key to quit.\n", buf);
}
exit(1);
}
--- 1208,1214 ----
buf);
} else {
! fprintf(stderr, "Error: %s!\n", buf);
}
+ // Doesn't wait for any keypress!! Is it intended to?
exit(1);
}
Index: scummvm.dsp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.dsp,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** scummvm.dsp 24 Feb 2002 16:23:44 -0000 1.19
--- scummvm.dsp 6 Mar 2002 12:24:56 -0000 1.20
***************
*** 43,47 ****
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
! # ADD CPP /nologo /Zp4 /MD /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
# ADD BASE RSC /l 0x41d /d "NDEBUG"
# ADD RSC /l 0x41d /d "NDEBUG"
--- 43,48 ----
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
! # ADD CPP /nologo /G6 /Zp8 /MD /W3 /GX- /O2 /Ob2 /I "." /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
! # SUBTRACT CPP /YX /Yc /Yu
# ADD BASE RSC /l 0x41d /d "NDEBUG"
# ADD RSC /l 0x41d /d "NDEBUG"
Index: sdl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sdl.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -d -r1.35 -r1.36
*** sdl.cpp 24 Feb 2002 17:25:02 -0000 1.35
--- sdl.cpp 6 Mar 2002 12:24:56 -0000 1.36
***************
*** 28,32 ****
#include "SDL_thread.h"
! #define SCALEUP_2x2
Scumm scumm;
--- 28,32 ----
#include "SDL_thread.h"
! static unsigned int scale;
Scumm scumm;
***************
*** 122,132 ****
case SDL_MOUSEMOTION: {
int newx,newy;
! #if !defined(SCALEUP_2x2)
! newx = event.motion.x;
! newy = event.motion.y;
! #else
newx = event.motion.x>>1;
newy = event.motion.y>>1;
! #endif
if (newx != s->mouse.x || newy != s->mouse.y) {
s->mouse.x = newx;
--- 122,140 ----
case SDL_MOUSEMOTION: {
int newx,newy;
! if (scale == 3)
! {
! newx = event.motion.x/3;
! newy = event.motion.y/3;
! } else
! if (scale == 2)
! {
newx = event.motion.x>>1;
newy = event.motion.y>>1;
! } else
! {
! newx = event.motion.x;
! newy = event.motion.y;
! }
!
if (newx != s->mouse.x || newy != s->mouse.y) {
s->mouse.x = newx;
***************
*** 182,196 ****
else if (!fullRedraw) {
r = &dirtyRects[numDirtyRects++];
! #if defined(SCALEUP_2x2)
r->x = x*2;
r->y = y*2;
r->w = w*2;
r->h = h*2;
! #else
r->x = x;
r->y = y;
r->w = w;
r->h = h;
! #endif
}
}
--- 190,213 ----
else if (!fullRedraw) {
r = &dirtyRects[numDirtyRects++];
! if (scale == 3)
! {
! r->x = x*3;
! r->y = y*3;
! r->w = w*3;
! r->h = h*3;
! } else
! if (scale == 2)
! {
r->x = x*2;
r->y = y*2;
r->w = w*2;
r->h = h*2;
! } else
! {
r->x = x;
r->y = y;
r->w = w;
r->h = h;
! }
}
}
***************
*** 220,229 ****
* Move the screen up or down to account for the change.
*/
! #if defined(SCALEUP_2x2)
! SDL_Rect dstr = {0,shake_pos*2,640,400}, srcr = {0,old_shake_pos*2,640,400};
! #else
! SDL_Rect dstr = {0,shake_pos,320,200}, srcr = {0,old_shake_pos,320,200};
! #endif
SDL_BlitSurface(screen, &srcr, screen, &dstr);
/* Also adjust the mouse pointer backup Y coordinate.
--- 237,257 ----
* Move the screen up or down to account for the change.
*/
! if (scale == 3)
! {
! SDL_Rect dstr = {0,shake_pos*3,960,600};
! SDL_Rect srcr = {0,old_shake_pos*3,960,600};
SDL_BlitSurface(screen, &srcr, screen, &dstr);
+ } else
+ if (scale == 2)
+ {
+ SDL_Rect dstr = {0,shake_pos*2,640,400};
+ SDL_Rect srcr = {0,old_shake_pos*2,640,400};
+ SDL_BlitSurface(screen, &srcr, screen, &dstr);
+ } else
+ {
+ SDL_Rect dstr = {0,shake_pos,320,200};
+ SDL_Rect srcr = {0,old_shake_pos,320,200};
+ SDL_BlitSurface(screen, &srcr, screen, &dstr);
+ }
/* Also adjust the mouse pointer backup Y coordinate.
***************
*** 248,257 ****
/* Fill the dirty area with blackness or the scumm image */
{
! #if defined(SCALEUP_2x2)
SDL_Rect blackrect = {0, dirty_blacktop*2, 640, dirty_blackheight*2};
! #else
SDL_Rect blackrect = {0, dirty_blacktop, 320, dirty_blackheight};
- #endif
SDL_FillRect(screen, &blackrect, 0);
s->redrawLines(dirty_top, dirty_top + dirty_height);
}
--- 276,294 ----
/* Fill the dirty area with blackness or the scumm image */
{
! if (scale == 3)
! {
! SDL_Rect blackrect = {0, dirty_blacktop*3, 960, dirty_blackheight*3};
! SDL_FillRect(screen, &blackrect, 0);
! } else
! if (scale == 2)
! {
SDL_Rect blackrect = {0, dirty_blacktop*2, 640, dirty_blackheight*2};
! SDL_FillRect(screen, &blackrect, 0);
! } else
! {
SDL_Rect blackrect = {0, dirty_blacktop, 320, dirty_blackheight};
SDL_FillRect(screen, &blackrect, 0);
+ }
+
s->redrawLines(dirty_top, dirty_top + dirty_height);
}
***************
*** 278,290 ****
error("SDL_LockSurface failed: %s.\n", SDL_GetError());
! #if !defined(SCALEUP_2x2)
! dst = (byte*)screen->pixels + y*320 + x;
addDirtyRect(x,y,w,h);
do {
! memcpy(dst, src, w);
! dst += 320;
src += 320;
} while (--h);
#else
dst = (byte*)screen->pixels + y*640*2 + x*2;
addDirtyRect(x,y,w,h);
--- 315,349 ----
error("SDL_LockSurface failed: %s.\n", SDL_GetError());
! if (scale == 3)
! {
! dst = (byte*)screen->pixels + y*960*3 + x*3;
addDirtyRect(x,y,w,h);
+ #ifdef DEBUG_CODE
+ byte black = GetAsyncKeyState(VK_SHIFT)<0 ? 0 : 0xFF;
do {
! i=0;
! do {
! dst[i*3] = dst[i*3+1] = dst[i*3+2] = src[i] & black;
! } while (++i!=w);
! memcpy(dst+960, dst, w*3);
! memcpy(dst+960+960, dst, w*3);
! dst += 960*3;
src += 320;
} while (--h);
#else
+ do {
+ i=0;
+ do {
+ dst[i*3] = dst[i*3+1] = dst[i*3+2] = src[i];
+ } while (++i!=w);
+ memcpy(dst+960, dst, w*3);
+ memcpy(dst+960+960, dst, w*3);
+ dst += 960*3;
+ src += 320;
+ } while (--h);
+ #endif
+ } else
+ if (scale == 2)
+ {
dst = (byte*)screen->pixels + y*640*2 + x*2;
addDirtyRect(x,y,w,h);
***************
*** 311,315 ****
} while (--h);
#endif
! #endif
SDL_UnlockSurface(screen);
--- 370,383 ----
} while (--h);
#endif
! } else
! {
! dst = (byte*)screen->pixels + y*320 + x;
! addDirtyRect(x,y,w,h);
! do {
! memcpy(dst, src, w);
! dst += 320;
! src += 320;
! } while (--h);
! }
SDL_UnlockSurface(screen);
***************
*** 362,366 ****
error("SDL_LockSurface failed: %s.\n", SDL_GetError());
! #if defined(SCALEUP_2x2)
if (has_mouse) {
--- 430,485 ----
error("SDL_LockSurface failed: %s.\n", SDL_GetError());
! if (scale == 3)
! {
!
! if (has_mouse) {
! dst = (byte*)screen->pixels + old_mouse_y*960*3 + old_mouse_x*3;
! bak = old_backup;
!
! for (y=0; y<old_mouse_h; y++,bak+=BAK_WIDTH*3,dst+=960*3) {
! if ( (uint)(old_mouse_y + y) < 200) {
! for (x=0; x<old_mouse_w; x++) {
! if ((uint)(old_mouse_x + x) < 320) {
! dst[x*3+960] = dst[x*3+960+960] = dst[x*3] = bak[x*3];
! dst[x*3+960+1] = dst[x*3+960+960+1] = dst[x*3+1] = bak[x*3+1];
! dst[x*3+960+2] = dst[x*3+960+960+2] = dst[x*3+2] = bak[x*3+2];
! }
! }
! }
! }
! }
!
! if (visible) {
! ydraw += current_shake_pos;
!
! dst = (byte*)screen->pixels + ydraw*960*3 + xdraw*3;
! bak = old_backup;
!
! for (y=0; y<h; y++,dst+=960*3,bak+=BAK_WIDTH*3,buf+=w) {
! if ((uint)(ydraw+y)<200) {
! for (x=0; x<w; x++) {
! if ((uint)(xdraw+x)<320) {
! bak[x*3] = dst[x*3];
! bak[x*3+1] = dst[x*3+1];
! bak[x*3+2] = dst[x*3+2];
! if ((color=buf[x])!=0xFF) {
! dst[x*3] = color;
! dst[x*3+1] = color;
! dst[x*3+2] = color;
! dst[x*3+960] = color;
! dst[x*3+1+960] = color;
! dst[x*3+2+960] = color;
! dst[x*3+960+960] = color;
! dst[x*3+1+960+960] = color;
! dst[x*3+2+960+960] = color;
! }
! }
! }
! }
! }
! }
! } else
! if (scale == 2)
! {
if (has_mouse) {
***************
*** 403,407 ****
}
}
! #else
if (has_mouse) {
dst = (byte*)screen->pixels + old_mouse_y*320 + old_mouse_x;
--- 522,527 ----
}
}
! } else
! {
if (has_mouse) {
dst = (byte*)screen->pixels + old_mouse_y*320 + old_mouse_x;
***************
*** 437,443 ****
}
}
!
!
! #endif
SDL_UnlockSurface(screen);
--- 557,561 ----
}
}
! }
SDL_UnlockSurface(screen);
***************
*** 488,494 ****
! void initGraphics(Scumm *s, bool fullScreen) {
SDL_AudioSpec desired;
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO)==-1) {
error("Could not initialize SDL: %s.\n", SDL_GetError());
--- 606,614 ----
! void initGraphics(Scumm *s, bool fullScreen, unsigned int scaleFactor) {
SDL_AudioSpec desired;
+ scale = scaleFactor;
+
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO)==-1) {
error("Could not initialize SDL: %s.\n", SDL_GetError());
***************
*** 526,534 ****
! #if !defined(SCALEUP_2x2)
! screen = SDL_SetVideoMode(320, 200, 8, fullScreen ? (SDL_SWSURFACE | SDL_FULLSCREEN) : SDL_SWSURFACE);
! #else
! screen = SDL_SetVideoMode(640, 400, 8, fullScreen ? (SDL_SWSURFACE | SDL_FULLSCREEN) : SDL_SWSURFACE);
! #endif
printf("%d %d, %d %d, %d %d %d, %d %d %d %d %d\n",
--- 646,674 ----
! if (scale == 3)
! {
! screen = SDL_SetVideoMode(960, 600, 8, fullScreen ? (SDL_SWSURFACE | SDL_FULLSCREEN) : (SDL_SWSURFACE | SDL_DOUBLEBUF));
! } else
! if (scale == 2)
! {
! screen = SDL_SetVideoMode(640, 400, 8, fullScreen ? (SDL_SWSURFACE | SDL_FULLSCREEN) : (SDL_SWSURFACE | SDL_DOUBLEBUF));
! } else
! {
! screen = SDL_SetVideoMode(320, 200, 8, fullScreen ? (SDL_SWSURFACE | SDL_FULLSCREEN) : (SDL_SWSURFACE | SDL_DOUBLEBUF));
! }
!
! // SDL_SWSURFACE 0x00000000 /* Surface is in system memory */
! // SDL_HWSURFACE 0x00000001 /* Surface is in video memory */
! // SDL_ASYNCBLIT 0x00000004 /* Use asynchronous blits if possible */
! // SDL_ANYFORMAT 0x10000000 /* Allow any video depth/pixel-format */
! // SDL_HWPALETTE 0x20000000 /* Surface has exclusive palette */
! // SDL_DOUBLEBUF 0x40000000 /* Set up double-buffered video mode */
! // SDL_FULLSCREEN 0x80000000 /* Surface is a full screen display */
! // SDL_OPENGL 0x00000002 /* Create an OpenGL rendering context */
! // SDL_OPENGLBLIT 0x0000000A /* Create an OpenGL rendering context and use it for blitting */
! // SDL_RESIZABLE 0x00000010 /* This video mode may be resized */
! // SDL_NOFRAME 0x00000020 /* No window caption or edge frame */
!
!
printf("%d %d, %d %d, %d %d %d, %d %d %d %d %d\n",
Index: stdafx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/stdafx.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** stdafx.h 20 Nov 2001 07:13:01 -0000 1.8
--- stdafx.h 6 Mar 2002 12:24:56 -0000 1.9
***************
*** 3,6 ****
--- 3,9 ----
*
* $Log$
+ * Revision 1.9 2002/03/06 12:24:56 ender
+ * Applied cleanup and scaling patch by Rob.
+ *
* Revision 1.8 2001/11/20 07:13:01 vasyl
* Added ability for ports to override all includes in stdafx.h. To use this feature
***************
*** 86,87 ****
--- 89,112 ----
#endif
+
+
+ /* Semi-Platform-specific version info */
+ #ifdef ALLOW_GDI
+ /* Assume Win32 GDI is used, then... */
+ #define SCUMMVM_PLATFORM_VERSION "Win32 GDI version"
+
+ #else
+ #ifdef ALLOW_X11
+ /* Assume pure X11 is used, then... */
+ #define SCUMMVM_PLATFORM_VERSION "X11 version"
+
+ #else
+ #ifdef SDL_COMPILEDVERSION
+ #define SCUMMVM_PLATFORM_VERSION "SDL version"
+ //SDL_COMPILEDVERSION is a number... :(
+ //SDL_Linked_Version returns an SDL_Version structure...
+
+ #endif
+ #endif
+ #endif
+
Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/string.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** string.cpp 6 Mar 2002 00:18:22 -0000 1.26
--- string.cpp 6 Mar 2002 12:24:56 -0000 1.27
***************
*** 350,356 ****
--- 350,358 ----
else if (!(_features&GF_AFTER_V6)) {
// if (!_vars[VAR_V5_CHARFLAG]) { /* FIXME */
+ if (!(a && _noSubtitles))
charset.printChar(c);
// }
} else {
+ if (!(a && _noSubtitles))
charset.printChar(c);
}
Index: windows.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/windows.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** windows.cpp 19 Feb 2002 18:04:21 -0000 1.27
--- windows.cpp 6 Mar 2002 12:24:56 -0000 1.28
***************
*** 46,50 ****
static bool shutdown;
!
#if USE_GDI
--- 46,50 ----
static bool shutdown;
! static unsigned int scale;
#if USE_GDI
***************
*** 447,453 ****
}
! void initGraphics(Scumm *s, bool fullScreen) {
if(fullScreen)
warning("Use SDL for fullscreen support");
}
--- 447,454 ----
}
! void initGraphics(Scumm *s, bool fullScreen, unsigned int scaleFactor) {
if(fullScreen)
warning("Use SDL for fullscreen support");
+ scale = scaleFactor; // not supported yet! ignored.
}
Index: x11.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/x11.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** x11.cpp 23 Feb 2002 17:39:46 -0000 1.1
--- x11.cpp 6 Mar 2002 12:24:56 -0000 1.2
***************
*** 69,72 ****
--- 69,74 ----
static bool has_mouse, hide_mouse;
+ static unsigned int scale;
+
#define MAX_NUMBER_OF_DIRTY_SQUARES 32
typedef struct {
***************
*** 189,193 ****
/* Initialize the graphics sub-system */
! void initGraphics(Scumm *s, bool fullScreen) {
char buf[512], *gameName;
static XShmSegmentInfo shminfo;
--- 191,195 ----
/* Initialize the graphics sub-system */
! void initGraphics(Scumm *s, bool fullScreen, unsigned int scaleFactor) {
char buf[512], *gameName;
static XShmSegmentInfo shminfo;
***************
*** 197,200 ****
--- 199,204 ----
char *name = (char *) &buf;
+ scale = scaleFactor; // not implemented yet! ignored.
+
/* For the window title */
sprintf(buf, "ScummVM - %s", gameName = s->getGameName());
More information about the Scummvm-git-logs
mailing list