Christoph Oelckers
66d287ea81
- fixed: Stepping through a ceiling portal on a two-sided line did not work.
...
- fixed: Stepping up an actor checked against the sector's own ceiling, even if it was a crossable portal.
2016-12-08 10:16:22 +01:00
Rachael Alexanderson
40b68bfea0
Merge branch 'master' of https://github.com/coelckers/gzdoom
...
# Conflicts:
# src/CMakeLists.txt
2016-12-07 23:12:42 -05:00
Christoph Oelckers
12f0b56036
- fixed: Stepping up through a portal did not work when the step line was two-sided. This special case was only implemented for one-sided lines
...
- fixed: The portal collector set bad flags for collected lower portals.
2016-12-08 00:59:04 +01:00
Christoph Oelckers
1e950d75bd
- made dynamic light attenuation completely opt-in. This can be done either by setting a MAPINFO option for lights that do not automatically specify it and with a light property. The light property will always take precedence, if set.
2016-12-07 23:17:18 +01:00
Christoph Oelckers
aa939ef17a
Merge branch 'master' of https://github.com/coelckers/gzdoom
2016-12-07 22:53:06 +01:00
Christoph Oelckers
f547daccc8
Merge branch 'master' of https://github.com/rheit/zdoom
...
# Conflicts:
# src/CMakeLists.txt
2016-12-07 22:51:05 +01:00
Rachael Alexanderson
d12b92e926
Merge branch 'master' of https://github.com/rheit/zdoom
2016-12-07 16:49:44 -05:00
Magnus Norddahl
066158be69
Fix mirror
2016-12-07 22:26:18 +01:00
Magnus Norddahl
480b22c50e
Add more checks for FTexture::TEX_Null
2016-12-07 18:59:48 +01:00
Christoph Oelckers
6adcba3c4b
- fixed linkage for fuzzviewheight
...
- fixed naming conflict with GCC's virtual table.
2016-12-07 18:39:09 +01:00
Magnus Norddahl
9ed02a6aec
Merge remote-tracking branch 'zdoom/master' into qzdoom
...
# Conflicts:
# src/CMakeLists.txt
# src/doomtype.h
# src/r_drawt.cpp
2016-12-07 18:35:27 +01:00
Magnus Norddahl
e3e90e1a08
Merge TC handling back into r_draw
2016-12-07 18:28:06 +01:00
Magnus Norddahl
beb70d7dfa
Merge remote-tracking branch 'origin/zdoom_multithreaded' into qzdoom
...
# Conflicts:
# src/CMakeLists.txt
# src/r_3dfloors.cpp
# src/r_bsp.cpp
# src/r_bsp.h
# src/r_draw.h
# src/r_main.cpp
# src/r_main.h
# src/r_plane.cpp
# src/r_plane.h
# src/r_segs.cpp
# src/r_segs.h
# src/r_swrenderer.cpp
# src/r_things.cpp
# src/r_things.h
# src/r_thread.cpp
# src/r_thread.h
# src/v_draw.cpp
# src/win32/fb_d3d9.cpp
2016-12-07 18:22:02 +01:00
Edoardo Prezioso
e4c208602d
- Fixed GCC/Clang warning/error.
2016-12-07 16:07:25 +01:00
Christoph Oelckers
2677976cae
- r_drawt.cpp is no longer needed.
2016-12-07 15:44:25 +01:00
Christoph Oelckers
a118903e3e
- complete removal of assembly stuff. Nothing of this gets used anymore.
2016-12-07 14:41:21 +01:00
Christoph Oelckers
ed141943e1
- removed use of BestColor_MMX because there is no measurable improvement at all on a modern system. On top of that this function does not get called nearly often enough to justify the hassle. Like DoBlending this would require hundreds of calls per frame to make any impact that would be measurable.
2016-12-07 14:40:19 +01:00
Christoph Oelckers
5910067c44
- discontinue using the MMX assembly version of DoBlending.
...
Some benchmarking shows that on SSE systems it only harms performance and compared to the intrinsics version the gains are too marginal for something this infrequently called.
Doing 100000 calls of DoBlending results in a 5 ms decrease of using assembly vs intrinsics on a 3.4 GHz Core i7, meaning that even on a computer that is 10x slower you can still do 1000 or so blends per frame without a speed hit.
2016-12-07 14:40:18 +01:00
Rachael Alexanderson
2200f6eda3
- fixed: compile error with SDLGLVideo class macro
2016-12-07 13:21:28 +01:00
Christoph Oelckers
42346c58d3
- disabled assembly entirely to make the MT drawer submission compile.
...
This still requires a review of the two non-drawer functions that get 'lost'.
2016-12-07 12:31:43 +01:00
Christoph Oelckers
1e42c6f227
- added copyright headers to two files missing them.
2016-12-07 11:40:59 +01:00
Magnus Norddahl
3ff91807b8
Move swrenderer into a namespace, add multithreading framework, and move drawers to commands
2016-12-07 09:34:49 +01:00
Christoph Oelckers
56f67726f0
- seems a Linux file was missed when refactoring the IMPLEMENT_CLASS macros.
2016-12-07 00:54:40 +01:00
Rachael Alexanderson
c04e0d0df3
- fixed: Whoops. One of those danged macros got away. ;)
2016-12-06 18:44:59 -05:00
Rachael Alexanderson
8a23befd4d
- Fixed abstract class macro in SDLGLFB class.
2016-12-06 18:22:36 -05:00
Rachael Alexanderson
a78b713f4b
Merge https://github.com/coelckers/gzdoom
...
# Conflicts:
# src/v_video.cpp
2016-12-06 18:19:08 -05:00
Rachael Alexanderson
3fd4d00a77
- 1.2pre tag
2016-12-06 18:13:41 -05:00
Christoph Oelckers
6271ecf2af
Merge remote-tracking branch 'remotes/zdoom/master'
2016-12-06 22:47:53 +01:00
Christoph Oelckers
c3fb43db3a
Merge branch 'gz-zscript'
2016-12-06 22:47:37 +01:00
Christoph Oelckers
52645afb4b
- for the time being, make ZScript command line switch locked so that everybody understands that it's not ready for use in released mods yet.
2016-12-06 22:42:10 +01:00
Magnus Norddahl
0083c3c5f0
Fix some typos
2016-12-06 21:41:41 +01:00
Rachael Alexanderson
af330e1c41
Merge branch 'master' of https://github.com/coelckers/gzdoom
2016-12-06 13:55:46 -05:00
Magnus Norddahl
7441521a96
Remove comment about Build code as it is no longer correct (there's no build code left in that file)
2016-12-06 19:44:56 +01:00
Magnus Norddahl
30ddcfbc8f
Add tilted plane drawer
2016-12-06 19:44:28 +01:00
Christoph Oelckers
a3ae05299b
- fixed: glPolygonOffset was not called for flat sprites.
2016-12-06 19:17:02 +01:00
Magnus Norddahl
bec5d39ca8
ColoredSpan and FogBoundary drawers
2016-12-06 18:58:39 +01:00
Christoph Oelckers
c115c0a5b2
- fixed: Random flicker lights must set up their size on the first tic they are run. If not they will keep the radius of the previous effect which may be too large.
2016-12-06 18:35:34 +01:00
Magnus Norddahl
d8f805ddc9
Added DrawSlabPalCommand and rewrote the actual for loop so nobody can say it came from build..
2016-12-06 18:31:26 +01:00
Magnus Norddahl
6054db0d86
Make puzzy pinky fuzzywuzzy about threads
2016-12-06 15:29:04 +01:00
Magnus Norddahl
c16506bf59
Add thread awareness to the rt family of drawers
2016-12-06 15:13:43 +01:00
Christoph Oelckers
d04c37101e
Merge branch 'master' of https://github.com/coelckers/gzdoom
2016-12-06 12:59:03 +01:00
Christoph Oelckers
17698467d7
- made application of dynamic lights to additively blended surfaces a MAPINFO option. In most cases this is not wanted but sometimes this can be used to good effect so it should be there as an option.
2016-12-06 12:58:45 +01:00
Christoph Oelckers
fb7b49bba1
Merge branch 'master' of https://github.com/rheit/zdoom
2016-12-06 12:35:22 +01:00
Christoph Oelckers
e41e404143
Merge branch 'zscript' of https://github.com/rheit/zdoom into gz-zscript
2016-12-06 12:33:52 +01:00
Christoph Oelckers
b2d1b0d7a6
- fixed: FTranslatedLineTarget::angleFromSource returned the attack angle, not the angle between actors when returned from P_LineAttack.
...
For most attack functions this is wrong, it's only the Hexen fighter attack needing this particular value, so it has been split up into two return values now.
2016-12-06 11:04:54 +01:00
Magnus Norddahl
6a3ae2ce45
Add Rt drawers
2016-12-06 07:23:55 +01:00
Magnus Norddahl
f4172782ed
Fix compile error in debug builds
2016-12-06 06:22:58 +01:00
Magnus Norddahl
bd8b05e10a
Fix compile error
2016-12-06 05:07:37 +01:00
Christoph Oelckers
daaa6e7831
- fixed bad parameter in AActor::ModifyDamage.
2016-12-06 00:00:56 +01:00
Rachael Alexanderson
ba723f5296
Merge branch 'master' of https://github.com/coelckers/gzdoom
2016-12-05 17:07:27 -05:00
Rachael Alexanderson
824705eaca
- Fixed compile errors with maxviewpitch update
2016-12-05 22:32:18 +01:00
Rachael Alexanderson
c53a20aea6
- Notify gamesim of maxviewpitch change.
2016-12-05 22:32:18 +01:00
Rachael Alexanderson
caa0deec10
- r_polyrenderer now notifies the gamesim on change of new pitch limits.
2016-12-05 16:05:33 -05:00
Christoph Oelckers
092461ed34
- make dynamic object casts a dedicated VM instruction instead of a builtin function.
...
This can see some heavy use in iterators where saving several hundreds of function calls can be achieved. In these cases, using a function to do the job will become a significant time waster.
2016-12-05 14:52:34 +01:00
Magnus Norddahl
6122d982b7
Thread awareness to column drawers
2016-12-05 13:47:30 +01:00
Christoph Oelckers
f722967abe
- added automatic type deduction capabilities for local variables. If you type 'let variable = value;' the type of 'variable' will be deduced from the given value. This is mostly of interest for type casting pointers, because 'let p = Classtype(objectvar);' does not require writing the class type name twice.
2016-12-05 13:24:42 +01:00
Magnus Norddahl
836c7a5351
Make sky drawers thread aware
2016-12-05 13:23:30 +01:00
Magnus Norddahl
246d1625e5
Make wall drawers thread aware
2016-12-05 13:05:05 +01:00
Magnus Norddahl
d8a3174330
Thread awareness to the span drawers
2016-12-05 12:47:43 +01:00
Magnus Norddahl
2ca0238e2f
Add column drawers
2016-12-05 12:41:16 +01:00
Magnus Norddahl
bc66682860
Add sky drawers
2016-12-05 12:16:10 +01:00
Christoph Oelckers
67bdac5227
Merge branch 'master' into zscript
2016-12-05 12:03:59 +01:00
Magnus Norddahl
b755f489a3
Fix types
2016-12-05 12:01:03 +01:00
Magnus Norddahl
3b2d4fcff2
Added span drawers
2016-12-05 11:59:48 +01:00
Magnus Norddahl
645aed62d1
Add wall drawers
2016-12-05 11:38:21 +01:00
Magnus Norddahl
dfbd7fd2ad
Add drawer commands for pal mode
2016-12-05 10:44:24 +01:00
Magnus Norddahl
7ffab207cb
Move rgba drawers to be dispatched by r_draw_tc
2016-12-05 09:22:45 +01:00
Magnus Norddahl
8a12d040de
Merge remote-tracking branch 'zdoom/master' into qzdoom
...
# Conflicts:
# src/r_draw.cpp
# src/r_draw.h
2016-12-05 08:22:04 +01:00
Magnus Norddahl
2f3a6da295
Fix buffer overrun
2016-12-05 04:05:55 +01:00
Christoph Oelckers
c0a622eb54
- removed pointless assignment.
2016-12-05 02:08:26 +01:00
Rachael Alexanderson
659abc9451
- Removed vestigial prototype.
2016-12-04 19:18:13 -05:00
Christoph Oelckers
28f9216e7b
- fixed a few prototypes.
2016-12-04 19:16:40 -05:00
Christoph Oelckers
f6fb27b683
- deleted rt_copy*col and rt_map*col assembly versions after running benchmarks that show inferior performance to the C++ versions on both older and newer CPUs.
2016-12-05 00:46:58 +01:00
Christoph Oelckers
86fcc3fd21
- added a heavily optimized version of vlinec4 for x64. The original loaded everything from the global variables. While this is acceptable in 32 bit code because it has an immediate register load instruction, for 64 bit this does not exist. Accessing these variables from the stack or a register doubles the execution speed of this function and on a Core i7-3770 from 2012 is even faster than the assembly version. Right now the assembly version is still there, pending a benchmark run on an older 64 bit system.
2016-12-04 23:53:36 +01:00
Christoph Oelckers
f4454d2e00
- minor, but very effective optimization for R_DrawSpanMasked: Do not store the texel value in a byte. Store it in a local int variable. This allows the compiler to read it with a zero extending instruction instead of using a byte reading instruction and then later having it to convert to an int anyway. This removes one instruction from the loop which results in a 10% performance increase on 32 bit.
2016-12-04 19:32:54 +01:00
Christoph Oelckers
c9caaf08c8
- removed asm version of R_DrawFuzzColumn, because even on my 9 year old laptop this was significantly slower than the C version.
2016-12-04 18:38:38 +01:00
Christoph Oelckers
13efb34964
- removed the asm version of R_DrawColumn because it doesn't provide any significant benefit.
...
On modern systems it is actually slower than the C version, only on old ones it is marginally faster - but the overall execution time for this function is so low that even in the worst case scenario the minor loss of performance on older systems is still not relevant.
2016-12-04 18:05:34 +01:00
Christoph Oelckers
8fd03bc4a3
- fixed a few prototypes.
2016-12-04 16:57:10 +01:00
Rachael Alexanderson
c59925085c
- Removal of the ASM functions resulted in failed compile when NO_ASM is set.
2016-12-04 10:05:01 -05:00
Rachael Alexanderson
4196a4d055
Merge branch 'master' of https://github.com/rheit/zdoom
2016-12-04 09:34:49 -05:00
Rachael Alexanderson
7f86a5148c
Merge branch 'master' of https://github.com/rheit/zdoom
...
# Conflicts:
# src/r_draw.cpp
2016-12-04 09:33:06 -05:00
Christoph Oelckers
93163d12f1
- removed R_DrawColumnHorizP_ASM completely after discovering that the compiler generated code isn't really anything worse than the old assembly code. This looks like something that may have been relevant 10 years ago but today it looks like there's no need for hand optimization here anymore. And since it appears to be broken anyway, off this goes.
2016-12-04 15:31:08 +01:00
Christoph Oelckers
d0cf34890c
- disabled R_DrawColumnHorizP_ASM because that function appears prone to crashing when rendering decals.
2016-12-04 15:01:48 +01:00
Christoph Oelckers
bf0aedfd9c
Merge branch 'master' of https://github.com/rheit/zdoom into zscript
2016-12-04 14:29:24 +01:00
Christoph Oelckers
5a08768eaf
- removed unused label.
2016-12-04 14:29:03 +01:00
Magnus Norddahl
0ed0c47a45
Optimize capped sky rendering by writing 4 pixels at a time in 5 bands (solid, fade, texture, fade, solid)
2016-12-04 14:28:13 +01:00
Christoph Oelckers
18b953dd50
- fixed: Blasted objects should also be subject to being checked with CanCollideWith.
2016-12-04 10:34:36 +01:00
Christoph Oelckers
71e8f09126
Merge branch 'master' of https://github.com/rheit/zdoom into zscript
2016-12-04 10:27:35 +01:00
Edoardo Prezioso
0cff443945
- Fixed missing linebreak in 'currentpos' error message.
2016-12-04 10:25:23 +01:00
Edoardo Prezioso
c99a051a2a
- Added lambda feature to FString::(Strip|Replace)Chars.
...
Use it in the other (Strip|Replace)Chars methods to show how it would work.
2016-12-04 10:24:49 +01:00
Christoph Oelckers
94287518e0
- added a virtual CanCollideWith script method that can be overridden to do class specific collision checks.
...
This will get called for both actors taking part in a collision, if one of the two calls returns false it will immediately abort PIT_CheckThing with no collision taking place at all.
2016-12-04 10:13:36 +01:00
Magnus Norddahl
36f168040e
Fix null pointer crash bug
2016-12-04 03:12:40 +01:00
Christoph Oelckers
daf1a40521
- allow swapping the order of gl_finish and SwapBuffers calls, because some cards do not seem to like the correct order.
2016-12-03 20:09:25 +01:00
Christoph Oelckers
834802def3
- sanitized the old sprite offset adjustment feature and used it to redefine offsets for some sprites that have really bad ones.
2016-12-03 19:49:32 +01:00
Rachael Alexanderson
244eaa99b3
Merge branch 'master' of https://github.com/rheit/zdoom
2016-12-03 13:23:28 -05:00
Christoph Oelckers
dc1f03ec13
Merge branch 'zscript' of https://github.com/rheit/zdoom into gz-zscript
2016-12-03 19:14:39 +01:00
Christoph Oelckers
04f5be6249
- zcc_compile.cpp needs to include version.h for the DYNLIGHT #define.
2016-12-03 19:14:20 +01:00
Christoph Oelckers
5dd63a86cf
- removed excess arguments for IMPLEMENT_CLASS.
2016-12-03 18:59:28 +01:00
Christoph Oelckers
fbc8d0e83c
Merge branch 'zscript' of https://github.com/rheit/zdoom into gz-zscript
...
# Conflicts:
# wadsrc/static/zscript.txt
2016-12-03 18:51:10 +01:00
Christoph Oelckers
34970c9b9c
- removed hexenglobal include from GL files.
2016-12-03 18:49:52 +01:00
Christoph Oelckers
71bda99c3b
- fixed: DECORATE didn't pass all needed arguments to FunctionBuildList.AddFunction. Removed the default parameter values from this function's declaration to prevent it from happening again.
2016-12-03 18:14:07 +01:00
Christoph Oelckers
21e3aba1c7
- optionally allow passing a script position object to V_GetColor and subfunctions for better error output. Implemented this for all occurences where this info was available.
2016-12-03 16:27:53 +01:00
Christoph Oelckers
1fc90b1ba9
- fixed: A_Face* should not require the target to be non-null.
2016-12-03 15:59:02 +01:00
Christoph Oelckers
6a4f867c91
Merge branch 'master' into zscript
2016-12-03 15:54:18 +01:00
Christoph Oelckers
30cbce051e
- fixed: Custom automap colors were not invalidated on restart.
...
- fixed: D_DoomMain has 3 calls to D_DoomLoop but only the main call of these was capable of a clean restart.
2016-12-03 15:44:46 +01:00
Magnus Norddahl
e09c7d239f
Adjust class naming to closer match the GZDoom renderer and split portal rendering part to its own file
2016-12-03 14:58:56 +01:00
Christoph Oelckers
5117b32431
- fixed: The math for emulating the old slop overflow was not correct and made the affected sectors in void.wad display incorrectly.
...
- set compat_polyobj for void.wad because its polyobjects glitch quite a bit with the normal setting.
2016-12-03 14:42:06 +01:00
Christoph Oelckers
28604bad62
- fixed: The polyobject init specials must be cleared after Polyobject initialization is done, because they can block usage of regular lines colinear with the polyobject
2016-12-03 14:06:51 +01:00
Christoph Oelckers
0da233a664
changed ZScript include mechanism.
...
* It will now use #include, just like most other definition formats and can be mixed with regular definitions. However, due to how the Lemon-generated parser works this will not recursively pull in all files, but store them in a list and process them sequentially. Functionally this shouldn't make a difference, because ZScript is mostly order-independent - the only thing where order is important is native classes, but these are completely internal to zdoom.pk3 where proper order is observed.
2016-12-03 13:16:09 +01:00
Christoph Oelckers
136e976b2a
- added an error check for duplicate local variable definitions.
...
Note that this only applies if both are in the same block. Just like in C++, it is perfectly legal to have the same variable name in two different nested scopes.
2016-12-03 12:33:58 +01:00
Christoph Oelckers
b3783a3850
redid the exception mechanism for script-side access violations to be of more use for diagnosing problems.
...
The original implementation just printed a mostly information-free message and then went on as if nothing has happened, making it ridiculously easy to write broken code and release it. Changed it to:
* Any VMAbortException will now terminate the game session and go back to the console.
* It will also print a VM stack trace with all open functions, including source file and line numbers pointing to the problem spots. For this the relevant information had to be added to the VMScriptFunction class.
An interesting effect here was that just throwing the exception object increased the VM's Exec function's stack size from 900 bytes to 70kb, because the compiler allocates a separate local buffer for every single instance of the exception object.
The obvious solution was to put this part into a subfunction so that it won't pollute the Exec function's own stack frame. Interesting side effect of this: Exec's stack requirement went down from 900 bytes to 600 bytes. This is still on the high side but already a lot better.
2016-12-03 12:23:13 +01:00
Magnus Norddahl
dbacb75617
Capped sky rendering
2016-12-03 06:58:06 +01:00
Magnus Norddahl
ff063a33b5
Merge branch 'master' of https://github.com/raa-eruanna/qzdoom into qzdoom
2016-12-03 05:02:42 +01:00
Magnus Norddahl
04e981dba0
Fix up/down culling issue
2016-12-03 05:02:34 +01:00
Rachael Alexanderson
c95372052c
Merge branch 'master' of https://github.com/rheit/zdoom
2016-12-02 16:39:50 -05:00
Christoph Oelckers
d93b6e31d6
- fixed: The ammo and sister weapon type pointers were not properly declared as pointers to the type system.
2016-12-02 22:10:15 +01:00
Christoph Oelckers
211d9d92a1
Merge branch 'master' into zscript
2016-12-02 21:14:56 +01:00
Christoph Oelckers
60b1f5c25a
- fixed: FPNGTexture::fr could be left uninitialized.
2016-12-02 19:38:30 +01:00
Christoph Oelckers
91c3ddf692
- fixed: When a tentative class is being replaced, the old one should be removed entirely so that it cannot cause any problems later.
2016-12-02 19:30:58 +01:00
Christoph Oelckers
fbf8084999
- corrected the export signatures of several script exports to contain the correct classes, so that the fudging in FindFunction could be removed.
...
- fixed PARAM_ACTION_PROLOGUE to assign correct types to the implicit pointers. It gave the actual class to the wrong one, which until now did not matter because all functions were using 'Actor', regardless of actual class association.
- fixed the definition of IceChunk and removed some redundant code here. Since A_FreezeDeathChunks already calls SetState, which in turn calls the state's action function, there is no need to call it again explicitly.
2016-12-02 18:52:58 +01:00
Christoph Oelckers
1e01e6e4df
- record all line numbers during function generation. This is useful for error reporting and eventually debugging.
...
- throw a useful exception when a VM abort occurs, the simple enum was incapable of reporting anything more than the barest minimum, which at least for array index out of bounds errors was insufficient.
The current exception mechanism is still insufficient. It really has to report a proper crash location and print a stack trace to the maximum extent possible. Instead it just prints a message and happily goes on. This is not a good solution.
2016-12-02 17:36:29 +01:00
Christoph Oelckers
967f6c0269
- use a separate exception type for reporting errors from FraggleScript.
...
CRecoverableError is used in other parts as well and it might create interference.
2016-12-02 16:56:50 +01:00
Edoardo Prezioso
9dbfa6d04e
- Fixed uninitialized line number info in thing map parsing.
2016-12-02 14:54:32 +01:00
Magnus Norddahl
ce6e1e1e47
Fully hook up sprite clipping by subsector
2016-12-02 13:24:53 +01:00
Magnus Norddahl
01008f0daa
Fix sprite bsp clipping bug and wall sorting bug
2016-12-02 13:06:16 +01:00
Christoph Oelckers
f9441cd9d9
- added null pointer validation to any relevant exported function. In most cases null pointers were already being treated as 'do nothing', but there's several places where this can make the code silently fail so in these cases a VM exception will be raised, once the VM's exception handling has been repaired to provide useful diagnostics. (Right now all it does is catch the exception, print a useless message and return to the caller as if nothing has happened.)
2016-12-02 12:06:49 +01:00
Magnus Norddahl
71350f2c17
Sprite line clipping by subsector
2016-12-02 08:12:01 +01:00
Christoph Oelckers
05cc3dde72
- fixed: Dehacked did not copy the defaults for DehackedPickup replacements anymore.
2016-12-02 01:33:18 +01:00
Christoph Oelckers
4dd22d74dd
- partial optimization of chained comparisons.
2016-12-02 01:16:32 +01:00
Christoph Oelckers
fb7a8fb553
- branch optimization for for loops.
2016-12-02 00:56:54 +01:00
Christoph Oelckers
719be058e5
- use the immediate versions for loading integer constants when possible.
2016-12-02 00:54:40 +01:00
Christoph Oelckers
77192fa9dd
- branch optimization.
2016-12-02 00:51:29 +01:00
Christoph Oelckers
96df8f6729
- another typo...
2016-12-01 10:38:43 +01:00
Christoph Oelckers
44d7d0b5f6
- fixed a typo in the bool cast.
...
- fixed a few places for unsigned values.
2016-12-01 09:44:52 +01:00
Magnus Norddahl
3890c80b1a
Fix compile error for msvc
2016-12-01 08:59:47 +01:00
Magnus Norddahl
9416d436fe
Move software renderer into its own namespace to isolate its globals and make
...
any access explicit. This reveals the places in the code where they are being
accessed where they shouldn't and prevents accidental usage.
2016-12-01 02:38:32 +01:00
Christoph Oelckers
7688e14bec
- added a boolean cast VM instruction.
...
Although this already helps a lot with the messed up code generated for comparisons it's not really a solution for this - it still needs a proper implementation to generate efficient code.
2016-12-01 01:13:53 +01:00
Magnus Norddahl
1bed6feadc
Detach poly renderer from r_main
2016-12-01 00:42:14 +01:00
Christoph Oelckers
87484950cf
- removed an assert from APowerMorph::EndEffect. With some recent changes to DestroyAllInventory it appears that the asserted condition no longer is true at this point when ending a game.
...
- fixed: When replacing a tentative class, the pointers in the morph objects were not replaced. Instead of adding more ReplaceClassRef methods I chose to integrate this part into the PointerSubstitution mechanism and delete ReplaceClassRef entirely. The code had some oversights anyway that would have caused problems, now that non-actors can be created.
2016-12-01 00:05:23 +01:00
Christoph Oelckers
0233c21e33
- fixed: When a bogus class is deleted from AllActorClasses, the entry should also be removed from the array instead of leaving a null pointer behind.
2016-11-30 19:48:52 +01:00
Edoardo Prezioso
07c110d5f7
- Fixed GCC compilation error.
...
It didn't like 'cvar' being declared between 'goto foundit' and the 'foundit' label.
2016-11-30 19:41:03 +01:00
Christoph Oelckers
1895feb185
- fixed two apparently bogus asserts with returning gloating point constants.
2016-11-30 19:22:56 +01:00
Christoph Oelckers
c927aca2a0
Merge branch 'zscript' of https://github.com/rheit/zdoom into gz-zscript
...
# Conflicts:
# wadsrc/static/zscript.txt
2016-11-30 18:46:23 +01:00
Christoph Oelckers
83d7f63364
- missed these in the last commit.
2016-11-30 18:43:10 +01:00
Christoph Oelckers
86544086df
- allow the VM to run on one global stack per thread.
...
It is utterly pointless to require every function that wants to make a VM call to allocate a new stack first. The allocation overhead doubles the time to set up the call.
With one stack, previously allocated memory can be reused. The only important thing is, if this ever gets used in a multithreaded environment to have the stack being declared as thread_local, although for ZDoom this is of no consequence.
- eliminated all cases where native code was calling other native code through the VM interface. After scriptifying the game code, only 5 places were left which were quickly eliminated. This was mostly to ensure that the native VM function parameters do not need to be propagated further than absolutely necessary.
2016-11-30 17:15:01 +01:00
Christoph Oelckers
8a50004f55
- cleanup of the virtual function definitions for inventory items. Let's better use 'virtual' and 'override' everywhere to make sure that nothing gets overlooked.
...
- added call wrappers and script hooks for all relevant virtuals in AInventory.
- made GetSpeedFactor and GetNoTeleportFreeze entirely scripted because they are too trivial - also do them iteratively, just like HandlePickup, because it's just a better way to do this stuff.
2016-11-30 15:54:01 +01:00
Christoph Oelckers
b0f3121bec
- split up zscript/shared/inventory.txt.
...
- moved health items to their own file.
- scriptified ScoreItem and MapRevealer whose entire functionality was a small TryPickup method.
- fixed: bit fields in global variables were not correctly written.
This should conclude the inventory cleanup. It is now possible again to find things in there.
2016-11-30 13:36:13 +01:00
Christoph Oelckers
229c55ce61
- moved ammo to its own file, including the backpack.
...
- moved weapon declarations to their own header.
2016-11-30 12:24:50 +01:00
Christoph Oelckers
78fa076079
- moved armor class declarations to their own file and added necessary #includes only to those files actually using them.
...
- added copyright headers to a_armor.cpp and a_keys.cpp.
2016-11-30 10:55:03 +01:00
Christoph Oelckers
014e04ce82
- copied inventory files to their own folder.
...
It's about time this stuff is getting cleaned up seriously. Both a_pickups.cpp and a_artifacts.cpp are so overstuffed that it has become a chore finding stuff in there.
2016-11-30 10:28:02 +01:00
Christoph Oelckers
b1910effd6
- remove debug code.
2016-11-30 09:54:37 +01:00
Christoph Oelckers
661692062d
- fixed: FxIdentifier::Resolve checked all cases of what an identifier can be, even if it already found a proper match.
2016-11-30 09:53:16 +01:00
Magnus Norddahl
34bf581957
Fix new blend mode
2016-11-30 08:51:39 +01:00
Magnus Norddahl
a7a779dd31
Fix race condition
2016-11-30 08:32:05 +01:00
Magnus Norddahl
03282c957b
Add a new blend mode for sprites
2016-11-30 07:49:04 +01:00
Christoph Oelckers
0cd6cec531
- scriptified the SectorFlagSetter.
2016-11-30 01:49:36 +01:00
Christoph Oelckers
fb3bde0e0d
- cleaned up and grouped the virtual function declarations in AActor to ensure that everything has been properly exported.
...
- removed the native parts of SpecialBlastHandling. Since this is called from the script side and the only remaining native remnant was an empty function it's now 100% scripted.
2016-11-30 01:39:06 +01:00
Christoph Oelckers
bbf62132d8
- added a larger batch of function exports.
...
- cleaned up the virtual function interface of APlayerPawn which still had many virtual declarations from old times when class properties were handled through virtual overrides. None of this makes sense these days anymore.
2016-11-30 01:25:51 +01:00
Magnus Norddahl
284a99f204
Merge branch 'gl_swframebuffer' into qzdoom
2016-11-29 22:16:58 +01:00
Magnus Norddahl
00387a7211
Add bounds check to palette upload buffer size
2016-11-29 22:16:40 +01:00
Christoph Oelckers
4372a14479
- fixed: Giving several morph items in the same tic could lead to an invalid Owner pointer in APowerupGiver::Use.
2016-11-29 20:28:04 +01:00
Christoph Oelckers
9193466572
- scriptified ASecurityCamera and AAimingCamera.
...
This concludes this round of script converesions of internal classes.
2016-11-29 20:16:14 +01:00
Christoph Oelckers
a13e23dbe6
- scriptified some trivial stuff from g_shared.
2016-11-29 19:50:34 +01:00
Edoardo Prezioso
7474be6284
- Fixed GCC/Clang compiler errors and warnings.
2016-11-29 19:46:38 +01:00
Christoph Oelckers
0c969746d0
- scriptified Hexen's spike, which was the last remaining item in the game directories.
...
- added a BlockThingsIterator for scripts.
2016-11-29 18:42:48 +01:00
Christoph Oelckers
f17f6c30c2
- scriptified the Heresiarch.
2016-11-29 17:17:10 +01:00
Christoph Oelckers
f5b3429274
- partial scriptification of the Heresiarch
2016-11-29 15:24:38 +01:00
Christoph Oelckers
e01f680b72
- scriptified the Mauler, completing Strife.
2016-11-29 14:32:49 +01:00
Christoph Oelckers
b625156df6
- scriptified Strife's flamethrower and grenade launcher.
2016-11-29 14:12:39 +01:00
Christoph Oelckers
5beebb83b7
- scriptified Strife's assault gun and missile launcher.
2016-11-29 13:28:43 +01:00
Christoph Oelckers
be5ba70ed2
- scriptified Strife's dagger and crossbow.
2016-11-29 13:00:07 +01:00
Christoph Oelckers
3af9232fca
- scriptified a_strifeitems.cpp and a_debris.cpp.
...
- Changed the glass shards so that they do not have to override FloorBounceMissile. It was the only place where this was virtually overridden and provided little usefulness.
- made 'out' variables work.
- fixed virtual call handling for HandlePickup.
2016-11-29 12:17:05 +01:00
Rachael Alexanderson
17c4c4a384
- Fixed: Linker now searches for r_drawerasm.obj in the proper place. This probably broke on Mac and Linux. :(
2016-11-28 20:29:57 -05:00
Rachael Alexanderson
37078f7fef
- Fixed: CMake now asks DrawerGen to drop its output into the build folder instead of the source folder. Fixes a linker error.
2016-11-28 19:48:44 -05:00
Christoph Oelckers
55b549c0c6
- converted the rest of a_strifestuff.cpp.
...
- changed some very old A_Explode calls which passed all values as integer literals.
2016-11-29 00:16:30 +01:00
Magnus Norddahl
f808bcb8d2
Remove llvm_cpu cvar
2016-11-28 23:57:55 +01:00
Christoph Oelckers
edd8e51a69
- scriptified most of a_strifestuff.cpp.
2016-11-28 23:30:14 +01:00
Christoph Oelckers
caef5344b0
- scriptified a_thingstoblowup.cpp.
...
- changed the power crystal floor movement to use DFloor instead of an incomplete in-place hack to ensure that everything is processed properly.
2016-11-28 21:33:14 +01:00
Christoph Oelckers
dd5494d848
- scriptified Stalker and Sentinel.
2016-11-28 19:56:16 +01:00
Christoph Oelckers
360cbfba2a
- scriptified Oracle, Programmer and Rebels.
2016-11-28 19:42:26 +01:00
Christoph Oelckers
119bcb924d
- scriptified the Loremaster.
2016-11-28 18:59:57 +01:00
Christoph Oelckers
bf1c2a7e51
- scriptified the Inquisitor.
2016-11-28 18:49:25 +01:00
Christoph Oelckers
b8cf377d9e
- scriptified the Crusader.
2016-11-28 18:36:13 +01:00
Christoph Oelckers
9064a5b0ac
- scriptified Strife's coins.
...
- added a String class to allow attaching methods to the builtin string type. This works by checking if the left side of the member accessor is a string and just replacing the tyoe in this one place, all the rest is automatic.
2016-11-28 18:15:18 +01:00
Magnus Norddahl
09891291c2
Remove empty constructor
2016-11-28 17:34:32 +01:00
Magnus Norddahl
e9e7839133
Create drawergen tool
2016-11-28 17:31:56 +01:00
Christoph Oelckers
d2ce78fae7
- changed the return value of PickupMessage to an FString so that it can interface with scripts.
...
- use standard convention of prefacing localizable strings with "$" for C_MidPrint.
2016-11-28 16:19:01 +01:00
Christoph Oelckers
53318f4bde
- scriptified Reaver and Templar.
2016-11-28 15:51:07 +01:00
Christoph Oelckers
8551a4f6e1
- scriptified the Sigil. This isn't fully tested yet.
2016-11-28 14:39:25 +01:00
Christoph Oelckers
c9a4087c18
- scriptified a_entityboss.cpp.
2016-11-28 13:11:27 +01:00
Christoph Oelckers
dc9ee0727a
- scriptified a_spectral.cpp.
...
- consolidated A_Tracer and A_Tracer2.
Note that this commit temporarily disables a few features in order to make it compile.
2016-11-28 12:55:33 +01:00
Christoph Oelckers
b171d6e21f
- scriptified a_alienspectres.cpp.
2016-11-28 11:52:03 +01:00
Christoph Oelckers
7ea9f60464
- scriptified the Acolyte.
2016-11-28 10:41:36 +01:00
Magnus Norddahl
ccafe27b22
Merge remote-tracking branch 'origin/ssao' into qzdoom
2016-11-28 02:33:41 +01:00
Magnus Norddahl
bea113a908
Fix tonemap texture filtering (black screen) regression
2016-11-28 02:32:57 +01:00
Christoph Oelckers
d4427e696d
- scriptified Hexen's Banishment Device.
2016-11-28 01:30:36 +01:00
Christoph Oelckers
ebd2c27e0a
- scriptified Hexen's Bloodscourge and Serpent.
...
- merged the FrontBlock searcher for the Bloodscourge into RoughMonsterSearch. This also fixes the bug that the searcher was not initialized properly for the MageBoss.
2016-11-28 00:49:10 +01:00
Christoph Oelckers
f9a1388066
- scriptified Hexen's lightning weapon.
2016-11-27 22:14:18 +01:00
Christoph Oelckers
7b5a589635
- scriptified Hexen's Frost shards.
...
- scriptified all SpecialMissileHit methods.
2016-11-27 21:41:04 +01:00
Christoph Oelckers
5ce5466e18
- scriptified hexenspecialdecs.
...
- made '->' a single token. Although ZScript does not use it, the parser tends to get confused and fatally chokes on leftover arrows so this ensures more robust error handling.
2016-11-27 20:14:43 +01:00
Christoph Oelckers
de6969997a
- scriptified Hexen's flies.
...
A few notes:
* this accesses the lines array in sector_t which effectively is a pointer to an array of pointers - a type the parser can not represent. The compiler has no problems with it, so for now it is defined internally.
* array sizes were limited to 65536 entries because the 'bound' instruction only existed as an immediate version with no provisions for larger values. For the static map arrays 65536 is not sufficient so now there are alternative instructions for these cases.
* despite the above, at the moment there is no proper bounds checking for arrays that have no fixed size. To do this, a lot more work is needed. The type system as-is is not prepared for such a scenario.
2016-11-27 18:52:24 +01:00
Rachael Alexanderson
dcd389f696
Merge branch 'master' of https://github.com/rheit/zdoom
2016-11-27 11:55:05 -05:00
Christoph Oelckers
aab304c0cf
- fixed: Lemon includes ParseTrace only in debug builds so the option to use it must be #ifdef'd.
2016-11-27 17:43:11 +01:00
Christoph Oelckers
cc7120d5b6
Merge branch 'master' of https://github.com/rheit/zdoom into zscript
2016-11-27 16:34:55 +01:00
alexey.lysiuk
0488b18f8f
Fixed junk character(s) left after removing portion of string
...
See http://forum.zdoom.org/viewtopic.php?t=54379
2016-11-27 16:33:25 +01:00
Christoph Oelckers
b0ddba2240
Merge branch 'master' of c:\Programming\Doom-Dev\zdoom_\ into zscript
2016-11-27 16:31:26 +01:00
Christoph Oelckers
2e99681ced
- fixed: When trying to calculate the damage for a blasted actor hitting another one, the velocity checks used the signed values, causing totally random damaging effects depending on the direction the objects were moving. This bug had been present in the original Hexen source as well.
2016-11-27 16:26:31 +01:00
Christoph Oelckers
f409a24d2d
- fixed: Readonly pointers never were flagged as such.
...
- fixed: Assignment from a readonly to a read-allowed pointer must be an error.
- made GetDefaultByType a builtin so that it can do proper type assignment to the result, which for a function would be problematic in this case, even if automatic type deduction was implemented. Since this returns the class defaults which are not a real object, the result cannot be subjected to a type cast.
- error out if a type cast of a readonly pointer is attempted.
- fixed: FxBooleanNot could clobber a local variable because it used the source register to manipulate the result.
2016-11-27 16:24:33 +01:00
Christoph Oelckers
3dd323ac0d
- scriptified the Flechette. Not fully tested yet.
...
- fixed issues with the refactoring of the recent commits. This one starts again.
- added builtins for TextureID.
Note about builtins: Currently they are just hacked into the compiler backend. They really should be made part of the respective types to keep matters clean and allow more widespread use of builtins to create more efficient code.
2016-11-27 16:24:33 +01:00
Christoph Oelckers
36f559ecb7
- fixed bad definition of struct grammar which tried to resolve from right to left, creating large amounts of recursion and strange problems with PlayerInfo.
...
- added a command line option to generate a parser trace file.
- fixed a syntax error in player.txt.
2016-11-27 16:24:32 +01:00
Christoph Oelckers
b10ffb5133
- exported a few more functions.
...
- refactored the ModifyDamage interface to be more scripting friendly.
In general it should be avoided having to call directly into chained inventory functions because they are very problematic and prone to errors. So this got wrapped into a single handler (on AActor, not AInventory!) which will later make it easier to refactor the parameters of ModifyDamage to work better for scripting and avoid the chaining.
2016-11-27 16:24:32 +01:00
Christoph Oelckers
096c51d546
- changed AInventory::HandlePickup to work iteratively instead of recursively.
...
Two reasons for this:
1. if this has to be routed through the VM each recursion will cost 1000 bytes of stack space which simply is not good.
2. having the virtual function only care about the item itself but not the entire inventory chain is a lot less error prone for scripting.
Since the scripting interface needs a separate caller function anyway this seemed like a good time to change it. The same will be done for the other chained inventory handlers as well.
2016-11-27 16:24:31 +01:00
Magnus Norddahl
057060022a
Merge remote-tracking branch 'gzdoom/master' into ssao
2016-11-27 09:59:57 +01:00
Magnus Norddahl
1a16776dff
Plane texturing adjustments
2016-11-27 04:39:33 +01:00
Edoardo Prezioso
6eff1cb8be
- Fixed more GCC/Clang warnings.
2016-11-27 02:34:32 +01:00
Magnus Norddahl
6417c1a7a3
Rewrite PrepWall and PrepLWall, plus make them aware of pixel centers
2016-11-27 00:43:32 +01:00
Christoph Oelckers
ab03b016e9
- scriptified the IceGuy.
2016-11-27 00:41:06 +01:00
Christoph Oelckers
69d4d36429
- scriptified ArtiHealingRadius.
...
- allow switch/case with names.
- fixed break jump target handling for switch/case. This only worked when the break was in the outermost compound statement, those in inner ones were missed.
2016-11-27 00:18:07 +01:00
Magnus Norddahl
547973c8ba
Rewrite OWallMost and WallMost to contain no build code
2016-11-26 23:28:21 +01:00
Christoph Oelckers
796c262285
- scriptified the Quietus.
2016-11-26 23:05:16 +01:00
Christoph Oelckers
80f233cd0b
- scriptified the fighter's fist.
2016-11-26 22:25:49 +01:00
Christoph Oelckers
178db4bb09
- scriptified the fighter's hammer.
2016-11-26 21:39:20 +01:00
Christoph Oelckers
bdad526f62
- scriptified the Fighter's axe.
2016-11-26 21:03:00 +01:00
Christoph Oelckers
e541c27622
- scriptified the weapon's state getter methods - as preparation for the fighter axe.
2016-11-26 19:48:30 +01:00
Christoph Oelckers
997e4a2ac4
- scriptified the remaining Cleric weapons.
2016-11-26 19:23:22 +01:00
Christoph Oelckers
659a592f16
- scriptified Korax.
2016-11-26 16:25:10 +01:00
Christoph Oelckers
4fcb397346
- scriptified the remaining parts of the Wraithverge.
2016-11-26 14:06:41 +01:00
Christoph Oelckers
177aa6ec42
- converted half of ClericHoly. (Making a commit before starting on the more complex stuff.)
...
- added a 'constructor' for color values.
2016-11-26 13:18:48 +01:00
Magnus Norddahl
c37ce1fdbc
Add plane clipping to the triangle drawer
2016-11-26 10:49:29 +01:00
Christoph Oelckers
bc1e4eff72
- scriptified the Cleric's flame weapon. Also fixed the angle calculations for the circle flame.
2016-11-26 10:30:41 +01:00
Christoph Oelckers
f508a57bb8
- scriptified ArtiBoostArmor.
2016-11-26 10:08:25 +01:00
Christoph Oelckers
4e802652c7
- scriptified ArtiBlastRadius.
2016-11-26 09:51:14 +01:00
Magnus Norddahl
8bbb63e913
Add portal plane clipping
2016-11-26 09:01:58 +01:00
Magnus Norddahl
70181f4146
Always access args.uniforms directly instead of first creating a TriUniforms variable
2016-11-26 07:35:04 +01:00
Magnus Norddahl
62188d1ea5
Change the line portal shape to be determined by the same code that decides the shape of other walls
2016-11-26 07:06:10 +01:00
Rachael Alexanderson
383a59259a
Revert "Merge commit 'refs/pull/122/head' of https://github.com/coelckers/gzdoom "
...
This reverts commit 71b4f57058
, reversing
changes made to 449d4963ae
.
2016-11-25 21:02:18 -05:00
Christoph Oelckers
7385cd70c0
- scriptified the Minotaur.
...
Interesting tidbit: The damage calculation in P_MinotaurSlam had been incorrect for the Heretic version since the friendly Hexen Dark Servant was added, but nobody ever noticed in 14 years...
2016-11-26 01:14:47 +01:00
Magnus Norddahl
cc3ac9ea05
Line portal rendering
2016-11-25 23:44:55 +01:00
Magnus Norddahl
eaa15f2b74
Render other sector portal types
2016-11-25 20:19:35 +01:00
Christoph Oelckers
6e1c6c4b33
- scriptified ArtiTeleport.
...
- shortened ArtiEgg and ArtiPork's use state to a single function.
2016-11-25 19:52:35 +01:00
Christoph Oelckers
0d6f37835f
- completed Heretic scriptification with the two remaining artifacts.
2016-11-25 18:41:00 +01:00
Magnus Norddahl
864358389e
Implement portal recursion limit
2016-11-25 18:15:48 +01:00
Christoph Oelckers
4f370ba181
- scriptified the Phoenix Rod, completing the Heretic weapons.
2016-11-25 18:13:08 +01:00
Magnus Norddahl
93af906a1d
Add support for multiple portals
2016-11-25 17:14:26 +01:00
Christoph Oelckers
53ff7f0c73
- fixed: Do not allow empty function arguments pass. For unknown reasons the grammar accepts them as valid, so this needs to be checked when resolving them.
2016-11-25 16:35:07 +01:00
Christoph Oelckers
8dba322775
- scriptified Heretic's Skull Rod.
...
- Took the opportunity and fixed the logic for the Skull Rod's rain spawner. The old code which was part of the 3D floor submission was unable to work with portals at all. The new approach no longer tries to hide the dead projectile in the ceiling, it leaves it where it is and changes a few flags, so that its z-position can be used as reference to get the actual ceiling. This works for line portals, but for sector portals still requires some changes to sector_t::NextHighestCeilingAt to work, but at least this can be made to work unlike the old code.
- added names for the player-related translations to A_SetTranslation.
- fixed: Failure to resolve a function argument was checked for, too late.
- made the parameter for A_SetTranslation a name instead of a string, because it is more efficient. We do not need full strings here.
2016-11-25 16:05:03 +01:00
Christoph Oelckers
c2f7ed7f1c
- fixed: BuiltinNameToClass should treat NAME_None as 'nothing'.
...
It's names that get here, after all, so the name for 'nothing' should actually mean 'nothing' here.
2016-11-25 12:45:17 +01:00
Christoph Oelckers
82e5e2daa9
- fixed a variable mixup in Dehacked weapon initialization.
...
This ultimately failed to set the weapon's AmmoUse field and made the weapon fail to detect it's out of ammo.
2016-11-25 12:31:13 +01:00
Magnus Norddahl
3de7f1a387
Merge branch 'master' of https://github.com/raa-eruanna/qzdoom into qzdoom
2016-11-25 07:45:02 +01:00
Magnus Norddahl
b2ad26d2d5
Sealing off portal entrances for the transparency pass
2016-11-25 07:44:51 +01:00
Rachael Alexanderson
509108f8b6
Merge branch 'master' of https://github.com/coelckers/gzdoom
2016-11-24 23:46:33 -05:00
Magnus Norddahl
e642ed099a
Fix palette blending
2016-11-25 03:26:15 +01:00
Christoph Oelckers
11ac0c622b
- fixed: The BFG needs to get its default ammo usage from the DehInfo struct.
...
- fixed: State's fields need to be declared native.
2016-11-25 01:33:04 +01:00
Magnus Norddahl
1def7b3eae
More portal handling stuff
2016-11-25 01:08:25 +01:00
Christoph Oelckers
66d28a24b8
- disabled the scripted virtual function module after finding out that it only works if each single class that may serve as a parent for scripting is explicitly declared.
...
Needless to say, this is simply too volatile and would require constant active maintenance, not to mention a huge amount of work up front to get going.
It also hid a nasty problem with the Destroy method. Due to the way the garbage collector works, Destroy cannot be exposed to scripts as-is. It may be called from scripts but it may not be overridden from scripts because the garbage collector can call this function after all data needed for calling a scripted override has already been destroyed because if that data is also being collected there is no guarantee that proper order of destruction is observed. So for now Destroy is just a normal native method to scripted classes
2016-11-25 00:25:26 +01:00
Magnus Norddahl
558a4bcdca
Partial sky portal support
2016-11-24 23:08:36 +01:00
Christoph Oelckers
9ae272d753
- scriptified Heretic's blaster.
...
- scriptified all Effect functions of Fastprojectile's children
- implemented access to class meta data.
- added a VM instruction to retrieve the class metadata, to eliminate the overhead of the function call that would otherwise be needed.
- made GetClass() a builtin so that it can use the new instruction
Important note about this commit: Scriptifying CFlameMissile::Effect revealed a problem with the virtual function interface: In order to work, this needs to be explicitly enabled for each single native class that may be used as a base for a scripted class. Needless to say, this will end up way too much work, as there are over 100 native classes, excluding those which will be scriptified. But in order to fix the problem this partially broken state needs to be committed first.
2016-11-24 20:02:44 +01:00
Christoph Oelckers
3f5bf88d69
- scriptified Heretic's mace.
...
- fixed: FxAssignSelf did not the correct number of registers for vector operations.
- fixed a few asserts in vector2 instructions.
- turned the virtual AActor::HitFloor method into a flag MF7_SMASHABLE. The only use of this function was to kill Hexen's pottery when they hit the floor, and this looks like something that can be exposed to modders less clumsily.
2016-11-24 13:45:43 +01:00
Christoph Oelckers
677d7579d4
- scriptified Heretic's crossbow and gauntlets.
2016-11-24 11:29:51 +01:00
Christoph Oelckers
2ece9b6172
- scriptified Heretic's staff and wand.
2016-11-24 10:39:16 +01:00
Christoph Oelckers
49605bc109
Merge branch 'master' of https://github.com/coelckers/gzdoom
2016-11-24 09:59:48 +01:00
Magnus Norddahl
4eb32a50e3
Add vid_vsync support to Linux target
2016-11-24 09:59:40 +01:00
Christoph Oelckers
aa4b3bb230
Merge branch 'master' of https://github.com/rheit/zdoom
2016-11-24 09:58:29 +01:00
Edoardo Prezioso
ae382f4005
- Fixed the spline/cubic crashes for FMOD 4.24 64-bit, too.
2016-11-24 09:26:39 +01:00
Edoardo Prezioso
68dc3c4f2d
- Preventive fix for future include conflicts.
...
basicinlines.h is only included in m_fixed.h, while basictypes.h is included only in headers, so it's better to respect this convention. OSX compiles fine also without m_fixed.h, even better.
2016-11-24 09:09:09 +01:00
Magnus Norddahl
cff72fb072
Add stencil value to decal, particle, plane, port, sky, sprite, wall and wallsprite classes
2016-11-24 08:23:50 +01:00
Magnus Norddahl
7b4df20c51
Merge branch 'linux_vsync' into qzdoom
2016-11-24 07:41:58 +01:00
Magnus Norddahl
33958ca5b2
Add vid_vsync support to Linux target
2016-11-24 07:37:15 +01:00
Rachael Alexanderson
2de7f67b7f
Merge branch 'master' of https://github.com/rheit/zdoom
2016-11-24 01:31:18 -05:00
Braden Obrzut
dc11b63157
- Fixed building with vanilla MinGW, at least with whatever modified header files that my system has from my last experimentation.
2016-11-24 00:47:53 -05:00
Magnus Norddahl
47aaf781c6
Split RenderPolyScene into two to allow rendering from multiple viewpoints
2016-11-24 05:51:37 +01:00
Magnus Norddahl
2316658dfc
Fix kdizd blinking issue because the vertex buffer was too small
2016-11-24 02:11:35 +01:00
Christoph Oelckers
3e890d182b
- scriptified D'Sparil.
...
- added retrieval of defaults from an actor pointer.
2016-11-24 01:23:35 +01:00
Magnus Norddahl
0361e912cb
Minor bug fix
2016-11-24 01:01:02 +01:00
Edoardo Prezioso
cd919e72e1
- Don't null-check the ZCC_TreeNode 'this' pointer.
...
Compilers are allowed to simplify the 'this == nullptr' code block because it makes no sense in 'well-defined C++ code'.
2016-11-23 23:30:54 +01:00
Magnus Norddahl
80a5f81f9a
Fix typo affecting walls on sloped floors
2016-11-23 23:29:53 +01:00
Christoph Oelckers
8a7671ad8b
- exported all member fields from the morph items.
...
- renamed APowerMorph::Player to avoid accidental confusion with AActor::player, which in scripting is the same due to case insensitvity.
- renamed save key for above variable.
2016-11-23 23:28:03 +01:00
Magnus Norddahl
8bd92a2c48
Fix interpolation bug in the affine texturing block
2016-11-23 22:55:24 +01:00
Christoph Oelckers
7527141ad4
- fixed: The morph actors stored their required classes as names, not as class pointers.
...
This prevented any kind of error check on them.
Unfortunately, due to backwards compatibility needs, on DECORATE the missing class may not be fatal so a workaround had to be added to clear those bogus pointers later if they are discovered to be broken.
For ZScript, though, this will result in a compile error, which was the intention behind this change.
2016-11-23 22:34:17 +01:00
Christoph Oelckers
5e67cf79d3
- scriptified the Ironlich.
2016-11-23 21:26:59 +01:00
Magnus Norddahl
91d180bec6
Fix render to texture
2016-11-23 21:10:19 +01:00
Christoph Oelckers
1a20a5b999
- scriptified A_PainShootSkull which was the last remaining bit in g_doom, so this directory is gone now.
2016-11-23 19:47:09 +01:00
Christoph Oelckers
f8c6adb7eb
- completely redid how A_PainShootSkull checks the legality of the LS spawn.
...
It turned out that the Boom method does not work well with portals and fixing it while keeping it doesn't look feasible - the entire approach was bad from the start.
Instead, let's use the same approach as P_XYMovement: Spawn the Lost Soul at the center of the PE, and then use multiple P_TryMoves to get it to its intended location.
This will check all blocking lines, just like Boom did, but it will also properly handle z-positioning and portal transitions.
2016-11-23 18:54:16 +01:00
Christoph Oelckers
7325e3f0f8
- exported all member fields that make sense. Entirely private ones or classes that are not supposed to be extended were left out.
2016-11-23 17:34:36 +01:00
Rachael Alexanderson
2e7c512891
Merge branch 'master' of https://github.com/rheit/zdoom
2016-11-23 11:09:46 -05:00
Christoph Oelckers
d1f5d916c2
Merge branch 'master' into zscript
2016-11-23 14:39:14 +01:00
Christoph Oelckers
9bd19c2d2e
- ensure that the MAPINFO parser never mixes HexenHack parsing with the new format.
2016-11-23 14:38:45 +01:00
alexey.lysiuk
e138a3ffbc
Fixed infinite recursion with self-referencing multipatch textures
...
See http://forum.zdoom.org/viewtopic.php?t=54355
2016-11-23 14:33:31 +01:00
Christoph Oelckers
5b059971f0
- fixed: P_SpawnMapThing forced gravity instead of disabling it when being given Gravity = 0 from UDMF.
2016-11-23 14:32:18 +01:00
Christoph Oelckers
6ae266c76e
- fixed: The check for identical floor planes on an opening should never allow it to be narrowed down.
...
This can cause problems in rare situations where a sloped plane is checked outside its sector boundaries.
2016-11-23 14:27:08 +01:00
Edoardo Prezioso
0489b6e7c5
- Fixed missing newlines to the conversation error message.
2016-11-23 10:19:52 +01:00
Christoph Oelckers
649c96261a
- clarified error messages for bogus conversation scripts.
2016-11-23 10:13:50 +01:00
Rachael Alexanderson
78db0a0d06
Merge branch 'master' of https://github.com/rheit/zdoom
2016-11-23 01:43:12 -05:00
Braden Obrzut
789315bb4a
- Fixed build with MinGW-w64 (TDM-GCC 5.1). Note that the resulting binary will crash under -O3 until the alignment violation is taken care of in FRemapTable::Alloc.
...
- It appears that CMake added native support for building rc files with MinGW at some point so removed manual rc compiling code.
2016-11-22 22:41:32 -05:00
Christoph Oelckers
0c95568d98
- exported native fields of several more classes.
2016-11-23 01:31:48 +01:00
Magnus Norddahl
ff738de279
Bgra support
2016-11-23 01:01:28 +01:00
Magnus Norddahl
f313bfd2cc
Merge branch 'gl_swframebuffer' into qzdoom
2016-11-23 00:56:39 +01:00
Magnus Norddahl
7beac65471
Add Linux support for GLSWFrameBuffer
2016-11-23 00:55:07 +01:00
Christoph Oelckers
46757ff8bf
- exported the native fields of FState and FLevelLocals as well.
2016-11-23 00:35:06 +01:00
Christoph Oelckers
099b9970ef
- added proper definitions for all exported native fields.
...
- synthesize native fields for all declared flags, not just for AActor.
2016-11-22 23:43:32 +01:00
Edoardo Prezioso
e1c4e4939a
- Fixed the order of the MS sections.
2016-11-22 21:20:42 +01:00
Edoardo Prezioso
e2167c661c
- Fixed GCC/Clang compile errors.
2016-11-22 21:16:13 +01:00
Christoph Oelckers
980c986305
- allow defining native fields through scripts. Internally this only requires exporting the address, but not the entire field.
...
- added new VARF_Transient flag so that the decision whether to serialize a field does not depend solely on its native status. It may actually make a lot of sense to use the auto-serializer for native fields, too, as this would eliminate a lot of maintenance code.
- defined (u)int8/16 as aliases to the byte and short types (Can't we not just get rid of this naming convention already...?)
- exporting the fields of Actor revealed a few name clashes between them and some global types, so Actor.Sector was renamed to CurSector and Actor.Inventory was renamed to Actor.Inv.
2016-11-22 19:20:31 +01:00
Christoph Oelckers
ab5c11064a
- added a few missing tildes.
2016-11-22 13:03:46 +01:00
Christoph Oelckers
03a02a2036
- updated copyrights in a few files.
2016-11-22 12:28:11 +01:00
Christoph Oelckers
bbb0778fd4
- scriptified Chicken and Pig - not tested yet, because other things have priority.
2016-11-22 12:21:55 +01:00
Magnus Norddahl
dacb985878
Fix texture mapping bug
2016-11-22 01:59:28 +01:00
Christoph Oelckers
3db712cd73
- fixed: Switch statement without a default jumped to the first first case label instead.
...
- removed placeholder code from scripted Marine.
2016-11-21 22:20:25 +01:00
Christoph Oelckers
135cfcf016
- implemented State as an actual native struct, so that its fields can be accessed from scripts.
...
- refactored state bitfield members into a flag word because the address of a bitfield cannot be taken, making such variables inaccessible to scripts.
- actually use PNativeStruct for representing native structs defined in a script.
2016-11-21 21:34:34 +01:00
Magnus Norddahl
7af504df58
Draw 3d floor sides
2016-11-21 20:50:54 +01:00
Christoph Oelckers
ff3baac8a7
- made PStatePointer a real pointer pointing to a native struct named 'state', because that's what it really is and what it needs to be if we want to use a state as more than an opaque identifier in the VM
2016-11-21 19:36:14 +01:00
Christoph Oelckers
6cc00e79a6
- made all internal struct types NativeStructs so that all variables of their types are made references.
2016-11-21 19:20:27 +01:00
Christoph Oelckers
360436c201
- scriptified the scripted marines.
...
- fixed symbol name generation for native functions.
- moved PrintableName to VMFunction so that native functions also have this information.
2016-11-21 19:09:58 +01:00
Magnus Norddahl
ddb0161f9c
Sub pinkie crashes the pal drawer :(
2016-11-21 15:40:42 +01:00
Magnus Norddahl
0108ff89d7
Bug fixes
2016-11-21 15:20:07 +01:00
Magnus Norddahl
fabac78ea8
Add poly renderer to the menus
2016-11-21 15:19:24 +01:00
Christoph Oelckers
97763b5a2b
- added scriptable virtual overrides for PostBeginPlay, Tick, BeginPlay, Activate and Deactivate.
2016-11-21 14:59:17 +01:00
Christoph Oelckers
7d99552903
- added two new integral types SpriteID and TextureID, both are needed to allow proper serialization as they require something different to be written out than a regular integer.
2016-11-21 13:45:33 +01:00
Christoph Oelckers
de2eb18727
- added per-channel access for color variables. However, since they are locally stored in registers, it required a minor bit of fudging for this case.
...
- make sure that a PFunction's implementation is always initialized before starting the code generator.
2016-11-21 12:38:39 +01:00
Christoph Oelckers
393bcf9e91
- extended ExpEmit::RegNum to 16 bits so that it can hold larger values for constant registers.
2016-11-21 10:50:09 +01:00
Christoph Oelckers
188c0ee932
- removed the REGT_NIL check from the PARAM_EXISTS macro, because with the implemented handling of named arguments it isn't possible that REGT_NIL can end up in the parameters without a programming error..
2016-11-21 10:28:06 +01:00
Magnus Norddahl
5e9c9c825d
Add stencil blend mode as apparently the shaded mode uses indices whiles stencil uses mask/alpha..
2016-11-21 05:52:02 +01:00
Magnus Norddahl
e7d64a380a
Fix AABB culling bug
2016-11-21 05:09:53 +01:00
Kyle Evans
3270b20045
Remove non-existant source file
2016-11-20 21:33:23 -06:00
Magnus Norddahl
2ba2dc7611
Change shaded blend mode use srcalpha and destalpha.
...
Fix blending error in add/sub/revsub
2016-11-21 03:49:55 +01:00
Magnus Norddahl
144c7f4139
Flip sub and revsub TC drawers in the old renderer
2016-11-21 01:56:54 +01:00
Magnus Norddahl
29005b5ce6
Compile fix for older versions of LLVM
2016-11-21 01:40:08 +01:00
Christoph Oelckers
e7f6bae83e
- implemented named arguments.
...
- fixed flag CVAR access. As it turned out, OP_LBIT is a bit messy to set up properly when accessing integers that may or may not be big endian, so it now uses a shift and bit masking to do its work.
- used the SpawnPlayerMissile call in A_FireBFG to test named arguments.
2016-11-21 01:32:01 +01:00
Rachael Alexanderson
dadee080e4
- Implemented Wall blend modes
...
- fixed: set color for "shaded" modes - though it's still not yet properly implemented.
2016-11-20 18:36:26 -05:00
Christoph Oelckers
7d8143224e
- restored two accidentally deleted VM instructions.
2016-11-21 00:33:55 +01:00
Christoph Oelckers
8f722a3633
- fixed: FxCVar must free its address register.
2016-11-20 23:26:32 +01:00
Rachael Alexanderson
4ed548a189
- Implemented some sprite blend modes.
2016-11-20 17:07:58 -05:00
Christoph Oelckers
e93961da96
- removed all constant versions of vector instructions. The vector code does not use compound constants so there's no need to have instructions for them.
...
- fixed: The code generator had no good safeguards for exceeding the maximum amount of registers.
All there was was a handful of pitiful asserts which in production code do nothing at all but generate broken output.
Even worse, the VM was hardwired to at most 255 constants per type per function by storing the constant count in a byte! This has been extended to 65535, but since many instructions only have a byte available for the constant index, a workaround had to be added to do a two-instruction setup if larger indices are needed.
2016-11-20 23:00:05 +01:00
Christoph Oelckers
1c2c26eb08
- implemented direct CVar access.
2016-11-20 20:24:39 +01:00
Christoph Oelckers
5951a9449c
- added static constant arrays. At the moment they can only be defined inside functions due to lack of dedicated storage inside classes for static data.
...
- added new VM instructions to access the constant tables with a variable index.
- refactored VMFunctionBuilder's constant tables so that they are not limited to one entry per value. While this works fine for single values, it makes it impossible to store constant arrays in here.
2016-11-20 18:00:37 +01:00
Magnus Norddahl
ebd810d843
Fix decal vertical position being wrong
2016-11-20 16:43:13 +01:00
Magnus Norddahl
bd9ec843dd
Add palette version of the blend modes
2016-11-20 16:42:53 +01:00
Christoph Oelckers
bb25c5faaa
- scriptified the remaining Doom weapon code.
...
- implemented method calls from struct instances.
- optimized disassembly of VM call instructions to print the function's name at the end where it is more visible and does not need to be truncated. Also use the printable name for script functions here.
2016-11-20 12:27:26 +01:00
Christoph Oelckers
ab6b2f369e
- fixed: For varargs, not only the type but also the flag of the last specified argument need to be stored for later parameters.
2016-11-20 09:47:46 +01:00
Magnus Norddahl
6761e8639a
Add palette support
2016-11-20 04:06:21 +01:00
Magnus Norddahl
7ac0cace7d
Stop copying the matrix and remove r_triangle
2016-11-20 02:07:55 +01:00
Magnus Norddahl
f8efe394cc
Remove unused code
2016-11-20 01:51:08 +01:00
Magnus Norddahl
845bf93c95
Change triangle full block to use vectored load and store
2016-11-20 01:29:19 +01:00
Christoph Oelckers
3c726aa570
- scriptified A_FirePlasma.
2016-11-20 01:18:21 +01:00
Christoph Oelckers
fdab994fcb
- scriptified the Rocket launcher.
2016-11-20 01:11:01 +01:00
Christoph Oelckers
814493b68d
- scriptified the Super Shotgun.
2016-11-20 00:45:06 +01:00
Christoph Oelckers
af34d82888
- scriptified A_Saw.
...
- implemented multiple-return-value assignment. Due to some grammar conflicts the originally intended Lua-inspired syntax of 'a, b = Function()' could not be done, so it's '[a, b] = Function()'
2016-11-20 00:25:38 +01:00
Rachael Alexanderson
fc011e42dd
Merge branch 'master' of https://github.com/rheit/zdoom
2016-11-19 12:46:01 -05:00
Christoph Oelckers
74c5659fc5
- explicitly call Destroy in PClass::StaticShutdown because some class type objects were no longer automatically collected.
2016-11-19 18:09:34 +01:00
Christoph Oelckers
7595343aaa
- fixed: Completely empty if statements left the code generator in a broken state.
2016-11-19 18:02:07 +01:00
Magnus Norddahl
b4eb49678a
Cache the optimized bitcode (note: this adds LLVMBitWriter as a dependency)
2016-11-19 17:14:37 +01:00
alexey.lysiuk
c28bcca3f3
Print unknown if release information is unavailable on macOS
...
At least 10.4 Tiger doesn't support required sysctl name
2016-11-19 16:42:16 +01:00
alexey.lysiuk
60ac12be0a
Fixed compilation warnings in Cocoa backend
2016-11-19 16:42:16 +01:00
alexey.lysiuk
3b240b73e9
Fixed endianness issue with saved games
...
See http://forum.zdoom.org/viewtopic.php?t=54272
2016-11-19 16:42:16 +01:00
Christoph Oelckers
0b70df88d8
- scriptified A_FireShotgun and A_FireChaingun.
2016-11-19 16:39:45 +01:00
Magnus Norddahl
d197ebca78
Remove redundant line
2016-11-19 14:07:39 +01:00
Christoph Oelckers
d50da34664
- scriptified the pistol to test if struct member functions work.
...
- made APlayerPawn::PlayAttacking(2) virtual script functions so that mods have better control over player animations. Note that these have no native base so they skip the templated interface for managing virtual functions.
2016-11-19 13:56:29 +01:00
Magnus Norddahl
114fda1ed5
Added missing TranslateAlphaBlend and created a helper function for specifying the translation
2016-11-19 13:32:57 +01:00
Christoph Oelckers
de8cacc465
- for struct member calls an address request is needed.
2016-11-19 12:41:00 +01:00
Magnus Norddahl
17ed585c1f
Fix vsync not working
2016-11-19 12:30:58 +01:00
Christoph Oelckers
25e285b65d
- fixed bad conversion from FString to const char * in state label type cast.
2016-11-19 12:25:53 +01:00
Christoph Oelckers
9fab8380ff
- fixed: FxVMFunctionCall::GetDirectFunction did not check if the function could be called with no arguments.
2016-11-19 12:22:58 +01:00
Christoph Oelckers
f11f020b6c
- allow functions in structs. This is needed for several internal data types like players, sectors, lines, etc.
...
- added a new type 'NativeStruct'. This will be used for types that cannot be instantiated, and is also needed to cleanly handle many internal types that only can exist as reference.
2016-11-19 12:12:29 +01:00
Christoph Oelckers
df4e9324c9
- added terminators to all flag lists.
2016-11-19 09:24:54 +01:00
Christoph Oelckers
10bc01c000
- fixed yet another place where VS did not warn about improper use of NULL.
2016-11-19 09:10:31 +01:00
Magnus Norddahl
272fe7f754
Added blending modes to triangle codegen
2016-11-19 02:53:32 +01:00
Christoph Oelckers
3ce699bf9b
- implemented pass-by-reference arguments - so far only for memory based variables.
...
- changed Dehacked weapon function lookup to check the symbol table instead of directly referencing the VM functions. Once scriptified these pointers will no longer be available.
- removed all special ATAGs from the VM. While well intentioned any pointer tagged with them is basically unusable because it'd trigger asserts all over the place.
- scriptified A_Punch for testing pass-by-reference parameters and stack variables.
2016-11-19 01:23:56 +01:00
Christoph Oelckers
7ff5069617
- added all missing things to enable the scriptified version of A_BrainSpit.
...
This uses a global function, this has been placed into DObject for now because the scripting interface does not allow non-class-owned functions yet.
2016-11-18 22:12:53 +01:00
Christoph Oelckers
aa32d8970b
- scriptified a_hereticmisc.cpp.
2016-11-18 21:34:06 +01:00
Christoph Oelckers
34c949f84b
- implemented the string concatenation operator '..'. This is capable of stringifying all of the common types for output.
...
- gave OP_CONCAT some sane semantics. The way this was defined, by specifying the source operands as a range of registers instead of a pair like everything else made it completely useless for the task at hand.
- changed formatting for floats to %.5f which for normal output in a game makes more sense. For special cases there should be a special formatting function for ints and floats that can do more specialized conversions.
2016-11-18 17:44:25 +01:00
Christoph Oelckers
24481781b4
- added missing unsigned casts to the VM.
...
- make the pointer to string cast a bit more useful by using the actual object's type rather than 'Object' which can be a great asset when debugging.
- fixed a few bad asserts.
2016-11-18 14:50:21 +01:00
Magnus Norddahl
5d6ceb868e
Move viewport stuff to its own function
2016-11-18 14:40:53 +01:00
Christoph Oelckers
f71aad4cdd
- cleanup of the remaining FxBinary operators.
...
- changed FxCompareEq with strings and other types that can be cast to from a string always convert the string to the other type before comparing.
2016-11-18 14:19:55 +01:00
Christoph Oelckers
d9953eb3bd
- cleaned up FxCompareRel::Resolve. Also added unsigned integer support to it and FxMulDiv (these, aside from the float cast, are the only two operations where this is important.)
2016-11-18 12:23:58 +01:00
Christoph Oelckers
b6801d526b
- same as last commit for FxMulDiv and FxPow.
...
- some streamlining of FxAddSub.
2016-11-18 11:53:18 +01:00
Christoph Oelckers
a00181c899
- started refactoring binary operators by starting to movw the relevant parts or ResolveLR into the respective Resolve methods. FxAddSub complete.
...
This one-size-fits all function has become too unwieldy with all its special cases and makes improvements harder than necessary.
2016-11-18 11:28:15 +01:00
Magnus Norddahl
dbb6c7ca27
Add support for specifying a viewport out of screen bounds and fixed statusbar by doing just that!
2016-11-18 01:58:39 +01:00
Christoph Oelckers
8650d6806e
- script export of player_t.
...
- replaced __alignof with the standard alignof equivalent.
2016-11-18 00:42:04 +01:00
Rachael Alexanderson
bac3ae3bf8
Merge branch 'master' of https://github.com/coelckers/gzdoom
2016-11-17 17:37:11 -05:00
Christoph Oelckers
b3b5cb2fa4
- fixed: Lines with both sides in the same sector but an active portal may not be discarded early.
2016-11-17 23:13:17 +01:00
Rachael Alexanderson
aa08285676
- Moved scaling before rotation again - this time, using a formula provided by Graf, the rendering pitch is now dynamically scaled based on the aspect ratio, causing pitch aiming to once again be correct.
2016-11-17 16:44:55 -05:00
Christoph Oelckers
6461f5995b
- fixed: Script defined pointers were not added to the FlatPointers array.
2016-11-17 22:21:08 +01:00
Magnus Norddahl
6be80efa51
Moved scale back to be after pitch - otherwise the the bullets don't end up where you point
2016-11-17 21:19:50 +01:00
Magnus Norddahl
eac9367ace
Fix perspective when status bar is visible
2016-11-17 21:07:00 +01:00
Christoph Oelckers
e4dfb13d25
- fixed: OP_LO was missing a read barrier.
2016-11-17 20:41:59 +01:00
Christoph Oelckers
3bcd85eb8a
added class pointer casts. Due to grammar problems the type has to be put into parentheses to get the class token out of the global parsing namespace:
...
class<Actor> myclass = (class<Actor>)(GetClass());
2016-11-17 20:31:53 +01:00
Rachael Alexanderson
7447c49dc5
- Added pixelratio support for the softpoly renderer.
2016-11-17 13:50:35 -05:00
Christoph Oelckers
022228d8a9
- fixed code generation of class type cast for local variables.
2016-11-17 19:30:30 +01:00
Christoph Oelckers
8205e6cf08
- optimize access to array members with constant index. Like with struct members this can be combined with the outer index/address.
...
- fixed register allocation with array indices and stack variables.
2016-11-17 18:06:56 +01:00
Christoph Oelckers
2cc48ec378
- implemented code generation for stack variables.
...
- fixed code generation for using local variables as array index. This must use a different register for the array element offset because the original register may not be overwritten.
2016-11-17 16:44:41 +01:00
Magnus Norddahl
b02e3d9514
Add shaded blend mode for the decals
2016-11-17 14:28:14 +01:00
Christoph Oelckers
d86f03e2e0
- reverted most of the last commit after realizing that trying to manage constructing/destructing per variable is not going to work because it'd require some extensive exception management in the compiled VM code.
...
- instead add a list of SpecialInits to VMScriptFunction so this can be done transparently when setting up and popping the stack frame. The only drawback is that this requires permanent allocation of stack objects for the entire lifetime of a function but this is a relatively small tradeoff for significantly reduced maintenance work throughout.
- removed most #include "vm.h", because nearly all files already pull this in through dobject.h.
2016-11-17 13:10:19 +01:00
Christoph Oelckers
30e6e8e25f
- added bookkeeping info to types for allowing data on the stack that requires construction and destruction.
...
- removed unused PVector type.
2016-11-17 11:16:00 +01:00
Magnus Norddahl
511eb59479
Add particle drawing
2016-11-17 01:29:08 +01:00
Magnus Norddahl
266924600a
Missing include guard
2016-11-17 01:28:51 +01:00
Christoph Oelckers
21a1d5ffc8
- scriptified Hexen's Wraith and parts of the Spike.
2016-11-17 00:44:43 +01:00
Magnus Norddahl
ff2ab61abc
Added decals
2016-11-16 23:34:05 +01:00
Magnus Norddahl
59f7dedfb4
Added wall sprite support. Unfortunately it would seem that a bullet hole is not a wall sprite..
2016-11-16 22:31:49 +01:00
Christoph Oelckers
df43ee96ce
- fixed a lost '='.
...
- scriptified A_TimeBomb.
2016-11-16 21:12:16 +01:00
Christoph Oelckers
7a29e6cfdc
- scriptified Hexen's fog.
2016-11-16 20:00:25 +01:00
Magnus Norddahl
ae889acaea
active_con_scale should respect uiscale
2016-11-16 19:49:46 +01:00
Christoph Oelckers
063e94971d
- removed incorrect _DEF.
2016-11-16 19:47:07 +01:00
Major Cooke
af3bda3f2a
Removed _DEF.
2016-11-16 19:47:06 +01:00
Major Cooke
60d93008ba
Exported TryMove.
2016-11-16 19:47:06 +01:00
Magnus Norddahl
712e032573
Remove swrenderer2
2016-11-16 19:44:11 +01:00
Christoph Oelckers
76a74e0364
- scriptified Hexen's Dragon.
...
- fixed several places in the code generator that did not consider locked registers for local variables: array indices, abs and floating point builtin functions.
- added some debug aids to the bounds opcode. Just triggering an exception here which loses all relevant info is perfectly useless in a debug situation.
2016-11-16 19:18:21 +01:00
Magnus Norddahl
f457f0340c
Add 3D floor planes
2016-11-16 11:18:40 +01:00
Rachael Alexanderson
71b4f57058
Merge commit 'refs/pull/122/head' of https://github.com/coelckers/gzdoom
...
# Conflicts:
# src/posix/cocoa/i_video.mm
# src/posix/sdl/hardware.cpp
# src/win32/hardware.cpp
2016-11-16 01:03:32 -05:00
Rachael Alexanderson
813030efef
- Fully implemented CVAR_OVERRIDEGET for vid_renderer from the ZDoom code submission.
2016-11-15 20:03:50 -05:00
Rachael Alexanderson
9b9ed64360
- Implemented sv_overridegetcvar: This will override the return value for GetCVar checks for certain CVars marked with the CVAR_OVERRIDEGET flag. Instead of returning their true value, they only return defaults instead.
...
- Implemented dummy CVar vid_renderer with a default value of 1. This allows mods not designed for the software renderer to run if sv_overridegetcvar is turned on.
2016-11-15 20:01:36 -05:00
Christoph Oelckers
633da6e5d8
- scriptified two of the Acolyte's functions.
...
- added a DActorIterator class.
- fixed: It was not possible to have functions of the same name in two different classes because the name they were searched for was not qualified by the class. Changed so that the class name is included now, but to avoid renaming several hundreds of functions all at once, if the search fails, it will repeat with 'Actor' as class name.
This commit contains preparations for scriptifying Hexen's Dragon, but that doesn't work yet so it's not included.
2016-11-16 01:36:21 +01:00
Magnus Norddahl
449d4963ae
Mapping error workaround
2016-11-16 01:13:29 +01:00
Magnus Norddahl
a092a03c6d
Some basic fixed light support
2016-11-15 23:30:42 +01:00
Magnus Norddahl
1b3d50951a
Fix sky floodfill bug
2016-11-15 22:48:44 +01:00
Christoph Oelckers
a2e17c0ab5
- implemented usage restrictions for action functions.
2016-11-15 21:38:12 +01:00
Magnus Norddahl
a90a22e056
Fix segment culling bug
2016-11-15 19:27:21 +01:00
Major Cooke
f2ec266eec
Fixed: Actors with NOINTERACTION shouldn't waste time continuously applying NOBLOCKMAP if it has it already and not moving.
2016-11-15 11:38:03 -06:00
Magnus Norddahl
cfc977f9e6
Fix texture coordinate
2016-11-15 18:14:18 +01:00
Christoph Oelckers
4cc7d95ba5
- fixed: A_ZoomFactor and A_SetCrosshair need to be declared 'action'.
2016-11-15 16:05:42 +01:00
Christoph Oelckers
e559109419
- made the floating point truncation warning a debug message because I can see this becoming more a hassle than an asset.
2016-11-15 16:01:08 +01:00
Christoph Oelckers
b0a0056097
Merge branch 'zscript' into gz-zscript
2016-11-15 15:35:35 +01:00
Christoph Oelckers
77a99890cf
- relaxed the message for incompatible class types in DECORATE to a warning. Like finding no class at all here, this initially fell under a situation that was not discoverable and there's mods that break by making it a fatal error.
2016-11-15 15:34:25 +01:00
Christoph Oelckers
97e643c7e1
- fixed: DECORATE tried to resolved null states again, causing a type conflict.
2016-11-15 15:34:25 +01:00
Christoph Oelckers
d4d6b739e0
- fixed: FxUnaryNotBoolean is not necessarily TypeBoolean, it can be altered by a type cast so the asserts had to be adjusted to cover that case.
2016-11-15 15:34:25 +01:00
Magnus Norddahl
ee15856786
Deep water support
2016-11-15 15:15:26 +01:00
Magnus Norddahl
3b397183ac
Clamp segment range
2016-11-15 15:15:01 +01:00
Christoph Oelckers
06cdcf1338
Merge branch 'zscript' of https://github.com/rheit/zdoom into gz-zscript
2016-11-15 13:40:18 +01:00
Christoph Oelckers
a63c749f04
- moved A_Light to Actor after finding some mods which used it badly. Besides, it should be fine to use this from PlayerPawns as well.
2016-11-15 13:39:41 +01:00
Magnus Norddahl
5f1b822523
Mark rendered lines in the automap
2016-11-15 13:30:30 +01:00
Magnus Norddahl
f143b9b7b0
Fix midtexture repeat and yoffset bug
2016-11-15 12:31:57 +01:00
Christoph Oelckers
3a2d0e3486
- copied all necessary adjustments from the test branch in the QZDoom repo.
2016-11-15 11:49:27 +01:00
Christoph Oelckers
6e223ebc21
Merge branch 'zscript' of https://github.com/rheit/zdoom into gz-zscript
...
# Conflicts:
# src/CMakeLists.txt
# wadsrc/static/actors/doom/doomarmor.txt
# wadsrc/static/decorate.txt
2016-11-15 11:36:59 +01:00
Christoph Oelckers
196986ae6b
Merge branch 'master' of https://github.com/rheit/zdoom
2016-11-15 11:25:42 +01:00
Christoph Oelckers
96d093d01f
- added compile time checks for bad state links and state label references.
...
- preserve a state's source line information for the postprocessing phase so that the checker can output more useful information.
- added missing check for weapon psprites to DPSprite::SetState.
2016-11-15 11:21:08 +01:00
Christoph Oelckers
647e1399f1
- added runtime checks for the state usage flags.
2016-11-15 00:18:57 +01:00
Christoph Oelckers
4f998fa879
- finished the state usage parser.
...
- added state usage specifiers to Actor and Inventory. The states in these classes must be set to full access so that any existing mod can link to them.
2016-11-14 23:24:10 +01:00
Magnus Norddahl
e5f8af2216
Fix sky flood fill for E1M8 and Map11
2016-11-14 23:22:38 +01:00
Christoph Oelckers
c797319314
- fixed parser for state block options.
...
- fixed incorrect flags for weapons.
2016-11-14 20:00:01 +01:00
Christoph Oelckers
7bcd83f0c1
- parser for states flags.
2016-11-14 19:35:29 +01:00
Christoph Oelckers
384f4fe7ce
- added a 'DefaultStateUsage' property so that this setting can be properly set up for the classes that can inject states into other actors.
2016-11-14 18:31:12 +01:00
Christoph Oelckers
199e2e2f9c
- fixed CheckRange return value.
...
- removed the error message for multiple state blocks in DECORATE.
- added some constants for state types.
2016-11-14 17:50:09 +01:00
Rachael Alexanderson
62adb64a95
Merge branch 'master' of https://github.com/rheit/zdoom
2016-11-14 10:28:52 -05:00
Christoph Oelckers
0111ec451a
Revert "Fixed: A_SetInventory with an amount of 0 was not truly eliminating the actor."
...
This reverts commit 02435b46a0
.
2016-11-14 15:52:49 +01:00
Christoph Oelckers
ba62a86c80
- fixed: A_SetInventory still had default initializers.
2016-11-14 15:48:34 +01:00
Christoph Oelckers
85ff172ee3
Merge remote-tracking branch 'remotes/origin/master' into zscript
2016-11-14 15:03:14 +01:00
Christoph Oelckers
56a3dcfe80
- moved the 'brainexplode' state to the rocket, which is the actor which actually uses it.
...
This appears to be the only case where an actor was set to a state owned by a completely unrelated actor which would present some problems with state owner checking in AActor::SetState, so let's better get rid of it ASAP.
I believe the only reason this wasn't changed when all actors were exported 8 years ago was that old binary DEHSUPP lump.
2016-11-14 15:02:44 +01:00
Magnus Norddahl
3673338644
Split r_poly into multiple files handling each aspect of rendering a scene
2016-11-14 14:19:48 +01:00
Christoph Oelckers
ac86a535e7
- fixed: State labels were resolved in the calling function's context instead of the called function one's.
...
This could cause problems with functions that take states as parameters but use them to set them internally instead of passing them through the A_Jump interface back to the caller, like A_Chase or A_LookEx.
This required some quite significant refactoring because the entire state resolution logic had been baked into the compiler which turned out to be a major maintenance problem.
Fixed this by adding a new builtin type 'statelabel'. This is an opaque identifier representing a state, with the actual data either directly encoded into the number for single label state or an index into a state information table.
The state resolution is now the task of the called function as it should always have remained. Note, that this required giving back the 'action' qualifier to most state jumping functions.
- refactored most A_Jump checkers to a two stage setup with a pure checker that returns a boolean and a scripted A_Jump wrapper, for some simpler checks the checker function was entirely omitted and calculated inline in the A_Jump function. It is strongly recommended to use the boolean checkers unless using an inline function invocation in a state as they lead to vastly clearer code and offer more flexibility.
- let Min() and Max() use the OP_MIN and OP_MAX opcodes. Although these were present, these function were implemented using some grossly inefficient branching tests.
- the DECORATE 'state' cast kludge will now actually call ResolveState because a state label is not a state and needs conversion.
2016-11-14 14:12:27 +01:00
Christoph Oelckers
109558d74d
- added unsigned char casts to all isspace calls in zstring.cpp
...
isspace takes a signed integer as parameter which triggers an assert on any non-ASCII character taken from a signed char array.
2016-11-14 13:14:07 +01:00
Major Cooke
02435b46a0
Fixed: A_SetInventory with an amount of 0 was not truly eliminating the actor.
2016-11-13 19:27:59 -06:00
Rachael Alexanderson
23384a913c
Merge pull request #2 from edward-san/qz_clang_fix
...
- Fixed Clang on Linux compilation.
2016-11-13 12:49:14 -05:00
Magnus Norddahl
c06798bca1
Adjust texture coordinates
2016-11-13 17:58:03 +01:00
Edoardo Prezioso
1442f7fb7b
- Fixed Clang on Linux compilation.
2016-11-13 16:53:18 +01:00
Magnus Norddahl
acb2e821f0
Evict floats from the block code (too bad it didn't make any difference to the speed)
2016-11-13 16:36:47 +01:00
Magnus Norddahl
f25579849a
Minor variable optimization
2016-11-13 15:43:54 +01:00
Magnus Norddahl
411eb57952
Fix rendering of masked walls
2016-11-13 15:16:55 +01:00
Christoph Oelckers
1e6a632774
- copy the Unsafe flag to the actual function. This must have gotten lost during the merge between my own code and Leonard2's fix.
...
Now even in DECORATE it is possible to report most cases in which user variables are accessed from non-item states as an error. This will report all states which can be traced by a direct link from a special state label. It will not find states that only get used via A_Jump etc.
2016-11-13 14:48:27 +01:00
Christoph Oelckers
a2f4cd7cda
- fixed: All functions that are callable from weapon states and not members of Actor need to be declared 'action'.
...
With the stricter type checks of the self pointer that were now implemented these all produced errors.
2016-11-13 14:20:30 +01:00
Rachael Alexanderson
470046ec5a
Merge branch 'master' of https://github.com/rheit/zdoom
2016-11-13 07:30:34 -05:00
Magnus Norddahl
c914a7a7fe
Cull walls
2016-11-13 13:24:36 +01:00
Christoph Oelckers
7d49a82963
removed some unneeded checks
...
- since we now look for fields in the base class first the restriction check is no longer needed as it was for a different mode of looking up the identifier.
- In DECORATE we do not need to bother with non-action functions. Non-action functions cannot be defined from DECORATE so there's no need to check if we are in one.
- make the warning for unsafe access a debug message because this can affect legitimate code.
2016-11-13 12:37:28 +01:00
Christoph Oelckers
f238f0ba5c
- try to preserve a bit more information about incorrect use of user variables to print more meaningful error messages. This is not complete yet and will need integration with the previous commit.
2016-11-13 12:02:41 +01:00
Magnus Norddahl
27eb8e36ae
Fix solid segment culling
2016-11-13 11:44:07 +01:00
Leonard2
ac0413838c
Fixed: A StateProvider actor could no longer use its own user variables
...
Refactored the FxIdentifier code a bit to avoid code duplication
2016-11-13 10:41:10 +01:00
Magnus Norddahl
af7a7ab7d7
Remove use of the llvm.round intrinsic as it apparently doesn't work in some environments
2016-11-13 08:57:29 +01:00
Braden Obrzut
472f35d2ce
- Fixed building with gtk2 headers.
2016-11-13 00:17:09 -05:00
Rachael Alexanderson
87e9ba0f05
Merge branch 'master' of https://github.com/rheit/zdoom
2016-11-12 22:31:05 -05:00
Braden Obrzut
9342898361
- Added support for GTK3 (thanks to "MineyMe" and edward-san)
...
- Replaced GTK/OS X (note different from Cocoa) clipboard code with SDL clipboard API.
- Removed requirement to link to GTK in order to compile with GTK support.
- GTK is no longer init'd if the GTK IWAD picker is not used.
- Our usage of GTK is such that the dynamic loader can work with both GTK2 and GTK3 depending on what's installed.
- Since we're accumulating a lot of library loaders I've built a generic interface as FModule which replaces TOptWin32Proc and the loaders in the OpenAL and Fluidsynth code.
2016-11-12 18:32:09 -05:00
Christoph Oelckers
49ef541513
- scriptified Hexen's Firedemon.
2016-11-12 19:16:47 +01:00
Christoph Oelckers
213b3f1fe4
- scriptified Hexen's Centaur.
2016-11-12 17:21:11 +01:00
alexey.lysiuk
b16e6725d7
Added missing #include to fix build with GCC/Clang
2016-11-12 18:09:05 +02:00
Christoph Oelckers
8f8017836f
- scriptified Hexen's Bishop.
2016-11-12 16:32:26 +01:00
Rachael Alexanderson
f284a24ed9
Merge branch 'master' of https://github.com/rheit/zdoom
2016-11-12 10:17:56 -05:00
Christoph Oelckers
c9ee17cdcd
Merge branch 'master' of https://github.com/rheit/zdoom into zscript
2016-11-12 15:36:59 +01:00
Christoph Oelckers
0c0cb6d69c
- fixed warnings.
2016-11-12 15:36:36 +01:00
Christoph Oelckers
a603af805c
- fixed identifier resolution in FxIdentifier for action functions with a different invoker than self.
...
- fixed creation of direct function invocations on a state line. In order to receive the implicit arguments this needs to be wrapped into a compound statement so that the local variable getter works.
2016-11-12 15:21:59 +01:00
Magnus Norddahl
402227d6b6
Add some intersection tests useful for culling
2016-11-12 14:55:14 +01:00
Christoph Oelckers
fe74a14431
- fixed: A_GiveInventory should not try to give stuff to an owned inventory item, because it doesn't own its Inventory pointer - it is used for the linked list of the owner's inventory.
2016-11-12 14:48:10 +01:00
Christoph Oelckers
32e0123e1b
- fixed: FResourceLump::LumpNameSetup passed negative numbers to FString::Truncate for extension-less lump names.
2016-11-12 14:01:34 +01:00
Magnus Norddahl
e3dc9c93b9
Use a simpler algorithm for the stencil buffer as the old one was too slow
2016-11-12 13:50:28 +01:00
Edoardo Prezioso
ffea457d81
- Fixed GCC/Clang warnings with serializer Unicode parser.
2016-11-12 13:35:10 +01:00
Christoph Oelckers
479b216c06
- fixed: ZScript did not properly fill in tentatively created classes from defaults processing.
...
The proper setup for such classes was only done in CreateDerivedClass, but not in FindClassTentative itself. This extends CreateDerivedClass to allow it to create a class without fully initializing it.
2016-11-12 13:09:19 +01:00
Edoardo Prezioso
104030697f
- Rename con_numnotify to con_notifylines.
...
Zandronum 1.1 added an option with the same purpose. Use it to avoid duplicates.
2016-11-12 11:08:33 +01:00
Edoardo Prezioso
f123da9385
- Fixed GCC warnings with new history code.
2016-11-12 11:07:39 +01:00
Magnus Norddahl
eb4021b997
Codegen for all triangle variants
2016-11-12 10:21:02 +01:00
Christoph Oelckers
e009cbec9e
- fixed: PClass::StaticShutdown did not remove the class pointers for VM base classes from their class registration entries.
2016-11-12 10:17:57 +01:00
Christoph Oelckers
30a2171080
- let "" be synonymous with 'none' in ZScript.
2016-11-12 10:06:26 +01:00
Christoph Oelckers
62a259bb36
Merge branch 'master' of https://github.com/rheit/zdoom into zscript
2016-11-12 09:46:09 +01:00
Christoph Oelckers
34fc6323a4
- scriptified Hexen's bats.
...
- removed AMinotaurFriend::IsOkayToAttack. The condition it checks (i.e. friendliness with player) is already covered by the base version of this function so this is quite redundant.
- removed a few 'virtual' qualifiers from functions that never get overridden.
2016-11-12 09:33:43 +01:00
Marisa Heit
c69394fa40
Add con_numnotify cvar to control number of lines of notification text
...
- If con_numnotify < 0, then there is no limit on the number of lines of
text.
- If con_numnotify == 0, then any text that would normally be shown in the
notification area is discarded.
- If con_numnotify > 0, then that is the maximum number of lines of
notification text to display.
2016-11-12 00:34:07 -06:00
Marisa Heit
1e497e0b3e
Fixed: FString::StripLeftRight() lost the right character when copying to a new buffer
...
- Also, some minor improvements to the strip functions to avoid doing
extra work.
2016-11-12 00:34:07 -06:00
Marisa Heit
513ad7f75f
Use FString to store console atexit commands
2016-11-12 00:34:07 -06:00
Marisa Heit
c5eb28d360
Fix console scrolling too far when page scrolling with scaled text
2016-11-12 00:34:07 -06:00
Marisa Heit
4dce07762b
Change con_scale behavior for value 0
...
- Do not use uiscale for con_scale default. A 40 column console when
everything is defaults is maddening. The default is now CleanXfac minus 1.
2016-11-12 00:34:07 -06:00
Marisa Heit
3926ca13b0
Fix console input not scrolling when you hit the side of the screen
...
- Also changed the console input buffer into a struct instead of a
frankenstein buffer.
2016-11-12 00:34:07 -06:00
Christoph Oelckers
5bc89e7efc
- added a VM handler for PostBeginPlay.
...
- made a few changes to let the templates compile again on Linux.
2016-11-12 00:57:21 +01:00
Magnus Norddahl
c852b6c5e9
Add codegen for one of the triangle variants
2016-11-12 00:50:21 +01:00
Christoph Oelckers
696af7d7e5
- Moved all virtual function related template code to its own file because it depends on includes that cannot be done in dobject.h.
2016-11-12 00:33:40 +01:00
Christoph Oelckers
14a9c13113
- scriptified Heretic's wizard.
2016-11-11 23:32:13 +01:00
Christoph Oelckers
a5f9eb5be1
- Scriptified Heretic's knight.
2016-11-11 22:14:29 +01:00
Christoph Oelckers
924096694e
- implemented super calls and proper dispatch of scripted virtual overrides for Destroy.
2016-11-11 21:52:08 +01:00
Magnus Norddahl
667f35bfce
Declare structs to LLVM
2016-11-11 20:12:09 +01:00
Christoph Oelckers
72e77a6c65
- implemented handling for virtual function.
...
Syntax-wise I chose to make it as strict as possible to reduce the chance of errors: Virtual base functions must be declared with the 'virtual' keyword, and overrides in child classes with the 'override' keyword. This way any mismatch in parameters that otherwise would cause silent failure will outright produce a compile error.
2016-11-11 20:05:07 +01:00
Magnus Norddahl
0938420871
Make triangle drawers compatible with LLVMDrawers
2016-11-11 19:54:27 +01:00
Magnus Norddahl
3cc5cec5a0
Hook up subsector gbuffer
2016-11-11 19:26:28 +01:00
Magnus Norddahl
5a9d4ee9d9
Simplify argument passing
2016-11-11 18:24:59 +01:00
Rachael Alexanderson
c6f7848a09
Merge branch 'master' of https://github.com/rheit/zdoom
2016-11-11 11:39:53 -05:00
Leonard2
a1aceaf04f
Fixed the remaining errors with GCC
2016-11-11 16:01:09 +01:00
Edoardo Prezioso
8d01ba7733
- Fixed Clang errors with delayed templates on.
2016-11-11 15:22:53 +01:00
Christoph Oelckers
5e8c8b80c9
- removed bogus token paste operator.
2016-11-11 14:51:36 +01:00
Christoph Oelckers
6529931281
fixed and completed the special field init code. Strings can now be used as class members, and so can structs which contain strings.
...
- made 'DamageMultiply' an actor property and moved the initialization of ConversationRoot to the property handler for the compiler to get this stuff out of the type classes.
- consolidate default initialization into one function which performs all the required setup. The original implementation did this when adding the fields but that cannot work because at that time no defaults have been created yet.
- fixed: When deriving a class the child class's defaults also must initialize the copied parent fields with special initialization. This part was completely missing.
- removed DECORATE code for parsing native classes because it's no longer needed.
2016-11-11 14:40:32 +01:00
nashmuhandes
970c750daa
Added OpenGL support to the underwater view blend scalar option.
2016-11-11 18:08:47 +08:00
Magnus Norddahl
6989b7037e
Fix stencil write bug
2016-11-11 10:25:40 +01:00
nashmuhandes
fd31c84745
Added a slider to control the intensity of underwater screen blending.
2016-11-11 17:18:39 +08:00
Magnus Norddahl
529a93b680
Sky rendering fixes
2016-11-11 10:15:27 +01:00
Christoph Oelckers
15ddf70f58
- typo
2016-11-11 09:27:52 +01:00
Christoph Oelckers
a60bdc2bfb
use a memory arena for allocating code generation nodes.
...
- Since the number of small allocations here is extremely high this will help a lot to prevent fragmentation and since most nodes are collected up front and this is done when no large resources are being loaded it won't cause heap spikes.
let Emit methods delete FxExpression arrays when they are done.
- For some reason the deletion process does not work 100%, there are always some nodes left behind and so far I haven't found them. This ensures that these arrays do not live any longer than needed.
2016-11-10 15:13:31 +01:00
Magnus Norddahl
373038231c
More stencil sky stuff
2016-11-10 13:58:03 +01:00
Christoph Oelckers
e0bd6a2c0a
- fixed a memory leak in the compiler.
...
- removed test Printfs.
2016-11-10 13:37:38 +01:00
Magnus Norddahl
049ceecca5
Toying with stencils
2016-11-10 10:44:35 +01:00
Magnus Norddahl
204d09efde
Add a stencil buffer
2016-11-10 08:08:37 +01:00
Magnus Norddahl
b94096ffe1
Crash fixes
2016-11-10 05:30:33 +01:00
Magnus Norddahl
6c52e1e52b
Draw sky in a very expensive way
2016-11-10 05:01:33 +01:00
Christoph Oelckers
5151547df0
- fixed: String comparisons with constants did not work.
2016-11-09 20:28:46 +01:00
Leonard2
fb2a843c03
Test on a few methods/classes
2016-11-09 17:45:56 +01:00
Leonard2
26dc0c6df2
TODO: Find a better place to insert the classes in the hierarchy
2016-11-09 17:45:55 +01:00
Leonard2
7dbc4710f1
Add the new argument to all uses of the implement macro
2016-11-09 17:45:55 +01:00
Leonard2
33e2c74642
Provide a way to expose a native class to zscript for virtual functions overriding
2016-11-09 17:45:54 +01:00
Leonard2
ad19e439a6
Implement a general and easy-to-use way of overriding native virtual functions
2016-11-09 17:45:53 +01:00
Leonard2
bb2d61de50
Replaced the many implement macros with a single one that takes arguments instead
2016-11-09 17:45:53 +01:00
Leonard2
0b3585c83f
Separate the pointer list from the implement macro
2016-11-09 17:45:52 +01:00
Magnus Norddahl
9820a6cb88
Request GL BSP instead of requiring automap texturing to be on
2016-11-09 12:07:07 +01:00
Magnus Norddahl
dc0e6d40a4
Distance sort sprites
2016-11-09 11:38:07 +01:00
Magnus Norddahl
cffdfdf7fd
Cull bsp using solid segments
2016-11-09 01:33:40 +01:00
Magnus Norddahl
95df9bf48e
Fix crash bug in 8 bit drawer
2016-11-09 00:35:41 +01:00
Magnus Norddahl
968150ceff
Seems there could be more than 6 vertices
2016-11-09 00:22:05 +01:00
Magnus Norddahl
7d3e8d1414
Fix triangle drawer clipping bug
2016-11-08 23:08:25 +01:00
Christoph Oelckers
701ffb868b
- fixed: The first argument of string-based ACS specials was missing a string to name cast.
2016-11-08 22:36:44 +01:00
Rachael Alexanderson
9413ea6edf
- Textured automap would crash due to an additional parameter in the software renderer to the FillSimplePoly function call, causing stack issues.
2016-11-08 15:35:51 -05:00
Rachael Alexanderson
d36993a03b
- Textured automap would crash due to an additional parameter in the software renderer to the FillSimplePoly function call, causing stack issues.
2016-11-08 15:05:23 -05:00
Magnus Norddahl
6ef8fe2da5
Add diminishing lighting
2016-11-08 18:08:13 +01:00
Magnus Norddahl
c1d496c17f
A little bit of SSE to speed it slightly more
2016-11-08 17:38:19 +01:00
Magnus Norddahl
466274d7f6
Remove floats from the inner block loop
2016-11-08 16:46:15 +01:00
Magnus Norddahl
28d1cdc1cc
Add TriUniforms and move light to it
2016-11-08 16:16:24 +01:00
Magnus Norddahl
6620d99fbb
Fix frame buffer bounds and access errors
2016-11-08 15:27:45 +01:00
Christoph Oelckers
5c7affd102
Merge branch 'master' of https://github.com/rheit/zdoom
2016-11-08 14:31:10 +01:00
Magnus Norddahl
cb4b74e0c3
Double render speed of triangle drawer in the poly version by removing sprite clip and assigning whole blocks to threads
2016-11-08 14:28:58 +01:00
Christoph Oelckers
7b7b66d8b7
- added a new variable flag that allows defining variables which can only be modified by internal script code but not by external mods. Currently this is used by the NoBlockmap and NoSector flags which need special handling for changing.
2016-11-08 11:12:56 +01:00
Rachael Alexanderson
dffba5267d
- Full freelook is now enabled if r_newrenderer is set to true.
2016-11-08 00:44:53 -05:00
Magnus Norddahl
2e2d6da00f
Only draw thing if its in the subsector
2016-11-08 05:48:45 +01:00
Magnus Norddahl
d0f0500f0d
Draw things
2016-11-08 05:17:29 +01:00
Magnus Norddahl
b9d6fc6856
Add some light and transparency
2016-11-08 02:48:14 +01:00
Christoph Oelckers
3661e479d9
- fixed: Runtime conversion of names to classes used the wrong argument to check the class type.
2016-11-07 23:29:54 +01:00
Christoph Oelckers
aac931192b
- fixed: Declaring a damage function must set regular damage to -1 to disable it.
2016-11-07 23:22:00 +01:00
Christoph Oelckers
cf9cdeb480
- scriptified the Revenant's code.
2016-11-07 23:16:25 +01:00
Christoph Oelckers
387287008c
- fixed: Clamp was initialized with incorrect values.
2016-11-07 14:57:59 +01:00
Christoph Oelckers
5e8c819a33
- fixed checks in Powerup.Type property to properly deal with the differences between DECORATE and ZScript.
...
- properly initialize Baggage everywhere it gets used.
- fixed a few items with incorrect Powerup.Type settings that got flagged by the above changes.
2016-11-07 11:53:49 +01:00
Christoph Oelckers
208fe28042
- properly clear all script compiler data for a restart.
2016-11-07 11:30:41 +01:00
Christoph Oelckers
dc055b74c1
- fixed the octal parser in strbin. Like its hex counterpart it needs to backtrack one character if it find the end of a sequence.
...
- since ZScript already receives filtered strings, the 'T' converter for the properties should not do it again.
2016-11-07 09:54:46 +01:00
Magnus Norddahl
237f54f4be
Toying with triangle drawer and GL BSP nodes
2016-11-07 09:25:12 +01:00
Magnus Norddahl
47cc110498
Add true color triangle drawer
2016-11-07 05:24:17 +01:00
Magnus Norddahl
4e717cd9ee
Merge remote-tracking branch 'origin/triangledrawer' into qzdoom
2016-11-07 04:30:28 +01:00
Magnus Norddahl
92be8f401c
Remove old triangle version
2016-11-07 04:27:55 +01:00
Magnus Norddahl
3ea9d7cf04
Move software renderer transform to TriMatrix
2016-11-07 03:34:59 +01:00
Rachael Alexanderson
8e7e1b48e9
Merge branch 'master' of https://github.com/rheit/zdoom
2016-11-06 19:54:08 -05:00
Christoph Oelckers
b206d19df4
- fixed: RegAvailability never set the number of allocated registers to more than 32.
...
- fixed register allocation in ?: operator which was quite broken.
2016-11-07 01:10:56 +01:00
Christoph Oelckers
7da4e0d03d
- removed a parsing hack for the old internal definitions.
...
- fixed: The state cast hack for DECORATE could not properly create state constants.
Instead they were passed to FxRuntimeStateIndex without resolving them to something constant. This adds proper handling of constant indices within that class.
2016-11-06 23:10:23 +01:00
Braden Obrzut
640bf2a6d4
- Fixed: SBarInfo didn't support animated images in some places.
2016-11-06 17:07:44 -05:00
Christoph Oelckers
779f9d7a72
Merge branch 'master' of https://github.com/rheit/zdoom into zscript
2016-11-06 15:13:44 +01:00
Rachael Alexanderson
9f9e4ea19d
- Added randi's "bottomclip" parameter to dpJudas's OpenGLSWFrameBuffer::FillSimplePoly implementation. The code refused to compile because of the new changes. Note that this is not tested on Linux or Mac, and will likely need changes there as well.
2016-11-06 08:58:06 -05:00
Major Cooke
2583da9680
Do not allow DMG_FORCED to bypass ultimate degreeslessness/buddha for players.
2016-11-06 07:44:30 -06:00
Christoph Oelckers
10ef430bae
Revert "Do not allow DMG_FORCED to penetrate player ultimate degreelessness/buddha."
...
This reverts commit 0130bde077
.
This wasn't supposed to get merged, so get rid of it again. The change in semantics here is not acceptable.
2016-11-06 14:18:13 +01:00
Christoph Oelckers
647fd53a15
- fixed: An 'if' statement with only one branch may never considered to be always returning.
2016-11-06 14:14:54 +01:00
Rachael Alexanderson
901727a7f8
Merge branch 'master' of https://github.com/rheit/zdoom
2016-11-06 08:11:04 -05:00
Christoph Oelckers
6414fd301b
- let's add a 'float' cast, too, just in case. It still will cast to double, because single precision floats only can exist as memory values.
2016-11-06 13:21:47 +01:00
Christoph Oelckers
398433b5e6
- fixed: Explicit casts to bool were missing.
2016-11-06 13:20:22 +01:00
Christoph Oelckers
2ac0046cda
- fixed and cleaned up state index jump handling
...
* use the function build list instead of the function to pass the info. The function is permanent so not the best place for compile-time info.
* pass along the current state index which is needed to calculate the target state.
2016-11-06 13:14:46 +01:00
Christoph Oelckers
c354000f1c
- block "" and 0 as valid state names in ZScript. There were common workarounds for the lack of a null pointer in DECORATE which no longer are supported as those and would produce errors now.
2016-11-06 12:00:16 +01:00
Magnus Norddahl
3a7532fd9b
Improve flat mipmap selection
2016-11-06 11:39:28 +01:00
Christoph Oelckers
062574b726
- fixed damage handling in A_BetaSkullAttack. For unknown reasons this completely bypassed the normal damage function semantics and even multiplied that with a random value.
...
- made some tests about calling script code from native functions.
* scriptified A_SkullAttack to have something to test
* changed the A_SkullAttack call in A_PainShootSkull.
* use a macro to declare the function pointer. Using local static variable init directly results in hideous code for the need of being thread-safe (which, even if the engine was made multithreaded is not needed here.)
* Importsnt node here: Apparently passing an actor pointer to the VMValue constructor results in the void * version being called, not the DObject * version.
2016-11-06 11:36:12 +01:00
Christoph Oelckers
dbde0971ef
- removed the second 'calculated' return value from the damage function call in GetMissileDamage as it is no longer needed or even code being generated for.
2016-11-06 10:28:01 +01:00
Christoph Oelckers
c3ae560289
- scriptified two more trivial functions.
2016-11-06 09:22:03 +01:00
Magnus Norddahl
aad2cde332
Oops, forced all sandy bridge CPUs to westmere instead of just Pentium G840
2016-11-06 07:37:18 +01:00
Magnus Norddahl
70d4097b34
Fix clamping bug when r_mipmap is off
2016-11-06 07:33:17 +01:00
Marisa Heit
55ee78fc0b
Add bottomclip parameter to FillSimplePoly() for the software implementation
...
- Polygons will be clipped to bottomclip. If this is zero or below, they
will be clipped to the bottom of the screen instead. This keeps the
polygons from overwriting the status bar border for sofware 2D. The
hardware version ignores it, since it always draws the status bar border
every frame.
2016-11-05 22:49:33 -05:00
Rachael Alexanderson
5e547e9455
Merge branch 'master' of https://github.com/rheit/zdoom
...
# Conflicts:
# src/r_segs.cpp
# src/v_draw.cpp
2016-11-05 23:38:50 -04:00
Marisa Heit
dbc54fbca0
Fix FillSimplePoly() for 1-pixel tall or wide textures
2016-11-05 22:30:16 -05:00
Marisa Heit
ae28c9b29c
Fix divide by 0 in new wallscan functions with 1-pixel tall textures
2016-11-05 22:09:38 -05:00
Major Cooke
0130bde077
Do not allow DMG_FORCED to penetrate player ultimate degreelessness/buddha.
2016-11-05 20:15:41 -05:00
Christoph Oelckers
c9a96ed0ae
- fixed: CALL_ACTION always set 3 args, even for normal methods. Also moved this to a sunfunction because the macro created a lot of code.
2016-11-06 01:34:54 +01:00
Christoph Oelckers
b59f4e950f
- fixed: The return prototyxpe may only be retrieved after the return state of the function has been checked. Also made this a real error message instead of an assert because it will inevitably result in a crash if the prototype cannot be generated, making diagnostics impossible.
2016-11-05 21:02:26 +01:00
Christoph Oelckers
0f9ebff3ee
- fixed: The return checking code must be inside the nullptr check for item.code.
2016-11-05 18:56:04 +01:00
Christoph Oelckers
0851d698de
- don't run constant state indices through the runtime checker.
2016-11-05 18:15:53 +01:00
Christoph Oelckers
1b77a8f491
- fixed: Tacking on a return statement should only be done if the function has branches that actually reach the end. Otherwise it may interfere with return type deduction.
...
- used the return check to optimize out unneeded jumps at the end of an if statement's first block.
2016-11-05 18:05:57 +01:00
Christoph Oelckers
98fa3d2d93
- added an accessor to the actor defaults. This might have been possible with less work using a function but that would have necessitated some type casts when using it on subclasses.
...
- scriptified A_BarrelDestroy to test the above.
2016-11-05 17:14:16 +01:00
Magnus Norddahl
d084f77546
Fix mipmap generation bug
...
Fix crash due to dc_source2 not always being set
Add r_lod_bias to control mipmap selection
Improve LOD calculations to take the U texture coordinate into account
2016-11-05 16:12:59 +01:00
Christoph Oelckers
24925c88a8
- added readonly pointers. They need to be defined with 'readonly<classtype>'. These are significantly different from declaring a field readonly in that they do not disallow modification of the variable itself but what it points to. For the actor defaults this is necessary to prevent accidental modification. A readonly pointer is actually a different type than a regular pointer.
...
- fixed code generation for dynamic cast. It was missing the jump instruction after the compare.
2016-11-05 13:51:46 +01:00
Magnus Norddahl
4b18530047
Add linear filtering to column drawers and fix offsetting bug with wall/span linear filters
2016-11-05 11:29:50 +01:00
Christoph Oelckers
ca878b5e6b
Merge branch 'master' of https://github.com/rheit/zdoom into zscript
2016-11-05 10:40:02 +01:00
Christoph Oelckers
9ab779fd61
Merge commit '60ae4a8568d9fc929c803036fa16fa0f9bfb68a2'
2016-11-05 10:39:13 +01:00