[Scummvm-cvs-logs] SF.net SVN: scummvm:[44533] scummvm/trunk/engines/sci

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Fri Oct 2 14:53:05 CEST 2009


Revision: 44533
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44533&view=rev
Author:   fingolfin
Date:     2009-10-02 12:53:04 +0000 (Fri, 02 Oct 2009)

Log Message:
-----------
SCI: Remove PRINT_STK macro; cleanup

Modified Paths:
--------------
    scummvm/trunk/engines/sci/console.cpp
    scummvm/trunk/engines/sci/engine/vm_types.h

Modified: scummvm/trunk/engines/sci/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/console.cpp	2009-10-02 12:44:12 UTC (rev 44532)
+++ scummvm/trunk/engines/sci/console.cpp	2009-10-02 12:53:04 UTC (rev 44533)
@@ -503,7 +503,7 @@
 		EngineState *s = _vm->_gamestate;	// for PRINT_STK
 		DebugPrintf("pc=%04x:%04x obj=%04x:%04x fp=ST:%04x sp=ST:%04x\n",
 					PRINT_REG(scriptState.xs->addr.pc), PRINT_REG(scriptState.xs->objp),
-					PRINT_STK(scriptState.xs->fp), PRINT_STK(scriptState.xs->sp));
+					(unsigned)(scriptState.xs->fp - s->stack_base), (unsigned)(scriptState.xs->sp - s->stack_base));
 	} else
 		DebugPrintf("<no execution stack: pc,obj,fp omitted>\n");
 

Modified: scummvm/trunk/engines/sci/engine/vm_types.h
===================================================================
--- scummvm/trunk/engines/sci/engine/vm_types.h	2009-10-02 12:44:12 UTC (rev 44532)
+++ scummvm/trunk/engines/sci/engine/vm_types.h	2009-10-02 12:53:04 UTC (rev 44533)
@@ -58,31 +58,39 @@
 	}
 };
 
+static inline reg_t make_reg(SegmentId segment, uint16 offset) {
+	reg_t r;
+	r.offset = offset;
+	r.segment = segment;
+	return r;
+}
+
 #define PRINT_REG(r) (0xffff) & (unsigned) (r).segment, (unsigned) (r).offset
 
 // Stack pointer type
 typedef reg_t *StackPtr;
 
+enum {
+	/**
+	 * Special reg_t 'offset' used to indicate an error, or that an operation has
+	 * finished (depending on the case).
+	 * @see SIGNAL_REG
+	 */
+	SIGNAL_OFFSET = 0xffff
+};
+
+extern const reg_t NULL_REG;
+extern const reg_t SIGNAL_REG;
+
 // Selector ID
 typedef int Selector;
-#define NULL_SELECTOR -1
 
-// Offset sent to indicate an error, or that an operation has finished
-// (depending on the case)
-#define SIGNAL_OFFSET 0xffff
+enum {
+	/** Special 'selector' value, used when calling add_exec_stack_entry. */
+	NULL_SELECTOR = -1
+};
 
-#define PRINT_STK(v) (unsigned) (v - s->stack_base)
 
-static inline reg_t make_reg(SegmentId segment, uint16 offset) {
-	reg_t r;
-	r.offset = offset;
-	r.segment = segment;
-	return r;
-}
-
-extern const reg_t NULL_REG;
-extern const reg_t SIGNAL_REG;
-
 } // End of namespace Sci
 
 #endif // SCI_ENGINE_VM_TYPES_H


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