[Scummvm-cvs-logs] CVS: scummvm gameDetector.cpp,1.8,1.9 gui.cpp,1.28,1.29 gui.h,1.14,1.15 resource.cpp,1.65,1.66 scummvm.dsp,1.34,1.35 sdl.cpp,1.84,1.85

James Brown ender at users.sourceforge.net
Fri Apr 12 21:40:02 CEST 2002


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

Modified Files:
	gameDetector.cpp gui.cpp gui.h resource.cpp scummvm.dsp 
	sdl.cpp 
Log Message:
Fix various warnings, and things preventing non-win32 platforms from compiling.



Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gameDetector.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** gameDetector.cpp	12 Apr 2002 21:26:34 -0000	1.8
--- gameDetector.cpp	13 Apr 2002 04:39:04 -0000	1.9
***************
*** 331,336 ****
  
  	if (!_gameDataPath) {
! 		warning
! 			("No path was provided. Assuming that data file are in the current directory");
  		_gameDataPath = (char *)malloc(sizeof(char) * 2);
  		strcpy(_gameDataPath, "");
--- 331,335 ----
  
  	if (!_gameDataPath) {
! 		warning("No path was provided. Assuming that data file are in the current directory");
  		_gameDataPath = (char *)malloc(sizeof(char) * 2);
  		strcpy(_gameDataPath, "");

Index: gui.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** gui.cpp	12 Apr 2002 21:26:34 -0000	1.28
--- gui.cpp	13 Apr 2002 04:39:04 -0000	1.29
***************
*** 23,26 ****
--- 23,27 ----
  #include "scumm.h"
  #include "gui.h"
+ #include "guimaps.h"
  
  #ifdef _WIN32_WCE

Index: gui.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** gui.h	12 Apr 2002 21:26:34 -0000	1.14
--- gui.h	13 Apr 2002 04:39:04 -0000	1.15
***************
*** 1,2 ****
--- 1,22 ----
+ /* ScummVM - Scumm Interpreter
+  * Copyright (C) 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,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  * GNU General Public License for more details.
+  *
+  * You should have received a copy of the GNU General Public License
+  * along with this program; if not, write to the Free Software
+  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+  *
+  * $Header$
+  */
+ 
  #if !defined(gui_h)
  #define gui_h
***************
*** 28,125 ****
  };
  
- static const char* string_map_table_custom[] = { 
- 	"Master Volume :",	//0
- 	"Music Volume :",	//1
- 	"SFX Volume :",		//2
- 	"+",				//3
- 	"-",				//4
- 	"Sound",			//5
- 	"Keys",				//6
- 	"About",			//7
- 	"Pocket ScummVM",	//8
- 	"Build " SCUMMVM_VERSION "(" SCUMMVM_CVS ")",	//9
- 	"ScummVM http://scummvm.sourceforge.net",		//10
- 	"All games (c) LucasArts",						//11
- 	"Quit",											//12
- 	"Pause",										//13
- 	"Save",											//14
- 	"Skip",											//15
- 	"Hide",											//16
- 	"Options"										//17
- };
- 
- static ResString string_map_table_v7[] = {
- 	{96, "game name and version"}, //that's how it's supposed to be
- 	{77, "Select a game to LOAD"},
- 	{76, "Name your SAVE game"},
-         {70, "save"}, //boot8
- 	{71, "load"}, //boot9
- 	{72, "play"}, //boot10
- 	{73, "cancel"}, //boot11
- 	{74, "quit"}, //boot12
- 	{75, "ok"}, //boot13
- 	{85, "game paused"}, // boot3					
- 	
- 	/* this is the almost complete string map for v7
- 	{63, "how may I serve you?"},
- 	{64, "the dig v1.0"}, //(game name/version)
- 	{67, "text display only"},
- 	{68, "c:\\dig"}, //boot007 (save path ?)
- 	{69, "the dig"}, //boot21 (game name)
- 	{70, "save"}, //boot8
- 	{71, "load"}, //boot9
- 	{72, "play"}, //boot10
- 	{73, "cancel"}, //boot11
- 	{74, "quit"}, //boot12
- 	{75, "ok"}, //boot13
- 	{76, "name your save game"}, //boot19
- 	{77, "select a game to load"}, //boot20
- 	{78, "you must enter a name"},//boot14
- 	{79, "saving '%s'"}, //boot17
- 	{80, "loading '%s'"}, //boot18
- 	{81, "the game was NOT saved"}, //boot15
- 	{82, "the game was NOT loaded"}, //boot16
- 	{83, "how may I serve you?"},
- 	{84, "how may I serve you?"},
- 	{85, "game paused"}, // boot3
- 	{86, "Are you sure you want to restart"},
- 	{87, "Are you sure you want to quit?"}, //boot05
- 	{89, "how may I serve you?"},
- 	{90, "music"}, //boot22
- 	{91, "voice"}, //boot23
- 	{92, "sfx"}, //boot24
- 	{93, "disabled"}, //boot25
- 	{94, "text speed"}, //boot26
- 	{95, "text display"}, //boot27
- 	{96, "the dig v1.0"},*/
- 	
- };
- 
- static ResString string_map_table_v6[] = {
- 	{117, "How may I serve you?"}, 
- 	{109, "Select a game to LOAD"}, 
- 	{108, "Name your SAVE game"}, 
- 	{96, "Save"}, 
- 	{97, "Load"}, 
- 	{98, "Play"}, 
- 	{99, "Cancel"}, 
- 	{100, "Quit"}, 
- 	{101, "Ok"}, 
- 	{93, "Game paused"}, 
- };
- 
- static ResString string_map_table_v5[] = {
- 	{0, "How may I serve you?"}, 
- 	{20, "Select a game to LOAD"},
- 	{19, "Name your SAVE game"},
- 	{7, "Save"},
- 	{8, "Load"},
- 	{9, "Play"},
- 	{10, "Cancel"},
- 	{11, "Quit"},
- 	{12, "Ok"},
- 	{4, "Game paused"}
- };
- 
  struct GuiWidget {
  	byte _type;
--- 48,51 ----
***************
*** 200,231 ****
  	void handleLauncherDialogCommand(int cmd);
  };
! 
! // Built-in font
! static byte guifont[] = {0,0,99,1,226,8,4,8,6,8,6,0,0,0,0,0,0,0,0,0,0,0,8,2,1,8,0,0,0,0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,102,70,0,60,102,60,56,103,102,63,0,96,48,16,0,0,0,0,0,24,48,96,96,96,48,24,0,96,48,24,24,24,48,96,0,
! 0,102,60,255,60,102,0,0,0,24,24,126,24,24,0,0,0,0,0,0,0,48,48,96,0,0,0,126,0,0,0,0,0,0,0,0,0,96,96,0,0,3,6,12,24,48,96,0,60,102,102,102,102,102,60,0,24,24,56,24,24,24,126,0,60,102,6,12,48,96,126,0,60,102,6,28,6,102,60,0,6,
! 14,30,102,127,6,6,0,126,96,124,6,6,102,60,0,60,102,96,124,102,102,60,0,126,102,12,24,24,24,24,0,60,102,102,60,102,102,60,0,60,102,102,62,6,102,60,0,0,0,96,0,0,96,0,0,0,0,48,0,0,48,48,96,14,24,48,96,48,24,14,0,0,0,120,0,120,0,0,0,112,24,
! 12,6,12,24,112,0,60,102,6,12,24,0,24,0,0,0,0,255,255,0,0,0,24,60,102,126,102,102,102,0,124,102,102,124,102,102,124,0,60,102,96,96,96,102,60,0,120,108,102,102,102,108,120,0,126,96,96,120,96,96,126,0,126,96,96,120,96,96,96,0,60,102,96,110,102,102,60,0,102,102,102,
! 126,102,102,102,0,120,48,48,48,48,48,120,0,30,12,12,12,12,108,56,0,102,108,120,112,120,108,102,0,96,96,96,96,96,96,126,0,99,119,127,107,99,99,99,0,102,118,126,126,110,102,102,0,60,102,102,102,102,102,60,0,124,102,102,124,96,96,96,0,60,102,102,102,102,60,14,0,124,102,102,124,
! 120,108,102,0,60,102,96,60,6,102,60,0,126,24,24,24,24,24,24,0,102,102,102,102,102,102,60,0,102,102,102,102,102,60,24,0,99,99,99,107,127,119,99,0,102,102,60,24,60,102,102,0,102,102,102,60,24,24,24,0,126,6,12,24,48,96,126,0,120,96,96,96,96,96,120,0,3,6,12,24,48,
! 96,192,0,120,24,24,24,24,24,120,0,0,0,0,0,0,219,219,0,0,0,0,0,0,0,0,255,102,102,102,0,0,0,0,0,0,0,60,6,62,102,62,0,0,96,96,124,102,102,124,0,0,0,60,96,96,96,60,0,0,6,6,62,102,102,62,0,0,0,60,102,126,96,60,0,0,14,24,62,24,24,
! 24,0,0,0,62,102,102,62,6,124,0,96,96,124,102,102,102,0,0,48,0,112,48,48,120,0,0,12,0,12,12,12,12,120,0,96,96,108,120,108,102,0,0,112,48,48,48,48,120,0,0,0,102,127,127,107,99,0,0,0,124,102,102,102,102,0,0,0,60,102,102,102,60,0,0,0,124,102,102,124,96,
! 96,0,0,62,102,102,62,6,6,0,0,124,102,96,96,96,0,0,0,62,96,60,6,124,0,0,24,126,24,24,24,14,0,0,0,102,102,102,102,62,0,0,0,102,102,102,60,24,0,0,0,99,107,127,62,54,0,0,0,102,60,24,60,102,0,0,0,102,102,102,62,12,120,0,0,126,12,24,48,126,0,
! 24,48,48,96,48,48,24,0,96,96,96,0,96,96,96,0,96,48,48,24,48,48,96,0,0,0,0,0,0,0,0,0,8,12,14,255,255,14,12,8,60,102,96,96,102,60,24,56,102,0,102,102,102,102,62,0,12,24,60,102,126,96,60,0,24,36,60,6,62,102,62,0,102,0,60,6,62,102,62,0,48,
! 24,60,6,62,102,62,0,0,0,0,0,0,0,0,0,0,60,96,96,96,60,24,56,24,36,60,102,126,96,60,0,102,0,60,102,126,96,60,0,48,24,60,102,126,96,60,0,0,216,0,112,48,48,120,0,48,72,0,112,48,48,120,0,96,48,0,112,48,48,120,0,102,24,60,102,126,102,102,0,0,0,
! 0,0,0,0,0,0,24,48,124,96,120,96,124,0,0,0,108,26,126,216,110,0,30,40,40,126,72,136,142,0,24,36,60,102,102,102,60,0,102,0,60,102,102,102,60,0,48,24,60,102,102,102,60,0,24,36,0,102,102,102,62,0,48,24,102,102,102,102,62,0,0,0,0,0,0,0,0,0,102,60,102,
! 102,102,102,60,0,102,0,102,102,102,102,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,24,60,6,62,102,62,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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0,0,0};
! 
! #endif
--- 126,128 ----
  	void handleLauncherDialogCommand(int cmd);
  };
! #endif
\ No newline at end of file

Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/resource.cpp,v
retrieving revision 1.65
retrieving revision 1.66
diff -C2 -d -r1.65 -r1.66
*** resource.cpp	12 Apr 2002 21:26:34 -0000	1.65
--- resource.cpp	13 Apr 2002 04:39:04 -0000	1.66
***************
*** 416,420 ****
  void Scumm::loadCharset(int no)
  {
! 	int i, line = 0;
  	byte *ptr;
  
--- 416,420 ----
  void Scumm::loadCharset(int no)
  {
! 	int i;
  	byte *ptr;
  
***************
*** 924,928 ****
  	byte flag;
  	byte best_counter;
! 	int best_type, best_res;
  	uint32 oldAllocatedSize;
  
--- 924,928 ----
  	byte flag;
  	byte best_counter;
! 	int best_type, best_res = 0;
  	uint32 oldAllocatedSize;
  

Index: scummvm.dsp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.dsp,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** scummvm.dsp	12 Apr 2002 21:28:56 -0000	1.34
--- scummvm.dsp	13 Apr 2002 04:39:04 -0000	1.35
***************
*** 162,169 ****
  # Begin Source File
  
- SOURCE=.\sdl.cpp
- # End Source File
- # Begin Source File
- 
  SOURCE=.\simon\simon.cpp
  # End Source File
--- 162,165 ----
***************
*** 369,372 ****
--- 365,372 ----
  # Begin Source File
  
+ SOURCE=.\sdl.cpp
+ # End Source File
+ # Begin Source File
+ 
  SOURCE=.\sound.cpp
  
***************
*** 486,489 ****
--- 486,493 ----
  
  SOURCE=.\gui.h
+ # End Source File
+ # Begin Source File
+ 
+ SOURCE=.\guimaps.h
  # End Source File
  # Begin Source File

Index: sdl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sdl.cpp,v
retrieving revision 1.84
retrieving revision 1.85
diff -C2 -d -r1.84 -r1.85
*** sdl.cpp	13 Apr 2002 04:11:18 -0000	1.84
--- sdl.cpp	13 Apr 2002 04:39:04 -0000	1.85
***************
*** 3,7 ****
  #include "stdafx.h"
  #include "scumm.h"
- #include "gui.h"
  #include "SDL_thread.h"
  #include "gameDetector.h"
--- 3,6 ----
***************
*** 209,246 ****
  	_internal_scaling = 1;
  	_driver_flags = 0;
! 
  	switch(_driver) {
  	case GFX_2XSAI:
  		_sai_func = _2xSaI;
! 		goto def_2xsai_drv;
  	case GFX_SUPER2XSAI:
  		_sai_func = Super2xSaI;
! 		goto def_2xsai_drv;
  	case GFX_SUPEREAGLE:
  		_sai_func = SuperEagle;
- 		def_2xsai_drv:;
- 
- 		_driver_flags = DF_FORCE_FULL_ON_PALETTE | DF_WANT_RECT_OPTIM | DF_2xSAI | DF_SEPARATE_HWSCREEN;
- 
- 		Init_2xSaI(565);
- 		sdl_screen = SDL_CreateRGBSurface(SDL_SWSURFACE, 320, 200, 8, 0, 0, 0, 0);
- 		if (sdl_screen == NULL)
- 			error("SDL_CreateRGBSurface(SDL_SWSURFACE, 320, 200, 8, 0, 0, 0, 0) failed");
- 
- 		sdl_hwscreen = SDL_SetVideoMode(640, 400, 16, SDL_SWSURFACE);
- 		if (sdl_hwscreen == NULL)
- 			error("sdl_hwscreen failed");
- 
- 		{
- 			/* Need some extra bytes around when using 2XSAI */
- 			uint16 *tmp_screen = (uint16*)calloc(320*204 + 16,sizeof(uint16));
- 			sdl_tmpscreen = SDL_CreateRGBSurfaceFrom(tmp_screen + TMP_SCREEN_OFFS, 320, 200, 16,
- 				320*2, 0,0,0,0);
- 			if (sdl_tmpscreen == NULL)
- 				error("sdl_tmpscreen failed");
- 		}
- 
- 		dirty_checksums = (uint32*)calloc(CKSUM_NUM*2, sizeof(uint32));
- 		scaling = 2;
  		break;
  
--- 208,222 ----
  	_internal_scaling = 1;
  	_driver_flags = 0;
! 	
! 	_sai_func = NULL;
  	switch(_driver) {
  	case GFX_2XSAI:
  		_sai_func = _2xSaI;
! 		break;
  	case GFX_SUPER2XSAI:
  		_sai_func = Super2xSaI;
! 		break;
  	case GFX_SUPEREAGLE:
  		_sai_func = SuperEagle;
  		break;
  
***************
*** 268,271 ****
--- 244,270 ----
  			error("sdl_screen failed");
  		break;
+ 	}
+ 
+ 	if (_sai_func) {
+ 		uint16 *tmp_screen = (uint16*)calloc(320*204 + 16,sizeof(uint16));
+ 		_driver_flags = DF_FORCE_FULL_ON_PALETTE | DF_WANT_RECT_OPTIM | DF_2xSAI | DF_SEPARATE_HWSCREEN;
+ 
+ 		Init_2xSaI(565);
+ 		sdl_screen = SDL_CreateRGBSurface(SDL_SWSURFACE, 320, 200, 8, 0, 0, 0, 0);
+ 		if (sdl_screen == NULL)
+ 			error("SDL_CreateRGBSurface(SDL_SWSURFACE, 320, 200, 8, 0, 0, 0, 0) failed");
+ 
+ 		sdl_hwscreen = SDL_SetVideoMode(640, 400, 16, SDL_SWSURFACE);
+ 		if (sdl_hwscreen == NULL)
+ 			error("sdl_hwscreen failed");
+ 
+ 		/* Need some extra bytes around when using 2XSAI */
+ 		sdl_tmpscreen = SDL_CreateRGBSurfaceFrom(tmp_screen + TMP_SCREEN_OFFS, 320, 200, 16,
+ 			320*2, 0,0,0,0);
+ 		if (sdl_tmpscreen == NULL)
+ 			error("sdl_tmpscreen failed");
+ 
+ 		dirty_checksums = (uint32*)calloc(CKSUM_NUM*2, sizeof(uint32));
+ 		scaling = 2;		
  	}
  }





More information about the Scummvm-git-logs mailing list