mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-14 03:44:34 +00:00
Misc Small Retail Files OK (#1687)
* shrink_window, z_lib, z_lights OK * sys_cfb.c OK * cleanup
This commit is contained in:
parent
7c5ab8fcec
commit
e33d76568c
4 changed files with 40 additions and 35 deletions
|
@ -64,13 +64,12 @@ void Lights_Draw(Lights* lights, GraphicsContext* gfxCtx) {
|
|||
gSPNumLights(POLY_OPA_DISP++, lights->numLights);
|
||||
gSPNumLights(POLY_XLU_DISP++, lights->numLights);
|
||||
|
||||
i = 0;
|
||||
light = &lights->l.l[0];
|
||||
i = 0;
|
||||
|
||||
while (i < lights->numLights) {
|
||||
gSPLight(POLY_OPA_DISP++, light, ++i);
|
||||
gSPLight(POLY_XLU_DISP++, light, i);
|
||||
light++;
|
||||
gSPLight(POLY_XLU_DISP++, light++, i);
|
||||
}
|
||||
|
||||
// ambient light is total number of lights + 1
|
||||
|
@ -314,22 +313,20 @@ Lights* Lights_New(GraphicsContext* gfxCtx, u8 ambientR, u8 ambientG, u8 ambient
|
|||
}
|
||||
|
||||
void Lights_GlowCheck(PlayState* play) {
|
||||
LightNode* node;
|
||||
LightPoint* params;
|
||||
Vec3f pos;
|
||||
Vec3f multDest;
|
||||
f32 cappedInvWDest;
|
||||
f32 wX;
|
||||
f32 wY;
|
||||
s32 wZ;
|
||||
s32 zBuf;
|
||||
|
||||
node = play->lightCtx.listHead;
|
||||
LightNode* node = play->lightCtx.listHead;
|
||||
|
||||
while (node != NULL) {
|
||||
params = &node->info->params.point;
|
||||
LightPoint* params = &node->info->params.point;
|
||||
|
||||
if (node->info->type == LIGHT_POINT_GLOW) {
|
||||
Vec3f pos;
|
||||
Vec3f multDest;
|
||||
f32 cappedInvWDest;
|
||||
f32 wX;
|
||||
f32 wY;
|
||||
s32 wZ;
|
||||
s32 zBuf;
|
||||
|
||||
pos.x = params->x;
|
||||
pos.y = params->y;
|
||||
pos.z = params->z;
|
||||
|
@ -362,9 +359,7 @@ void Lights_GlowCheck(PlayState* play) {
|
|||
|
||||
void Lights_DrawGlow(PlayState* play) {
|
||||
s32 pad;
|
||||
LightNode* node;
|
||||
|
||||
node = play->lightCtx.listHead;
|
||||
LightNode* node = play->lightCtx.listHead;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_lights.c", 887);
|
||||
|
||||
|
@ -374,23 +369,20 @@ void Lights_DrawGlow(PlayState* play) {
|
|||
gSPDisplayList(POLY_XLU_DISP++, gGlowCircleTextureLoadDL);
|
||||
|
||||
while (node != NULL) {
|
||||
LightInfo* info;
|
||||
LightPoint* params;
|
||||
f32 scale;
|
||||
s32 pad[4];
|
||||
if ((node->info->type == LIGHT_POINT_GLOW)) {
|
||||
s32 pad[6];
|
||||
LightPoint* params = &node->info->params.point;
|
||||
|
||||
info = node->info;
|
||||
params = &info->params.point;
|
||||
if (params->drawGlow) {
|
||||
f32 scale = SQ(params->radius) * 0.0000026f;
|
||||
|
||||
if ((info->type == LIGHT_POINT_GLOW) && (params->drawGlow)) {
|
||||
scale = SQ(params->radius) * 0.0000026f;
|
||||
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, params->color[0], params->color[1], params->color[2], 50);
|
||||
Matrix_Translate(params->x, params->y, params->z, MTXMODE_NEW);
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_lights.c", 918),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGlowCircleDL);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, params->color[0], params->color[1], params->color[2], 50);
|
||||
Matrix_Translate(params->x, params->y, params->z, MTXMODE_NEW);
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEW(play->state.gfxCtx, "../z_lights.c", 918),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGlowCircleDL);
|
||||
}
|
||||
}
|
||||
|
||||
node = node->next;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue