Build 2977
SVN-
General
Fix "shooting" tripbombs from non-players such as the SE shooter.
Show details
Well, this never worked anyway, but invoking demons flying out of your nose is never a good idea.
SVN handles and Git names are merged into one person.
Fix "shooting" tripbombs from non-players such as the SE shooter.
Well, this never worked anyway, but invoking demons flying out of your nose is never a good idea.
Modify EVENT_CHANGEWEAPON so that it actually serves a purpose. Instead of being triggered before curr_weapon is changed, with nothing used for input or output with RETURN (meaning you could not cancel), now RETURN is set to the prospective new weapon ID and you can change it or cancel it in the event.
Note that since setting RETURN did nothing before, there is no backwards compatibility to uphold. Therefore, setting RETURN to 1 will cause the pistol to be selected, not disable the event. Set RETURN to -1 to cancel switching.
Expand "Switch weapons on pickup" to three options: "Off", "All weapons", and a new one, "Fav priority". It switches to the weapon you have just picked up only if it is ranked higher in the favorite weapon hierarchy using the "-u" parameter.
Suggested at: http://forums.duke4.net/topic/5667-tiny-request/
The Build tools no longer link with SDL or SDL_mixer because they don't need to.
Add EVENT_PREGAME. Now all sprites are processed in the following fashion:
1. EVENT_PREGAME 2. hardcoded stuff 3. EVENT_GAME One potential use is to examine values which are clobbered by commands such as ifhitweapon/ifwasweapon.
Disable questionable lines from Makefile.common that were causing my build system to deep crash.
Quit the game if SE17 (warp elevator) setup fails.
The spawn-time SE 17 setup uses nextsectorneighborz() which can fail (return -1) on some circumstances and would cause an OOB sector[] access.
Replace some literal numbers denoting SEs/STs by symbolic enumeration values.
engine.c: rewrite nextsectorneighborz() for clarity.
build.lua map loader: add the option of canonicalizing sprite order.
This is mostly for debugging, since currently, Mapster32 restores sprites not in the same order as the original sprite index order. Also, expose this option from map2text.lua and mapdiff.sh.
foreachmap.lua: add -e"some code..." switch to execute code from the cmdline.
On Linux build without startup GUI, don't save ModDir to config.
A couple of trivial changes.
Fix stack corruption when demo was attempted to be written with non-empty mod dir.
If r_screenaspect is 0 (or any other invalid value), assume square pixel aspect.
osxbuild.sh: add 'debughelix' preset, building only x64 debug packages.
Pack how many players fake multi was started with into g_fakeMultiMode.
don't wrongly change pitch for sounds originating from 2nd player.
For example, if the first one is underwater.
tweak base palette application, remove resp. code from splitscr.con.
Basically, base palettes with lower indices trump higher ones. For example, when one player is underwater and the other above, the normal palette takes precedence.
Generalize fullscreen tint application to more than one tint.
Currently, the only kinds of tint that can be applied simultaneously are one "palfrom" per player, plus one loogie tint per player. Each palfrom still overrides the preceding one. However, this is not a big problem IMO since palfroms decrease at the same rate (loogie tint decreases at half the speed). This change is especially good for the splitscreen mod, since now the tints of the two players won't compete with each other. See the comment in the source for some properties of the blending formula.
Don't clear loogie tint transiently on changing palette.
Make a colored REACTOR/REACTOR2 sprite disappear in single player again.
Noted by Nukey. See Duke3D 1.5 GAME.C line 4220.
print "reserved" quotes in the upper half of the screen.
Reverved quotes are ones like "Killed by xxx". Since they're only shown for the first player for now, printing them in the upper part makes more sense (in above/below split, the first player is above).
tweak weapon selection to do the expected thing for shrinker/grower.
Print quotes for both players in fake multi, remove quote code in splitscr.con.
game.c: clean up G_PrintGameText() a little.
game.c: clean up G_PrintGameQuotes().
handle crosshairs for above/below split and regard crosshairscale.
support for above/below screen split.
To enable it, the HUD-less (maximized) screen size must be selected.
Fix two "may be used uninitialized" warnings (they can't, as far as I can see).
fake multi: don't display name when aiming at opponents.
Fake multi: fix display of item percentage and on/off states.
Display the firsts-when-shrunk hud-weaponscaled, tweak for fake multi.
Make the scuba HUD be affected by hud_weaponscale, tweak for fake multi.
player.c: In G_DrawTileScaled, lose bit 1024 (prior to r1658, bit 256).
I checked all direct and transitive uses of that function and am fairly confident that it is never used.
Introduce additional rotatesprite bit for internal use and mask ext. ones from CON.
ROTATESPRITE_MAX is moved to build.h and all orientation bits from CON commands using rotatesprite are ANDed with (ROTATESPRITE_MAX-1). Some of the functions use ROTATESPRITE_MAX for different internal purposes, which will not be exposed to CON now (a good thing). Also, dorotspr_handle_bit2 is made clearer.
Clean up a couple of rotatesprite uses.
The black translucent background underneath the user map list will now be drawn with a shade 32 tile 0 instead of tile BLANK, since I've seen the latter being replaced in some mod. Also, it will look the same regardless of screen aspect.
Restucture dorotspr_handle_bit2().
This also fixes the OSD with aspects < 4/3. I broke that, too.
Always draw the full original status bar fully instead of in patches.
It seems like I broke the blitty/patchy way of drawing it with one of the last commits.
OpenBSD build fix from Brad Smith (plus a couple of irrelevant changes to the same file from my local tree)
rewrite special weapons cycling, don't cycle to foot.
Redraw background when ud.screen_size >= 8, unconditional on ud.statusbarscale.
Classic HUD now has correct aspect in widescreen modes, so with the full status bar, there may be patches of free room left to the left and right.
In setaspect_new, determine the aspect with {x,y}dim again except for showview.
setaspect(), which is called by setaspect_new, already uses the *dimen variables, so it's the same thing done twice. Now, a change from the original full status bar to the original mini status bar keeps the horizontal FOV again and only bumps the view a little higher, as with the classic aspect determination.
Clear the screen first in some non-in-game places, also in classic.
Compare with revision 2584.
Factor out Polymost's widescreen bit handling code and use it in classic, too.
This means that classic and the GL modes now look the same as far as e.g. hud_bgstretch or HUD weapons are concerned.
in showview*, use new aspect determination if r_usenewaspect is 1.
in setaspect_new, determine the aspect with {x,y}dimen instead of {x,y}dim.
That is, use the view boundries instead of the whole screen.
Rewrite the EVENT_ANIMATESPRITES loop (G_DoEventAnimSprites calls) for clarity.
game.c: factor out 2 inst. of dup. code into G_DoEventAnimSprites().
Hack for fake multimode/splitscreen: also draw mirrors from showview*.
See the source for why this hack is ugly.
Text-repl.: hitinfo variables -> hit, hit{sprite,sect,wall} members -> no "hit"
This makes the code rather more readable in some places. Unlike the two preceding commits, this one is actually purely textual replacement.
Mass text replacement g_player[p].ps --> ps, part 2 (harder)
Functions affected are G_Move* in actors.c and A_Shoot in player.c. Here, the p variable had function scope, now it's redeclared in shorter blocks. I'm still relatively sure that no observable behavior was changed, though not as sure as in part 1. Also, some dead assignments and the like are eliminated.
Mass text replacement g_player[p].ps --> ps, part 1 (the easy one).
The p variable (sometimes named differently) has short scope in all cases, so I'm almost sure that the replacements amount to an identity transformation.
actors.c: factor out 4 instances of id. code (up to args) into nudge_player().
factor out addammo/addweapon{,var} common code, harden addweaponvar...
... against invalid weapon indices and arguments accessed from arrays/structs.
reflect the preceding rename in the sources.
Rename a certain file to appease Windows file systems.
implement a couple more 1.5 commands.
Fix tile CAMERA1+4 being not changed to a CAMERA1 on spawn.
Fix slimers not disappearing on dnmonsters cheat, display 2nd 'on' state.
add "extend all highlighted sectors" func to 'F menu via a.m32.
Clean up game.c and actors.c.
clean up handing of ac/mv internally, add control module.
cleanup
'bitar': rewrite ops for colon syntax, serialization, set ops.
sdlayer.c: Add high-resolution timer for OS X, using mach_absolute_time().
fix build on OS X, pass LUNATIC define to build/ sources.
fix hex literal parsing on Windows, add two comments.
add 'stat' module for running statistics.
Also, rewrite the mapastats iterator and the LIZTROOP hitscan timing in terms of that.
OSX build: mighty tweak osxbuild.sh and link to LibPNG from Fink on x86_64.
The build script now has two more presets: helix and installtools (which was previously attempted after the build; untested). Also, - when detecting git, run commands such that the SVN repo isn't accessed - package kextract, kgroup and arttool into tools/ in the zip - try to exit on failure in some places, though that doesn't seem to work
osxbuild.sh: factor out building commands and exit 1 on failure
on x86 GCC asm builds, fix crash with floor sprites of (x or y) size 2.
The idiv instruction also signals an FPE when the resulting *signed* quotient overflows, so we simply use div instead.