[graphics] tfrag3 renderer (#978)

* begin work

* work

* working objs

* exporting

* it works

* before some time of day fixes

* add time of day interp and also fix zbuffer

* some small blending fixes

* improve randomess

* clean up extraction and missing blend mode

* culling, time of day, more level fixes

* more cleanup

* cleanup memory usage

* windows fix
This commit is contained in:
water111
2021-12-04 12:33:18 -05:00
committed by GitHub
parent 0d7b7da116
commit 083202929c
92 changed files with 5533 additions and 666 deletions
+5 -5
View File
@@ -14,15 +14,15 @@ namespace {
template <typename T>
T get_word(const LinkedWord& word) {
T result;
assert(word.kind == LinkedWord::PLAIN_DATA);
assert(word.kind() == LinkedWord::PLAIN_DATA);
static_assert(sizeof(T) == 4, "bad get_word size");
memcpy(&result, &word.data, 4);
return result;
}
DecompilerLabel get_label(ObjectFileData& data, const LinkedWord& word) {
assert(word.kind == LinkedWord::PTR);
return data.linked_data.labels.at(word.label_id);
assert(word.kind() == LinkedWord::PTR);
return data.linked_data.labels.at(word.label_id());
}
} // namespace
@@ -51,8 +51,8 @@ GameTextResult process_game_text(ObjectFileData& data) {
int offset = 0;
// type tage for game-text-info
if (words.at(offset).kind != LinkedWord::TYPE_PTR ||
words.front().symbol_name != "game-text-info") {
if (words.at(offset).kind() != LinkedWord::TYPE_PTR ||
words.front().symbol_name() != "game-text-info") {
assert(false);
}
read_words.at(offset)++;