1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-25 05:58:30 +02:00
VVVVVV/desktop_version/src
Misa 79a54f23e6 De-dupe screen transition / warping logic
I noticed that the code for going to the adjacent room when offscreen
and for warping instead if the room is warping was a bit
copy-and-pasted. To clean up the code a bit, there's now 5 separate
checks in gamelogic():

if (map.warpx)
if (map.warpy)
if (map.warpy && !map.warpx)
if (!map.warpy)
if (!map.warpx)

I made sure to preserve the previous weird horizontal warping behavior
that happens with vertical warping (thus the middle one), and to
preserve the frame ordering just in case there's something dependent on
the frame ordering.

The frame ordering is that first it will warp you horizontally, if
applicable, then it will warp you vertically, if applicable. Then if you
have vertical warping only, that weird horizontal warp. Then it will
screen transition you vertically, if applicable. Then it will screen
transition you horizontally, if applicable.

To explain the weird horizontal warp with the vertical warp: apparently
if an entity is far offscreen enough, and if that entity is not the
player, it will be warped horizontally during a vertical warp. The
points at which it will warp is 30 pixels farther out than normal
horizontal warping.

I think someone ran into this before, but my memory is fuzzy. The best I
can recall is that they were probably createentity()ing a high-speed
horizontally-moving enemy in a vertically warping room, only to discover
that said enemy kept warping horizontally.
2020-04-04 16:26:15 -04:00
..
BinaryBlob.cpp Fix warnings raised by GCC 8 2020-01-11 08:53:32 -05:00
BinaryBlob.h Hello WWWWWWorld! 2020-01-08 10:37:50 -05:00
BlockV.cpp Remove blockclass::clear(), simplify blockclass initializations 2020-04-03 23:28:47 -04:00
BlockV.h Remove blockclass::clear(), simplify blockclass initializations 2020-04-03 23:28:47 -04:00
editor.cpp Remove duplicate function musicclass::stopmusic() 2020-04-03 19:19:45 -04:00
editor.h Remove semi-useless function editorclass::weirdloadthing() 2020-04-03 10:40:50 -04:00
Ent.cpp Remove entclass::clear(), simplify entclass initializations 2020-04-03 23:28:47 -04:00
Ent.h Remove entclass::clear(), simplify entclass initializations 2020-04-03 23:28:47 -04:00
Entity.cpp Fix nested if-statements relating to blocks in Entity.cpp 2020-04-03 23:28:47 -04:00
Entity.h Refactor blocks to not use the 'active' system 2020-04-03 23:28:47 -04:00
Enums.h Hello WWWWWWorld! 2020-01-08 10:37:50 -05:00
FileSystemUtils.cpp Add -basedir option to specify base user directory (#154) 2020-02-08 18:49:03 -05:00
FileSystemUtils.h Add -basedir option to specify base user directory (#154) 2020-02-08 18:49:03 -05:00
Finalclass.cpp Change all UtilityClass::something to help.something 2020-04-03 10:40:50 -04:00
Finalclass.h Remove global args from main game loadlevel() functions 2020-04-03 10:40:50 -04:00
Game.cpp Refactor entities and linecrosskludge to not use the 'active' system 2020-04-03 23:28:47 -04:00
Game.h Remove remnants of screen recording stuff 2020-04-03 10:40:50 -04:00
GOGNetwork.c Add support for multiple Network backends, stub in GOGNetwork 2020-01-13 11:15:22 -05:00
Graphics.cpp Refactor text box contents to not use a separate length-tracker 2020-04-03 23:28:47 -04:00
Graphics.h Refactor text boxes to not use the 'active' system 2020-04-03 23:28:47 -04:00
GraphicsResources.cpp Allow using help/graphics/music/game/key/map/obj everywhere 2020-01-29 07:58:23 -05:00
GraphicsResources.h Allow using help/graphics/music/game/key/map/obj everywhere 2020-01-29 07:58:23 -05:00
GraphicsUtil.cpp Fix mixed indentation in GraphicsUtil.cpp 2020-04-03 10:40:50 -04:00
GraphicsUtil.h Hello WWWWWWorld! 2020-01-08 10:37:50 -05:00
Input.cpp Fix mixed indentation in Enter-handling code when playtesting 2020-04-03 23:28:47 -04:00
Input.h Remove global args from Input.cpp 2020-04-03 10:40:50 -04:00
KeyPoll.cpp Make the toggle fullscreen conditional more readable 2020-03-12 21:20:25 -04:00
KeyPoll.h Allow using help/graphics/music/game/key/map/obj everywhere 2020-01-29 07:58:23 -05:00
Labclass.cpp Remove game.test and game.teststring 2020-04-03 10:40:50 -04:00
Labclass.h Remove global args from main game loadlevel() functions 2020-04-03 10:40:50 -04:00
Logic.cpp De-dupe screen transition / warping logic 2020-04-04 16:26:15 -04:00
Logic.h Remove global args from Logic.cpp 2020-04-03 10:40:50 -04:00
main.cpp Rename titlerender.cpp to Render.cpp 2020-04-04 02:05:41 -04:00
MakeAndPlay.h Re-comment out #define MAKEANDPLAY 2020-02-09 10:42:03 -05:00
Map.cpp Remove entityclass::cleanup() 2020-04-03 23:28:47 -04:00
Map.h Fix mixed indentation in Map.h and Map.cpp 2020-04-03 10:40:50 -04:00
Maths.h Hello WWWWWWorld! 2020-01-08 10:37:50 -05:00
Music.cpp Remove duplicate function musicclass::stopmusic() 2020-04-03 19:19:45 -04:00
Music.h Remove duplicate function musicclass::stopmusic() 2020-04-03 19:19:45 -04:00
Network.c int32_t > int 2020-01-13 11:27:16 -05:00
Network.h Add support for multiple Network backends, stub in GOGNetwork 2020-01-13 11:15:22 -05:00
Otherlevel.cpp Remove global args from main game loadlevel() functions 2020-04-03 10:40:50 -04:00
Otherlevel.h Remove global args from main game loadlevel() functions 2020-04-03 10:40:50 -04:00
preloader.cpp Remove outdated comments from preloader.cpp 2020-04-03 10:40:50 -04:00
preloader.h Remove global args from preloader.cpp 2020-04-03 10:40:50 -04:00
Render.cpp Rename titlerender.cpp to Render.cpp 2020-04-04 02:05:41 -04:00
Render.h Rename titlerender.cpp to Render.cpp 2020-04-04 02:05:41 -04:00
Screen.cpp Remove unused variable Screen::glScreen 2020-04-03 10:40:50 -04:00
Screen.h Remove unused variable Screen::glScreen 2020-04-03 10:40:50 -04:00
Script.cpp Refactor scriptclass txt to not use a separate length-tracker 2020-04-03 23:28:47 -04:00
Script.h Refactor scriptclass txt to not use a separate length-tracker 2020-04-03 23:28:47 -04:00
Scripts.cpp Fix mixed indentation in Scripts.cpp 2020-04-03 10:40:50 -04:00
SoundSystem.cpp add myself to the contributors file, fix formatting 2020-01-10 15:07:29 -07:00
SoundSystem.h Hello WWWWWWorld! 2020-01-08 10:37:50 -05:00
Spacestation2.cpp Change all UtilityClass::something to help.something 2020-04-03 10:40:50 -04:00
Spacestation2.h Remove global args from main game loadlevel() functions 2020-04-03 10:40:50 -04:00
SteamNetwork.c Untested Haiku port? 2020-01-13 23:31:14 -05:00
TerminalScripts.cpp Remove usages of second argument of playef() script command 2020-04-03 10:40:50 -04:00
Textbox.cpp Remove textboxclass's firstcreate and clear, simplify initializations 2020-04-03 23:28:47 -04:00
Textbox.h Remove textboxclass's firstcreate and clear, simplify initializations 2020-04-03 23:28:47 -04:00
Tower.cpp Initialize level data with 0s in M&P 2020-02-08 23:54:20 -05:00
Tower.h Hello WWWWWWorld! 2020-01-08 10:37:50 -05:00
UtilityClass.cpp Move tempstring off of Graphics, Game, and UtilityClass 2020-04-03 10:40:50 -04:00
UtilityClass.h Move tempstring off of Graphics, Game, and UtilityClass 2020-04-03 10:40:50 -04:00
WarpClass.cpp Refactor entities and linecrosskludge to not use the 'active' system 2020-04-03 23:28:47 -04:00
WarpClass.h Remove global args from main game loadlevel() functions 2020-04-03 10:40:50 -04:00