Commit graph

14166 commits

Author SHA1 Message Date
Christoph Oelckers
0e4f868281 - fixed: The software renderer was destroying global state when initializing a camera texture.
As a result the HUD wasn't drawn.
2019-04-29 18:52:40 +02:00
Christoph Oelckers
7d49fec477 - fixed: SpawnShootDecal tried to get the current level from a value that could point to actor defaults which do not have a level. 2019-04-29 18:52:11 +02:00
Christoph Oelckers
cdcc8996a7 - make the clean scaling system more consistent.
Now, all menus will use the same scale, i.e. it only depends on the screen width and a base size of 640. This nearly universally yields better results than trying to make a 320x200 screen fit.
The only exceptions to this are the intermission screens and the level summary. These, unlike the menu need to try to make a 320x200 screen fit, but without all the hackery that was present to adjust the menu display.
Note that since this affects globally visible script variables, both the intermission and summary drawers will not use their own set but instead temporarily override the global setting as long as they run their own code.
Changing the use of variables here might cause much worse problems with menu code so it wasn't attempted

# Conflicts:
#	src/v_video.cpp
2019-04-29 18:51:44 +02:00
Christoph Oelckers
5bac765849 - replaced the "or" in the keybind menu with a darker comma so that this part is language neutral. 2019-04-29 18:13:47 +02:00
Christoph Oelckers
3158826ec0 - removed the automatic system language detection for Windows.
Default language is now always American English, just like on Linux and macOS.

# Conflicts:
#	src/g_cvars.cpp
#	src/gamedata/stringtable.cpp
#	src/textures/texturemanager.cpp

# Conflicts:
#	src/win32/i_system.cpp
2019-04-29 17:42:54 +02:00
Christoph Oelckers
e70810cfdc - disabled the error message spam from the demo loop
These messages are useful for the playdemo CCMD, but since the demo loop is mostly non-functional anyway they better be disabled there.
2019-04-29 00:06:54 +02:00
alexey.lysiuk
37a82e08dc - fixed crash on startup inside userinfo_t::GetGender()
This function is required for localization handling but when it's called userinfo_t may not be fully initialized yet

https://forum.zdoom.org/viewtopic.php?t=63959
2019-04-29 00:06:02 +02:00
Christoph Oelckers
af3ba712b2 - fixed: player_t::GetGender needs to check if the CVAR exists.
This function can get called before the player's userinfo is available
2019-04-29 00:06:00 +02:00
Chronos Ouroboros
6617edfe97 Fixed arrays of dynamic arrays causing a compilation error. 2019-04-29 00:05:58 +02:00
Chronos Ouroboros
3a8f602875 Fixed nested dynamic array indexing causing a compilation error. 2019-04-29 00:05:55 +02:00
Christoph Oelckers
1e587a7f1d - fixed: The FFont* serializer was unable to handle null pointers. 2019-04-28 23:55:58 +02:00
Christoph Oelckers
3583cb1fe5 - use international date format for all places that print a date.
The most important one is the autosave tagging. This was done because the old printout was missing the year and printed the month as a 3 character English string, sabotaging any attempt to sort the autosaves by anything meaningful.
2019-04-28 23:54:06 +02:00
Christoph Oelckers
3dcbee6747 - fixed: IsPointInLevel must explicitly check for minisegs, which can be one-sided on maps with unclosed sectors.
Obviously, in such a case it is impossible to decide whether a point is really inside the map, so if this happens, behavior is undefined.
2019-04-28 23:14:38 +02:00
Sterling Parker
47b5378a62 Fix faulty multiplication logic for LookScale
Turns out the entire thing was getting shortcutted because FOVScale is 0 unless set explicitly or via A_ZoomFactor.
2019-04-28 23:01:59 +02:00
Sterling Parker
8ce7da0a5e Add LookScale variable on weapon
This variable allows a weapon to set a custom look sensitivity multiplier without fiddling with FOVScale / DesiredFOV hacks.
2019-04-28 23:01:57 +02:00
Christoph Oelckers
99d1047332 - process escape sequences for episode and skill names
For these, colorization is a desirable feature.
2019-04-28 23:01:37 +02:00
alexey.lysiuk
0d968d0943 - replaced all usages of insecure vsprintf() function 2019-04-28 22:58:48 +02:00
Rachael Alexanderson
86e8bf3b28 - fix building on FreeBSD 2019-04-28 22:57:25 +02:00
Christoph Oelckers
bc10c3e5bb - replaced the assignment operator in player_t with a named function.
This didn't behave like an assignment operator so it shouldn't be one, especially since the two places where it got called need different functionality.
2019-04-28 22:57:06 +02:00
Magnus Norddahl
f78e8cb71c - fix typo 2019-04-28 22:57:04 +02:00
Christoph Oelckers
ff21cee842 - fixed: SBARInfo's Tick function was using actor references from its last Draw operation.
Between these two calls these can change so these need to be retrieved each time either Draw or Tick are called.
2019-04-28 22:53:06 +02:00
Christoph Oelckers
c7b9781c57 - fixed: ACS's LocalAmbientSound did not check the activator before calling its methods.
# Conflicts:
#	src/p_acs.cpp
2019-04-28 22:50:54 +02:00
Christoph Oelckers
06f84d2420 - reject all DMX sounds shorter than or equal 8 bytes.
8 bytes is the minimum header size for DMX, so for one byte of sample data it has to be 9 bytes.
This was causing access to invalid memory when trying to read the header of something too short.
For other file formats this is of no concern because none has a header this short.
2019-04-28 22:50:21 +02:00
Christoph Oelckers
a531ca557d - fixed: PlayerStartStomp must check for NOTELEFRAG. 2019-04-28 22:47:04 +02:00
Christoph Oelckers
536c0b7647 - fixed: Unmorphing a monster did not clear its UNMORPHED flag. 2019-04-28 22:47:02 +02:00
Major Cooke
d34108f0e9 Renamed to musplaying.
# Conflicts:
#	wadsrc/static/zscript/base.zs
2019-04-28 22:38:25 +02:00
Major Cooke
43eaa03654 Exported MusPlayingInfo to ZScript.
- Allows grabbing the currently playing song, base order, and loop properties.

# Conflicts:
#	wadsrc/static/zscript/base.zs

# Conflicts:
#	wadsrc/static/zscript/base.zs
2019-04-28 22:37:08 +02:00
nashmuhandes
ddaae8e614 Added a master volume setting.
# Conflicts:
#	wadsrc/static/language.enu
2019-04-28 22:25:50 +02:00
Christoph Oelckers
60e1bb604e - removed unused gl_spritebrightfog CVAR.
# Conflicts:
#	src/gl/system/gl_cvars.h
#	src/gl/system/gl_menu.cpp
2019-04-28 22:25:12 +02:00
Christoph Oelckers
6c869f123d - changed calculation of the scaling value for the option menu.
This was already far too generous and caused space problems, but with localization these became a lot worse, so now it will try to allocate at least 640 virtual pixels for the menu width and only go below that for small resolution ranges where the smaller value would result in too small text.
2019-04-28 22:17:07 +02:00
Christoph Oelckers
7a2b72d2aa - made the text comparison for Dehacked case insensitive so that the contents of the string table can be properly capitalized without breaking old-style string replacements. 2019-04-28 22:14:37 +02:00
Christoph Oelckers
26a698a72a - fixed: empty strings cannot be substituted. 2019-04-28 22:14:27 +02:00
Christoph Oelckers
e245852bff - removed FCriticalSection and replaced all of its uses with std::mutex.
There's really no need for a non-standard solution here anymore with C++11.
This also fixes an unreleased lock in the WildMidi code.

# Conflicts:
#	src/posix/sdl/critsec.cpp
2019-04-28 22:13:36 +02:00
Christoph Oelckers
1e21b44db2 - fixed DHUDMessageTypeOnFadeOut with empty messages. 2019-04-28 21:37:58 +02:00
Christoph Oelckers
bfe3d251f9 - added a kerning option to FONTDEFS
# Conflicts:
#	src/gamedata/fonts/v_font.cpp
2019-04-28 21:29:13 +02:00
Christoph Oelckers
d2d637f431 - fixed the usedcolor array's base type.
The usedcolors array which counts the number of pixels in a given color in a font used bytes as storage, so any color that just happened to have a count that is a multiple of 256 the color was considered not present.

# Conflicts:
#	src/gamedata/fonts/font.cpp
#	src/gamedata/fonts/fontinternals.h
#	src/gamedata/fonts/specialfont.cpp
#	src/gamedata/fonts/v_font.cpp
#	src/v_font.h
2019-04-28 21:28:41 +02:00
Christoph Oelckers
ff0774c2f2 - changed all places which used a localized string as a format template for printf, String.Format et.al.
Passing something non-constant at compile time here is extremely dangerous, especially when users can replace those strings if they like.
It now uses FString::Substitute in all cases where something needs to be inserted into a template string.
2019-04-28 21:25:28 +02:00
Christoph Oelckers
a87e9a0343 - initialize the language right after reading the strings. 2019-04-28 21:24:44 +02:00
Christoph Oelckers
6685238a62 - fixed string checks in dialogue loader. 2019-04-28 21:22:55 +02:00
Christoph Oelckers
0eef6f031f - fixed: The language ID was set before reading the config.
This essentially rendered saving the language CVAR useless.
2019-04-28 21:20:57 +02:00
Major Cooke
31820098a6 Pass the target as the source for active damage modifiers (i.e. PowerDamage) instead of the actual source.
- Getting the victim would be impossible otherwise, and passing in the original source is redundant when there's already the owner.
2019-04-28 20:35:38 +02:00
Rachael Alexanderson
ee5bbdf011 Squashed commit of the following:
- Implement page string names for dialog lumps
    - Create special new GZDoom name space for ZSDF
    - add usdf_gzdoom spec document
    - fixed: restored original behavior with negative conversation id's for the original strife dialog lumps
    - reposition the binary strife fix in a more appropriate location
    - add compatibility fix for negative numbers in responses in USDF/ZSDF (don't know if it's actually necessary)
2019-04-28 20:35:21 +02:00
Robert Cochran
88e1711ff5 Add handling of left and right mousewheel events to the SDL2 input path 2019-04-28 20:34:35 +02:00
Major Cooke
ecdfd92fc8 - Fixed monsters waking up even if all the damage was absorbed without pain causing flags
- Fixed FORCEPAIN not overriding PainThreshold property
2019-04-28 20:06:46 +02:00
Christoph Oelckers
389c27c920 - fixed: 'level.frozen' still needs to be writable and have an effect.
# Conflicts:
#	src/gamedata/g_mapinfo.h
#	src/scripting/vmthunks.cpp

# Conflicts:
#	src/g_levellocals.h
2019-04-28 19:12:39 +02:00
Christoph Oelckers
074ee3238b - sanitized the 'frozen level' code.
This had two different flags that were checked totally inconsistently, and one was not even saved.
Moved everything into a few subfunctions so that these checks do not have to be scattered all over the code.

# Conflicts:
#	src/actorinlines.h
#	src/decallib.cpp
#	src/g_levellocals.h
#	src/hwrenderer/scene/hw_sprites.cpp
#	src/p_mobj.cpp
#	src/p_saveg.cpp
#	src/p_user.cpp
#	src/polyrenderer/scene/poly_particle.cpp
#	src/scripting/vmthunks.cpp
#	src/swrenderer/things/r_particle.cpp
#	wadsrc/static/zscript/actors/player/player.zs
#	wadsrc/static/zscript/base.zs

# Conflicts:
#	src/g_levellocals.h
#	src/hwrenderer/scene/hw_sprites.cpp
#	wadsrc/static/zscript/base.txt
2019-04-28 19:10:52 +02:00
Rachael Alexanderson
197c618dac - Remove "gitversion.h" from "version.h" - should result in faster compiles after a commit in Windows
- Fix zdoom.rc to show the actual git commit tag and id for the Product Version
- Made zdoom.rc "codepage 1252" compliant as dictated by the #pragma (if this needs changed the pragma should be updated, this was messing up the version strings in the final compile)

# Conflicts:
#	src/version.h

# Conflicts:
#	src/win32/zdoom.rc
2019-04-28 15:14:34 +02:00
alexey.lysiuk
842dff300e - fixed automap marks placement with custom fonts
Automap rotation wasn't taken into account when drawing marks

https://forum.zdoom.org/viewtopic.php?t=63693
2019-04-28 15:13:01 +02:00
alexey.lysiuk
f5f1564f69 - added ability to customize font of automap marks
Set am_markfont CVAR to a desired font name
Use am_markcolor to select a text color, has no effect with the default font, AMMNUMx

# Conflicts:
#	src/am_map.cpp
2019-04-28 15:11:43 +02:00
drfrag
e7c37e5f51 - Added FindEx to TArray. 2019-04-28 12:08:17 +02:00
Christoph Oelckers
8a7487ad14 - fixed map name setup
This was broken when localization for Hexen was added.
2019-04-28 12:08:13 +02:00
alexey.lysiuk
9f0eb35b28 - added compatibility flag for buggy CheckSwitchRange behavior
https://forum.zdoom.org/viewtopic.php?t=63008
https://forum.zdoom.org/viewtopic.php?t=63650
2019-04-28 12:03:52 +02:00
Christoph Oelckers
b1b5c851c9 - exported all Hexen map names and intermission texts to the language table.
As IWAD content this is in zd_extra.pk3.

# Conflicts:
#	src/gamedata/g_mapinfo.h
#	src/intermission/intermission_parse.cpp

# Conflicts:
#	src/intermission/intermission_parse.cpp
2019-04-28 11:56:36 +02:00
Christoph Oelckers
c5e607992d Only replace Strife dialogue content if the default strings from zd_extra.pk3 are present.
If not, use the dialogue file's content directly.
2019-04-28 11:55:37 +02:00
Christoph Oelckers
dc47fb807b - removed the special exception for those weird "No..." messages and moved the only one that isn't garbage to the language lump. 2019-04-28 11:53:26 +02:00
Christoph Oelckers
3dffaa3ab7 - exported the character names of Strife's dialogues. 2019-04-28 11:46:59 +02:00
Christoph Oelckers
7540ab01a5 - exported Strife's log texts to the string table.
This is dpne as a two-stage approach. TXT_LOGTEXTxxx will always take precedence over the log lumps, and TXT_ILOGxxx will only replace the original IWAD content.
This is so that PWADs replacing these lumps don't get overridden by the default texts.
2019-04-28 11:46:56 +02:00
Christoph Oelckers
458a97b0f7 - fixed dropoff checks for portals and 3D floors in the same sector. 2019-04-28 11:46:54 +02:00
Christoph Oelckers
736bac7a93 - exported LevelLocals's compatibility flags to scripting and fixed all places where access to combined compatibility flags is needed.
# Conflicts:
#	src/scripting/vmthunks.cpp
#	src/scripting/vmthunks_actors.cpp
#	wadsrc/static/zscript/doom/fatso.txt
#	wadsrc/static/zscript/doom/painelemental.txt
2019-04-28 11:46:26 +02:00
drfrag
3e7e174d36 - Copied global compatibility flags to FLevelLocals. 2019-04-28 11:46:23 +02:00
Major Cooke
68decdddfa Added Z + camera roll relativity for A_QuakeEx's QF_RELATIVE flag. 2019-04-27 23:45:55 +02:00
Major Cooke
47dbc95e2b Added inflictor, source and flag parameters to GetModifiedDamage on actors and ModifyDamage on inventory.
- The flags are used by DamageMobj so modders can determine radius damage, for example, by checking for DMG_EXPLOSION.
2019-04-27 23:45:49 +02:00
alexey.lysiuk
8a5cf4be47 - fixed compilation on POSIX targets
src/p_acs.cpp:3250:75: error: cannot pass object of non-trivial type 'FString' through variadic constructor; call will abort at runtime [-Wnon-pod-varargs]
src/p_conversation.cpp:354:56: error: cannot pass object of non-trivial type 'FString' through variadic constructor; call will abort at runtime [-Wnon-pod-varargs]
src/p_conversation.cpp:438:51: error: cannot pass object of non-trivial type 'FString' through variadic constructor; call will abort at runtime [-Wnon-pod-varargs]
src/p_conversation.cpp:548:58: error: cannot pass object of non-trivial type 'FString' through variadic constructor; call will abort at runtime [-Wnon-pod-varargs]
src/p_conversation.cpp:572:59: error: cannot pass object of non-trivial type 'FString' through variadic constructor; call will abort at runtime [-Wnon-pod-varargs]
src/p_conversation.cpp:584:58: error: cannot pass object of non-trivial type 'FString' through variadic constructor; call will abort at runtime [-Wnon-pod-varargs]

# Conflicts:
#	src/p_acs.cpp
2019-04-27 23:45:45 +02:00
alexey.lysiuk
05b12e8d74 - changed type of Nop expression to void
Control flow statements with constant condition no longer cause misleading fatal errors in ZScript

https://forum.zdoom.org/viewtopic.php?t=63566
2019-04-27 23:45:43 +02:00
Christoph Oelckers
1c410d4050 - rewrote the language table so that it doesn't have to reload everything on a language change.
It now reads everything into a two-dimensional TMap and creates a list of mappings that apply to the current setting.
The constant need for reloading was the main blocker in redesigning how Dehacked strings get inserted. Currently they override everything, but IWAD-based Dehacked text shouldn't block PWAD overrides from PWADs' LANGUAGE lumps and instead be treated as coming from an [en default] block.

This also renames the main block from [enu default] to [en default], because it should be treated as the English default for all English locales and not just make it fall through to the base default as it did before.

# Conflicts:
#	src/doomstat.cpp

# Conflicts:
#	src/stringtable.cpp
2019-04-27 16:13:21 +02:00
drfrag
c9463c6526 Reverted "- fixed: The light defaults were not fully deleted on an engine restart."
This was not applicable: Warning C4150	deletion of pointer to incomplete type 'FLightDefaults'; no destructor called (compiling source file C:\DEV\lzdoom\src\d_main.cpp)
2019-04-27 14:55:18 +02:00
alexey.lysiuk
c0422f95d2 - fixed ambient sounds "leaking" into reverb environment
Set speed of sound to 343.3 and init scale to 1 according to @kcat suggestion

https://forum.zdoom.org/viewtopic.php?t=63185
https://forum.zdoom.org/viewtopic.php?t=63524
2019-04-27 13:47:50 +02:00
alexey.lysiuk
7fecc973f5 - disabled VM JIT completely on unsuported platforms 2019-04-27 13:47:47 +02:00
Christoph Oelckers
1382d79ab1 - exported all texts from Strife's dialogues to the string table.
Now all this content can be localized. However, since this is actual game content it was placed in a secondary file in zd_extra.pk3, so that it won't affect the GPL-compatible status of the main one.

# Conflicts:
#	src/p_conversation.cpp
2019-04-27 13:47:44 +02:00
Christoph Oelckers
ff6881cd7c - fixed display of "Find help" text in Strife. Also moved this piece of code to a place where a real player exists. This was set at a point where the map wasn't loaded yet which caused a few problems.
# Conflicts:
#	src/g_level.cpp
#	src/p_user.cpp
2019-04-27 13:47:42 +02:00
Christoph Oelckers
23a4094080 - allow localization of Hexen's original ACS strings.
This way of looking up strings is intentionally limited to content from Hexen.wad and Hexdd.wad.

# Conflicts:
#	src/maploader/maploader.cpp
#	src/p_acs.cpp
#	src/p_acs.h
2019-04-27 13:47:40 +02:00
Christoph Oelckers
7b754e622c - fixed: The HUD model code did not account for placeholder sprites.
# Conflicts:
#	src/hwrenderer/scene/hw_weapon.cpp
2019-04-27 13:44:55 +02:00
Alexander
8764f88c65 added am_showkeys_always 2019-04-27 13:37:46 +02:00
Christoph Oelckers
40ad9a2584 - allow localization of Strife's log text. 2019-04-27 13:37:44 +02:00
Christoph Oelckers
fc72b50348 - fixed: Retriving a key's color did not work. 2019-04-27 13:37:41 +02:00
Nemrtvi
e97d5281b4 Localized “FIND HELP” in Strife
The very first quest log that appears in Strife, “FIND HELP”, is located in a source file. This moves it to the language files.
2019-04-27 13:37:40 +02:00
alexey.lysiuk
832c462d9a - fixed potentially incomplete list of argument flags for virtual function
https://forum.zdoom.org/viewtopic.php?t=63450
2019-04-27 13:34:28 +02:00
alexey.lysiuk
a7c679e9e0 - fixed compilation of Windows Debug targets
src\sound\mididevices\music_opl_mididevice.cpp(112): error C3861: 'I_DebugPrint': identifier not found
src\sound\mididevices\music_opl_mididevice.cpp(206): error C3861: 'I_DebugPrint': identifier not found
src\sound\mididevices\music_opl_mididevice.cpp(234): error C3861: 'I_DebugPrint': identifier not found
src\sound\mididevices\music_opl_mididevice.cpp(244): error C3861: 'I_DebugPrint': identifier not found
2019-04-27 13:34:26 +02:00
Major Cooke
0adf6a52f5 Added CheckReplacee.
- Allows defining of what actor is replacing another for information.
- If multiple arachnotrons, a modder can attribute them as being a replacer of Arachnotron itself, allowing A_BossDeath and GetReplacee to work with it.
2019-04-27 13:34:25 +02:00
Christoph Oelckers
d513cbf789 - only activate lights if the light actor isn't dormant, and only create a new one if it doesn't already have one.
-
2019-04-27 13:30:21 +02:00
Christoph Oelckers
eebdd6c1bd - moved the menu.h include from oalsound.h to oalsound.cpp.
The menu is a very 'dirty' header, and forcing it to be pulled in with something entirely unrelated is not good - even though only two files include oalsound.h.

# Conflicts:
#	src/sound/i_sound.cpp
2019-04-27 13:30:06 +02:00
Christoph Oelckers
0e7b96681a - replaced DWORD_MAX with UINT_MAX globally.
This was the last remnant of ZDoom's old integer types.
2019-04-27 13:28:22 +02:00
Christoph Oelckers
4daa256e2f - fixed: RecreateAllAttachedLights must activate the lights it creates.
This also removes the gl_attachedlights CVAR because with the new management this doesn't really work anymore.

# Conflicts:
#	src/gl/system/gl_cvars.h
#	wadsrc/static/menudef.txt
2019-04-27 13:20:44 +02:00
Christoph Oelckers
309407ed61 - use map time, not hub time for map actions. 2019-04-27 13:18:08 +02:00
alexey.lysiuk
fa7d01896e - added virtual destructor to FDelayedCommand
src/c_dispatch.cpp:143:5: warning: delete called on 'FDelayedCommand' that is abstract but has non-virtual destructor [-Wdelete-non-virtual-dtor]
src/tarray.h:582:5: warning: delete called on 'FDelayedCommand' that is abstract but has non-virtual destructor [-Wdelete-non-virtual-dtor]
src/tarray.h:574:5: warning: delete called on 'FDelayedCommand' that is abstract but has non-virtual destructor [-Wdelete-non-virtual-dtor]
2019-04-27 13:18:06 +02:00
Christoph Oelckers
9cf9dc1f6b - took the delayed console command execution out of the thinker management.
Doing this intermingled with the thinkers is highly unsafe because there are absolutely no guarantees about order of execution.
Effectively it ran these commands right in the middle of the playsim which could cause all sorts of synchronization issues, because CCMDs are part of the UI, not the playsim.

- pass a const string to AddCommandString.

This function manipulated the input buffer, leading to all sorts of code contortions to make sure that the passed parameter is clean for that.
This function will now create a copy of the passed parameter which it can manipulate without complicating its calling code.

# Conflicts:
#	src/c_dispatch.cpp
2019-04-27 13:18:04 +02:00
Christoph Oelckers
5add7b1cb4 - fixed: When A_SpawnProjectile got fixed, this fix broke the old A_CustomMissile function because the added workaround was overlooked.
This now separates the code more clearly into the twp paths to make the differences easier to see and compare.
2019-04-27 13:09:09 +02:00
nashmuhandes
67513389e7 Missed "Abnt_C2" in the keybind name array. 2019-04-27 13:04:01 +02:00
Rachael Alexanderson
9acfd7a8c5 - add 'cl_blockcheats' - useful for people who use debugging keys, allows a user to consciously turn off cheats without affecting the server 2019-04-27 13:03:59 +02:00
Rachael Alexanderson
784de642d5 - fixed indentations caused by conflict resolution in cherry-picked commit d911fa99a1 2019-04-27 13:03:34 +02:00
alexey.lysiuk
cf3e677c54 - fixed linking of optimized targets
Undefined symbols for architecture x86_64:
  "AActor::Vec3Angle(double, TAngle<double>, double, bool)", referenced from:
      Net_DoCommand(int, unsigned char**, int) in d_net.cpp.o
2019-04-27 13:03:32 +02:00
Christoph Oelckers
ac68316527 - call level compatibility handlers for all levels and pass the map name as a second parameter.
This is for user-made handlers for which the checksum is rather useless both for deciding whether to call the handler and for identifying the map.

# Conflicts:
#	src/compatibility.cpp
#	wadsrc/static/zscript/level_compatibility.txt
2019-04-27 13:02:58 +02:00
nashmuhandes
9e1864b56b Punctuated the input strings in UpperCamelCase format. 2019-04-27 12:43:56 +02:00
Christoph Oelckers
fd772b6dab - fixed code emission for constant ZScript function arguments 2019-04-27 12:43:22 +02:00
Christoph Oelckers
1ab0be9d0c - fixed flicker light selection of light radius. 2019-04-27 12:43:20 +02:00
Christoph Oelckers
242f1458c8 - fixed Identifier resolving for static functions
This entered the code path which warned about ambiguous use of variables in action functions and as a result ran afoul of subsequent error checks.

Since ZScript has no global scope resolution operator, this needs to ignore all non-static class symbols and try to look up any of these as global identifiers.
2019-04-27 12:43:16 +02:00
Christoph Oelckers
81521c2def - removed incorrect assert.
This assert disallowed pointers to non GC'd objects, which on some occasions can happen and must be allowed.
2019-04-27 12:37:51 +02:00
nashmuhandes
fc3769bd7e Move the "time" string in saved game comment into the LANGUAGE lump.
# Conflicts:
#	src/g_game.cpp
2019-04-27 12:37:50 +02:00
drfrag
5c8b0a1e53 - Bumped ZScript version. 2019-04-27 12:35:41 +02:00
alexey.lysiuk
35867a1c29 - fixed 'overriding core lump' error
Wrong container was reported for overriding lump
2019-04-27 12:27:29 +02:00
Christoph Oelckers
0ed3ac740a - fixed: The rail attack only considered the puff's decal if it had ALWAYSPUFF set. 2019-04-27 12:16:34 +02:00
drfrag
e2d24d177f - fixed: application of fake contrast should never result in a light level of 0 unless the sector's own light level is 0.
(patch by Graf)
2019-04-27 12:16:10 +02:00
Christoph Oelckers
9c2a784ca1 - normalize the pitch in ACS's SetActorPitch.
Apparently some people have to pass positive numbers in here to get a negative pitch, e.g. 350.0 instead of -10.0...
This prevents clamping of such out-of-range values that would otherwise constitute valid pitches with the wraparound in place.
2019-04-27 12:10:42 +02:00
Christoph Oelckers
90b57ed808 - fixed: TVector3::Pitch() got the sign inverted.
This caused bad calculations with CMF_OFFSETPITCH. Note that to compensate for the fix, the SphericalCoords function had to have its own inversion of the value removed so that it calculates the same result as before.
2019-04-27 12:10:41 +02:00
alexey.lysiuk
583e1103a0 - workaround MSVC 2015 code generation issue, x64 only
With optimization turned on illegal instructions were generated for turbo CVAR handler function

https://forum.zdoom.org/viewtopic.php?t=63157
2019-04-27 12:09:36 +02:00
drfrag
ea688fc613 - recalculate the line deltas if a nodebuild is needed
One potential cause is moving around vertices in which case these do not match anymore. (patch by Graf)
2019-04-27 12:07:49 +02:00
Christoph Oelckers
e2c2837aa5 - allow assignment of line IDs through LevelCompatibility. 2019-04-27 11:38:41 +02:00
drfrag
a6d5e58886 - Partial port of "made some changes to how the compatibility code works" to allow exporting to ZScript. 2019-04-27 11:38:37 +02:00
Christoph Oelckers
ddf5e009e5 - fixed default alpha for sector colors
It has to be 0, not 255.
2019-04-26 18:18:11 +02:00
alexey.lysiuk
53a1fb5705 - fixed potentially missing event handlers
Event handlers linked list might skip an entry if its order was in a middle of existing handlers

https://forum.zdoom.org/viewtopic.php?t=63258
2019-04-26 18:14:58 +02:00
alexey.lysiuk
db0928be4d - fixed wrong self type in Array.Resize()
https://forum.zdoom.org/viewtopic.php?t=63275
2019-04-26 18:14:56 +02:00
alexey.lysiuk
37ce3e90de - relaxed caller type check for states modified by Dehacked
https://forum.zdoom.org/viewtopic.php?t=63178
2019-04-26 18:14:53 +02:00
alexey.lysiuk
a08bc271fa - fixed script line numbers after multi-line raw string literal
https://forum.zdoom.org/viewtopic.php?t=63210
2019-04-26 18:14:51 +02:00
alexey.lysiuk
a082a09ebe - unary minus operator propagates boolean operand to integer
https://forum.zdoom.org/viewtopic.php?t=63214
2019-04-26 18:14:49 +02:00
Christoph Oelckers
f90dadba44 - fixed some merging issues.
# Conflicts:
#	src/g_shared/a_decals.cpp
2019-04-26 18:12:32 +02:00
alexey.lysiuk
67c4317d54 - fixed compilation errors
src/scripting/decorate/thingdef_parse.cpp:80:11: error: no viable conversion from 'const FName' to 'FString'
src/scripting/zscript/zcc_compile.cpp:1359:26: error: use of undeclared identifier 'Name_globalfreeze'; did you mean 'NAME_globalfreeze'?

# Conflicts:
#	src/scripting/zscript/zcc_compile.cpp
2019-04-26 18:12:31 +02:00
Christoph Oelckers
d0c609eeee - ensure proper emission of deprecations.
For global variables this wasn't implemented.

# Conflicts:
#	src/namedef.h
#	src/scripting/backend/codegen.cpp
#	wadsrc/static/zscript/base.txt
2019-04-26 18:12:29 +02:00
Christoph Oelckers
120069890d - added the fix for BuiltinNew which I missed when cherry-picking. 2019-04-26 18:10:28 +02:00
Christoph Oelckers
21e4f0b817 - made OP_NEW a builtin function instead of an opcode.
The code was present 3 times due to the JIt, and this is not something that benefits from being a real opcode, even in the interpreted case.
2019-04-26 17:23:33 +02:00
Marrub
af27d579ac Make LevelLocals::ExecuteSpecial return int
# Conflicts:
#	wadsrc/static/zscript/base.txt
2019-04-26 17:20:44 +02:00
Marrub
73e174af4d Fix return value of native BuiltinCallLineSpecial 2019-04-26 17:20:42 +02:00
Chronos Ouroboros
e9ca5d6eff Fixed multidimensional array definitions. 2019-04-26 17:20:40 +02:00
alexey.lysiuk
494dc20088 - increased range of valid sound positions and velocities
https://forum.zdoom.org/viewtopic.php?t=61420
2019-04-26 17:20:37 +02:00
alexey.lysiuk
d8d290cd51 - fixed many compilation errors with GCC and Clang
# Conflicts:
#	src/dobjgc.h
2019-04-26 17:14:12 +02:00
Christoph Oelckers
d6b18e5792 - same for the ambient sound
# Conflicts:
#	src/s_advsound.cpp
2019-04-26 17:14:06 +02:00
Christoph Oelckers
381eb7a407 - removed dependency on global time in sound sequence code.
This can better use a countdown timer that doesn't depend on external behavior.
2019-04-26 17:14:04 +02:00
alexey.lysiuk
039b91859a - fixed key number assignment during parsing of locks
https://forum.zdoom.org/viewtopic.php?t=63171
2019-04-26 17:14:02 +02:00
Chronos Ouroboros
56be11bbe3 Added support for implicitly-sized initialized arrays.
Also fixed dynamic arrays not being cleared before initializing.
2019-04-26 17:13:59 +02:00
drfrag
e751476957 - Fixed compilation with MinGW-w64 but now the 64 bit executable crashes. 2019-04-26 17:03:29 +02:00
Major Cooke
f136650e81 Fixed Thing_ProjectileAimed being broken.
- It was calling the fallback aiming in the wrong place when it should have been outside the speed check.
- Credit to _mental_ for the base code, but no gotos involved.
2019-04-26 01:39:56 +02:00
Chronos Ouroboros
df3f074b0a Fixed some issues in the ZScript array compilation code. 2019-04-26 01:33:09 +02:00
Christoph Oelckers
99f6d2a177 - replaced some NULLs with nullptr.
# Conflicts:
#	src/fragglescript/t_script.cpp
2019-04-26 01:33:07 +02:00
Chronos Ouroboros
541fd0097b Implemented compound initializers for arrays. 2019-04-26 01:31:23 +02:00
Christoph Oelckers
ff9fe5f4d0 - changed AFuncDesc initialization to avoid generating initializer functions.
Visual C++ will never statically initialize a class instance where a member field has a default value set, so the DEFINE_ACTION_FUNCTION variants without a direct native call need to be handled differently. The easiest way to do this is to leave out the nullptr default and omit the value in the initializer list. For trailing fields this will always get them nulled.
2019-04-26 01:31:21 +02:00
Player701
99a5f86364 - Fixed spawn height of projectiles created by SpawnPlayerMissile. 2019-04-26 01:31:18 +02:00
Christoph Oelckers
30f55ccf7d - converted the ACS Stringbuilder macros into inline functions. 2019-04-26 01:31:16 +02:00
Christoph Oelckers
b00a039af8 - let RunHealth clamping respect the newly added global properties. 2019-04-26 01:31:12 +02:00
Christoph Oelckers
bb129fd929 - bumped savegame version because the recent scriptification of APlayerPawn will render all old savegames unusable. 2019-04-26 01:31:10 +02:00
Christoph Oelckers
9a99d55896 - made forwardmove and sidemove defaults configurable through the gameinfo section. 2019-04-26 01:31:07 +02:00
Christoph Oelckers
edfb814957 - fixed delete calls on FDynamicLight.
This isn't allocated from the system heap so it cannot be freed by it.
2019-04-26 01:29:03 +02:00
Christoph Oelckers
e6ae9984ff - fixed: GetSoundClass must be able to handle non-players. 2019-04-26 01:29:01 +02:00
Christoph Oelckers
094aa245e6 - fixed: G_StartTravel must remove all dynamic lights from the actors it is about to carry over to the next level. 2019-04-26 01:20:05 +02:00
Christoph Oelckers
251b096b48 - removed all remaining native parts of APlayerPawn.
Unlike the other classes, the places where variables from this class were accessed were quite scattered so there isn't much scriptified code. Instead, most of these places are now using the script variable access methods.
This was the last remaining subclass of AActor, meaning that class Actor can now be opened for user-side extensions.
2019-04-26 01:20:02 +02:00
drfrag
15bcc4c6a1 - Missed some castings. 2019-04-26 01:15:11 +02:00
Christoph Oelckers
8fecfb8f85 - properly handle passing of the light flags.
Since these can be changed on the placed light actor they have to be read from there, so this is now a pointer in FDynamicLight, just like the other properties that can be user-changed.
Also did some cleanup on the interface so that external code doesn't need to dereference the lightflags pointer but can use utility functions for all flags.

# Conflicts:
#	src/hwrenderer/dynlights/hw_dynlightdata.cpp
#	src/swrenderer/line/r_walldraw.cpp

# Conflicts:
#	src/g_level.cpp
#	src/gl/compatibility/gl_20.cpp
2019-04-26 00:42:05 +02:00
Christoph Oelckers
17b13f1a60 - fixed: DeactivateLight called Activate instead of Deactivate. 2019-04-26 00:28:08 +02:00
drfrag
1bb9b3b861 - Fixed compilation of previous commit.
# Conflicts:
#	src/gl/compatibility/gl_20.cpp
2019-04-26 00:27:39 +02:00
Christoph Oelckers
f261ec7d53 - rewrote dynamic lights to not use actors for the internal representation and made DynamicLight a purely scripted class.
This should be less of a drag on the playsim than having each light a separate actor. A quick check with ZDCMP2 showed that the light processing time was reduced to 1/3rd from 0.5 ms to 0.17 ms per tic.
It's also one native actor class less.

# Conflicts:
#	src/g_shared/a_dynlight.cpp
#	src/g_shared/a_dynlight.h
#	src/hwrenderer/dynlights/hw_dynlightdata.cpp
#	src/hwrenderer/dynlights/hw_dynlightdata.h
#	src/hwrenderer/scene/hw_renderhacks.cpp
#	src/namedef.h
#	src/scripting/thingdef_data.cpp
#	src/swrenderer/line/r_walldraw.cpp

# Conflicts:
#	src/d_main.cpp
#	src/g_levellocals.h
#	src/g_shared/a_dynlight.cpp
#	src/g_shared/a_dynlight.h
#	src/gl/dynlights/gl_dynlight.h
#	src/gl/dynlights/gl_dynlight1.cpp
#	src/gl/scene/gl_spritelight.cpp
#	src/gl/scene/gl_walls.cpp
#	src/hwrenderer/dynlights/hw_shadowmap.cpp
#	src/hwrenderer/dynlights/hw_shadowmap.h
#	src/hwrenderer/scene/hw_flats.cpp
#	src/p_setup.cpp
2019-04-26 00:19:03 +02:00
Christoph Oelckers
08c75efb10 - fixed: ADynamicLight's shadowmap index must be reset when loading a savegame. 2019-04-25 21:20:56 +02:00
Christoph Oelckers
bc8af1cab8 Fixed initialization issues with dynamic lights.
Actors get initialized from their defaults so anything done in the constructor or some explicit member initialization will be overwritten.
They must use their properties for setting up configurable fields and do the rest in BeginPlay.
2019-04-25 20:59:06 +02:00
alexey.lysiuk
81cb8cb60b Fixed applying of dynamic lights to models
https://forum.zdoom.org/viewtopic.php?t=60301

# Conflicts:
#	src/gl/scene/gl_sprite.cpp
2019-04-25 20:48:17 +02:00
Christoph Oelckers
b3a8dcdbd4 store shadow map index in the light actor instead of a separate TMap
This frees another file of a direct renderer dependency and generally also should be faster
2019-04-25 20:14:00 +02:00
drfrag
e335a48009 - Fixed bad merge of "- changed handling of attenuated lights in the legacy renderer to be adjusted when being rendered instead of when being spawned.". 2019-04-25 19:11:40 +02:00
Christoph Oelckers
99dd234d10 - exported all native components of APlayerPawn.
Only the class definition itself remains and needs to be taken care of.

# Conflicts:
#	src/g_statusbar/sbarinfo_commands.cpp
#	src/hu_scores.cpp
#	src/scripting/thingdef_data.cpp

# Conflicts:
#	src/actorinlines.h
#	src/hu_scores.cpp
2019-04-25 17:42:11 +02:00
Christoph Oelckers
94eb0ecdda - scriptified the remaining PlayerPawn methods. 2019-04-25 17:35:44 +02:00
Christoph Oelckers
b28faa6793 - took several methods out of the native PlayerPawn implementation, either by scriptification or moving them to other places. 2019-04-25 17:34:56 +02:00
Christoph Oelckers
6f2a32ecbe - scriptified PlayerPawn.ResetAirSupply. 2019-04-25 17:34:53 +02:00
Christoph Oelckers
1c577e4c97 - scriptified APlayerPawn's DamageFade handling. 2019-04-25 17:34:51 +02:00
Christoph Oelckers
cf890a24c3 - scriptified P_CalcHeight.
This was the only code using the ViewBob member variable.
This also moves the range check for this variable to its application, because a badly behaved mod can just as easily change it at run time instead of just setting an absurdly large value in the class definition.
2019-04-25 17:34:49 +02:00
Christoph Oelckers
8e376754fc - did some more lightening on the PlayerPawn class. 4 more properties and one native member function have been handled. 2019-04-25 17:34:47 +02:00
Christoph Oelckers
c762757aca - initialize the PlayerPawn members only used by scripts through the script variable interface.
The goal here is to eliminate the native PlayerPawn class, after all, so this will be needed anyway.
2019-04-25 17:34:45 +02:00
Christoph Oelckers
cb2e46a4fe - scriptified A_SkullPop and ObtainInventory.
These were the last relevant items to access PlayerPawn.InvFirst.
2019-04-25 17:34:43 +02:00
Christoph Oelckers
08e2a86f64 - made ColorRangeStart and ColorRangeEnd meta properties of APlayerPawn.
These are only used during initialization and they should have been readonly from the start.
2019-04-25 17:34:41 +02:00
Christoph Oelckers
51499e167d - scriptified useflechette CCMD's item finding code. 2019-04-25 17:34:39 +02:00
Christoph Oelckers
4be9217215 - scriptified the declaration of AmbientSound
Most of the code is still native, but this means that PlayerPawn is the last remaining child of AActor.

# Conflicts:
#	src/g_shared/a_dynlight.cpp
2019-04-25 17:34:37 +02:00
alexey.lysiuk
70e7f9f853 - added missing range checks to level compatibility handler
# Conflicts:
#	src/compatibility.cpp
2019-04-25 16:50:28 +02:00
Christoph Oelckers
990aad3b0c - fixed: The player sound lookup would fail if a sound was only available for the last gender in the list.
This is an ancient bug, but it never registered before - only after making 'other' the default gender for nonsense input it became apparent.
2019-04-25 16:32:19 +02:00
Christoph Oelckers
0c1fc45df8 - fixed A_Chase default detection. 2019-04-25 16:31:58 +02:00
Christoph Oelckers
96d40ac403 - fixed the direct native variant of DynamicLight.SetOffset. 2019-04-25 16:26:40 +02:00
Major Cooke
2e6382f55e - Fixed: NODAMAGE was not accounted for with pain. 2019-04-25 13:10:51 +02:00
Timo Myyrä
b561b72fd0 fix Unix builds without backtrace functions in their libc
backtrace functions are not present in all libc implementations. Cmake has
module to add external libraries into build if needed so use it to fix build on
Unix systems without backtrace in libc.
2019-04-25 13:10:47 +02:00
Christoph Oelckers
1669e10f6e - fixed memory leaks in network code.
ReadString allocates a buffer, so saving it in a local variable and then forgetting it will not free the buffer afterward.
(This should probably be refactored to use some safer methods to read the string than this old-school method...)
2019-04-25 13:10:39 +02:00
player701
77633415f9 - Fixed settings_controller not updating properly when a player becomes the new arbitrator in a netgame. 2019-04-25 13:03:47 +02:00
Christoph Oelckers
6371d3f88b - added missing return in P_RemoveThing. 2019-04-25 13:03:45 +02:00
Christoph Oelckers
d54ef75311 - added missing null pointer check to SBarInfo's inventory bar drawer. 2019-04-25 13:03:42 +02:00
Christoph Oelckers
08dd81ed36 - use a TArray to store the sprite model hash to get rid of one atterm call. 2019-04-25 12:55:22 +02:00
Christoph Oelckers
7259cd44ee - reworked the lock code to remove the 255 locks limit and to allow it to automatically deinitialize.
# Conflicts:
#	src/fragglescript/t_func.cpp
2019-04-25 12:55:19 +02:00
Christoph Oelckers
e4bf84b015 - treat non-existent arrays in the savegame as zero length. 2019-04-25 12:55:13 +02:00
Christoph Oelckers
8c38a7c05f - fixed precaching of switches.
The backwards animation accessed the wrong array which in case of sequences with different length could crash
2019-04-25 12:52:02 +02:00
Major Cooke
5e183d8718 Fixed: IsFakePain received the modified damage instead of the raw, preventing ALLOWPAIN from working as intended. 2019-04-25 12:51:46 +02:00
Christoph Oelckers
f00ec3bfb9 - use TArrays for all local allocations in the map loader.
# Conflicts:
#	src/p_setup.cpp
2019-04-25 12:44:28 +02:00
drfrag
df251be921 - Fixed compilation of previous commit.
# Conflicts:
#	src/textures/textures.h
2019-04-18 20:16:30 +02:00
Christoph Oelckers
f29408e199 - fixed precaching to consider animations and switches 2019-04-18 20:13:35 +02:00
Ijon
50d8993e6e NOFRICTION now applies to Z friction when flying or swimming 2019-04-18 19:57:44 +02:00
alexey.lysiuk
33067deb86 - fixed crash in Actor.Warp() with null destination
https://forum.zdoom.org/viewtopic.php?t=63031
2019-04-18 19:57:30 +02:00
Christoph Oelckers
e4f5160f66 - remove some obsolete bit of cruft from the class type system.
This was a remnant of putting the meta data directly into the class descriptor which turned out to be an unworkable approach
2019-04-18 19:57:28 +02:00
Christoph Oelckers
a82d60bb71 - fixed 3D floor initialization for actor spawning.
Since actors are being spawned before the renderer gets set up this needs to fully initialize the list before spawning the actors, then take it down again for creating the vertex buffer and then recreate it.
2019-04-18 19:57:09 +02:00
Major Cooke
0635dc1416 Reduced redundancy by putting all function aftermath handling in a subfunction. 2019-04-18 19:56:40 +02:00
Major Cooke
662b2ed759 Split off pain chance triggering from ReactToDamage into its own function and gave ZScript access to it.
- TriggerPainChance(Name mod, bool forcedPain)
- One exception: PainThrehold is only checked in ReactToDamage, since this function does not require checking damage amount.
2019-04-18 19:56:38 +02:00
Major Cooke
f98c194431 DamageMobj Refactor
- Split off all reactive functionality (pain, infighting, etc) into its own function, ReactToDamage.
- Refactored all DamageMobj's damage <= 0 values.
 - Any unconditional cancellations now return -1. ReactToDamage will not be called if values < 0.
 - All pain/wound/target changing allowances return 0.
2019-04-18 19:56:36 +02:00
Ijon
49dd94f65a Add NOFRICTION and NOFRICTIONBOUNCE flags
NOFRICTION disables all friction effects on the thing it's set on
(including the speed cap from water/crouching), and NOFRICTIONBOUNCE
disables the "bounce off walls on an icy floor" effect on the thing
it's set on.
2019-04-18 19:56:33 +02:00
Rachael Alexanderson
286eacb088 - set vid_scalefactor to 1 when using vid_setscale 2019-04-18 19:20:28 +02:00
drfrag
708952e615 - initialize the index field for particles.
This won't contribute to sort order so it should be the same for all particles, which it wasn't because it was never set.
(patch by Graf)
2019-04-18 19:02:29 +02:00
Christoph Oelckers
cd8791d68c - fixed sprite sorting in the hardware renderer.
This did no longer sort sprites in the same position reliably since the feature to render sprites which only partially are inside a sector was added.
With this, sprites in the same position are no longer guaranteed to be added to the render list in sequence.
Fixed by adding an 'order' field to AActor which gets incremented with each spawned actor and reset when a new level is started.

The software renderer will also need a variation of this fix but its data no longer has access to the defining actor when being sorted, so a bit more work is needed here.

# Conflicts:
#	src/hwrenderer/scene/hw_drawlist.cpp
#	src/hwrenderer/scene/hw_sprites.cpp
2019-04-18 18:53:10 +02:00
Magnus Norddahl
14f7efece7 - improve softpoly 3d floor drawing somewhat
# Conflicts:
#	src/polyrenderer/scene/poly_plane.cpp
2019-04-18 17:49:41 +02:00
Christoph Oelckers
e6af596af0 - removed the redundant GetOffsetPosition export and added direct native support to its existing variants 2019-04-18 17:01:17 +02:00
Christoph Oelckers
15f78039c3 - fixed the decal translation handler truncated the translation ID
This was yet another of those old misguided 16 bit space 'optimizations'.
2019-04-18 17:01:11 +02:00
Christoph Oelckers
89a17d4257 - fixed: The random sound handler was using 16 bit storage throughout
Changed to use 32 bit and also fixed the random number call which was using the byte value variant of the access operator, effectively limiting the number of choices to 256.
2019-04-18 17:01:09 +02:00
Christoph Oelckers
fcacb80db5 - a few more explicit local buffer allocations removed.
# Conflicts:
#	src/gl/data/gl_setup.cpp
2019-04-18 17:00:20 +02:00
alexey.lysiuk
82d05dce13 - fixed lost settings controller state upon new game
https://forum.zdoom.org/viewtopic.php?t=62959
2019-04-18 16:31:20 +02:00
alexey.lysiuk
25a6ba0e51 - cleaned up player reinitialization upon new game 2019-04-18 16:31:18 +02:00
Magnus Norddahl
a399ce48a9 - fix decals looking blackened due to low lookup table precision when alpha is zero 2019-04-18 16:26:18 +02:00
Cacodemon345
fdd6e3cec9 Export P_GetOffsetPosition and ADynamicLight::SetOffset to ZScript 2019-04-18 16:23:01 +02:00
drfrag
dcdb381f73 - Deleted unused variable. 2019-04-18 15:26:54 +02:00
Christoph Oelckers
91c8177406 - added missing null pointer checks to cheat code. 2019-04-18 15:01:12 +02:00
Christoph Oelckers
f91b24f505 removed the unused DefaultExtension variant taking a char *. 2019-04-18 14:59:34 +02:00
Magnus Norddahl
4d160c8cd1 - fix missing line number for the function throwing the exception and remove the duplicate call stack line 2019-04-18 14:59:32 +02:00
Christoph Oelckers
d80d4bb228 - moved P_OpenMapData and related content out of p_setup.cpp.
# Conflicts:
#	src/g_levellocals.h

# Conflicts:
#	src/g_levellocals.h
2019-04-18 14:52:24 +02:00
Christoph Oelckers
b1452c928a - moved all shutdown handling for sound related resources to I_ShutdownSound instead of registering separate atterm handlers. 2019-04-18 14:34:25 +02:00
Christoph Oelckers
dae3d68cce - added an option to GAMEINFO to either force or disable loading of the default lights and brightmaps.
The mod which prompted me to add this is "The Chosen" which is a Dehacked-based TC and repurposes many original actors for something entirely different.
The stock lights are not usable for this and would make it impossible to add a GAMEINFO lump to it because then there is no way to disable loading of lights in the startup screen.
2019-04-18 14:34:23 +02:00
Magnus Norddahl
f216b42790 - avoid creating labels when they are not used
- remove variable from class as it is only used locally
- set default values in the class
- remove unused field
2019-04-18 14:22:21 +02:00
Magnus Norddahl
640464ad65 - removed marked code for how to create GDB/LLDB debug info as it will probably never be implemented 2019-04-18 14:22:19 +02:00
Magnus Norddahl
837b3d8bd2 - add missing parameter on unix 2019-04-18 14:22:17 +02:00
Chronos Ouroboros
e0d3a5acae Add line numbers to JIT stack traces. (#667) 2019-04-18 14:22:15 +02:00
Magnus Norddahl
bfccfb5e1b - don't include the native frames per default 2019-04-18 14:22:13 +02:00
Magnus Norddahl
175b67c088 - fix linking and some linux things 2019-04-18 14:22:11 +02:00
Christoph Oelckers
d2a86a7051 - fixed misnamed macros.
# Conflicts:
#	src/p_mobj.cpp
2019-04-18 14:22:09 +02:00
Chronos Ouroboros
218b7e95ca Added a function for triggering use/push specials for usage in custom monster AI. 2019-04-18 14:22:07 +02:00
Chronos Ouroboros
803cb16d99 Exported P_CheckFor3DFloorHit and P_CheckFor3DCeilingHit to ZScript. 2019-04-18 14:22:05 +02:00
drfrag
38e682a267 - Fixed compilation of previous commit. 2019-04-18 14:22:03 +02:00
Christoph Oelckers
4d7e945dc1 - fixed: A powered up weapon which shares its ready state with the parent but is currently in a firing sequence may not force-switch the weapon, because that will cause the sequence to run in the wrong weapon's context. 2019-04-18 14:22:02 +02:00
Christoph Oelckers
0c5ca922ba - fixed: 'frame' in GLDEFS light definitions was case sensitive. 2019-04-18 14:00:39 +02:00
drfrag
ecf1402274 - Fixed linking with MinGW-w64. 2019-04-18 14:00:37 +02:00
alexey.lysiuk
9aeeb0dc0f - fixed compilation of POSIX targets
Making callstack resolving operational will require a little bit more effort

src/scripting/vm/jit_runtime.cpp:900:31: error: use of undeclared identifier 'frames'
src/scripting/vm/jit_runtime.cpp:903:23: error: use of undeclared identifier 'cnt'
2019-04-18 14:00:35 +02:00
Magnus Norddahl
a01a468ef8 - add support for writing the native call stack 2019-04-18 14:00:34 +02:00
Magnus Norddahl
e1ed87a64f - improve the stack trace when the jit is active 2019-04-18 14:00:31 +02:00
Christoph Oelckers
77c00d7670 - replaced several explicit allocations with TArrays.
# Conflicts:
#	src/r_data/models/models_voxel.cpp
#	src/textures/formats/jpegtexture.cpp
#	src/textures/formats/pcxtexture.cpp
#	src/textures/formats/tgatexture.cpp

# Conflicts:
#	src/r_data/voxels.cpp
#	src/r_data/voxels.h
2019-04-18 13:58:37 +02:00
drfrag
846f53ba1e - Fixed compilation with MinGW-w64 64 bit. 2019-04-18 13:51:17 +02:00
Christoph Oelckers
f702f6e19e - use TArrays for MD3 storage.
# Conflicts:
#	src/r_data/models/models_md3.cpp
2019-04-18 13:15:00 +02:00
Christoph Oelckers
a9ad3a1e52 - fixed two broken ScriptUtil calls in FraggleScript. 2019-04-18 13:14:51 +02:00
Christoph Oelckers
e87d04d843 - added a 'forceworldpanning' map flag.
Since unfortunately this cannot be set as a general default, let's at least make it as easy as possible to disable that panning+scaling madness without having to edit the texture data.

# Conflicts:
#	src/swrenderer/textures/r_swtexture.h
#	src/textures/texture.cpp

# Conflicts:
#	src/textures/texture.cpp
2019-04-18 13:14:32 +02:00
Christoph Oelckers
c0e9530fd0 - fixed: The light defaults were not fully deleted on an engine restart. 2019-04-18 13:12:55 +02:00
Christoph Oelckers
7e2540732d - store UnchangedSpriteNames in Dehacked in a less hacky manner. 2019-04-18 13:12:53 +02:00
Christoph Oelckers
71e77defa3 - use a TArray to store the particles and remove all 16 bit global variables.
This means one less exit function to deal with - and these days 16 bit variables are a pointless attempt at saving space.
2019-04-18 13:12:51 +02:00
Christoph Oelckers
cee9f52f2f - improved error reporting for badly defined translations.
This needs to be handled by the caller for all use cases because the translation parser lacks the context to do a proper error report.

# Conflicts:
#	src/textures/multipatchtexture.cpp
2019-04-18 13:07:39 +02:00
Christoph Oelckers
ce6b24308e - fixed: sidedef-less GLWalls may not apply per-sidedef render properties.
These always come from open-sector render hacks where the renderer tries to fill in some gaps

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

# Conflicts:
#	src/gl/scene/gl_walls_draw.cpp
2019-04-18 13:05:44 +02:00
Christoph Oelckers
988e8042bb - two more places where explicit allocations could be replaced. 2019-04-18 13:02:23 +02:00
Christoph Oelckers
d4611683a6 - let FxNop have a value type, even if it's just TypeError. 2019-04-18 13:02:21 +02:00
Magnus Norddahl
bafc5e6a3c - add vanilla lightmode that behaves exactly as Doom's original light did
# Conflicts:
#	src/hwrenderer/scene/hw_drawinfo.cpp
#	src/hwrenderer/scene/hw_renderstate.cpp
#	src/hwrenderer/scene/hw_renderstate.h
#	src/hwrenderer/scene/hw_skyportal.cpp
#	src/hwrenderer/scene/hw_weapon.cpp

# Conflicts:
#	src/g_level.cpp
#	src/gl/compatibility/gl_20.cpp
#	src/gl/renderer/gl_lightdata.cpp
#	src/gl/renderer/gl_renderstate.h
#	src/gl/scene/gl_skydome.cpp
#	src/gl/scene/gl_weapon.cpp
#	src/hwrenderer/scene/hw_weapon.cpp
#	src/hwrenderer/utility/hw_lighting.cpp
2019-04-18 12:50:03 +02:00
Rachael Alexanderson
f442d4bd54 - split gl_texture_hqresize into two variables - one for mode, one for multiplier.
# Conflicts:
#	src/textures/hires/hqresize.cpp

# Conflicts:
#	src/gl/textures/gl_hqresize.cpp
#	src/r_videoscale.cpp
2019-04-17 21:04:41 +02:00
Rachael Alexanderson
301246236c - added normal5x and normal6x 2019-04-17 20:59:20 +02:00
drfrag
96f996d8aa Revert "Revert "- update xBRZ upscaler to version 1.6""
This reverts commit 285791622d.

# Conflicts:
#	src/gl/textures/gl_hqresize.cpp
#	wadsrc/static/menudef.txt

Goodbye to TDM-GCC.
2019-04-17 20:33:41 +02:00
Christoph Oelckers
c47549c009 - code simplification. 2019-04-17 20:00:29 +02:00
Christoph Oelckers
4cdfd7ff33 - fixed incorrect alignment of scaled world panned textures combined with per-sidedef scaling in the hardware renderer
This particular case incorrectly factored in the sidedef's scaling factor for how to calculate the offset.
Fortunately this is a very rare case - a quick check yielded no maps depending on it.
Should any map surface that depends on this bug a compatibility option may be needed but it doesn't seem likely that this may be the case.
2019-04-17 20:00:28 +02:00
alexey.lysiuk
a93807833a - disable music playback if WinMM stream cannot be opened
https://forum.zdoom.org/viewtopic.php?t=62888
2019-04-17 19:59:16 +02:00
alexey.lysiuk
ec432beea0 - print VM stack trace on startup abort exception
https://forum.zdoom.org/viewtopic.php?t=62650
2019-04-17 19:57:22 +02:00
Christoph Oelckers
3a3ae0bcd5 - fixed deprecation warnings for member functions not checking the version. 2019-04-17 19:44:10 +02:00
Christoph Oelckers
8ad73d32b8 - fixed: The JIT compiler crashed on missing ArgFlags.
For ad-hoc Dehacked state functions no ArgFlags are created, in this case they can just be assumed to not be relevant here, because none of these function produces reference arguments.
2019-04-17 19:44:07 +02:00
alexey.lysiuk
e6590f6ad9 - fixed return value of native call to dynamic array's Reserve()
https://forum.zdoom.org/viewtopic.php?t=62841
2019-04-17 19:44:05 +02:00
alexey.lysiuk
c4aa2c5e46 - server CVARs can be changed only by settings controller
Initially, settings controller flag was false by default
It was not touched during construction and destruction of player_t instances though
Now, with all members initialized in class definition, this flag must be saved and restored manually

https://forum.zdoom.org/viewtopic.php?t=62830
2019-04-17 19:44:04 +02:00
Magnus Norddahl
e4502de60b - workaround pointer truncation bug in asmjit 2019-04-17 19:44:02 +02:00
alexey.lysiuk
651dce449a - removed erroneous assertion
https://forum.zdoom.org/viewtopic.php?t=62815
2019-04-17 19:44:00 +02:00
alexey.lysiuk
9b49c6777d - fixed Actor.A_StopSound() native call
Wrong function overload was selected by compiler

https://forum.zdoom.org/viewtopic.php?t=62820
2019-04-17 18:44:14 +02:00
Magnus Norddahl
60a35e0bb3 - moved argsCache out of JitCompiler::CreateFuncSignature 2019-04-17 18:44:12 +02:00
Christoph Oelckers
10aea91745 - don't put mutexes into static local variables.
Their initialization semantics are not safe for synchronization objects.
2019-04-17 18:44:08 +02:00
Christoph Oelckers
da8686813d - fixed crash with FraggleScript in Nimrod MAP02. 2019-04-17 18:40:00 +02:00
alexey.lysiuk
84c7a810b1 - fixed broken Z coordinate in Actor.Vec3Angle() native call 2019-04-17 18:39:56 +02:00
alexey.lysiuk
7ba1e5945f - fixed native calls to LevelLocals.GetUDMF*() functions
https://forum.zdoom.org/viewtopic.php?t=62774
2019-04-17 18:39:53 +02:00
Christoph Oelckers
c90e4b773a - this "genuine hack" was totally redundant... 2019-04-17 17:44:07 +02:00
Christoph Oelckers
a6ff1637df - more direct native stuff, this is a week old but was almost forgotten.
# Conflicts:
#	src/hwrenderer/postprocessing/hw_postprocessshader.cpp
2019-04-17 17:42:24 +02:00
Christoph Oelckers
013040eacd - missed one definition for adding a direct native call. 2019-04-17 17:27:42 +02:00
Christoph Oelckers
cf4f573a25 - more direct native entry points.
- disallow bool as a return value for direct native calls because it only sets the lowest 8 bits of the return register.
- changed return type for several functions from bool to int where the return type was the only thing blocking use as direct native call.
2019-04-17 17:27:39 +02:00
Christoph Oelckers
082cb5b656 - scriptified P_CheckMeleeRange2. 2019-04-17 16:24:10 +02:00
Christoph Oelckers
c054389345 - fixed: Direct native functions for the JIT compiler may not return bool.
A bool will only set the al register on x64, but the entire eax needs to be set for the JIT code to deal with it.
2019-04-17 16:24:07 +02:00
Christoph Oelckers
15ab1fb09b - deprecated a few functions that depend on AAPTR_* to be useful.
- fixed wrong name for the LineAttack action function.
2019-04-17 16:24:05 +02:00
alexey.lysiuk
3252390642 - fixed linking of optimized targets
CMakeFiles/zdoom.dir/r_utility.cpp.o: In function `R_SetupFrame(FRenderViewpoint&, FViewWindow&, AActor*)':
/home/travis/build/coelckers/gzdoom/src/r_utility.cpp:832: undefined reference to `AActor::GetCameraHeight() const'
CMakeFiles/zdoom.dir/g_shared/a_action.cpp.o: In function `A_Unblock(AActor*, bool)':
/home/travis/build/coelckers/gzdoom/src/g_shared/a_action.cpp:64: undefined reference to `AActor::GetDropItems() const'
2019-04-17 15:11:26 +02:00
Christoph Oelckers
61b91f4897 - fix it 2019-04-17 15:11:24 +02:00
Christoph Oelckers
792aaa5b88 Added direct native entry points to a larger number of functions.
# Conflicts:
#	src/scripting/vmthunks_actors.cpp
2019-04-17 15:11:22 +02:00
alexey.lysiuk
ab111aa034 - fixed linking of optimized POSIX targets
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_Distance2DSquared(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x6ab): undefined reference to `AActor::PosRelative(AActor const*) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_Distance3DSquared(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x75f): undefined reference to `AActor::PosRelative(AActor const*) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_Vec3To(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x850): undefined reference to `AActor::PosRelative(AActor const*) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_Vec2To(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x930): undefined reference to `AActor::PosRelative(AActor const*) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_DistanceBySpeed(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0xa00): undefined reference to `AActor::PosRelative(AActor const*) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o:vmthunks_actors.cpp:(.text+0xad3): more undefined references to `AActor::PosRelative(AActor const*) const' follow
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_PosRelative(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x1200): undefined reference to `AActor::PosRelative(sector_t*) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_ClearInterpolation(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x127d): undefined reference to `AActor::ClearInterpolation()'
vmthunks_actors.cpp:(.text+0x1298): undefined reference to `AActor::ClearInterpolation()'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_GetBobOffset(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x135a): undefined reference to `AActor::GetBobOffset(double) const'
CMakeFiles/zdoom.dir/scripting/vmthunks_actors.cpp.o: In function `AF_AActor_Distance2D(VMValue*, int, VMReturn*, int)':
vmthunks_actors.cpp:(.text+0x222b): undefined reference to `AActor::PosRelative(AActor const*) const'
2019-04-17 15:11:18 +02:00
Christoph Oelckers
c0c5df0e6e - fixed: ST_FormatMapName did not clear the string it wrote to before appending text. 2019-04-17 15:11:17 +02:00
Christoph Oelckers
22b8bdc02d fixed missing include. 2019-04-17 15:11:15 +02:00
Christoph Oelckers
1fce3298ba - fixed definition of GetUDMFString export. 2019-04-17 15:11:14 +02:00
Rachael Alexanderson
a4e09f1947 - Enforce CheckCheatmode() for cheat-enforced CVARs, allowing them to be changed in normal single player games 2019-04-17 15:11:11 +02:00
drfrag
a235d23c94 - Missing include. 2019-04-17 15:10:11 +02:00
Christoph Oelckers
a5e16e3261 - moved a large part of the VM thunks out of p_mobj.cpp. 2019-04-17 14:55:58 +02:00
Christoph Oelckers
1e4c22f8d4 - more direct native entry points. 2019-04-17 14:55:56 +02:00
Christoph Oelckers
3fb3831843 - fixed: SBar_SetClipRect had a superfluous argument resulting in incorrect behavior 2019-04-17 14:32:19 +02:00
Christoph Oelckers
89e6c400af - missed the header... 2019-04-17 14:32:17 +02:00
Christoph Oelckers
93dedcfd4b - the native APlayerPawn::PlayAttacking2 function is not needed anymore. 2019-04-17 14:32:16 +02:00
Christoph Oelckers
54d1ee2244 - fix bad return type. 2019-04-17 14:32:14 +02:00
Christoph Oelckers
d52889e71e - handle JIT errors in a more user-friendly fashion than aborting.
* use I_Error instead of I_FatalError to abort. I_FatalError is only for things that are not recoverable and should not be handled outside of error cleanup and rethrowing.
* only catch CRecoverableError in JitCompile. Everything else should fall through to the outermost catch block.
* Do not I_FatalError out after handling the exception locally. Just print an error and return null, indicating failure.
2019-04-17 14:32:12 +02:00
Christoph Oelckers
f22aaca74d - scriptified ASpecialSpot.
This only had two simple native methods so the class is not fully scripted.
2019-04-17 14:32:10 +02:00
Christoph Oelckers
92b245d220 - treat REGT_STRING | REGT_ADDROF just like REGT_STRING for direct native functions.
Both pass a reference so there's no need to treat them differently.
2019-04-17 14:32:08 +02:00
Christoph Oelckers
044b635a26 - more direct native function calls. 2019-04-17 14:32:06 +02:00
drfrag
03853930aa - Fixed compilation. 2019-04-17 12:21:08 +02:00
Christoph Oelckers
c87724ef0a Removed all native components from AInventory. 2019-04-16 23:57:22 +02:00
Christoph Oelckers
d40de21bae - scriptified A_SpawnSingleItem, which was the last piece of native code still referencing AInventory 2019-04-16 23:57:19 +02:00
Christoph Oelckers
558c9b48de - scriptified A_SelectWeapon and inlined the last remaining use of APlayerPawn::SelectWeapon. 2019-04-16 23:57:17 +02:00
Christoph Oelckers
d2225040ea - scriptified A_SelectWeapon 2019-04-16 23:57:15 +02:00
Christoph Oelckers
b8e1218645 Removed all remaining references to AInventory
What remains is the class definition and one single reference that will be scriptified.
2019-04-16 23:57:12 +02:00
Christoph Oelckers
b762c0f49c Removed more literal references to AInventory.
# Conflicts:
#	src/hwrenderer/scene/hw_drawinfo.cpp
#	src/v_draw.cpp
2019-04-16 23:57:07 +02:00
Christoph Oelckers
d173ad753f - started removing literal references of AInventory, so far only simple stuff. 2019-04-16 23:57:02 +02:00
drfrag666
ab5e5e0389 - The GetBlend script call is needed in another place as well.
# Conflicts:
#	src/gl/scene/gl_scene.cpp
2019-04-16 22:09:46 +02:00
Christoph Oelckers
e969e8a86b - moved the GetBlend script call to the one single place where it is needed to get rid of one native AInventory method.
# Conflicts:
#	src/g_inventory/a_pickups.cpp
#	src/g_inventory/a_pickups.h
#	src/hwrenderer/scene/hw_drawinfo.cpp
2019-04-16 22:01:08 +02:00
Christoph Oelckers
fa2e2e78b4 - removed all direct access to AInventory's members.
We are getting closer to make class Inventory fully scripted.
2019-04-16 22:01:04 +02:00
Magnus Norddahl
c8b5276981 - gcc/clang didn't like having this in a class 2019-04-16 22:01:01 +02:00
Magnus Norddahl
82a0acbc19 - add bool and unsigned int to the allowed types
- fix one case where floats were used (the JIT always calls with doubles)
2019-04-16 22:00:57 +02:00
Magnus Norddahl
89fd819926 - perform compile time validation of direct native function signatures 2019-04-16 22:00:55 +02:00
Magnus Norddahl
9e432c0c9f - fix VM native calls containing strings and enable them again 2019-04-16 22:00:53 +02:00
Magnus Norddahl
6090e5ec24 - fix compile error 2019-04-16 22:00:50 +02:00
Magnus Norddahl
cd03a487fe - GetInventoryIcon must return an integer for it to work for VM native calls 2019-04-16 22:00:48 +02:00
Christoph Oelckers
a42ece4fb4 - added missing min/max unsigned instructions for the VM. 2019-04-16 22:00:46 +02:00
Rachael Alexanderson
b7d22e2b1e - always apply vid_scalefactor now, even when vid_scalemode is not 0 or 1.
# Conflicts:
#	src/r_videoscale.cpp
2019-04-16 21:57:07 +02:00
Christoph Oelckers
e176410ab6 - fixed crash with weapons which remove themselves from the inventory but continue calling action functions.
This is still an error, so now this throws a meaningful exception.
2019-04-16 21:53:00 +02:00
Christoph Oelckers
d8d52f67b4 - hardened the seg integrity checks against extremely broken mods.
Temple of the Lizardmen 3 has segs lumps in every level that seem to use a different data format and are completely unusable, up to triggering undefined behavior.
2019-04-16 21:52:58 +02:00
Christoph Oelckers
59e0871f00 - fixed: The static variant of PClass::FindFunction may only be used for actual static variables. 2019-04-16 21:52:56 +02:00
Christoph Oelckers
c0686309fc - removed all direct references of AInventory::Owner and AInventory::Amount from the C++ code. 2019-04-16 21:52:53 +02:00
Christoph Oelckers
fc341c901f - fixed issues with Dehacked's ad-hoc script code generation
* The functions had no prototype and caused crashes.
* even after creating a prototype it didn't work because CreateAnonymousFunction was set up incorrectly for the case where a known return type was given.
2019-04-16 21:52:47 +02:00
drfrag
48c2f6451e - disable alpha test on models if the renderstyle isn't STYLE_Normal
- compare against the thing renderstyle since the local copy has been modified
(patches by dpJudas)
2019-04-16 21:51:19 +02:00
Christoph Oelckers
ba0e19f2a2 - made the BUddha checks readable again. 2019-04-16 21:34:55 +02:00
Christoph Oelckers
dc29eee077 - fixed compile warning 2019-04-16 21:34:53 +02:00
Christoph Oelckers
0a36ad0182 - removed assert that got triggered in an edge case that must pass here. 2019-04-16 21:34:51 +02:00
Christoph Oelckers
1bfa1fd5a6 - implemented missing 'exact' parameter for ThinkerIterator.Next. 2019-04-16 21:34:49 +02:00
Christoph Oelckers
5043106e97 - started replacing direct references to class AInventory.
The easiest part was the type checks which could be changed to the name variant with a global search and replace.

# Conflicts:
#	src/hwrenderer/scene/hw_sprites.cpp

# Conflicts:
#	src/hwrenderer/scene/hw_sprites.cpp
2019-04-16 21:34:23 +02:00
Major Cooke
4e8d88f7df - fixed: P_PoisonPlayer and P_PoisonDamage did not check for NODAMAGE.
- fixed: P_PoisonDamage's check for Buddha2 and the Buddha powerup were inverted.
- fixed: P_PoisonDamage checked the modified damage instead of the raw, allowing amplifiers to boost the damage beyond telefrag and circumventing regular buddha.
2019-04-16 21:28:39 +02:00
Christoph Oelckers
9f2b62c99c - scriptified AInventory::Tick.
This was the last bit of code standing in the way of making AInventory a fully scripted class.
All that's left to sort out is some variable accesses - the vast majority of them in SBARINFO.
2019-04-16 21:28:37 +02:00
Magnus Norddahl
abc4406d18 - ptest is a SSE 4.1 instruction 2019-04-16 21:28:35 +02:00
Christoph Oelckers
bdd6d31a63 - scriptified the AutoUseHealth feature.
This again is a piece of code that reads and even writes to inventory items' properties, so better have it on the script side.
2019-04-16 21:28:34 +02:00
Christoph Oelckers
80e3ce735b - scriptified the decision making of the invuseall CCMD.
Custom items had no way to adjust to this - and it also was the last native access to ItemFlags.
2019-04-16 21:28:32 +02:00
Christoph Oelckers
9ff5257ce9 - scriptified P_DropItem. 2019-04-16 21:28:30 +02:00
Christoph Oelckers
17862639a1 - scriptified the no-spawn flag check for armor and health items. 2019-04-16 21:28:29 +02:00
Christoph Oelckers
e9dd8f3e4f - consolidated the check for "is actor an owned inventory item" into a subfunction.
This check occured 9 times in the source, better have it only once.
2019-04-16 21:28:26 +02:00
Christoph Oelckers
e8a6f82682 - scriptified G_PlayerFinishLevel.
Outside of SBARINFO this was the biggest remaining piece of code that referenced AInventory internals.
2019-04-16 21:28:24 +02:00
Christoph Oelckers
9315a217b3 - scriptified AActor::ClearInventory 2019-04-16 21:28:21 +02:00
Christoph Oelckers
a2ffe6327b - took the last methods aside from Tick and Serialize out of AInventory.
# Conflicts:
#	src/g_inventory/a_pickups.cpp
#	src/g_inventory/a_pickups.h
2019-04-16 21:28:19 +02:00
drfrag
8ef732704c - Missing include. 2019-04-16 19:55:28 +02:00
Christoph Oelckers
a1615457ac - properly hook up the alt HUD with the status bar.
# Conflicts:
#	src/d_main.cpp
2019-04-16 19:09:14 +02:00
Christoph Oelckers
0d8975ed31 - scriptified the last components of the alternative HUD.
- moved the ALTHUDCF parser PClass::StaticInit, so that it gets done right after creating the actor definitions.

All left to do is not to reallocate the AltHud object for each frame but store it in a better suited place.

# Conflicts:
#	src/d_main.cpp

# Conflicts:
#	src/info.cpp
2019-04-16 19:03:43 +02:00
Christoph Oelckers
376266b6a0 - scriptified the main drawer for the in-game HUD and removed all intermediate VM calls from the native source. 2019-04-16 19:02:01 +02:00
Christoph Oelckers
9d8dd5c529 - scriptified the AltHUD'S powerup drawer. 2019-04-16 19:01:55 +02:00
Christoph Oelckers
f509fdfdaa - scriptified and cleaned up the AltHUD's DrawCoordinates, DrawTime and DrawLatency functions.
Some backing functionality was moved elsewhere because scripting should not have access to low level system information.
2019-04-16 19:01:53 +02:00
Christoph Oelckers
eb07b8e543 - scriptified the AltHUD's inventory drawer and fixed the InvPrev CCMD. 2019-04-16 19:01:51 +02:00
Christoph Oelckers
e0915877b4 - scriptified the AltHUD's weapon drawer. 2019-04-16 19:01:50 +02:00
Christoph Oelckers
045d6d4355 - added the missing TNT1A0 check for icon-less keys.
Since it tries to get the icon from the spawn state it also has to check if that actually has a valid sprite.
2019-04-16 19:01:48 +02:00
Christoph Oelckers
437c72a089 - AltHUD ammo drawer scriptified. 2019-04-16 19:01:46 +02:00
Christoph Oelckers
cbb92af1db - allow %*d etc. format specifiers in ZScript, but only for numeric types. 2019-04-16 19:01:45 +02:00
Christoph Oelckers
1033dc3b10 - Alt HUD scriptification, part 1. 2019-04-16 19:01:43 +02:00
Magnus Norddahl
08f415bad9 - don't use SSE for integer min/max 2019-04-16 18:46:09 +02:00
Magnus Norddahl
1e533d726c - Use SSE2 for min/max instead 2019-04-16 18:46:07 +02:00
Christoph Oelckers
ca67327d1c - this was wrong... 2019-04-16 18:46:01 +02:00
Christoph Oelckers
ff9eaed1ba - fixed script call in PickNewWeapon. 2019-04-16 18:45:58 +02:00
Christoph Oelckers
53c1614a51 - fixed: P_Massacre without a class restriction no longer worked. 2019-04-16 18:45:56 +02:00
Christoph Oelckers
d18ed18d2e - scriptified invnext and invprev CCMDs. 2019-04-16 18:45:54 +02:00
Christoph Oelckers
081d0bbcca - moved ValidateInvFirst to the script side because this was one of the major functions that directly reference AInventory. 2019-04-16 18:45:52 +02:00
Christoph Oelckers
d021d63d33 - moved AInventory::DoRespawn fully to the script side. 2019-04-16 18:45:49 +02:00
Christoph Oelckers
a7909c16e5 - made CallTryPickup a global function.
This one still gets called in too many places but stands in the way of moving Inventory fully to the script side.
2019-04-16 18:45:47 +02:00
Christoph Oelckers
9981674a27 - re-fixed the massacre fix for Dehacked-modified inventory items.
Instead of overriding the Massacre method it is preferable to clear the flags causing the bad behavior, most notably ISMONSTER.

# Conflicts:
#	src/g_inventory/a_pickups.cpp
#	src/g_inventory/a_pickups.h
2019-04-16 18:45:43 +02:00
Christoph Oelckers
be8d1c950d - scriptified GiveAmmo and the one remaining piece of native code still using it. 2019-04-16 18:45:41 +02:00
Christoph Oelckers
f1bf1cc44e - scriptified DropInventory. 2019-04-16 18:45:38 +02:00
Christoph Oelckers
a614f2a81e - scriptified UseInventory and several functions using the already scriptified ones,
# Conflicts:
#	src/g_statusbar/sbar.h
2019-04-16 18:45:36 +02:00