1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-11-05 10:49:41 +01:00
Commit graph

2938 commits

Author SHA1 Message Date
Misa
dd15d67e62 Fix info args not working with -console
The intention of the `-console` argument was to enable seeing console
output on Windows without having to use workarounds. However, this
didn't actually work for arguments like `-addresses` and `-version`,
because the program would exit first before it could get the chance to
create the console.

The other issue is that the console closes too quickly before output can
be read by the user. So to fix that, we must hold it open and let the
user close it when they want to by waiting for an enter press from
STDIN.
2024-06-03 21:42:57 -07:00
Misa
a9d43b543f Fix regression: Foreground redraw after G keybind
This fixes a regression from 2.4 where the foreground wouldn't update
after using the G keybind to go to a room, requiring the user to touch a
tile to update the rendering.
2024-06-03 20:58:52 -07:00
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
TerryCavanagh
91e144736b whoops 2024-02-09 13:48:11 +01:00
TerryCavanagh
b48cdb0003 minor updates to Spanish 2024-02-09 10:13:17 +01:00
Dav999
99a1562d87 Only re-show language screen in default basedir
After some discussion about the previous commit, the usecase of
managing tons of basedirs and locking files in the filesystem might
mean it gets annoying to have the language screen show up again
whenever a new language is added, for a small group of people. The
solution to get the best of both worlds is to only re-ask for the
language in the default basedir. This means barely anyone will miss
their language having been newly added (especially since barely anyone
will use any custom basedirs, let alone ONLY custom ones).
2024-02-08 10:28:27 -08:00
Dav999
fbc3bd4d5a Make language screen show up once more
Now that two new variants of Spanish have been added, it would be
a shame that many players from Latin-America/Argentina may stay on
Castilian or English because they don't realize the new versions
were added for them. So now, if you've set your language in 2.4.0,
the language screen will show up once more in 2.4.1. This is done by
simply incrementing the lang_set flag to 2 - so that if it's 0 or 1,
your language setting is considered to be possibly outdated.

This shouldn't inconvenience players who don't need to select a new
language - their existing language will still be pre-selected, so they
can just hit ACTION once.

Terry confirms he did the same thing with Dicey Dungeons and says
it's a good idea (and that nobody minds).
2024-02-08 10:28:27 -08:00
KabanFriends
a301ef7c90 Add translation for "Editing and LQA" 2024-02-07 09:08:54 -08:00
Reese Rivers
35ef329575 Translated missing strings into Esperanto
This includes the Spanish variant names, "Editing and LQA",
the "mode enabled" bug text, and the debug mode freeze prompts.
2024-02-07 09:08:32 -08:00
TerryCavanagh
f9e71f1622 added "Editing and LQA" string to es_AR and es_419 2024-02-06 18:08:48 +01:00
TerryCavanagh
003f76464c minor updates to es_419, es_AR and pt_BR 2024-02-06 17:48:45 +01:00
TerryCavanagh
df559e64a9 minor updates to Brazilian Portuguese 2024-02-06 16:21:08 +01:00
Misa
365ee963eb Fix resize-to-nearest could be larger than desktop
This fixes the possibility of the "resize to nearest" graphics option
resizing the game window to be bigger than the resolution of the user's
desktop monitor.

To fix this, just subtract multiples of 320x240 until the chosen
multiple is smaller than the dimensions of the desktop.

Discord user Dzhake discovered this issue.
2024-02-05 18:03:32 -08:00
Dav999
929aaebc84 Align stability generator in es_419 and es_AR 2024-02-05 18:03:08 -08:00
Dav999
d6ec4ae72a Change LATAM Spanish meta.xml Oprime to Pulsa
All of them were changed except for the one in meta.xml. I think it's
safe to assume this is correct, because everywhere else, the same
"Oprime {button} para" pattern always became "Pulsa {button} para" too.
2024-02-05 18:03:08 -08:00
Dav999
139612b319 Fix placeholders in Arabic strings_plural
For some reason all of us overlooked that all of them were {n_crew},
even those which required a different placeholder key...

https://steamcommunity.com/sharedfiles/filedetails/?id=3154670529
2024-02-05 18:03:08 -08:00
TerryCavanagh
2ca912889d minor updates to Latin American Spanish and Argentinian Spanish 2024-02-05 12:04:47 +01:00
KabanFriends
c1a6a1d1df Improve translation for Down Under 2024-02-04 21:37:21 -08:00
KabanFriends
098e356500 Fix typo for Bilinear 2024-02-04 21:37:21 -08:00
KabanFriends
2e633578fd Fix translator credit 2024-02-04 21:37:21 -08:00
KabanFriends
05a3b16f7e Add missing string translations 2024-02-04 21:37:21 -08:00
KabanFriends
55ed42e34c Don't use wordy for numbers 2024-02-04 21:37:21 -08:00
TerryCavanagh
9d933f6c2f minor fixes for Silesian 2024-02-04 20:49:40 +01:00
Ally
3e57d6620c Update desktop_version/src/Graphics.cpp
Co-authored-by: Misa Elizabeth Kai <infoteddy@infoteddy.info>
2024-02-03 18:11:11 -08:00
AllyTally
77a571017d Implement scaling modes manually
For future PRs, it'll be very nice to have full control over how VVVVVV
gets drawn to the window. This means we can use the entire window size
for things like touch input, drawing borders, or anything we want.
2024-02-03 18:11:11 -08:00
Misa
935db27d39 Revert "Translate editor notes on-the-fly"
This reverts commit ec3de52970.

The complexity is not worth it for something that only lasts less than
two seconds anyway. *shrug*
2024-02-02 19:13:59 -08:00
Dav999
a770f3e126 Add missing spaces to script editor title in Welsh 2024-02-02 19:03:52 -08:00
Dav999
18b532cd9f Translate the current 4 proxy strings into Dutch
These are the 3 variants of Spanish and "Editing and LQA".
2024-02-02 19:03:52 -08:00
Dav999
df5607959b Sync Spanish LATAM and Spanish ARG language files
They were missing the latest strings and also still had strings that
had been deleted.

(Whoever commits the upcoming delivery should also sync that version)
2024-02-02 19:03:52 -08:00
Misa
ec3de52970 Translate editor notes on-the-fly
This is so they will be updated when switching language with CTRL+F8.

Most of the editor notes are simple text that don't use any string
formatting. For the ones that aren't, some (saving and loading, changing
map size) reference variables that wouldn't change without initiating a
new note anyway. For the others, i.e. the ones that _do_ reference
variables that could easily be changed (tileset name, speed) by
switching the current room, we cache their values and use the cached
values when drawing the note. Unfortunately, this requires adding a
couple of ugly attributes to editorclass, but it'll be fine.
2024-02-02 18:57:24 -08:00
Misa
67f41a780c Translate editor prompt text on-the-fly
These are simple strings (no vformat), so we can just un-bake them to
make sure that cycling languages with one of them onscreen updates them
accordingly.
2024-02-02 18:57:24 -08:00
Misa
a7acf4e177 Fix cycling menus in editor not updating
While there's a check to recreate the menu if you cycle the language
while in a menu, editor menus are a special case and need specific
handling.
2024-02-02 18:57:24 -08:00
Misa
53ed33039f Translate level title and creator on-the-fly
These weren't getting updated when cycling language with CTRL+F8. This
is because they would be already baked. Luckily, at least the bool
keeping track of whether or not to translate them in the first place
already exists, so we can just rely on that.
2024-02-02 18:57:24 -08:00
Misa
0aea27f237 Fix limits check not updating with CTRL+F8
This makes it work pretty well. It basically just resets the state of
the limits check and starts from the first limit broken (if any), which
is behavior that makes sense to me.

Otherwise, without this, it seems to invalidate pointers and, on my
machine, start pulling strings from the language XML, which is
horrifying.
2024-02-02 18:57:24 -08:00
Misa
ad6e31aa12 Disable switching languages during cutscene tests
Not gonna lie, I am a bit disappointed at having to do this, because it
actually worked pretty well despite a few bugs depending on which
language you entered with. But that's only because I'm working with
the official translation files, which are in sync with each other.

With translation files that are completely arbitrary, it would be
apparent that switching languages during the cutscene test doesn't
really make sense. Like, at all. That's because the list of cutscenes is
populated entirely from language-specific XML and the cutscenes in them
are also from language-specific XML. So keeping the same position in the
menu doesn't really make sense, and keeping the same position in a
cutscene definitely doesn't make sense.
2024-02-02 18:57:24 -08:00
Misa
3d61f9067b Translate NDM hardest room on-the-fly
Otherwise, cycling languages through CTRL+F8 would result in mismatched
languages.
2024-02-02 18:57:24 -08:00
Misa
531b151d12 Translate menu options on-the-fly
I saw that the only problem with cycling languages in a title screen
menu is that the menu options don't get updated. So I was like, we can
just recreate the menu, and then I was like "Sure, why not." So that's
what I did.

To accommodate the CTRL+F8 keybind in the language menu, it
automatically updates the menu option when you cycle it. This is because
otherwise using the keybind in the language menu wouldn't visibly update
the language, but it still actually does change your language, and that
can be seen by pressing Escape.

Also, the menucountdown needs to be preserved because otherwise
createmenu() resets it, even if it's the "same" menu (this behavior is
needed so that the menu that is shown during the countdown isn't added
as a stack frame which would make it a menu that could be returned to).
2024-02-02 18:57:24 -08:00
Misa
c173dec8f9 Reset textcase in speak/speak_active
Originally, textcase was reset in scriptclass::translate_dialogue(),
which is called inside the `text` script command. However, this didn't
really work with the new on-the-fly text box translation system, and
that function is gone now, so I removed that and kind of forgot about
it.

Of course, this now causes a regression. Namely, that the text boxes
after the VVVVVV-Man sequence in the Secret Lab entrance cutscene are
not translated.

I can't reset the text case in `text`, as the scripts assume that they
can set the text case before `text`. So the next best thing is to reset
it in speak/speak_active.
2024-02-02 18:57:24 -08:00
Misa
861f724d90 Recompute textboxes on active input device change
This fixes a bug where some text boxes wouldn't update the displayed
button if the active input device changed from a keyboard to controller,
or vice versa. Namely, the "Press ACTION to continue" text boxes.
2024-02-02 18:57:24 -08:00
Misa
505956ae83 Remove textboxwrap() and wrap() return value
This removes Graphics::textboxwrap(), as it is now an unused function.
Additionally, this removes the return value of textboxclass::wrap(), as
it is also now unused.
2024-02-02 18:57:24 -08:00
Misa
c50da88ad4 Store original position of text box
This stores the original x-position and y-position of the text box, and
when a text box gets repositioned, it will use those unless a crewmate
position overrides it.

This is the original position of the text box, before centering or
crewmate position is considered.

This fixes a bug where a cutscene text box can be "shifted" from its
normal position via CTRL+F8 cycling if there is a translation that is
too long for the screen and thus gets pushed by adjust(). I tested this
with the text box in the Comms Relay cutscene that starts with "If YOU
can find a teleporter".

This is not applicable to function-based translations
(TEXTTRANSLATE_FUNCTION), because the responsibility of correctly
positioning the text box resides with the function.
2024-02-02 18:57:24 -08:00