diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/.gitignore | 5 | ||||
-rw-r--r-- | src/Makefile.am | 15 | ||||
-rw-r--r-- | src/deh_io.c | 1 | ||||
-rw-r--r-- | src/deh_main.c | 6 | ||||
-rw-r--r-- | src/doom-screensaver.desktop.in | 6 | ||||
-rw-r--r-- | src/doom.desktop.in | 2 | ||||
-rw-r--r-- | src/doom/p_enemy.c | 5 | ||||
-rw-r--r-- | src/doom/p_local.h | 14 | ||||
-rw-r--r-- | src/doom/p_map.c | 11 | ||||
-rw-r--r-- | src/heretic.desktop.in | 7 | ||||
-rw-r--r-- | src/hexen.desktop.in | 7 | ||||
-rw-r--r-- | src/setup/joystick.c | 27 | ||||
-rw-r--r-- | src/setup/setup.desktop.in | 6 | ||||
-rw-r--r-- | src/strife.desktop.in | 7 |
14 files changed, 94 insertions, 25 deletions
diff --git a/src/.gitignore b/src/.gitignore index aa8a4c05..a0cf15b4 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -6,6 +6,11 @@ chocolate-doom chocolate-heretic chocolate-hexen chocolate-server +chocolate-strife +chocolate-doom-setup +chocolate-heretic-setup +chocolate-hexen-setup +chocolate-strife-setup chocolate-setup *.exe *.desktop diff --git a/src/Makefile.am b/src/Makefile.am index 5c9d15f4..16496d88 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -218,11 +218,24 @@ EXTRA_DIST = \ manifest.xml appdir = $(prefix)/share/applications -app_DATA = @PROGRAM_PREFIX@doom.desktop +app_DATA = \ + @PROGRAM_PREFIX@doom.desktop \ + @PROGRAM_PREFIX@heretic.desktop \ + @PROGRAM_PREFIX@hexen.desktop \ + @PROGRAM_PREFIX@strife.desktop @PROGRAM_PREFIX@doom.desktop : doom.desktop cp doom.desktop $@ +@PROGRAM_PREFIX@heretic.desktop : heretic.desktop + cp heretic.desktop $@ + +@PROGRAM_PREFIX@hexen.desktop : hexen.desktop + cp hexen.desktop $@ + +@PROGRAM_PREFIX@strife.desktop : strife.desktop + cp strife.desktop $@ + screensaverdir = $(prefix)/share/applications/screensavers screensaver_DATA = @PROGRAM_PREFIX@doom-screensaver.desktop diff --git a/src/deh_io.c b/src/deh_io.c index 9f76563d..778170fd 100644 --- a/src/deh_io.c +++ b/src/deh_io.c @@ -137,6 +137,7 @@ void DEH_CloseFile(deh_context_t *context) W_ReleaseLumpNum(context->lumpnum); } + free(context->filename); Z_Free(context->readbuffer); Z_Free(context); } diff --git a/src/deh_main.c b/src/deh_main.c index ff0236b1..c98962a9 100644 --- a/src/deh_main.c +++ b/src/deh_main.c @@ -346,6 +346,12 @@ int DEH_LoadLump(int lumpnum, boolean allow_long) deh_context_t *context; boolean long_strings, long_cheats; + if (!deh_initialized) + { + InitializeSections(); + deh_initialized = true; + } + if (allow_long) { long_strings = deh_allow_long_strings; diff --git a/src/doom-screensaver.desktop.in b/src/doom-screensaver.desktop.in index 315f964c..deb7274a 100644 --- a/src/doom-screensaver.desktop.in +++ b/src/doom-screensaver.desktop.in @@ -1,12 +1,10 @@ - [Desktop Entry] -Name=@PACKAGE_NAME@ +Name=@PACKAGE_SHORTNAME@ Doom Comment=@PACKAGE_SHORTDESC@ TryExec=@PROGRAM_PREFIX@doom Exec=@PROGRAM_PREFIX@doom StartupNotify=false Terminal=false Type=Application -OnlyShowIn=GNOME; +OnlyShowIn=GNOME;MATE; Categories=Screensaver; - diff --git a/src/doom.desktop.in b/src/doom.desktop.in index 44b76e62..e554a244 100644 --- a/src/doom.desktop.in +++ b/src/doom.desktop.in @@ -1,5 +1,5 @@ [Desktop Entry] -Name=@PACKAGE_NAME@ +Name=@PACKAGE_SHORTNAME@ Doom Exec=@PROGRAM_PREFIX@doom Icon=@PROGRAM_PREFIX@doom Type=Application diff --git a/src/doom/p_enemy.c b/src/doom/p_enemy.c index ba2b011b..a7df6a01 100644 --- a/src/doom/p_enemy.c +++ b/src/doom/p_enemy.c @@ -257,11 +257,6 @@ boolean P_CheckMissileRange (mobj_t* actor) fixed_t xspeed[8] = {FRACUNIT,47000,0,-47000,-FRACUNIT,-47000,0,47000}; fixed_t yspeed[8] = {0,47000,FRACUNIT,47000,0,-47000,-FRACUNIT,-47000}; -#define MAXSPECIALCROSS 8 - -extern line_t* spechit[MAXSPECIALCROSS]; -extern int numspechit; - boolean P_Move (mobj_t* actor) { fixed_t tryx; diff --git a/src/doom/p_local.h b/src/doom/p_local.h index fea6f1ea..95fa4053 100644 --- a/src/doom/p_local.h +++ b/src/doom/p_local.h @@ -208,6 +208,20 @@ extern fixed_t tmceilingz; extern line_t* ceilingline; +// fraggle: I have increased the size of this buffer. In the original Doom, +// overrunning past this limit caused other bits of memory to be overwritten, +// affecting demo playback. However, in doing so, the limit was still +// exceeded. So we have to support more than 8 specials. +// +// We keep the original limit, to detect what variables in memory were +// overwritten (see SpechitOverrun()) + +#define MAXSPECIALCROSS 20 +#define MAXSPECIALCROSS_ORIGINAL 8 + +extern line_t* spechit[MAXSPECIALCROSS]; +extern int numspechit; + boolean P_CheckPosition (mobj_t *thing, fixed_t x, fixed_t y); boolean P_TryMove (mobj_t* thing, fixed_t x, fixed_t y); boolean P_TeleportMove (mobj_t* thing, fixed_t x, fixed_t y); diff --git a/src/doom/p_map.c b/src/doom/p_map.c index bf92fcea..e371869a 100644 --- a/src/doom/p_map.c +++ b/src/doom/p_map.c @@ -82,17 +82,6 @@ line_t* ceilingline; // keep track of special lines as they are hit, // but don't process them until the move is proven valid -// fraggle: I have increased the size of this buffer. In the original Doom, -// overrunning past this limit caused other bits of memory to be overwritten, -// affecting demo playback. However, in doing so, the limit was still -// exceeded. So we have to support more than 8 specials. -// -// We keep the original limit, to detect what variables in memory were -// overwritten (see SpechitOverrun()) - -#define MAXSPECIALCROSS 20 -#define MAXSPECIALCROSS_ORIGINAL 8 - line_t* spechit[MAXSPECIALCROSS]; int numspechit; diff --git a/src/heretic.desktop.in b/src/heretic.desktop.in new file mode 100644 index 00000000..54ef6a83 --- /dev/null +++ b/src/heretic.desktop.in @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=@PACKAGE_SHORTNAME@ Heretic +Exec=@PROGRAM_PREFIX@heretic +Icon=@PROGRAM_PREFIX@doom +Type=Application +Comment=@PACKAGE_SHORTDESC@ +Categories=Game;ActionGame; diff --git a/src/hexen.desktop.in b/src/hexen.desktop.in new file mode 100644 index 00000000..14603840 --- /dev/null +++ b/src/hexen.desktop.in @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=@PACKAGE_SHORTNAME@ Hexen +Exec=@PROGRAM_PREFIX@hexen +Icon=@PROGRAM_PREFIX@doom +Type=Application +Comment=@PACKAGE_SHORTDESC@ +Categories=Game;ActionGame; diff --git a/src/setup/joystick.c b/src/setup/joystick.c index b57667f4..4cc62fe1 100644 --- a/src/setup/joystick.c +++ b/src/setup/joystick.c @@ -206,6 +206,26 @@ static const joystick_config_t xbox360_controller[] = {NULL, 0}, }; +// Xbox 360 controller under Linux. +static const joystick_config_t xbox360_controller_linux[] = +{ + {"joystick_x_axis", CREATE_HAT_AXIS(0, HAT_AXIS_HORIZONTAL)}, + {"joystick_y_axis", CREATE_HAT_AXIS(0, HAT_AXIS_VERTICAL)}, + // Ideally we'd like the trigger buttons to be strafe left/right + // But Linux presents each trigger button as its own axis, which + // we can't really work with. So we have to settle for a + // suboptimal setup. + {"joyb_fire", 2}, // X + {"joyb_speed", 0}, // A + {"joyb_jump", 3}, // Y + {"joyb_use", 1}, // B + {"joyb_strafeleft", 4}, // LB + {"joyb_straferight", 5}, // RB + {"joyb_menu_activate", 7}, // Start + {"joyb_prevweapon", 6}, // Back + {NULL, 0}, +}; + // Logitech Dual Action (F310, F710). Thanks to Brad Harding for details. static const joystick_config_t logitech_f310_controller[] = { @@ -249,6 +269,13 @@ static const known_joystick_t known_joysticks[] = xbox360_controller, }, + // Xbox 360 controller as it appears on Linux. + { + "Microsoft X-Box 360 pad", + 6, 11, 1, + xbox360_controller_linux, + }, + { "Logitech Dual Action", 4, 12, 1, diff --git a/src/setup/setup.desktop.in b/src/setup/setup.desktop.in index 4b1cf69c..91decb41 100644 --- a/src/setup/setup.desktop.in +++ b/src/setup/setup.desktop.in @@ -1,7 +1,7 @@ [Desktop Entry] -Name=@PACKAGE_NAME@ Setup -Exec=@PROGRAM_PREFIX@doom-setup +Name=@PACKAGE_SHORTNAME@ Setup +Exec=@PROGRAM_PREFIX@setup Icon=@PROGRAM_PREFIX@setup Type=Application -Comment=Setup tool for @PACKAGE_NAME@ +Comment=Setup tool for @PACKAGE_SHORTNAME@ Categories=Settings diff --git a/src/strife.desktop.in b/src/strife.desktop.in new file mode 100644 index 00000000..eb44c61d --- /dev/null +++ b/src/strife.desktop.in @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=@PACKAGE_SHORTNAME@ Strife +Exec=@PROGRAM_PREFIX@strife +Icon=@PROGRAM_PREFIX@doom +Type=Application +Comment=@PACKAGE_SHORTDESC@ +Categories=Game;ActionGame; |