217void render_windows(s32* windowsArray, s32 parent, s32
flags, s32 baseX, s32 baseY, s32 opacity, s32 darkening, f32 (*rotScaleMtx)[4]) {
226 s32 posX, posY, posZ;
227 f32 scaleX, scaleY, rotX, rotY, rotZ;
228 s32 childDarkening, childOpacity;
234 s32 (*fpUpdateFunc)(s32 windowIndex, s32*
flags, s32* posX, s32* posY, s32* posZ, f32* scaleX, f32* scaleY,
235 f32* rotX, f32* rotY, f32* rotZ, s32* darkening, s32* opacity);
237 void* fpDrawContents;
238 void* drawContentsArg0;
242 childWindowID = windowsArray[i];
244 if (childWindowID < 0) {
248 childWindow = &
gWindows[childWindowID];
254 if (fpUpdateIdx == 0 || childWindow->
parent != parent) {
259 posX = childWindow->
pos.
x;
260 posY = childWindow->
pos.
y;
263 rotX = rotY = rotZ = 0.0f;
264 scaleY = scaleX = 1.0f;
267 width = childWindow->
width;
268 height = childWindow->
height;
270 if (fpUpdateIdx > 0 && fpUpdateIdx < 14) {
273 childWindow->
flags &= ~updateData->windowFlagsUnset;
282 childOpacity = updateData->
opacity;
286 fpUpdateFunc = (s32 (*)(s32 windowIndex, s32*
flags, s32* posX, s32* posY, s32* posZ, f32* scaleX, f32* scaleY,
287 f32* rotX, f32* rotY, f32* rotZ, s32* darkening, s32* opacity))(childWindow->
fpUpdate.
func);
288 fpUpdateFunc(childWindowID, &childFlags, &posX, &posY, &posZ, &scaleX, &scaleY, &rotX, &rotY, &rotZ, &childDarkening, &childOpacity);
301 childDarkening += darkening;
302 childOpacity = childOpacity * opacity / 255;
308 if (childDarkening > 255) {
309 childDarkening = 255;
320 boxTranslateX = window->
width;
325 boxTranslateY = window->
height;
328 boxFlags = childFlags;
333 if (
draw_box(boxFlags, windowStyle, posX, posY, posZ, width, height, childOpacity, childDarkening,
334 scaleX, scaleY, rotX, rotY, rotZ, fpDrawContents, drawContentsArg0, rotScaleMtx,
335 boxTranslateX, boxTranslateY, outMtx) == 0) {
336 if (childFlags == 0 && rotScaleMtx == 0) {
341 render_windows(windowsArray, childWindowID, childFlags, posX, posY, childOpacity, childDarkening, outMtx);
362 gSPSetGeometryMode(
gMainGfxPos++, G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_SHADING_SMOOTH);
364 gDPSetCombineMode(
gMainGfxPos++, G_CC_SHADE, G_CC_SHADE);
366 gSPSetOtherMode(
gMainGfxPos++, G_SETOTHERMODE_H, G_MDSFT_ALPHADITHER, 16, G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_NONE);
void(* func)(s32 windowIndex, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
void basic_window_update(s32 windowID, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
void basic_hidden_window_update(s32 windowID, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
void unused_main_menu_window_darkening(s32 windowID, s32 *flags, s32 *posX, s32 *posY, s32 *posZ, f32 *scaleX, f32 *scaleY, f32 *rotX, f32 *rotY, f32 *rotZ, s32 *darkening, s32 *opacity)
void set_window_properties(s32 windowID, s32 posX, s32 posY, s32 width, s32 height, u8 priority, void *fpDrawContents, void *drawContentsArg0, s8 parent)