Name func_8005B198 in Camera.h#2680
Conversation
Dragorn421
left a comment
There was a problem hiding this comment.
Some notes
About D_8011D3AC = rwData->curKeyFrame->initField & 0xF; (in Camera_Unique9 aka the implementation for CAM_SET_CS_C):
That code path is only taken when ONEPOINT_CS_INIT_FIELD_IS_TYPE_ACTORCAT(rwData->curKeyFrame->initField)
There are only two occurrences of ONEPOINT_CS_INIT_FIELD_ACTORCAT defining such a field, and they are both in onepointdemo id=3410 (which does set CAM_SET_CS_C)
That onepointdemo is only used by BgJyaBombchuiwa, and that actor doesn't check D_8011D3AC/func_8005B198() (but maybe another actor does during the relevant onepointdemo)
So all in all I would say that this use in Camera_Unique9 is irrelevant in the grand scheme of things
That leaves D_8011D3AC = camera->target->category; (in Camera_Demo5 aka the implementation for CAM_SET_CS_ATTENTION)
Let's look at func_8005B198() in important actor EnBox
In the EnBox_AppearOnSwitchFlag path, and others, func_8005B198() is used every frame (in EnBox_AppearInit) after a frame where OnePointCutscene_Attention(play, &this->dyna.actor); has been called
OnePointCutscene_Attention starts onepointdemo id=5010 which uses CAM_SET_CS_ATTENTION (exactly the setting leading to Camera_Demo5 and D_8011D3AC = camera->target->category;)
At that point the target (camera->target) is the actor that was passed to OnePointCutscene_Attention aka the EnBox instance
And since Demo5 sends control to Unique9 immediately (by setting the camera setting to CAM_SET_CS_C) the value stays until the next attention cutscene
And I don't know in which direction to push the analysis further
Anyway as fig said on discord ( https://discord.com/channels/688807550715560050/688851317593997489/1472297958929338571 ) I agree that the name seems too broad, currently you'd expect it to return GET_ACTIVE_CAM(play)->target->category
Contributions made in this pr are licensed under CC0