Commit graph

1425 commits

Author SHA1 Message Date
alexey.lysiuk
b8b93e0dd8 - fixed most of implicit fallthrough compilation warnings
src/common/console/c_console.cpp:1032:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/common/console/c_console.cpp:958:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/common/scripting/backend/codegen.cpp:2969:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/common/scripting/frontend/zcc_compile.cpp:2656:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/common/scripting/frontend/zcc_compile.cpp:521:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/common/scripting/jit/jit_math.cpp:966:19: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/d_main.cpp:1538:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/d_main.cpp:1549:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/d_main.cpp:3820:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/gameconfigfile.cpp:544:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/gamedata/p_xlat.cpp:193:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/gamedata/p_xlat.cpp:200:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/gamedata/p_xlat.cpp:210:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/g_game.cpp:1145:20: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/maploader/maploader.cpp:2142:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/menu/doommenu.cpp:159:28: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/m_cheat.cpp:109:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/playsim/mapthinkers/a_ceiling.cpp:254:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/playsim/mapthinkers/a_floor.cpp:322:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/playsim/mapthinkers/a_floor.cpp:330:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/playsim/mapthinkers/a_floor.cpp:344:10: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/playsim/mapthinkers/a_plats.cpp:129:47: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/playsim/mapthinkers/a_plats.cpp:284:8: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/playsim/p_acs.cpp:6302:18: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/playsim/p_acs.cpp:8111:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/playsim/p_spec.cpp:344:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/scripting/decorate/thingdef_parse.cpp:1343:9: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/scripting/zscript/zcc_compile_doom.cpp:298:12: warning: this statement may fall through [-Wimplicit-fallthrough=]
src/wi_stuff.cpp:463:14: warning: this statement may fall through [-Wimplicit-fallthrough=]
2020-10-31 13:37:51 +02:00
Christoph Oelckers
e6c96bcb75 - move VM exports to the proper class. 2020-10-31 12:24:14 +01:00
Christoph Oelckers
783d532bbe - moved the script exports to the base class as wello. 2020-10-31 12:24:14 +01:00
Christoph Oelckers
196d3c32bb - moved the drawing utilities to the abstact base statusbar function. 2020-10-31 12:24:13 +01:00
Christoph Oelckers
3f61ab7fbf - moved FormatNumber to the generic base class. 2020-10-31 12:24:13 +01:00
Major Cooke
e3d21d09c9 Renamed flag to ALLOWTHRUBITS and rearranged the checks so the flag comes after.
- Since most will have 0 for the property, this will not check for the flag unless the mask fits.
2020-10-25 15:37:15 +01:00
Major Cooke
85a121ad28 ThruBits is now opt-in for convenience with the +THRUBITS flag. 2020-10-25 15:37:15 +01:00
Christoph Oelckers
194824f810 - some fixes for the console.
* it is now possible to switch back to the main intro loop from the fullscreen console.
* do not distort the background of the fullscreen console. Always draw the console on top of what the main loop currently displays with a translucent black overlay.
* do not use the CONPIC for the fullscreen console as it tends to be more of a distraction than an asset when filling the entire screen.
* cleaned up c_console.cpp and moved several pieces of code unrelated to actual console management out of it.
2020-10-25 09:17:31 +01:00
azamorapl
7676ed641c Expose changing sidedef wallpart flags to zscript 2020-10-25 06:27:20 +01:00
Player701
761dea8640 - Implemented ZScript abstract functions 2020-10-19 08:24:43 +02:00
Christoph Oelckers
565a5acd85 - changed order of identifier types to be checked to what it was in 4.3 2020-10-17 15:13:14 +02:00
Christoph Oelckers
0478838a9d fixed side_t::SetSpecialColor.
This never set the needed flags to make the color appear.
2020-10-17 12:28:22 +02:00
Major Cooke
60f0d35477 Added ThruBits. 2020-10-17 09:51:24 +02:00
Christoph Oelckers
8e1b091cf3 - disabled negative gravity check.
According to reports on the forum this does not cause bad behavior.
2020-10-17 09:11:44 +02:00
Christoph Oelckers
504f85e6d4 - moved date code to its own file. 2020-10-16 22:57:27 +02:00
Christoph Oelckers
3a81c07ecf - moved language switching code to 'common'. 2020-10-16 22:57:27 +02:00
Christoph Oelckers
46043f6278 - moved AutomapBindings export into common code. 2020-10-16 22:57:24 +02:00
Player701
4aec72be5d - Do not error out if some states are missing in an abstract weapon class 2020-10-06 20:07:04 +02:00
Nikolay Ambartsumov
a72fdd7e3e Add MaxSlopeSteepness actor property 2020-10-03 07:53:55 +02:00
makise-homura
5720a54da4 Add species parameter to A_RadiusThrust
This is the last parameter for A_RadiusThrust() DECORATE function.
If it is omitted or none, then A_RadiusThrust will behave as usual.

If it is set for some species name, it witt thrust only that species.
Of course, these species should be +VULNERABLE to be thrustable.
2020-09-27 13:58:22 +02:00
vidaritos
0adbb8d631 pass ScriptPosition down to color parser functions 2020-09-18 20:07:41 +02:00
Cacodemon345
e74b9f1955
Add FALLDAMAGE flag and add property to properly apply falling damage… (#1153)
* Add FALLDAMAGE flag and add property to properly apply falling damage to the monsters

* Change name of propermonsterdamage property to propermonsterfallingdamage
2020-09-15 15:38:51 +02:00
3saster
11cecf7f22
Removed some time specifiers that aren't standard and can crash GZDoom (#1166)
A number of the specifiers were GNU extensions that aren't actually standard
2020-08-29 15:55:51 -04:00
alexey.lysiuk
254489e34c - fixed compilation warnings reported by MSVC
src\common\audio\sound\s_sound.cpp(556,27): warning C4244: '=': conversion from 'double' to 'float', possible loss of data
src\scripting\vmthunks.cpp(2678,13): warning C4244: 'return': conversion from 'time_t' to 'int', possible loss of data
2020-08-29 14:42:19 +03:00
alexey.lysiuk
f46e3bacb2 - fixed getting state name with incomplete list of actor classes
https://forum.zdoom.org/viewtopic.php?t=69713
2020-08-29 11:08:31 +03:00
alexey.lysiuk
fb20730960 - fixed compilation warnings introduced recently
src/console/c_cmds.cpp:690:11: warning: format string is not a string literal (potentially insecure) [-Wformat-security]
src/scripting/vmthunks.cpp:2698:21: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
2020-08-29 10:36:29 +03:00
MajorCooke
eaba63e13b
View Angles (Part 1 - Redux) (#1002)
* Added ViewAngle/Pitch/Roll properties to actors.

- These are offsets for camera angles that allow turning the camera without affecting aim or movement direction.
- Added A_SetView<Angle/Pitch/Roll>, which will set the view direction.
- Added ABSVIEWANGLES flag, used to make the view absolute instead of an offset.

* Converted functions to be direct-native.
2020-08-27 13:03:06 -04:00
3saster
5803b78147
Implemented Clock Class (#977)
* Simplified some stuff, made up-to-date

* Dealt with DST problems

* Made SystemTime.Format clearscope, as there is no reason for this function to be limited to the ui
2020-08-27 12:43:50 -04:00
MajorCooke
85759e3bd0
Added A_SpriteOffset. (#895)
- Coordinates work akin to A_OverlayOffset: +X shifts to the right, +Y shifts down.
2020-08-27 12:43:09 -04:00
Christoph Oelckers
75cd00a340 - fixed some issues with setup parts for ZScript in the wrong place.
This never showed on GZDoom as an error but on Raze which has no actor classes it caused incompletely set up class descriptors.
2020-06-14 18:35:58 +02:00
Christoph Oelckers
82e4104900 - moved several VM exports for game independent objects to 'common'. 2020-06-14 12:16:22 +02:00
Christoph Oelckers
712d80006a - split game dependent parts out of menudef.cpp. 2020-06-14 00:27:32 +02:00
alexey.lysiuk
0e8473906e - tighten rules for action functions called from Decorate
FxVMFunctionCall (previously used to call action functions from Decorate) skipped self pointer compatibility checks

https://forum.zdoom.org/viewtopic.php?t=68678
2020-06-07 15:00:32 +03:00
Christoph Oelckers
9be63a5093 Merge branch 'master' into texture_rework 2020-04-29 08:04:15 +02:00
Christoph Oelckers
ddef3f7b98 - made video base code game independent 2020-04-28 22:54:53 +02:00
Christoph Oelckers
5f3e4a5d0e - did a bit of cleanup on DFrameBuffer, most notably taking GetCaps out of it.
With the old softpoly renderer and OpenGL 2.x being gone there is no more need for such complex handling, it is now a single function in d_main.cpp.
2020-04-27 22:24:41 +02:00
alexey.lysiuk
62d4bbbe65 - restored Wads.GetNumLumps() scripted function
https://forum.zdoom.org/viewtopic.php?t=68300
2020-04-21 10:07:24 +03:00
Christoph Oelckers
5d49faf190 Merge branch 'master' into texture_rework 2020-04-19 21:15:28 +02:00
Christoph Oelckers
4fb6b7c7d4 - block off the Substitute function by making it private to the 3 classes that really need it. 2020-04-19 21:08:24 +02:00
Christoph Oelckers
9099bc8420 - reworking some lower level texture code. 2020-04-19 10:57:46 +02:00
Christoph Oelckers
b18faacab0 - 2D drawer cleanup. 2020-04-11 20:20:58 +02:00
Christoph Oelckers
ac1f4b8f11 - initialize native functions before the first query. 2020-04-11 20:20:57 +02:00
Christoph Oelckers
2e5bc3e962 - moved compiler frontend to 'common'. 2020-04-11 20:20:56 +02:00
Christoph Oelckers
466ed4e8f2 - separated the Doom specific parts of the ZScript parser from the core into a subclass. 2020-04-11 20:20:56 +02:00
Christoph Oelckers
2838f5792c - moved all FString exports from vmthunks to stringformat.cpp. 2020-04-11 20:20:55 +02:00
Christoph Oelckers
a28182fe35 - moved the script compiler's backend to 'common'. 2020-04-11 20:20:55 +02:00
Christoph Oelckers
3454314bb1 - separated the Doom specific parts from the compiler backend into a separate file, these parts now get invoked via callback hooks. 2020-04-11 20:20:55 +02:00
Christoph Oelckers
64dc9ac456 - moved around some bits of code. 2020-04-11 20:20:54 +02:00
Christoph Oelckers
1ce11ff02a - dictionary can also go to 'common'. 2020-04-11 20:20:54 +02:00
Christoph Oelckers
7b292cca57 - split the serializer in two to keep the Doom specific parts out of the main file. 2020-04-11 20:20:53 +02:00
Christoph Oelckers
f02c5c0a56 - took InitializeDefaults out of PClass and moved it to PClassActor.
Like so many other parts, this created a hard dependency of the low level code on very invasive game content.
2020-04-11 20:20:53 +02:00
Christoph Oelckers
cf51508ce6 - moved around some pieces of code to make sharing with Raze easier. 2020-04-11 20:20:52 +02:00
Christoph Oelckers
f8ac9a2662 - moved DObject and core parts of the VM to 'common'.
# Conflicts:
#	src/common/objects/dobject.h
2020-04-11 20:20:51 +02:00
Christoph Oelckers
f8e9cb8fbc - major dependency reduction of the texture system. 2020-04-11 20:20:37 +02:00
Christoph Oelckers
4af96bab47 - some cleanup on music code.
* change the license of the main file because there is no more id-based code here licensed under the GPL.
* moved VM interface definition out of the implementation.
* moved idmus CCMD out of implementation because it is dependent on Doom level definitions.
* moved s_music.cpp into the music folder with the rest of the music code.
2020-04-11 20:19:54 +02:00
Christoph Oelckers
ac610d87e5 - merged FPalette and PaletteContainer. 2020-04-11 20:19:53 +02:00
Christoph Oelckers
7243495b16 - moved special color maps to utilities.
The default tables are needed by the texture compositor which should be universal, so this needs to be, too.
2020-04-11 20:19:52 +02:00
Christoph Oelckers
d7a9bdc858 - moved key definitions to their own header.
- moved VM hooks to vmthunks.cpp.
- header cleanup for c_bind.h to avoid including high level game definitions.
2020-04-11 20:19:25 +02:00
Christoph Oelckers
b7ff7302e5 - copied some CCMD improvements from Raze
* no longer uses copystring function.
* ability to dynamically register CCMDs.
2020-04-11 20:19:24 +02:00
Christoph Oelckers
4a50f78bfe - more work on console code. 2020-04-11 20:19:24 +02:00
Christoph Oelckers
1479e3a1c3 - CVAR cleanup, in particular decoupling from game internals, which now get handled via callbacks. 2020-04-11 14:00:22 +02:00
Christoph Oelckers
c713850dac - moved sc_man and palettecontainer to the 'common' folder. 2020-04-11 14:00:21 +02:00
Christoph Oelckers
05d8856fe0 - moved file system implementation to 'common'. 2020-04-11 14:00:20 +02:00
Christoph Oelckers
80c6d5b276 - renamed more stuff and also moved the Strife teaser voice handling out of the file system. 2020-04-11 14:00:19 +02:00
Christoph Oelckers
c1bb7de23a - more file system refactoring.
* moved the sprite renaming out of the file system entirely into a caller-provided callback.
* renamed several functions to closer match the terms of a file system.
* moved the VM interface out of the implementation.
2020-04-11 14:00:19 +02:00
Christoph Oelckers
6bccde3b51 - renamed the file system related classes to actually use the term "FileSystem". 2020-04-11 14:00:18 +02:00
Christoph Oelckers
ace3e29473 - removed the implicit conversion operators from FName.
These were creating dangerous interdependencies. It is better to do explicit conversions when needed.
As an added plus, this means that zstring.h no longer depends on name.h which was very annoying.
2020-04-11 14:00:13 +02:00
Christoph Oelckers
6996d54a23 - moved more code to 'common'.
This is all low level utilities with no dependencies on game logic. Having this in a separate directory makes sharing with Raze a lot easier.
2020-04-11 14:00:12 +02:00
Christoph Oelckers
e230420f88 - moved all character set utilities to utf8.cpp.
- moved matrix class to 'common'.
2020-04-11 14:00:12 +02:00
Christoph Oelckers
cf757ba834 - made the translation container a class.
This also splits off some Doom-specific implementation details into higher level headers.
2020-04-11 14:00:11 +02:00
Christoph Oelckers
b0ecb02d6b - move SuperFastHash to its own set of files, instead of having this tied to the console.
- replace swapvalues with std::swap globally.
- added some additions to utility code from Raze, mainly to reduce file content differences.
- reduced some unused utilities
2020-04-11 14:00:10 +02:00
Christoph Oelckers
cc48f18303 - moved the dictionary implementation into the 'scripting' folder where it really belongs. 2020-04-11 14:00:09 +02:00
nashmuhandes
cb6514cc05 Added Actor.CopyBloodColor to copy another existing actor's blood color. 2020-03-23 21:04:59 +01:00
alexey.lysiuk
f46e80e2b4 - fixed FLineTraceData scripting definition
https://forum.zdoom.org/viewtopic.php?t=67795
2020-03-14 12:51:06 +02:00
alexey.lysiuk
b9d4ce052b - replaced assert() in ZScript fields compilation code
Field pointer can be null if error occurred while compiling its definition
2020-03-14 12:50:10 +02:00
Alexander Kromm
3607ffaf66 fix Dictionary and DictionaryIterator memory leaks 2020-03-08 18:46:37 +01:00
alexey.lysiuk
fcf004ec39 - fixed infinite loop reporting '... before first state' errors
https://forum.zdoom.org/viewtopic.php?t=67729
2020-03-05 11:01:33 +02:00
Rachael Alexanderson
178cf40428 - fix debug assertion, cleanup vestigial A_PlaySound addition 2020-03-03 22:50:01 -05:00
Rachael Alexanderson
9e5444f8ae - fixed: removed startTime from the wrong function internally. 2020-03-02 22:15:37 +01:00
Rachael Alexanderson
3d3a29979b - remove addition from deprecated A_PlaySound 2020-03-02 22:15:37 +01:00
Rachael Alexanderson
1b80b7bf2f - ported over Nash's startTime for A_StartSound 2020-03-02 22:15:37 +01:00
Major Cooke
4cf7c6351d Added A_StopSounds(int chanmin, int chanmax).
- If both channels are 0, completely silences the actor.
- Adapted A_StopAllSounds to call A_StopSounds(0,0);
2020-03-01 19:42:21 +01:00
Major Cooke
55284d46bf Added A_StopAllSounds. 2020-02-29 19:19:51 +01:00
Chronos Ouroboros
6486380dd1 Fixed a crash when trying to include a missing mixin. 2020-02-14 22:26:30 -03:00
Chronos Ouroboros
d22a4c835c Mixins now perform a deep copy of the AST. (Fixes default blocks in mixins) 2020-02-08 16:48:15 -03:00
Major Cooke
e13d43a576 Fixed colorization not being applicable to bottom wall textures. 2020-02-07 22:56:46 -06:00
alexey.lysiuk
dd54c14380 - fixed code generation for very special if+switch combination
CheckReturn() must be called before emitting code, otherwise it will always return false for switch statements
Redundant jump instruction added because of that will point right after the end of function's code when if statement is the last one in the given function
This wasn't a problem for VM because bytecode in question was unreachable
JIT compiler tries to generate native code for a bogus jump destination, and this leads to out-of-bounds read from labels array

https://forum.zdoom.org/viewtopic.php?t=67149
2020-01-30 18:01:52 +02:00
alexey.lysiuk
0d758014dd - exposed Level.MusicVolume to ZScript 2020-01-20 22:05:15 +01:00
alexey.lysiuk
a05a5a8f00 - fixed calling a function on string CVar
https://forum.zdoom.org/viewtopic.php?t=66768
2020-01-19 16:49:51 +01:00
alexey.lysiuk
5a19010699 - added ability to filter VM disassembly dump
Use '-dumpdisasm something' to output functions with 'something' in their printable names
Open and close output file only once when processing code generated by Dehacked, and calculate its sizes as well
2020-01-19 16:48:35 +02:00
Chronos Ouroboros
a83fff0eb4 Disabled default blocks in mixins for now. 2020-01-05 19:07:03 -03:00
Chronos Ouroboros
6ccbccc3de Removed a redundant switch and added a default case to the mixin parsing code to shut GCC up. 2020-01-04 15:11:31 -03:00
Christoph Oelckers
b7e1a35e6f - cleaned up the parameters of A_StartSound.
There were two booleans that could be merged into the flag word.
This also fixes a bug with CHAN_NOSTOP not working for local sounds because it checked the wrong sound source for the playing sound.
2020-01-04 14:25:55 +01:00
Major Cooke
0b0984b88e Added STOPRAILS actor flag.
- An actor with this flag will prevent railgun shots from penetrating further.
2019-12-30 08:37:08 +01:00
Alexander Kromm
703686beee export TMap<FString, FString> to ZScript 2019-12-29 13:37:38 +01:00
Christoph Oelckers
9b9fd35107 - hooked up the colorization feature.
It can now be used from UDMF and ZScript.
To avoid clutter it doesn't allow setting the values individually but requires definition of a data record in TEXTURES.

colorization
{
    DesaturationFactor <float>
    Invert
    AddColor <color>
    ModulateColor <color>
    BlendColor <color>, <mode> [, <alpha>]
}

Mode for BlendColor can be Alpha (normal translucent blending), as well as 3 special values taken from Build engine games: Screen, Overlay and HardLight.
2019-12-29 11:30:37 +01:00
Christoph Oelckers
bb8db9422f - scaled down the texture colorization feature for easier usability.
It makes little sense exposing every minute detail of this through UDMF.
Setting it up that way is far too complicated. Using virtual textures that map to a real texture plus a colorization record should be far easier to use by mappers.
This also doesn't piggyback on the Doom64 color feature anymore and is completely separate, despite some redundancies.
This is still missing the texture definition part, though.
2019-12-20 22:25:10 +01:00
Christoph Oelckers
3a249cb06f - added high level interface to the new properties, i.e. UDMF and ZScript. 2019-12-20 18:02:42 +01:00
Christoph Oelckers
136ab4f48a - renamed IsActorPlayingSomething to IsActorPlayingSound and made it clearscope. 2019-12-17 09:58:50 +01:00
Christoph Oelckers
e82565373f - separated the channel number from the flags in the sound interface so that the 8 channel limit can be eliminated.
- added Marisa Kirisame's CHAN_OVERLAP flag.
- exported S_IsActorPlayingSomething to ZScript.

The sound API change required deprecating A_PlaySound and S_Sound. There are now new variants S_StartSound and A_StartSound which have two distinct parameters for channel and flags.
2019-12-16 23:52:39 +01:00
Christoph Oelckers
b9582cc98e - continued refactoring on sound code.
The game independent part of the code has been mostly isolated.
2019-12-08 21:22:53 +01:00
Christoph Oelckers
fd181f469d - reduced the dependency of the sound system on game state.
Many of the simple wrappers have been moved to a separate file and the sound source handling has been abstracted.
This is only the first phase, the work is not complete yet.
Also changed the license of the sound code to BSD after verifying that this code bears no similarity to id's original sound code anymore, save for a few function names (which are due to be refactored out anyway.)
2019-12-08 13:28:52 +01:00
Chronos Ouroboros
b9367caa6f Fixed the JIT's OP_VTBL check not checking if it's already at the start of the code. 2019-12-04 17:37:20 -03:00
Player701
db1359f98e - Implemented scale parameter for BaseStatusBar::DrawString 2019-11-24 10:45:07 +01:00
alexey.lysiuk
cf8c05c9c4 - fixed missing checks for function calls from DECORATE
State functions could call ZScript code with incompatible self pointer, e.g. weapon's function could be called with self pointed to player pawn
DECORATE scripts that contain such errors are no longer accepted

https://forum.zdoom.org/viewtopic.php?t=66429
2019-11-21 16:58:28 +02:00
alexey.lysiuk
6ad965abb5 - improved handling of return value mismatches
Prohibit returning more values than declared in function
The exception is a void function returning one value, but only for compatibility with old scripts

https://forum.zdoom.org/viewtopic.php?t=66341
2019-11-10 11:14:08 +02:00
Player701
8c05816378 - Fixed erroneous "Return type mismatch error" when returning value of derived type 2019-11-10 09:58:25 +02:00
Chronos Ouroboros
583d8faf5c Fixed mixins. 2019-11-04 18:31:31 -03:00
Chronos Ouroboros
af17864968 Fixed a bug in the flagdef processing code. 2019-11-01 18:38:19 -03:00
Chronos Ouroboros
e63b6d494a Added mixins for classes. 2019-11-01 18:34:52 -03:00
alexey.lysiuk
fb384c6b8d - fixed usage of uninitialized object in BlockLinesIterator
DBlockLinesIterator::check was used by FMultiBlockLinesIterator before it was constructed

https://forum.zdoom.org/viewtopic.php?t=66224
2019-10-26 11:01:49 +03:00
Chronos Ouroboros
3071723a67 Fixed dynamic arrays as function arguments. 2019-10-23 18:38:41 -03:00
alexey.lysiuk
94e7b6f3b5 - do not accept read-only variable as out argument
https://forum.zdoom.org/viewtopic.php?t=66179
2019-10-22 11:11:22 +03:00
alexey.lysiuk
9a727f6c2f - fixed variable's stack offset for implicit dynarray clearing
https://forum.zdoom.org/viewtopic.php?t=66187
https://forum.zdoom.org/viewtopic.php?t=66189
https://forum.zdoom.org/viewtopic.php?t=66198
2019-10-22 10:40:45 +03:00
Chronos Ouroboros
4fa6678fc5 Fixed Vector2/3 out parameters in the ZScript compiler. 2019-10-21 16:30:05 -03:00
alexey.lysiuk
994960627b - added explicit clearing of global VM stask
When exception is thrown from JITed code, VM stask isn't cleared during unwinding
It needs to be clear explicitly to avoid memory leaks and references to destructed objects on shutdown

https://forum.zdoom.org/viewtopic.php?t=66172
2019-10-21 15:54:13 +03:00
alexey.lysiuk
ce8b235d0b - implicitly clear local dynamic arrays
https://forum.zdoom.org/viewtopic.php?t=62710
2019-10-20 12:20:18 +02:00
alexey.lysiuk
5a6d8035d0 - added access check for state functions
Private functions cannot be called from derived classes anymore

https://forum.zdoom.org/viewtopic.php?t=66158
2019-10-19 14:50:36 +02:00
Christoph Oelckers
523fd0bf3a Revert "AsmJit update"
This reverts commit 747b3dfcfe.

# Conflicts:
#	libraries/asmjit/asmjit/core/compiler.h

This had to be reverted because it breaks exception handling which is a critical problem.
With the updated code any exception thrown inside code that had a JITed call stack would crash.
2019-10-07 20:34:55 +02:00
Christoph Oelckers
c42deda6e6 - cleanup of the remaining music code in the main project 2019-09-30 02:31:12 +02:00
Christoph Oelckers
c8c8fecad3 - fixed a few warnings. 2019-09-16 17:30:39 +02:00
Marisa Kirisame
bcef440511 Squashed commit of the following:
commit 6ecd831eb45a8258995c02664450c3ca8cfe5b48
Merge: a4fb1f61c afbd7f7a2
Author: Marisa Kirisame <marisa@sayachan.org>
Date:   Sun Jul 28 22:02:19 2019 +0200

    Merge branch 'master' of github.com:coelckers/gzdoom into f3dfloor_export

commit a4fb1f61c0532d3a6051d4c1fca4ac72ec33e060
Author: Marisa Kirisame <marisa@sayachan.org>
Date:   Fri Jul 12 15:43:25 2019 +0200

    Renamed EFFloorType enum in ZScript to the more descriptive EF3DFloorFlags

commit 9ad1c3b5625d53c06229be2a94d44fa0f36f41fd
Author: Marisa Kirisame <marisa@sayachan.org>
Date:   Sun Jul 7 20:25:31 2019 +0200

    Add bounds checks to Get3DFloor/GetAttached

commit dd2a7956a887b92ed24ce5e79f10b1a445664d6c
Author: Marisa Kirisame <marisa@sayachan.org>
Date:   Sun Jul 7 17:13:44 2019 +0200

    Correct handling of 3d floor plane texture getting.

commit 9b748287892c8fdee9ac67019bf1f66bc4b69eab
Author: Marisa Kirisame <marisa@sayachan.org>
Date:   Sun Jul 7 16:14:45 2019 +0200

    Implemented requested changes to F3DFloor exports.
    * Getters for ffloors/attached arrays.
    * Getter for 3D floor top/bottom texture.

commit 6a1482bb0637a70890629e4c13e8759c7a3673f3
Author: Marisa Kirisame <marisa@sayachan.org>
Date:   Sat Jul 6 13:42:52 2019 +0200

    Renamed exported extsector pointer in Sector struct to something more descriptive.

commit 7c6783d43b898cbd7a01fb2191fd401ed8e8c300
Merge: ff64e04b2 8d36f0a0c
Author: Marisa Kirisame <marisa@sayachan.org>
Date:   Mon Apr 29 12:40:44 2019 +0200

    Merge branch 'master' into f3dfloor_export

commit ff64e04b251f23325d2f72bc25c59f34b4cab6fa
Merge: a90947392 5b6bae409
Author: Marisa Kirisame <marisa@sayachan.org>
Date:   Sun Apr 21 16:56:18 2019 +0200

    Merge branch 'master' into f3dfloor_export

commit a90947392a27eb1c2dac7005614592ec2f410274
Author: Marisa Kirisame <marisa@sayachan.org>
Date:   Mon Feb 4 17:47:25 2019 +0100

    Export F3DFloor structure and related data.
    Small changes to Trace code to better use this struct.
2019-09-11 08:19:19 +03:00
alexey.lysiuk
98128d9fa3 - added ability to specify deprecation messages in ZScript
It's an optional extension of deprecated keyword:
    deprecated("2.4", "use ModernFunction instead") int OldFunction();
    deprecated("3.5", "use ModernVariable instead") int OldVariable;

Usage of such members will produce the following report:
    Script warning, ":zscript.txt" line 123:
    Accessing deprecated function OldFunction - deprecated since 2.4.0, use ModernFunction instead
    Script warning, ":zscript.txt" line 456:
    Accessing deprecated member variable OldVariable - deprecated since 3.5.0, use ModernVariable instead
2019-08-28 13:37:48 +02:00
Petr Kobalicek
747b3dfcfe AsmJit update 2019-08-19 21:02:36 +02:00
alexey.lysiuk
28ea567c22 - fixed doubling of deprecation warnings for ZScript code
https://forum.zdoom.org/viewtopic.php?t=65617
2019-08-15 16:31:50 +03:00
Christoph Oelckers
cf74118d53 - fixed the extremely long standing bug that Lost Souls didn't reacquire their target when slamming into something.
This was one of that annoying old design mistakes where Doom and Heretic features were poorly merged together. The Heretic Gargoyle uses very similar coding but performs a subtly different action when actually hitting another actor. This different action was made the default, even for the Lost Soul.
It has now been changed that both monsters use their original action, being distinguished by an actor flag. For compatibility with custom definitions Heretic's behavior, which has been the default in ZDoom will be the preferred one. The one of the Lost Soul can be reactivated by a flag.
2019-08-11 09:00:29 +02:00
alexey.lysiuk
07a2331ca3 - exposed Append() method to ZScript dynamic array
https://forum.zdoom.org/viewtopic.php?t=65570
2019-08-10 16:37:40 +03:00
Christoph Oelckers
3e99216967 - added option to print a map author's name on the summary screen
For now only with font-printed map names. Allowing this with titlepatches will require more work and an option to disable.
2019-08-02 09:11:40 +02:00
Christoph Oelckers
c36dc137ba - made adjustments to the text placement on the summary screen.
With extended fonts much of the old code did not work anymore, this needed more precise checks for the sources of the printed texts.
2019-07-30 10:53:02 +02:00
Major Cooke
15eabfd055 Added A_SoundPitch and an optional pitch parameter to A_PlaySound and S_Sound.
- Note: Because sound channels are not in zscript, there's no way to modify a sound made by S_Sound.
2019-07-24 20:15:24 +02:00
drfrag
416f5d03b7 - Fixed compilation with MinGW. 2019-07-15 19:26:25 +02:00
Christoph Oelckers
cd7438c02e - made some adjustments to the text spacing on the level summary screen.
With the extended fonts some parts here caused too large gaps.
2019-07-14 12:44:42 +02:00
alexey.lysiuk
b7e0a8d2c7 - added validation for presence of drop item classes
https://forum.zdoom.org/viewtopic.php?t=65307
2019-07-11 14:11:01 +02:00
alexey.lysiuk
9332a63ce5 - fixed LevelLocals.isFrozen() return value with JIT disabled
No more 'Number of parameters returned differs from what was expected by the caller' assertion failures
2019-07-07 15:31:06 +03:00
Christoph Oelckers
5df8919b90 Merge branch 'master' into userlights 2019-07-07 08:11:09 +02:00
Rachael Alexanderson
bc88ceea94 - clarify too old ZScript version message 2019-06-30 22:14:23 -04:00
cybermind
1b7aeb35e1 Fixed copy-paste typo in SphericalCoords 2019-06-29 21:32:41 +03:00
Christoph Oelckers
1dcbe43d95 - User definable dynamic lights
This hasn't been tested yet!
2019-06-28 12:35:42 +02:00
Chronos Ouroboros
1b106d109d Fixed "if (!(lhs ~== rhs))" breaking with vectors. 2019-06-14 12:49:57 +02:00
alexey.lysiuk
d27a7cd84b - removed explicit self null tests from dynarray native wrappers
They are useless since d3e6ed3c9b in which generation of implicit self null pointer check was added to JIT
2019-06-09 10:27:21 +03:00
alexey.lysiuk
4a2ae357a2 - report implicitly initialized variable in code generator once
Vectors are no longer reported several times
Previously, warnings were issued per every register
2019-06-08 11:12:34 +03:00
alexey.lysiuk
6f1df5b5ab - added implicit initialization of reused register variables in ZScript 2019-06-07 13:43:51 -04:00
alexey.lysiuk
d3e6ed3c9b - added null check for self pointer before calling a native function
With JIT enabled, an implicit test for null self pointer is added to generated code
This has no effect without JIT as VM verifies a pointer before calling a native method

https://forum.zdoom.org/viewtopic.php?t=64961
2019-06-07 11:02:38 -04:00
Chronos Ouroboros
87c426dcfd Really fixed arrays of dynarrays this time. 2019-06-05 08:24:56 +02:00
Alexander
380398bcd6 added native double round(double) function 2019-06-03 19:48:45 +02:00
alexey.lysiuk
d9c619c800 - adjusted condition for ZScript global variable deprecation warning
The message is always printed for any use of deprecated global variable
If such variable is accessed inside a deprecated function from a core script lump, the message is printed only when verbosity level is set to highest

https://forum.zdoom.org/viewtopic.php?t=64830
2019-05-30 10:20:49 +03:00
alexey.lysiuk
249e658f8b - fixed missing deprecation warnings for ZScript global variables
https://forum.zdoom.org/viewtopic.php?t=64830
2019-05-29 17:37:31 +03:00
alexey.lysiuk
38291dfacc - fixed: version wasn't set for ZScript global variables
https://forum.zdoom.org/viewtopic.php?t=64830
2019-05-29 17:37:08 +03:00
alexey.lysiuk
d336a83355 - fixed code generation for ternary operator with vector result types
https://forum.zdoom.org/viewtopic.php?t=64831
2019-05-29 13:24:03 +03:00
alexey.lysiuk
677b24b108 - fixed crash on message output during decorate parsing
Script position is now initialized at the very beginning of decorate parsing process
Script position no longer contains uninitialized file name

https://forum.zdoom.org/viewtopic.php?t=64836
2019-05-28 18:13:34 +03:00