Commit graph

3171 commits

Author SHA1 Message Date
Christoph Oelckers
309cc57504 - removed all direct access to AWeapon's members to prepare moving this class fully to the script side.
Disregarding UI-side and setup-related calls there's unfortunately still 6 places in the native game code which require direct access.
2019-04-15 22:29:43 +02:00
Christoph Oelckers
ce5792242c - moved the 'Finalize' methods back into a single function in the parser code.
It has been like this initially but was changed when ZDoom gained an overly complicated polymorphic class descriptor object that required a lot of support code. All these complications have long been removed but these methods remained. Since they prevent a class from being moved to the script side entirely they had to be removed.

This was the last major blocker to make Weapon a purely scripted class, the only remaining native method is Serialize which is of no concern for the coming work.
2019-04-15 22:29:39 +02:00
Christoph Oelckers
7caa6a922d - moved MarkPrecacheSounds completely to the script side and added native support to make this a usable feature.
# Conflicts:
#	src/g_inventory/a_pickups.cpp
2019-04-15 22:29:35 +02:00
Christoph Oelckers
ac754b5e96 - some cleanup on the weapon slot interface.
This really shouldn't make any decisions from directly reading weapon class defaults.
2019-04-15 22:29:32 +02:00
Christoph Oelckers
f9dfdace16 - scriptified cht_Takeweaps. 2019-04-15 22:29:30 +02:00
Christoph Oelckers
94b0338c31 - scriptified ApplyKickback. 2019-04-15 22:29:26 +02:00
Christoph Oelckers
59bffe2f55 - scriptified A_WeaponReady and its subfunctions. 2019-04-15 22:29:22 +02:00
Christoph Oelckers
951ed466b3 - scriptified P_BobWeapon as a virtual function on PlayerPawn. 2019-04-15 22:29:19 +02:00
Christoph Oelckers
0515af2bd3 - removed the bot related properties from AWeapon.
This stuff is now kept locally in the bot code so that it doesn't infest the rest of the engine.
And please don't read the new botsupp.txt file as some new means to configure bots! This was merely done to get this data out of the way.
The bots are still broken beyond repair and virtually unusable, even if proper data is provided for all weapons.
2019-04-15 22:29:15 +02:00
Christoph Oelckers
681009e1ea - exported the blood spawning part of P_LineAttack as a virtual ZScript function. 2019-04-15 21:59:08 +02:00
Christoph Oelckers
82ffdd5e6b - moved the weapon selection logic to PlayerPawn as overridable virtual functions. 2019-04-15 21:59:07 +02:00
Christoph Oelckers
27c67716df - change teleport freeze handling to a player property plus virtual override on PlayerPawn for increased configurability.
# Conflicts:
#	src/g_inventory/a_pickups.cpp
2019-04-15 21:59:03 +02:00
Christoph Oelckers
7c1416cb6f - scriptified BecomeItem and BecomePickup
# Conflicts:
#	src/g_inventory/a_pickups.cpp
2019-04-15 21:59:01 +02:00
Christoph Oelckers
08059f718b - scriptified FilterCoopRespawnInventory. 2019-04-15 21:59:00 +02:00
Christoph Oelckers
1ecada388c - scriptified some simple sound functions. 2019-04-15 21:58:58 +02:00
Christoph Oelckers
d123230fb1 - scriptified APlayerPawn::Die and fixed a few things I encountered while doing it. 2019-04-15 21:58:56 +02:00
Christoph Oelckers
0eec8b293a - scriptified ModifyDropAmount as a virtual function hierarchy for Inventory and children. 2019-04-15 21:58:54 +02:00
Christoph Oelckers
f1c7815b16 - scriptified A_Explode and relatives. 2019-04-15 21:58:52 +02:00
Christoph Oelckers
e234d450aa - scriptified GetDefaultInventory. 2019-04-15 21:58:50 +02:00
Christoph Oelckers
864796a6a2 - removed MeleeWeapon flag from the tomed PhoenixRod and the fighterhammer.
In both cases, having this flag on will render the monster-backing-off-check for melee attacks ineffective because it would misinterpret these weapons as close range only - which they aren't. Even for the PhoenixRod the range is longer than what gets checked here.
As a consequence, the bot's check for missile shooting melee weapons has also become pointless because no such weapon is defined anymore.
2019-04-15 21:58:48 +02:00
Christoph Oelckers
beae232f83 - exported one FraggleScript function for testing. 2019-04-15 21:58:46 +02:00
Christoph Oelckers
c326c4c521 - exported a few more weapon handling functions so that the native GetDownState stub could be removed. 2019-04-15 21:58:45 +02:00
Christoph Oelckers
c1442fae0d - scriptified P_BringUpWeapon because this was the only native function still referencing AWeapon::GetReadyState. 2019-04-15 21:58:41 +02:00
Christoph Oelckers
8c2c888d82 - scriptified A_SpawnItem(Ex) and A_ThrowGrenade.
These were the last native functions referencing AWeapon::DepleteAmmo, so that function is now exclusively on the scripting side.
2019-04-15 21:58:39 +02:00
Christoph Oelckers
1b225588d1 - scriptified 3 more functions in stateprovider. 2019-04-15 21:58:37 +02:00
Christoph Oelckers
05e8a6c62d - scriptified A_RailAttack. 2019-04-15 21:58:35 +02:00
Christoph Oelckers
394d8e414f - scriptified A_CustomPunch 2019-04-15 21:58:33 +02:00
Christoph Oelckers
54ba5b4829 - scriptified A_FireProjectile 2019-04-15 21:58:31 +02:00
Christoph Oelckers
d99b46c861 - scriptified A_FireBullets and A_CustomBulletAttack. 2019-04-15 21:58:30 +02:00
Christoph Oelckers
4c7096ffac - started with a ScriptUtil class which will allow moving function implementations for ACS and FraggleScript to zscript.txt
So far 3 functions for testing implemented.

# Conflicts:
#	src/p_acs.cpp
2019-04-15 21:58:26 +02:00
Christoph Oelckers
1b6af10f38 - scriptified Weapon.CheckAmmo and Weapon.DepleteAmmo 2019-04-15 21:56:30 +02:00
Christoph Oelckers
9e6279ed5b - scriptified the rest of the morph code. 2019-04-15 21:56:28 +02:00
Christoph Oelckers
b886219f53 - scriptified P_MorphMonster. 2019-04-15 21:56:23 +02:00
Christoph Oelckers
d4ff49e110 - fixed message output. 2019-04-15 21:56:22 +02:00
Christoph Oelckers
02f785f794 - testing and cleanup of scripted morph code. 2019-04-15 21:56:20 +02:00
Christoph Oelckers
9b1e96262c - P_UndoPlayerMorph scriptified.
Not tested yet and still missing a new native interface.
2019-04-15 21:56:18 +02:00
Christoph Oelckers
395413fc9a - scriptified P_MorphPlayer and dependencies.
It still needs its counterpart scriptified as well before it can work.

# Conflicts:
#	src/gi.cpp
#	wadsrc/static/zscript/base.txt
2019-04-15 21:56:16 +02:00
Christoph Oelckers
f00892e06d - exported ADecal to ZScript as a non-native class.
Its one function is still native but this was by far the easiest of the remaining actor classes to export.
2019-04-15 16:09:05 +02:00
Christoph Oelckers
cb9c1f021c - generate register type info for the parameter lists of all functions.
Currently used for loading parameters into registers.
For checking parameters of native functions some more work is needed to get the info to the function. Currently it doesn't receive the function descriptor.
2019-04-15 15:52:22 +02:00
Christoph Oelckers
45f83636e9 - restored the old A_Jump prototype because DECORATE needs this to parse the arguments. 2019-04-15 15:48:34 +02:00
Christoph Oelckers
9456c877d4 - deconstruct A_Jump with multiple labels into A_Jump(chance, RandomPick(label1, label2, label3,...)) to remove this ugly special case from the VM calling convention.
This also adds the number of available choices to OP_IJMP.
2019-04-15 15:48:27 +02:00
Christoph Oelckers
7fe33d336c Avoid using argument count for any kind of decision making in native VM functions.
This allows retaining the functionality, even if for the JIT compiler's benefit all default arguments are pushed onto the stack instead of reading them from the defaults array.

# Conflicts:
#	src/r_data/r_sections.h
2019-04-15 14:37:28 +02:00
Player701
d72d820bba - Exported AActor::Grind to ZScript. 2018-11-30 10:18:43 +01:00
Christoph Oelckers
2540c9ee8f - cleaned up the sound options menu.
There were still some leftover definitions from FMod and far too many things were at the top level. Anything non-essential has been moved to the "Advanced Sound Options" submenu and the pointless sound backend switch has been removed entirely.
2018-11-30 10:17:27 +01:00
Player701
bc280f67ac - Fixed textures on the two switches that rise from the floor in the eastern area of TNT MAP31 2018-11-28 15:37:46 +01:00
Alexander
aa6820737a fixed spelling (mostly comments) 2018-11-28 15:37:45 +01:00
Alexander
c223a671a6 add monster tags (Friendly Names) for Hexen 2018-11-25 12:25:46 +01:00
Lucy Phipps
3c834c269a tnt1a0 is not a png 2018-11-25 12:25:45 +01:00
alexey.lysiuk
4020159f91 - made ZRock4 solid like in vanilla Hexen
9164cc6e0f/INFO.C (L5731)
c0c1771e37/src/hexen/info.c (L5748)

https://forum.zdoom.org/viewtopic.php?t=62660
2018-11-24 12:47:18 +01:00
Marisa Kirisame
9022c98732 expose defaultbloodcolor to ZScript. 2018-11-24 00:18:24 +01:00
Christoph Oelckers
a9cc7e6fb9 - changed PhosphorousFire.DoSpecialDamage to match SVE's handling:
* Everything with a damage factor for fire only uses that.
* Everything that bleeds takes half damage
* Robots take quarter damage.
2018-11-16 21:47:21 +01:00
Christoph Oelckers
af3635dfd9 - corrected A_DropFire for real, using the SVE source as reference. 2018-11-16 21:33:16 +01:00
Christoph Oelckers
91b4024bf2 - fixed: A_DropFire accidentally cleared the XF_HURTSOURCE flag by setting only XF_NOSPLASH. 2018-11-16 21:33:14 +01:00
Major Cooke
57efd617fa Changed A_RaiseActor to just RaiseActor. 2018-11-16 21:17:53 +01:00
Major Cooke
a083eb6421 Added A_RaiseActor(Actor other, int flags = 0) 2018-11-16 21:17:51 +01:00
Major Cooke
24fdaf751c Added CanResurrect(Actor other, bool passive)
- Works similarly to CanCollideWith.
- Passive means the caller is trying to be resurrected by 'other'.
- Non-passive means the caller is trying to resurrect 'other'.
2018-11-16 21:17:49 +01:00
Christoph Oelckers
4183615495 - added ZScript export for side_t::SetSpecialColor. 2018-11-16 21:17:45 +01:00
Christoph Oelckers
8368331481 - more options for Doom 64 style gradients on walls:
* Colors can npw be defined per sidedef, not only per sector.
* Gradients can be selectively disabled or vertically flipped per wall tier.
* Gradients can be clamped to their respective tier, i.e top and bottom of the tier, not the front sector defines where it starts.

The per-wall colors are implemented for hardware and softpoly renderer only, but not for the classic software renderer, because its code is far too scattered to do this efficiently.

# Conflicts:
#	src/hwrenderer/scene/hw_renderstate.h
#	src/hwrenderer/scene/hw_walls.cpp

# Conflicts:
#	src/gl/scene/gl_walls_draw.cpp
2018-11-16 21:16:15 +01:00
Major Cooke
be2d5ba9ec Added DMG_NO_ENHANCE for DamageMobj.
- Disables PowerDamage's effect, similar to DMG_NO_PROTECT disabling PowerProtect.
2018-11-12 22:04:17 +01:00
drfrag666
c2a3895bfe Revert "- add dithering to present shader"
This reverts commit 60ae0915b9.

This was extremely slow on intel, the dither matrix was recreated on every frame even when not used.
2018-11-12 11:11:28 +01:00
Major Cooke
b34bc0947e Added IsPointInMap(Vector3 p).
- Checks if a point is inside the map geometry or not.
2018-11-08 16:18:29 +01:00
Christoph Oelckers
eb47c8d4c2 - fixed typo with RNG name. 2018-11-08 00:18:08 +01:00
ZZYZX
7905a0e041 Exported destructible geometry to ZScript 2018-11-07 11:00:08 +01:00
ZZYZX
b581648d6f Destructible geometry - minor fixes and 3D floor support 2018-11-07 11:00:05 +01:00
Player701
4751181eb6 - Added a function to get the actor's age in ticks. 2018-11-05 01:38:37 +01:00
Player701
905146d87c - Added a new field to the Actor class which stores the amount of ticks passed since the game started on the moment the actor was spawned.
- Added a function to the Actor class to get its spawn time relative to the current level.
- Added spawn time information to the output of the "info" console command.
2018-11-05 01:38:35 +01:00
Cacodemon345
57e51debec Extend SKYEXPLODE flag for LineAttack 2018-11-03 21:52:25 +01:00
Christoph Oelckers
6daece72c9 - versioned the return mismatch check to demote it to a warning for older versions than 3.7.
# Conflicts:
#	wadsrc/static/zscript.txt
2018-11-02 13:31:10 +01:00
ZippeyKeys12
96fafa9c59 Export AllClasses 2018-11-02 13:07:12 +01:00
drfrag666
557380a769 - Added alpha parameter to DrawLine for the GL renderer, it's a fake parameter for the software renderer so mods don't crash. 2018-11-02 13:04:37 +01:00
Major Cooke
7eef13c859 Added VelIntercept.
- Uses the same code as Thing_ProjectileIntercept to aim and move the projectile.
  - targ: The actor the caller will aim at.
  - speed: Used for calculating the new angle/pitch and adjusts the speed accordingly. Default is -1 (current speed).
  - aimpitch: If true, aims the pitch in the travelling direction. Default is true.
  - oldvel: If true, does not replace the velocity with the specified speed. Default is false.

- Split the code from Thing_ProjectileIntercept and have that function call VelIntercept.
2018-11-01 21:25:56 +01:00
ZZYZX
a40d717006 Fixed sector floor/ceiling actions not triggering in P_XYMovement 2018-11-01 21:08:53 +01:00
ZZYZX
d2f6834da6 Implemented loading/saving of line/sector health and health groups in savegames 2018-11-01 21:08:51 +01:00
ZZYZX
82a2bf3ac5 Single commit - destructible geometry feature
# Conflicts:
#	src/p_setup.cpp
2018-11-01 21:02:25 +01:00
Christoph Oelckers
7d53d0d8ed - removed bad 'return' in C_MidPrint definition. 2018-11-01 20:03:26 +01:00
Marrub
0f6f23350d Add "neutral" gender option and better obit formatting 2018-10-31 11:24:01 +01:00
Rachael Alexanderson
f2f357bed0 - change 'other' gender to 'robotic' for English 2018-10-30 13:05:54 +01:00
Christoph Oelckers
eca23badb8 - added a compatibility fix for Hacx's MAP05.
This is by no means perfect and looks different than what was originally intended, but at least this doesn't totally fail to render properly with the OpenGL renderer.

# Conflicts:
#	wadsrc/static/zscript/level_compatibility.txt
2018-10-21 20:57:40 +02:00
Rachael Alexanderson
35bf70456a - fixed: attaching a new status bar to a player now calls 'setsizeneeded' - fixes an issue where the screen geometry is out of sync with the characteristics of the new status bar. 2018-10-20 21:22:24 +02:00
Magnus Norddahl
ae532d88ee - fix distance attenuation for PBR materials 2018-10-17 09:36:01 +02:00
Erick Tenorio
c2784e4b6b - Visually align Doom 2 MAP04 crusher floors
Use Transfer_Heights to fake floors on the crusher sectors
2018-10-16 20:50:53 +02:00
Erick Tenorio
3b432a99e8 -Fixed many IWAD mapping errors
# Conflicts:
#	wadsrc/static/zscript/level_compatibility.txt
2018-10-14 12:10:56 +02:00
player701
3e0ed1c907 - Fixed indentation 2018-10-14 10:31:47 +02:00
player701
dcc2006c76 - Exported PickNewWeapon function from PlayerPawn to ZScript. 2018-10-14 10:31:46 +02:00
Erick Tenorio
3bb5608435 Fix missing enemies in HTP-RAW.WAD MAP22
Make 100% kills possible on MAP22 of Hell to Pay
2018-10-09 22:00:02 +02:00
Magnus Norddahl
770c676ac9 - add gl_dither for toggling dithered output on and off
# Conflicts:
#	src/gl/renderer/gl_postprocess.cpp
#	src/gl/renderer/gl_stereo3d.cpp
#	src/hwrenderer/postprocessing/hw_presentshader.h
2018-10-09 21:57:14 +02:00
Rachael Alexanderson
5d7411dd56 - change 'halfstep' in the dither shader to a #define 2018-10-09 13:23:22 +02:00
Rachael Alexanderson
c784411b13 - expand the dither matrix from 4x4 to 8x8 2018-10-09 13:23:21 +02:00
Rachael Alexanderson
d5f71ad3ce - further math tweaks 2018-10-09 13:23:07 +02:00
Rachael Alexanderson
213b33de16 - fix up a bit of math on the dither shader 2018-10-09 13:22:54 +02:00
Magnus Norddahl
60ae0915b9 - add dithering to present shader 2018-10-09 13:22:31 +02:00
Rachael Alexanderson
787638ff5f - always enforce a minimum distance for fog when fogmode is set to standard. without this, it was possible for the GPU to error out and stop rendering pixels for certain screen blocks
# Conflicts:
#	wadsrc/static/shaders/glsl/main.fp
2018-10-09 11:56:41 +02:00
Erick Tenorio
1b97ba198b Fixes for Wraith Corporation WADs 2018-10-09 11:53:59 +02:00
Christoph Oelckers
1e48f240e0 - fixed potential null pointer access in Hexen's spike code. 2018-10-07 21:21:07 +02:00
Magnus Norddahl
811bd578cd - fix artifact in PCF filter when the texture coordinate wraps 2018-10-05 22:25:11 +02:00
Magnus Norddahl
33180fd4e8 - remove shadow acne from PCF shadowmap filter and add three quality levels 2018-10-05 10:20:02 +02:00
Vitaly Novichkov
72affb2c2e Upgrade libADLMIDI and libOPNMIDI
Added full-panning stereo, improvement of channel management, and many other things.

Also, I have implemented an ability to use custom WOPL (for libADLMIDI) and WOPN (for libOPNMIDI) banks from the same path as "soundfonts", but also, in the same environment, the "fm_banks" folder was added for WOPL/WOPN storing purposes.
To toggle usage of embedded or custom bank, I have added togglable booleans. When bank fails to be loaded, the default embedded bank is getting to be used as fallback.

ADLMIDI 1.4.0   2018-10-01
 * Implemented a full support for Portamento! (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)
 * Added support for SysEx event handling! (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)
 * Added support for GS way of custom drum channels (through SysEx events)
 * Ignore some NRPN events and lsb bank number when using GS standard (after catching of GS Reset SysEx call)
 * Added support for CC66-Sostenuto controller (Pedal hold of currently-pressed notes only while CC64 holds also all next notes)
 * Added support for CC67-SoftPedal controller (SoftPedal lowers the volume of notes played)
 * Fixed correctness of CMF files playing
 * Fixed unnecessary overuse of chip channels by blank notes
 * Added API to disable specific MIDI tracks or play one of MIDI tracks solo
 * Added support for more complex loop (loopStart=XX, loopEnd=0). Where XX - count of loops, or 0 - infinite. Nested loops are supported without of any limits.
 * Added working implementation of TMB's velocity offset
 * Added support for full-panning stereo option (Thanks to [Christopher Snowhill](https://github.com/kode54) for a work!)
 * Fixed inability to play high notes due physical tone frequency out of range on the OPL3 chip

OPNMIDI 1.4.0   2018-10-01
 * Implemented a full support for Portamento! (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)
 * Added support for SysEx event handling! (Thanks to [Jean Pierre Cimalando](https://github.com/jpcima) for a work!)
 * Added support for GS way of custom drum channels (through SysEx events)
 * Ignore some NRPN events and lsb bank number when using GS standard (after catching of GS Reset SysEx call)
 * Added support for CC66-Sostenuto controller (Pedal hold of currently-pressed notes only while CC64 holds also all next notes)
 * Added support for CC67-SoftPedal controller (SoftPedal lowers the volume of notes played)
 * Resolved a trouble which sometimes makes a junk noise sound and unnecessary overuse of chip channels
 * Volume models support taken from libADLMIDI has been adapted to OPN2's chip speficis
 * Fixed inability to play high notes due physical tone frequency out of range on the OPN2 chip
 * Added support for full-panning stereo option

ADL&OPN Hotfix: re-calculated default banks
The fix on side of measurer of OPL3-BE and OPN2-BE where some instruments getting zero releasing time.

# Conflicts:
#	src/sound/mididevices/music_adlmidi_mididevice.cpp
#	src/sound/mididevices/music_opnmidi_mididevice.cpp
#	wadsrc/static/menudef.txt
2018-10-04 20:25:02 +02:00
Marisa Kirisame
5877c0248d Exports various resurrection-related functions to ZScript. 2018-10-04 19:30:39 +02:00
Magnus Norddahl
8997d5effb - fix the nearest shadow map filter to have no shadow acne and replace linear with nearest in the menu 2018-10-04 19:27:20 +02:00
Magnus Norddahl
7124ba8216 - add some comments to shadowmap.fp 2018-10-04 19:24:22 +02:00