[Commits] [wesnoth/wesnoth] 5792c1: SDL/Window: set render scaling method to linear
GitHub
noreply at github.com
Wed Jul 26 14:32:17 UTC 2017
Branch: refs/heads/accelerated_rendering
Home: https://github.com/wesnoth/wesnoth
Commit: 5792c1bf0178f86173d638fabbd0e32c2efde694
https://github.com/wesnoth/wesnoth/commit/5792c1bf0178f86173d638fabbd0e32c2efde694
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: a3b28ab1cd763bef80bfef9392a93a6a0080de30
https://github.com/wesnoth/wesnoth/commit/a3b28ab1cd763bef80bfef9392a93a6a0080de30
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/video.cpp
Log Message:
-----------
Video: enabled accelerated rendering with texture target access
Commit: a3f61d668ca148ebd9df505bb8d0c44e9eae19df
https://github.com/wesnoth/wesnoth/commit/a3f61d668ca148ebd9df505bb8d0c44e9eae19df
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 150fef657a32da60e6062286a5f862df76fbc954
https://github.com/wesnoth/wesnoth/commit/150fef657a32da60e6062286a5f862df76fbc954
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/gui/widgets/window.cpp
Log Message:
-----------
GUI2/Window: properly re-implement draw and restore code
We don't need all this dirty list or handling or surface restoration anymore.
Commit: 82499e3fbfccb9aedf3a4790d1d141f3f2a750a2
https://github.com/wesnoth/wesnoth/commit/82499e3fbfccb9aedf3a4790d1d141f3f2a750a2
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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/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.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: 6bc9006dba6a0f3968cbf313c26ab543ac9685c9
https://github.com/wesnoth/wesnoth/commit/6bc9006dba6a0f3968cbf313c26ab543ac9685c9
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/gui/widgets/window.cpp
M src/gui/widgets/window.hpp
Log Message:
-----------
GUI2/Window: removed restore flag and restorer surface
Commit: 9398e5f2ad52870359338912a5678240b8acd5a7
https://github.com/wesnoth/wesnoth/commit/9398e5f2ad52870359338912a5678240b8acd5a7
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 3e6f8b625900195e1f26fe876e63e6aa78ba5f54
https://github.com/wesnoth/wesnoth/commit/3e6f8b625900195e1f26fe876e63e6aa78ba5f54
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 3a50820683d66b9a8106004d6075bc41047bdaa9
https://github.com/wesnoth/wesnoth/commit/3a50820683d66b9a8106004d6075bc41047bdaa9
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/font/text.cpp
Log Message:
-----------
Hack to get text to render right
Commit: 917f456b0ae1456932731d471c2b56325c43e6d3
https://github.com/wesnoth/wesnoth/commit/917f456b0ae1456932731d471c2b56325c43e6d3
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 5153b9e08a7aaebb7e14c65cffc5a8ff80617714
https://github.com/wesnoth/wesnoth/commit/5153b9e08a7aaebb7e14c65cffc5a8ff80617714
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/gui/core/event/handler.cpp
M src/gui/dialogs/lua_interpreter.cpp
Log Message:
-----------
Fixed some unused parameter warnings
Commit: 6e99679fa73d57b6466f0d9ab9a4f702d8672b6d
https://github.com/wesnoth/wesnoth/commit/6e99679fa73d57b6466f0d9ab9a4f702d8672b6d
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/gui/widgets/window.cpp
Log Message:
-----------
Removed some debug output
[ci skip]
Commit: 2ba594b2d6d7ad8fe508acdb81a23efea0cc7d83
https://github.com/wesnoth/wesnoth/commit/2ba594b2d6d7ad8fe508acdb81a23efea0cc7d83
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/gui/core/canvas.cpp
M src/gui/widgets/widget.cpp
M src/video.cpp
Log Message:
-----------
Added some code to make my recent changes work with a software renderer
Commit: 9f82b5cb50e724f5027ef67d178e463af523033c
https://github.com/wesnoth/wesnoth/commit/9f82b5cb50e724f5027ef67d178e463af523033c
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 9201811ae5350a0e8e43c5bbd877669fc881dc8f
https://github.com/wesnoth/wesnoth/commit/9201811ae5350a0e8e43c5bbd877669fc881dc8f
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/gui/core/event/handler.cpp
Log Message:
-----------
Small code simplification
Commit: fe6c000193fd7b60fd940624aa1deb5bef551ead
https://github.com/wesnoth/wesnoth/commit/fe6c000193fd7b60fd940624aa1deb5bef551ead
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: add error logging if canvas texture creation fails
Commit: 55eab374cde6e9625427f44049b11b32cfe28f72
https://github.com/wesnoth/wesnoth/commit/55eab374cde6e9625427f44049b11b32cfe28f72
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: c607df31a6b237ffaea4be377b1ec30c1807b19a
https://github.com/wesnoth/wesnoth/commit/c607df31a6b237ffaea4be377b1ec30c1807b19a
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/gui/widgets/minimap.cpp
Log Message:
-----------
GUI2/Minimap: quick fix to get the minimap drawing again
Commit: 3b00a086455e661742eeffc28f352ef4b1c2e1b6
https://github.com/wesnoth/wesnoth/commit/3b00a086455e661742eeffc28f352ef4b1c2e1b6
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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
Commit: 27e799ce17653af3d227948bb3c0a1d1ddcbdeab
https://github.com/wesnoth/wesnoth/commit/27e799ce17653af3d227948bb3c0a1d1ddcbdeab
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/video.cpp
Log Message:
-----------
CVideo: convert blit_surface to handle input as textures instead of blitting to framebuffer
Commit: 5f6a19dd94c141c3320fff627990efc8bda600fa
https://github.com/wesnoth/wesnoth/commit/5f6a19dd94c141c3320fff627990efc8bda600fa
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 25027dd146295c950dfdc498b949e00d5d19dc1a
https://github.com/wesnoth/wesnoth/commit/25027dd146295c950dfdc498b949e00d5d19dc1a
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 4d0dab9918c33fe1cdefb65df8fa7be72bad4467
https://github.com/wesnoth/wesnoth/commit/4d0dab9918c33fe1cdefb65df8fa7be72bad4467
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 414fd63059e5bb3a90b85cb0d1868f49eee1fa3e
https://github.com/wesnoth/wesnoth/commit/414fd63059e5bb3a90b85cb0d1868f49eee1fa3e
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 3af68096970bf1703790738291ef3e2563766ffe
https://github.com/wesnoth/wesnoth/commit/3af68096970bf1703790738291ef3e2563766ffe
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/sdl/render_utils.hpp
Log Message:
-----------
Fixed raii renderer rect setters
This fixes a problem that occurred if no previous set rect was available. In that case, both SDL_RenderGetClipRect
and SDL_RenderGetViewport returned empty rects and those were being set as the appropriate clip rects when the raii
object was destroyed.
Commit: b225b8d658268d5c73bccc7e8ed3ab03912a37c8
https://github.com/wesnoth/wesnoth/commit/b225b8d658268d5c73bccc7e8ed3ab03912a37c8
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: dc9f923a00f68e238bece21ee468bdc4a98664cb
https://github.com/wesnoth/wesnoth/commit/dc9f923a00f68e238bece21ee468bdc4a98664cb
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 5e311509562ae41e8249893a1b20ae270794eeb4
https://github.com/wesnoth/wesnoth/commit/5e311509562ae41e8249893a1b20ae270794eeb4
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M data/gui/widget/image_default.cfg
Log Message:
-----------
GUI2/Image: added tiled-to-size image definition
Commit: 2ac5ee84750dd2c582b78af4f1f279ebb25e0bb8
https://github.com/wesnoth/wesnoth/commit/2ac5ee84750dd2c582b78af4f1f279ebb25e0bb8
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/gui/widgets/minimap.cpp
Log Message:
-----------
GUI2/Miniap: draw any provided canvas data before the minimap
Commit: 9fb4c45ca811329cd0c800f62c9591c4cce47bf0
https://github.com/wesnoth/wesnoth/commit/9fb4c45ca811329cd0c800f62c9591c4cce47bf0
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M data/gui/widget/toggle_button_icon.cfg
Log Message:
-----------
GUI2: fixed some overlay drawing issues with icon toggle buttons
Not sure why, but in some cases the overlay calculations were getting screwed up. This makes them use
the general centered image macro, with accompanying fallback safety checks.
Commit: d8e81c798a0ac0ebce475747d42c3410deee6645
https://github.com/wesnoth/wesnoth/commit/d8e81c798a0ac0ebce475747d42c3410deee6645
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M data/gui/widget/image_default.cfg
Log Message:
-----------
GUI2/Image: added scaled-to-size definition
Commit: efa4a3992e242b8b9a4ecadbfdc28e20e9dd2949
https://github.com/wesnoth/wesnoth/commit/efa4a3992e242b8b9a4ecadbfdc28e20e9dd2949
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M data/gui/widget/toggle_button_icon.cfg
Log Message:
-----------
GUI2/Toggle Button: added medium-sized icon button definition
Commit: a600aa767c24eb9aa779d6f69d62966cb8beca89
https://github.com/wesnoth/wesnoth/commit/a600aa767c24eb9aa779d6f69d62966cb8beca89
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 27ec6025757e4a9a54e239a6566875a3d3be627a
https://github.com/wesnoth/wesnoth/commit/27ec6025757e4a9a54e239a6566875a3d3be627a
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: ee0b251b875cfd4c76e10ab5d418901dbd6e6490
https://github.com/wesnoth/wesnoth/commit/ee0b251b875cfd4c76e10ab5d418901dbd6e6490
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/units/unit.cpp
Log Message:
-----------
Unit: fixed hp and xp colors having 0 alpha
Commit: fb097f5b77923040ee44c24df77e47681659cc56
https://github.com/wesnoth/wesnoth/commit/fb097f5b77923040ee44c24df77e47681659cc56
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 0c05a5fe802c9323160a7f8dac27887a814345f0
https://github.com/wesnoth/wesnoth/commit/0c05a5fe802c9323160a7f8dac27887a814345f0
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 3a106caad4badd57b7452c1bf3e8b494a053f458
https://github.com/wesnoth/wesnoth/commit/3a106caad4badd57b7452c1bf3e8b494a053f458
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/units/drawer.cpp
Log Message:
-----------
Draw units under bars/orbs/etc
Commit: 9bb1cf04ea673002e8f6372e8680298fe0ea749a
https://github.com/wesnoth/wesnoth/commit/9bb1cf04ea673002e8f6372e8680298fe0ea749a
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 3d8a9cfa7499f85ee1e8321a4b2cb95c54f21e6d
https://github.com/wesnoth/wesnoth/commit/3d8a9cfa7499f85ee1e8321a4b2cb95c54f21e6d
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: made use of CVideo::render_copy
Commit: a87fc5521453932408830bfbbe502a52e077870a
https://github.com/wesnoth/wesnoth/commit/a87fc5521453932408830bfbbe502a52e077870a
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 9cf891cef8dcd8c168fbf523fd82b70a97f1dd8b
https://github.com/wesnoth/wesnoth/commit/9cf891cef8dcd8c168fbf523fd82b70a97f1dd8b
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/units/drawer.cpp
Log Message:
-----------
Uint: fixed bad bar alpha on unit mouseover
Commit: 28ea57d3ed398fd203798d172c673c90d6e41d6c
https://github.com/wesnoth/wesnoth/commit/28ea57d3ed398fd203798d172c673c90d6e41d6c
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 0dfcb67d2471630181a8ca98fe153c7fcc88fe49
https://github.com/wesnoth/wesnoth/commit/0dfcb67d2471630181a8ca98fe153c7fcc88fe49
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/actions/advancement.cpp
M src/actions/move.cpp
M src/actions/undo.cpp
M src/actions/unit_creator.cpp
M src/controller_base.cpp
M src/editor/action/action_item.cpp
M src/editor/action/action_unit.cpp
M src/menu_events.cpp
M src/mouse_events.cpp
M src/mouse_handler_base.cpp
M src/playmp_controller.cpp
M src/playsingle_controller.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: 988ac9a971559e6f23c77496f3cea6ef977bc2aa
https://github.com/wesnoth/wesnoth/commit/988ac9a971559e6f23c77496f3cea6ef977bc2aa
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: bcdbad78b00041c4c6f416ef8ac1935ced68ce8c
https://github.com/wesnoth/wesnoth/commit/bcdbad78b00041c4c6f416ef8ac1935ced68ce8c
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: e16357dd8de268ddbfc2c412652239bb543dc062
https://github.com/wesnoth/wesnoth/commit/e16357dd8de268ddbfc2c412652239bb543dc062
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: dbf471aeb94559125238b8e312c8c254a966fd75
https://github.com/wesnoth/wesnoth/commit/dbf471aeb94559125238b8e312c8c254a966fd75
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/display.cpp
Log Message:
-----------
Enabled more stuff drawing
Hex overlay, map items, fog/shroud transitions.
Commit: cc70f8ca2ad035fc2b46adbd0c8de673106051ef
https://github.com/wesnoth/wesnoth/commit/cc70f8ca2ad035fc2b46adbd0c8de673106051ef
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/controller_base.cpp
M src/editor/controller/editor_controller.cpp
M src/play_controller.cpp
M src/playsingle_controller.cpp
M src/replay_controller.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: 5de473fa47bb963eef110d5f7a0dad228d14bfc6
https://github.com/wesnoth/wesnoth/commit/5de473fa47bb963eef110d5f7a0dad228d14bfc6
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/video.cpp
Log Message:
-----------
Video: enabled VSync for renderer (experimental)
Commit: 5d2665e345c93e476696cae3393f599459ee9868
https://github.com/wesnoth/wesnoth/commit/5d2665e345c93e476696cae3393f599459ee9868
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/units/drawer.cpp
Log Message:
-----------
Units: fixed bad HP/XP bars fill rect offset
Commit: 9bb9aea52fcd065c1f66212d9e5685b8fa255052
https://github.com/wesnoth/wesnoth/commit/9bb9aea52fcd065c1f66212d9e5685b8fa255052
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: fixed mirrored images being flipped on the wrong axis.
Commit: a912148a51ed35e98cecadcc19d9032d2c59436c
https://github.com/wesnoth/wesnoth/commit/a912148a51ed35e98cecadcc19d9032d2c59436c
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/display.cpp
Log Message:
-----------
Cleaned up the implementation of display::scroll()
Commit: be2e0735887d750d79ee55ecbd4813e61443248c
https://github.com/wesnoth/wesnoth/commit/be2e0735887d750d79ee55ecbd4813e61443248c
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/actions/move.cpp
Log Message:
-----------
Removed an unused variable
Not needed after I removed the draw() calls into the display class
Commit: 64a489f8ac2ab5188bd9f80a72650c8c24dbaa76
https://github.com/wesnoth/wesnoth/commit/64a489f8ac2ab5188bd9f80a72650c8c24dbaa76
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: f0269a431feb1fe6d34a82f7b79a1dbc462648f6
https://github.com/wesnoth/wesnoth/commit/f0269a431feb1fe6d34a82f7b79a1dbc462648f6
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/display.cpp
Log Message:
-----------
Trim ToD images to hex
Commit: fc7fb7046c83b9062a185ff97f29babe47a0a636
https://github.com/wesnoth/wesnoth/commit/fc7fb7046c83b9062a185ff97f29babe47a0a636
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/display.cpp
Log Message:
-----------
Temporarily disable map label position update on map scroll
There are a bunch of problems with this I need to fix.
Commit: aa327053b16be2a05a429935c0f7463ac45bdc20
https://github.com/wesnoth/wesnoth/commit/aa327053b16be2a05a429935c0f7463ac45bdc20
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/gui/core/canvas.cpp
M src/gui/widgets/widget.cpp
M src/video.cpp
Log Message:
-----------
Removed software rendering fallback
I've decided to commit fully to accelerated rendering.
Commit: 84b2f7a769d38686ddbf8fd733f0d7c4ce94c7f0
https://github.com/wesnoth/wesnoth/commit/84b2f7a769d38686ddbf8fd733f0d7c4ce94c7f0
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 43d94c4ece61e01bd04e2505372b85eb86ecbe7f
https://github.com/wesnoth/wesnoth/commit/43d94c4ece61e01bd04e2505372b85eb86ecbe7f
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: cc8eee1262258eaec10e7c625d32b5a3173b8660
https://github.com/wesnoth/wesnoth/commit/cc8eee1262258eaec10e7c625d32b5a3173b8660
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: d1cb2572feb01a13eb7cd2eebcbd3bc337535f76
https://github.com/wesnoth/wesnoth/commit/d1cb2572feb01a13eb7cd2eebcbd3bc337535f76
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 067bc20c4c14654ebea9f020471443ea03a206c1
https://github.com/wesnoth/wesnoth/commit/067bc20c4c14654ebea9f020471443ea03a206c1
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 1075c429a26558b4ba6a6dec5896538dd55351c2
https://github.com/wesnoth/wesnoth/commit/1075c429a26558b4ba6a6dec5896538dd55351c2
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 6d8c129107324076911deee74cee43415d9a06d4
https://github.com/wesnoth/wesnoth/commit/6d8c129107324076911deee74cee43415d9a06d4
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 6fac546895d2e639c06ba80b54afde65ff589d5a
https://github.com/wesnoth/wesnoth/commit/6fac546895d2e639c06ba80b54afde65ff589d5a
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/sdl/render_utils.hpp
M src/sdl/texture.cpp
Log Message:
-----------
Added some inline wrappers for SDL_SetTexture* functions
Commit: b60827fc833cf9f188568e3d8f690b9dcc376f03
https://github.com/wesnoth/wesnoth/commit/b60827fc833cf9f188568e3d8f690b9dcc376f03
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: ebaa71efb3af6705c1a72b7fea46a5a6387fc9d0
https://github.com/wesnoth/wesnoth/commit/ebaa71efb3af6705c1a72b7fea46a5a6387fc9d0
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/units/animation.cpp
M src/units/animation_component.cpp
M src/units/drawer.cpp
M src/units/frame.cpp
Log Message:
-----------
Use shared_ptr::reset for clearing halo handlers
Commit: d8d0d47e2f8e41fe57718f2dc4922b81deae4de5
https://github.com/wesnoth/wesnoth/commit/d8d0d47e2f8e41fe57718f2dc4922b81deae4de5
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: e962c355ab1c610aec380b774eae4b67402d5023
https://github.com/wesnoth/wesnoth/commit/e962c355ab1c610aec380b774eae4b67402d5023
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/gui/dialogs/editor/custom_tod.cpp
M src/gui/dialogs/editor/custom_tod.hpp
M src/gui/dialogs/loading_screen.cpp
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: dbd6ddb71921e01aadc6266258eefcd99b2c5a6f
https://github.com/wesnoth/wesnoth/commit/dbd6ddb71921e01aadc6266258eefcd99b2c5a6f
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 78d104c00bfa47b034d079d9906352d960b1c72e
https://github.com/wesnoth/wesnoth/commit/78d104c00bfa47b034d079d9906352d960b1c72e
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 3835ff52600d4aeb714b4c1910981086478dff56
https://github.com/wesnoth/wesnoth/commit/3835ff52600d4aeb714b4c1910981086478dff56
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M data/gui/window/addon_manager.cfg
Log Message:
-----------
GUI2/Addon Manager: removed some excessive borders in the low resolution definition
Commit: d73d46c8874fb0f11a3259eac8d1c63d786aadf7
https://github.com/wesnoth/wesnoth/commit/d73d46c8874fb0f11a3259eac8d1c63d786aadf7
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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 checbox, 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: a886c3e47b37170ab68d7e7aaf4bfd9553ef1bdf
https://github.com/wesnoth/wesnoth/commit/a886c3e47b37170ab68d7e7aaf4bfd9553ef1bdf
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/floating_label.cpp
Log Message:
-----------
Floating Label: formatting update
Commit: e2eef4c4b5dc31a8b7639b8b635f7e4b4934bb47
https://github.com/wesnoth/wesnoth/commit/e2eef4c4b5dc31a8b7639b8b635f7e4b4934bb47
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 97823abb7300331a6c5798ff92570d99e0c13dd9
https://github.com/wesnoth/wesnoth/commit/97823abb7300331a6c5798ff92570d99e0c13dd9
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 40ca83c1f8998ab82f86422af974df94c1fcb358
https://github.com/wesnoth/wesnoth/commit/40ca83c1f8998ab82f86422af974df94c1fcb358
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/image.cpp
Log Message:
-----------
Improved console output on IPF fail
Yes, I know the duplicate code should be consolidated.
Commit: 5eaef330eba00603a155d742111801f9ccfb8a7f
https://github.com/wesnoth/wesnoth/commit/5eaef330eba00603a155d742111801f9ccfb8a7f
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 4b1eb219919c5c79ba08dce29e591c849b9fa289
https://github.com/wesnoth/wesnoth/commit/4b1eb219919c5c79ba08dce29e591c849b9fa289
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: bd83f4d9acc958b5a404f5ebb22f02180f342c14
https://github.com/wesnoth/wesnoth/commit/bd83f4d9acc958b5a404f5ebb22f02180f342c14
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/display.cpp
Log Message:
-----------
Fixed halos drawing over fog and shroud (fixes #1406)
Commit: fd8d81dccad340a3debfae9170239bcb38c71830
https://github.com/wesnoth/wesnoth/commit/fd8d81dccad340a3debfae9170239bcb38c71830
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/display.cpp
Log Message:
-----------
Restore map label position anchoring
Also optimized the scroll() function a little to exit early if no change would occur.
Commit: 59052c4c4d8e1bffe63f083d71885cbea3f6e15d
https://github.com/wesnoth/wesnoth/commit/59052c4c4d8e1bffe63f083d71885cbea3f6e15d
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 7deb7036f2d9b1c44ea3a8552ebd03a7b6cf1663
https://github.com/wesnoth/wesnoth/commit/7deb7036f2d9b1c44ea3a8552ebd03a7b6cf1663
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 8f23bdc086ad7461c8409013474585cce4fcb9b7
https://github.com/wesnoth/wesnoth/commit/8f23bdc086ad7461c8409013474585cce4fcb9b7
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: a84e2eb18fa24f62bf4c86c4a1519caf46feb10f
https://github.com/wesnoth/wesnoth/commit/a84e2eb18fa24f62bf4c86c4a1519caf46feb10f
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/actions/attack.cpp
M src/actions/vision.cpp
M src/display.cpp
M src/display.hpp
M src/editor/controller/editor_controller.cpp
M src/editor/map/context_manager.cpp
M src/gui/dialogs/editor/custom_tod.cpp
M src/play_controller.cpp
M src/replay_controller.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: 981554b4b1ad0efa4888be931113abb1aa57aef1
https://github.com/wesnoth/wesnoth/commit/981554b4b1ad0efa4888be931113abb1aa57aef1
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 0835a5726b33b5fa2968e6f907c1f375ddb1fc2c
https://github.com/wesnoth/wesnoth/commit/0835a5726b33b5fa2968e6f907c1f375ddb1fc2c
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 16797e692793ec223969a6a34fc939576f1462d9
https://github.com/wesnoth/wesnoth/commit/16797e692793ec223969a6a34fc939576f1462d9
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 82b6cc1f003478395610b3799672d085014e658b
https://github.com/wesnoth/wesnoth/commit/82b6cc1f003478395610b3799672d085014e658b
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/video.cpp
Log Message:
-----------
Video: don't render null textures
Commit: 94e0c63d8642bc22289f0e5b1e9ae9d24ea0e214
https://github.com/wesnoth/wesnoth/commit/94e0c63d8642bc22289f0e5b1e9ae9d24ea0e214
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 9ec9f8b32c33538040f815309abf7d5c1db81d7a
https://github.com/wesnoth/wesnoth/commit/9ec9f8b32c33538040f815309abf7d5c1db81d7a
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/actions/advancement.cpp
M src/formula/debugger.cpp
M src/game_events/action_wml.cpp
M src/game_events/pump.cpp
M src/playturn.cpp
M src/replay.cpp
M src/synced_user_choice.cpp
M src/whiteboard/manager.cpp
Log Message:
-----------
Use CVideo singleton instead of resources::screen->video()
Commit: 3dec82d416a91d43a951801afa1600c4f302f1b4
https://github.com/wesnoth/wesnoth/commit/3dec82d416a91d43a951801afa1600c4f302f1b4
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/help/help.cpp
Log Message:
-----------
Quick fix for crash when opening help browser
The thing still isn't drawing but this at least fixes the crash.
Commit: ed30e52e794a83ce284c5a2c3d904db650bad4cc
https://github.com/wesnoth/wesnoth/commit/ed30e52e794a83ce284c5a2c3d904db650bad4cc
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 98acf69670ab561028eae45c6bb4e45eb0b7ba5e
https://github.com/wesnoth/wesnoth/commit/98acf69670ab561028eae45c6bb4e45eb0b7ba5e
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/display.hpp
M src/gui/core/event/handler.cpp
Log Message:
-----------
Marked sdl_handler::draw overrides as final
Commit: 57dca33f058feade4bfe8bb1d60472ba29a4c8a7
https://github.com/wesnoth/wesnoth/commit/57dca33f058feade4bfe8bb1d60472ba29a4c8a7
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: f00bad463df2438bf0b011930eaddc39e5e21c75
https://github.com/wesnoth/wesnoth/commit/f00bad463df2438bf0b011930eaddc39e5e21c75
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/display.cpp
Log Message:
-----------
Display: re-enable fps counter with :fps
Commit: bb0dcd34874d7d39b743a36eec78fc0d4c6af7e7
https://github.com/wesnoth/wesnoth/commit/bb0dcd34874d7d39b743a36eec78fc0d4c6af7e7
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: don't skip drawing if canvas texture is null
Commit: 0c98af6639cf3583b15f839dce50a23f95cbf365
https://github.com/wesnoth/wesnoth/commit/0c98af6639cf3583b15f839dce50a23f95cbf365
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 3dddbe0e5bdd1ad25c4bd6917cda96acdd200524
https://github.com/wesnoth/wesnoth/commit/3dddbe0e5bdd1ad25c4bd6917cda96acdd200524
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/floating_label.cpp
M src/floating_label.hpp
Log Message:
-----------
Floating Label: header formatting updates
Commit: b00e805c53553094a769ea02ade3efe2f6051aaa
https://github.com/wesnoth/wesnoth/commit/b00e805c53553094a769ea02ade3efe2f6051aaa
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/font/text.cpp
M src/sdl/utils.cpp
Log Message:
-----------
Use pixel format enums for creating surfaces instead color mask values
This bumps the min SDL version to 2.0.5, but it's a lot easier to read.
Commit: 649f629b255e7206b59e5e54703bef7993d02119
https://github.com/wesnoth/wesnoth/commit/649f629b255e7206b59e5e54703bef7993d02119
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 39996bbf1323a054335936f9dbc1c419305416ac
https://github.com/wesnoth/wesnoth/commit/39996bbf1323a054335936f9dbc1c419305416ac
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/font/text.cpp
M src/font/text.hpp
Log Message:
-----------
Font/Pango Text: added option for text outline
This removes the need to create outlines with surface blitting as the floating_label impl does.
Note the outline is slightly cut off on the sides. Need to adjust geometry to account for it later.
Commit: 9d43ebaecce309a7e2e4e4a459d4943d3a1d8868
https://github.com/wesnoth/wesnoth/commit/9d43ebaecce309a7e2e4e4a459d4943d3a1d8868
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/font/text.cpp
M src/font/text.hpp
Log Message:
-----------
Font/Pango Text: minor cleanup
Commit: 376cd61cc50728f788aade92053e9a13535979e9
https://github.com/wesnoth/wesnoth/commit/376cd61cc50728f788aade92053e9a13535979e9
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 2db7a5f947d96fda57724a0d7127e9f528213174
https://github.com/wesnoth/wesnoth/commit/2db7a5f947d96fda57724a0d7127e9f528213174
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/image.cpp
Log Message:
-----------
Avoid temporary object when creating new textures from disk
Commit: b305b92b059f5bd47e876575b4c42ac88f1b7f0a
https://github.com/wesnoth/wesnoth/commit/b305b92b059f5bd47e876575b4c42ac88f1b7f0a
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/floating_label.cpp
Log Message:
-----------
Floating Labels: use new pango_text functionality for generating text outline
Commit: 2d44b11c25f10946bcb461f631ad58b4e583d190
https://github.com/wesnoth/wesnoth/commit/2d44b11c25f10946bcb461f631ad58b4e583d190
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 8609b7b51796c76c4d9ed8baf40b174a7d97f93d
https://github.com/wesnoth/wesnoth/commit/8609b7b51796c76c4d9ed8baf40b174a7d97f93d
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: f3427e7af93ed4ce640b11d3c1a40b4341cdbe45
https://github.com/wesnoth/wesnoth/commit/f3427e7af93ed4ce640b11d3c1a40b4341cdbe45
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 4857bc814eb542c823cb4a663932a538155cc86e
https://github.com/wesnoth/wesnoth/commit/4857bc814eb542c823cb4a663932a538155cc86e
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 7a87f13db32afa8d99735612e84338303470eeee
https://github.com/wesnoth/wesnoth/commit/7a87f13db32afa8d99735612e84338303470eeee
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/display.cpp
Log Message:
-----------
Display: simplified a few things
Commit: 09eb72e19688245a2bf1366fc518b53f6c5378dc
https://github.com/wesnoth/wesnoth/commit/09eb72e19688245a2bf1366fc518b53f6c5378dc
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 70b05aaf89a95b57746866a949bc714b17cb111d
https://github.com/wesnoth/wesnoth/commit/70b05aaf89a95b57746866a949bc714b17cb111d
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/display.cpp
Log Message:
-----------
Display: fixed moving units drawing under foreground terrains
Commit: 54306983b1f45a99173ca4837ccf43286daf8664
https://github.com/wesnoth/wesnoth/commit/54306983b1f45a99173ca4837ccf43286daf8664
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: c1e485381822dbd61531aaaabaf8109f4d2f9dde
https://github.com/wesnoth/wesnoth/commit/c1e485381822dbd61531aaaabaf8109f4d2f9dde
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: d7bec509c8099de815c0bf03803ae937c3597be0
https://github.com/wesnoth/wesnoth/commit/d7bec509c8099de815c0bf03803ae937c3597be0
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 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/lobby/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: 549229e2a28d40cfaabe0a585275c0596b3e793d
https://github.com/wesnoth/wesnoth/commit/549229e2a28d40cfaabe0a585275c0596b3e793d
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/font/text.cpp
Log Message:
-----------
Font/Pango Text: fixed a weird crash in Cairo
See added comment for details.
Commit: 54f00e4c14e0d9086c6b7c70fe9578f7d62af63e
https://github.com/wesnoth/wesnoth/commit/54f00e4c14e0d9086c6b7c70fe9578f7d62af63e
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/display.hpp
Log Message:
-----------
Display: exit render_scaled_to_zoom early if passed texture is null
Commit: f3eccda64747fa59bd3b877123f6b1367adf602a
https://github.com/wesnoth/wesnoth/commit/f3eccda64747fa59bd3b877123f6b1367adf602a
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 9b209972c67288bc11041bcbd918e76f938a1e3e
https://github.com/wesnoth/wesnoth/commit/9b209972c67288bc11041bcbd918e76f938a1e3e
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/halo.cpp
Log Message:
-----------
Halos: fixed incorrect drawing origin when at non-default zoom
Commit: f38346a4ab251a6aae18ffde23975aa4435971e0
https://github.com/wesnoth/wesnoth/commit/f38346a4ab251a6aae18ffde23975aa4435971e0
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: aed88d96c33c409be399c392e3eca91cf21462f1
https://github.com/wesnoth/wesnoth/commit/aed88d96c33c409be399c392e3eca91cf21462f1
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 46ef29ca30f50bc0abfb08cefaec837fb0033fa0
https://github.com/wesnoth/wesnoth/commit/46ef29ca30f50bc0abfb08cefaec837fb0033fa0
Author: Sofartin <hrubymar10 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M projectfiles/Xcode/Wesnoth.xcodeproj/project.pbxproj
Log Message:
-----------
Updated Xcode project for macOS targets
Commit: 79284d80bb2ce48f9a2b3da8cffde6fdd5601a94
https://github.com/wesnoth/wesnoth/commit/79284d80bb2ce48f9a2b3da8cffde6fdd5601a94
Author: Jyrki Vesterinen <sandgtx at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M projectfiles/VC12/wesnoth.vcxproj
M projectfiles/VC12/wesnoth.vcxproj.filters
M src/gui/core/canvas.cpp
M src/gui/core/canvas.hpp
M src/sdl/texture.cpp
M src/sdl/texture.hpp
Log Message:
-----------
Fix build with Visual Studio
Commit: caa494447a558da271dc7b4c5562c536a8b1024e
https://github.com/wesnoth/wesnoth/commit/caa494447a558da271dc7b4c5562c536a8b1024e
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/sdl/render_utils.hpp
Log Message:
-----------
Allow render_target_setter to restore the last target when destroyed
Commit: b0c80e0e88fa8b8e80cdf1df4520d1accb9b6792
https://github.com/wesnoth/wesnoth/commit/b0c80e0e88fa8b8e80cdf1df4520d1accb9b6792
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: a60739b0672b1f6e6237b642c6709be128926325
https://github.com/wesnoth/wesnoth/commit/a60739b0672b1f6e6237b642c6709be128926325
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 4b17654be5d25caac50b321a00a45a050a9a28ad
https://github.com/wesnoth/wesnoth/commit/4b17654be5d25caac50b321a00a45a050a9a28ad
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/CanvasL fixup 4ed729cf9c (use initializer list for move ctor)
Commit: 15bd8b76c05af7adcf3908cff0f06a61c806e261
https://github.com/wesnoth/wesnoth/commit/15bd8b76c05af7adcf3908cff0f06a61c806e261
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
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: 728fb47b83d513e44ffc54f09226341306d18d0c
https://github.com/wesnoth/wesnoth/commit/728fb47b83d513e44ffc54f09226341306d18d0c
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-07-27 (Thu, 27 Jul 2017)
Changed paths:
M src/gui/widgets/minimap.cpp
Log Message:
-----------
GUI2/Minimap: fixed a few issues with the new drawing impl
First, the gamemap ptr wasn't reset if map creation failed, meaning the last data set was drawn instead.
Secondly, if no valid map data was provided before the canvas_draw_background function was called, you'd
get a nullptr dereference.
This fix also means invalid maps aren't drawn in the Load Game dialog as before, since the canvas will
clear the texture before calling canvas_draw_background, which will now do nothing if map_ is null.
Compare: https://github.com/wesnoth/wesnoth/compare/09cfb83d0814...728fb47b83d5
More information about the Commits
mailing list