Ricardo Luís Vaz Silva
96a3e8d405
rework how vector local type restrictions are managed
2025-04-09 14:21:36 -03:00
Boondorl
5a5bed5c31
Added FindClass
...
Allows for classes to be looked up during run time without having to use string casting.
2025-02-21 07:17:49 -05:00
Chronos Ouroboros
7d180069e3
Fix FxExpression::EmitCompare not properly handling constant registers.
2025-02-17 07:53:27 -03:00
Ricardo Luís Vaz Silva
fcc2fc65de
change id type fixes version from 4.15 to 4.14.1
2025-02-08 10:56:55 -05:00
Ricardo Luís Vaz Silva
e543e26bdc
expand deprecation allowance for gzdoom.pk3
2025-01-30 13:34:25 -03:00
Ricardo Luís Vaz Silva
bdddfcc80a
allow nullptr with spriteid/textureid/translationid (for default parameters/etc)
2024-12-21 04:33:25 -05:00
Ricardo Luís Vaz Silva
d36fa3c36b
add helper methods to Sound/SpriteID/TranslationID
2024-12-21 04:33:25 -05:00
Ricardo Luís Vaz Silva
eefad0764e
fix TranslationID casting
2024-12-21 04:33:25 -05:00
Ricardo Luís Vaz Silva
325817afdf
remove version check for array type fix, to prevent crashes/etc with bad types
2024-12-12 15:18:53 -05:00
Boondorl
597b06ae52
Added CRandom functions
...
Unique RNG namespace for client-side effects and HUDs. Identifiers for these cannot clash with identifiers that affect the playsim making them completely safe to use in HUD elements. They also won't be saved.
2024-11-15 23:56:23 -03:00
Christoph Oelckers
ee6991e6d8
Do a check if a local variable exceeds the available stack space.
...
Windows stack is 1 MB so play it safe and allow 512 kb as max. stack space for a single function.
2024-10-25 07:55:17 +02:00
Christoph Oelckers
3798fd815f
the MISSILE(EVEN)MORE flags still need to be accessible by ZScript for backwards compatibility.
...
Since these do not exist anymore an internal interface to Handle/CheckDeprecatedFlags was added.
2024-10-03 12:32:09 +02:00
Ricardo Luís Vaz Silva
461c2f77b7
restrict new relaxed named arguments to zscript >= 4.13
2024-06-03 10:52:07 -03:00
Ricardo Luís Vaz Silva
20cf8befbf
Rework named arguments
...
Now allows arguments to be in any arbitrary position, and allows required arguments to be named
2024-06-03 10:52:07 -03:00
Ricardo Luís Vaz Silva
949cd5b746
Fix let ignoring const-ness
2024-04-19 13:28:18 -03:00
Ricardo Luís Vaz Silva
682dd1b22d
Can't narrow down the JIT bug yet, so block JIT for functions that call Function Pointers temporarily
2024-03-22 13:28:02 -03:00
Ricardo Luís Vaz Silva
d848a57bac
Fix readonly for SpecialBounceHit virtual
2024-02-23 07:07:56 +01:00
Ricardo Luís Vaz Silva
bc26c54b15
Fix readonly native structs
2024-02-17 07:23:00 +01:00
Christoph Oelckers
83aa9388ca
backend update from Raze
...
* moving large allocations off the stack
* use proper printf formatters for size_t and ptrdiff_t.
* adding some missing 'noexcept'.
2024-01-06 15:24:10 +01:00
Ricardo Luís Vaz Silva
4ec76afc40
move all doom-specific loops out of common code
2023-11-20 22:11:05 -05:00
Ricardo Luís Vaz Silva
71999e7cf6
add foreach(a/type a : thinkeriterator/actoriterator)
2023-11-20 22:11:05 -05:00
Ricardo Luís Vaz Silva
f5507a7373
add foreach(a/l/a,p/l,p/a,p,f/l,p,f : blocklinesiterator/blockthingsiterator)
2023-11-20 22:11:05 -05:00
Ricardo Luís Vaz Silva
5cb0e3bc5b
add foreach v loop for maps
2023-11-20 22:11:05 -05:00
Ricardo Luís Vaz Silva
c58bd6efb5
add foreach k,v loop for maps
...
* make FxFunctionCall and FxMemberFunctionCall take a temporary for args, since they always move it
* fix type for cast
2023-11-20 22:11:05 -05:00
Christoph Oelckers
c73f805110
restore accidentally deleted 'else'.
2023-11-19 13:01:08 +01:00
Christoph Oelckers
8e319a7669
allow comparisons between ints and translation IDs in pre 4.12 ZScript.
2023-11-19 07:47:23 +01:00
Christoph Oelckers
8c5eb2c807
use FTranslationID in all places where strict type checking is needed.
...
This means all properties in serializable classes now use this wrapper type. The backend hasn't been changed yet
2023-11-09 23:04:10 +01:00
Christoph Oelckers
f0c9b1765e
gave translations a dedicated scripted type.
...
This is needed for implementing reliable serialization of custom translations. As long as they are merely ints they cannot be restored on loading a savegame because the serialization code does not know that these variables are special.
2023-11-09 23:04:10 +01:00
Ricardo Luís Vaz Silva
e26f9fb13d
fix int assign optimization constants generating broken code because they weren't expected
2023-11-01 16:51:26 +01:00
Ricardo Luís Vaz Silva
1957c15a41
give error instead of warning for zscript 4.12+ on return count mismatch
2023-10-15 18:51:05 +02:00
Ricardo Luís Vaz Silva
d699ba248e
warn when fewer returns than expected are given for a function
2023-10-15 18:51:05 +02:00
Ricardo Luís Vaz Silva
e61bd10bbf
Finish implementing function pointers
...
Allow using function literals with function pointers, allow narrowing classes parameter types, and widening classes in return types, allow pointers to non-static, non-virtual functions, add null checking to function calls
2023-10-11 19:12:48 +02:00
Ricardo Luís Vaz Silva
e3704605d8
Implement Static Function Pointers
2023-10-11 19:12:48 +02:00
Christoph Oelckers
79f2fc6553
backend update from Raze.
...
Mainly a VMFunction script type and some associated utilities.
2023-10-09 18:45:30 +02:00
Ricardo Luís Vaz Silva
42df40941c
change version, improve errors for array/map/struct copy
2023-10-07 17:27:35 +02:00
Ricardo Luís Vaz Silva
b9104e8aa9
Turn Map/Array assignments into Copy
...
Better error checking for struct assignment
Lock assignments behind version, don't break or "fix" existing code using older ZScript versions
2023-10-07 17:27:35 +02:00
Ricardo Luís Vaz Silva
86e4d064e2
fix possible null dereference in FxStructMember::RequestAddress
2023-10-07 17:27:35 +02:00
Christoph Oelckers
1717ff47b2
add GetChars() accessors to many FString uses where const char* is wanted.
...
By no means complete, it's just a start to get rid of that automatic type conversion operator.
2023-10-03 14:27:39 +02:00
Christoph Oelckers
d001c3464d
- removed another bad assert from codegen.cpp
2023-09-15 20:51:05 +02:00
Player701
eec08f0e24
- hopefully fixed the "is" operator to work with readonly pointers.
2023-08-02 00:42:40 -04:00
Christoph Oelckers
81fb9a26b2
- backend update from Raze.
...
* add QualifiedName to VMFunction and allocate these static names from the class data memory arena instead of using FStrings.
* null pointer type checks in the VM added to avoid crash on bad codegen.
2023-07-22 09:55:49 +02:00
Ricardo Luís Vaz Silva
86bc9cafd4
Fix value of X = Y when Y is an int constant
2023-04-12 22:57:06 +02:00
Rachael Alexanderson
ea720605d4
Revert "Fixed an error where implicit pointer casts should've failed but didn't."
...
This reverts commit 68d3f474ce .
# Conflicts:
# src/common/scripting/backend/codegen.cpp
2023-02-11 11:30:05 -05:00
Christoph Oelckers
f6bfc48d9f
- Backend update from Raze.
2023-02-11 12:05:45 +01:00
CandiceJoy
68d3f474ce
Fixed an error where implicit pointer casts should've failed but didn't.
...
Signed-off-by: CandiceJoy <candice@candicejoy.com>
2023-02-11 00:02:51 -05:00
Ricardo Luís Vaz Silva
569263efe9
Extend pseudo-generics system used by maps to dynarrays
2023-02-09 17:02:40 +01:00
Ricardo Luís Vaz Silva
ed6384edc6
Add internal variable support to files outside gzdoom.pk3
2023-01-20 22:34:26 +01:00
Ricardo Luís Vaz Silva
d4e9438273
rename CheckWritable to IsWritable, and invert its output since it's always negated
2023-01-20 22:34:26 +01:00
Ricardo Luís Vaz Silva
6072260b3f
Fix FxMultiAssignDecl type
2022-12-23 15:54:23 +01:00
Ricardo Luís Vaz Silva
c8fe074041
Multi-Assign Declarations
2022-12-20 23:22:37 +01:00