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

2282 Commits

Author SHA1 Message Date
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
AllyTally
4148234225 Change if to elseif and remove return 2023-08-23 09:23:10 -07:00
AllyTally
a8bf43adcc Recache textures when returning to ingame from map
Fixes #977.
2023-08-23 09:23:10 -07:00
AllyTally
6952c58878 Fix texture cache missing in certain situations after resizing the window 2023-08-23 09:23:10 -07:00
Ethan Lee
7b40a052ed Controller layout detection 2023-08-22 15:34:03 -04:00
Misa
8e3e29a14c Generalize stretch mode mouse scaling fix
This puts the code to fix mouse coordinates in stretch mode directly
inside KeyPoll::Poll, preventing the need for any other instances of
mouse coordinate usage to copy-paste code.
2023-08-17 19:57:54 -07:00
Dav999
6fd0b19175 Fix "+1 Rank!" possibly overlapping with time trial time in CJK font
If this text on the time trial results screen would overlap with the
time value, all rank labels will be displayed on the header line
instead ("TIME TAKEN:" etc). This works because the overlap with the
time most likely only happens with CJK fonts (where the time will be
very wide because of the font size) while strings like "TIME TAKEN"
take up very little space due to only needing 4 characters or so for
the same information.
2023-08-12 15:52:58 -07:00
Dav999
b9ef6bfc2f Fix iflang, loadtext and setfont not working with uppercase
For example, pt_PT/pt_BR needs to work as well, and now it does.
2023-08-12 15:52:58 -07:00
Dav999
3d7e9a47dd Fix various CJK positioning problems
- ERROR/WARNING screen title was overlapping with message
- Crewmate screen names and rescued statuses were overlapping with each
  other
- Textboxes on Level Complete screen were overlapping with each other
  and the crewmate was not vertically centered in the box
- Some strings were running into each other in flip mode, instead of
  being moved out of each other (PR_CJK_HIGH and PR_CJK_LOW worked the
  wrong way around because of FLIP macros being applied to Y coords)
- In-game esc menu was "bouncy" with selected menu options because of a
  hardcoded 16 pixel offset
- Bindings in the gamepad menu were overlapping with each other
- Some Super Gravitron "Best Time" labels and values were a little too
  close
2023-08-12 15:52:58 -07:00
Dav999
b8dc4a0103 Accommodate for some limit breaks in Welsh
Two changes:
- The labels on the Game Complete! screen for number of trinkets/deaths
  /time etc have been moved two pixels to the right, and had their
  limits increased by 1 character
- The inaccuate limit for "quit to main menu" has been increased
2023-07-01 20:08:26 -07:00
AllyTally
fd4232e9fd Make gravity lines render when screen effects are off 2023-06-15 10:44:40 -07:00
Misa
c1a25aa4c2 CLI: Allow no music to be played if save pos used
If you provided any one of -playx, -playy, -playrx, -playry, -playgc, or
-playmusic in command-line arguments for command-line playtesting, then
the game would always try to play music, even if you passed a negative
-playmusic. This wouldn't do anything in that case, unless you had
MMMMMM installed, in which case it would play MMMMMM track 15
(Predestined Fate Final Level) due to the legacy wraparound bug.

To fix this, only play music if the track provided is greater than -1.
Additionally, to prevent it from playing Path Complete by default if you
specify any of the other save position arguments but n ot -playmusic,
it's now initialized to -1 instead of 0.
2023-06-10 11:41:32 -07:00
AllyTally
a6ff75d32e Remove unused drawing overloads 2023-06-08 15:47:39 -07:00
AllyTally
254c46b846 Fix missing parentheses 2023-06-08 15:47:39 -07:00
AllyTally
aa8e731eb9 Fix a couple issues 2023-06-08 15:47:39 -07:00
AllyTally
b533731108 More misc cleanup 2023-06-08 15:47:39 -07:00
AllyTally
8b1dcecd5a Replace drawrect with draw_rect
Turns out `graphics.drawrect` exists. Well, not anymore!
This was another function from before the renderer rewrite which tried
to draw a rectangle by using four filled rectangles. We can draw
outline rectangles properly now, so let's make sure everywhere does it!
2023-06-08 15:47:39 -07:00
AllyTally
d1b9f4f410 Some formatting fixes 2023-06-08 15:47:39 -07:00
AllyTally
d93d773a8a Remove line_rect and prect
`prect` just wasn't needed as it was used in one place, and
`line_rect` isn't used anymore.
2023-06-08 15:47:39 -07:00
AllyTally
81ad7ed9d6 Clean up background drawing code
As #974 states, the lab background only ever uses the first generated
value from `backboxint`, so let's change it to a normal variable
instead of an array. Also, stars don't need their width/height set to
2 constantly... they never change in the first place, Terry!
2023-06-08 15:47:39 -07:00
AllyTally
5089bc373e Add more draw functions, make less code use rectangles
Some code still used rectangles to draw things like lines and pixels,
so this commit adds more draw functions to support drawing lines and
pixels without directly using the renderer.

Aside from making generated minimaps draw points instead of 1x1
rectangles, this commit also batches the point drawing for an
additional speed increase.
2023-06-08 15:47:39 -07:00
Misa
dc9c51dbf3 Implement haltedsong
This fixes a bug where if a track was resumed, pausing it by unfocusing
the window (if enabled, of course) would not resume it after refocusing
the window.

This happens because resuming the music doesn't change currentsong back
from -1, and the window refocusing code checks that currentsong isn't -1
before resuming music.

haltedsong is only used when resuming music. It is set back to -1 when
resuming music or when playing a new track.
2023-06-08 15:38:26 -07:00
AllyTally
e36c2764fb Add separate tilecol max for direct mode
This commit readds the ability to select the rainbow BG in lab tileset
in direct mode.
2023-06-06 21:46:19 -07:00
AllyTally
17e0d6c330 Don't trigger UB with autotile type none 2023-06-06 21:46:19 -07:00