diff options
author | Karl Kurbjun <kkurbjun@gmail.com> | 2006-12-13 04:44:17 +0000 |
---|---|---|
committer | Karl Kurbjun <kkurbjun@gmail.com> | 2006-12-13 04:44:17 +0000 |
commit | 7e6f74e429aec0e6fa9041f8647a7bab32eea0c4 (patch) | |
tree | 3a937760b7ab8ad4bdf8dd1f0259b91328803f1b /apps/plugins | |
parent | 314f3b58f18ccbc8f5a39897681bc8579cd330d1 (diff) | |
download | rockbox-7e6f74e429aec0e6fa9041f8647a7bab32eea0c4.tar.gz rockbox-7e6f74e429aec0e6fa9041f8647a7bab32eea0c4.zip |
Dehacked and BEX support for Doom - currently only supports a DEHACKED file in a WAD (not as a standalone file yet).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11738 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/doom/Makefile | 24 | ||||
-rw-r--r-- | apps/plugins/doom/am_map.c | 16 | ||||
-rw-r--r-- | apps/plugins/doom/d_main.c | 8 | ||||
-rw-r--r-- | apps/plugins/doom/dstrings.h | 2 | ||||
-rw-r--r-- | apps/plugins/doom/f_finale.c | 103 | ||||
-rw-r--r-- | apps/plugins/doom/g_game.c | 2 | ||||
-rw-r--r-- | apps/plugins/doom/hu_stuff.c | 245 | ||||
-rw-r--r-- | apps/plugins/doom/hu_stuff.h | 8 | ||||
-rw-r--r-- | apps/plugins/doom/i_sound.c | 9 | ||||
-rw-r--r-- | apps/plugins/doom/i_video.c | 81 | ||||
-rw-r--r-- | apps/plugins/doom/m_menu.c | 54 | ||||
-rw-r--r-- | apps/plugins/doom/p_doors.c | 14 | ||||
-rw-r--r-- | apps/plugins/doom/p_inter.c | 77 | ||||
-rw-r--r-- | apps/plugins/doom/p_pspr.c | 4 | ||||
-rw-r--r-- | apps/plugins/doom/p_spec.c | 20 | ||||
-rw-r--r-- | apps/plugins/doom/rockdoom.c | 16 | ||||
-rw-r--r-- | apps/plugins/doom/rockmacros.h | 4 |
17 files changed, 260 insertions, 427 deletions
diff --git a/apps/plugins/doom/Makefile b/apps/plugins/doom/Makefile index f0e858a393..538d57720c 100644 --- a/apps/plugins/doom/Makefile +++ b/apps/plugins/doom/Makefile | |||
@@ -3,7 +3,10 @@ | |||
3 | # $Id$ | 3 | # $Id$ |
4 | # | 4 | # |
5 | # $Log$ | 5 | # $Log$ |
6 | # Revision 1.10 2006/10/27 21:47:55 amiconn | 6 | # Revision 1.11 2006/12/13 04:44:17 kkurbjun |
7 | # Dehacked and BEX support for Doom - currently only supports a DEHACKED file in a WAD (not as a standalone file yet). | ||
8 | # | ||
9 | # Revision 1.10 2006-10-27 21:47:55 amiconn | ||
7 | # Next step of Makefile tuning: * Use 'make' internal commands for printing messages. Saves build time especially on cygwin. * SILENT variable used in more places. * Bitmap build system uses one Makefille less. | 10 | # Next step of Makefile tuning: * Use 'make' internal commands for printing messages. Saves build time especially on cygwin. * SILENT variable used in more places. * Bitmap build system uses one Makefille less. |
8 | # | 11 | # |
9 | # Revision 1.9 2006-10-23 22:33:36 amiconn | 12 | # Revision 1.9 2006-10-23 22:33:36 amiconn |
@@ -39,16 +42,20 @@ INCLUDES = -I$(APPSDIR) -I.. -I. $(TARGET_INC) -I$(FIRMDIR)/include -I$(FIRMDIR) | |||
39 | -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) | 42 | -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(OUTDIR) -I$(BUILDDIR) |
40 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ | 43 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET) $(EXTRA_DEFINES) \ |
41 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN \ | 44 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DPLUGIN \ |
42 | -Wno-strict-prototypes -O2 $(PROFILE_OPTS) | 45 | -Wno-strict-prototypes $(PROFILE_OPTS) |
43 | 46 | ||
44 | ifdef APPEXTRA | 47 | ifdef APPEXTRA |
45 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | 48 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) |
46 | endif | 49 | endif |
47 | 50 | ||
48 | ifneq (,$(strip $(foreach tgt,IPOD_NANO IPOD_COLOR IPOD_VIDEO,$(findstring $(tgt),$(TARGET))))) | 51 | # The arm code compiles too large for the plugin buffer when set to optimize for speed |
52 | ifeq ($(CC), arm-elf-gcc) | ||
53 | CFLAGS += -Os | ||
49 | ifndef SIMVER | 54 | ifndef SIMVER |
50 | CFLAGS += -mstructure-size-boundary=8 | 55 | CFLAGS += -mstructure-size-boundary=8 |
51 | endif | 56 | endif |
57 | else | ||
58 | CFLAGS += -O2 | ||
52 | endif | 59 | endif |
53 | 60 | ||
54 | LINKFILE := $(OBJDIR)/link.lds | 61 | LINKFILE := $(OBJDIR)/link.lds |
@@ -62,8 +69,10 @@ SRC = info.c doomdef.c doomstat.c dstrings.c tables.c \ | |||
62 | r_plane.c r_segs.c r_sky.c r_things.c wi_stuff.c v_video.c st_lib.c \ | 69 | r_plane.c r_segs.c r_sky.c r_things.c wi_stuff.c v_video.c st_lib.c \ |
63 | st_stuff.c hu_stuff.c hu_lib.c s_sound.c z_zone.c z_bmalloc.c sounds.c \ | 70 | st_stuff.c hu_stuff.c hu_lib.c s_sound.c z_zone.c z_bmalloc.c sounds.c \ |
64 | d_main.c m_misc.c m_bbox.c i_system.c i_sound.c i_video.c \ | 71 | d_main.c m_misc.c m_bbox.c i_system.c i_sound.c i_video.c \ |
65 | w_wad.c rockdoom.c | 72 | w_wad.c rockdoom.c d_deh.c ../../../firmware/common/sscanf.c |
66 | # fixmath2.S | 73 | |
74 | # sscanf isn't built into the core right now - should remove from here if that | ||
75 | # changes | ||
67 | 76 | ||
68 | SOURCES = $(SRC) | 77 | SOURCES = $(SRC) |
69 | OBJS := $(SRC:%.c=$(OBJDIR)/%.o) | 78 | OBJS := $(SRC:%.c=$(OBJDIR)/%.o) |
@@ -73,13 +82,8 @@ DIRS = . | |||
73 | 82 | ||
74 | 83 | ||
75 | ifndef SIMVER | 84 | ifndef SIMVER |
76 | ifneq (,$(findstring RECORDER,$(TARGET))) ## Archos recorder targets | ||
77 | LDS := archos.lds | ||
78 | OUTPUT = $(OUTDIR)/doom.ovl | ||
79 | else ## iRiver target | ||
80 | LDS := ../plugin.lds | 85 | LDS := ../plugin.lds |
81 | OUTPUT = $(OUTDIR)/doom.rock | 86 | OUTPUT = $(OUTDIR)/doom.rock |
82 | endif | ||
83 | else ## simulators | 87 | else ## simulators |
84 | OUTPUT = $(OUTDIR)/doom.rock | 88 | OUTPUT = $(OUTDIR)/doom.rock |
85 | endif | 89 | endif |
diff --git a/apps/plugins/doom/am_map.c b/apps/plugins/doom/am_map.c index 8f04f0df30..eb4e13279e 100644 --- a/apps/plugins/doom/am_map.c +++ b/apps/plugins/doom/am_map.c | |||
@@ -41,7 +41,7 @@ | |||
41 | #include "p_spec.h" | 41 | #include "p_spec.h" |
42 | #include "am_map.h" | 42 | #include "am_map.h" |
43 | #include "dstrings.h" | 43 | #include "dstrings.h" |
44 | //#include "d_deh.h" // Ty 03/27/98 - externalizations | 44 | #include "d_deh.h" // Ty 03/27/98 - externalizations |
45 | #include "g_game.h" | 45 | #include "g_game.h" |
46 | #include "rockmacros.h" | 46 | #include "rockmacros.h" |
47 | 47 | ||
@@ -72,7 +72,7 @@ int mapcolor_sngl; // single player arrow color | |||
72 | int mapcolor_plyr[4] = { 112, 88, 64, 176 }; // colors for player arrows in multiplayer | 72 | int mapcolor_plyr[4] = { 112, 88, 64, 176 }; // colors for player arrows in multiplayer |
73 | 73 | ||
74 | //jff 3/9/98 add option to not show secret sectors until entered | 74 | //jff 3/9/98 add option to not show secret sectors until entered |
75 | int map_secret_after=0; | 75 | int map_secret_after; |
76 | //jff 4/3/98 add symbols for "no-color" for disable and "black color" for black | 76 | //jff 4/3/98 add symbols for "no-color" for disable and "black color" for black |
77 | #define NC 0 | 77 | #define NC 0 |
78 | #define BC 247 | 78 | #define BC 247 |
@@ -702,33 +702,33 @@ boolean AM_Responder | |||
702 | automapmode ^= am_follow; // CPhipps - put all automap mode stuff into one enum | 702 | automapmode ^= am_follow; // CPhipps - put all automap mode stuff into one enum |
703 | f_oldloc.x = INT_MAX; | 703 | f_oldloc.x = INT_MAX; |
704 | // Ty 03/27/98 - externalized | 704 | // Ty 03/27/98 - externalized |
705 | plr->message = (automapmode & am_follow) ? AMSTR_FOLLOWON : AMSTR_FOLLOWOFF; | 705 | plr->message = (automapmode & am_follow) ? s_AMSTR_FOLLOWON : s_AMSTR_FOLLOWOFF; |
706 | } | 706 | } |
707 | else if (ch == key_map_grid) | 707 | else if (ch == key_map_grid) |
708 | { | 708 | { |
709 | automapmode ^= am_grid; // CPhipps | 709 | automapmode ^= am_grid; // CPhipps |
710 | // Ty 03/27/98 - *not* externalized | 710 | // Ty 03/27/98 - *not* externalized |
711 | plr->message = (automapmode & am_grid) ? AMSTR_GRIDON : AMSTR_GRIDOFF; | 711 | plr->message = (automapmode & am_grid) ? s_AMSTR_GRIDON : s_AMSTR_GRIDOFF; |
712 | } | 712 | } |
713 | else if (ch == key_map_mark) | 713 | else if (ch == key_map_mark) |
714 | { | 714 | { |
715 | // Ty 03/27/98 - *not* externalized | 715 | // Ty 03/27/98 - *not* externalized |
716 | snprintf(buffer, sizeof(buffer), "%s %d", AMSTR_MARKEDSPOT, markpointnum); | 716 | snprintf(buffer, sizeof(buffer), "%s %d", s_AMSTR_MARKEDSPOT, markpointnum); |
717 | plr->message = buffer; | 717 | plr->message = buffer; |
718 | AM_addMark(); | 718 | AM_addMark(); |
719 | } | 719 | } |
720 | else if (ch == key_map_clear) | 720 | else if (ch == key_map_clear) |
721 | { | 721 | { |
722 | AM_clearMarks(); // Ty 03/27/98 - *not* externalized | 722 | AM_clearMarks(); // Ty 03/27/98 - *not* externalized |
723 | plr->message = AMSTR_MARKSCLEARED; // ^ | 723 | plr->message = s_AMSTR_MARKSCLEARED; // ^ |
724 | } // | | 724 | } // | |
725 | else if (ch == key_map_rotate) { | 725 | else if (ch == key_map_rotate) { |
726 | automapmode ^= am_rotate; | 726 | automapmode ^= am_rotate; |
727 | plr->message = (automapmode & am_rotate) ? AMSTR_ROTATEON : AMSTR_ROTATEOFF; | 727 | plr->message = (automapmode & am_rotate) ? s_AMSTR_ROTATEON : s_AMSTR_ROTATEOFF; |
728 | } | 728 | } |
729 | else if (ch == key_map_overlay) { | 729 | else if (ch == key_map_overlay) { |
730 | automapmode ^= am_overlay; | 730 | automapmode ^= am_overlay; |
731 | plr->message = (automapmode & am_overlay) ? AMSTR_OVERLAYON : AMSTR_OVERLAYOFF; | 731 | plr->message = (automapmode & am_overlay) ? s_AMSTR_OVERLAYON : s_AMSTR_OVERLAYOFF; |
732 | } | 732 | } |
733 | else // phares | 733 | else // phares |
734 | { | 734 | { |
diff --git a/apps/plugins/doom/d_main.c b/apps/plugins/doom/d_main.c index b8c136689a..3dc64875fd 100644 --- a/apps/plugins/doom/d_main.c +++ b/apps/plugins/doom/d_main.c | |||
@@ -62,9 +62,13 @@ | |||
62 | #include "r_draw.h" | 62 | #include "r_draw.h" |
63 | #include "r_main.h" | 63 | #include "r_main.h" |
64 | #include "d_main.h" | 64 | #include "d_main.h" |
65 | #include "d_deh.h" // Ty 04/08/98 - Externalizations | ||
65 | #include "am_map.h" | 66 | #include "am_map.h" |
66 | #include "m_swap.h" | 67 | #include "m_swap.h" |
67 | 68 | ||
69 | // DEHacked support - Ty 03/09/97 // CPhipps - const char*'s | ||
70 | void ProcessDehFile(const char *filename, const char *outfilename, int lumpnum); | ||
71 | |||
68 | // CPhipps - removed wadfiles[] stuff | 72 | // CPhipps - removed wadfiles[] stuff |
69 | 73 | ||
70 | boolean devparm; // started game with -devparm | 74 | boolean devparm; // started game with -devparm |
@@ -78,6 +82,7 @@ boolean clfastparm; // checkparm of -fast | |||
78 | boolean nomonsters; // working -nomonsters | 82 | boolean nomonsters; // working -nomonsters |
79 | boolean respawnparm; // working -respawn | 83 | boolean respawnparm; // working -respawn |
80 | boolean fastparm; // working -fast | 84 | boolean fastparm; // working -fast |
85 | boolean dehout=false; | ||
81 | 86 | ||
82 | boolean singletics = false; // debug flag to cancel adaptiveness | 87 | boolean singletics = false; // debug flag to cancel adaptiveness |
83 | 88 | ||
@@ -725,6 +730,9 @@ void D_DoomMainSetup(void) | |||
725 | printf ("W_Init: Init WADfiles.\n"); | 730 | printf ("W_Init: Init WADfiles.\n"); |
726 | W_Init(); | 731 | W_Init(); |
727 | 732 | ||
733 | if ((p = W_CheckNumForName("DEHACKED")) != -1) // cph - add dehacked-in-a-wad support | ||
734 | ProcessDehFile(NULL, dehout ? NULL : "/dehlog.txt", p); | ||
735 | |||
728 | V_InitColorTranslation(); //jff 4/24/98 load color translation lumps | 736 | V_InitColorTranslation(); //jff 4/24/98 load color translation lumps |
729 | 737 | ||
730 | // Check for -file in shareware | 738 | // Check for -file in shareware |
diff --git a/apps/plugins/doom/dstrings.h b/apps/plugins/doom/dstrings.h index 4402c21f1f..f885faaeeb 100644 --- a/apps/plugins/doom/dstrings.h +++ b/apps/plugins/doom/dstrings.h | |||
@@ -26,7 +26,7 @@ | |||
26 | * | 26 | * |
27 | * DESCRIPTION: | 27 | * DESCRIPTION: |
28 | * DOOM strings, by language. | 28 | * DOOM strings, by language. |
29 | * Note: In BOOM, some new strings hav ebeen defined that are | 29 | * Note: In BOOM, some new strings have been defined that are |
30 | * not found in the French version. A better approach is | 30 | * not found in the French version. A better approach is |
31 | * to create a BEX text-replacement file for other | 31 | * to create a BEX text-replacement file for other |
32 | * languages since any language can be supported that way | 32 | * languages since any language can be supported that way |
diff --git a/apps/plugins/doom/f_finale.c b/apps/plugins/doom/f_finale.c index 3af27d2785..0b912c8239 100644 --- a/apps/plugins/doom/f_finale.c +++ b/apps/plugins/doom/f_finale.c | |||
@@ -32,13 +32,12 @@ | |||
32 | 32 | ||
33 | #include "doomstat.h" | 33 | #include "doomstat.h" |
34 | #include "d_event.h" | 34 | #include "d_event.h" |
35 | #include "d_englsh.h" | ||
36 | #include "m_swap.h" | 35 | #include "m_swap.h" |
37 | #include "v_video.h" | 36 | #include "v_video.h" |
38 | #include "w_wad.h" | 37 | #include "w_wad.h" |
39 | #include "s_sound.h" | 38 | #include "s_sound.h" |
40 | #include "sounds.h" | 39 | #include "sounds.h" |
41 | //#include "d_deh.h" // Ty 03/22/98 - externalizations | 40 | #include "d_deh.h" // Ty 03/22/98 - externalizations |
42 | #include "f_finale.h" // CPhipps - hmm... | 41 | #include "f_finale.h" // CPhipps - hmm... |
43 | #include "rockmacros.h" | 42 | #include "rockmacros.h" |
44 | 43 | ||
@@ -98,20 +97,20 @@ void F_StartFinale (void) | |||
98 | switch (gameepisode) | 97 | switch (gameepisode) |
99 | { | 98 | { |
100 | case 1: | 99 | case 1: |
101 | finaleflat = "FLOOR4_8"; | 100 | finaleflat = bgflatE1; // Ty 03/30/98 - new externalized bg flats |
102 | finaletext = E1TEXT; | 101 | finaletext = s_E1TEXT; // Ty 03/23/98 - Was e1text variable. |
103 | break; | 102 | break; |
104 | case 2: | 103 | case 2: |
105 | finaleflat = "SFLR6_1"; | 104 | finaleflat = bgflatE2; |
106 | finaletext = E2TEXT; | 105 | finaletext = s_E2TEXT; // Ty 03/23/98 - Same stuff for each |
107 | break; | 106 | break; |
108 | case 3: | 107 | case 3: |
109 | finaleflat = "MFLR8_4"; | 108 | finaleflat = bgflatE3; |
110 | finaletext = E3TEXT; | 109 | finaletext = s_E3TEXT; |
111 | break; | 110 | break; |
112 | case 4: | 111 | case 4: |
113 | finaleflat = "MFLR8_3"; | 112 | finaleflat = bgflatE4; |
114 | finaletext = E4TEXT; | 113 | finaletext = s_E4TEXT; |
115 | break; | 114 | break; |
116 | default: | 115 | default: |
117 | // Ouch. | 116 | // Ouch. |
@@ -129,48 +128,48 @@ void F_StartFinale (void) | |||
129 | switch (gamemap) | 128 | switch (gamemap) |
130 | { | 129 | { |
131 | case 6: | 130 | case 6: |
132 | finaleflat = "SLIME16"; | 131 | finaleflat = bgflat06; |
133 | finaletext = (gamemission==pack_tnt) ? T1TEXT : | 132 | finaletext = (gamemission==pack_tnt) ? s_T1TEXT : |
134 | (gamemission==pack_plut) ? P1TEXT : C1TEXT; | 133 | (gamemission==pack_plut) ? s_P1TEXT : s_C1TEXT; |
135 | break; | 134 | break; |
136 | case 11: | 135 | case 11: |
137 | finaleflat = "RROCK14"; | 136 | finaleflat = bgflat11; |
138 | finaletext = (gamemission==pack_tnt) ? T2TEXT : | 137 | finaletext = (gamemission==pack_tnt) ? s_T2TEXT : |
139 | (gamemission==pack_plut) ? P2TEXT : C2TEXT; | 138 | (gamemission==pack_plut) ? s_P2TEXT : s_C2TEXT; |
140 | break; | 139 | break; |
141 | case 20: | 140 | case 20: |
142 | finaleflat = "RROCK07"; | 141 | finaleflat = bgflat20; |
143 | finaletext = (gamemission==pack_tnt) ? T3TEXT : | 142 | finaletext = (gamemission==pack_tnt) ? s_T3TEXT : |
144 | (gamemission==pack_plut) ? P3TEXT : C3TEXT; | 143 | (gamemission==pack_plut) ? s_P3TEXT : s_C3TEXT; |
145 | break; | 144 | break; |
146 | case 30: | 145 | case 30: |
147 | finaleflat = "RROCK17"; | 146 | finaleflat = bgflat30; |
148 | finaletext = (gamemission==pack_tnt) ? T4TEXT : | 147 | finaletext = (gamemission==pack_tnt) ? s_T4TEXT : |
149 | (gamemission==pack_plut) ? P4TEXT : C4TEXT; | 148 | (gamemission==pack_plut) ? s_P4TEXT : s_C4TEXT; |
150 | break; | 149 | break; |
151 | case 15: | 150 | case 15: |
152 | finaleflat = "RROCK13"; | 151 | finaleflat = bgflat15; |
153 | finaletext = (gamemission==pack_tnt) ? T5TEXT : | 152 | finaletext = (gamemission==pack_tnt) ? s_T5TEXT : |
154 | (gamemission==pack_plut) ? P5TEXT : C5TEXT; | 153 | (gamemission==pack_plut) ? s_P5TEXT : s_C5TEXT; |
155 | break; | 154 | break; |
156 | case 31: | 155 | case 31: |
157 | finaleflat = "RROCK19"; | 156 | finaleflat = bgflat31; |
158 | finaletext = (gamemission==pack_tnt) ? T6TEXT : | 157 | finaletext = (gamemission==pack_tnt) ? s_T6TEXT : |
159 | (gamemission==pack_plut) ? P6TEXT : C6TEXT; | 158 | (gamemission==pack_plut) ? s_P6TEXT : s_C6TEXT; |
160 | break; | 159 | break; |
161 | default: | 160 | default: |
162 | // Ouch. | 161 | // Ouch. |
163 | break; | 162 | break; |
164 | } | 163 | } |
165 | break; | 164 | break; |
165 | // Ty 08/27/98 - end gamemission logic | ||
166 | } | 166 | } |
167 | 167 | ||
168 | |||
169 | // Indeterminate. | 168 | // Indeterminate. |
170 | default: | 169 | default: // Ty 03/30/98 - not externalized |
171 | S_ChangeMusic(mus_read_m, true); | 170 | S_ChangeMusic(mus_read_m, true); |
172 | finaleflat = "F_SKY1"; // Not used anywhere else. | 171 | finaleflat = "F_SKY1"; // Not used anywhere else. |
173 | finaletext = C1TEXT; // FIXME - other text, music? | 172 | finaletext = s_C1TEXT; // FIXME - other text, music? |
174 | break; | 173 | break; |
175 | } | 174 | } |
176 | 175 | ||
@@ -320,29 +319,29 @@ void F_TextWrite (void) | |||
320 | // | 319 | // |
321 | typedef struct | 320 | typedef struct |
322 | { | 321 | { |
323 | const char *name; // CPhipps - const** | 322 | const char **name; // CPhipps - const** |
324 | mobjtype_t type; | 323 | mobjtype_t type; |
325 | } castinfo_t; | 324 | } castinfo_t; |
326 | 325 | ||
327 | #define MAX_CASTORDER 18 /* Ty - hard coded for now */ | 326 | #define MAX_CASTORDER 18 /* Ty - hard coded for now */ |
328 | static const castinfo_t castorder[] = { // CPhipps - static const, initialised here | 327 | static const castinfo_t castorder[] = { // CPhipps - static const, initialised here |
329 | { CC_ZOMBIE, MT_POSSESSED }, | 328 | { &s_CC_ZOMBIE, MT_POSSESSED }, |
330 | { CC_SHOTGUN, MT_SHOTGUY }, | 329 | { &s_CC_SHOTGUN, MT_SHOTGUY }, |
331 | { CC_HEAVY, MT_CHAINGUY }, | 330 | { &s_CC_HEAVY, MT_CHAINGUY }, |
332 | { CC_IMP, MT_TROOP }, | 331 | { &s_CC_IMP, MT_TROOP }, |
333 | { CC_DEMON, MT_SERGEANT }, | 332 | { &s_CC_DEMON, MT_SERGEANT }, |
334 | { CC_LOST, MT_SKULL }, | 333 | { &s_CC_LOST, MT_SKULL }, |
335 | { CC_CACO, MT_HEAD }, | 334 | { &s_CC_CACO, MT_HEAD }, |
336 | { CC_HELL, MT_KNIGHT }, | 335 | { &s_CC_HELL, MT_KNIGHT }, |
337 | { CC_BARON, MT_BRUISER }, | 336 | { &s_CC_BARON, MT_BRUISER }, |
338 | { CC_ARACH, MT_BABY }, | 337 | { &s_CC_ARACH, MT_BABY }, |
339 | { CC_PAIN, MT_PAIN }, | 338 | { &s_CC_PAIN, MT_PAIN }, |
340 | { CC_REVEN, MT_UNDEAD }, | 339 | { &s_CC_REVEN, MT_UNDEAD }, |
341 | { CC_MANCU, MT_FATSO }, | 340 | { &s_CC_MANCU, MT_FATSO }, |
342 | { CC_ARCH, MT_VILE }, | 341 | { &s_CC_ARCH, MT_VILE }, |
343 | { CC_SPIDER, MT_SPIDER }, | 342 | { &s_CC_SPIDER, MT_SPIDER }, |
344 | { CC_CYBER, MT_CYBORG }, | 343 | { &s_CC_CYBER, MT_CYBORG }, |
345 | { CC_HERO, MT_PLAYER }, | 344 | { &s_CC_HERO, MT_PLAYER }, |
346 | { NULL, 0} | 345 | { NULL, 0} |
347 | }; | 346 | }; |
348 | 347 | ||
@@ -560,7 +559,6 @@ static void F_CastPrint (const char* text) // CPhipps - static, const char* | |||
560 | // | 559 | // |
561 | // F_CastDrawer | 560 | // F_CastDrawer |
562 | // | 561 | // |
563 | void V_DrawPatchFlipped (int x, int y, int scrn, patch_t *patch); | ||
564 | 562 | ||
565 | void F_CastDrawer (void) | 563 | void F_CastDrawer (void) |
566 | { | 564 | { |
@@ -570,9 +568,10 @@ void F_CastDrawer (void) | |||
570 | boolean flip; | 568 | boolean flip; |
571 | 569 | ||
572 | // erase the entire screen to a background | 570 | // erase the entire screen to a background |
573 | V_DrawNamePatch(0,0,0, "BOSSBACK", CR_DEFAULT, VPT_STRETCH); // Ty 03/30/98 bg texture extern | 571 | // CPhipps - patch drawing updated |
572 | V_DrawNamePatch(0,0,0, bgcastcall, CR_DEFAULT, VPT_STRETCH); // Ty 03/30/98 bg texture extern | ||
574 | 573 | ||
575 | F_CastPrint (castorder[castnum].name); | 574 | F_CastPrint (*(castorder[castnum].name)); |
576 | 575 | ||
577 | // draw the current frame in the middle of the screen | 576 | // draw the current frame in the middle of the screen |
578 | sprdef = &sprites[caststate->sprite]; | 577 | sprdef = &sprites[caststate->sprite]; |
diff --git a/apps/plugins/doom/g_game.c b/apps/plugins/doom/g_game.c index 7410e01bc7..b5944eae54 100644 --- a/apps/plugins/doom/g_game.c +++ b/apps/plugins/doom/g_game.c | |||
@@ -2771,7 +2771,7 @@ boolean G_CheckDemoStatus (void) | |||
2771 | // killough -- added fps information and made it work for longer demos: | 2771 | // killough -- added fps information and made it work for longer demos: |
2772 | unsigned realtics = endtime-starttime; | 2772 | unsigned realtics = endtime-starttime; |
2773 | int fd=open("/games/doom/timedemo.txt",O_WRONLY | O_CREAT); | 2773 | int fd=open("/games/doom/timedemo.txt",O_WRONLY | O_CREAT); |
2774 | fprintf (fd,"Timed %d gametics in %d realtics = %d frames per second", | 2774 | fdprintf (fd,"Timed %d gametics in %d realtics = %d frames per second", |
2775 | (unsigned) gametic, realtics, | 2775 | (unsigned) gametic, realtics, |
2776 | (unsigned) gametic * (double) TICRATE / realtics); | 2776 | (unsigned) gametic * (double) TICRATE / realtics); |
2777 | close(fd); | 2777 | close(fd); |
diff --git a/apps/plugins/doom/hu_stuff.c b/apps/plugins/doom/hu_stuff.c index cc240de8c1..747be18df0 100644 --- a/apps/plugins/doom/hu_stuff.c +++ b/apps/plugins/doom/hu_stuff.c | |||
@@ -56,10 +56,10 @@ int hud_graph_keys=1; //jff 3/7/98 display HUD keys as graphics | |||
56 | // | 56 | // |
57 | // Ty 03/28/98 - | 57 | // Ty 03/28/98 - |
58 | // These four shortcuts modifed to reflect char ** of mapnamesx[] | 58 | // These four shortcuts modifed to reflect char ** of mapnamesx[] |
59 | #define HU_TITLE (mapnames[(gameepisode-1)*9+gamemap-1]) | 59 | #define HU_TITLE (*mapnames[(gameepisode-1)*9+gamemap-1]) |
60 | #define HU_TITLE2 (mapnames2[gamemap-1]) | 60 | #define HU_TITLE2 (*mapnames2[gamemap-1]) |
61 | #define HU_TITLEP (mapnamesp[gamemap-1]) | 61 | #define HU_TITLEP (*mapnamesp[gamemap-1]) |
62 | #define HU_TITLET (mapnamest[gamemap-1]) | 62 | #define HU_TITLET (*mapnamest[gamemap-1]) |
63 | #define HU_TITLEHEIGHT 1 | 63 | #define HU_TITLEHEIGHT 1 |
64 | #define HU_TITLEX 0 | 64 | #define HU_TITLEX 0 |
65 | //jff 2/16/98 change 167 to ST_Y-1 | 65 | //jff 2/16/98 change 167 to ST_Y-1 |
@@ -131,16 +131,16 @@ const char* chat_macros[] = | |||
131 | // Ty 03/27/98 - *not* externalized | 131 | // Ty 03/27/98 - *not* externalized |
132 | // CPhipps - const char* | 132 | // CPhipps - const char* |
133 | { | 133 | { |
134 | HUSTR_CHATMACRO0, | ||
135 | HUSTR_CHATMACRO1, | 134 | HUSTR_CHATMACRO1, |
136 | HUSTR_CHATMACRO2, | 135 | HUSTR_CHATMACRO1, |
137 | HUSTR_CHATMACRO3, | 136 | HUSTR_CHATMACRO1, |
138 | HUSTR_CHATMACRO4, | 137 | HUSTR_CHATMACRO1, |
139 | HUSTR_CHATMACRO5, | 138 | HUSTR_CHATMACRO1, |
140 | HUSTR_CHATMACRO6, | 139 | HUSTR_CHATMACRO1, |
141 | HUSTR_CHATMACRO7, | 140 | HUSTR_CHATMACRO1, |
142 | HUSTR_CHATMACRO8, | 141 | HUSTR_CHATMACRO1, |
143 | HUSTR_CHATMACRO9 | 142 | HUSTR_CHATMACRO1, |
143 | HUSTR_CHATMACRO1 | ||
144 | }; | 144 | }; |
145 | 145 | ||
146 | const char* player_names[] = | 146 | const char* player_names[] = |
@@ -206,16 +206,16 @@ int hudcolor_list; // list of messages color | |||
206 | int hud_list_bgon; // enable for solid window background for message list | 206 | int hud_list_bgon; // enable for solid window background for message list |
207 | 207 | ||
208 | //jff 2/16/98 initialization strings for ammo, health, armor widgets | 208 | //jff 2/16/98 initialization strings for ammo, health, armor widgets |
209 | static char hud_coordstrx[32]; | 209 | static char *hud_coordstrx; |
210 | static char hud_coordstry[32]; | 210 | static char *hud_coordstry; |
211 | static char hud_coordstrz[32]; | 211 | static char *hud_coordstrz; |
212 | static char hud_ammostr[80]; | 212 | static char *hud_ammostr; |
213 | static char hud_healthstr[80]; | 213 | static char *hud_healthstr; |
214 | static char hud_armorstr[80]; | 214 | static char *hud_armorstr; |
215 | static char hud_weapstr[80]; | 215 | static char *hud_weapstr; |
216 | static char hud_keysstr[80]; | 216 | static char *hud_keysstr; |
217 | static char hud_gkeysstr[80]; //jff 3/7/98 add support for graphic key display | 217 | static char *hud_gkeysstr; //jff 3/7/98 add support for graphic key display |
218 | static char hud_monsecstr[80]; | 218 | static char *hud_monsecstr; |
219 | 219 | ||
220 | //jff 2/16/98 declaration of color switch points | 220 | //jff 2/16/98 declaration of color switch points |
221 | extern int ammo_red; | 221 | extern int ammo_red; |
@@ -234,175 +234,10 @@ extern int armor_green; | |||
234 | // Ty 03/27/98 - externalized map name arrays - now in d_deh.c | 234 | // Ty 03/27/98 - externalized map name arrays - now in d_deh.c |
235 | // and converted to arrays of pointers to char * | 235 | // and converted to arrays of pointers to char * |
236 | // See modified HUTITLEx macros | 236 | // See modified HUTITLEx macros |
237 | char* mapnames[] = // DOOM shareware/registered/retail (Ultimate) names. | 237 | extern char **mapnames[]; |
238 | { | 238 | extern char **mapnames2[]; |
239 | 239 | extern char **mapnamesp[]; | |
240 | HUSTR_E1M1, | 240 | extern char **mapnamest[]; |
241 | HUSTR_E1M2, | ||
242 | HUSTR_E1M3, | ||
243 | HUSTR_E1M4, | ||
244 | HUSTR_E1M5, | ||
245 | HUSTR_E1M6, | ||
246 | HUSTR_E1M7, | ||
247 | HUSTR_E1M8, | ||
248 | HUSTR_E1M9, | ||
249 | |||
250 | HUSTR_E2M1, | ||
251 | HUSTR_E2M2, | ||
252 | HUSTR_E2M3, | ||
253 | HUSTR_E2M4, | ||
254 | HUSTR_E2M5, | ||
255 | HUSTR_E2M6, | ||
256 | HUSTR_E2M7, | ||
257 | HUSTR_E2M8, | ||
258 | HUSTR_E2M9, | ||
259 | |||
260 | HUSTR_E3M1, | ||
261 | HUSTR_E3M2, | ||
262 | HUSTR_E3M3, | ||
263 | HUSTR_E3M4, | ||
264 | HUSTR_E3M5, | ||
265 | HUSTR_E3M6, | ||
266 | HUSTR_E3M7, | ||
267 | HUSTR_E3M8, | ||
268 | HUSTR_E3M9, | ||
269 | |||
270 | HUSTR_E4M1, | ||
271 | HUSTR_E4M2, | ||
272 | HUSTR_E4M3, | ||
273 | HUSTR_E4M4, | ||
274 | HUSTR_E4M5, | ||
275 | HUSTR_E4M6, | ||
276 | HUSTR_E4M7, | ||
277 | HUSTR_E4M8, | ||
278 | HUSTR_E4M9, | ||
279 | |||
280 | "NEWLEVEL", | ||
281 | "NEWLEVEL", | ||
282 | "NEWLEVEL", | ||
283 | "NEWLEVEL", | ||
284 | "NEWLEVEL", | ||
285 | "NEWLEVEL", | ||
286 | "NEWLEVEL", | ||
287 | "NEWLEVEL", | ||
288 | "NEWLEVEL" | ||
289 | }; | ||
290 | |||
291 | char* mapnames2[] = // DOOM 2 map names. | ||
292 | { | ||
293 | HUSTR_1, | ||
294 | HUSTR_2, | ||
295 | HUSTR_3, | ||
296 | HUSTR_4, | ||
297 | HUSTR_5, | ||
298 | HUSTR_6, | ||
299 | HUSTR_7, | ||
300 | HUSTR_8, | ||
301 | HUSTR_9, | ||
302 | HUSTR_10, | ||
303 | HUSTR_11, | ||
304 | |||
305 | HUSTR_12, | ||
306 | HUSTR_13, | ||
307 | HUSTR_14, | ||
308 | HUSTR_15, | ||
309 | HUSTR_16, | ||
310 | HUSTR_17, | ||
311 | HUSTR_18, | ||
312 | HUSTR_19, | ||
313 | HUSTR_20, | ||
314 | |||
315 | HUSTR_21, | ||
316 | HUSTR_22, | ||
317 | HUSTR_23, | ||
318 | HUSTR_24, | ||
319 | HUSTR_25, | ||
320 | HUSTR_26, | ||
321 | HUSTR_27, | ||
322 | HUSTR_28, | ||
323 | HUSTR_29, | ||
324 | HUSTR_30, | ||
325 | HUSTR_31, | ||
326 | HUSTR_32 | ||
327 | }; | ||
328 | |||
329 | |||
330 | char* mapnamesp[] = // Plutonia WAD map names. | ||
331 | { | ||
332 | PHUSTR_1, | ||
333 | PHUSTR_2, | ||
334 | PHUSTR_3, | ||
335 | PHUSTR_4, | ||
336 | PHUSTR_5, | ||
337 | PHUSTR_6, | ||
338 | PHUSTR_7, | ||
339 | PHUSTR_8, | ||
340 | PHUSTR_9, | ||
341 | PHUSTR_10, | ||
342 | PHUSTR_11, | ||
343 | |||
344 | PHUSTR_12, | ||
345 | PHUSTR_13, | ||
346 | PHUSTR_14, | ||
347 | PHUSTR_15, | ||
348 | PHUSTR_16, | ||
349 | PHUSTR_17, | ||
350 | PHUSTR_18, | ||
351 | PHUSTR_19, | ||
352 | PHUSTR_20, | ||
353 | |||
354 | PHUSTR_21, | ||
355 | PHUSTR_22, | ||
356 | PHUSTR_23, | ||
357 | PHUSTR_24, | ||
358 | PHUSTR_25, | ||
359 | PHUSTR_26, | ||
360 | PHUSTR_27, | ||
361 | PHUSTR_28, | ||
362 | PHUSTR_29, | ||
363 | PHUSTR_30, | ||
364 | PHUSTR_31, | ||
365 | PHUSTR_32 | ||
366 | }; | ||
367 | |||
368 | |||
369 | char *mapnamest[] = // TNT WAD map names. | ||
370 | { | ||
371 | THUSTR_1, | ||
372 | THUSTR_2, | ||
373 | THUSTR_3, | ||
374 | THUSTR_4, | ||
375 | THUSTR_5, | ||
376 | THUSTR_6, | ||
377 | THUSTR_7, | ||
378 | THUSTR_8, | ||
379 | THUSTR_9, | ||
380 | THUSTR_10, | ||
381 | THUSTR_11, | ||
382 | |||
383 | THUSTR_12, | ||
384 | THUSTR_13, | ||
385 | THUSTR_14, | ||
386 | THUSTR_15, | ||
387 | THUSTR_16, | ||
388 | THUSTR_17, | ||
389 | THUSTR_18, | ||
390 | THUSTR_19, | ||
391 | THUSTR_20, | ||
392 | |||
393 | THUSTR_21, | ||
394 | THUSTR_22, | ||
395 | THUSTR_23, | ||
396 | THUSTR_24, | ||
397 | THUSTR_25, | ||
398 | THUSTR_26, | ||
399 | THUSTR_27, | ||
400 | THUSTR_28, | ||
401 | THUSTR_29, | ||
402 | THUSTR_30, | ||
403 | THUSTR_31, | ||
404 | THUSTR_32 | ||
405 | }; | ||
406 | 241 | ||
407 | // key tables | 242 | // key tables |
408 | // jff 5/10/98 french support removed, | 243 | // jff 5/10/98 french support removed, |
@@ -466,6 +301,18 @@ void HU_Init(void) | |||
466 | 301 | ||
467 | shiftxform = english_shiftxform; | 302 | shiftxform = english_shiftxform; |
468 | 303 | ||
304 | // malloc all the strings, trying to get size down | ||
305 | hud_ammostr=malloc(80*sizeof(char)); | ||
306 | hud_healthstr=malloc(80*sizeof(char)); | ||
307 | hud_armorstr=malloc(80*sizeof(char)); | ||
308 | hud_weapstr=malloc(80*sizeof(char)); | ||
309 | hud_keysstr=malloc(80*sizeof(char)); | ||
310 | hud_gkeysstr=malloc(80*sizeof(char)); | ||
311 | hud_monsecstr=malloc(80*sizeof(char)); | ||
312 | hud_coordstrx=malloc(32*sizeof(char)); | ||
313 | hud_coordstry=malloc(32*sizeof(char)); | ||
314 | hud_coordstrz=malloc(32*sizeof(char)); | ||
315 | |||
469 | // load the heads-up font | 316 | // load the heads-up font |
470 | j = HU_FONTSTART; | 317 | j = HU_FONTSTART; |
471 | for (i=0;i<HU_FONTSIZE;i++,j++) | 318 | for (i=0;i<HU_FONTSIZE;i++,j++) |
@@ -768,15 +615,15 @@ void HU_Start(void) | |||
768 | 615 | ||
769 | // initialize the automaps coordinate widget | 616 | // initialize the automaps coordinate widget |
770 | //jff 3/3/98 split coordstr widget into 3 parts | 617 | //jff 3/3/98 split coordstr widget into 3 parts |
771 | snprintf(hud_coordstrx,sizeof(hud_coordstrx),"X: %d",0); //jff 2/22/98 added z | 618 | snprintf(hud_coordstrx,32*sizeof(char),"X: %d",0); //jff 2/22/98 added z |
772 | s = hud_coordstrx; | 619 | s = hud_coordstrx; |
773 | while (*s) | 620 | while (*s) |
774 | HUlib_addCharToTextLine(&w_coordx, *(s++)); | 621 | HUlib_addCharToTextLine(&w_coordx, *(s++)); |
775 | snprintf(hud_coordstry,sizeof(hud_coordstry),"Y: %d",0); //jff 3/3/98 split x,y,z | 622 | snprintf(hud_coordstry,32*sizeof(char),"Y: %d",0); //jff 3/3/98 split x,y,z |
776 | s = hud_coordstry; | 623 | s = hud_coordstry; |
777 | while (*s) | 624 | while (*s) |
778 | HUlib_addCharToTextLine(&w_coordy, *(s++)); | 625 | HUlib_addCharToTextLine(&w_coordy, *(s++)); |
779 | snprintf(hud_coordstrz,sizeof(hud_coordstrz),"Z: %d",0); //jff 3/3/98 split x,y,z | 626 | snprintf(hud_coordstrz,32*sizeof(char),"Z: %d",0); //jff 3/3/98 split x,y,z |
780 | s = hud_coordstrz; | 627 | s = hud_coordstrz; |
781 | while (*s) | 628 | while (*s) |
782 | HUlib_addCharToTextLine(&w_coordz, *(s++)); | 629 | HUlib_addCharToTextLine(&w_coordz, *(s++)); |
@@ -915,7 +762,7 @@ void HU_Drawer(void) | |||
915 | 762 | ||
916 | //jff 2/16/98 output new coord display | 763 | //jff 2/16/98 output new coord display |
917 | // x-coord | 764 | // x-coord |
918 | snprintf(hud_coordstrx,sizeof(hud_coordstrx),"X: %d", (plr->mo->x)>>FRACBITS); | 765 | snprintf(hud_coordstrx,32*sizeof(char),"X: %d", (plr->mo->x)>>FRACBITS); |
919 | HUlib_clearTextLine(&w_coordx); | 766 | HUlib_clearTextLine(&w_coordx); |
920 | s = hud_coordstrx; | 767 | s = hud_coordstrx; |
921 | while (*s) | 768 | while (*s) |
@@ -924,7 +771,7 @@ void HU_Drawer(void) | |||
924 | 771 | ||
925 | //jff 3/3/98 split coord display into x,y,z lines | 772 | //jff 3/3/98 split coord display into x,y,z lines |
926 | // y-coord | 773 | // y-coord |
927 | snprintf(hud_coordstry,sizeof(hud_coordstry),"Y: %d", (plr->mo->y)>>FRACBITS); | 774 | snprintf(hud_coordstry,32*sizeof(char),"Y: %d", (plr->mo->y)>>FRACBITS); |
928 | HUlib_clearTextLine(&w_coordy); | 775 | HUlib_clearTextLine(&w_coordy); |
929 | s = hud_coordstry; | 776 | s = hud_coordstry; |
930 | while (*s) | 777 | while (*s) |
@@ -934,7 +781,7 @@ void HU_Drawer(void) | |||
934 | //jff 3/3/98 split coord display into x,y,z lines | 781 | //jff 3/3/98 split coord display into x,y,z lines |
935 | //jff 2/22/98 added z | 782 | //jff 2/22/98 added z |
936 | // z-coord | 783 | // z-coord |
937 | snprintf(hud_coordstrz,sizeof(hud_coordstrz),"Z: %d", (plr->mo->z)>>FRACBITS); | 784 | snprintf(hud_coordstrz,32*sizeof(char),"Z: %d", (plr->mo->z)>>FRACBITS); |
938 | HUlib_clearTextLine(&w_coordz); | 785 | HUlib_clearTextLine(&w_coordz); |
939 | s = hud_coordstrz; | 786 | s = hud_coordstrz; |
940 | while (*s) | 787 | while (*s) |
@@ -1399,7 +1246,7 @@ void HU_Drawer(void) | |||
1399 | // build the init string with fixed colors | 1246 | // build the init string with fixed colors |
1400 | snprintf | 1247 | snprintf |
1401 | ( | 1248 | ( |
1402 | hud_monsecstr,sizeof(hud_monsecstr), | 1249 | hud_monsecstr,80*sizeof(char), |
1403 | "STS \x1b\x36K \x1b\x33%d \x1b\x36M \x1b\x33%d \x1b\x37I \x1b\x33%d/%d \x1b\x35S \x1b\x33%d/%d", | 1250 | "STS \x1b\x36K \x1b\x33%d \x1b\x36M \x1b\x33%d \x1b\x37I \x1b\x33%d/%d \x1b\x35S \x1b\x33%d/%d", |
1404 | plr->killcount,totallive, | 1251 | plr->killcount,totallive, |
1405 | plr->itemcount,totalitems, | 1252 | plr->itemcount,totalitems, |
diff --git a/apps/plugins/doom/hu_stuff.h b/apps/plugins/doom/hu_stuff.h index 76c6a90313..c0e927d4bb 100644 --- a/apps/plugins/doom/hu_stuff.h +++ b/apps/plugins/doom/hu_stuff.h | |||
@@ -84,9 +84,9 @@ extern int hud_displayed; /* hud is displayed */ | |||
84 | extern int hud_active; /* hud mode 0=off, 1=small, 2=full */ | 84 | extern int hud_active; /* hud mode 0=off, 1=small, 2=full */ |
85 | extern int hud_nosecrets; /* status does not list secrets/items/kills */ | 85 | extern int hud_nosecrets; /* status does not list secrets/items/kills */ |
86 | 86 | ||
87 | extern char* mapnames[]; | 87 | extern char **mapnames[]; |
88 | extern char* mapnames2[]; | 88 | extern char **mapnames2[]; |
89 | extern char* mapnamesp[]; | 89 | extern char **mapnamesp[]; |
90 | extern char* mapnamest[]; | 90 | extern char **mapnamest[]; |
91 | 91 | ||
92 | #endif | 92 | #endif |
diff --git a/apps/plugins/doom/i_sound.c b/apps/plugins/doom/i_sound.c index 641721a231..e2eeab0c3d 100644 --- a/apps/plugins/doom/i_sound.c +++ b/apps/plugins/doom/i_sound.c | |||
@@ -50,7 +50,7 @@ | |||
50 | // Needed for calling the actual sound output. | 50 | // Needed for calling the actual sound output. |
51 | #define SAMPLECOUNT 512 | 51 | #define SAMPLECOUNT 512 |
52 | 52 | ||
53 | #define NUM_CHANNELS 16 | 53 | #define NUM_CHANNELS 24 |
54 | // It is 2 for 16bit, and 2 for two channels. | 54 | // It is 2 for 16bit, and 2 for two channels. |
55 | #define BUFMUL 2 | 55 | #define BUFMUL 2 |
56 | #define MIXBUFFERSIZE (SAMPLECOUNT*BUFMUL) | 56 | #define MIXBUFFERSIZE (SAMPLECOUNT*BUFMUL) |
@@ -66,7 +66,7 @@ | |||
66 | // Basically, samples from all active internal channels | 66 | // Basically, samples from all active internal channels |
67 | // are modifed and added, and stored in the buffer | 67 | // are modifed and added, and stored in the buffer |
68 | // that is submitted to the audio device. | 68 | // that is submitted to the audio device. |
69 | signed short mixbuffer[MIXBUFFERSIZE]; | 69 | signed short *mixbuffer; |
70 | /* Don't place this in IRAM! | 70 | /* Don't place this in IRAM! |
71 | * Sound playback uses DMA, and not all IRAM is DMA capable on coldfire. */ | 71 | * Sound playback uses DMA, and not all IRAM is DMA capable on coldfire. */ |
72 | 72 | ||
@@ -97,7 +97,7 @@ channel_info_t channelinfo[NUM_CHANNELS] IBSS_ATTR; | |||
97 | 97 | ||
98 | int *vol_lookup; // Volume lookups. | 98 | int *vol_lookup; // Volume lookups. |
99 | 99 | ||
100 | int steptable[256]; // Pitch to stepping lookup. (Not setup properly right now) | 100 | int *steptable; // Pitch to stepping lookup. (Not setup properly right now) |
101 | 101 | ||
102 | // | 102 | // |
103 | // This function loads the sound data from the WAD lump for single sound. | 103 | // This function loads the sound data from the WAD lump for single sound. |
@@ -501,6 +501,9 @@ void I_InitSound() | |||
501 | 501 | ||
502 | vol_lookup=malloc(128*256*sizeof(int)); | 502 | vol_lookup=malloc(128*256*sizeof(int)); |
503 | 503 | ||
504 | mixbuffer=malloc(MIXBUFFERSIZE*sizeof(short)); | ||
505 | steptable=malloc(256*sizeof(int)); | ||
506 | |||
504 | for (i=1 ; i<NUMSFX ; i++) | 507 | for (i=1 ; i<NUMSFX ; i++) |
505 | { | 508 | { |
506 | if (!S_sfx[i].link) // Alias? Example is the chaingun sound linked to pistol. | 509 | if (!S_sfx[i].link) // Alias? Example is the chaingun sound linked to pistol. |
diff --git a/apps/plugins/doom/i_video.c b/apps/plugins/doom/i_video.c index 0e9d20f8cf..0ddede09fa 100644 --- a/apps/plugins/doom/i_video.c +++ b/apps/plugins/doom/i_video.c | |||
@@ -16,7 +16,10 @@ | |||
16 | * GNU General Public License for more details. | 16 | * GNU General Public License for more details. |
17 | * | 17 | * |
18 | * $Log$ | 18 | * $Log$ |
19 | * Revision 1.25 2006/10/26 13:38:04 barrywardell | 19 | * Revision 1.26 2006/12/13 04:44:17 kkurbjun |
20 | * Dehacked and BEX support for Doom - currently only supports a DEHACKED file in a WAD (not as a standalone file yet). | ||
21 | * | ||
22 | * Revision 1.25 2006-10-26 13:38:04 barrywardell | ||
20 | * Allow the Sansa e200 UI simulator to be built. Thanks to Andre Smith for the nice image of the Sansa. Lots more to be done including testing and tweaking the keymaps and modifying the plugins for the Sansa's 176x220 LCD. | 23 | * Allow the Sansa e200 UI simulator to be built. Thanks to Andre Smith for the nice image of the Sansa. Lots more to be done including testing and tweaking the keymaps and modifying the plugins for the Sansa's 176x220 LCD. |
21 | * | 24 | * |
22 | * Revision 1.24 2006-09-05 00:23:06 barrywardell | 25 | * Revision 1.24 2006-09-05 00:23:06 barrywardell |
@@ -418,45 +421,45 @@ void I_FinishUpdate (void) | |||
418 | #if (CONFIG_LCD == LCD_H300) && !defined(SIMULATOR) | 421 | #if (CONFIG_LCD == LCD_H300) && !defined(SIMULATOR) |
419 | 422 | ||
420 | #if 1 | 423 | #if 1 |
421 | /* ASM screen update (drops 600 tics (100 asm)) */ | 424 | /* ASM screen update (drops 200 tics (100 asm)) */ |
422 | asm ( | 425 | asm ( |
423 | "move.w #33,(%[LCD]) \n" /* Setup the LCD controller */ | 426 | "move.w #33,(%[LCD]) \n" /* Setup the LCD controller */ |
424 | "clr.w (%[LCD2]) \n" | 427 | "clr.w (%[LCD2]) \n" |
425 | "move.w #34,(%[LCD]) \n" /* End LCD controller setup */ | 428 | "move.w #34,(%[LCD]) \n" /* End LCD controller setup */ |
426 | "move.l #220,%%d0 \n" | 429 | "clr.l %%d1 \n" |
427 | "move.l #176,%%d1 \n" | 430 | "clr.l %%d0 \n" |
428 | "clr.l %%d3 \n" | ||
429 | "clr.l %%d2 \n" | ||
430 | "widthloop: \n" | 431 | "widthloop: \n" |
431 | "move.l (%[screenptr])+, %%d2 \n" | 432 | "move.l (%[screenptr])+, %%d0 \n" |
432 | "swap.w %%d2 \n" | 433 | "swap.w %%d0 \n" |
433 | "move.w %%d2, %%d3 \n" | 434 | "move.w %%d0, %%d1 \n" |
434 | "lsr.l #8,%%d3 \n" | 435 | "lsr.l #8,%%d1 \n" |
435 | "move.w (%[palette], %%d3.l:2), (%[LCD2]) \n" | 436 | "move.w (%[palette], %%d1.l:2), (%[LCD2]) \n" |
436 | "move.b %%d2,%%d3 \n" | 437 | "move.b %%d0,%%d1 \n" |
437 | "move.w (%[palette], %%d3.l:2), (%[LCD2]) \n" | 438 | "move.w (%[palette], %%d1.l:2), (%[LCD2]) \n" |
438 | "swap.w %%d2 \n" | 439 | "swap.w %%d0 \n" |
439 | "move.w %%d2, %%d3 \n" | 440 | "move.w %%d0, %%d1 \n" |
440 | "lsr.l #8,%%d3 \n" | 441 | "lsr.l #8,%%d1 \n" |
441 | "move.w (%[palette], %%d3.l:2), (%[LCD2]) \n" | 442 | "move.w (%[palette], %%d1.l:2), (%[LCD2]) \n" |
442 | "move.b %%d2,%%d3 \n" | 443 | "move.b %%d0,%%d1 \n" |
443 | "move.w (%[palette], %%d3.l:2), (%[LCD2]) \n" | 444 | "move.w (%[palette], %%d1.l:2), (%[LCD2]) \n" |
444 | "subq.l #4,%%d0 \n" | 445 | "subq.l #4,%[WIDTH] \n" |
445 | "bne widthloop \n" | 446 | "bne widthloop \n" |
446 | "move.w #220,%%d0 \n" | 447 | "move.w #220,%[WIDTH] \n" |
447 | "subq.l #1,%%d1 \n" | 448 | "subq.l #1,%[HEIGHT] \n" |
448 | "bne widthloop \n" | 449 | "bne widthloop \n" |
449 | : /* outputs */ | 450 | : /* outputs */ |
450 | : /* inputs */ | 451 | : /* inputs */ |
451 | [screenptr] "a" (d_screens[0]), | 452 | [screenptr] "a" (d_screens[0]), |
452 | [palette] "a" (palette), | 453 | [palette] "a" (palette), |
453 | [LCD] "a" (0xf0000000), | 454 | [LCD] "a" (0xf0000000), |
454 | [LCD2] "a" (0xf0000002) | 455 | [LCD2] "a" (0xf0000002), |
456 | [WIDTH] "d" (220), | ||
457 | [HEIGHT] "d" (176) | ||
455 | : /* clobbers */ | 458 | : /* clobbers */ |
456 | "d0", "d1", "d2", "d3" | 459 | "d0", "d1" |
457 | ); | 460 | ); |
458 | #else | 461 | #else |
459 | /* C version of above (drops 500 tics) */ | 462 | /* C version of above (drops 100 tics) */ |
460 | 463 | ||
461 | // Start the write | 464 | // Start the write |
462 | *(volatile unsigned short *) 0xf0000000 = 0x21; // register | 465 | *(volatile unsigned short *) 0xf0000000 = 0x21; // register |
@@ -464,37 +467,29 @@ void I_FinishUpdate (void) | |||
464 | *(volatile unsigned short *) 0xf0000000 = 0x22; // GRAM | 467 | *(volatile unsigned short *) 0xf0000000 = 0x22; // GRAM |
465 | 468 | ||
466 | unsigned char *screenptr=d_screens[0]; | 469 | unsigned char *screenptr=d_screens[0]; |
467 | int wcnt=0, hcnt=0; | 470 | int hcnt=LCD_HEIGHT*LCD_WIDTH; |
468 | 471 | ||
469 | while(hcnt<LCD_HEIGHT) | 472 | while(hcnt--) |
470 | { | 473 | { |
471 | while(wcnt<LCD_WIDTH) | 474 | *(volatile unsigned short *)0xf0000002 = palette[*screenptr]; |
472 | { | 475 | screenptr++; |
473 | *(volatile unsigned short *)0xf0000002 = palette[*screenptr]; | ||
474 | screenptr++; | ||
475 | wcnt++; | ||
476 | } | ||
477 | wcnt=0; | ||
478 | hcnt++; | ||
479 | } | 476 | } |
480 | #endif | 477 | #endif |
481 | 478 | ||
482 | #else | 479 | #else |
483 | unsigned char paletteIndex; | 480 | unsigned char paletteIndex; |
484 | int x, y; | 481 | int y; |
485 | 482 | ||
486 | #ifdef HAVE_LCD_COLOR | 483 | #ifdef HAVE_LCD_COLOR |
487 | for (y = 0; y < LCD_HEIGHT; y++) | 484 | |
485 | for (y = 0; y < LCD_HEIGHT*LCD_WIDTH; y++) | ||
488 | { | 486 | { |
489 | for (x = 0; x < LCD_WIDTH; x++) | 487 | paletteIndex = d_screens[0][y]; |
490 | { | 488 | rb->lcd_framebuffer[y] = palette[paletteIndex]; |
491 | paletteIndex = d_screens[0][y*SCREENWIDTH + x]; | ||
492 | rb->lcd_framebuffer[y * LCD_WIDTH + x] = palette[paletteIndex]; | ||
493 | } | ||
494 | } | 489 | } |
495 | rb->lcd_update(); | 490 | rb->lcd_update(); |
496 | #else /* !HAVE_LCD_COLOR */ | 491 | #else /* !HAVE_LCD_COLOR */ |
497 | int yd = 0; | 492 | int x, yd = 0; |
498 | 493 | ||
499 | for (y = 0; y < LCD_HEIGHT; y++) | 494 | for (y = 0; y < LCD_HEIGHT; y++) |
500 | { | 495 | { |
diff --git a/apps/plugins/doom/m_menu.c b/apps/plugins/doom/m_menu.c index 415ca0852e..14d8474cbf 100644 --- a/apps/plugins/doom/m_menu.c +++ b/apps/plugins/doom/m_menu.c | |||
@@ -16,7 +16,10 @@ | |||
16 | // GNU General Public License for more details. | 16 | // GNU General Public License for more details. |
17 | // | 17 | // |
18 | // $Log$ | 18 | // $Log$ |
19 | // Revision 1.6 2006/04/16 23:14:04 kkurbjun | 19 | // Revision 1.7 2006/12/13 04:44:17 kkurbjun |
20 | // Dehacked and BEX support for Doom - currently only supports a DEHACKED file in a WAD (not as a standalone file yet). | ||
21 | // | ||
22 | // Revision 1.6 2006-04-16 23:14:04 kkurbjun | ||
20 | // Fix run so that it stays enabled across level loads. Removed some unused code and added some back in for hopeful future use. | 23 | // Fix run so that it stays enabled across level loads. Removed some unused code and added some back in for hopeful future use. |
21 | // | 24 | // |
22 | // Revision 1.5 2006-04-04 23:58:37 kkurbjun | 25 | // Revision 1.5 2006-04-04 23:58:37 kkurbjun |
@@ -53,7 +56,7 @@ | |||
53 | #include "w_wad.h" | 56 | #include "w_wad.h" |
54 | 57 | ||
55 | #include "r_main.h" | 58 | #include "r_main.h" |
56 | 59 | #include "d_deh.h" | |
57 | #include "hu_stuff.h" | 60 | #include "hu_stuff.h" |
58 | 61 | ||
59 | #include "g_game.h" | 62 | #include "g_game.h" |
@@ -96,7 +99,7 @@ int quickSaveSlot; | |||
96 | // 1 = message to be printed | 99 | // 1 = message to be printed |
97 | int messageToPrint; | 100 | int messageToPrint; |
98 | // ...and here is the message string! | 101 | // ...and here is the message string! |
99 | char* messageString; | 102 | const char* messageString; |
100 | 103 | ||
101 | // message x & y | 104 | // message x & y |
102 | int messx; | 105 | int messx; |
@@ -110,15 +113,6 @@ void (*messageRoutine)(int response); | |||
110 | 113 | ||
111 | #define SAVESTRINGSIZE 24 | 114 | #define SAVESTRINGSIZE 24 |
112 | 115 | ||
113 | char gammamsg[5][26] = | ||
114 | { | ||
115 | GAMMALVL0, | ||
116 | GAMMALVL1, | ||
117 | GAMMALVL2, | ||
118 | GAMMALVL3, | ||
119 | GAMMALVL4 | ||
120 | }; | ||
121 | |||
122 | // we are going to be entering a savegame string | 116 | // we are going to be entering a savegame string |
123 | int saveStringEnter; | 117 | int saveStringEnter; |
124 | int saveSlot; // which slot to save in | 118 | int saveSlot; // which slot to save in |
@@ -233,7 +227,7 @@ void M_WriteText(int x, int y, char *string); | |||
233 | int M_StringWidth(const char* string); | 227 | int M_StringWidth(const char* string); |
234 | int M_StringHeight(const char* string); | 228 | int M_StringHeight(const char* string); |
235 | void M_StartControlPanel(void); | 229 | void M_StartControlPanel(void); |
236 | void M_StartMessage(char *string,void *routine,boolean input); | 230 | void M_StartMessage(const char *string,void *routine,boolean input); |
237 | void M_StopMessage(void); | 231 | void M_StopMessage(void); |
238 | void M_ClearMenus (void); | 232 | void M_ClearMenus (void); |
239 | 233 | ||
@@ -657,11 +651,11 @@ void M_SaveSelect(int choice) | |||
657 | saveSlot = choice; | 651 | saveSlot = choice; |
658 | snprintf(savegamestrings[choice], sizeof(savegamestrings[choice]), | 652 | snprintf(savegamestrings[choice], sizeof(savegamestrings[choice]), |
659 | (gamemode==shareware||gamemode==registered||gamemode==retail) ? | 653 | (gamemode==shareware||gamemode==registered||gamemode==retail) ? |
660 | mapnames[(gameepisode-1)*9+gamemap-1] : (gamemission==doom2) ? | 654 | *mapnames[(gameepisode-1)*9+gamemap-1] : (gamemission==doom2) ? |
661 | mapnames2[gamemap-1] : (gamemission==pack_plut) ? | 655 | *mapnames2[gamemap-1] : (gamemission==pack_plut) ? |
662 | mapnamesp[gamemap-1] : (gamemission==pack_tnt) ? | 656 | *mapnamesp[gamemap-1] : (gamemission==pack_tnt) ? |
663 | mapnamest[gamemap-1] : "Unknown Location", choice); | 657 | *mapnamest[gamemap-1] : "Unknown Location", choice); |
664 | if (!strcmp(savegamestrings[choice],EMPTYSTRING)) | 658 | if (!strcmp(savegamestrings[choice],s_EMPTYSTRING)) |
665 | savegamestrings[choice][0] = 0; | 659 | savegamestrings[choice][0] = 0; |
666 | saveCharIndex = strlen(savegamestrings[choice]); | 660 | saveCharIndex = strlen(savegamestrings[choice]); |
667 | } | 661 | } |
@@ -674,7 +668,7 @@ void M_SaveGame (int choice) | |||
674 | (void)choice; | 668 | (void)choice; |
675 | if (!usergame) | 669 | if (!usergame) |
676 | { | 670 | { |
677 | M_StartMessage(SAVEDEAD,NULL,false); | 671 | M_StartMessage(s_SAVEDEAD,NULL,false); |
678 | return; | 672 | return; |
679 | } | 673 | } |
680 | 674 | ||
@@ -722,7 +716,7 @@ void M_QuickSave(void) | |||
722 | quickSaveSlot = -2; // means to pick a slot now | 716 | quickSaveSlot = -2; // means to pick a slot now |
723 | return; | 717 | return; |
724 | } | 718 | } |
725 | snprintf(tempstring,sizeof(tempstring),QSPROMPT,savegamestrings[quickSaveSlot]); | 719 | snprintf(tempstring,sizeof(tempstring),s_QSPROMPT,savegamestrings[quickSaveSlot]); |
726 | M_StartMessage(tempstring,M_QuickSaveResponse,true); | 720 | M_StartMessage(tempstring,M_QuickSaveResponse,true); |
727 | } | 721 | } |
728 | 722 | ||
@@ -917,7 +911,7 @@ void M_NewGame(int choice) | |||
917 | (void) choice; | 911 | (void) choice; |
918 | if (netgame && !demoplayback) | 912 | if (netgame && !demoplayback) |
919 | { | 913 | { |
920 | M_StartMessage(NEWGAME,NULL,false); | 914 | M_StartMessage(s_NEWGAME,NULL,false); |
921 | return; | 915 | return; |
922 | } | 916 | } |
923 | 917 | ||
@@ -952,7 +946,7 @@ void M_ChooseSkill(int choice) | |||
952 | { | 946 | { |
953 | if (choice == nightmare) | 947 | if (choice == nightmare) |
954 | { | 948 | { |
955 | M_StartMessage(NIGHTMARE,M_VerifyNightmare,true); | 949 | M_StartMessage(s_NIGHTMARE,M_VerifyNightmare,true); |
956 | return; | 950 | return; |
957 | } | 951 | } |
958 | 952 | ||
@@ -969,7 +963,7 @@ void M_Episode(int choice) | |||
969 | if ( (gamemode == shareware) | 963 | if ( (gamemode == shareware) |
970 | && choice) | 964 | && choice) |
971 | { | 965 | { |
972 | M_StartMessage(SWSTRING,NULL,false); | 966 | M_StartMessage(s_SWSTRING,NULL,false); // Ty 03/27/98 - externalized |
973 | M_SetupNextMenu(&ReadDef1); | 967 | M_SetupNextMenu(&ReadDef1); |
974 | return; | 968 | return; |
975 | } | 969 | } |
@@ -1030,9 +1024,9 @@ void M_ChangeMessages(int choice) | |||
1030 | showMessages = 1 - showMessages; | 1024 | showMessages = 1 - showMessages; |
1031 | 1025 | ||
1032 | if (!showMessages) | 1026 | if (!showMessages) |
1033 | players[consoleplayer].message = MSGOFF; | 1027 | players[consoleplayer].message = s_MSGOFF; |
1034 | else | 1028 | else |
1035 | players[consoleplayer].message = MSGON ; | 1029 | players[consoleplayer].message = s_MSGON ; |
1036 | 1030 | ||
1037 | message_dontfuckwithme = true; | 1031 | message_dontfuckwithme = true; |
1038 | } | 1032 | } |
@@ -1066,11 +1060,11 @@ void M_EndGame(int choice) | |||
1066 | 1060 | ||
1067 | if (netgame) | 1061 | if (netgame) |
1068 | { | 1062 | { |
1069 | M_StartMessage(NETEND,NULL,false); | 1063 | M_StartMessage(s_NETEND,NULL,false); |
1070 | return; | 1064 | return; |
1071 | } | 1065 | } |
1072 | 1066 | ||
1073 | M_StartMessage(ENDGAME,M_EndGameResponse,true); | 1067 | M_StartMessage(s_ENDGAME,M_EndGameResponse,true); |
1074 | } | 1068 | } |
1075 | 1069 | ||
1076 | 1070 | ||
@@ -1153,9 +1147,9 @@ void M_QuitDOOM(int choice) | |||
1153 | // We pick index 0 which is language sensitive, | 1147 | // We pick index 0 which is language sensitive, |
1154 | // or one at random, between 1 and maximum number. | 1148 | // or one at random, between 1 and maximum number. |
1155 | if (language != english ) | 1149 | if (language != english ) |
1156 | snprintf(endstring,sizeof(endstring),"%s\n\n"DOSY, endmsg[0] ); | 1150 | snprintf(endstring,sizeof(endstring),"%s\n\n%s",s_DOSY, endmsg[0] ); |
1157 | else | 1151 | else |
1158 | snprintf(endstring,sizeof(endstring),"%s\n\n%s", endmsg[gametic%(NUM_QUITMESSAGES-1)+1], DOSY); | 1152 | snprintf(endstring,sizeof(endstring),"%s\n\n%s", endmsg[gametic%(NUM_QUITMESSAGES-1)+1], s_DOSY); |
1159 | 1153 | ||
1160 | M_StartMessage(endstring,M_QuitResponse,true); | 1154 | M_StartMessage(endstring,M_QuitResponse,true); |
1161 | } | 1155 | } |
@@ -1256,7 +1250,7 @@ M_DrawSelCell | |||
1256 | 1250 | ||
1257 | void | 1251 | void |
1258 | M_StartMessage | 1252 | M_StartMessage |
1259 | ( char* string, | 1253 | ( const char* string, |
1260 | void* routine, | 1254 | void* routine, |
1261 | boolean input ) | 1255 | boolean input ) |
1262 | { | 1256 | { |
diff --git a/apps/plugins/doom/p_doors.c b/apps/plugins/doom/p_doors.c index 9d8f28cd7a..0b6d777e17 100644 --- a/apps/plugins/doom/p_doors.c +++ b/apps/plugins/doom/p_doors.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #include "sounds.h" | 36 | #include "sounds.h" |
37 | #include "r_main.h" | 37 | #include "r_main.h" |
38 | #include "dstrings.h" | 38 | #include "dstrings.h" |
39 | //#include "d_deh.h" // Ty 03/27/98 - externalized | 39 | #include "d_deh.h" // Ty 03/27/98 - externalized |
40 | 40 | ||
41 | #include "rockmacros.h" | 41 | #include "rockmacros.h" |
42 | 42 | ||
@@ -295,7 +295,7 @@ int EV_DoLockedDoor | |||
295 | case 133: | 295 | case 133: |
296 | if (!p->cards[it_bluecard] && !p->cards[it_blueskull]) | 296 | if (!p->cards[it_bluecard] && !p->cards[it_blueskull]) |
297 | { | 297 | { |
298 | p->message = PD_BLUEO; // Ty 03/27/98 - externalized | 298 | p->message = s_PD_BLUEO; // Ty 03/27/98 - externalized |
299 | S_StartSound(p->mo,sfx_oof); // killough 3/20/98 | 299 | S_StartSound(p->mo,sfx_oof); // killough 3/20/98 |
300 | return 0; | 300 | return 0; |
301 | } | 301 | } |
@@ -305,7 +305,7 @@ int EV_DoLockedDoor | |||
305 | case 135: | 305 | case 135: |
306 | if (!p->cards[it_redcard] && !p->cards[it_redskull]) | 306 | if (!p->cards[it_redcard] && !p->cards[it_redskull]) |
307 | { | 307 | { |
308 | p->message = PD_REDO; // Ty 03/27/98 - externalized | 308 | p->message = s_PD_REDO; // Ty 03/27/98 - externalized |
309 | S_StartSound(p->mo,sfx_oof); // killough 3/20/98 | 309 | S_StartSound(p->mo,sfx_oof); // killough 3/20/98 |
310 | return 0; | 310 | return 0; |
311 | } | 311 | } |
@@ -315,7 +315,7 @@ int EV_DoLockedDoor | |||
315 | case 137: | 315 | case 137: |
316 | if (!p->cards[it_yellowcard] && !p->cards[it_yellowskull]) | 316 | if (!p->cards[it_yellowcard] && !p->cards[it_yellowskull]) |
317 | { | 317 | { |
318 | p->message = PD_YELLOWO; // Ty 03/27/98 - externalized | 318 | p->message = s_PD_YELLOWO; // Ty 03/27/98 - externalized |
319 | S_StartSound(p->mo,sfx_oof); // killough 3/20/98 | 319 | S_StartSound(p->mo,sfx_oof); // killough 3/20/98 |
320 | return 0; | 320 | return 0; |
321 | } | 321 | } |
@@ -449,7 +449,7 @@ int EV_VerticalDoor | |||
449 | return 0; | 449 | return 0; |
450 | if (!player->cards[it_bluecard] && !player->cards[it_blueskull]) | 450 | if (!player->cards[it_bluecard] && !player->cards[it_blueskull]) |
451 | { | 451 | { |
452 | player->message = PD_BLUEK; // Ty 03/27/98 - externalized | 452 | player->message = s_PD_BLUEK; // Ty 03/27/98 - externalized |
453 | S_StartSound(player->mo,sfx_oof); // killough 3/20/98 | 453 | S_StartSound(player->mo,sfx_oof); // killough 3/20/98 |
454 | return 0; | 454 | return 0; |
455 | } | 455 | } |
@@ -461,7 +461,7 @@ int EV_VerticalDoor | |||
461 | return 0; | 461 | return 0; |
462 | if (!player->cards[it_yellowcard] && !player->cards[it_yellowskull]) | 462 | if (!player->cards[it_yellowcard] && !player->cards[it_yellowskull]) |
463 | { | 463 | { |
464 | player->message = PD_YELLOWK; // Ty 03/27/98 - externalized | 464 | player->message = s_PD_YELLOWK; // Ty 03/27/98 - externalized |
465 | S_StartSound(player->mo,sfx_oof); // killough 3/20/98 | 465 | S_StartSound(player->mo,sfx_oof); // killough 3/20/98 |
466 | return 0; | 466 | return 0; |
467 | } | 467 | } |
@@ -473,7 +473,7 @@ int EV_VerticalDoor | |||
473 | return 0; | 473 | return 0; |
474 | if (!player->cards[it_redcard] && !player->cards[it_redskull]) | 474 | if (!player->cards[it_redcard] && !player->cards[it_redskull]) |
475 | { | 475 | { |
476 | player->message = PD_REDK; // Ty 03/27/98 - externalized | 476 | player->message = s_PD_REDK; // Ty 03/27/98 - externalized |
477 | S_StartSound(player->mo,sfx_oof); // killough 3/20/98 | 477 | S_StartSound(player->mo,sfx_oof); // killough 3/20/98 |
478 | return 0; | 478 | return 0; |
479 | } | 479 | } |
diff --git a/apps/plugins/doom/p_inter.c b/apps/plugins/doom/p_inter.c index f4a0f80c8f..9a34af1358 100644 --- a/apps/plugins/doom/p_inter.c +++ b/apps/plugins/doom/p_inter.c | |||
@@ -36,9 +36,10 @@ | |||
36 | #include "r_main.h" | 36 | #include "r_main.h" |
37 | #include "s_sound.h" | 37 | #include "s_sound.h" |
38 | #include "sounds.h" | 38 | #include "sounds.h" |
39 | //#include "d_deh.h" // Ty 03/22/98 - externalized strings | 39 | #include "d_deh.h" // Ty 03/22/98 - externalized strings |
40 | #include "p_tick.h" | 40 | #include "p_tick.h" |
41 | #include "i_system.h" | 41 | #include "i_system.h" |
42 | |||
42 | #include "p_inter.h" | 43 | #include "p_inter.h" |
43 | #include "p_enemy.h" | 44 | #include "p_enemy.h" |
44 | 45 | ||
@@ -315,13 +316,13 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher) | |||
315 | case SPR_ARM1: | 316 | case SPR_ARM1: |
316 | if (!P_GiveArmor (player, green_armor_class)) | 317 | if (!P_GiveArmor (player, green_armor_class)) |
317 | return; | 318 | return; |
318 | player->message = GOTARMOR; // Ty 03/22/98 - externalized | 319 | player->message = s_GOTARMOR; // Ty 03/22/98 - externalized |
319 | break; | 320 | break; |
320 | 321 | ||
321 | case SPR_ARM2: | 322 | case SPR_ARM2: |
322 | if (!P_GiveArmor (player, blue_armor_class)) | 323 | if (!P_GiveArmor (player, blue_armor_class)) |
323 | return; | 324 | return; |
324 | player->message = GOTMEGA; // Ty 03/22/98 - externalized | 325 | player->message = s_GOTMEGA; // Ty 03/22/98 - externalized |
325 | break; | 326 | break; |
326 | 327 | ||
327 | // bonus items | 328 | // bonus items |
@@ -330,7 +331,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher) | |||
330 | if (player->health > (maxhealth * 2)) | 331 | if (player->health > (maxhealth * 2)) |
331 | player->health = (maxhealth * 2); | 332 | player->health = (maxhealth * 2); |
332 | player->mo->health = player->health; | 333 | player->mo->health = player->health; |
333 | player->message = GOTHTHBONUS; // Ty 03/22/98 - externalized | 334 | player->message = s_GOTHTHBONUS; // Ty 03/22/98 - externalized |
334 | break; | 335 | break; |
335 | 336 | ||
336 | case SPR_BON2: | 337 | case SPR_BON2: |
@@ -339,7 +340,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher) | |||
339 | player->armorpoints = max_armor; | 340 | player->armorpoints = max_armor; |
340 | if (!player->armortype) | 341 | if (!player->armortype) |
341 | player->armortype = green_armor_class; | 342 | player->armortype = green_armor_class; |
342 | player->message = GOTARMBONUS; // Ty 03/22/98 - externalized | 343 | player->message = s_GOTARMBONUS; // Ty 03/22/98 - externalized |
343 | break; | 344 | break; |
344 | 345 | ||
345 | case SPR_SOUL: | 346 | case SPR_SOUL: |
@@ -347,7 +348,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher) | |||
347 | if (player->health > max_soul) | 348 | if (player->health > max_soul) |
348 | player->health = max_soul; | 349 | player->health = max_soul; |
349 | player->mo->health = player->health; | 350 | player->mo->health = player->health; |
350 | player->message = GOTSUPER; // Ty 03/22/98 - externalized | 351 | player->message = s_GOTSUPER; // Ty 03/22/98 - externalized |
351 | sound = sfx_getpow; | 352 | sound = sfx_getpow; |
352 | break; | 353 | break; |
353 | 354 | ||
@@ -357,7 +358,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher) | |||
357 | player->health = mega_health; | 358 | player->health = mega_health; |
358 | player->mo->health = player->health; | 359 | player->mo->health = player->health; |
359 | P_GiveArmor (player,blue_armor_class); | 360 | P_GiveArmor (player,blue_armor_class); |
360 | player->message = GOTMSPHERE; // Ty 03/22/98 - externalized | 361 | player->message = s_GOTMSPHERE; // Ty 03/22/98 - externalized |
361 | sound = sfx_getpow; | 362 | sound = sfx_getpow; |
362 | break; | 363 | break; |
363 | 364 | ||
@@ -365,7 +366,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher) | |||
365 | // leave cards for everyone | 366 | // leave cards for everyone |
366 | case SPR_BKEY: | 367 | case SPR_BKEY: |
367 | if (!player->cards[it_bluecard]) | 368 | if (!player->cards[it_bluecard]) |
368 | player->message = GOTBLUECARD; // Ty 03/22/98 - externalized | 369 | player->message = s_GOTBLUECARD; // Ty 03/22/98 - externalized |
369 | P_GiveCard (player, it_bluecard); | 370 | P_GiveCard (player, it_bluecard); |
370 | if (!netgame) | 371 | if (!netgame) |
371 | break; | 372 | break; |
@@ -373,7 +374,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher) | |||
373 | 374 | ||
374 | case SPR_YKEY: | 375 | case SPR_YKEY: |
375 | if (!player->cards[it_yellowcard]) | 376 | if (!player->cards[it_yellowcard]) |
376 | player->message = GOTYELWCARD; // Ty 03/22/98 - externalized | 377 | player->message = s_GOTYELWCARD; // Ty 03/22/98 - externalized |
377 | P_GiveCard (player, it_yellowcard); | 378 | P_GiveCard (player, it_yellowcard); |
378 | if (!netgame) | 379 | if (!netgame) |
379 | break; | 380 | break; |
@@ -381,7 +382,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher) | |||
381 | 382 | ||
382 | case SPR_RKEY: | 383 | case SPR_RKEY: |
383 | if (!player->cards[it_redcard]) | 384 | if (!player->cards[it_redcard]) |
384 | player->message = GOTREDCARD; // Ty 03/22/98 - externalized | 385 | player->message = s_GOTREDCARD; // Ty 03/22/98 - externalized |
385 | P_GiveCard (player, it_redcard); | 386 | P_GiveCard (player, it_redcard); |
386 | if (!netgame) | 387 | if (!netgame) |
387 | break; | 388 | break; |
@@ -389,7 +390,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher) | |||
389 | 390 | ||
390 | case SPR_BSKU: | 391 | case SPR_BSKU: |
391 | if (!player->cards[it_blueskull]) | 392 | if (!player->cards[it_blueskull]) |
392 | player->message = GOTBLUESKUL; // Ty 03/22/98 - externalized | 393 | player->message = s_GOTBLUESKUL; // Ty 03/22/98 - externalized |
393 | P_GiveCard (player, it_blueskull); | 394 | P_GiveCard (player, it_blueskull); |
394 | if (!netgame) | 395 | if (!netgame) |
395 | break; | 396 | break; |
@@ -397,7 +398,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher) | |||
397 | 398 | ||
398 | case SPR_YSKU: | 399 | case SPR_YSKU: |
399 | if (!player->cards[it_yellowskull]) | 400 | if (!player->cards[it_yellowskull]) |
400 | player->message = GOTYELWSKUL; // Ty 03/22/98 - externalized | 401 | player->message = s_GOTYELWSKUL; // Ty 03/22/98 - externalized |
401 | P_GiveCard (player, it_yellowskull); | 402 | P_GiveCard (player, it_yellowskull); |
402 | if (!netgame) | 403 | if (!netgame) |
403 | break; | 404 | break; |
@@ -405,7 +406,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher) | |||
405 | 406 | ||
406 | case SPR_RSKU: | 407 | case SPR_RSKU: |
407 | if (!player->cards[it_redskull]) | 408 | if (!player->cards[it_redskull]) |
408 | player->message = GOTREDSKULL; // Ty 03/22/98 - externalized | 409 | player->message = s_GOTREDSKULL; // Ty 03/22/98 - externalized |
409 | P_GiveCard (player, it_redskull); | 410 | P_GiveCard (player, it_redskull); |
410 | if (!netgame) | 411 | if (!netgame) |
411 | break; | 412 | break; |
@@ -415,7 +416,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher) | |||
415 | case SPR_STIM: | 416 | case SPR_STIM: |
416 | if (!P_GiveBody (player, 10)) | 417 | if (!P_GiveBody (player, 10)) |
417 | return; | 418 | return; |
418 | player->message = GOTSTIM; // Ty 03/22/98 - externalized | 419 | player->message = s_GOTSTIM; // Ty 03/22/98 - externalized |
419 | break; | 420 | break; |
420 | 421 | ||
421 | case SPR_MEDI: | 422 | case SPR_MEDI: |
@@ -423,9 +424,9 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher) | |||
423 | return; | 424 | return; |
424 | 425 | ||
425 | if (player->health < 50) // cph - 25 + the 25 just added, thanks to Quasar for reporting this bug | 426 | if (player->health < 50) // cph - 25 + the 25 just added, thanks to Quasar for reporting this bug |
426 | player->message = GOTMEDINEED; // Ty 03/22/98 - externalized | 427 | player->message = s_GOTMEDINEED; // Ty 03/22/98 - externalized |
427 | else | 428 | else |
428 | player->message = GOTMEDIKIT; // Ty 03/22/98 - externalized | 429 | player->message = s_GOTMEDIKIT; // Ty 03/22/98 - externalized |
429 | break; | 430 | break; |
430 | 431 | ||
431 | 432 | ||
@@ -433,14 +434,14 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher) | |||
433 | case SPR_PINV: | 434 | case SPR_PINV: |
434 | if (!P_GivePower (player, pw_invulnerability)) | 435 | if (!P_GivePower (player, pw_invulnerability)) |
435 | return; | 436 | return; |
436 | player->message = GOTINVUL; // Ty 03/22/98 - externalized | 437 | player->message = s_GOTINVUL; // Ty 03/22/98 - externalized |
437 | sound = sfx_getpow; | 438 | sound = sfx_getpow; |
438 | break; | 439 | break; |
439 | 440 | ||
440 | case SPR_PSTR: | 441 | case SPR_PSTR: |
441 | if (!P_GivePower (player, pw_strength)) | 442 | if (!P_GivePower (player, pw_strength)) |
442 | return; | 443 | return; |
443 | player->message = GOTBERSERK; // Ty 03/22/98 - externalized | 444 | player->message = s_GOTBERSERK; // Ty 03/22/98 - externalized |
444 | if (player->readyweapon != wp_fist) | 445 | if (player->readyweapon != wp_fist) |
445 | player->pendingweapon = wp_fist; | 446 | player->pendingweapon = wp_fist; |
446 | sound = sfx_getpow; | 447 | sound = sfx_getpow; |
@@ -449,28 +450,28 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher) | |||
449 | case SPR_PINS: | 450 | case SPR_PINS: |
450 | if (!P_GivePower (player, pw_invisibility)) | 451 | if (!P_GivePower (player, pw_invisibility)) |
451 | return; | 452 | return; |
452 | player->message = GOTINVIS; // Ty 03/22/98 - externalized | 453 | player->message = s_GOTINVIS; // Ty 03/22/98 - externalized |
453 | sound = sfx_getpow; | 454 | sound = sfx_getpow; |
454 | break; | 455 | break; |
455 | 456 | ||
456 | case SPR_SUIT: | 457 | case SPR_SUIT: |
457 | if (!P_GivePower (player, pw_ironfeet)) | 458 | if (!P_GivePower (player, pw_ironfeet)) |
458 | return; | 459 | return; |
459 | player->message = GOTSUIT; // Ty 03/22/98 - externalized | 460 | player->message = s_GOTSUIT; // Ty 03/22/98 - externalized |
460 | sound = sfx_getpow; | 461 | sound = sfx_getpow; |
461 | break; | 462 | break; |
462 | 463 | ||
463 | case SPR_PMAP: | 464 | case SPR_PMAP: |
464 | if (!P_GivePower (player, pw_allmap)) | 465 | if (!P_GivePower (player, pw_allmap)) |
465 | return; | 466 | return; |
466 | player->message = GOTMAP; // Ty 03/22/98 - externalized | 467 | player->message = s_GOTMAP; // Ty 03/22/98 - externalized |
467 | sound = sfx_getpow; | 468 | sound = sfx_getpow; |
468 | break; | 469 | break; |
469 | 470 | ||
470 | case SPR_PVIS: | 471 | case SPR_PVIS: |
471 | if (!P_GivePower (player, pw_infrared)) | 472 | if (!P_GivePower (player, pw_infrared)) |
472 | return; | 473 | return; |
473 | player->message = GOTVISOR; // Ty 03/22/98 - externalized | 474 | player->message = s_GOTVISOR; // Ty 03/22/98 - externalized |
474 | sound = sfx_getpow; | 475 | sound = sfx_getpow; |
475 | break; | 476 | break; |
476 | 477 | ||
@@ -486,49 +487,49 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher) | |||
486 | if (!P_GiveAmmo (player,am_clip,1)) | 487 | if (!P_GiveAmmo (player,am_clip,1)) |
487 | return; | 488 | return; |
488 | } | 489 | } |
489 | player->message = GOTCLIP; // Ty 03/22/98 - externalized | 490 | player->message = s_GOTCLIP; // Ty 03/22/98 - externalized |
490 | break; | 491 | break; |
491 | 492 | ||
492 | case SPR_AMMO: | 493 | case SPR_AMMO: |
493 | if (!P_GiveAmmo (player, am_clip,5)) | 494 | if (!P_GiveAmmo (player, am_clip,5)) |
494 | return; | 495 | return; |
495 | player->message = GOTCLIPBOX; // Ty 03/22/98 - externalized | 496 | player->message = s_GOTCLIPBOX; // Ty 03/22/98 - externalized |
496 | break; | 497 | break; |
497 | 498 | ||
498 | case SPR_ROCK: | 499 | case SPR_ROCK: |
499 | if (!P_GiveAmmo (player, am_misl,1)) | 500 | if (!P_GiveAmmo (player, am_misl,1)) |
500 | return; | 501 | return; |
501 | player->message = GOTROCKET; // Ty 03/22/98 - externalized | 502 | player->message = s_GOTROCKET; // Ty 03/22/98 - externalized |
502 | break; | 503 | break; |
503 | 504 | ||
504 | case SPR_BROK: | 505 | case SPR_BROK: |
505 | if (!P_GiveAmmo (player, am_misl,5)) | 506 | if (!P_GiveAmmo (player, am_misl,5)) |
506 | return; | 507 | return; |
507 | player->message = GOTROCKBOX; // Ty 03/22/98 - externalized | 508 | player->message = s_GOTROCKBOX; // Ty 03/22/98 - externalized |
508 | break; | 509 | break; |
509 | 510 | ||
510 | case SPR_CELL: | 511 | case SPR_CELL: |
511 | if (!P_GiveAmmo (player, am_cell,1)) | 512 | if (!P_GiveAmmo (player, am_cell,1)) |
512 | return; | 513 | return; |
513 | player->message = GOTCELL; // Ty 03/22/98 - externalized | 514 | player->message = s_GOTCELL; // Ty 03/22/98 - externalized |
514 | break; | 515 | break; |
515 | 516 | ||
516 | case SPR_CELP: | 517 | case SPR_CELP: |
517 | if (!P_GiveAmmo (player, am_cell,5)) | 518 | if (!P_GiveAmmo (player, am_cell,5)) |
518 | return; | 519 | return; |
519 | player->message = GOTCELLBOX; // Ty 03/22/98 - externalized | 520 | player->message = s_GOTCELLBOX; // Ty 03/22/98 - externalized |
520 | break; | 521 | break; |
521 | 522 | ||
522 | case SPR_SHEL: | 523 | case SPR_SHEL: |
523 | if (!P_GiveAmmo (player, am_shell,1)) | 524 | if (!P_GiveAmmo (player, am_shell,1)) |
524 | return; | 525 | return; |
525 | player->message = GOTSHELLS; // Ty 03/22/98 - externalized | 526 | player->message = s_GOTSHELLS; // Ty 03/22/98 - externalized |
526 | break; | 527 | break; |
527 | 528 | ||
528 | case SPR_SBOX: | 529 | case SPR_SBOX: |
529 | if (!P_GiveAmmo (player, am_shell,5)) | 530 | if (!P_GiveAmmo (player, am_shell,5)) |
530 | return; | 531 | return; |
531 | player->message = GOTSHELLBOX; // Ty 03/22/98 - externalized | 532 | player->message = s_GOTSHELLBOX; // Ty 03/22/98 - externalized |
532 | break; | 533 | break; |
533 | 534 | ||
534 | case SPR_BPAK: | 535 | case SPR_BPAK: |
@@ -540,56 +541,56 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher) | |||
540 | } | 541 | } |
541 | for (i=0 ; i<NUMAMMO ; i++) | 542 | for (i=0 ; i<NUMAMMO ; i++) |
542 | P_GiveAmmo (player, i, 1); | 543 | P_GiveAmmo (player, i, 1); |
543 | player->message = GOTBACKPACK; // Ty 03/22/98 - externalized | 544 | player->message = s_GOTBACKPACK; // Ty 03/22/98 - externalized |
544 | break; | 545 | break; |
545 | 546 | ||
546 | // weapons | 547 | // weapons |
547 | case SPR_BFUG: | 548 | case SPR_BFUG: |
548 | if (!P_GiveWeapon (player, wp_bfg, false) ) | 549 | if (!P_GiveWeapon (player, wp_bfg, false) ) |
549 | return; | 550 | return; |
550 | player->message = GOTBFG9000; // Ty 03/22/98 - externalized | 551 | player->message = s_GOTBFG9000; // Ty 03/22/98 - externalized |
551 | sound = sfx_wpnup; | 552 | sound = sfx_wpnup; |
552 | break; | 553 | break; |
553 | 554 | ||
554 | case SPR_MGUN: | 555 | case SPR_MGUN: |
555 | if (!P_GiveWeapon (player, wp_chaingun, (special->flags&MF_DROPPED)!=0) ) | 556 | if (!P_GiveWeapon (player, wp_chaingun, (special->flags&MF_DROPPED)!=0) ) |
556 | return; | 557 | return; |
557 | player->message = GOTCHAINGUN; // Ty 03/22/98 - externalized | 558 | player->message = s_GOTCHAINGUN; // Ty 03/22/98 - externalized |
558 | sound = sfx_wpnup; | 559 | sound = sfx_wpnup; |
559 | break; | 560 | break; |
560 | 561 | ||
561 | case SPR_CSAW: | 562 | case SPR_CSAW: |
562 | if (!P_GiveWeapon (player, wp_chainsaw, false) ) | 563 | if (!P_GiveWeapon (player, wp_chainsaw, false) ) |
563 | return; | 564 | return; |
564 | player->message = GOTCHAINSAW; // Ty 03/22/98 - externalized | 565 | player->message = s_GOTCHAINSAW; // Ty 03/22/98 - externalized |
565 | sound = sfx_wpnup; | 566 | sound = sfx_wpnup; |
566 | break; | 567 | break; |
567 | 568 | ||
568 | case SPR_LAUN: | 569 | case SPR_LAUN: |
569 | if (!P_GiveWeapon (player, wp_missile, false) ) | 570 | if (!P_GiveWeapon (player, wp_missile, false) ) |
570 | return; | 571 | return; |
571 | player->message = GOTLAUNCHER; // Ty 03/22/98 - externalized | 572 | player->message = s_GOTLAUNCHER; // Ty 03/22/98 - externalized |
572 | sound = sfx_wpnup; | 573 | sound = sfx_wpnup; |
573 | break; | 574 | break; |
574 | 575 | ||
575 | case SPR_PLAS: | 576 | case SPR_PLAS: |
576 | if (!P_GiveWeapon (player, wp_plasma, false) ) | 577 | if (!P_GiveWeapon (player, wp_plasma, false) ) |
577 | return; | 578 | return; |
578 | player->message = GOTPLASMA; // Ty 03/22/98 - externalized | 579 | player->message = s_GOTPLASMA; // Ty 03/22/98 - externalized |
579 | sound = sfx_wpnup; | 580 | sound = sfx_wpnup; |
580 | break; | 581 | break; |
581 | 582 | ||
582 | case SPR_SHOT: | 583 | case SPR_SHOT: |
583 | if (!P_GiveWeapon (player, wp_shotgun, (special->flags&MF_DROPPED)!=0 ) ) | 584 | if (!P_GiveWeapon (player, wp_shotgun, (special->flags&MF_DROPPED)!=0 ) ) |
584 | return; | 585 | return; |
585 | player->message = GOTSHOTGUN; // Ty 03/22/98 - externalized | 586 | player->message = s_GOTSHOTGUN; // Ty 03/22/98 - externalized |
586 | sound = sfx_wpnup; | 587 | sound = sfx_wpnup; |
587 | break; | 588 | break; |
588 | 589 | ||
589 | case SPR_SGN2: | 590 | case SPR_SGN2: |
590 | if (!P_GiveWeapon(player, wp_supershotgun, (special->flags&MF_DROPPED)!=0)) | 591 | if (!P_GiveWeapon(player, wp_supershotgun, (special->flags&MF_DROPPED)!=0)) |
591 | return; | 592 | return; |
592 | player->message = GOTSHOTGUN2; // Ty 03/22/98 - externalized | 593 | player->message = s_GOTSHOTGUN2; // Ty 03/22/98 - externalized |
593 | sound = sfx_wpnup; | 594 | sound = sfx_wpnup; |
594 | break; | 595 | break; |
595 | 596 | ||
diff --git a/apps/plugins/doom/p_pspr.c b/apps/plugins/doom/p_pspr.c index 9ef9e73978..c3bc422df8 100644 --- a/apps/plugins/doom/p_pspr.c +++ b/apps/plugins/doom/p_pspr.c | |||
@@ -46,9 +46,7 @@ | |||
46 | #define WEAPONBOTTOM (FRACUNIT*128) | 46 | #define WEAPONBOTTOM (FRACUNIT*128) |
47 | #define WEAPONTOP (FRACUNIT*32) | 47 | #define WEAPONTOP (FRACUNIT*32) |
48 | 48 | ||
49 | // plasma cells for a bfg attack | 49 | #define BFGCELLS bfgcells /* Ty 03/09/98 externalized in p_inter.c */ |
50 | #define BFGCELLS 40 | ||
51 | //#define BFGCELLS bfgcells /* Ty 03/09/98 externalized in p_inter.c */ | ||
52 | 50 | ||
53 | extern void P_Thrust(player_t *, angle_t, fixed_t); | 51 | extern void P_Thrust(player_t *, angle_t, fixed_t); |
54 | 52 | ||
diff --git a/apps/plugins/doom/p_spec.c b/apps/plugins/doom/p_spec.c index c8c04fa7e2..f2757f8399 100644 --- a/apps/plugins/doom/p_spec.c +++ b/apps/plugins/doom/p_spec.c | |||
@@ -54,7 +54,7 @@ | |||
54 | #include "s_sound.h" | 54 | #include "s_sound.h" |
55 | #include "sounds.h" | 55 | #include "sounds.h" |
56 | #include "m_bbox.h" // phares 3/20/98 | 56 | #include "m_bbox.h" // phares 3/20/98 |
57 | //#include "d_deh.h" | 57 | #include "d_deh.h" |
58 | #include "r_plane.h" | 58 | #include "r_plane.h" |
59 | #include "i_system.h" | 59 | #include "i_system.h" |
60 | #include "rockmacros.h" | 60 | #include "rockmacros.h" |
@@ -818,7 +818,7 @@ boolean P_CanUnlockGenDoor | |||
818 | !player->cards[it_yellowskull] | 818 | !player->cards[it_yellowskull] |
819 | ) | 819 | ) |
820 | { | 820 | { |
821 | player->message = PD_ANY; // Ty 03/27/98 - externalized | 821 | player->message = s_PD_ANY; // Ty 03/27/98 - externalized |
822 | S_StartSound(player->mo,sfx_oof); // killough 3/20/98 | 822 | S_StartSound(player->mo,sfx_oof); // killough 3/20/98 |
823 | return false; | 823 | return false; |
824 | } | 824 | } |
@@ -830,7 +830,7 @@ boolean P_CanUnlockGenDoor | |||
830 | (!skulliscard || !player->cards[it_redskull]) | 830 | (!skulliscard || !player->cards[it_redskull]) |
831 | ) | 831 | ) |
832 | { | 832 | { |
833 | player->message = skulliscard? PD_REDK : PD_REDC; // Ty 03/27/98 - externalized | 833 | player->message = skulliscard? s_PD_REDK : s_PD_REDC; // Ty 03/27/98 - externalized |
834 | S_StartSound(player->mo,sfx_oof); // killough 3/20/98 | 834 | S_StartSound(player->mo,sfx_oof); // killough 3/20/98 |
835 | return false; | 835 | return false; |
836 | } | 836 | } |
@@ -842,7 +842,7 @@ boolean P_CanUnlockGenDoor | |||
842 | (!skulliscard || !player->cards[it_blueskull]) | 842 | (!skulliscard || !player->cards[it_blueskull]) |
843 | ) | 843 | ) |
844 | { | 844 | { |
845 | player->message = skulliscard? PD_BLUEK : PD_BLUEC; // Ty 03/27/98 - externalized | 845 | player->message = skulliscard? s_PD_BLUEK : s_PD_BLUEC; // Ty 03/27/98 - externalized |
846 | S_StartSound(player->mo,sfx_oof); // killough 3/20/98 | 846 | S_StartSound(player->mo,sfx_oof); // killough 3/20/98 |
847 | return false; | 847 | return false; |
848 | } | 848 | } |
@@ -854,7 +854,7 @@ boolean P_CanUnlockGenDoor | |||
854 | (!skulliscard || !player->cards[it_yellowskull]) | 854 | (!skulliscard || !player->cards[it_yellowskull]) |
855 | ) | 855 | ) |
856 | { | 856 | { |
857 | player->message = skulliscard? PD_YELLOWK : PD_YELLOWC; // Ty 03/27/98 - externalized | 857 | player->message = skulliscard? s_PD_YELLOWK : s_PD_YELLOWC; // Ty 03/27/98 - externalized |
858 | S_StartSound(player->mo,sfx_oof); // killough 3/20/98 | 858 | S_StartSound(player->mo,sfx_oof); // killough 3/20/98 |
859 | return false; | 859 | return false; |
860 | } | 860 | } |
@@ -866,7 +866,7 @@ boolean P_CanUnlockGenDoor | |||
866 | (!skulliscard || !player->cards[it_redcard]) | 866 | (!skulliscard || !player->cards[it_redcard]) |
867 | ) | 867 | ) |
868 | { | 868 | { |
869 | player->message = skulliscard? PD_REDK : PD_REDS; // Ty 03/27/98 - externalized | 869 | player->message = skulliscard? s_PD_REDK : s_PD_REDS; // Ty 03/27/98 - externalized |
870 | S_StartSound(player->mo,sfx_oof); // killough 3/20/98 | 870 | S_StartSound(player->mo,sfx_oof); // killough 3/20/98 |
871 | return false; | 871 | return false; |
872 | } | 872 | } |
@@ -878,7 +878,7 @@ boolean P_CanUnlockGenDoor | |||
878 | (!skulliscard || !player->cards[it_bluecard]) | 878 | (!skulliscard || !player->cards[it_bluecard]) |
879 | ) | 879 | ) |
880 | { | 880 | { |
881 | player->message = skulliscard? PD_BLUEK : PD_BLUES; // Ty 03/27/98 - externalized | 881 | player->message = skulliscard? s_PD_BLUEK : s_PD_BLUES; // Ty 03/27/98 - externalized |
882 | S_StartSound(player->mo,sfx_oof); // killough 3/20/98 | 882 | S_StartSound(player->mo,sfx_oof); // killough 3/20/98 |
883 | return false; | 883 | return false; |
884 | } | 884 | } |
@@ -890,7 +890,7 @@ boolean P_CanUnlockGenDoor | |||
890 | (!skulliscard || !player->cards[it_yellowcard]) | 890 | (!skulliscard || !player->cards[it_yellowcard]) |
891 | ) | 891 | ) |
892 | { | 892 | { |
893 | player->message = skulliscard? PD_YELLOWK : PD_YELLOWS; // Ty 03/27/98 - externalized | 893 | player->message = skulliscard? s_PD_YELLOWK : s_PD_YELLOWS; // Ty 03/27/98 - externalized |
894 | S_StartSound(player->mo,sfx_oof); // killough 3/20/98 | 894 | S_StartSound(player->mo,sfx_oof); // killough 3/20/98 |
895 | return false; | 895 | return false; |
896 | } | 896 | } |
@@ -909,7 +909,7 @@ boolean P_CanUnlockGenDoor | |||
909 | ) | 909 | ) |
910 | ) | 910 | ) |
911 | { | 911 | { |
912 | player->message = PD_ALL6; // Ty 03/27/98 - externalized | 912 | player->message = s_PD_ALL6; // Ty 03/27/98 - externalized |
913 | S_StartSound(player->mo,sfx_oof); // killough 3/20/98 | 913 | S_StartSound(player->mo,sfx_oof); // killough 3/20/98 |
914 | return false; | 914 | return false; |
915 | } | 915 | } |
@@ -926,7 +926,7 @@ boolean P_CanUnlockGenDoor | |||
926 | ) | 926 | ) |
927 | ) | 927 | ) |
928 | { | 928 | { |
929 | player->message = PD_ALL3; // Ty 03/27/98 - externalized | 929 | player->message = s_PD_ALL3; // Ty 03/27/98 - externalized |
930 | S_StartSound(player->mo,sfx_oof); // killough 3/20/98 | 930 | S_StartSound(player->mo,sfx_oof); // killough 3/20/98 |
931 | return false; | 931 | return false; |
932 | } | 932 | } |
diff --git a/apps/plugins/doom/rockdoom.c b/apps/plugins/doom/rockdoom.c index d66d86d65d..00bd22b7ea 100644 --- a/apps/plugins/doom/rockdoom.c +++ b/apps/plugins/doom/rockdoom.c | |||
@@ -782,14 +782,6 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
782 | 782 | ||
783 | rb->lcd_setfont(0); | 783 | rb->lcd_setfont(0); |
784 | 784 | ||
785 | #ifdef FANCY_MENU | ||
786 | /* TO FIX: Don't use load_main_backdrop() - use lcd_set_backdrop() */ | ||
787 | if(rb->load_main_backdrop(GAMEBASE"backdrop.bmp")) | ||
788 | rb->lcd_set_foreground(LCD_RGBPACK(85,208,56)); | ||
789 | |||
790 | rb->lcd_clear_display(); | ||
791 | #endif | ||
792 | |||
793 | // We're using doom's memory management since it implements a proper free (and re-uses the memory) | 785 | // We're using doom's memory management since it implements a proper free (and re-uses the memory) |
794 | // and now with prboom's code: realloc and calloc | 786 | // and now with prboom's code: realloc and calloc |
795 | printf ("Z_Init: Init zone memory allocation daemon.\n"); | 787 | printf ("Z_Init: Init zone memory allocation daemon.\n"); |
@@ -798,15 +790,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
798 | printf ("M_LoadDefaults: Load system defaults.\n"); | 790 | printf ("M_LoadDefaults: Load system defaults.\n"); |
799 | M_LoadDefaults (); // load before initing other systems | 791 | M_LoadDefaults (); // load before initing other systems |
800 | 792 | ||
801 | #ifdef FANCY_MENU | ||
802 | rb->lcd_setfont(FONT_UI); | ||
803 | rb->lcd_putsxy(5,LCD_HEIGHT-20, "Welcome to RockDoom"); | ||
804 | rb->lcd_update(); | ||
805 | rb->sleep(HZ*2); | ||
806 | rb->lcd_setfont(0); | ||
807 | #else | ||
808 | rb->splash(HZ*2, true, "Welcome to RockDoom"); | 793 | rb->splash(HZ*2, true, "Welcome to RockDoom"); |
809 | #endif | ||
810 | 794 | ||
811 | myargv =0; | 795 | myargv =0; |
812 | myargc=0; | 796 | myargc=0; |
diff --git a/apps/plugins/doom/rockmacros.h b/apps/plugins/doom/rockmacros.h index bda8219409..31b16c75eb 100644 --- a/apps/plugins/doom/rockmacros.h +++ b/apps/plugins/doom/rockmacros.h | |||
@@ -35,7 +35,7 @@ int my_open(const char *file, int flags); | |||
35 | int my_close(int id); | 35 | int my_close(int id); |
36 | char *my_strtok( char * s, const char * delim ); | 36 | char *my_strtok( char * s, const char * delim ); |
37 | #define alloca __builtin_alloca | 37 | #define alloca __builtin_alloca |
38 | #define fprintf(...) rb->fdprintf(__VA_ARGS__) | 38 | #define fdprintf(...) rb->fdprintf(__VA_ARGS__) |
39 | #define vsnprintf(...) rb->vsnprintf(__VA_ARGS__) | 39 | #define vsnprintf(...) rb->vsnprintf(__VA_ARGS__) |
40 | 40 | ||
41 | #ifdef SIMULATOR | 41 | #ifdef SIMULATOR |
@@ -61,6 +61,7 @@ char *my_strtok( char * s, const char * delim ); | |||
61 | #define lseek(a,b,c) rb->lseek((a),(b),(c)) | 61 | #define lseek(a,b,c) rb->lseek((a),(b),(c)) |
62 | #endif /* !SIMULATOR */ | 62 | #endif /* !SIMULATOR */ |
63 | 63 | ||
64 | #define strtok(a,b) my_strtok((a),(b)) | ||
64 | #define strcat(a,b) rb->strcat((a),(b)) | 65 | #define strcat(a,b) rb->strcat((a),(b)) |
65 | #define read(a,b,c) rb->read((a),(b),(c)) | 66 | #define read(a,b,c) rb->read((a),(b),(c)) |
66 | #define write(a,b,c) rb->write((a),(b),(c)) | 67 | #define write(a,b,c) rb->write((a),(b),(c)) |
@@ -91,7 +92,6 @@ inline void* memcpy(void* dst, const void* src, size_t size); | |||
91 | //#define SIMPLECHECKS | 92 | //#define SIMPLECHECKS |
92 | #define NO_PREDEFINED_LUMPS | 93 | #define NO_PREDEFINED_LUMPS |
93 | #define TABLES_AS_LUMPS // This frees up alot of space in the plugin buffer | 94 | #define TABLES_AS_LUMPS // This frees up alot of space in the plugin buffer |
94 | //#define FANCY_MENU // This is a call to allow load_main_backdrop to run in doom | ||
95 | 95 | ||
96 | #define MAKE_FOURCC(a,b,c,d) (uint32_t)((((a)<<24)|((b)<<16)|((c)<<8)|(d))) | 96 | #define MAKE_FOURCC(a,b,c,d) (uint32_t)((((a)<<24)|((b)<<16)|((c)<<8)|(d))) |
97 | 97 | ||