mirror of https://github.com/OpenTTD/OpenTTD
(svn r27545) -Fix: Remove special handling of classes with virtual methods from squirrel_export.awk. It seems to serve no purpose, except to break on 3 classes.
parent
7e29551ae0
commit
da7978a08c
|
@ -81,7 +81,6 @@ function reset_reader()
|
||||||
struct_size = 0
|
struct_size = 0
|
||||||
method_size = 0
|
method_size = 0
|
||||||
static_method_size = 0
|
static_method_size = 0
|
||||||
virtual_class = "false"
|
|
||||||
cls = ""
|
cls = ""
|
||||||
start_squirrel_define_on_next_line = "false"
|
start_squirrel_define_on_next_line = "false"
|
||||||
cls_level = 0
|
cls_level = 0
|
||||||
|
@ -97,7 +96,6 @@ BEGIN {
|
||||||
struct_size = 0
|
struct_size = 0
|
||||||
method_size = 0
|
method_size = 0
|
||||||
static_method_size = 0
|
static_method_size = 0
|
||||||
virtual_class = "false"
|
|
||||||
super_cls = ""
|
super_cls = ""
|
||||||
cls = ""
|
cls = ""
|
||||||
api_selected = ""
|
api_selected = ""
|
||||||
|
@ -340,7 +338,7 @@ BEGIN {
|
||||||
} else {
|
} else {
|
||||||
print " SQ" api_cls ".PreRegister(engine, \"" api_super_cls "\");"
|
print " SQ" api_cls ".PreRegister(engine, \"" api_super_cls "\");"
|
||||||
}
|
}
|
||||||
if (virtual_class == "false" && super_cls != "ScriptEvent") {
|
if (super_cls != "ScriptEvent") {
|
||||||
if (cls_param[2] == "v") {
|
if (cls_param[2] == "v") {
|
||||||
print " SQ" api_cls ".AddSQAdvancedConstructor(engine);"
|
print " SQ" api_cls ".AddSQAdvancedConstructor(engine);"
|
||||||
} else {
|
} else {
|
||||||
|
@ -409,7 +407,6 @@ BEGIN {
|
||||||
}
|
}
|
||||||
if (static_method_size != 0) print ""
|
if (static_method_size != 0) print ""
|
||||||
|
|
||||||
if (virtual_class == "false") {
|
|
||||||
# Non-static methods
|
# Non-static methods
|
||||||
mlen = 0
|
mlen = 0
|
||||||
for (i = 1; i <= method_size; i++) {
|
for (i = 1; i <= method_size; i++) {
|
||||||
|
@ -424,7 +421,7 @@ BEGIN {
|
||||||
delete methods[i]
|
delete methods[i]
|
||||||
}
|
}
|
||||||
if (method_size != 0) print ""
|
if (method_size != 0) print ""
|
||||||
}
|
|
||||||
print " SQ" api_cls ".PostRegister(engine);"
|
print " SQ" api_cls ".PostRegister(engine);"
|
||||||
print "}"
|
print "}"
|
||||||
|
|
||||||
|
@ -489,9 +486,6 @@ BEGIN {
|
||||||
}
|
}
|
||||||
|
|
||||||
is_static = match($0, "static")
|
is_static = match($0, "static")
|
||||||
if (match($0, "virtual")) {
|
|
||||||
virtual_class = "true"
|
|
||||||
}
|
|
||||||
gsub("\\yvirtual\\y", "", $0)
|
gsub("\\yvirtual\\y", "", $0)
|
||||||
gsub("\\ystatic\\y", "", $0)
|
gsub("\\ystatic\\y", "", $0)
|
||||||
gsub("\\yconst\\y", "", $0)
|
gsub("\\yconst\\y", "", $0)
|
||||||
|
|
Loading…
Reference in New Issue