[decomp] joint and related (#1003)

* update jak 2 config and hack to make game text dumpable

* update stuff

* update src

* do `cspace<-parented-transformq-joint!`

* progress.... kind of...

* more drawable stuff

* clagng

* bones begin

* more bones

* even more bones

* everything builds

* touches

* errors

* ?

* fix `quicksandlurker`

* updates

* update refs

* more fixes

* update refs
This commit is contained in:
ManDude
2021-12-26 16:43:16 +00:00
committed by GitHub
parent cee7752c2a
commit c245f37feb
169 changed files with 27728 additions and 30664 deletions
+7 -4
View File
@@ -43,14 +43,14 @@ DecompilerLabel get_label(ObjectFileData& data, const LinkedWord& word) {
)
*/
GameTextResult process_game_text(ObjectFileData& data) {
GameTextResult process_game_text(ObjectFileData& data, GameTextVersion version) {
GameTextResult result;
auto& words = data.linked_data.words_by_seg.at(0);
std::vector<int> read_words(words.size(), false);
int offset = 0;
// type tage for game-text-info
// type tag for game-text-info
if (words.at(offset).kind() != LinkedWord::TYPE_PTR ||
words.front().symbol_name() != "game-text-info") {
assert(false);
@@ -99,12 +99,15 @@ GameTextResult process_game_text(ObjectFileData& data) {
}
// escape characters
result.text[text_id] = convert_from_jak1_encoding(text.c_str());
result.text[text_id] = version == GameTextVersion::JAK1_V1
? convert_from_jak1_encoding(text.c_str())
: goos::get_readable_string(text.c_str()); // HACK!
// remember what we read (-1 for the type tag)
auto string_start = (text_label.offset / 4) - 1;
// 8 for type tag and length fields, 1 for null char.
for (int j = 0; j < align16(8 + 1 + (int)text.length()) / 4; j++) {
for (int j = 0, m = align16(8 + 1 + (int)text.length()) / 4;
j < m && string_start + j < read_words.size(); j++) {
read_words.at(string_start + j)++;
}
}