You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to make a generic NDArray type in C99 to help with refactoring libtcod's FOV and pathfinding algorithms. TCOD_Map does not work how I want it to since it combines FOV and pathfinding in an unnecessary way.
I've messed around with several C++ implementations so far: 1234 and what I think I've been missing from these is that I should've focused more on views into arrays more. Having a good generic constexpr view type which various storages can convert into will reduce duplicate code and complexity while not having much of a performance penalty.
For C99 I'll have to mess with a handful of hard-coded numeric types. I also want at least one view-like object that takes callbacks instead of strided memory which will remove any limitations on what can be used as a view. I'll wrap all of this up in a union type and maybe make all functions interacting with this inline.
The text was updated successfully, but these errors were encountered:
I need to make a generic NDArray type in C99 to help with refactoring libtcod's FOV and pathfinding algorithms.
TCOD_Map
does not work how I want it to since it combines FOV and pathfinding in an unnecessary way.I've messed around with several C++ implementations so far: 1 2 3 4 and what I think I've been missing from these is that I should've focused more on views into arrays more. Having a good generic constexpr view type which various storages can convert into will reduce duplicate code and complexity while not having much of a performance penalty.
For C99 I'll have to mess with a handful of hard-coded numeric types. I also want at least one view-like object that takes callbacks instead of strided memory which will remove any limitations on what can be used as a view. I'll wrap all of this up in a union type and maybe make all functions interacting with this inline.
The text was updated successfully, but these errors were encountered: