[Scummvm-cvs-logs] CVS: scummvm akos.cpp,1.12,1.13 resource.cpp,1.68,1.69 script_v2.cpp,1.47,1.48 scumm.h,1.131,1.132 vars.cpp,1.7,1.8

Vincent Hamm yazoo at users.sourceforge.net
Sun Apr 21 12:41:00 CEST 2002


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

Modified Files:
	akos.cpp resource.cpp script_v2.cpp scumm.h vars.cpp 
Log Message:
Some new V7 scummvars. Implemented custom scale table in AKOS codec 1

Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/akos.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** akos.cpp	11 Apr 2002 17:19:14 -0000	1.12
--- akos.cpp	21 Apr 2002 19:38:00 -0000	1.13
***************
*** 581,588 ****
  	bool charsetmask;
  	bool masking;
! 	int step;
  
! 	/* implement custom scale table */
! 	ar->v1.scaletable = default_scale_table;
  
  	/* Setup color decoding variables */
--- 581,596 ----
  	bool charsetmask;
  	bool masking;
! 	int step;
  
! 	/* implement custom scale table */
! 
! 	if(isGlobInMemory(rtString,_vars[VAR_CUSTOMSCALETABLE]))
! 	{
! 		ar->v1.scaletable = getStringAddressVar(VAR_CUSTOMSCALETABLE);
! 	}
! 	else
! 	{
! 		ar->v1.scaletable = default_scale_table;
! 	}
  
  	/* Setup color decoding variables */

Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/resource.cpp,v
retrieving revision 1.68
retrieving revision 1.69
diff -C2 -d -r1.68 -r1.69
*** resource.cpp	16 Apr 2002 12:07:16 -0000	1.68
--- resource.cpp	21 Apr 2002 19:38:00 -0000	1.69
***************
*** 651,654 ****
--- 651,670 ----
  		return ((ArrayHeader *)b)->data;
  	return b;
+ }
+ 
+ byte *Scumm::getStringAddressVar(int i)
+ {
+ 	byte *addr;
+ 
+ 	addr=getResourceAddress(rtString,_vars[i]);
+ 
+ 	if(addr==NULL)
+ 		error("NULL string var %d slot %d",i,_vars[i]);
+ 
+ 	if (_features & GF_NEW_OPCODES)
+ 			return ((ArrayHeader *)addr)->data;
+ 
+ 	return(addr);
+ 
  }
  
***************
*** 1149,1152 ****
--- 1165,1179 ----
  	allocResTypeData(rtMatrix, MKID('NONE'), 10, "boxes", 0);
  }
+ 
+ 
+ uint32 Scumm::isGlobInMemory(int type, int index)
+ {
+ 	validateResource("isGlobInMemory",type,index);
+ 	
+ 	if(res.address[type][index]==NULL)
+ 		return(0);
+ 
+ 	return(1);
+ }
  
  uint16 newTag2Old(uint32 oldTag)
***************
*** 1189,1191 ****
  		return (0);
  	}
! }
--- 1216,1219 ----
  		return (0);
  	}
! }
! 

Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v2.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** script_v2.cpp	20 Apr 2002 09:30:04 -0000	1.47
--- script_v2.cpp	21 Apr 2002 19:38:00 -0000	1.48
***************
*** 2683,2687 ****
  			SmushPlayer localSp;
  			localSp.sm = this;
! 			localSp.startVideo(args[1], getStringAddress(_vars[0xf6 / 2]));
  			break;
  		case 7:
--- 2683,2687 ----
  			SmushPlayer localSp;
  			localSp.sm = this;
! 			localSp.startVideo(args[1], getStringAddressVar(VAR_VIDEONAME));
  			break;
  		case 7:

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm.h,v
retrieving revision 1.131
retrieving revision 1.132
diff -C2 -d -r1.131 -r1.132
*** scumm.h	20 Apr 2002 04:09:02 -0000	1.131
--- scumm.h	21 Apr 2002 19:38:00 -0000	1.132
***************
*** 813,817 ****
  	void nukeResource(int type, int i);	
  	byte *getResourceAddress(int type, int i);
! 	byte *getStringAddress(int i);
  	void ensureResourceLoaded(int type, int i);
  	int loadResource(int type, int i);
--- 813,818 ----
  	void nukeResource(int type, int i);	
  	byte *getResourceAddress(int type, int i);
! 	byte *getStringAddress(int i);
! 	byte *getStringAddressVar(int i);
  	void ensureResourceLoaded(int type, int i);
  	int loadResource(int type, int i);
***************
*** 827,831 ****
      void loadRoomObjectsSmall();
  	void readArrayFromIndexFile();
! 	void readMAXS();
  	virtual void readIndexFile();
  	virtual void loadCharset(int i);
--- 828,833 ----
      void loadRoomObjectsSmall();
  	void readArrayFromIndexFile();
! 	void readMAXS();
! 	uint32 isGlobInMemory(int type, int index);
  	virtual void readIndexFile();
  	virtual void loadCharset(int i);
***************
*** 1695,1699 ****
  
  	byte VAR_DEFAULT_TALK_DELAY;
! 	byte VAR_CHARSET_MASK;
  
  	void launch();
--- 1697,1704 ----
  
  	byte VAR_DEFAULT_TALK_DELAY;
! 	byte VAR_CHARSET_MASK;
! 
! 	byte VAR_CUSTOMSCALETABLE;
! 	byte VAR_VIDEONAME;
  
  	void launch();

Index: vars.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/vars.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** vars.cpp	16 Apr 2002 12:18:50 -0000	1.7
--- vars.cpp	21 Apr 2002 19:38:00 -0000	1.8
***************
*** 184,188 ****
  	VAR_DEBUGMODE = 116;
  
! 	VAR_CHARSET_MASK = 119;
  
  	//VAR_V5_DRAWFLAGS = 9;
--- 184,192 ----
  	VAR_DEBUGMODE = 116;
  
! 	VAR_CHARSET_MASK = 119;
! 
! 	VAR_VIDEONAME = 0xF6/2;
! 
! 	VAR_CUSTOMSCALETABLE = 131;
  
  	//VAR_V5_DRAWFLAGS = 9;





More information about the Scummvm-git-logs mailing list