Merge branch '4.14.2' into gz_merge
This commit is contained in:
commit
9aa44fa13b
83 changed files with 927 additions and 270 deletions
|
|
@ -12748,16 +12748,15 @@ ExpEmit FxFunctionPtrCast::Emit(VMFunctionBuilder *build)
|
|||
FxLocalVariableDeclaration::FxLocalVariableDeclaration(PType *type, FName name, FxExpression *initval, int varflags, const FScriptPosition &p)
|
||||
:FxExpression(EFX_LocalVariableDeclaration, p)
|
||||
{
|
||||
// Local FVector isn't different from Vector
|
||||
if (type == TypeFVector2) type = TypeVector2;
|
||||
else if (type == TypeFVector3) type = TypeVector3;
|
||||
else if (type == TypeFVector4) type = TypeVector4;
|
||||
else if (type == TypeFQuaternion) type = TypeQuaternion;
|
||||
if(type != type->GetLocalType())
|
||||
{
|
||||
ScriptPosition.Message(MSG_WARNING, "Type '%s' not allowed in local variables, changing to '%s'", type->DescriptiveName(), type->GetLocalType()->DescriptiveName());
|
||||
}
|
||||
|
||||
ValueType = type;
|
||||
ValueType = type->GetLocalType();
|
||||
VarFlags = varflags;
|
||||
Name = name;
|
||||
RegCount = type->RegCount;
|
||||
RegCount = ValueType->RegCount;
|
||||
Init = initval;
|
||||
clearExpr = nullptr;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -359,6 +359,7 @@ void PType::StaticInit()
|
|||
TypeVector2->RegType = REGT_FLOAT;
|
||||
TypeVector2->RegCount = 2;
|
||||
TypeVector2->isOrdered = true;
|
||||
TypeVector2->mDescriptiveName = "Vector2";
|
||||
|
||||
TypeVector3 = new PStruct(NAME_Vector3, nullptr);
|
||||
TypeVector3->AddField(NAME_X, TypeFloat64);
|
||||
|
|
@ -373,6 +374,7 @@ void PType::StaticInit()
|
|||
TypeVector3->RegType = REGT_FLOAT;
|
||||
TypeVector3->RegCount = 3;
|
||||
TypeVector3->isOrdered = true;
|
||||
TypeVector3->mDescriptiveName = "Vector3";
|
||||
|
||||
TypeVector4 = new PStruct(NAME_Vector4, nullptr);
|
||||
TypeVector4->AddField(NAME_X, TypeFloat64);
|
||||
|
|
@ -389,6 +391,7 @@ void PType::StaticInit()
|
|||
TypeVector4->RegType = REGT_FLOAT;
|
||||
TypeVector4->RegCount = 4;
|
||||
TypeVector4->isOrdered = true;
|
||||
TypeVector4->mDescriptiveName = "Vector4";
|
||||
|
||||
|
||||
TypeFVector2 = new PStruct(NAME_FVector2, nullptr);
|
||||
|
|
@ -401,6 +404,8 @@ void PType::StaticInit()
|
|||
TypeFVector2->RegType = REGT_FLOAT;
|
||||
TypeFVector2->RegCount = 2;
|
||||
TypeFVector2->isOrdered = true;
|
||||
TypeFVector2->mDescriptiveName = "FVector2";
|
||||
TypeFVector2->SetLocalType(TypeVector2);
|
||||
|
||||
TypeFVector3 = new PStruct(NAME_FVector3, nullptr);
|
||||
TypeFVector3->AddField(NAME_X, TypeFloat32);
|
||||
|
|
@ -415,6 +420,8 @@ void PType::StaticInit()
|
|||
TypeFVector3->RegType = REGT_FLOAT;
|
||||
TypeFVector3->RegCount = 3;
|
||||
TypeFVector3->isOrdered = true;
|
||||
TypeFVector3->mDescriptiveName = "FVector3";
|
||||
TypeFVector3->SetLocalType(TypeVector3);
|
||||
|
||||
TypeFVector4 = new PStruct(NAME_FVector4, nullptr);
|
||||
TypeFVector4->AddField(NAME_X, TypeFloat32);
|
||||
|
|
@ -431,6 +438,8 @@ void PType::StaticInit()
|
|||
TypeFVector4->RegType = REGT_FLOAT;
|
||||
TypeFVector4->RegCount = 4;
|
||||
TypeFVector4->isOrdered = true;
|
||||
TypeFVector4->mDescriptiveName = "FVector4";
|
||||
TypeFVector4->SetLocalType(TypeVector4);
|
||||
|
||||
|
||||
TypeQuaternion = new PStruct(NAME_Quat, nullptr);
|
||||
|
|
@ -447,6 +456,7 @@ void PType::StaticInit()
|
|||
TypeQuaternion->moveOp = OP_MOVEV4;
|
||||
TypeQuaternion->RegType = REGT_FLOAT;
|
||||
TypeQuaternion->RegCount = 4;
|
||||
TypeQuaternion->mDescriptiveName = "Quat";
|
||||
TypeQuaternion->isOrdered = true;
|
||||
|
||||
TypeFQuaternion = new PStruct(NAME_FQuat, nullptr);
|
||||
|
|
@ -464,6 +474,8 @@ void PType::StaticInit()
|
|||
TypeFQuaternion->RegType = REGT_FLOAT;
|
||||
TypeFQuaternion->RegCount = 4;
|
||||
TypeFQuaternion->isOrdered = true;
|
||||
TypeFQuaternion->mDescriptiveName = "FQuat";
|
||||
TypeFQuaternion->SetLocalType(TypeQuaternion);
|
||||
|
||||
|
||||
Namespaces.GlobalNamespace->Symbols.AddSymbol(Create<PSymbolType>(NAME_sByte, TypeSInt8));
|
||||
|
|
|
|||
|
|
@ -109,6 +109,13 @@ public:
|
|||
EScopeFlags ScopeFlags = (EScopeFlags)0;
|
||||
bool SizeKnown = true;
|
||||
|
||||
bool VMInternalStruct = false;
|
||||
|
||||
PType * LocalType = nullptr;
|
||||
|
||||
PType * SetLocalType(PType * LocalType) { this->LocalType = LocalType; return this; }
|
||||
PType * GetLocalType() { return LocalType ? LocalType : this; }
|
||||
|
||||
PType(unsigned int size = 1, unsigned int align = 1);
|
||||
virtual ~PType();
|
||||
virtual bool isNumeric() { return false; }
|
||||
|
|
|
|||
|
|
@ -427,11 +427,12 @@ struct_def(X) ::= EXTEND STRUCT(T) IDENTIFIER(A) LBRACE opt_struct_body(B) RBRAC
|
|||
}
|
||||
|
||||
%type struct_flags{ClassFlagsBlock}
|
||||
struct_flags(X) ::= . { X.Flags = 0; X.Version = {0, 0}; }
|
||||
struct_flags(X) ::= struct_flags(A) UI. { X.Flags = A.Flags | ZCC_UIFlag; }
|
||||
struct_flags(X) ::= struct_flags(A) PLAY. { X.Flags = A.Flags | ZCC_Play; }
|
||||
struct_flags(X) ::= struct_flags(A) CLEARSCOPE. { X.Flags = A.Flags | ZCC_ClearScope; }
|
||||
struct_flags(X) ::= struct_flags(A) NATIVE. { X.Flags = A.Flags | ZCC_Native; }
|
||||
struct_flags(X) ::= . { X.Flags = 0; X.Version = {0, 0}; }
|
||||
struct_flags(X) ::= struct_flags(A) UI. { X.Flags = A.Flags | ZCC_UIFlag; X.Version = A.Version; }
|
||||
struct_flags(X) ::= struct_flags(A) PLAY. { X.Flags = A.Flags | ZCC_Play; X.Version = A.Version; }
|
||||
struct_flags(X) ::= struct_flags(A) CLEARSCOPE. { X.Flags = A.Flags | ZCC_ClearScope; X.Version = A.Version; }
|
||||
struct_flags(X) ::= struct_flags(A) NATIVE. { X.Flags = A.Flags | ZCC_Native; X.Version = A.Version; }
|
||||
struct_flags(X) ::= struct_flags(A) UNSAFE LPAREN INTERNAL RPAREN. { X.Flags = A.Flags | ZCC_VMInternalStruct; X.Version = A.Version; }
|
||||
struct_flags(X) ::= struct_flags(A) VERSION LPAREN STRCONST(C) RPAREN. { X.Flags = A.Flags | ZCC_Version; X.Version = C.String->GetChars(); }
|
||||
|
||||
opt_struct_body(X) ::= . { X = NULL; }
|
||||
|
|
@ -957,6 +958,7 @@ type_name(X) ::= DOT dottable_id(A).
|
|||
|
||||
/* Aggregate types */
|
||||
%type aggregate_type {ZCC_Type *}
|
||||
%type aggregate_type_pre {ZCC_Type *}
|
||||
%type type {ZCC_Type *}
|
||||
%type type_list {ZCC_Type *}
|
||||
%type type_list_or_void {ZCC_Type *}
|
||||
|
|
@ -965,30 +967,92 @@ type_name(X) ::= DOT dottable_id(A).
|
|||
%type array_size{ZCC_Expression *}
|
||||
%type array_size_expr{ZCC_Expression *}
|
||||
|
||||
aggregate_type(X) ::= MAP(T) LT type_or_array(A) COMMA type_or_array(B) GT. /* ZSMap<K, V> */
|
||||
aggregate_type_pre(X) ::= MAP(T) LT type_or_array(A) COMMA type_or_array(B). /* ZSMap<K, V> */
|
||||
{
|
||||
NEW_AST_NODE(MapType,map,T);
|
||||
map->KeyType = A;
|
||||
map->ValueType = B;
|
||||
X = map;
|
||||
X->ArraySize = NULL;
|
||||
}
|
||||
|
||||
aggregate_type(X) ::= MAPITERATOR(T) LT type_or_array(A) COMMA type_or_array(B) GT. /* ZSMapIterator<K, V> */
|
||||
aggregate_type_pre(X) ::= MAPITERATOR(T) LT type_or_array(A) COMMA type_or_array(B). /* ZSMapIterator<K, V> */
|
||||
{
|
||||
NEW_AST_NODE(MapIteratorType,map_it,T);
|
||||
map_it->KeyType = A;
|
||||
map_it->ValueType = B;
|
||||
X = map_it;
|
||||
X->ArraySize = NULL;
|
||||
}
|
||||
|
||||
aggregate_type(X) ::= ARRAY(T) LT type_or_array(A) GT. /* TArray<type> */
|
||||
aggregate_type_pre(X) ::= ARRAY(T) LT type_or_array(A). /* TArray<type> */
|
||||
{
|
||||
NEW_AST_NODE(DynArrayType,arr,T);
|
||||
arr->ElementType = A;
|
||||
X = arr;
|
||||
X->ArraySize = NULL;
|
||||
}
|
||||
|
||||
aggregate_type(X) ::= func_ptr_type(A). { X = A; /*X-overwrites-A*/ }
|
||||
aggregate_type_pre(X) ::= func_ptr_type(A). { X = A; /*X-overwrites-A*/ X->ArraySize = NULL; }
|
||||
|
||||
aggregate_type_pre(X) ::= CLASS(T) LT dottable_id(A). /* class<type> */
|
||||
{
|
||||
NEW_AST_NODE(ClassType,cls,T);
|
||||
cls->Restriction = A;
|
||||
X = cls;
|
||||
X->ArraySize = NULL;
|
||||
}
|
||||
|
||||
aggregate_type(X) ::= aggregate_type_pre(A) GT. { X = A; X->ArraySize = NULL; }
|
||||
|
||||
aggregate_type(X) ::= MAP(T) LT type_or_array(A) COMMA aggregate_type_pre(B) RSH. /* ZSMap<K, V<...>> */
|
||||
{
|
||||
if(!stat->sc->CheckParseVersion(MakeVersion(4, 15, 1)))
|
||||
{
|
||||
stat->sc->ScriptMessage(">> without space in parametrized types only supported for zscript >= 4.15.1");
|
||||
FScriptPosition::ErrorCounter++;
|
||||
}
|
||||
NEW_AST_NODE(MapType,map,T);
|
||||
map->KeyType = A;
|
||||
map->ValueType = B;
|
||||
X = map;
|
||||
X->ArraySize = NULL;
|
||||
}
|
||||
|
||||
aggregate_type(X) ::= MAPITERATOR(T) LT type_or_array(A) COMMA aggregate_type_pre(B) RSH. /* ZSMapIterator<K, V<...>> */
|
||||
{
|
||||
if(!stat->sc->CheckParseVersion(MakeVersion(4, 15, 1)))
|
||||
{
|
||||
stat->sc->ScriptMessage(">> without space in parametrized types only supported for zscript >= 4.15.1");
|
||||
FScriptPosition::ErrorCounter++;
|
||||
}
|
||||
NEW_AST_NODE(MapIteratorType,map_it,T);
|
||||
map_it->KeyType = A;
|
||||
map_it->ValueType = B;
|
||||
X = map_it;
|
||||
X->ArraySize = NULL;
|
||||
}
|
||||
|
||||
aggregate_type(X) ::= ARRAY(T) LT aggregate_type_pre(A) RSH. /* TArray<T<...>> */
|
||||
{
|
||||
if(!stat->sc->CheckParseVersion(MakeVersion(4, 15, 1)))
|
||||
{
|
||||
stat->sc->ScriptMessage(">> without space in parametrized types only supported for zscript >= 4.15.1");
|
||||
FScriptPosition::ErrorCounter++;
|
||||
}
|
||||
NEW_AST_NODE(DynArrayType,arr,T);
|
||||
arr->ElementType = A;
|
||||
X = arr;
|
||||
X->ArraySize = NULL;
|
||||
}
|
||||
|
||||
aggregate_type(X) ::= CLASS(T). /* class<type> */
|
||||
{
|
||||
NEW_AST_NODE(ClassType,cls,T);
|
||||
cls->Restriction = NULL;
|
||||
X = cls;
|
||||
X->ArraySize = NULL;
|
||||
}
|
||||
|
||||
%type func_ptr_type {ZCC_FuncPtrType *}
|
||||
%type func_ptr_params {ZCC_FuncPtrParamDecl *}
|
||||
|
|
@ -1002,7 +1066,7 @@ fn_ptr_flag(X) ::= CLEARSCOPE. { X.Int = ZCC_ClearScope; }
|
|||
//fn_ptr_flag(X) ::= VIRTUALSCOPE. { X.Int = ZCC_VirtualScope; } //virtual scope not allowed
|
||||
|
||||
|
||||
func_ptr_type(X) ::= FNTYPE(T) LT fn_ptr_flag(F) type_list_or_void(A) LPAREN func_ptr_params(B) RPAREN GT. /* Function<...(...)> */
|
||||
func_ptr_type(X) ::= FNTYPE(T) LT fn_ptr_flag(F) type_list_or_void(A) LPAREN func_ptr_params(B) RPAREN. /* Function<...(...)> */
|
||||
{
|
||||
NEW_AST_NODE(FuncPtrType,fn_ptr,T);
|
||||
fn_ptr->RetType = A;
|
||||
|
|
@ -1011,7 +1075,7 @@ func_ptr_type(X) ::= FNTYPE(T) LT fn_ptr_flag(F) type_list_or_void(A) LPAREN fun
|
|||
X = fn_ptr;
|
||||
}
|
||||
|
||||
func_ptr_type(X) ::= FNTYPE(T) LT VOID GT. /* Function<void> */
|
||||
func_ptr_type(X) ::= FNTYPE(T) LT VOID. /* Function<void> */
|
||||
{
|
||||
NEW_AST_NODE(FuncPtrType,fn_ptr,T);
|
||||
fn_ptr->RetType = nullptr;
|
||||
|
|
@ -1053,15 +1117,6 @@ func_ptr_param(X) ::= func_param_flags(A) type(B) AND.
|
|||
X = parm;
|
||||
}
|
||||
|
||||
aggregate_type(X) ::= CLASS(T) class_restrictor(A). /* class<type> */
|
||||
{
|
||||
NEW_AST_NODE(ClassType,cls,T);
|
||||
cls->Restriction = A;
|
||||
X = cls;
|
||||
}
|
||||
class_restrictor(X) ::= . { X = NULL; }
|
||||
class_restrictor(X) ::= LT dottable_id(A) GT. { X = A; /*X-overwrites-A*/ }
|
||||
|
||||
type(X) ::= type_name(A). { X = A; /*X-overwrites-A*/ X->ArraySize = NULL; }
|
||||
type(X) ::= aggregate_type(A). { X = A; /*X-overwrites-A*/ X->ArraySize = NULL; }
|
||||
|
||||
|
|
@ -1474,7 +1529,7 @@ primary(X) ::= LPAREN CLASS LT IDENTIFIER(A) GT RPAREN LPAREN func_expr_list(B)
|
|||
X = expr;
|
||||
}
|
||||
|
||||
primary(X) ::= LPAREN func_ptr_type(A) RPAREN LPAREN expr(B) RPAREN. [DOT] // function pointer type cast
|
||||
primary(X) ::= LPAREN func_ptr_type(A) GT RPAREN LPAREN expr(B) RPAREN. [DOT] // function pointer type cast
|
||||
{
|
||||
NEW_AST_NODE(FunctionPtrCast, expr, A);
|
||||
expr->Operation = PEX_FunctionPtrCast;
|
||||
|
|
|
|||
|
|
@ -734,6 +734,8 @@ void ZCCCompiler::CreateStructTypes()
|
|||
syms = &OutNamespace->Symbols;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (s->NodeName() == NAME__ && fileSystem.GetFileContainer(Lump) == 0)
|
||||
{
|
||||
// This is just a container for syntactic purposes.
|
||||
|
|
@ -748,11 +750,24 @@ void ZCCCompiler::CreateStructTypes()
|
|||
{
|
||||
s->strct->Type = NewStruct(s->NodeName(), outer, false, AST.FileNo);
|
||||
}
|
||||
|
||||
if (s->strct->Flags & ZCC_Version)
|
||||
{
|
||||
s->strct->Type->mVersion = s->strct->Version;
|
||||
}
|
||||
|
||||
if (s->strct->Flags & ZCC_VMInternalStruct)
|
||||
{
|
||||
if(fileSystem.GetFileContainer(Lump) == 0)
|
||||
{
|
||||
s->strct->Type->VMInternalStruct = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
Error(s->strct, "Internal structs are only allowed in the root pk3");
|
||||
}
|
||||
}
|
||||
|
||||
auto &sf = s->Type()->ScopeFlags;
|
||||
if (mVersion >= MakeVersion(2, 4, 0))
|
||||
{
|
||||
|
|
@ -814,6 +829,12 @@ void ZCCCompiler::CreateClassTypes()
|
|||
PClass *parent;
|
||||
auto ParentName = c->cls->ParentName;
|
||||
|
||||
if (c->cls->Flags & ZCC_Internal)
|
||||
{
|
||||
Error(c->cls, "'Internal' not allowed for classes");
|
||||
}
|
||||
|
||||
// The parent exists, we may create a type for this class
|
||||
if (ParentName != nullptr && ParentName->SiblingNext == ParentName)
|
||||
{
|
||||
parent = PClass::FindClass(ParentName->Id);
|
||||
|
|
@ -850,7 +871,6 @@ void ZCCCompiler::CreateClassTypes()
|
|||
Error(c->cls, "Class '%s' cannot extend sealed class '%s'", FName(c->NodeName()).GetChars(), parent->TypeName.GetChars());
|
||||
}
|
||||
|
||||
// The parent exists, we may create a type for this class
|
||||
if (c->cls->Flags & ZCC_Native)
|
||||
{
|
||||
// If this is a native class, its own type must also already exist and not be a runtime class.
|
||||
|
|
@ -1873,7 +1893,7 @@ PType *ZCCCompiler::DetermineType(PType *outertype, ZCC_TreeNode *field, FName n
|
|||
{
|
||||
Error(field, "%s: @ not allowed for user scripts", name.GetChars());
|
||||
}
|
||||
retval = ResolveUserType(btype, btype->UserType, outertype? &outertype->Symbols : nullptr, true);
|
||||
retval = ResolveUserType(outertype, btype, btype->UserType, outertype? &outertype->Symbols : nullptr, true);
|
||||
break;
|
||||
|
||||
case ZCC_UserType:
|
||||
|
|
@ -1903,7 +1923,7 @@ PType *ZCCCompiler::DetermineType(PType *outertype, ZCC_TreeNode *field, FName n
|
|||
|
||||
|
||||
default:
|
||||
retval = ResolveUserType(btype, btype->UserType, outertype ? &outertype->Symbols : nullptr, false);
|
||||
retval = ResolveUserType(outertype, btype, btype->UserType, outertype ? &outertype->Symbols : nullptr, false);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
|
@ -2158,7 +2178,7 @@ PType *ZCCCompiler::DetermineType(PType *outertype, ZCC_TreeNode *field, FName n
|
|||
* @param nativetype Distinguishes between searching for a native type or a user type.
|
||||
* @returns the PType found for this user type
|
||||
*/
|
||||
PType *ZCCCompiler::ResolveUserType(ZCC_BasicType *type, ZCC_Identifier *id, PSymbolTable *symt, bool nativetype)
|
||||
PType *ZCCCompiler::ResolveUserType(PType *outertype, ZCC_BasicType *type, ZCC_Identifier *id, PSymbolTable *symt, bool nativetype)
|
||||
{
|
||||
// Check the symbol table for the identifier.
|
||||
PSymbol *sym = nullptr;
|
||||
|
|
@ -2175,10 +2195,18 @@ PType *ZCCCompiler::ResolveUserType(ZCC_BasicType *type, ZCC_Identifier *id, PSy
|
|||
return TypeError;
|
||||
}
|
||||
|
||||
//only allow references to internal types inside internal types
|
||||
if (ptype->VMInternalStruct && !outertype->VMInternalStruct)
|
||||
{
|
||||
Error(type, "Type %s not accessible", FName(type->UserType->Id).GetChars());
|
||||
return TypeError;
|
||||
}
|
||||
|
||||
if (id->SiblingNext != type->UserType)
|
||||
{
|
||||
assert(id->SiblingNext->NodeType == AST_Identifier);
|
||||
ptype = ResolveUserType(
|
||||
outertype,
|
||||
type,
|
||||
static_cast<ZCC_Identifier *>(id->SiblingNext),
|
||||
&ptype->Symbols,
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ protected:
|
|||
FString FlagsToString(uint32_t flags);
|
||||
PType *DetermineType(PType *outertype, ZCC_TreeNode *field, FName name, ZCC_Type *ztype, bool allowarraytypes, bool formember);
|
||||
PType *ResolveArraySize(PType *baseType, ZCC_Expression *arraysize, PContainerType *cls, bool *nosize);
|
||||
PType *ResolveUserType(ZCC_BasicType *type, ZCC_Identifier *id, PSymbolTable *sym, bool nativetype);
|
||||
PType *ResolveUserType(PType *outertype, ZCC_BasicType *type, ZCC_Identifier *id, PSymbolTable *sym, bool nativetype);
|
||||
static FString UserTypeName(ZCC_BasicType *type);
|
||||
TArray<ZCC_StructWork *> OrderStructs();
|
||||
void AddStruct(TArray<ZCC_StructWork *> &new_order, ZCC_StructWork *struct_def);
|
||||
|
|
|
|||
|
|
@ -251,6 +251,7 @@ static void InitTokenMap()
|
|||
TOKENDEF (TK_Do, ZCC_DO);
|
||||
TOKENDEF (TK_For, ZCC_FOR);
|
||||
TOKENDEF (TK_ForEach, ZCC_FOREACH);
|
||||
TOKENDEF (TK_Unsafe, ZCC_UNSAFE);
|
||||
TOKENDEF (TK_While, ZCC_WHILE);
|
||||
TOKENDEF (TK_Until, ZCC_UNTIL);
|
||||
TOKENDEF (TK_If, ZCC_IF);
|
||||
|
|
|
|||
|
|
@ -41,30 +41,31 @@ struct ZCCToken
|
|||
// Variable / Function / Class modifiers
|
||||
enum
|
||||
{
|
||||
ZCC_Native = 1 << 0,
|
||||
ZCC_Static = 1 << 1,
|
||||
ZCC_Private = 1 << 2,
|
||||
ZCC_Protected = 1 << 3,
|
||||
ZCC_Latent = 1 << 4,
|
||||
ZCC_Final = 1 << 5,
|
||||
ZCC_Meta = 1 << 6,
|
||||
ZCC_Action = 1 << 7,
|
||||
ZCC_Deprecated = 1 << 8,
|
||||
ZCC_ReadOnly = 1 << 9,
|
||||
ZCC_FuncConst = 1 << 10,
|
||||
ZCC_Abstract = 1 << 11,
|
||||
ZCC_Extension = 1 << 12,
|
||||
ZCC_Virtual = 1 << 13,
|
||||
ZCC_Override = 1 << 14,
|
||||
ZCC_Transient = 1 << 15,
|
||||
ZCC_VarArg = 1 << 16,
|
||||
ZCC_UIFlag = 1 << 17, // there's also token called ZCC_UI
|
||||
ZCC_Play = 1 << 18,
|
||||
ZCC_ClearScope = 1 << 19,
|
||||
ZCC_VirtualScope = 1 << 20,
|
||||
ZCC_Version = 1 << 21,
|
||||
ZCC_Internal = 1 << 22,
|
||||
ZCC_Sealed = 1 << 23,
|
||||
ZCC_Native = 1 << 0,
|
||||
ZCC_Static = 1 << 1,
|
||||
ZCC_Private = 1 << 2,
|
||||
ZCC_Protected = 1 << 3,
|
||||
ZCC_Latent = 1 << 4,
|
||||
ZCC_Final = 1 << 5,
|
||||
ZCC_Meta = 1 << 6,
|
||||
ZCC_Action = 1 << 7,
|
||||
ZCC_Deprecated = 1 << 8,
|
||||
ZCC_ReadOnly = 1 << 9,
|
||||
ZCC_FuncConst = 1 << 10,
|
||||
ZCC_Abstract = 1 << 11,
|
||||
ZCC_Extension = 1 << 12,
|
||||
ZCC_Virtual = 1 << 13,
|
||||
ZCC_Override = 1 << 14,
|
||||
ZCC_Transient = 1 << 15,
|
||||
ZCC_VarArg = 1 << 16,
|
||||
ZCC_UIFlag = 1 << 17, // there's also token called ZCC_UI
|
||||
ZCC_Play = 1 << 18,
|
||||
ZCC_ClearScope = 1 << 19,
|
||||
ZCC_VirtualScope = 1 << 20,
|
||||
ZCC_Version = 1 << 21,
|
||||
ZCC_Internal = 1 << 22,
|
||||
ZCC_Sealed = 1 << 23,
|
||||
ZCC_VMInternalStruct = 1 << 24,
|
||||
};
|
||||
|
||||
// Function parameter modifiers
|
||||
|
|
|
|||
|
|
@ -853,6 +853,27 @@ DEFINE_ACTION_FUNCTION(_Wads, GetLumpFullName)
|
|||
ACTION_RETURN_STRING(fileSystem.GetFileFullName(lump));
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_Wads, GetLumpContainer)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_INT(lump);
|
||||
ACTION_RETURN_INT(fileSystem.GetFileContainer(lump));
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_Wads, GetContainerName)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_INT(lump);
|
||||
ACTION_RETURN_STRING(fileSystem.GetResourceFileName(lump));
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_Wads, GetLumpFullPath)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
PARAM_INT(lump);
|
||||
ACTION_RETURN_STRING(fileSystem.GetFileFullPath(lump));
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_Wads, GetLumpNamespace)
|
||||
{
|
||||
PARAM_PROLOGUE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue