Lots of asset renames! (#371)

* Named textures

* Finished naming sprites and level models

* Fixed issue where texture was not being extracted properly due to duplicate index
This commit is contained in:
David Benepe
2023-02-12 13:25:19 -05:00
committed by GitHub
parent 65ab7d14ee
commit d57f879dbd
6 changed files with 26637 additions and 11723 deletions
+8325 -8325
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+2905 -2905
View File
File diff suppressed because it is too large Load Diff
+12 -12
View File
@@ -549,45 +549,45 @@ void render_course_indicator_arrows(Object_Racer *racer, s32 updateRate) {
indicator = (IndicatorArrow *) &D_80126CDC->courseIndicator;
switch (type) {
case INDICATOR_LEFT:
indicator->textureID = ASSET_TEX2D_33;
indicator->textureID = 33;
indicator->unk0 = 0;
break;
case INDICATOR_LEFT_SHARP:
indicator->textureID = ASSET_TEX2D_32;
indicator->textureID = 32;
indicator->unk0 = 0;
break;
case INDICATOR_LEFT_UTURN:
indicator->textureID = ASSET_TEX2D_31;
indicator->textureID = 31;
indicator->unk0 = 0;
break;
case INDICATOR_RIGHT:
indicator->textureID = ASSET_TEX2D_33;
indicator->textureID = 33;
indicator->unk0 = -0x8000;
break;
case INDICATOR_RIGHT_SHARP:
indicator->textureID = ASSET_TEX2D_32;
indicator->textureID = 32;
indicator->unk0 = -0x8000;
break;
case INDICATOR_RIGHT_UTURN:
indicator->textureID = ASSET_TEX2D_31;
indicator->textureID = 31;
indicator->unk0 = -0x8000;
break;
case INDICATOR_UP:
indicator->textureID = ASSET_TEX2D_30;
indicator->textureID = 30;
indicator->unk0 = -0x8000;
indicator->unk2 = -0x8000;
break;
case INDICATOR_DOWN:
indicator->textureID = ASSET_TEX2D_30;
indicator->textureID = 30;
indicator->unk0 = 0;
break;
default: // INDICATOR_EXCLAMATION
indicator->textureID = ASSET_TEX2D_29;
indicator->textureID = 29;
indicator->unk0 = 0;
break;
}
// Flip the arrow direction on adventure 2.
if (get_filtered_cheats() & CHEAT_MIRRORED_TRACKS && racer->indicator_type < ASSET_TEX2D_30) {
if (get_filtered_cheats() & CHEAT_MIRRORED_TRACKS && racer->indicator_type < 30) {
indicator->unk0 = (s16) (0x8000 - indicator->unk0);
}
if (gHUDNumPlayers == ONE_PLAYER && racer->raceFinished == FALSE && racer->indicator_type && D_800E27B8 == 0) {
@@ -609,8 +609,8 @@ void render_course_indicator_arrows(Object_Racer *racer, s32 updateRate) {
indicator = (IndicatorArrow *) &D_80126CDC->courseIndicator;
indicator->unk0 = 0;
indicator->unk2 = 0;
indicator->textureID = ASSET_TEX2D_29;
if ((get_filtered_cheats() & CHEAT_MIRRORED_TRACKS) && ((s32) racer->indicator_type < ASSET_TEX2D_30)) {
indicator->textureID = 29;
if ((get_filtered_cheats() & CHEAT_MIRRORED_TRACKS) && ((s32) racer->indicator_type < 30)) {
indicator->unk0 = (s16) (0x8000 - indicator->unk0);
}
func_800AA600(&gHUDCurrDisplayList, &gHUDCurrMatrix, &gHUDCurrVertex, (unk80126CDC **) indicator);
@@ -42,7 +42,7 @@ AssetCompiler::AssetCompiler() {
recursively_copy_directory(vanillaDirPath + "/" + version, compiledDir);
print_text("Reading package order...");
std::string packageOrderFilepath = packagesDirPath + "/order.json";
std::string packageOrderFilepath = packagesDirPath + "/order.meta.json";
bool isVanilla = true;
@@ -5,7 +5,7 @@ ExtractTextures::ExtractTextures(std::string key, std::vector<uint8_t> data, std
: Extract(key, data, outFilepath) {
std::string directory = get_directory_from_full_path(outFilepath);
std::string filename = get_filename_from_full_path(outFilepath, true);
ensure_that_path_exists(directory + "/img/");
ensure_that_path_exists(directory);
json::JSON out = json::Object();
int format = data[2] & 0xF;
@@ -51,7 +51,7 @@ ExtractTextures::ExtractTextures(std::string key, std::vector<uint8_t> data, std
out["compressed"] = data[0x1D] != 0;
out["img"] = "img/" + filename + ".png";
out["img"] = filename + ".png";
out["write-size"] = (get_big_endian_halfword(data, 0x16) != 0);