Commit graph

7912 commits

Author SHA1 Message Date
Christoph Oelckers
a45523fb63 - scriptified A_SpawnFly.
- added support for global variables to the code generator - not the compiler, though. For the handful of entries this is needed for it may just as well be done manually. So far FLevelLocals level is the only one being exported.
- fixed: The VM disassembler truncated 64 bit pointers to 15 digits because the output buffer was too small.
- resolve entire FxSequences instead of aborting on the first failed entry. This allows to output all errors at once.
2016-11-03 13:38:40 +01:00
Christoph Oelckers
6aecb29995 - fixed: The VM function builder was set up with the wrong number of implicit arguments. 2016-11-02 16:05:57 +01:00
Christoph Oelckers
ff66dc3189 - flatten FxBinaryLogical chains into a single node for more efficient processing. 2016-11-02 15:46:15 +01:00
Christoph Oelckers
eca4fba0f6 - fixed a merge conflict which wasn't flagged by TortoiseMerge. 2016-11-02 14:15:09 +01:00
Christoph Oelckers
3a7f51db88 a_hereticimp.cpp does not exist anymore... 2016-11-02 13:39:37 +01:00
Christoph Oelckers
c44dc8d951 Merge branch 'master' of https://github.com/rheit/zdoom into zscript 2016-11-02 11:46:18 +01:00
Christoph Oelckers
570572fcf2 - scriptified a_hereticimp.cpp.
- fixed the comparison against 0 simplification which did not negate the result for '=='.
2016-11-02 11:44:48 +01:00
Christoph Oelckers
8b21719068 Merge branch 'zscript' of https://github.com/rheit/zdoom into zscript 2016-11-02 11:43:23 +01:00
Christoph Oelckers
703aaa373e SHA-1: 8852bc7278d033bbed66c51bf23aee841ee977a9
* Revert "Modify CMPJMP to produce more compact code (as far as VC++ is concerned, anyway)"

This reverts commit 6ff973a06b.

This modification did not work and broke the comparisons. Actually this had three problems:

* the asserts checked the wrong instruction
* the mask was not applied to regular comparisons.
* incrementing PC before testing does not work because 'test' references the PC.
2016-11-02 11:40:43 +01:00
Christoph Oelckers
f940216c17 Merge branch 'master' into zscript
# Conflicts:
#	src/p_actionfunctions.cpp
#	wadsrc/static/actors/actor.txt
2016-11-02 11:08:51 +01:00
Christoph Oelckers
ff8b216167 SHA-1: 8852bc7278d033bbed66c51bf23aee841ee977a9
* Revert "Modify CMPJMP to produce more compact code (as far as VC++ is concerned, anyway)"

This reverts commit 6ff973a06b.

This modification did not work and broke the comparisons. Actually this had three problems:

* the asserts checked the wrong instruction
* the mask was not applied to regular comparisons.
* incrementing PC before testing does not work because 'test' references the PC.
2016-11-02 10:52:14 +01:00
Marisa Heit
f8641c0ffb Fixed: MaxVisForFloor was broken by the switch to floats
- TODO: See if these visibility limits are even needed anymore.
2016-11-02 00:07:57 -05:00
Marisa Heit
3f32ccada6 Zero In2D before calling Flip()
- Fixes an assert when resizing the window in windowed mode. Flip() can call
  V_OutputResized() in windowed mode.
2016-11-01 22:54:27 -05:00
Christoph Oelckers
5e76d3af18 - fixed BrainishExplosion and removed some unnecessary checks, the state to be set is being defined in the same file, after all... 2016-11-02 00:14:08 +01:00
Christoph Oelckers
88fd47247d - scriptified several trivial functions from a_action.cpp. 2016-11-01 16:32:47 +01:00
nashmuhandes
b420347bab Added "local" parameters to A_PlaySound and ACS PlaySound 2016-11-01 15:14:06 +01:00
Rachael Alexanderson
6755373f46 - fixed: map commands will now take capslock DM/COOP as arguments 2016-11-01 15:09:09 +01:00
Rachael Alexanderson
f72ebe6768 - Extended map, recordmap, and open commands to accept "dm/coop" as an extra parameter - to open maps in multiplayer mode with the requested ruleset. 2016-11-01 15:09:08 +01:00
Christoph Oelckers
6e0defdc69 - fixed numeric output precision for a few sliders. 2016-11-01 13:48:56 +01:00
Christoph Oelckers
3f57269a8b - fixed: ACSStringPool::AddString did not check for NULL pointers as input. Let's just map them to the empty string, that's a lot better than crashing. 2016-11-01 13:36:33 +01:00
Christoph Oelckers
4cf0d76e8c - fixed: RapidJSON in ASCII mode cannot handle extended 8 bit character sets and will produce broken data if the input contains some. This means we need to perform the conversion to UTF-8 on ZDoom's side and run RapidJSON in UTF-8 mode.
Daedalus triggers this with a 0x85 character which in Windows CP 1252 is the ellipsis (...) The converter will assume ISO-8859-1, though, but cannot do anything with these characters because they map to the font being used here.
2016-11-01 13:33:18 +01:00
Edoardo Prezioso
7137e87b4b - Fixed GCC/Clang errors from recent commits. 2016-11-01 10:35:45 +01:00
Edoardo Prezioso
46a311b23c - Fixed a typo in 1 pixel tall support addition.
Found by Clang -Wparentheses warning.
2016-11-01 09:59:59 +01:00
Marisa Heit
5df21fda68 Fixed: Masked midtexture yscale incorrectly used the texture's X scale 2016-11-01 00:18:56 -05:00
Marisa Heit
9388597443 Add 1 pixel tall and wide texture support to the renderer
- These require manual detection and overriding of the scaling factors to
  0, because a right shift of (32-0) bits wraps around to 0 and results in
  no shift at all rather than leaving the register zeroed out.
2016-11-01 00:08:16 -05:00
Marisa Heit
8d7e400f8e Fixed: DCanvas::FillSimplePoly must set dc_destorg
- dc_destorg is normally set to the upper-left corner of the view window.
  If there is a border, then this won't coincide with the upper-left
  corner of the screen, and DCanvas::FillSimplePoly would merrily write off
  the end of the screen buffer.
2016-10-31 22:34:46 -05:00
Christoph Oelckers
6e6249f896 - reverted WEAPONTOP to its original value of 32 and made the added fudging bit part of the render side.
This is needed so that 'offset(0,32)' does what it is supposed to do.
2016-10-31 18:53:28 +01:00
Christoph Oelckers
8e12e7462c Merge branch 'master' into zscript 2016-10-31 17:03:33 +01:00
Christoph Oelckers
e620c9bd7d - scriptified parts of a_bossbrain.cpp. Some things cannot be done yet, the script code is there but commented out.
- exported thinker iterator and drop item chain to scripting. Unlike its native counterpart the script-side iterator is wrapped into a DObject to allow proper handling for memory management.
- fixed: The VMFunctionBuilder only distinguished between member and action functions but failed on static ones.
- fixed: FxAssign did not add all needed type casts. Except for purely numeric types it will now wrap the expression in an FxTypeCast. Numeric handling remains unchanged for both performance reasons and not altering semantics for DECORATE.
- exported all internal flags as variables to scripting. They still cannot be used in an actor definition.
- make ATAG_STATE the same as ATAG_GENERIC. Since state pointers exist as actual variables they can take both values which on occasion can trigger some asserts.
- gave PClass a bExported flag, so that scripts cannot see purely internal classes. Especially the types like PInt can cause problems.

Todo: we need readonly references to safely expose the actor defaults. Right now some badly behaving code could overwrite them.
2016-10-31 17:03:26 +01:00
Braden Obrzut
43b2584f79 - Fixed: Reference to freed stack object in R_FindPlane. This caused a massive slowdown (90% drop in total performance) in R_FindPlane when built with optimizations on in GCC6. Although I don't really understand why since the comparison should have been O(1) regardless of memory contents and even if the check failed every plane it would still be pretty fast, this is what they mean when they say that anything can happen when undefined behavior is triggered. 2016-10-30 23:27:29 -04:00
Marisa Heit
6ff973a06b Modify CMPJMP to produce more compact code (as far as VC++ is concerned, anyway) 2016-10-30 22:16:02 -05:00
Christoph Oelckers
ede350ba36 - there seem to be some problems with the line endings... 2016-10-30 23:44:55 +01:00
FishyClockwork
4fc5d527c6 Moved 'goodbye' from usdf.txt to usdf_zdoom.txt
I have undone all my changes to usdf.txt.
It should look like how it did before commit 0df6ba6
2016-10-30 20:30:32 +01:00
FishyClockwork
7c1f7aa81c Restricted custom goodbyes to ZSDF 2016-10-30 20:27:07 +01:00
Kyle Evans
1502eae2ac Add XPM (X PixMap) version of ZDoom icon 2016-10-30 19:31:32 +01:00
FishyClockwork
8f2e9be70c Changed a description in usdf_zdoom.txt
Changed a description in usdf_zdoom.txt to be more truthful. It's not just one new field anymore.
(I really should learn to read these things before changing them.)
2016-10-30 19:30:56 +01:00
FishyClockwork
4a56d426c3 Actually put the new info in the proper section
Actually put the new info in the proper section in usdf_zdoom.txt
2016-10-30 19:30:55 +01:00
FishyClockwork
42be7bee93 For USDF treat Require/Exclude as unknown
For USDF treat Require/Exclude as an unknown keyword.
2016-10-30 19:30:55 +01:00
FishyClockwork
f450a60f66 Undone changes to usdf.txt, updated usdf_zdoom.txt
Undone changes to usdf.txt, updated usdf_zdoom.txt
2016-10-30 19:30:55 +01:00
FishyClockwork
c341bc0d3c Added restriction of Require/Exclude to ZSDF
Added restriction of Require/Exclude to ZSDF (namespace = "ZDoom";).
A warning will be printed if a Require/Exclude block is detected in USDF (namespace = "Strife";).
2016-10-30 19:30:54 +01:00
FishyClockwork
f1a80770e1 Updated the USDF specs
Updated the USDF specs about 'require' and 'exclude'.
2016-10-30 19:30:54 +01:00
FishyClockwork
b1880964fa Added two new sub-blocks for Choice blocks
Added two new sub-blocks for Choice blocks: Require and Exclude.
The syntax for both is the same as Cost blocks.

Require defines what item must be present in your inventory in order to show this choice/reply.
Exclude defines what item must not be present in your inventory in order to show this choice/reply.

If any Require/Exclude blocks are defined then this choice/reply will be hidden until all blocks of both types are satisfied.
2016-10-30 19:30:53 +01:00
Christoph Oelckers
2857fac338 - scriptified a_archvile.cpp.
- fixed the type checks for the conditional operator.
2016-10-30 18:41:39 +01:00
Christoph Oelckers
a652c5f259 - fixed: For named functions the prototype needs to be set before the code generator starts resolving. Otherwise it will crash on incompletely set up forward declarations. 2016-10-30 16:21:44 +01:00
Christoph Oelckers
f8ccda2dc8 - scriptified A_Mushroom to test something a bit more complex.
- fixed: FxMinusSign trashed local variables that were used with negation.
- fixed: FxConditional only handled ints and floats, but not pointers and strings.
- fixed: A 'no states in non-actors' error was triggered, even for classes without any states.
2016-10-30 14:00:11 +01:00
Christoph Oelckers
9eeb56212b - fixed: A VM function's NumArgs value needs to count stack arguments, not logical ones, meaning that for vectors each element needs to count separately.
- renamed VMFunction::Defaults to DefaultArgs to make searching easier.
- let ZCCCompiler process vector defaults for function parameters.
2016-10-30 09:05:42 +01:00
Leonard2
06ec6318a9 Fixed: A vector value could point to garbage data after being 'unnested' 2016-10-30 07:37:13 +01:00
Leonard2
5643d6c692 Make sure to use the REGT_MULTIREG flags for opcodes that need it 2016-10-30 07:37:12 +01:00
Leonard2
8be7af41a9 Don't use a struct reference for vectors as return type just like for parameters 2016-10-30 07:36:00 +01:00
Leonard2
94410accf4 Renamed "VectorInitializer" to "VectorValue"
This was really confusing for me as this is an actual vector "value" rather than an "initializer"
2016-10-30 07:34:14 +01:00