-
Notifications
You must be signed in to change notification settings - Fork 29
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
MapObj: Implement ChurchDoor
#164
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember something similar in one of my PR. This get solved by an inline function so I tried and get a match like this https://decomp.me/scratch/J82tg
Reviewed 6 of 7 files at r1, all commit messages.
Reviewable status: 6 of 7 files reviewed, all discussions resolved (waiting on @MonsterDruide1)
7c741c1
to
ab473c6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooh, great comment! This also helps justify putting the magic value "MoonWorldWeddingRoomStage" into a separate function, to avoid writing it twice in the file. Adjusted accordingly, thanks!
Reviewable status: 6 of 7 files reviewed, all discussions resolved (waiting on @MonsterDruide1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all commit messages.
Reviewable status: 6 of 7 files reviewed, 1 unresolved discussion (waiting on @MonsterDruide1)
src/MapObj/ChurchDoor.cpp
line 31 at r2 (raw file):
} // namespace bool isCurrentStageMoonWeddingRoom(const al::LiveActor* actor) {
I think it should be a header defined function because a function defined only in the cpp file would result in a function without symbol in the binary. However there is no such function near ChurchDoor's functions.
ab473c6
to
1a6feeb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 6 of 7 files reviewed, 1 unresolved discussion (waiting on @Fuzzy2319 and @MonsterDruide1)
src/MapObj/ChurchDoor.cpp
line 31 at r2 (raw file):
Previously, Fuzzy2319 wrote…
I think it should be a header defined function because a function defined only in the cpp file would result in a function without symbol in the binary. However there is no such function near ChurchDoor's functions.
Moving it to the header requires including a bunch more header files, which I don't really like, but ... I guess that's still the most accurate way to implement this. Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 5 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @MonsterDruide1)
If you mark a function as |
1a6feeb
to
e195f01
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! I tested and can confirm that functions declared as inline
and only within the cpp
fully disappear when compiling. Adjusted accordingly.
Reviewable status: 5 of 7 files reviewed, all discussions resolved (waiting on @Fuzzy2319)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r4, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @MonsterDruide1)
I wanted to do another actor today, so my "randomly scroll around and select one" strategy landed on this one.
Notable things about the actor itself:
MoonWorldWeddingRoomStage
, meaning the church on the moon itself - not the rematch.Notable things from the programmer's side:
For other decompilers:
This PR is fully matching. However, one line occurs twice that I'm not quite happy with:
this ? this : nullptr
=> this pattern usually happens when a
LiveActor
is casted to some of its supertypes using justthis
. However, in this case, it seems to be required to explicitly writethis ? this : nullptr
, causing a compiler warning (this
should never be null, so this check is "useless"). If anyone finds an alternative, I'm happy to change the two occurences of this!https://decomp.me/scratch/O4tVr
This change is