diff options
| -rw-r--r-- | actor.cpp | 8 | ||||
| -rw-r--r-- | akos.cpp | 2 | ||||
| -rw-r--r-- | debug.cpp | 1 | ||||
| -rw-r--r-- | gfx.cpp | 4 | ||||
| -rw-r--r-- | object.cpp | 2 | ||||
| -rw-r--r-- | script.cpp | 2 | ||||
| -rw-r--r-- | script_v2.cpp | 2 | ||||
| -rw-r--r-- | scumm.h | 5 | ||||
| -rw-r--r-- | scummvm.cpp | 75 | ||||
| -rw-r--r-- | scummvm.dsp | 3 | ||||
| -rw-r--r-- | sdl.cpp | 206 | ||||
| -rw-r--r-- | stdafx.h | 25 | ||||
| -rw-r--r-- | string.cpp | 2 | ||||
| -rw-r--r-- | windows.cpp | 5 | ||||
| -rw-r--r-- | x11.cpp | 6 | 
15 files changed, 285 insertions, 63 deletions
@@ -156,9 +156,9 @@ int Scumm::calcMovementFactor(Actor *a, int newX, int newY) {  	a->walkdata.yfrac = 0;  	if(_gameId==GID_DIG) { -		float temp; +		double temp;  		temp = atan2 (XYFactor, -YXFactor); -		a->newDirection = normalizeAngle(temp * 1.8e2 / 3.14); +		a->newDirection = normalizeAngle((int)(temp * 1.8e2 / 3.14));  	} else {  		a->newDirection = getAngleFromPos(XYFactor, YXFactor);  	} @@ -465,7 +465,7 @@ AdjustBoxResult Scumm::adjustXYToBeInBox(Actor *a, int x, int y, int pathfrom) {  	AdjustBoxResult abr,tmp;  	uint threshold;  	uint best; -	int box, iterations;	/* Use inerations for those odd times we get stuck in the loop */ +	int box, iterations = 0;	/* Use inerations for those odd times we get stuck in the loop */  	byte flags, b;  	abr.x = x; @@ -480,7 +480,7 @@ AdjustBoxResult Scumm::adjustXYToBeInBox(Actor *a, int x, int y, int pathfrom) {  		while(1) {  			iterations++; -			if (iterations > 1000) return abr;	/* Safety net */ +			if (iterations > 3000000) return abr;	/* Safety net */  			box = getNumBoxes() - 1;  			best = (uint)0xFFFF;  			b = 0; @@ -39,7 +39,7 @@ int Scumm::akos_findManyDirection(int16 ManyDirection, uint16 facing)  {  	int32 direction;  	int32 temp; -	int32 temp_facing; +  	temp=many_direction_tab[ManyDirection];  	direction=temp + ManyDirection * 8;  	do{ @@ -149,6 +149,7 @@ bool ScummDebugger::do_command() {  	default: /* this line is never reached */  		error("Unknown debug command");	 +		return true;  	}  } @@ -553,7 +553,7 @@ void Scumm::redrawBGAreas() {  	int i;  	int val;  	CameraData *cd = &camera; -	int diff;	// Full throttle hack +	int diff;  	if (!(_features & GF_AFTER_V7))  		if (cd->_cur.x!=cd->_last.x && charset._hasMask) @@ -2369,7 +2369,7 @@ void Scumm::drawBomp(BompDrawData *bd) {                          src = bd->dataptr;                          do { -                                byte color,code; +                                byte color;                                  uint len, num;                                  uint x;                                  if ((uint)y >= (uint)bd->outheight) { diff --git a/object.cpp b/object.cpp index 84595dc463..caa3bb877f 100644 --- a/object.cpp +++ b/object.cpp @@ -491,7 +491,7 @@ void Scumm::loadRoomObjectsSmall() {  void Scumm::setupRoomObject(ObjectData *od, byte *room) {        	  CodeHeader *cdhd; -	  ImageHeader *imhd;	// Full throttle hack +	  ImageHeader *imhd;          if(_features & GF_SMALL_HEADER) { diff --git a/script.cpp b/script.cpp index 1853881f87..98b6561b65 100644 --- a/script.cpp +++ b/script.cpp @@ -334,7 +334,7 @@ void Scumm::writeVar(uint var, int value) {  		checkRange(_numVariables-1, 0, var, "Variable %d out of range(w)");  		_vars[var] = value; -		if ((_varwatch == var) || (_varwatch == 0)) +		if ((_varwatch == (int)var) || (_varwatch == 0))  			printf("vars[%d] = %d (via script %d)\n", var, value, &vm.slot[_currentScript].number);  		return;  	} diff --git a/script_v2.cpp b/script_v2.cpp index dddc56e534..1fa4d4aeb9 100644 --- a/script_v2.cpp +++ b/script_v2.cpp @@ -2611,7 +2611,7 @@ void Scumm::o6_miscOps() {  			break;  		case 117: -			error("stub o6_miscOps_117()"); +			warning("stub o6_miscOps_117()");  			break;  		case 118: @@ -956,6 +956,9 @@ struct Scumm {  	uint16 _debugMode; +	uint16 _noSubtitles;  // skip all subtitles? +	unsigned int _scale;  // multiplier to resolution (2 is default) +  	byte *_messagePtr;  	byte _numNestedScripts; @@ -2214,7 +2217,7 @@ void CDECL NORETURN error(const char *s, ...);  void CDECL warning(const char *s, ...);  void CDECL debug(int level, const char *s, ...);  void checkHeap(); -void initGraphics(Scumm *s, bool fullScreen); +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);  void drawMouse(Scumm *s, int x, int y, int w, int h, byte *buf, bool visible); diff --git a/scummvm.cpp b/scummvm.cpp index 2c7b2a5dc4..f4b00c1b11 100644 --- a/scummvm.cpp +++ b/scummvm.cpp @@ -191,7 +191,9 @@ void Scumm::scummMain(int argc, char **argv) {  	_fileHandle = NULL; -	_debugMode = 1; +	_debugMode = 0;  // off by default... +	_noSubtitles = 0;  // use by default - should this depend on soundtrack? +	_scale = 2;  // double size by default  	_maxHeapThreshold = 450000;  	_minHeapThreshold = 400000; @@ -234,7 +236,7 @@ void Scumm::scummMain(int argc, char **argv) {  //		_bootParam = 10001;  //	} -	initGraphics(this, _fullScreen); +	initGraphics(this, _fullScreen, _scale);      if (_features & GF_SMALL_HEADER)          readIndexFileSmall(); @@ -397,10 +399,32 @@ int Scumm::scummLoop(int delta) {  } + +#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++) {  		s = argv[i]; @@ -410,21 +434,49 @@ void Scumm::parseCommandLine(int argc, char **argv) {  			while (*s) {  				switch(tolower(*s)) {  				case 'b':  +                	if (*(s+1) == '\0') +                		goto ShowHelpAndExit;  					_bootParam = atoi(s+1);  					goto NextArg;  				case 'f':  					_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': -					_gameDataPath = argv[++i]; -					break; +                	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)   						se->set_music_volume(atoi(s+1)); @@ -432,15 +484,7 @@ void Scumm::parseCommandLine(int argc, char **argv) {  				}  				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"); +					printf( USAGE_STRING );  					exit(1);  				}  				s++; @@ -1157,14 +1201,15 @@ void NORETURN CDECL error(const char *s, ...) {  	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",  +		fprintf(stderr, "Error(%d:%d:0x%X): %s!\n",  			scumm._roomResource,  			ss->number,  			scumm._scriptPointer - scumm._scriptOrgPointer,  			buf);  	} else { -		fprintf(stderr, "Error: %s!\nPress a key to quit.\n", buf); +		fprintf(stderr, "Error: %s!\n", buf);  	} +	// Doesn't wait for any keypress!! Is it intended to?  	exit(1);  } diff --git a/scummvm.dsp b/scummvm.dsp index 6cc9ee9042..d17d16be2e 100644 --- a/scummvm.dsp +++ b/scummvm.dsp @@ -42,7 +42,8 @@ RSC=rc.exe  # PROP Ignore_Export_Lib 0
  # 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 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"
  BSC32=bscmake.exe
 @@ -27,7 +27,7 @@  #include "sound.h"  #include "SDL_thread.h" -#define SCALEUP_2x2 +static unsigned int scale;  Scumm scumm;  ScummDebugger debugger; @@ -121,13 +121,21 @@ void waitForTimer(Scumm *s, int msec_delay) {  				break;  			case SDL_MOUSEMOTION: {  				int newx,newy; -	#if !defined(SCALEUP_2x2) -				newx = event.motion.x; -				newy = event.motion.y; -	#else +	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; -	#endif +	} else +	{ +				newx = event.motion.x; +				newy = event.motion.y; +	} +  				if (newx != s->mouse.x || newy != s->mouse.y) {  					s->mouse.x = newx;  					s->mouse.y = newy; @@ -181,17 +189,26 @@ void addDirtyRect(int x, int y, int w, int h) {  		fullRedraw = true;  	else if (!fullRedraw) {  		r = &dirtyRects[numDirtyRects++]; -#if defined(SCALEUP_2x2) +	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 +	} else +	{  		r->x = x;  		r->y = y;  		r->w = w;  		r->h = h; -#endif +	}  	}  } @@ -219,12 +236,23 @@ void setShakePos(Scumm *s, int shake_pos) {  		/* Old shake pos was current_shake_pos, new is shake_pos.  		 * 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 +	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.  		 * There is a minor mouse glitch when the mouse is moved @@ -247,12 +275,21 @@ void setShakePos(Scumm *s, int shake_pos) {  		/* Fill the dirty area with blackness or the scumm image */  		{ -#if defined(SCALEUP_2x2) +		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}; -#else +			SDL_FillRect(screen, &blackrect, 0); +		} else +		{  			SDL_Rect blackrect = {0, dirty_blacktop, 320, dirty_blackheight}; -#endif  			SDL_FillRect(screen, &blackrect, 0); +		} +  			s->redrawLines(dirty_top, dirty_top + dirty_height);  		}  	} @@ -277,15 +314,37 @@ void blitToScreen(Scumm *s, byte *src,int x, int y, int w, int h) {  	if (SDL_LockSurface(screen)==-1)  		error("SDL_LockSurface failed: %s.\n", SDL_GetError()); -#if !defined(SCALEUP_2x2) -	dst = (byte*)screen->pixels + y*320 + x; +	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 { -		memcpy(dst, src, w); -		dst += 320; +		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);		  #ifdef DEBUG_CODE @@ -310,7 +369,16 @@ void blitToScreen(Scumm *s, byte *src,int x, int y, int w, int h) {  		src += 320;  	} while (--h);  #endif -#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);  } @@ -361,7 +429,58 @@ void drawMouse(Scumm *s, int xdraw, int ydraw, int w, int h, byte *buf, bool vis  	if (SDL_LockSurface(screen)==-1)  		error("SDL_LockSurface failed: %s.\n", SDL_GetError()); -#if defined(SCALEUP_2x2) +	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) {  		dst = (byte*)screen->pixels + old_mouse_y*640*2 + old_mouse_x*2; @@ -402,7 +521,8 @@ void drawMouse(Scumm *s, int xdraw, int ydraw, int w, int h, byte *buf, bool vis  			}  		}  	} -#else +	} else +	{  	if (has_mouse) {  		dst = (byte*)screen->pixels + old_mouse_y*320 + old_mouse_x;  		bak = old_backup; @@ -436,9 +556,7 @@ void drawMouse(Scumm *s, int xdraw, int ydraw, int w, int h, byte *buf, bool vis  			}  		}  	} - - -#endif	 +	}  	SDL_UnlockSurface(screen); @@ -487,9 +605,11 @@ int music_thread(Scumm *s) {  } -void initGraphics(Scumm *s, bool fullScreen) { +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());  	    exit(1); @@ -525,11 +645,31 @@ void initGraphics(Scumm *s, bool fullScreen) {  	} -#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 +	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",   		sizeof(int8), sizeof(uint8), @@ -2,6 +2,9 @@   * $Id$   *   * $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   * port must define symbol NONSTANDARD_PORT. Port must also provide @@ -85,3 +88,25 @@  #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 + diff --git a/string.cpp b/string.cpp index 0f91f9416e..8bdeb308cf 100644 --- a/string.cpp +++ b/string.cpp @@ -349,9 +349,11 @@ newLine:;  				charset.printCharOld(c);  			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);  			} diff --git a/windows.cpp b/windows.cpp index c7b5ed5a68..7890054c27 100644 --- a/windows.cpp +++ b/windows.cpp @@ -45,7 +45,7 @@  #define BITS_PER_SAMPLE 16  static bool shutdown; - +static unsigned int scale;  #if USE_GDI  typedef struct DIB { @@ -446,9 +446,10 @@ void waitForTimer(Scumm *s, int delay) {  	}   } -void initGraphics(Scumm *s, bool fullScreen) { +void initGraphics(Scumm *s, bool fullScreen, unsigned int scaleFactor) {  	if(fullScreen)  		warning("Use SDL for fullscreen support"); +	scale = scaleFactor;  // not supported yet! ignored.  }  void drawMouse(Scumm *s, int, int, int, byte*, bool) { @@ -68,6 +68,8 @@ static int old_mouse_x, old_mouse_y;  static int old_mouse_h, old_mouse_w;  static bool has_mouse, hide_mouse; +static unsigned int scale; +  #define MAX_NUMBER_OF_DIRTY_SQUARES 32  typedef struct {    int x, y, w, h; @@ -188,7 +190,7 @@ void BoxTest(int num) {  }  /* Initialize the graphics sub-system */ -void initGraphics(Scumm *s, bool fullScreen) { +void initGraphics(Scumm *s, bool fullScreen, unsigned int scaleFactor) {    char buf[512], *gameName;    static XShmSegmentInfo shminfo;    XWMHints *wm_hints; @@ -196,6 +198,8 @@ void initGraphics(Scumm *s, bool fullScreen) {    XTextProperty window_name;    char *name = (char *) &buf; +	scale = scaleFactor;  // not implemented yet! ignored. +    /* For the window title */    sprintf(buf, "ScummVM - %s", gameName = s->getGameName());    free(gameName);  | 
