summaryrefslogtreecommitdiff
path: root/src/strife/p_dialog.h
diff options
context:
space:
mode:
authorJames Haley2010-09-18 07:29:09 +0000
committerJames Haley2010-09-18 07:29:09 +0000
commit496bd0cfca29fdcb7b6de72fac85d6d6fa62e2af (patch)
tree449b2715d18dddb51ebb962332c2cfd709f3ddb3 /src/strife/p_dialog.h
parentb335b29a98bf2f86fb66a385e913d5e013317e2a (diff)
downloadchocolate-doom-496bd0cfca29fdcb7b6de72fac85d6d6fa62e2af.tar.gz
chocolate-doom-496bd0cfca29fdcb7b6de72fac85d6d6fa62e2af.tar.bz2
chocolate-doom-496bd0cfca29fdcb7b6de72fac85d6d6fa62e2af.zip
Revisions to objective macro and addition of voice with objective for
super-shortcut. Implemented A_BossDeath - needs moar testing! Resolved conflict with p_inter.c. Subversion-branch: /branches/strife-branch Subversion-revision: 2107
Diffstat (limited to 'src/strife/p_dialog.h')
-rw-r--r--src/strife/p_dialog.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/strife/p_dialog.h b/src/strife/p_dialog.h
index 95adea13..cabf0935 100644
--- a/src/strife/p_dialog.h
+++ b/src/strife/p_dialog.h
@@ -46,9 +46,21 @@
extern char mission_objective[OBJECTIVE_LEN];
// villsa - convenient macro for giving objective logs to player
-#define GiveObjective(x) \
- if(W_CheckNumForName(DEH_String(x)) != -1)\
-{ strncpy(mission_objective, W_CacheLumpName(DEH_String(x), PU_CACHE), OBJECTIVE_LEN); }
+#define GiveObjective(x, minlumpnum) \
+do { \
+ int obj_ln = W_CheckNumForName(DEH_String(x)); \
+ if(obj_ln > minlumpnum) \
+ strncpy(mission_objective, W_CacheLumpNum(obj_ln, PU_CACHE), OBJECTIVE_LEN);\
+} while(0)
+
+// haleyjd - voice and objective in one
+#define GiveVoiceObjective(voice, log, minlumpnum) \
+do { \
+ int obj_ln = W_CheckNumForName(DEH_String(log)); \
+ I_StartVoice(DEH_String(voice)); \
+ if(obj_ln > minlumpnum) \
+ strncpy(mission_objective, W_CacheLumpNum(obj_ln, PU_CACHE), OBJECTIVE_LEN);\
+} while(0)
typedef struct mapdlgchoice_s
{