Update repo to 1.4.0 beta 2

git-svn-id: https://svn.eduke32.com/eduke32@222 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-07-18 21:08:38 +00:00
parent d395f8050d
commit 9fc68fcc0a
12 changed files with 699 additions and 740 deletions

View file

@ -1,12 +1,12 @@
# GNU Makefile to prepare source and binary distributions. # GNU Makefile to prepare source and binary distributions.
# make -f MakeDistributions [source|binary] # make -f MakeDistributions [source|binary]
SOURCEFILES=build.cfg buildlic.txt ChangeLog game.cfg LICENSE \ SOURCEFILES=buildlic.txt ChangeLog LICENSE \
Makefile Makefile.deps Makefile.shared Makefile.msvc Makefile.watcom \ Makefile Makefile.deps Makefile.shared Makefile.msvc Makefile.watcom \
MakeDistributions makegnu.bat makemsc.bat makew.bat NAMES.H README MakeDistributions makegnu.bat makemsc.bat makew.bat NAMES.H README
BINARYFILES=build.cfg build.exe buildlic.txt ChangeLog fmod.dll \ BINARYFILES=build.exe buildlic.txt ChangeLog fmod.dll \
game.cfg game.exe LICENSE NAMES.H neatsong.ogg README game.exe LICENSE NAMES.H neatsong.ogg README
BINARYCHECKS=checkfmoddll checkneatsongogg BINARYCHECKS=checkfmoddll checkneatsongogg
@ -29,7 +29,8 @@ source:
find . -name "*.rej" -exec rm -rf '{}' ';'; find . -name "*.rej" -exec rm -rf '{}' ';';
find . -name "*.mine" -exec rm -rf '{}' ';'; find . -name "*.mine" -exec rm -rf '{}' ';';
find . -name "*.c.r*" -exec rm -rf '{}' ';'; find . -name "*.c.r*" -exec rm -rf '{}' ';';
cp -R src rsrc include devcpp osx $(sourcedir) find . -name "*.h.r*" -exec rm -rf '{}' ';';
cp -R src rsrc include devcpp watcomhax testgame $(sourcedir)
find $(sourcedir) | grep -i svn | xargs rm -rf find $(sourcedir) | grep -i svn | xargs rm -rf
rm -f $(sourcedir)/src/tmp/* rm -f $(sourcedir)/src/tmp/*
touch $(sourcedir)/src/tmp/keep.me touch $(sourcedir)/src/tmp/keep.me

View file

@ -1,6 +1,7 @@
=EDuke32 ChangeLog= =EDuke32 ChangeLog=
==1.4.0 beta 2= ==1.4.0 beta 2=
- Core: reworked/enhanced Polymost shading
- Core: cleaned up code to properly build without Polymost/OpenGL support - Core: cleaned up code to properly build without Polymost/OpenGL support
- Core: added widescreen support for Polymost - Core: added widescreen support for Polymost
- Core: added support for toggling correct HUD model rendering on/off - Core: added support for toggling correct HUD model rendering on/off
@ -29,6 +30,7 @@
- CON: added WEAPON_FLAG_RESET (65536) to weapon system in order to properly emulate the chaingun and freezer - CON: added WEAPON_FLAG_RESET (65536) to weapon system in order to properly emulate the chaingun and freezer
- CON: fixed "eshoot" and added "ezshoot" - CON: fixed "eshoot" and added "ezshoot"
- CON: reworked weapon system; note that your custom weapons may need adjustments to work again - CON: reworked weapon system; note that your custom weapons may need adjustments to work again
- CON: updated sample enhance.con
==1.4.0 beta 1= ==1.4.0 beta 1=
- Core: added support for defining dummy tiles in the def files to eliminate the need for placeholders for hightile art - Core: added support for defining dummy tiles in the def files to eliminate the need for placeholders for hightile art

View file

@ -53,105 +53,48 @@
<body> <body>
<h1>ChangeLog for EDuke32</h1> <h1>ChangeLog for EDuke32</h1>
<p>1.4.0 beta 1, released May 11, 2006</p> <p>1.4.0 beta 2, released July 18, 2006</p>
<h2>Core changes</h2> <h2>Core changes</h2>
<ul> <ul>
<li>added support for defining dummy tiles in the def files to eliminate the need for placeholders for hightile art</li> <li>reworked/enhanced Polymost shading</li>
<li>added a temporary projection hack to reduce HOM at the top and bottom of the screen</li> <li>cleaned up code to properly build without Polymost/OpenGL support</li>
<li>fixed P2P multiplayer with more than two players</li> <li>added widescreen support for Polymost</li>
<li>fixed a nasty memory corruption issue with screen tinting that resulted in crashes in the classic renderer</li> <li>added support for toggling correct HUD model rendering on/off</li>
<li>fixed a palette issue with the in-game textured 2D map in Polymost</li> <li>removed broken support for linking OpenGL statically</li>
<li>fixed a mouse input bug in winlayer that resulted in loss of input precision</li> <li>added support for DDS textures (JF)</li>
<li>modified the def loader to perform two passes; one to load GRPs early in game startup, and one to do the rest later on</li> <li>added support for dynamically loading GTK (JF)</li>
<li>tweaks to caching system to leave more memory available for hightile art</li> </ul>
<li>proper alpha sorting on md3 models</li>
<li>removed usegoodalpha in favor of an alternate sprite sorting algorithm (note: rendering glitches may occur)</li>
<li>attempt to correct display perspective in order to properly display HUD models</li>
<li>netcode packet rate now 26 (was 40)</li>
<li>don't use 100% CPU when waiting for players to join a multiplayer game</li>
<li>reduce mouse wheel input lock time to 25ms (was 100ms)</li>
</ul>
<h2>Game changes</h2> <h2>Game changes</h2>
<ul> <ul>
<li>completely reworked mouse sensitivity and added an input filter slider</li> <li>new startup window (JF)</li>
<li>changed the weapon switching to be less restrictive in order to assist weapon changes via mouse wheel</li> <li>added support for using the mouse and a joystick simultaneously (JF)</li>
<li>added support for alt+enter to switch between fullscreen and windowed mode</li> <li>fixed an issue preventing skill selection, bonus screen and episode ending animation sounds from playing</li>
<li>added an option to disable demo playback cameras</li> <li>fixed a problem where the player was unable to exit some pools of water in some maps</li>
<li>added support for scaling the crosshair to 1/2 or 1/4 normal size</li> <li>made further adjustments to the weapon properties in order to more closely emulate Duke 1.5</li>
<li>added an option to enable autoaim only for hitscan weapons (bullets)</li> <li>fixed an issue where you could disable map exits in multiplayer, have all players quit, start a single player game and then have exits continue to kill you</li>
<li>changed the default video mode to 1024x768x32 and added several fallback choices</li>
<li>reworked the quicksave and quickload functions such as to not prompt the player on use</li>
<li>set the default controls to WSAD + mouse aiming</li>
<li>restore the pause key behavior from Duke 1.5 wherein the "GAME PAUSED" message isn't displayed when shift is pressed while pausing</li>
<li>fixed an infinite loop and a palette corruption bug regarding the video setup menu and switching to the classic renderer</li>
<li>fixed an issue where the automap would scroll itself and/or jitter when the game was paused while moving</li>
<li>fixed pistol timing to more closely match Duke 1.5</li>
<li>fixed long-standing quick kick animation bug</li>
<li>fixed kick attack speed to more closely match Duke 1.5</li>
<li>fixed an issue with shift+F5 not allowing selection of music defined for episode 5 and up</li>
<li>changed the default menu background to something more pleasing</li>
<li>restructured the option menus to make more sense</li>
<li>expanded the "HUD weapon" menu option to allow displaying a weapon's pickup sprite instead of the HUD art</li>
</ul> </ul>
<h2>Multiplayer changes</h2> <h2>Multiplayer changes</h2>
<ul> <ul>
<li>Duke Talk menu option can now be set to "all" to hear enemy pain sounds</li> <li>fixed numerous minor bugs in the voting system</li>
<li>added an option to disable nuke button exits in deathmatch</li> <li>added a more noticeable message to indicate that the player hasn't voted yet in an active vote</li>
<li>greatly improved the text chat by increasing the text buffer size and by implementing basic line wrapping</li> <li>added support for /me in text chat</li>
<li>added a voting system for map changes along with a menu option to automatically vote yes or no</li> <li>increased size of player chat icon</li>
<li>added an icon above the heads of other players for when they're chatting or using the menu</li> <li>added "nat-free" support from Adam Fazakerley</li>
<li>added an option to automatically send messages to all players rather than prompting</li> <li>fixed inventory respawn bug</li>
<li>added an option to display the name of the opponent you're currently aiming at</li> <li>minor fixes to DukesterX 1.5 compatibility wrapper</li>
<li>added a player setup menu to configure player name, color, macros, and weapon/aiming options mid-game</li>
<li>added support for Rancidmeat network configuration files via -rmnet command line parameter</li>
<li>detect and correct internal vs external IP address issues when using Rancidmeat configuration files</li>
<li>added dummy duke3d_w32.exe to facilitate EDuke32 multiplayer via DukesterX 1.5</li>
<li>added support for in-game selection and loading of different user maps</li>
<li>added support for various player death messages which can be redefined in the CONs</li>
<li>added support for Quake-style color codes in player names and text chat (code format is ^&lt;palette&gt;)</li>
<li>limit player name to 10 characters (not counting color codes)</li>
<li>fixed issue where multiple players trying to step on the same shrunken enemy would kill the game</li>
<li>fixed issue where briefly tapping the jump key would produce a lag effect during the resulting jump</li>
<li>fixed issue where using the jetpack + steroids would produce a lag effect in P2P mode</li>
<li>fixed several out-of-sync issues</li>
<li>fixed a long-standing bug wherein a player death could be counted as both a death and a suicide</li>
<li>fixed screen resizing issue when typing - and = in chat</li>
</ul> </ul>
<h2>CON changes</h2> <h2>CON changes</h2>
<ul> <ul>
<li>added "save" command to allow the creation of automatic checkpoints</li> <li>reworked movement_lock member of the player struct to use bit flags</li>
<li>added "cansee" and "canseespr" commands to easily determine whether two sprites or sets of coordinates have visibility</li> <li>reworked findnearactor3d, findnearactor3dvar, findnearsprite3d, and findnearsprite3dvar</li>
<li>added "definegamefuncname" command to change the key names used in the configuration file and in the control setup menus</li> <li>added findnearactorz, findnearactorzvar, findnearspritez, and findnearspritezvar</li>
<li>added additional safety checks to get/setuserdef/player/sector/sprite/wall/input</li> <li>added WEAPON_FLAG_RESET (65536) to weapon system in order to properly emulate the chaingun and freezer</li>
<li>added support for Quake-style color codes in quotes (code format is ^&lt;palette&gt;)</li> <li>fixed "eshoot" and added "ezshoot"</li>
<li>added extra timing checks to the weapon system; note that weapons with strange TOTALTIME and FIREDELAY values may no longer fire</li> <li>reworked weapon system; note that your custom weapons may need adjustments to work again</li>
<li>save quotes, dynamic-to-static tile remapping information, extended sprite flags and sprite caching info to savegames</li> <li>updated sample enhance.con</li>
<li>reworked the quote system to use dynamically allocated memory and doubled the length of each individual quote</li>
<li>fixed a savegame issue where some gamevar values may not have been restored properly and added more sanity checks to savegame loading</li>
<li>fixed an issue with FRAMEEFFECT1 sprites ending up with the wrong tspr->picnum</li>
<li>fixed a potential issue where custom projectiles that hit a player wouldn't knock the player back</li>
<li>fixed a bug in the findnearactor3d command and further sped up findnearactor3d and findnearsprite3d</li>
<li>fixed an issue where tab characters in CON files could screw up label names</li>
<li>fixed a crash that occurred when hitscan type custom projectiles with trails were fired at a wall from a distance of 0</li>
<li>removed the RENDERSIZE attribute for weapons</li>
<li>made slight optimizations to various commands</li>
</ul> </ul>
<h2>Console changes</h2>
<ul>
<li>added the following cvars: "crosshair", "cl_autoaim", "cl_automsg", "cl_autovote", "cl_democams", "cl_drawweapon", "cl_idplayers", "cl_messagetime", "cl_mousefilter", "cl_showcoords", "cl_showfps", "cl_smoothinput", "cl_statusbarmode", "cl_statusbarscale", "cl_weaponswitch" and "r_precache"</li>
<li>added "addpath" command to add a new directory to the game's virtual filesystem pool</li>
</ul>
<h2>Mapster32 changes</h2>
<ul>
<li>better smoothing of mouse input when using 3D mode mouselook</li>
<li>add ' F key combo to replace nonexistent tiles with tile 0</li>
</ul>
<p><br />Please see JonoF's JFDuke3D release notes <a href="http://www.jonof.id.au/modsuppt/jfduke3d/releasenotes.html">here</a> for information on features JFDuke3D shares with EDuke32</p> <p><br />Please see JonoF's JFDuke3D release notes <a href="http://www.jonof.id.au/modsuppt/jfduke3d/releasenotes.html">here</a> for information on features JFDuke3D shares with EDuke32</p>
<address>Richard "TerminX" Gobeille (<a href="mailto:terminx@gmail.com">terminx@gmail.com</a>)</address> <address>Richard "TerminX" Gobeille (<a href="mailto:terminx@gmail.com">terminx@gmail.com</a>)</address>

View file

@ -1,12 +1,12 @@
# GNU Makefile to prepare source and binary distributions. # GNU Makefile to prepare source and binary distributions.
# make -f MakeDistributions [source|binary] # make -f MakeDistributions [source|binary]
SOURCEFILES=build.cfg GNU.TXT \ SOURCEFILES=GNU.TXT \
Makefile Makefile.deps Makefile.msvc Makefile.watcom MakeDistributions \ Makefile Makefile.deps Makefile.msvc Makefile.watcom MakeDistributions \
makemsc.bat makew.bat ChangeLog.html duke3d.def.sample \ makemsc.bat makew.bat ChangeLog.html duke3d.def.sample \
SEHELP.HLP STHELP.HLP ChangeLog enhance.con.sample SEHELP.HLP STHELP.HLP ChangeLog enhance.con.sample
BINARYFILES=build.cfg mapster32.exe eduke32.exe GNU.TXT \ BINARYFILES=mapster32.exe eduke32.exe GNU.TXT \
ChangeLog.html setup.exe duke3d.def.sample SEHELP.HLP STHELP.HLP \ ChangeLog.html setup.exe duke3d.def.sample SEHELP.HLP STHELP.HLP \
ChangeLog enhance.con.sample duke3d_w32.exe ChangeLog enhance.con.sample duke3d_w32.exe
@ -31,7 +31,8 @@ source:
find . -name "*.rej" -exec rm -rf '{}' ';'; find . -name "*.rej" -exec rm -rf '{}' ';';
find . -name "*.mine" -exec rm -rf '{}' ';'; find . -name "*.mine" -exec rm -rf '{}' ';';
find . -name "*.c.r*" -exec rm -rf '{}' ';'; find . -name "*.c.r*" -exec rm -rf '{}' ';';
cp -R source rsrc $(sourcedir) find . -name "*.h.r*" -exec rm -rf '{}' ';';
cp -R source rsrc watcomhax $(sourcedir)
find $(sourcedir) | grep -i svn | xargs rm -rf find $(sourcedir) | grep -i svn | xargs rm -rf
kzip -r $(sourcedir).zip $(sourcedir) kzip -r $(sourcedir).zip $(sourcedir)

View file

@ -26,7 +26,7 @@ o=o
ifneq (0,$(RELEASE)) ifneq (0,$(RELEASE))
# debugging disabled # debugging disabled
debug=-fomit-frame-pointer -O1 debug=-fomit-frame-pointer -O2
else else
# debugging enabled # debugging enabled
debug=-ggdb -O0 debug=-ggdb -O0

View file

@ -86,7 +86,11 @@ enum events {
EVENT_GETMENUTILE, EVENT_GETMENUTILE,
EVENT_SPAWN, EVENT_SPAWN,
EVENT_LOGO, EVENT_LOGO,
EVENT_EGS EVENT_EGS,
EVENT_DOFIRE,
EVENT_PRESSEDFIRE,
EVENT_USE,
EVENT_PROCESSINPUT
}; };
*/ */
@ -148,6 +152,8 @@ enum projectilelabels {
// 4096 Spawn Type 2 (Shotgun shells) // 4096 Spawn Type 2 (Shotgun shells)
// 8192 Spawn Type 3 (CHAINGUN shells) // 8192 Spawn Type 3 (CHAINGUN shells)
// 16384 Semi-automatic // 16384 Semi-automatic
// 32768 Pistol reload sound hack
// 65536 Cycle kickback_pic back to 1 if fire is held down, else set to 0
// TRIPBOMB_CONTROL // TRIPBOMB_CONTROL
// 1 Tripwire. Trip Bomb works with tripwire. // 1 Tripwire. Trip Bomb works with tripwire.
@ -163,7 +169,7 @@ gamevar WEAPON0_RELOAD 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_FIREDELAY 7 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON0_FIREDELAY 7 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_TOTALTIME 14 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON0_TOTALTIME 14 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_HOLDDELAY 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON0_HOLDDELAY 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_FLAGS 288 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON0_FLAGS 292 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_SHOOTS 2521 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON0_SHOOTS 2521 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_SPAWNTIME 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON0_SPAWNTIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_SPAWN 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON0_SPAWN 0 GAMEVAR_FLAG_PERPLAYER
@ -172,15 +178,16 @@ gamevar WEAPON0_INITIALSOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_FIRESOUND 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON0_FIRESOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON0_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON0_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_RENDERSIZE 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON0_RELOADSOUND1 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON0_RELOADSOUND2 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_WORKSLIKE 1 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON1_WORKSLIKE 1 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_CLIP 12 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON1_CLIP 12 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_RELOAD 27 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON1_RELOAD 27 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_FIREDELAY 2 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON1_FIREDELAY 2 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_TOTALTIME 6 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON1_TOTALTIME 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_HOLDDELAY 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON1_HOLDDELAY 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_FLAGS 4 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON1_FLAGS 32768 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_SHOOTS 2595 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON1_SHOOTS 2595 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_SPAWNTIME 2 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON1_SPAWNTIME 2 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_SPAWN 2533 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON1_SPAWN 2533 GAMEVAR_FLAG_PERPLAYER
@ -189,13 +196,14 @@ gamevar WEAPON1_INITIALSOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_FIRESOUND 3 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON1_FIRESOUND 3 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON1_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON1_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_RENDERSIZE 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON1_RELOADSOUND1 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON1_RELOADSOUND2 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_WORKSLIKE 2 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON2_WORKSLIKE 2 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_CLIP 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON2_CLIP 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_RELOAD 13 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON2_RELOAD 13 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_FIREDELAY 4 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON2_FIREDELAY 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_TOTALTIME 31 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON2_TOTALTIME 30 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_HOLDDELAY 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON2_HOLDDELAY 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_FLAGS 1024 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON2_FLAGS 1024 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_SHOOTS 2613 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON2_SHOOTS 2613 GAMEVAR_FLAG_PERPLAYER
@ -206,15 +214,16 @@ gamevar WEAPON2_INITIALSOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_FIRESOUND 109 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON2_FIRESOUND 109 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_SOUND2TIME 15 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON2_SOUND2TIME 15 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_SOUND2SOUND 169 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON2_SOUND2SOUND 169 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_RENDERSIZE 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON2_RELOADSOUND1 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON2_RELOADSOUND2 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_WORKSLIKE 3 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON3_WORKSLIKE 3 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_CLIP 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON3_CLIP 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_RELOAD 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON3_RELOAD 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_FIREDELAY 4 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON3_FIREDELAY 3 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_TOTALTIME 10 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON3_TOTALTIME 12 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_HOLDDELAY 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON3_HOLDDELAY 3 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_FLAGS 8276 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON3_FLAGS 73812 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_SHOOTS 2536 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON3_SHOOTS 2536 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_SPAWNTIME 1 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON3_SPAWNTIME 1 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_SPAWN 2533 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON3_SPAWN 2533 GAMEVAR_FLAG_PERPLAYER
@ -223,7 +232,8 @@ gamevar WEAPON3_INITIALSOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_FIRESOUND 6 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON3_FIRESOUND 6 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON3_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON3_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_RENDERSIZE 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON3_RELOADSOUND1 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON3_RELOADSOUND2 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON4_WORKSLIKE 4 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON4_WORKSLIKE 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON4_CLIP 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON4_CLIP 0 GAMEVAR_FLAG_PERPLAYER
@ -240,7 +250,8 @@ gamevar WEAPON4_INITIALSOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON4_FIRESOUND 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON4_FIRESOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON4_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON4_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON4_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON4_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON4_RENDERSIZE 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON4_RELOADSOUND1 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON4_RELOADSOUND2 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON5_WORKSLIKE 5 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON5_WORKSLIKE 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON5_CLIP 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON5_CLIP 0 GAMEVAR_FLAG_PERPLAYER
@ -257,7 +268,8 @@ gamevar WEAPON5_INITIALSOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON5_FIRESOUND 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON5_FIRESOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON5_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON5_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON5_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON5_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON5_RENDERSIZE 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON5_RELOADSOUND1 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON5_RELOADSOUND2 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON6_WORKSLIKE 6 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON6_WORKSLIKE 6 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON6_CLIP 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON6_CLIP 0 GAMEVAR_FLAG_PERPLAYER
@ -274,13 +286,14 @@ gamevar WEAPON6_INITIALSOUND 11 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON6_FIRESOUND 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON6_FIRESOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON6_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON6_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON6_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON6_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON6_RENDERSIZE 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON6_RELOADSOUND1 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON6_RELOADSOUND2 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_WORKSLIKE 7 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON7_WORKSLIKE 7 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_CLIP 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON7_CLIP 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_RELOAD 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON7_RELOAD 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_FIREDELAY 3 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON7_FIREDELAY 3 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_TOTALTIME 5 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON7_TOTALTIME 6 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_HOLDDELAY 5 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON7_HOLDDELAY 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_FLAGS 72 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON7_FLAGS 72 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_SHOOTS 2605 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON7_SHOOTS 2605 GAMEVAR_FLAG_PERPLAYER
@ -291,13 +304,14 @@ gamevar WEAPON7_INITIALSOUND 10 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_FIRESOUND 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON7_FIRESOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON7_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON7_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_RENDERSIZE 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON7_RELOADSOUND1 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON7_RELOADSOUND2 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_WORKSLIKE 8 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON8_WORKSLIKE 8 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_CLIP 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON8_CLIP 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_RELOAD 16 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON8_RELOAD 16 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_FIREDELAY 3 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON8_FIREDELAY 3 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_TOTALTIME 40 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON8_TOTALTIME 16 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_HOLDDELAY 7 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON8_HOLDDELAY 7 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_FLAGS 3072 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON8_FLAGS 3072 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_SHOOTS 2563 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON8_SHOOTS 2563 GAMEVAR_FLAG_PERPLAYER
@ -308,15 +322,16 @@ gamevar WEAPON8_INITIALSOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_FIRESOUND 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON8_FIRESOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON8_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON8_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_RENDERSIZE 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON8_RELOADSOUND1 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON8_RELOADSOUND2 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_WORKSLIKE 9 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON9_WORKSLIKE 9 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_CLIP 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON9_CLIP 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_RELOAD 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON9_RELOAD 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_FIREDELAY 3 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON9_FIREDELAY 3 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_TOTALTIME 8 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON9_TOTALTIME 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_HOLDDELAY 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON9_HOLDDELAY 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_FLAGS 20 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON9_FLAGS 65536 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_SHOOTS 1641 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON9_SHOOTS 1641 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_SPAWNTIME 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON9_SPAWNTIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_SPAWN 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON9_SPAWN 0 GAMEVAR_FLAG_PERPLAYER
@ -325,7 +340,8 @@ gamevar WEAPON9_INITIALSOUND 10 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_FIRESOUND 10 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON9_FIRESOUND 10 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON9_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON9_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_RENDERSIZE 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON9_RELOADSOUND1 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON9_RELOADSOUND2 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON10_WORKSLIKE 10 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON10_WORKSLIKE 10 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON10_CLIP 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON10_CLIP 0 GAMEVAR_FLAG_PERPLAYER
@ -342,12 +358,13 @@ gamevar WEAPON10_INITIALSOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON10_FIRESOUND 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON10_FIRESOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON10_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON10_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON10_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON10_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON10_RENDERSIZE 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON10_RELOADSOUND1 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON10_RELOADSOUND2 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_WORKSLIKE 11 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON11_WORKSLIKE 11 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_CLIP 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON11_CLIP 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_RELOAD 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON11_RELOAD 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_FIREDELAY 2 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON11_FIREDELAY 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_TOTALTIME 5 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON11_TOTALTIME 5 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_HOLDDELAY 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON11_HOLDDELAY 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_FLAGS 2 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON11_FLAGS 2 GAMEVAR_FLAG_PERPLAYER
@ -359,11 +376,14 @@ gamevar WEAPON11_INITIALSOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_FIRESOUND 388 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON11_FIRESOUND 388 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON11_SOUND2TIME 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON11_SOUND2SOUND 0 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_RENDERSIZE 0 GAMEVAR_FLAG_PERPLAYER gamevar WEAPON11_RELOADSOUND1 4 GAMEVAR_FLAG_PERPLAYER
gamevar WEAPON11_RELOADSOUND2 5 GAMEVAR_FLAG_PERPLAYER
gamevar GRENADE_LIFETIME 120 GAMEVAR_FLAG_PERPLAYER gamevar GRENADE_LIFETIME 120 GAMEVAR_FLAG_PERPLAYER
gamevar GRENADE_LIFETIME_VAR 30 GAMEVAR_FLAG_PERPLAYER gamevar GRENADE_LIFETIME_VAR 30 GAMEVAR_FLAG_PERPLAYER
gamevar STICKYBOMB_LIFETIME 120 GAMEVAR_FLAG_PERPLAYER gamevar STICKYBOMB_LIFETIME 120 GAMEVAR_FLAG_PERPLAYER
gamevar STICKYBOMB_LIFETIME_VAR 30 GAMEVAR_FLAG_PERPLAYER gamevar STICKYBOMB_LIFETIME_VAR 30 GAMEVAR_FLAG_PERPLAYER
gamevar TRIPBOMB_CONTROL 1 GAMEVAR_FLAG_PERPLAYER // set value to 2 for timed bomb gamevar TRIPBOMB_CONTROL 1 GAMEVAR_FLAG_PERPLAYER // set value to 2 for timed bomb
gamevar PIPEBOMB_CONTROL 1 GAMEVAR_FLAG_PERPLAYER // set value to 2 for grenade behavior gamevar PIPEBOMB_CONTROL 1 GAMEVAR_FLAG_PERPLAYER // set value to 2 for grenade behavior

View file

@ -2,7 +2,7 @@
; HM NIS Edit Wizard helper defines ; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "EDuke32" !define PRODUCT_NAME "EDuke32"
!define PRODUCT_VERSION "1.4.0 beta 1" !define PRODUCT_VERSION "1.4.0 beta 2"
!define PRODUCT_PUBLISHER "EDuke32 Team" !define PRODUCT_PUBLISHER "EDuke32 Team"
!define PRODUCT_WEB_SITE "http://www.eduke32.com" !define PRODUCT_WEB_SITE "http://www.eduke32.com"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT_NAME}" !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT_NAME}"
@ -83,7 +83,6 @@ SectionEnd
Section "Level editor" SEC_EDITOR Section "Level editor" SEC_EDITOR
SetOutPath "$INSTDIR" SetOutPath "$INSTDIR"
SetOverwrite ifnewer SetOverwrite ifnewer
File "..\build.cfg"
File "..\mapster32.exe" File "..\mapster32.exe"
CreateDirectory "$SMPROGRAMS\$ICONS_GROUP" CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Mapster32.lnk" "$INSTDIR\mapster32.exe" CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Mapster32.lnk" "$INSTDIR\mapster32.exe"
@ -147,7 +146,6 @@ Section Uninstall
Delete "$INSTDIR\duke3d.def.sample" Delete "$INSTDIR\duke3d.def.sample"
Delete "$INSTDIR\enhance.con.sample" Delete "$INSTDIR\enhance.con.sample"
Delete "$INSTDIR\mapster32.exe" Delete "$INSTDIR\mapster32.exe"
Delete "$INSTDIR\build.cfg"
Delete "$INSTDIR\setup.exe" Delete "$INSTDIR\setup.exe"
Delete "$INSTDIR\ChangeLog.html" Delete "$INSTDIR\ChangeLog.html"
Delete "$INSTDIR\ChangeLog" Delete "$INSTDIR\ChangeLog"

View file

@ -227,7 +227,7 @@ void CONFIG_SetDefaults( void )
SoundToggle = 1; SoundToggle = 1;
ud.automsg = 0; ud.automsg = 0;
ud.autovote = 0; ud.autovote = 0;
ud.brightness = 16; ud.brightness = 8;
ud.color = 0; ud.color = 0;
ud.crosshair = 2; ud.crosshair = 2;
ud.democams = 1; ud.democams = 1;

View file

@ -44,7 +44,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "util_lib.h" #include "util_lib.h"
#define VERSION " 1.4.0svn" #define VERSION " 1.4.0 beta 2"
#define HEAD "EDuke32"VERSION" (shareware mode)" #define HEAD "EDuke32"VERSION" (shareware mode)"
#define HEAD2 "EDuke32"VERSION #define HEAD2 "EDuke32"VERSION

View file

@ -263,6 +263,12 @@ void AudioUpdate(void)
if (chans[i].chan) jfaud->FreeSound(chans[i].chan); if (chans[i].chan) jfaud->FreeSound(chans[i].chan);
chans[i].chan = NULL; chans[i].chan = NULL;
chans[i].done = false; chans[i].done = false;
if (chans[i].owner >= 0 &&
sprite[chans[i].owner].picnum == MUSICANDSFX &&
sector[sprite[chans[i].owner].sectnum].lotag < 3 &&
sprite[chans[i].owner].lotag < 999)
hittype[chans[i].owner].temp_data[0] = 0;
} }
jfaud->Update(false); // don't age the cache here jfaud->Update(false); // don't age the cache here
} }
@ -589,10 +595,7 @@ void pan3dsound(void)
if (PN != MUSICANDSFX && !cansee(cx,cy,cz-(24<<8),cs,sx,sy,sz-(24<<8),SECT) ) if (PN != MUSICANDSFX && !cansee(cx,cy,cz-(24<<8),cs,sx,sy,sz-(24<<8),SECT) )
gain *= OCCLUDEDFACTOR; gain *= OCCLUDEDFACTOR;
if(PN == MUSICANDSFX && SLT < 999) { if(PN == MUSICANDSFX && SLT < 999) rolloff = 1.0;
numenvsnds++;
rolloff = 1.0;
}
if( soundm[ chans[j].soundnum ]&SOUNDM_GLOBAL ) global = 1; if( soundm[ chans[j].soundnum ]&SOUNDM_GLOBAL ) global = 1;
switch(chans[j].soundnum) { switch(chans[j].soundnum) {
@ -647,13 +650,8 @@ void FX_SetReverbDelay( int delay )
int FX_VoiceAvailable( int priority ) int FX_VoiceAvailable( int priority )
{ {
int j;
if (!jfaud) return 0; if (!jfaud) return 0;
for (j=NumVoices-1;j>=0;j--) { return 1;
if (!chans[j].chan || !jfaud->IsValidSound(chans[j].chan)) return 1;
}
return 0;
} }
int FX_PlayVOC3D( char *ptr, int pitchoffset, int angle, int distance, int FX_PlayVOC3D( char *ptr, int pitchoffset, int angle, int distance,

View file

@ -34,11 +34,9 @@ short callsound(short sn,short whatsprite)
haltsoundhack = 0; haltsoundhack = 0;
return -1; return -1;
} }
// initprintf("begin callsound(%d,%d)\n",sn,whatsprite);
i = headspritesect[sn]; i = headspritesect[sn];
while(i >= 0) while(i >= 0)
{ {
// initprintf("callsound(%d,%d) i=%d T1-6=%d,%d,%d,%d,%d,%d PN=%d SLT=%d SHT=%d\n",sn,whatsprite,i,T1,T2,T3,T4,T5,T6,PN,SLT,SHT);
if( PN == MUSICANDSFX && SLT < 1000 ) if( PN == MUSICANDSFX && SLT < 1000 )
{ {
if(whatsprite == -1) whatsprite = i; if(whatsprite == -1) whatsprite = i;
@ -67,12 +65,10 @@ short callsound(short sn,short whatsprite)
T6 = whatsprite; T6 = whatsprite;
T1 = 0; T1 = 0;
} }
// initprintf("end callsound(%d,%d)\n",sn,whatsprite);
return SLT; return SLT;
} }
i = nextspritesect[i]; i = nextspritesect[i];
} }
// initprintf("end callsound(%d,%d) -1\n",sn,whatsprite);
return -1; return -1;
} }

View file

@ -27,11 +27,11 @@
static struct audioenumdrv *wavedevs = NULL; static struct audioenumdrv *wavedevs = NULL;
static struct { static struct {
int fullscreen; int fullscreen;
int xdim, ydim, bpp; int xdim, ydim, bpp;
int forcesetup; int forcesetup;
int usemouse, usejoy; int usemouse, usejoy;
char selectedgrp[BMAX_PATH+1]; char selectedgrp[BMAX_PATH+1];
} settings; } settings;
static HWND startupdlg = NULL; static HWND startupdlg = NULL;
@ -44,512 +44,512 @@ static int done = -1, mode = TAB_CONFIG;
static void PopulateForm(int pgs) static void PopulateForm(int pgs)
{ {
HWND hwnd; HWND hwnd;
char buf[256]; char buf[256];
int i,j; int i,j;
if (pgs & POPULATE_VIDEO) { if (pgs & POPULATE_VIDEO) {
int mode; int mode;
hwnd = GetDlgItem(pages[TAB_CONFIG], IDCVMODE); hwnd = GetDlgItem(pages[TAB_CONFIG], IDCVMODE);
mode = checkvideomode(&settings.xdim, &settings.ydim, settings.bpp, settings.fullscreen, 1); mode = checkvideomode(&settings.xdim, &settings.ydim, settings.bpp, settings.fullscreen, 1);
if (mode < 0) { if (mode < 0) {
int cd[] = { 32, 24, 16, 15, 8, 0 }; int cd[] = { 32, 24, 16, 15, 8, 0 };
for (i=0; cd[i]; ) { if (cd[i] >= settings.bpp) i++; else break; } for (i=0; cd[i]; ) { if (cd[i] >= settings.bpp) i++; else break; }
for ( ; cd[i]; i++) { for ( ; cd[i]; i++) {
mode = checkvideomode(&settings.xdim, &settings.ydim, cd[i], settings.fullscreen, 1); mode = checkvideomode(&settings.xdim, &settings.ydim, cd[i], settings.fullscreen, 1);
if (mode < 0) continue; if (mode < 0) continue;
settings.bpp = cd[i]; settings.bpp = cd[i];
break; break;
} }
} }
Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCFULLSCREEN), (settings.fullscreen ? BST_CHECKED : BST_UNCHECKED)); Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCFULLSCREEN), (settings.fullscreen ? BST_CHECKED : BST_UNCHECKED));
ComboBox_ResetContent(hwnd); ComboBox_ResetContent(hwnd);
for (i=0; i<validmodecnt; i++) { for (i=0; i<validmodecnt; i++) {
if (validmode[i].fs != settings.fullscreen) continue; if (validmode[i].fs != settings.fullscreen) continue;
// all modes get added to the 3D mode list // all modes get added to the 3D mode list
Bsprintf(buf, "%ld x %ld %dbpp", validmode[i].xdim, validmode[i].ydim, validmode[i].bpp); Bsprintf(buf, "%ld x %ld %dbpp", validmode[i].xdim, validmode[i].ydim, validmode[i].bpp);
j = ComboBox_AddString(hwnd, buf); j = ComboBox_AddString(hwnd, buf);
ComboBox_SetItemData(hwnd, j, i); ComboBox_SetItemData(hwnd, j, i);
if (i == mode) ComboBox_SetCurSel(hwnd, j); if (i == mode) ComboBox_SetCurSel(hwnd, j);
} }
} }
if (pgs & POPULATE_CONFIG) { if (pgs & POPULATE_CONFIG) {
struct audioenumdev *d; struct audioenumdev *d;
char *n; char *n;
hwnd = GetDlgItem(pages[TAB_CONFIG], IDCSOUNDDRV); hwnd = GetDlgItem(pages[TAB_CONFIG], IDCSOUNDDRV);
ComboBox_ResetContent(hwnd); ComboBox_ResetContent(hwnd);
if (wavedevs) { if (wavedevs) {
d = wavedevs->devs; d = wavedevs->devs;
for (i=0; wavedevs->drvs[i]; i++) { for (i=0; wavedevs->drvs[i]; i++) {
strcpy(buf, wavedevs->drvs[i]); strcpy(buf, wavedevs->drvs[i]);
if (d->devs) { if (d->devs) {
strcat(buf, ":"); strcat(buf, ":");
n = buf + strlen(buf); n = buf + strlen(buf);
for (j=0; d->devs[j]; j++) { for (j=0; d->devs[j]; j++) {
strcpy(n, d->devs[j]); strcpy(n, d->devs[j]);
ComboBox_AddString(hwnd, buf); ComboBox_AddString(hwnd, buf);
} }
} else { } else {
ComboBox_AddString(hwnd, buf); ComboBox_AddString(hwnd, buf);
} }
d = d->next; d = d->next;
} }
} }
Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCALWAYSSHOW), (settings.forcesetup ? BST_CHECKED : BST_UNCHECKED)); Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCALWAYSSHOW), (settings.forcesetup ? BST_CHECKED : BST_UNCHECKED));
Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCINPUTMOUSE), (settings.usemouse ? BST_CHECKED : BST_UNCHECKED)); Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCINPUTMOUSE), (settings.usemouse ? BST_CHECKED : BST_UNCHECKED));
Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCINPUTJOY), (settings.usejoy ? BST_CHECKED : BST_UNCHECKED)); Button_SetCheck(GetDlgItem(pages[TAB_CONFIG], IDCINPUTJOY), (settings.usejoy ? BST_CHECKED : BST_UNCHECKED));
} }
if (pgs & POPULATE_GAME) { if (pgs & POPULATE_GAME) {
struct grpfile *fg; struct grpfile *fg;
int i, j; int i, j;
char buf[128+BMAX_PATH]; char buf[128+BMAX_PATH];
hwnd = GetDlgItem(pages[TAB_GAME], IDGDATA); hwnd = GetDlgItem(pages[TAB_GAME], IDGDATA);
for (fg = foundgrps; fg; fg=fg->next) { for (fg = foundgrps; fg; fg=fg->next) {
for (i = 0; i<numgrpfiles; i++) for (i = 0; i<numgrpfiles; i++)
if (fg->crcval == grpfiles[i].crcval) break; if (fg->crcval == grpfiles[i].crcval) break;
if (i == numgrpfiles) continue; // unrecognised grp file if (i == numgrpfiles) continue; // unrecognised grp file
Bsprintf(buf, "%s\t%s", grpfiles[i].name, fg->name); Bsprintf(buf, "%s\t%s", grpfiles[i].name, fg->name);
j = ListBox_AddString(hwnd, buf); j = ListBox_AddString(hwnd, buf);
ListBox_SetItemData(hwnd, j, (LPARAM)fg); ListBox_SetItemData(hwnd, j, (LPARAM)fg);
if (!Bstrcasecmp(fg->name, settings.selectedgrp)) ListBox_SetCurSel(hwnd, j); if (!Bstrcasecmp(fg->name, settings.selectedgrp)) ListBox_SetCurSel(hwnd, j);
} }
} }
} }
static INT_PTR CALLBACK ConfigPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) static INT_PTR CALLBACK ConfigPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
switch (uMsg) { switch (uMsg) {
case WM_COMMAND: case WM_COMMAND:
switch (LOWORD(wParam)) { switch (LOWORD(wParam)) {
case IDCFULLSCREEN: case IDCFULLSCREEN:
settings.fullscreen = !settings.fullscreen; settings.fullscreen = !settings.fullscreen;
PopulateForm(POPULATE_VIDEO); PopulateForm(POPULATE_VIDEO);
return TRUE; return TRUE;
case IDCVMODE: case IDCVMODE:
if (HIWORD(wParam) == CBN_SELCHANGE) { if (HIWORD(wParam) == CBN_SELCHANGE) {
int i; int i;
i = ComboBox_GetCurSel((HWND)lParam); i = ComboBox_GetCurSel((HWND)lParam);
if (i != CB_ERR) i = ComboBox_GetItemData((HWND)lParam, i); if (i != CB_ERR) i = ComboBox_GetItemData((HWND)lParam, i);
if (i != CB_ERR) { if (i != CB_ERR) {
settings.xdim = validmode[i].xdim; settings.xdim = validmode[i].xdim;
settings.ydim = validmode[i].ydim; settings.ydim = validmode[i].ydim;
settings.bpp = validmode[i].bpp; settings.bpp = validmode[i].bpp;
} }
} }
return TRUE; return TRUE;
case IDCALWAYSSHOW: case IDCALWAYSSHOW:
settings.forcesetup = IsDlgButtonChecked(hwndDlg, IDCALWAYSSHOW) == BST_CHECKED; settings.forcesetup = IsDlgButtonChecked(hwndDlg, IDCALWAYSSHOW) == BST_CHECKED;
return TRUE; return TRUE;
case IDCINPUTMOUSE: case IDCINPUTMOUSE:
settings.usemouse = IsDlgButtonChecked(hwndDlg, IDCINPUTMOUSE) == BST_CHECKED; settings.usemouse = IsDlgButtonChecked(hwndDlg, IDCINPUTMOUSE) == BST_CHECKED;
return TRUE; return TRUE;
case IDCINPUTJOY: case IDCINPUTJOY:
settings.usejoy = IsDlgButtonChecked(hwndDlg, IDCINPUTJOY) == BST_CHECKED; settings.usejoy = IsDlgButtonChecked(hwndDlg, IDCINPUTJOY) == BST_CHECKED;
return TRUE; return TRUE;
default: break; default: break;
} }
break; break;
default: break; default: break;
} }
return FALSE; return FALSE;
} }
static INT_PTR CALLBACK GamePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) static INT_PTR CALLBACK GamePageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
switch (uMsg) { switch (uMsg) {
case WM_COMMAND: case WM_COMMAND:
switch (LOWORD(wParam)) { switch (LOWORD(wParam)) {
case IDGDATA: { case IDGDATA: {
int i; int i;
i = ListBox_GetCurSel((HWND)lParam); i = ListBox_GetCurSel((HWND)lParam);
if (i != CB_ERR) i = ListBox_GetItemData((HWND)lParam, i); if (i != CB_ERR) i = ListBox_GetItemData((HWND)lParam, i);
if (i != CB_ERR) strcpy(settings.selectedgrp, ((struct grpfile*)i)->name); if (i != CB_ERR) strcpy(settings.selectedgrp, ((struct grpfile*)i)->name);
return TRUE; return TRUE;
} }
default: break; default: break;
} }
break; break;
default: break; default: break;
} }
return FALSE; return FALSE;
} }
static void SetPage(int n) static void SetPage(int n)
{ {
HWND tab; HWND tab;
int cur; int cur;
tab = GetDlgItem(startupdlg, WIN_STARTWIN_TABCTL); tab = GetDlgItem(startupdlg, WIN_STARTWIN_TABCTL);
cur = (int)SendMessage(tab, TCM_GETCURSEL,0,0); cur = (int)SendMessage(tab, TCM_GETCURSEL,0,0);
ShowWindow(pages[cur],SW_HIDE); ShowWindow(pages[cur],SW_HIDE);
SendMessage(tab, TCM_SETCURSEL, n, 0); SendMessage(tab, TCM_SETCURSEL, n, 0);
ShowWindow(pages[n],SW_SHOW); ShowWindow(pages[n],SW_SHOW);
mode = n; mode = n;
SetFocus(GetDlgItem(startupdlg, WIN_STARTWIN_TABCTL)); SetFocus(GetDlgItem(startupdlg, WIN_STARTWIN_TABCTL));
} }
static void EnableConfig(int n) static void EnableConfig(int n)
{ {
//EnableWindow(GetDlgItem(startupdlg, WIN_STARTWIN_CANCEL), n); //EnableWindow(GetDlgItem(startupdlg, WIN_STARTWIN_CANCEL), n);
EnableWindow(GetDlgItem(startupdlg, WIN_STARTWIN_START), n); EnableWindow(GetDlgItem(startupdlg, WIN_STARTWIN_START), n);
EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCFULLSCREEN), n); EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCFULLSCREEN), n);
EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCVMODE), n); EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCVMODE), n);
EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCINPUTMOUSE), n); EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCINPUTMOUSE), n);
EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCINPUTJOY), n); EnableWindow(GetDlgItem(pages[TAB_CONFIG], IDCINPUTJOY), n);
EnableWindow(GetDlgItem(pages[TAB_GAME], IDGDATA), n); EnableWindow(GetDlgItem(pages[TAB_GAME], IDGDATA), n);
} }
static INT_PTR CALLBACK startup_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) static INT_PTR CALLBACK startup_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{ {
static HBITMAP hbmp = NULL; static HBITMAP hbmp = NULL;
HDC hdc; HDC hdc;
switch (uMsg) { switch (uMsg) {
case WM_INITDIALOG: { case WM_INITDIALOG: {
HWND hwnd; HWND hwnd;
RECT r, rdlg, chrome, rtab, rcancel, rstart; RECT r, rdlg, chrome, rtab, rcancel, rstart;
int xoffset = 0, yoffset = 0; int xoffset = 0, yoffset = 0;
// Fetch the positions (in screen coordinates) of all the windows we need to tweak // Fetch the positions (in screen coordinates) of all the windows we need to tweak
ZeroMemory(&chrome, sizeof(chrome)); ZeroMemory(&chrome, sizeof(chrome));
AdjustWindowRect(&chrome, GetWindowLong(hwndDlg, GWL_STYLE), FALSE); AdjustWindowRect(&chrome, GetWindowLong(hwndDlg, GWL_STYLE), FALSE);
GetWindowRect(hwndDlg, &rdlg); GetWindowRect(hwndDlg, &rdlg);
GetWindowRect(GetDlgItem(hwndDlg, WIN_STARTWIN_TABCTL), &rtab); GetWindowRect(GetDlgItem(hwndDlg, WIN_STARTWIN_TABCTL), &rtab);
GetWindowRect(GetDlgItem(hwndDlg, WIN_STARTWIN_CANCEL), &rcancel); GetWindowRect(GetDlgItem(hwndDlg, WIN_STARTWIN_CANCEL), &rcancel);
GetWindowRect(GetDlgItem(hwndDlg, WIN_STARTWIN_START), &rstart); GetWindowRect(GetDlgItem(hwndDlg, WIN_STARTWIN_START), &rstart);
// Knock off the non-client area of the main dialogue to give just the client area // Knock off the non-client area of the main dialogue to give just the client area
rdlg.left -= chrome.left; rdlg.top -= chrome.top; rdlg.left -= chrome.left; rdlg.top -= chrome.top;
rdlg.right -= chrome.right; rdlg.bottom -= chrome.bottom; rdlg.right -= chrome.right; rdlg.bottom -= chrome.bottom;
// Translate them to client-relative coordinates wrt the main dialogue window // Translate them to client-relative coordinates wrt the main dialogue window
rtab.right -= rtab.left - 1; rtab.bottom -= rtab.top - 1; rtab.right -= rtab.left - 1; rtab.bottom -= rtab.top - 1;
rtab.left -= rdlg.left; rtab.top -= rdlg.top; rtab.left -= rdlg.left; rtab.top -= rdlg.top;
rcancel.right -= rcancel.left - 1; rcancel.bottom -= rcancel.top - 1; rcancel.right -= rcancel.left - 1; rcancel.bottom -= rcancel.top - 1;
rcancel.left -= rdlg.left; rcancel.top -= rdlg.top; rcancel.left -= rdlg.left; rcancel.top -= rdlg.top;
rstart.right -= rstart.left - 1; rstart.bottom -= rstart.top - 1; rstart.right -= rstart.left - 1; rstart.bottom -= rstart.top - 1;
rstart.left -= rdlg.left; rstart.top -= rdlg.top; rstart.left -= rdlg.left; rstart.top -= rdlg.top;
// And then convert the main dialogue coordinates to just width/length // And then convert the main dialogue coordinates to just width/length
rdlg.right -= rdlg.left - 1; rdlg.bottom -= rdlg.top - 1; rdlg.right -= rdlg.left - 1; rdlg.bottom -= rdlg.top - 1;
rdlg.left = 0; rdlg.top = 0; rdlg.left = 0; rdlg.top = 0;
// Load the bitmap into the bitmap control and fetch its dimensions // Load the bitmap into the bitmap control and fetch its dimensions
hbmp = LoadBitmap((HINSTANCE)win_gethinstance(), MAKEINTRESOURCE(RSRC_BMP)); hbmp = LoadBitmap((HINSTANCE)win_gethinstance(), MAKEINTRESOURCE(RSRC_BMP));
hwnd = GetDlgItem(hwndDlg,WIN_STARTWIN_BITMAP); hwnd = GetDlgItem(hwndDlg,WIN_STARTWIN_BITMAP);
SendMessage(hwnd, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hbmp); SendMessage(hwnd, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hbmp);
GetClientRect(hwnd, &r); GetClientRect(hwnd, &r);
xoffset = r.right; xoffset = r.right;
yoffset = r.bottom - rdlg.bottom; yoffset = r.bottom - rdlg.bottom;
// Shift and resize the controls that require it // Shift and resize the controls that require it
rtab.left += xoffset; rtab.bottom += yoffset; rtab.left += xoffset; rtab.bottom += yoffset;
rcancel.left += xoffset; rcancel.top += yoffset; rcancel.left += xoffset; rcancel.top += yoffset;
rstart.left += xoffset; rstart.top += yoffset; rstart.left += xoffset; rstart.top += yoffset;
rdlg.right += xoffset; rdlg.right += xoffset;
rdlg.bottom += yoffset; rdlg.bottom += yoffset;
// Move the controls to their new positions // Move the controls to their new positions
MoveWindow(GetDlgItem(hwndDlg, WIN_STARTWIN_TABCTL), rtab.left, rtab.top, rtab.right, rtab.bottom, FALSE); MoveWindow(GetDlgItem(hwndDlg, WIN_STARTWIN_TABCTL), rtab.left, rtab.top, rtab.right, rtab.bottom, FALSE);
MoveWindow(GetDlgItem(hwndDlg, WIN_STARTWIN_CANCEL), rcancel.left, rcancel.top, rcancel.right, rcancel.bottom, FALSE); MoveWindow(GetDlgItem(hwndDlg, WIN_STARTWIN_CANCEL), rcancel.left, rcancel.top, rcancel.right, rcancel.bottom, FALSE);
MoveWindow(GetDlgItem(hwndDlg, WIN_STARTWIN_START), rstart.left, rstart.top, rstart.right, rstart.bottom, FALSE); MoveWindow(GetDlgItem(hwndDlg, WIN_STARTWIN_START), rstart.left, rstart.top, rstart.right, rstart.bottom, FALSE);
// Move the main dialogue to the centre of the screen // Move the main dialogue to the centre of the screen
hdc = GetDC(NULL); hdc = GetDC(NULL);
rdlg.left = (GetDeviceCaps(hdc, HORZRES) - rdlg.right) / 2; rdlg.left = (GetDeviceCaps(hdc, HORZRES) - rdlg.right) / 2;
rdlg.top = (GetDeviceCaps(hdc, VERTRES) - rdlg.bottom) / 2; rdlg.top = (GetDeviceCaps(hdc, VERTRES) - rdlg.bottom) / 2;
ReleaseDC(NULL, hdc); ReleaseDC(NULL, hdc);
MoveWindow(hwndDlg, rdlg.left + chrome.left, rdlg.top + chrome.left, MoveWindow(hwndDlg, rdlg.left + chrome.left, rdlg.top + chrome.left,
rdlg.right + (-chrome.left+chrome.right), rdlg.bottom + (-chrome.top+chrome.bottom), TRUE); rdlg.right + (-chrome.left+chrome.right), rdlg.bottom + (-chrome.top+chrome.bottom), TRUE);
// Add tabs to the tab control // Add tabs to the tab control
{ {
TCITEM tab; TCITEM tab;
hwnd = GetDlgItem(hwndDlg, WIN_STARTWIN_TABCTL); hwnd = GetDlgItem(hwndDlg, WIN_STARTWIN_TABCTL);
ZeroMemory(&tab, sizeof(tab)); ZeroMemory(&tab, sizeof(tab));
tab.mask = TCIF_TEXT; tab.mask = TCIF_TEXT;
tab.pszText = TEXT("Configuration"); tab.pszText = TEXT("Configuration");
SendMessage(hwnd, TCM_INSERTITEM, (WPARAM)TAB_CONFIG, (LPARAM)&tab); SendMessage(hwnd, TCM_INSERTITEM, (WPARAM)TAB_CONFIG, (LPARAM)&tab);
tab.mask = TCIF_TEXT; tab.mask = TCIF_TEXT;
tab.pszText = TEXT("Game"); tab.pszText = TEXT("Game");
SendMessage(hwnd, TCM_INSERTITEM, (WPARAM)TAB_GAME, (LPARAM)&tab); SendMessage(hwnd, TCM_INSERTITEM, (WPARAM)TAB_GAME, (LPARAM)&tab);
tab.mask = TCIF_TEXT; tab.mask = TCIF_TEXT;
tab.pszText = TEXT("Messages"); tab.pszText = TEXT("Messages");
SendMessage(hwnd, TCM_INSERTITEM, (WPARAM)TAB_MESSAGES, (LPARAM)&tab); SendMessage(hwnd, TCM_INSERTITEM, (WPARAM)TAB_MESSAGES, (LPARAM)&tab);
// Work out the position and size of the area inside the tab control for the pages // Work out the position and size of the area inside the tab control for the pages
ZeroMemory(&r, sizeof(r)); ZeroMemory(&r, sizeof(r));
GetClientRect(hwnd, &r); GetClientRect(hwnd, &r);
SendMessage(hwnd, TCM_ADJUSTRECT, FALSE, (LPARAM)&r); SendMessage(hwnd, TCM_ADJUSTRECT, FALSE, (LPARAM)&r);
r.right -= r.left-1; r.right -= r.left-1;
r.bottom -= r.top-1; r.bottom -= r.top-1;
r.top += rtab.top; r.top += rtab.top;
r.left += rtab.left; r.left += rtab.left;
// Create the pages and position them in the tab control, but hide them // Create the pages and position them in the tab control, but hide them
pages[TAB_CONFIG] = CreateDialog((HINSTANCE)win_gethinstance(), pages[TAB_CONFIG] = CreateDialog((HINSTANCE)win_gethinstance(),
MAKEINTRESOURCE(WIN_STARTWINPAGE_CONFIG), hwndDlg, ConfigPageProc); MAKEINTRESOURCE(WIN_STARTWINPAGE_CONFIG), hwndDlg, ConfigPageProc);
pages[TAB_GAME] = CreateDialog((HINSTANCE)win_gethinstance(), pages[TAB_GAME] = CreateDialog((HINSTANCE)win_gethinstance(),
MAKEINTRESOURCE(WIN_STARTWINPAGE_GAME), hwndDlg, GamePageProc); MAKEINTRESOURCE(WIN_STARTWINPAGE_GAME), hwndDlg, GamePageProc);
pages[TAB_MESSAGES] = GetDlgItem(hwndDlg, WIN_STARTWIN_MESSAGES); pages[TAB_MESSAGES] = GetDlgItem(hwndDlg, WIN_STARTWIN_MESSAGES);
SetWindowPos(pages[TAB_CONFIG], hwnd,r.left,r.top,r.right,r.bottom,SWP_HIDEWINDOW); SetWindowPos(pages[TAB_CONFIG], hwnd,r.left,r.top,r.right,r.bottom,SWP_HIDEWINDOW);
SetWindowPos(pages[TAB_GAME], hwnd,r.left,r.top,r.right,r.bottom,SWP_HIDEWINDOW); SetWindowPos(pages[TAB_GAME], hwnd,r.left,r.top,r.right,r.bottom,SWP_HIDEWINDOW);
SetWindowPos(pages[TAB_MESSAGES], hwnd,r.left,r.top,r.right,r.bottom,SWP_HIDEWINDOW); SetWindowPos(pages[TAB_MESSAGES], hwnd,r.left,r.top,r.right,r.bottom,SWP_HIDEWINDOW);
// Tell the editfield acting as the console to exclude the width of the scrollbar // Tell the editfield acting as the console to exclude the width of the scrollbar
GetClientRect(pages[TAB_MESSAGES],&r); GetClientRect(pages[TAB_MESSAGES],&r);
r.right -= GetSystemMetrics(SM_CXVSCROLL)+4; r.right -= GetSystemMetrics(SM_CXVSCROLL)+4;
r.left = r.top = 0; r.left = r.top = 0;
SendMessage(pages[TAB_MESSAGES], EM_SETRECTNP,0,(LPARAM)&r); SendMessage(pages[TAB_MESSAGES], EM_SETRECTNP,0,(LPARAM)&r);
// Set a tab stop in the game data listbox // Set a tab stop in the game data listbox
{ {
DWORD tabs[1] = { 150 }; DWORD tabs[1] = { 150 };
ListBox_SetTabStops(GetDlgItem(pages[TAB_GAME], IDGDATA), 1, tabs); ListBox_SetTabStops(GetDlgItem(pages[TAB_GAME], IDGDATA), 1, tabs);
} }
SetFocus(GetDlgItem(hwndDlg, WIN_STARTWIN_START)); SetFocus(GetDlgItem(hwndDlg, WIN_STARTWIN_START));
SetWindowText(hwndDlg, apptitle); SetWindowText(hwndDlg, apptitle);
} }
return FALSE; return FALSE;
} }
case WM_NOTIFY: { case WM_NOTIFY: {
LPNMHDR nmhdr = (LPNMHDR)lParam; LPNMHDR nmhdr = (LPNMHDR)lParam;
int cur; int cur;
if (nmhdr->idFrom != WIN_STARTWIN_TABCTL) break; if (nmhdr->idFrom != WIN_STARTWIN_TABCTL) break;
cur = (int)SendMessage(nmhdr->hwndFrom, TCM_GETCURSEL,0,0); cur = (int)SendMessage(nmhdr->hwndFrom, TCM_GETCURSEL,0,0);
switch (nmhdr->code) { switch (nmhdr->code) {
case TCN_SELCHANGING: { case TCN_SELCHANGING: {
if (cur < 0 || !pages[cur]) break; if (cur < 0 || !pages[cur]) break;
ShowWindow(pages[cur],SW_HIDE); ShowWindow(pages[cur],SW_HIDE);
return TRUE; return TRUE;
} }
case TCN_SELCHANGE: { case TCN_SELCHANGE: {
if (cur < 0 || !pages[cur]) break; if (cur < 0 || !pages[cur]) break;
ShowWindow(pages[cur],SW_SHOW); ShowWindow(pages[cur],SW_SHOW);
return TRUE; return TRUE;
} }
} }
break; break;
} }
case WM_CLOSE: case WM_CLOSE:
if (mode == TAB_CONFIG) done = 0; if (mode == TAB_CONFIG) done = 0;
else quitevent++; else quitevent++;
return TRUE; return TRUE;
case WM_DESTROY: case WM_DESTROY:
if (hbmp) { if (hbmp) {
DeleteObject(hbmp); DeleteObject(hbmp);
hbmp = NULL; hbmp = NULL;
} }
if (pages[TAB_GAME]) { if (pages[TAB_GAME]) {
DestroyWindow(pages[TAB_GAME]); DestroyWindow(pages[TAB_GAME]);
pages[TAB_GAME] = NULL; pages[TAB_GAME] = NULL;
} }
if (pages[TAB_CONFIG]) { if (pages[TAB_CONFIG]) {
DestroyWindow(pages[TAB_CONFIG]); DestroyWindow(pages[TAB_CONFIG]);
pages[TAB_CONFIG] = NULL; pages[TAB_CONFIG] = NULL;
} }
startupdlg = NULL; startupdlg = NULL;
return TRUE; return TRUE;
case WM_COMMAND: case WM_COMMAND:
switch (LOWORD(wParam)) { switch (LOWORD(wParam)) {
case WIN_STARTWIN_CANCEL: case WIN_STARTWIN_CANCEL:
if (mode == TAB_CONFIG) done = 0; if (mode == TAB_CONFIG) done = 0;
else quitevent++; else quitevent++;
return TRUE; return TRUE;
case WIN_STARTWIN_START: done = 1; return TRUE; case WIN_STARTWIN_START: done = 1; return TRUE;
} }
return FALSE; return FALSE;
case WM_CTLCOLORSTATIC: case WM_CTLCOLORSTATIC:
if ((HWND)lParam == pages[TAB_MESSAGES]) if ((HWND)lParam == pages[TAB_MESSAGES])
return (BOOL)GetSysColorBrush(COLOR_WINDOW); return (BOOL)GetSysColorBrush(COLOR_WINDOW);
break; break;
default: break; default: break;
} }
return FALSE; return FALSE;
} }
int startwin_open(void) int startwin_open(void)
{ {
INITCOMMONCONTROLSEX icc; INITCOMMONCONTROLSEX icc;
if (startupdlg) return 1; if (startupdlg) return 1;
icc.dwSize = sizeof(icc); icc.dwSize = sizeof(icc);
icc.dwICC = ICC_TAB_CLASSES; icc.dwICC = ICC_TAB_CLASSES;
InitCommonControlsEx(&icc); InitCommonControlsEx(&icc);
startupdlg = CreateDialog((HINSTANCE)win_gethinstance(), MAKEINTRESOURCE(WIN_STARTWIN), NULL, startup_dlgproc); startupdlg = CreateDialog((HINSTANCE)win_gethinstance(), MAKEINTRESOURCE(WIN_STARTWIN), NULL, startup_dlgproc);
if (startupdlg) { if (startupdlg) {
SetPage(TAB_MESSAGES); SetPage(TAB_MESSAGES);
EnableConfig(0); EnableConfig(0);
return 0; return 0;
} }
return -1; return -1;
} }
int startwin_close(void) int startwin_close(void)
{ {
if (!startupdlg) return 1; if (!startupdlg) return 1;
DestroyWindow(startupdlg); DestroyWindow(startupdlg);
startupdlg = NULL; startupdlg = NULL;
return 0; return 0;
} }
int startwin_puts(const char *buf) int startwin_puts(const char *buf)
{ {
const char *p = NULL, *q = NULL; const char *p = NULL, *q = NULL;
char workbuf[1024]; char workbuf[1024];
static int newline = 0; static int newline = 0;
int curlen, linesbefore, linesafter; int curlen, linesbefore, linesafter;
HWND edctl; HWND edctl;
int vis; int vis;
if (!startupdlg) return 1; if (!startupdlg) return 1;
edctl = pages[TAB_MESSAGES]; edctl = pages[TAB_MESSAGES];
if (!edctl) return -1; if (!edctl) return -1;
vis = ((int)SendMessage(GetDlgItem(startupdlg, WIN_STARTWIN_TABCTL), TCM_GETCURSEL,0,0) == TAB_MESSAGES); vis = ((int)SendMessage(GetDlgItem(startupdlg, WIN_STARTWIN_TABCTL), TCM_GETCURSEL,0,0) == TAB_MESSAGES);
if (vis) SendMessage(edctl, WM_SETREDRAW, FALSE,0); if (vis) SendMessage(edctl, WM_SETREDRAW, FALSE,0);
curlen = SendMessage(edctl, WM_GETTEXTLENGTH, 0,0); curlen = SendMessage(edctl, WM_GETTEXTLENGTH, 0,0);
SendMessage(edctl, EM_SETSEL, (WPARAM)curlen, (LPARAM)curlen); SendMessage(edctl, EM_SETSEL, (WPARAM)curlen, (LPARAM)curlen);
linesbefore = SendMessage(edctl, EM_GETLINECOUNT, 0,0); linesbefore = SendMessage(edctl, EM_GETLINECOUNT, 0,0);
p = buf; p = buf;
while (*p) { while (*p) {
if (newline) { if (newline) {
SendMessage(edctl, EM_REPLACESEL, 0, (LPARAM)"\r\n"); SendMessage(edctl, EM_REPLACESEL, 0, (LPARAM)"\r\n");
newline = 0; newline = 0;
} }
q = p; q = p;
while (*q && *q != '\n') q++; while (*q && *q != '\n') q++;
memcpy(workbuf, p, q-p); memcpy(workbuf, p, q-p);
if (*q == '\n') { if (*q == '\n') {
if (!q[1]) { if (!q[1]) {
newline = 1; newline = 1;
workbuf[q-p] = 0; workbuf[q-p] = 0;
} else { } else {
workbuf[q-p] = '\r'; workbuf[q-p] = '\r';
workbuf[q-p+1] = '\n'; workbuf[q-p+1] = '\n';
workbuf[q-p+2] = 0; workbuf[q-p+2] = 0;
} }
p = q+1; p = q+1;
} else { } else {
workbuf[q-p] = 0; workbuf[q-p] = 0;
p = q; p = q;
} }
SendMessage(edctl, EM_REPLACESEL, 0, (LPARAM)workbuf); SendMessage(edctl, EM_REPLACESEL, 0, (LPARAM)workbuf);
} }
linesafter = SendMessage(edctl, EM_GETLINECOUNT, 0,0); linesafter = SendMessage(edctl, EM_GETLINECOUNT, 0,0);
SendMessage(edctl, EM_LINESCROLL, 0, linesafter-linesbefore); SendMessage(edctl, EM_LINESCROLL, 0, linesafter-linesbefore);
if (vis) SendMessage(edctl, WM_SETREDRAW, TRUE,0); if (vis) SendMessage(edctl, WM_SETREDRAW, TRUE,0);
return 0; return 0;
} }
int startwin_settitle(const char *str) int startwin_settitle(const char *str)
{ {
if (!startupdlg) return 1; if (!startupdlg) return 1;
SetWindowText(startupdlg, str); SetWindowText(startupdlg, str);
return 0; return 0;
} }
int startwin_idle(void *v) int startwin_idle(void *v)
{ {
if (!startupdlg || !IsWindow(startupdlg)) return 0; if (!startupdlg || !IsWindow(startupdlg)) return 0;
if (IsDialogMessage(startupdlg, (MSG*)v)) return 1; if (IsDialogMessage(startupdlg, (MSG*)v)) return 1;
return 0; return 0;
} }
extern char *duke3dgrp; extern char *duke3dgrp;
int startwin_run(void) int startwin_run(void)
{ {
MSG msg; MSG msg;
if (!startupdlg) return 1; if (!startupdlg) return 1;
done = -1; done = -1;
ScanGroups(); ScanGroups();
#ifdef JFAUD #ifdef JFAUD
EnumAudioDevs(&wavedevs, NULL, NULL); EnumAudioDevs(&wavedevs, NULL, NULL);
#endif #endif
SetPage(TAB_CONFIG); SetPage(TAB_CONFIG);
EnableConfig(1); EnableConfig(1);
settings.fullscreen = ScreenMode; settings.fullscreen = ScreenMode;
settings.xdim = ScreenWidth; settings.xdim = ScreenWidth;
settings.ydim = ScreenHeight; settings.ydim = ScreenHeight;
settings.bpp = ScreenBPP; settings.bpp = ScreenBPP;
settings.forcesetup = ForceSetup; settings.forcesetup = ForceSetup;
settings.usemouse = UseMouse; settings.usemouse = UseMouse;
settings.usejoy = UseJoystick; settings.usejoy = UseJoystick;
strncpy(settings.selectedgrp, duke3dgrp, BMAX_PATH); strncpy(settings.selectedgrp, duke3dgrp, BMAX_PATH);
PopulateForm(-1); PopulateForm(-1);
while (done < 0) { while (done < 0) {
switch (GetMessage(&msg, NULL, 0,0)) { switch (GetMessage(&msg, NULL, 0,0)) {
case 0: done = 1; break; case 0: done = 1; break;
case -1: return -1; case -1: return -1;
default: default:
if (IsWindow(startupdlg) && IsDialogMessage(startupdlg, &msg)) break; if (IsWindow(startupdlg) && IsDialogMessage(startupdlg, &msg)) break;
TranslateMessage(&msg); TranslateMessage(&msg);
DispatchMessage(&msg); DispatchMessage(&msg);
break; break;
} }
} }
SetPage(TAB_MESSAGES); SetPage(TAB_MESSAGES);
EnableConfig(0); EnableConfig(0);
if (done) { if (done) {
ScreenMode = settings.fullscreen; ScreenMode = settings.fullscreen;
ScreenWidth = settings.xdim; ScreenWidth = settings.xdim;
ScreenHeight = settings.ydim; ScreenHeight = settings.ydim;
ScreenBPP = settings.bpp; ScreenBPP = settings.bpp;
ForceSetup = settings.forcesetup; ForceSetup = settings.forcesetup;
UseMouse = settings.usemouse; UseMouse = settings.usemouse;
UseJoystick = settings.usejoy; UseJoystick = settings.usejoy;
duke3dgrp = settings.selectedgrp; duke3dgrp = settings.selectedgrp;
} }
if (wavedevs) { if (wavedevs) {
struct audioenumdev *d, *e; struct audioenumdev *d, *e;
free(wavedevs->drvs); free(wavedevs->drvs);
for (e=wavedevs->devs; e; e=d) { for (e=wavedevs->devs; e; e=d) {
d = e->next; d = e->next;
if (e->devs) free(e->devs); if (e->devs) free(e->devs);
free(e); free(e);
} }
free(wavedevs); free(wavedevs);
} }
return done; return done;
} }