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

Compare commits

...

10 Commits

Author SHA1 Message Date
Misa
16d75d2da8 Disable state locking if inc'ing state w/ ACTION
This fixes a bug report from Elomavi that you could still softlock from
warping to ship and incrementing the gamestate by pressing ACTION, which
is diverging behavior from how it was in 2.3. Warping to ship and
incrementing by pressing ACTION is useful behavior for a couple niche
speedrun categories.

I had already fixed this earlier by ignoring state locking if
glitchrunner 2.2 or 2.0 was enabled, but softlocks could still happen
because having glitchrunner mode off still enabled you to increment the
gamestate when otherwise unintended. Softlocks shouldn't happen.

But without removing state locking entirely, I've chosen a middle ground
where it will only be disabled if you press ACTION. That signifies
intent that you still want to perform state incrementing glitches even
with glitchrunner mode off (but in the future it could be considered a
2.3/2.4 glitch that could be patched and made re-enable-able). That way,
casual players can't interrupt the warp to ship by accident (unless they
accidentally press ACTION) while softlocks will be removed.
2024-05-25 23:34:03 -07:00
Misa
ff6bb68f3a Fix "Thanks for playing!" reversed in Flip Mode
For localization, the "Thanks for playing!" text was split into two
lines, when it was originally one line. Unfortunately, it was not
updated to account for Flip Mode, so in Flip Mode, it looked like
"playing! Thanks for".

This has been fixed.
2024-05-25 23:33:45 -07:00
leo60228
4b2b4fb7c9 CONTRIBUTORS.txt: leo60228 -> leo vriska 2024-05-21 20:57:19 -07:00
Terry Cavanagh
d678bd59ff
Added license exception for Recalbox project
https://shop.recalbox.com/
2024-05-02 17:12:36 +01:00
Misa
ff785aaa8a Bump version to 2.4.2
We still need to fix a couple bugs from 2.4.0.
2024-03-29 21:18:39 -07:00
NyakoFox
3361e71036 Add MSVC version check 2024-03-29 20:31:00 -07:00
NyakoFox
4bba26280f Add /utf-8 to MVSC 2024-03-29 20:31:00 -07:00
Misa
217996b134 Fix UB from out-of-range <stretch>
If there was a scaling mode value (serialized in the XML as <stretch>
for legacy reasons) that was not 0 or 1 or 2, then the rectangle with
the stretch information would not be initialized by get_stretch_info,
which would lead to a crash, either from dividing by zero (most likely)
or from reading an uninitialized value.

To fix this, when reading <stretch>, normalize it to a sane default if
the value is otherwise bogus. And for good measure, an assertion is
added in get_stretch_info() if the value is still somehow bogus.

Fixes #1155.
2024-03-29 20:22:00 -07:00
Misa
8640ead937 Fix copy-paste error in customposition
This would otherwise result in text boxes for custom crewmates being
improperly positioned.
2024-03-29 19:55:41 -07:00
Dav999
a9d438968d Change reply scripting command to player color
This is just a small visual fix to an inconsistency with textbox
colors in simplified scripting. The `reply` command is meant to be
used for the player, and always correctly positions it above the
player, while the `say` command may be used to generate a cyan textbox
that's positioned above a cyan non-player crewmate. However, the color
for both textboxes is always `cyan`, so the `reply` command doesn't use
the (normally identical) `player` color even though all its other
behavior (squeak, position) does. Now that customized textbox colors
were added in 2.4 (#910), it's a shame that this distinction isn't
made between `cyan` and `player`, so this change addresses that (before
we're stuck with levels that change `cyan` but not `player`).
2024-03-29 19:47:46 -07:00
10 changed files with 40 additions and 8 deletions

View File

@ -22,3 +22,4 @@ Last updated on January 23rd, 2024.
| XBox One/UWP Port | [tunip3](https://github.com/tunip3) | Port for XBOX ONE (DURANGO) via UWP. | Permission is given to distribute a pre-compiled package (containing the data.zip assets) for people to run on development mode xboxes, for non commercial use only. | [github repo](https://github.com/tunip3/DURANGO-V6)|
| armhf Port | [johnnyonFlame](https://github.com/johnnyonFlame/) | Armhf port for Raspberry PI and other SBC devices| Permission is for non commercial use only. Display the following text in the readme to make it clear that this is an exception: "VVVVVV is a commercial game! The author has given special permission to make this port available for free. If you enjoy the game, please consider purchasing a copy at [thelettervsixtim.es](http://thelettervsixtim.es)."| [github release](https://github.com/JohnnyonFlame/VVVVVV/releases/tag/v2.4-r1) |
| Wii Port | [Alberto Mardegan](https://github.com/mardy/) | Port for the Nintendo Wii. | Permission is given to distribute a ready-to-use build for the Nintendo Wii containing the data.zip assets for non commercial use only. | [github repo](https://github.com/mardy/VVVVVV/tree/wii) |
| Recalbox Port | [digitalLumberjack](https://gitlab.com/recalbox/recalbox) | Port for Recalbox project. | Display the following text in the readme to make it clear that this is an exception: "VVVVVV is a commercial game! The author has given special permission to make this port available for free. If you enjoy the game, please consider purchasing a copy at [thelettervsixtim.es](http://thelettervsixtim.es)." | [website](https://recalbox.com/) |

View File

@ -294,6 +294,11 @@ if(MSVC)
# Disable RTTI
string(REPLACE "/GR" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GR-")
if(MSVC_VERSION GREATER 1900)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /utf-8")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /utf-8")
endif()
else()
string(REGEX REPLACE "-std=[a-z0-9]+" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")

View File

@ -20,7 +20,7 @@ Contributors
* Jules de Sartiges (@strikersh)
* Keith Stellyes (@keithstellyes)
* KyoZM (@lsaa)
* leo60228 (@leo60228)
* leo vriska (@leo60228)
* MAO3J1m0Op (@MAO3J1m0Op)
* Malte Grimm (@trelbutate)
* Marvin Scholz (@ePirat)

View File

@ -173,7 +173,7 @@ static const char* githubfriends[] = {
"Jules de Sartiges",
"Keith Stellyes",
"KyoZM",
"leo60228",
"leo vriska",
"MAO3J1m0Op",
"Malte Grimm",
"Marvin Scholz",

View File

@ -4728,7 +4728,13 @@ void Game::deserializesettings(tinyxml2::XMLElement* dataNode, struct ScreenSett
if (SDL_strcmp(pKey, "stretch") == 0)
{
screen_settings->scalingMode = help.Int(pText);
int mode = help.Int(pText);
if (mode < 0 || mode >= NUM_SCALING_MODES)
{
/* Pick a sane default. */
mode = SCALING_INTEGER;
}
screen_settings->scalingMode = mode;
}
if (SDL_strcmp(pKey, "useLinearFilter") == 0)

View File

@ -3517,6 +3517,13 @@ void Graphics::get_stretch_info(SDL_Rect* rect)
rect->w = width;
rect->h = height;
break;
default:
SDL_assert(0 && "Invalid scaling mode!");
/* Width and height should be nonzero to avoid division by zero. */
rect->x = 0;
rect->y = 0;
rect->w = width;
rect->h = height;
}
}

View File

@ -2617,6 +2617,7 @@ void gameinput(void)
|| !game.glitchrunkludge)
{
game.state++;
game.unlockstate();
}
game.jumpheld = true;
game.glitchrunkludge=true;

View File

@ -1,6 +1,6 @@
#ifndef RELEASEVERSION_H
#define RELEASEVERSION_H
#define RELEASE_VERSION "v2.4.1"
#define RELEASE_VERSION "v2.4.2"
#endif /* RELEASEVERSION_H */

View File

@ -2135,9 +2135,21 @@ void gamecompleterender(void)
creditOffset += 140;
if (graphics.onscreen(creditOffset + position))
{
font::print(PR_2X | PR_CEN | PR_CJK_HIGH, -1, creditOffset + position, loc::gettext("Thanks for"), tr, tg, tb);
const char* line1;
const char* line2;
if (graphics.flipmode)
{
line1 = loc::gettext("playing!");
line2 = loc::gettext("Thanks for");
}
else
{
line1 = loc::gettext("Thanks for");
line2 = loc::gettext("playing!");
}
font::print(PR_2X | PR_CEN | PR_CJK_HIGH, -1, creditOffset + position, line1, tr, tg, tb);
creditOffset += 20;
font::print(PR_2X | PR_CEN | PR_CJK_LOW, -1, creditOffset + position, loc::gettext("playing!"), tr, tg, tb);
font::print(PR_2X | PR_CEN | PR_CJK_LOW, -1, creditOffset + position, line2, tr, tg, tb);
}
draw_skip_message();

View File

@ -681,7 +681,7 @@ void scriptclass::run(void)
texty = 0;
textcrewmateposition.x = obj.entities[i].xp;
textcrewmateposition.override_x = true;
textcrewmateposition.y = obj.entities[i].xp;
textcrewmateposition.y = obj.entities[i].yp;
textcrewmateposition.override_y = true;
textcrewmateposition.dir = j;
@ -3547,7 +3547,7 @@ bool scriptclass::loadcustom(const std::string& t)
}else if(words[0] == "reply"){
//For this version, terminal only
if(squeakmode==0) add("squeak(player)");
add("text(cyan,0,0,"+words[1]+")");
add("text(player,0,0,"+words[1]+")");
int ti=help.Int(words[1].c_str());
int nti = ti>=0 ? ti : 1;