mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 03:51:32 +00:00
Some compile fixes.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5684 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
4c2066601a
commit
6931c565df
7 changed files with 23 additions and 15 deletions
|
@ -325,12 +325,17 @@ if [ "$BUILD_LINUXx86" != "n" ]; then
|
|||
cd csaddon/src
|
||||
$BUILDFOLDER/linux_x86/fteqcc32 -srcfile csaddon.src > $BUILDLOGFOLDER/csaddon.txt
|
||||
mv ../csaddon.dat $BUILDFOLDER/csaddon/
|
||||
cd ..
|
||||
zip -9 $BUILDFOLDER/csaddon/csaddon.pk3 csaddon.dat
|
||||
|
||||
cd ../../menusys
|
||||
cd $SVNROOT/quakec
|
||||
cd menusys
|
||||
$BUILDFOLDER/linux_x86/fteqcc32 -srcfile menu.src > $BUILDLOGFOLDER/menu.txt
|
||||
rm -f fteqcc.log
|
||||
zip -q -9 -o -r $BUILDFOLDER/csaddon/menusys_src.zip .
|
||||
mv ../menu.dat $BUILDFOLDER/csaddon/
|
||||
cd ..
|
||||
zip -9 $BUILDFOLDER/csaddon/menusys.pk3 menu.dat
|
||||
else
|
||||
echo "Skiping csaddon + qcmenu, no compiler build"
|
||||
fi
|
||||
|
|
|
@ -4913,7 +4913,7 @@ typedef struct
|
|||
qbyte *dstdata;
|
||||
|
||||
unsigned int srcspeed;
|
||||
unsigned int srcwidth;
|
||||
qaudiofmt_t srcformat;
|
||||
unsigned int srcchannels;
|
||||
unsigned int srcoffset; /*in bytes*/
|
||||
unsigned int srclen; /*in bytes*/
|
||||
|
@ -4992,7 +4992,7 @@ sfxcache_t *QDECL S_MP3_Locate(sfx_t *sfx, sfxcache_t *buf, ssamplepos_t start,
|
|||
ACMSTREAMHEADER strhdr;
|
||||
char buffer[8192];
|
||||
extern cvar_t snd_linearresample_stream;
|
||||
int framesz = (dec->srcwidth/8 * dec->srcchannels);
|
||||
int framesz = (QAF_BYTES(dec->srcformat) * dec->srcchannels);
|
||||
|
||||
if (length)
|
||||
{
|
||||
|
@ -5053,12 +5053,12 @@ sfxcache_t *QDECL S_MP3_Locate(sfx_t *sfx, sfxcache_t *buf, ssamplepos_t start,
|
|||
|
||||
SND_ResampleStream(strhdr.pbDst,
|
||||
dec->srcspeed,
|
||||
dec->srcwidth/8,
|
||||
dec->srcformat,
|
||||
dec->srcchannels,
|
||||
strhdr.cbDstLengthUsed / framesz,
|
||||
dec->dstdata+dec->dstcount*framesz,
|
||||
snd_speed,
|
||||
dec->srcwidth/8,
|
||||
dec->srcformat,
|
||||
dec->srcchannels,
|
||||
snd_linearresample_stream.ival);
|
||||
dec->dstcount = newlen;
|
||||
|
@ -5070,7 +5070,7 @@ sfxcache_t *QDECL S_MP3_Locate(sfx_t *sfx, sfxcache_t *buf, ssamplepos_t start,
|
|||
buf->numchannels = dec->srcchannels;
|
||||
buf->soundoffset = dec->dststart;
|
||||
buf->speed = snd_speed;
|
||||
buf->width = dec->srcwidth/8;
|
||||
buf->format = dec->srcformat;
|
||||
|
||||
if (dec->srclen == dec->srcoffset && start >= dec->dststart+dec->dstcount)
|
||||
return NULL; //once we reach the EOF, start reporting errors.
|
||||
|
@ -5128,15 +5128,15 @@ static qboolean QDECL S_LoadMP3Sound (sfx_t *s, qbyte *data, size_t datalen, int
|
|||
|
||||
dec->srcspeed = 44100;
|
||||
dec->srcchannels = 2;
|
||||
dec->srcwidth = 16;
|
||||
dec->srcformat = QAF_S16;
|
||||
|
||||
memset (&pcm_format, 0, sizeof(pcm_format));
|
||||
pcm_format.wFormatTag = WAVE_FORMAT_PCM;
|
||||
pcm_format.nChannels = dec->srcchannels;
|
||||
pcm_format.nSamplesPerSec = dec->srcspeed;
|
||||
pcm_format.nBlockAlign = dec->srcwidth/8*dec->srcchannels;
|
||||
pcm_format.nAvgBytesPerSec = pcm_format.nSamplesPerSec*dec->srcwidth/8*dec->srcchannels;
|
||||
pcm_format.wBitsPerSample = dec->srcwidth;
|
||||
pcm_format.nBlockAlign = QAF_BYTES(dec->srcformat)*dec->srcchannels;
|
||||
pcm_format.nAvgBytesPerSec = pcm_format.nSamplesPerSec*QAF_BYTES(dec->srcformat)*dec->srcchannels;
|
||||
pcm_format.wBitsPerSample = QAF_BYTES(dec->srcformat)*8;
|
||||
pcm_format.cbSize = 0;
|
||||
|
||||
mp3format.wfx.cbSize = MPEGLAYER3_WFX_EXTRA_BYTES;
|
||||
|
|
|
@ -9266,7 +9266,7 @@ vfsfile_t *FS_OpenTCP(const char *name, int defaultport)
|
|||
return NULL;
|
||||
}
|
||||
#else
|
||||
vfsfile_t *FS_OpenTCP(const char *name, int defaultport)
|
||||
vfsfile_t *FS_OpenTCP(const char *name, int defaultport, qboolean assumetls)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -3849,6 +3849,7 @@ void QCBUILTIN PF_strunzone(pubprogfuncs_t *prinst, struct globalvars_s *pr_glob
|
|||
{
|
||||
#ifdef QCGC
|
||||
//gc frees everything for us.
|
||||
//FIXME: explicitly free it anyway, to save running the gc quite so often.
|
||||
#else
|
||||
prinst->AddressableFree(prinst, prinst->stringtable + G_INT(OFS_PARM0));
|
||||
#endif
|
||||
|
|
|
@ -38,7 +38,7 @@ void D3D11_DestroyTexture (texid_t tex)
|
|||
|
||||
qboolean D3D11_LoadTextureMips(image_t *tex, const struct pendingtextureinfo *mips)
|
||||
{
|
||||
unsigned int blockbytes, blockwidth, blockheight;
|
||||
unsigned int blockbytes, blockwidth, blockheight, blockdepth;
|
||||
HRESULT hr;
|
||||
D3D11_TEXTURE2D_DESC tdesc = {0};
|
||||
D3D11_SUBRESOURCE_DATA *subresdesc;
|
||||
|
@ -316,7 +316,7 @@ qboolean D3D11_LoadTextureMips(image_t *tex, const struct pendingtextureinfo *mi
|
|||
return false;
|
||||
}
|
||||
|
||||
Image_BlockSizeForEncoding(mips->encoding, &blockbytes, &blockwidth, &blockheight);
|
||||
Image_BlockSizeForEncoding(mips->encoding, &blockbytes, &blockwidth, &blockheight, &blockdepth);
|
||||
|
||||
if (!mips->mip[0].data)
|
||||
{
|
||||
|
|
|
@ -27,7 +27,7 @@ qboolean D3D9_LoadTextureMips(image_t *tex, const struct pendingtextureinfo *mip
|
|||
D3DSURFACE_DESC desc;
|
||||
IDirect3DBaseTexture9 *dbt;
|
||||
qboolean swap = false;
|
||||
unsigned int blockwidth, blockheight, blockbytes;
|
||||
unsigned int blockwidth, blockheight, blockdepth, blockbytes;
|
||||
|
||||
//NOTE: d3d9 formats are written as little-endian packed formats, so RR GG BB AA -> 0xAABBGGRR
|
||||
//whereas fte formats vary depending on whether they're packed or byte-aligned.
|
||||
|
@ -109,7 +109,7 @@ qboolean D3D9_LoadTextureMips(image_t *tex, const struct pendingtextureinfo *mip
|
|||
if (mips->type != ((tex->flags&IF_TEXTYPEMASK)>>IF_TEXTYPESHIFT))
|
||||
return false;
|
||||
|
||||
Image_BlockSizeForEncoding(mips->encoding, &blockbytes, &blockwidth, &blockheight);
|
||||
Image_BlockSizeForEncoding(mips->encoding, &blockbytes, &blockwidth, &blockheight, &blockdepth);
|
||||
|
||||
if (!pD3DDev9)
|
||||
return false; //can happen on errors
|
||||
|
|
|
@ -926,6 +926,7 @@ char *PR_GlobalString (progfuncs_t *progfuncs, int ofs, struct QCC_type_s **type
|
|||
{
|
||||
etype_t type;
|
||||
//urgh, this is so hideous
|
||||
#if !defined(MINIMAL) && !defined(OMIT_QCC)
|
||||
if (typehint == &type_float)
|
||||
type = ev_float;
|
||||
else if (typehint == &type_string)
|
||||
|
@ -937,6 +938,7 @@ char *PR_GlobalString (progfuncs_t *progfuncs, int ofs, struct QCC_type_s **type
|
|||
else if (typehint == &type_field)
|
||||
type = ev_field;
|
||||
else
|
||||
#endif
|
||||
type = ev_integer;
|
||||
s = PR_ValueString (progfuncs, type, val, false);
|
||||
sprintf (line,"%i(?)%s", ofs, s);
|
||||
|
|
Loading…
Reference in a new issue