1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-28 15:38:30 +02:00
Go to file
Misa de00dd4031 Save special text box state using functions
This adds a way to save the text box state of the crew remaining, ACTION
prompt, etc. text boxes by just letting there be a function that is
called to retranslate the text box when needed.

It also adds a way to ignore translating a text box and to leave it
alone, in case there's actually no text in the text box, which is the
case with Level Complete and Game Complete.

Both ways are now in an enum, TextboxTranslate. The former is
TEXTTRANSLATE_FUNCTION and the latter is TEXTTRANSLATE_NONE. The
existing way of translating text boxes became TEXTTRANSLATE_CUTSCENE,
since it's only used for cutscene scripts.

Here's a quick guide to the three ways of creating a text box now.

- TEXTTRANSLATE_NONE: You must call
  graphics.textboxoriginalcontextauto() to save the existing text to the
  original context of the text box, as that will be copied back to the
  text box after the text of the text box is updated due to not having a
  translation.
- TEXTTRANSLATE_CUTSCENE: Translates the text from cutscenes.xml, and
  overrides the spacing (padding and text centering). Shouldn't need to
  be used outside of scriptclass.
- TEXTTRANSLATE_FUNCTION: You must pass in a function that takes in a
  single parameter, a pointer to the textboxclass object to be modified.
  General advice when retranslating text is to clear the `lines` vector
  and then push_back the retranslated text. The function is also solely
  responsible for spacing.

In most cases, you will also need to call
graphics.textboxapplyposition() or graphics.textboxadjust() afterwards.
(Some text boxes shouldn't use graphics.textboxadjust() as they are
within the 10-pixel inner border around the screen that
textboxclass::adjust tries to push the text box out of.)

This commit doesn't fix every text box just yet, though. But it fixes
the Level Complete, Game Complete, crew remaining, and ACTION prompt
text boxes, for a start.
2024-02-02 18:57:24 -08:00
.github CI: Replace -o with -OutFile, works around Invoke-WebRequest regression 2024-01-31 18:19:22 -05:00
desktop_version Save special text box state using functions 2024-02-02 18:57:24 -08:00
mobile_version Update readme.MD 2024-01-02 22:27:05 +01:00
third_party Update to latest FAudio 2024-02-01 11:08:02 -05:00
tools Update readme.MD 2024-01-02 22:27:05 +01:00
.gitattributes fix actionscript misclassified as angelscript 2020-01-12 15:18:45 -05:00
.gitmodules Add SheenBidi submodule 2024-01-08 19:17:44 -08:00
License exceptions.md Added link to Wii port github in license exceptions 2024-02-01 18:23:30 +01:00
LICENSE.md Update LICENSE.md 2024-01-02 22:27:05 +01:00
logo.gif Update logo.gif 2024-01-02 22:27:05 +01:00
README.md Added a link in the readme directly to the desktop_version folder 2024-01-02 22:27:05 +01:00

logo

This is the source code to VVVVVV, the 2010 indie game by Terry Cavanagh, with music by Magnus Pålsson. You can read the announcement of the source code release on Terry's blog!

The source code for the desktop version is in this folder.

VVVVVV is still commerically available at thelettervsixtim.es if you'd like to support it, but you are completely free to compile the game for your own personal use. If you're interested in distributing a compiled version of the game, see LICENSE.md for more information.

Discussion about VVVVVV updates mainly happens on the "unofficial" VVVVVV discord, in the vvvvvv-code channel.

Credits