Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sprite textboxes #987

Merged
merged 3 commits into from
Nov 19, 2023
Merged

Conversation

AllyTally
Copy link
Contributor

@AllyTally AllyTally commented Aug 11, 2023

Changes:

This commit adds a system for displaying sprites in textboxes, which replaces the hardcoded system in the main game.

This also adds a couple new commands to go along with it.

  • textsprite(x,y,sprite,color) adds sprites to the textbox you're currently constructing. The coordinates are relative to the textbox.
  • textimage(levelcomplete/gamecomplete) displays levelcomplete.png or gamecomplete.png and their flip mode variants (or text due to translation)

Legal Stuff:

By submitting this pull request, I confirm that...

  • My changes may be used in a future commercial release of VVVVVV
  • I will be credited in a CONTRIBUTORS file and the "GitHub Friends"
    section of the credits for all of said releases, but will NOT be compensated
    for these changes

@InfoTeddy InfoTeddy self-assigned this Aug 11, 2023
@InfoTeddy
Copy link
Collaborator

Conflicts need to be resolved.

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.
Copy link
Collaborator

@InfoTeddy InfoTeddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please undo the change to c-hashmap.

@AllyTally AllyTally force-pushed the sprite-textboxes branch 2 times, most recently from cc941da to 9f3d737 Compare August 13, 2023 17:09
This commit adjusts the Y position for flip-mode, and makes the main
game use this new system.
@InfoTeddy
Copy link
Collaborator

Retagged as required at the request of Ally because we don't want to support off-by-one colors for custom levels into the future.

`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.
@InfoTeddy InfoTeddy merged commit 103b4d3 into TerryCavanagh:master Nov 19, 2023
4 checks passed
@AllyTally AllyTally deleted the sprite-textboxes branch November 19, 2023 23:10
Daaaav added a commit to Daaaav/VVVVVV that referenced this pull request Nov 27, 2023
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, TerryCavanagh#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.
InfoTeddy pushed a commit that referenced this pull request Nov 27, 2023
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants