[sparticle] 2d hud particles (#849)

* wip, taking a break to work on asm stuff first

* the goal code for sparticle

* mips2c the first sparticle asm function

* temp

* particle processing no longer crashing

* temp

* working texture cache for vi1 and hud textures

* sprites

* cleanup 1

* temp

* temp

* add zstd library

* temp

* working

* tests

* include fix

* uncomment

* better decomp of sparticle stuff, part 1

* update references
This commit is contained in:
water111
2021-09-26 11:41:58 -04:00
committed by GitHub
parent d777337095
commit f0ceea8b2e
158 changed files with 19773 additions and 44989 deletions
+3 -6
View File
@@ -6,6 +6,7 @@
#include "game_text.h"
#include "decompiler/ObjectFile/ObjectFileDB.h"
#include "common/goos/Reader.h"
#include "common/util/BitUtils.h"
namespace decompiler {
namespace {
@@ -23,10 +24,6 @@ DecompilerLabel get_label(ObjectFileData& data, const LinkedWord& word) {
return data.linked_data.labels.at(word.label_id);
}
int align16(int in) {
return (in + 15) & ~15;
}
} // namespace
/*
@@ -76,7 +73,7 @@ GameTextResult process_game_text(ObjectFileData& data) {
assert(group_name == "common");
// remember that we read these bytes
auto group_start = (group_label.offset / 4) - 1;
for (int j = 0; j < align16(8 + 1 + group_name.length()) / 4; j++) {
for (int j = 0; j < align16(8 + 1 + (int)group_name.length()) / 4; j++) {
read_words.at(group_start + j)++;
}
@@ -106,7 +103,7 @@ GameTextResult process_game_text(ObjectFileData& data) {
// 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 + text.length()) / 4; j++) {
for (int j = 0; j < align16(8 + 1 + (int)text.length()) / 4; j++) {
read_words.at(string_start + j)++;
}
}