2007-01-15 12:09:25 -08:00
|
|
|
/*
|
|
|
|
This file is part of Warzone 2100.
|
|
|
|
Copyright (C) 1999-2004 Eidos Interactive
|
2009-02-10 10:01:48 -08:00
|
|
|
Copyright (C) 2005-2009 Warzone Resurrection Project
|
2007-01-15 12:09:25 -08:00
|
|
|
|
|
|
|
Warzone 2100 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.
|
|
|
|
|
|
|
|
Warzone 2100 is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Warzone 2100; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
2007-06-28 10:47:08 -07:00
|
|
|
#ifndef _tex_
|
|
|
|
#define _tex_
|
|
|
|
|
2007-05-01 13:34:54 -07:00
|
|
|
#include "png_util.h"
|
2007-06-28 10:47:08 -07:00
|
|
|
|
|
|
|
//*************************************************************************
|
|
|
|
|
2007-08-13 03:48:32 -07:00
|
|
|
#define iV_TEX_MAX 128
|
2007-07-25 13:58:57 -07:00
|
|
|
#define iV_TEX_INVALID -1
|
2007-04-19 11:04:41 -07:00
|
|
|
#define iV_TEXNAME_MAX 64
|
2007-06-28 10:47:08 -07:00
|
|
|
|
|
|
|
//*************************************************************************
|
|
|
|
|
|
|
|
#define iV_TEXNAME(i) ((char *) (&_TEX_PAGE[(i)].name))
|
|
|
|
|
|
|
|
//*************************************************************************
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2007-04-28 13:21:16 -07:00
|
|
|
char name[iV_TEXNAME_MAX];
|
|
|
|
unsigned int id;
|
2007-05-01 13:34:54 -07:00
|
|
|
} iTexPage;
|
2007-06-28 10:47:08 -07:00
|
|
|
|
|
|
|
//*************************************************************************
|
2007-07-27 10:35:08 -07:00
|
|
|
|
2007-04-23 15:08:53 -07:00
|
|
|
extern unsigned int _TEX_INDEX;
|
2007-05-01 13:34:54 -07:00
|
|
|
extern iTexPage _TEX_PAGE[iV_TEX_MAX];
|
2007-06-28 10:47:08 -07:00
|
|
|
|
|
|
|
//*************************************************************************
|
|
|
|
|
2007-04-16 13:07:56 -07:00
|
|
|
extern int iV_GetTexture(const char *filename);
|
2007-05-01 13:34:54 -07:00
|
|
|
extern void iV_unloadImage(iV_Image *image);
|
|
|
|
extern unsigned int iV_getPixelFormat(const iV_Image *image);
|
|
|
|
|
2007-08-01 08:06:23 -07:00
|
|
|
extern int pie_ReplaceTexPage(iV_Image *s, const char *texPage);
|
|
|
|
extern int pie_AddTexPage(iV_Image *s, const char *filename, int slot);
|
2007-06-28 10:47:08 -07:00
|
|
|
extern void pie_TexInit(void);
|
|
|
|
|
2008-03-21 07:34:30 -07:00
|
|
|
extern void pie_InitSkybox(SDWORD pageNum);
|
2008-01-12 07:10:02 -08:00
|
|
|
|
2007-04-28 13:21:16 -07:00
|
|
|
extern void pie_MakeTexPageName(char * filename);
|
2007-04-19 11:04:41 -07:00
|
|
|
|
2007-06-28 10:47:08 -07:00
|
|
|
//*************************************************************************
|
|
|
|
|
|
|
|
extern void pie_TexShutDown(void);
|
|
|
|
|
|
|
|
#endif
|