[Commits] [wesnoth/wesnoth] 7a7184: SDL/Window: set render scaling method to linear
GitHub
noreply at github.com
Sat Aug 12 08:39:17 UTC 2017
Branch: refs/heads/accelerated_rendering
Home: https://github.com/wesnoth/wesnoth
Commit: 7a7184451fe661920b785ce301a06cf995c470ae
https://github.com/wesnoth/wesnoth/commit/7a7184451fe661920b785ce301a06cf995c470ae
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: c6b5f049f7db114663e36127ccd0b007ae2e68c3
https://github.com/wesnoth/wesnoth/commit/c6b5f049f7db114663e36127ccd0b007ae2e68c3
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/video.cpp
Log Message:
-----------
Video: enabled accelerated rendering with texture target access
Commit: 8d56f1ebd768dc02167d7c5fac38914f3671b561
https://github.com/wesnoth/wesnoth/commit/8d56f1ebd768dc02167d7c5fac38914f3671b561
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 1da65414514058ab6b6c7abdb60194b8d2819865
https://github.com/wesnoth/wesnoth/commit/1da65414514058ab6b6c7abdb60194b8d2819865
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 514aa409f5cd3ed8be71375896292b232bf6b470
https://github.com/wesnoth/wesnoth/commit/514aa409f5cd3ed8be71375896292b232bf6b470
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: faca87943f5a79b58fd07fb4d950588f670221a5
https://github.com/wesnoth/wesnoth/commit/faca87943f5a79b58fd07fb4d950588f670221a5
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 1005a824606f4fbb638d5b78062e20e1231609bc
https://github.com/wesnoth/wesnoth/commit/1005a824606f4fbb638d5b78062e20e1231609bc
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: aa4755c804f1e74c5932d8d7a7e42db30e4d35bd
https://github.com/wesnoth/wesnoth/commit/aa4755c804f1e74c5932d8d7a7e42db30e4d35bd
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 8bc14a85a5d43f8dc618aeb6e993c7796a7a414c
https://github.com/wesnoth/wesnoth/commit/8bc14a85a5d43f8dc618aeb6e993c7796a7a414c
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/font/text.cpp
Log Message:
-----------
Hack to get text to render right
Commit: 2c53230a7b29f6f51a6020f7ae1a31024b512bba
https://github.com/wesnoth/wesnoth/commit/2c53230a7b29f6f51a6020f7ae1a31024b512bba
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: a2b5d7a32b605d44a882cb56e06215582cb0b5bb
https://github.com/wesnoth/wesnoth/commit/a2b5d7a32b605d44a882cb56e06215582cb0b5bb
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 570c6a6a52925a10d27e4387d235cd6a8ee105f1
https://github.com/wesnoth/wesnoth/commit/570c6a6a52925a10d27e4387d235cd6a8ee105f1
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/gui/widgets/window.cpp
Log Message:
-----------
Removed some debug output
[ci skip]
Commit: 015618cfa80ec04008bba2cdfbf423c5db3ce49b
https://github.com/wesnoth/wesnoth/commit/015618cfa80ec04008bba2cdfbf423c5db3ce49b
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: b1a166f5a42e25473d81eb6d5225a7a123bcfebe
https://github.com/wesnoth/wesnoth/commit/b1a166f5a42e25473d81eb6d5225a7a123bcfebe
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/gui/core/event/handler.cpp
Log Message:
-----------
Small code simplification
Commit: c050249864a882bae11626a8c1e814d5c1039771
https://github.com/wesnoth/wesnoth/commit/c050249864a882bae11626a8c1e814d5c1039771
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: add error logging if canvas texture creation fails
Commit: 55bcd0255fb0724d50d4ad7cba20aa83c75d43b1
https://github.com/wesnoth/wesnoth/commit/55bcd0255fb0724d50d4ad7cba20aa83c75d43b1
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: cee04cc080cae5c18bbb5c5f199eb8211e8715c3
https://github.com/wesnoth/wesnoth/commit/cee04cc080cae5c18bbb5c5f199eb8211e8715c3
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/gui/widgets/minimap.cpp
Log Message:
-----------
GUI2/Minimap: quick fix to get the minimap drawing again
Commit: d7723e71c5f56d80cec06bbd7059873930f646d1
https://github.com/wesnoth/wesnoth/commit/d7723e71c5f56d80cec06bbd7059873930f646d1
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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
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: 30686f1824d7bec6664b24de09b9117da9de8233
https://github.com/wesnoth/wesnoth/commit/30686f1824d7bec6664b24de09b9117da9de8233
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/video.cpp
Log Message:
-----------
CVideo: convert blit_surface to handle input as textures instead of blitting to framebuffer
Commit: ecfe7ba2bd360c4f0ee12e8c80fc984e75d73aa4
https://github.com/wesnoth/wesnoth/commit/ecfe7ba2bd360c4f0ee12e8c80fc984e75d73aa4
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: e055148024f7f4ca2242d8a2e7245c41adeea38a
https://github.com/wesnoth/wesnoth/commit/e055148024f7f4ca2242d8a2e7245c41adeea38a
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 8243931ee8f694b17b0cace419efed1fdeff6eaf
https://github.com/wesnoth/wesnoth/commit/8243931ee8f694b17b0cace419efed1fdeff6eaf
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 41a8f67323980394f11b5fde98f9018762db5a75
https://github.com/wesnoth/wesnoth/commit/41a8f67323980394f11b5fde98f9018762db5a75
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: e054e5c8b27f3f69c4599218c7d0192943772ccd
https://github.com/wesnoth/wesnoth/commit/e054e5c8b27f3f69c4599218c7d0192943772ccd
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 6fea8660da00bad01255eb14e01d1aaf942445f5
https://github.com/wesnoth/wesnoth/commit/6fea8660da00bad01255eb14e01d1aaf942445f5
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 3fa57d45f5cedcd8dfe34e6878034d803e5e8734
https://github.com/wesnoth/wesnoth/commit/3fa57d45f5cedcd8dfe34e6878034d803e5e8734
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/gui/widgets/minimap.cpp
Log Message:
-----------
GUI2/Miniap: draw any provided canvas data before the minimap
Commit: bfb25386e10fd62e1d92ec40bd3709441ca16ba4
https://github.com/wesnoth/wesnoth/commit/bfb25386e10fd62e1d92ec40bd3709441ca16ba4
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 68b6547e06421beaa37af56ba77e365deffcb221
https://github.com/wesnoth/wesnoth/commit/68b6547e06421beaa37af56ba77e365deffcb221
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: b7a263f8ecf82fca64f34be5f6b10011c271522b
https://github.com/wesnoth/wesnoth/commit/b7a263f8ecf82fca64f34be5f6b10011c271522b
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: dbac9db359a1493bf59b94299f64f43840e09f41
https://github.com/wesnoth/wesnoth/commit/dbac9db359a1493bf59b94299f64f43840e09f41
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 23891e721eb4a5a188c8d685329a43f5945529a1
https://github.com/wesnoth/wesnoth/commit/23891e721eb4a5a188c8d685329a43f5945529a1
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/units/drawer.cpp
Log Message:
-----------
Draw units under bars/orbs/etc
Commit: 23b0fdb9512f7bcb5269686686b763634fc1e35d
https://github.com/wesnoth/wesnoth/commit/23b0fdb9512f7bcb5269686686b763634fc1e35d
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 8dc4be673568d92ad03917a380ea9a6efc030850
https://github.com/wesnoth/wesnoth/commit/8dc4be673568d92ad03917a380ea9a6efc030850
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: made use of CVideo::render_copy
Commit: def99257725d5f7fecaa7dde4880af1e1b613d04
https://github.com/wesnoth/wesnoth/commit/def99257725d5f7fecaa7dde4880af1e1b613d04
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: a376afa4dbb9b0a64ab96de76b52ad3d587d71b0
https://github.com/wesnoth/wesnoth/commit/a376afa4dbb9b0a64ab96de76b52ad3d587d71b0
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/units/drawer.cpp
Log Message:
-----------
Uint: fixed bad bar alpha on unit mouseover
Commit: e937e5609de90bb041af47ea1c5fdc85dc20e208
https://github.com/wesnoth/wesnoth/commit/e937e5609de90bb041af47ea1c5fdc85dc20e208
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 9307697bde29f9ecdb42810735742991f3439df1
https://github.com/wesnoth/wesnoth/commit/9307697bde29f9ecdb42810735742991f3439df1
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 98720b9bb22b4aa157e75d7c5559b089e8279412
https://github.com/wesnoth/wesnoth/commit/98720b9bb22b4aa157e75d7c5559b089e8279412
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 195aa9f1c38ee1cf5b8f664c5a7abcc8833d5094
https://github.com/wesnoth/wesnoth/commit/195aa9f1c38ee1cf5b8f664c5a7abcc8833d5094
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: cf90f0a0a0fc61553896aa585c3f5e72cf455a63
https://github.com/wesnoth/wesnoth/commit/cf90f0a0a0fc61553896aa585c3f5e72cf455a63
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 1cbc71e485f376a55ee650226798075ffd1c0579
https://github.com/wesnoth/wesnoth/commit/1cbc71e485f376a55ee650226798075ffd1c0579
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/display.cpp
Log Message:
-----------
Enabled more stuff drawing
Hex overlay, map items, fog/shroud transitions.
Commit: ab5725303ce0f45a1f36d66bca88cd63465edd9f
https://github.com/wesnoth/wesnoth/commit/ab5725303ce0f45a1f36d66bca88cd63465edd9f
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: ce33384068ec4c5e9275994a3be4fd27f6a4ed48
https://github.com/wesnoth/wesnoth/commit/ce33384068ec4c5e9275994a3be4fd27f6a4ed48
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/units/drawer.cpp
Log Message:
-----------
Units: fixed bad HP/XP bars fill rect offset
Commit: 8049eade8cf6f429d0de76a1a9ec3c11724fd5a0
https://github.com/wesnoth/wesnoth/commit/8049eade8cf6f429d0de76a1a9ec3c11724fd5a0
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: fixed mirrored images being flipped on the wrong axis.
Commit: 87ac6ce301fea79eb26e38a307b800a5b9e6cc6c
https://github.com/wesnoth/wesnoth/commit/87ac6ce301fea79eb26e38a307b800a5b9e6cc6c
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/display.cpp
Log Message:
-----------
Cleaned up the implementation of display::scroll()
Commit: 092d6566af17f1e73575b305b0abde92ec4ddf21
https://github.com/wesnoth/wesnoth/commit/092d6566af17f1e73575b305b0abde92ec4ddf21
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 68a97138ce806e75beb5c29defddce0115126efb
https://github.com/wesnoth/wesnoth/commit/68a97138ce806e75beb5c29defddce0115126efb
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: f1cdc98ab5bd48cb2e8f27c47a3118f15c557004
https://github.com/wesnoth/wesnoth/commit/f1cdc98ab5bd48cb2e8f27c47a3118f15c557004
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/display.cpp
Log Message:
-----------
Trim ToD images to hex
Commit: ee099f09f6a5002360c6941df7dad86fcc64ce40
https://github.com/wesnoth/wesnoth/commit/ee099f09f6a5002360c6941df7dad86fcc64ce40
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: a3b8f23aaa55559b4528468f97ca2672f3e3da96
https://github.com/wesnoth/wesnoth/commit/a3b8f23aaa55559b4528468f97ca2672f3e3da96
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 0f8b06368b4e149e2b3a12922cb5306f4a2e8fc9
https://github.com/wesnoth/wesnoth/commit/0f8b06368b4e149e2b3a12922cb5306f4a2e8fc9
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 7cb73db92ae3c6442cecd2d9f5b228872b16a5be
https://github.com/wesnoth/wesnoth/commit/7cb73db92ae3c6442cecd2d9f5b228872b16a5be
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: e12200d17ec3e5a162ad6c5808875cc6a2d47e23
https://github.com/wesnoth/wesnoth/commit/e12200d17ec3e5a162ad6c5808875cc6a2d47e23
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 83b9625fc05b86445bc0546f98e14403baa7b97f
https://github.com/wesnoth/wesnoth/commit/83b9625fc05b86445bc0546f98e14403baa7b97f
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 7ffa724401774acb2bb620006d24bae626f53b04
https://github.com/wesnoth/wesnoth/commit/7ffa724401774acb2bb620006d24bae626f53b04
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 397051a920a5f0b2d37b7848774988ccd85a77c1
https://github.com/wesnoth/wesnoth/commit/397051a920a5f0b2d37b7848774988ccd85a77c1
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 1a9b8f1a22e472a75f951a947560a6effd0e31ac
https://github.com/wesnoth/wesnoth/commit/1a9b8f1a22e472a75f951a947560a6effd0e31ac
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 97fe2c4390757217ca3f8116baa67fbcf75216b8
https://github.com/wesnoth/wesnoth/commit/97fe2c4390757217ca3f8116baa67fbcf75216b8
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 88eff03e0dc935cc4d05b6dd70c733559543c9cc
https://github.com/wesnoth/wesnoth/commit/88eff03e0dc935cc4d05b6dd70c733559543c9cc
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: bfcc6bf7f454a94e1cf38b766ce424064338f602
https://github.com/wesnoth/wesnoth/commit/bfcc6bf7f454a94e1cf38b766ce424064338f602
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
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: ceedc5cb8b706341070992c1a081b4c3c987480f
https://github.com/wesnoth/wesnoth/commit/ceedc5cb8b706341070992c1a081b4c3c987480f
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 8dd72e2fbff7b68841f2e0216c3eb4c4ae9ed953
https://github.com/wesnoth/wesnoth/commit/8dd72e2fbff7b68841f2e0216c3eb4c4ae9ed953
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: f29a9ca910c050dc36856a6e8ec64ae03817ca4c
https://github.com/wesnoth/wesnoth/commit/f29a9ca910c050dc36856a6e8ec64ae03817ca4c
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: c420971693a40605c00670ffab3fc182c9ecef15
https://github.com/wesnoth/wesnoth/commit/c420971693a40605c00670ffab3fc182c9ecef15
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/floating_label.cpp
Log Message:
-----------
Floating Label: formatting update
Commit: d498f54ebdb40dc8466668470133de169ec3354c
https://github.com/wesnoth/wesnoth/commit/d498f54ebdb40dc8466668470133de169ec3354c
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 246ae97fcd80549a323947187bea2e85ba219a56
https://github.com/wesnoth/wesnoth/commit/246ae97fcd80549a323947187bea2e85ba219a56
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: d8f6c313c63ed485c544ac645e37bb04e6a57f43
https://github.com/wesnoth/wesnoth/commit/d8f6c313c63ed485c544ac645e37bb04e6a57f43
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 9d38ce6edc7dc503a0c2a21fc75b1288297cf3ed
https://github.com/wesnoth/wesnoth/commit/9d38ce6edc7dc503a0c2a21fc75b1288297cf3ed
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 0768973520b4166faf4061e6c53cc9510014976f
https://github.com/wesnoth/wesnoth/commit/0768973520b4166faf4061e6c53cc9510014976f
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 9393c9951483ecf8c43b39a834f2501d82d68142
https://github.com/wesnoth/wesnoth/commit/9393c9951483ecf8c43b39a834f2501d82d68142
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/display.cpp
Log Message:
-----------
Fixed halos drawing over fog and shroud (fixes #1406)
Commit: 95df2106815368764059404e293005f2b8f9f0ea
https://github.com/wesnoth/wesnoth/commit/95df2106815368764059404e293005f2b8f9f0ea
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 2c308addf3186631b469bafdda2a506eecc50eb4
https://github.com/wesnoth/wesnoth/commit/2c308addf3186631b469bafdda2a506eecc50eb4
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 1aa94cc4a910e5f4ff8a294a35b303e94ea82a7d
https://github.com/wesnoth/wesnoth/commit/1aa94cc4a910e5f4ff8a294a35b303e94ea82a7d
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 99faf30ff674edd9323459b2778e5a85f1bc52fa
https://github.com/wesnoth/wesnoth/commit/99faf30ff674edd9323459b2778e5a85f1bc52fa
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: c2bc7c5144cd121d29ef6fbf917f39912be949eb
https://github.com/wesnoth/wesnoth/commit/c2bc7c5144cd121d29ef6fbf917f39912be949eb
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: a011eb0e69a21ecc63de10db2218c732a183578d
https://github.com/wesnoth/wesnoth/commit/a011eb0e69a21ecc63de10db2218c732a183578d
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: bc36f6276bcce63026b89da30d83f0e022b06efd
https://github.com/wesnoth/wesnoth/commit/bc36f6276bcce63026b89da30d83f0e022b06efd
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: cdde28469a48810fb4a265a162b5c403851bc001
https://github.com/wesnoth/wesnoth/commit/cdde28469a48810fb4a265a162b5c403851bc001
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: fd745b8cfa055a679cc2234846c1039e3eb4c33a
https://github.com/wesnoth/wesnoth/commit/fd745b8cfa055a679cc2234846c1039e3eb4c33a
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/video.cpp
Log Message:
-----------
Video: don't render null textures
Commit: f47dac32e7947408d9742a9b452195e026f4248f
https://github.com/wesnoth/wesnoth/commit/f47dac32e7947408d9742a9b452195e026f4248f
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: acc5fb00465f20df04c7d2bebea65494c7d54024
https://github.com/wesnoth/wesnoth/commit/acc5fb00465f20df04c7d2bebea65494c7d54024
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 4c7510b83ff36a442ac84c6e0e50d2be63087dc3
https://github.com/wesnoth/wesnoth/commit/4c7510b83ff36a442ac84c6e0e50d2be63087dc3
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 4add8acc405bea1e29fbd06ee6f37c9ddeb57d25
https://github.com/wesnoth/wesnoth/commit/4add8acc405bea1e29fbd06ee6f37c9ddeb57d25
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 34fa0ac4f2fc085cc86375c7c17fc16551c33acd
https://github.com/wesnoth/wesnoth/commit/34fa0ac4f2fc085cc86375c7c17fc16551c33acd
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/display.hpp
M src/gui/core/event/handler.cpp
Log Message:
-----------
Marked sdl_handler::draw overrides as final
Commit: 029b648d378b9dfe31d453bca432f848a83de68d
https://github.com/wesnoth/wesnoth/commit/029b648d378b9dfe31d453bca432f848a83de68d
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 088d21d119b8ad7b13eebbb80093029fea02d03b
https://github.com/wesnoth/wesnoth/commit/088d21d119b8ad7b13eebbb80093029fea02d03b
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/display.cpp
Log Message:
-----------
Display: re-enable fps counter with :fps
Commit: d6473b84dfbbbf213855fac813277cd8f87e89e8
https://github.com/wesnoth/wesnoth/commit/d6473b84dfbbbf213855fac813277cd8f87e89e8
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: don't skip drawing if canvas texture is null
Commit: cd16243d0e00e7fab44d678a87c6b876ec52c092
https://github.com/wesnoth/wesnoth/commit/cd16243d0e00e7fab44d678a87c6b876ec52c092
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: c945a5ae0c8444c750582fb9872d66bccb4bed7a
https://github.com/wesnoth/wesnoth/commit/c945a5ae0c8444c750582fb9872d66bccb4bed7a
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/floating_label.cpp
M src/floating_label.hpp
Log Message:
-----------
Floating Label: header formatting updates
Commit: 0f74213cd0029521068c7adeaf5729b933209396
https://github.com/wesnoth/wesnoth/commit/0f74213cd0029521068c7adeaf5729b933209396
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 702148644675e02402877007474989a186706dfe
https://github.com/wesnoth/wesnoth/commit/702148644675e02402877007474989a186706dfe
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 2d2c1187d11c46cb7d8fb3bd096c4f0ba65c59da
https://github.com/wesnoth/wesnoth/commit/2d2c1187d11c46cb7d8fb3bd096c4f0ba65c59da
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 015a4f1fa575b1b0e71dc3240017cdc5af42d470
https://github.com/wesnoth/wesnoth/commit/015a4f1fa575b1b0e71dc3240017cdc5af42d470
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 7f7d6e06db3a07b08b8710a0e55bc4cf6a8cc491
https://github.com/wesnoth/wesnoth/commit/7f7d6e06db3a07b08b8710a0e55bc4cf6a8cc491
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/image.cpp
Log Message:
-----------
Avoid temporary object when creating new textures from disk
Commit: 4a575da941dce77845d409e16475610af768ab92
https://github.com/wesnoth/wesnoth/commit/4a575da941dce77845d409e16475610af768ab92
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/floating_label.cpp
Log Message:
-----------
Floating Labels: use new pango_text functionality for generating text outline
Commit: bea0b1d75a8335a88937997d1a5bec1df7a85e2d
https://github.com/wesnoth/wesnoth/commit/bea0b1d75a8335a88937997d1a5bec1df7a85e2d
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 8ddd210a749e22c80128d2de549eab8d2edc27ad
https://github.com/wesnoth/wesnoth/commit/8ddd210a749e22c80128d2de549eab8d2edc27ad
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: ef50c05d13cd2612510c088bbe420122d8c07eeb
https://github.com/wesnoth/wesnoth/commit/ef50c05d13cd2612510c088bbe420122d8c07eeb
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 89086f466663f3a406551be0f56af32d5946ddfd
https://github.com/wesnoth/wesnoth/commit/89086f466663f3a406551be0f56af32d5946ddfd
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 6259957a054d98cef5150cdcdd99f7b24b18973c
https://github.com/wesnoth/wesnoth/commit/6259957a054d98cef5150cdcdd99f7b24b18973c
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/display.cpp
Log Message:
-----------
Display: simplified a few things
Commit: 16105981fdb48c5d515f4e919641b6be1177a4e5
https://github.com/wesnoth/wesnoth/commit/16105981fdb48c5d515f4e919641b6be1177a4e5
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 641f626ab8d87bcbdb42fe1f283ab40cc38799e5
https://github.com/wesnoth/wesnoth/commit/641f626ab8d87bcbdb42fe1f283ab40cc38799e5
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/display.cpp
Log Message:
-----------
Display: fixed moving units drawing under foreground terrains
Commit: c0e8107be61c325e05c8cc914d98d433928ccef7
https://github.com/wesnoth/wesnoth/commit/c0e8107be61c325e05c8cc914d98d433928ccef7
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: e65840f3e719ab1e83a31054fd9ca2418f3873e5
https://github.com/wesnoth/wesnoth/commit/e65840f3e719ab1e83a31054fd9ca2418f3873e5
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: e99651287b598eccd0cff2db3b1982b3e99288ac
https://github.com/wesnoth/wesnoth/commit/e99651287b598eccd0cff2db3b1982b3e99288ac
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 264d2ad957811e0613b3b7f4fe4cab4617ab021b
https://github.com/wesnoth/wesnoth/commit/264d2ad957811e0613b3b7f4fe4cab4617ab021b
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: a35397d8acab75e4cac67af7d3e352833c51c38d
https://github.com/wesnoth/wesnoth/commit/a35397d8acab75e4cac67af7d3e352833c51c38d
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/display.hpp
Log Message:
-----------
Display: exit render_scaled_to_zoom early if passed texture is null
Commit: c005f175893734cad0e8e70c0de9baf340390a20
https://github.com/wesnoth/wesnoth/commit/c005f175893734cad0e8e70c0de9baf340390a20
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: d2a31947d941339c02c368eb871ee5304d6fa5d7
https://github.com/wesnoth/wesnoth/commit/d2a31947d941339c02c368eb871ee5304d6fa5d7
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/halo.cpp
Log Message:
-----------
Halos: fixed incorrect drawing origin when at non-default zoom
Commit: 523ae56b178e8b51e624b6209c9b3f4283a41849
https://github.com/wesnoth/wesnoth/commit/523ae56b178e8b51e624b6209c9b3f4283a41849
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 12130874310f0740d376bcac8cb51a6d93c5ba4e
https://github.com/wesnoth/wesnoth/commit/12130874310f0740d376bcac8cb51a6d93c5ba4e
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 49fb7edb461195791de654e2be8e9a4ef5842dd6
https://github.com/wesnoth/wesnoth/commit/49fb7edb461195791de654e2be8e9a4ef5842dd6
Author: Sofartin <hrubymar10 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M projectfiles/Xcode/Wesnoth.xcodeproj/project.pbxproj
Log Message:
-----------
Updated Xcode project for macOS targets
Commit: 1402bb838040748bff0c606ca172408302bc037c
https://github.com/wesnoth/wesnoth/commit/1402bb838040748bff0c606ca172408302bc037c
Author: Jyrki Vesterinen <sandgtx at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: c0bea347a9fa1ca49d85da414adcc2e0426190f4
https://github.com/wesnoth/wesnoth/commit/c0bea347a9fa1ca49d85da414adcc2e0426190f4
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/sdl/render_utils.hpp
Log Message:
-----------
Allow render_target_setter to restore the last target when destroyed
Commit: c4e5774514136eec3401ff5e45b4065ff9afafe8
https://github.com/wesnoth/wesnoth/commit/c4e5774514136eec3401ff5e45b4065ff9afafe8
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 381b1b6995d3f8511144a6d40786b2d15ac08e00
https://github.com/wesnoth/wesnoth/commit/381b1b6995d3f8511144a6d40786b2d15ac08e00
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: cae49252fe4deaa4c4aae8f566dc6c9b67df1b22
https://github.com/wesnoth/wesnoth/commit/cae49252fe4deaa4c4aae8f566dc6c9b67df1b22
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/CanvasL fixup 4ed729cf9c (use initializer list for move ctor)
Commit: d76fb3c21be97c0330763e495946953be13c7cf6
https://github.com/wesnoth/wesnoth/commit/d76fb3c21be97c0330763e495946953be13c7cf6
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 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: 23ae1a66c7158c3e7c198eb34508f5dd4b618e6a
https://github.com/wesnoth/wesnoth/commit/23ae1a66c7158c3e7c198eb34508f5dd4b618e6a
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/gui/widgets/window.cpp
M src/gui/widgets/window.hpp
Log Message:
-----------
GUI2/Window: removed now-unused members
Neither of these are necessary with the accelerated rendering drawing refactor of GUI2.
Commit: fff5bdb328f581c244516ce1b2497f0912fa8e1c
https://github.com/wesnoth/wesnoth/commit/fff5bdb328f581c244516ce1b2497f0912fa8e1c
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/gui/dialogs/command_console.cpp
M src/gui/dialogs/command_console.hpp
Log Message:
-----------
GUI2/Command Console: small cleanup/fixup
* Ensured display() only executes if the singleton is null. That ensures there's no way a console can be
overridden while one is open.
* Removed the manual call to hide(). The modeless_dialog dtor handled calling that already.
Commit: 7d105ecbabf26f28faff483f520b311bc1e41606
https://github.com/wesnoth/wesnoth/commit/7d105ecbabf26f28faff483f520b311bc1e41606
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/units/frame.cpp
Log Message:
-----------
Unit/Frame: fixed alpha mods being applied to all units of the same type
Commit: 2c67369c2aae2abeffd3742d4002d4d910d5ecca
https://github.com/wesnoth/wesnoth/commit/2c67369c2aae2abeffd3742d4002d4d910d5ecca
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
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: 55d0da69d9719420ea50332459233fdd1beec264
https://github.com/wesnoth/wesnoth/commit/55d0da69d9719420ea50332459233fdd1beec264
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
Changed paths:
M src/game_display.cpp
Log Message:
-----------
Game Display: formatting update
Commit: c2391c1b5e06b68916b5d29fb87795e9ee04b17d
https://github.com/wesnoth/wesnoth/commit/c2391c1b5e06b68916b5d29fb87795e9ee04b17d
Author: Charles Dang <exodia339 at gmail.com>
Date: 2017-08-12 (Sat, 12 Aug 2017)
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.
Compare: https://github.com/wesnoth/wesnoth/compare/be0c0c296ea9...c2391c1b5e06
More information about the Commits
mailing list