[wesnoth-commits] [wesnoth/wesnoth] e55804: SDL/Window: set render scaling method to linear
GitHub
noreply at github.com
Sun Mar 18 15:16:43 UTC 2018
Branch: refs/heads/master
Home: https://github.com/wesnoth/wesnoth
Commit: e558044855fb7aaecdf2b1dd9cac0264aac2dad5
https://github.com/wesnoth/wesnoth/commit/e558044855fb7aaecdf2b1dd9cac0264aac2dad5
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/sdl/window.cpp
Log Message:
-----------
SDL/Window: set render scaling method to linear
This looks better than NN scaling (default);
Commit: 1a24fd5872dc27426f8d26e1f0a9a58c29ce04c8
https://github.com/wesnoth/wesnoth/commit/1a24fd5872dc27426f8d26e1f0a9a58c29ce04c8
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/video.cpp
Log Message:
-----------
Video: enabled accelerated rendering with texture target access
Commit: 41f921bd38b36eb16e66b4151b0427e14c2914f5
https://github.com/wesnoth/wesnoth/commit/41f921bd38b36eb16e66b4151b0427e14c2914f5
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M data/gui/widget/button_default.cfg
M src/gui/core/canvas.cpp
M src/gui/core/canvas.hpp
M src/gui/core/canvas_private.hpp
M src/gui/core/event/handler.cpp
M src/gui/widgets/widget.cpp
M src/gui/widgets/window.cpp
Log Message:
-----------
GUI2/Canvas: refactor surface blitting out of drawing routines
This entirely refactors surface blitting out of the canvas. Instead, each canvas owns a texture. This texture
is completely redrawn any time the canvas if marked dirty, else the result is cached and drawn to the screen
each draw cycle.
All windows are now redrawn every draw cycle. The use of the cached canvas textures means there's no noticeable
performance difference (likely a performance gain, actually) from using surface blitting.
There's still some code to clean up and a few things to fix.
Commit: 4e2b34a5f2c936f21e867857ed6e28d0def8d640
https://github.com/wesnoth/wesnoth/commit/4e2b34a5f2c936f21e867857ed6e28d0def8d640
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/widgets/window.cpp
Log Message:
-----------
GUI2/Window: re-implement drawing and removed commented-out restore code
We don't need all this dirty list or handling or surface restoration anymore.
Commit: ec2913ab3c7746a356d708d3e6c850c0fd0d1641
https://github.com/wesnoth/wesnoth/commit/ec2913ab3c7746a356d708d3e6c850c0fd0d1641
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/dialogs/modal_dialog.cpp
M src/gui/widgets/window.cpp
M src/gui/widgets/window.hpp
M src/scripting/lua_gui2.cpp
Log Message:
-----------
GUI2/Window: removed restore flag and restorer surface
Commit: 76320049798e2460f2c7d36525defcce3d876cd9
https://github.com/wesnoth/wesnoth/commit/76320049798e2460f2c7d36525defcce3d876cd9
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/addon/manager_ui.cpp
M src/gui/dialogs/addon/connect.cpp
M src/gui/dialogs/addon/uninstall_list.cpp
M src/gui/dialogs/campaign_difficulty.cpp
M src/gui/dialogs/campaign_selection.hpp
M src/gui/dialogs/drop_down_menu.hpp
M src/gui/dialogs/file_dialog.cpp
M src/gui/dialogs/game_delete.cpp
M src/gui/dialogs/game_save.cpp
M src/gui/dialogs/hotkey_bind.cpp
M src/gui/dialogs/log_settings.cpp
M src/gui/dialogs/message.cpp
M src/gui/dialogs/modal_dialog.cpp
M src/gui/dialogs/modal_dialog.hpp
M src/gui/dialogs/multiplayer/mp_connect.cpp
M src/gui/dialogs/multiplayer/mp_host_game_prompt.cpp
M src/gui/dialogs/network_transmission.cpp
M src/gui/dialogs/preferences_dialog.cpp
M src/gui/dialogs/sp_options_configure.cpp
M src/gui/dialogs/statistics_dialog.cpp
M src/gui/dialogs/surrender_quit.cpp
M src/gui/dialogs/title_screen.cpp
M src/gui/dialogs/transient_message.cpp
M src/gui/dialogs/transient_message.hpp
M src/gui/dialogs/unit_create.cpp
M src/gui/dialogs/wml_error.cpp
M src/gui/dialogs/wml_message.cpp
Log Message:
-----------
GUI2/Modal Dialog: removed set_restore interface
This was used to set the restore argument of gui2::window::show. It's not needed anymore
since the window class no longer uses surface restoring.
Commit: c6ed3f018e7edc103d0e0d9274623fac4ac8f422
https://github.com/wesnoth/wesnoth/commit/c6ed3f018e7edc103d0e0d9274623fac4ac8f422
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/core/event/handler.cpp
M src/gui/dialogs/debug_clock.cpp
M src/gui/dialogs/editor/custom_tod.cpp
M src/gui/dialogs/lua_interpreter.cpp
M src/gui/dialogs/outro.cpp
M src/gui/dialogs/story_viewer.cpp
M src/gui/dialogs/story_viewer.hpp
M src/gui/dialogs/title_screen.cpp
M src/gui/widgets/button.cpp
M src/gui/widgets/container_base.cpp
M src/gui/widgets/container_base.hpp
M src/gui/widgets/generator.hpp
M src/gui/widgets/generator_private.hpp
M src/gui/widgets/grid.cpp
M src/gui/widgets/grid.hpp
M src/gui/widgets/label.cpp
M src/gui/widgets/list.cpp
M src/gui/widgets/listbox.cpp
M src/gui/widgets/listbox.hpp
M src/gui/widgets/matrix.cpp
M src/gui/widgets/matrix.hpp
M src/gui/widgets/menu_button.cpp
M src/gui/widgets/minimap.hpp
M src/gui/widgets/multimenu_button.cpp
M src/gui/widgets/pane.cpp
M src/gui/widgets/pane.hpp
M src/gui/widgets/progress_bar.cpp
M src/gui/widgets/repeating_button.cpp
M src/gui/widgets/scrollbar.cpp
M src/gui/widgets/scrollbar_container.cpp
M src/gui/widgets/scrollbar_container.hpp
M src/gui/widgets/slider.hpp
M src/gui/widgets/slider_base.cpp
M src/gui/widgets/styled_widget.cpp
M src/gui/widgets/text_box.cpp
M src/gui/widgets/text_box_base.cpp
M src/gui/widgets/toggle_button.cpp
M src/gui/widgets/toggle_panel.cpp
M src/gui/widgets/tree_view.cpp
M src/gui/widgets/tree_view.hpp
M src/gui/widgets/tree_view_node.cpp
M src/gui/widgets/tree_view_node.hpp
M src/gui/widgets/viewport.cpp
M src/gui/widgets/viewport.hpp
M src/gui/widgets/widget.cpp
M src/gui/widgets/widget.hpp
M src/gui/widgets/window.cpp
M src/gui/widgets/window.hpp
M src/scripting/lua_gui2.cpp
Log Message:
-----------
GUI2: removed dirty widget interface
This is no longer needed since we redraw everything every frame. The dirty flag in the canvas remains
as that controls whether the cached texture is used or recreated.
Commit: c926ce76e05b9e9d0dfc9d1c488f778cc0497b61
https://github.com/wesnoth/wesnoth/commit/c926ce76e05b9e9d0dfc9d1c488f778cc0497b61
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
M src/gui/core/canvas.hpp
M src/gui/widgets/panel.cpp
M src/gui/widgets/styled_widget.cpp
Log Message:
-----------
GUI2/Canvas: renamed blit function and removed surface argument
Commit: eb671aec4844f1c9d21ded08d59ecfb22627b539
https://github.com/wesnoth/wesnoth/commit/eb671aec4844f1c9d21ded08d59ecfb22627b539
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/widgets/container_base.cpp
M src/gui/widgets/container_base.hpp
M src/gui/widgets/generator.hpp
M src/gui/widgets/generator_private.hpp
M src/gui/widgets/grid.cpp
M src/gui/widgets/grid.hpp
M src/gui/widgets/matrix.cpp
M src/gui/widgets/matrix.hpp
M src/gui/widgets/minimap.cpp
M src/gui/widgets/minimap.hpp
M src/gui/widgets/multi_page.cpp
M src/gui/widgets/multi_page.hpp
M src/gui/widgets/pane.cpp
M src/gui/widgets/pane.hpp
M src/gui/widgets/panel.cpp
M src/gui/widgets/panel.hpp
M src/gui/widgets/scrollbar_container.cpp
M src/gui/widgets/scrollbar_container.hpp
M src/gui/widgets/spacer.cpp
M src/gui/widgets/spacer.hpp
M src/gui/widgets/styled_widget.cpp
M src/gui/widgets/styled_widget.hpp
M src/gui/widgets/toggle_panel.cpp
M src/gui/widgets/toggle_panel.hpp
M src/gui/widgets/tree_view_node.cpp
M src/gui/widgets/tree_view_node.hpp
M src/gui/widgets/viewport.cpp
M src/gui/widgets/viewport.hpp
M src/gui/widgets/widget.cpp
M src/gui/widgets/widget.hpp
M src/gui/widgets/window.cpp
Log Message:
-----------
GUI2: removed framebuffer code from draw impl functions
Commit: 78271d230241b987281bc2b5f64aed3a0e888c87
https://github.com/wesnoth/wesnoth/commit/78271d230241b987281bc2b5f64aed3a0e888c87
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/font/text.cpp
Log Message:
-----------
Hack to get text to render right
Commit: 48d072a02ef2eb7cb00b13d67f9f478c92080363
https://github.com/wesnoth/wesnoth/commit/48d072a02ef2eb7cb00b13d67f9f478c92080363
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
M src/gui/core/canvas.hpp
M src/gui/widgets/panel.cpp
M src/gui/widgets/styled_widget.cpp
M src/gui/widgets/widget.cpp
M src/gui/widgets/widget.hpp
Log Message:
-----------
GUI2: refactored viewport setting and re-added clip rect setting
It turns out I had removed the clip rect setting in error; it prevented items in, say, a listbox from drawing
outside the widget's boundaries. I've re-added that now.
I've also moved viewport setting to the same place. It turns out it didn't need to be set every canvas draw.
The only reason the old code was passing the blitting rect to the canvas was it was needed for the sdl_blit call.
Since I can now set the viewport independent of a canvas state, there's no longer a need to set the viewport in
the canvas.
Commit: 94f9303bdefc51b03fe98f925a3b7b21e1ca3812
https://github.com/wesnoth/wesnoth/commit/94f9303bdefc51b03fe98f925a3b7b21e1ca3812
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/widgets/window.cpp
Log Message:
-----------
Removed some debug output
[ci skip]
Commit: aa2f266e871c75601ea9eac4048f189bceca787d
https://github.com/wesnoth/wesnoth/commit/aa2f266e871c75601ea9eac4048f189bceca787d
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: removed surface_lock objects
The canvas surface isn't even passed to these functions anymore so I have no idea how this built.
Commit: 894e9b6b3e66cab811343a81ee1c06eb46c97884
https://github.com/wesnoth/wesnoth/commit/894e9b6b3e66cab811343a81ee1c06eb46c97884
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/core/event/handler.cpp
Log Message:
-----------
Small code simplification
Commit: 5c430f609652f61d37ed992fd5499155e71c8ec6
https://github.com/wesnoth/wesnoth/commit/5c430f609652f61d37ed992fd5499155e71c8ec6
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: add error logging if canvas texture creation fails
Commit: 56a793c086c71df5ee4ba947a1fd7da1811c6410
https://github.com/wesnoth/wesnoth/commit/56a793c086c71df5ee4ba947a1fd7da1811c6410
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M projectfiles/CodeBlocks/wesnoth.cbp
M source_lists/libwesnoth_sdl
M src/display.cpp
M src/gui/core/canvas.cpp
M src/gui/core/canvas.hpp
M src/gui/core/event/handler.cpp
M src/help/help.cpp
A src/sdl/texture.cpp
A src/sdl/texture.hpp
M src/video.cpp
M src/video.hpp
Log Message:
-----------
Added SDL_Texture wrapper class and some utility functions
Commit: a710d6d4578243dba0c34ed55d68d518bcde2a83
https://github.com/wesnoth/wesnoth/commit/a710d6d4578243dba0c34ed55d68d518bcde2a83
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/widgets/minimap.cpp
Log Message:
-----------
GUI2/Minimap: quick fix to get the minimap drawing again
Commit: 81a62bf49cc4c556cd9ad5c710b94a9cc4b2a2a1
https://github.com/wesnoth/wesnoth/commit/81a62bf49cc4c556cd9ad5c710b94a9cc4b2a2a1
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M projectfiles/CodeBlocks/wesnoth.cbp
M src/gui/core/canvas.cpp
A src/sdl/render_utils.hpp
M src/sdl/texture.cpp
M src/sdl/texture.hpp
Log Message:
-----------
Moved renderer RAII helpers to their own file and added ones for clip rect and viewport
Do note that setting an empty rect in render_raii_rect_setter_base is not the same as passing nullptr.
If an empty rect is passed to SDL_RenderGetClipRect, for example, you can end up with nothing drawing
since everything is being clipped.
Commit: 4a0f8d9db046408f5bce426c45e3402ca53b50a3
https://github.com/wesnoth/wesnoth/commit/4a0f8d9db046408f5bce426c45e3402ca53b50a3
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/video.cpp
Log Message:
-----------
CVideo: convert blit_surface to handle input as textures instead of blitting to framebuffer
Commit: da7917955b2606e87deb2e8227feecfd6ce099f3
https://github.com/wesnoth/wesnoth/commit/da7917955b2606e87deb2e8227feecfd6ce099f3
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/widgets/widget.cpp
M src/sdl/rect.cpp
Log Message:
-----------
Use get_renderer() over *get_window()
This doesn't appear to have been an issue in the rectangle drawing code at least, but it should guard
against possible segfaults in the future.
Commit: 3e2046b5d8e11723c8fc2032e4c787ee78ff83ba
https://github.com/wesnoth/wesnoth/commit/3e2046b5d8e11723c8fc2032e4c787ee78ff83ba
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/image.cpp
M src/image.hpp
Log Message:
-----------
Added a texture cache
Note this probably doesn't work properly yet since I haven't properly implemented shared management
of textures in their wrapper class.
Commit: 2d39d19af92274cf4127dbc2d16137db2852dcdd
https://github.com/wesnoth/wesnoth/commit/2d39d19af92274cf4127dbc2d16137db2852dcdd
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/sdl/texture.cpp
M src/sdl/texture.hpp
Log Message:
-----------
Texture: converted internal handling to use a shared_ptr
This allows multiple texture objects to refer to the same texture without destroying them prematurely.
This is different from the SDL_Surface wrapper's implementation since surfaces have their own internal
refcounting system; textures do not.
Commit: e7d1c970bcea904d258c102c7dddec0813a88dce
https://github.com/wesnoth/wesnoth/commit/e7d1c970bcea904d258c102c7dddec0813a88dce
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: disable surface manip w/ accelerated rendering for stretch resize mode
RenderCopy handles that automatically.
Commit: eaac01c9a2b7e40d0eb7f3ae9d31b32ec834e2fd
https://github.com/wesnoth/wesnoth/commit/eaac01c9a2b7e40d0eb7f3ae9d31b32ec834e2fd
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.cpp
M src/sdl/utils.cpp
M src/sdl/utils.hpp
Log Message:
-----------
Enabled drawing of minimap in-game
Commit: 441ec38adfe0295fb7881e198b1e191da16cc92c
https://github.com/wesnoth/wesnoth/commit/441ec38adfe0295fb7881e198b1e191da16cc92c
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/controller_base.cpp
M src/editor/controller/editor_controller.cpp
M src/events.cpp
M src/events.hpp
M src/gui/core/event/handler.cpp
M src/gui/widgets/window.cpp
M src/wesnoth.cpp
Log Message:
-----------
Moved GUI2's per-frame drawing trigger to global scope
This is derived from work originally done by @aginor (48bcb277d4). I cherry-picked that commit and made a few alterations.
Commit: 758ad0bf233b064c503bbcc054023410a51b4f1d
https://github.com/wesnoth/wesnoth/commit/758ad0bf233b064c503bbcc054023410a51b4f1d
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/widgets/minimap.cpp
Log Message:
-----------
GUI2/Miniap: draw any provided canvas data before the minimap
Commit: e30a2aa52080a46ded3edb393144e2cafaaa03c3
https://github.com/wesnoth/wesnoth/commit/e30a2aa52080a46ded3edb393144e2cafaaa03c3
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M data/core/images/themes/classic/menubar.png
A data/gui/window/game_ui.cfg
M projectfiles/CodeBlocks/wesnoth.cbp
M source_lists/wesnoth
A src/gui/dialogs/game_ui.cpp
A src/gui/dialogs/game_ui.hpp
M src/playsingle_controller.cpp
Log Message:
-----------
Added static prototype for GUI2 in-game theme
Commit: 8dc661db40c2dad6c2adc5d32c72204ac8b503ad
https://github.com/wesnoth/wesnoth/commit/8dc661db40c2dad6c2adc5d32c72204ac8b503ad
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M projectfiles/CodeBlocks/wesnoth.cbp
M source_lists/libwesnoth
M src/arrow.cpp
M src/arrow.hpp
M src/display.cpp
M src/display.hpp
A src/drawing_buffer.cpp
A src/drawing_buffer.hpp
M src/editor/editor_display.cpp
M src/game_display.cpp
M src/units/animation.cpp
M src/units/drawer.cpp
M src/units/frame.cpp
M src/whiteboard/attack.cpp
M src/whiteboard/manager.cpp
M src/whiteboard/move.cpp
M src/whiteboard/recall.cpp
M src/whiteboard/recruit.cpp
M src/whiteboard/suppose_dead.cpp
Log Message:
-----------
Decoupled drawing buffer code from display class
Commit: d2087a14c4fc563baf5b4e070625322c81be1941
https://github.com/wesnoth/wesnoth/commit/d2087a14c4fc563baf5b4e070625322c81be1941
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.cpp
M src/display.hpp
M src/editor/editor_display.cpp
M src/gui/widgets/minimap.cpp
M src/playsingle_controller.cpp
M src/sdl/utils.cpp
M src/units/drawer.cpp
M src/units/drawer.hpp
M src/units/frame.cpp
M src/video.cpp
M src/video.hpp
M src/whiteboard/attack.cpp
M src/whiteboard/suppose_dead.cpp
Log Message:
-----------
Initial refactor for main-screen accelerated rendering
Commit: c52a2a1b75c70c1848f3b7f112963e940c9cc488
https://github.com/wesnoth/wesnoth/commit/c52a2a1b75c70c1848f3b7f112963e940c9cc488
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/core/event/handler.cpp
Log Message:
-----------
GUI2: moved event handling into main context
Not sure why I need to call join() in connect() instead of the ctor, though.
Commit: 6fdf1bcc8899134f2b987b862ce970b6c1dbf9b0
https://github.com/wesnoth/wesnoth/commit/6fdf1bcc8899134f2b987b862ce970b6c1dbf9b0
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/units/drawer.cpp
Log Message:
-----------
Draw units under bars/orbs/etc
Commit: 6fbc2491ea0260fff47f9e3eb796b20a52274cba
https://github.com/wesnoth/wesnoth/commit/6fbc2491ea0260fff47f9e3eb796b20a52274cba
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/video.cpp
M src/video.hpp
Log Message:
-----------
Video: expand render_copy to take flip arguments
Still needs to handle rotation.
Commit: ba9a0f7550fb421284d1822620bac49d465f22bf
https://github.com/wesnoth/wesnoth/commit/ba9a0f7550fb421284d1822620bac49d465f22bf
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: made use of CVideo::render_copy
Commit: b8a03da847c21a4c95c0d266da5179416c25b41c
https://github.com/wesnoth/wesnoth/commit/b8a03da847c21a4c95c0d266da5179416c25b41c
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/play_controller.cpp
Log Message:
-----------
Fixed play_controller not joining current event context
Was broken when I moved the GUI2 drawing trigger code to global scope probably.
Commit: d614c71786c8eaebad5ae043ff3c1a1c88d52a5b
https://github.com/wesnoth/wesnoth/commit/d614c71786c8eaebad5ae043ff3c1a1c88d52a5b
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/units/drawer.cpp
Log Message:
-----------
Uint: fixed bad bar alpha on unit mouseover
Commit: 42894f6ac390c1c1a571a6946f388a3ca91fec4a
https://github.com/wesnoth/wesnoth/commit/42894f6ac390c1c1a571a6946f388a3ca91fec4a
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/arrow.cpp
M src/display.cpp
M src/display.hpp
M src/editor/editor_display.cpp
M src/floating_label.cpp
M src/floating_label.hpp
M src/game_display.cpp
M src/game_display.hpp
M src/units/drawer.cpp
M src/units/frame.cpp
M src/units/udisplay.cpp
M src/whiteboard/attack.cpp
M src/whiteboard/suppose_dead.cpp
Log Message:
-----------
Another huge chunk of progress
Commit: ea395c1fb50d14bbdd5e61c811780ae0c9948dc3
https://github.com/wesnoth/wesnoth/commit/ea395c1fb50d14bbdd5e61c811780ae0c9948dc3
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/controller_base.cpp
M src/editor/action/action_item.cpp
M src/scripting/game_lua_kernel.cpp
Log Message:
-----------
Removed draw() calls into the display class
Not needed anymore since per-frame drawing is handled within said class.
Commit: e205e42d44bf10fd9a6e056c50c7f8c47cb0bce2
https://github.com/wesnoth/wesnoth/commit/e205e42d44bf10fd9a6e056c50c7f8c47cb0bce2
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/events.cpp
M src/video.cpp
M src/video.hpp
Log Message:
-----------
Video: (almost) completely removed framebuffer surface
Again, useless since there's no more window surface with accelerated rendering.
getSurface() remains since it's still used in quite a lot of places. Will removed ASAP.
Commit: 66f2d3f49c5109afd98954f1717034f4e3171c2f
https://github.com/wesnoth/wesnoth/commit/66f2d3f49c5109afd98954f1717034f4e3171c2f
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/tests/utils/fake_display.cpp
M src/video.cpp
M src/video.hpp
Log Message:
-----------
Video: removed unused arguments from make_test_fake
Commit: 643ebe221f6977864c95548691d5ecba4ee49980
https://github.com/wesnoth/wesnoth/commit/643ebe221f6977864c95548691d5ecba4ee49980
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.cpp
M src/display.hpp
M src/game_display.cpp
M src/units/drawer.cpp
Log Message:
-----------
Got a bunch more components drawing
Reachmaps, attack indicators, shroud/fog (incomplete).
Commit: d427bf1e65b7a60a434373ddf1eda3da1d9c9a7e
https://github.com/wesnoth/wesnoth/commit/d427bf1e65b7a60a434373ddf1eda3da1d9c9a7e
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.cpp
Log Message:
-----------
Enabled more stuff drawing
Hex overlay, map items, fog/shroud transitions.
Commit: 37bcade3a1e249676a6d85783391d83a15189d45
https://github.com/wesnoth/wesnoth/commit/37bcade3a1e249676a6d85783391d83a15189d45
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/controller_base.cpp
Log Message:
-----------
Removed most call to raise_draw_event
These don't seem necessary anymore since draw handling happens per-frame and doesn't rely
on calling derived class's draw() member.
Commit: d748cbcd235355e1c9ceface5c867b5d0b52f5d1
https://github.com/wesnoth/wesnoth/commit/d748cbcd235355e1c9ceface5c867b5d0b52f5d1
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/units/drawer.cpp
Log Message:
-----------
Units: fixed bad HP/XP bars fill rect offset
Commit: 250bb0b3afd5d05c5c05ae5792a3d1a306947b2b
https://github.com/wesnoth/wesnoth/commit/250bb0b3afd5d05c5c05ae5792a3d1a306947b2b
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: fixed mirrored images being flipped on the wrong axis.
Commit: 1cb496d96607caeb19ca5c3159899ea388b906ca
https://github.com/wesnoth/wesnoth/commit/1cb496d96607caeb19ca5c3159899ea388b906ca
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/image.cpp
M src/image.hpp
Log Message:
-----------
Extended implementation of the texture cache
Instead of always loading a surface at the same time, textures are now loaded directly from disk if applicable.
Instead, surfaces are only loaded if applicable to apply some effect that cannot as of now be done with texture
manipulation since we dont have shader support yet.
In that vein, I've also added two new texture caches, one for masked-to-hex images and one for ToD colored images.
Commit: 01d78cbb7fd632e4be1693c4c1e9e76521eb472d
https://github.com/wesnoth/wesnoth/commit/01d78cbb7fd632e4be1693c4c1e9e76521eb472d
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.cpp
Log Message:
-----------
Trim ToD images to hex
Commit: 61dcb43ee6724589d96022468b2f83456be7b2ae
https://github.com/wesnoth/wesnoth/commit/61dcb43ee6724589d96022468b2f83456be7b2ae
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
M src/gui/core/canvas_private.hpp
Log Message:
-----------
GUI2/Canvas: refactor surface use out of image rendering
The only real reason to keep using a surface was in order to have resize mode manipulations. I've now added
texture-only handling methods (the tiling one was borrowed from display.cpp's draw_background function).
Commit: 8a82d438558d069e0480a785cbd3f989b251e80c
https://github.com/wesnoth/wesnoth/commit/8a82d438558d069e0480a785cbd3f989b251e80c
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M projectfiles/CodeBlocks/wesnoth.cbp
M source_lists/libwesnoth_sdl
M src/editor/editor_display.cpp
M src/events.cpp
M src/game_display.cpp
A src/ogl/context.cpp
A src/ogl/context.hpp
A src/ogl/utils.cpp
A src/ogl/utils.hpp
M src/playsingle_controller.cpp
M src/sdl/window.cpp
M src/video.cpp
M src/video.hpp
Log Message:
-----------
Some initial code (disabled for now) for setting up an OGL context
In the interests of getting this all done faster, I've decided to postpone work on the OGL implementation for now
and focus on the SDL_Renderer version. This contains some basic code (include-guarded) for setting up an OGL context
for the main SDL window.
Commit: af861f729218c3f9b01d3a99eb3f3ce28b1ac3c9
https://github.com/wesnoth/wesnoth/commit/af861f729218c3f9b01d3a99eb3f3ce28b1ac3c9
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/image.cpp
M src/image.hpp
Log Message:
-----------
Allowed IPFs to work again when using the texture cache
See create_texture_from_sub_file doc comment for more info.
Commit: c8f36d27585002b6eeba82da1daecb2f9e60be57
https://github.com/wesnoth/wesnoth/commit/c8f36d27585002b6eeba82da1daecb2f9e60be57
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: set clip rect when tiling images
This fixes an issue where images could be tiled outside their desired size area.
Commit: 8396b535c88f42407443172407601b0799b68bb4
https://github.com/wesnoth/wesnoth/commit/8396b535c88f42407443172407601b0799b68bb4
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M data/gui/widget/window_default.cfg
Log Message:
-----------
GUI2/Window: draw background image first instead of last
Originally was going to do this as workaround for the background tiling over the borders,
but I fixed the root cause of that instead. Still, this just makes more sense.
Commit: 855345291bd7c49cedec323529b6279cc22cd1b9
https://github.com/wesnoth/wesnoth/commit/855345291bd7c49cedec323529b6279cc22cd1b9
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/dialogs/outro.cpp
M src/gui/dialogs/story_viewer.cpp
Log Message:
-----------
GUI2: removed some unnecessary calls to canvas::set_is_dirty
The one in Outro was unnecessary since set_variable already calls set_is_dirty.
The one in the Story Viewer was there to deal with some background redraw issues which no longer appear
with the new drawing methods.
Commit: ca4443555080d29124e2099d0e69b40c96fa8b38
https://github.com/wesnoth/wesnoth/commit/ca4443555080d29124e2099d0e69b40c96fa8b38
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/sdl/window.cpp
M src/sdl/window.hpp
Log Message:
-----------
SDL/Window: removed pixel format member and promoted renderer info wholly to class member
The pixel format member was really rather useless, since SDL_RenderInfo returns an array of supported
formats and only the first one was being saved.
Commit: f7de3685517aca9392e33fc3673458491cfa888f
https://github.com/wesnoth/wesnoth/commit/f7de3685517aca9392e33fc3673458491cfa888f
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/sdl/render_utils.hpp
M src/sdl/texture.cpp
Log Message:
-----------
Added some inline wrappers for SDL_SetTexture* functions
Commit: c406a2067fbb33fac9ec6261746931082d89f2ea
https://github.com/wesnoth/wesnoth/commit/c406a2067fbb33fac9ec6261746931082d89f2ea
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.cpp
M src/game_display.cpp
M src/halo.cpp
M src/halo.hpp
Log Message:
-----------
Refactored halo code to bring it in line with new drawing methods
This basically rips out all the unrendering and invalidation code. Neither is needed anymore.
Instead, we can have a simple, clean, "just draw the managed halos" interface.
Note there's an issue unrelated to this where halos aren't removed when a unit is killed with
the debug kill menu command.
Commit: 3154ab419f0c38b6e9e40607a5a7614a20f1223d
https://github.com/wesnoth/wesnoth/commit/3154ab419f0c38b6e9e40607a5a7614a20f1223d
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/units/frame.cpp
Log Message:
-----------
Restored alpha handling of unit frames
Still need to figure out the blending effects or submerge alpha.
Commit: 6c04ae29b9b2d22f07970808efa0c883645ef109
https://github.com/wesnoth/wesnoth/commit/6c04ae29b9b2d22f07970808efa0c883645ef109
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/dialogs/editor/custom_tod.cpp
M src/gui/dialogs/editor/custom_tod.hpp
M src/gui/dialogs/modeless_dialog.cpp
M src/gui/widgets/window.cpp
M src/gui/widgets/window.hpp
Log Message:
-----------
GUI2/Window: removed empty undraw() function
This was emptied earlier in my refactor when window unrendering was removed. I simply hadn't
removed the function yet.
Commit: 2dca404a635e12f431bcc8ebf410aa66371c60d7
https://github.com/wesnoth/wesnoth/commit/2dca404a635e12f431bcc8ebf410aa66371c60d7
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
M src/image.cpp
M src/image.hpp
M src/sdl/render_utils.hpp
M src/sdl/window.cpp
Log Message:
-----------
Split texture caches into linear and NN scaled versions
With textures, you can't change render scale quality once they've been created. To rectify this, I've
made the texture caches a map of caches, sorted by scale quality. This should result in no performance
overhead, since an image is simply added to the appropriate quality cache on creation instead of in
a single cache. If a different version of a texture is needed it will be loaded later.
By default, load_texture will return images using nearest neighbor scaling. GUI2 always fetches images
using linear scaling. This is consistent with the old software rendering method. Plus, we don't have
any way (as of now) to specify the render quality on a per-image basis.
Commit: 770664d1f34a274dd8da70af589719d30b44263b
https://github.com/wesnoth/wesnoth/commit/770664d1f34a274dd8da70af589719d30b44263b
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/font/text.cpp
M src/font/text.hpp
M src/gui/core/canvas.cpp
M src/gui/widgets/styled_widget.hpp
Log Message:
-----------
Added a getter for a static pango_text object
The reason I added this was so I can refactor some temporary pango_text objects out of the display class.
styled_widget doesn't use this for reasons explained in the comment.
Commit: ed27b67f1e645f90f918c3f028cb0b8655dfd83f
https://github.com/wesnoth/wesnoth/commit/ed27b67f1e645f90f918c3f028cb0b8655dfd83f
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
A data/gui/window/command_console.cfg
M projectfiles/CodeBlocks/wesnoth.cbp
M source_lists/wesnoth
M src/controller_base.cpp
A src/gui/dialogs/command_console.cpp
A src/gui/dialogs/command_console.hpp
M src/menu_events.cpp
M src/menu_events.hpp
M src/play_controller.cpp
M src/play_controller.hpp
M src/playsingle_controller.cpp
M src/playsingle_controller.hpp
Log Message:
-----------
Port floating textbox/command console to GUI2
The old floating textbox was extremely entwined with the controller_base, play_controller, and menu_handler
classes. controller_base::have_keyboard_focus essentially controlled whether some events were executed based
on whether the floating textbox was open or not. Additionally, those events weren't even reached if a UI dialog
was open at all.
The new design features a singleton console class that can be called from anywhere, not just the game. I've also
decoupled the execution object from play_controller. The relevant functions in menu_handler are now passed to
the console as callbacks.
To work around map events such as clicking not being available if the console was open, I removed the exclusionary
is-in-dialog check from controller_base::handle_event and instead exit early out certain types of events using
controller_base::have_keyboard_focus. As mentioned in the accompanying comment, this isn't the best solution, but
it will do for now.
The new console also isn't fully feature-comparable with the old GUI1 one. The following are still missing:
* The checkbox, for use when sending messages.
* Tab completion.
* A crash occurs when existing the app if a game was exited with the console open.
I'm leaving the old floating_textbox code around for now for reference.
Commit: 2c9d9efb1dfec3c32b49fa2dda133a89e4174c9f
https://github.com/wesnoth/wesnoth/commit/2c9d9efb1dfec3c32b49fa2dda133a89e4174c9f
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/floating_label.cpp
Log Message:
-----------
Floating Label: formatting update
Commit: f25a404f37870ae13b8390566edf33b28e60fcbd
https://github.com/wesnoth/wesnoth/commit/f25a404f37870ae13b8390566edf33b28e60fcbd
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/floating_label.cpp
M src/floating_label.hpp
M src/tooltips.cpp
Log Message:
-----------
Refactored floating_label implementation
* Store label as a texture instead of creating a texture from a surface every draw cycle
* Restored expired label removal and alpha fadeout (was accidentally removed earlier in my refactoring)
* Use alpha field of bg_color member for background color
* Draw tooltip backgrounds procedurally instead of with surfaces and part of the label texture itself.
See included comment for small caveat.
Commit: 085bd42974efeea8dae07e88e45d164cbf0f1391
https://github.com/wesnoth/wesnoth/commit/085bd42974efeea8dae07e88e45d164cbf0f1391
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.cpp
Log Message:
-----------
Display: restrict render clip rect setter to map drawing scope only
This prevents tooltips from being cut off.
Commit: b746829692b702b7c3fc83726c16b0c789ad8651
https://github.com/wesnoth/wesnoth/commit/b746829692b702b7c3fc83726c16b0c789ad8651
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/image.cpp
Log Message:
-----------
Improved console output on IPF fail
Yes, I know the duplicate code should be consolidated.
Commit: 46eea05a67bb3444ca05a8ae16194644d9b664cf
https://github.com/wesnoth/wesnoth/commit/46eea05a67bb3444ca05a8ae16194644d9b664cf
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.cpp
M src/events.cpp
M src/events.hpp
M src/gui/core/event/handler.cpp
M src/show_dialog.cpp
M src/video.cpp
M src/video.hpp
M src/widgets/widget.cpp
Log Message:
-----------
Refactor and cleanup of the drawing dispatch system
Previously, drawing was handled with custom DRAW and DRAW_ALL events which individual event handlers
managed. DRAW was used for only-as-needed draws, and DRAW_ALL for drawing everything. As we've switched
to accelerated rendering, we've switched to the latter model all the time; everything is always drawn.
Both DRAW and DRAW_ALL events aren't needed anymore and have been removed. Instead, we simply call each
handler's draw() function directly from events::pump. The two main cases that handled draw events - the
display class and GUI2 - just forwarded the event handler calls to their respective draw() functions anyway.
Awhile back to unconditionally send draw events to the event queue constantly every 20 ms. However, to prevent
draw calls from becoming backed up, the queue already had code to remove all but 1 draw event from the queue
anyway, so the actual rate of drawing was still reliant on the rate at which events::pump was called. Therefor
this commit should result in no change at the rate the screen is drawn.
Commit: d23d1ea33835d07c863a2f8611a5ab0f21f9215c
https://github.com/wesnoth/wesnoth/commit/d23d1ea33835d07c863a2f8611a5ab0f21f9215c
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M projectfiles/CodeBlocks/wesnoth.cbp
M source_lists/libwesnoth
M src/arrow.cpp
M src/arrow.hpp
M src/display.cpp
M src/display.hpp
R src/drawing_buffer.cpp
R src/drawing_buffer.hpp
A src/drawing_queue.cpp
A src/drawing_queue.hpp
M src/editor/editor_display.cpp
M src/game_display.cpp
M src/units/animation.cpp
M src/units/drawer.cpp
M src/units/frame.cpp
M src/units/frame.hpp
M src/whiteboard/attack.cpp
M src/whiteboard/manager.cpp
M src/whiteboard/move.cpp
M src/whiteboard/recall.cpp
M src/whiteboard/recruit.cpp
M src/whiteboard/suppose_dead.cpp
Log Message:
-----------
Renamed drawing_buffer to drawing_queue
Also renamed drawing_queue::drawing_layer to just 'layer'.
Commit: 48d61611f841ac037d80fc5240aa3805a83b5780
https://github.com/wesnoth/wesnoth/commit/48d61611f841ac037d80fc5240aa3805a83b5780
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.cpp
Log Message:
-----------
Fixed halos drawing over fog and shroud (fixes #1406)
Commit: ffc064eca2882e99d9ed509fddd395957e5bbe19
https://github.com/wesnoth/wesnoth/commit/ffc064eca2882e99d9ed509fddd395957e5bbe19
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/sdl/window.cpp
Log Message:
-----------
SDL/Window: throw exception if render-to-texture is not enabled
NOTE: for some reason, if I remove the `SDL_RENDERER_TARGETTEXTURE` flag from sdl::window's ctor
render_flags argument, this assertion still doesn't throw. Not sure if that means by GPU supports
it by default, or what.
Commit: c5be598cd0d3b4df84529d9dcbce58bba0a4a427
https://github.com/wesnoth/wesnoth/commit/c5be598cd0d3b4df84529d9dcbce58bba0a4a427
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/actions/advancement.cpp
M src/actions/attack.cpp
M src/actions/create.cpp
M src/actions/move.cpp
M src/actions/undo_recall_action.cpp
M src/actions/undo_recruit_action.cpp
M src/actions/unit_creator.cpp
M src/actions/vision.cpp
M src/arrow.cpp
M src/arrow.hpp
M src/display.cpp
M src/display.hpp
M src/editor/action/mouse/mouse_action_item.cpp
M src/editor/action/mouse/mouse_action_unit.cpp
M src/editor/controller/editor_controller.cpp
M src/editor/editor_display.cpp
M src/editor/map/context_manager.cpp
M src/fake_unit_manager.cpp
M src/floating_textbox.cpp
M src/game_display.cpp
M src/game_display.hpp
M src/gui/dialogs/editor/custom_tod.cpp
M src/menu_events.cpp
M src/play_controller.cpp
M src/playsingle_controller.cpp
M src/replay_controller.cpp
M src/scripting/game_lua_kernel.cpp
M src/synced_commands.cpp
M src/units/animation.cpp
M src/units/udisplay.cpp
M src/whiteboard/attack.cpp
M src/whiteboard/attack.hpp
M src/whiteboard/manager.cpp
M src/whiteboard/move.cpp
M src/whiteboard/recall.cpp
M src/whiteboard/recall.hpp
M src/whiteboard/recruit.cpp
M src/whiteboard/recruit.hpp
M src/whiteboard/side_actions.cpp
M src/whiteboard/suppose_dead.cpp
M src/whiteboard/suppose_dead.hpp
M src/whiteboard/utility.cpp
Log Message:
-----------
Display: removed all the invalidated locations code
This removes all the code related to invalidating locations, any functions used to set, modify, or propagate
location invalidation, and several functions that no longer serve any purpose anymore since their only purpose
was to handle invalidated locations.
Commit: 9850e47720b4856c582f5f1dfa58d92b9dd82b22
https://github.com/wesnoth/wesnoth/commit/9850e47720b4856c582f5f1dfa58d92b9dd82b22
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/actions/move.cpp
M src/display.cpp
M src/units/animation.cpp
M src/units/animation.hpp
M src/units/animation_component.cpp
M src/units/animation_component.hpp
M src/whiteboard/manager.cpp
Log Message:
-----------
Removed animation invalidation code
This no longer actually does anything now that location invalidation is removed. If you follow the code
animation_component::invalidate called unit_animation::invalidate which was responsible for generating
the overlaped_hex_ set. Previously, this is what locations were invalidated. Now it didn't do anything.
Commit: a86ac0675fbf88642809686f9b98b1db56659ad0
https://github.com/wesnoth/wesnoth/commit/a86ac0675fbf88642809686f9b98b1db56659ad0
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/actions/vision.cpp
M src/display.cpp
M src/display.hpp
M src/gui/dialogs/editor/custom_tod.cpp
M src/scripting/game_lua_kernel.cpp
M src/units/udisplay.cpp
Log Message:
-----------
Display: removed old drawing code and external draw calls
Commit: 2cddf5e2c5efca7bd78c9375fabba3a726ed5bdd
https://github.com/wesnoth/wesnoth/commit/2cddf5e2c5efca7bd78c9375fabba3a726ed5bdd
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/units/drawer.cpp
M src/units/frame.cpp
Log Message:
-----------
Fixed some bad drawing offsets and sizes when zoomed in
This fixes HP/XP bar size (wasn't scaled to zoom) and placement, as well as crown/orb and main sprite placement.
Commit: 0d69cbad692fd4ae92c6fcc8e4bad005e5f45fbc
https://github.com/wesnoth/wesnoth/commit/0d69cbad692fd4ae92c6fcc8e4bad005e5f45fbc
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/sdl/texture.cpp
M src/sdl/texture.hpp
Log Message:
-----------
SDL/Texture: made info struct take a texture ptr directly
Will allow me to construct one directly from a pointer if I don't have a wrapper object.
Commit: 345fa27565fe8ea08beb0f45dfeaa95c260f1c64
https://github.com/wesnoth/wesnoth/commit/345fa27565fe8ea08beb0f45dfeaa95c260f1c64
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.cpp
M src/display.hpp
M src/editor/editor_display.cpp
M src/editor/editor_display.hpp
M src/game_display.cpp
M src/game_display.hpp
Log Message:
-----------
Display: work on refactoring the main drawing system
Previously, every visible hex was iterated over and every element in that hex draw. This was inefficient
for two reasons: First, it meant the performance footprint for many operations like unit drawing was O(n²),
since the list of elements had to be checked for every single hex. Second, it meant the renderer had to
switch active textures many more times than necessary.
My new system involved drawing every element of a specific type at once - ie, all background terrains at
once, all units, all items, etc. This reduces lookup time from O(n²) to O(n) and results in a noticeable
performance increase. It also reduces the number of times the renderer needs to switch active textures,
since bulk draws such as the map grid overlay are now done all at once while that specific texture is
active.
There are still some layering issues and missing elements that need to be sorted, especially in game_display.
Commit: 35a9dc6084b5155fb6b49fe419389cd9fa74737f
https://github.com/wesnoth/wesnoth/commit/35a9dc6084b5155fb6b49fe419389cd9fa74737f
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/video.cpp
Log Message:
-----------
Video: don't render null textures
Commit: e42226151841ab338910cf223441fcc256cd1401
https://github.com/wesnoth/wesnoth/commit/e42226151841ab338910cf223441fcc256cd1401
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/editor/controller/editor_controller.cpp
M src/menu_events.cpp
M src/playmp_controller.cpp
M src/playsingle_controller.cpp
M src/playturn.cpp
M src/replay_controller.cpp
M src/synced_commands.cpp
M src/video.cpp
Log Message:
-----------
Removed external calls to display::redraw_everything()
Commit: dadb31aadf82af6f443342d269e00eb178badab2
https://github.com/wesnoth/wesnoth/commit/dadb31aadf82af6f443342d269e00eb178badab2
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.cpp
M src/display.hpp
Log Message:
-----------
Display: header formatting and doc updates
Appropriate functions were also marked deprecated.
Commit: cdb43343b4676951d099929fe7d8a17a89c0d363
https://github.com/wesnoth/wesnoth/commit/cdb43343b4676951d099929fe7d8a17a89c0d363
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.hpp
M src/gui/core/event/handler.cpp
Log Message:
-----------
Marked sdl_handler::draw overrides as final
Commit: 78bcd85d9f09df0eaa799ebacea674805d26f9d1
https://github.com/wesnoth/wesnoth/commit/78bcd85d9f09df0eaa799ebacea674805d26f9d1
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.cpp
M src/display.hpp
M src/game_display.cpp
M src/playmp_controller.cpp
M src/playsingle_controller.cpp
M src/replay_controller.cpp
Log Message:
-----------
Display: cleaned up a bunch of now-unused/unnecessary members and functions
Commit: 9d90539fc7b9dddddb5c1a9a8bdf8ad9278d03ad
https://github.com/wesnoth/wesnoth/commit/9d90539fc7b9dddddb5c1a9a8bdf8ad9278d03ad
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.cpp
Log Message:
-----------
Display: re-enable fps counter with :fps
Commit: a0f8ad67a535721db70d090f2ea335f4510e02fe
https://github.com/wesnoth/wesnoth/commit/a0f8ad67a535721db70d090f2ea335f4510e02fe
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: don't skip drawing if canvas texture is null
Commit: 8647ff63c06bb0e3f0da1ed83d7731f9a7c52245
https://github.com/wesnoth/wesnoth/commit/8647ff63c06bb0e3f0da1ed83d7731f9a7c52245
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.cpp
M src/floating_label.cpp
M src/font/text.cpp
M src/font/text.hpp
M src/gui/core/canvas.cpp
Log Message:
-----------
Added a texture cache for pango_text render output
Commit: 3bf676868517698ab3dcf0e08d84392dcbf5a4b1
https://github.com/wesnoth/wesnoth/commit/3bf676868517698ab3dcf0e08d84392dcbf5a4b1
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/floating_label.cpp
M src/floating_label.hpp
Log Message:
-----------
Floating Label: header formatting updates
Commit: 1fd9a16a865dcffd1297b274791493f205911c86
https://github.com/wesnoth/wesnoth/commit/1fd9a16a865dcffd1297b274791493f205911c86
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: handle text alpha as a render-time op
This reduces the number of times the text itself needs to be rendered, especially for areas like the
story viewer where the only difference is alpha.
Commit: 8bb6f193a9938322f1d382e5bc3944230f8c6dc7
https://github.com/wesnoth/wesnoth/commit/8bb6f193a9938322f1d382e5bc3944230f8c6dc7
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/font/text.cpp
M src/font/text.hpp
Log Message:
-----------
Font/Pango Text: add extra stroke to text outline to compensate for alpha weirdness
Also added the outline to the hash.
Commit: 2f2adc6899b5e023c94da1f53504cbca83c1da2b
https://github.com/wesnoth/wesnoth/commit/2f2adc6899b5e023c94da1f53504cbca83c1da2b
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/sdl/texture.cpp
M src/sdl/texture.hpp
Log Message:
-----------
Some updates to the texture wrapper class
* Made reset() a public function
* Added an assign() function
* Don't try to destroy null textures
* Updated doc comments
I left assign() as just taking an SDL_Texture ptr since having it take a texture ref would be
functionally equivalent to operator=.
Commit: 9add86d745fb9962296819ad8bfeb5364efa0536
https://github.com/wesnoth/wesnoth/commit/9add86d745fb9962296819ad8bfeb5364efa0536
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/image.cpp
Log Message:
-----------
Avoid temporary object when creating new textures from disk
Commit: e9a8813b677bc2ada13fda03fbbebb67e48396d9
https://github.com/wesnoth/wesnoth/commit/e9a8813b677bc2ada13fda03fbbebb67e48396d9
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/floating_label.cpp
Log Message:
-----------
Floating Labels: use new pango_text functionality for generating text outline
Commit: f8e71f4d9a7b8c8ba5c1e0b45f56b7b68eaa1a42
https://github.com/wesnoth/wesnoth/commit/f8e71f4d9a7b8c8ba5c1e0b45f56b7b68eaa1a42
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.cpp
M src/display.hpp
Log Message:
-----------
Display: avoid unnecessarily (potentially) creating millions of temp vectors
I've moved the terrain hex drawing code directly into draw_visible_hexes instead of relying on get_terrain_images
to return a vector of all the necessary images for each visible hex and then drawing them. Instead, we now draw
each hex's images immediately without any intermediary container.
With the old method, after about 10 to 15 seconds of drawing we had already allocated (and destroyed) almost 180,000
temporary vectors (a new one was created for each hex, twice per draw cycle). It's obvious how quickly that would add
up over a normal play session, and though in this case the performance hit for creating each vector was probably tiny,
creating them likely would have added up.
Commit: 07844f471b409b4002a1a6173c8b600431ccd1c8
https://github.com/wesnoth/wesnoth/commit/07844f471b409b4002a1a6173c8b600431ccd1c8
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/actions/vision.cpp
Log Message:
-----------
Comment out an unused parameter
Not sure if we'll need this again (perhaps to delay draws mid-action) so I'm not removing it yet.
Commit: 92d51b866d7d0f4452797348184a36e54be99d2e
https://github.com/wesnoth/wesnoth/commit/92d51b866d7d0f4452797348184a36e54be99d2e
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/floating_label.cpp
M src/floating_label.hpp
Log Message:
-----------
Added RAII helper struct to manage a floating label's lifetime
Commit: 3376ef04e37360e8126d59810c65212c6659b794
https://github.com/wesnoth/wesnoth/commit/3376ef04e37360e8126d59810c65212c6659b794
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.cpp
M src/display.hpp
M src/game_display.cpp
M src/game_display.hpp
M src/whiteboard/manager.cpp
M src/whiteboard/move.cpp
M src/whiteboard/recall.cpp
M src/whiteboard/recruit.cpp
Log Message:
-----------
Another large batch of progress, primarily in game_display
This is primarily focused on getting various areas of the game display drawing, such as footstep images
and the terrain defense indicators.
To facilitate the last, I've refactored draw_text_in_hex to utilize floating labels instead of drawing
to hex directly with surfaces. This probably isn't the most optimal solution, since labels are continuously
created and destroyed, but since their text is usually short and cached in the rendered text cache it
does for now.
Also includes some cleanup of deprecated functions in display, and slight reordering of drawing order of
certain elements.
Commit: beae56a4ea6d82034c7c17e3982a9c98adaaae5f
https://github.com/wesnoth/wesnoth/commit/beae56a4ea6d82034c7c17e3982a9c98adaaae5f
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.cpp
Log Message:
-----------
Display: simplified a few things
Commit: 54fd91cc553bff942b3844d2f71d4f94db54fec4
https://github.com/wesnoth/wesnoth/commit/54fd91cc553bff942b3844d2f71d4f94db54fec4
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/sdl/texture.cpp
Log Message:
-----------
SDL/Texture: avoid unnecessary shared_ptr creation
Made use of shared_ptr::reset instead of creating temp shared_ptrs, assigning them to the class ptr,
then deleting them.
Commit: c72ac0079d59655642839fe16cf56cf002ee1d72
https://github.com/wesnoth/wesnoth/commit/c72ac0079d59655642839fe16cf56cf002ee1d72
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.cpp
Log Message:
-----------
Display: fixed moving units drawing under foreground terrains
Commit: 0032395ccf3b0eab092f610a5183a3810d5a8450
https://github.com/wesnoth/wesnoth/commit/0032395ccf3b0eab092f610a5183a3810d5a8450
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/floating_label.cpp
Log Message:
-----------
Floating Label: keep local pango_text object static
This also means I need to set set_add_outline every time create_texture is called to make sure the
text renderer has the correct settings.
Commit: 63398733b001d141d93b2e5c9b7bff7413ca83d7
https://github.com/wesnoth/wesnoth/commit/63398733b001d141d93b2e5c9b7bff7413ca83d7
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/controller_base.cpp
M src/controller_base.hpp
Log Message:
-----------
Controller Base: removed unused process_focus_keydown_event event
This was used before the command console was converted to GUI2.
Commit: 8eba15bffc0c073e4003ce100b3dd4c7aac35699
https://github.com/wesnoth/wesnoth/commit/8eba15bffc0c073e4003ce100b3dd4c7aac35699
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.cpp
M src/display.hpp
M src/floating_label.cpp
M src/show_dialog.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: d9f284f9264f01a1d9691822664f345edae23a46
https://github.com/wesnoth/wesnoth/commit/d9f284f9264f01a1d9691822664f345edae23a46
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/font/text.cpp
Log Message:
-----------
Font/Pango Text: fixed a weird crash in Cairo
See added comment for details.
Commit: eeece5e3c77278ace0b5a11b45a6689b6f9f4dcf
https://github.com/wesnoth/wesnoth/commit/eeece5e3c77278ace0b5a11b45a6689b6f9f4dcf
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.hpp
Log Message:
-----------
Display: exit render_scaled_to_zoom early if passed texture is null
Commit: 2ba020a746cc135dc68b6dc4c759f21420982cd3
https://github.com/wesnoth/wesnoth/commit/2ba020a746cc135dc68b6dc4c759f21420982cd3
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.cpp
M src/display.hpp
Log Message:
-----------
Display: avoid temp vectors when rendering partial fog/shround images on hex
Commit: 028b4ee73c0ddc3691b46a23e48f7f8c9db500a4
https://github.com/wesnoth/wesnoth/commit/028b4ee73c0ddc3691b46a23e48f7f8c9db500a4
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/halo.cpp
Log Message:
-----------
Halos: fixed incorrect drawing origin when at non-default zoom
Commit: 5e35f6dbfe40b8e883e4a7ca976967082d40c834
https://github.com/wesnoth/wesnoth/commit/5e35f6dbfe40b8e883e4a7ca976967082d40c834
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
M src/sdl/render_utils.hpp
M src/sdl/window.cpp
Log Message:
-----------
Moved SDL_SetRenderDrawColor wrapper to utils file and added a second overload
Also renamed the function to a more colloquial version.
Commit: c7ed5559a077f694bccf6461006c8d140b40cf22
https://github.com/wesnoth/wesnoth/commit/c7ed5559a077f694bccf6461006c8d140b40cf22
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
M src/gui/core/canvas.hpp
Log Message:
-----------
GUI2/Canvas: optimized cached texture management
Instead of throwing out the cached texture every time the canvas was dirty, I've added a flag so that
only happens if its size has actually changed. There still seem to be some issues in GUI2 where canvas
objects keep getting reset, but I'm not sure why. Will have to look into that.
Anyway, the addition of the SDL_RenderClear call also seems to have fixed the weird graphics bleed-through
I was getting when running the game with the OGL driver.
I don't know if the canvas copy or move ctors are needed for anything. I added them for a test, but I'll
leave them for now in case I need them later.
Commit: dde06909f00d4d04f1fccacecea7dd9d10ea6279
https://github.com/wesnoth/wesnoth/commit/dde06909f00d4d04f1fccacecea7dd9d10ea6279
Author: Jyrki Vesterinen <sandgtx at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/sdl/texture.cpp
M src/sdl/texture.hpp
Log Message:
-----------
Fix build with Visual Studio
Commit: 8190d67152da02f0498cb5b71840448c04ac505d
https://github.com/wesnoth/wesnoth/commit/8190d67152da02f0498cb5b71840448c04ac505d
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/sdl/render_utils.hpp
Log Message:
-----------
Allow render_target_setter to restore the last target when destroyed
Commit: 6c09c2b269e299b4f0a2cca4877e3d516d1f3ad9
https://github.com/wesnoth/wesnoth/commit/6c09c2b269e299b4f0a2cca4877e3d516d1f3ad9
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/minimap.cpp
M src/minimap.hpp
Log Message:
-----------
Added new minimap drawing method that works wholly with textures
I've left the old getMinimap function alone and added a new function that will eventually replace it
that utilizes texture rendering to a given texture instead of relying on surface blits and scaling.
This has the benefit of, well, reducing surface ops, for one, as well as removing the need to create
a new texture from the minimap surface every time it's updated.
Commit: ae106b509152edd9626416ad8e5ecb0406e0b12a
https://github.com/wesnoth/wesnoth/commit/ae106b509152edd9626416ad8e5ecb0406e0b12a
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
M src/gui/core/canvas.hpp
Log Message:
-----------
GUI2/Canvas: allow the default draw routine (shape drawing) to be overridden
Previously widgets that wanted to implement custom drawing behavior overrode styled_widget::impl_draw_background
or impl_draw_foreground. Those functions in the base class simply called the canvas render methods. Some widgets
such as the minimap ignored that rendered the contents on their own.
This new method allows rendering directly to the canvas's texture, meaning all the caching and sizing is already
handled by the canvas and doesn't need to be done by the widget; everything's always the right size and redrawn
when necessary.
Commit: 3332ae975786f1d0d7dafc6047257feb37efb8e6
https://github.com/wesnoth/wesnoth/commit/3332ae975786f1d0d7dafc6047257feb37efb8e6
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/widgets/minimap.cpp
M src/gui/widgets/minimap.hpp
Log Message:
-----------
GUI2/Minimap: refactored drawing code
Instead of using the minimap surface method (which was getting converted from surface to texture every
draw cycle since the caching mechanism the canvas implemented wasn't available and the weird custom
cache the widget implemented itself didn't seem to do actually do anything) we use the new render-to-
canvas-texture method which is a lot cleaner and should be a lot faster. This also means we no longer
override styled_widget::impl_draw_background.
Do note I might use the design of the removed cache here to add some age functionality to the
font::pango_text cache.
Commit: d5249333d4274c46bf5ab4d8802820a4c5f29afe
https://github.com/wesnoth/wesnoth/commit/d5249333d4274c46bf5ab4d8802820a4c5f29afe
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/units/frame.cpp
Log Message:
-----------
Unit/Frame: fixed alpha mods being applied to all units of the same type
Commit: 56c733268e4049406604262a2a5f7f630e5b4a01
https://github.com/wesnoth/wesnoth/commit/56c733268e4049406604262a2a5f7f630e5b4a01
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/game_display.cpp
M src/game_display.hpp
Log Message:
-----------
Game Display: reimplemented more functionality in draw_movement_info
Not completely done yet, still need to get some stuff working, but this gets rid of the old commented-out
code and puts stuff mostly in the right place.
Commit: 16842ea2a853dfbf985dddee6fdae44661e56ef7
https://github.com/wesnoth/wesnoth/commit/16842ea2a853dfbf985dddee6fdae44661e56ef7
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/game_display.cpp
Log Message:
-----------
Game Display: formatting update
Commit: 11054e93f1985154b3942f90f1087702be94e111
https://github.com/wesnoth/wesnoth/commit/11054e93f1985154b3942f90f1087702be94e111
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
M src/gui/core/canvas.hpp
Log Message:
-----------
GUI2/Canvas: some refactoring to correctly reimplement the shape caching mechanism
The purpose of the shape caching is essentially to allow multiple draws to consecutively add to
previously drawn content. It essentially adds another condition for clearing the texture prior
to rendering.
I also moved the shape list handling into the draw function itself so it's only executed once
if needed instead multiple times when calling functions like set_variable - not that it actually
would have done anything after the first call, but this allows me to keep the clearing-the-texture
code in one place.
Commit: 079ec37909beda7ff5a4e066d95a8cb747ded663
https://github.com/wesnoth/wesnoth/commit/079ec37909beda7ff5a4e066d95a8cb747ded663
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.cpp
Log Message:
-----------
Display: removed old software blitting routines from scroll
Commit: 90b2a51c462f96534ccace907a3e344a1c1713b8
https://github.com/wesnoth/wesnoth/commit/90b2a51c462f96534ccace907a3e344a1c1713b8
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.cpp
M src/display.hpp
Log Message:
-----------
display general compilation fixes
Commit: b7a717ff70f4171ef6a71df11c38204248e1d353
https://github.com/wesnoth/wesnoth/commit/b7a717ff70f4171ef6a71df11c38204248e1d353
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/overlay.hpp
Log Message:
-----------
Fixup build (add missing include)
Commit: cbf34d2db355a1374f35061c8d0a8f2ec5316b0e
https://github.com/wesnoth/wesnoth/commit/cbf34d2db355a1374f35061c8d0a8f2ec5316b0e
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/video.cpp
M src/video.hpp
Log Message:
-----------
Video: we don't need to record the refresh rate anymore
Once we get OpenGL rendering all set up, double buffering will limit the frame rate for us.
Commit: af4db845d64ea2ce81de8daa939b2c0d8f9d0497
https://github.com/wesnoth/wesnoth/commit/af4db845d64ea2ce81de8daa939b2c0d8f9d0497
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/video.cpp
Log Message:
-----------
Cleaned up more framebuffer stuff that should have been in e205e42d44bf10fd
Some additional uses from master that I forgot to add to the aforementioned commit,
and at least one thing I messed up in conflict resolution.
Commit: 7f81fba11ac8f036ef8dc43c4e49450de961b462
https://github.com/wesnoth/wesnoth/commit/7f81fba11ac8f036ef8dc43c4e49450de961b462
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M src/display.cpp
Log Message:
-----------
Fixup build again
Commit: 61f653f91aed0e5375412ba2992213f1910b1db4
https://github.com/wesnoth/wesnoth/commit/61f653f91aed0e5375412ba2992213f1910b1db4
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-19 (Mon, 19 Mar 2018)
Changed paths:
M .gitignore
M src/hotkey/command_executor.cpp
Log Message:
-----------
Merge branch 'master' of github.com:wesnoth/wesnoth
Compare: https://github.com/wesnoth/wesnoth/compare/b27c4c651273...61f653f91aed
More information about the Commits
mailing list