2000-01-03 01:40:54 +00:00
|
|
|
/*
|
2000-01-07 21:36:15 +00:00
|
|
|
register_check.c
|
2000-01-03 01:40:54 +00:00
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
Check for registered version of Quake data files
|
2000-01-03 01:40:54 +00:00
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
Copyright (C) 1999,2000 contributors of the QuakeForge project
|
|
|
|
Please see the file "AUTHORS" for a list of contributors
|
2000-01-03 01:40:54 +00:00
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
Author: Zephaniah E. Hull
|
|
|
|
Date: 03 Jan 2000
|
2000-01-03 01:40:54 +00:00
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
|
|
|
as published by the Free Software Foundation; either version 2
|
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2000-03-19 15:59:51 +00:00
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
2000-01-07 21:36:15 +00:00
|
|
|
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to:
|
2000-03-19 15:59:51 +00:00
|
|
|
|
2000-03-24 11:25:06 +00:00
|
|
|
Free Software Foundation, Inc.
|
|
|
|
59 Temple Place - Suite 330
|
|
|
|
Boston, MA 02111-1307, USA
|
|
|
|
|
|
|
|
$Id$
|
2000-01-03 01:40:54 +00:00
|
|
|
*/
|
|
|
|
|
2000-03-24 11:25:06 +00:00
|
|
|
#include <cvar.h>
|
|
|
|
#include <quakefs.h>
|
|
|
|
#include <quakedef.h>
|
2000-01-03 01:40:54 +00:00
|
|
|
|
2000-02-27 07:13:32 +00:00
|
|
|
cvar_t *registered;
|
2000-01-03 01:40:54 +00:00
|
|
|
|
|
|
|
/*
|
2000-01-07 21:36:15 +00:00
|
|
|
register_check
|
2000-03-19 15:59:51 +00:00
|
|
|
|
2000-01-07 21:36:15 +00:00
|
|
|
Look for gfx/pop.lmp (only found in ID's registered quake pak files),
|
|
|
|
and set the "registered" cvar to 1 if found.
|
|
|
|
*/
|
2000-01-03 21:54:18 +00:00
|
|
|
void
|
2000-03-24 11:25:06 +00:00
|
|
|
register_check ( void )
|
|
|
|
{
|
2000-02-08 05:06:58 +00:00
|
|
|
QFile *h;
|
2000-01-03 01:40:54 +00:00
|
|
|
|
2000-02-27 07:13:32 +00:00
|
|
|
registered = Cvar_Get ("registered","0",0,"None");
|
2000-01-03 01:40:54 +00:00
|
|
|
|
2000-01-03 21:54:18 +00:00
|
|
|
COM_FOpenFile("gfx/pop.lmp", &h);
|
2000-01-03 01:40:54 +00:00
|
|
|
|
2000-01-03 21:54:18 +00:00
|
|
|
if (h) {
|
|
|
|
Cvar_Set ("registered", "1");
|
2000-02-08 05:06:58 +00:00
|
|
|
Qclose (h);
|
2000-01-03 21:54:18 +00:00
|
|
|
}
|
2000-01-03 01:40:54 +00:00
|
|
|
}
|