Christoph Oelckers
9eeb56212b
- fixed: A VM function's NumArgs value needs to count stack arguments, not logical ones, meaning that for vectors each element needs to count separately.
...
- renamed VMFunction::Defaults to DefaultArgs to make searching easier.
- let ZCCCompiler process vector defaults for function parameters.
2016-10-30 09:05:42 +01:00
Magnus Norddahl
a7d06ddd77
Add texturing to triangle drawer
2016-10-30 08:18:55 +01:00
Leonard2
06ec6318a9
Fixed: A vector value could point to garbage data after being 'unnested'
2016-10-30 07:37:13 +01:00
Leonard2
5643d6c692
Make sure to use the REGT_MULTIREG flags for opcodes that need it
2016-10-30 07:37:12 +01:00
Leonard2
8be7af41a9
Don't use a struct reference for vectors as return type just like for parameters
2016-10-30 07:36:00 +01:00
Leonard2
94410accf4
Renamed "VectorInitializer" to "VectorValue"
...
This was really confusing for me as this is an actual vector "value" rather than an "initializer"
2016-10-30 07:34:14 +01:00
Rachael Alexanderson
6ea0baac3a
- Next "pre" tag.
2016-10-29 22:49:34 -04:00
Rachael Alexanderson
e2fa16c99e
Actually - changed our minds - this is going to be 1.0. :)
2016-10-29 21:51:43 -04:00
Rachael Alexanderson
09961abeea
- Version 0.1.1 tag
2016-10-29 21:44:30 -04:00
Christoph Oelckers
ac1c022911
- implemented the 'is' operator (i.e. class type check.)
2016-10-30 01:05:56 +02:00
Christoph Oelckers
78a18acf46
- added string handling to comparison operators.
2016-10-29 18:57:56 +02:00
Christoph Oelckers
853c6f6684
- fixed initialization of local variables with other local variables.
...
- fixed several occurenced where vectors were treated as floats. NOTE: The entire codegen.cpp file needs to be carefully reviewed for bad use of the REGT_ constants, there's probably more places where using them has broken some type checks.
- fixed: committed test version of zscript.txt instead of changed actor.txt by accident.
Initialization and assignment for strings is working with this commit.
2016-10-29 16:49:21 +02:00
Christoph Oelckers
7f2350cf64
Merge branch 'master' of https://github.com/rheit/zdoom
2016-10-29 16:08:46 +02:00
Christoph Oelckers
4dc97a6ed0
- fixed register allocation for vector arguments to script functions.
...
- handle 2D and 3D vectors in SetReturn.
2016-10-29 13:42:37 +02:00
Christoph Oelckers
7209f9edd6
- implemented passing vectors as parameters. So far working for native functions.
...
- removed the bogus optional value from the first A_Jump argument. A quick test with an older ZDoom revealed that this was never working - and implementing it would make things a lot more complicated, especially error checking in the code generator.
- fixed: The check for insufficient parameters to a function call was missing.
2016-10-29 13:10:27 +02:00
Christoph Oelckers
e94b4cc74e
Merge branch 'master' into zscript
2016-10-29 11:20:32 +02:00
Christoph Oelckers
f5d1b1a491
- added vector builtins Length() and Unit().
...
This should complete the vector type except for use as function parameter.
2016-10-29 10:43:22 +02:00
Christoph Oelckers
b5222f08e8
- implemented dot and cross products (not that I'd ever expect these to become useful in a game like Doom...)
2016-10-29 10:16:00 +02:00
Magnus Norddahl
de8260ed8b
Merge remote-tracking branch 'origin/dancingsprites' into qzdoom
2016-10-29 08:13:20 +02:00
Magnus Norddahl
87ea75169e
Fix texturefrac out of bounds bug
2016-10-29 08:11:12 +02:00
Magnus Norddahl
ea44a445af
Improve drawer debug info details
2016-10-29 07:20:16 +02:00
Magnus Norddahl
ea9b45d988
Change read access violations to be non-fatal
2016-10-29 06:50:09 +02:00
Magnus Norddahl
deaced4bfa
Merge remote-tracking branch 'origin/dancingsprites' into qzdoom
2016-10-29 06:14:22 +02:00
Magnus Norddahl
837ed7bd80
Fix dancing sprites due to texture coordinate calculations not taking pixel centers into account
...
Merge R_DrawMaskedColumn and R_DrawMaskedColumnHoriz into one function to remove code duplication
2016-10-29 05:35:41 +02:00
Leonard2
594a0c2008
Fixed: FxVMFunctionCall didn't check for varargs while checking argument count
2016-10-29 02:18:15 +02:00
Christoph Oelckers
e5878f0cb2
- implemented vector operations. Vectors are now fully working as local variables.
...
- removed mulv_kr and divv_kr instructions. The first are redundant and the second are useless. Maybe remove all other vector/const operations as well? They won't get used by the code generator.
- fixed disassembly of vector multiplication and division instructions.
2016-10-29 01:39:25 +02:00
Christoph Oelckers
9400f97189
- implemented local vector variables. Currently only the definition plus initial assignment works.
...
- removed all vector4 handling that had already been added, now that this type can no longer be defined.
2016-10-28 15:15:30 +02:00
Christoph Oelckers
f2f365bfef
- fixed setup for PString which was missing the load/store/move instructions which caused me to overlook its register type.
...
- properly set up the vector types.
- fixed: a struct must start with a size of 0, not 1. This caused the layout of the vectors to be broken.
2016-10-28 14:43:29 +02:00
Christoph Oelckers
ed5a94d187
- fixed GetOps() call and added info for vectors.
2016-10-28 13:30:19 +02:00
Christoph Oelckers
f511a9398e
- changed GetStore/LoadMoveOp and GetRegType to be based on a set of member variables instead of using virtual functions to return such trivial values. This not only creates significantly better code but also allows overriding these settings without having to create a new class just for changing them (as is needed for vectors.)
2016-10-28 10:44:01 +02:00
Christoph Oelckers
3b1f411dce
- added a full set of 2D vector instructions to the VM. The existing one was 3D only but there's also need to handle two-dimensional vectors.
...
- added the missing divv* instructions.
2016-10-28 10:13:07 +02:00
Christoph Oelckers
35cd48b86b
- fixed grammar rule for two-dimensional vectors.
2016-10-28 09:47:22 +02:00
Magnus Norddahl
54c94f6e58
Fix pinkie having the blues
2016-10-28 02:41:14 +02:00
Magnus Norddahl
767c3a2edd
Fix dancing sprites due to texture coordinate calculations not taking pixel centers into account
2016-10-28 01:55:59 +02:00
Christoph Oelckers
3fa315aaea
- replaced 'vector<2>' and 'vector<3>' with 'vector2' and 'vector3'.
...
- added initializer syntax for vectors. A vector can be set with vectorvar = (x,y,z); for a 3-dimensional vector and vectorvar = (x, y); for a 2-dimensional one.
2016-10-28 01:14:21 +02:00
Christoph Oelckers
286f9510d4
- got rid of all default parameter redundancies.
...
- scriptified a few more functions.
2016-10-28 00:32:52 +02:00
Christoph Oelckers
03efb63e93
- fixed bad register use in postincrement operator.
2016-10-27 19:14:16 +02:00
Christoph Oelckers
c7347608a4
- scriptified A_FatAttack*.
...
- swapped parameters of two-parameter VelToAngle method, so that internal and script version are in line.
- fixed parameter asserts to handle NULL pointers properly.
2016-10-27 17:47:46 +02:00
Christoph Oelckers
948ef62fcd
- use the function defaults from the script instead of explicitly setting them again in the code. This is a needless cause of potential errors and since the values are readily available now it's better to use them in the functions.
...
- fixed: ZCCCompiler did not process array access nodes.
- fixed: Function argument names were not placed in the destination list by the compiler.
- scriptified several trivial functions from p_actionfunctions.cpp.
2016-10-27 15:53:53 +02:00
Rachael Alexanderson
9ed45c7e03
Merge branch 'master' of http://github.com/rheit/zdoom
2016-10-26 22:06:25 -04:00
Jason A. Yundt
4c420938c9
- Added install rules so that 'make install' works.
2016-10-26 20:57:42 -04:00
Christoph Oelckers
66b1f36e56
- actually evaluate the default parameters and store them in the VMFunction.
...
- disabled the assert in PType::GetRegType. This assert blocks any use to check for types that are incompatible with function parameters.
- pass the default parameter constants to the native functions. At the moment this is not used yet.
- use the function defaults to complete argument lists to script functions.
- fixed all default values that got flagged by the expression evaluator as non-constant. Most were state labels and colors which were defaulted to "". The proper value is null for states and 0 for colors.
- also replaced all "" defaults for names with "none".
2016-10-27 01:30:34 +02:00
Christoph Oelckers
d32d52c0b9
- scriptified a_spidermaster.cpp.
...
- fixed bad assert in XOR_RK instruction.
2016-10-26 17:21:25 +02:00
Christoph Oelckers
c961e653a5
Merge branch 'master' into zscript
2016-10-26 15:55:56 +02:00
Christoph Oelckers
327d4d85a7
- fixed: UseOffsets can only be handled after the patch is has been set up.
2016-10-26 15:02:20 +02:00
Christoph Oelckers
a166183ab4
-fixed type handling for varargs (i.e. A_Jump.)
2016-10-26 14:15:11 +02:00
Christoph Oelckers
7c759f9fcf
- removed the FxDamageValue hack and implemented it properly using FxReturnStatement.
...
- added handling of damage functions for ZScript.
2016-10-26 14:04:49 +02:00
Christoph Oelckers
e50315bd31
- fixed: Deprecation messages should never appear in DECORATE.
...
- removed some console message spam.
2016-10-26 13:22:36 +02:00
Christoph Oelckers
d4ea991763
Merge branch 'master' into zscript
2016-10-26 12:18:06 +02:00
Christoph Oelckers
12ce76426e
Revert "Allows loading directories as IWADs using "-iwad" command line parameter."
...
This reverts commit 81449728d7
.
Reverted because it compromises the IWAD file lookup and fixing it properly is not so trivial.
The skipping of adding the file name extension was not only broken, but even after fixing the code does not work if the IWADs are located outside the working directory.
2016-10-26 12:13:57 +02:00