@@ -72,7 +72,7 @@ def generate_wrappers(target):
72
72
73
73
def generate_virtual_version (argcount , const = False , returns = False ):
74
74
s = """#define GDVIRTUAL$VER($RET m_name $ARG)\\
75
- StringName _gdvirtual_##m_name##_sn = #m_name;\\
75
+ ::godot:: StringName _gdvirtual_##m_name##_sn = #m_name;\\
76
76
template <bool required>\\
77
77
_FORCE_INLINE_ bool _gdvirtual_##m_name##_call($CALLARGS) $CONST {\\
78
78
if (::godot::internal::gdextension_interface_object_has_script_method(_owner, &_gdvirtual_##m_name##_sn)) { \\
@@ -92,10 +92,10 @@ def generate_virtual_version(argcount, const=False, returns=False):
92
92
return false;\\
93
93
}\\
94
94
_FORCE_INLINE_ bool _gdvirtual_##m_name##_overridden() const {\\
95
- return godot::internal::gdextension_interface_object_has_script_method(_owner, &_gdvirtual_##m_name##_sn); \\
95
+ return :: godot::internal::gdextension_interface_object_has_script_method(_owner, &_gdvirtual_##m_name##_sn); \\
96
96
}\\
97
97
_FORCE_INLINE_ static MethodInfo _gdvirtual_##m_name##_get_method_info() {\\
98
- MethodInfo method_info;\\
98
+ ::godot:: MethodInfo method_info;\\
99
99
method_info.name = #m_name;\\
100
100
method_info.flags = $METHOD_FLAGS;\\
101
101
$FILL_METHOD_INFO\\
@@ -110,19 +110,19 @@ def generate_virtual_version(argcount, const=False, returns=False):
110
110
sproto += "R"
111
111
s = s .replace ("$RET" , "m_ret," )
112
112
s = s .replace ("$RVOID" , "(void)r_ret;" ) # If required, may lead to uninitialized errors
113
- method_info += "method_info.return_val = GetTypeInfo<m_ret>::get_class_info();\\ \n "
114
- method_info += "\t \t method_info.return_val_metadata = GetTypeInfo<m_ret>::METADATA;"
113
+ method_info += "method_info.return_val = ::godot:: GetTypeInfo<m_ret>::get_class_info();\\ \n "
114
+ method_info += "\t \t method_info.return_val_metadata = ::godot:: GetTypeInfo<m_ret>::METADATA;"
115
115
else :
116
116
s = s .replace ("$RET " , "" )
117
117
s = s .replace ("\t \t \t $RVOID\\ \n " , "" )
118
118
119
119
if const :
120
120
sproto += "C"
121
121
s = s .replace ("$CONST" , "const" )
122
- s = s .replace ("$METHOD_FLAGS" , "METHOD_FLAG_VIRTUAL | METHOD_FLAG_CONST" )
122
+ s = s .replace ("$METHOD_FLAGS" , "::godot:: METHOD_FLAG_VIRTUAL | ::godot:: METHOD_FLAG_CONST" )
123
123
else :
124
124
s = s .replace ("$CONST " , "" )
125
- s = s .replace ("$METHOD_FLAGS" , "METHOD_FLAG_VIRTUAL" )
125
+ s = s .replace ("$METHOD_FLAGS" , "::godot:: METHOD_FLAG_VIRTUAL" )
126
126
127
127
s = s .replace ("$VER" , sproto )
128
128
argtext = ""
@@ -131,8 +131,8 @@ def generate_virtual_version(argcount, const=False, returns=False):
131
131
callsiargptrs = ""
132
132
if argcount > 0 :
133
133
argtext += ", "
134
- callsiargs = f"Variant vargs[{ argcount } ] = {{ "
135
- callsiargptrs = f"\t \t \t const Variant *vargptrs[{ argcount } ] = {{ "
134
+ callsiargs = f"::godot:: Variant vargs[{ argcount } ] = {{ "
135
+ callsiargptrs = f"\t \t \t const ::godot:: Variant *vargptrs[{ argcount } ] = {{ "
136
136
for i in range (argcount ):
137
137
if i > 0 :
138
138
argtext += ", "
@@ -141,12 +141,12 @@ def generate_virtual_version(argcount, const=False, returns=False):
141
141
callsiargptrs += ", "
142
142
argtext += f"m_type{ i + 1 } "
143
143
callargtext += f"m_type{ i + 1 } arg{ i + 1 } "
144
- callsiargs += f"Variant(arg{ i + 1 } )"
144
+ callsiargs += f"::godot:: Variant(arg{ i + 1 } )"
145
145
callsiargptrs += f"&vargs[{ i } ]"
146
146
if method_info :
147
147
method_info += "\\ \n \t \t "
148
- method_info += f"method_info.arguments.push_back(GetTypeInfo<m_type{ i + 1 } >::get_class_info());\\ \n "
149
- method_info += f"\t \t method_info.arguments_metadata.push_back(GetTypeInfo<m_type{ i + 1 } >::METADATA);"
148
+ method_info += f"method_info.arguments.push_back(::godot:: GetTypeInfo<m_type{ i + 1 } >::get_class_info());\\ \n "
149
+ method_info += f"\t \t method_info.arguments_metadata.push_back(::godot:: GetTypeInfo<m_type{ i + 1 } >::METADATA);"
150
150
151
151
if argcount :
152
152
callsiargs += " };\\ \n "
@@ -161,7 +161,7 @@ def generate_virtual_version(argcount, const=False, returns=False):
161
161
if argcount > 0 :
162
162
callargtext += ", "
163
163
callargtext += "m_ret &r_ret"
164
- s = s .replace ("$CALLSIRET" , "r_ret = VariantCaster<m_ret>::cast(ret);" )
164
+ s = s .replace ("$CALLSIRET" , "r_ret = ::godot:: VariantCaster<m_ret>::cast(ret);" )
165
165
else :
166
166
s = s .replace ("\t \t \t \t $CALLSIRET\\ \n " , "" )
167
167
0 commit comments