Misc compile fixes (mostly warnings)
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5396 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
4757bd34c6
commit
9f38246d59
6 changed files with 29 additions and 18 deletions
|
@ -1772,7 +1772,9 @@ void CL_ClearState (qboolean gamestart)
|
||||||
|
|
||||||
if (cfg_save_auto.ival && Cvar_UnsavedArchive())
|
if (cfg_save_auto.ival && Cvar_UnsavedArchive())
|
||||||
Cmd_ExecuteString("cfg_save\n", RESTRICT_LOCAL);
|
Cmd_ExecuteString("cfg_save\n", RESTRICT_LOCAL);
|
||||||
|
#ifdef CL_MASTER
|
||||||
MasterInfo_WriteServers();
|
MasterInfo_WriteServers();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -3215,7 +3215,6 @@ static INT CALLBACK StupidBrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LP
|
||||||
// char *foo;
|
// char *foo;
|
||||||
HWND edit = FindWindowEx(hwnd, NULL, "EDIT", NULL);
|
HWND edit = FindWindowEx(hwnd, NULL, "EDIT", NULL);
|
||||||
HWND list;
|
HWND list;
|
||||||
extern qboolean com_homepathenabled;
|
|
||||||
// OutputDebugString(va("got %u (%u)\n", uMsg, lp));
|
// OutputDebugString(va("got %u (%u)\n", uMsg, lp));
|
||||||
switch(uMsg)
|
switch(uMsg)
|
||||||
{
|
{
|
||||||
|
@ -3231,6 +3230,7 @@ static INT CALLBACK StupidBrowseCallbackProc(HWND hwnd, UINT uMsg, LPARAM lp, LP
|
||||||
{
|
{
|
||||||
wchar_t szDir[MAX_PATH];
|
wchar_t szDir[MAX_PATH];
|
||||||
#ifndef _DEBUG
|
#ifndef _DEBUG
|
||||||
|
extern qboolean com_homepathenabled;
|
||||||
//the standard location iiuc
|
//the standard location iiuc
|
||||||
if (com_homepathenabled && pSHGetSpecialFolderPathW(NULL, szDir, CSIDL_PROGRAM_FILES, TRUE) && microsoft_accessW(szDir, ACCESS_READ | ACCESS_WRITE))
|
if (com_homepathenabled && pSHGetSpecialFolderPathW(NULL, szDir, CSIDL_PROGRAM_FILES, TRUE) && microsoft_accessW(szDir, ACCESS_READ | ACCESS_WRITE))
|
||||||
;
|
;
|
||||||
|
|
|
@ -931,7 +931,7 @@ console_t *Con_TextEditor(const char *fname, const char *line, pubprogfuncs_t *d
|
||||||
int i;
|
int i;
|
||||||
char buffer[65536];
|
char buffer[65536];
|
||||||
int start = 1;
|
int start = 1;
|
||||||
int end = INT_MAX;
|
int end = 0x7fffffff;
|
||||||
char *colon = strchr(con->name, ':');
|
char *colon = strchr(con->name, ':');
|
||||||
if (colon && *colon==':')
|
if (colon && *colon==':')
|
||||||
start = strtol(colon+1, &colon, 0);
|
start = strtol(colon+1, &colon, 0);
|
||||||
|
|
|
@ -429,14 +429,14 @@ static DWORD VerifyKnownCertificates(DWORD status, wchar_t *domain, qbyte *data,
|
||||||
if (!knowncerts[i].data)
|
if (!knowncerts[i].data)
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
Con_Printf("%ls cert %i bytes\n", domain, datasize);
|
Con_Printf("%ls cert %i bytes\n", domain, (int)datasize);
|
||||||
|
|
||||||
Con_Printf("\"", datasize);
|
Con_Printf("\"");
|
||||||
for (j = 0; j < datasize; j++)
|
for (j = 0; j < datasize; j++)
|
||||||
Con_Printf("\\x%02x", data[j]);
|
Con_Printf("\\x%02x", data[j]);
|
||||||
Con_Printf("\"\n", datasize);
|
Con_Printf("\"\n");
|
||||||
|
|
||||||
Con_Printf("\n", datasize);
|
Con_Printf("\n");
|
||||||
for (j = 0; j < datasize; j++)
|
for (j = 0; j < datasize; j++)
|
||||||
Con_Printf("%c", data[j]);
|
Con_Printf("%c", data[j]);
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -322,22 +322,27 @@ qboolean QDECL Mod_LoadHLModel (model_t *mod, void *buffer, size_t fsize)
|
||||||
Q_snprintfz(shaders[i].name, sizeof(shaders[i].name), "%s/%s", mod->name, COM_SkipPath(tex[i].name));
|
Q_snprintfz(shaders[i].name, sizeof(shaders[i].name), "%s/%s", mod->name, COM_SkipPath(tex[i].name));
|
||||||
|
|
||||||
/* handle the special textures - eukara */
|
/* handle the special textures - eukara */
|
||||||
if (tex[i].flags) {
|
if (tex[i].flags)
|
||||||
|
{
|
||||||
char *shader;
|
char *shader;
|
||||||
if (tex[i].flags & HLMDLFL_FULLBRIGHT) {
|
if (tex[i].flags & HLMDLFL_FULLBRIGHT)
|
||||||
if (tex[i].flags & HLMDLFL_CHROME) {
|
{
|
||||||
|
if (tex[i].flags & HLMDLFL_CHROME)
|
||||||
shader = HLSHADER_FULLBRIGHTCHROME;
|
shader = HLSHADER_FULLBRIGHTCHROME;
|
||||||
} else {
|
else
|
||||||
shader = HLSHADER_FULLBRIGHT;
|
shader = HLSHADER_FULLBRIGHT;
|
||||||
}
|
}
|
||||||
} else if (tex[i].flags & HLMDLFL_CHROME) {
|
else if (tex[i].flags & HLMDLFL_CHROME)
|
||||||
shader = HLSHADER_CHROME;
|
shader = HLSHADER_CHROME;
|
||||||
}
|
else
|
||||||
|
shader = "";
|
||||||
shaders[i].shader = R_RegisterShader(shaders[i].name, SUF_NONE, shader);
|
shaders[i].shader = R_RegisterShader(shaders[i].name, SUF_NONE, shader);
|
||||||
shaders[i].shader->defaulttextures->base = Image_GetTexture(shaders[i].name, "", IF_NOALPHA, (qbyte *) texheader + tex[i].offset, (qbyte *) texheader + tex[i].w * tex[i].h + tex[i].offset, tex[i].w, tex[i].h, TF_8PAL24);
|
shaders[i].shader->defaulttextures->base = Image_GetTexture(shaders[i].name, "", IF_NOALPHA, (qbyte *) texheader + tex[i].offset, (qbyte *) texheader + tex[i].w * tex[i].h + tex[i].offset, tex[i].w, tex[i].h, TF_8PAL24);
|
||||||
shaders[i].shader->width = tex[i].w;
|
shaders[i].shader->width = tex[i].w;
|
||||||
shaders[i].shader->height = tex[i].h;
|
shaders[i].shader->height = tex[i].h;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
memset(&shaders[i].defaulttex, 0, sizeof(shaders[i].defaulttex));
|
memset(&shaders[i].defaulttex, 0, sizeof(shaders[i].defaulttex));
|
||||||
shaders[i].defaulttex.base = Image_GetTexture(shaders[i].name, "", IF_NOALPHA, (qbyte *) texheader + tex[i].offset, (qbyte *) texheader + tex[i].w * tex[i].h + tex[i].offset, tex[i].w, tex[i].h, TF_8PAL24);
|
shaders[i].defaulttex.base = Image_GetTexture(shaders[i].name, "", IF_NOALPHA, (qbyte *) texheader + tex[i].offset, (qbyte *) texheader + tex[i].w * tex[i].h + tex[i].offset, tex[i].w, tex[i].h, TF_8PAL24);
|
||||||
shaders[i].w = tex[i].w;
|
shaders[i].w = tex[i].w;
|
||||||
|
|
|
@ -427,7 +427,8 @@ static void PKG_ParseOutput(struct pkgctx_s *ctx, pbool diff)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*static void PKG_AddOldPack(struct pkgctx_s *ctx, const char *fname)
|
#ifdef _WIN32
|
||||||
|
static void PKG_AddOldPack(struct pkgctx_s *ctx, const char *fname)
|
||||||
{
|
{
|
||||||
struct oldpack_s *pack;
|
struct oldpack_s *pack;
|
||||||
|
|
||||||
|
@ -437,7 +438,8 @@ static void PKG_ParseOutput(struct pkgctx_s *ctx, pbool diff)
|
||||||
pack->file = NULL;
|
pack->file = NULL;
|
||||||
pack->next = ctx->oldpacks;
|
pack->next = ctx->oldpacks;
|
||||||
ctx->oldpacks = pack;
|
ctx->oldpacks = pack;
|
||||||
}*/
|
}
|
||||||
|
#endif
|
||||||
static void PKG_ParseOldPack(struct pkgctx_s *ctx)
|
static void PKG_ParseOldPack(struct pkgctx_s *ctx)
|
||||||
{
|
{
|
||||||
char token[MAX_OSPATH];
|
char token[MAX_OSPATH];
|
||||||
|
@ -594,7 +596,8 @@ static void PKG_ParseRule(struct pkgctx_s *ctx)
|
||||||
r->next = ctx->rules;
|
r->next = ctx->rules;
|
||||||
ctx->rules = r;
|
ctx->rules = r;
|
||||||
}
|
}
|
||||||
/*static void PKG_AddClassFile(struct pkgctx_s *ctx, struct class_s *c, const char *fname, time_t mtime)
|
#ifdef _WIN32
|
||||||
|
static void PKG_AddClassFile(struct pkgctx_s *ctx, struct class_s *c, const char *fname, time_t mtime)
|
||||||
{
|
{
|
||||||
struct file_s *f;
|
struct file_s *f;
|
||||||
struct tm *t;
|
struct tm *t;
|
||||||
|
@ -614,7 +617,8 @@ static void PKG_ParseRule(struct pkgctx_s *ctx)
|
||||||
f->write.dosdate = (t->tm_mday<<0)|(t->tm_mon<<5)|((t->tm_year+1900-1980)<<9);
|
f->write.dosdate = (t->tm_mday<<0)|(t->tm_mon<<5)|((t->tm_year+1900-1980)<<9);
|
||||||
f->next = c->files;
|
f->next = c->files;
|
||||||
c->files = f;
|
c->files = f;
|
||||||
}*/
|
}
|
||||||
|
#endif
|
||||||
static void PKG_AddClassFiles(struct pkgctx_s *ctx, struct class_s *c, const char *fname)
|
static void PKG_AddClassFiles(struct pkgctx_s *ctx, struct class_s *c, const char *fname)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
Loading…
Reference in a new issue