-
Notifications
You must be signed in to change notification settings - Fork 92
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
base: main
Are you sure you want to change the base?
Document area data #392
Conversation
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>
ba186c5
to
ba186eb
Compare
// Note: the first element is the size of this array | ||
u16 *mapPropModelIDs; |
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.
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" |
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.
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) |
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.
polish:
static void AreaData_StripTextureData(void *ressourceFile, NNSG3dResTex *texture) | |
static void AreaData_StripTextureData(void *resourceFile, NNSG3dResTex *texture) |
return &(areaDataManager->mapPropModelFiles[0]); | ||
} | ||
|
||
return &(areaDataManager->mapPropModelFiles[mapPropModelID]); |
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.
polish: Unnecessary parens; &areaDataManager->mapPropModelFiles[mapPropModelID]
should be totally valid.
if ((areaDataManager->areaData.areaLightArchiveID == 0) || (areaDataManager->areaData.areaLightArchiveID == 3)) { | ||
return TRUE; | ||
} else { | ||
return FALSE; | ||
} |
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.
question: Does this match as:
if ((areaDataManager->areaData.areaLightArchiveID == 0) || (areaDataManager->areaData.areaLightArchiveID == 3)) { | |
return TRUE; | |
} else { | |
return FALSE; | |
} | |
return areaDataManager->areaData.areaLightArchiveID == 0 || areaDataManager->areaData.areaLightArchiveID == 3; |
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
toMapProp.modelID
for more clarity (especially when interacting with the new area data functions).