[Scummvm-cvs-logs] CVS: scummvm debug.cpp,1.26,1.27 gameDetector.cpp,1.7,1.8 gameDetector.h,1.5,1.6 gfx.cpp,1.62,1.63 gfx.h,1.2,1.3 gui.cpp,1.27,1.28 gui.h,1.13,1.14 insane.cpp,1.17,1.18 resource.cpp,1.64,1.65 scumm.h,1.115,1.116 scummsys.h,1.25,1.26 scummvm.cpp,1.105,1.106 scummvm.dsp,1.32,1.33 sdl.cpp,1.82,1.83 sound.h,1.13,1.14 stdafx.h,1.12,1.13 system.h,1.2,1.3 windows.cpp,1.32,1.33 x11.cpp,1.10,1.11

Ludvig Strigeus strigeus at users.sourceforge.net
Fri Apr 12 14:27:02 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv4300

Modified Files:
	debug.cpp gameDetector.cpp gameDetector.h gfx.cpp gfx.h 
	gui.cpp gui.h insane.cpp resource.cpp scumm.h scummsys.h 
	scummvm.cpp scummvm.dsp sdl.cpp sound.h stdafx.h system.h 
	windows.cpp x11.cpp 
Log Message:
new video engine (expect broken non-sdl builds),
simon the sorcerer 1 & 2 support (non SCUMM games)

Index: debug.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/debug.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** debug.cpp	11 Apr 2002 17:19:14 -0000	1.26
--- debug.cpp	12 Apr 2002 21:26:34 -0000	1.27
***************
*** 64,67 ****
--- 64,68 ----
  
  void BoxTest(int num);
+ 
  bool ScummDebugger::do_command()
  {
***************
*** 129,133 ****
  			printf("\nWalk boxes:\n");
  			for (i = 0; i < num; i++) {
! 				BoxTest(i);
  				_s->getBoxCoordinates(i, &box);
  				printf("%d: [%d x %d] [%d x %d] [%d x %d] [%d x %d]\n", i,
--- 130,135 ----
  			printf("\nWalk boxes:\n");
  			for (i = 0; i < num; i++) {
! 				warning("BoxTest currently unimplemented in new graphics code\n");
! 				/*BoxTest(i);*/
  				_s->getBoxCoordinates(i, &box);
  				printf("%d: [%d x %d] [%d x %d] [%d x %d] [%d x %d]\n", i,

Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gameDetector.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** gameDetector.cpp	12 Apr 2002 10:34:45 -0000	1.7
--- gameDetector.cpp	12 Apr 2002 21:26:34 -0000	1.8
***************
*** 39,43 ****
  	"\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"
--- 39,42 ----
***************
*** 45,49 ****
  	"\tr       - emulate roland mt32 instruments\n"
  	"\tf       - fullscreen mode\n"
! 	"\tg       - graphics mode. 1 for 2xSai anti-aliasing\n"
  	"\ta       - load autosave game (for recovering from crashes)\n"
  ;
--- 44,48 ----
  	"\tr       - emulate roland mt32 instruments\n"
  	"\tf       - fullscreen mode\n"
! 	"\tg<mode> - graphics mode. normal,2x,3x,2xsai,super2xsai,supereagle\n"
  	"\ta       - load autosave game (for recovering from crashes)\n"
  ;
***************
*** 86,99 ****
  					_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__ " "
--- 85,88 ----
***************
*** 134,143 ****
  					_midi_driver = atoi(s + 1);
  					goto NextArg;
! 				case 'g':
! 					if (*(s + 1) == '\0')
! 						goto ShowHelpAndExit;
! 					_videoMode = atoi(s + 1);
  					goto NextArg;
- 
  				case 'c':
  					if (*(s + 1) == '\0')
--- 123,133 ----
  					_midi_driver = atoi(s + 1);
  					goto NextArg;
! 				case 'g': {
! 						int gfx_mode = parseGraphicsMode(s+1);
! 						if (gfx_mode == -1)
! 							goto ShowHelpAndExit;
! 						_gfx_mode = gfx_mode;
! 					}
  					goto NextArg;
  				case 'c':
  					if (*(s + 1) == '\0')
***************
*** 170,173 ****
--- 160,188 ----
  }
  
+ int GameDetector::parseGraphicsMode(const char *s) {
+ 	struct GraphicsModes {
+ 		const char *name;
+ 		int id;
+ 	};
+ 
+ 	const struct GraphicsModes gfx_modes[] = {
+ 		{"normal",GFX_NORMAL},
+ 		{"2x",GFX_DOUBLESIZE},
+ 		{"3x",GFX_TRIPLESIZE},
+ 		{"2xsai",GFX_2XSAI},
+ 		{"super2xsai",GFX_SUPER2XSAI},
+ 		{"supereagle",GFX_SUPEREAGLE},
+ 	};
+ 
+ 	const GraphicsModes *gm = gfx_modes;
+ 	int i;
+ 	for(i=0; i!=ARRAYSIZE(gfx_modes); i++,gm++) {
+ 		if (!scumm_stricmp(gm->name, s))
+ 			return gm->id;
+ 	}
+ 
+ 	return -1;
+ }
+ 
  struct VersionSettings {
  	const char *filename;
***************
*** 238,242 ****
  
  	/* Simon the Sorcerer 1 & 2 (not SCUMM games) */
! 	{"simon1dos", "Simon the Sorcerer 1 for DOS", GID_SIMON_FIRST+1, 99, 99, 99, 0},
  	{"simon1win", "Simon the Sorcerer 1 for Windows", GID_SIMON_FIRST+2, 99, 99, 99, 0},
  	{"simon2win", "Simon the Sorcerer 2 for Windows", GID_SIMON_FIRST+3, 99, 99, 99, 0},
--- 253,257 ----
  
  	/* Simon the Sorcerer 1 & 2 (not SCUMM games) */
! 	{"simon1dos", "Simon the Sorcerer 1 for DOS", GID_SIMON_FIRST+0, 99, 99, 99, 0},
  	{"simon1win", "Simon the Sorcerer 1 for Windows", GID_SIMON_FIRST+2, 99, 99, 99, 0},
  	{"simon2win", "Simon the Sorcerer 2 for Windows", GID_SIMON_FIRST+3, 99, 99, 99, 0},
***************
*** 286,294 ****
  
  	_noSubtitles = 0;							// use by default - should this depend on soundtrack?        
! 	_scale = 2;										// double size by default
  
  	_gameDataPath = NULL;
  	_gameTempo = 0;
- 	_videoMode = 0;
  	_soundCardType = 3;
  
--- 301,309 ----
  
  	_noSubtitles = 0;							// use by default - should this depend on soundtrack?        
! 
! 	_gfx_mode = GFX_DOUBLESIZE;
  
  	_gameDataPath = NULL;
  	_gameTempo = 0;
  	_soundCardType = 3;
  

Index: gameDetector.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gameDetector.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** gameDetector.h	12 Apr 2002 10:34:45 -0000	1.5
--- gameDetector.h	12 Apr 2002 21:26:34 -0000	1.6
***************
*** 38,53 ****
  	uint16 _soundCardType;
  
- 	unsigned int _scale;
  	char *_gameDataPath;
  	int _gameTempo;
  	void *_soundEngine;
  	int _midi_driver;
- 	int _videoMode;
  	char *_exe_name;
  	const char *_gameText;
  	uint32 _features;
  	
  	int _scummVersion;
  	int _cdrom;
  	
  
--- 38,55 ----
  	uint16 _soundCardType;
  
  	char *_gameDataPath;
  	int _gameTempo;
  	void *_soundEngine;
  	int _midi_driver;
  	char *_exe_name;
  	const char *_gameText;
  	uint32 _features;
+ 
+ 	int _gfx_mode;
  	
  	int _scummVersion;
  	int _cdrom;
+ 
+ 	int parseGraphicsMode(const char *s);
  	
  

Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gfx.cpp,v
retrieving revision 1.62
retrieving revision 1.63
diff -C2 -d -r1.62 -r1.63
*** gfx.cpp	11 Apr 2002 17:19:14 -0000	1.62
--- gfx.cpp	12 Apr 2002 21:26:34 -0000	1.63
***************
*** 142,147 ****
  		vs = &virtscr[0];
  
! 		blitToScreen(this, vs->screenPtr + _screenStartStrip * 8,
! 								 0, vs->topline, 320, vs->height);
  
  		for (i = 0; i < 40; i++) {
--- 142,147 ----
  		vs = &virtscr[0];
  
! 		_system->copy_rect(vs->screenPtr + _screenStartStrip * 8, 320, 
! 					0, vs->topline, 320, vs->height);
  
  		for (i = 0; i < 40; i++) {
***************
*** 154,158 ****
  	if (_shakeEnabled) {
  		_shakeFrame = (_shakeFrame + 1) & (NUM_SHAKE_POSITIONS - 1);
! 		setShakePos(this, shake_positions[_shakeFrame]);
  	}
  }
--- 154,158 ----
  	if (_shakeEnabled) {
  		_shakeFrame = (_shakeFrame + 1) & (NUM_SHAKE_POSITIONS - 1);
! 		_system->set_shake_pos(shake_positions[_shakeFrame]);
  	}
  }
***************
*** 235,239 ****
  
  	ptr = vs->screenPtr + (t * 40 + x) * 8 + _readOffs;
! 	blitToScreen(_vm, ptr, x * 8, vs->topline + t, w, b - t);
  }
  
--- 235,241 ----
  
  	ptr = vs->screenPtr + (t * 40 + x) * 8 + _readOffs;
! 	
! 	_vm->_system->copy_rect(
! 		ptr, 320, x * 8, vs->topline + t, w, b - t);
  }
  
***************
*** 1756,1761 ****
  			tab_2[i] += tab_1[i];
  
! 		updateScreen(this);
! 		waitForTimer(this, 30);
  	}
  }
--- 1758,1764 ----
  			tab_2[i] += tab_1[i];
  
! 		updatePalette();
! 		_system->update_screen();
! 		waitForTimer(30);
  	}
  }
***************
*** 1777,1781 ****
  	_shakeEnabled = mode != 0;
  	_shakeFrame = 0;
! 	setShakePos(this, 0);
  }
  
--- 1780,1784 ----
  	_shakeEnabled = mode != 0;
  	_shakeFrame = 0;
! 	_system->set_shake_pos(0);
  }
  
***************
*** 2205,2226 ****
  }
  
- void Scumm::drawMouse()
- {
- 	/* TODO: handle shake here */
- 
- 	if (_cursorAnimate) {
- 		if (!(_cursorAnimateIndex & 0x3))
- 			decompressDefaultCursor((_cursorAnimateIndex >> 2) & 3);
- 		_cursorAnimateIndex++;
- 
- 	}
- 
- 	::drawMouse(this,
- 							mouse.x - _cursorHotspotX,
- 							mouse.y - _cursorHotspotY,
- 							_cursorWidth,
- 							_cursorHeight, _grabbedCursor, gdi._cursorActive > 0);
- }
- 
  void Scumm::setCursorHotspot2(int x, int y)
  {
--- 2208,2211 ----
***************
*** 2403,2407 ****
  		ptr += 320;
  	}
! 
  }
  
--- 2388,2393 ----
  		ptr += 320;
  	}
! 	
! 	updateCursor();
  }
  
***************
*** 2427,2430 ****
--- 2413,2431 ----
  }
  
+ void Scumm::updateCursor() {
+ 	_system->set_mouse_cursor(_grabbedCursor, _cursorWidth, _cursorHeight,
+ 		_cursorHotspotX, _cursorHotspotY);
+ }
+ 
+ void Scumm::animateCursor() {
+ 	if (_cursorAnimate) {
+ 		if (!(_cursorAnimateIndex & 0x3))
+ 			decompressDefaultCursor((_cursorAnimateIndex >> 2) & 3);
+ 		_cursorAnimateIndex++;
+ 	}
+ 
+ 	updateCursor();
+ }
+ 
  void Scumm::useBompCursor(byte *im, int width, int height)
  {
***************
*** 2443,2446 ****
--- 2444,2449 ----
  
  	decompressBomp(_grabbedCursor, im + 10, width, height);
+ 
+ 	updateCursor();
  }
  
***************
*** 2466,2469 ****
--- 2469,2474 ----
  		_grabbedCursor[16 * i + 8] = color;
  	}
+ 
+ 	updateCursor();
  }
  
***************
*** 2615,2617 ****
  	}
  
! CHECK_HEAP}
--- 2620,2623 ----
  	}
  
! CHECK_HEAP;
! }

Index: gfx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gfx.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** gfx.h	22 Mar 2002 03:31:55 -0000	1.2
--- gfx.h	12 Apr 2002 21:26:34 -0000	1.3
***************
*** 101,106 ****
  	uint _readOffs;
  
- 	int8 _cursorActive;
- 
  	int _numZBuffer;
  	int _imgBufOffs[4];
--- 101,104 ----
***************
*** 113,116 ****
--- 111,116 ----
  	byte _hotspot_x;
  	byte _hotspot_y;
+ 	byte _cursorActive;
+ 
  	int16 _drawMouseX;
  	int16 _drawMouseY;

Index: gui.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** gui.cpp	12 Apr 2002 10:34:45 -0000	1.27
--- gui.cpp	12 Apr 2002 21:26:34 -0000	1.28
***************
*** 825,831 ****
  		_active++;
  		draw(0, 200);								// was 100
! 		_s->_cursorAnimate++;
! 		_s->gdi._cursorActive = 1;
! 		_s->pauseSounds(true);
  	}
  
--- 825,830 ----
  		_active++;
  		draw(0, 200);								// was 100
! 		_old_cursor_mode = s->_system->show_mouse(true);
! 		s->pauseSounds(true);
  	}
  
***************
*** 858,862 ****
  	_s->_fullRedraw = true;
  	_s->_completeScreenRedraw = true;
! 	_s->_cursorAnimate--;
  	_s->pauseSounds(false);
  	_active = false;
--- 857,863 ----
  	_s->_fullRedraw = true;
  	_s->_completeScreenRedraw = true;
! 	
! 	_s->_system->show_mouse(_old_cursor_mode);
! 
  	_s->pauseSounds(false);
  	_active = false;

Index: gui.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** gui.h	2 Apr 2002 17:15:27 -0000	1.13
--- gui.h	12 Apr 2002 21:26:34 -0000	1.14
***************
*** 134,138 ****
  #define SAVEGAME_NAME_LEN 32
  
! struct Gui {
  	Scumm *_s;
  	const GuiWidget *_widgets[4];
--- 134,139 ----
  #define SAVEGAME_NAME_LEN 32
  
! class Gui {
! public:
  	Scumm *_s;
  	const GuiWidget *_widgets[4];
***************
*** 144,147 ****
--- 145,149 ----
  	byte _textcolor;
  	byte _textcolorhi;
+ 	bool _old_cursor_mode;
  	int _parentX, _parentY;
  	byte _active;

Index: insane.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/insane.cpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** insane.cpp	11 Apr 2002 17:19:14 -0000	1.17
--- insane.cpp	12 Apr 2002 21:26:34 -0000	1.18
***************
*** 663,670 ****
  
  		if (_frameChanged) {
! 			blitToScreen(sm, sm->_videoBuffer, 0, 0, 320, 200);
! 			updateScreen(sm);
  
! 			sm->delta = sm->_system->waitTick(sm->delta);
  		}
  
--- 663,673 ----
  
  		if (_frameChanged) {
! 			/* FIXME: not properly implemented after switch to new gfx code */
  
! 			sm->_system->copy_rect(sm->_videoBuffer, 320, 0, 0, 320, 200);
! 			sm->_system->update_screen();
! 			sm->waitForTimer(20);
! 			
! 			//sm->delta = sm->_system->waitTick(sm->delta);
  		}
  

Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/resource.cpp,v
retrieving revision 1.64
retrieving revision 1.65
diff -C2 -d -r1.64 -r1.65
*** resource.cpp	11 Apr 2002 17:19:15 -0000	1.64
--- resource.cpp	12 Apr 2002 21:26:34 -0000	1.65
***************
*** 927,931 ****
  	uint32 oldAllocatedSize;
  
! 	return;
  
  	if (_expire_counter != 0xFF) {
--- 927,931 ----
  	uint32 oldAllocatedSize;
  
! //	return;
  
  	if (_expire_counter != 0xFF) {
***************
*** 1033,1043 ****
  void Scumm::heapClear(int mode)
  {
- 	/* TODO: implement this */
- 	warning("heapClear: not implemented");
  }
  
  void Scumm::unkHeapProc2(int a, int b)
  {
- 	warning("unkHeapProc2: not implemented");
  }
  
--- 1033,1040 ----

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm.h,v
retrieving revision 1.115
retrieving revision 1.116
diff -C2 -d -r1.115 -r1.116
*** scumm.h	12 Apr 2002 10:34:45 -0000	1.115
--- scumm.h	12 Apr 2002 21:26:34 -0000	1.116
***************
*** 33,40 ****
  #define ARRAYSIZE(x) (sizeof(x)/sizeof(x[0]))
  
- /* Initialized operator new */
- void * operator new(size_t size);
- 	
  class GameDetector;
  class Scumm;
  struct Actor;
--- 33,38 ----
  #define ARRAYSIZE(x) (sizeof(x)/sizeof(x[0]))
  
  class GameDetector;
+ class Gui;
  class Scumm;
  struct Actor;
***************
*** 66,72 ****
  };
  
! const uint16 many_direction_tab[18] = {4, 8, 71, 109, 251, 530, 0, 0, 0, 0, 22, 72, 107, 157, 202, 252, 287, 337};
! const int16 many_direction_tab_2[16] = {0, 90, 180, 270, -1, -1, -1, -1, 0, 45, 90, 135, 180, 225, 270, 315};
! const int bit_table[16] = {1,2,4,8,0x10,0x20,0x40,0x80,0x100,0x200,0x400,0x800,0x1000,0x2000,0x4000,0x8000};
  
  struct ScummPoint {
--- 64,70 ----
  };
  
! extern const uint16 many_direction_tab[18];
! extern const int16 many_direction_tab_2[16];
! extern const int bit_table[16];
  
  struct ScummPoint {
***************
*** 557,560 ****
--- 555,568 ----
  class Scumm {
  public:
+ 	/* Put often used variables at the top.
+ 	 * That results in a shorter form of the opcode
+ 	 * on some architectures. */
+ 	OSystem *_system;
+ 	void *_soundEngine;
+ 	Gui *_gui;
+ 	uint32 _features;
+ 	VerbSlot *_verbs;
+ 	ObjectData *_objs;
+ 	ScummDebugger *_debugger;
  
  	struct {
***************
*** 590,600 ****
  
  	/* video buffer */
- 
  	byte _videoBuffer[328*200]; // main video buffer
  
  	/* system call object */
  
- 	OSystem *_system;
- 
  	/* Scumm main loop */
  
--- 598,605 ----
***************
*** 635,639 ****
  
  	/* Core variable definitions */
- 	uint32 _features;
  	byte _gameId;
  	const char *_gameText;
--- 640,643 ----
***************
*** 641,652 ****
  
  	/* Core class/array definitions */
- 	void *_soundEngine;
- 	void *_gui;
  	Gdi gdi;
  
  	Actor actor[MAX_ACTORS];
- 	VerbSlot *_verbs;
- 	ObjectData *_objs;
- 	ScummDebugger *_debugger;
  	
  	uint16 *_inventory;
--- 645,651 ----
***************
*** 1121,1125 ****
  	void drawRoomObjects(int arg);
  	void drawRoomObject(int i, int arg);
- 	void drawMouse();
  	void drawBox(int x, int y, int x2, int y2, int color);
  	void drawBomp(BompDrawData *bd);
--- 1120,1123 ----
***************
*** 1187,1195 ****
  
  	void decompressBomp(byte *dst, byte *src, int w, int h);
- 	int  _videoMode;
  	uint _shakeFrame;
  	int _screenStartStrip, _screenEndStrip;
  	int _screenLeft, _screenTop;
- 	unsigned int _scale;	// Resolution multiplier (2 is default)	
  	uint16 _enqueue_b,_enqueue_c,_enqueue_d,_enqueue_e;
  	int _enqueuePos; 
--- 1185,1191 ----
***************
*** 1675,1683 ****
  	void launch();
  
! 	static Scumm *createFromDetector(GameDetector *detector);
  	void go();
  
  	void setupGUIColors();
  	byte getDefaultGUIColor(int color);
  };
  
--- 1671,1685 ----
  	void launch();
  
! 	static Scumm *createFromDetector(GameDetector *detector, OSystem *syst);
  	void go();
  
  	void setupGUIColors();
  	byte getDefaultGUIColor(int color);
+ 	void waitForTimer(int msec_delay);
+ 
+ 	void updateCursor();
+ 	void animateCursor();
+ 	void updatePalette();
+ 	static void on_generate_samples(void *s, int16 *samples, int len);
  };
  
***************
*** 1791,1796 ****
  	bool isSaving() { return _saveOrLoad; }
  
- 
- 
  	bool checkEOFLoadStream();
  
--- 1793,1796 ----
***************
*** 1802,1806 ****
  void outputdisplay2(Scumm *s, int disp);
  extern const byte revBitMask[8];
! void blitToScreen(Scumm *s, byte *src, int x, int y, int w, int h);
  
  #if defined(__GNUC__)
--- 1802,1806 ----
  void outputdisplay2(Scumm *s, int disp);
  extern const byte revBitMask[8];
! //void blitToScreen(Scumm *s, byte *src, int x, int y, int w, int h);
  
  #if defined(__GNUC__)
***************
*** 1813,1820 ****
  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);
! void drawMouse(Scumm *s, int x, int y, int w, int h, byte *buf, bool visible);
  void blit(byte *dst, byte *src, int w, int h);
  byte *findResource(uint32 tag, byte *searchin, int index);
--- 1813,1820 ----
  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(int x, int y, int color, byte *mask, bool visible);
! //void drawMouse(int x, int y, int w, int h, byte *buf, bool visible);
  void blit(byte *dst, byte *src, int w, int h);
  byte *findResource(uint32 tag, byte *searchin, int index);
***************
*** 1822,1830 ****
  byte *findResource(uint32 tag, byte *searchin);
  byte *findResourceSmall(uint32 tag, byte *searchin);
! void playSfxSound(void *sound, uint32 size, uint rate);
! bool isSfxFinished();
! void waitForTimer(Scumm *s, int msec_delay);
! void setShakePos(Scumm *s, int shake_pos);
  void setWindowName(Scumm *s);
  uint16 newTag2Old(uint32 oldTag);
! void cd_playtrack(int track, int offset, int delay);
--- 1822,1830 ----
  byte *findResource(uint32 tag, byte *searchin);
  byte *findResourceSmall(uint32 tag, byte *searchin);
! //void playSfxSound(void *sound, uint32 size, uint rate);
! //bool isSfxFinished();
! //void waitForTimer(Scumm *s, int msec_delay);
! //void setShakePos(Scumm *s, int shake_pos);
  void setWindowName(Scumm *s);
  uint16 newTag2Old(uint32 oldTag);
! //void cd_playtrack(int track, int offset, int delay);

Index: scummsys.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummsys.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** scummsys.h	18 Mar 2002 16:34:13 -0000	1.25
--- scummsys.h	12 Apr 2002 21:26:34 -0000	1.26
***************
*** 366,367 ****
--- 366,371 ----
  char *strdup(const char *s);
  #endif
+ 
+ /* Initialized operator new */
+ void * operator new(size_t size);
+ 

Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.cpp,v
retrieving revision 1.105
retrieving revision 1.106
diff -C2 -d -r1.105 -r1.106
*** scummvm.cpp	12 Apr 2002 10:34:46 -0000	1.105
--- scummvm.cpp	12 Apr 2002 21:26:34 -0000	1.106
***************
*** 322,327 ****
  		}
  
- 		gdi._cursorActive = _cursorState > 0;
- 
  		drawEnqueuedObjects();
  		drawDirtyScreenParts();
--- 322,325 ----
***************
*** 339,342 ****
--- 337,345 ----
  	}
  
+ 	animateCursor();
+ 	
+ 	/* show or hide mouse */
+ 	_system->show_mouse(_cursorState > 0);
+ 
  	_vars[VAR_TIMER] = 0;
  	return _vars[VAR_TIMER_NEXT];
***************
*** 477,481 ****
  	_doEffect = true;
  
! CHECK_HEAP}
  
  void Scumm::initRoomSubBlocks()
--- 480,485 ----
  	_doEffect = true;
  
! 	CHECK_HEAP;
! }
  
  void Scumm::initRoomSubBlocks()
***************
*** 913,916 ****
--- 917,922 ----
  		if (_grabbedCursor[i] == (byte)a)
  			_grabbedCursor[i] = 0xFF;
+ 
+ 	updateCursor();
  }
  
***************
*** 984,987 ****
--- 990,998 ----
  }
  
+ const uint16 many_direction_tab[18] = {4, 8, 71, 109, 251, 530, 0, 0, 0, 0, 22, 72, 107, 157, 202, 252, 287, 337};
+ const int16 many_direction_tab_2[16] = {0, 90, 180, 270, -1, -1, -1, -1, 0, 45, 90, 135, 180, 225, 270, 315};
+ const int bit_table[16] = {1,2,4,8,0x10,0x20,0x40,0x80,0x100,0x200,0x400,0x800,0x1000,0x2000,0x4000,0x8000};
+ 
+ 
  /* Convert an angle to a simple direction */
  int Scumm::toSimpleDir(int dirType, int dir)
***************
*** 1020,1024 ****
  	va_end(va);
  
! 	if (g_scumm->_currentScript != 0xFF) {
  		ScriptSlot *ss = &g_scumm->vm.slot[g_scumm->_currentScript];
  		fprintf(stderr, "Error(%d:%d:0x%X): %s!\n",
--- 1031,1035 ----
  	va_end(va);
  
! 	if (g_scumm && g_scumm->_currentScript != 0xFF) {
  		ScriptSlot *ss = &g_scumm->vm.slot[g_scumm->_currentScript];
  		fprintf(stderr, "Error(%d:%d:0x%X): %s!\n",
***************
*** 1069,1081 ****
  }
  
  void Scumm::mainRun()
  {
  
! 	delta = 0;
! 
! 	do {
! 		_system->waitTick(delta);
! 		delta = scummLoop(delta);
! 	} while (1);
  }
  
--- 1080,1211 ----
  }
  
+ ScummDebugger debugger;
+ 
+ void Scumm::waitForTimer(int msec_delay) {
+ 	OSystem::Event event;
+ 	uint32 start_time;
+ 
+ 	if (_fastMode&2)
+ 		msec_delay = 0;
+ 	else if (_fastMode&1)
+ 		msec_delay = 10;
+ 
+ 	start_time = _system->get_msecs();
+ 
+ 	for(;;) {
+ 		while (_system->poll_event(&event)) {
+ 			switch(event.event_code) {
+ 			case OSystem::EVENT_KEYDOWN:
+ 				_keyPressed = event.kbd.ascii;
+ 
+ 				if (event.kbd.keycode >= '0' && event.kbd.keycode<='9') {
+ 					if (event.kbd.flags == OSystem::KBD_SHIFT ||
+ 							event.kbd.flags == OSystem::KBD_CTRL) {
+ 						_saveLoadSlot = event.kbd.keycode - '0';
+ 						sprintf(_saveLoadName, "Quicksave %d", _saveLoadSlot);
+ 						_saveLoadFlag = (event.kbd.flags == OSystem::KBD_SHIFT) ? 1 : 2;
+ 						_saveLoadCompatible = false;
+ 					} else if (event.kbd.flags == OSystem::KBD_ALT|OSystem::KBD_CTRL) {
+ 						if (!_system->set_param(OSystem::PARAM_HOTSWAP_GFX_MODE, event.kbd.keycode - '1'))
+ 							warning("Unable to hotswap graphics mode");
+ 						redrawLines(0, 200);
+ 						_palDirtyMin = 0;
+ 						_palDirtyMax = 255;
+ 						updatePalette();
+ 					}
+ 				} else if (event.kbd.flags&OSystem::KBD_CTRL) {
+ 					if (event.kbd.keycode=='z')
+ 						_system->quit();
+ 					else if (event.kbd.keycode=='f')
+ 						_fastMode ^= 1;
+ 					else if (event.kbd.keycode=='g')
+ 						_fastMode ^= 2;
+ 					else if (event.kbd.keycode=='d')
+ 						debugger.attach(this);
+ 					else if (event.kbd.keycode=='s')
+ 						resourceStats();
+ 				} else if (event.kbd.flags&OSystem::KBD_ALT) {
+ 					if (!_system->set_param(OSystem::PARAM_TOGGLE_FULLSCREEN, 0))
+ 						warning("Full screen failed");
+ 				}
+ 				break;
+ 
+ 			case OSystem::EVENT_MOUSEMOVE:
+ 				mouse.x = event.mouse.x;
+ 				mouse.y = event.mouse.y;
+ 				_system->set_mouse_pos(event.mouse.x, event.mouse.y);
+ 				_system->update_screen();
+ 				break;
+ 
+ 			case OSystem::EVENT_LBUTTONDOWN:
+ 				_leftBtnPressed |= msClicked|msDown;
+ 				break;
+ 
+ 			case OSystem::EVENT_RBUTTONDOWN:
+ 				_rightBtnPressed |= msClicked|msDown;
+ 				break;
+ 
+ 			case OSystem::EVENT_LBUTTONUP:
+ 				_leftBtnPressed &= ~msDown;
+ 				break;
+ 
+ 			case OSystem::EVENT_RBUTTONUP:
+ 				_rightBtnPressed &= ~msDown;
+ 				break;
+ 			}
+ 		}
+ 
+ 		if (_system->get_msecs() >= start_time + msec_delay)
+ 			break;
+ 		_system->delay_msecs(10);
+ 	}
+ }
+ 
+ 
+ void Scumm::updatePalette() {
+ 	if (_palDirtyMax == -1)
+ 		return;
+ 	
+ 	int first = _palDirtyMin;
+ 	int num = _palDirtyMax - first + 1;
+ 	int i;
+ 	byte *data = _currentPalette + first * 3;
+ 
+ 	byte palette_colors[1024],*p = palette_colors;
+ 	
+ 	for (i = 0; i != num; i++, data += 3, p+=4) {
+ 		p[0] = data[0];
+ 		p[1] = data[1];
+ 		p[2] = data[2];
+ 		p[3] = 0;
+ 	}
+ 	
+ 	_system->set_palette(palette_colors, first, num);
+ 
+ 	_palDirtyMax = -1;
+ 	_palDirtyMin = 256;
+ }
+ 
  void Scumm::mainRun()
  {
+ 	int delta = 0;
+ 	int last_time = _system->get_msecs(); 
+ 	int new_time;
  
! 	for(;;) {
! 		
! 		updatePalette();
! 		
! 		_system->update_screen();		
! 		new_time = _system->get_msecs();
! 		waitForTimer(delta * 15 + last_time - new_time);
! 		last_time = _system->get_msecs();
! 		if (_gui->_active) {
! 			_gui->loop(this);
! 			delta = 5;
! 		} else {
! 			delta = scummLoop(delta);
! 		}
! 	}
  }
  
***************
*** 1089,1095 ****
  	_minHeapThreshold = 400000;
  
! 	/* Init graphics and create a primary virtual screen */
  
- 	initGraphics(this, _fullScreen, _scale);
  	allocResTypeData(rtBuffer, MKID('NONE'), 10, "buffer", 0);
  	initVirtScreen(0, 0, 200, false, false);
--- 1219,1224 ----
  	_minHeapThreshold = 400000;
  
! 	/* Create a primary virtual screen */
  
  	allocResTypeData(rtBuffer, MKID('NONE'), 10, "buffer", 0);
  	initVirtScreen(0, 0, 200, false, false);
***************
*** 1141,1149 ****
  
  //  _scummTimer = 0;
  
! 
  }
  
! Scumm *Scumm::createFromDetector(GameDetector *detector)
  {
  	Scumm *scumm;
--- 1270,1280 ----
  
  //  _scummTimer = 0;
+ }
  
! void Scumm::on_generate_samples(void *s, int16 *samples, int len) {
! 	((Scumm*)s)->mixWaves(samples, len);
  }
  
! Scumm *Scumm::createFromDetector(GameDetector *detector, OSystem *syst)
  {
  	Scumm *scumm;
***************
*** 1160,1171 ****
  		scumm = new Scumm_v5;
  
  	scumm->_fullScreen = detector->_fullScreen;
  	scumm->_debugMode = detector->_debugMode;
  	scumm->_bootParam = detector->_bootParam;
- 	scumm->_scale = detector->_scale;
  	scumm->_gameDataPath = detector->_gameDataPath;
  	scumm->_gameTempo = detector->_gameTempo;
  	scumm->_soundEngine = detector->_soundEngine;
- 	scumm->_videoMode = detector->_videoMode;
  	scumm->_exe_name = detector->_exe_name;
  	scumm->_gameId = detector->_gameId;
--- 1291,1308 ----
  		scumm = new Scumm_v5;
  
+ 	scumm->_system = syst;
+ 
+ 	/* This initializes SDL */
+ 	syst->init_size(320,200, OSystem::SOUND_16BIT);
+ 	syst->set_param(OSystem::PARAM_OPEN_CD, detector->_cdrom);
+ 
+ 	syst->set_sound_proc(scumm, on_generate_samples);
+ 
  	scumm->_fullScreen = detector->_fullScreen;
  	scumm->_debugMode = detector->_debugMode;
  	scumm->_bootParam = detector->_bootParam;
  	scumm->_gameDataPath = detector->_gameDataPath;
  	scumm->_gameTempo = detector->_gameTempo;
  	scumm->_soundEngine = detector->_soundEngine;
  	scumm->_exe_name = detector->_exe_name;
  	scumm->_gameId = detector->_gameId;
***************
*** 1185,1189 ****
  
  	scumm->delta = 0;
- 
  	return scumm;
  }
--- 1322,1325 ----

Index: scummvm.dsp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.dsp,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** scummvm.dsp	12 Apr 2002 10:34:46 -0000	1.32
--- scummvm.dsp	12 Apr 2002 21:26:34 -0000	1.33
***************
*** 153,156 ****
--- 153,176 ----
  # End Source File
  # End Group
+ # Begin Group "simon"
+ 
+ # PROP Default_Filter ""
+ # Begin Source File
+ 
+ SOURCE=.\simon\midi.cpp
+ # End Source File
+ # Begin Source File
+ 
+ SOURCE=.\simon\simon.cpp
+ # End Source File
+ # Begin Source File
+ 
+ SOURCE=.\simon\simon.h
+ # End Source File
+ # Begin Source File
+ 
+ SOURCE=.\simon\simonsys.cpp
+ # End Source File
+ # End Group
  # Begin Source File
  
***************
*** 243,246 ****
--- 263,270 ----
  # Begin Source File
  
+ SOURCE=.\main.cpp
+ # End Source File
+ # Begin Source File
+ 
  SOURCE=.\mp3_cd.cpp
  # End Source File
***************
*** 338,356 ****
  
  SOURCE=.\scummvm.cpp
- 
- !IF  "$(CFG)" == "scummvm - Win32 Release"
- 
- # ADD CPP /Gd
- 
- !ELSEIF  "$(CFG)" == "scummvm - Win32 Debug"
- 
- !ELSEIF  "$(CFG)" == "scummvm - Win32 MP3 Enabled Debug"
- 
- !ENDIF 
- 
  # End Source File
  # Begin Source File
  
! SOURCE=.\sdl.cpp
  # End Source File
  # Begin Source File
--- 362,369 ----
  
  SOURCE=.\scummvm.cpp
  # End Source File
  # Begin Source File
  
! SOURCE=.\sdl_2.cpp
  # End Source File
  # Begin Source File

Index: sdl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sdl.cpp,v
retrieving revision 1.82
retrieving revision 1.83
diff -C2 -d -r1.82 -r1.83
*** sdl.cpp	12 Apr 2002 10:34:46 -0000	1.82
--- sdl.cpp	12 Apr 2002 21:26:34 -0000	1.83
***************
*** 1,24 ****
- /* ScummVM - Scumm Interpreter
-  * Copyright (C) 2001  Ludvig Strigeus
-  * Copyright (C) 2001/2002 The ScummVM project
-  *
-  * This program is free software; you can redistribute it and/or
-  * modify it under the terms of the GNU General Public License
-  * as published by the Free Software Foundation; either version 2
-  * of the License, or (at your option) any later version.
- 
-  * This program is distributed in the hope that it will be useful,
[...2131 lines suppressed...]
  	}
  
! 	add_dirty_rect(old_mouse_x, old_mouse_y, old_mouse_w, old_mouse_h);
  
! 	SDL_UnlockSurface(sdl_screen);
  }
  
! void cd_stop() {
  }
  
! void cd_play(Scumm *s, int track, int num_loops, int start_frame, int end_track) {
! }
  
! int cd_is_running() {
! 	return 0;
  }
  
! void cd_music_loop() {
  }
+ 

Index: sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** sound.h	7 Apr 2002 18:46:50 -0000	1.13
--- sound.h	12 Apr 2002 21:26:34 -0000	1.14
***************
*** 16,66 ****
   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
   *
-  * Change Log:
-  * $Log$
-  * Revision 1.13  2002/04/07 18:46:50  mutle
-  * Changed the name of OffsetTable to MP3OffsetTable, as OffsetTable is already defined in the Apple Headers
-  *
-  * Revision 1.12  2002/04/05 04:35:41  ender
-  * Fix mp3_cd support
-  *
-  * Revision 1.11  2002/04/05 04:24:39  ender
-  * Fix last BOOL
-  *
-  * Revision 1.10  2002/04/04 22:47:03  arisme
-  * MP3 cd music patch - still WIP, VBR doesn't work, compress the audio track X to MP3 CBR and name them trackX.mp3 in the game directory - only tested with Loom
-  *
-  * Revision 1.9  2002/03/21 16:12:02  ender
-  * Move some box stuff from scumm.h to new boxes.h
-  * Also move some sound-related items from scumm.h to sound.h
-  *
-  * Revision 1.8  2002/03/16 18:58:51  ender
-  * MorphOS port (sdl version) + endian fixes for big endian machines.
-  *
-  * Revision 1.7  2002/03/14 08:20:38  ender
-  * Fix compile error when using USE_ADLIB
-  *
-  * Revision 1.6  2002/03/14 08:04:21  ender
-  * Rewire the MIDI subsystem to use drivers selecting from the commandline.
-  * No -DTIMIDITY, etc! Yippie!. Also updated readme.
-  *
-  * Revision 1.5  2002/03/14 06:06:49  ender
-  * Added some new midi drivers - QuickTime Music and RawMidi.
-  * -DUSE_RAWMIDI and -DUSE_QTMUSIC respectivly.
-  *
-  * I assume these will compile - if not file a bug/patch. Also added a "-r" commandline parameter to turn on MT32 emulation... the patch conversion set isn't quite right, still..
-  *
-  * Revision 1.4  2002/03/05 23:37:31  ender
-  * Adding music volume control.
-  *
-  * Revision 1.3  2001/12/01 17:25:36  strigeus
-  * fixed to compile on unix
-  *
-  * Revision 1.2  2001/12/01 17:06:13  strigeus
-  * adlib sound support, use USE_ADLIB
-  *
-  * Revision 1.1  2001/11/14 18:37:38  strigeus
-  * music support,
-  * fixed timing bugs
-  *
   */
   
--- 16,19 ----
***************
*** 472,476 ****
  public:
  	void uninit();
! 	void init(SoundEngine *eng);
  	void update_pris() { }
  	void generate_samples(int16 *buf, int len);
--- 425,429 ----
  public:
  	void uninit();
! 	void init(SoundEngine *eng, OSystem *syst);
  	void update_pris() { }
  	void generate_samples(int16 *buf, int len);
***************
*** 486,490 ****
  	void adjust_priorities() {}
  	void midiSetDriver(int devicetype) {;}
- 	bool wave_based() { return true; }	
  };
  
--- 439,442 ----
***************
*** 514,517 ****
--- 466,471 ----
  struct MidiSoundDriver : SoundDriver {	
  	SoundEngine *_se;
+ 	OSystem *_system;
+ 
  	MidiChannelGM _midi_channels[9];
  
***************
*** 541,545 ****
  public:
  	void uninit();
! 	void init(SoundEngine *eng);
  	void update_pris();
  	void part_off(Part *part);
--- 495,499 ----
  public:
  	void uninit();
! 	void init(SoundEngine *eng, OSystem *os);
  	void update_pris();
  	void part_off(Part *part);
***************
*** 555,559 ****
  	void part_changed(Part *part,byte what);
  	void midiSetDriver(int devicetype);
! 	bool wave_based() { return false; }
  };
  
--- 509,514 ----
  	void part_changed(Part *part,byte what);
  	void midiSetDriver(int devicetype);
! 
! 	static int midi_driver_thread(void *param);
  };
  

Index: stdafx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/stdafx.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** stdafx.h	14 Mar 2002 22:45:22 -0000	1.12
--- stdafx.h	12 Apr 2002 21:26:34 -0000	1.13
***************
*** 3,6 ****
--- 3,10 ----
   *
   * $Log$
+  * Revision 1.13  2002/04/12 21:26:34  strigeus
+  * new video engine (expect broken non-sdl builds),
+  * simon the sorcerer 1 & 2 support (non SCUMM games)
+  *
   * Revision 1.12  2002/03/14 22:45:22  arisme
   * Minor changes to compile WinCE port
***************
*** 39,44 ****
  #pragma once
  #endif // _MSC_VER > 1000
! 
! #if !defined(_WIN32_WCE)
  
  #define WIN32_LEAN_AND_MEAN		// Exclude rarely-used stuff from Windows headers
--- 43,50 ----
  #pragma once
  #endif // _MSC_VER > 1000
! 
! 
! #if !defined(_WIN32_WCE)
! 
  
  #define WIN32_LEAN_AND_MEAN		// Exclude rarely-used stuff from Windows headers
***************
*** 65,72 ****
  #define NOSOUND
  #define NODRAWTEXT
- 
- #endif
  
! #include <SDL.h>
  #include <windows.h>
  #include <stdio.h>
--- 71,79 ----
  #define NOSOUND
  #define NODRAWTEXT
  
! 
! #endif
! 
! 
  #include <windows.h>
  #include <stdio.h>
***************
*** 82,91 ****
  #include <ctype.h>
  #include <Winuser.h>
  
  #else
  
- #if defined(NEED_SDL_HEADERS)
- #include <SDL.h>
- #endif
  #if !defined(__APPLE__CW) && !(defined(__MWERKS__) && defined(macintosh))
  #include <sys/types.h>
--- 89,96 ----
  #include <ctype.h>
  #include <Winuser.h>
+ #include <direct.h>
  
  #else
  
  #if !defined(__APPLE__CW) && !(defined(__MWERKS__) && defined(macintosh))
  #include <sys/types.h>

Index: system.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/system.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** system.h	25 Mar 2002 22:46:32 -0000	1.2
--- system.h	12 Apr 2002 21:26:34 -0000	1.3
***************
*** 1,9 ****
! class OSystem
! {
! 	public:
! 		int waitTick(int delta);
! 		int last_time;
! 		int new_time;
  
! 		OSystem();
  };
--- 1,115 ----
! /* Interface to what's below ScummVM */
  
! class OSystem {
! public:
! 	typedef int ThreadProc(void *param);
! 	typedef void SoundProc(void *param, int16 *buf, int len);
! 
! 	struct Event {
! 		int event_code;
! 		struct {
! 			uint16 ascii;
! 			byte flags;
! 			int keycode;
! 		} kbd;
! 		struct {
! 			int x,y;
! 		} mouse;
! 	};
! 
! 	enum {
! 		EVENT_KEYDOWN = 1,
! //		EVENT_KEYUP = 2,
! 		EVENT_MOUSEMOVE = 3,
! 		EVENT_LBUTTONDOWN = 4,
! 		EVENT_LBUTTONUP = 5,
! 		EVENT_RBUTTONDOWN = 6,
! 		EVENT_RBUTTONUP = 7,
! 	};
! 
! 	enum {
! 		KBD_CTRL = 1,
! 		KBD_ALT = 2,
! 		KBD_SHIFT = 4,
! 	};
! 
! 	enum {
! 		PARAM_TOGGLE_FULLSCREEN = 1,
! 		PARAM_WINDOW_CAPTION = 2,
! 		PARAM_OPEN_CD = 3,
! 		PARAM_HOTSWAP_GFX_MODE = 4,
! 		PARAM_SHOW_DEFAULT_CURSOR = 5,
! 	};
! 
! 	enum {
! 		SOUND_NONE = 0,
! 		SOUND_8BIT = 1,
! 		SOUND_16BIT = 2,
! 	};
! 	
! 	// Set colors of the palette
! 	virtual void set_palette(const byte *colors, uint start, uint num) = 0;
! 
! 	// Set the size of the video bitmap.
! 	// Typically, 320x200
! 	virtual void init_size(uint w, uint h, byte sound) = 0;
! 
! 	// Draw a bitmap to screen.
! 	// The screen will not be updated to reflect the new bitmap
! 	virtual void copy_rect(const byte *buf, int pitch, int x, int y, int w, int h) = 0;
! 
! 	// Update the dirty areas of the screen
! 	virtual void update_screen() = 0;
! 
! 	// Either show or hide the mouse cursor
! 	virtual bool show_mouse(bool visible) = 0;
! 	
! 	// Set the position of the mouse cursor
! 	virtual void set_mouse_pos(int x, int y) = 0;
! 	
! 	// Set the bitmap that's used when drawing the cursor.
! 	virtual void set_mouse_cursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y) = 0;
! 	
! 	// Shaking is used in SCUMM. Set current shake position.
! 	virtual void set_shake_pos(int shake_pos) = 0;
! 		
! 	// Get the number of milliseconds since the program was started.
! 	virtual uint32 get_msecs() = 0;
! 	
! 	// Delay for a specified amount of milliseconds
! 	virtual void delay_msecs(uint msecs) = 0;
! 	
! 	// Create a thread
! 	virtual void *create_thread(ThreadProc *proc, void *param) = 0;
! 	
! 	// Get the next event.
! 	// Returns true if an event was retrieved.	
! 	virtual bool poll_event(Event *event) = 0;
! 
! 	// Set the function to be invoked whenever samples need to be generated
! 	virtual void set_sound_proc(void *param, SoundProc *proc) = 0;
! 	
! 	virtual uint32 set_param(int param, uint32 value) = 0;
! 		
! 	// Quit
! 	virtual void quit() = 0;
! };
! 
! 
! /* Factory functions. This means we don't have to include the
!  * OSystem_SDL header file. (which in turn would require the SDL headers)
!  */
! 
! /* OSystem_SDL */
! OSystem *OSystem_SDL_create(int gfx_driver, bool full_screen);
! 
! enum {
! 	GFX_NORMAL = 0,
! 	GFX_DOUBLESIZE = 1,
! 	GFX_TRIPLESIZE = 2,
! 	GFX_2XSAI = 3,
! 	GFX_SUPER2XSAI = 4,
! 	GFX_SUPEREAGLE = 5,
  };
+ 
+ 

Index: windows.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/windows.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** windows.cpp	11 Apr 2002 17:19:15 -0000	1.32
--- windows.cpp	12 Apr 2002 21:26:34 -0000	1.33
***************
*** 496,504 ****
  }
  
! void drawMouse(Scumm *s, int, int, int, byte *, bool)
  {
  }
  
! void drawMouse(Scumm *s, int x, int y, int w, int h, byte *buf, bool visible)
  {
  }
--- 496,504 ----
  }
  
! void drawMouse(int, int, int, byte *, bool)
  {
  }
  
! void drawMouse(int x, int y, int w, int h, byte *buf, bool visible)
  {
  }

Index: x11.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/x11.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** x11.cpp	11 Apr 2002 17:19:15 -0000	1.10
--- x11.cpp	12 Apr 2002 21:26:34 -0000	1.11
***************
*** 435,439 ****
  unsigned char old_backup[BAK_WIDTH * BAK_HEIGHT];
  
! void drawMouse(Scumm *s, int xdraw, int ydraw, int w, int h, byte *buf,
  							 bool visible)
  {
--- 435,439 ----
  unsigned char old_backup[BAK_WIDTH * BAK_HEIGHT];
  
! void drawMouse(int xdraw, int ydraw, int w, int h, byte *buf,
  							 bool visible)
  {





More information about the Scummvm-git-logs mailing list