Documentation : Made some comments clearer

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
This commit is contained in:
Gabriel Ravier 2019-11-05 11:19:20 +01:00
parent f840be28c7
commit 5b18283e5f
6 changed files with 9 additions and 9 deletions

View file

@ -27,7 +27,7 @@ void GetCompileDate(int *year, int *month, int *day)
months[10] = "Oct"; months[10] = "Oct";
months[11] = "Nov"; months[11] = "Nov";
months[12] = "Dec"; months[12] = "Dec";
sscanf(__DATE__, "%s %d %d", month_string, day, year); // The expansion of __DATE__ is not reproductible. We might want to change this sscanf(__DATE__, "%s %d %d", month_string, day, year); // The expansion of __DATE__ is not reproductible. TODO : Think about changing this to be reproductible
for (i = 0; i < 12; ++i) // This being 12 instead of 13 might be a bug, but it works anyway by accident for (i = 0; i < 12; ++i) // This being 12 instead of 13 might be a bug, but it works anyway by accident
if (!memcmp(&month_string, months[i], 3)) if (!memcmp(&month_string, months[i], 3))

View file

@ -680,7 +680,7 @@ void ActMyChar_Normal(BOOL bKey)
// Change position // Change position
if (gMC.xm <= resist && gMC.xm >= -resist) if (gMC.xm <= resist && gMC.xm >= -resist)
{ {
// Okay, this is getting stupid. Why the HELL is the code written like this? // This case is completely empty. This is most likely the result of commented code or some other change (so this is most likely inaccurate to the original source)
} }
else else
{ {

View file

@ -135,7 +135,7 @@ void DamageMyChar(int damage)
// Lose a whimsical star // Lose a whimsical star
if (gMC.equip & 0x80 && gMC.star > 0) if (gMC.equip & 0x80 && gMC.star > 0)
gMC.star = (short)gMC.star - 1; // Why the hell is it written this way? gMC.star = (short)gMC.star - 1; // For some reason, does a cast to short. Probably not accurate to the original source
// Lose experience // Lose experience
if (gMC.equip & 4) if (gMC.equip & 4)

View file

@ -70,7 +70,7 @@ void ActNpc160(NPCHAR *npc)
case 3: case 3:
npc->damage = 20; npc->damage = 20;
npc->damage = 0; // Smart code npc->damage = 0; // Duplicate line
if (++npc->act_wait > 24) if (++npc->act_wait > 24)
{ {

View file

@ -142,20 +142,20 @@ void ActNpc321(NPCHAR *npc)
break; break;
case 1: case 1:
if (gMC.direct == 0) if (gMC.direct == 0) // Does the same thing whether this is false or true
npc->x = npc->pNpc->x; npc->x = npc->pNpc->x;
else else
npc->x = npc->pNpc->x; // Duplicate derp npc->x = npc->pNpc->x;
direct = 1; direct = 1;
npc->y = npc->pNpc->y - 0x1400; npc->y = npc->pNpc->y - 0x1400;
break; break;
case 2: case 2:
if (gMC.direct == 0) if (gMC.direct == 0) // Does the same thing whether this is false or true
npc->x = npc->pNpc->x; npc->x = npc->pNpc->x;
else else
npc->x = npc->pNpc->x; // Duplicate derp npc->x = npc->pNpc->x;
direct = 3; direct = 3;
npc->y = npc->pNpc->y + 0x1400; npc->y = npc->pNpc->y + 0x1400;

View file

@ -390,7 +390,7 @@ int MakePixToneObject(const PIXTONEPARAMETER *ptp, int ptp_num, int no)
++ptp_pointer; ++ptp_pointer;
} }
// Maybe this used to be something to prevent audio popping? // This is self-assignment, so redundant. Maybe this used to be something to prevent audio popping ?
mixed_pcm_buffer[0] = mixed_pcm_buffer[0]; mixed_pcm_buffer[0] = mixed_pcm_buffer[0];
mixed_pcm_buffer[sample_count - 1] = mixed_pcm_buffer[sample_count - 1]; mixed_pcm_buffer[sample_count - 1] = mixed_pcm_buffer[sample_count - 1];