[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/vr/ - Retro Games

Search:


View post   

>> No.6274121 [View]
File: 53 KB, 636x441, 40086-Perfect_Dark_(USA)-8.jpg [View same] [iqdb] [saucenao] [google]
6274121

The Perfect Dark decompilation project has revealed that Perfect Dark has anti-piracy checks in its code. I've never heard of this before. Does anyone know exactly what these do?

https://github.com/n64decomp/perfect_dark/search?q=PIRACYCHECKS&unscoped_q=PIRACYCHECKS

For instance...

void alertNearbyChrsToNoise(f32 *radius, struct coord *noisepos)
{
u32 stack[2];
s32 *end = (s32 *)&func0f084e58;
s32 i;

for (i = 0; i < g_NumChrsA; i++) {
if (g_ChrsA[i].animdata
&& chrGetTargetProp(&g_ChrsA[i]) == g_Vars.currentplayer->prop
&& g_ChrsA[i].prop
&& g_ChrsA[i].prop->type == PROPTYPE_CHR
&& (g_ChrsA[i].prop->flags & 4)) {
f32 distance = chrGetDistanceToCoord(&g_ChrsA[i], noisepos);

if (distance == 0) {
distance = 2;
} else {
distance = (10.0f * *radius * g_ChrsA[i].hearingscale) / distance;
}

if (distance > 1) {
chrRecordLastHearTargetTime(&g_ChrsA[i]);
}
}
}

#if PIRACYCHECKS
{
u32 checksum = 0;
s32 *ptr = (s32 *)&func0f084cf0;

while (ptr < end) {
checksum ^= *ptr;
checksum <<= 1;
ptr++;
}

if (checksum != 0xa17a4ca0) {
struct explosiontype *type = &g_ExplosionTypes[0];
s32 i;

for (i = 0; i != NUM_EXPLOSIONTYPES - 1; i++) {
type->rangeh = 80;
type->rangev = 60;
type->changerateh = 15;
type->changeratev = 5;
type->innersize = 1500;
type->blastradius = 200;
type->damageradius = 3600;
type++;
}
}
}
#endif
}

>> No.3590826 [View]
File: 52 KB, 636x441, 40086-Perfect_Dark_(USA)-8.jpg [View same] [iqdb] [saucenao] [google]
3590826

Name a flaw that isn't framerate-related, and assume that everyone was smart enough to switch to 1.2 Solitaire controls.

Navigation
View posts[+24][+48][+96]