1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-26 06:28:30 +02:00
VVVVVV/desktop_version/src
Misa 571ad1f7d8 Move all temporary variables off of entityclass
This is a refactor that simply moves all temporary variables off of
entityclass, and makes it so they are no longer global variables. This
makes the resulting code easier to understand as it is less entangled
with global state.

These attributes were:
 - colpoint1
 - colpoint2
 - tempx
 - tempy
 - tempw
 - temph
 - temp
 - temp2
 - tpx1
 - tpy1
 - tpx2
 - tpy2
 - temprect
 - temprect2
 - x (actually unused)
 - dx
 - dy
 - dr
 - px
 - py
 - linetemp
 - activetrigger
 - skipblocks
 - skipdirblocks

Most of these attributes were assigned before any of the times they were
used, so it's easy to prove that ungloballing them won't change any
behaviors. However, dx, dy, dr, and skipblocks are a bit more tricky to
analyze. They relate to blocks, with dx, dy, and dr more specifically
relating to one-way tiles. So after some testing with the quirks of
one-way tiles, it seems that the jankiness of one-way tiles haven't
changed at all, either.

Unfortunately, the attribute k is clearly used without being assigned
beforehand, so I can't move it off of entityclass. It's the same story
with the attribute k that Graphics has, too.
2020-09-27 19:08:37 -04:00
..
BinaryBlob.cpp Use SDL stdlib funcs for free/malloc/strcmp 2020-08-14 09:51:19 -04:00
BinaryBlob.h Check index of tracks in musicclass::init() 2020-08-14 09:51:19 -04:00
BlockV.cpp Remove unnecessary string initializations from constructors 2020-07-08 19:14:21 -04:00
BlockV.h Consistently use angle brackets for SDL.h includes 2020-07-19 21:37:40 -04:00
Credits.h Fix entities in the Warp Zone's gray tileset not being gray in the editor (#480) 2020-09-25 13:35:03 -04:00
editor.cpp Prevent typing pipes in the script editor 2020-09-27 18:45:02 -04:00
editor.h Axe manual state trackers and use SDL_IsTextInputActive() 2020-08-13 17:51:38 -04:00
Ent.cpp Remove unnecessary includes from header files 2020-07-19 21:37:40 -04:00
Ent.h Remove unnecessary includes from header files 2020-07-19 21:37:40 -04:00
Entity.cpp Move all temporary variables off of entityclass 2020-09-27 19:08:37 -04:00
Entity.h Move all temporary variables off of entityclass 2020-09-27 19:08:37 -04:00
Enums.h Hello WWWWWWorld! 2020-01-08 10:37:50 -05:00
FileSystemUtils.cpp Fix other array decay too 2020-08-09 13:39:12 -04:00
FileSystemUtils.h Only re-color one-ways if assets are not mounted 2020-06-30 18:06:14 -04:00
Finalclass.cpp Separate includes into sections and alphabetize them 2020-07-19 21:37:40 -04:00
Finalclass.h Remove unnecessary includes from header files 2020-07-19 21:37:40 -04:00
Game.cpp Fix unwinnable save from rescuing Violet out of order 2020-09-25 14:02:09 -04:00
Game.h De-duplicate reading/writing main game telesave/quicksave 2020-09-25 13:32:41 -04:00
GOGNetwork.c Ifdef out network code for M&P 2020-08-02 23:43:55 -04:00
Graphics.cpp Fix brace style in Graphics::Makebfont() and Graphics::bfontlen() 2020-09-25 16:33:54 -04:00
Graphics.h Remove allowspecial, replace with opaqueness check 2020-08-06 22:12:15 -04:00
GraphicsResources.cpp Separate includes into sections and alphabetize them 2020-07-19 21:37:40 -04:00
GraphicsResources.h Consistently use angle brackets for SDL.h includes 2020-07-19 21:37:40 -04:00
GraphicsUtil.cpp Don't hardcode SDL_CreateRGBSurface BitsPerPixel/mask args 2020-09-08 16:16:40 -04:00
GraphicsUtil.h Axe endian_swap() function and template 2020-09-08 16:16:40 -04:00
Input.cpp Use explicit INBOUNDS_VEC() instead of checking sentinel -1 2020-09-25 13:51:47 -04:00
Input.h Remove unnecessary includes from header files 2020-07-19 21:37:40 -04:00
KeyPoll.cpp Axe manual state trackers and use SDL_IsTextInputActive() 2020-08-13 17:51:38 -04:00
KeyPoll.h Axe manual state trackers and use SDL_IsTextInputActive() 2020-08-13 17:51:38 -04:00
Labclass.cpp Separate includes into sections and alphabetize them 2020-07-19 21:37:40 -04:00
Labclass.h Remove unnecessary includes from header files 2020-07-19 21:37:40 -04:00
Logic.cpp Move all temporary variables off of entityclass 2020-09-27 19:08:37 -04:00
Logic.h Remove unnecessary includes from header files 2020-07-19 21:37:40 -04:00
main.cpp Axe manual state trackers and use SDL_IsTextInputActive() 2020-08-13 17:51:38 -04:00
MakeAndPlay.h Re-comment out #define MAKEANDPLAY 2020-02-09 10:42:03 -05:00
Map.cpp Move all temporary variables off of entityclass 2020-09-27 19:08:37 -04:00
Map.h Separate includes into sections and alphabetize them 2020-07-19 21:37:40 -04:00
Maths.h Hello WWWWWWorld! 2020-01-08 10:37:50 -05:00
Music.cpp Don't manually write out INBOUNDS_VEC() checks 2020-09-25 13:51:47 -04:00
Music.h Separate includes into sections and alphabetize them 2020-07-19 21:37:40 -04:00
Network.c Remove unnecessary externs from network func forward decls 2020-08-02 23:43:55 -04:00
Network.h Add support for multiple Network backends, stub in GOGNetwork 2020-01-13 11:15:22 -05:00
Otherlevel.cpp Bounds check all entity getters that can return 0 2020-09-25 13:51:47 -04:00
Otherlevel.h Remove unnecessary includes from header files 2020-07-19 21:37:40 -04:00
preloader.cpp Separate includes into sections and alphabetize them 2020-07-19 21:37:40 -04:00
preloader.h Remove unnecessary includes from header files 2020-07-19 21:37:40 -04:00
Render.cpp Don't manually write out INBOUNDS_VEC() checks 2020-09-25 13:51:47 -04:00
Render.h Remove unnecessary includes from header files 2020-07-19 21:37:40 -04:00
Screen.cpp Separate includes into sections and alphabetize them 2020-07-19 21:37:40 -04:00
Screen.h Refactor startup to load config before calling Screen::init 2020-07-08 14:30:57 -04:00
Script.cpp Bounds check all entity getters that can return 0 2020-09-25 13:51:47 -04:00
Script.h Use SDL_arraysize() instead of writing out array length 2020-09-25 13:51:47 -04:00
Scripts.cpp Make 'custom_' check more readable 2020-09-27 16:31:40 -04:00
SoundSystem.cpp Separate includes into sections and alphabetize them 2020-07-19 21:37:40 -04:00
SoundSystem.h Revert "Add destructor for SoundTrack/MusicTrack (and explicitly define move constructor to prevent double-free)" 2020-06-07 22:40:03 -04:00
Spacestation2.cpp Separate includes into sections and alphabetize them 2020-07-19 21:37:40 -04:00
Spacestation2.h Remove unnecessary includes from header files 2020-07-19 21:37:40 -04:00
SteamNetwork.c Ifdef out network code for M&P 2020-08-02 23:43:55 -04:00
TerminalScripts.cpp Separate includes into sections and alphabetize them 2020-07-19 21:37:40 -04:00
Textbox.cpp Remove allowspecial, replace with opaqueness check 2020-08-06 22:12:15 -04:00
Textbox.h Remove allowspecial, replace with opaqueness check 2020-08-06 22:12:15 -04:00
Tower.cpp Remove zeroed arrays from tower functions in M&P 2020-08-03 00:29:15 -04:00
Tower.h Change all tilemaps to be short[1200] instead of int[1200] 2020-07-19 16:25:53 -04:00
UtilityClass.cpp Prevent undefined behavior with integer under/overflow with help.Int() 2020-09-27 17:05:00 -04:00
UtilityClass.h Rename INBOUNDS() macro to INBOUNDS_VEC() 2020-09-25 13:51:47 -04:00
WarpClass.cpp Separate includes into sections and alphabetize them 2020-07-19 21:37:40 -04:00
WarpClass.h Remove unnecessary includes from header files 2020-07-19 21:37:40 -04:00