-
Notifications
You must be signed in to change notification settings - Fork 79
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
Tunnels displaying correctly in low walls mode #3699
base: master
Are you sure you want to change the base?
Conversation
First I'm seeing in the wall height is calculated incorrectly
This comment was marked as off-topic.
This comment was marked as off-topic.
solidmask seemed to only count the number of solid cubes from the bottom (even though it shouldn't), so instead of checking if a column is 4 or more cubes tall, this checks if cube 4 (cubes[3]) or higher exists
I've been doing a lot of reading and some tests and I'm not sure what I'd need to fix to get this to work - the lines in question we were looking at are
The first part checks for cube[3] or higher, the second checks it's not a door or room and the third avoids ceiling mask collision issues. I tried changing the first part to checking if the cubes in any of those positions were nonempty and it made no difference. Removing the third part caused all sort of graphical issues. The second part is what worries me: Here I've tried all column combinations up to height 5, and the only ones which are affected are the solid columns of height 4 or 5. This tells us either:
I'm hoping this isn't the case, and there's some other piece of code that will just magically fix this, but I don't know. My guess (if it's actually a fundamental issue) is something to do with I've thrown out all sorts of ramblings on Discord about it all, but I'm really not sure what else I can do. I'm hoping someone with more experience can either identify the code that's causing the issue, or suggest ways to probe for the right info (e.g. checking the solidmask for columns or seeing what bitfields looks like for some examples and what CLF_CEILING_MASK looks like). Edit: The only other idea for how to work with this if it really does only work for solid columns is to make some sort of "dummy air cube" which is treated as solid by some checks and empty by others, i.e. most things consider it solid but creatures can work through it, although I don't know how that would work, as I don't know exactly what causes the issue: solidmask seems to work but I haven't probed the solidmask number for some test columns to see if it gives back what we need, and most checks seem to also be used for drawing the floor etc |
See https://discord.com/channels/480505152806191114/648319840288768000/1305891716133421127
Tunnels (i.e. columns with empty cubes inside but solid cubes above) don't display properly in low walls mode. I want to make them display correctly in low walls mode so they don't look weird and potential spoil secrets.
The aim is (for a standard 5-high column) to put the top of cube 5 onto cube 2, and display cubes 1 and 2.
I've tried to find code for low walls mode but I just can't seem to find it. Wall height seems to be
video_cluedo_mode
, but I can't find any code, just toggles.The only thing that seemed to help is find_column_height, which seems to treat the height as "how many solid blocks are there connected to the floor?", so for a cave with a hole in like in the pictures, it treats the height as 1 or 0. Maybe that's why it's not working - it's reading the height of these examples as 0 or 1. I'm going to see if this works, and if not hope someone can point me in the right direction.