コード例 #1
0
ファイル: w_wad.c プロジェクト: CaptainHIT/prboom
void W_Init(void)
{
  // CPhipps - start with nothing

  numlumps = 0; lumpinfo = NULL;

  { // CPhipps - new wadfiles array used 
    // open all the files, load headers, and count lumps
    int i;
    for (i=0; (size_t)i<numwadfiles; i++)
      W_AddFile(&wadfiles[i]);
  }

  if (!numlumps)
    I_Error ("W_Init: No files found");

  //jff 1/23/98
  // get all the sprites and flats into one marked block each
  // killough 1/24/98: change interface to use M_START/M_END explicitly
  // killough 4/17/98: Add namespace tags to each entry
  // killough 4/4/98: add colormap markers
  W_CoalesceMarkedResource("S_START", "S_END", ns_sprites);
  W_CoalesceMarkedResource("F_START", "F_END", ns_flats);
  W_CoalesceMarkedResource("C_START", "C_END", ns_colormaps);
  W_CoalesceMarkedResource("B_START", "B_END", ns_prboom);
  W_CoalesceMarkedResource("HI_START", "HI_END", ns_hires);

  // killough 1/31/98: initialize lump hash table
  W_HashLumps();

  /* cph 2001/07/07 - separated cache setup */
  lprintf(LO_INFO,"W_InitCache\n");
  W_InitCache();
}
コード例 #2
0
ファイル: w_wad.c プロジェクト: camgunz/d2k
void W_Init(void) {
  // CPhipps - start with nothing

  numlumps = 0;
  lumpinfo = NULL;

  // CPhipps - new wadfiles array used
  // open all the files, load headers, and count lumps
  for (unsigned int i = 0; i < resource_files->len; i++)
    W_AddFile(i);

  if (!numlumps)
    I_Error("W_Init: No files found");

  //jff 1/23/98
  // get all the sprites and flats into one marked block each
  // killough 1/24/98: change interface to use M_START/M_END explicitly
  // killough 4/17/98: Add namespace tags to each entry
  // killough 4/4/98: add colormap markers
  W_CoalesceMarkedResource("S_START", "S_END", ns_sprites);
  W_CoalesceMarkedResource("F_START", "F_END", ns_flats);
  W_CoalesceMarkedResource("C_START", "C_END", ns_colormaps);
  W_CoalesceMarkedResource("B_START", "B_END", ns_prboom);
  r_have_internal_hires = (
    0 < W_CoalesceMarkedResource("HI_START", "HI_END", ns_hires)
  );

  // killough 1/31/98: initialize lump hash table
  W_HashLumps();

  /* cph 2001/07/07 - separated cache setup */
  W_InitCache();

  V_FreePlaypal();
}