diff options
| -rw-r--r-- | actor.cpp | 4 | ||||
| -rw-r--r-- | debug.cpp | 2 | ||||
| -rw-r--r-- | gfx.cpp | 6 | ||||
| -rw-r--r-- | script.cpp | 2 | ||||
| -rw-r--r-- | script_v1.cpp | 6 | ||||
| -rw-r--r-- | scumm.h | 16 | ||||
| -rw-r--r-- | scummvm.cpp | 6 | 
7 files changed, 26 insertions, 16 deletions
@@ -785,7 +785,7 @@ void Scumm::walkActor(Actor *a) {  void Scumm::processActors() {  	int i; -	Actor *actors[NUM_ACTORS],*a,**ac,**ac2,*tmp; +	Actor *actors[MAX_ACTORS], *a,**ac,**ac2,*tmp;  	int numactors = 0, cnt,cnt2;  	for (i=1; i<NUM_ACTORS; i++) { @@ -938,7 +938,7 @@ void Scumm::actorAnimate(Actor *a) {  }  void Scumm::setActorRedrawFlags() { -	uint i,j; +	int i,j;  	uint32 bits;  	for (i=0; i<40; i++) { @@ -270,7 +270,7 @@ void ScummDebugger::printActors(int act) {  	printf("+--------------------------------------------------------------+\n");  	printf("|# |room|  x y   |elev|cos|width|box|mov|zp|frame|scale|spd|dir|\n");  	printf("+--+----+--------+----+---+-----+---+---+--+-----+-----+---+---+\n"); -	for(i=1; i<NUM_ACTORS; i++) { +	for(i=1; i<_s->NUM_ACTORS; i++) {  		if (act==-1 || act==i) {  			a = &_s->actor[i];  			if (a->visible) @@ -533,8 +533,8 @@ void Scumm::unkVirtScreen4(int a) {  		unkScreenEffect6();  		break;  	case 129: -//		setDirtyRange(0, 0, vs->height); -//		updateDirtyScreen(0); +		setDirtyRange(0, 0, vs->height); +		updateDirtyScreen(0);  		/* XXX: EGA_proc4(0); */                  warning("EGA_proc4"); /* FIXME */  		break; @@ -545,7 +545,7 @@ void Scumm::unkVirtScreen4(int a) {  		unkScreenEffect5(1);  		break;  	default: -		error("unkVirtScreen4: default case %d", a); +		warning("unkVirtScreen4: default case %d", a);  	}  } diff --git a/script.cpp b/script.cpp index b6e3a9f02a..d50adc9566 100644 --- a/script.cpp +++ b/script.cpp @@ -254,7 +254,7 @@ void Scumm::executeScript() {  		_opcode = fetchScriptByte();  		_scriptPointerStart = _scriptPointer;  		vm.slot[_currentScript].didexec = 1; -		// debug(1, "[%X] %s()", _opcode, _opcodes_lookup[_opcode]); +		//debug(1, "[%X] %s()", _opcode, _opcodes_lookup[_opcode]);  		op = getOpcode(_opcode);  		(this->*op)();  	} diff --git a/script_v1.cpp b/script_v1.cpp index fafac0da36..06ca5c26df 100644 --- a/script_v1.cpp +++ b/script_v1.cpp @@ -1938,16 +1938,16 @@ void Scumm::o5_setObjectName() {  	int a;  	int i;  	byte *name; - +	  	if (obj < NUM_ACTORS)  		error("Can't set actor %d name with new-name-of", obj);  	if (!getOBCDFromObject(obj))  		error("Can't set name of object %d", obj); -	name = getObjOrActorName(obj); +	name = getObjOrActorName(obj);	  	size = getResourceDataSize(name); -	i = 0; +	i = 0;	  	while ((a = fetchScriptByte()) != 0) {  		 name[i++] = a; @@ -48,9 +48,10 @@ enum {  	NUM_SCRIPT_SLOT = 25,  	NUM_LOCALSCRIPT = 60,  	NUM_SHADOW_PALETTE = 8, -	NUM_ACTORS = 30 +	MAX_ACTORS = 30  }; +  const uint16 many_direction_tab[18] = {  	4,  	8, @@ -807,9 +808,9 @@ enum GameFeatures {  	GF_DEFAULT = GF_USE_KEY,  	GF_SMALL_HEADER = 32, -        GF_EXTERNAL_CHARSET = GF_SMALL_HEADER, -        GF_SMALL_NAMES = 64, -        GF_OLD_BUNDLE = 128, +    GF_EXTERNAL_CHARSET = GF_SMALL_HEADER, +    GF_SMALL_NAMES = 64, +    GF_OLD_BUNDLE = 128,  	GF_16COLOR = 256,  	GF_OLD256 = 512,  	GF_AUDIOTRACKS = 1024, @@ -861,9 +862,10 @@ struct Scumm {  	byte OF_OWNER_ROOM; -        int _gameTempo, _saveSound; +    int _gameTempo, _saveSound;  	int _lastLoadedRoom;  	int _roomResource; +	  	byte _encbyte;  	void *_fileHandle;  	void *_sfxFile; @@ -1076,7 +1078,7 @@ struct Scumm {  		int16 x,y;  	} mouse; -	Actor actor[NUM_ACTORS]; +	Actor actor[MAX_ACTORS];  	uint32 gfxUsageBits[200]; @@ -2116,6 +2118,8 @@ struct Scumm {  	byte VAR_DEFAULT_TALK_DELAY;  	byte VAR_CHARSET_MASK; +	int NUM_ACTORS; +  	byte _videoPath[50];  }; diff --git a/scummvm.cpp b/scummvm.cpp index 09c33fe8b4..4d0a3fc386 100644 --- a/scummvm.cpp +++ b/scummvm.cpp @@ -222,6 +222,12 @@ void Scumm::scummMain(int argc, char **argv) {  	else  		setupScummVarsOld(); +	 +	if (_features & GF_AFTER_V6) +		NUM_ACTORS = 30; +	else +		NUM_ACTORS = 13; +  	if(_features & GF_AFTER_V7)  		OF_OWNER_ROOM = 0xFF;  	else  | 
