#4642: abolish camera rotation at the start of every game for save games <= 10
-------------------------------------------------+-------------------------
Reporter: Forgon | Owner:
Type: patch (an actual patch, not | Status: new
a request for one) | Milestone: unspecified
Priority: normal | Version: unspecified
Component: other |
Operating System: All/Non-Specific |
-------------------------------------------------+-------------------------
At the start of every game, the map is rotated slightly (compare [raw-
attachment:initial_rotation_old.png] and [raw-
attachment:initial_rotation_new.png] to observe this). This behaviour is
caused by function 'disp3d_resetView()' in './src/display3d.cpp' that
appears to be a legacy of save games for versions <= 10 (the variable
START_HEIGHT (renamed to OLD_START_HEIGHT in #4629) exists solely for
these old versions).
This patch disables the camera rotation at the start of every game except
for those save games it was intended for:
'disp3d_resetView()' was called overall 3 times in the program:
1. './src/game.cpp:3628'
2. './src/game.cpp:1881'. Note that 'saveGameVersion' is copied from
'fileHeaderVersion' (initialised in function 'deserialiseSaveGameHeader()'
in './src/game.cpp:130'), which is set to 8 unless an actual savegame is
loaded.
3. './src/display3d.cpp:1115'
All games executed 2 and 3. When loading save games, 1 was executed before
2 and 3.
The patch removes 2 and 3, renames the function 'disp3d_resetView()' to
'disp3d_oldView', and slightly alters its contents. Besides, the variable
'INITIAL_DESIRED_ROTATION' is renamed to 'OLD_INITIAL_ROTATION'.
--
Ticket URL: <http://developer.wz2100.net/ticket/4642>
Warzone 2100 Trac <http://developer.wz2100.net/>
The Warzone 2100 Project
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Warzone2100-project mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/warzone2100-project