[Commits] [wesnoth/wesnoth] 089fc0: Refactored the implementation of display::scroll()
GitHub
noreply at github.com
Mon Dec 4 23:50:30 UTC 2017
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: 089fc02c298e7e4f6ed6bc57935cbf4811a03234
https://github.com/wesnoth/wesnoth/commit/089fc02c298e7e4f6ed6bc57935cbf4811a03234
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-12-05 (Tue, 05 Dec 2017)
Changed paths:
M src/display.cpp
Log Message:
-----------
Refactored the implementation of display::scroll()
Based on some work in accelerated_rendering. No functionality change, but makes it much easier to read.
Commit: ade69102bcd3d4286d6500edee0f2c9ceb292864
https://github.com/wesnoth/wesnoth/commit/ade69102bcd3d4286d6500edee0f2c9ceb292864
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-12-05 (Tue, 05 Dec 2017)
Changed paths:
M src/floating_label.cpp
Log Message:
-----------
Floating Label: formatting update
# Conflicts:
# src/floating_label.cpp
Commit: de1a9724ebe89c8da99d78160bc16a4b2409d7d5
https://github.com/wesnoth/wesnoth/commit/de1a9724ebe89c8da99d78160bc16a4b2409d7d5
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-12-05 (Tue, 05 Dec 2017)
Changed paths:
M src/controller_base.cpp
M src/display.cpp
M src/display.hpp
M src/events.cpp
M src/floating_label.cpp
M src/gui/dialogs/multiplayer/lobby.cpp
M src/gui/widgets/window.cpp
M src/help/help.cpp
M src/help/help_topic_generators.cpp
M src/show_dialog.cpp
M src/tooltips.cpp
M src/video.cpp
M src/video.hpp
M src/widgets/button.cpp
M src/widgets/menu.cpp
M src/widgets/textbox.cpp
Log Message:
-----------
Refactored handling of window/renderer size getters
* Removed display::screen_area(), display::w(), and display::h().
* Moved the global screen_area() function into the CVideo class.
* Renamed CVideo::getx() and gety() to get_width() and get_height()
* Made those two functions return the result of screen_area() instead of the other way around.
* Added preliminary support for high-DPI rendering to screen_area()
Note on the last point: When I fixed bug #1772 (aa8f6c7e7 right now but will probably change with rebasing)
I noted that SDL_GetWindowSize and SDL_GetRendererOutputSize returned the same results for me (even with
Window's automatic scaling for non-high-DPI-enabled apps disabled) but that the SDL documentation stated the
former returned screen coordinates and the latter pixels. In that same commit I changed the dimension functions
to use SDL_GetWindowSize. I've now reversed that decision and gone back to using SDL_GetRendererOutputSize so
I can guarantee output in pixels. If use_pixels is false, the code will return coordinates in 96 DPI, so I need
to have pixel measurements for the calculations.
Again, though, I do not know if SDL_GetWindowSize returns a different value that pixel size (which it's said
to do) on macOS or iOS. I'll need to do some testing. It's possible on those platforms I won't need the 96 DPI
measurements, but it's also possible it will be needed on on platforms, since all of our code relies on pixel
measurements.
Commit: 29ff4bd644c7266c7700f7100bdbf87f1959b924
https://github.com/wesnoth/wesnoth/commit/29ff4bd644c7266c7700f7100bdbf87f1959b924
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-12-05 (Tue, 05 Dec 2017)
Changed paths:
M src/editor/controller/editor_controller.cpp
M src/gui/dialogs/addon/connect.cpp
M src/gui/dialogs/addon/manager.cpp
M src/gui/dialogs/addon/manager.hpp
M src/gui/dialogs/title_screen.cpp
M src/gui/dialogs/unit_advance.cpp
M src/gui/dialogs/unit_advance.hpp
M src/gui/dialogs/unit_recall.cpp
M src/gui/dialogs/unit_recall.hpp
M src/gui/dialogs/unit_recruit.cpp
M src/gui/dialogs/unit_recruit.hpp
M src/gui/widgets/unit_preview_pane.cpp
M src/help/help.cpp
M src/help/help.hpp
M src/menu_events.cpp
M src/scripting/game_lua_kernel.cpp
M src/tooltips.cpp
Log Message:
-----------
Removed CVideo argument from help functions
Just used the singleton in the main show_help function.
Compare: https://github.com/wesnoth/wesnoth/compare/d00ed24d14ba...29ff4bd644c7
More information about the Commits
mailing list