minetest/src/gui
Loïc Blot 322c8cf270
Reduce exposure of various internals (#12885)
* refactoring(StaticObjectList): don't expose m_active and m_stored anymore

This prevents our old crap code where anyone can access to StaticObjectList. use proper modifiers. It also permits to do a short cleanup on MapBlock using a helper

* refactoring(MapBlock): reduce a bit exposed m_active_blocks variable

* refactoring: MapBlock::m_node_timers is now private

We already had various helpers to perform this privatization, just use it. Also factorize the MapBlock stepping code for timers using already existing code and importing them from ServerEnvironment to MapBlock.

It's currently done pretty straight forward without any inheritance as MapBlock is just used everywhere, maybe in a future we'll have ServerMapBlock over MapBlock. Currently for a simple function let's just use proper objects and add a comment warning

* refactoring(Server): fix duplicated function for add/remove node

* refactoring(guiFormSpecMenu): add removeAll function to prevent duplicated code

* refactoring(ShadowRenderer) + perf: code quality  + increase performance

* All callers are already using the point and we should never test a function with nullptr node, it's a bug. Removed workaround which was hacky and fix the bug
* Drop clientmap lookup from shadowrendered, just use directly its
  pointer and forbid to push it in the generic list
* Reduce memory pressure on the renderShadowObject by preventing
  deallocating and reallocating multiple vectors on each node

* refactoring(MapBlock): reduce exposure of MapBlock::m_static_objects

It's not complete as some parts of the code are pretty nested, but it's better than before :)

* fix: better working on new functions & drop unwanted 2 lines

Co-authored-by: Jude Melton-Houghton <jwmhjwmh@gmail.com>

Co-authored-by: Jude Melton-Houghton <jwmhjwmh@gmail.com>
2022-11-03 17:35:31 +01:00
..
CMakeLists.txt Add register dialog to separate login/register (#12185) 2022-06-05 17:47:38 +02:00
StyleSpec.h FormSpec: 9-slice images, animated_images, and fgimg_middle (#12453) 2022-07-03 08:52:26 -04:00
guiAnimatedImage.cpp FormSpec: 9-slice images, animated_images, and fgimg_middle (#12453) 2022-07-03 08:52:26 -04:00
guiAnimatedImage.h FormSpec: 9-slice images, animated_images, and fgimg_middle (#12453) 2022-07-03 08:52:26 -04:00
guiBackgroundImage.cpp FormSpec: 9-slice images, animated_images, and fgimg_middle (#12453) 2022-07-03 08:52:26 -04:00
guiBackgroundImage.h Formspec: draw order and clipping for all elements (#8740) 2019-11-07 20:11:01 +01:00
guiBox.cpp Fix box[]es not being clipped (#10473) 2020-10-08 19:44:47 +02:00
guiBox.h Add gradients and borders to FormSpec boxes (#8676) 2020-08-19 18:14:47 -07:00
guiButton.cpp Code optimizations / refactor (#12704) 2022-09-06 11:21:09 +01:00
guiButton.h Remove unused (de)serializeAttributes() methods 2021-12-29 23:00:16 +01:00
guiButtonImage.cpp FormSpec: 9-slice images, animated_images, and fgimg_middle (#12453) 2022-07-03 08:52:26 -04:00
guiButtonImage.h FormSpec: 9-slice images, animated_images, and fgimg_middle (#12453) 2022-07-03 08:52:26 -04:00
guiButtonItemImage.cpp Reserve vectors before pushing and other code quality changes (#11161) 2021-04-05 13:38:31 +02:00
guiButtonItemImage.h Reserve vectors before pushing and other code quality changes (#11161) 2021-04-05 13:38:31 +02:00
guiChatConsole.cpp guiChatConsole: fix the unicode characters crowded together on prompt (#12867) 2022-10-21 17:12:07 +02:00
guiChatConsole.h Make chat web links clickable (#11092) 2021-06-20 17:20:24 +02:00
guiEditBox.cpp Remove unused (de)serializeAttributes() methods 2021-12-29 23:00:16 +01:00
guiEditBox.h Remove unused (de)serializeAttributes() methods 2021-12-29 23:00:16 +01:00
guiEditBoxWithScrollbar.cpp Remove unused (de)serializeAttributes() methods 2021-12-29 23:00:16 +01:00
guiEditBoxWithScrollbar.h Remove unused (de)serializeAttributes() methods 2021-12-29 23:00:16 +01:00
guiEngine.cpp Implement vector and node conversion in Lua (#12609) 2022-10-18 18:01:44 -04:00
guiEngine.h Re-order sound-related code (#12382) 2022-06-20 21:56:12 +02:00
guiFormSpecMenu.cpp Reduce exposure of various internals (#12885) 2022-11-03 17:35:31 +01:00
guiFormSpecMenu.h Reduce exposure of various internals (#12885) 2022-11-03 17:35:31 +01:00
guiHyperText.cpp Fully remove bitmap font support (#11863) 2022-01-08 14:53:25 +01:00
guiHyperText.h Fully remove bitmap font support (#11863) 2022-01-08 14:53:25 +01:00
guiInventoryList.cpp Fix list spacing and size (again) (#10869) 2021-02-02 20:55:13 +01:00
guiInventoryList.h GUIInventoryList: Keep item size while moving (#12896) 2022-10-24 13:58:56 +02:00
guiItemImage.cpp Refactor to centralize GUIButton styling/rendering code (#9090) 2019-12-09 20:06:51 +00:00
guiItemImage.h Formspec: draw order and clipping for all elements (#8740) 2019-11-07 20:11:01 +01:00
guiKeyChangeMenu.cpp Replace all uses of core::list with std::list (#12313) 2022-05-22 00:11:59 +02:00
guiKeyChangeMenu.h Replace all uses of core::list with std::list (#12313) 2022-05-22 00:11:59 +02:00
guiMainMenu.h Add register dialog to separate login/register (#12185) 2022-06-05 17:47:38 +02:00
guiPasswordChange.cpp Replace all uses of core::list with std::list (#12313) 2022-05-22 00:11:59 +02:00
guiPasswordChange.h Replace all uses of core::list with std::list (#12313) 2022-05-22 00:11:59 +02:00
guiPathSelectMenu.cpp Replace all uses of core::list with std::list (#12313) 2022-05-22 00:11:59 +02:00
guiPathSelectMenu.h Move touchscreen input handling to base GUIModalMenu class 2018-10-29 15:37:44 +01:00
guiScene.cpp Code optimizations / refactor (#12704) 2022-09-06 11:21:09 +01:00
guiScene.h GUIScene: Clear depth buffer + replace deprecated clearZBuffer calls 2021-03-16 23:28:16 +01:00
guiScrollBar.cpp Fix warnings about an unused variables and implicit conversion (#10586) 2020-11-12 21:05:47 +01:00
guiScrollBar.h Fix warnings about an unused variables and implicit conversion (#10586) 2020-11-12 21:05:47 +01:00
guiScrollContainer.cpp Replace all uses of core::list with std::list (#12313) 2022-05-22 00:11:59 +02:00
guiScrollContainer.h Avoid drawing clipped out formspec elements (#10095) 2020-08-23 22:50:14 +02:00
guiSkin.cpp Remove unused (de)serializeAttributes() methods 2021-12-29 23:00:16 +01:00
guiSkin.h Remove unused (de)serializeAttributes() methods 2021-12-29 23:00:16 +01:00
guiTable.cpp Enforce limits of settings that could cause buggy behaviour (#12450) 2022-07-09 22:32:08 +02:00
guiTable.h Add font styling options to tables and textlists (#10203) 2020-08-11 20:07:17 +02:00
guiVolumeChange.cpp Replace all uses of core::list with std::list (#12313) 2022-05-22 00:11:59 +02:00
guiVolumeChange.h Replace all uses of core::list with std::list (#12313) 2022-05-22 00:11:59 +02:00
mainmenumanager.h Replace all uses of core::list with std::list (#12313) 2022-05-22 00:11:59 +02:00
modalMenu.cpp Apply DPI Scaling to GUIModalMenu (#12693) 2022-08-15 21:19:47 +01:00
modalMenu.h Replace all uses of core::list with std::list (#12313) 2022-05-22 00:11:59 +02:00
profilergraph.cpp Rework drawtime and related timekeeping code to use microseconds 2022-01-27 22:30:02 +01:00
profilergraph.h Game refactor [4/X]: keycache is now owned by InputHandler 2018-01-20 16:38:38 +01:00
touchscreengui.cpp Add crosshair support for Android (#7865) 2022-09-29 20:30:33 +02:00
touchscreengui.h Add crosshair support for Android (#7865) 2022-09-29 20:30:33 +02:00