Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Document area data #392

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

Conversation

Kuruyia
Copy link
Contributor

@Kuruyia Kuruyia commented Feb 20, 2025

This documents the ov5_021EF75C.c file, which is in charge of loading various "area data" NARCs that, in the end, contain the textures of maps, the textures and models of map props, and lighting information.

Also, renamed MapProp.id to MapProp.modelID for more clarity (especially when interacting with the new area data functions).

This documents the `ov5_021EF75C.c` file, which is in charge of loading
various "area data" NARCs that, in the end, contain the textures of
maps, the textures and models of map props, and lighting information.

Also, renamed `MapProp.id` to `MapProp.modelID` for more clarity
(especially when interacting with the new area data functions).

Signed-off-by: Kuruyia <github@kuruyia.net>
@Kuruyia Kuruyia force-pushed the feat/document-area-data branch from ba186c5 to ba186eb Compare February 20, 2025 16:39
Comment on lines +36 to +37
// Note: the first element is the size of this array
u16 *mapPropModelIDs;
Copy link
Collaborator

Choose a reason for hiding this comment

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

polish: I personally don't think that this comment is necessary, but am totally fine to keep it.

#include "heap.h"
#include "narc.h"

#define MAP_PROP_MATERIAL_SHAPE_FILE_PATH "fielddata/build_model/build_model_matshp.dat"
Copy link
Collaborator

Choose a reason for hiding this comment

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

thought: I personally don't see the value of this being a constant. We have some string-literals in the repository already.

COLOR_DARK_GRAY
};

static void AreaData_StripTextureData(void *ressourceFile, NNSG3dResTex *texture)
Copy link
Collaborator

Choose a reason for hiding this comment

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

polish:

Suggested change
static void AreaData_StripTextureData(void *ressourceFile, NNSG3dResTex *texture)
static void AreaData_StripTextureData(void *resourceFile, NNSG3dResTex *texture)

return &(areaDataManager->mapPropModelFiles[0]);
}

return &(areaDataManager->mapPropModelFiles[mapPropModelID]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

polish: Unnecessary parens; &areaDataManager->mapPropModelFiles[mapPropModelID] should be totally valid.

Comment on lines +215 to +219
if ((areaDataManager->areaData.areaLightArchiveID == 0) || (areaDataManager->areaData.areaLightArchiveID == 3)) {
return TRUE;
} else {
return FALSE;
}
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
if ((areaDataManager->areaData.areaLightArchiveID == 0) || (areaDataManager->areaData.areaLightArchiveID == 3)) {
return TRUE;
} else {
return FALSE;
}
return areaDataManager->areaData.areaLightArchiveID == 0 || areaDataManager->areaData.areaLightArchiveID == 3;

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants