The current screen job implementation does not coexist well with UI elements.
More like a hotfix, the screen job framework needs to be redone for properly handling input.
* Initial implementation from d32dcd5f8e was not working properly and already had some workarounds for when the player was underwater, etc.
* Re-read implementation in GDX and rebased off of it.
* Fixes#303.
Parts of the sound system treat entry 0 as "no sound" so nothing placed there would play.
This made the one custom sound in "The Way of Ira" not play because as the last sound being defined it ended up in the first, invalid slot.
0 means 'default', -1 means 'silent'. This caused playback issues for useSoundGen. All other places were passing proper volume values along, this is the only one to read the volume from map data.
Blood needs this for its PlayerSound controller, which is run right on map load - so without this it wouldn't start the sound when a map is initiated from the console.
Aside from not having been functional, this is ultimately more harmful than useful as it forces loading of a large number of textures at the same time during gameplay instead of spreading them out.
* made it palette aware
* use backend facilities to track precached data.
* fixes bug in animation precaching loops - they only precached the base index over and over again.
This was incomplete and just ignored Duke's special music, and the levelnum generation used an outdated formula so that it never managed to assign any music to the maps.
This works as long as the loaded mods have one single .ini file in them - in that case it is assumed that it is supposed to replace blood.ini, which will allow dragging & dropping such archives without further user intervention.
Fix undefined behavior/potential OOB access in ST_21_FLOOR_DOOR. g_AnimateGoal does not take a sector number, it takes an animation index, and caps at 1024, not 4096.
The sound system may play sounds on them after their deletion - this resulted in undefined behavior. To ensure properly defined behavior the sprite needs to be retained at least as long as the sound controller may still need it - which cannot be reliably determined so it has to be kept around forever. This would be easier if the sound controller code had proper start and stop events instead of inferring what to do from secondary information.
Fixes#288.
After discovering yet another misbehaving place in the game I think it can be safely concluded that this is better left off unconditionally.
The only remaining place where this still gets checked is in nnexts, but I wouldn't expect this to work either.
Fixes#292
New names are:
REDNECKxx.ogg for Redneck Rampage
REDNECKRIDESxx.ogg for RR Rides Again.
SHADOWxx.ogg for Shadow Warrior.
The motivation here is to allow copying all this music to a single folder or .zip file and reference it from all games.
Fix bug when switching to another weapon from the spray while firing with primary fire won't switch to the new weapon. And telling Caleb not to put away his lighter if the spray is being switched to TNT.
Do not put away lighter after TNT is thrown if while throwing the weapon was switched already to spray.
Do not put away lighter if TNT was selected while throwing a spray can.
Fix next/prev weapon
The duplicate 'currentSprite' variable prevented it from doing anything.
Also cleaned up the interface a bit to avoid using a global variable for parameter passing.
Fixes#279
This reverts commit 4fcec5f6d3.
Functionality wasn't working properly, most players will never use it and care only for 100% originality. Was a nice idea, though.
# Conflicts:
# source/core/gamecvars.cpp
# source/games/sw/src/panel.cpp
It is totally unclear what happened here in the original code, but the info apparently never reached the place where it's being checked. BloodGDX just ignores it so we do now, too.
Turned out that the status bar's DrawGraphic cannot handle it with its coordinate hackery, this needs a separate, cleaner interface function that does not mess around with the pivot which needs to be passed unaltered to the backend to properly rotate around it
Using the palette to apply fog is just far too broken and cannot be kept in check with all the hacks the Build engine allows.
This only works if all elements on screen use the identity translation lookup which is basically never the case.
Real fog, on the other hand, can easily be applied to everything.
This one is most prominently noticeable in WW2GI's first map where blowing up a crack has no effect.
This must have happened when removing all those dangerous pointer to long casts that were so popular back in the bad old days.
Fixes#266
The original tiles are all 15 pixels tall, but depending on the games can vary in their true height, so use CheckRealHeight on them to get their true dimensions.
Fixes#250
There is a typo in the CON files that assigns EVENT_AIMUP and EVENT_AIMDOWN the same number. The source did not replicate this which caused several events to call the wrong handler.
Fixes#252
An int can't store a float, effectively truncating to 0 and not holding the 0.5. Thanks MJ :) .
Partially addresses #262 - The Torch icon bouncing in the HUD still remains.