[Scummvm-cvs-logs] CVS: scummvm actor.cpp,1.38,1.39 script_v1.cpp,1.54,1.55 scumm.h,1.90,1.91 string.cpp,1.31,1.32

James Brown ender at users.sourceforge.net
Tue Mar 19 06:40:03 CET 2002


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

Modified Files:
	actor.cpp script_v1.cpp scumm.h string.cpp 
Log Message:
khaleks fix for indy3/zak fonts.



Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/actor.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** actor.cpp	18 Mar 2002 22:48:57 -0000	1.38
--- actor.cpp	19 Mar 2002 14:39:02 -0000	1.39
***************
*** 1212,1216 ****
  
  void Scumm::walkActorOld(Actor *a) {
! 	int new_dir,next_box,goto_x,goto_y;
  
  	if(!a->moving)
--- 1212,1216 ----
  
  void Scumm::walkActorOld(Actor *a) {
! 	int new_dir,next_box;
  
  	if(!a->moving)

Index: script_v1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v1.cpp,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** script_v1.cpp	18 Mar 2002 22:48:57 -0000	1.54
--- script_v1.cpp	19 Mar 2002 14:39:02 -0000	1.55
***************
*** 805,809 ****
  }
  
! const short int bit_table[16] =
  {1,2,4,8,0x10,0x20,0x40,0x80,0x100,0x200,0x400,0x800,0x1000,0x2000,0x4000,0x8000};
  
--- 805,809 ----
  }
  
! const int bit_table[16] =
  {1,2,4,8,0x10,0x20,0x40,0x80,0x100,0x200,0x400,0x800,0x1000,0x2000,0x4000,0x8000};
  
***************
*** 1343,1348 ****
  
  void Scumm::o5_ifClassOfIs() {
! 	int act,cls;
! 	bool cond = true, b;
  	byte *oldClass;
  
--- 1343,1348 ----
  
  void Scumm::o5_ifClassOfIs() {
! 	int act,cls, b;
! 	bool cond = true;
  	byte *oldClass;
  

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm.h,v
retrieving revision 1.90
retrieving revision 1.91
diff -C2 -d -r1.90 -r1.91
*** scumm.h	18 Mar 2002 22:48:57 -0000	1.90
--- scumm.h	19 Mar 2002 14:39:02 -0000	1.91
***************
*** 493,496 ****
--- 493,497 ----
  	void printChar(int chr);
  	void printCharOld(int chr);
+ 	int getSpacing(char chr);
  	int getStringWidth(int a, byte *str, int pos);
  	void addLinebreaks(int a, byte *str, int pos, int maxwidth);

Index: string.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/string.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** string.cpp	11 Mar 2002 14:06:21 -0000	1.31
--- string.cpp	19 Mar 2002 14:39:02 -0000	1.32
***************
*** 133,137 ****
  			lastspace = pos - 1;
  		if(_vm->_features & GF_OLD256) {
! 			curw += 8;
  		} else {
  			offs = READ_LE_UINT32(ptr + chr*4 + 4);
--- 133,137 ----
  			lastspace = pos - 1;
  		if(_vm->_features & GF_OLD256) {
! 			curw += getSpacing(chr);
  		} else {
  			offs = READ_LE_UINT32(ptr + chr*4 + 4);
***************
*** 678,682 ****
  void Scumm::initCharset(int charsetno) {
  	int i;
! 	
      if (_features & GF_SMALL_HEADER)
             loadCharset(charsetno);
--- 678,685 ----
  void Scumm::initCharset(int charsetno) {
  	int i;
! 
! 	if (_features & GF_OLD256)
! 	    charsetno = !charsetno;
! 
      if (_features & GF_SMALL_HEADER)
             loadCharset(charsetno);
***************
*** 729,733 ****
  	}
  
! 	_left+=8;
  
  	if (_left  > _strRight)
--- 732,736 ----
  	}
  
! 	_left+= getSpacing(chr);
  
  	if (_left  > _strRight)
***************
*** 918,920 ****
--- 921,959 ----
  		y++;
  	}
+ }
+ 
+ int CharsetRenderer::getSpacing(char chr) {
+ 	int space;
+ 
+ 	if (_curId == 1) {	// do spacing for variable width old-style font	
+ 		switch(chr) {
+ 			case '.':
+ 				space=1;
+ 				break;
+ 			case 'i':
+ 			case '\'':
+ 			case 'I':
+ 			case '!':
+ 				space=2;
+ 				break;
+ 			case 'l':
+ 				space=3;
+ 				break;
+ 			case ' ':
+ 				space=4;
+ 				break;
+ 			case 'W':
+ 			case 'w':
+ 			case 'N':
+ 			case 'M':
+ 			case 'm':
+ 				space=8;
+ 				break;
+ 			default:
+ 				space=6;
+ 		}
+ 	}
+ 	else
+ 		space=7;
+ 	return space;
  }





More information about the Scummvm-git-logs mailing list