Fix up PACKAGE_DOOMWAD
This commit is contained in:
parent
99569251a8
commit
b0b4725119
3 changed files with 25 additions and 20 deletions
|
@ -1547,7 +1547,11 @@ qboolean R_ApplyRenderer_Load (rendererstate_t *newr)
|
|||
host_basepal = (qbyte *)FS_LoadMallocFile ("gfx/palette.lmp", &sz);
|
||||
vid.fullbright = host_basepal?32:0; //q1-like mods are assumed to have 32 fullbright pixels, even if the colormap is missing.
|
||||
if (!host_basepal)
|
||||
{
|
||||
host_basepal = (qbyte *)FS_LoadMallocFile ("wad/playpal", &sz);
|
||||
if (host_basepal && sz > 768)
|
||||
sz = 768;
|
||||
}
|
||||
if (!host_basepal || sz != 768)
|
||||
{
|
||||
#if defined(Q2CLIENT) && defined(IMAGEFMT_PCX)
|
||||
|
|
|
@ -389,7 +389,7 @@ searchpathfuncs_t *QDECL FSPAK_LoadArchive (vfsfile_t *file, searchpathfuncs_t *
|
|||
}
|
||||
|
||||
#ifdef PACKAGE_DOOMWAD
|
||||
searchpathfuncs_t *QDECL FSDWD_LoadArchive (vfsfile_t *packhandle, const char *desc, const char *prefix)
|
||||
searchpathfuncs_t *QDECL FSDWD_LoadArchive (vfsfile_t *packhandle, searchpathfuncs_t *parent, const char *wadname, const char *desc, const char *prefix)
|
||||
{
|
||||
dwadheader_t header;
|
||||
int i;
|
||||
|
@ -484,7 +484,7 @@ newsection:
|
|||
newfiles[i].filelen = 4;
|
||||
break;
|
||||
}
|
||||
if (!strncmp(filename, "gl_", 3) && ((filename[4] == 'e' && filename[5] == 'm') || !strncmp(filename+3, "map", 3)))
|
||||
if (!strncmp(filename, "gl_", 3) && ((filename[3] == 'e' && filename[5] == 'm') || !strncmp(filename+3, "map", 3)))
|
||||
{ //this is the start of a beutiful new map
|
||||
section = 5;
|
||||
strcpy(sectionname, filename+3);
|
||||
|
@ -523,7 +523,8 @@ newsection:
|
|||
}
|
||||
sprintf (newfiles[i].name, "maps/%s%s.%s", neatwadname, sectionname, filename);
|
||||
break;
|
||||
case 2: //sprite section
|
||||
case 2: //sprite section. sprites use the first 4 letters to identify the name of the sprite, and the last 4 to define its frame+dir [+ xflipped frame+dir]
|
||||
//FIXME: inject a '.dsp' file for filesystem accountability when we see an a0 (or a1) postfix.
|
||||
if (!strcmp(filename, "s_end"))
|
||||
{
|
||||
section = 0;
|
||||
|
@ -531,7 +532,7 @@ newsection:
|
|||
}
|
||||
sprintf (newfiles[i].name, "sprites/%s", filename);
|
||||
break;
|
||||
case 3: //patches section
|
||||
case 3: //patches section. they need the textures1/2 lump in order to position correctly as actual textures.
|
||||
if (!strcmp(filename, "p_end"))
|
||||
{
|
||||
section = 0;
|
||||
|
@ -539,7 +540,7 @@ newsection:
|
|||
}
|
||||
sprintf (newfiles[i].name, "patches/%s.pat", filename);
|
||||
break;
|
||||
case 4: //flats section
|
||||
case 4: //flats section. note that these are raw p8 64*64 images
|
||||
if (!strcmp(filename, "f_end"))
|
||||
{
|
||||
section = 0;
|
||||
|
|
|
@ -2460,17 +2460,17 @@ struct font_s *Font_LoadFont(const char *fontfilename, float vheight, float scal
|
|||
h = 0;
|
||||
}
|
||||
|
||||
f->chars[i].advance = dp->width; /*this is how much line space the char takes*/
|
||||
f->chars[i].left = -dp->leftoffset;
|
||||
f->chars[i].top = -dp->topoffset;
|
||||
f->chars[i].nextchar = 0;
|
||||
f->chars[i].pad = 0;
|
||||
f->chars[i].texplane = SINGLEPLANE;
|
||||
c = Font_GetCharStore(f, i);
|
||||
c->advance = dp->width; /*this is how much line space the char takes*/
|
||||
c->left = -dp->leftoffset;
|
||||
c->top = -dp->topoffset;
|
||||
c->nextchar = 0;
|
||||
c->texplane = SINGLEPLANE;
|
||||
|
||||
f->chars[i].bmx = x;
|
||||
f->chars[i].bmy = y;
|
||||
f->chars[i].bmh = dp->height;
|
||||
f->chars[i].bmw = dp->width;
|
||||
c->bmx = x;
|
||||
c->bmy = y;
|
||||
c->bmh = dp->height;
|
||||
c->bmw = dp->width;
|
||||
|
||||
Doom_ExpandPatch(dp, &buf[y*PLANEWIDTH + x], PLANEWIDTH);
|
||||
|
||||
|
@ -2490,15 +2490,15 @@ struct font_s *Font_LoadFont(const char *fontfilename, float vheight, float scal
|
|||
{
|
||||
//doom doesn't have many chars, so make sure the lower case chars exist.
|
||||
for (i = 'a'; i <= 'z'; i++)
|
||||
f->chars[i] = f->chars[i-'a'+'A'];
|
||||
Font_CopyChar(f, i-'a'+'A', i);
|
||||
|
||||
//no space char either
|
||||
f->chars[' '].advance = 8;
|
||||
c = Font_GetCharStore(f, ' ');
|
||||
c->advance = 8;
|
||||
|
||||
f->singletexture = R_LoadTexture8("doomfont", PLANEWIDTH, PLANEHEIGHT, buf, 0, true);
|
||||
for (i = 0xe000; i <= 0xe0ff; i++)
|
||||
{
|
||||
f->chars[i] = f->chars[toupper(i&0x7f)];
|
||||
}
|
||||
Font_CopyChar(f, toupper(i&0x7f), i);
|
||||
return f;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue