Skip to content
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

Ceilings on outdoor levels #86

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

entrez
Copy link
Contributor

@entrez entrez commented Aug 19, 2022

Opening this PR just to document the ceiling stuff I did a while ago. Needs
an extra field in struct rm so not for immediate use.

  • Add some missing ceiling_exists calls
  • Lay groundwork for des.add_ceiling()
  • Check for ceiling existing at a specific spot...
  • Improve(?) on ceiling-required trap generation
  • Require ceiling directly above for scroll of earth
  • Test the ceiling thing
  • Add ceilings to outdoors levels
  • Use separate bitmask for ceiling
  • Add roof to Sam-loca courtyard
  • Add another missing ceiling_exists call
  • Add wizmode option to highlight ceilings

@entrez
Copy link
Contributor Author

entrez commented Aug 19, 2022

This will also need some changes after next vanilla merge, to replace xchar with coordxy.

@copperwater
Copy link
Owner

On the 8.0-savebreaking branch soon there is an "unused" bitfield in struct rm that is intended to have bits allocated away from it for new purposes such as this.

@entrez entrez changed the base branch from master to 8.0-savebreaking September 6, 2022 20:37
@entrez
Copy link
Contributor Author

entrez commented Sep 6, 2022

Rebased onto 8.0-savebreaking

@entrez
Copy link
Contributor Author

entrez commented Sep 6, 2022

(poorly, apparently...)

entrez added 11 commits June 9, 2023 14:24
Add the function, make it work (once a bit is defined to be used with
it), make it accessible from level files.
...instead of a level-wide ceiling/no-ceiling, when appropriate.
This is arguably a better approach than the previous one, in that it
allows for rock traps to generate randomly indoors (or under some other
kind of ceiling) even on levels that are flagged 'outdoors'.  However,
it's a bit wasteful since any outdoors level without 'indoor' areas will
spend a bunch of cycles trying to place the trap before finally giving
up.  Maybe not that big a deal in the big picture though.
Instead of checking for any adjacent ceiling, require ceiling directly
above the hero or monster reading the scroll.  This avoids the need for
more complicated feedback (e.g. "the ceiling rumbles nearby" or similar
when there's no ceiling directly above you), and I think it probably
makes sense anyway...  This also allows us to drop the boolean param
from ceiling_exists.
Storing it in 'flags' was causing it to be overwritten when a door or
other furniture was added to a square.  It should be consistent even
when furniture, etc, changes.
aosdict pointed out there's no definitive indication that it's a
courtyard, and players who consider the possibility of a courtyard
may waste scrolls of earth standing in it, which would be frustrating.
I wouldn't include this in the actual release/master branch, since it
sloppily relies on overwriting the color and piggybacking off the
inverse video effect of object piles, but it's useful for testing
purposes.  If this were to be a permanent addition to the game I'd add
some new flag like MG_CEILING that could be used for this purpose, but I
doubt it's worth it.  I'm including it in this branch just so that
others can use it for testing if desired, because it's convenient.
@entrez entrez changed the base branch from 8.0-savebreaking to master June 9, 2023 18:47
@entrez
Copy link
Contributor Author

entrez commented Jun 9, 2023

Rebased onto master, so the coordxy stuff should be taken care of. Could probably take a look at it properly now and potentially adopt it (optionally after dropping the wizceiling option and squashing everything).

@entrez entrez marked this pull request as ready for review June 9, 2023 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants