Christoph Oelckers
40e7fa5be2
- scriptified the RandomSpawner.
...
- fixed: String constants were not processed by the compiler backend.
- added an explicit name cast for class types.
2017-01-14 02:05:52 +01:00
ZZYZX
a8beb51ca3
Changed opcode implementation to native function implementation
2017-01-13 22:59:45 +01:00
ZZYZX
ee2ecf1450
Added %c (from int) and %p (from pointer) support to format()
2017-01-13 22:59:45 +01:00
ZZYZX
fcc5f4b77b
Fixed EFX_ enum for FxFormat
2017-01-13 22:59:45 +01:00
ZZYZX
e75aa08d0a
Implemented format() builtin call
2017-01-13 22:59:45 +01:00
Christoph Oelckers
d338ca3ec1
- scriptified the sector actions.
2017-01-13 13:51:47 +01:00
Edoardo Prezioso
3b7d18c129
- Fixed crash while exiting if compiled by GCC -O3.
2017-01-13 12:02:00 +01:00
Christoph Oelckers
85a84b5e94
- scriptified FastProjectile.
2017-01-13 00:35:56 +01:00
Christoph Oelckers
23482735a0
- removed PClassAmmo.
...
No need to maintain these clunky meta class for one single property. The overhead the mere existence of this class creates is far more than 100 spawned ammo items would cost.
There is no need to serialize AAmmo::DropAmount, this value has no meaning on an already spawned item.
2017-01-12 11:44:33 +01:00
Christoph Oelckers
5ef9429ae4
- added the ability to attach a constructor or destructor to an internally defined struct.
...
There are a few which require explicit native construction or destruction that need to be exported to the VM, e.g. FCheckPosition.
The VM cannot handle this directly, it needs two special functions to be attached to handle such elements.
2017-01-11 23:46:03 +01:00
Christoph Oelckers
de4153ceaf
some groundwork for the implementation of dynamic arrays
...
- created script exports for all relevant functions with all integral types.
- created script side definitions for the underlying data types.
- added a void pointer type so that the prototype for the pointer array can use a generic type every pointer can be assigned to.
2017-01-11 00:57:31 +01:00
Christoph Oelckers
3696d34806
- added IF_NOSCREENBLINK flag, see http://mantis.zdoom.org/view.php?id=9
2017-01-10 19:57:51 +01:00
Christoph Oelckers
12037fdc95
- made the vertexes array VM friendly.
2017-01-09 00:46:16 +01:00
Christoph Oelckers
f78927500e
- exported all meaningful parts of side_t to the VM.
2017-01-08 21:42:26 +01:00
Christoph Oelckers
7a5171a2e9
- fixed: The check for virtual function overrides was never done if the overriding function had no qualifier at all.
...
- fixed several occurences where an 'override' qualifier was missing.
2017-01-08 19:07:26 +01:00
Christoph Oelckers
cd7986b1b1
- refactored global sides array to be more VM friendly.
...
- moved FLevelLocals to its own header to resolve some circular include conflicts.
2017-01-08 18:46:17 +01:00
Christoph Oelckers
1c74faea73
- exported line_t's functions to the VM.
2017-01-08 15:45:37 +01:00
Christoph Oelckers
71d1138376
- refactored the global lines array into a more VM friendly form, moved it to FLevelLocals and exported it to ZScript.
...
- disabled the Build map loader after finding out that it has been completely broken and nonfunctional for a long time. Since this has no real value it will probably removed entirely in an upcoming commit.
2017-01-08 14:39:16 +01:00
Christoph Oelckers
82adc5bf1e
- exported secplane_t to scripting.
2017-01-07 21:29:43 +01:00
Christoph Oelckers
c02281a439
- refactored the global sectors array into a more VM friendly type and moved it into FLevelLocals.
2017-01-07 19:32:24 +01:00
Christoph Oelckers
42b1432b64
- fixed: initialization of local vector variables did not properly allocate registers if the initializer was a subelement of another local vector variable.
2017-01-07 15:44:38 +01:00
Christoph Oelckers
e0540c6b37
- fixed uninitialized variable warning in codegen.cpp
2017-01-06 10:33:58 +01:00
Christoph Oelckers
b74c374a66
- fixed: The CheckReturn check for FxSwitchStatement was not strict enough.
...
It may only return true if there is no default case because without that any non-matching value will go past the statement.
2017-01-05 11:39:29 +01:00
Christoph Oelckers
341d9abdd0
- fixed: 'out' parameters must always allocate an address register, regardless of type.
2017-01-03 16:00:25 +01:00
Christoph Oelckers
e7cd5ec2bb
- fixed: The conditional operator could clobber a local variable if it was the result of the true expression.
2017-01-02 22:26:36 +01:00
Christoph Oelckers
1a16f664e4
- added a TStaticArray class that allows safe access to resizable static data (like the sectors, linedefs, etc.) for the VM.
...
- used this to replace the line list in Sector because that gets already used and implemented proper bounds checks for this type of array.
2017-01-02 21:40:52 +01:00
Christoph Oelckers
9948189193
- scriptified PowerProtection and PowerDamage.
...
- made ModifyDamage calls iterative instead of recursive. With going through the VM they'd be too costly otherwise.
- small optimization: Detect empty VM functions right when entering the VM and shortcut them. This is to reduce the overhead of virtual placeholders, which in a few cases (e.g. CanCollideWith and ModifyDamage) can be called quite frequently.
2017-01-01 23:11:48 +01:00
Christoph Oelckers
356c5f2e08
- removed the ZScript warning.
2017-01-01 12:29:03 +01:00
Edoardo Prezioso
6b943043d1
- Update the list of dummy actor flags from Zandronum.
2016-12-31 23:02:01 +01:00
Christoph Oelckers
28d79cc2b0
- added some profiling code to the VM.
2016-12-31 17:59:48 +01:00
Christoph Oelckers
a37db1c4d7
- fixed: All missiles which can bounce off actors need the CANPASS/PASSMOBJ flag so setting this in the 'bouncetype' property is insufficient, it needs to be done when the actor has been completely parsed.
2016-12-27 00:32:54 +01:00
alexey.lysiuk
aeee80c8fa
Fixed endianness issue in script VM
...
See https://forum.zdoom.org/viewtopic.php?t=54549
2016-12-26 15:31:59 +01:00
Christoph Oelckers
04ff4282ef
- removed the global 'sector_list' variable.
...
If the calling code wants to recycle this it will have to pass a container variable to AActor::UnlinkFromWorld and AActor::LinkToWorld.
This was changed because keeping such data in a global variable is dangerous for a set of functions that can be called from a script.
Note that the scripted versions do not yet support saving of the touching_sectorlist.
2016-12-25 22:40:26 +01:00
ZZYZX
87b23d160b
Ported RenderRadius and related code from gzdoom branch
2016-12-25 13:09:32 +02:00
Christoph Oelckers
4ee2d4a1a4
- print proper information in zcc_compile.cpp.
2016-12-24 23:52:52 +01:00
alexey.lysiuk
5d8d15ecc3
Fixed additional format string warning reported by GCC/Clang
...
See https://forum.zdoom.org/viewtopic.php?t=54541
2016-12-24 23:51:08 +01:00
alexey.lysiuk
e825918451
Fixed format strings warnings reported by GCC/Clang
...
See https://forum.zdoom.org/viewtopic.php?t=54541 and https://forum.zdoom.org/viewtopic.php?t=54709
2016-12-24 23:51:08 +01:00
Christoph Oelckers
1fa37aaeb7
- fixed code generation for if statements with empty 'true' part. For those the jump statement backpatching was not done correctly.
2016-12-18 14:09:16 +01:00
Christoph Oelckers
8dd91f7129
- added a missing null pointer check to FxIfStatement::Emit.
2016-12-18 12:18:03 +01:00
Christoph Oelckers
77d9978b27
- fixed: Non-Actors cannot act as activators for action specials and must pass null when acticating one.
2016-12-11 21:39:35 +01:00
Christoph Oelckers
e61ae9a1f9
- pass a proper self pointer to BuiltinCallActionSpecial instead of making bogus assumptions about a function's parameters.
2016-12-11 21:32:19 +01:00
Christoph Oelckers
40355f6298
- allow A_M_Refire to be called without state label because this seems to have been used in existing DECORATE mods. This way of calling it will revert to the old behavior of jumping one state forward instead of to a state label.
2016-12-11 13:07:25 +01:00
Edoardo Prezioso
8036719f45
- Add GCCPRINTF to ZScript compiler code.
...
This will help spotting errors in code using ZCCCompiler::{Warn,Error}.
2016-12-10 14:02:12 +01:00
Christoph Oelckers
a7c80ae858
- fixed: The message for invalid class extensions did not pass the class name to the error function.
2016-12-10 10:22:13 +01:00
Christoph Oelckers
902a4b839c
- fixed: Type determination of multi-dimensional arrays failed, apparently because ZCCCompiler::Simplify is too broken to leave the node's ring list intact.
...
Instead of trying to fix Simplify, which seems to be a lost cause, the ring list now gets unraveled into an array which is immune from this type of problem.
2016-12-09 23:01:12 +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
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
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
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
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