components/prboom/p_map.c
// e6y
// Code to emulate the behavior of Vanilla Doom when encountering an overrun
// of the spechit array.
// No more desyncs on compet-n\hr.wad\hr18*.lmp, all strain.wad\map07 demos etc.
// http://www.doomworld.com/vb/showthread.php?s=&threadid=35214
e6y
Code to emulate the behavior of Vanilla Doom when encountering an overrun
of the spechit array.
e6y Code to emulate the behavior of Vanilla Doom when encountering an overrun of the spechit array .
static void SpechitOverrun(line_t *ld)
{
  int addr = 0x00C09C98 + (ld - lines) * 0x3E;
  if (compatibility_level == dosdoom_compatibility || compatibility_level == tasdoom_compatibility)
  {
    switch(numspechit)
    {
    case 8: break; 
    case 9: 
      tmfloorz = addr;
      break;
    case 10:
      tmceilingz = addr;
      break;
    default:
        lprintf(LO_ERROR, "SpechitOverrun: Warning: unable to emulate"
                          " an overrun where numspechit=%i\n",
                          numspechit);
      break;
    }
  }
  else
  {
    switch(numspechit)
    {
      case 8: break; 
      case 9: 
      case 10:
      case 11:
      case 12:
        tmbbox[numspechit-9] = addr;
        break;
      case 13: 
        nofit = addr;
        break;
      case 14: 
        crushchange = addr;
        break;
      default:
        lprintf(LO_ERROR, "SpechitOverrun: Warning: unable to emulate"
                          " an overrun where numspechit=%i\n",
                          numspechit);
        break;
    }
  }
}
static void SpechitOverrun ( line_t * ld ) { int addr = 0x00C09C98 + ( ld - lines ) * 0x3E ; if ( compatibility_level == dosdoom_compatibility || compatibility_level == tasdoom_compatibility ) { switch ( numspechit ) { case 8 : break ; case 9 : tmfloorz = addr ; break ; case 10 : tmceilingz = addr ; break ; default : lprintf ( LO_ERROR , " " " \n " , numspechit ) ; break ; } } else { switch ( numspechit ) { case 8 : break ; case 9 : case 10 : case 11 : case 12 : tmbbox [ numspechit - 9 ] = addr ; break ; case 13 : nofit = addr ; break ; case 14 : crushchange = addr ; break ; default : lprintf ( LO_ERROR , " " " \n " , numspechit ) ; break ; } } }
e6y
Code to emulate the behavior of Vanilla Doom when encountering an overrun
of the spechit array.
e6y Code to emulate the behavior of Vanilla Doom when encountering an overrun of the spechit array .
//int addr = 0x01C09C98 + (ld - lines) * 0x3E; // e6y // There are no more desyncs in the following dosdoom demos:  // flsofdth.wad\fod3uv.lmp - http://www.doomworld.com/sda/flsofdth.htm // hr.wad\hf181430.lmp - http://www.doomworld.com/tas/hf181430.zip // hr.wad\hr181329.lmp - http://www.doomworld.com/tas/hr181329.zip // icarus.wad\ic09uv.lmp - http://competn.doom2.net/pub/sda/i-o/icuvlmps.zip /* strange cph's code */ /* numspechit, not significant it seems - cph */