Skip to content

Commit

Permalink
Update some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
NY00123 committed Jul 25, 2021
1 parent 0e7c656 commit a26eaf8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/id91_11/cat_all/cat3d/c3_def.h
Expand Up @@ -518,7 +518,7 @@ extern id0_unsigned_t wallwidth [VIEWWIDTH];
//extern id0_unsigned_t wallseg [VIEWWIDTH];
extern id0_byte_t *wallseg [VIEWWIDTH];
extern id0_unsigned_t wallofs [VIEWWIDTH];
// REFKEEN - These arrays may actually be larger than VIEWDITH cells long,
// REFKEEN - These arrays may actually be larger than VIEWWIDTH cells long,
// and they're used just in C3_ASM.C anyway
//extern id0_unsigned_t screenbyte [VIEWWIDTH];
//extern id0_unsigned_t screenbit [VIEWWIDTH];
Expand Down
26 changes: 15 additions & 11 deletions src/kdreams/kd_play.c
Expand Up @@ -1073,7 +1073,7 @@ void ClipToWalls (objtype *ob)
// while the flower is in one of the s_pooffrom* states.
//
// If state == NULL then, under DOS (with Borland C++ 2.0),
// then ob->state->pushtofloor is a part of a small Borland C++ string
// ob->state->pushtofloor is a part of a small Borland C++ string.
if (!(ob->state) || ob->state->pushtofloor)
//if (ob->state->pushtofloor)
{
Expand Down Expand Up @@ -1305,8 +1305,10 @@ id0_int_t DoActor (objtype *ob,id0_int_t tics)

state = ob->state;

// REFKEEN: Workaround for vanilla Keen Dreams bug (state may be 0)
// Based on CGA v1.05 but it may be the same in other versions
// REFKEEN: Vanilla Keen Dreams bug emulation (state may be 0).
//
// If state == NULL then, under DOS (with Borland C++ 2.0),
// state->progress is a part of a small Borland C++ string.
if (state && state->progress == think)
//if (state->progress == think)
{
Expand All @@ -1324,18 +1326,18 @@ id0_int_t DoActor (objtype *ob,id0_int_t tics)

newtics = ob->ticcount+tics;

// REFKEEN: Workaround for vanilla Keen Dreams bug (state may be 0)
// FIXME: Hopefully this always works - Magic number is CGA v1.05 specific,
// but it may actually work with other original versions
// REFKEEN: Vanilla Keen Dreams bug emulation (state may be 0)
// Magic number is based on what would occur if there were a
// null-pointer dereference, assuming the value was never overwritten.
if ((!state && newtics < 0x2064) || (state && (newtics < state->tictime || state->tictime == 0)))
//if (newtics < state->tictime || state->tictime == 0)
{
ob->ticcount = newtics;
// REFKEEN: Workaround for vanilla Keen Dreams bug (state may be 0)
// REFKEEN: Vanilla Keen Dreams bug (state may be 0)
// state->progress would differ from all compared values with
// the original DOS versions in that case, unless modified.
if (!state)
{
return 0; // Both cases appear to be skipped as of CGA v1.05
}
return 0;
if (state->progress == slide || state->progress == slidethink)
{
if (ob->xdir)
Expand Down Expand Up @@ -1434,7 +1436,9 @@ void StateMachine (objtype *ob)
//
// passed through to next state
//
// REFKEEN: Workaround for vanilla Keen Dreams CGA v1.05 bug (state may be 0)
// REFKEEN: Vanilla Keen Dreams CGA v1.05 bug fix (state may be 0).
// state->skippable would be true with the original EXEs if state
// was 0, unless modified earlier.
if (state && !state->skippable && excesstics >= state->tictime)
//if (!state->skippable && excesstics >= state->tictime)
excesstics = DoActor(ob,state->tictime-1);
Expand Down
2 changes: 1 addition & 1 deletion src/wolf3d/wl_main.c
Expand Up @@ -1461,7 +1461,7 @@ void DoJukebox(void)
if (!UPLOAD)
{
//#ifndef UPLOAD
// REFKEEN: Use second isn't of hundredth of a sec
// REFKEEN: Use second instead of hundredth of a sec
int hour, min, sec;
BE_Cross_GetLocalTime_UNSAFE(&hour, &min, &sec);
start = (sec%3)*6;
Expand Down

0 comments on commit a26eaf8

Please sign in to comment.