[wesnoth-commits] [wesnoth/wesnoth] 9603b4: SDL/Window: set render scaling method to linear
GitHub
noreply at github.com
Thu Mar 8 09:17:51 UTC 2018
Branch: refs/heads/accelerated_rendering
Home: https://github.com/wesnoth/wesnoth
Commit: 9603b44c2b1b65229048782819655d213ff012fd
https://github.com/wesnoth/wesnoth/commit/9603b44c2b1b65229048782819655d213ff012fd
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/sdl/window.cpp
Log Message:
-----------
SDL/Window: set render scaling method to linear
This looks better than NN scaling (default);
Commit: 7009cae0cf4afb08e084fdd7639aa2845a35a82e
https://github.com/wesnoth/wesnoth/commit/7009cae0cf4afb08e084fdd7639aa2845a35a82e
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/video.cpp
Log Message:
-----------
Video: enabled accelerated rendering with texture target access
Commit: 3f47a5cd296e8ac676aac4e95471800e664bd295
https://github.com/wesnoth/wesnoth/commit/3f47a5cd296e8ac676aac4e95471800e664bd295
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M data/gui/widget/button_default.cfg
M src/gui/core/canvas.cpp
M src/gui/core/canvas.hpp
M src/gui/core/canvas_private.hpp
M src/gui/core/event/handler.cpp
M src/gui/widgets/widget.cpp
M src/gui/widgets/window.cpp
Log Message:
-----------
GUI2/Canvas: refactor surface blitting out of drawing routines
This entirely refactors surface blitting out of the canvas. Instead, each canvas owns a texture. This texture
is completely redrawn any time the canvas if marked dirty, else the result is cached and drawn to the screen
each draw cycle.
All windows are now redrawn every draw cycle. The use of the cached canvas textures means there's no noticeable
performance difference (likely a performance gain, actually) from using surface blitting.
There's still some code to clean up and a few things to fix.
Commit: 8f355d7a3c4b48c895b72994fabafe47059d24c3
https://github.com/wesnoth/wesnoth/commit/8f355d7a3c4b48c895b72994fabafe47059d24c3
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/widgets/window.cpp
Log Message:
-----------
GUI2/Window: re-implement drawing and removed commented-out restore code
We don't need all this dirty list or handling or surface restoration anymore.
Commit: 9105fdec1a078e605a426ee1e3e7f19fec2bc85d
https://github.com/wesnoth/wesnoth/commit/9105fdec1a078e605a426ee1e3e7f19fec2bc85d
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/dialogs/modal_dialog.cpp
M src/gui/widgets/window.cpp
M src/gui/widgets/window.hpp
M src/scripting/lua_gui2.cpp
Log Message:
-----------
GUI2/Window: removed restore flag and restorer surface
Commit: f3bb018d0108598e186cc4075dd0d0d20fb6a8af
https://github.com/wesnoth/wesnoth/commit/f3bb018d0108598e186cc4075dd0d0d20fb6a8af
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/addon/manager_ui.cpp
M src/gui/dialogs/addon/connect.cpp
M src/gui/dialogs/addon/uninstall_list.cpp
M src/gui/dialogs/campaign_difficulty.cpp
M src/gui/dialogs/campaign_selection.hpp
M src/gui/dialogs/drop_down_menu.hpp
M src/gui/dialogs/file_dialog.cpp
M src/gui/dialogs/game_delete.cpp
M src/gui/dialogs/game_save.cpp
M src/gui/dialogs/hotkey_bind.cpp
M src/gui/dialogs/log_settings.cpp
M src/gui/dialogs/message.cpp
M src/gui/dialogs/modal_dialog.cpp
M src/gui/dialogs/modal_dialog.hpp
M src/gui/dialogs/multiplayer/mp_connect.cpp
M src/gui/dialogs/multiplayer/mp_host_game_prompt.cpp
M src/gui/dialogs/network_transmission.cpp
M src/gui/dialogs/preferences_dialog.cpp
M src/gui/dialogs/sp_options_configure.cpp
M src/gui/dialogs/statistics_dialog.cpp
M src/gui/dialogs/surrender_quit.cpp
M src/gui/dialogs/title_screen.cpp
M src/gui/dialogs/transient_message.cpp
M src/gui/dialogs/transient_message.hpp
M src/gui/dialogs/unit_create.cpp
M src/gui/dialogs/wml_error.cpp
M src/gui/dialogs/wml_message.cpp
Log Message:
-----------
GUI2/Modal Dialog: removed set_restore interface
This was used to set the restore argument of gui2::window::show. It's not needed anymore
since the window class no longer uses surface restoring.
Commit: 21e16175cc9d82fe87dc72244db5a0b633491945
https://github.com/wesnoth/wesnoth/commit/21e16175cc9d82fe87dc72244db5a0b633491945
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/core/event/handler.cpp
M src/gui/dialogs/debug_clock.cpp
M src/gui/dialogs/editor/custom_tod.cpp
M src/gui/dialogs/lua_interpreter.cpp
M src/gui/dialogs/outro.cpp
M src/gui/dialogs/story_viewer.cpp
M src/gui/dialogs/story_viewer.hpp
M src/gui/dialogs/title_screen.cpp
M src/gui/widgets/button.cpp
M src/gui/widgets/container_base.cpp
M src/gui/widgets/container_base.hpp
M src/gui/widgets/generator.hpp
M src/gui/widgets/generator_private.hpp
M src/gui/widgets/grid.cpp
M src/gui/widgets/grid.hpp
M src/gui/widgets/label.cpp
M src/gui/widgets/list.cpp
M src/gui/widgets/listbox.cpp
M src/gui/widgets/listbox.hpp
M src/gui/widgets/matrix.cpp
M src/gui/widgets/matrix.hpp
M src/gui/widgets/menu_button.cpp
M src/gui/widgets/minimap.hpp
M src/gui/widgets/multimenu_button.cpp
M src/gui/widgets/pane.cpp
M src/gui/widgets/pane.hpp
M src/gui/widgets/progress_bar.cpp
M src/gui/widgets/repeating_button.cpp
M src/gui/widgets/scrollbar.cpp
M src/gui/widgets/scrollbar_container.cpp
M src/gui/widgets/scrollbar_container.hpp
M src/gui/widgets/slider.hpp
M src/gui/widgets/slider_base.cpp
M src/gui/widgets/styled_widget.cpp
M src/gui/widgets/text_box.cpp
M src/gui/widgets/text_box_base.cpp
M src/gui/widgets/toggle_button.cpp
M src/gui/widgets/toggle_panel.cpp
M src/gui/widgets/tree_view.cpp
M src/gui/widgets/tree_view.hpp
M src/gui/widgets/tree_view_node.cpp
M src/gui/widgets/tree_view_node.hpp
M src/gui/widgets/viewport.cpp
M src/gui/widgets/viewport.hpp
M src/gui/widgets/widget.cpp
M src/gui/widgets/widget.hpp
M src/gui/widgets/window.cpp
M src/gui/widgets/window.hpp
M src/scripting/lua_gui2.cpp
Log Message:
-----------
GUI2: removed dirty widget interface
This is no longer needed since we redraw everything every frame. The dirty flag in the canvas remains
as that controls whether the cached texture is used or recreated.
Commit: 34d70e4c8a9217e059daeb8c0d19a342aa23e4b6
https://github.com/wesnoth/wesnoth/commit/34d70e4c8a9217e059daeb8c0d19a342aa23e4b6
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
M src/gui/core/canvas.hpp
M src/gui/widgets/panel.cpp
M src/gui/widgets/styled_widget.cpp
Log Message:
-----------
GUI2/Canvas: renamed blit function and removed surface argument
Commit: e254be36eda3b2f0b6446390c4a3d1f3a62dd436
https://github.com/wesnoth/wesnoth/commit/e254be36eda3b2f0b6446390c4a3d1f3a62dd436
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/widgets/container_base.cpp
M src/gui/widgets/container_base.hpp
M src/gui/widgets/generator.hpp
M src/gui/widgets/generator_private.hpp
M src/gui/widgets/grid.cpp
M src/gui/widgets/grid.hpp
M src/gui/widgets/matrix.cpp
M src/gui/widgets/matrix.hpp
M src/gui/widgets/minimap.cpp
M src/gui/widgets/minimap.hpp
M src/gui/widgets/multi_page.cpp
M src/gui/widgets/multi_page.hpp
M src/gui/widgets/pane.cpp
M src/gui/widgets/pane.hpp
M src/gui/widgets/panel.cpp
M src/gui/widgets/panel.hpp
M src/gui/widgets/scrollbar_container.cpp
M src/gui/widgets/scrollbar_container.hpp
M src/gui/widgets/spacer.cpp
M src/gui/widgets/spacer.hpp
M src/gui/widgets/styled_widget.cpp
M src/gui/widgets/styled_widget.hpp
M src/gui/widgets/toggle_panel.cpp
M src/gui/widgets/toggle_panel.hpp
M src/gui/widgets/tree_view_node.cpp
M src/gui/widgets/tree_view_node.hpp
M src/gui/widgets/viewport.cpp
M src/gui/widgets/viewport.hpp
M src/gui/widgets/widget.cpp
M src/gui/widgets/widget.hpp
M src/gui/widgets/window.cpp
Log Message:
-----------
GUI2: removed framebuffer code from draw impl functions
Commit: b7fa0a46d4143f3040e2f473cdf950b7a342ee80
https://github.com/wesnoth/wesnoth/commit/b7fa0a46d4143f3040e2f473cdf950b7a342ee80
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/font/text.cpp
Log Message:
-----------
Hack to get text to render right
Commit: 4910d1392c679b5344fbeefcdc532f969565efb8
https://github.com/wesnoth/wesnoth/commit/4910d1392c679b5344fbeefcdc532f969565efb8
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
M src/gui/core/canvas.hpp
M src/gui/widgets/panel.cpp
M src/gui/widgets/styled_widget.cpp
M src/gui/widgets/widget.cpp
M src/gui/widgets/widget.hpp
Log Message:
-----------
GUI2: refactored viewport setting and re-added clip rect setting
It turns out I had removed the clip rect setting in error; it prevented items in, say, a listbox from drawing
outside the widget's boundaries. I've re-added that now.
I've also moved viewport setting to the same place. It turns out it didn't need to be set every canvas draw.
The only reason the old code was passing the blitting rect to the canvas was it was needed for the sdl_blit call.
Since I can now set the viewport independent of a canvas state, there's no longer a need to set the viewport in
the canvas.
Commit: 2b1361f909477c3cc14d8ae7759e14e53e1f5315
https://github.com/wesnoth/wesnoth/commit/2b1361f909477c3cc14d8ae7759e14e53e1f5315
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/widgets/window.cpp
Log Message:
-----------
Removed some debug output
[ci skip]
Commit: ee15ad1c21550169f0b683c8e50871cfb6ee6cfc
https://github.com/wesnoth/wesnoth/commit/ee15ad1c21550169f0b683c8e50871cfb6ee6cfc
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: removed surface_lock objects
The canvas surface isn't even passed to these functions anymore so I have no idea how this built.
Commit: b0f464e4f8ca0bc5f83d546d667715431a0e992c
https://github.com/wesnoth/wesnoth/commit/b0f464e4f8ca0bc5f83d546d667715431a0e992c
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/core/event/handler.cpp
Log Message:
-----------
Small code simplification
Commit: 065c6e6f65eafb50e3f648660a4f6cebfef8d9aa
https://github.com/wesnoth/wesnoth/commit/065c6e6f65eafb50e3f648660a4f6cebfef8d9aa
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: add error logging if canvas texture creation fails
Commit: 97784e41595807435d3518639196bbe77bcf4144
https://github.com/wesnoth/wesnoth/commit/97784e41595807435d3518639196bbe77bcf4144
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M projectfiles/CodeBlocks/wesnoth.cbp
M source_lists/libwesnoth_sdl
M src/display.cpp
M src/gui/core/canvas.cpp
M src/gui/core/canvas.hpp
M src/gui/core/event/handler.cpp
M src/help/help.cpp
A src/sdl/texture.cpp
A src/sdl/texture.hpp
M src/video.cpp
M src/video.hpp
Log Message:
-----------
Added SDL_Texture wrapper class and some utility functions
Commit: 7a333ab6f21437f1ed750e4a7b59b1856f1ebd8d
https://github.com/wesnoth/wesnoth/commit/7a333ab6f21437f1ed750e4a7b59b1856f1ebd8d
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/widgets/minimap.cpp
Log Message:
-----------
GUI2/Minimap: quick fix to get the minimap drawing again
Commit: ca80f777b7175fa82a27980df9d1e5c5f8a2c820
https://github.com/wesnoth/wesnoth/commit/ca80f777b7175fa82a27980df9d1e5c5f8a2c820
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M projectfiles/CodeBlocks/wesnoth.cbp
M src/gui/core/canvas.cpp
A src/sdl/render_utils.hpp
M src/sdl/texture.cpp
M src/sdl/texture.hpp
Log Message:
-----------
Moved renderer RAII helpers to their own file and added ones for clip rect and viewport
Do note that setting an empty rect in render_raii_rect_setter_base is not the same as passing nullptr.
If an empty rect is passed to SDL_RenderGetClipRect, for example, you can end up with nothing drawing
since everything is being clipped.
Commit: 6f9dc43cc13f05b4233a50b081d98ed15c6afc4c
https://github.com/wesnoth/wesnoth/commit/6f9dc43cc13f05b4233a50b081d98ed15c6afc4c
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/video.cpp
Log Message:
-----------
CVideo: convert blit_surface to handle input as textures instead of blitting to framebuffer
Commit: 99753f20eb71ff5df338368a7c8e021df17a9e38
https://github.com/wesnoth/wesnoth/commit/99753f20eb71ff5df338368a7c8e021df17a9e38
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/widgets/widget.cpp
M src/sdl/rect.cpp
Log Message:
-----------
Use get_renderer() over *get_window()
This doesn't appear to have been an issue in the rectangle drawing code at least, but it should guard
against possible segfaults in the future.
Commit: a88a1bd5cfb4dc724d0b98175130aba29122a6d6
https://github.com/wesnoth/wesnoth/commit/a88a1bd5cfb4dc724d0b98175130aba29122a6d6
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/image.cpp
M src/image.hpp
Log Message:
-----------
Added a texture cache
Note this probably doesn't work properly yet since I haven't properly implemented shared management
of textures in their wrapper class.
Commit: 8a1c1e105180608fc746856ef6d2c10a58446aad
https://github.com/wesnoth/wesnoth/commit/8a1c1e105180608fc746856ef6d2c10a58446aad
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/sdl/texture.cpp
M src/sdl/texture.hpp
Log Message:
-----------
Texture: converted internal handling to use a shared_ptr
This allows multiple texture objects to refer to the same texture without destroying them prematurely.
This is different from the SDL_Surface wrapper's implementation since surfaces have their own internal
refcounting system; textures do not.
Commit: 81b5e22fb638018262d405fc7e48e6627a1cf742
https://github.com/wesnoth/wesnoth/commit/81b5e22fb638018262d405fc7e48e6627a1cf742
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: disable surface manip w/ accelerated rendering for stretch resize mode
RenderCopy handles that automatically.
Commit: 31a1c72cfb528185cfd9d5ba132ffcd3d47bb61c
https://github.com/wesnoth/wesnoth/commit/31a1c72cfb528185cfd9d5ba132ffcd3d47bb61c
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/display.cpp
M src/sdl/utils.cpp
M src/sdl/utils.hpp
Log Message:
-----------
Enabled drawing of minimap in-game
Commit: 8b0b8d034d3184b3a927cf72862a9899284c8056
https://github.com/wesnoth/wesnoth/commit/8b0b8d034d3184b3a927cf72862a9899284c8056
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/controller_base.cpp
M src/editor/controller/editor_controller.cpp
M src/events.cpp
M src/events.hpp
M src/gui/core/event/handler.cpp
M src/gui/widgets/window.cpp
M src/wesnoth.cpp
Log Message:
-----------
Moved GUI2's per-frame drawing trigger to global scope
This is derived from work originally done by @aginor (48bcb277d4). I cherry-picked that commit and made a few alterations.
Commit: 4e3b2539596125566bcca48101e4e3c85a5264e1
https://github.com/wesnoth/wesnoth/commit/4e3b2539596125566bcca48101e4e3c85a5264e1
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/widgets/minimap.cpp
Log Message:
-----------
GUI2/Miniap: draw any provided canvas data before the minimap
Commit: b4501d317e8661629852fccaccb8dfce77a293b8
https://github.com/wesnoth/wesnoth/commit/b4501d317e8661629852fccaccb8dfce77a293b8
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M data/core/images/themes/classic/menubar.png
A data/gui/window/game_ui.cfg
M projectfiles/CodeBlocks/wesnoth.cbp
M source_lists/wesnoth
A src/gui/dialogs/game_ui.cpp
A src/gui/dialogs/game_ui.hpp
M src/playsingle_controller.cpp
Log Message:
-----------
Added static prototype for GUI2 in-game theme
Commit: 3bead37407a7b885b424055f0ac621d6fe921a6d
https://github.com/wesnoth/wesnoth/commit/3bead37407a7b885b424055f0ac621d6fe921a6d
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M projectfiles/CodeBlocks/wesnoth.cbp
M source_lists/libwesnoth
M src/arrow.cpp
M src/arrow.hpp
M src/display.cpp
M src/display.hpp
A src/drawing_buffer.cpp
A src/drawing_buffer.hpp
M src/editor/editor_display.cpp
M src/game_display.cpp
M src/units/animation.cpp
M src/units/drawer.cpp
M src/units/frame.cpp
M src/whiteboard/attack.cpp
M src/whiteboard/manager.cpp
M src/whiteboard/move.cpp
M src/whiteboard/recall.cpp
M src/whiteboard/recruit.cpp
M src/whiteboard/suppose_dead.cpp
Log Message:
-----------
Decoupled drawing buffer code from display class
Commit: 36ea28f15b69e08682ed1cf5c259e6b7203f08ec
https://github.com/wesnoth/wesnoth/commit/36ea28f15b69e08682ed1cf5c259e6b7203f08ec
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/display.cpp
M src/display.hpp
M src/editor/editor_display.cpp
M src/gui/widgets/minimap.cpp
M src/playsingle_controller.cpp
M src/sdl/utils.cpp
M src/units/drawer.cpp
M src/units/drawer.hpp
M src/units/frame.cpp
M src/video.cpp
M src/video.hpp
M src/whiteboard/attack.cpp
M src/whiteboard/suppose_dead.cpp
Log Message:
-----------
Initial refactor for main-screen accelerated rendering
Commit: f0f48f8304a2e8951cd5cc39702a57d4d4d5e1e9
https://github.com/wesnoth/wesnoth/commit/f0f48f8304a2e8951cd5cc39702a57d4d4d5e1e9
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/core/event/handler.cpp
Log Message:
-----------
GUI2: moved event handling into main context
Not sure why I need to call join() in connect() instead of the ctor, though.
Commit: e1feb210c98dfa4b23f06bf224f858156058e1f7
https://github.com/wesnoth/wesnoth/commit/e1feb210c98dfa4b23f06bf224f858156058e1f7
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/units/drawer.cpp
Log Message:
-----------
Draw units under bars/orbs/etc
Commit: d01ed30b78f8edb6915ce28798e2423efbb57e9f
https://github.com/wesnoth/wesnoth/commit/d01ed30b78f8edb6915ce28798e2423efbb57e9f
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/video.cpp
M src/video.hpp
Log Message:
-----------
Video: expand render_copy to take flip arguments
Still needs to handle rotation.
Commit: fa9d8d649caf911cb5d22fe50995b9e961a2c586
https://github.com/wesnoth/wesnoth/commit/fa9d8d649caf911cb5d22fe50995b9e961a2c586
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: made use of CVideo::render_copy
Commit: 89e4a63c2884ac3d2ed56d5d8a029844b529240d
https://github.com/wesnoth/wesnoth/commit/89e4a63c2884ac3d2ed56d5d8a029844b529240d
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/play_controller.cpp
Log Message:
-----------
Fixed play_controller not joining current event context
Was broken when I moved the GUI2 drawing trigger code to global scope probably.
Commit: 536ff3bcbd6a10b5709fd5d7c9f7c16869c36353
https://github.com/wesnoth/wesnoth/commit/536ff3bcbd6a10b5709fd5d7c9f7c16869c36353
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/units/drawer.cpp
Log Message:
-----------
Uint: fixed bad bar alpha on unit mouseover
Commit: f248a5352eaea9c2765dcbab0efa9785248514ba
https://github.com/wesnoth/wesnoth/commit/f248a5352eaea9c2765dcbab0efa9785248514ba
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/arrow.cpp
M src/display.cpp
M src/display.hpp
M src/editor/editor_display.cpp
M src/floating_label.cpp
M src/floating_label.hpp
M src/game_display.cpp
M src/game_display.hpp
M src/units/drawer.cpp
M src/units/frame.cpp
M src/units/udisplay.cpp
M src/whiteboard/attack.cpp
M src/whiteboard/suppose_dead.cpp
Log Message:
-----------
Another huge chunk of progress
Commit: 8e8e8d216e625a3b8f068c39866659a16a5ecb56
https://github.com/wesnoth/wesnoth/commit/8e8e8d216e625a3b8f068c39866659a16a5ecb56
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/controller_base.cpp
M src/editor/action/action_item.cpp
M src/scripting/game_lua_kernel.cpp
Log Message:
-----------
Removed draw() calls into the display class
Not needed anymore since per-frame drawing is handled within said class.
Commit: b4d0b59d1549fb2aa4931ee99b0b77d9823a35f5
https://github.com/wesnoth/wesnoth/commit/b4d0b59d1549fb2aa4931ee99b0b77d9823a35f5
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/events.cpp
M src/video.cpp
M src/video.hpp
Log Message:
-----------
Video: (almost) completely removed framebuffer surface
Again, useless since there's no more window surface with accelerated rendering.
getSurface() remains since it's still used in quite a lot of places. Will removed ASAP.
Commit: 7fc1d3499d2cb5e1c2cb1165ae868afeab77f2fc
https://github.com/wesnoth/wesnoth/commit/7fc1d3499d2cb5e1c2cb1165ae868afeab77f2fc
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/tests/utils/fake_display.cpp
M src/video.cpp
M src/video.hpp
Log Message:
-----------
Video: removed unused arguments from make_test_fake
Commit: 1dbfa4e7800f865c9abd2afa13e11f46757cd18a
https://github.com/wesnoth/wesnoth/commit/1dbfa4e7800f865c9abd2afa13e11f46757cd18a
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/display.cpp
M src/display.hpp
M src/game_display.cpp
M src/units/drawer.cpp
Log Message:
-----------
Got a bunch more components drawing
Reachmaps, attack indicators, shroud/fog (incomplete).
Commit: e3e30f836c2338b94870b286cf3cdb41177e7615
https://github.com/wesnoth/wesnoth/commit/e3e30f836c2338b94870b286cf3cdb41177e7615
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/display.cpp
Log Message:
-----------
Enabled more stuff drawing
Hex overlay, map items, fog/shroud transitions.
Commit: 9eb57b5e2d15ba11795a311c0879aa32e300f006
https://github.com/wesnoth/wesnoth/commit/9eb57b5e2d15ba11795a311c0879aa32e300f006
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/controller_base.cpp
Log Message:
-----------
Removed most call to raise_draw_event
These don't seem necessary anymore since draw handling happens per-frame and doesn't rely
on calling derived class's draw() member.
Commit: d5ee54d40b08c6d25b16850ca5d7f0e2c7571646
https://github.com/wesnoth/wesnoth/commit/d5ee54d40b08c6d25b16850ca5d7f0e2c7571646
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/units/drawer.cpp
Log Message:
-----------
Units: fixed bad HP/XP bars fill rect offset
Commit: 1e3f4c93024b896091161841fe673aa054fc9ade
https://github.com/wesnoth/wesnoth/commit/1e3f4c93024b896091161841fe673aa054fc9ade
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: fixed mirrored images being flipped on the wrong axis.
Commit: 5da9957dd2a658201f4051c59586c3b98b05128e
https://github.com/wesnoth/wesnoth/commit/5da9957dd2a658201f4051c59586c3b98b05128e
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/image.cpp
M src/image.hpp
Log Message:
-----------
Extended implementation of the texture cache
Instead of always loading a surface at the same time, textures are now loaded directly from disk if applicable.
Instead, surfaces are only loaded if applicable to apply some effect that cannot as of now be done with texture
manipulation since we dont have shader support yet.
In that vein, I've also added two new texture caches, one for masked-to-hex images and one for ToD colored images.
Commit: 4ae34ec6a6146ef6835a8575f375c09054ec37b6
https://github.com/wesnoth/wesnoth/commit/4ae34ec6a6146ef6835a8575f375c09054ec37b6
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/display.cpp
Log Message:
-----------
Trim ToD images to hex
Commit: 56afee96a9233d563e8dad4a38e4d91cfa4137c2
https://github.com/wesnoth/wesnoth/commit/56afee96a9233d563e8dad4a38e4d91cfa4137c2
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
M src/gui/core/canvas_private.hpp
Log Message:
-----------
GUI2/Canvas: refactor surface use out of image rendering
The only real reason to keep using a surface was in order to have resize mode manipulations. I've now added
texture-only handling methods (the tiling one was borrowed from display.cpp's draw_background function).
Commit: fc720ec6e25c401a5bcc59bb2ad1c0fabc0a909a
https://github.com/wesnoth/wesnoth/commit/fc720ec6e25c401a5bcc59bb2ad1c0fabc0a909a
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M projectfiles/CodeBlocks/wesnoth.cbp
M source_lists/libwesnoth_sdl
M src/editor/editor_display.cpp
M src/events.cpp
M src/game_display.cpp
A src/ogl/context.cpp
A src/ogl/context.hpp
A src/ogl/utils.cpp
A src/ogl/utils.hpp
M src/playsingle_controller.cpp
M src/sdl/window.cpp
M src/video.cpp
M src/video.hpp
Log Message:
-----------
Some initial code (disabled for now) for setting up an OGL context
In the interests of getting this all done faster, I've decided to postpone work on the OGL implementation for now
and focus on the SDL_Renderer version. This contains some basic code (include-guarded) for setting up an OGL context
for the main SDL window.
Commit: 238ba6717f05ac01ce3b64134913d7b4715c84f6
https://github.com/wesnoth/wesnoth/commit/238ba6717f05ac01ce3b64134913d7b4715c84f6
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/image.cpp
M src/image.hpp
Log Message:
-----------
Allowed IPFs to work again when using the texture cache
See create_texture_from_sub_file doc comment for more info.
Commit: e8b0616ab2dd5cc735499870f3f78c8caa853205
https://github.com/wesnoth/wesnoth/commit/e8b0616ab2dd5cc735499870f3f78c8caa853205
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: set clip rect when tiling images
This fixes an issue where images could be tiled outside their desired size area.
Commit: 75c021e218bafb385ed8dcd64dd6e9d9e7be7eb8
https://github.com/wesnoth/wesnoth/commit/75c021e218bafb385ed8dcd64dd6e9d9e7be7eb8
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M data/gui/widget/window_default.cfg
Log Message:
-----------
GUI2/Window: draw background image first instead of last
Originally was going to do this as workaround for the background tiling over the borders,
but I fixed the root cause of that instead. Still, this just makes more sense.
Commit: 95c71a0311b39276f6084f17780071806f9bee52
https://github.com/wesnoth/wesnoth/commit/95c71a0311b39276f6084f17780071806f9bee52
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/dialogs/outro.cpp
M src/gui/dialogs/story_viewer.cpp
Log Message:
-----------
GUI2: removed some unnecessary calls to canvas::set_is_dirty
The one in Outro was unnecessary since set_variable already calls set_is_dirty.
The one in the Story Viewer was there to deal with some background redraw issues which no longer appear
with the new drawing methods.
Commit: 79fde3b1c18262f1585705547158d25d571ee68a
https://github.com/wesnoth/wesnoth/commit/79fde3b1c18262f1585705547158d25d571ee68a
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/sdl/window.cpp
M src/sdl/window.hpp
Log Message:
-----------
SDL/Window: removed pixel format member and promoted renderer info wholly to class member
The pixel format member was really rather useless, since SDL_RenderInfo returns an array of supported
formats and only the first one was being saved.
Commit: e3120e18caffb8ce0f0c99c23f62bd4081bf5fc2
https://github.com/wesnoth/wesnoth/commit/e3120e18caffb8ce0f0c99c23f62bd4081bf5fc2
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/sdl/render_utils.hpp
M src/sdl/texture.cpp
Log Message:
-----------
Added some inline wrappers for SDL_SetTexture* functions
Commit: ac4d15bb092252b60f42ef80edecc961585a376e
https://github.com/wesnoth/wesnoth/commit/ac4d15bb092252b60f42ef80edecc961585a376e
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/display.cpp
M src/game_display.cpp
M src/halo.cpp
M src/halo.hpp
Log Message:
-----------
Refactored halo code to bring it in line with new drawing methods
This basically rips out all the unrendering and invalidation code. Neither is needed anymore.
Instead, we can have a simple, clean, "just draw the managed halos" interface.
Note there's an issue unrelated to this where halos aren't removed when a unit is killed with
the debug kill menu command.
Commit: 07932dbf4bfeb82954eac9fb4d1c90e1e95dcd85
https://github.com/wesnoth/wesnoth/commit/07932dbf4bfeb82954eac9fb4d1c90e1e95dcd85
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/units/frame.cpp
Log Message:
-----------
Restored alpha handling of unit frames
Still need to figure out the blending effects or submerge alpha.
Commit: f728b6f6323547fd6d395cd6d180fc5f36b9614a
https://github.com/wesnoth/wesnoth/commit/f728b6f6323547fd6d395cd6d180fc5f36b9614a
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/dialogs/editor/custom_tod.cpp
M src/gui/dialogs/editor/custom_tod.hpp
M src/gui/dialogs/modeless_dialog.cpp
M src/gui/widgets/window.cpp
M src/gui/widgets/window.hpp
Log Message:
-----------
GUI2/Window: removed empty undraw() function
This was emptied earlier in my refactor when window unrendering was removed. I simply hadn't
removed the function yet.
Commit: 977bc22e7f263699d69e79019b789ccac870ef28
https://github.com/wesnoth/wesnoth/commit/977bc22e7f263699d69e79019b789ccac870ef28
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
M src/image.cpp
M src/image.hpp
M src/sdl/render_utils.hpp
M src/sdl/window.cpp
Log Message:
-----------
Split texture caches into linear and NN scaled versions
With textures, you can't change render scale quality once they've been created. To rectify this, I've
made the texture caches a map of caches, sorted by scale quality. This should result in no performance
overhead, since an image is simply added to the appropriate quality cache on creation instead of in
a single cache. If a different version of a texture is needed it will be loaded later.
By default, load_texture will return images using nearest neighbor scaling. GUI2 always fetches images
using linear scaling. This is consistent with the old software rendering method. Plus, we don't have
any way (as of now) to specify the render quality on a per-image basis.
Commit: a76b71ee6aab3fc012b369da9c012f7db2baebcf
https://github.com/wesnoth/wesnoth/commit/a76b71ee6aab3fc012b369da9c012f7db2baebcf
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/font/text.cpp
M src/font/text.hpp
M src/gui/core/canvas.cpp
M src/gui/widgets/styled_widget.hpp
Log Message:
-----------
Added a getter for a static pango_text object
The reason I added this was so I can refactor some temporary pango_text objects out of the display class.
styled_widget doesn't use this for reasons explained in the comment.
Commit: 78b88cb7076c4ae96bf72b0f8f8c398f986c87c4
https://github.com/wesnoth/wesnoth/commit/78b88cb7076c4ae96bf72b0f8f8c398f986c87c4
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
A data/gui/window/command_console.cfg
M projectfiles/CodeBlocks/wesnoth.cbp
M source_lists/wesnoth
M src/controller_base.cpp
A src/gui/dialogs/command_console.cpp
A src/gui/dialogs/command_console.hpp
M src/menu_events.cpp
M src/menu_events.hpp
M src/play_controller.cpp
M src/play_controller.hpp
M src/playsingle_controller.cpp
M src/playsingle_controller.hpp
Log Message:
-----------
Port floating textbox/command console to GUI2
The old floating textbox was extremely entwined with the controller_base, play_controller, and menu_handler
classes. controller_base::have_keyboard_focus essentially controlled whether some events were executed based
on whether the floating textbox was open or not. Additionally, those events weren't even reached if a UI dialog
was open at all.
The new design features a singleton console class that can be called from anywhere, not just the game. I've also
decoupled the execution object from play_controller. The relevant functions in menu_handler are now passed to
the console as callbacks.
To work around map events such as clicking not being available if the console was open, I removed the exclusionary
is-in-dialog check from controller_base::handle_event and instead exit early out certain types of events using
controller_base::have_keyboard_focus. As mentioned in the accompanying comment, this isn't the best solution, but
it will do for now.
The new console also isn't fully feature-comparable with the old GUI1 one. The following are still missing:
* The checkbox, for use when sending messages.
* Tab completion.
* A crash occurs when existing the app if a game was exited with the console open.
I'm leaving the old floating_textbox code around for now for reference.
Commit: d60bfb6daa56eea48a885be59d398647779e64f9
https://github.com/wesnoth/wesnoth/commit/d60bfb6daa56eea48a885be59d398647779e64f9
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/floating_label.cpp
Log Message:
-----------
Floating Label: formatting update
Commit: 0ffb42da55422aee298a4d36adaa5f2da7b3306a
https://github.com/wesnoth/wesnoth/commit/0ffb42da55422aee298a4d36adaa5f2da7b3306a
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/floating_label.cpp
M src/floating_label.hpp
M src/tooltips.cpp
Log Message:
-----------
Refactored floating_label implementation
* Store label as a texture instead of creating a texture from a surface every draw cycle
* Restored expired label removal and alpha fadeout (was accidentally removed earlier in my refactoring)
* Use alpha field of bg_color member for background color
* Draw tooltip backgrounds procedurally instead of with surfaces and part of the label texture itself.
See included comment for small caveat.
Commit: 650d1fc181eb89ba71406b2686abbcacb97cc495
https://github.com/wesnoth/wesnoth/commit/650d1fc181eb89ba71406b2686abbcacb97cc495
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/display.cpp
Log Message:
-----------
Display: restrict render clip rect setter to map drawing scope only
This prevents tooltips from being cut off.
Commit: 3b0cd70fe2a70480026734096a0e04c2218c566c
https://github.com/wesnoth/wesnoth/commit/3b0cd70fe2a70480026734096a0e04c2218c566c
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/image.cpp
Log Message:
-----------
Improved console output on IPF fail
Yes, I know the duplicate code should be consolidated.
Commit: e54d73ed4e3d158ac6fbb6ab664eee0e7d50518b
https://github.com/wesnoth/wesnoth/commit/e54d73ed4e3d158ac6fbb6ab664eee0e7d50518b
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/display.cpp
M src/events.cpp
M src/events.hpp
M src/gui/core/event/handler.cpp
M src/show_dialog.cpp
M src/video.cpp
M src/video.hpp
M src/widgets/widget.cpp
Log Message:
-----------
Refactor and cleanup of the drawing dispatch system
Previously, drawing was handled with custom DRAW and DRAW_ALL events which individual event handlers
managed. DRAW was used for only-as-needed draws, and DRAW_ALL for drawing everything. As we've switched
to accelerated rendering, we've switched to the latter model all the time; everything is always drawn.
Both DRAW and DRAW_ALL events aren't needed anymore and have been removed. Instead, we simply call each
handler's draw() function directly from events::pump. The two main cases that handled draw events - the
display class and GUI2 - just forwarded the event handler calls to their respective draw() functions anyway.
Awhile back to unconditionally send draw events to the event queue constantly every 20 ms. However, to prevent
draw calls from becoming backed up, the queue already had code to remove all but 1 draw event from the queue
anyway, so the actual rate of drawing was still reliant on the rate at which events::pump was called. Therefor
this commit should result in no change at the rate the screen is drawn.
Commit: ea3662625a67ad484a222375bbf0d751307f7753
https://github.com/wesnoth/wesnoth/commit/ea3662625a67ad484a222375bbf0d751307f7753
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M projectfiles/CodeBlocks/wesnoth.cbp
M source_lists/libwesnoth
M src/arrow.cpp
M src/arrow.hpp
M src/display.cpp
M src/display.hpp
R src/drawing_buffer.cpp
R src/drawing_buffer.hpp
A src/drawing_queue.cpp
A src/drawing_queue.hpp
M src/editor/editor_display.cpp
M src/game_display.cpp
M src/units/animation.cpp
M src/units/drawer.cpp
M src/units/frame.cpp
M src/units/frame.hpp
M src/whiteboard/attack.cpp
M src/whiteboard/manager.cpp
M src/whiteboard/move.cpp
M src/whiteboard/recall.cpp
M src/whiteboard/recruit.cpp
M src/whiteboard/suppose_dead.cpp
Log Message:
-----------
Renamed drawing_buffer to drawing_queue
Also renamed drawing_queue::drawing_layer to just 'layer'.
Commit: 45a19223eed1521ca255f03fdbdc7f83b88864c9
https://github.com/wesnoth/wesnoth/commit/45a19223eed1521ca255f03fdbdc7f83b88864c9
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/display.cpp
Log Message:
-----------
Fixed halos drawing over fog and shroud (fixes #1406)
Commit: 6c24298ca21403f1d11da91f1e3d690aafa46764
https://github.com/wesnoth/wesnoth/commit/6c24298ca21403f1d11da91f1e3d690aafa46764
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/sdl/window.cpp
Log Message:
-----------
SDL/Window: throw exception if render-to-texture is not enabled
NOTE: for some reason, if I remove the `SDL_RENDERER_TARGETTEXTURE` flag from sdl::window's ctor
render_flags argument, this assertion still doesn't throw. Not sure if that means by GPU supports
it by default, or what.
Commit: d3681e41c85db0f1a8f2b86958cc249748879753
https://github.com/wesnoth/wesnoth/commit/d3681e41c85db0f1a8f2b86958cc249748879753
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/actions/advancement.cpp
M src/actions/attack.cpp
M src/actions/create.cpp
M src/actions/move.cpp
M src/actions/undo_recall_action.cpp
M src/actions/undo_recruit_action.cpp
M src/actions/unit_creator.cpp
M src/actions/vision.cpp
M src/arrow.cpp
M src/arrow.hpp
M src/display.cpp
M src/display.hpp
M src/editor/action/mouse/mouse_action_item.cpp
M src/editor/action/mouse/mouse_action_unit.cpp
M src/editor/controller/editor_controller.cpp
M src/editor/editor_display.cpp
M src/editor/map/context_manager.cpp
M src/fake_unit_manager.cpp
M src/floating_textbox.cpp
M src/game_display.cpp
M src/game_display.hpp
M src/gui/dialogs/editor/custom_tod.cpp
M src/menu_events.cpp
M src/play_controller.cpp
M src/playsingle_controller.cpp
M src/replay_controller.cpp
M src/scripting/game_lua_kernel.cpp
M src/synced_commands.cpp
M src/units/animation.cpp
M src/units/udisplay.cpp
M src/whiteboard/attack.cpp
M src/whiteboard/attack.hpp
M src/whiteboard/manager.cpp
M src/whiteboard/move.cpp
M src/whiteboard/recall.cpp
M src/whiteboard/recall.hpp
M src/whiteboard/recruit.cpp
M src/whiteboard/recruit.hpp
M src/whiteboard/side_actions.cpp
M src/whiteboard/suppose_dead.cpp
M src/whiteboard/suppose_dead.hpp
M src/whiteboard/utility.cpp
Log Message:
-----------
Display: removed all the invalidated locations code
This removes all the code related to invalidating locations, any functions used to set, modify, or propagate
location invalidation, and several functions that no longer serve any purpose anymore since their only purpose
was to handle invalidated locations.
Commit: 4e539f674405c573d30f08f918d2b4e0a42e09b6
https://github.com/wesnoth/wesnoth/commit/4e539f674405c573d30f08f918d2b4e0a42e09b6
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/actions/move.cpp
M src/display.cpp
M src/units/animation.cpp
M src/units/animation.hpp
M src/units/animation_component.cpp
M src/units/animation_component.hpp
M src/whiteboard/manager.cpp
Log Message:
-----------
Removed animation invalidation code
This no longer actually does anything now that location invalidation is removed. If you follow the code
animation_component::invalidate called unit_animation::invalidate which was responsible for generating
the overlaped_hex_ set. Previously, this is what locations were invalidated. Now it didn't do anything.
Commit: 3a2ca9acc20cda383ac7050042404c31f7c47105
https://github.com/wesnoth/wesnoth/commit/3a2ca9acc20cda383ac7050042404c31f7c47105
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/actions/vision.cpp
M src/display.cpp
M src/display.hpp
M src/gui/dialogs/editor/custom_tod.cpp
M src/scripting/game_lua_kernel.cpp
M src/units/udisplay.cpp
Log Message:
-----------
Display: removed old drawing code and external draw calls
Commit: ccc5368648b9dbe078bbd998219d0fc39ecaa3cc
https://github.com/wesnoth/wesnoth/commit/ccc5368648b9dbe078bbd998219d0fc39ecaa3cc
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/units/drawer.cpp
M src/units/frame.cpp
Log Message:
-----------
Fixed some bad drawing offsets and sizes when zoomed in
This fixes HP/XP bar size (wasn't scaled to zoom) and placement, as well as crown/orb and main sprite placement.
Commit: 3aaca3ed4c9f9871d6c384aced46075b3664d2aa
https://github.com/wesnoth/wesnoth/commit/3aaca3ed4c9f9871d6c384aced46075b3664d2aa
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/sdl/texture.cpp
M src/sdl/texture.hpp
Log Message:
-----------
SDL/Texture: made info struct take a texture ptr directly
Will allow me to construct one directly from a pointer if I don't have a wrapper object.
Commit: 08746b6b5c00df2f5a1d8f957a3bf1293d78abb1
https://github.com/wesnoth/wesnoth/commit/08746b6b5c00df2f5a1d8f957a3bf1293d78abb1
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/display.cpp
M src/display.hpp
M src/editor/editor_display.cpp
M src/editor/editor_display.hpp
M src/game_display.cpp
M src/game_display.hpp
Log Message:
-----------
Display: work on refactoring the main drawing system
Previously, every visible hex was iterated over and every element in that hex draw. This was inefficient
for two reasons: First, it meant the performance footprint for many operations like unit drawing was O(n²),
since the list of elements had to be checked for every single hex. Second, it meant the renderer had to
switch active textures many more times than necessary.
My new system involved drawing every element of a specific type at once - ie, all background terrains at
once, all units, all items, etc. This reduces lookup time from O(n²) to O(n) and results in a noticeable
performance increase. It also reduces the number of times the renderer needs to switch active textures,
since bulk draws such as the map grid overlay are now done all at once while that specific texture is
active.
There are still some layering issues and missing elements that need to be sorted, especially in game_display.
Commit: bc044bbf9457e37137f135a3f16a642288d443fe
https://github.com/wesnoth/wesnoth/commit/bc044bbf9457e37137f135a3f16a642288d443fe
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/video.cpp
Log Message:
-----------
Video: don't render null textures
Commit: 21a2c71eaa7cb97897086211c6c8395973acf688
https://github.com/wesnoth/wesnoth/commit/21a2c71eaa7cb97897086211c6c8395973acf688
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/editor/controller/editor_controller.cpp
M src/menu_events.cpp
M src/playmp_controller.cpp
M src/playsingle_controller.cpp
M src/playturn.cpp
M src/replay_controller.cpp
M src/synced_commands.cpp
M src/video.cpp
Log Message:
-----------
Removed external calls to display::redraw_everything()
Commit: 3d8bc558559122fbcabc7ced0aa133e02a158a37
https://github.com/wesnoth/wesnoth/commit/3d8bc558559122fbcabc7ced0aa133e02a158a37
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/display.cpp
M src/display.hpp
Log Message:
-----------
Display: header formatting and doc updates
Appropriate functions were also marked deprecated.
Commit: e144bd236b95fd2301ed2493b50cd81c27a642e4
https://github.com/wesnoth/wesnoth/commit/e144bd236b95fd2301ed2493b50cd81c27a642e4
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/display.hpp
M src/gui/core/event/handler.cpp
Log Message:
-----------
Marked sdl_handler::draw overrides as final
Commit: aa586066bcc21821d362cad1ceaed22dcf1c9d48
https://github.com/wesnoth/wesnoth/commit/aa586066bcc21821d362cad1ceaed22dcf1c9d48
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/display.cpp
M src/display.hpp
M src/game_display.cpp
M src/playmp_controller.cpp
M src/playsingle_controller.cpp
M src/replay_controller.cpp
Log Message:
-----------
Display: cleaned up a bunch of now-unused/unnecessary members and functions
Commit: 3d77f54a7a924b7949105e6f08168e7981d78c25
https://github.com/wesnoth/wesnoth/commit/3d77f54a7a924b7949105e6f08168e7981d78c25
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/display.cpp
Log Message:
-----------
Display: re-enable fps counter with :fps
Commit: 7deade43e71a7611f9c73871cbabb90fa2c6c4b3
https://github.com/wesnoth/wesnoth/commit/7deade43e71a7611f9c73871cbabb90fa2c6c4b3
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: don't skip drawing if canvas texture is null
Commit: 44507faaf63d371c475c7e8d5b9f927fcdb55929
https://github.com/wesnoth/wesnoth/commit/44507faaf63d371c475c7e8d5b9f927fcdb55929
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/display.cpp
M src/floating_label.cpp
M src/font/text.cpp
M src/font/text.hpp
M src/gui/core/canvas.cpp
Log Message:
-----------
Added a texture cache for pango_text render output
Commit: 1b79952e07e7db1289d2c0a38c5e8d1acbdef3d4
https://github.com/wesnoth/wesnoth/commit/1b79952e07e7db1289d2c0a38c5e8d1acbdef3d4
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/floating_label.cpp
M src/floating_label.hpp
Log Message:
-----------
Floating Label: header formatting updates
Commit: 4936c8fe7195ac74b70470e0975da05c5ac1baf3
https://github.com/wesnoth/wesnoth/commit/4936c8fe7195ac74b70470e0975da05c5ac1baf3
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
Log Message:
-----------
GUI2/Canvas: handle text alpha as a render-time op
This reduces the number of times the text itself needs to be rendered, especially for areas like the
story viewer where the only difference is alpha.
Commit: ef19039ee2ad0dad0c6e9cd1aa43aff2b4a029a9
https://github.com/wesnoth/wesnoth/commit/ef19039ee2ad0dad0c6e9cd1aa43aff2b4a029a9
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/font/text.cpp
M src/font/text.hpp
Log Message:
-----------
Font/Pango Text: add extra stroke to text outline to compensate for alpha weirdness
Also added the outline to the hash.
Commit: 80032219f1fe2a633d2dfeb776d8723811690dc5
https://github.com/wesnoth/wesnoth/commit/80032219f1fe2a633d2dfeb776d8723811690dc5
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/sdl/texture.cpp
M src/sdl/texture.hpp
Log Message:
-----------
Some updates to the texture wrapper class
* Made reset() a public function
* Added an assign() function
* Don't try to destroy null textures
* Updated doc comments
I left assign() as just taking an SDL_Texture ptr since having it take a texture ref would be
functionally equivalent to operator=.
Commit: c1ad55114c1af44ca4247dfa3351064f4cefa21b
https://github.com/wesnoth/wesnoth/commit/c1ad55114c1af44ca4247dfa3351064f4cefa21b
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/image.cpp
Log Message:
-----------
Avoid temporary object when creating new textures from disk
Commit: e35ab2c29e66bdd8aa327cf227797787d62a4dca
https://github.com/wesnoth/wesnoth/commit/e35ab2c29e66bdd8aa327cf227797787d62a4dca
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/floating_label.cpp
Log Message:
-----------
Floating Labels: use new pango_text functionality for generating text outline
Commit: b6915b2ce22e04042831761fc2fe40e9de0f4a97
https://github.com/wesnoth/wesnoth/commit/b6915b2ce22e04042831761fc2fe40e9de0f4a97
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/display.cpp
M src/display.hpp
Log Message:
-----------
Display: avoid unnecessarily (potentially) creating millions of temp vectors
I've moved the terrain hex drawing code directly into draw_visible_hexes instead of relying on get_terrain_images
to return a vector of all the necessary images for each visible hex and then drawing them. Instead, we now draw
each hex's images immediately without any intermediary container.
With the old method, after about 10 to 15 seconds of drawing we had already allocated (and destroyed) almost 180,000
temporary vectors (a new one was created for each hex, twice per draw cycle). It's obvious how quickly that would add
up over a normal play session, and though in this case the performance hit for creating each vector was probably tiny,
creating them likely would have added up.
Commit: 0b114ff165e28b08bce27571795ca8edf9f514e9
https://github.com/wesnoth/wesnoth/commit/0b114ff165e28b08bce27571795ca8edf9f514e9
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/actions/vision.cpp
Log Message:
-----------
Comment out an unused parameter
Not sure if we'll need this again (perhaps to delay draws mid-action) so I'm not removing it yet.
Commit: e4acfd2e95a530d98170dc277b21c3a805128660
https://github.com/wesnoth/wesnoth/commit/e4acfd2e95a530d98170dc277b21c3a805128660
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/floating_label.cpp
M src/floating_label.hpp
Log Message:
-----------
Added RAII helper struct to manage a floating label's lifetime
Commit: e5415295e241eb9408fd7c0e8b4902494a1bbcd7
https://github.com/wesnoth/wesnoth/commit/e5415295e241eb9408fd7c0e8b4902494a1bbcd7
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/display.cpp
M src/display.hpp
M src/game_display.cpp
M src/game_display.hpp
M src/whiteboard/manager.cpp
M src/whiteboard/move.cpp
M src/whiteboard/recall.cpp
M src/whiteboard/recruit.cpp
Log Message:
-----------
Another large batch of progress, primarily in game_display
This is primarily focused on getting various areas of the game display drawing, such as footstep images
and the terrain defense indicators.
To facilitate the last, I've refactored draw_text_in_hex to utilize floating labels instead of drawing
to hex directly with surfaces. This probably isn't the most optimal solution, since labels are continuously
created and destroyed, but since their text is usually short and cached in the rendered text cache it
does for now.
Also includes some cleanup of deprecated functions in display, and slight reordering of drawing order of
certain elements.
Commit: 5e412360fa7979c9858ab8d431e781a2ff27ab98
https://github.com/wesnoth/wesnoth/commit/5e412360fa7979c9858ab8d431e781a2ff27ab98
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/display.cpp
Log Message:
-----------
Display: simplified a few things
Commit: 9f74e46bb8a86b62d577646138ed1a159f505d78
https://github.com/wesnoth/wesnoth/commit/9f74e46bb8a86b62d577646138ed1a159f505d78
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/sdl/texture.cpp
Log Message:
-----------
SDL/Texture: avoid unnecessary shared_ptr creation
Made use of shared_ptr::reset instead of creating temp shared_ptrs, assigning them to the class ptr,
then deleting them.
Commit: cb51088f85b73f5adbe1423c8253957468693b2c
https://github.com/wesnoth/wesnoth/commit/cb51088f85b73f5adbe1423c8253957468693b2c
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/display.cpp
Log Message:
-----------
Display: fixed moving units drawing under foreground terrains
Commit: b65f30370093eacde4fbaa00155e1a3daea6b8bf
https://github.com/wesnoth/wesnoth/commit/b65f30370093eacde4fbaa00155e1a3daea6b8bf
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/floating_label.cpp
Log Message:
-----------
Floating Label: keep local pango_text object static
This also means I need to set set_add_outline every time create_texture is called to make sure the
text renderer has the correct settings.
Commit: 4659abe8b974387cd89ca0ceb5a2750920b636b6
https://github.com/wesnoth/wesnoth/commit/4659abe8b974387cd89ca0ceb5a2750920b636b6
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/controller_base.cpp
M src/controller_base.hpp
Log Message:
-----------
Controller Base: removed unused process_focus_keydown_event event
This was used before the command console was converted to GUI2.
Commit: 3269216981e9e6cf84858ef95d6f7ff368ca667e
https://github.com/wesnoth/wesnoth/commit/3269216981e9e6cf84858ef95d6f7ff368ca667e
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/display.cpp
M src/display.hpp
M src/floating_label.cpp
M src/show_dialog.cpp
Log Message:
-----------
Refactored handling of window/renderer size getters
* Removed display::screen_area(), display::w(), and display::h().
* Moved the global screen_area() function into the CVideo class.
* Renamed CVideo::getx() and gety() to get_width() and get_height()
* Made those two functions return the result of screen_area() instead of the other way around.
* Added preliminary support for high-DPI rendering to screen_area()
Note on the last point: When I fixed bug #1772 (aa8f6c7e7 right now but will probably change with rebasing)
I noted that SDL_GetWindowSize and SDL_GetRendererOutputSize returned the same results for me (even with
Window's automatic scaling for non-high-DPI-enabled apps disabled) but that the SDL documentation stated the
former returned screen coordinates and the latter pixels. In that same commit I changed the dimension functions
to use SDL_GetWindowSize. I've now reversed that decision and gone back to using SDL_GetRendererOutputSize so
I can guarantee output in pixels. If use_pixels is false, the code will return coordinates in 96 DPI, so I need
to have pixel measurements for the calculations.
Again, though, I do not know if SDL_GetWindowSize returns a different value that pixel size (which it's said
to do) on macOS or iOS. I'll need to do some testing. It's possible on those platforms I won't need the 96 DPI
measurements, but it's also possible it will be needed on on platforms, since all of our code relies on pixel
measurements.
Commit: 1147eb5e11c58fed42050f9c9b796c0c20be754d
https://github.com/wesnoth/wesnoth/commit/1147eb5e11c58fed42050f9c9b796c0c20be754d
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/font/text.cpp
Log Message:
-----------
Font/Pango Text: fixed a weird crash in Cairo
See added comment for details.
Commit: fe0a6f0bac7a79527c3d0f6f05d60e6c692b5140
https://github.com/wesnoth/wesnoth/commit/fe0a6f0bac7a79527c3d0f6f05d60e6c692b5140
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/display.hpp
Log Message:
-----------
Display: exit render_scaled_to_zoom early if passed texture is null
Commit: ed5878426b929b303e8d8c0c043cc584b1814e6a
https://github.com/wesnoth/wesnoth/commit/ed5878426b929b303e8d8c0c043cc584b1814e6a
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/display.cpp
M src/display.hpp
Log Message:
-----------
Display: avoid temp vectors when rendering partial fog/shround images on hex
Commit: 0cc6f899bbba8844fb02efbe27f59f6f8ac384c8
https://github.com/wesnoth/wesnoth/commit/0cc6f899bbba8844fb02efbe27f59f6f8ac384c8
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/halo.cpp
Log Message:
-----------
Halos: fixed incorrect drawing origin when at non-default zoom
Commit: 02b69cd3c8aaf059d61db72586d7fab261e86d98
https://github.com/wesnoth/wesnoth/commit/02b69cd3c8aaf059d61db72586d7fab261e86d98
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
M src/sdl/render_utils.hpp
M src/sdl/window.cpp
Log Message:
-----------
Moved SDL_SetRenderDrawColor wrapper to utils file and added a second overload
Also renamed the function to a more colloquial version.
Commit: 58dfa251d8e151a38c460f7fcbbc31804adac9db
https://github.com/wesnoth/wesnoth/commit/58dfa251d8e151a38c460f7fcbbc31804adac9db
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
M src/gui/core/canvas.hpp
Log Message:
-----------
GUI2/Canvas: optimized cached texture management
Instead of throwing out the cached texture every time the canvas was dirty, I've added a flag so that
only happens if its size has actually changed. There still seem to be some issues in GUI2 where canvas
objects keep getting reset, but I'm not sure why. Will have to look into that.
Anyway, the addition of the SDL_RenderClear call also seems to have fixed the weird graphics bleed-through
I was getting when running the game with the OGL driver.
I don't know if the canvas copy or move ctors are needed for anything. I added them for a test, but I'll
leave them for now in case I need them later.
Commit: 74949b857bfefd7c3b6ca949cc0ad71742f37cc3
https://github.com/wesnoth/wesnoth/commit/74949b857bfefd7c3b6ca949cc0ad71742f37cc3
Author: Jyrki Vesterinen <sandgtx at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/sdl/texture.cpp
M src/sdl/texture.hpp
Log Message:
-----------
Fix build with Visual Studio
Commit: 3aaf7667391003cd377b383447e2fb184f32f39b
https://github.com/wesnoth/wesnoth/commit/3aaf7667391003cd377b383447e2fb184f32f39b
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/sdl/render_utils.hpp
Log Message:
-----------
Allow render_target_setter to restore the last target when destroyed
Commit: 55c5fe21efd207f6d18ad0b06b31b7e700103b39
https://github.com/wesnoth/wesnoth/commit/55c5fe21efd207f6d18ad0b06b31b7e700103b39
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/minimap.cpp
M src/minimap.hpp
Log Message:
-----------
Added new minimap drawing method that works wholly with textures
I've left the old getMinimap function alone and added a new function that will eventually replace it
that utilizes texture rendering to a given texture instead of relying on surface blits and scaling.
This has the benefit of, well, reducing surface ops, for one, as well as removing the need to create
a new texture from the minimap surface every time it's updated.
Commit: ee0705cf9e702b9a472a3d0e8977a3406999ebaf
https://github.com/wesnoth/wesnoth/commit/ee0705cf9e702b9a472a3d0e8977a3406999ebaf
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
M src/gui/core/canvas.hpp
Log Message:
-----------
GUI2/Canvas: allow the default draw routine (shape drawing) to be overridden
Previously widgets that wanted to implement custom drawing behavior overrode styled_widget::impl_draw_background
or impl_draw_foreground. Those functions in the base class simply called the canvas render methods. Some widgets
such as the minimap ignored that rendered the contents on their own.
This new method allows rendering directly to the canvas's texture, meaning all the caching and sizing is already
handled by the canvas and doesn't need to be done by the widget; everything's always the right size and redrawn
when necessary.
Commit: b338aa1d4a49089f3466cb4864c96f430b149fe3
https://github.com/wesnoth/wesnoth/commit/b338aa1d4a49089f3466cb4864c96f430b149fe3
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/widgets/minimap.cpp
M src/gui/widgets/minimap.hpp
Log Message:
-----------
GUI2/Minimap: refactored drawing code
Instead of using the minimap surface method (which was getting converted from surface to texture every
draw cycle since the caching mechanism the canvas implemented wasn't available and the weird custom
cache the widget implemented itself didn't seem to do actually do anything) we use the new render-to-
canvas-texture method which is a lot cleaner and should be a lot faster. This also means we no longer
override styled_widget::impl_draw_background.
Do note I might use the design of the removed cache here to add some age functionality to the
font::pango_text cache.
Commit: c2cd4277a19cfa0c3495be49ee100b04fcf54e1d
https://github.com/wesnoth/wesnoth/commit/c2cd4277a19cfa0c3495be49ee100b04fcf54e1d
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/units/frame.cpp
Log Message:
-----------
Unit/Frame: fixed alpha mods being applied to all units of the same type
Commit: 7905412a9d4f1de9857086f4dbe0fa1d83d92b7b
https://github.com/wesnoth/wesnoth/commit/7905412a9d4f1de9857086f4dbe0fa1d83d92b7b
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/game_display.cpp
M src/game_display.hpp
Log Message:
-----------
Game Display: reimplemented more functionality in draw_movement_info
Not completely done yet, still need to get some stuff working, but this gets rid of the old commented-out
code and puts stuff mostly in the right place.
Commit: aff68e694800a7dd893cb9e22c8678e797787a52
https://github.com/wesnoth/wesnoth/commit/aff68e694800a7dd893cb9e22c8678e797787a52
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/game_display.cpp
Log Message:
-----------
Game Display: formatting update
Commit: 85039301516818cd13423e770266d9f5bf9d107e
https://github.com/wesnoth/wesnoth/commit/85039301516818cd13423e770266d9f5bf9d107e
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/gui/core/canvas.cpp
M src/gui/core/canvas.hpp
Log Message:
-----------
GUI2/Canvas: some refactoring to correctly reimplement the shape caching mechanism
The purpose of the shape caching is essentially to allow multiple draws to consecutively add to
previously drawn content. It essentially adds another condition for clearing the texture prior
to rendering.
I also moved the shape list handling into the draw function itself so it's only executed once
if needed instead multiple times when calling functions like set_variable - not that it actually
would have done anything after the first call, but this allows me to keep the clearing-the-texture
code in one place.
Commit: 217c3e6bd051e37cf70b034aa10ec4becf972ae9
https://github.com/wesnoth/wesnoth/commit/217c3e6bd051e37cf70b034aa10ec4becf972ae9
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/display.cpp
Log Message:
-----------
Display: removed old software blitting routines from scroll
Commit: 8c6a16b4dd0502e041946ff2eb69227b842ee911
https://github.com/wesnoth/wesnoth/commit/8c6a16b4dd0502e041946ff2eb69227b842ee911
Author: Charles Dang <exodia339 at gmail.com>
Date: 2018-03-08 (Thu, 08 Mar 2018)
Changed paths:
M src/display.cpp
M src/display.hpp
Log Message:
-----------
display general compilation fixes
Compare: https://github.com/wesnoth/wesnoth/compare/c2391c1b5e06...8c6a16b4dd05
More information about the Commits
mailing list