You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
752
haveyourcake2.patch
Normal file
752
haveyourcake2.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -30,6 +30,8 @@
|
||||
#define BUGFIX_BOWSER_FALLEN_OFF_STAGE (0 || VERSION_US || VERSION_EU || VERSION_SH)
|
||||
/// Fixes bug where Bowser would look weird while fading out
|
||||
#define BUGFIX_BOWSER_FADING_OUT (0 || VERSION_US || VERSION_EU || VERSION_SH)
|
||||
/// Removes multi-language cake screen
|
||||
#define EU_CUSTOM_CAKE_FIX 1
|
||||
|
||||
// Support Rumble Pak
|
||||
#define ENABLE_RUMBLE (1 || VERSION_SH)
|
||||
|
||||
@@ -8,9 +8,13 @@ extern const GeoLayout ending_geo_000050[];
|
||||
|
||||
// leveldata
|
||||
extern const Gfx dl_cake_end_screen[];
|
||||
#ifndef EU_CUSTOM_CAKE_FIX
|
||||
extern const Gfx dl_cake_end_screen_eu_070296F8[];
|
||||
extern const Gfx dl_cake_end_screen_eu_07029768[];
|
||||
extern const Gfx dl_cake_end_screen_eu_070297D8[];
|
||||
#else
|
||||
extern const Gfx dl_cake_end_screen_eu_fix[];
|
||||
#endif
|
||||
extern const Gfx dl_cake_end_screen[];
|
||||
|
||||
// script
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -209,7 +209,10 @@ Gfx *geo_exec_cake_end_screen(s32 callContext, struct GraphNode *node, UNUSED f3
|
||||
gSPDisplayList(displayListHead++, dl_proj_mtx_fullscreen);
|
||||
#endif
|
||||
#ifdef VERSION_EU
|
||||
switch (eu_get_language()) {
|
||||
#ifdef EU_CUSTOM_CAKE_FIX
|
||||
gSPDisplayList(displayListHead++, dl_cake_end_screen_eu_fix);
|
||||
#else
|
||||
switch (eu_get_language()) {
|
||||
case LANGUAGE_ENGLISH:
|
||||
gSPDisplayList(displayListHead++, dl_cake_end_screen_eu_070296F8);
|
||||
break;
|
||||
@@ -220,6 +223,7 @@ Gfx *geo_exec_cake_end_screen(s32 callContext, struct GraphNode *node, UNUSED f3
|
||||
gSPDisplayList(displayListHead++, dl_cake_end_screen_eu_070297D8);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
gSPDisplayList(displayListHead++, dl_cake_end_screen);
|
||||
#endif
|
||||
|
||||
@@ -49,8 +49,8 @@ static const ImageProps IMAGE_PROPERTIES[ImageType_MAX][2] = {
|
||||
{256, 256, 32, 32, 8, 8, true, true},
|
||||
},
|
||||
[Cake] = {
|
||||
{316, 228, 79, 19, 4, 12, false, false},
|
||||
{320, 240, 80, 20, 4, 12, false, false},
|
||||
{316, 228, 63, 29, 5, 8, false, false},
|
||||
{320, 240, 64, 30, 5, 8, false, false},
|
||||
},
|
||||
[CakeEU] = {
|
||||
{320, 224, 64, 32, 5, 7, false, false},
|
||||
@@ -64,7 +64,7 @@ typedef struct {
|
||||
|
||||
static const TableDimension TABLE_DIMENSIONS[ImageType_MAX] = {
|
||||
[Skybox] = {8, 10},
|
||||
[Cake] = {4, 12},
|
||||
[Cake] = {5, 8},
|
||||
[CakeEU] = {5, 7},
|
||||
};
|
||||
|
||||
@@ -106,15 +106,29 @@ static void split_tile(int col, int row, rgba *image, bool expanded) {
|
||||
int tileWidth = props.tileWidth;
|
||||
int tileHeight = props.tileHeight;
|
||||
int imageWidth = props.imageWidth;
|
||||
int imageHeight = props.imageHeight;
|
||||
int numCols = props.numCols;
|
||||
|
||||
int expandedWidth = IMAGE_PROPERTIES[type][true].tileWidth;
|
||||
|
||||
rgba black = {0, 0, 0, 0};
|
||||
|
||||
for (int y = 0; y < tileHeight; y++) {
|
||||
for (int x = 0; x < tileWidth; x++) {
|
||||
int ny = row * tileHeight + y;
|
||||
int nx = col * tileWidth + x;
|
||||
tiles[row * numCols + col].px[y * expandedWidth + x] = image[(ny * imageWidth + nx)];
|
||||
if(type == CakeEU) {
|
||||
tiles[row * numCols + col].px[y * expandedWidth + x] = image[(ny * imageWidth + nx)];
|
||||
} else {
|
||||
if (nx < imageWidth && ny < imageHeight)
|
||||
{
|
||||
tiles[row * numCols + col].px[y * expandedWidth + x] = image[(ny * imageWidth + nx)];
|
||||
}
|
||||
else
|
||||
{
|
||||
tiles[row * numCols + col].px[y * expandedWidth + x] = black;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -333,17 +347,24 @@ static void write_cake_c() {
|
||||
|
||||
FILE *cFile = fopen(buffer, "w");
|
||||
|
||||
const char *euSuffx = "";
|
||||
if (type == CakeEU) {
|
||||
euSuffx = "eu_";
|
||||
}
|
||||
|
||||
int numTiles = TABLE_DIMENSIONS[type].cols * TABLE_DIMENSIONS[type].rows;
|
||||
for (int i = 0; i < numTiles; ++i) {
|
||||
fprintf(cFile, "ALIGNED8 static const Texture cake_end_texture_%s%d[] = {\n", euSuffx, i);
|
||||
print_raw_data(cFile, &tiles[i]);
|
||||
|
||||
if (type == CakeEU) {
|
||||
for (int i = 0; i < numTiles; ++i) {
|
||||
fprintf(cFile, "ALIGNED8 static const Texture cake_end_texture_eu_%d[] = {\n", i);
|
||||
print_raw_data(cFile, &tiles[i]);
|
||||
fputs("};\n\n", cFile);
|
||||
}
|
||||
} else {
|
||||
fprintf(cFile, "ALIGNED8 static const u8 cake_end_texture_data[] = {\n");
|
||||
for (int i = 0; i < numTiles; ++i) {
|
||||
print_raw_data(cFile, &tiles[i]);
|
||||
fputc(',', cFile);
|
||||
fputc('\n', cFile);
|
||||
}
|
||||
fputs("};\n\n", cFile);
|
||||
}
|
||||
|
||||
fclose(cFile);
|
||||
}
|
||||
|
||||
@@ -654,4 +675,4 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user