ckernel: fix file paths for art groups and tpages (#2932)

This commit is contained in:
Hat Kid
2023-08-25 18:33:26 +02:00
committed by GitHub
parent 5538993ff2
commit 74b9ad5a05
3 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -92,12 +92,12 @@ char* MakeFileName(int type, const char* name, int new_string) {
// GOAL object file, but containing data instead of code.
// likely packed by a tool that isn't the GOAL compiler.
// sprintf(buf, "%sdata/%s.go", prefix, name);
sprintf(buf, "%sout/obj/%s.go", prefix, name);
sprintf(buf, "%sout/jak1/obj/%s.go", prefix, name);
} else if (type == TX_PAGE_FILE_TYPE) {
// Texture Page
// part of level files, so it has a version number.
// sprintf(buf, "%sdata/texture-page%d/%s.go", prefix, TX_PAGE_VERSION, name);
sprintf(buf, "%sout/obj/%s.go", prefix, name);
sprintf(buf, "%sout/jak1/obj/%s.go", prefix, name);
} else if (type == JA_FILE_TYPE) {
// Art JA (joint animation? no idea)
// part of level files, so it has a version number
+2 -2
View File
@@ -96,12 +96,12 @@ char* MakeFileName(int type, const char* name, int new_string) {
// GOAL object file, but containing data instead of code.
// likely packed by a tool that isn't the GOAL compiler.
// sprintf(buf, "%sfinal/%s.go", prefix, name);
sprintf(buf, "%sout/obj/%s.go", prefix, name);
sprintf(buf, "%sout/jak2/obj/%s.go", prefix, name);
} else if (type == TX_PAGE_FILE_TYPE) {
// Texture Page
// part of level files, so it has a version number.
// sprintf(buf, "%sdata/texture-page%d/%s.go", prefix, TX_PAGE_VERSION, name);
sprintf(buf, "%sout/obj/%s.go", prefix, name);
sprintf(buf, "%sout/jak2/obj/%s.go", prefix, name);
} else if (type == JA_FILE_TYPE) {
// Art JA (joint animation? no idea)
// part of level files, so it has a version number
+2 -2
View File
@@ -115,7 +115,7 @@ TEST(Kernel, basename) {
TEST(Kernel, DecodeFileName) {
std::string x;
x = DecodeFileName("$TEXTURE/beans");
EXPECT_EQ(x, "out/obj/beans.go");
EXPECT_EQ(x, "out/jak1/obj/beans.go");
x = DecodeFileName("$ART_GROUP/stuff");
EXPECT_EQ(x, "data/art-group6/stuff-ag.go");
@@ -127,7 +127,7 @@ TEST(Kernel, DecodeFileName) {
EXPECT_EQ(x, "data/level30/my-level.123");
x = DecodeFileName("$DATA/my-data");
EXPECT_EQ(x, "out/obj/my-data.go");
EXPECT_EQ(x, "out/jak1/obj/my-data.go");
x = DecodeFileName("$CODE/my-code");
EXPECT_EQ(x, "game/obj/my-code.o");