Fix (2) pointers cast as u32

This commit is contained in:
louist103 2024-01-11 19:49:32 -05:00 committed by Garrett Cox
parent c351a4a580
commit bba57b078e
2 changed files with 4 additions and 4 deletions

View File

@ -109,7 +109,7 @@ void Jpeg_CopyToZbuffer(u16* src, u16* zbuffer, s32 x, s32 y) {
* unaligned values in JPEG header files.
*/
u16 Jpeg_GetUnalignedU16(u8* ptr) {
if (((u32)ptr & 1) == 0) {
if (((uintptr_t)ptr & 1) == 0) {
// Read the value normally if it's aligned to a 16-bit address.
return *(u16*)ptr;
} else {

View File

@ -1208,14 +1208,14 @@ void EnSlime_Draw(Actor* thisx, PlayState* play) {
// Ice block is not active
Scene_SetRenderModeXlu(play, 0, 1);
gSPSegment(POLY_OPA_DISP++, 9, (u32)sEyeTextures[this->eyeTexIndex]);
gSPSegment(POLY_OPA_DISP++, 9, (uintptr_t)sEyeTextures[this->eyeTexIndex]);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 30, 70, 255);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gChuchuEyesDL);
} else {
Scene_SetRenderModeXlu(play, 1, 2);
gSPSegment(POLY_XLU_DISP++, 9, (u32)sEyeTextures[this->eyeTexIndex]);
gSPSegment(POLY_XLU_DISP++, 9, (uintptr_t)sEyeTextures[this->eyeTexIndex]);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gChuchuEyesDL);
}
@ -1241,7 +1241,7 @@ void EnSlime_Draw(Actor* thisx, PlayState* play) {
this->actor.world.pos.z, MTXMODE_NEW);
Matrix_Scale(0.03f, 0.03f, 0.03f, MTXMODE_APPLY);
gSPSegment(POLY_OPA_DISP++, 8, (u32)this->itemDropTex);
gSPSegment(POLY_OPA_DISP++, 8, (uintptr_t)this->itemDropTex);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gItemDropDL);
}