You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
Merge pull request #11 from Reonu/haveyourcake
haveyourcake (cake screen fix)
This commit is contained in:
752
haveyourcake2.patch
Normal file
752
haveyourcake2.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -21,9 +21,7 @@ const GeoLayout ending_geo_000050[] = {
|
|||||||
GEO_OPEN_NODE(),
|
GEO_OPEN_NODE(),
|
||||||
GEO_NODE_ORTHO(100),
|
GEO_NODE_ORTHO(100),
|
||||||
GEO_OPEN_NODE(),
|
GEO_OPEN_NODE(),
|
||||||
#ifdef VERSION_EU
|
|
||||||
GEO_BACKGROUND_COLOR(0x0001),
|
GEO_BACKGROUND_COLOR(0x0001),
|
||||||
#endif
|
|
||||||
GEO_ASM(0, geo_exec_cake_end_screen),
|
GEO_ASM(0, geo_exec_cake_end_screen),
|
||||||
GEO_CLOSE_NODE(),
|
GEO_CLOSE_NODE(),
|
||||||
GEO_CLOSE_NODE(),
|
GEO_CLOSE_NODE(),
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
840
levels/ending/leveldata.c.orig
Normal file
840
levels/ending/leveldata.c.orig
Normal file
File diff suppressed because it is too large
Load Diff
@@ -49,8 +49,8 @@ static const ImageProps IMAGE_PROPERTIES[ImageType_MAX][2] = {
|
|||||||
{256, 256, 32, 32, 8, 8, true, true},
|
{256, 256, 32, 32, 8, 8, true, true},
|
||||||
},
|
},
|
||||||
[Cake] = {
|
[Cake] = {
|
||||||
{316, 228, 79, 19, 4, 12, false, false},
|
{316, 228, 63, 29, 5, 8, false, false},
|
||||||
{320, 240, 80, 20, 4, 12, false, false},
|
{320, 240, 64, 30, 5, 8, false, false},
|
||||||
},
|
},
|
||||||
[CakeEU] = {
|
[CakeEU] = {
|
||||||
{320, 224, 64, 32, 5, 7, false, false},
|
{320, 224, 64, 32, 5, 7, false, false},
|
||||||
@@ -64,7 +64,7 @@ typedef struct {
|
|||||||
|
|
||||||
static const TableDimension TABLE_DIMENSIONS[ImageType_MAX] = {
|
static const TableDimension TABLE_DIMENSIONS[ImageType_MAX] = {
|
||||||
[Skybox] = {8, 10},
|
[Skybox] = {8, 10},
|
||||||
[Cake] = {4, 12},
|
[Cake] = {5, 8},
|
||||||
[CakeEU] = {5, 7},
|
[CakeEU] = {5, 7},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -106,15 +106,26 @@ static void split_tile(int col, int row, rgba *image, bool expanded) {
|
|||||||
int tileWidth = props.tileWidth;
|
int tileWidth = props.tileWidth;
|
||||||
int tileHeight = props.tileHeight;
|
int tileHeight = props.tileHeight;
|
||||||
int imageWidth = props.imageWidth;
|
int imageWidth = props.imageWidth;
|
||||||
|
int imageHeight = props.imageHeight;
|
||||||
int numCols = props.numCols;
|
int numCols = props.numCols;
|
||||||
|
|
||||||
int expandedWidth = IMAGE_PROPERTIES[type][true].tileWidth;
|
int expandedWidth = IMAGE_PROPERTIES[type][true].tileWidth;
|
||||||
|
|
||||||
|
rgba black = {0, 0, 0, 0};
|
||||||
|
|
||||||
for (int y = 0; y < tileHeight; y++) {
|
for (int y = 0; y < tileHeight; y++) {
|
||||||
for (int x = 0; x < tileWidth; x++) {
|
for (int x = 0; x < tileWidth; x++) {
|
||||||
int ny = row * tileHeight + y;
|
int ny = row * tileHeight + y;
|
||||||
int nx = col * tileWidth + x;
|
int nx = col * tileWidth + x;
|
||||||
tiles[row * numCols + col].px[y * expandedWidth + x] = image[(ny * imageWidth + nx)];
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -339,11 +350,13 @@ static void write_cake_c() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int numTiles = TABLE_DIMENSIONS[type].cols * TABLE_DIMENSIONS[type].rows;
|
int numTiles = TABLE_DIMENSIONS[type].cols * TABLE_DIMENSIONS[type].rows;
|
||||||
|
fprintf(cFile, "ALIGNED8 static const Texture cake_end_texture_%sdata[] = {\n", euSuffx);
|
||||||
for (int i = 0; i < numTiles; ++i) {
|
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]);
|
print_raw_data(cFile, &tiles[i]);
|
||||||
fputs("};\n\n", cFile);
|
fputc(',', cFile);
|
||||||
|
fputc('\n', cFile);
|
||||||
}
|
}
|
||||||
|
fputs("};\n\n", cFile);
|
||||||
fclose(cFile);
|
fclose(cFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user