minetest/src/client
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
..
meshgen Client map: do frustum culling via planes (#12710) 2022-09-18 15:28:53 +02:00
render Improve bloom effect (#12916) 2022-11-02 09:09:48 +01:00
shadows Reduce exposure of various internals (#12885) 2022-11-03 17:35:31 +01:00
CMakeLists.txt Implement rendering pipeline and post-processing (#12465) 2022-09-06 08:25:18 +02:00
activeobjectmgr.cpp ContentCAO: Fix segfault on quit (attached) 2019-10-09 20:03:31 +02:00
activeobjectmgr.h Add an activeobject manager to hold active objects (#7939) 2018-12-13 20:18:54 +01:00
camera.cpp Client map: do frustum culling via planes (#12710) 2022-09-18 15:28:53 +02:00
camera.h Client map: do frustum culling via planes (#12710) 2022-09-18 15:28:53 +02:00
client.cpp Implement vector and node conversion in Lua (#12609) 2022-10-18 18:01:44 -04:00
client.h Avoid duplication of mod metadata in memory (#12562) 2022-09-26 17:03:43 -04:00
clientenvironment.cpp Allow rotating entity selectionboxes (#12379) 2022-10-30 16:53:14 +01:00
clientenvironment.h Pause shader animation timer in singleplayer pause menu (#12766) 2022-09-27 16:23:07 -04:00
clientevent.h No damage effects on hp_max change (#11846) 2022-06-11 20:00:40 +02:00
clientlauncher.cpp Code optimizations / refactor (#12704) 2022-09-06 11:21:09 +01:00
clientlauncher.h Drop --videomodes, fullscreen_bpp and high_precision_fpu settings 2021-06-16 17:41:34 +02:00
clientmap.cpp Reduce exposure of various internals (#12885) 2022-11-03 17:35:31 +01:00
clientmap.h Reduce exposure of various internals (#12885) 2022-11-03 17:35:31 +01:00
clientmedia.cpp Dynamic_Add_Media v2 (#11550) 2021-09-09 16:51:35 +02:00
clientmedia.h Print announce error response (#11878) 2022-01-01 22:44:56 +01:00
clientobject.cpp Move client-specific files to 'src/client' (#7902) 2018-11-28 20:01:49 +01:00
clientobject.h fix: some code tidy about includes & irr namespaces 2021-05-03 19:49:19 +02:00
clientsimpleobject.h Move clientsimpleobject.h to client folder (#9630) 2020-04-10 20:10:51 +02:00
clouds.cpp Enforce limits of settings that could cause buggy behaviour (#12450) 2022-07-09 22:32:08 +02:00
clouds.h Allow resetting celestial vault elements by leaving its arguments empty (#11922) 2022-01-22 12:42:49 +01:00
content_cao.cpp Reduce exposure of various internals (#12885) 2022-11-03 17:35:31 +01:00
content_cao.h Remove an unused method and header includes 2022-06-28 12:21:12 +02:00
content_cso.cpp Optimize lighting calculation (#12797) 2022-10-09 10:50:26 -04:00
content_cso.h Move client-specific files to 'src/client' (#7902) 2018-11-28 20:01:49 +01:00
content_mapblock.cpp Use the same light level for non-solid draw types as for solid 2022-10-30 16:53:45 +01:00
content_mapblock.h Avoid rendering invisible faces of simple nodeboxes (#12262) 2022-05-04 23:44:55 +02:00
event_manager.h Darwin platform build fix (#10376) 2020-09-09 19:12:03 +02:00
filecache.cpp Server pushing media at runtime (#9961) 2020-06-13 19:03:26 +02:00
filecache.h Server pushing media at runtime (#9961) 2020-06-13 19:03:26 +02:00
fontengine.cpp Enforce limits of settings that could cause buggy behaviour (#12450) 2022-07-09 22:32:08 +02:00
fontengine.h Fully remove bitmap font support (#11863) 2022-01-08 14:53:25 +01:00
game.cpp Improve bloom effect (#12916) 2022-11-02 09:09:48 +01:00
game.h Rework drawtime and related timekeeping code to use microseconds 2022-01-27 22:30:02 +01:00
gameui.cpp Enforce limits of settings that could cause buggy behaviour (#12450) 2022-07-09 22:32:08 +02:00
gameui.h Rework drawtime and related timekeeping code to use microseconds 2022-01-27 22:30:02 +01:00
guiscalingfilter.cpp FormSpec: 9-slice images, animated_images, and fgimg_middle (#12453) 2022-07-03 08:52:26 -04:00
guiscalingfilter.h FormSpec: 9-slice images, animated_images, and fgimg_middle (#12453) 2022-07-03 08:52:26 -04:00
hud.cpp Allow rotating entity selectionboxes (#12379) 2022-10-30 16:53:14 +01:00
hud.h Allow rotating entity selectionboxes (#12379) 2022-10-30 16:53:14 +01:00
imagefilters.cpp Code optimizations / refactor (#12704) 2022-09-06 11:21:09 +01:00
imagefilters.h Enable cleanTransparent filter for mipmapping and improve its' algorithm (#11145) 2021-04-20 19:50:19 +02:00
inputhandler.cpp Fix movement in random_input mode (#11592) 2021-09-05 19:58:50 +02:00
inputhandler.h Restore pass-through of direction keys (#11924) 2022-01-09 18:46:36 +01:00
joystick_controller.cpp Enforce limits of settings that could cause buggy behaviour (#12450) 2022-07-09 22:32:08 +02:00
joystick_controller.h Joystick sensitivity for player movement (#11262) 2021-08-27 20:24:24 +02:00
keycode.cpp Code optimizations / refactor (#12704) 2022-09-06 11:21:09 +01:00
keycode.h Revert "Replace MyEventReceiver KeyList with std::unordered_set" (#10622) 2020-11-12 19:16:02 +01:00
keys.h Add a key to toggle map block bounds (#11172) 2021-04-20 19:23:31 +02:00
localplayer.cpp LocalPlayer: Fix sneaking on nodes with large collisionboxes (#12626) 2022-10-17 07:56:04 -04:00
localplayer.h Fix formula used for acceleration (#12353) 2022-09-20 10:55:51 +02:00
mapblock_mesh.cpp Always add increment when getting node interior light 2022-10-30 16:53:45 +01:00
mapblock_mesh.h Client map: do frustum culling via planes (#12710) 2022-09-18 15:28:53 +02:00
mesh.cpp Remove workaround for normals not matching winding order (#12460) 2022-07-17 14:45:42 +01:00
mesh.h Remove a few unused functions reported by callcatcher (#11658) 2021-10-12 20:12:20 +02:00
mesh_generator_thread.cpp Limit force shadow update to urgent blocks (#12692) 2022-08-14 20:29:20 +02:00
mesh_generator_thread.h Limit force shadow update to urgent blocks (#12692) 2022-08-14 20:29:20 +02:00
minimap.cpp Code optimizations / refactor (#12704) 2022-09-06 11:21:09 +01:00
minimap.h Code optimizations / refactor (#12704) 2022-09-06 11:21:09 +01:00
particles.cpp Optimize lighting calculation (#12797) 2022-10-09 10:50:26 -04:00
particles.h Fix some warnings (#12615) 2022-07-30 12:51:23 +01:00
renderingengine.cpp Improve bloom effect (#12916) 2022-11-02 09:09:48 +01:00
renderingengine.h Improve bloom effect (#12916) 2022-11-02 09:09:48 +01:00
shader.cpp Bloom (#12791) 2022-09-29 20:34:05 +02:00
shader.h Implement rendering pipeline and post-processing (#12465) 2022-09-06 08:25:18 +02:00
sky.cpp Enable negative values for sun/moon orbit tilt (Northern hemisphere) (#12904) 2022-10-30 16:54:06 +01:00
sky.h Add documentation of sun/moon orientation/scale differences (#12145) 2022-09-06 11:21:55 +01:00
sound.cpp Cleanup sound manager class (#7158) 2018-03-24 15:45:25 +01:00
sound.h Sounds: Various little improvements (#12486) 2022-07-09 22:32:24 +02:00
sound_openal.cpp Code optimizations / refactor (#12704) 2022-09-06 11:21:09 +01:00
sound_openal.h Cleanup sound manager class (#7158) 2018-03-24 15:45:25 +01:00
tile.cpp Code optimizations / refactor (#12704) 2022-09-06 11:21:09 +01:00
tile.h Fix mapblock geometry optimisation not working 2022-05-08 19:11:44 +02:00
wieldmesh.cpp Shadow list improvements (#12898) 2022-10-26 22:26:09 +02:00
wieldmesh.h Shadow mapping render pass (#11244) 2021-06-06 18:51:21 +02:00