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 map 3D objects #368

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

Conversation

Kuruyia
Copy link
Contributor

@Kuruyia Kuruyia commented Feb 10, 2025

This mainly documents the ov5_021E15F4.c file, which is in charge of reading 3D map objects from the land data NARC, managing them, and rendering them.

A "3D map object" is defined here as a 3D model that is separate from the map 3D model, and that can be positioned, rotated, and scaled independently. For instance, they are usually used to place buildings on the various maps.

@Kuruyia
Copy link
Contributor Author

Kuruyia commented Feb 10, 2025

Still not sure about the Map3DObject naming scheme, may be too close to the already-existing MapObject

Also, maybe LoadedMap3DObjects is worthy of being called Map3DObjectManager?

Copy link
Collaborator

@lhearachel lhearachel left a comment

Choose a reason for hiding this comment

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

Still not sure about the Map3DObject naming scheme, may be too close to the already-existing MapObject.

I believe that these are just called Buildings in the binary space.

Also, maybe LoadedMap3DObjects is worthy of being called Map3DObjectManager?

I agree.

include/constants/map_3d_object.h Outdated Show resolved Hide resolved
include/field/field_system.h Outdated Show resolved Hide resolved
include/overlay005/honey_tree.h Outdated Show resolved Hide resolved
src/overlay005/map_3d_object.c Outdated Show resolved Hide resolved
include/overlay005/map_3d_object.h Outdated Show resolved Hide resolved
@Kuruyia
Copy link
Contributor Author

Kuruyia commented Feb 11, 2025

I believe that these are just called Buildings in the binary space.

Didn't know about that, makes sense. Then let's go with Building/BuildingFile/BuildingManager for the structs here

Note: it may make less sense for non-building objects such as the honey tree you mentioned in another comment

@Kuruyia Kuruyia force-pushed the feat/document-map-objects branch from 0e45deb to 8f7479e Compare February 11, 2025 06:23
@lhearachel
Copy link
Collaborator

Note: it may make less sense for non-building objects such as the honey tree you mentioned in another comment

I think that this is a fine trade-off. In the context of mapping, it's easier to refer to them as buildings as a unifying term, and I believe that the nsbmd extension used in the SDK types implicitly refers to building as a term.

lhearachel
lhearachel previously approved these changes Feb 12, 2025
NNS_G3dRenderObjInit(renderObj, *resMdl);
}

static void ov5_021E1944(const NNSG3dResMdl *resMdl, VecFx32 *position, MtxFx33 *rotation, VecFx32 *scale, const UnkStruct_ov5_021D5778 *param4, const int param5)
Copy link
Collaborator

Choose a reason for hiding this comment

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

question: What are we missing to know how to document this function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We'll probably want to document the ov5_021D56BC.c file as this is the one in which UnkStruct_ov5_021D5778, ov5_021D579C() and ov5_021D57B4() are defined. Looks like it may be a pretty quick one to document.

Also, if you have an idea of what NNS_G3dDraw1Mat1Shp() does, that would help me. Looking at the function name and definition wasn't really helpful. Something about material and shape?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also, if you have an idea of what NNS_G3dDraw1Mat1Shp() does, that would help me. Looking at the function name and definition wasn't really helpful. Something about material and shape?

Yep, that's my reading on it: sends the requested material and shape to VRAM for rendering.

This mainly documents the `ov5_021E15F4.c` file, which is in charge of
reading 3D map objects from the land data NARC, managing them, and
rendering them.

A "3D map object" is defined here as a 3D model that is separate from
the map 3D model, and that can be positioned, rotated, and scaled
independently. For instance, they are usually used to place buildings on
the various maps.

Signed-off-by: Kuruyia <[email protected]>
@Kuruyia Kuruyia force-pushed the feat/document-map-objects branch from 8f7479e to 605397b Compare February 13, 2025 07:34
@lhearachel
Copy link
Collaborator

Coming back to this, per discussion on Discord, let's walk back on using the binary terminology and generalize the name to something like MapProp or Map3DObject. There were some good points raised in that discussion.

@lhearachel lhearachel dismissed their stale review February 13, 2025 16:47

terminology bikeshedding

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