OSDN Git Service

- Add x and b casts for ACS printing.
authorRandy Heit <rheit@zdoom.fake>
Sun, 7 Dec 2008 03:59:06 +0000 (03:59 +0000)
committerRandy Heit <rheit@zdoom.fake>
Sun, 7 Dec 2008 03:59:06 +0000 (03:59 +0000)
- Add ClassifyActor constants to zdefs.acs.

SVN r1311 (trunk)

parse.c
pcode.c
pcode.h
zdefs.acs

diff --git a/parse.c b/parse.c
index 96bb3f4..c38a992 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -2054,6 +2054,12 @@ static void BuildPrintString(void)
                        case 'k': // [GRB] key binding\r
                                printCmd = PCD_PRINTBIND;\r
                                break;\r
+                       case 'b': // [RH] binary integer\r
+                               printCmd = PCD_PRINTBINARY;\r
+                               break;\r
+                       case 'x': // [RH] hexadecimal integer\r
+                               printCmd = PCD_PRINTHEX;\r
+                               break;\r
                        default:\r
                                printCmd = PCD_PRINTSTRING;\r
                                ERR_Error(ERR_UNKNOWN_PRTYPE, YES);\r
diff --git a/pcode.c b/pcode.c
index c70fd58..22950d2 100644 (file)
--- a/pcode.c
+++ b/pcode.c
@@ -458,7 +458,9 @@ static char *PCDNames[PCODE_COMMAND_COUNT] =
        "PCD_MORPHACTOR",\r
        "PCD_UNMORPHACTOR",\r
        "PCD_GETPLAYERINPUT",\r
-       "PCD_CLASSIFYACTOR"\r
+       "PCD_CLASSIFYACTOR",\r
+       "PCD_PRINTBINARY",\r
+       "PCD_PRINTHEX",\r
 };\r
 \r
 // CODE --------------------------------------------------------------------\r
diff --git a/pcode.h b/pcode.h
index 336a777..d3cbe52 100644 (file)
--- a/pcode.h
+++ b/pcode.h
@@ -410,6 +410,8 @@ typedef enum
        PCD_UNMORPHACTOR,\r
        PCD_GETPLAYERINPUT,\r
        PCD_CLASSIFYACTOR,\r
+       PCD_PRINTBINARY,\r
+       PCD_PRINTHEX,\r
 \r
        PCODE_COMMAND_COUNT\r
 } pcd_t;\r
index 832a969..459e58a 100644 (file)
--- a/zdefs.acs
+++ b/zdefs.acs
 #define T_SPARK_DRIP                   108\r
 \r
 \r
+// Flags returned by ClassifyActor\r
+\r
+#define ACTOR_NONE                             0\r
+#define ACTOR_WORLD                            1\r
+#define ACTOR_PLAYER                   2\r
+#define ACTOR_BOT                              4\r
+#define ACTOR_VOODOODOLL               8\r
+#define ACTOR_MONSTER                  16\r
+#define ACTOR_ALIVE                            32\r
+#define ACTOR_DEAD                             64\r
+#define ACTOR_MISSILE                  128\r
+#define ACTOR_GENERIC                  256\r
+\r
+\r
 // Events when you have input grabbed\r
 \r
 #define EV_KeyDown                             1       // data1: unshifted ASCII, data2: shifted ASCII\r