From ed4adeba77bf7dd803e7b944ee5f871965a0ca29 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Wed, 9 Mar 2011 01:06:07 +0000 Subject: Add support for the alternate version of the Final Doom executable that fixes the demo loop crash (thanks Porsche Monty, Enjay). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2297 --- NEWS | 11 +++++++++++ NOT-BUGS | 23 ----------------------- src/d_main.c | 10 ++++++++-- src/doomdef.h | 1 + src/doomstat.c | 2 +- src/m_menu.c | 1 + 6 files changed, 22 insertions(+), 26 deletions(-) diff --git a/NEWS b/NEWS index 3983ac76..03defb19 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,16 @@ 1.6.0 (2011-??-??): + * Added support for the alternate version of the Final Doom + executable included in some later versions of the Id Anthology. + This version fixed the demo loop crash that occurred with the + "original" Final Doom executable. + + This executable can be selected on the command line with + -gameversion final2. It has been made the default when playing + with the Final Doom IWADs (the original behavior can be + selected with -gameversion final). (thanks Porsche Monty, + Enjay). + Compatibility: * Very short sound effects are not played, to better emulate the behavior of DMX in Vanilla Doom (thanks to Quasar for help in diff --git a/NOT-BUGS b/NOT-BUGS index f7d22231..38d97770 100644 --- a/NOT-BUGS +++ b/NOT-BUGS @@ -31,29 +31,6 @@ upgrade. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -== Game exits in demo loop when playing Final Doom == - -When playing with the Final Doom IWAD files (tnt.wad, plutonia.wad), -if you leave the game at the title screen to play through the demo -loop, it will eventually exit with the following error message: - - W_GetNumForName: demo4 not found! - -This is the same behavior as the Vanilla executables that were -bundled with Final Doom. When Ultimate Doom was developed, a fourth -demo was added to the demo loop, and this change was retained in the -Final Doom version of the executable. However, the Final Doom IWADs -do not include a fourth demo, so the game crashes. - -One way to work around this problem is to make the game emulate the -original (pre-Ultimate Doom) v1.9 executable. To do this, add the -command line argument "-gameversion 1.9" when running the game. -However, be aware this version does have some subtle differences that -will affect the playback of Final Doom demos (lost soul bouncing, -teleport behavior). - -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - == Game exits when accessing the options menu == The game may exit with the message "Bad V_DrawPatch" when accessing diff --git a/src/d_main.c b/src/d_main.c index 73978c2f..2cfc6b44 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -500,6 +500,9 @@ void D_DoAdvanceDemo (void) // include a DEMO4 lump, so the game bombs out with an error // when it reaches this point in the demo sequence. + // However! There is an alternate version of Final Doom that + // includes a fixed executable. + if (gameversion == exe_ultimate || gameversion == exe_final) demosequence = (demosequence+1)%7; else @@ -659,6 +662,7 @@ static struct {"Hacx", "hacx", exe_hacx}, {"Ultimate Doom", "ultimate", exe_ultimate}, {"Final Doom", "final", exe_final}, + {"Final Doom (alt)", "final2", exe_final2}, {"Chex Quest", "chex", exe_chex}, { NULL, NULL, 0}, }; @@ -675,7 +679,7 @@ static void InitGameVersion(void) // @category compat // // Emulate a specific version of Doom. Valid values are "1.9", - // "ultimate" and "final". + // "ultimate", "final", "final2", "hacx" and "chex". // p = M_CheckParmWithArgs("-gameversion", 1); @@ -731,8 +735,10 @@ static void InitGameVersion(void) else { // Final Doom: tnt or plutonia + // Default to the "alt" version of the executable that + // fixes the demo loop behavior. - gameversion = exe_final; + gameversion = exe_final2; } } } diff --git a/src/doomdef.h b/src/doomdef.h index f9cd4fd9..fa85a47f 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -107,6 +107,7 @@ typedef enum exe_hacx, // Hacx executable (Doom 1.9 with patch applied) exe_ultimate, // Ultimate Doom (retail) exe_final, // Final Doom + exe_final2, // Final Doom (alternate exe) exe_chex, // Chex Quest executable (based on Final Doom) } GameVersion_t; diff --git a/src/doomstat.c b/src/doomstat.c index 22804459..e5fe46b2 100644 --- a/src/doomstat.c +++ b/src/doomstat.c @@ -32,7 +32,7 @@ // Game Mode - identify IWAD as shareware, retail etc. GameMode_t gamemode = indetermined; GameMission_t gamemission = doom; -GameVersion_t gameversion = exe_final; +GameVersion_t gameversion = exe_final2; char *gamedescription; // Set if homebrew PWAD stuff has been added. diff --git a/src/m_menu.c b/src/m_menu.c index efc4fefe..7144f715 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -820,6 +820,7 @@ void M_DrawReadThis1(void) break; case exe_final: + case exe_final2: // Final Doom always displays "HELP". -- cgit v1.2.3 From d610772a0b58e63f665403386f167b3e19a5dcfd Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Wed, 9 Mar 2011 19:02:15 +0000 Subject: Add null sector dereference emulation code from Prboom+, to fix desync with CLNJ-506.LMP (thanks entryway). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2298 --- NEWS | 3 ++ src/i_system.c | 106 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/i_system.h | 1 + src/p_map.c | 59 ++++++++++++++++---------------- src/p_setup.c | 25 ++++++++++++-- 5 files changed, 162 insertions(+), 32 deletions(-) diff --git a/NEWS b/NEWS index 03defb19..6830685a 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,9 @@ * Very short sound effects are not played, to better emulate the behavior of DMX in Vanilla Doom (thanks to Quasar for help in investigating this). + * The null sector dereference emulation code has been imported + from Prboom+ - this fixes a desync with CLNJ-506.LMP (thanks + entryway). Bugs fixed: * Menu navigation when using joystick/joypad (thanks Alexandre diff --git a/src/i_system.c b/src/i_system.c index 9f599192..4db97276 100644 --- a/src/i_system.c +++ b/src/i_system.c @@ -369,3 +369,109 @@ void I_Error (char *error, ...) exit(-1); } +// +// Read Access Violation emulation. +// +// From PrBoom+, by entryway. +// + +// C:\>debug +// -d 0:0 +// +// DOS 6.22: +// 0000:0000 (57 92 19 00) F4 06 70 00-(16 00) +// DOS 7.1: +// 0000:0000 (9E 0F C9 00) 65 04 70 00-(16 00) +// Win98: +// 0000:0000 (9E 0F C9 00) 65 04 70 00-(16 00) +// DOSBox under XP: +// 0000:0000 (00 00 00 F1) ?? ?? ?? 00-(07 00) + +#define DOS_MEM_DUMP_SIZE 10 + +static const unsigned char mem_dump_dos622[DOS_MEM_DUMP_SIZE] = { + 0x57, 0x92, 0x19, 0x00, 0xF4, 0x06, 0x70, 0x00, 0x16, 0x00}; +static const unsigned char mem_dump_win98[DOS_MEM_DUMP_SIZE] = { + 0x9E, 0x0F, 0xC9, 0x00, 0x65, 0x04, 0x70, 0x00, 0x16, 0x00}; +static const unsigned char mem_dump_dosbox[DOS_MEM_DUMP_SIZE] = { + 0x00, 0x00, 0x00, 0xF1, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00}; +static unsigned char mem_dump_custom[DOS_MEM_DUMP_SIZE]; + +static const unsigned char *dos_mem_dump = mem_dump_dos622; + +boolean I_GetMemoryValue(unsigned int offset, void *value, int size) +{ + static boolean firsttime = true; + + if (firsttime) + { + int p, i, val; + + firsttime = false; + i = 0; + + //! + // @category compat + // @arg + // + // Specify DOS version to emulate for NULL pointer dereference + // emulation. Supported versions are: dos622, dos71, dosbox. + // The default is to emulate DOS 7.1 (Windows 98). + // + + p = M_CheckParmWithArgs("-setmem", 1); + + if (p > 0) + { + if (!strcasecmp(myargv[p + 1], "dos622")) + { + dos_mem_dump = mem_dump_dos622; + } + if (!strcasecmp(myargv[p + 1], "dos71")) + { + dos_mem_dump = mem_dump_win98; + } + else if (!strcasecmp(myargv[p + 1], "dosbox")) + { + dos_mem_dump = mem_dump_dosbox; + } + else + { + for (i = 0; i < DOS_MEM_DUMP_SIZE; ++i) + { + ++p; + + if (p >= myargc || myargv[p][0] == '-') + { + break; + } + + M_StrToInt(myargv[p], &val); + mem_dump_custom[i++] = (unsigned char) val; + } + + dos_mem_dump = mem_dump_custom; + } + } + } + + switch (size) + { + case 1: + *((unsigned char *) value) = dos_mem_dump[offset]; + return true; + case 2: + *((unsigned short *) value) = dos_mem_dump[offset] + | (dos_mem_dump[offset + 1] << 8); + return true; + case 4: + *((unsigned int *) value) = dos_mem_dump[offset] + | (dos_mem_dump[offset + 1] << 8) + | (dos_mem_dump[offset + 2] << 16) + | (dos_mem_dump[offset + 3] << 24); + return true; + } + + return false; +} + diff --git a/src/i_system.h b/src/i_system.h index a5e06a50..06e7f662 100644 --- a/src/i_system.h +++ b/src/i_system.h @@ -86,6 +86,7 @@ void I_Tactile (int on, int off, int total); void I_Error (char *error, ...); +boolean I_GetMemoryValue(unsigned int offset, void *value, int size); #endif diff --git a/src/p_map.c b/src/p_map.c index 1ac76349..cac44dd2 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -885,24 +885,16 @@ PTR_AimTraverse (intercept_t* in) dist = FixedMul (attackrange, in->frac); - // Return false if there is no back sector. This should never - // be the case if the line is two-sided; however, some WADs - // (eg. ottawau.wad) use this as an "impassible glass" trick - // and rely on Vanilla Doom's (unintentional) support for this. - - if (li->backsector == NULL) - { - return false; - } - - if (li->frontsector->floorheight != li->backsector->floorheight) + if (li->backsector == NULL + || li->frontsector->floorheight != li->backsector->floorheight) { slope = FixedDiv (openbottom - shootz , dist); if (slope > bottomslope) bottomslope = slope; } - if (li->frontsector->ceilingheight != li->backsector->ceilingheight) + if (li->backsector == NULL + || li->frontsector->ceilingheight != li->backsector->ceilingheight) { slope = FixedDiv (opentop - shootz , dist); if (slope < topslope) @@ -983,26 +975,35 @@ boolean PTR_ShootTraverse (intercept_t* in) dist = FixedMul (attackrange, in->frac); - // Check if backsector is NULL. See comment in PTR_AimTraverse. + // e6y: emulation of missed back side on two-sided lines. + // backsector can be NULL when emulating missing back side. - if (li->backsector == NULL) + if (li->backsector == NULL) { - goto hitline; - } + slope = FixedDiv (openbottom - shootz , dist); + if (slope > aimslope) + goto hitline; - if (li->frontsector->floorheight != li->backsector->floorheight) - { - slope = FixedDiv (openbottom - shootz , dist); - if (slope > aimslope) - goto hitline; - } - - if (li->frontsector->ceilingheight != li->backsector->ceilingheight) - { - slope = FixedDiv (opentop - shootz , dist); - if (slope < aimslope) - goto hitline; - } + slope = FixedDiv (opentop - shootz , dist); + if (slope < aimslope) + goto hitline; + } + else + { + if (li->frontsector->floorheight != li->backsector->floorheight) + { + slope = FixedDiv (openbottom - shootz , dist); + if (slope > aimslope) + goto hitline; + } + + if (li->frontsector->ceilingheight != li->backsector->ceilingheight) + { + slope = FixedDiv (opentop - shootz , dist); + if (slope < aimslope) + goto hitline; + } + } // shot continues return true; diff --git a/src/p_setup.c b/src/p_setup.c index 3fc95cab..e18ec81e 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -155,7 +155,24 @@ void P_LoadVertexes (int lump) W_ReleaseLumpNum(lump); } +// +// GetSectorAtNullAddress +// +sector_t* GetSectorAtNullAddress(void) +{ + static boolean null_sector_is_initialized = false; + static sector_t null_sector; + + if (!null_sector_is_initialized) + { + memset(&null_sector, 0, sizeof(null_sector)); + I_GetMemoryValue(0, &null_sector.floorheight, 4); + I_GetMemoryValue(4, &null_sector.ceilingheight, 4); + null_sector_is_initialized = true; + } + return &null_sector; +} // // P_LoadSegs @@ -204,10 +221,12 @@ void P_LoadSegs (int lump) if (sidenum < 0 || sidenum >= numsides) { - sidenum = 0; + li->backsector = GetSectorAtNullAddress(); + } + else + { + li->backsector = sides[sidenum].sector; } - - li->backsector = sides[sidenum].sector; } else { -- cgit v1.2.3 From eca0d817b7973d678d31608870bea86a141442ab Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 10 Mar 2011 19:03:23 +0000 Subject: Replace the INSTALL file with a template version that is customized to different platforms. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2299 --- INSTALL | 173 ---------------------------------- Makefile.am | 22 +++-- NEWS | 9 +- autogen.sh | 2 +- man/INSTALL.template | 250 ++++++++++++++++++++++++++++++++++++++++++++++++++ man/Makefile.am | 11 ++- man/simplecpp | 211 ++++++++++++++++++++++++++++++++++++++++++ pkg/config.make.in | 1 - pkg/osx/GNUmakefile | 4 + pkg/win32/GNUmakefile | 4 + rpm.spec.in | 10 +- 11 files changed, 504 insertions(+), 193 deletions(-) delete mode 100644 INSTALL create mode 100644 man/INSTALL.template create mode 100755 man/simplecpp diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 7ad85b7f..00000000 --- a/INSTALL +++ /dev/null @@ -1,173 +0,0 @@ - -Chocolate Doom installation -=========================== - -These are instructions for how to install and set up Chocolate Doom -for play. - -Building Chocolate Doom ------------------------ - -Before you can play Chocolate Doom, you need to compile a binary that -you can run. If you are using Windows or Mac OS X, precompiled -binaries are available on the website for download, and you can skip -this section. - -For compilation, Chocolate Doom requires the following to be installed: - - * A C compiler (gcc is recommended) - * make (GNU make is recommended) - * LibSDL (see http://www.libsdl.org/) - * SDL_mixer (see http://www.libsdl.org/projects/SDL_mixer/) - * SDL_net (see http://www.libsdl.org/projects/SDL_net/) - * Python (optional) - -Follow the standard instructions for installing an autotools-based -package: - - 1. Run './configure' to initialize the package. - 2. Run 'make' to compile the package. - 3. Run 'make install' to install the package. - -Advanced topics such as cross-compilation are beyond the scope of this -document. Please see the GNU autoconf / automake documentation for more -information. - -Obtaining an IWAD file ----------------------- - -To play Doom, you need an IWAD file. This file contains the game data -that is used in gameplay (graphics, sounds, etc). The full versions of -the Doom games are proprietary and need to be bought. The IWAD file -has one of the following names: - - doom1.wad (Shareware Doom) - doom.wad (Registered / Ultimate Doom) - doom2.wad (Doom 2) - tnt.wad (Final Doom: TNT: Evilution) - plutonia.wad (Final Doom: Plutonia Experiment) - chex.wad (Chex Quest) - -If you don't have a copy of the commercial version, you can download -the shareware version (extract the file named doom1.wad): - - * http://www.doomworld.com/idgames/index.php?id=7053 - (idstuff/doom/win95/doom95.zip in your nearest /idgames mirror) - -If you have a commercial version, obtaining the IWAD file may slightly -complicated. The method depends on how you obtained your copy of the -game: - - * There have been several CD-based versions of Doom. Generally, the - IWAD files can be found on the CD and copied off directly. - - * The IWAD files might not be directly available on the CD. Look for - a program named "deice.exe". In the same directory, there should - be a single large file with a numbered extension (eg. - "resource.1"); to extract this, follow the same instructions as for - the floppy disk version (see below). - - * If you have the floppy disk version of Doom, first copy the - contents of all the floppy disks into a directory together. You - will have several large files with numbered extensions. - Concatenate these into a single file, eg. - - (Unix instructions) - cat doom_se.1 doom_se.2 doom_se.3 doom_se.4 doom_se.5 > doom_se.exe - - (Windows/DOS instructions) - copy doom_se.1+doom_se.2+doom_se.3+doom_se.4+doom_se+5 doom_se.exe - - The resulting file is self-extracting LHA file. If you have a DOS - emulator (such as DOSbox), you can run it to extract the files; - alternatively, you can use the Unix LHA tool to extract the - archive. - - * The Doom games are also available for download on Steam - (http://www.steampowered.com/). To find the IWAD files, look in - your Steam directory, under the "steamapps/common" path. - -Running the game ----------------- - -When you have an IWAD file, install it through one of the following -methods: - - * Under Mac OS X, you can specify the locations of the IWAD files - through the graphical launcher program. Click the "Configure..." - button, and then click "Set..." for each IWAD location to choose - its location. - - * Under Unix, put the file into the /usr/share/games/doom or - /usr/local/share/games/doom directories. - - * Place it in a directory and set the environment variable DOOMWADDIR - to be the path to that directory. - - * Install multiple IWADs into separate directories and set the - environment variable DOOMWADPATH to be a colon-separated list of - directories to search (similar to the Unix PATH environment - variable). - - * Run Chocolate Doom with the '-iwad' command line parameter to - specify the IWAD file to use, eg. - - chocolate-doom -iwad /root/doom2.wad - -Playing with Chex Quest ------------------------ - -Chex Quest is a game based on Doom with some minor modifications that -was distributed with boxes of Chex cereal in 1997. It is possible to -play Chex Quest using Chocolate Doom. To do this, the following files -are needed: - - * The IWAD file 'chex.wad', from the Chex Quest CD. - - * The dehacked patch 'chex.deh', which can be found in the /idgames - repository in utils/exe_edit/patches/chexdeh.zip. - -Copy these files into a directory together and use the '-iwad' command -line parameter to specify the Chex Quest IWAD file: - - chocolate-doom -iwad chex.wad - -Installing upgrades -------------------- - -Chocolate Doom requires a Doom 1.9 IWAD file. Generally, if you -install a recent version of Doom you should automatically have a 1.9 -IWAD. However, if you are installing from a very old CD version or -from floppy disks, you might find you have an older version. - -The most obvious symptom of an out of date IWAD file is that the game -will exit at the title screen before the demo starts, with the message -"Demo is from a different game version!". If this happens, your IWAD -file is out of date and you need to upgrade. - -Id Software released upgrade patches that will update your game to -1.9. The following sites have the patches: - - http://www.doomworld.com/files/patches.shtml - http://www.doom2.net/doom2/utils.html - ftp://ftp.idsoftware.com/idstuff/doom2 - -As the patches are binary patches that run as DOS executables, you -will need a DOS emulator (such as DOSBox) to install them. - -Music support -------------- - -Support for Doom's MIDI music is available through Timidity: - - http://timidity.sourceforge.net/ - -A good set of patches for Timidity is the eawpats collection, which can -be found here: - - http://www.doomworld.com/idgames/index.php?id=13928 - (Doom idgames archive, /sounds/eawpats.zip) - -If compiling from source, be sure to compile and install timidity -before installing SDL_mixer. - diff --git a/Makefile.am b/Makefile.am index a766d348..310bb5f6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -33,24 +33,31 @@ DATA_FILES= \ data/setup.png \ data/convert-icon +DOC_FILES= \ + CMDLINE \ + README \ + README.OPL \ + BUGS \ + NEWS \ + ChangeLog \ + NOT-BUGS + EXTRA_DIST= \ $(AUX_DIST_GEN) \ $(MSVC_FILES) \ $(CODEBLOCKS_FILES) \ $(DATA_FILES) \ + $(DOC_FILES) \ .lvimrc \ - config.h \ - CMDLINE \ HACKING \ - README.OPL \ TODO \ - BUGS \ - NOT-BUGS \ rpm.spec +docdir=$(prefix)/share/doc/@PACKAGE@ +doc_DATA=$(DOC_FILES) + MAINTAINERCLEANFILES = $(AUX_DIST_GEN) -docdir=$(prefix)/share/doc/@PACKAGE@ SUBDIRS=wince textscreen opl pcsound src man setup DIST_SUBDIRS=pkg $(SUBDIRS) @@ -61,5 +68,8 @@ noinst_DATA=CMDLINE CMDLINE : src/ ./man/docgen -p man/CMDLINE.template src/ > $@ +INSTALL : man/INSTALL.template man/simplecpp + ./man/simplecpp < man/INSTALL.template > $@ + endif diff --git a/NEWS b/NEWS index 6830685a..73d3f6a2 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,12 @@ 1.6.0 (2011-??-??): + * The instructions in the INSTALL file are now customized for + different platforms, and each binary package contains a version + with instructions specific to the platform that it is + targetting. This should help to avoid confusion that some + users have reported experiencing. + + Compatibility: * Added support for the alternate version of the Final Doom executable included in some later versions of the Id Anthology. This version fixed the demo loop crash that occurred with the @@ -10,8 +17,6 @@ with the Final Doom IWADs (the original behavior can be selected with -gameversion final). (thanks Porsche Monty, Enjay). - - Compatibility: * Very short sound effects are not played, to better emulate the behavior of DMX in Vanilla Doom (thanks to Quasar for help in investigating this). diff --git a/autogen.sh b/autogen.sh index 851603c6..193ae3cd 100755 --- a/autogen.sh +++ b/autogen.sh @@ -4,7 +4,7 @@ mkdir autotools aclocal autoheader -automake -a -c +automake autoconf automake diff --git a/man/INSTALL.template b/man/INSTALL.template new file mode 100644 index 00000000..aab5ff01 --- /dev/null +++ b/man/INSTALL.template @@ -0,0 +1,250 @@ + +Chocolate Doom installation +=========================== + +These are instructions for how to install and set up Chocolate Doom +for play. + +#ifn PRECOMPILED +Building Chocolate Doom +----------------------- + +Before you can play Chocolate Doom, you need to compile a binary that +you can run. For compilation, Chocolate Doom requires the following +to be installed: + + * A C compiler (gcc is recommended) + * make (GNU make is recommended) + * LibSDL (see http://www.libsdl.org/) + * SDL_mixer (see http://www.libsdl.org/projects/SDL_mixer/) + * SDL_net (see http://www.libsdl.org/projects/SDL_net/) + * Python (optional) + +Follow the standard instructions for installing an autotools-based +package: + + 1. Run './configure' to initialize the package. + 2. Run 'make' to compile the package. + 3. Run 'make install' to install the package. + +An automated build script is available that installs the necessary +dependencies and builds the source code automatically. See the build +instructions on the website. + +Advanced topics such as cross-compilation are beyond the scope of this +document. Please see the GNU autoconf / automake documentation for more +information. + +#endif +Obtaining an IWAD file +---------------------- + +To play Doom, you need an IWAD file. This file contains the game data +that is used in gameplay (graphics, sounds, etc). The full versions of +the Doom games are proprietary and need to be bought. The IWAD file +has one of the following names: + + doom1.wad (Shareware Doom) + doom.wad (Registered / Ultimate Doom) + doom2.wad (Doom 2) + tnt.wad (Final Doom: TNT: Evilution) + plutonia.wad (Final Doom: Plutonia Experiment) + chex.wad (Chex Quest) + +If you don't have a copy of the commercial version, you can download +the shareware version (extract the file named doom1.wad): + + * http://www.doomworld.com/idgames/index.php?id=7053 + (idstuff/doom/win95/doom95.zip in your nearest /idgames mirror) + +If you have a commercial version, obtaining the IWAD file may be slightly +complicated. The method depends on how you obtained your copy of the +game: + +#if _WIN32 + * The Doom games are available to buy for download on Steam + (http://www.steampowered.com/). Chocolate Doom will autodetect + IWADs installed by Steam and you do not need to do anything. +#else + * The Doom games are available to buy for download on Steam + (http://www.steampowered.com/). To find the IWAD files on a + Windows system, look in the Steam directory (usually within + "Program Files"), under the "steamapps/common" path. +#endif + + * There have been several CD-based versions of Doom. Generally, the + IWAD files can be found on the CD and copied off directly. + +#if _WIN32 + * If the IWAD files are not directly available on the CD, or you have + a floppy disk version, you will need to run the install program to + install the game to your hard disk. As the installer is DOS-based, + you may not be able to do this on 64-bit versions of Windows. In + this case, the best suggestion is to use a DOS emulator (such as + DOSbox) to run the installer. +#else + * If the IWAD files are not directly available on the CD, or you have + a floppy disk version, installation is more difficult. The best + suggestion is to use a DOS emulator (such as DOSbox) to run the + installer. +#endif + + * As an alternative to using an emulator, it is possible to extract + the files manually. On the install disk(s), you will find several + files with numbered extensions (with CD versions there may be a + single large file with the extension .1, eg. "resource.1"). + + From the command line it is possible to combine these files into a + single large file, using a command similar to the following: + +#if _WIN32 + copy doom_se.1+doom_se.2+doom_se.3+doom_se.4+doom_se.5 doom_se.lha +#else + cat doom_se.1 doom_se.2 doom_se.3 doom_se.4 doom_se.5 > doom_se.lha +#endif + + The resulting file is an LHA archive file, and it can be extracted + using an LHA archive tool (there is one available for almost every + operating system). + +Running the game +---------------- + +#if __MACOSX__ +Once you have an IWAD file, you can specify its location within the +graphical launcher program. Click the "Configure..." button, and then +click "Set..." for each IWAD location to choose its location. From +the main launcher dialog you can then choose which game you want to +play and click the "Launch" button to start the game. + +If you are an advanced user and like to run Doom from the command +line, you can use the "Open Terminal..." menu item to open a command +line terminal. The DOOMWADPATH environment variable is preconfigured +to point to the locations of the IWAD files set within the launcher. +You can launch the game with a specific IWAD file by typing, for +example: + + chocolate-doom -iwad tnt.wad +#else +Chocolate Doom needs to know where to find your IWAD file. To do this, +do one of the following: + +#if _WIN32 + * Within Explorer, simply place the IWAD file in the same folder as + the Chocolate Doom files, and double-click chocolate-doom.exe. + + * Set the environment variable DOOMWADDIR to the location of a + directory containing your IWAD files. + + * If you have multiple IWADs in different directories, set the + environment variable DOOMWADPATH to be a semicolon-separated list + of directories to search (similar to the PATH environment + variable). + + * Run Chocolate Doom from the command prompt with the '-iwad' command + line parameter to specify the IWAD file to use, eg. + + chocolate-doom -iwad c:\games\doom2.wad +#else + * Put the file into one of the following directories: + + /usr/share/games/doom + /usr/local/share/games/doom + + * Set the environment variable DOOMWADDIR to specify the path to a + directory containing your IWAD files. + + * If you have multiple IWADs in different directories, set the + environment variable DOOMWADPATH to be a colon-separated list of + directories to search (similar to the Unix PATH environment + variable). + + * Run Chocolate Doom from the Unix console with the '-iwad' command + line parameter to specify the IWAD file to use, eg. + + chocolate-doom -iwad /root/doom2.wad +#endif +#endif + +Playing with Chex Quest +----------------------- + +Chex Quest is a game based on Doom with some minor modifications that +was distributed with boxes of Chex cereal in 1997. It is possible to +play Chex Quest using Chocolate Doom. To do this, the following files +are needed: + + * The IWAD file 'chex.wad', from the Chex Quest CD. + + * The dehacked patch 'chex.deh', which can be found in the /idgames + repository in utils/exe_edit/patches/chexdeh.zip. + +Copy these files into a directory together and use the '-iwad' command +line parameter to specify the Chex Quest IWAD file: + + chocolate-doom -iwad chex.wad + +Installing upgrades +------------------- + +Chocolate Doom requires a version 1.9 IWAD file. Generally, if you +install a recent version of Doom you should have a version 1.9 IWAD. +However, if you are installing from a very old CD version or from +floppy disks, you might find you have an older version. + +The most obvious symptom of an out of date IWAD file is that the game +will exit at the title screen before the demo starts, with the message +"Demo is from a different game version!". If this happens, your IWAD +file is out of date and you need to upgrade. + +Id Software released upgrade patches that will update your game to +version 1.9. The following sites have the patches: + + http://www.doomworld.com/files/patches.shtml + http://www.doom2.net/doom2/utils.html + ftp://ftp.idsoftware.com/idstuff/doom2 + +#if _WIN32 +As the patches are binary patches that run as DOS executables, on +recent 64-bit versions of Windows you will need to use a DOS emulator +(such as DOSBox) to run them. +#else +As the patches are binary patches that run as DOS executables, you +will need to use a DOS emulator (such as DOSBox) to run them. +#endif + +Music support +------------- + +Chocolate Doom includes OPL emulation code that accurately reproduces +the way that the in-game music sounded under DOS when using an +Adlib/Soundblaster card. This is, however, not to everyone's taste. + +#if _WIN32 +Better quality MIDI playback is possible by using Windows' native +MIDI synthesizer that is part of the operating system. Select "Native +MIDI" within the sound dialog in the setup tool. + +#endif +#if __MACOSX__ +High quality MIDI playback is possible by using Mac OS X's native MIDI +synthesizer that is part of the operating system. Select "Native MIDI" +within the sound dialog in the setup tool. + +#endif +As an alternative it is possible to use Timidity for high quality MIDI +playback: + + http://timidity.sourceforge.net/ + +A good set of patches for Timidity is the eawpats collection, which can +be found here: + + http://www.doomworld.com/idgames/index.php?id=13928 + (Doom idgames archive, /sounds/eawpats.zip) + +#ifn PRECOMPILED +When compiling from source, be sure to compile and install timidity +before installing SDL_mixer. +#endif + diff --git a/man/Makefile.am b/man/Makefile.am index 698c0862..abfe76fd 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -1,6 +1,8 @@ MANPAGE_GEN_FILES=manpage.template docgen default.cfg.template extra.cfg.template +docdir=$(prefix)/share/doc/@PACKAGE@ + if HAVE_PYTHON man_MANS=chocolate-doom.6 \ @@ -9,6 +11,8 @@ man_MANS=chocolate-doom.6 \ default.cfg.5 \ $(PACKAGE).cfg.5 +nodist_doc_DATA=INSTALL + chocolate-doom.6: ../src $(MANPAGE_GEN_FILES) ./docgen -m manpage.template ../src > $@ @@ -18,9 +22,14 @@ default.cfg.5: ../src default.cfg.template $(PACKAGE).cfg.5: ../src extra.cfg.template ./docgen -m extra.cfg.template -c $(PACKAGE).cfg ../src > $@ +INSTALL: + ./simplecpp -DPRECOMPILED < INSTALL.template > $@ + endif EXTRA_DIST = $(man_MANS) $(MANPAGE_GEN_FILES) \ wikipages \ - CMDLINE.template + CMDLINE.template \ + INSTALL.template \ + simplecpp diff --git a/man/simplecpp b/man/simplecpp new file mode 100755 index 00000000..d277f278 --- /dev/null +++ b/man/simplecpp @@ -0,0 +1,211 @@ +#!/usr/bin/env python +# +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 +# Contributors to the Freedoom project. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of the freedoom project nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +# PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# +# simple cpp-style preprocessor +# +# Understands: +# +# #define NAME +# +# Set an option +# You can use -D on the command line too +# +# #undef NAME +# +# Unset an option if it is set +# +# #if .. #endif / #ifdef .. #endif +# +# Specify a list of options set, eg #ifdef DOOM2 || ULTDOOM || SHAREWARE +# The block is only displayed if one of the options is set +# +# #ifn .. #endif / #ifndef .. #endif +# +# Similarly specify a list of options +# The block is displayed if none of the options are set +# +# #include "filename" +# +# include the contents of a file + +import sys +import re + +debug = False +defines = {} + +command_re = re.compile("\#(\w+)(\s+(.*))?") +include_re = re.compile("\s*\"(.*)\"\s*") + +def debug_msg(message): + if debug: + sys.stderr.write(message) + +# Parse command line options + +def parse_cmdline(): + for arg in sys.argv[1:]: + if arg.startswith("-D"): + name = arg[2:] + defines[name] = True + +def parse_stream(stream): + result = read_block(stream, False) + + if result is not None: + raise Exception("Mismatched #if in '%s'" % stream.name) + +def parse_file(filename): + f = open(filename) + + try: + parse_stream(f) + finally: + f.close() + +# #include + +def cmd_include(arg): + # Extract the filename + + match = include_re.match(arg) + + if not match: + raise Exception("Invalid 'include' command") + + filename = match.group(1) + + # Open the file and process it + + parse_file(filename) + +# #define + +def cmd_define(arg): + defines[arg] = True + +# #undef + +def cmd_undef(arg): + if arg in defines: + del defines[arg] + +# #ifdef/#ifndef + +def cmd_ifdef(arg, command, stream, ignore): + + # Get the define name + name = arg.strip() + + debug_msg("%s %s >\n" % (command, arg)) + + # Should we ignore the contents of this block? + + sub_ignore = (name not in defines) + + if "n" in command: + sub_ignore = not sub_ignore + + # Parse the block + + result = read_block(stream, ignore or sub_ignore) + + debug_msg("%s %s < (%s)\n" % (command, arg, result)) + + # There may be a second "else" block to parse: + + if result == "else": + debug_msg("%s %s else >\n" % (command, arg)) + result = read_block(stream, ignore or (not sub_ignore)) + debug_msg("%s %s else < (%s)\n" % (command, arg, result)) + + # Should end in an endif: + + if result != "endif": + raise Exception("'if' block did not end in an 'endif'") + +commands = { + "include" : cmd_include, + "define" : cmd_define, + "undef" : cmd_undef, + "if" : cmd_ifdef, + "ifdef" : cmd_ifdef, + "ifn" : cmd_ifdef, + "ifndef" : cmd_ifdef, +} + +# Recursive block reading function +# if 'ignore' argument is 1, contents are ignored + +def read_block(stream, ignore): + + for line in stream: + + # Remove newline + + line = line[0:-1] + + # Check if this line has a command + + match = command_re.match(line) + + if match: + command = match.group(1) + arg = match.group(3) + + if command == "else" or command == "endif": + return command + elif command not in commands: + raise Exception("Unknown command: '%s'" % \ + command) + + # Get the callback function. + + func = commands[command] + + # Invoke the callback function. #ifdef commands + # are a special case and need extra arguments. + # Other commands are only executed if we are not + # ignoring this block. + + if func == cmd_ifdef: + cmd_ifdef(arg, command=command, + stream=stream, + ignore=ignore) + elif not ignore: + func(arg) + else: + if not ignore: + print(line) + +parse_cmdline() +parse_stream(sys.stdin) + diff --git a/pkg/config.make.in b/pkg/config.make.in index a2bde418..1d1670ec 100644 --- a/pkg/config.make.in +++ b/pkg/config.make.in @@ -21,7 +21,6 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ DOC_FILES = README \ COPYING \ ChangeLog \ - INSTALL \ NEWS \ BUGS \ NOT-BUGS \ diff --git a/pkg/osx/GNUmakefile b/pkg/osx/GNUmakefile index baaec048..f6fa24ff 100644 --- a/pkg/osx/GNUmakefile +++ b/pkg/osx/GNUmakefile @@ -67,6 +67,10 @@ $(STAGING_DIR): launcher $(TOPLEVEL_DOCS) ./cp-with-libs $(TOPLEVEL)/setup/chocolate-setup "$(APP_BIN_DIR)" $(STRIP) "$(APP_BIN_DIR)/chocolate-setup" + $(TOPLEVEL)/man/simplecpp -DPRECOMPILED -D__MACOSX__ \ + < $(TOPLEVEL)/man/INSTALL.template \ + > $(STAGING_DIR)/INSTALL + find $(STAGING_DIR) -name .svn -delete -exec rm -rf {} \; || true clean : launcher_clean diff --git a/pkg/win32/GNUmakefile b/pkg/win32/GNUmakefile index 31968795..7df4cc16 100644 --- a/pkg/win32/GNUmakefile +++ b/pkg/win32/GNUmakefile @@ -27,6 +27,10 @@ staging: $(EXE_FILES) $(DLL_FILES) $(patsubst %,../../%,$(DOC_FILES)) cp $(TOPLEVEL)/$$f staging/$$f.txt; \ unix2dos staging/$$f.txt; \ done + $(TOPLEVEL)/man/simplecpp -D_WIN32 -DPRECOMPILED \ + < $(TOPLEVEL)/man/INSTALL.template \ + > staging/INSTALL.txt + unix2dos staging/INSTALL.txt clean: rm -f $(ZIP) diff --git a/rpm.spec.in b/rpm.spec.in index 9717ebfb..f9c001bb 100644 --- a/rpm.spec.in +++ b/rpm.spec.in @@ -49,14 +49,6 @@ rm -rf $RPM_BUILD_ROOT %files %doc %{_mandir}/man5/* %doc %{_mandir}/man6/* -%doc README -%doc README.OPL -%doc INSTALL -%doc NEWS -%doc AUTHORS -%doc COPYING -%doc CMDLINE -%doc BUGS -%doc NOT-BUGS +/usr/share/doc/@PACKAGE@/* /usr/games/* -- cgit v1.2.3 From b2c9fd8841099d357e0391c47fe144efff96f906 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 10 Mar 2011 19:20:10 +0000 Subject: Minor tweak to INSTALL instructions. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2300 --- man/INSTALL.template | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/man/INSTALL.template b/man/INSTALL.template index aab5ff01..70ab4665 100644 --- a/man/INSTALL.template +++ b/man/INSTALL.template @@ -40,9 +40,9 @@ Obtaining an IWAD file ---------------------- To play Doom, you need an IWAD file. This file contains the game data -that is used in gameplay (graphics, sounds, etc). The full versions of -the Doom games are proprietary and need to be bought. The IWAD file -has one of the following names: +(graphics, sounds, etc). The full versions of the Doom games are +proprietary and need to be bought. The IWAD file has one of the +following names: doom1.wad (Shareware Doom) doom.wad (Registered / Ultimate Doom) @@ -51,15 +51,15 @@ has one of the following names: plutonia.wad (Final Doom: Plutonia Experiment) chex.wad (Chex Quest) -If you don't have a copy of the commercial version, you can download +If you don't have a copy of a commercial version, you can download the shareware version (extract the file named doom1.wad): * http://www.doomworld.com/idgames/index.php?id=7053 (idstuff/doom/win95/doom95.zip in your nearest /idgames mirror) -If you have a commercial version, obtaining the IWAD file may be slightly -complicated. The method depends on how you obtained your copy of the -game: +If you have a commercial version, obtaining the IWAD file is usually +straightforward. The method depends on how you obtained your copy of +the game: #if _WIN32 * The Doom games are available to buy for download on Steam @@ -133,6 +133,11 @@ do one of the following: * Within Explorer, simply place the IWAD file in the same folder as the Chocolate Doom files, and double-click chocolate-doom.exe. + * Run Chocolate Doom from the command prompt with the '-iwad' command + line parameter to specify the IWAD file to use, eg. + + chocolate-doom -iwad c:\games\doom2.wad + * Set the environment variable DOOMWADDIR to the location of a directory containing your IWAD files. @@ -140,12 +145,12 @@ do one of the following: environment variable DOOMWADPATH to be a semicolon-separated list of directories to search (similar to the PATH environment variable). - - * Run Chocolate Doom from the command prompt with the '-iwad' command +#else + * Run Chocolate Doom from the Unix console with the '-iwad' command line parameter to specify the IWAD file to use, eg. - chocolate-doom -iwad c:\games\doom2.wad -#else + chocolate-doom -iwad /root/doom2.wad + * Put the file into one of the following directories: /usr/share/games/doom @@ -158,11 +163,6 @@ do one of the following: environment variable DOOMWADPATH to be a colon-separated list of directories to search (similar to the Unix PATH environment variable). - - * Run Chocolate Doom from the Unix console with the '-iwad' command - line parameter to specify the IWAD file to use, eg. - - chocolate-doom -iwad /root/doom2.wad #endif #endif @@ -176,8 +176,9 @@ are needed: * The IWAD file 'chex.wad', from the Chex Quest CD. - * The dehacked patch 'chex.deh', which can be found in the /idgames - repository in utils/exe_edit/patches/chexdeh.zip. + * The dehacked patch 'chex.deh', which can be found here: + http://www.doomworld.com/idgames/?id=15420 + (utils/exe_edit/patches/chexdeh.zip in your nearest /idgames mirror) Copy these files into a directory together and use the '-iwad' command line parameter to specify the Chex Quest IWAD file: -- cgit v1.2.3 From 35e27b41d787adca0b4f5c2ec394effb5475301b Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 10 Mar 2011 19:45:29 +0000 Subject: Minor tweaks to MacOS instructions. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2301 --- man/INSTALL.template | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/man/INSTALL.template b/man/INSTALL.template index 70ab4665..2d9c80e3 100644 --- a/man/INSTALL.template +++ b/man/INSTALL.template @@ -113,13 +113,13 @@ Running the game #if __MACOSX__ Once you have an IWAD file, you can specify its location within the graphical launcher program. Click the "Configure..." button, and then -click "Set..." for each IWAD location to choose its location. From -the main launcher dialog you can then choose which game you want to -play and click the "Launch" button to start the game. +click "Set..." for each IWAD to choose its location. From the main +launcher dialog you can then choose which game you want to play and +click the "Launch" button to start the game. If you are an advanced user and like to run Doom from the command -line, you can use the "Open Terminal..." menu item to open a command -line terminal. The DOOMWADPATH environment variable is preconfigured +line, you can use the "Command Prompt..." menu item to open a Terminal +window. The DOOMWADPATH environment variable is preconfigured to point to the locations of the IWAD files set within the launcher. You can launch the game with a specific IWAD file by typing, for example: -- cgit v1.2.3 From d4e56754210c2b449c3d7a8dc3eb9886d89ff593 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 10 Mar 2011 19:47:14 +0000 Subject: Include Unix manpages in MacOS package, and set MANPATH to point to them when opening a terminal window. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2302 --- pkg/osx/Execute.m | 2 ++ pkg/osx/GNUmakefile | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/pkg/osx/Execute.m b/pkg/osx/Execute.m index 608443e2..25f5e67d 100644 --- a/pkg/osx/Execute.m +++ b/pkg/osx/Execute.m @@ -175,6 +175,8 @@ void OpenTerminalWindow(const char *doomwadpath) fprintf(stream, "#!/bin/sh\n"); //fprintf(stream, "set -x\n"); fprintf(stream, "PATH=\"%s:$PATH\"\n", executable_path); + fprintf(stream, "MANPATH=\"%s/man:$(manpath)\"\n", executable_path); + fprintf(stream, "export MANPATH\n"); fprintf(stream, "DOOMWADPATH=\"%s\"\n", doomwadpath); fprintf(stream, "export DOOMWADPATH\n"); fprintf(stream, "rm -f \"%s\"\n", TEMP_SCRIPT); diff --git a/pkg/osx/GNUmakefile b/pkg/osx/GNUmakefile index f6fa24ff..f9bb6417 100644 --- a/pkg/osx/GNUmakefile +++ b/pkg/osx/GNUmakefile @@ -73,6 +73,10 @@ $(STAGING_DIR): launcher $(TOPLEVEL_DOCS) find $(STAGING_DIR) -name .svn -delete -exec rm -rf {} \; || true + mkdir -p "$(APP_BIN_DIR)/man/man5" "$(APP_BIN_DIR)/man/man6" + cp $(TOPLEVEL)/man/*.5 "$(APP_BIN_DIR)/man/man5" + cp $(TOPLEVEL)/man/*.6 "$(APP_BIN_DIR)/man/man6" + clean : launcher_clean rm -f $(DMG) rm -rf $(STAGING_DIR) -- cgit v1.2.3 From 3d641baeb5a3cfce3c35b23af3486e28541c2aac Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Tue, 15 Mar 2011 22:41:22 +0000 Subject: Fix NEWS entry to list the full name for Alexandre Xavier. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2303 --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 73d3f6a2..e8b16fe4 100644 --- a/NEWS +++ b/NEWS @@ -28,7 +28,7 @@ * Menu navigation when using joystick/joypad (thanks Alexandre Xavier). * For configuration file value for shift keys, use scan code for - right shift, not left shift (thanks AlexXav). + right shift, not left shift (thanks Alexandre Xavier). * Default joystick buttons for the setup tool now match Vanilla (thanks twipley). * Visual Studio project files work again (thanks GhostlyDeath). -- cgit v1.2.3 From e512baa1c728602a3b7077741ec97ae4561b1200 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 17 Mar 2011 22:43:56 +0000 Subject: Fix up placement of display settings window. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2304 --- setup/display.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/setup/display.c b/setup/display.c index b4e95688..44376eef 100644 --- a/setup/display.c +++ b/setup/display.c @@ -579,6 +579,7 @@ void ConfigDisplay(void) txt_checkbox_t *ar_checkbox; txt_dropdown_list_t *bpp_selector; int num_columns; + int num_rows; int window_y; // What color depths are supported? Generate supported_bpps array @@ -611,8 +612,6 @@ void ConfigDisplay(void) BuildFullscreenModesList(); - window_y = 5; - if (num_screen_modes_fullscreen <= 18) { num_columns = 3; @@ -624,7 +623,17 @@ void ConfigDisplay(void) else { num_columns = 5; - window_y -= 3; + } + + num_rows = (num_screen_modes_fullscreen + num_columns - 1) / num_columns; + + if (num_rows < 10) + { + window_y = 6 - ((num_rows + 1) / 2); + } + else + { + window_y = 1; } modes_table = TXT_NewTable(num_columns); -- cgit v1.2.3 From c724b3877a4d67e6ed377df84e454ec11d6c4f1c Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 17 Mar 2011 22:54:33 +0000 Subject: Add back -a option to automake, and remove INSTALL if automake installs it. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2305 --- autogen.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/autogen.sh b/autogen.sh index 193ae3cd..d9cbcfca 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,12 +1,26 @@ #!/bin/sh +if [ -e INSTALL ]; then + have_INSTALL=true +else + have_INSTALL=false +fi + mkdir autotools aclocal autoheader -automake +automake -ac autoconf automake +# The INSTALL file is autogenerated, so it isn't stored in version control. +# As the file isn't present, automake's -a option will install generic +# install instructions. So remove INSTALL if automake installed one. + +if ! $have_INSTALL; then + rm -f INSTALL +fi + ./configure "$@" -- cgit v1.2.3 From 7093b65c7d3aa88e6fcaaf2994e76db27d8c31aa Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Tue, 22 Mar 2011 19:49:31 +0000 Subject: Reorganise the display settings window. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2306 --- setup/display.c | 195 +++++++++++++++++++++++++++++++++----------------------- 1 file changed, 117 insertions(+), 78 deletions(-) diff --git a/setup/display.c b/setup/display.c index 44376eef..67e398b8 100644 --- a/setup/display.c +++ b/setup/display.c @@ -519,23 +519,17 @@ static void UpdateBPP(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(modes_table)) #if defined(_WIN32) && !defined(_WIN32_WCE) -static int win32_video_driver = 0; - -static char *win32_video_drivers[] = -{ - "DirectX", - "Windows GDI", -}; +static int use_directx = 1; static void SetWin32VideoDriver(void) { if (!strcmp(video_driver, "windib")) { - win32_video_driver = 1; + use_directx = 0; } else { - win32_video_driver = 0; + use_directx = 1; } } @@ -543,13 +537,15 @@ static void UpdateVideoDriver(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(modes_table)) { TXT_CAST_ARG(txt_table_t, modes_table); - char *drivers[] = - { - "", - "windib", - }; - video_driver = drivers[win32_video_driver != 0]; + if (use_directx) + { + video_driver = ""; + } + else + { + video_driver = "windib"; + } // When the video driver is changed, we need to restart the textscreen // library. @@ -569,6 +565,48 @@ static void UpdateVideoDriver(TXT_UNCAST_ARG(widget), #endif +static void AdvancedDisplayConfig(TXT_UNCAST_ARG(widget), + TXT_UNCAST_ARG(modes_table)) +{ + TXT_CAST_ARG(txt_table_t, modes_table); + txt_window_t *window; + txt_checkbox_t *ar_checkbox; + + window = TXT_NewWindow("Advanced display options"); + + TXT_SetColumnWidths(window, 35); + + TXT_AddWidgets(window, + ar_checkbox = TXT_NewCheckBox("Fix aspect ratio", + &aspect_ratio_correct), + TXT_NewCheckBox("Show ENDOOM screen on exit", &show_endoom), + NULL); + + TXT_SignalConnect(ar_checkbox, "changed", GenerateModesTable, modes_table); + + // On Windows, there is an extra control to change between + // the Windows GDI and DirectX video drivers. + +#if defined(_WIN32) && !defined(_WIN32_WCE) + { + txt_radiobutton_t *dx_button, *gdi_button; + + TXT_AddWidgets(window, + TXT_NewSeparator("Windows video driver"), + dx_button = TXT_NewRadioButton("DirectX", + &use_directx, 1), + gdi_button = TXT_NewRadioButton("Windows GDI", + &use_directx, 0), + NULL); + + TXT_SignalConnect(dx_button, "selected", + UpdateVideoDriver, modes_table); + TXT_SignalConnect(gdi_button, "selected", + UpdateVideoDriver, modes_table); + SetWin32VideoDriver(); + } +#endif +} void ConfigDisplay(void) { @@ -576,8 +614,8 @@ void ConfigDisplay(void) txt_table_t *modes_table; txt_table_t *bpp_table; txt_checkbox_t *fs_checkbox; - txt_checkbox_t *ar_checkbox; - txt_dropdown_list_t *bpp_selector; + txt_window_action_t *advanced_button; + int i; int num_columns; int num_rows; int window_y; @@ -597,14 +635,8 @@ void ConfigDisplay(void) } // Open the window - - window = TXT_NewWindow("Display Configuration"); - TXT_AddWidgets(window, - fs_checkbox = TXT_NewCheckBox("Fullscreen", &fullscreen), - ar_checkbox = TXT_NewCheckBox("Correct aspect ratio", - &aspect_ratio_correct), - NULL); + window = TXT_NewWindow("Display Configuration"); // Some machines can have lots of video modes. This tries to // keep a limit of six lines by increasing the number of @@ -612,11 +644,11 @@ void ConfigDisplay(void) BuildFullscreenModesList(); - if (num_screen_modes_fullscreen <= 18) + if (num_screen_modes_fullscreen <= 24) { num_columns = 3; } - else if (num_screen_modes_fullscreen <= 24) + else if (num_screen_modes_fullscreen <= 40) { num_columns = 4; } @@ -625,76 +657,83 @@ void ConfigDisplay(void) num_columns = 5; } - num_rows = (num_screen_modes_fullscreen + num_columns - 1) / num_columns; - - if (num_rows < 10) - { - window_y = 6 - ((num_rows + 1) / 2); - } - else - { - window_y = 1; - } - modes_table = TXT_NewTable(num_columns); - // The window is set at a fixed vertical position. This keeps - // the top of the window stationary when switching between - // fullscreen and windowed mode (which causes the window's - // height to change). + // Build window: - TXT_SetWindowPosition(window, TXT_HORIZ_CENTER, TXT_VERT_TOP, - TXT_SCREEN_W / 2, window_y); - - // On Windows, there is an extra control to change between - // the Windows GDI and DirectX video drivers. + TXT_AddWidget(window, + fs_checkbox = TXT_NewCheckBox("Full screen", &fullscreen)); -#if defined(_WIN32) && !defined(_WIN32_WCE) + if (num_supported_bpps > 1) { - txt_table_t *driver_table; - txt_dropdown_list_t *driver_list; - - driver_table = TXT_NewTable(2); - - TXT_SetColumnWidths(driver_table, 20, 0); - - TXT_AddWidgets(driver_table, - TXT_NewLabel("Video driver"), - driver_list = TXT_NewDropdownList(&win32_video_driver, - win32_video_drivers, - 2), + TXT_AddWidgets(window, + TXT_NewSeparator("Color depth"), + bpp_table = TXT_NewTable(4), NULL); - TXT_SignalConnect(driver_list, "changed", - UpdateVideoDriver, modes_table); - SetWin32VideoDriver(); + for (i = 0; i < num_supported_bpps; ++i) + { + txt_radiobutton_t *button; - TXT_AddWidget(window, driver_table); - } -#endif + button = TXT_NewRadioButton(supported_bpps[i], + &selected_bpp, i); - // Screen modes list + TXT_AddWidget(bpp_table, button); + TXT_SignalConnect(button, "selected", UpdateBPP, modes_table); + } + } TXT_AddWidgets(window, TXT_NewSeparator("Screen mode"), - bpp_table = TXT_NewTable(2), modes_table, - TXT_NewSeparator("Misc."), - TXT_NewCheckBox("Show ENDOOM screen", &show_endoom), NULL); - TXT_AddWidgets(bpp_table, - TXT_NewLabel("Color depth: "), - bpp_selector = TXT_NewDropdownList(&selected_bpp, - supported_bpps, - num_supported_bpps), - NULL); + TXT_SignalConnect(fs_checkbox, "changed", GenerateModesTable, modes_table); + // How many rows high will the configuration window be? + // Need to take into account number of fullscreen modes, and also + // number of supported pixel depths. + // The windowed modes list is four rows, so take the maximum of + // windowed and fullscreen. - TXT_SignalConnect(bpp_selector, "changed", UpdateBPP, modes_table); - TXT_SignalConnect(fs_checkbox, "changed", GenerateModesTable, modes_table); - TXT_SignalConnect(ar_checkbox, "changed", GenerateModesTable, modes_table); + num_rows = (num_screen_modes_fullscreen + num_columns - 1) / num_columns; + + if (num_rows < 4) + { + num_rows = 4; + } + + if (num_supported_bpps > 1) + { + num_rows += 2; + } + + if (num_rows < 14) + { + window_y = 8 - ((num_rows + 1) / 2); + } + else + { + window_y = 1; + } + + // The window is set at a fixed vertical position. This keeps + // the top of the window stationary when switching between + // fullscreen and windowed mode (which causes the window's + // height to change). + + TXT_SetWindowPosition(window, TXT_HORIZ_CENTER, TXT_VERT_TOP, + TXT_SCREEN_W / 2, window_y); GenerateModesTable(NULL, modes_table); + + // Button to open "advanced" window. + // Need to pass a pointer to the modes table, as some of the options + // in there trigger a rebuild of it. + + advanced_button = TXT_NewWindowAction('a', "Advanced"); + TXT_SetWindowAction(window, TXT_HORIZ_CENTER, advanced_button); + TXT_SignalConnect(advanced_button, "pressed", + AdvancedDisplayConfig, modes_table); } -- cgit v1.2.3 From bc087b49e2e5a9c00b5b1620b4bd289ebee5ee73 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Tue, 22 Mar 2011 21:08:04 +0000 Subject: Fix scrollbars so that clicks scroll the pane to a location that matches the clicked location. Interpret mousewheel events so that scroll panes can be scrolled. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2307 --- textscreen/txt_main.h | 10 ++++++---- textscreen/txt_scrollpane.c | 36 ++++++++++++++++++++++++++++++++---- 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/textscreen/txt_main.h b/textscreen/txt_main.h index add30fa3..601548e5 100644 --- a/textscreen/txt_main.h +++ b/textscreen/txt_main.h @@ -34,10 +34,12 @@ // Special keypress values that correspond to mouse button clicks -#define TXT_MOUSE_BASE 0x10000 -#define TXT_MOUSE_LEFT (TXT_MOUSE_BASE + 0) -#define TXT_MOUSE_RIGHT (TXT_MOUSE_BASE + 1) -#define TXT_MOUSE_MIDDLE (TXT_MOUSE_BASE + 2) +#define TXT_MOUSE_BASE 0x10000 +#define TXT_MOUSE_LEFT (TXT_MOUSE_BASE + 0) +#define TXT_MOUSE_RIGHT (TXT_MOUSE_BASE + 1) +#define TXT_MOUSE_MIDDLE (TXT_MOUSE_BASE + 2) +#define TXT_MOUSE_SCROLLUP (TXT_MOUSE_BASE + 3) +#define TXT_MOUSE_SCROLLDOWN (TXT_MOUSE_BASE + 4) #define TXT_MAX_MOUSE_BUTTONS 16 // Screen size diff --git a/textscreen/txt_scrollpane.c b/textscreen/txt_scrollpane.c index 17c9bcbf..903c7910 100644 --- a/textscreen/txt_scrollpane.c +++ b/textscreen/txt_scrollpane.c @@ -416,6 +416,33 @@ static void TXT_ScrollPaneMousePress(TXT_UNCAST_ARG(scrollpane), scrollbars = NeedsScrollbars(scrollpane); + if (b == TXT_MOUSE_SCROLLUP) + { + if (scrollbars & SCROLLBAR_VERTICAL) + { + --scrollpane->y; + } + else if (scrollbars & SCROLLBAR_HORIZONTAL) + { + --scrollpane->x; + } + + return; + } + else if (b == TXT_MOUSE_SCROLLDOWN) + { + if (scrollbars & SCROLLBAR_VERTICAL) + { + ++scrollpane->y; + } + else if (scrollbars & SCROLLBAR_HORIZONTAL) + { + ++scrollpane->x; + } + + return; + } + rel_x = x - scrollpane->widget.x; rel_y = y - scrollpane->widget.y; @@ -433,14 +460,15 @@ static void TXT_ScrollPaneMousePress(TXT_UNCAST_ARG(scrollpane), else { int range = FullWidth(scrollpane) - scrollpane->w; + int bar_max = scrollpane->w - 3; - scrollpane->x = ((rel_x - 1) * range) / (scrollpane->w - 3); + scrollpane->x = ((rel_x - 1) * range + (bar_max / 2)) / bar_max; } return; } - // Click on the horizontal scrollbar? + // Click on the vertical scrollbar? if ((scrollbars & SCROLLBAR_VERTICAL) && rel_x == scrollpane->w) { if (rel_y == 0) @@ -454,8 +482,9 @@ static void TXT_ScrollPaneMousePress(TXT_UNCAST_ARG(scrollpane), else { int range = FullHeight(scrollpane) - scrollpane->h; + int bar_max = scrollpane->h - 3; - scrollpane->y = ((rel_y - 1) * range) / (scrollpane->h - 3); + scrollpane->y = ((rel_y - 1) * range + (bar_max / 2)) / bar_max; } return; @@ -465,7 +494,6 @@ static void TXT_ScrollPaneMousePress(TXT_UNCAST_ARG(scrollpane), { TXT_WidgetMousePress(scrollpane->child, x, y, b); } - } static void TXT_ScrollPaneLayout(TXT_UNCAST_ARG(scrollpane)) -- cgit v1.2.3 From e339efa45fb54e794d1dd26f7a716a383cc3dc6d Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Tue, 22 Mar 2011 21:33:17 +0000 Subject: Switch separator to show "screen mode" or "window size" depending on whether fullscreen is turned on or not. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2308 --- NEWS | 6 ++++++ setup/display.c | 26 +++++++++++++++++++++++--- textscreen/txt_separator.c | 24 ++++++++++++++++-------- textscreen/txt_separator.h | 10 +++++++++- 4 files changed, 54 insertions(+), 12 deletions(-) diff --git a/NEWS b/NEWS index e8b16fe4..d0fee599 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,8 @@ with instructions specific to the platform that it is targetting. This should help to avoid confusion that some users have reported experiencing. + * The display settings window in the setup tool has been + reorganised to a better arrangement. Compatibility: * Added support for the alternate version of the Final Doom @@ -36,6 +38,10 @@ libtextscreen: * It is now possible to type a '+' in input boxes (thanks Alexandre Xavier). + * It is possible to use the mouse wheel to scroll through scroll + panes. + * Clicking on scroll bars now moves the scroll handle to a + matching location. 1.5.0 (2011-01-02): diff --git a/setup/display.c b/setup/display.c index 67e398b8..f15b2b06 100644 --- a/setup/display.c +++ b/setup/display.c @@ -517,6 +517,21 @@ static void UpdateBPP(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(modes_table)) GenerateModesTable(NULL, modes_table); } +static void UpdateModeSeparator(TXT_UNCAST_ARG(widget), + TXT_UNCAST_ARG(separator)) +{ + TXT_CAST_ARG(txt_separator_t, separator); + + if (fullscreen) + { + TXT_SetSeparatorLabel(separator, "Screen mode"); + } + else + { + TXT_SetSeparatorLabel(separator, "Window size"); + } +} + #if defined(_WIN32) && !defined(_WIN32_WCE) static int use_directx = 1; @@ -612,9 +627,10 @@ void ConfigDisplay(void) { txt_window_t *window; txt_table_t *modes_table; + txt_separator_t *modes_separator; txt_table_t *bpp_table; - txt_checkbox_t *fs_checkbox; txt_window_action_t *advanced_button; + txt_checkbox_t *fs_checkbox; int i; int num_columns; int num_rows; @@ -684,11 +700,14 @@ void ConfigDisplay(void) } TXT_AddWidgets(window, - TXT_NewSeparator("Screen mode"), + modes_separator = TXT_NewSeparator(""), modes_table, NULL); - TXT_SignalConnect(fs_checkbox, "changed", GenerateModesTable, modes_table); + TXT_SignalConnect(fs_checkbox, "changed", + GenerateModesTable, modes_table); + TXT_SignalConnect(fs_checkbox, "changed", + UpdateModeSeparator, modes_separator); // How many rows high will the configuration window be? // Need to take into account number of fullscreen modes, and also @@ -726,6 +745,7 @@ void ConfigDisplay(void) TXT_SCREEN_W / 2, window_y); GenerateModesTable(NULL, modes_table); + UpdateModeSeparator(NULL, modes_separator); // Button to open "advanced" window. // Need to pass a pointer to the modes table, as some of the options diff --git a/textscreen/txt_separator.c b/textscreen/txt_separator.c index 6b779626..563d0c62 100644 --- a/textscreen/txt_separator.c +++ b/textscreen/txt_separator.c @@ -80,6 +80,20 @@ static void TXT_SeparatorDestructor(TXT_UNCAST_ARG(separator)) free(separator->label); } +void TXT_SetSeparatorLabel(txt_separator_t *separator, char *label) +{ + free(separator->label); + + if (label != NULL) + { + separator->label = strdup(label); + } + else + { + separator->label = NULL; + } +} + txt_widget_class_t txt_separator_class = { TXT_NeverSelectable, @@ -99,14 +113,8 @@ txt_separator_t *TXT_NewSeparator(char *label) TXT_InitWidget(separator, &txt_separator_class); - if (label != NULL) - { - separator->label = strdup(label); - } - else - { - separator->label = NULL; - } + separator->label = NULL; + TXT_SetSeparatorLabel(separator, label); return separator; } diff --git a/textscreen/txt_separator.h b/textscreen/txt_separator.h index 2f2331da..f693d70e 100644 --- a/textscreen/txt_separator.h +++ b/textscreen/txt_separator.h @@ -59,6 +59,14 @@ extern txt_widget_class_t txt_separator_class; txt_separator_t *TXT_NewSeparator(char *label); -#endif /* #ifndef TXT_SEPARATOR_H */ +/** + * Change the label on a separator. + * + * @param separator The separator. + * @param label The new label. + */ + +void TXT_SetSeparatorLabel(txt_separator_t *separator, char *label); +#endif /* #ifndef TXT_SEPARATOR_H */ -- cgit v1.2.3 From 623b4b1a2fdb0a974b20f45a8a3d0bc14db13691 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 27 Mar 2011 23:42:00 +0000 Subject: Change default sfx/music volume in setup tool to 8, to match the game (thanks Alexandre Xavier). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2309 --- NEWS | 3 +++ setup/sound.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index d0fee599..003c35a5 100644 --- a/NEWS +++ b/NEWS @@ -34,6 +34,9 @@ * Default joystick buttons for the setup tool now match Vanilla (thanks twipley). * Visual Studio project files work again (thanks GhostlyDeath). + * The default sfx/music volume set by the setup tool is now 8 + instead of 15, matching the game itself. (thanks Alexandre + Xavier). libtextscreen: * It is now possible to type a '+' in input boxes (thanks diff --git a/setup/sound.c b/setup/sound.c index 59df0532..2352baa1 100644 --- a/setup/sound.c +++ b/setup/sound.c @@ -59,10 +59,10 @@ static char *musmode_strings[] = int snd_sfxdevice = SNDDEVICE_SB; int numChannels = 8; -int sfxVolume = 15; +int sfxVolume = 8; int snd_musicdevice = SNDDEVICE_GENMIDI; -int musicVolume = 15; +int musicVolume = 8; int snd_samplerate = 22050; int opl_io_port = 0x388; -- cgit v1.2.3 From a69af94b58ac491c8a215ebe2f81b3a521b833f4 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 27 Mar 2011 23:45:53 +0000 Subject: Scroll faster in reaction to the scroll wheel. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2310 --- textscreen/txt_scrollpane.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/textscreen/txt_scrollpane.c b/textscreen/txt_scrollpane.c index 903c7910..856f6b8a 100644 --- a/textscreen/txt_scrollpane.c +++ b/textscreen/txt_scrollpane.c @@ -420,11 +420,11 @@ static void TXT_ScrollPaneMousePress(TXT_UNCAST_ARG(scrollpane), { if (scrollbars & SCROLLBAR_VERTICAL) { - --scrollpane->y; + scrollpane->y -= 3; } else if (scrollbars & SCROLLBAR_HORIZONTAL) { - --scrollpane->x; + scrollpane->x -= 3; } return; @@ -433,11 +433,11 @@ static void TXT_ScrollPaneMousePress(TXT_UNCAST_ARG(scrollpane), { if (scrollbars & SCROLLBAR_VERTICAL) { - ++scrollpane->y; + scrollpane->y += 3; } else if (scrollbars & SCROLLBAR_HORIZONTAL) { - ++scrollpane->x; + scrollpane->x += 3; } return; -- cgit v1.2.3 From 6e099632c653dd42dbe1f719c5887844091da0cc Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 28 Mar 2011 00:24:47 +0000 Subject: Fix weapon cycling from the shotgun to the chaingun in Doom 1 (thanks Alexandre Xavier). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2311 --- NEWS | 2 ++ src/g_game.c | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/NEWS b/NEWS index 003c35a5..b7c5922e 100644 --- a/NEWS +++ b/NEWS @@ -37,6 +37,8 @@ * The default sfx/music volume set by the setup tool is now 8 instead of 15, matching the game itself. (thanks Alexandre Xavier). + * Weapon cycling from the shotgun to the chaingun in Doom 1 now + works properly (thanks Alexandre Xavier). libtextscreen: * It is now possible to type a '+' in input boxes (thanks diff --git a/src/g_game.c b/src/g_game.c index f91e630e..933a1b7b 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -428,6 +428,13 @@ int G_CmdChecksum (ticcmd_t* cmd) static boolean WeaponSelectable(weapontype_t weapon) { + // Can't select the super shotgun in Doom 1. + + if (weapon == wp_supershotgun && gamemission == doom) + { + return false; + } + // Can't select a weapon if we don't own it. if (!players[consoleplayer].weaponowned[weapon]) -- cgit v1.2.3 From d706f9693ee6bfd3976fcb232c1563c32b1cff88 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 28 Mar 2011 21:32:14 +0000 Subject: Allow .lmp files to be loaded (and demo files to be played back) that have long filenames (thanks blzut3). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2312 --- NEWS | 2 ++ src/w_wad.c | 33 ++++++++++++++++++++++----------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index b7c5922e..b76917f2 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,8 @@ users have reported experiencing. * The display settings window in the setup tool has been reorganised to a better arrangement. + * It is now possible to load .lmp files (and play back demos) + with long filenames (thanks blzut3). Compatibility: * Added support for the alternate version of the Final Doom diff --git a/src/w_wad.c b/src/w_wad.c index 9425705c..e93147e3 100644 --- a/src/w_wad.c +++ b/src/w_wad.c @@ -74,27 +74,38 @@ static lumpinfo_t **lumphash; static void ExtractFileBase(char *path, char *dest) { - char* src; - int length; + char *src; + char *filename; + int length; src = path + strlen(path) - 1; - + // back up until a \ or the start while (src != path && *(src - 1) != DIR_SEPARATOR) { src--; } - - // copy up to eight characters - memset (dest,0,8); + + filename = src; + + // Copy up to eight characters + // Note: Vanilla Doom exits with an error if a filename is specified + // with a base of more than eight characters. To remove the 8.3 + // filename limit, instead we simply truncate the name. + length = 0; - - while (*src && *src != '.') + memset(dest, 0, 8); + + while (*src != '\0' && *src != '.') { - if (++length == 9) - I_Error ("Filename base of %s >8 chars",path); + if (length >= 8) + { + printf("Warning: Truncated '%s' lump name to '%.8s'.\n", + filename, dest); + break; + } - *dest++ = toupper((int)*src++); + dest[length++] = toupper((int)*src++); } } -- cgit v1.2.3 From a4ff8b18d8c02b566ec1e203f983fc111408a752 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 28 Mar 2011 21:36:00 +0000 Subject: Fix OPL MIDI playback when using an empty .mus / .mid file (thanks Alexandre Xavier). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2313 --- NEWS | 2 ++ src/i_oplmusic.c | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index b76917f2..c0163f8c 100644 --- a/NEWS +++ b/NEWS @@ -41,6 +41,8 @@ Xavier). * Weapon cycling from the shotgun to the chaingun in Doom 1 now works properly (thanks Alexandre Xavier). + * MIDI playback that locked up when using an empty MUS / MIDI + file (thanks Alexandre Xavier). libtextscreen: * It is now possible to type a '+' in input boxes (thanks diff --git a/src/i_oplmusic.c b/src/i_oplmusic.c index e8d65d6d..97ba0783 100644 --- a/src/i_oplmusic.c +++ b/src/i_oplmusic.c @@ -1080,7 +1080,7 @@ static void ScheduleTrack(opl_track_data_t *track); // Restart a song from the beginning. -static void RestartSong(void) +static void RestartSong(void *unused) { unsigned int i; @@ -1118,10 +1118,15 @@ static void TrackTimerCallback(void *arg) --running_tracks; // When all tracks have finished, restart the song. + // Don't restart the song immediately, but wait for 5ms + // before triggering a restart. Otherwise it is possible + // to construct an empty MIDI file that causes the game + // to lock up in an infinite loop. (5ms should be short + // enough not to be noticeable by the listener). if (running_tracks <= 0 && song_looping) { - RestartSong(); + OPL_SetCallback(5, RestartSong, NULL); } return; -- cgit v1.2.3 From 15a1c4924707f78ca4f9e109292e1ca35e83f1f7 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 28 Mar 2011 23:33:09 +0000 Subject: Emulate bug with IDMUS cheat when emulating v1.9 (thanks Alexandre Xavier). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2314 --- NEWS | 2 ++ NOT-BUGS | 17 +++++++++++++++++ src/st_stuff.c | 9 +++++++-- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index c0163f8c..81cc5182 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,8 @@ * The null sector dereference emulation code has been imported from Prboom+ - this fixes a desync with CLNJ-506.LMP (thanks entryway). + * The IDMUS cheat doesn't work when emulating the v1.9 executable + (thanks Alexandre Xavier). Bugs fixed: * Menu navigation when using joystick/joypad (thanks Alexandre diff --git a/NOT-BUGS b/NOT-BUGS index 38d97770..2a6c6500 100644 --- a/NOT-BUGS +++ b/NOT-BUGS @@ -110,3 +110,20 @@ More information can be found here: http://rome.ro/lee_killough/editing/visplane.shtml +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +== IDMUS## cheat doesn't work with shareware/registered Doom IWADs == + +The IDMUS cheat allows the in-game music to be changed. However, in +the original v1.9 this cheat didn't work properly when playing with +the Doom 1 (shareware and registered) IWADs. This bug was fixed in +the Ultimate Doom and Final Doom executables. + +Chocolate Doom emulates this bug. When playing with the shareware or +registered Doom IWADs, the IDMUS cheat therefore does not work +properly. If you are playing with the Ultimate Doom IWAD, the +Ultimate Doom executable is emulated by default, so the cheat works +properly. + +# vim: tw=70 + diff --git a/src/st_stuff.c b/src/st_stuff.c index d9c45098..b1a46df5 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -521,8 +521,13 @@ ST_Responder (event_t* ev) plyr->message = DEH_String(STSTR_MUS); cht_GetParam(&cheat_mus, buf); - - if (gamemode == commercial) + + // Note: The original v1.9 had a bug that tried to play back + // the Doom II music regardless of gamemode. This was fixed + // in the Ultimate Doom executable so that it would work for + // the Doom 1 music as well. + + if (gamemode == commercial || gameversion < exe_ultimate) { musnum = mus_runnin + (buf[0]-'0')*10 + buf[1]-'0' - 1; -- cgit v1.2.3 From 5a2bbe2e13a02167643c93fd1840f068ce5f72f2 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 28 Mar 2011 23:39:48 +0000 Subject: Add vim modeline for text wrapping to documentation text files. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2315 --- BUGS | 2 ++ HACKING | 2 ++ NEWS | 2 ++ README | 2 ++ README.OPL | 2 ++ TODO | 2 ++ man/INSTALL.template | 2 ++ 7 files changed, 14 insertions(+) diff --git a/BUGS b/BUGS index ee6bf09a..a04b5d63 100644 --- a/BUGS +++ b/BUGS @@ -11,3 +11,5 @@ An example of this can be seen in Ledmeister's "Blackbug" demo which shows a bug that relies on the memory layout of the Doom executable. +# vim: tw=70 + diff --git a/HACKING b/HACKING index 699d42e8..9d70637a 100644 --- a/HACKING +++ b/HACKING @@ -172,3 +172,5 @@ this template: // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA // 02111-1307, USA. +# vim: tw=70 + diff --git a/NEWS b/NEWS index 81cc5182..7c7457aa 100644 --- a/NEWS +++ b/NEWS @@ -659,3 +659,5 @@ 0.0.1 (2005-09-07): First beta release +# vim: tw=70 + diff --git a/README b/README index 06dc1537..dbc26b7f 100644 --- a/README +++ b/README @@ -85,3 +85,5 @@ Here are some examples: * Please send any feedback, questions or suggestions to fraggle@gmail.com. Thanks! +# vim: tw=70 + diff --git a/README.OPL b/README.OPL index 07699232..f2aa113b 100644 --- a/README.OPL +++ b/README.OPL @@ -105,3 +105,5 @@ on startup: There is no native OPL backend for FreeBSD yet. Sorry! +# vim: tw=70 + diff --git a/TODO b/TODO index 18d7dc67..6772e86a 100644 --- a/TODO +++ b/TODO @@ -54,3 +54,5 @@ Other tasks: * Get a better software OPL emulator * DMXOPTIONS opl3/phase option support. +# vim: tw=70 + diff --git a/man/INSTALL.template b/man/INSTALL.template index 2d9c80e3..19d3c88d 100644 --- a/man/INSTALL.template +++ b/man/INSTALL.template @@ -249,3 +249,5 @@ When compiling from source, be sure to compile and install timidity before installing SDL_mixer. #endif +# vim: tw=70 + -- cgit v1.2.3 From 0268c882d96942175f1c6028c636dddce8af593f Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 28 Mar 2011 23:48:31 +0000 Subject: Remove the BUGS file as it doesn't really contain any useful information. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2316 --- BUGS | 15 --------------- Makefile.am | 1 - README | 9 +++++---- pkg/config.make.in | 1 - 4 files changed, 5 insertions(+), 21 deletions(-) delete mode 100644 BUGS diff --git a/BUGS b/BUGS deleted file mode 100644 index a04b5d63..00000000 --- a/BUGS +++ /dev/null @@ -1,15 +0,0 @@ - -* Sound may not set volumes correctly. - - It is possible that volume of sound effects does not scale properly - with distance from the sound source. It is also possible that sound - effects are cut off at the wrong distance. This needs further - investigation. - -* A small number of Doom bugs are almost impossible to emulate. - - An example of this can be seen in Ledmeister's "Blackbug" demo which - shows a bug that relies on the memory layout of the Doom executable. - -# vim: tw=70 - diff --git a/Makefile.am b/Makefile.am index 310bb5f6..56c82fe8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -37,7 +37,6 @@ DOC_FILES= \ CMDLINE \ README \ README.OPL \ - BUGS \ NEWS \ ChangeLog \ NOT-BUGS diff --git a/README b/README index dbc26b7f..f641c126 100644 --- a/README +++ b/README @@ -65,10 +65,11 @@ Here are some examples: You are encouraged to sign up and contribute any useful information you may have regarding the port! - * Chocolate Doom is not perfect. See the BUGS file for a list of - known issues. Because of the nature of the project, you may also - encounter Vanilla Doom bugs; these are intentionally present; see - the NOT-BUGS file for more information. + * Chocolate Doom is not perfect. Although it aims to accurately + emulate Vanilla Doom, some of the behavior of Vanilla Doom can be + very difficult to reproduce. Because of the nature of the project, + you may also encounter Vanilla Doom bugs; these are intentionally + present; see the NOT-BUGS file for more information. New bug reports can be submitted to the Chocolate Doom bug tracker on Sourceforge. See: diff --git a/pkg/config.make.in b/pkg/config.make.in index 1d1670ec..445e89a9 100644 --- a/pkg/config.make.in +++ b/pkg/config.make.in @@ -22,7 +22,6 @@ DOC_FILES = README \ COPYING \ ChangeLog \ NEWS \ - BUGS \ NOT-BUGS \ CMDLINE \ TODO -- cgit v1.2.3 From 72b17f7b82b70cac0a12283b0b26b01e634c3728 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Wed, 30 Mar 2011 19:00:51 +0000 Subject: On OS X, display a dialog box when exiting with I_Error, like on Windows. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2317 --- src/i_system.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/src/i_system.c b/src/i_system.c index 4db97276..7d3687be 100644 --- a/src/i_system.c +++ b/src/i_system.c @@ -38,6 +38,8 @@ #include #endif +#include "config.h" + #include "deh_main.h" #include "doomdef.h" #include "doomstat.h" @@ -59,6 +61,10 @@ #include "w_wad.h" #include "z_zone.h" +#ifdef __MACOSX__ +#include +#endif + #define DEFAULT_RAM 16 /* MiB */ #define MIN_RAM 4 /* MiB */ @@ -364,6 +370,43 @@ void I_Error (char *error, ...) } #endif +#ifdef __MACOSX__ + { + CFStringRef message; + char msgbuf[512]; + int i; + + va_start(argptr, error); + memset(msgbuf, 0, sizeof(msgbuf)); + vsnprintf(msgbuf, sizeof(msgbuf) - 1, error, argptr); + va_end(argptr); + + // The CoreFoundation message box wraps text lines, so replace + // newline characters with spaces so that multiline messages + // are continuous. + + for (i = 0; msgbuf[i] != '\0'; ++i) + { + if (msgbuf[i] == '\n') + { + msgbuf[i] = ' '; + } + } + + message = CFStringCreateWithCString(NULL, msgbuf, + kCFStringEncodingUTF8); + + CFUserNotificationDisplayNotice(0, + kCFUserNotificationCautionAlertLevel, + NULL, + NULL, + NULL, + CFSTR(PACKAGE_STRING), + message, + NULL); + } +#endif + // abort(); exit(-1); -- cgit v1.2.3 From b79f27cef85cc975b45ada246ace30b648466483 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Wed, 30 Mar 2011 19:16:40 +0000 Subject: Add a symlink hack to work around the fact that OS X doesn't like paths in MANPATH to contain spaces. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2318 --- pkg/osx/Execute.m | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkg/osx/Execute.m b/pkg/osx/Execute.m index 25f5e67d..ffeddadd 100644 --- a/pkg/osx/Execute.m +++ b/pkg/osx/Execute.m @@ -175,8 +175,19 @@ void OpenTerminalWindow(const char *doomwadpath) fprintf(stream, "#!/bin/sh\n"); //fprintf(stream, "set -x\n"); fprintf(stream, "PATH=\"%s:$PATH\"\n", executable_path); - fprintf(stream, "MANPATH=\"%s/man:$(manpath)\"\n", executable_path); + + // MANPATH is set to point to the directory within the bundle that + // contains the Unix manpages. However, the bundle name or path to + // it can contain a space, and OS X doesn't like this! As a + // workaround, create a symlink in /tmp to point to the real directory, + // and put *this* in MANPATH. + + fprintf(stream, "rm -f \"/tmp/%s.man\"\n", PACKAGE_TARNAME); + fprintf(stream, "ln -s \"%s/man\" \"/tmp/%s.man\"\n", + executable_path, PACKAGE_TARNAME); + fprintf(stream, "MANPATH=\"/tmp/%s.man:$(manpath)\"\n", PACKAGE_TARNAME); fprintf(stream, "export MANPATH\n"); + fprintf(stream, "DOOMWADPATH=\"%s\"\n", doomwadpath); fprintf(stream, "export DOOMWADPATH\n"); fprintf(stream, "rm -f \"%s\"\n", TEMP_SCRIPT); -- cgit v1.2.3 From f596cfcd76c8c03c41c0691561c9b3c9c4419393 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 4 Apr 2011 18:40:28 +0000 Subject: Change setup tool default sampling rate to 44100Hz to match the game (thanks Alexandre Xavier). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2319 --- NEWS | 2 ++ setup/sound.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 7c7457aa..73206691 100644 --- a/NEWS +++ b/NEWS @@ -45,6 +45,8 @@ works properly (thanks Alexandre Xavier). * MIDI playback that locked up when using an empty MUS / MIDI file (thanks Alexandre Xavier). + * Default sampling rate used by setup tool changed to 44100Hz, to + match the game default (thanks Alexandre Xavier). libtextscreen: * It is now possible to type a '+' in input boxes (thanks diff --git a/setup/sound.c b/setup/sound.c index 2352baa1..7386e789 100644 --- a/setup/sound.c +++ b/setup/sound.c @@ -64,7 +64,7 @@ int sfxVolume = 8; int snd_musicdevice = SNDDEVICE_GENMIDI; int musicVolume = 8; -int snd_samplerate = 22050; +int snd_samplerate = 44100; int opl_io_port = 0x388; int use_libsamplerate = 0; -- cgit v1.2.3 From 9f3f6683d929d118b18e21b06a0b729586569e1a Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 4 Apr 2011 20:07:07 +0000 Subject: Change the background color when hovering over widgets. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2320 --- NEWS | 2 ++ setup/txt_joybinput.c | 10 +------ setup/txt_keyinput.c | 10 +------ setup/txt_mouseinput.c | 10 +------ textscreen/txt_button.c | 8 ++---- textscreen/txt_checkbox.c | 8 ++---- textscreen/txt_desktop.c | 10 +++++++ textscreen/txt_desktop.h | 9 ++++++ textscreen/txt_dropdown.c | 10 +------ textscreen/txt_gui.c | 4 +-- textscreen/txt_gui.h | 4 +++ textscreen/txt_inputbox.c | 8 +----- textscreen/txt_label.c | 2 +- textscreen/txt_radiobutton.c | 8 ++---- textscreen/txt_scrollpane.c | 4 +++ textscreen/txt_sdl.c | 26 +++++++++++++++++- textscreen/txt_separator.c | 2 +- textscreen/txt_spinctrl.c | 10 ++----- textscreen/txt_table.c | 4 +++ textscreen/txt_widget.c | 62 ++++++++++++++++++++++++++++++++++++++++++ textscreen/txt_widget.h | 34 ++++++++++++++++++++++- textscreen/txt_window.c | 8 ++++-- textscreen/txt_window_action.c | 17 ++++++++++-- 23 files changed, 192 insertions(+), 78 deletions(-) diff --git a/NEWS b/NEWS index 73206691..d37ee185 100644 --- a/NEWS +++ b/NEWS @@ -49,6 +49,8 @@ match the game default (thanks Alexandre Xavier). libtextscreen: + * The background on GUI controls now lights up when hovering over + them, so that it is more obvious what you are selecting. * It is now possible to type a '+' in input boxes (thanks Alexandre Xavier). * It is possible to use the mouse wheel to scroll through scroll diff --git a/setup/txt_joybinput.c b/setup/txt_joybinput.c index cde3d2c2..861414f7 100644 --- a/setup/txt_joybinput.c +++ b/setup/txt_joybinput.c @@ -153,15 +153,7 @@ static void TXT_JoystickInputDrawer(TXT_UNCAST_ARG(joystick_input), int selected GetJoystickButtonDescription(*joystick_input->variable, buf); } - if (selected) - { - TXT_BGColor(TXT_COLOR_GREY, 0); - } - else - { - TXT_BGColor(TXT_COLOR_BLUE, 0); - } - + TXT_SetWidgetBG(joystick_input, selected); TXT_FGColor(TXT_COLOR_BRIGHT_WHITE); TXT_DrawString(buf); diff --git a/setup/txt_keyinput.c b/setup/txt_keyinput.c index 08eb9d8c..dfa6ede2 100644 --- a/setup/txt_keyinput.c +++ b/setup/txt_keyinput.c @@ -118,15 +118,7 @@ static void TXT_KeyInputDrawer(TXT_UNCAST_ARG(key_input), int selected) TXT_GetKeyDescription(*key_input->variable, buf); } - if (selected) - { - TXT_BGColor(TXT_COLOR_GREY, 0); - } - else - { - TXT_BGColor(TXT_COLOR_BLUE, 0); - } - + TXT_SetWidgetBG(key_input, selected); TXT_FGColor(TXT_COLOR_BRIGHT_WHITE); TXT_DrawString(buf); diff --git a/setup/txt_mouseinput.c b/setup/txt_mouseinput.c index 4f454c8c..2c14a010 100644 --- a/setup/txt_mouseinput.c +++ b/setup/txt_mouseinput.c @@ -111,15 +111,7 @@ static void TXT_MouseInputDrawer(TXT_UNCAST_ARG(mouse_input), int selected) GetMouseButtonDescription(*mouse_input->variable, buf); } - if (selected) - { - TXT_BGColor(TXT_COLOR_GREY, 0); - } - else - { - TXT_BGColor(TXT_COLOR_BLUE, 0); - } - + TXT_SetWidgetBG(mouse_input, selected); TXT_FGColor(TXT_COLOR_BRIGHT_WHITE); TXT_DrawString(buf); diff --git a/textscreen/txt_button.c b/textscreen/txt_button.c index 85517b3d..536e5f56 100644 --- a/textscreen/txt_button.c +++ b/textscreen/txt_button.c @@ -46,16 +46,12 @@ static void TXT_ButtonDrawer(TXT_UNCAST_ARG(button), int selected) w = button->widget.w; - TXT_BGColor(TXT_COLOR_BLUE, 0); TXT_FGColor(TXT_COLOR_BRIGHT_WHITE); - if (selected) - { - TXT_BGColor(TXT_COLOR_GREY, 0); - } + TXT_SetWidgetBG(button, selected); TXT_DrawString(button->label); - + for (i=strlen(button->label); i < w; ++i) { TXT_DrawString(" "); diff --git a/textscreen/txt_checkbox.c b/textscreen/txt_checkbox.c index 35c5739d..f2183b7c 100644 --- a/textscreen/txt_checkbox.c +++ b/textscreen/txt_checkbox.c @@ -48,7 +48,7 @@ static void TXT_CheckBoxDrawer(TXT_UNCAST_ARG(checkbox), int selected) w = checkbox->widget.w; - TXT_BGColor(TXT_COLOR_BLUE, 0); + TXT_BGColor(TXT_WINDOW_BACKGROUND, 0); TXT_FGColor(TXT_COLOR_BRIGHT_CYAN); TXT_DrawString("("); @@ -67,11 +67,7 @@ static void TXT_CheckBoxDrawer(TXT_UNCAST_ARG(checkbox), int selected) TXT_DrawString(") "); - if (selected) - { - TXT_BGColor(TXT_COLOR_GREY, 0); - } - + TXT_SetWidgetBG(checkbox, selected); TXT_FGColor(TXT_COLOR_BRIGHT_WHITE); TXT_DrawString(checkbox->label); diff --git a/textscreen/txt_desktop.c b/textscreen/txt_desktop.c index f833441f..c497f0e3 100644 --- a/textscreen/txt_desktop.c +++ b/textscreen/txt_desktop.c @@ -61,6 +61,16 @@ void TXT_RemoveDesktopWindow(txt_window_t *win) num_windows = to; } +txt_window_t *TXT_GetActiveWindow(void) +{ + if (num_windows == 0) + { + return NULL; + } + + return all_windows[num_windows - 1]; +} + static void DrawDesktopBackground(const char *title) { int i; diff --git a/textscreen/txt_desktop.h b/textscreen/txt_desktop.h index 95343977..42a011e7 100644 --- a/textscreen/txt_desktop.h +++ b/textscreen/txt_desktop.h @@ -63,6 +63,15 @@ void TXT_ExitMainLoop(void); void TXT_GUIMainLoop(void); +/** + * Get the top window on the desktop that is currently receiving + * inputs. + * + * @return The active window, or NULL if no windows are present. + */ + +txt_window_t *TXT_GetActiveWindow(void); + #endif /* #ifndef TXT_DESKTOP_H */ diff --git a/textscreen/txt_dropdown.c b/textscreen/txt_dropdown.c index c8103302..01cf830d 100644 --- a/textscreen/txt_dropdown.c +++ b/textscreen/txt_dropdown.c @@ -197,15 +197,7 @@ static void TXT_DropdownListDrawer(TXT_UNCAST_ARG(list), int selected) // Set bg/fg text colors. - if (selected) - { - TXT_BGColor(TXT_COLOR_GREY, 0); - } - else - { - TXT_BGColor(TXT_COLOR_BLUE, 0); - } - + TXT_SetWidgetBG(list, selected); TXT_FGColor(TXT_COLOR_BRIGHT_WHITE); // Select a string to draw from the list, if the current value is diff --git a/textscreen/txt_gui.c b/textscreen/txt_gui.c index ec166415..d00e3a65 100644 --- a/textscreen/txt_gui.c +++ b/textscreen/txt_gui.c @@ -131,7 +131,7 @@ void TXT_DrawWindowFrame(const char *title, int x, int y, int w, int h) int bx, by; TXT_FGColor(TXT_COLOR_BRIGHT_CYAN); - TXT_BGColor(TXT_COLOR_BLUE, 0); + TXT_BGColor(TXT_WINDOW_BACKGROUND, 0); for (y1=y; y1bgcolor = TXT_COLOR_BLUE; + label->bgcolor = TXT_WINDOW_BACKGROUND; label->fgcolor = TXT_COLOR_BRIGHT_WHITE; TXT_SetLabel(label, text); diff --git a/textscreen/txt_radiobutton.c b/textscreen/txt_radiobutton.c index 00c2c4fc..0755562d 100644 --- a/textscreen/txt_radiobutton.c +++ b/textscreen/txt_radiobutton.c @@ -48,7 +48,7 @@ static void TXT_RadioButtonDrawer(TXT_UNCAST_ARG(radiobutton), int selected) w = radiobutton->widget.w; - TXT_BGColor(TXT_COLOR_BLUE, 0); + TXT_BGColor(TXT_WINDOW_BACKGROUND, 0); TXT_FGColor(TXT_COLOR_BRIGHT_CYAN); TXT_DrawString("("); @@ -67,11 +67,7 @@ static void TXT_RadioButtonDrawer(TXT_UNCAST_ARG(radiobutton), int selected) TXT_DrawString(") "); - if (selected) - { - TXT_BGColor(TXT_COLOR_GREY, 0); - } - + TXT_SetWidgetBG(radiobutton, selected); TXT_FGColor(TXT_COLOR_BRIGHT_WHITE); TXT_DrawString(radiobutton->label); diff --git a/textscreen/txt_scrollpane.c b/textscreen/txt_scrollpane.c index 856f6b8a..2fd45c55 100644 --- a/textscreen/txt_scrollpane.c +++ b/textscreen/txt_scrollpane.c @@ -557,6 +557,10 @@ txt_scrollpane_t *TXT_NewScrollPane(int w, int h, TXT_UNCAST_ARG(target)) scrollpane->expand_w = w <= 0; scrollpane->expand_h = h <= 0; + // Set parent pointer for inner widget. + + target->parent = &scrollpane->widget; + return scrollpane; } diff --git a/textscreen/txt_sdl.c b/textscreen/txt_sdl.c index 365e6bf0..5ae151e9 100644 --- a/textscreen/txt_sdl.c +++ b/textscreen/txt_sdl.c @@ -221,7 +221,7 @@ int TXT_Init(void) // Ignore all mouse motion events - SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE); +// SDL_EventState(SDL_MOUSEMOTION, SDL_IGNORE); // Repeat key presses so we can hold down arrows to scroll down the // menu, for example. This is what setup.exe does. @@ -475,6 +475,24 @@ static int SDLButtonToTXTButton(int button) } } +static int MouseHasMoved(void) +{ + static int last_x = 0, last_y = 0; + int x, y; + + TXT_GetMousePosition(&x, &y); + + if (x != last_x || y != last_y) + { + last_x = x; last_y = y; + return 1; + } + else + { + return 0; + } +} + signed int TXT_GetChar(void) { SDL_Event ev; @@ -510,6 +528,12 @@ signed int TXT_GetChar(void) // Quit = escape return 27; + case SDL_MOUSEMOTION: + if (MouseHasMoved()) + { + return 0; + } + default: break; } diff --git a/textscreen/txt_separator.c b/textscreen/txt_separator.c index 563d0c62..89db0b03 100644 --- a/textscreen/txt_separator.c +++ b/textscreen/txt_separator.c @@ -65,7 +65,7 @@ static void TXT_SeparatorDrawer(TXT_UNCAST_ARG(separator), int selected) { TXT_GotoXY(x, y); - TXT_BGColor(TXT_COLOR_BLUE, 0); + TXT_BGColor(TXT_WINDOW_BACKGROUND, 0); TXT_FGColor(TXT_COLOR_BRIGHT_GREEN); TXT_DrawString(" "); TXT_DrawString(separator->label); diff --git a/textscreen/txt_spinctrl.c b/textscreen/txt_spinctrl.c index d775aecf..2b2d4d09 100644 --- a/textscreen/txt_spinctrl.c +++ b/textscreen/txt_spinctrl.c @@ -149,7 +149,7 @@ static void TXT_SpinControlDrawer(TXT_UNCAST_ARG(spincontrol), int selected) unsigned int padding; TXT_FGColor(TXT_COLOR_BRIGHT_CYAN); - TXT_BGColor(TXT_COLOR_BLUE, 0); + TXT_BGColor(TXT_WINDOW_BACKGROUND, 0); TXT_DrawString("\x1b "); @@ -161,13 +161,9 @@ static void TXT_SpinControlDrawer(TXT_UNCAST_ARG(spincontrol), int selected) { TXT_BGColor(TXT_COLOR_BLACK, 0); } - else if (selected) - { - TXT_BGColor(TXT_COLOR_GREY, 0); - } else { - TXT_BGColor(TXT_COLOR_BLUE, 0); + TXT_SetWidgetBG(spincontrol, selected); } if (!spincontrol->editing) @@ -195,7 +191,7 @@ static void TXT_SpinControlDrawer(TXT_UNCAST_ARG(spincontrol), int selected) } TXT_FGColor(TXT_COLOR_BRIGHT_CYAN); - TXT_BGColor(TXT_COLOR_BLUE, 0); + TXT_BGColor(TXT_WINDOW_BACKGROUND, 0); TXT_DrawString(" \x1a"); } diff --git a/textscreen/txt_table.c b/textscreen/txt_table.c index ffe6fd14..b9d727a3 100644 --- a/textscreen/txt_table.c +++ b/textscreen/txt_table.c @@ -173,6 +173,10 @@ void TXT_AddWidget(TXT_UNCAST_ARG(table), TXT_UNCAST_ARG(widget)) sizeof(txt_widget_t *) * (table->num_widgets + 1)); table->widgets[table->num_widgets] = widget; ++table->num_widgets; + + // Maintain parent pointer. + + widget->parent = &table->widget; } // Add multiple widgets to a table. diff --git a/textscreen/txt_widget.c b/textscreen/txt_widget.c index 760943d5..d47a7507 100644 --- a/textscreen/txt_widget.c +++ b/textscreen/txt_widget.c @@ -24,6 +24,8 @@ #include "txt_io.h" #include "txt_widget.h" +#include "txt_gui.h" +#include "txt_desktop.h" typedef struct { @@ -82,6 +84,7 @@ void TXT_InitWidget(TXT_UNCAST_ARG(widget), txt_widget_class_t *widget_class) widget->widget_class = widget_class; widget->callback_table = TXT_NewCallbackTable(); + widget->parent = NULL; // Visible by default. @@ -237,3 +240,62 @@ int TXT_SelectableWidget(TXT_UNCAST_ARG(widget)) } } +int TXT_ContainsWidget(TXT_UNCAST_ARG(haystack), TXT_UNCAST_ARG(needle)) +{ + TXT_CAST_ARG(txt_widget_t, haystack); + TXT_CAST_ARG(txt_widget_t, needle); + + while (needle != NULL) + { + if (needle == haystack) + { + return 1; + } + + needle = needle->parent; + } + + return 0; +} + +int TXT_HoveringOverWidget(TXT_UNCAST_ARG(widget)) +{ + TXT_CAST_ARG(txt_widget_t, widget); + txt_window_t *active_window; + int x, y; + + // We can only be hovering over widgets in the active window. + + active_window = TXT_GetActiveWindow(); + + if (active_window == NULL || !TXT_ContainsWidget(active_window, widget)) + { + return 0; + } + + // Is the mouse cursor within the bounds of the widget? + + TXT_GetMousePosition(&x, &y); + + return (x >= widget->x && x < widget->x + widget->w + && y >= widget->y && y < widget->y + widget->h); +} + +void TXT_SetWidgetBG(TXT_UNCAST_ARG(widget), int selected) +{ + TXT_CAST_ARG(txt_widget_t, widget); + + if (selected) + { + TXT_BGColor(TXT_COLOR_GREY, 0); + } + else if (TXT_HoveringOverWidget(widget)) + { + TXT_BGColor(TXT_HOVER_BACKGROUND, 0); + } + else + { + TXT_BGColor(TXT_WINDOW_BACKGROUND, 0); + } +} + diff --git a/textscreen/txt_widget.h b/textscreen/txt_widget.h index bb895f92..ebb5a292 100644 --- a/textscreen/txt_widget.h +++ b/textscreen/txt_widget.h @@ -102,6 +102,10 @@ struct txt_widget_s int x, y; unsigned int w, h; + + // Pointer up to parent widget that contains this widget. + + txt_widget_t *parent; }; void TXT_InitWidget(TXT_UNCAST_ARG(widget), txt_widget_class_t *widget_class); @@ -146,6 +150,34 @@ void TXT_SetWidgetAlign(TXT_UNCAST_ARG(widget), txt_horiz_align_t horiz_align); int TXT_SelectableWidget(TXT_UNCAST_ARG(widget)); -#endif /* #ifndef TXT_WIDGET_H */ +/** + * Query whether the mouse is hovering over the specified widget. + * + * @param widget The widget. + * @return Non-zero if the mouse cursor is over the widget. + */ + +int TXT_HoveringOverWidget(TXT_UNCAST_ARG(widget)); + +/** + * Set the background to draw the specified widget, depending on + * whether it is selected and the mouse is hovering over it. + * + * @param widget The widget. + * @param selected Whether the widget is selected. + */ + +void TXT_SetWidgetBG(TXT_UNCAST_ARG(widget), int selected); + +/** + * Query whether the specified widget is contained within another + * widget. + * + * @param haystack The widget that might contain needle. + * @param needle The widget being queried. + */ +int TXT_ContainsWidget(TXT_UNCAST_ARG(haystack), TXT_UNCAST_ARG(needle)); + +#endif /* #ifndef TXT_WIDGET_H */ diff --git a/textscreen/txt_window.c b/textscreen/txt_window.c index 46e71d3a..7ba11778 100644 --- a/textscreen/txt_window.c +++ b/textscreen/txt_window.c @@ -40,6 +40,10 @@ void TXT_SetWindowAction(txt_window_t *window, } window->actions[position] = action; + + // Maintain parent pointer. + + action->widget.parent = &window->table.widget; } txt_window_t *TXT_NewWindow(char *title) @@ -158,7 +162,7 @@ static void LayoutActionArea(txt_window_t *window) TXT_CalcWidgetSize(widget); - widget->x = window->window_x + 2; + widget->x = window->window_x + 1; widget->y = window->window_y + window->window_h - widget->h - 1; // Adjust available space: @@ -175,7 +179,7 @@ static void LayoutActionArea(txt_window_t *window) TXT_CalcWidgetSize(widget); - widget->x = window->window_x + window->window_w - 2 - widget->w; + widget->x = window->window_x + window->window_w - 1 - widget->w; widget->y = window->window_y + window->window_h - widget->h - 1; // Adjust available space: diff --git a/textscreen/txt_window_action.c b/textscreen/txt_window_action.c index e593b7b6..81d3e94d 100644 --- a/textscreen/txt_window_action.c +++ b/textscreen/txt_window_action.c @@ -37,9 +37,10 @@ static void TXT_WindowActionSizeCalc(TXT_UNCAST_ARG(action)) TXT_GetKeyDescription(action->key, buf); - // Minimum width is the string length + two spaces for padding + // Width is label length, plus key description length, plus '=' + // and two surrounding spaces. - action->widget.w = strlen(action->label) + strlen(buf) + 1; + action->widget.w = strlen(action->label) + strlen(buf) + 3; action->widget.h = 1; } @@ -50,12 +51,24 @@ static void TXT_WindowActionDrawer(TXT_UNCAST_ARG(action), int selected) TXT_GetKeyDescription(action->key, buf); + if (TXT_HoveringOverWidget(action)) + { + TXT_BGColor(TXT_COLOR_BLACK, 0); + } + else + { + TXT_BGColor(TXT_WINDOW_BACKGROUND, 0); + } + + TXT_DrawString(" "); TXT_FGColor(TXT_COLOR_BRIGHT_GREEN); TXT_DrawString(buf); TXT_FGColor(TXT_COLOR_BRIGHT_CYAN); TXT_DrawString("="); + TXT_FGColor(TXT_COLOR_BRIGHT_WHITE); TXT_DrawString(action->label); + TXT_DrawString(" "); } static void TXT_WindowActionDestructor(TXT_UNCAST_ARG(action)) -- cgit v1.2.3 From fe9fc9e1078f720d8c869106ea1f93e17ee2b56f Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 4 Apr 2011 20:09:42 +0000 Subject: Fix crash. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2321 --- textscreen/txt_window.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/textscreen/txt_window.c b/textscreen/txt_window.c index 7ba11778..ee668175 100644 --- a/textscreen/txt_window.c +++ b/textscreen/txt_window.c @@ -43,7 +43,10 @@ void TXT_SetWindowAction(txt_window_t *window, // Maintain parent pointer. - action->widget.parent = &window->table.widget; + if (action != NULL) + { + action->widget.parent = &window->table.widget; + } } txt_window_t *TXT_NewWindow(char *title) -- cgit v1.2.3 From eac4192d1bd74b61475ecfd3d5bee703b68ec09d Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 4 Apr 2011 20:12:59 +0000 Subject: Fix crash. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2322 --- textscreen/txt_table.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/textscreen/txt_table.c b/textscreen/txt_table.c index b9d727a3..7a8624f0 100644 --- a/textscreen/txt_table.c +++ b/textscreen/txt_table.c @@ -176,7 +176,10 @@ void TXT_AddWidget(TXT_UNCAST_ARG(table), TXT_UNCAST_ARG(widget)) // Maintain parent pointer. - widget->parent = &table->widget; + if (widget != NULL) + { + widget->parent = &table->widget; + } } // Add multiple widgets to a table. -- cgit v1.2.3 From 954eeae87efa9967164ce3c0543c45b823c40a21 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 4 Apr 2011 20:30:17 +0000 Subject: Close dropdown list popup windows when clicking outside the window. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2323 --- NEWS | 2 ++ textscreen/txt_dropdown.c | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/NEWS b/NEWS index d37ee185..45c51e71 100644 --- a/NEWS +++ b/NEWS @@ -57,6 +57,8 @@ panes. * Clicking on scroll bars now moves the scroll handle to a matching location. + * Clicking outside a dropdown list popup window now dismisses the + window. 1.5.0 (2011-01-02): diff --git a/textscreen/txt_dropdown.c b/textscreen/txt_dropdown.c index 01cf830d..c9a5d015 100644 --- a/textscreen/txt_dropdown.c +++ b/textscreen/txt_dropdown.c @@ -99,6 +99,22 @@ static int SelectorWindowListener(txt_window_t *window, int key, void *user_data return 0; } +static int SelectorMouseListener(txt_window_t *window, int x, int y, int b, + void *unused) +{ + txt_widget_t *win; + + win = (txt_widget_t *) window; + + if (x < win->x || x > win->x + win->w || y < win->y || y > win->y + win->h) + { + TXT_CloseWindow(window); + return 1; + } + + return 0; +} + // Open the dropdown list window to select an item static void OpenSelectorWindow(txt_dropdown_list_t *list) @@ -158,6 +174,7 @@ static void OpenSelectorWindow(txt_dropdown_list_t *list) // Catch presses of escape in this window and close it. TXT_SetKeyListener(window, SelectorWindowListener, NULL); + TXT_SetMouseListener(window, SelectorMouseListener, NULL); } static int DropdownListWidth(txt_dropdown_list_t *list) -- cgit v1.2.3 From d4ef7c37721ee261ac23305fd52239a91e58250a Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 9 Apr 2011 00:27:13 +0000 Subject: Fix action area minimum width calculation. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2324 --- textscreen/txt_window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/textscreen/txt_window.c b/textscreen/txt_window.c index ee668175..cd8a6c7a 100644 --- a/textscreen/txt_window.c +++ b/textscreen/txt_window.c @@ -227,7 +227,7 @@ static void CalcActionAreaSize(txt_window_t *window, txt_widget_t *widget; int i; - *w = 1; + *w = 0; *h = 0; // Calculate the width of all the action widgets and use this @@ -240,7 +240,7 @@ static void CalcActionAreaSize(txt_window_t *window, if (widget != NULL) { TXT_CalcWidgetSize(widget); - *w += widget->w + 1; + *w += widget->w; if (widget->h > *h) { -- cgit v1.2.3 From eb86fcdf3099404ed8cc0feaf96dd94654d2b8dd Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 11 Apr 2011 19:49:45 +0000 Subject: Allow the shift key to be held down when changing key/mouse/joystick bindings to prevent bindings to the same key from being cleared (thanks myk). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2325 --- NEWS | 3 +++ setup/txt_joybinput.c | 11 ++++++++- setup/txt_joybinput.h | 1 + setup/txt_keyinput.c | 11 ++++++++- setup/txt_keyinput.h | 1 + setup/txt_mouseinput.c | 10 ++++++++- setup/txt_mouseinput.h | 1 + textscreen/txt_main.h | 14 ++++++++++++ textscreen/txt_sdl.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++ 9 files changed, 109 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 45c51e71..1cfca6a7 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,9 @@ reorganised to a better arrangement. * It is now possible to load .lmp files (and play back demos) with long filenames (thanks blzut3). + * In the setup tool, it is now possible to hold down shift when + changing key/mouse/joystick bindings to prevent other bindings + to the same key from being cleared (thanks myk). Compatibility: * Added support for the alternate version of the Final Doom diff --git a/setup/txt_joybinput.c b/setup/txt_joybinput.c index 861414f7..9ad26a45 100644 --- a/setup/txt_joybinput.c +++ b/setup/txt_joybinput.c @@ -48,7 +48,12 @@ static int EventCallback(SDL_Event *event, TXT_UNCAST_ARG(joystick_input)) if (event->type == SDL_JOYBUTTONDOWN) { *joystick_input->variable = event->jbutton.button; - TXT_EmitSignal(joystick_input, "set"); + + if (joystick_input->check_conflicts) + { + TXT_EmitSignal(joystick_input, "set"); + } + TXT_CloseWindow(joystick_input->prompt_window); return 1; } @@ -89,6 +94,10 @@ static void OpenPromptWindow(txt_joystick_input_t *joystick_input) txt_label_t *label; SDL_Joystick *joystick; + // Silently update when the shift button is held down. + + joystick_input->check_conflicts = !TXT_GetModifierState(TXT_MOD_SHIFT); + if (SDL_Init(SDL_INIT_JOYSTICK) < 0) { return; diff --git a/setup/txt_joybinput.h b/setup/txt_joybinput.h index b2920b88..69ec4a1f 100644 --- a/setup/txt_joybinput.h +++ b/setup/txt_joybinput.h @@ -37,6 +37,7 @@ struct txt_joystick_input_s txt_widget_t widget; int *variable; txt_window_t *prompt_window; + int check_conflicts; }; txt_joystick_input_t *TXT_NewJoystickInput(int *variable); diff --git a/setup/txt_keyinput.c b/setup/txt_keyinput.c index dfa6ede2..6f1ee4dd 100644 --- a/setup/txt_keyinput.c +++ b/setup/txt_keyinput.c @@ -42,7 +42,12 @@ static int KeyPressCallback(txt_window_t *window, int key, // Got the key press. Save to the variable and close the window. *key_input->variable = key; - TXT_EmitSignal(key_input, "set"); + + if (key_input->check_conflicts) + { + TXT_EmitSignal(key_input, "set"); + } + TXT_CloseWindow(window); // Re-enable key mappings now that we have the key @@ -67,6 +72,10 @@ static void OpenPromptWindow(txt_key_input_t *key_input) txt_window_t *window; txt_label_t *label; + // Silently update when the shift button is held down. + + key_input->check_conflicts = !TXT_GetModifierState(TXT_MOD_SHIFT); + window = TXT_NewWindow(NULL); TXT_SetWindowAction(window, TXT_HORIZ_LEFT, NULL); TXT_SetWindowAction(window, TXT_HORIZ_CENTER, diff --git a/setup/txt_keyinput.h b/setup/txt_keyinput.h index 4952a970..5df0b2e3 100644 --- a/setup/txt_keyinput.h +++ b/setup/txt_keyinput.h @@ -35,6 +35,7 @@ struct txt_key_input_s { txt_widget_t widget; int *variable; + int check_conflicts; }; txt_key_input_t *TXT_NewKeyInput(int *variable); diff --git a/setup/txt_mouseinput.c b/setup/txt_mouseinput.c index 2c14a010..c3e17299 100644 --- a/setup/txt_mouseinput.c +++ b/setup/txt_mouseinput.c @@ -42,7 +42,12 @@ static int MousePressCallback(txt_window_t *window, // Got the mouse press. Save to the variable and close the window. *mouse_input->variable = b - TXT_MOUSE_BASE; - TXT_EmitSignal(mouse_input, "set"); + + if (mouse_input->check_conflicts) + { + TXT_EmitSignal(mouse_input, "set"); + } + TXT_CloseWindow(window); return 1; @@ -53,6 +58,9 @@ static void OpenPromptWindow(txt_mouse_input_t *mouse_input) txt_window_t *window; txt_label_t *label; + // Silently update when the shift key is held down. + mouse_input->check_conflicts = !TXT_GetModifierState(TXT_MOD_SHIFT); + window = TXT_NewWindow(NULL); TXT_SetWindowAction(window, TXT_HORIZ_LEFT, NULL); TXT_SetWindowAction(window, TXT_HORIZ_CENTER, diff --git a/setup/txt_mouseinput.h b/setup/txt_mouseinput.h index 57c258eb..ef3ec2aa 100644 --- a/setup/txt_mouseinput.h +++ b/setup/txt_mouseinput.h @@ -35,6 +35,7 @@ struct txt_mouse_input_s { txt_widget_t widget; int *variable; + int check_conflicts; }; txt_mouse_input_t *TXT_NewMouseInput(int *variable); diff --git a/textscreen/txt_main.h b/textscreen/txt_main.h index 601548e5..a415ee1b 100644 --- a/textscreen/txt_main.h +++ b/textscreen/txt_main.h @@ -69,6 +69,16 @@ typedef enum TXT_COLOR_BRIGHT_WHITE, } txt_color_t; +// Modifier keys. + +typedef enum +{ + TXT_MOD_SHIFT, + TXT_MOD_CTRL, + TXT_MOD_ALT, + TXT_NUM_MODIFIERS +} txt_modifier_t; + // Initialize the screen // Returns 1 if successful, 0 if failed. @@ -94,6 +104,10 @@ void TXT_UpdateScreen(void); int TXT_GetChar(void); +// Read the current state of modifier keys that are held down. + +int TXT_GetModifierState(txt_modifier_t mod); + // Provides a short description of a key code, placing into the // provided buffer. diff --git a/textscreen/txt_sdl.c b/textscreen/txt_sdl.c index 5ae151e9..767c9b3e 100644 --- a/textscreen/txt_sdl.c +++ b/textscreen/txt_sdl.c @@ -63,6 +63,8 @@ static int key_mapping = 1; static TxtSDLEventCallbackFunc event_callback; static void *event_callback_data; +static int modifier_state[TXT_NUM_MODIFIERS]; + // Font we are using: static txt_font_t *font; @@ -493,6 +495,48 @@ static int MouseHasMoved(void) } } +// Examine a key press/release and update the modifier key state +// if necessary. + +static void UpdateModifierState(SDL_keysym *sym, int pressed) +{ + txt_modifier_t mod; + + switch (sym->sym) + { + case SDLK_LSHIFT: + case SDLK_RSHIFT: + mod = TXT_MOD_SHIFT; + break; + + case SDLK_LCTRL: + case SDLK_RCTRL: + mod = TXT_MOD_CTRL; + break; + + case SDLK_LALT: + case SDLK_RALT: +#if !SDL_VERSION_ATLEAST(1, 3, 0) + case SDLK_LMETA: + case SDLK_RMETA: +#endif + mod = TXT_MOD_ALT; + break; + + default: + return; + } + + if (pressed) + { + ++modifier_state[mod]; + } + else + { + --modifier_state[mod]; + } +} + signed int TXT_GetChar(void) { SDL_Event ev; @@ -522,8 +566,14 @@ signed int TXT_GetChar(void) break; case SDL_KEYDOWN: + UpdateModifierState(&ev.key.keysym, 1); + return TranslateKey(&ev.key.keysym); + case SDL_KEYUP: + UpdateModifierState(&ev.key.keysym, 0); + break; + case SDL_QUIT: // Quit = escape return 27; @@ -542,6 +592,16 @@ signed int TXT_GetChar(void) return -1; } +int TXT_GetModifierState(txt_modifier_t mod) +{ + if (mod < TXT_NUM_MODIFIERS) + { + return modifier_state[mod] > 0; + } + + return 0; +} + static const char *SpecialKeyName(int key) { switch (key) -- cgit v1.2.3 From fe8ede706f67c27561033d2a371280712260a101 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 17 Apr 2011 16:53:47 +0000 Subject: Make Final Doom IWAD labels shorter, so they don't make the launch windows grow. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2326 --- setup/multiplayer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/setup/multiplayer.c b/setup/multiplayer.c index eece16d4..f558e2ab 100644 --- a/setup/multiplayer.c +++ b/setup/multiplayer.c @@ -56,12 +56,12 @@ typedef enum static iwad_t iwads[] = { - { "doom.wad", "Doom", IWAD_DOOM }, - { "doom2.wad", "Doom 2", IWAD_DOOM2 }, - { "tnt.wad", "Final Doom: TNT: Evilution", IWAD_TNT }, - { "plutonia.wad", "Final Doom: The Plutonia Experiment", IWAD_PLUTONIA }, - { "doom1.wad", "Doom shareware", IWAD_DOOM1 }, - { "chex.wad", "Chex Quest", IWAD_CHEX }, + { "doom.wad", "Doom", IWAD_DOOM }, + { "doom2.wad", "Doom 2", IWAD_DOOM2 }, + { "tnt.wad", "Final Doom: TNT", IWAD_TNT }, + { "plutonia.wad", "Final Doom: Plutonia", IWAD_PLUTONIA }, + { "doom1.wad", "Doom shareware", IWAD_DOOM1 }, + { "chex.wad", "Chex Quest", IWAD_CHEX }, }; // Array of IWADs found to be installed -- cgit v1.2.3 From 30952764cf640001a2e8a0e2e4fefec734b147d9 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 17 Apr 2011 17:33:04 +0000 Subject: Fix libtextscreen window hotkeys to work when shift is held down / capslock turned on. Fix a similar problem in-game when typing cheat codes or using menu hotkeys (thanks Alexandre Xavier). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2327 --- NEWS | 5 +++++ src/i_video.c | 2 +- textscreen/txt_window_action.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 1cfca6a7..8a66fb2b 100644 --- a/NEWS +++ b/NEWS @@ -50,6 +50,8 @@ file (thanks Alexandre Xavier). * Default sampling rate used by setup tool changed to 44100Hz, to match the game default (thanks Alexandre Xavier). + * Cheat codes and menu hot keys now work when shift is held down + or capslock turned on (thanks Alexandre Xavier). libtextscreen: * The background on GUI controls now lights up when hovering over @@ -62,6 +64,9 @@ matching location. * Clicking outside a dropdown list popup window now dismisses the window. + * Window hotkeys that are an alphabetical letter now work when + shift is held down or capslock turned on (thanks Alexandre + Xavier). 1.5.0 (2011-01-02): diff --git a/src/i_video.c b/src/i_video.c index cd5d2ace..15e4a6b7 100644 --- a/src/i_video.c +++ b/src/i_video.c @@ -563,7 +563,7 @@ void I_GetEvent(void) } else { - event.data2 = sdlevent.key.keysym.unicode; + event.data2 = tolower(sdlevent.key.keysym.unicode); } if (event.data1 != 0) diff --git a/textscreen/txt_window_action.c b/textscreen/txt_window_action.c index 81d3e94d..df0e4ea3 100644 --- a/textscreen/txt_window_action.c +++ b/textscreen/txt_window_action.c @@ -82,7 +82,7 @@ static int TXT_WindowActionKeyPress(TXT_UNCAST_ARG(action), int key) { TXT_CAST_ARG(txt_window_action_t, action); - if (key == action->key) + if (tolower(key) == tolower(action->key)) { TXT_EmitSignal(action, "pressed"); return 1; -- cgit v1.2.3 From 4511434446e523a5e2a7383b14846df2b91df8f1 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 18 Apr 2011 22:10:16 +0000 Subject: Add test hack for simulating Porsche Monty's scanline emulation (see comment in file). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2328 --- src/i_scale.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/i_scale.c b/src/i_scale.c index 3f7b3a7d..0b702311 100644 --- a/src/i_scale.c +++ b/src/i_scale.c @@ -964,6 +964,21 @@ static boolean I_Stretch5x(int x1, int y1, int x2, int y2) screenp += dest_pitch; bufp += SCREENWIDTH; } + // test hack for Porsche Monty... scan line simulation: + // See here: http://www.doomworld.com/vb/post/962612 + + if (M_CheckParm("-scanline") > 0) + { + screenp = (byte *) dest_buffer + 2 * dest_pitch; + + for (y=0; y<1198; y += 3) + { + memset(screenp, 0, 1600); + + screenp += dest_pitch * 3; + } + } + return true; } -- cgit v1.2.3 From 9f4221bf92510f417bb9263031ca4f18db10e54f Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 24 Apr 2011 21:39:31 +0000 Subject: Add test button to joystick menu in setup tool (thanks Alexandre Xavier). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2329 --- NEWS | 2 ++ setup/joystick.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/NEWS b/NEWS index 8a66fb2b..8569bfd7 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,8 @@ * In the setup tool, it is now possible to hold down shift when changing key/mouse/joystick bindings to prevent other bindings to the same key from being cleared (thanks myk). + * The joystick menu in the setup tool now has a test button + (thanks Alexandre Xavier). Compatibility: * Added support for the alternate version of the Final Doom diff --git a/setup/joystick.c b/setup/joystick.c index fe87439c..5d2dfd68 100644 --- a/setup/joystick.c +++ b/setup/joystick.c @@ -25,6 +25,7 @@ #include "textscreen.h" #include "txt_joybinput.h" +#include "execute.h" #include "joystick.h" typedef enum @@ -438,6 +439,8 @@ void ConfigJoystick(void) TXT_SignalConnect(joystick_button, "pressed", CalibrateJoystick, NULL); TXT_SignalConnect(window, "closed", JoystickWindowClosed, NULL); + TXT_SetWindowAction(window, TXT_HORIZ_CENTER, TestConfigAction()); + SetJoystickButtonLabel(); } -- cgit v1.2.3 From 085797aeb4c05857b315ebf4448322829151aedc Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 24 Apr 2011 22:22:11 +0000 Subject: Infer -server when -privateserver is specified (thanks Porsche Monty). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2330 --- NEWS | 2 ++ src/d_net.c | 3 ++- src/net_server.c | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 8569bfd7..d74aef7b 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,8 @@ to the same key from being cleared (thanks myk). * The joystick menu in the setup tool now has a test button (thanks Alexandre Xavier). + * Specifying the -privateserver option implies -server (thanks + Porsche Monty). Compatibility: * Added support for the alternate version of the Final Doom diff --git a/src/d_net.c b/src/d_net.c index 57fe2399..558c3e4d 100644 --- a/src/d_net.c +++ b/src/d_net.c @@ -278,7 +278,8 @@ void D_CheckNetGame (void) // Start a multiplayer server, listening for connections. // - if (M_CheckParm("-server") > 0) + if (M_CheckParm("-server") > 0 + || M_CheckParm("-privateserver") > 0) { NET_SV_Init(); NET_SV_AddModule(&net_loop_server_module); diff --git a/src/net_server.c b/src/net_server.c index b3a9ea92..d889c120 100644 --- a/src/net_server.c +++ b/src/net_server.c @@ -1565,6 +1565,7 @@ void NET_SV_RegisterWithMaster(void) { //! // When running a server, don't register with the global master server. + // Implies -server. // // @category net // -- cgit v1.2.3 From ec74db92724c181962479703092365b332b70b0a Mon Sep 17 00:00:00 2001 From: James Haley Date: Tue, 26 Apr 2011 05:49:53 +0000 Subject: Support for Win32 native OPL output when compiled with Microsoft Visual C++. Confirmed to work with Aureal Vortex AU8830 in Win98SE by GhostlyDeath. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2331 --- opl/opl_win32.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/opl/opl_win32.c b/opl/opl_win32.c index 29df3643..277ce76c 100644 --- a/opl/opl_win32.c +++ b/opl/opl_win32.c @@ -72,8 +72,35 @@ static void OPL_Win32_PortWrite(opl_port_t port, unsigned int value) ); } -// TODO: MSVC version -// #elif defined(_MSC_VER) && defined(_M_IX6) ... +// haleyjd 20110417: MSVC version +#elif defined(_MSC_VER) && defined(_M_IX86) + +static unsigned int OPL_Win32_PortRead(opl_port_t port) +{ + unsigned char result; + opl_port_t dst_port = opl_port_base + port; + + __asm + { + mov edx, dword ptr [dst_port] + in al, dx + mov byte ptr [result], al + } + + return result; +} + +static void OPL_Win32_PortWrite(opl_port_t port, unsigned int value) +{ + opl_port_t dst_port = opl_port_base + port; + + __asm + { + mov edx, dword ptr [dst_port] + mov al, byte ptr [value] + out dx, al + } +} #else -- cgit v1.2.3 From 1fd0ad08ed4840e681e902bc1b9420a1d41619b4 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 7 May 2011 23:52:26 +0000 Subject: Rework OS X launcher package. Include documentation files within the application bundle and add a help menu with links. Rework .dmg generation to generate a file with a "fancy" background image and overall nicer appearance. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2332 --- pkg/Makefile.am | 3 + pkg/osx/Execute.h | 1 + pkg/osx/Execute.m | 10 + pkg/osx/GNUmakefile | 29 ++- pkg/osx/LauncherManager.h | 6 + pkg/osx/LauncherManager.m | 25 ++ pkg/osx/Resources/launcher.nib/designable.nib | 296 ++++++++++++++++++++++-- pkg/osx/Resources/launcher.nib/keyedobjects.nib | Bin 24936 -> 27157 bytes pkg/osx/disk/background.png | Bin 0 -> 42578 bytes pkg/osx/disk/dir.DS_Store | Bin 0 -> 8196 bytes pkg/osx/dmgfix | 64 +++++ 11 files changed, 416 insertions(+), 18 deletions(-) create mode 100644 pkg/osx/disk/background.png create mode 100644 pkg/osx/disk/dir.DS_Store create mode 100755 pkg/osx/dmgfix diff --git a/pkg/Makefile.am b/pkg/Makefile.am index a22e4018..a2850195 100644 --- a/pkg/Makefile.am +++ b/pkg/Makefile.am @@ -7,10 +7,13 @@ osx/Resources/wadfile.icns \ osx/Resources/wadfile.png \ osx/Resources/launcher.nib/designable.nib \ osx/Resources/launcher.nib/keyedobjects.nib \ +osx/disk/dir.DS_Store \ +osx/disk/background.png \ osx/GNUmakefile \ osx/Info.plist.in osx/Info-gnustep.plist.in \ osx/PkgInfo \ osx/cp-with-libs \ +osx/dmgfix \ osx/main.m \ osx/AppController.m osx/AppController.h \ osx/Execute.m osx/Execute.h \ diff --git a/pkg/osx/Execute.h b/pkg/osx/Execute.h index 2098be8a..79591f64 100644 --- a/pkg/osx/Execute.h +++ b/pkg/osx/Execute.h @@ -26,6 +26,7 @@ void SetProgramLocation(const char *path); void ExecuteProgram(const char *executable, const char *iwad, const char *args); void OpenTerminalWindow(const char *doomwadpath); +void OpenDocumentation(const char *filename); #endif /* #ifndef LAUNCHER_EXECUTE_H */ diff --git a/pkg/osx/Execute.m b/pkg/osx/Execute.m index ffeddadd..0dcfbb7c 100644 --- a/pkg/osx/Execute.m +++ b/pkg/osx/Execute.m @@ -219,3 +219,13 @@ void OpenTerminalWindow(const char *doomwadpath) withApplication: @"Terminal"]; } +void OpenDocumentation(const char *filename) +{ + NSString *path; + + path = [NSString stringWithFormat: @"%s/Documentation/%s", + executable_path, filename]; + + [[NSWorkspace sharedWorkspace] openFile: path]; +} + diff --git a/pkg/osx/GNUmakefile b/pkg/osx/GNUmakefile index f9bb6417..514a208d 100644 --- a/pkg/osx/GNUmakefile +++ b/pkg/osx/GNUmakefile @@ -20,9 +20,17 @@ ifndef GNUSTEP_MAKEFILES # DMG file containing package: -$(DMG) : $(STAGING_DIR) +$(DMG) : tmp.dmg rm -f $@ - hdiutil create -volname "$(PACKAGE_STRING)" -srcdir $(STAGING_DIR) $@ + ./dmgfix "$(realpath tmp.dmg)" "$(PACKAGE_STRING)" "$(PACKAGE_NAME).app" + hdiutil convert -format UDZO -o $@ tmp.dmg + rm -f tmp.dmg + +tmp.dmg : $(STAGING_DIR) + rm -f $@ + hdiutil makehybrid -hfs -hfs-volume-name "$(PACKAGE_STRING)" \ + -hfs-openfolder $(STAGING_DIR) $(STAGING_DIR) \ + -o tmp.dmg endif @@ -46,12 +54,13 @@ APP_BIN_DIR=$(APP_DIR)/Contents/MacOS SRC_INFO_PLIST=Info.plist endif +APP_DOC_DIR=$(APP_BIN_DIR)/Documentation +APP_DOC_RELDIR=$(patsubst $(STAGING_DIR)/%,%,$(APP_DOC_DIR)) + $(STAGING_DIR): launcher $(TOPLEVEL_DOCS) rm -rf $(STAGING_DIR) mkdir $(STAGING_DIR) - cp $(TOPLEVEL_DOCS) "$(STAGING_DIR)" - mkdir -p "$(APP_TOP_DIR)" cp -R Resources "$(APP_TOP_DIR)" cp PkgInfo "$(APP_TOP_DIR)" @@ -59,6 +68,13 @@ $(STAGING_DIR): launcher $(TOPLEVEL_DOCS) mkdir -p "$(APP_BIN_DIR)" + mkdir -p "$(APP_DOC_DIR)" + cp $(TOPLEVEL_DOCS) "$(APP_DOC_DIR)" + + ln -s "$(APP_DOC_RELDIR)/COPYING" "$(STAGING_DIR)/Software License" + ln -s "$(APP_DOC_RELDIR)/README" "$(STAGING_DIR)/README" + ln -s /Applications "$(STAGING_DIR)" + cp launcher "$(APP_BIN_DIR)" $(STRIP) "$(APP_BIN_DIR)/launcher" @@ -69,13 +85,16 @@ $(STAGING_DIR): launcher $(TOPLEVEL_DOCS) $(TOPLEVEL)/man/simplecpp -DPRECOMPILED -D__MACOSX__ \ < $(TOPLEVEL)/man/INSTALL.template \ - > $(STAGING_DIR)/INSTALL + > "$(APP_DOC_DIR)/INSTALL" find $(STAGING_DIR) -name .svn -delete -exec rm -rf {} \; || true mkdir -p "$(APP_BIN_DIR)/man/man5" "$(APP_BIN_DIR)/man/man6" cp $(TOPLEVEL)/man/*.5 "$(APP_BIN_DIR)/man/man5" cp $(TOPLEVEL)/man/*.6 "$(APP_BIN_DIR)/man/man6" + cp disk/dir.DS_Store $(STAGING_DIR)/.DS_Store + cp disk/background.png $(STAGING_DIR)/background.png +# setfile -a V $(STAGING_DIR)/background.png clean : launcher_clean rm -f $(DMG) diff --git a/pkg/osx/LauncherManager.h b/pkg/osx/LauncherManager.h index 7e8c35cd..712bc093 100644 --- a/pkg/osx/LauncherManager.h +++ b/pkg/osx/LauncherManager.h @@ -45,6 +45,12 @@ forArgument: (NSString *) args; - (void) openTerminal: (id) sender; +- (void) openREADME: (id) sender; +- (void) openINSTALL: (id) sender; +- (void) openCMDLINE: (id) sender; +- (void) openCOPYING: (id) sender; +- (void) openDocumentation: (id) sender; + @end #endif /* #ifndef LAUNCHER_LAUNCHERMANAGER_H */ diff --git a/pkg/osx/LauncherManager.m b/pkg/osx/LauncherManager.m index 8c523ab4..df1ad18e 100644 --- a/pkg/osx/LauncherManager.m +++ b/pkg/osx/LauncherManager.m @@ -325,6 +325,31 @@ static NSString *AppendQuotedFilename(NSString *str, NSString *fileName) free(doomwadpath); } +- (void) openREADME: (id) sender +{ + OpenDocumentation("README"); +} + +- (void) openINSTALL: (id) sender +{ + OpenDocumentation("INSTALL"); +} + +- (void) openCMDLINE: (id) sender +{ + OpenDocumentation("CMDLINE"); +} + +- (void) openCOPYING: (id) sender +{ + OpenDocumentation("COPYING"); +} + +- (void) openDocumentation: (id) sender +{ + OpenDocumentation(""); +} + - (void) awakeFromNib { [self->launcherWindow setTitle: @PACKAGE_NAME " Launcher"]; diff --git a/pkg/osx/Resources/launcher.nib/designable.nib b/pkg/osx/Resources/launcher.nib/designable.nib index 856ea06f..b3e76d22 100644 --- a/pkg/osx/Resources/launcher.nib/designable.nib +++ b/pkg/osx/Resources/launcher.nib/designable.nib @@ -2,19 +2,19 @@ 1060 - 10F569 - 823 - 1038.29 + 10J869 + 851 + 1038.35 461.00 com.apple.InterfaceBuilder.CocoaPlugin - 823 + 851 YES - + - + YES @@ -600,6 +600,73 @@ _NSWindowsMenu + + + Help + + 2147483647 + + + submenuAction: + + Help + + YES + + + Introduction + ? + 1048576 + 2147483647 + + + + + + Set up guide + + 2147483647 + + + + + + Command line reference + + 2147483647 + + + + + + More documentation... + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Software license + + 2147483647 + + + + + _NSHelpMenu + + _NSMainMenu @@ -921,6 +988,26 @@ 25 + + + 268 + {{17, 16}, {25, 25}} + + YES + + 67239424 + 134217728 + + + + -2038415105 + 161 + + + 200 + 25 + + {480, 316} @@ -1312,6 +1399,54 @@ 322 + + + openINSTALL: + + + + 374 + + + + openCMDLINE: + + + + 376 + + + + openDocumentation: + + + + 378 + + + + openCOPYING: + + + + 381 + + + + openREADME: + + + + 382 + + + + openINSTALL: + + + + 385 + @@ -1442,6 +1577,7 @@ + MainMenu @@ -1693,6 +1829,7 @@ + @@ -2035,6 +2172,73 @@ + + 369 + + + YES + + + + + + 370 + + + YES + + + + + + + + + + + 371 + + + + + 373 + + + + + 375 + + + + + 377 + + + + + 379 + + + + + 380 + + + + + 383 + + + YES + + + + + + 384 + + + @@ -2043,6 +2247,7 @@ YES 129.IBPluginDependency 129.ImportedFromIB2 + 130.IBEditorWindowLastContentRect 130.IBPluginDependency 130.ImportedFromIB2 131.IBPluginDependency @@ -2131,6 +2336,7 @@ 238.ImportedFromIB2 239.IBPluginDependency 239.ImportedFromIB2 + 24.IBEditorWindowLastContentRect 24.IBPluginDependency 24.ImportedFromIB2 240.IBPluginDependency @@ -2158,6 +2364,7 @@ 270.ImportedFromIB2 274.IBPluginDependency 274.ImportedFromIB2 + 275.IBEditorWindowLastContentRect 275.IBPluginDependency 275.ImportedFromIB2 281.IBPluginDependency @@ -2184,10 +2391,22 @@ 349.IBPluginDependency 350.IBPluginDependency 351.IBPluginDependency + 369.IBPluginDependency + 370.IBEditorWindowLastContentRect + 370.IBPluginDependency + 371.IBPluginDependency + 373.IBPluginDependency + 375.IBPluginDependency + 377.IBPluginDependency + 379.IBPluginDependency + 380.IBPluginDependency + 383.IBPluginDependency + 384.IBPluginDependency 5.IBPluginDependency 5.ImportedFromIB2 56.IBPluginDependency 56.ImportedFromIB2 + 57.IBEditorWindowLastContentRect 57.IBPluginDependency 57.ImportedFromIB2 58.IBPluginDependency @@ -2199,6 +2418,7 @@ YES com.apple.InterfaceBuilder.CocoaPlugin + {{576, 728}, {64, 6}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -2231,9 +2451,9 @@ P4AAAL+AAABBiAAAwyEAAA - {{337, 406}, {530, 190}} + {{368, 418}, {530, 190}} com.apple.InterfaceBuilder.CocoaPlugin - {{337, 406}, {530, 190}} + {{368, 418}, {530, 190}} @@ -2274,13 +2494,13 @@ com.apple.InterfaceBuilder.CocoaPlugin - P4AAAL+AAABBYAAAwgQAAA + P4AAAL+AAABBYAAAwigAAA - {{329, 484}, {480, 316}} + {{421, 438}, {480, 316}} com.apple.InterfaceBuilder.CocoaPlugin - {{329, 484}, {480, 316}} + {{421, 438}, {480, 316}} {213, 107} @@ -2303,6 +2523,7 @@ com.apple.InterfaceBuilder.CocoaPlugin + {{469, 741}, {194, 73}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -2330,6 +2551,7 @@ com.apple.InterfaceBuilder.CocoaPlugin + {{425, 661}, {151, 153}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -2340,7 +2562,7 @@ com.apple.InterfaceBuilder.CocoaPlugin - {{329, 814}, {223, 20}} + {{329, 814}, {272, 20}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -2357,9 +2579,21 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + {{540, 701}, {238, 113}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + {{341, 611}, {235, 203}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -2384,7 +2618,7 @@ - 351 + 385 @@ -2410,6 +2644,7 @@ FirstResponder + NSObject IBUserSource @@ -2560,6 +2795,11 @@ YES launch: + openCMDLINE: + openCOPYING: + openDocumentation: + openINSTALL: + openREADME: openTerminal: runSetup: @@ -2568,6 +2808,11 @@ id id id + id + id + id + id + id @@ -2575,6 +2820,11 @@ YES launch: + openCMDLINE: + openCOPYING: + openDocumentation: + openINSTALL: + openREADME: openTerminal: runSetup: @@ -2584,6 +2834,26 @@ launch: id + + openCMDLINE: + id + + + openCOPYING: + id + + + openDocumentation: + id + + + openINSTALL: + id + + + openREADME: + id + openTerminal: id diff --git a/pkg/osx/Resources/launcher.nib/keyedobjects.nib b/pkg/osx/Resources/launcher.nib/keyedobjects.nib index 93066265..7df7670c 100644 Binary files a/pkg/osx/Resources/launcher.nib/keyedobjects.nib and b/pkg/osx/Resources/launcher.nib/keyedobjects.nib differ diff --git a/pkg/osx/disk/background.png b/pkg/osx/disk/background.png new file mode 100644 index 00000000..07c3d81b Binary files /dev/null and b/pkg/osx/disk/background.png differ diff --git a/pkg/osx/disk/dir.DS_Store b/pkg/osx/disk/dir.DS_Store new file mode 100644 index 00000000..b7104637 Binary files /dev/null and b/pkg/osx/disk/dir.DS_Store differ diff --git a/pkg/osx/dmgfix b/pkg/osx/dmgfix new file mode 100755 index 00000000..560b17ed --- /dev/null +++ b/pkg/osx/dmgfix @@ -0,0 +1,64 @@ +#!/usr/bin/osascript +-- +-- Copyright(C) 2009 Simon Howard +-- +-- This program is free software; you can redistribute it and/or +-- modify it under the terms of the GNU General Public License +-- as published by the Free Software Foundation; either version 2 +-- of the License, or (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program; if not, write to the Free Software +-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +-- 02111-1307, USA. +-- +-- +-- AppleScript script to automatically set the view properties in a +-- .dmg file - ie. the background image, other Finder view options +-- and icon positions. +-- +-- Usage: dmgfix +-- + +on run argv + set dmgFile to POSIX file (item 1 of argv) + set diskName to item 2 of argv + set appName to item 3 of argv + + tell application "Finder" + --activate + open dmgFile + delay 1 + set win to the front Finder window + set theDisk to disk diskName + set the target of win to theDisk + + -- window options: + + set bgfile to file "background.png" of theDisk + set the bounds of win to {200, 200, 717, 536} + set icon size of icon view options of win to 96 + set background picture of icon view options of win to bgfile + set toolbar visible of win to false + + -- hide background file: + + set bgloc to quoted form of POSIX path of (bgfile as text) + do shell script "SetFile -a V " & bgloc + + -- icon positions: + + set position of file "README" of theDisk to {120, 250} + set position of file "Software License" of theDisk to {380, 250} + set position of file appName of theDisk to {70, 110} + set position of file "Applications" of theDisk to {450, 110} + + eject theDisk + end tell +end run + -- cgit v1.2.3 From 6e9294e05572d46d3897744d78f4604b412ceb65 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 8 May 2011 00:31:01 +0000 Subject: Shut up compiler warnings. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2333 --- src/deh_io.c | 2 +- src/i_scale.c | 1 + src/p_setup.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/deh_io.c b/src/deh_io.c index 92c81632..83609068 100644 --- a/src/deh_io.c +++ b/src/deh_io.c @@ -181,7 +181,7 @@ int DEH_GetCharLump(deh_context_t *context) int DEH_GetChar(deh_context_t *context) { - int result; + int result = 0; // Read characters, but ignore carriage returns // Essentially this is a DOS->Unix conversion diff --git a/src/i_scale.c b/src/i_scale.c index 0b702311..8cecb1f8 100644 --- a/src/i_scale.c +++ b/src/i_scale.c @@ -30,6 +30,7 @@ #include "doomtype.h" #include "i_video.h" +#include "m_argv.h" #include "z_zone.h" #if defined(_MSC_VER) && !defined(__cplusplus) diff --git a/src/p_setup.c b/src/p_setup.c index e18ec81e..58d5f462 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -700,7 +700,7 @@ static void PadRejectArray(byte *array, unsigned int len) if (len > sizeof(rejectpad)) { fprintf(stderr, "PadRejectArray: REJECT lump too short to pad! (%i > %i)\n", - len, sizeof(rejectpad)); + len, (int) sizeof(rejectpad)); // Pad remaining space with 0 (or 0xff, if specified on command line). -- cgit v1.2.3 From 351c1be33154d12b55e658cfb8f3101858fba63c Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 8 May 2011 18:29:46 +0000 Subject: Allow IWAD files to be double-clicked in the finder to set the IWAD configuration. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2334 --- pkg/osx/AppController.m | 8 ++++++++ pkg/osx/IWADController.h | 1 + pkg/osx/IWADController.m | 39 +++++++++++++++++++++++++++++++++++++++ pkg/osx/LauncherManager.h | 1 + pkg/osx/LauncherManager.m | 5 +++++ 5 files changed, 54 insertions(+) diff --git a/pkg/osx/AppController.m b/pkg/osx/AppController.m index a26a7c9e..ba8dae9b 100644 --- a/pkg/osx/AppController.m +++ b/pkg/osx/AppController.m @@ -83,6 +83,14 @@ { NSString *extension; + // This may be an IWAD. If so, add it to the IWAD configuration; + // don't add it like a PWAD. + + if ([self->launcherManager addIWADPath: fileName]) + { + return YES; + } + // If this is the first file added, clear out the existing // command line. This allows us to select multiple files // in the finder and open them all together (for TCs, etc). diff --git a/pkg/osx/IWADController.h b/pkg/osx/IWADController.h index 90f44667..7464af9f 100644 --- a/pkg/osx/IWADController.h +++ b/pkg/osx/IWADController.h @@ -47,6 +47,7 @@ - (void) saveConfig; - (char *) doomWadPath; - (void) setEnvironment; +- (BOOL) addIWADPath: (NSString *) path; @end diff --git a/pkg/osx/IWADController.m b/pkg/osx/IWADController.m index 3c596850..0c55b3f5 100644 --- a/pkg/osx/IWADController.m +++ b/pkg/osx/IWADController.m @@ -343,5 +343,44 @@ static NSString *IWADFilenames[NUM_IWAD_TYPES + 1] = //free(env); } +// Examine a path to a WAD and determine whether it is an IWAD file. +// If so, it is added to the IWAD configuration, and true is returned. + +- (BOOL) addIWADPath: (NSString *) path +{ + IWADLocation *iwadList[NUM_IWAD_TYPES]; + NSArray *pathComponents; + NSString *filename; + unsigned int i; + + [self getIWADList: iwadList]; + + // Find an IWAD file that matches the filename in the path that we + // have been given. + + pathComponents = [path pathComponents]; + filename = [pathComponents objectAtIndex: [pathComponents count] - 1]; + + for (i = 0; i < NUM_IWAD_TYPES; ++i) + { + if ([filename caseInsensitiveCompare: IWADFilenames[i]] == 0) + { + // Configure this IWAD. + + [iwadList[i] setLocation: path]; + + // Rebuild dropdown list and select the new IWAD. + + [self setDropdownList]; + [self->iwadSelector selectItemWithTitle:IWADLabels[i]]; + return YES; + } + } + + // No IWAD found with this name. + + return NO; +} + @end diff --git a/pkg/osx/LauncherManager.h b/pkg/osx/LauncherManager.h index 712bc093..1c8a5187 100644 --- a/pkg/osx/LauncherManager.h +++ b/pkg/osx/LauncherManager.h @@ -41,6 +41,7 @@ - (void) runSetup: (id)sender; - (void) awakeFromNib; - (void) clearCommandLine; +- (BOOL) addIWADPath: (NSString *) path; - (void) addFileToCommandLine: (NSString *) fileName forArgument: (NSString *) args; - (void) openTerminal: (id) sender; diff --git a/pkg/osx/LauncherManager.m b/pkg/osx/LauncherManager.m index df1ad18e..937c0d98 100644 --- a/pkg/osx/LauncherManager.m +++ b/pkg/osx/LauncherManager.m @@ -358,5 +358,10 @@ static NSString *AppendQuotedFilename(NSString *str, NSString *fileName) [self setConfig]; } +- (BOOL) addIWADPath: (NSString *) path +{ + return [self->iwadController addIWADPath: path]; +} + @end -- cgit v1.2.3 From 87efdfbd570fe85141ec5e8b8f5814563fcf1d4f Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 8 May 2011 18:32:02 +0000 Subject: Update NEWS. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2335 --- NEWS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NEWS b/NEWS index d74aef7b..72ca2670 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,10 @@ (thanks Alexandre Xavier). * Specifying the -privateserver option implies -server (thanks Porsche Monty). + * The Mac OS X .dmg package now has a background and looks generally + more polished. + * In Mac OS X, it is now possible to simply double click an IWAD + file in the Finder to configure its location within the launcher. Compatibility: * Added support for the alternate version of the Final Doom -- cgit v1.2.3 From 184ea9ba501adf04b9b352760774fde268c0cc7f Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 14 May 2011 20:11:26 +0000 Subject: Convert build system to using the PROGRAM_PREFIX system used on raven-branch. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2336 --- codeblocks/config.h | 3 +++ configure.in | 11 +++++++++++ msvc/config.h | 3 +++ pkg/config.make.in | 1 + pkg/osx/GNUmakefile | 9 ++++----- pkg/osx/LauncherManager.m | 6 +++--- pkg/win32/GNUmakefile | 6 +++--- setup/Makefile.am | 11 +++++------ setup/configfile.c | 6 +++--- setup/setup-manifest.xml | 33 --------------------------------- setup/setup-manifest.xml.in | 33 +++++++++++++++++++++++++++++++++ src/Makefile.am | 12 ++++++------ src/doom-screensaver.desktop.in | 4 ++-- src/m_config.c | 6 +++--- 14 files changed, 80 insertions(+), 64 deletions(-) delete mode 100644 setup/setup-manifest.xml create mode 100644 setup/setup-manifest.xml.in diff --git a/codeblocks/config.h b/codeblocks/config.h index 9026d398..75da3ba1 100644 --- a/codeblocks/config.h +++ b/codeblocks/config.h @@ -17,6 +17,9 @@ /* Define to the version of this package. */ #define PACKAGE_VERSION "1.5.0" +/* Change this when you create your awesome forked version */ +#define PROGRAM_PREFIX "chocolate-" + /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 diff --git a/configure.in b/configure.in index c653f4e9..7007b96e 100644 --- a/configure.in +++ b/configure.in @@ -112,6 +112,16 @@ AM_INIT_AUTOMAKE([1.8.0]) WINDOWS_RC_VERSION=`echo $PACKAGE_VERSION.0 | sed 's/\./, /g' ` +# This controls the prefix added to the start of program names. For example, +# if this is changed to "lemon-", the programs generated will be named +# lemon-doom, lemon-heretic, etc. + +PROGRAM_PREFIX=chocolate- + +AC_SUBST(PROGRAM_PREFIX) +AC_DEFINE_UNQUOTED(PROGRAM_PREFIX, "$PROGRAM_PREFIX", + Change this when you create your awesome forked version) + AM_CONFIG_HEADER(config.h:config.hin) AC_SUBST(WINDOWS_RC_VERSION) @@ -145,6 +155,7 @@ pkg/osx/Info.plist pkg/osx/Info-gnustep.plist setup/Makefile setup/setup-res.rc +setup/setup-manifest.xml src/Makefile src/doom-screensaver.desktop src/resource.rc diff --git a/msvc/config.h b/msvc/config.h index d91bd23b..f00d581e 100644 --- a/msvc/config.h +++ b/msvc/config.h @@ -19,6 +19,9 @@ /* Define to the version of this package. */ #define PACKAGE_VERSION "1.5.0" +/* Change this when you create your awesome forked version */ +#define PROGRAM_PREFIX "chocolate-" + /* Version number of package */ #define VERSION "1.5.0" diff --git a/pkg/config.make.in b/pkg/config.make.in index 445e89a9..8f94f945 100644 --- a/pkg/config.make.in +++ b/pkg/config.make.in @@ -10,6 +10,7 @@ STRIP = @STRIP@ # Package name and version number: +PROGRAM_PREFIX = @PROGRAM_PREFIX@ PACKAGE = @PACKAGE@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ diff --git a/pkg/osx/GNUmakefile b/pkg/osx/GNUmakefile index 514a208d..d53a9981 100644 --- a/pkg/osx/GNUmakefile +++ b/pkg/osx/GNUmakefile @@ -78,10 +78,10 @@ $(STAGING_DIR): launcher $(TOPLEVEL_DOCS) cp launcher "$(APP_BIN_DIR)" $(STRIP) "$(APP_BIN_DIR)/launcher" - ./cp-with-libs $(TOPLEVEL)/src/$(PACKAGE_TARNAME) "$(APP_BIN_DIR)" - $(STRIP) "$(APP_BIN_DIR)/$(PACKAGE_TARNAME)" - ./cp-with-libs $(TOPLEVEL)/setup/chocolate-setup "$(APP_BIN_DIR)" - $(STRIP) "$(APP_BIN_DIR)/chocolate-setup" + ./cp-with-libs $(TOPLEVEL)/src/$(PROGRAM_PREFIX)doom "$(APP_BIN_DIR)" + $(STRIP) "$(APP_BIN_DIR)/$(PROGRAM_PREFIX)doom" + ./cp-with-libs $(TOPLEVEL)/setup/$(PROGRAM_PREFIX)setup "$(APP_BIN_DIR)" + $(STRIP) "$(APP_BIN_DIR)/$(PROGRAM_PREFIX)setup" $(TOPLEVEL)/man/simplecpp -DPRECOMPILED -D__MACOSX__ \ < $(TOPLEVEL)/man/INSTALL.template \ @@ -94,7 +94,6 @@ $(STAGING_DIR): launcher $(TOPLEVEL_DOCS) cp $(TOPLEVEL)/man/*.6 "$(APP_BIN_DIR)/man/man6" cp disk/dir.DS_Store $(STAGING_DIR)/.DS_Store cp disk/background.png $(STAGING_DIR)/background.png -# setfile -a V $(STAGING_DIR)/background.png clean : launcher_clean rm -f $(DMG) diff --git a/pkg/osx/LauncherManager.m b/pkg/osx/LauncherManager.m index 937c0d98..69c59577 100644 --- a/pkg/osx/LauncherManager.m +++ b/pkg/osx/LauncherManager.m @@ -294,8 +294,8 @@ static NSString *AppendQuotedFilename(NSString *str, NSString *fileName) return; } - ExecuteProgram(PACKAGE_TARNAME, [iwad UTF8String], - [args UTF8String]); + ExecuteProgram(PROGRAM_PREFIX "doom", [iwad UTF8String], + [args UTF8String]); [NSApp terminate:sender]; } @@ -306,7 +306,7 @@ static NSString *AppendQuotedFilename(NSString *str, NSString *fileName) [self saveConfig]; [self->iwadController setEnvironment]; - ExecuteProgram("chocolate-setup", NULL, NULL); + ExecuteProgram(PROGRAM_PREFIX "setup", NULL, NULL); } // Invoked when the "Terminal" option is selected from the menu, to open diff --git a/pkg/win32/GNUmakefile b/pkg/win32/GNUmakefile index 7df4cc16..34f2c9bd 100644 --- a/pkg/win32/GNUmakefile +++ b/pkg/win32/GNUmakefile @@ -3,9 +3,9 @@ include ../config.make TOPLEVEL=../.. -EXE_FILES=$(TOPLEVEL)/src/$(PACKAGE_TARNAME).exe \ - $(TOPLEVEL)/src/chocolate-server.exe \ - $(TOPLEVEL)/setup/chocolate-setup.exe +EXE_FILES=$(TOPLEVEL)/src/$(PROGRAM_PREFIX)doom.exe \ + $(TOPLEVEL)/src/$(PROGRAM_PREFIX)server.exe \ + $(TOPLEVEL)/setup/$(PROGRAM_PREFIX)setup.exe DLL_FILES=$(TOPLEVEL)/src/SDL.dll \ $(TOPLEVEL)/src/SDL_mixer.dll \ diff --git a/setup/Makefile.am b/setup/Makefile.am index 91c7449a..96003ce0 100644 --- a/setup/Makefile.am +++ b/setup/Makefile.am @@ -3,7 +3,7 @@ gamesdir = $(prefix)/games AM_CFLAGS = -I../textscreen -I../src @SDLMIXER_CFLAGS@ -games_PROGRAMS = chocolate-setup +games_PROGRAMS = @PROGRAM_PREFIX@setup SOURCE_FILES = \ compatibility.c compatibility.h \ @@ -22,16 +22,15 @@ SOURCE_FILES = \ txt_mouseinput.c txt_mouseinput.h EXTRA_DIST= \ - setup_icon.c \ - setup-manifest.xml + setup_icon.c if HAVE_WINDRES -chocolate_setup_SOURCES=$(SOURCE_FILES) setup-res.rc +@PROGRAM_PREFIX@setup_SOURCES=$(SOURCE_FILES) setup-res.rc else -chocolate_setup_SOURCES=$(SOURCE_FILES) +@PROGRAM_PREFIX@setup_SOURCES=$(SOURCE_FILES) endif -chocolate_setup_LDADD = \ +@PROGRAM_PREFIX@setup_LDADD = \ ../wince/libc_wince.a \ ../textscreen/libtextscreen.a \ @SDLMIXER_LIBS@ \ diff --git a/setup/configfile.c b/setup/configfile.c index c7109739..6a6eb3f6 100644 --- a/setup/configfile.c +++ b/setup/configfile.c @@ -637,9 +637,9 @@ void M_LoadDefaults (void) else { extra_defaults.filename - = malloc(strlen(configdir) + strlen(PACKAGE_TARNAME) + 10); - sprintf(extra_defaults.filename, "%s%s.cfg", - configdir, PACKAGE_TARNAME); + = malloc(strlen(configdir) + strlen(PROGRAM_PREFIX) + 15); + sprintf(extra_defaults.filename, "%s%sdoom.cfg", + configdir, PROGRAM_PREFIX); } LoadDefaultCollection(&doom_defaults); diff --git a/setup/setup-manifest.xml b/setup/setup-manifest.xml deleted file mode 100644 index c2788306..00000000 --- a/setup/setup-manifest.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/setup/setup-manifest.xml.in b/setup/setup-manifest.xml.in new file mode 100644 index 00000000..ff879263 --- /dev/null +++ b/setup/setup-manifest.xml.in @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Makefile.am b/src/Makefile.am index 26fe7c7d..7a690cf1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,7 +1,7 @@ gamesdir = $(prefix)/games -games_PROGRAMS = chocolate-doom chocolate-server +games_PROGRAMS = @PROGRAM_PREFIX@doom @PROGRAM_PREFIX@server AM_CFLAGS = -I../opl -I../textscreen -I../pcsound @SDLMIXER_CFLAGS@ @SDLNET_CFLAGS@ @@ -21,8 +21,8 @@ net_server.c net_server.h \ net_structrw.c net_structrw.h \ z_native.c z_zone.h -chocolate_server_SOURCES=$(DEDSERV_FILES) -chocolate_server_LDADD = ../wince/libc_wince.a @LDFLAGS@ @SDLNET_LIBS@ +@PROGRAM_PREFIX@server_SOURCES=$(DEDSERV_FILES) +@PROGRAM_PREFIX@server_LDADD = ../wince/libc_wince.a @LDFLAGS@ @SDLNET_LIBS@ MAIN_SOURCE_FILES=\ am_map.c am_map.h \ @@ -167,12 +167,12 @@ SOURCE_FILES = $(MAIN_SOURCE_FILES) \ $(FEATURE_SOUND_SOURCE_FILES) if HAVE_WINDRES -chocolate_doom_SOURCES=$(SOURCE_FILES) resource.rc +@PROGRAM_PREFIX@doom_SOURCES=$(SOURCE_FILES) resource.rc else -chocolate_doom_SOURCES=$(SOURCE_FILES) +@PROGRAM_PREFIX@doom_SOURCES=$(SOURCE_FILES) endif -chocolate_doom_LDADD = \ +@PROGRAM_PREFIX@doom_LDADD = \ ../wince/libc_wince.a \ ../textscreen/libtextscreen.a \ ../pcsound/libpcsound.a \ diff --git a/src/doom-screensaver.desktop.in b/src/doom-screensaver.desktop.in index cee79c2d..1d6e3303 100644 --- a/src/doom-screensaver.desktop.in +++ b/src/doom-screensaver.desktop.in @@ -3,8 +3,8 @@ Encoding=UTF-8 Name=Doom Comment=DOOM by Id Software. -TryExec=@PACKAGE_TARNAME@ -Exec=@PACKAGE_TARNAME@ +TryExec=@PACKAGE_PREFIX@doom +Exec=@PACKAGE_PREFIX@doom StartupNotify=false Terminal=false Type=Application diff --git a/src/m_config.c b/src/m_config.c index 04d0a963..d0fd5185 100644 --- a/src/m_config.c +++ b/src/m_config.c @@ -1452,9 +1452,9 @@ void M_LoadDefaults (void) else { extra_defaults.filename - = malloc(strlen(configdir) + strlen(PACKAGE_TARNAME) + 10); - sprintf(extra_defaults.filename, "%s%s.cfg", - configdir, PACKAGE_TARNAME); + = malloc(strlen(configdir) + strlen(PROGRAM_PREFIX) + 15); + sprintf(extra_defaults.filename, "%s%sdoom.cfg", + configdir, PROGRAM_PREFIX); } LoadDefaultCollection(&doom_defaults); -- cgit v1.2.3 From d07b88e469abbb7c82d10fbe17473d529aaa4388 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 14 May 2011 21:07:55 +0000 Subject: Add freedesktop.org desktop files for chocolate-doom, chocolate-setup (thanks Adrián Chaves Fernández). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2337 --- Makefile.am | 13 +------------ NEWS | 4 ++++ configure.in | 3 +++ data/.gitignore | 4 ++++ data/Makefile.am | 21 +++++++++++++++++++++ rpm.spec.in | 2 ++ setup/.gitignore | 5 ++++- setup/Makefile.am | 6 ++++++ setup/setup.desktop.in | 7 +++++++ src/Makefile.am | 10 ++++++++++ src/doom-screensaver.desktop.in | 4 ++-- src/doom.desktop.in | 7 +++++++ 12 files changed, 71 insertions(+), 15 deletions(-) create mode 100644 data/.gitignore create mode 100644 data/Makefile.am create mode 100644 setup/setup.desktop.in create mode 100644 src/doom.desktop.in diff --git a/Makefile.am b/Makefile.am index 56c82fe8..d766ab61 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,16 +23,6 @@ CODEBLOCKS_FILES= \ codeblocks/setup-res.rc \ codeblocks/textscreen.cbp -DATA_FILES= \ - data/README \ - data/doom.ico \ - data/doom8.ico \ - data/doom.png \ - data/setup.ico \ - data/setup8.ico \ - data/setup.png \ - data/convert-icon - DOC_FILES= \ CMDLINE \ README \ @@ -45,7 +35,6 @@ EXTRA_DIST= \ $(AUX_DIST_GEN) \ $(MSVC_FILES) \ $(CODEBLOCKS_FILES) \ - $(DATA_FILES) \ $(DOC_FILES) \ .lvimrc \ HACKING \ @@ -57,7 +46,7 @@ doc_DATA=$(DOC_FILES) MAINTAINERCLEANFILES = $(AUX_DIST_GEN) -SUBDIRS=wince textscreen opl pcsound src man setup +SUBDIRS=wince textscreen opl pcsound data src man setup DIST_SUBDIRS=pkg $(SUBDIRS) if HAVE_PYTHON diff --git a/NEWS b/NEWS index 72ca2670..759e6af3 100644 --- a/NEWS +++ b/NEWS @@ -20,6 +20,10 @@ more polished. * In Mac OS X, it is now possible to simply double click an IWAD file in the Finder to configure its location within the launcher. + * Freedesktop.org desktop files are now installed for Doom and + the setup tool, which will appear in the main menu on desktop + environments such as Gnome and KDE (thanks Adrián Chaves + Fernández). Compatibility: * Added support for the alternate version of the Final Doom diff --git a/configure.in b/configure.in index 7007b96e..2ef7c41c 100644 --- a/configure.in +++ b/configure.in @@ -154,9 +154,12 @@ pkg/config.make pkg/osx/Info.plist pkg/osx/Info-gnustep.plist setup/Makefile +setup/setup.desktop setup/setup-res.rc setup/setup-manifest.xml +data/Makefile src/Makefile +src/doom.desktop src/doom-screensaver.desktop src/resource.rc textscreen/Makefile diff --git a/data/.gitignore b/data/.gitignore new file mode 100644 index 00000000..a76bba93 --- /dev/null +++ b/data/.gitignore @@ -0,0 +1,4 @@ +Makefile.in +Makefile +*-doom.png +*-setup.png diff --git a/data/Makefile.am b/data/Makefile.am new file mode 100644 index 00000000..dccb51a3 --- /dev/null +++ b/data/Makefile.am @@ -0,0 +1,21 @@ + +EXTRA_DIST= \ + README \ + doom.ico \ + doom8.ico \ + doom.png \ + setup.ico \ + setup8.ico \ + setup.png \ + convert-icon + +iconsdir = $(prefix)/share/icons +icons_DATA = @PROGRAM_PREFIX@doom.png \ + @PROGRAM_PREFIX@setup.png + +@PROGRAM_PREFIX@doom.png : doom.png + cp $^ $@ + +@PROGRAM_PREFIX@setup.png : setup.png + cp $^ $@ + diff --git a/rpm.spec.in b/rpm.spec.in index f9c001bb..137a9517 100644 --- a/rpm.spec.in +++ b/rpm.spec.in @@ -51,4 +51,6 @@ rm -rf $RPM_BUILD_ROOT %doc %{_mandir}/man6/* /usr/share/doc/@PACKAGE@/* /usr/games/* +/usr/share/icons/* +/usr/share/applications/* diff --git a/setup/.gitignore b/setup/.gitignore index 37c8e4c1..ff78f4c5 100644 --- a/setup/.gitignore +++ b/setup/.gitignore @@ -1,7 +1,10 @@ Makefile.in Makefile .deps -chocolate-setup +setup-manifest.xml +setup.desktop +*-setup +*-setup.desktop *.rc *.exe tags diff --git a/setup/Makefile.am b/setup/Makefile.am index 96003ce0..37bea567 100644 --- a/setup/Makefile.am +++ b/setup/Makefile.am @@ -36,6 +36,12 @@ endif @SDLMIXER_LIBS@ \ @LDFLAGS@ +appdir = $(prefix)/share/applications +app_DATA = @PROGRAM_PREFIX@setup.desktop + +@PROGRAM_PREFIX@setup.desktop : setup.desktop + cp $^ $@ + .rc.o: $(WINDRES) $^ -o $@ %.o : %.rc diff --git a/setup/setup.desktop.in b/setup/setup.desktop.in new file mode 100644 index 00000000..79fb38be --- /dev/null +++ b/setup/setup.desktop.in @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=@PACKAGE_NAME@ Setup +Exec=@PROGRAM_PREFIX@setup +Icon=@PROGRAM_PREFIX@setup +Type=Application +Comment=Setup tool for @PACKAGE_NAME@ +Categories=Settings;ConsoleOnly; diff --git a/src/Makefile.am b/src/Makefile.am index 7a690cf1..3a2eeca6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -185,6 +185,16 @@ EXTRA_DIST = \ icon.c \ doom-screensaver.desktop.in +appdir = $(prefix)/share/applications +app_DATA = @PROGRAM_PREFIX@doom.desktop \ + @PROGRAM_PREFIX@doom-screensaver.desktop + +@PROGRAM_PREFIX@doom-screensaver.desktop: doom-screensaver.desktop + cp $^ $@ + +@PROGRAM_PREFIX@doom.desktop : doom.desktop + cp $^ $@ + .rc.o: $(WINDRES) $^ -o $@ %.o : %.rc diff --git a/src/doom-screensaver.desktop.in b/src/doom-screensaver.desktop.in index 1d6e3303..59a087e4 100644 --- a/src/doom-screensaver.desktop.in +++ b/src/doom-screensaver.desktop.in @@ -1,8 +1,8 @@ [Desktop Entry] Encoding=UTF-8 -Name=Doom -Comment=DOOM by Id Software. +Name=@PACKAGE_NAME@ +Comment=@PACKAGE_SHORTDESC@ TryExec=@PACKAGE_PREFIX@doom Exec=@PACKAGE_PREFIX@doom StartupNotify=false diff --git a/src/doom.desktop.in b/src/doom.desktop.in new file mode 100644 index 00000000..44b76e62 --- /dev/null +++ b/src/doom.desktop.in @@ -0,0 +1,7 @@ +[Desktop Entry] +Name=@PACKAGE_NAME@ +Exec=@PROGRAM_PREFIX@doom +Icon=@PROGRAM_PREFIX@doom +Type=Application +Comment=@PACKAGE_SHORTDESC@ +Categories=Game;ActionGame; -- cgit v1.2.3 From 75ddea9c27110a1ea7e96b4dc9776dc0998d267b Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 14 May 2011 21:47:12 +0000 Subject: Fix install of screensaver desktop file. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2338 --- src/Makefile.am | 14 +++++++------- src/doom-screensaver.desktop.in | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 3a2eeca6..24c6e2b2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -181,18 +181,18 @@ endif @SDLMIXER_LIBS@ \ @SDLNET_LIBS@ -EXTRA_DIST = \ - icon.c \ - doom-screensaver.desktop.in +EXTRA_DIST = icon.c appdir = $(prefix)/share/applications -app_DATA = @PROGRAM_PREFIX@doom.desktop \ - @PROGRAM_PREFIX@doom-screensaver.desktop +app_DATA = @PROGRAM_PREFIX@doom.desktop -@PROGRAM_PREFIX@doom-screensaver.desktop: doom-screensaver.desktop +@PROGRAM_PREFIX@doom.desktop : doom.desktop cp $^ $@ -@PROGRAM_PREFIX@doom.desktop : doom.desktop +screensaverdir = $(prefix)/share/applications/screensavers +screensaver_DATA = @PROGRAM_PREFIX@doom-screensaver.desktop + +@PROGRAM_PREFIX@doom-screensaver.desktop: doom-screensaver.desktop cp $^ $@ .rc.o: diff --git a/src/doom-screensaver.desktop.in b/src/doom-screensaver.desktop.in index 59a087e4..178575a2 100644 --- a/src/doom-screensaver.desktop.in +++ b/src/doom-screensaver.desktop.in @@ -3,8 +3,8 @@ Encoding=UTF-8 Name=@PACKAGE_NAME@ Comment=@PACKAGE_SHORTDESC@ -TryExec=@PACKAGE_PREFIX@doom -Exec=@PACKAGE_PREFIX@doom +TryExec=@PROGRAM_PREFIX@doom +Exec=@PROGRAM_PREFIX@doom StartupNotify=false Terminal=false Type=Application -- cgit v1.2.3 From a0ce233f505cecf8a9e5235dcfddf3e78a2231c6 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 14 May 2011 21:50:46 +0000 Subject: Fix display of ENDOOM screen. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2339 --- src/i_system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i_system.c b/src/i_system.c index 7d3687be..15e91653 100644 --- a/src/i_system.c +++ b/src/i_system.c @@ -268,7 +268,7 @@ void I_Endoom(void) { TXT_UpdateScreen(); - if (TXT_GetChar() >= 0) + if (TXT_GetChar() > 0) { break; } -- cgit v1.2.3 From dcd1a6c3a4b692e0fa905075ef38273f85c138f4 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Tue, 17 May 2011 22:06:22 +0000 Subject: Detect chex.deh if it is in the same directory as the IWAD file. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2340 --- NEWS | 2 ++ src/d_main.c | 30 ++++++++++++++++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 759e6af3..fd727429 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,8 @@ the setup tool, which will appear in the main menu on desktop environments such as Gnome and KDE (thanks Adrián Chaves Fernández). + * The Chex Quest dehacked patch (chex.deh) will now be detected + if it is in the same directory as the IWAD file. Compatibility: * Added support for the alternate version of the Final Doom diff --git a/src/d_main.c b/src/d_main.c index 2cfc6b44..c6979712 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -777,11 +777,37 @@ void PrintGameVersion(void) static void LoadChexDeh(void) { - char *chex_deh; + char *chex_deh = NULL; + char *sep; if (gameversion == exe_chex) { - chex_deh = D_FindWADByName("chex.deh"); + // Look for chex.deh in the same directory as the IWAD file. + + sep = strrchr(iwadfile, DIR_SEPARATOR); + + if (sep != NULL) + { + chex_deh = malloc(strlen(iwadfile) + 9); + strcpy(chex_deh, iwadfile); + chex_deh[sep - iwadfile + 1] = '\0'; + strcat(chex_deh, "chex.deh"); + } + else + { + chex_deh = strdup("chex.deh"); + } + + // If the dehacked patch isn't found, try searching the WAD + // search path instead. We might find it... + + if (!M_FileExists(chex_deh)) + { + free(chex_deh); + chex_deh = D_FindWADByName("chex.deh"); + } + + // Still not found? if (chex_deh == NULL) { -- cgit v1.2.3 From 855c7a4850cad3d93b4bbdb35814c54c34495afa Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Tue, 17 May 2011 22:51:37 +0000 Subject: Add dependency for INSTALL generation. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2341 --- man/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/Makefile.am b/man/Makefile.am index abfe76fd..618c0bde 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -22,7 +22,7 @@ default.cfg.5: ../src default.cfg.template $(PACKAGE).cfg.5: ../src extra.cfg.template ./docgen -m extra.cfg.template -c $(PACKAGE).cfg ../src > $@ -INSTALL: +INSTALL: INSTALL.template ./simplecpp -DPRECOMPILED < INSTALL.template > $@ endif -- cgit v1.2.3 From 822664b4ff873d462370e9e96a9d91e6066c221d Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Tue, 17 May 2011 22:59:44 +0000 Subject: Update NEWS and ChangeLog, bump version number. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2342 --- ChangeLog | 255 ++++++++++++++++++++++++++++++++++++++++++++++++ NEWS | 2 +- codeblocks/config.h | 6 +- codeblocks/game-res.rc | 10 +- codeblocks/setup-res.rc | 8 +- configure.in | 4 +- msvc/config.h | 6 +- msvc/win32.rc | 10 +- 8 files changed, 278 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9721eb2c..bad56df0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,258 @@ +2011-05-17 23:51:37 fraggle + + Add dependency for INSTALL generation. + +2011-05-17 23:06:22 fraggle + + Detect chex.deh if it is in the same directory as the IWAD file. + +2011-05-14 22:50:46 fraggle + + Fix display of ENDOOM screen. + +2011-05-14 22:47:12 fraggle + + Fix install of screensaver desktop file. + +2011-05-14 22:07:55 fraggle + + Add freedesktop.org desktop files for chocolate-doom, chocolate-setup + (thanks Adrián Chaves Fernández). + +2011-05-14 21:11:26 fraggle + + Convert build system to using the PROGRAM_PREFIX system used on + raven-branch. + +2011-05-08 19:32:02 fraggle + + Update NEWS. + +2011-05-08 19:29:46 fraggle + + Allow IWAD files to be double-clicked in the finder to set the IWAD + configuration. + +2011-05-08 01:31:01 fraggle + + Shut up compiler warnings. + +2011-05-08 00:52:26 fraggle + + Rework OS X launcher package. Include documentation files within the + application bundle and add a help menu with links. Rework .dmg + generation to generate a file with a "fancy" background image and + overall nicer appearance. + +2011-04-26 06:49:53 quasar_te + + Support for Win32 native OPL output when compiled with Microsoft + Visual C++. Confirmed to work with Aureal Vortex AU8830 in Win98SE by + GhostlyDeath. + +2011-04-24 23:22:11 fraggle + + Infer -server when -privateserver is specified (thanks Porsche Monty). + +2011-04-24 22:39:31 fraggle + + Add test button to joystick menu in setup tool (thanks Alexandre + Xavier). + +2011-04-18 23:10:16 fraggle + + Add test hack for simulating Porsche Monty's scanline emulation (see + comment in file). + +2011-04-17 18:33:04 fraggle + + Fix libtextscreen window hotkeys to work when shift is held down / + capslock turned on. Fix a similar problem in-game when typing cheat + codes or using menu hotkeys (thanks Alexandre Xavier). + +2011-04-17 17:53:47 fraggle + + Make Final Doom IWAD labels shorter, so they don't make the launch + windows grow. + +2011-04-11 20:49:45 fraggle + + Allow the shift key to be held down when changing key/mouse/joystick + bindings to prevent bindings to the same key from being cleared + (thanks myk). + +2011-04-09 01:27:13 fraggle + + Fix action area minimum width calculation. + +2011-04-04 21:30:17 fraggle + + Close dropdown list popup windows when clicking outside the window. + +2011-04-04 21:12:59 fraggle + + Fix crash. + +2011-04-04 21:09:42 fraggle + + Fix crash. + +2011-04-04 21:07:07 fraggle + + Change the background color when hovering over widgets. + +2011-04-04 19:40:28 fraggle + + Change setup tool default sampling rate to 44100Hz to match the game + (thanks Alexandre Xavier). + +2011-03-30 20:16:40 fraggle + + Add a symlink hack to work around the fact that OS X doesn't like + paths in MANPATH to contain spaces. + +2011-03-30 20:00:51 fraggle + + On OS X, display a dialog box when exiting with I_Error, like on + Windows. + +2011-03-29 00:48:31 fraggle + + Remove the BUGS file as it doesn't really contain any useful + information. + +2011-03-29 00:39:48 fraggle + + Add vim modeline for text wrapping to documentation text files. + +2011-03-29 00:33:09 fraggle + + Emulate bug with IDMUS cheat when emulating v1.9 (thanks Alexandre + Xavier). + +2011-03-28 22:36:00 fraggle + + Fix OPL MIDI playback when using an empty .mus / .mid file (thanks + Alexandre Xavier). + +2011-03-28 22:32:14 fraggle + + Allow .lmp files to be loaded (and demo files to be played back) that + have long filenames (thanks blzut3). + +2011-03-28 01:24:47 fraggle + + Fix weapon cycling from the shotgun to the chaingun in Doom 1 (thanks + Alexandre Xavier). + +2011-03-28 00:45:53 fraggle + + Scroll faster in reaction to the scroll wheel. + +2011-03-28 00:42:00 fraggle + + Change default sfx/music volume in setup tool to 8, to match the game + (thanks Alexandre Xavier). + +2011-03-22 21:33:17 fraggle + + Switch separator to show "screen mode" or "window size" depending on + whether fullscreen is turned on or not. + +2011-03-22 21:08:04 fraggle + + Fix scrollbars so that clicks scroll the pane to a location that + matches the clicked location. Interpret mousewheel events so that + scroll panes can be scrolled. + +2011-03-22 19:49:31 fraggle + + Reorganise the display settings window. + +2011-03-17 22:54:33 fraggle + + Add back -a option to automake, and remove INSTALL if automake + installs it. + +2011-03-17 22:43:56 fraggle + + Fix up placement of display settings window. + +2011-03-15 22:41:22 fraggle + + Fix NEWS entry to list the full name for Alexandre Xavier. + +2011-03-10 19:47:14 fraggle + + Include Unix manpages in MacOS package, and set MANPATH to point to + them when opening a terminal window. + +2011-03-10 19:45:29 fraggle + + Minor tweaks to MacOS instructions. + +2011-03-10 19:20:10 fraggle + + Minor tweak to INSTALL instructions. + +2011-03-10 19:03:23 fraggle + + Replace the INSTALL file with a template version that is customized to + different platforms. + +2011-03-09 19:02:15 fraggle + + Add null sector dereference emulation code from Prboom+, to fix desync + with CLNJ-506.LMP (thanks entryway). + +2011-03-09 01:06:07 fraggle + + Add support for the alternate version of the Final Doom executable + that fixes the demo loop crash (thanks Porsche Monty, Enjay). + +2011-03-06 20:59:51 fraggle + + Discard very short sound effects and strip lead-in / lead-out samples + that apparently aren't played by Vanilla Doom (thanks Quasar). + +2011-03-03 21:41:51 fraggle + + Fix Visual Studio build (thanks GhostlyDeath). + +2011-02-28 20:48:27 fraggle + + Fix autoadjust of pixel depth in setup tool. + +2011-02-05 16:50:28 fraggle + + Fix bug with libtextscreen where it was not possible to type a '+' + (thanks Alexandre Xavier). + +2011-01-31 01:25:47 fraggle + + When large numbers of screen resolutions are detected, increase the + number of columns in the mode list to fit them all on-screen. Remove + superfluous left-side spacing from the checkbox and radio button + widgets so that the modes can be packed closer together. + +2011-01-23 21:42:09 fraggle + + Fix default joystick buttons in setup tool to match Vanilla (thanks + twipley). + +2011-01-13 20:34:55 fraggle + + In configuration files, use the scan code for right shift, not left + shift, to match Vanilla (thanks AlexXav). + +2011-01-12 23:22:20 fraggle + + Fix menu navigation when using joystick / joypad (thanks AlexXav). + +2011-01-02 18:14:59 fraggle + + Update NEWS and ChangeLog, bump version number. + 2011-01-02 17:45:24 fraggle Remove redundant package version label from top of OS X launcher diff --git a/NEWS b/NEWS index fd727429..e3194203 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,4 @@ -1.6.0 (2011-??-??): +1.6.0 (2011-05-17): * The instructions in the INSTALL file are now customized for different platforms, and each binary package contains a version diff --git a/codeblocks/config.h b/codeblocks/config.h index 75da3ba1..e8c2f95d 100644 --- a/codeblocks/config.h +++ b/codeblocks/config.h @@ -9,13 +9,13 @@ #define PACKAGE_NAME "Chocolate Doom" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "Chocolate Doom 1.5.0" +#define PACKAGE_STRING "Chocolate Doom 1.6.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "chocolate-doom" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.5.0" +#define PACKAGE_VERSION "1.6.0" /* Change this when you create your awesome forked version */ #define PROGRAM_PREFIX "chocolate-" @@ -24,7 +24,7 @@ #define STDC_HEADERS 1 /* Version number of package */ -#define VERSION "1.5.0" +#define VERSION "1.6.0" /* Define to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ diff --git a/codeblocks/game-res.rc b/codeblocks/game-res.rc index beef1242..2a3a7ac7 100644 --- a/codeblocks/game-res.rc +++ b/codeblocks/game-res.rc @@ -1,21 +1,21 @@ 1 ICON "../data/doom.ico" 1 VERSIONINFO -PRODUCTVERSION 1,5,0,0 -FILEVERSION 1,5,0,0 +PRODUCTVERSION 1,6,0,0 +FILEVERSION 1,6,0,0 FILETYPE 1 { BLOCK "StringFileInfo" { BLOCK "040904E4" { - VALUE "FileVersion", "1.5.0" - VALUE "FileDescription", "1.5.0" + VALUE "FileVersion", "1.6.0" + VALUE "FileDescription", "1.6.0" VALUE "InternalName", "Chocolate-Doom" VALUE "CompanyName", "Chocolate-Doom" VALUE "LegalCopyright", "GNU General Public License" VALUE "ProductName", "Chocolate-Doom" - VALUE "ProductVersion", "1.5.0" + VALUE "ProductVersion", "1.6.0" } } } diff --git a/codeblocks/setup-res.rc b/codeblocks/setup-res.rc index b3812a74..4735cbd9 100644 --- a/codeblocks/setup-res.rc +++ b/codeblocks/setup-res.rc @@ -3,21 +3,21 @@ CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "setup-manifest.xml" 1 VERSIONINFO -PRODUCTVERSION 1,5,0,0 -FILEVERSION 1,5,0,0 +PRODUCTVERSION 1,6,0,0 +FILEVERSION 1,6,0,0 FILETYPE 1 { BLOCK "StringFileInfo" { BLOCK "040904E4" { - VALUE "FileVersion", "1.5.0" + VALUE "FileVersion", "1.6.0" VALUE "FileDescription", "Chocolate-Doom Setup" VALUE "InternalName", "chocolate-setup" VALUE "CompanyName", "fraggle@gmail.com" VALUE "LegalCopyright", "GNU General Public License" VALUE "ProductName", "Chocolate-Doom Setup" - VALUE "ProductVersion", "1.5.0" + VALUE "ProductVersion", "1.6.0" } } } diff --git a/configure.in b/configure.in index 2ef7c41c..dbb48777 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ -AC_INIT(Chocolate Doom, 1.5.0, fraggle@gmail.com, chocolate-doom) +AC_INIT(Chocolate Doom, 1.6.0, fraggle@gmail.com, chocolate-doom) PACKAGE_SHORTDESC="Conservative Doom source port" -PACKAGE_COPYRIGHT="Copyright (C) 1993-2010" +PACKAGE_COPYRIGHT="Copyright (C) 1993-2011" PACKAGE_LICENSE="GNU General Public License, version 2" PACKAGE_MAINTAINER="Simon Howard" PACKAGE_URL="http://www.chocolate-doom.org/" diff --git a/msvc/config.h b/msvc/config.h index f00d581e..5d966951 100644 --- a/msvc/config.h +++ b/msvc/config.h @@ -11,19 +11,19 @@ #define PACKAGE_NAME "Chocolate Doom" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "Chocolate Doom 1.5.0" +#define PACKAGE_STRING "Chocolate Doom 1.6.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "chocolate-doom" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.5.0" +#define PACKAGE_VERSION "1.6.0" /* Change this when you create your awesome forked version */ #define PROGRAM_PREFIX "chocolate-" /* Version number of package */ -#define VERSION "1.5.0" +#define VERSION "1.6.0" /* Define to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ diff --git a/msvc/win32.rc b/msvc/win32.rc index 3371d993..3f0c361c 100644 --- a/msvc/win32.rc +++ b/msvc/win32.rc @@ -32,21 +32,21 @@ #endif 1 VERSIONINFO -PRODUCTVERSION 1,5,0,0 -FILEVERSION 1,5,0,0 +PRODUCTVERSION 1,6,0,0 +FILEVERSION 1,6,0,0 FILETYPE 1 BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904E4" BEGIN - VALUE "FileVersion", "1.5.0" - VALUE "FileDescription", "Chocolate Doom 1.5.0" + VALUE "FileVersion", "1.6.0" + VALUE "FileDescription", "Chocolate Doom 1.6.0" VALUE "InternalName", "chocolate-doom" VALUE "CompanyName", "fraggle@gmail.com" VALUE "LegalCopyright", "GNU General Public License" VALUE "ProductName", "Chocolate Doom" - VALUE "ProductVersion", "1.5.0" + VALUE "ProductVersion", "1.6.0" END END END -- cgit v1.2.3 From fa328faf056affa216f2f3a8764ca0d56262efe9 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 13 Jun 2011 20:27:32 +0000 Subject: Link chocolate-setup against SDL_mixer to fix compile on Mac OS X. Subversion-branch: /branches/raven-branch Subversion-revision: 2346 --- src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 6c0adfae..5dc9fe11 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -185,7 +185,7 @@ endif @PROGRAM_PREFIX@setup_LDADD = setup/libsetup.a \ $(top_builddir)/wince/libc_wince.a \ $(top_builddir)/textscreen/libtextscreen.a \ - @LDFLAGS@ @SDL_LIBS@ @SDLNET_LIBS@ + @LDFLAGS@ @SDL_LIBS@ @SDLMIXER_LIBS@ @SDLNET_LIBS@ EXTRA_DIST = \ icon.c \ -- cgit v1.2.3 From 1cfa4409aff87bc730f32744693a02eb7dc57187 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 13 Jun 2011 23:45:10 +0000 Subject: Rework configuration window; add Heretic/Hexen configuration boxes. Subversion-branch: /branches/raven-branch Subversion-revision: 2348 --- pkg/osx/IWADController.m | 4 - pkg/osx/Resources/launcher.nib/designable.nib | 1488 +++++++++++++++-------- pkg/osx/Resources/launcher.nib/keyedobjects.nib | Bin 27157 -> 30957 bytes 3 files changed, 981 insertions(+), 511 deletions(-) diff --git a/pkg/osx/IWADController.m b/pkg/osx/IWADController.m index b420d59d..ec181350 100644 --- a/pkg/osx/IWADController.m +++ b/pkg/osx/IWADController.m @@ -279,10 +279,6 @@ static NSString *IWADFilenames[NUM_IWAD_TYPES + 1] = - (void) awakeFromNib { - // TODO: This is temporary: - self->heretic = self->doom1; - self->hexen = self->doom2; - [self->configWindow center]; // Set configuration for all IWADs from configuration file. diff --git a/pkg/osx/Resources/launcher.nib/designable.nib b/pkg/osx/Resources/launcher.nib/designable.nib index b3e76d22..6bb8f144 100644 --- a/pkg/osx/Resources/launcher.nib/designable.nib +++ b/pkg/osx/Resources/launcher.nib/designable.nib @@ -12,9 +12,9 @@ YES + - YES @@ -679,7 +679,7 @@ 7 2 - {{377, 409}, {480, 316}} + {{377, 417}, {518, 308}} 1886912512 IWAD configuration @@ -695,280 +695,10 @@ 256 YES - - - 256 - {{17, 285}, {446, 11}} - - YES - - 67239424 - 272629760 - Doom IWAD location (doom.wad): - - - - - - - - - 256 - {{20, 255}, {369, 22}} - - YES - - -1804468671 - 272630784 - - - - YES - - - - - - - 256 - {{397, 255}, {63, 23}} - - YES - - 67239424 - 134217728 - Set... - - - -2038021889 - 32 - - - - 400 - 75 - - - - - 256 - {{17, 236}, {446, 11}} - - YES - - 67239424 - 272629760 - Doom II IWAD location (doom2.wad): - - - - - - - - - 256 - {{20, 206}, {369, 22}} - - YES - - -1804468671 - 272630784 - - - - YES - - - - - - - 256 - {{397, 206}, {63, 23}} - - YES - - 67239424 - 134217728 - Set... - - - -2038021889 - 32 - - - - 400 - 75 - - - - - 256 - {{17, 187}, {446, 11}} - - YES - - 67239424 - 272629760 - RmluYWwgRG9vbTogVE5UOiBFdmlsdXRpb24gbG9jYXRpb24gKHRudC53YWQpOgo - - - - - - - - - 256 - {{20, 157}, {369, 22}} - - YES - - -1804468671 - 272630784 - - - - YES - - - - - - - 256 - {{397, 157}, {63, 23}} - - YES - - 67239424 - 134217728 - Set... - - - -2038021889 - 32 - - - - 400 - 75 - - - - - 256 - {{17, 138}, {446, 11}} - - YES - - 67239424 - 272629760 - RmluYWwgRG9vbTogUGx1dG9uaWEgRXhwZXJpbWVudCBsb2NhdGlvbiAocGx1dG9uaWEud2FkKToKA - - - - - - - - - 256 - {{20, 108}, {369, 22}} - - YES - - -1804468671 - 272630784 - - - - YES - - - - - - - 256 - {{397, 108}, {63, 23}} - - YES - - 67239424 - 134217728 - Set... - - - -2038021889 - 32 - - - - 400 - 75 - - - - - 256 - {{17, 89}, {446, 11}} - - YES - - 67239424 - 272629760 - Chex Quest IWAD location (chex.wad): - - - - - - - - - 256 - {{20, 59}, {369, 22}} - - YES - - -1804468671 - 272630784 - - - - YES - - - - - - - 256 - {{397, 59}, {63, 23}} - - YES - - 67239424 - 134217728 - Set... - - - -2038021889 - 32 - - - - 400 - 75 - - 256 - {{384, 12}, {82, 32}} + {{422, 12}, {82, 32}} YES @@ -1008,8 +738,433 @@ 25 + + + 12 + {{13, 42}, {492, 260}} + + + YES + + 1 + + + 256 + + YES + + + 256 + {{14, 200}, {446, 11}} + + YES + + 67239424 + 272629760 + Doom IWAD location (doom.wad): + + + + + + + + + 256 + {{17, 171}, {369, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 256 + {{393, 169}, {63, 23}} + + YES + + 67239424 + 134217728 + Set... + + + -2038021889 + 32 + + + + 400 + 75 + + + + + 256 + {{14, 151}, {446, 11}} + + YES + + 67239424 + 272629760 + Doom II IWAD location (doom2.wad): + + + + + + + + + 256 + {{17, 121}, {369, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 256 + {{393, 121}, {63, 23}} + + YES + + 67239424 + 134217728 + Set... + + + -2038021889 + 32 + + + + 400 + 75 + + + + + 256 + {{14, 103}, {446, 11}} + + YES + + 67239424 + 272629760 + RmluYWwgRG9vbTogVE5UOiBFdmlsdXRpb24gbG9jYXRpb24gKHRudC53YWQpOgo + + + + + + + + + 256 + {{17, 73}, {369, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 256 + {{395, 73}, {63, 23}} + + YES + + 67239424 + 134217728 + Set... + + + -2038021889 + 32 + + + + 400 + 75 + + + + + 256 + {{14, 54}, {446, 11}} + + YES + + 67239424 + 272629760 + RmluYWwgRG9vbTogUGx1dG9uaWEgRXhwZXJpbWVudCBsb2NhdGlvbiAocGx1dG9uaWEud2FkKToKA + + + + + + + + + 256 + {{17, 24}, {369, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 256 + {{395, 24}, {63, 23}} + + YES + + 67239424 + 134217728 + Set... + + + -2038021889 + 32 + + + + 400 + 75 + + + + {{10, 33}, {472, 214}} + + + Doom + + + + + 2 + + + 256 + + YES + + + 256 + {{14, 103}, {446, 11}} + + YES + + 67239424 + 272629760 + Chex Quest IWAD location (chex.wad): + + + + + + + + + 256 + {{17, 73}, {369, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 256 + {{395, 73}, {63, 23}} + + YES + + 67239424 + 134217728 + Set... + + + -2038021889 + 32 + + + + 400 + 75 + + + + + 256 + {{393, 122}, {63, 23}} + + YES + + 67239424 + 134217728 + Set... + + + -2038021889 + 32 + + + + 400 + 75 + + + + + 268 + {{17, 122}, {369, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 268 + {{17, 171}, {369, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 256 + {{14, 146}, {446, 17}} + + YES + + 67239424 + 272629760 + Hexen IWAD location (hexen.wad): + + + + + + + + + 256 + {{14, 194}, {446, 17}} + + YES + + 67239424 + 272629760 + Heretic IWAD location (heretic.wad): + + + + + + + + + 256 + {{393, 169}, {63, 23}} + + YES + + 67239424 + 134217728 + Set... + + + -2038021889 + 32 + + + + 400 + 75 + + + + {{10, 33}, {472, 214}} + + Other games + + + + + + + 0 + YES + YES + + YES + + + - {480, 316} + {518, 308} {{0, 0}, {1440, 878}} @@ -1034,14 +1189,11 @@ AppController - - LauncherManager - - - LauncherManager + + IWADLocation - - LauncherManager + + IWADLocation @@ -1447,6 +1599,54 @@ 385 + + + locationConfigBox + + + + 403 + + + + locationConfigBox + + + + 404 + + + + setButtonClicked: + + + + 411 + + + + setButtonClicked: + + + + 412 + + + + heretic + + + + 413 + + + + hexen + + + + 414 + @@ -1813,161 +2013,12 @@ YES - - - - - - - - - - - - - - - + - - 234 - - - YES - - - - - - 235 - - - YES - - - - - - 236 - - - YES - - - - - - 238 - - - YES - - - - - - 239 - - - YES - - - - - - 240 - - - YES - - - - - - 241 - - - YES - - - - - - 242 - - - YES - - - - - - 243 - - - YES - - - - - - 244 - - - YES - - - - - - 245 - - - YES - - - - - - 246 - - - YES - - - - - - 247 - - - YES - - - - - - 248 - - - YES - - - - - - 249 - - - YES - - - - 250 @@ -2057,187 +2108,468 @@ + + 348 + + + + + 212 + + + YES + + + + + + 213 + + + + + -3 + + + Application + + + 369 + + + YES + + + + + + 370 + + + YES + + + + + + + + + + + 371 + + + + + 373 + + + + + 375 + + + + + 377 + + + + + 379 + + + + + 380 + + + + + 383 + + + YES + + + + + + 384 + + + + + 386 + + + YES + + + + + + + 387 + + + YES + + + + + + 388 + + + YES + + + + + + 389 + + + YES + + + + + + + + + + + + + + 390 + + + YES + + + + + + + + + + + + + + + + + 234 + + + YES + + + + 333 + + 235 + + + YES + + + + 334 + + 236 + + + YES + + + + 335 + + 238 + + + YES + + + + 336 + + 239 + + + YES + + + + 337 + + 240 + + + YES + + + + 338 + + 241 + + + YES + + + + 339 + + 242 + + + YES + + + + 340 + + 243 + + + YES + + + + 341 + + 244 + + + YES + + + + 342 + + 245 + + + YES + + + + 343 + + 246 + + + YES + + + + 344 + + 247 + + + YES + + + + 345 + + 248 + + + YES + + + + 346 + + 249 + + + YES + + + + 347 - 348 - - - - - 212 - + 391 + YES - + - - - - 213 - - - - - -3 - - - Application + - 349 - - + 392 + + - 350 - - + 393 + + + YES + + + - 351 - - + 394 + + - 369 - + 397 + YES - + - + - 370 - + 398 + + + + + 399 + YES - - - - - - + - - - - 371 - - + - 373 - - + 400 + + - 375 - - + 401 + + + HereticIWAD - 377 - - + 402 + + + HexenIWAD - 379 - - + 405 + + + YES + + + - 380 - - + 406 + + - 383 - + 408 + YES - + - + - 384 - - + 409 + + @@ -2327,39 +2659,55 @@ 232.ImportedFromIB2 233.ImportedFromIB2 234.IBPluginDependency + 234.IBViewBoundsToFrameTransform 234.ImportedFromIB2 235.IBPluginDependency + 235.IBViewBoundsToFrameTransform 235.ImportedFromIB2 236.IBPluginDependency + 236.IBViewBoundsToFrameTransform 236.ImportedFromIB2 238.IBPluginDependency + 238.IBViewBoundsToFrameTransform 238.ImportedFromIB2 239.IBPluginDependency + 239.IBViewBoundsToFrameTransform 239.ImportedFromIB2 24.IBEditorWindowLastContentRect 24.IBPluginDependency 24.ImportedFromIB2 240.IBPluginDependency + 240.IBViewBoundsToFrameTransform 240.ImportedFromIB2 241.IBPluginDependency + 241.IBViewBoundsToFrameTransform 241.ImportedFromIB2 242.IBPluginDependency + 242.IBViewBoundsToFrameTransform 242.ImportedFromIB2 243.IBPluginDependency + 243.IBViewBoundsToFrameTransform 243.ImportedFromIB2 244.IBPluginDependency + 244.IBViewBoundsToFrameTransform 244.ImportedFromIB2 245.IBPluginDependency + 245.IBViewBoundsToFrameTransform 245.ImportedFromIB2 246.IBPluginDependency + 246.IBViewBoundsToFrameTransform 246.ImportedFromIB2 247.IBPluginDependency + 247.IBViewBoundsToFrameTransform 247.ImportedFromIB2 248.IBPluginDependency + 248.IBViewBoundsToFrameTransform 248.ImportedFromIB2 249.IBPluginDependency + 249.IBViewBoundsToFrameTransform 249.ImportedFromIB2 250.IBPluginDependency + 250.IBViewBoundsToFrameTransform 250.ImportedFromIB2 270.ImportedFromIB2 274.IBPluginDependency @@ -2388,9 +2736,6 @@ 301.ImportedFromIB2 320.IBPluginDependency 320.ImportedFromIB2 - 349.IBPluginDependency - 350.IBPluginDependency - 351.IBPluginDependency 369.IBPluginDependency 370.IBEditorWindowLastContentRect 370.IBPluginDependency @@ -2401,7 +2746,34 @@ 379.IBPluginDependency 380.IBPluginDependency 383.IBPluginDependency + 383.IBViewBoundsToFrameTransform 384.IBPluginDependency + 386.IBPluginDependency + 386.IBViewBoundsToFrameTransform + 387.IBPluginDependency + 388.IBPluginDependency + 389.IBPluginDependency + 390.IBPluginDependency + 391.IBPluginDependency + 391.IBViewBoundsToFrameTransform + 392.IBPluginDependency + 393.IBPluginDependency + 393.IBViewBoundsToFrameTransform + 394.IBPluginDependency + 397.IBPluginDependency + 397.IBViewBoundsToFrameTransform + 397.ImportedFromIB2 + 399.IBPluginDependency + 399.IBViewBoundsToFrameTransform + 399.ImportedFromIB2 + 401.IBPluginDependency + 402.IBPluginDependency + 405.IBPluginDependency + 405.IBViewBoundsToFrameTransform + 405.ImportedFromIB2 + 408.IBPluginDependency + 408.IBViewBoundsToFrameTransform + 408.ImportedFromIB2 5.IBPluginDependency 5.ImportedFromIB2 56.IBPluginDependency @@ -2498,9 +2870,9 @@ - {{421, 438}, {480, 316}} + {{358, 421}, {518, 308}} com.apple.InterfaceBuilder.CocoaPlugin - {{421, 438}, {480, 316}} + {{358, 421}, {518, 308}} {213, 107} @@ -2514,39 +2886,87 @@ com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABD24AAw5+AAA + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABBiAAAwz8AAA + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDxoAAxBJAAA + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABBiAAAxAqAAA + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABBoAAAxAXAAA + {{469, 741}, {194, 73}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDxIAAwzQAAA + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABBYAAAwxcAAA + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABBcAAAwwQAAA + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDxIAAwrwAAA + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABBQAAAwswAAA + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABBoAAAw9qAAA + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDxoAAw9sAAA + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABCRAAAwoQAAA + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABCUAAAwjwAAA + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDxYAAwrgAAA + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABD2gAAwqIAAA + com.apple.InterfaceBuilder.CocoaPlugin @@ -2576,19 +2996,59 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + {{540, 701}, {238, 113}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{540, 701}, {238, 113}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABBiAAAwhwAAA + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABBUAAAw5YAAA + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABBiAAAwwgAAA + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABBgAAAw0EAAA + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABClAAAwwIAAA + + + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABBUAAAw1EAAA + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDxIAAww0AAA + + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDxIAAw0AAAA + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -2618,7 +3078,7 @@ - 385 + 414 @@ -2693,6 +3153,8 @@ configWindow doom1 doom2 + heretic + hexen iwadSelector plutonia tnt @@ -2706,6 +3168,8 @@ id id id + id + id @@ -2716,6 +3180,8 @@ configWindow doom1 doom2 + heretic + hexen iwadSelector plutonia tnt @@ -2738,6 +3204,14 @@ doom2 id + + heretic + id + + + hexen + id + iwadSelector id diff --git a/pkg/osx/Resources/launcher.nib/keyedobjects.nib b/pkg/osx/Resources/launcher.nib/keyedobjects.nib index 7df7670c..2d9b8594 100644 Binary files a/pkg/osx/Resources/launcher.nib/keyedobjects.nib and b/pkg/osx/Resources/launcher.nib/keyedobjects.nib differ -- cgit v1.2.3 From b2318d4849a6cd033372ef9164cd06b74c78583c Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Tue, 14 Jun 2011 00:02:40 +0000 Subject: Add missing include so that the OS X error window is displayed. Subversion-branch: /branches/raven-branch Subversion-revision: 2349 --- src/i_system.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/i_system.c b/src/i_system.c index 1d961956..b3cd2769 100644 --- a/src/i_system.c +++ b/src/i_system.c @@ -38,6 +38,8 @@ #include #endif +#include "SDL.h" + #include "config.h" #include "deh_str.h" -- cgit v1.2.3 From 16dc726ccb49d94def51487486bf81958620e81d Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 16 Jun 2011 23:14:14 +0000 Subject: Add AM_SILENT_RULES macro for terser build output. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2350 --- configure.in | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.in b/configure.in index dbb48777..5768c2d3 100644 --- a/configure.in +++ b/configure.in @@ -109,6 +109,7 @@ AM_CONDITIONAL(HAVE_PYTHON, $HAVE_PYTHON) dnl Automake v1.8.0 is required, please upgrade! AM_INIT_AUTOMAKE([1.8.0]) +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) WINDOWS_RC_VERSION=`echo $PACKAGE_VERSION.0 | sed 's/\./, /g' ` -- cgit v1.2.3 From 736082f2c07aec39311b8356e474f447c06abcd3 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 21 Jul 2011 14:21:57 +0000 Subject: Don't use $^ in Makefiles, as it s a GNU make extension (thanks Jakub Lach). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2354 --- data/Makefile.am | 4 ++-- src/Makefile.am | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/data/Makefile.am b/data/Makefile.am index dccb51a3..05951cb0 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -14,8 +14,8 @@ icons_DATA = @PROGRAM_PREFIX@doom.png \ @PROGRAM_PREFIX@setup.png @PROGRAM_PREFIX@doom.png : doom.png - cp $^ $@ + cp $< $@ @PROGRAM_PREFIX@setup.png : setup.png - cp $^ $@ + cp $< $@ diff --git a/src/Makefile.am b/src/Makefile.am index 24c6e2b2..40be7787 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -187,26 +187,26 @@ appdir = $(prefix)/share/applications app_DATA = @PROGRAM_PREFIX@doom.desktop @PROGRAM_PREFIX@doom.desktop : doom.desktop - cp $^ $@ + cp $< $@ screensaverdir = $(prefix)/share/applications/screensavers screensaver_DATA = @PROGRAM_PREFIX@doom-screensaver.desktop @PROGRAM_PREFIX@doom-screensaver.desktop: doom-screensaver.desktop - cp $^ $@ + cp $< $@ .rc.o: - $(WINDRES) $^ -o $@ + $(WINDRES) $< -o $@ %.o : %.rc - $(WINDRES) $^ -o $@ + $(WINDRES) $< -o $@ if HAVE_PYTHON icon.c : ../data/doom8.ico - ../data/convert-icon $^ $@ + ../data/convert-icon $< $@ endif midiread : midifile.c - $(CC) -DTEST $(CFLAGS) @LDFLAGS@ $^ -o $@ + $(CC) -DTEST $(CFLAGS) @LDFLAGS@ $< -o $@ -- cgit v1.2.3 From 99a208bc6e29988813c04512183268570e9436a5 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 24 Jul 2011 20:55:27 +0000 Subject: Fix default mouse buttons in setup tool (Thanks Alexandre Xavier). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2355 --- setup/mouse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/mouse.c b/setup/mouse.c index 16984721..7931e79e 100644 --- a/setup/mouse.c +++ b/setup/mouse.c @@ -38,8 +38,8 @@ int mouse_threshold = 10; int grabmouse = 1; int mousebfire = 0; -int mousebforward = 1; -int mousebstrafe = 2; +int mousebforward = 2; +int mousebstrafe = 1; int mousebstrafeleft = -1; int mousebstraferight = -1; int mousebbackward = -1; -- cgit v1.2.3 From aa621807015f56e451432fe1d9cdd05fcdeb92cf Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 20 Aug 2011 18:10:23 +0000 Subject: Fix gnome-screensaver .desktop file (thanks Rahul Sundaram). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2356 --- NEWS | 3 +++ src/doom-screensaver.desktop.in | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index e3194203..fe654dad 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ + + * Fixed gnome-screensaver desktop file (thanks Rahul Sundaram). + 1.6.0 (2011-05-17): * The instructions in the INSTALL file are now customized for diff --git a/src/doom-screensaver.desktop.in b/src/doom-screensaver.desktop.in index 178575a2..315f964c 100644 --- a/src/doom-screensaver.desktop.in +++ b/src/doom-screensaver.desktop.in @@ -1,6 +1,5 @@ [Desktop Entry] -Encoding=UTF-8 Name=@PACKAGE_NAME@ Comment=@PACKAGE_SHORTDESC@ TryExec=@PROGRAM_PREFIX@doom @@ -8,5 +7,6 @@ Exec=@PROGRAM_PREFIX@doom StartupNotify=false Terminal=false Type=Application -Categories=Screensaver +OnlyShowIn=GNOME; +Categories=Screensaver; -- cgit v1.2.3 From fb9fb072def85312bfd4ad8670a31d0a85bfe37a Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 20 Aug 2011 18:20:43 +0000 Subject: Update COPYING to latest version of GPL2 with new address of FSF (thanks Rahul Sundaram). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2357 --- COPYING | 41 ++++++++++++++++++++--------------------- NEWS | 2 ++ 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/COPYING b/COPYING index d60c31a9..d159169d 100644 --- a/COPYING +++ b/COPYING @@ -1,12 +1,12 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public @@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to +the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not @@ -55,8 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. - - GNU GENERAL PUBLIC LICENSE + + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains @@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions: License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in @@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is @@ -225,7 +225,7 @@ impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License @@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY + NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN @@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it @@ -303,17 +303,16 @@ the "copyright" line and a pointer to where the full notice is found. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) year name of author + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. @@ -336,5 +335,5 @@ necessary. Here is a sample; alter the names: This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General +library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. diff --git a/NEWS b/NEWS index fe654dad..e2d95b7d 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,7 @@ * Fixed gnome-screensaver desktop file (thanks Rahul Sundaram). + * Updated COPYING to current version of GPL2 (thanks Rahul + Sundaram). 1.6.0 (2011-05-17): -- cgit v1.2.3 From 2e67fde263924a1f3f3b792dbd38bd58b7a3b948 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 22 Aug 2011 18:40:26 +0000 Subject: Add clarification note about icon copyright status (thanks to Chris Metcalf for clarification by email). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2358 --- data/README | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/data/README b/data/README index 82fac17e..c3be61a6 100644 --- a/data/README +++ b/data/README @@ -3,6 +3,10 @@ The Chocolate Doom icon is based on an image by Chris Metcalf http://www.flickr.com/photos/laffy4k/448920776/ +Chris has kindly agreed that the Chocolate Doom icon may be used under +the GNU GPL, so the copyright status of the icon is the same as that of +the rest of the project. + The "foo8.ico" files are 8-bit depth only, while the "foo.ico" files contain full 32-bit versions, scaled to different sizes and with proper alpha masks (as well as the 8-bit versions). The 8-bit versions are -- cgit v1.2.3 From 358db83778b46427fe267f86532d3a84d25a50ac Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 29 Aug 2011 20:37:26 +0000 Subject: Fix bug with detection of IWAD type by filename (thanks mether). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2359 --- NEWS | 1 + src/d_iwad.c | 24 +++++++++++++----------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index e2d95b7d..425da376 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ * Fixed gnome-screensaver desktop file (thanks Rahul Sundaram). * Updated COPYING to current version of GPL2 (thanks Rahul Sundaram). + * Fix bug with detection of IWAD type by filename (thanks mether). 1.6.0 (2011-05-17): diff --git a/src/d_iwad.c b/src/d_iwad.c index c0d33707..be5a3880 100644 --- a/src/d_iwad.c +++ b/src/d_iwad.c @@ -430,22 +430,24 @@ static char *SearchDirectoryForIWAD(char *dir) static void IdentifyIWADByName(char *name) { size_t i; + char *p; - gamemission = none; - - for (i=0; i myargc - 2) return; - if (cdrom) - { - sprintf(file, SAVEGAMENAMECD "%c.hsg", myargv[p + 1][0]); - } - else - { - sprintf(file, SAVEGAMENAME "%c.hsg", myargv[p + 1][0]); - } - G_LoadGame(file); + filename = SV_Filename(myargv[p + 1][0] - '0'); + G_LoadGame(filename); G_DoLoadGame(); // load the gameskill etc info from savegame G_RecordDemo(gameskill, 1, gameepisode, gamemap, myargv[p + 2]); D_DoomLoop(); // never returns + free(filename); } /* @@ -940,6 +934,8 @@ void D_DoomMain(void) gamedescription = "Heretic (registered)"; } + savegamedir = M_GetSaveGameDir("heretic.wad"); + I_PrintStartupBanner(gamedescription); // haleyjd: removed WATCOMC @@ -1033,15 +1029,11 @@ void D_DoomMain(void) p = M_CheckParm("-loadgame"); if (p && p < myargc - 1) { - if (cdrom) - { - sprintf(file, SAVEGAMENAMECD "%c.hsg", myargv[p + 1][0]); - } - else - { - sprintf(file, SAVEGAMENAME "%c.hsg", myargv[p + 1][0]); - } - G_LoadGame(file); + char *filename; + + filename = SV_Filename(myargv[p + 1][0] - '0'); + G_LoadGame(filename); + free(filename); } // Check valid episode and map diff --git a/src/heretic/doomdef.h b/src/heretic/doomdef.h index aa1d0c0d..b2508335 100644 --- a/src/heretic/doomdef.h +++ b/src/heretic/doomdef.h @@ -66,7 +66,6 @@ #include "d_ticcmd.h" #define SAVEGAMENAME "hticsav" -#define SAVEGAMENAMECD "c:\\heretic.cd\\hticsav" /* =============================================================================== @@ -740,6 +739,7 @@ void G_SaveGame(int slot, char *description); // called by M_Responder // Support routines for saving games +char *SV_Filename(int slot); void SV_Open(char *fileName); void SV_Close(char *fileName); void SV_Write(void *buffer, int size); @@ -747,6 +747,8 @@ void SV_WriteByte(byte val); void SV_WriteWord(unsigned short val); void SV_WriteLong(unsigned int val); +extern char *savegamedir; + void G_RecordDemo(skill_t skill, int numplayers, int episode, int map, char *name); // only called by startup code diff --git a/src/heretic/g_game.c b/src/heretic/g_game.c index b37f95e0..9b3e3799 100644 --- a/src/heretic/g_game.c +++ b/src/heretic/g_game.c @@ -25,6 +25,7 @@ // G_game.c #include +#include #include #include "doomdef.h" #include "doomkeys.h" @@ -133,6 +134,7 @@ boolean precache = true; // if true, load all graphics at start short consistancy[MAXPLAYERS][BACKUPTICS]; +char *savegamedir; byte *savebuffer, *save_p; @@ -1294,11 +1296,11 @@ void G_DoWorldDone(void) // //--------------------------------------------------------------------------- -char savename[256]; +static char *savename = NULL; void G_LoadGame(char *name) { - strcpy(savename, name); + savename = strdup(name); gameaction = ga_loadgame; } @@ -1322,6 +1324,9 @@ void G_DoLoadGame(void) gameaction = ga_nothing; length = M_ReadFile(savename, &savebuffer); + free(savename); + savename = NULL; + save_p = savebuffer + SAVESTRINGSIZE; // Skip the description field memset(vcheck, 0, sizeof(vcheck)); @@ -1684,21 +1689,15 @@ void G_SaveGame(int slot, char *description) void G_DoSaveGame(void) { int i; - char name[100]; + char *filename; char verString[VERSIONSIZE]; char *description; - if (cdrom) - { - sprintf(name, SAVEGAMENAMECD "%d.hsg", savegameslot); - } - else - { - sprintf(name, SAVEGAMENAME "%d.hsg", savegameslot); - } + filename = SV_Filename(savegameslot); + description = savedescription; - SV_Open(name); + SV_Open(filename); SV_Write(description, SAVESTRINGSIZE); memset(verString, 0, sizeof(verString)); DEH_snprintf(verString, VERSIONSIZE, "version %i", HERETIC_VERSION); @@ -1717,11 +1716,32 @@ void G_DoSaveGame(void) P_ArchiveWorld(); P_ArchiveThinkers(); P_ArchiveSpecials(); - SV_Close(name); + SV_Close(filename); gameaction = ga_nothing; savedescription[0] = 0; P_SetMessage(&players[consoleplayer], DEH_String(TXT_GAMESAVED), true); + + free(filename); +} + +//========================================================================== +// +// SV_Filename +// +// Generate the filename to use for a particular savegame slot. +// Returns a malloc()'d buffer that must be freed by the caller. +// +//========================================================================== + +char *SV_Filename(int slot) +{ + char *filename; + + filename = malloc(strlen(savegamedir) + strlen(SAVEGAMENAME) + 8); + sprintf(filename, "%s" SAVEGAMENAME "%d.hsg", savegamedir, slot); + + return filename; } //========================================================================== diff --git a/src/heretic/mn_menu.c b/src/heretic/mn_menu.c index 955e0124..930df426 100644 --- a/src/heretic/mn_menu.c +++ b/src/heretic/mn_menu.c @@ -645,19 +645,14 @@ void MN_LoadSlotText(void) FILE *fp; int count; int i; - char name[256]; + char *filename; for (i = 0; i < 6; i++) { - if (cdrom) - { - sprintf(name, SAVEGAMENAMECD "%d.hsg", i); - } - else - { - sprintf(name, SAVEGAMENAME "%d.hsg", i); - } - fp = fopen(name, "rb+"); + filename = SV_Filename(i); + fp = fopen(filename, "rb+"); + free(filename); + if (!fp) { SlotText[i][0] = 0; // empty the string @@ -826,21 +821,17 @@ static boolean SCMessages(int option) static boolean SCLoadGame(int option) { - char name[256]; + char *filename; if (!SlotStatus[option]) { // slot's empty...don't try and load return false; } - if (cdrom) - { - sprintf(name, SAVEGAMENAMECD "%d.hsg", option); - } - else - { - sprintf(name, SAVEGAMENAME "%d.hsg", option); - } - G_LoadGame(name); + + filename = SV_Filename(option); + G_LoadGame(filename); + free(filename); + MN_DeactivateMenu(); BorderNeedRefresh = true; if (quickload == -1) -- cgit v1.2.3 From a74c5e46b0cd578880f9fcbb45e6c3ef26d1c941 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 5 Sep 2011 22:30:09 +0000 Subject: Place Hexen savegames in configdir/savegames/hexen.wad/ rather than configdir/hexndata/, to be in line with Doom / Heretic behavior. Subversion-branch: /branches/raven-branch Subversion-revision: 2362 --- src/hexen/h2_main.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/hexen/h2_main.c b/src/hexen/h2_main.c index 4f9fe312..c78d662a 100644 --- a/src/hexen/h2_main.c +++ b/src/hexen/h2_main.c @@ -184,8 +184,17 @@ void D_BindVariables(void) static void D_SetDefaultSavePath(void) { - SavePath = malloc(strlen(configdir) + 10); - sprintf(SavePath, "%shexndata%c", configdir, DIR_SEPARATOR); + SavePath = M_GetSaveGameDir("hexen.wad"); + + // If we are not using a savegame path (probably because we are on + // Windows and not using a config dir), behave like Vanilla Hexen + // and use hexndata/: + + if (!strcmp(SavePath, "")) + { + SavePath = malloc(10); + sprintf(SavePath, "hexndata%c", DIR_SEPARATOR); + } } // -- cgit v1.2.3 From bab992ea55ea849d606e1733f10be42488441ab7 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Tue, 6 Sep 2011 21:50:30 +0000 Subject: Initial changes towards supporting multi-package RPM build, with separate packages for Doom, Heretic and Hexen binaries. Subversion-branch: /branches/raven-branch Subversion-revision: 2363 --- rpm.spec.in | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/rpm.spec.in b/rpm.spec.in index 137a9517..a31c2036 100644 --- a/rpm.spec.in +++ b/rpm.spec.in @@ -18,6 +18,16 @@ Requires: libSDL-1.2.so.0, libSDL_mixer-1.2.so.0, libSDL_net-1.2.so.0 See @PACKAGE_URL@ for more information. +%package -n @PROGRAM_PREFIX@heretic +Summary: @PACKAGE_SHORTDESC@ (Heretic binaries) +Group: Amusements/Games +Requires: libSDL-1.2.so.0, libSDL_mixer-1.2.so.0, libSDL_net-1.2.so.0 + +%package -n @PROGRAM_PREFIX@hexen +Summary: @PACKAGE_SHORTDESC@ (Hexen binaries) +Group: Amusements/Games +Requires: libSDL-1.2.so.0, libSDL_mixer-1.2.so.0, libSDL_net-1.2.so.0 + %prep rm -rf $RPM_BUILD_ROOT @@ -47,10 +57,33 @@ make rm -rf $RPM_BUILD_ROOT %files -%doc %{_mandir}/man5/* -%doc %{_mandir}/man6/* +%{_mandir}/man5/@PROGRAM_PREFIX@doom.cfg.5 +%{_mandir}/man5/default.cfg.5 +%{_mandir}/man6/@PROGRAM_PREFIX@doom.6 +%{_mandir}/man6/@PROGRAM_PREFIX@server.6 +%{_mandir}/man6/@PROGRAM_PREFIX@doom-setup.6 /usr/share/doc/@PACKAGE@/* -/usr/games/* +/usr/games/@PROGRAM_PREFIX@doom +/usr/games/@PROGRAM_PREFIX@server +/usr/games/@PROGRAM_PREFIX@doom-setup /usr/share/icons/* /usr/share/applications/* +%files @PROGRAM_PREFIX@heretic +%{_mandir}/man5/@PROGRAM_PREFIX@heretic.cfg.5 +%{_mandir}/man5/heretic.cfg.5 +%{_mandir}/man6/@PROGRAM_PREFIX@heretic.6 +%{_mandir}/man6/@PROGRAM_PREFIX@heretic-setup.6 +/usr/share/doc/@PROGRAM_PREFIX@heretic/* +/usr/games/@PROGRAM_PREFIX@heretic +/usr/games/@PROGRAM_PREFIX@heretic-setup + +%files @PROGRAM_PREFIX@hexen +%{_mandir}/man5/@PROGRAM_PREFIX@hexen.cfg.5 +%{_mandir}/man5/hexen.cfg.5 +%{_mandir}/man6/@PROGRAM_PREFIX@hexen.6 +%{_mandir}/man6/@PROGRAM_PREFIX@hexen-setup.6 +/usr/share/doc/@PROGRAM_PREFIX@hexen/* +/usr/games/@PROGRAM_PREFIX@hexen +/usr/games/@PROGRAM_PREFIX@hexen-setup + -- cgit v1.2.3 From df292a6dce27e7b20faa0c829aa0c58a3693f979 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 11 Sep 2011 17:01:56 +0000 Subject: Don't show error dialog if running from the console on OS X. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 2364 --- src/i_system.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/i_system.c b/src/i_system.c index 15e91653..65ca8854 100644 --- a/src/i_system.c +++ b/src/i_system.c @@ -371,6 +371,7 @@ void I_Error (char *error, ...) #endif #ifdef __MACOSX__ + if (!I_ConsoleStdout()) { CFStringRef message; char msgbuf[512]; -- cgit v1.2.3 From 11024d8214580d63ca7a9e70a121f5ff542a2fce Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 11 Sep 2011 23:32:11 +0000 Subject: Oops. Subversion-branch: /branches/raven-branch Subversion-revision: 2366 --- src/d_iwad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d_iwad.c b/src/d_iwad.c index 12a7ada2..45c58e57 100644 --- a/src/d_iwad.c +++ b/src/d_iwad.c @@ -444,7 +444,7 @@ static GameMission_t IdentifyIWADByName(char *name, int mask) // Check if it ends in this IWAD name. - if (!strcasecmp(name, iwadname)) + if (!strcasecmp(name, iwads[i].name)) { mission = iwads[i].mission; break; -- cgit v1.2.3