alexey.lysiuk
7bd281ddc9
Added zero initialization of implicit dynamic array items
...
https://forum.zdoom.org/viewtopic.php?t=60111
2018-04-05 12:22:41 +03:00
alexey.lysiuk
ac7e5def32
Forbade dynamic array as the return type of a function
...
Compiler ignored this case silently but it crashed during code generation
2018-04-02 15:18:30 +03:00
alexey.lysiuk
ff96980dda
Fixed handling of default values in String.Mid()
...
https://forum.zdoom.org/viewtopic.php?t=60047
2018-03-31 21:45:20 +03:00
Christoph Oelckers
e89a598b31
- renamed FTexture's UseType flags and gave them a dedicated type.
...
This was done mainly to reduce the amount of occurences of the word FTexture but it immediately helped detect two small and mostly harmless bugs that were found due to the stricter type checks.
2018-03-25 20:26:16 +02:00
Jason Francis
bd7791ad9c
Allow setting string user variables in ACS
2018-03-24 10:20:39 +01:00
Jason Francis
4494b18e8a
Enable string & float user_ properties in UDMF things
2018-03-24 10:20:39 +01:00
Christoph Oelckers
f1bfc3514d
- fixed: For proper recognition of optional function arguments, the argflags must also be copied from the parent function to ensure they are itdentical on the override.
2018-03-14 19:52:30 +01:00
Christoph Oelckers
5d436cd3ed
- forward the error state of the translation parser to the calling code so that it can print a message pointing to the problem content.
2018-03-12 19:14:56 +01:00
Christoph Oelckers
13ef97c4ac
- removed debug message.
2018-03-12 18:47:49 +01:00
Major Cooke
4851c5bfde
Insert an extra line after printing the warnings.
2018-03-12 18:17:08 +01:00
Christoph Oelckers
def5e1d61b
Added proper handling for default parameter values of virtual overrides
...
Due to how the VM handles default parameters, these must always be identical to the parent to prevent undefined behavior.
So now, if such parameters are encountered, the compiler will either abort (for script version >= 3.3) or print a warning (for older versions.)
Any defaults being specified for older versions will be ignored, though, and the defaults of the parent function be copied to the override.
2018-03-12 10:19:16 +01:00
alexey.lysiuk
81bc05b7c5
Added support for default values of arguments with uint type
2018-03-07 15:58:06 +02:00
Christoph Oelckers
bcc8972356
- fixed: A preincrement of a local variable generated wrong code if passed as a function parameter.
...
Due to the special nature of this expression the code generator got stuck in 'address' mode and passed the address of the variable instead of its value.
2018-03-01 15:00:18 +01:00
Christoph Oelckers
425f1408f7
- fixed skip_super application fro ZScript.
...
The order of processing is different here so when the property gets parsed there are no states to delete.
To fix this the property just flags the class and lets the ZScript state compiler deal with this as needed.
2018-02-28 18:10:04 +01:00
Christoph Oelckers
af14609de7
- don't skip empty arrays which are themselves array elements in the ZScript serializer.
2018-02-27 15:42:22 +01:00
Christoph Oelckers
aaaf9aa108
Added 'TeleportSpecial' as an alias for 'Teleport' in ZScript to deconflict from the Actor.Teleport function.
2018-02-27 12:44:00 +01:00
alexey.lysiuk
74357ced0c
Fixed read of potentially junk values in ZScript parser
...
The following ill-formed ZScript code might crash targets with sizeof(int) != sizeof(void*) like 64-bit Intel
class test { void func() { if (true) ( return; ) } }
2018-02-21 16:26:04 +02:00
alexey.lysiuk
1e41c042d4
Fixed codegen crash with non-numeric random seed
...
The following code crashed ZScript code generator if my_seed is not convertible to numeric type
SetRandomSeed[my_random_id](my_seed);
2018-02-19 11:46:36 +02:00
Christoph Oelckers
09f1859c83
- allow retrieving the length of a string constant.
2018-01-21 18:49:46 +01:00
Christoph Oelckers
dbf0a68b02
Merge commit '67e3106254e987f5acb9534e725d4f5c3eaa82b2'
...
# Conflicts:
# src/doomdata.h
# src/namedef.h
# src/p_udmf.cpp
2018-01-20 19:07:54 +01:00
Christoph Oelckers
19cf887ad1
- fixed: Dynamic arrays for object pointers need different treatment than arrays for regular pointers, because they require GC::WriteBarrier to be called.
2018-01-19 19:49:42 +01:00
alexey.lysiuk
6d20da8ab5
Fixed nust -> must typos
2018-01-18 11:43:32 +02:00
Magnus Norddahl
5f36b86013
- Add dynamic spot lights
2018-01-04 17:58:11 +01:00
alexey.lysiuk
d50ba4954a
Fixed potential crash when calling undefined function in ZScript
...
The following code which uses explicit class specifier led to a crash:
class C
{
void F()
{
Object.Undefined();
}
}
2017-12-23 15:27:32 +02:00
Christoph Oelckers
ab58e4acb0
- use FileWriter for the AST dump.
2017-12-02 12:01:55 +01:00
alexey.lysiuk
5d83ee5e89
Exposed String.Remove() function to ZScript
...
https://forum.zdoom.org/viewtopic.php?t=58402
2017-11-12 14:44:21 +02:00
alexey.lysiuk
4beefb7007
Removed warning for uninitialized variables in ZScript
...
This reverts commit 8104ef5189
2017-11-06 15:38:28 +02:00
alexey.lysiuk
274951839a
Removed unused parameter from several functions in FStateDefinitions class
...
src/p_states.cpp:724:54: warning: parameter ‘actor’ set but not used [-Wunused-but-set-parameter]
https://forum.zdoom.org/viewtopic.php?t=58364
2017-11-05 15:20:25 +02:00
alexey.lysiuk
8104ef5189
Added warning for uninitialized variables in ZScript
...
https://forum.zdoom.org/viewtopic.php?t=57868
2017-11-03 16:23:41 +02:00
alexey.lysiuk
dac5777a70
Removed obsolete declarations from codegen.h
2017-11-03 12:44:28 +02:00
alexey.lysiuk
81ea9fb372
Added runtime check for negative array indices in VM
...
https://forum.zdoom.org/viewtopic.php?t=57886
2017-11-02 18:01:13 +02:00
alexey.lysiuk
57de598e48
Added implicit scope for if/else, while and do/while statements in ZScript
...
Scope is added only for variable or constant definition so it will no longer leak to outer scope
https://forum.zdoom.org/viewtopic.php?t=57848
2017-11-02 17:10:54 +02:00
alexey.lysiuk
de7d8995d5
Added string representation of 'static const' token
...
No more 'Unknown(-141)' in 'Expecting ...' error message
2017-11-02 14:45:35 +02:00
alexey.lysiuk
62e91b23bd
Extended String.LastIndexOf() with endIndex parameter
...
https://forum.zdoom.org/viewtopic.php?t=57326
2017-11-01 15:24:05 +02:00
alexey.lysiuk
c4865d2bb6
Exposed string split functionality to ZScript
...
https://forum.zdoom.org/viewtopic.php?t=58114
2017-10-28 11:44:12 +03:00
alexey.lysiuk
40a348b1f1
Fixed potential crash in resolving of multiple assignment
...
https://forum.zdoom.org/viewtopic.php?t=58055
https://forum.zdoom.org/viewtopic.php?t=58237
2017-10-27 18:15:24 +03:00
alexey.lysiuk
cb982ec313
Use FString::Back() when possible
...
Changed usages of str[str.Len() - 1] to str.Back()
2017-10-23 11:55:20 +03:00
alexey.lysiuk
48f9e53580
Added better error message for invalid class/struct member
...
https://forum.zdoom.org/viewtopic.php?t=57959
2017-09-24 10:25:05 +03:00
Magnus Norddahl
cfc1bfd1e2
- Fixed FxPow::Resolve not specifying the ValueType
2017-09-24 01:15:58 +02:00
Christoph Oelckers
eade38fb09
- fixed crash when defining a global constant which references a class member constant in its value.
2017-09-02 08:14:50 +02:00
Christoph Oelckers
948e50e458
- fixed: The struct field compiler did not check for forward declared type references that hadn't been resolved yet.
2017-08-27 12:31:47 +02:00
alexey.lysiuk
7b98fdb910
Added ToInt() and ToDouble() functions to ZScript string
...
https://forum.zdoom.org/viewtopic.php?t=57678
2017-08-25 15:09:18 +03:00
Christoph Oelckers
b4fa95ab15
- handle state label resolution in a non-actor cpntext more gracefully.
...
Note that this is merely a hotfix. Properly handling this to allow universal use of state scopes will require more work in cases where a scoped state is being accessed through a non-self pointer.
2017-08-12 10:04:06 +02:00
alexey.lysiuk
33beca6e6f
Exposed ToLower() and ToUpper() string functions to ZScript
...
https://forum.zdoom.org/viewtopic.php?t=57515
2017-08-07 15:24:18 +03:00
Rachael Alexanderson
91ff447a90
- fixed compile from last commit
...
- refactored the zscript hookup a bit, made it actually work
2017-07-29 17:03:43 -04:00
Rachael Alexanderson
712d21e26a
- implement per-renderer sprite hiding based on the actor's render feature flags
...
- hook the thing up to zscript (does not currently compile)
2017-07-29 17:03:43 -04:00
alexey.lysiuk
7436693860
Enabled dynamic stack size in ZScript parser generated by Lemon
...
https://forum.zdoom.org/viewtopic.php?t=57322
2017-07-23 11:54:16 +03:00
alexey.lysiuk
c56cd245ac
Added IndexOf() and LastIndexOf() functions to ZScript string type
...
https://forum.zdoom.org/viewtopic.php?t=57313
2017-07-22 10:54:32 +03:00
Christoph Oelckers
daca12600d
- fixed: The ADDA_RK opcode used the wrong constant type for the offset it adds to the pointer.
2017-07-15 09:14:39 +02:00
alexey.lysiuk
71b70d74a9
Fixed error handling in vector by scalar multiplication
...
https://forum.zdoom.org/viewtopic.php?t=57089
2017-07-01 12:37:31 +03:00