Start TEngine3.0

Start TEngine3.0
This commit is contained in:
ALEXTANG
2023-03-31 17:27:49 +08:00
parent 179765c43c
commit 36353294d6
1032 changed files with 21868 additions and 102407 deletions

View File

@@ -0,0 +1,25 @@
{{~
name = x.name
namespace_with_top_module = x.namespace_with_top_module
comment = x.comment
items = x.items
~}}
{{x.cpp_namespace_begin}}
{{~if comment != '' ~}}
/**
* {{comment | html.escape}}
*/
{{~end~}}
enum class {{name}}
{
{{~ for item in items ~}}
{{~if item.comment != '' ~}}
/**
* {{item.escape_comment}}
*/
{{~end~}}
{{item.name}} = {{item.value}},
{{~end~}}
};
{{x.cpp_namespace_end}}

View File

@@ -0,0 +1,30 @@
{{~
name = x.name
namespace_with_top_module = x.namespace_with_top_module
comment = x.comment
items = x.items
~}}
{{cs_start_name_space_grace x.namespace_with_top_module}}
{{~if comment != '' ~}}
/// <summary>
/// {{comment | html.escape}}
/// </summary>
{{~end~}}
{{~if x.is_flags~}}
[System.Flags]
{{~end~}}
public enum {{name}}
{
{{~ for item in items ~}}
{{~if item.comment != '' ~}}
/// <summary>
/// {{item.escape_comment}}
/// </summary>
{{~end~}}
{{item.name}} = {{item.value}},
{{~end~}}
}
{{cs_end_name_space_grace x.namespace_with_top_module}}

View File

@@ -0,0 +1,15 @@
{{~
name = x.name
namespace_with_top_module = x.namespace_with_top_module
comment = x.comment
items = x.items
~}}
enum {{x.flat_buffers_full_name}}:int {
{{~if !x.has_zero_value_item~}}
__GENERATE_DEFAULT_VALUE = 0,
{{~end~}}
{{~for item in items ~}}
{{x.pb_full_name}}_{{item.name}} = {{item.int_value}},
{{~end~}}
}

View File

@@ -0,0 +1,20 @@
{{~
name = x.name
namespace_with_top_module = x.namespace_with_top_module
comment = x.comment
items = x.items
~}}
{{~if comment != '' ~}}
# {{comment | html.escape}}
{{~end~}}
enum {{x.gdscript_full_name}}{
{{~ for item in items ~}}
{{~if item.comment != '' ~}}
{{item.name}} = {{item.int_value}}, # {{item.escape_comment}}
{{~else~}}
{{item.name}} = {{item.int_value}},
{{~end~}}
{{~end~}}
}

View File

@@ -0,0 +1,14 @@
{{~
name = x.name
namespace_with_top_module = x.namespace_with_top_module
comment = x.comment
items = x.items
~}}
package {{x.top_module}}
const (
{{~for item in items ~}}
{{x.go_full_name}}_{{item.name}} = {{item.int_value}}
{{~end~}}
)

View File

@@ -0,0 +1,23 @@
{{~
name = x.name
namespace_with_top_module = x.namespace_with_top_module
comment = x.comment
items = x.items
~}}
package {{namespace_with_top_module}};
{{~if comment != '' ~}}
/**
* {{comment | html.escape}}
*/
{{~end~}}
public final class {{name}} {
{{~ for item in items ~}}
{{~if item.comment != '' ~}}
/**
* {{item.escape_comment}}
*/
{{~end~}}
public static final int {{item.name}} = {{item.int_value}};
{{~end~}}
}

View File

@@ -0,0 +1,30 @@
{{
enums = x.enums
beans = x.beans
tables = x.tables
}}
local setmetatable = setmetatable
local pairs = pairs
local ipairs = ipairs
local tinsert = table.insert
local function SimpleClass()
local class = {}
class.__index = class
class.New = function(...)
local ctor = class.ctor
local o = ctor and ctor(...) or {}
setmetatable(o, class)
return o
end
return class
end
local function get_map_size(m)
local n = 0
for _ in pairs(m) do
n = n + 1
end
return n
end

View File

@@ -0,0 +1,15 @@
{{~
name = x.name
namespace_with_top_module = x.namespace_with_top_module
comment = x.comment
items = x.items
~}}
enum {{x.pb_full_name}} {
{{~for item in items ~}}
{{x.pb_full_name}}_{{item.name}} = {{item.int_value}};
{{~end~}}
{{~if items.empty?}}
{{x.pb_full_name}}_EMPTY_PLACEHOLDER = 0;
{{~end~}}
}

View File

@@ -0,0 +1,15 @@
{{~
name = x.name
namespace_with_top_module = x.namespace_with_top_module
comment = x.comment
items = x.items
~}}
enum {{x.pb_full_name}} {
{{~if items.empty? || items[0].int_value != 0~}}
{{x.pb_full_name}}_EMPTY_PLACEHOLDER = 0;
{{~end~}}
{{~for item in items ~}}
{{x.pb_full_name}}_{{item.name}} = {{item.int_value}};
{{~end~}}
}

View File

@@ -0,0 +1,24 @@
{{~
name = x.name
namespace_with_top_module = x.namespace_with_top_module
comment = x.comment
items = x.items
~}}
{{~if comment != '' ~}}
'''
{{comment | html.escape}}
'''
{{~end~}}
class {{x.py_full_name}}(Enum):
{{~ for item in items ~}}
{{~if item.comment != '' ~}}
'''
{{item.escape_comment}}
'''
{{~end~}}
{{item.name}} = {{item.value}}
{{~end~}}
{{~if (items == empty)~}}
pass
{{~end~}}

View File

@@ -0,0 +1,25 @@
{{~
name = x.name
namespace_with_top_module = x.namespace_with_top_module
comment = x.comment
items = x.items
~}}
{{~if comment != '' ~}}
/**
* {{comment | html.escape}}
*/
{{~end~}}
#[allow(dead_code)]
#[allow(non_camel_case_types)]
pub enum {{x.rust_full_name}} {
{{~for item in items ~}}
{{~if item.comment != '' ~}}
/**
* {{item.escape_comment}}
*/
{{~end~}}
{{item.name}} = {{item.int_value}},
{{~end~}}
}

View File

@@ -0,0 +1,24 @@
{{~
name = x.name
namespace_with_top_module = x.namespace_with_top_module
comment = x.comment
items = x.items
~}}
{{x.typescript_namespace_begin}}
{{~if comment != '' ~}}
/**
* {{comment | html.escape}}
*/
{{~end~}}
export enum {{name}} {
{{~for item in items ~}}
{{~if item.comment != '' ~}}
/**
* {{item.escape_comment}}
*/
{{~end~}}
{{item.name}} = {{item.value}},
{{~end~}}
}
{{x.typescript_namespace_end}}