diff options
author | James Haley | 2010-09-03 04:30:52 +0000 |
---|---|---|
committer | James Haley | 2010-09-03 04:30:52 +0000 |
commit | ab0dc8fcb49a71db33e26f9c01e88d24e43c556e (patch) | |
tree | 787292bf7494cbd01c8a967666bdce2abaca4b1b /src/strife/p_dialog.h | |
parent | d1c8cb2cfed18f5c5c32347011f33a210c96ff38 (diff) | |
download | chocolate-doom-ab0dc8fcb49a71db33e26f9c01e88d24e43c556e.tar.gz chocolate-doom-ab0dc8fcb49a71db33e26f9c01e88d24e43c556e.tar.bz2 chocolate-doom-ab0dc8fcb49a71db33e26f9c01e88d24e43c556e.zip |
Code to read dialog lump field-by-field to avoid any possible problems
with structure packing. Also a minor fix to Kaiser's key look code.
Subversion-branch: /branches/strife-branch
Subversion-revision: 2004
Diffstat (limited to 'src/strife/p_dialog.h')
-rw-r--r-- | src/strife/p_dialog.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/strife/p_dialog.h b/src/strife/p_dialog.h index e90f5df4..17ff46ca 100644 --- a/src/strife/p_dialog.h +++ b/src/strife/p_dialog.h @@ -31,6 +31,13 @@ #ifndef P_DIALOG_H__
#define P_DIALOG_H__
+#define MDLG_CHOICELEN 32
+#define MDLG_MSGLEN 80
+#define MDLG_NAMELEN 16
+#define MDLG_LUMPLEN 8
+#define MDLG_TEXTLEN 320
+#define MDLG_MAXCHOICES 5
+
typedef struct mapdlgchoice_s
{
int giveitem; // item given when successful
@@ -40,11 +47,11 @@ typedef struct mapdlgchoice_s int needamount1; // amount of first item needed
int needamount2; // amount of second item needed
int needamount3; // amount of third item needed
- char text[32]; // normal text
- char textok[80]; // message given on success
+ char text[MDLG_CHOICELEN]; // normal text
+ char textok[MDLG_MSGLEN]; // message given on success
int next; // next dialog?
int objective; // ???
- char textno[80]; // message given on failure
+ char textno[MDLG_MSGLEN]; // message given on failure
} mapdlgchoice_t;
typedef struct mapdialog_s
@@ -55,12 +62,13 @@ typedef struct mapdialog_s int checkitem2; // second item needed to see this dialog, if any
int checkitem3; // third item needed to see this dialog, if any
int jumptoconv; // conversation to jump to when... ?
- char name[16]; // name of speaker
- char voice[8]; // voice file to play
- char backpic[8]; // backdrop pic for character, if any
- char text[320]; // main message text
+ char name[MDLG_NAMELEN]; // name of speaker
+ char voice[MDLG_LUMPLEN]; // voice file to play
+ char backpic[MDLG_LUMPLEN]; // backdrop pic for character, if any
+ char text[MDLG_TEXTLEN]; // main message text
- mapdlgchoice_t choices[5]; // options that this dialog gives the player
+ // options that this dialog gives the player
+ mapdlgchoice_t choices[MDLG_MAXCHOICES];
} mapdialog_t;
|