1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-27 23:18:30 +02:00
Commit Graph

2670 Commits

Author SHA1 Message Date
TerryCavanagh
5a95040a4d Enemy graphics for Korean 2023-11-25 15:21:47 +01:00
TerryCavanagh
83b9db71ee Final strings for French 2023-11-25 15:21:47 +01:00
TerryCavanagh
f5b9c3b09e Final strings for European Portuguese 2023-11-25 15:21:47 +01:00
TerryCavanagh
43cb7a5cde Final strings for Welsh 2023-11-25 15:21:47 +01:00
TerryCavanagh
085b2d5987 minor fix for Japanese 2023-11-25 15:21:47 +01:00
TerryCavanagh
61d14ce2af Enemy graphics for Japanese
These depend on pull request https://github.com/TerryCavanagh/VVVVVV/pull/1031 - if the format or implementation changes, I'll update the branch to match!
2023-11-25 15:21:47 +01:00
TerryCavanagh
99dd10b158 Final strings for Japanese 2023-11-25 15:21:47 +01:00
TerryCavanagh
48d9ab3083 Final strings for Brazilian Portuguese 2023-11-25 15:21:47 +01:00
TerryCavanagh
195b375d2e minor fixes for Ukrainian 2023-11-25 15:21:47 +01:00
Dav999
2db9eaa9a2 Final strings for Esperanto (credits part) 2023-11-25 15:21:47 +01:00
TerryCavanagh
7ad96c6d43 Final strings for Ukrainian 2023-11-25 15:21:47 +01:00
TerryCavanagh
9bea54578e Squashed commit of the following:
commit 3d6802add8
Author: Dav999 <dav999.tolp@gmail.com>
Date:   Thu Oct 19 17:16:01 2023 +0200

    Change AVOID to FAINIC in Irish

commit 21fd84f479
Author: Dav999 <dav999.tolp@gmail.com>
Date:   Thu Oct 19 17:04:27 2023 +0200

    Partial final strings for Esperanto

    This does not yet include the new localization credits, but I already
    had all the other strings.

commit 45382a358c
Author: Dav999 <dav999.tolp@gmail.com>
Date:   Thu Oct 19 17:01:30 2023 +0200

    Final strings for Dutch

    I also decided to change AVOID from ONTWIJKEN to ONTWIJK, to make it
    a bit more fitting as if it's an actual word enemy with length
    restrictions, heh. (Not that it's an abbreviation - it's just an
    imperative instead of an infinitive. And those terms I had to look up)
2023-11-25 15:21:47 +01:00
TerryCavanagh
dcb447b4f3 Final strings for Italian 2023-11-25 15:21:47 +01:00
TerryCavanagh
0cfce45ec6 Final strings for Turkish 2023-11-25 15:21:47 +01:00
TerryCavanagh
faa4266eb7 Final strings for Traditional Chinese 2023-11-25 15:21:47 +01:00
TerryCavanagh
3c4337eca6 Minor fixes for German and Irish 2023-11-25 15:21:47 +01:00
TerryCavanagh
ea7f6982db Final strings for Irish 2023-11-25 15:21:47 +01:00
TerryCavanagh
822aec9d10 Final strings for German 2023-11-25 15:21:47 +01:00
TerryCavanagh
0ae927eb3b Changed to Simplified Chinese to match enemy graphic changes 2023-11-25 15:21:47 +01:00
TerryCavanagh
5ca49e607e Final strings for Simplified Chinese 2023-11-25 15:21:47 +01:00
TerryCavanagh
e30dd618d2 Final strings for Catalan, Russian and Korean
more incoming
2023-11-25 15:21:47 +01:00
AllyTally
b7a8bb138c Unhardcode TAB in translation strings
In case we want to make it rebindable in the future, we shouldn't make
translators retranslate these strings.
2023-11-19 17:34:23 -08:00
AllyTally
4df35da0e4 Fix debugging in the tower, update wording
Fixes debugging mouse targets and rendering in the tower. This also
changes "movement" to "gameplay" in the TAB hint.
2023-11-19 17:34:23 -08:00
AllyTally
0804f2d0c0 Add warp background as general information 2023-11-19 17:34:23 -08:00
AllyTally
f7ca850017 Update to latest commit 2023-11-19 17:34:23 -08:00
AllyTally
6b7bf44402 Add gravity line true hitbox visuals 2023-11-19 17:34:23 -08:00
AllyTally
55a05342e9 Replace manual check with SDL_PointInRect 2023-11-19 17:34:23 -08:00
AllyTally
63620efac8 Fix moving entities flashing in over 30fps mode 2023-11-19 17:34:23 -08:00
Ally
689768b8ca Fix issues
Co-authored-by: Dav999 <44736680+Dav999-v@users.noreply.github.com>
2023-11-19 17:34:23 -08:00
AllyTally
aff4d2012c Add -leveldebugger flag
This commit adds the `-leveldebugger` flag so you can use it while
playtesting from a different editor program, such as Ved.
2023-11-19 17:34:23 -08:00
AllyTally
c62da1c9a0 Add flag display by holding U 2023-11-19 17:34:23 -08:00
AllyTally
fd2f738145 Debug lines while not hovering
This commit adds new debug lines while you're NOT hovering over an
entity or a block. Additionally, coordinates are now displayed smaller,
to not take up as much vertical space.
2023-11-19 17:34:23 -08:00
AllyTally
be77047440 Add more info, add lang string 2023-11-19 17:34:23 -08:00
AllyTally
91f87fa126 Add level debugger screen
The level debugger is toggleable in playtesting mode by pressing Y.
You can toggle whether or not the game is paused inside of the debugger
by pressing TAB. The debugger screen allows you to see entity and block
properties, and allows you to move them around.
2023-11-19 17:34:23 -08:00
Dav999
3c4ed36418 Translate hardest room at display time instead of at time of death
The hardest room used to be stored as a room name in whatever language
it was in when you last died enough times to break the record (before
localization, that was always English). Even after localization became
a thing we could get away with this since we only had a single font,
but now we might have actual question marks appearing when the new font
doesn't support characters from the old language.

Therefore, this commit adds more info about the hardest room to save
files - everything that is needed to know in order to do the
translation at display time. These are hardestroom_x and hardestroom_y
for the room coordinates, as well as hardestroom_specialname to mark
special names, in addition to changing the stored room name back to
English. I've also added hardestroom_finalstretch in case we later
decide to drop the English name as a key and rely on just the
coordinates (even though I think that change itself would be more
complicated than any simplification it would accomplish, and I don't
think it's necessary, but better to have it if we do need it later)
2023-11-19 16:47:52 -08:00
Dav999
e0e902d717 Change levelstats data type from vector to map
As described in #1016, there used to be a bug that inflated
levelstats.vvv in 2.3, which was fixed in 2.4, but there was no way
for inflated files to get smaller yet.

This commit changes the storage of levelstats from a std::vector of
structs to a std::map, so that uniqueness is guaranteed and thus the
stats can be optimized automatically. And it also simplifies *and*
optimizes the code that handles the levelstats - no more big loops that
iterated over every element to find the matching level.
(Farewell to the "life optimisation and all that" comment, too)

I tested this with both my own levelstats.vvv, as well as some inflated
ones (including Balneor's 93 MB one) and saw this code correctly reduce
the filesize and speed up the levels list.

Fixes #1016.
2023-11-19 16:18:54 -08:00
Dav999
82240d262b Game::loadcustomlevelstats: move some declarations to later in function
The declarations of `std::vector<std::string> customlevelnames` and
`std::vector<int> customlevelscores` are made quite early in the
function, commented with "Old system", but the place where the old
system is processed is after a big chunk of code that processes the new
system (and indeed never uses these vectors). So for readability,
they're now closer to where they're used.
2023-11-19 16:18:54 -08:00
mothbeanie
58c006f61f decrease map cursor margin on smaller map sizes 2023-11-19 15:59:27 -08:00
mothbeanie
94ece095ed PR_BOR8 -> PR_FULLBOR, border8 -> full_border 2023-11-19 15:59:27 -08:00
mothbeanie
947d716be6 remove tile_offset (no longer used) 2023-11-19 15:59:27 -08:00
mothbeanie
3a3ec659d6 Add translingual map legend code + border8 2023-11-19 15:59:27 -08:00
mothbeanie
7840f72389 Add translingual map legend characters to font 2023-11-19 15:59:27 -08:00
AllyTally
103b4d36a1 Add textimage for levelcomplete and gamecomplete
`levelcomplete` and `gamecomplete` were hardcoded using textbox colors
which were offset by 1. This PR fixes that, no longer requiring
slightly-off colors, and instead adding a new property to textboxes
which tell the game to display either level complete or game complete.
2023-11-19 15:07:25 -08:00
AllyTally
b5c9508dd4 Finish implementing sprites in textboxes
This commit adjusts the Y position for flip-mode, and makes the main
game use this new system.
2023-11-19 15:07:25 -08:00
AllyTally
76ea4488af Initial implementation of textbox sprites
This commit adds a system for displaying sprites in textboxes, meant to
replace the hardcoded system in the main game. This does not support
levelcomplete.png and gamecomplete.png yet, which will most likely just
be special cases.
2023-11-19 15:07:25 -08:00
Dav999
187fd85e14 Change saved <summary> tag back to English
This ensures loading a 2.4 save in the English-only 2.3 or earlier
doesn't result in missing characters because a translated area name
appears in the save file. We are not reading from <summary> anymore
in 2.4.

The way this is done is by not translating the area names inside
mapclass::currentarea(), but at the callsites other than the one which
saves the <summary>.
2023-11-19 13:49:59 -08:00
Dav999
ac7fe4475c Remove more tele/quick variables duplicating info in struct Summary
For both `tele` and `quick`, I removed these attributes of class Game:
- std::string *_gametime
- int *_trinkets
- std::string *_currentarea
- bool *_crewstats[numcrew]

All this info can now be gotten from members of Game::last_telesave and
Game::last_telesave. I've also cleaned up the continue menu to not have
all the display code appear twice (once for telesave and once for
quicksave).

RIP "Error! Error!" though lol
2023-11-19 13:49:59 -08:00
Dav999
f23ffc0457 Get rid of Game::savearea (std::string)
This is what got saved to the area part of the <summary> tags, and it
was specifically set upon pressing ACTION to save in the map menu.
Which meant tsave.vvv may not get an accurate area name (notably
"nowhere" if you hadn't quicksaved before in that session) even though
it's not displayed anywhere so it didn't really matter. But this
variable can be removed - there's only one place where <summary> is
written for both quicksaves and telesaves, so that now gets the area
at saving time.

Fun fact: custom level quicksaves also have a <summary> tag, and it's
even less functional than the one in tsave.vvv, because it stores
whatever main-game area name applies to your current coordinates.
So I simply filled in the level's name instead (just like what the
actual save box says).
2023-11-19 13:49:59 -08:00
Dav999
0ea41e7913 Replace std::string Game::telesummary and Game::quicksummary by Summary
Game::telesummary and Game::quicksummary stored the summary string for
the save files - which is the <summary> tag that says something like
"Space Station, 10:30:59". The game only ever displays the quicksave
variant of these two, for "Last Save:" on the map menu's SAVE tab.
So the telesave has a <summary> too, but it's never displayed anywhere.
(In fact, the area is often set to "nowhere"...)

However, the summary strings have another function: detect that both
the telesave and quicksave exist. If a summary string for a save is
empty, then that save is considered not to exist.

I'm refactoring the summary string system, by making the new variables
Game::last_telesave and Game::last_quicksave of type struct
Game::Summary. This struct should have all data necessary to display
the summary string at runtime, and thus translate it at runtime (so
we don't store a summary in a certain language and then display it in
the wrong font later - the summary can always be in the current
language). It also has an `exists` member, to replace the need to
check for empty strings.

The <summary> tag is now completely unused, but is still written to
for older versions of the game to read.

(This commit does not add the new string to the language files, since
Terry now added it separately in his own branch)
2023-11-19 13:49:59 -08:00
Dav999
64bad7d67f Remove double NULL check in loadthissummary() 2023-11-19 13:49:59 -08:00
Dav999
61adffe6eb Remove finalmode from struct Summary
It's unused (other than some map.finalmode assignments which should not
be there) and we don't need it either. If we do, we can always readd
it.
2023-11-19 13:49:59 -08:00
Dav999
50a560dc5f Change savex and savey in struct Summary to saverx and savery
This is a bit misleading otherwise, since it is the room coordinates,
not pixel coordinates.
2023-11-19 13:49:59 -08:00
Dav999
4e5126a596 Move struct Summary from Game.cpp to Game.h
This will allow it to be used in other source files in a later commit.
2023-11-19 13:49:59 -08:00
Dav999
89a165722e Simplify mapclass::currentarea()
It used to take a single int: the area number returned by
mapclass::area(roomx, roomy). All uses of currentarea() were called
with an extra area() call as its argument. Additionally, there's a
good reason why currentarea() should have the room coordinates: in one
of the cases that it's called, there's a special case for the ship's
coordinates. This results in the SAVE screen in the map menu being able
to show "The Ship", while the continue screen shows "Dimension VVVVVV"
instead. Therefore, why not put that exception inside currentarea()
instead, and remove a few callsite map.area() wrappers by making
currentarea() take the room x and y coordinates?
2023-11-19 13:49:59 -08:00
Dav999
73911a7ada Remove game.customquicksummary
It's completely unused (apart from the variable being set in one
place). So let's get this out of the way.
2023-11-19 13:49:59 -08:00
Misa
0a72cc6614 Android: Update README.md for Maven package
Since #1047 was merged, we now make the user build the SDL prefab
themselves (as SDL does not publish Maven packages yet). Here are some
instructions for doing that.
2023-11-14 17:29:34 -08:00
leo60228
ca71410f14 Use Android SDL2 via Maven 2023-11-14 17:18:08 -08:00
Dav999
1d3173f5c1 Fix %cs showing instead of commit date on Windows (or older git?)
Whenever I'd compile on Windows, I'd see the literal text "%cs" in the
main menu instead of the commit date. I never thought much of it (at
least it runs, and the date only shows up in development builds). Now
that I've also seen a screenshot from Terry with it, I decided to look
into it further. Looks like it's a format string that our gits on
Windows aren't recognizing for whatever reason - probably because
they're too old. I have git version 2.23.0.windows.1, and checking its
help page for `git log`, under PRETTY FORMATS, %cs is missing as an
option, while some other options are still there. So the option was
probably added sometime between that version and 2.34.1, which is the
one I have on Linux, where %cs does work.

Luckily, %cd with --date=short seems equivalent, and better supported,
so we can just use that instead.
2023-11-13 14:42:48 -08:00
Misa
1e5a737089 CMake: Silence deprecation warning
Recent versions of CMake emit the following:

    CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required):
      Compatibility with CMake < 3.5 will be removed from a future version of
      CMake.

      Update the VERSION argument <min> value or use a ...<max> suffix to tell
      CMake that the project does not need compatibility with older versions.

Reading the documentation further, adding a max refers to the max
version compatibility of CMake _policies_. Adding a max of 3.5 makes the
warning go away, so it seems that the warning is more about policies
than anything else.

This will still work on 2.8.12 as the extra dots will be seen as a
version component separator, ignoring the max version.
2023-10-31 22:36:11 -07:00
Dav999
b3810b686d Update README-translators.txt with info about sprites translation 2023-10-31 22:31:41 -07:00
Dav999
5c7be6c1de Add Dutch translated sprites
These should be pretty finalized, and serve as a demo for this PR.
2023-10-31 22:31:41 -07:00
Dav999
9045e26d3e Add support for translatable sprites
Language folders can now have a graphics folder, with these files:
- sprites.png and flipsprites.png: spritesheets which contain
  translated versions of the word enemies and checkpoints
- spritesmask.xml: an XML file containing all the sprites that should
  be copied from the translated sprites and flipsprites images to
  the original sprites/flipsprites.

This means that the translated spritesheets don't have to contain ALL
sprites - they only have to contain the translated ones. When loading
them, the game assembles a combined spritesheet with translated sprites
replacing English ones as needed, and this sheet is used to visually
substitute the normal sprites at rendering time.

It's important to note that even if 32x32 enemies have pixel-perfect
hitboxes, this is only a visual change. This has been discussed several
times on Discord - basically we don't want to give people unfair
advantages or disadvantages because of their language setting, or
change existing gameplay and speedruns tactics, which may depend on the
exact pixel arrangements of the enemies. Therefore, the hitboxes are
still based on the English sprites. This should be basically
unnoticeable for casual players, especially with some thought from
translators and artists, but there will be an option in the speedrunner
menu to display the original sprites all the time.

I removed the `VVV_freefunc(SDL_FreeSurface, *tilesheet)` in
make_array() in Graphics.cpp, which frees grphx.im_sprites_surf and
grphx.im_flipsprites_surf. Since GraphicsResources::destroy() already
frees these, it looks like the only purpose the one in make_array()
serves is to do it earlier. But now we need them again later (when
switching languages) so let's just not free them early.
2023-10-31 22:31:41 -07:00
Dav999
8ef000554d Add "English sprites" setting
It'll start working in the next commit... See the description there.

(This commit does not add the new strings to the language files, since
Terry now added them separately in his own branch)
2023-10-31 22:31:41 -07:00
Dav999
92f9940464 Update my GitHub username and Ved repo link
I recently changed my GitHub username from Dav999-v to Daaaav, and
today I moved the Ved repo from GitGud.io to GitHub. This commit
updates the references to both my username and the Ved repository.
2023-10-28 19:04:44 -07:00
Misa
ea1a014145 Fix memory leak with ApplyFilter
The intention of the recent refactor was to make it so that the
temporary surfaces would be allocated only once, when the mode is
enabled, and be freed upon exit.

To do this, Graphics.cpp owns the pointers, and passes them to
ApplyFilter to modify. Except ApplyFilter doesn't actually modify the
pointers, because it's only a single pointer, not a pointer-to-pointer.
So every frame of rendering it would actually be creating a new surface
and leaking memory.

To fix this, they need to be pointer-to-pointer variables that get
modified.

I also added error logs in case the surface creation failed.
2023-10-27 10:25:42 -07:00
Misa
791310fa5d Provide error code if SetConsoleOutputCP fails
According to the Win32 documentation, GetLastError provides extended
error information if SetConsoleOutputCP fails.
2023-10-25 17:21:11 -07:00
Dav999
98d1a38d7f Allow UTF-8 console output on Windows (for -console)
Right now, Windows assumes all our console output is code page ????.
That means our UTF-8 output appears mangled. (I ran into this while
testing IME text input by outputting strings to the console)

For a moment I was scared we'd need to do UTF-16 conversions and call
Windows-specific print functions like WriteConsoleW() in our vlog
functions, but fortunately SetConsoleOutputCP(CP_UTF8) works just fine.
2023-10-25 17:17:49 -07:00
Dav999
36dbb0f73a Show centiseconds for best time trial times (if available)
Since VVVVVV 2.3, time trial best times are stored not just with the
number of seconds, but also the number of frames. However, there was
no room to display it with the old design of the time trials screen.
Now there is, so it can easily be displayed now with a small change!

Unset frames are stored as -1, which fits perfectly into the frames
argument of help.format_time(), because in that case the amount of
centiseconds is not shown.

It should be noted that opening VVVVVV 2.2 will instantly wipe your
frames records, as described by #1030. But many people will likely
never open 2.2 anymore.
2023-10-25 17:06:50 -07:00
Misa
a46c817c69 Clarify references to Make and Play in README
Some people might be confused by the reference to M&P in the
instructions referring to downloading data.zip (#1026).

data.zip is the same between M&P and full versions of the game and is
orthogonal to which version of the game is built. Building M&P just
requires uncommenting `#define MAKEANDPLAY` in `MakeAndPlay.h`.

So clarify that you can grab data.zip from your existing copy of the
game, or from the Make and Play _page_ (not necessarily the Make and
Play edition of the game), and add instructions for building the M&P
version.

Closes #1027.
2023-10-25 16:47:25 -07:00
Misa
9a9fb5b237 Android: README: Fix swapped h1/h2 headers
The ones I meant to be h1 appeared as h2 and vice versa. Whoops.
2023-10-25 16:44:23 -07:00
Misa
75a693347b vlog: Slim SDL.h include down to SDL_log.h
The entirety of SDL doesn't need to be included, only the SDL_log header
does.
2023-10-25 15:48:04 -07:00
Misa
f83b63142d Android: Add README.md
This serves as a file to help others in building the C++ Android version
for themselves.

These instructions are what I figured out to get it to work for me, and
should be kept up to date.
2023-10-25 15:04:12 -07:00
leo60228
d6a43fad90 Fix compiler warnings on Android 2023-10-25 14:44:34 -07:00
leo60228
246a91c45e Use existing package name to allow updates 2023-10-25 14:44:34 -07:00
leo60228
e170d19e16 make more tasks depend on zipRepoAssets 2023-10-25 14:44:34 -07:00
leo60228
6d88f8b1d6 Ignore output-metadata.json 2023-10-25 14:44:34 -07:00
leo60228
dae5f7bbd7 Use adaptive icon (legacy was chosen by mistake) 2023-10-25 14:44:34 -07:00
leo60228
4512c13507 Fix release builds (Gradle why) 2023-10-25 14:44:34 -07:00
leo60228
2986dc01d9 Add DocumentsProvider 2023-10-25 14:44:34 -07:00
leo60228
9d1d994f57 Disable editor on Android (like Steam Deck) 2023-10-25 14:44:34 -07:00
leo60228
945823ca30 Build and mount repo.zip with fonts/ and lang/ 2023-10-25 14:44:34 -07:00
leo60228
3e0cf57a99 Address review 2023-10-25 14:44:34 -07:00
leo60228
f3f9d1b523 Enable ABI splits
This is somewhat convenient for development, as it means that Android
Studio will only do a native build for the architecture of the device
being used for testing.

This is ignored for AABs, so it won't affect release builds (at least
for Google Play).
2023-10-25 14:44:34 -07:00
leo60228
4229372c2e Android port 2023-10-25 14:44:34 -07:00
Dav999
1254209a22 Apply updates to Polish and Silesian room names 2023-10-11 15:55:36 -07:00
Dav999
e847fc2d43 Add missing string in Japanese 2023-10-02 19:03:39 -07:00
Dav999
08ff09005b Apply updates to Polish and Silesian 2023-09-30 16:48:35 -07:00
Dav999
122fb53574 Apply latest fixes to some Turkish strings
This fixes some translations that were too long for the newly
translated strings.
2023-09-29 10:08:51 -07:00
Dav999
2773dd3537 Improve some Dutch menu strings
I took a very critical look at all the menus, to make sure they're all
clear and easy to read. I mainly simplified some explanations and
solved some small issues.
2023-09-28 23:00:16 -07:00
Dav999
b5032ec0c1 Bring Catalan, Dutch and Esperanto language files 100% up-to-date again
Well, 100% up-to-date with current upstream at least, there's some more
strings to be added soon, including "{area}, {time}" from #1018, a new
menu option related to translatable graphics files, and definitely some
credits stuff.
2023-09-28 23:00:16 -07:00
Dav999
ed02cac3b4 Add Silesian language files
This is the last planned language for 2.4 I think!
2023-09-28 22:54:53 -07:00
Dav999
eeec428d0b Raise limits on three strings in translation files
These were causing false alarms in translations for one reason or
another (either to force translations to not wordwrap for style
reasons, or to stay on the safe side if an adjacent string was also
long), so they can be raised now.
2023-09-20 18:38:16 -07:00
Dav999
1c934688a3 Make "{n_crew|wordy} crewmates remain" string wordwrap
It used to have a limit of 40 8x8 characters, but there's room for it
to wrap.
2023-09-20 18:38:16 -07:00
Dav999
cbdf888a40 Sync new string from #1002 into languages added by #989
These PRs were open in parallel so this simply syncs the language files
back up.
2023-09-20 18:38:16 -07:00
Dav999
5e2e9e7ce8 Update French to near-latest strings (99.9%), fix issues 2023-09-20 16:54:43 -07:00
Dav999
fcf034583b Fix possible title screen from in-game if command-line playtesting
In 8484b36198, I fixed the title screen
showing up if you go to the language screen from in-game, while not
having any language files. There was also one other possible way to get
this to happen that I missed though: if you do have language files, and
you have not set your language yet, and you start a playtest via the
command line (e.g. by using Ved), and you then change the language
from the in-game options. That is now fixed.
2023-09-20 16:20:24 -07:00
Dav999
4ae6c77110 Prevent changing language if a textbox is displayed
I really thought I was going to need to block changing the language
in-game altogether, but activity zone prompts are now fixed and the
only obvious problem I can think of right now is having a dialogue
open, so I just disable the language option if a textbox is displayed.
(like how the map menu only has the save option if a script is running)
2023-09-20 16:20:24 -07:00
Dav999
700aa4aaa0 Make activity zone prompts loc::gettext'ed at display time
The translations for the prompts used to be looked up at creation time
(when the room is loaded or the activity zone is otherwise spawned),
which meant they would persist through changing the language while
in-game. This would look especially weird when the languages you switch
between use different fonts, as the prompt would show up in the old
language in the new language's font.

This problem is now fixed by letting the activity zone block keep
around the English prompt instead of the translated prompt, and letting
the prompt be translated at display time. This fixes a big part of the
reason I was going to disable changing the language while in-game; I
might only need to do it while textboxes are active now! :)
2023-09-20 16:20:24 -07:00
Dav999
fd84922a92 Add warning messages for missing fonts/lang folders
If someone makes a build of the game without copying the correct
folders, their version will have no translations, and display some text
wrong (like credits or button glyphs, or any custom levels that rely on
characters in the fonts being there). So I added a message in the
bottom left corner of the title screen to warn for that.
2023-09-20 16:20:24 -07:00
Dav999
da13f39f5d Fix "no language files found" title screen bug
If you've never set a language before (<lang_set> is not 1), then the
language screen will show up before the title screen. Selecting the
language will then make the title screen show up.

If no language files are present, the old logic for handling this was
to simply show the language screen at startup anyway, and let it
display the error message that language files are missing, as a warning
that the game is not packaged correctly. However, this logic has two
flaws:

- If the user has ever had language files and set a language before
  (in a VVVVVV on that computer), the warning element is gone because
  the language screen is not shown in that case - the game is simply in
  English

- If the user has never set a language before, and then goes to the
  language screen later via the menu, they will be sent to the title
  screen, even if they were in-game. The main menu will also be broken.

The new way is to not show the language screen at startup if language
files are missing, and to change the logic so that you will only be
sent to the title screen if you actually haven't seen the title screen
yet.

I will also add a proper warning that fonts or language files are
missing by adding a message in the bottom left corner (in place of the
MMMMMM installed message).
2023-09-20 16:20:24 -07:00
Dav999
365ac514a6 Sync Polish strings.xml, fix small space issue
strings.xml in Polish didn't yet contain the Steam Deck strings, and a
few limits changes.

Also, "Font: " was translated as "Czcionka:", missing the space. This
is fixed now.
2023-09-20 16:10:16 -07:00
Dav999
c04549541f Apply consistency fix to "FINAL LEVEL MASTERED" in Japanese 2023-09-20 15:58:38 -07:00
Dav999
683f66b4d1 Add Polish language files
One of the last languages for 2.4!
2023-09-20 15:40:50 -07:00
Dav999
b5d13d362f Add edits to Japanese translation by KabanFriends
Japanese is 100% complete now, woo!
2023-09-20 15:29:23 -07:00
Dav999
a78b248aaf Update Turkish translation to near-latest strings (99.9%) 2023-09-20 15:29:23 -07:00
Dav999
74a94ae1a8 Reference both cases for "Complete the game" in code
We had two separate cases for translators for this string (a
"TO UNLOCK:" one and a secret lab trophy one) but I forgot to use
the latter in the code, so both places in the game were using the
former. This is now fixed.
2023-09-20 15:29:23 -07:00
Dav999
f240fc517b Update Italian translation to near-latest strings (99.9%) 2023-09-20 15:29:23 -07:00
Dav999
afc2e72897 Update European Portuguese to near-latest strings (99.9%), fix issues
Also, bumped the limit for "Font: " from 14 to 15, the Portuguese
translation is 15 characters and it just fits...
2023-09-20 15:29:23 -07:00
Dav999
4c4a745c56 Update Ukrainian translation to near-latest strings (99.9%) 2023-09-20 15:29:23 -07:00
Dav999
ce8fdc3bbb Update Esperanto language files 2023-09-20 15:29:23 -07:00
Dav999
adf56bdb93 Update Esperanto and Dutch translations to latest strings (100%)
This includes the Steam Deck editor strings.
2023-09-20 15:29:23 -07:00
Dav999
83eaba5436 Add Traditional Chinese language files
And another new language!

This uses the same font as Simplified Chinese. As such, I changed the
displayed name of the font (in the level editor) from 简体中文 to 中文.
2023-09-20 15:29:23 -07:00
Dav999
52b5b47964 Update Brazilian Portuguese translation to near-latest strings (99.9%) 2023-09-20 15:29:23 -07:00
Dav999
1fd37c3276 Add Japanese language files
Another new language! And this is a very interesting one, since it's
based on Nicalis' translation for 3DS and Switch (with their go-ahead).
Which means I had to convert between two completely different
language file formats, which was some work, but it's totally worth it!

Naturally, there are a lot of missing strings, so a translator will
still need to fill in all the blanks (and maintain the translation for
new strings of course)
2023-09-20 15:29:23 -07:00
Dav999
fb0bae7293 Apply Japanese font edits by KabanFriends
- shifted certain "small" variants of katakanas by 1px (ェ, ュ)
- made the ツ and ヅ 1px taller
2023-09-20 15:29:23 -07:00
Dav999
b2b1e47e72 Add Japanese font (8x12)
The next commit will be the initial commit adding the Japanese
translation, so here's the font!

Specifically, it's k8x12L (2021-05-05), and it can be downloaded (in
non-VVVVVV format) from https://littlelimit.net/k8x12.htm
2023-09-20 15:29:23 -07:00
Dav999
c573eb4866 Update Welsh translation to near-latest strings (99.9%), fix issues 2023-09-20 15:29:23 -07:00
Dav999
63a1380595 Update Spanish to near-latest strings (99.9%), fix activity zones 2023-09-20 15:29:23 -07:00
Dav999
711b2e1bb5 Update Russian translation to near-latest strings (99.9%)
Also, the song names are now subtitled.
2023-09-20 15:29:23 -07:00
Dav999
b45d0d8d9d Update German translation to near-latest strings (99.9%), fix issues 2023-09-20 15:29:23 -07:00
Dav999
a200a762c3 Add Korean language files
New language! This uses the 10x10 font added in the previous commit.

This has some minor changes from the delivered version:
- Synced language files, and thus added max_local attributes
- Removed leftover Catalan strings in strings_plural (and reduced to
  just one form)
- Aligned terminal_finallevel
2023-09-20 15:29:23 -07:00
Dav999
68fd718ef8 Add Korean font (10x10)
The Korean localization has been delivered (next commit), so this
commit adds the font for it! The chosen font is Galmuri 9 (specifically
GalmuriMono9, version v2.38.7). It's licensed OFL, and since I had to
convert it to VVVVVV's bespoke font format and shift characters around,
I think we are now bundling a Modified Version of the font, and it has
to use the same license. Including it as font_ko_license.txt and
clearly indicating that the copyright came from the Original Version
should be more than enough.

This version is a bit more polished than the placeholder one posted on
Discord, namely (non-CJK) characters were shifted to fit into their
10x10 bounds as much as possible, and notably the , and . characters
were shifted 2 pixels to the right.
2023-09-20 15:29:23 -07:00
Dav999
5c05c1af48 Sync language files
This adds the following new strings from #993:
- The level editor is not currently supported on Steam Deck, as it
  requires a keyboard and mouse to use.
- The level editor is not currently supported on this device, as it
  requires a keyboard and mouse to use.

Unfortunately this means most languages won't be quite 100% anymore
for a bit, and updates come in which don't have this string yet.
But at least we can track it really well. In the next couple of
commits, when a language is updated with all new strings except for
these, I'll call them 99.9% instead of 100% (I did not get an actual
percentage).
2023-09-20 15:29:23 -07:00
Dav999
d741b3aa27 Fix double return when pressing Esc in editor font menu
The line that checked if the current menu is the font menu ended up
below the code that returned a menu, so this was an easy fix.

Closes #1017.
2023-09-13 23:58:34 -07:00
AllyTally
3f69b64a09 Fix yellow lab autotiling
A few autotile entries were missing.
2023-09-09 23:04:47 -07:00
Misa
8de93cb0f4 Axe VSync hint in favor of SDL_RenderSetVSync
Originally, we were using just the hint, but this didn't work well for
toggling VSync (see #831). Then I added SDL_RenderSetVSync to SDL, and
used that instead for toggling, but we were still setting the hint on
game startup.

Now, to keep things consistent, and just to make sure we don't get any
surprising behavior should things change in the future, this makes it so
game startup uses SDL_RenderSetVSync too.
2023-09-09 20:07:55 -07:00
Misa
1bf0d11c9e Fix regression: Linear filter persistence
This fixes #1013 by axing the use of SDL_HINT_RENDER_SCALE_QUALITY and
instead using SDL_SetTextureScaleMode.

The hint is unwieldy to use, and since #923, has resulted in a
regression where starting the game in filtered mode then switching to
nearest results in scaled textures still being filtered.

The proper solution is to use SDL_SetTextureScaleMode on the two
textures that are drawn to the final screen: gameTexture and
tempShakeTexture.
2023-09-09 20:07:49 -07:00
Misa
5467dbe3d8 Remove trailing whitespace in textboxcommsrelay 2023-09-09 19:59:36 -07:00
Ally
811d2bdcf6 Re-add fixed bool
Co-authored-by: Misa Elizabeth Kai <infoteddy@infoteddy.info>
2023-09-09 19:19:57 -07:00
Ally
a72966426b Apply review suggestion from InfoTeddy
Co-authored-by: Misa Elizabeth Kai <infoteddy@infoteddy.info>
2023-09-09 19:19:57 -07:00
AllyTally
bcc302bcc2 Fix bug with destroy(moving)/destroy(disappear)
This commit fixes an obscure bug with `destroy(moving)` and
`destroy(disappear)` where, when looping through entities, the code
doesn't actually check what the entity is before trying to destroy the
block underneath it.

To fix this, we just put the block-destroying code *inside* of the
check, instead of being outside of it.

I also fixed the code style because it was horrible.
2023-09-09 19:19:57 -07:00
AllyTally
5b2fbeb6b4 Fix gravity line edgeguides 2023-09-09 16:34:26 -07:00
Dav999
d84ce6b2e8 Add limits check to roomnames and roomnames_special
I kinda forgot about these, but they should be checked.
2023-09-09 16:29:38 -07:00
Ethan Lee
c881f621a3 Handle WiiU/Switch GameCube adapter product ID 2023-09-06 09:56:49 -04:00
Dav999
135934289e Fix setfont() changing font of fading out text boxes
Closes #925.

My fix here is to delay the font change until all fading-out textboxes
have disappeared. See it as adding a sort of `untilbars` or `untilfade`
for text box fadeout, into setfont.

This doesn't prevent every possible way to change the font of an
existing textbox, but you would need to use internal scripting to still
do it (and basically be doing it on purpose) - the problem in
simplified scripting when you simply do textbox-setfont-textbox is
gone.
2023-08-30 16:19:25 -07:00
Ethan Lee
68b6bd07ba Add 8BitDo wireless Xbox product ID to detector 2023-08-28 11:25:17 -04:00
Dav999
4e7bf86722 Change editor unsupported message to only appear when editor is selected
Showing the option on the "play a level" option feels to me as though
inexperienced players would think they're not supposed to open the
player levels, because the message says editor levels are unsupported,
right? But the message is only referring to the level editor, so in my
opinion, it's clearer to only show it there.
2023-08-26 22:53:46 -07:00
AllyTally
6549dc0113 Change lab autotiling 2023-08-25 09:55:17 -07:00
AllyTally
03ee60aea6 Update editor_disabled more often, remove -enable-editor 2023-08-25 09:50:27 -07:00
AllyTally
3ca28a5944 Add check for keyboard_is_active 2023-08-25 09:50:27 -07:00
AllyTally
7f03b00635 Remove unused Unused.h includes 2023-08-25 09:50:27 -07:00
AllyTally
8f3c587f7a Replace no level editor string 2023-08-25 09:50:27 -07:00
AllyTally
4830a6e8c1 Re-add accidentally removed address lines 2023-08-25 09:50:27 -07:00
AllyTally
c4db7ca51a Check SteamDeck in keyboard_is_available 2023-08-25 09:50:27 -07:00
AllyTally
a537492d9c Remove NO_EDITOR/NO_CUSTOM_LEVELS, disable editor on Steam Deck
This commit removes the `NO_EDITOR` and `NO_CUSTOM_LEVELS` defines,
which cleans up the code a lot, and they weren't really needed anyways.

This commit also disables the editor on the Steam Deck, and adds a
program argument to re-enable the editor, `-enable-editor`.
2023-08-25 09:50:27 -07:00
Misa
880c7ad8e6 Re-add main menu credits button in M&P
For some reason, the credits button was always specifically removed from
M&P builds. After some discussion with Terry Cavanagh on the VVVVVV
Discord server, we agreed that there was no reason this should be
removed. So, it's getting put back in.
2023-08-24 08:43:04 -07:00
Ethan Lee
c44e8d056a Fix glyphs for 8BitDo Ultimate Wired Controller for Xbox 2023-08-24 09:58:22 -04:00
AllyTally
c3b0a60aa4 Only spawn activity zone if the script exists 2023-08-23 20:16:52 -07:00
AllyTally
02ace10df9 options to spawn entity 21, and no activity zone 2023-08-23 20:16:52 -07:00
AllyTally
b7da899674 Fix UB where image loading fails in certain cases 2023-08-23 17:54:21 -07:00