components/prboom/p_setup.c
// figgi -- FIXME: Automap showes wrong zoom boundaries when starting game
//           when P_LoadVertexes2 is used with classic BSP nodes.
- FIXME: Automap showes wrong zoom boundaries when starting game
when P_LoadVertexes2 is used with classic BSP nodes.
- FIXME : Automap showes wrong zoom boundaries when starting game when P_LoadVertexes2 is used with classic BSP nodes .
static void P_LoadVertexes2(int lump, int gllump)
{
  const byte         *gldata;
  int                 i;
  const mapvertex_t*  ml;
  firstglvertex = W_LumpLength(lump) / sizeof(mapvertex_t);
  numvertexes   = W_LumpLength(lump) / sizeof(mapvertex_t);
  if (gllump >= 0)  
  {
    gldata = W_CacheLumpNum(gllump);
    if (nodesVersion == gNd2) 
    {
      const mapglvertex_t*  mgl;
      numvertexes += (W_LumpLength(gllump) - GL_VERT_OFFSET)/sizeof(mapglvertex_t);
      vertexes   = Z_Malloc (numvertexes*sizeof(vertex_t),PU_LEVEL,0);
      mgl      = (const mapglvertex_t *) (gldata + GL_VERT_OFFSET);
      for (i = firstglvertex; i < numvertexes; i++)
      {
        vertexes[i].x = mgl->x;
        vertexes[i].y = mgl->y;
        mgl++;
      }
    }
    else
    {
      numvertexes += W_LumpLength(gllump)/sizeof(mapvertex_t);
      vertexes     = Z_Malloc (numvertexes*sizeof(vertex_t),PU_LEVEL,0);
      ml       = (const mapvertex_t *)gldata;
      for (i = firstglvertex; i < numvertexes; i++)
      {
        vertexes[i].x = SHORT(ml->x)<<FRACBITS;
        vertexes[i].y = SHORT(ml->y)<<FRACBITS;
        ml++;
      }
    }
    W_UnlockLumpNum(gllump);
  }
  ml = (const mapvertex_t*) W_CacheLumpNum(lump);
  for (i=0; i < firstglvertex; i++)
  {
    vertexes[i].x = SHORT(ml->x)<<FRACBITS;
    vertexes[i].y = SHORT(ml->y)<<FRACBITS;
    ml++;
  }
  W_UnlockLumpNum(lump);
}
static void P_LoadVertexes2 ( int lump , int gllump ) { const byte * gldata ; int i ; const mapvertex_t * ml ; firstglvertex = W_LumpLength ( lump ) / sizeof ( mapvertex_t ) ; numvertexes = W_LumpLength ( lump ) / sizeof ( mapvertex_t ) ; if ( gllump >= 0 ) { gldata = W_CacheLumpNum ( gllump ) ; if ( nodesVersion == gNd2 ) { const mapglvertex_t * mgl ; numvertexes += ( W_LumpLength ( gllump ) - GL_VERT_OFFSET ) / sizeof ( mapglvertex_t ) ; vertexes = Z_Malloc ( numvertexes * sizeof ( vertex_t ) , PU_LEVEL , 0 ) ; mgl = ( const mapglvertex_t * ) ( gldata + GL_VERT_OFFSET ) ; for ( i = firstglvertex ; i < numvertexes ; i ++ ) { vertexes [ i ] . x = mgl -> x ; vertexes [ i ] . y = mgl -> y ; mgl ++ ; } } else { numvertexes += W_LumpLength ( gllump ) / sizeof ( mapvertex_t ) ; vertexes = Z_Malloc ( numvertexes * sizeof ( vertex_t ) , PU_LEVEL , 0 ) ; ml = ( const mapvertex_t * ) gldata ; for ( i = firstglvertex ; i < numvertexes ; i ++ ) { vertexes [ i ] . x = SHORT ( ml -> x ) << FRACBITS ; vertexes [ i ] . y = SHORT ( ml -> y ) << FRACBITS ; ml ++ ; } } W_UnlockLumpNum ( gllump ) ; } ml = ( const mapvertex_t * ) W_CacheLumpNum ( lump ) ; for ( i = 0 ; i < firstglvertex ; i ++ ) { vertexes [ i ] . x = SHORT ( ml -> x ) << FRACBITS ; vertexes [ i ] . y = SHORT ( ml -> y ) << FRACBITS ; ml ++ ; } W_UnlockLumpNum ( lump ) ; }
figgi -- FIXME: Automap showes wrong zoom boundaries when starting game
when P_LoadVertexes2 is used with classic BSP nodes.
figgi -- FIXME : Automap showes wrong zoom boundaries when starting game when P_LoadVertexes2 is used with classic BSP nodes .
// check for glVertices // 32 bit GL_VERT format (16.16 fixed)