[Scummvm-cvs-logs] CVS: scummvm/v3 resource_v3.cpp,1.4,1.5

Ludvig Strigeus strigeus at users.sourceforge.net
Thu Apr 11 08:28:57 CEST 2002


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

Modified Files:
	resource_v3.cpp 
Log Message:
various code cleanups

Index: resource_v3.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/v3/resource_v3.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** resource_v3.cpp	10 Apr 2002 20:52:55 -0000	1.4
--- resource_v3.cpp	11 Apr 2002 15:22:02 -0000	1.5
***************
*** 30,34 ****
  	int numblock = 0;
  	int num, i;
- 	byte* _oldClass; 
  
  	debug(9, "readIndexFile()");
--- 30,33 ----
***************
*** 122,140 ****
                         num = fileReadWordLE();
                         assert(num == _numGlobalObjects);
!                        for (i=0; i<num; i++) { /* not too sure about all that */
!                                 _oldClass=(byte*)&_classData[i];
!                                 _oldClass[0]=fileReadByte();
!                                 _oldClass[1]=fileReadByte();
!                                 _oldClass[2]=fileReadByte();
!                                 _objectOwnerTable[i] = fileReadByte();
!                             //   _objectStateTable[i] = fileReadByte();
!                                _objectOwnerTable[i] &= OF_OWNER_MASK;
                         }
  
- /*#if defined(SCUMM_BIG_ENDIAN)
-                        for (i=0; i<num; i++) {
-                                _classData[i] = FROM_LE_32(_classData[i]);
-                        }
- #endif*/
                         break;
  
--- 121,135 ----
                         num = fileReadWordLE();
                         assert(num == _numGlobalObjects);
!                        for (i=0; i!=num; i++) {
!                                 uint32 bits = fileReadByte();
! 																byte tmp;
! 																bits |= fileReadByte() << 8;
! 																bits |= fileReadByte() << 16;
! 																_classData[i] = bits;
!                                 tmp = fileReadByte();
! 																_objectOwnerTable[i] = tmp & OF_OWNER_MASK;
! 																_objectStateTable[i] = tmp >> OF_STATE_SHL;
                         }
  
                         break;
  
***************
*** 149,153 ****
  
  void Scumm_v3::loadCharset(int no){
! 	uint32 size;		memset(_charsetData, 0, sizeof(_charsetData));
  
          checkRange(4 ,0 ,no , "Loading illegal charset %d");
--- 144,149 ----
  
  void Scumm_v3::loadCharset(int no){
! 	uint32 size;		
! 	memset(_charsetData, 0, sizeof(_charsetData));
  
          checkRange(4 ,0 ,no , "Loading illegal charset %d");





More information about the Scummvm-git-logs mailing list