dfhack/library/xml/df.language.xml

124 lines
4.5 KiB
XML

2011-12-24 03:37:00 -07:00
<data-definition>
<enum-type type-name='language_word_flags'>
<enum-item name='FRONT_COMPOUND_NOUN_SING'/>
<enum-item name='FRONT_COMPOUND_NOUN_PLUR'/>
<enum-item name='FRONT_COMPOUND_ADJ'/>
<enum-item name='FRONT_COMPOUND_PREFIX'/>
<enum-item name='REAR_COMPOUND_NOUN_SING'/>
<enum-item name='REAR_COMPOUND_NOUN_PLUR'/>
<enum-item name='REAR_COMPOUND_ADJ'/>
<enum-item name='THE_NOUN_SING'/>
<enum-item name='THE_NOUN_PLUR'/>
<enum-item name='THE_COMPOUND_NOUN_SING'/>
<enum-item name='THE_COMPOUND_NOUN_PLUR'/>
<enum-item name='THE_COMPOUND_ADJ'/>
<enum-item name='THE_COMPOUND_PREFIX'/>
<enum-item name='OF_NOUN_SING'/>
<enum-item name='OF_NOUN_PLUR'/>
<enum-item name='STANDARD_VERB'/>
</enum-type>
<enum-type type-name='part_of_speech'>
<enum-item name='Noun'/>
<enum-item name='NounPlural'/>
<enum-item name='Adjective'/>
<enum-item name='Prefix'/>
<enum-item name='Verb'/>
<enum-item name='Verb3rdPerson'/>
<enum-item name='VerbPast'/>
<enum-item name='VerbPassive'/>
<enum-item name='VerbGerund'/>
</enum-type>
2011-12-24 03:37:00 -07:00
<struct-type type-name='language_word' instance-vector='$global.world.raws.language_words'>
<stl-string name='word'/>
2011-12-24 03:37:00 -07:00
<code-helper name='describe'>$.word</code-helper>
2011-12-24 03:37:00 -07:00
<static-array type-name='stl-string' name='forms' count='9' index-enum='part_of_speech'/>
2011-12-24 03:37:00 -07:00
<uint8_t name='adj_dist'/>
<padding size='7' comment='looks like garbage'/>
<df-flagarray name='flags' index-enum='language_word_flags'/>
</struct-type>
<struct-type type-name='language_translation' instance-vector='$global.world.raws.translations'>
2011-12-24 03:37:00 -07:00
<stl-string name='name'/>
<code-helper name='describe'>$.name</code-helper>
2011-12-24 03:37:00 -07:00
<stl-vector name='unknown1' comment='empty'/>
<stl-vector name='unknown2' comment='empty'/>
<stl-vector name='words' index-refers-to='$global.world.raws.language_words[$]'>
<pointer type-name='stl-string'/>
</stl-vector>
</struct-type>
<struct-type type-name='language_symbol'>
<stl-string name='name'/>
<stl-vector name='unknown' comment='empty'/>
<stl-vector name='words'>
<int32_t ref-target='language_word'/>
</stl-vector>
</struct-type>
<struct-type type-name='language_name'>
<stl-string name='first_name'/>
<stl-string name='nickname'/>
<static-array name='words' count='7'>
<int32_t ref-target='language_word'/>
</static-array>
<static-array name='parts_of_speech' count='7'>
<enum base-type='int16_t' type-name='part_of_speech'/>
</static-array>
2011-12-24 03:37:00 -07:00
<int32_t name='language' ref-target='language_translation'/>
<int16_t name='unknown'/>
<bool name='has_name'/>
<code-helper name='describe'>
(when $.has_name
(let* ((nick $.nickname)
(language $global.world.raws.translations[$.language])
2011-12-29 05:32:05 -07:00
(english $global.world.raws.language_words)
2011-12-24 03:37:00 -07:00
(fname $.first_name)
(lwords $language.words))
2011-12-29 05:32:05 -07:00
(flet ((get-words (start end)
(loop for i from start to end
for word = $.words[i]
collect $lwords[word].value))
(get-english (start end)
(loop for i from start to end
for word = $.words[i] and ps = $.parts_of_speech[i]
collect $english[word].forms[ps])))
(list
(fmt "Name:~:(~@[ ~A~]~@[ '~A'~]~@[ ~{~A~}~]~@[ ~{~A~}~]~@[ ~{~A~}~]~)"
(if (> (length fname) 0) fname)
(if (> (length nick) 0) nick)
(flatten (get-words 0 1))
(flatten (get-words 2 5))
(flatten (get-words 6 6)))
(fmt "aka~:(~@[ ~A~]~@[ ~{~A~}~]~@[ the ~A~]~@[ of ~{~A~}~]~)"
(if (> (length fname) 0) fname)
(flatten (get-english 0 1))
(when (>= $.words[5] 0)
(apply #'format nil "~@[~A ~]~@[~A ~]~@[~A-~]~A" (get-english 2 5)))
(flatten (get-english 6 6)))))))
2011-12-24 03:37:00 -07:00
</code-helper>
</struct-type>
</data-definition>
<!--
Local Variables:
indent-tabs-mode: nil
nxml-child-indent: 4
End:
-->