1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-26 14:38:30 +02:00
Commit Graph

10 Commits

Author SHA1 Message Date
Info Teddy
37a1482bb3 Fix warpdir() doing wrong BG with warp dir 0 in current room
If you're in the room being targeted when a `warpdir()` command is run,
and it sets the warp direction to none (warp dir 0), and if you're in a
Lab or Warp Zone room, the background will be set to the wrong one,
because it will always set the background to the stars-going-left
background, instead of setting it to the Lab background or the
stars-going-up background.

However, this is only a visual glitch, and is a temporary one, because
if you manage to trigger a `gotoroom()` on the room, it will get set to
its proper background.

This commit makes it so if you're in a Lab room, the background gets set
to the Lab background, and if you're in a Warp Zone room, the background
gets set to the stars-going-up background.
2020-01-15 21:57:41 -05:00
Info Teddy
5b2962fde0 Properly reset roomdeaths and roomdeathsfinal in hardreset
There are three map-related vectors that need to be reset in hardreset:
`map.roomdeaths`, `map.roomdeathsfinal`, and `map.explored`. All three
of these vectors use the concatenated rows system, whereby each room is
given a room number, calculated by doing X + Y*20, and this becomes
their index in each vector.

There's a double-nested for-loop to handle resetting all of these, where
the outer for-loop iterates over the Y-axis and the inner for-loop
iterates over the X-axis, but only `map.explored` is properly reset.
That's because it's the only vector that properly indexes using X +
Y*20. The other vectors reset using X, so previously, only the first row
of `map.roomdeaths` and `map.roomdeathsfinal` got reset, corresponding
with only the first row of rooms in both Dimension VVVVVV and Outside
Dimension VVVVVV getting reset.

This commit makes sure that both get reset properly.
2020-01-15 20:48:04 -05:00
Info Teddy
10ed0058fd Fix the flipgravity() internal command (#78)
There are two main problems with flipgravity():
 1. It doesn't work for an already-flipped crewmate.
 2. It doesn't work on the player.

This commit addresses both of those issues.
2020-01-14 08:51:33 -05:00
Allison Fleischer
0de8a9bdc7 Fix a stray "seperate"
tbh this word is very easy to misspell
2020-01-13 00:54:38 -08:00
Info Teddy
5419e822d8 Stop the game from freezing if we play a song during a fadeout (#61) 2020-01-12 22:33:58 -05:00
Marvin Scholz
64fd50be6f Simplify std::vector initializations
Resizing the vector does the same thing that the loops did, it changes
the size for the vector and initializes it with default-constructed
elements (or 0 or its equivalent for POD types).

Where a specific value is needed, it is set with the second
parameter of resize().
2020-01-12 10:29:17 -05:00
Ethan Lee
f85622b7e9 Fix warning emitted by GCC 4.8 2020-01-12 03:56:39 -05:00
Info Teddy
441955de5f Fix hardreset() not resetting all 100 slots in (custom)collect (#36) 2020-01-11 02:14:39 -05:00
viri
5829007bed fix uninitialized member vars everywhere
also fix a spelling error of 'forground' in the graphics class buffer
2020-01-10 21:06:59 -05:00
Ethan Lee
f7c0321b71 Hello WWWWWWorld! 2020-01-08 10:37:50 -05:00