[Scummvm-cvs-logs] SF.net SVN: scummvm: [32391] scummvm/trunk/engines/drascula

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Fri May 30 12:21:30 CEST 2008


Revision: 32391
          http://scummvm.svn.sourceforge.net/scummvm/?rev=32391&view=rev
Author:   thebluegr
Date:     2008-05-30 03:21:29 -0700 (Fri, 30 May 2008)

Log Message:
-----------
Moved SSN frame definitions into their own enum and removed unused definitions for the escape and F1-F10 keys

Modified Paths:
--------------
    scummvm/trunk/engines/drascula/drascula.cpp
    scummvm/trunk/engines/drascula/drascula.h

Modified: scummvm/trunk/engines/drascula/drascula.cpp
===================================================================
--- scummvm/trunk/engines/drascula/drascula.cpp	2008-05-30 10:14:27 UTC (rev 32390)
+++ scummvm/trunk/engines/drascula/drascula.cpp	2008-05-30 10:21:29 UTC (rev 32391)
@@ -3240,7 +3240,7 @@
 				select2[v] = key;
 			else if (key == Common::KEYCODE_SPACE)
 				select2[v] = '\167';
-			else if (key == ESC)
+			else if (key == Common::KEYCODE_ESCAPE)
 				break;
 			else if (key == Common::KEYCODE_RETURN) {
 				select2[v] = '\0';
@@ -3297,8 +3297,9 @@
 		memcpy(&CHUNK, mSession, 1);
 		mSession += 1;
 	}
+
 	switch (CHUNK) {
-	case SET_PAL:
+	case kFrameSetPal:
 		if (!UsingMem)
 			_Session->read(dacSSN, 768);
 		else {
@@ -3307,10 +3308,10 @@
 		}
 		set_dacSSN(dacSSN);
 		break;
-	case EMPTY_FRAME:
+	case kFrameEmptyFrame:
 		WaitFrameSSN();
 		break;
-	case INIT_FRAME:
+	case kFrameInit:
 		if (!UsingMem) {
 			_Session->read(&CMP, 1);
 			_Session->read(&Lengt, 4);
@@ -3320,7 +3321,7 @@
 			memcpy(&Lengt, mSession, 4);
 			mSession += 4;
 		}
-		if (CMP == CMP_RLE) {
+		if (CMP == kFrameCmpRle) {
 			if (!UsingMem) {
 				BufferSSN = (byte *)malloc(Lengt);
 				_Session->read(BufferSSN, Lengt);
@@ -3343,7 +3344,7 @@
 			_system->updateScreen();
 			FrameSSN++;
 		} else {
-			if (CMP == CMP_OFF) {
+			if (CMP == kFrameCmpOff) {
 				if (!UsingMem) {
 					BufferSSN = (byte *)malloc(Lengt);
 					_Session->read(BufferSSN, Lengt);
@@ -3368,7 +3369,7 @@
 			}
 		}
 		break;
-	case END_ANIM:
+	case kFrameEndAnim:
 		Exit = 1;
 		break;
 	default:

Modified: scummvm/trunk/engines/drascula/drascula.h
===================================================================
--- scummvm/trunk/engines/drascula/drascula.h	2008-05-30 10:14:27 UTC (rev 32390)
+++ scummvm/trunk/engines/drascula/drascula.h	2008-05-30 10:21:29 UTC (rev 32391)
@@ -80,6 +80,16 @@
 	kColorPink = 11
 };
 
+enum SSNFrames {
+	kFrameInit = 0,
+	kFrameCmpRle = 1,
+	kFrameCmpOff = 2,
+	kFrameEndAnim = 3,
+	kFrameSetPal = 4,
+	kFrameMouseKey = 5,		// unused
+	kFrameEmptyFrame = 6
+};
+
 #define TEXTD_START 68
 
 struct DrasculaGameDescription;
@@ -87,16 +97,6 @@
 
 #define NUM_SAVES     10
 #define NUM_FLAGS     50
-#define ESC          0x01
-#define F1           0x3B
-#define F2           0x3C
-#define F3           0x3D
-#define F4           0x3E
-#define F5           0x3F
-#define F6           0x40
-#define F8           0x42
-#define F9           0x43
-#define F10          0x44
 #define DIF_MASK       55
 #define OBJWIDTH        40
 #define OBJHEIGHT         25
@@ -200,14 +200,6 @@
 #define X_N0_OPC            213
 #define NO_DOOR              99
 
-#define INIT_FRAME  0
-#define CMP_RLE     1
-#define CMP_OFF     2
-#define END_ANIM    3
-#define SET_PAL     4
-#define MOUSE_KEY   5
-#define EMPTY_FRAME 6
-
 #define COMPLETE_PAL   256
 #define HALF_PAL       128
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list