(svn r17080) [0.7] -Backport from trunk:

- Fix: [NoAI] Documentation of AITile::LevelTiles was wrong (r17049)
- Add: [NoAI] AICompany::Get/Set PresidentGender (r17016)
- Add: [NoAI] AIEngine::GetDesignDate (r17014)
- Add: [NoAI] AIStation::GetConstructionDate (r17012)
- Add: [NoAI] AIAbstractList::SORT_ASCENDING / SORT_DESCENDING (r17005)
- Fix: [NoAI] AIBridge::GetPrice returned incorrect values (r16986)
This commit is contained in:
rubidium
2009-08-05 23:57:41 +00:00
parent fa713d0e3b
commit ad2c54d119
20 changed files with 157 additions and 39 deletions
+19
View File
@@ -34,6 +34,7 @@ BEGIN {
enum_value_size = 0
enum_string_to_error_size = 0
enum_error_to_string_size = 0
const_size = 0
struct_size = 0
method_size = 0
static_method_size = 0
@@ -217,6 +218,17 @@ BEGIN {
}
if (enum_value_size != 0) print ""
# Const values
mlen = 0
for (i = 1; i <= const_size; i++) {
if (mlen <= length(const_value[i])) mlen = length(const_value[i])
}
for (i = 1; i <= const_size; i++) {
print " SQ" cls ".DefSQConst(engine, " cls "::" const_value[i] ", " substr(spaces, 1, mlen - length(const_value[i])) "\"" const_value[i] "\");"
delete const_value[i]
}
if (const_size != 0) print ""
# Mapping of OTTD strings to errors
mlen = 0
for (i = 1; i <= enum_string_to_error_size; i++) {
@@ -320,6 +332,13 @@ BEGIN {
}
}
# Add a const (non-enum) value
/^[ ]*static const \w+ \w+ = \w+;/ {
const_size++
const_value[const_size] = $4
next
}
# Add a method to the list
/^.*\(.*\).*$/ {
if (cls_level != 1) next