object_lightblock (#1414)

* naming

* Original naming

* sun block
This commit is contained in:
Nuss 2023-10-06 22:40:56 +02:00 committed by GitHub
parent 6ea91335c5
commit 16bc54b63b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 8 deletions

View File

@ -1,9 +1,10 @@
<Root> <Root>
<!-- Object for the Sun Block -->
<File Name="object_lightblock" Segment="6"> <File Name="object_lightblock" Segment="6">
<DList Name="object_lightblock_DL_000170" Offset="0x170" /> <!-- Original name is "z2_brick_light_modelT" --> <DList Name="gSunBlockEmptyDL" Offset="0x170" /> <!-- Original name is "z2_brick_light_modelT" -->
<DList Name="object_lightblock_DL_000178" Offset="0x178" /> <!-- Original name is "z2_brick_light_model" --> <DList Name="gSunBlockDL" Offset="0x178" /> <!-- Original name is "z2_brick_light_model" -->
<Texture Name="object_lightblock_TLUT_000258" OutName="tlut_000258" Format="rgba16" Width="4" Height="4" Offset="0x258" /> <Texture Name="gSunBlockTLUT" OutName="sun_block_tlut" Format="rgba16" Width="4" Height="4" Offset="0x258" />
<Texture Name="object_lightblock_Tex_000278" OutName="tex_000278" Format="ci4" Width="64" Height="64" Offset="0x278" /> <Texture Name="gSunBlockTex" OutName="sun_block" Format="ci4" Width="64" Height="64" Offset="0x278" />
<Collision Name="object_lightblock_Colheader_000B80" Offset="0xB80" /> <!-- Original name is "z2_brick_light_bgdatainfo" --> <Collision Name="gSunBlockCol" Offset="0xB80" /> <!-- Original name is "z2_brick_light_bgdatainfo" -->
</File> </File>
</Root> </Root>

View File

@ -98,7 +98,7 @@ void ObjLightblock_Init(Actor* thisx, PlayState* play) {
return; return;
} }
DynaPolyActor_LoadMesh(play, &this->dyna, &object_lightblock_Colheader_000B80); DynaPolyActor_LoadMesh(play, &this->dyna, &gSunBlockCol);
Collider_SetCylinder(play, &this->collider, &this->dyna.actor, &sCylinderInit); Collider_SetCylinder(play, &this->collider, &this->dyna.actor, &sCylinderInit);
Collider_UpdateCylinder(&this->dyna.actor, &this->collider); Collider_UpdateCylinder(&this->dyna.actor, &this->collider);
this->collider.dim.radius = typeVars->radius; this->collider.dim.radius = typeVars->radius;
@ -200,13 +200,13 @@ void ObjLightblock_Draw(Actor* thisx, PlayState* play) {
gSPSegment(POLY_XLU_DISP++, 0x08, D_801AEF88); gSPSegment(POLY_XLU_DISP++, 0x08, D_801AEF88);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 255, 255, 255, this->alpha); gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, 255, 255, 255, this->alpha);
gSPDisplayList(POLY_XLU_DISP++, object_lightblock_DL_000178); gSPDisplayList(POLY_XLU_DISP++, gSunBlockDL);
} else { } else {
Gfx_SetupDL25_Opa(play->state.gfxCtx); Gfx_SetupDL25_Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, D_801AEFA0); gSPSegment(POLY_OPA_DISP++, 0x08, D_801AEFA0);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0x80, 255, 255, 255, 255); gDPSetPrimColor(POLY_OPA_DISP++, 0, 0x80, 255, 255, 255, 255);
gSPDisplayList(POLY_OPA_DISP++, object_lightblock_DL_000178); gSPDisplayList(POLY_OPA_DISP++, gSunBlockDL);
} }
CLOSE_DISPS(play->state.gfxCtx); CLOSE_DISPS(play->state.gfxCtx);