1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-05 12:33:32 +02:00

Fix elephant placement across rooms

Okay, so, this is the elephant sprite, right?

https://i.imgur.com/dtS70zk.png

This is how it looks in the actual game, when you stitch all the rooms
together:

https://i.imgur.com/aztVnFT.png

Looks kind of messed-up, doesn't it?

Okay, so, in the bottom two rooms (11,9) and (12,9), the elephant is
placed at y-position -152. But in (11,8) and (12,8), it's placed at
y-position 96. This is despite the fact that -152 plus 240 is 88, not
96.

Similarly, in the left two rooms (11,8) and (11,9), the elephant is
placed at x-position 64, but in the right two rooms (12,8) and (12,9),
the elephant is placed at -264. This is despite the fact that 64 minus
320 is -256, not -264.

All of this stems from the calculations in Otherlevel.cpp using offsets
of -248 and -328 instead of -240 and -320.

So there's an 8-pixel offset that causes the elephant to be chopped off
when viewed with all the rooms stitched together. Simple enough to fix.
For the y-position fixes, I decremented the initial 8-pixel multiplier
as well, else the elephant would sink into the floor.

And this is what the elephant looks like now after stitching:

https://i.imgur.com/27ePLm1.png

Thanks to Tzann for pointing this out.
This commit is contained in:
Misa 2021-12-08 16:25:18 -08:00
parent a1381102f8
commit b2b2fcb867

View File

@ -6105,7 +6105,7 @@ const short* otherlevelclass::loadlevel(int rx, int ry)
};
obj.createentity((8 * 8), (12 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy
obj.createentity((8 * 8), (11 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy
obj.nearelephant = true;
roomtileset = 0; // (Use space station tileset)
@ -6150,7 +6150,7 @@ const short* otherlevelclass::loadlevel(int rx, int ry)
};
obj.createentity(8 * 8, -248 + (12 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy
obj.createentity(8 * 8, -240 + (11 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy
obj.nearelephant = true;
roomtileset = 0; // (Use space station tileset)
@ -6509,7 +6509,7 @@ const short* otherlevelclass::loadlevel(int rx, int ry)
};
obj.createentity(-328 + (8 * 8), (12 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy
obj.createentity(-320 + (8 * 8), (11 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy
obj.nearelephant = true;
obj.createentity(240, 72, 10, 1, 8120); // (savepoint)
@ -6555,7 +6555,7 @@ const short* otherlevelclass::loadlevel(int rx, int ry)
};
obj.createentity(-328 + (8 * 8), -248 + (12 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy
obj.createentity(-320 + (8 * 8), -240 + (11 * 8), 1, 0, 0, -10000, -10000, 10000, 100000); // Enemy
obj.nearelephant = true;
roomtileset = 0; // (Use space station tileset)