1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-02 19:13:31 +02:00
Commit Graph

2693 Commits

Author SHA1 Message Date
Dav999
abf12632bb Load plain font.png beyond U+007F
VVVVVV 2.2 only supported displaying characters 00-7F with its font
system. VVVVVV 2.3 added support for unicode, by supplying a font.txt
with all the characters that are in the font image. But 2.3 made
another change that I didn't immediately realize, even after reading
the code: if font.txt is not present, then the font is not assumed to
have _only_ 00-7F, but _all_ of unicode, as far as the image dimensions
allow.

However, an inconsistency I _did_ notice is how unknown characters
would be rendered in 2.3. If a font had a font.txt, then any unknown
characters would be shown as a '?'. If a font had no font.txt however,
then suddenly any unknown characters would just come out as a space.
I fixed this behavior with the new font system; but what was actually
happening for characters to come out blank is that characters up to
U+00FF, which _were_ technically in the font image but as fully
transparent, would be shown as they were in the image, and characters
beyond U+00FF wouldn't be shown since they were outside of the image.

I don't really want to show blank characters for any character between
80-FF if it is technically inside the image, because pretty much every
single ASCII-only font.png in existence (including the one in data.zip)
contains a blank lower half, just because the font in the game had
always had this specific resolution. (We didn't want to do things that
might crash the game because something was different from what it
expected...)

We have had some confusing occasions before with the old behavior where
the fonts weren't correctly packaged or something (like when the
Catalan translator was sent the first version of the translator pack,
or when people customize their fonts wrong) and special characters were
just blank spaces.

So, instead, for characters beyond 7F, I decided to consider them part
of the font, as long as they are not blank. That means, if a character
beyond the ASCII range has any (non-alpha-0) pixels, then it will be
added, otherwise it won't be. This is just to handle legacy fonts, and
the case where all fonts are missing and the one from data.zip is used;
new fonts should just use .fontmeta or .txt to define their characters.
2023-12-15 19:54:33 -08:00
Dav999
c2ad3d3b97 Clarify translators and programmers READMEs
The top of the programmers readme now says that you need the
translators readme to translate the game into a new language. Also,
since language file syncing now works to populate an empty language
folder, document that in the translators readme as well.
2023-12-15 19:48:55 -08:00
Dav999
6377fd5e73 Make language sync support creating blank language files
Two translators thus far have tried to populate initial language files
by creating a blank folder and then using the in-game sync option. For
example, see #1078.

That is not how the sync option was intended to be used, but it's
really close to getting everything, so I decided to just complete the
support by making sure numbers.xml is copied from English, and making
sure meta.xml is filled in with English text and not text from an
arbitrary language. Also, minor detail on plural form 1 being set to 1
by default if reset, so strings_plural.xml is fully consistent too.
2023-12-15 19:48:55 -08:00
Dav999
66ba557c4d Fix binding menu allowing you to lock yourself out of the game
Or well, lock yourself out if you don't have (easy) access to a
keyboard, like on Steam Deck.

In 2.3, this problem used to be much worse, since you could bind any
button to "menu" - which is actually also "return" in menus - and that
button could then no longer be bound to any other action, because
exiting the bindings menu had priority over assigning a different
binding. The result would be that people could have all their buttons
bound to "escape" with no way of undoing it or using their controllers
at all other than manually going into their config file to change it.

In 2.4, the most important bugs in the bindings menu are fixed, but
it's still possible to remove all your bindings from the "flip"
(confirm) action, meaning you can't navigate the menus anymore with a
controller to fix your bindings or even do anything.

There is one interesting part to all this: if an action has no buttons
bound to it at all when the game is started, then that action is
populated with the default button for that action. This is done for
each action separately, without accounting for the case where the
default button was already bound to another action which was not empty.
(This is something that the binding menu does try to prevent).
Therefore, having no buttons bound to "flip" while having A and B bound
to "menu", would result in A being bound to "flip" and A and B bound to
"menu".

That would still make you unable to enter the gamepad menu, since both
"confirm" and "return" are pressed in a row.

This commit fixes the specific situation where flip/confirm buttons are
also bound to menu/return, by removing all buttons that are in the flip
button list from the menu list. This means that, on Steam Deck, you can
still go to your bindings menu.
2023-12-15 19:44:51 -08:00
AllyTally
9782b450ef Fix broken warp background check
Seems like I made a mistake while originally writing the "make
autotiling base" code. This commit fixes the warp background turning
into solid tiles when you switch to a different tileset.
2023-12-15 19:40:07 -08:00
AllyTally
03bc9566fb Make outside background tiles ignore solid walls
This was the behavior in the old autotiling system, so this brings that
behavior back.
2023-12-15 19:40:07 -08:00
TerryCavanagh
d314672614 whoops 2023-12-12 15:19:21 +01:00
TerryCavanagh
b11d33f353 updated Italian localisation credits 2023-12-12 10:22:44 +01:00
TerryCavanagh
7e000a9668 minor updates to Italian 2023-12-12 10:17:22 +01:00
TerryCavanagh
4005fe9725 updates to Korean
from our translator, based on TARI1237KR's feedback
2023-12-11 10:42:45 +01:00
TerryCavanagh
912e621259 minor updates to Welsh, German, Japanese, Polish and Silesian 2023-12-06 19:20:28 +01:00
TerryCavanagh
9a40993b5f Add localisation credits to main menu credits
In addition, this adds Ally and mothbeanie to the Localisation
Implementation page credits. Also updated the game complete credits!
2023-12-05 16:14:06 -08:00
TerryCavanagh
e754654926 Change Spanish name in meta.xml to Español (es)
might consider adding an Español (latam) edit next year, but this is
enough for 2.4. We're using "Español (es)" instead of "Castellano"
because our translator prefers it
2023-12-05 16:14:01 -08:00
Reese Rivers
79376ae82e Initial implementation of localisation credits
This commit adds translation credits to the game's end credits
screen. Note that this is not implemented into the menu credits
screen yet. The translator name list is subject to tweaks, and
additionally some localised strings ("Localisation Project Led by"
and "Pan-European Font Design by") run off the screen in some
languages (Catalan, Spanish, Irish, Italian, Dutch, European
Portuguese and Ukrainian) and will need to be addressed later.
2023-12-05 16:13:03 -08:00
TerryCavanagh
c660000292 updated İZLE sprite for turkish
as approved by our translator
2023-12-05 16:46:41 +01:00
Dav999
8f7d0f4913 Make some minor refinements to Dutch translation
I put a main focus on the first cutscenes in the game, changing the
first "Uh oh..." from something like "Oh dear..." to "Oh no..." to make
sure it always sounds right. (The real translation of "Uh oh" is "O-o",
but that seemed too easy to read wrong for the first line in the game
that I wanted to avoid it altogether.)
2023-12-05 16:41:05 +01:00
Dav999
d745bf2e6c Restore correct LIES/TRUTH for Korean
This reverts the Korean sprites in commit
6a8db6a22d.

How many times did we accidentally flip these around now lol
2023-12-05 15:33:20 +01:00
Dav999
2533e144b6 Fix centering of game complete texts if level font != interface font
Textboxes created with graphics.createtextboxflipme() use PR_FONT_LEVEL
by default, but can be overridden with graphics.textboxprintflags() to,
for example, set PR_FONT_INTERFACE. This happens for the textboxes on
the Game Complete screen, which use interface text. The textboxes are
centered by setting the X position to -1 though, which means they're
solely centered based on the width of the first line, in the level
font (because the font hasn't been changed to the interface font yet).

Normally, this isn't a problem, because in the main game (where the
Game Complete screen usually appears), the level font is always equal
to the interface font. However, in custom levels you can still get it
(by calling gamestate 3500) and in that case some of the text may be
misaligned. This change fixes that by adding graphics.textboxcenterx()
to these textboxes.

As far as I can tell, these are the only textboxes that are centered
by just x=-1 despite changing the font afterwards.
2023-12-04 19:49:17 -08:00
Dav999
3c49be7d81 Fix ACCIÓN having changed to ACTION in Spanish 2023-12-04 19:45:01 -08:00
Ethan Lee
2d1009e815 Add "type:" override check for virtual Sony gamepads.
Fixes #1056
2023-12-01 12:08:26 -05:00
AllyTally
b23983c0b8 Fix BG tile bug from switching from pink SS
If you had a pink space station background, and switched to a different
tileset, some solid tiles would be placed instead. This commit fixes
that by transforming the room into the basic autotiling tiles before
changing the tileset itself. The reason why I chose this solution is
because it will help with a future change, being unhardcoding warp zone
backgrounds (which'll help with custom autotiling, if that becomes a
thing.)
2023-11-30 19:17:52 -08:00
AllyTally
96d36f86f0 Change 0s to 713 for lab background
This is so it gets treated as a background tile, so background tiles
don't get thrown away when you shift tilesets.
2023-11-30 19:17:52 -08:00
Dav999
bafd494a67 Polish: Change roomname Ostrzeżenie to Przestroga 2023-11-30 14:59:30 -08:00
Dav999
10ed1079ae Fix "he'd be a a big help" typo
Now that the language files are fairly stable, we should be able to do
this without any accidental reverts taking place (if any do happen, it
should be easy to see and prevent)
2023-11-30 08:38:40 -08:00
Dav999
a111576a98 Correct one letter's capitalization in German
It's a menu option, so it should be uncapitalized, like all other menu
options.
2023-11-29 17:56:58 -08:00
Reese Rivers
80626d358c Fixed duplicated/shifted characters 2023-11-29 10:24:07 -08:00
Dav999
02e15ed829 Italian: Fix in-game timer ON/OFF being reversed 2023-11-29 09:52:14 -08:00
Dav999
1ae9370a72 Japanese: apply change from 凄い to すごい 2023-11-29 09:52:14 -08:00
Misa
af35be5bb6 Name conditionals in text box loop
With the recent change to drawing overlays (images and sprites) from
PR #1058, it's starting to get a bit hairy. This names the conditionals
responsible for determining if the text box is transparent (checking
that all of its RGB is 0) and if overlays should be drawn or not (which
is now either when it's opaque or transparent).
2023-11-28 19:07:49 -08:00
Reese Rivers
44a889efeb Changed timing of textsprites in transparent textboxes
Textsprites and textimages no longer wait for the opacity
value in order to display within transparent textboxes.
Text sprites in normal opaque textboxes are not affected
by this change.
2023-11-28 19:07:49 -08:00
Reese Rivers
2e950fc935 Update Space Station font to latest version 2023-11-28 18:11:42 -08:00
AllyTally
041a81d8de Fix incorrect tiles in outside BG autotiling 2023-11-28 17:21:02 -08:00
Dav999
133adba10e Fix remaining audio speedup/slowdown bug
Fixes #1057.

Based on Ethan's hunch, I simply removed the format comparison that
decides whether to halt and restart, or reuse the voice. Voices are
now always restarted when playing a new track.

This also simplifies the code somewhat: `MusicTrack::musicVoiceFormat`
was now no longer used, and an `if (!IsHalted())` was no longer
necessary because `Halt()` already does that. So those are now removed
as well.
2023-11-28 20:16:38 -05:00
Dav999
456a81df67 Add spaces at the end of "TEMPS :" string (and MORTS and BLINGS)
This string is used both in time trials (alongside "MORTS :" and
"BLINGS :") as well as outside time trials if you enable the in-game
timer. In English, this looks like "TIME:1:23.45". Since French adds
a space before the colon, it will look like "TEMPS :1:23.45" instead.
Therefore, I've added a space after the colon as well.
2023-11-27 18:45:09 -08:00
Dav999
d49fb7eb2e Apply changes to two terminal textboxes in Japanese
These are to make the textboxes not overlap with the header, by making
them wrap to less lines.
2023-11-27 15:22:22 -08:00
Dav999
61c5e18413 Fix position of crewmate in "You have rescued a crew member!" box
At first my CJK changes also misaligned this sprite, and my solution
that time was to position the textbox higher depending on the height
of the textbox, so it would be centered around the crewmate sprite
(which stayed at a hardcoded place onscreen). Recently, #987 changed
these sprites to be relative to the position of the textbox instead of
relative to the screen, which is much more logical, but it stopped
centering these sprites again. But it's an easy fix: simply account for
the extra-added height when adding the sprite in.
2023-11-27 15:02:47 -08:00
Misa
c9fd9e7924 README: Delete section on compiler quirks
This hasn't been relevant for years now. Even in 2.3, this wasn't
relevant, but we added a disclaimer saying that it only applies to 2.2.

But now issue #1052 has been opened specifically pointing to this
section as something that should be removed. Therefore, I'm removing it.
2023-11-27 13:43:23 -08:00
Misa
70357a65bf Fix regression: Warp BG lerps in reverse direction
This fixes a regression caused by PR #923 (the PR that moved rendering
to be GPU-based) where the interpolation of the horizontal and vertical
warp backgrounds (in over-30-FPS mode) was in the wrong direction, which
makes them look blurry.

This happens because the arguments to the `lerp` function were in the
wrong, reverse order.

On the VVVVVV Discord server, Ally raised the argument that they were in
the same order before she made the changes; therefore the previous code
was also incorrect and it wasn't her fault. However, this argument is
incorrect, because in that case, the reverse order _is_ the correct
order.

The reason that it's now the wrong order is because the output of `lerp`
is now being used as the argument to a source rectangle. Previously, the
output of `lerp` was being used as the offset argument to
`ScrollSurface`, which is analogous to being a destination rectangle.

Fixes #1038.
2023-11-27 13:29:06 -08:00
Ethan Lee
8426e0930d VS2010 buildfixes.
The main issue was mostly that we have to build C files as C++ in some
cases, and extern "C" wasn't being used everywhere, so linker errors
popped up. The rest is the usual tedious VS2010 stuff like casting void*
to other stuff, so this commit as a whole is pretty boring!
2023-11-27 12:09:42 -05:00
TerryCavanagh
4725bc4d5e minor change to SIM enemy sprite in pt_BR and pt_PT 2023-11-25 23:31:51 +01:00
TerryCavanagh
0d13a1d38b small update to Polish (changed roomname Aleja Woronicza -> Taśmy prawdy) 2023-11-25 17:08:36 +01:00
TerryCavanagh
46df77e837 minor fixes for Turkish and Esperanto 2023-11-25 16:07:29 +01:00
David Galiev
c27f35b15d Fix some Russian strings 2023-11-25 15:21:47 +01:00
TerryCavanagh
6bbc649269 minor fixes for Polish and Silesian 2023-11-25 15:21:47 +01:00
TerryCavanagh
432487b2d9 Final strings for Polish and Silesian 2023-11-25 15:21:47 +01:00
TerryCavanagh
081b8938b6 minor fixes for Irish
fixed checkpoint letter S being wrong upside down, changed the "big C thing" cutscene
2023-11-25 15:21:47 +01:00
TerryCavanagh
6a8db6a22d Enemy graphics for all other languages*
*subject to changes

Also, Traditional Chinese is current using the Simplified Chinese graphics, which is acceptable but not ideal:

Obey -> 服從 (ok to use simplified 服从)
Lies -> 謊言 (ok to use simplified 谎言)

The other words are the same for Simplified Chinese and Traditional Chinese.
2023-11-25 15:21:47 +01:00
TerryCavanagh
268564cadc minor fix for Esperanto (checkpoint c -> k) 2023-11-25 15:21:47 +01:00
TerryCavanagh
e1eaaaed32 minor fix for Spanish
whoops
2023-11-25 15:21:47 +01:00
TerryCavanagh
b2d15c0bba Final strings for Spanish 2023-11-25 15:21:47 +01:00