Build 2675
SVN-
General
Fix the previous/next weapon events
SVN handles and Git names are merged into one person.
Fix the previous/next weapon events
With Clang, compile in GNU89 mode and fix clang detection in the Makefiles.
The default C99 mode is giving us linking errors from xdelta3.
Fix one ptr size mismatch and one format letter/arg mismatch on x86_64.
Fix cheats giving inventory items and their events.
Fix A_CheckEnemyTile() returning 1 for "fixed" sprites (see r1913).
Those sprites are usually decorative, and certainly not enemies!
Fix building xdelta3.o
WIP multiplayer changes, still completely broken.
Add xdelta3, required for some broken multiplayer updates I plan on committing later
Fix EVENT_CHECKTOUCHDAMAGE (the change to how events handle RETURN broke it)
Fix breakage of EVENT_WEAPKEYx after r2656
"Band-aid" fix for the issue with EDuke32 and Mapster32 visually locking up but continuing to run and play sounds after alt+tabbing away for a few seconds on Windows Vista/7. This may screw something else up, so please test thoroughly.
This should hopefully fix the disaster with events caused by my last couple of commits ;)
Fix a potential issue with nested event execution
Another one line DynamicTileMap[x] -> DYNAMICTILEMAP(x) change from Helix that got obliterated during svn change merging. Fixing this changes nothing in builds with DYNTILEREMAP_ENABLE defined, so this change isn't meaningful to anyone who isn't recompiling the game to work on a low memory device or something of that nature.
1 line fix for a change that accidentally got reverted when merging newer svn updates into an older local branch
Addition of 3 events:
EVENT_SOUND: triggered upon playback of any sound, this allows the "hard coded" sounds to be altered in a context-aware fashion instead of having to resort to clunky hacks like replacing them with a blank sound effect. RETURN var iable is set to the sound effect # of the sound to be played, or -1 to cancel playback. EVENT_CHECKTOUCHDAMAGE: triggered in P_CheckTouchDamage() whenever the player collides with anything. Value of RET URN is set to the result provided by clipmove() and so can be decoded in the same way. Value of RETURN when the event is over can also be manipulated to control some of the hard coded damage effects. EVENT_CHECKFLOORDAMAGE: triggered in P_CheckFloorDamage(), RETURN is simply the picnum of the floor of the sector t he player is in. Can be used to cancel hard coded floor damage effects or to make other tiles exhibit the same eff ects Other misc fixes and cleanups, including a possible workaround for Duke Plus SECTOREFFECTOR light issues wherein all SE49 and SE50 that have a statnum of STAT_EFFECTOR are simply changed to STAT_LIGHT during the STAT_EFFECTOR loop now.
Add tilenum bound check to CON *actor blocks when parsing, fix the other ones.
The remaining checks now "continue;" when an oob tilenum is found where an oob access would ensue else. Also, it's now checked for negative numbers (the message remains the same though).
Assign light SEs (lotags 49 and 50) to an exclusive status number. EXPERIMENTAL!
The primary reason for doing this is that handing of moving sectors is significantly simplified. Because moving sectors usually don't move containing SEs/effector-statnum sprites, no special handing code is needed to move light SEs with them. Thus, this commit sets light SEs to a new statnum when they're spawned *from premap*, and a new G_Move*-like function (called G_DoPolymerLights) is added to process every sprite in that status list. This should "fix" light SEs moving together with a variety of moving sectors, but CON programs expecting the old behavior may break, therefore this commit is marked as experimental. Additionally, a problem with the old implementation is identified: it seems like the correct functioning is dependent upon the order of processing between the sector movement effector and the light SE, so this makes it another good reason for the change. (A third one is that all lights can be processed with a per- statnum loop, but CON coders should not do this until the change is considered final).
A couple of misc. Wii changes.
- Make MAXXDIM and MAXYDIM macros be 860 and 490, respectively. tueidj says max. screen size is 848x480, but there are oob access bugs in the classic renderer when running with the maximum possible resolution - don't allocate additional sector/wall storage for Mapster (saves ~16k) - Add ud.config.UseJoystick = 1 in config.c, but make it conditional on Wii - remove one comment I no longer believe true, add one TODO comment
Prevent an (unlikely) integer overflow in neartag with huge switch sprites.
Tweak the conditions under which setbrightness() invalidates GL textures.
Previously, we checked whether the faded palette has changed (by way of CRC) and invalidated the textures then unless the preserve flags were set. This however could lead to wrongly invalidating them under unfortunate circumstances, e.g. basepal change from CON + tints at the same time before r2620 which reverted r2232. Now, only invalidate them if the corresponding preserve flags are clear AND * the base palette has really changed OR * the palette CRC changed and we were running on software gamma The latter means that performance-killing invalidations may still happen on GL platforms lacking HW gamma (for ATI, it's currently only disabled in 8-bit fullscreen). Also have a new global 'basepalreset' to fake a basepal change for setbrightness(), currently used when changing renderers so that going from Polymer to Polymost and back again will invalidate the Polymer textures on the second change, potentially re-applying a basepal highpal. (Still with me?)
Remove code that worked around a (wrongly) not set have_ATI variable.
This was fixed with the preceding change; software mode will now always use software gamma if an ATI/AMD card is detected.
Patch adding Wii support by tueidj, part 10: sound and endianness changes
This part is a mixture of the original patch and my changes. It seems like tueidj had some trouble 1) getting OGG to work, which is why it's conditionally compiled out 2) struggling with endianness with the mixing routines? This may be also due to him missing to define two others BIGENDIAN macros (our code is in need of cleanup there). Note the change in jaudiolib/src/mix.c! Because I added my share to this part, I might have actually broken sound mixing on big-endian platforms.
Patch adding Wii support by tueidj, part 6: mutexes
For the Wii, SDL's mutex functionality is used. The implementation in the original patch was wrong though, so this part required non-trivial changes.
Patch adding Wii support by tueidj, part 4: joystick support
- sdlayer.c: custom "get joystick button names" routine - jmact/mouse.c: packs some joystick events into the value returned by MOUSE_GetButtons(): bits used are 256, 512, 4096, 8192 - MOUSE_Init() --> Mouse_Init(), presumably because of a name clash? - comments out right-shift of joystick analog values by 5, maybe this fixes the scale problems with the joystick on the PC too?
Revert r2232, "don't reset full-screen tint on basepal change" in CON setgamepalette.
Because gltexinvalidate*() could be called too often when setgamepalette is used while having a tint overlaid else. Pending thorough analysis/reworking of the 32-bit mode base palette handling / texture invalidation.
Fix 'realloc' routine of GL texture name (id) debugging code.
Lunatic translator: nearing syntax completion while treading in murky waters.
- bump lpeg stack limit to 1024 (hack) for long if/if/if...else chains - lexical: newline, EOF and whitespace; "bad" identifiers; hex literals, newline terminated strings (allow empty string) - syntax: allow nesting of array expressions, it's easier than special-casing; handle issues with structs expecting parm2 (hackish); userdef; switch/case/default - fix parsing some commands; mind prefixes! - frontend: if failing match, print last keyword and its position; warn on "bad" identifiers (one per such); batch processing from command line - Files that locate finds from my linux box now pass (except where there are really syntax errors).