Merge branch 'fgs-port' into port-max-explosions

This commit is contained in:
Raf committed 2025-06-04 01:21:03 -03:00
commit 97444de634
4 files changed
+27 -18

No files matched your search

+14 -16
View File
@@ -1241,26 +1241,24 @@ void inputMouseGetRawDelta(s32 *dx, s32 *dy)
void inputMouseGetScaledDelta(f32* dx, f32* dy)
{
f32 mdx = 0.f, mdy = 0.f;
if (mouseLocked) {
mdx = mouseDX * (0.022f / 3.5f) * mouseSensX;
mdy = mouseDY * (0.022f / 3.5f) * mouseSensY;
}
if (dx) *dx = mdx;
if (dy) *dy = mdy;
f32 mdx = 0.f, mdy = 0.f;
if (mouseLocked) {
mdx = mouseDX * (0.022f / 3.5f) * mouseSensX;
mdy = mouseDY * (0.022f / 3.5f) * mouseSensY;
}
if (dx) *dx = mdx;
if (dy) *dy = mdy;
}
void inputMouseGetAbsScaledDelta(f32* dx, f32* dy)
{
f32 mdx = 0.f, mdy = 0.f;
if (mouseLocked) {
mdx = fabsf(mouseDX) * (0.022f / 3.5f) * fabsf(mouseSensX);
mdy = fabsf(mouseDY) * (0.022f / 3.5f) * fabsf(mouseSensY);
}
if (dx) *dx = mdx;
if (dy) *dy = mdy;
f32 mdx = 0.f, mdy = 0.f;
if (mouseLocked) {
mdx = mouseDX * (0.022f / 3.5f) * fabsf(mouseSensX);
mdy = mouseDY * (0.022f / 3.5f) * fabsf(mouseSensY);
}
if (dx) *dx = mdx;
if (dy) *dy = mdy;
}
void inputMouseGetSpeed(f32 *x, f32 *y)
+5
View File
@@ -859,6 +859,11 @@ PakErr2 pakReadHeaderAtOffset(s8 device, u32 offset, struct pakfileheader *heade
return PAK_ERR2_BADOFFSET;
}
if (offset > g_Paks[device].pdnumbytes - sizeof(sp38)) {
// not enough bytes left for a header
return PAK_ERR2_BADOFFSET;
}
if (!pakRetrieveHeaderFromCache(device, blocknum, headerptr)) {
result = pakReadWriteBlock(device, PFS(device), g_Paks[device].pdnoteindex, 0, offset, sizeof(sp38), sp38);
+7 -1
View File
@@ -2533,7 +2533,13 @@ f32 skyGetArtifactGroupIntensityFrac(struct artifact *artifacts)
s32 i;
for (i = 0; i < 8; i++) {
if (artifacts[i].type == ARTIFACTTYPE_CIRCLE && artifacts[i].actualdepth == 0xfffc) {
const u16 test =
#ifdef PLATFORM_N64
artifacts[i].actualdepth;
#else
artifacts[i].visiblelos;
#endif
if (artifacts[i].type == ARTIFACTTYPE_CIRCLE && test == 0xfffc) {
sum += 0.125f;
}
}
+1 -1
View File
@@ -10,6 +10,6 @@ void zbufAllocate(void);
void zbufSwap(void);
Gfx *zbufConfigureRdp(Gfx *gdl);
Gfx *zbufClear(Gfx *gdl);
Gfx *zbufDrawArtifactsOffscreen(Gfx *gdl);
Gfx *zbufSaveArtifactDepths(Gfx *gdl);
#endif