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

Document BDHC util #363

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Kuruyia
Copy link
Contributor

@Kuruyia Kuruyia commented Feb 6, 2025

This documents the bdhc_util.c file, which mainly contains the function used to calculated an object's height based on its 2D position and the BDHC of the map its currently on.

This documents the `bdhc_util.c` file, which mainly contains the
function used to calculated an object's height based on its 2D position
and the BDHC of the map its currently on.

Signed-off-by: Kuruyia <[email protected]>
@Kuruyia
Copy link
Contributor Author

Kuruyia commented Feb 6, 2025

Still not sure about the objectY naming convention. I like the consistency with objectX/objectZ, but objectHeight might be more understandable.


#include "overlay005/bdhc.h"

BOOL BDHCUtil_CalculateObjectHeight(const fx32 objectY, const fx32 objectX, const fx32 objectZ, const BDHC *bdhc, fx32 *newObjectY);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: I'm definitely more in favor of objectHeight or objectH for clarity.

@@ -0,0 +1,11 @@
#ifndef POKEPLATINUM_BDHC_UTIL_H
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Given how small this is, how would we feel combining this with bdhc_loader?

Comment on lines +91 to +93
stripLowerBound = strips[mid].lowerBound;

if (stripLowerBound > targetLowerBound) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: Does this match as:

Suggested change
stripLowerBound = strips[mid].lowerBound;
if (stripLowerBound > targetLowerBound) {
if (strips[mid].lowerBound > targetLowerBound) {

after removing the stripLowerBound declaration?

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