-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fov_permissive2 - Bumps usage #110
Comments
Note that the memory allocated for Functions like |
The collection is not iterated or randomly accessed by any From that it seems that ViewBumpContainer serves as kind of local memory allocator only. On other hand when allocated mem for Bump structure is accessed via I'm not saying if current code needs to be changed. I'm trying to understand significance of bumps-collection. EDIT: The views and bumps are separate memory regions right?
|
I think you might be correct. How Do you think that views don't need to have Previously a lot used to be static variables randomly accessed by the functions in this module until I made the implementation reentrant. My refactors may have changed how easy or hard it is to read the code, and my inexperience with the implementation might have left something that'd be easy to refactor that I missed.
Yes, and that should maybe be clear from the separate mallocs. I was too paranoid to allocate them as one block when refactoring. There's also |
In fact I'm looking at c# port of this algorithm, where I've found this collection not needed there. I've checked other impls and found this one. I'm not and c/C++ expert, but I will look at it locally what would happen if this custom allocator will be removed. In a day or two will report back :) |
This is a C99 version, and I don't have benchmarking setup for it so unless it makes the code easier to read I wouldn't worry about changing it. A link to the C# implementation you looked at might be useful for later reference. |
I've started with this code: http://www.adammil.net/blog/v125_roguelike_vision_algorithms.html And then I will drop my check with libtcode :) Thank you! |
Turns out I already have a link to that page included in issue #71, that issue tracks FOV resources and the changes I wanted to make to FOV in libtcod but didn't have time for. |
Hi,
I'm looking through impl for permissive FOV and I cannot find usage of
bumps
passed tocheck_quadrant
.Of course there is mem shenanigans, adding to this "collection", but is there code that is using that collections content in a way that it affects visibility?
libtcod/src/libtcod/fov_permissive2.c
Line 294 in 713817b
The text was updated successfully, but these errors were encountered: