5 * Copyright (C) 2007 Hiroshi Morii All Rights Reserved.
6 * Email koolsmoky(at)users.sourceforge.net
7 * Web http://www.3dfxzone.it/koolsmoky
9 * this is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2, or (at your option)
14 * this is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with GNU Make; see the file COPYING. If not, write to
21 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
25 #pragma warning(disable: 4786)
30 TxFilter *txFilter = NULL;
36 TAPI boolean TAPIENTRY
37 txfilter_init(int maxwidth, int maxheight, int maxbpp, int options, int cachesize,
38 wchar_t *datapath, wchar_t *cachepath, wchar_t*ident,
39 dispInfoFuncExt callback)
41 if (txFilter) return 0;
43 txFilter = new TxFilter(maxwidth, maxheight, maxbpp, options, cachesize,
44 datapath, cachepath, ident, callback);
46 return (txFilter ? 1 : 0);
50 txfilter_shutdown(void)
52 if (txFilter) delete txFilter;
57 TAPI boolean TAPIENTRY
58 txfilter(uint8 *src, int srcwidth, int srcheight, uint16 srcformat,
59 uint64 g64crc, GHQTexInfo *info)
62 return txFilter->filter(src, srcwidth, srcheight, srcformat,
68 TAPI boolean TAPIENTRY
69 txfilter_hirestex(uint64 g64crc, uint64 r_crc64, uint16 *palette, GHQTexInfo *info)
72 return txFilter->hirestex(g64crc, r_crc64, palette, info);
78 txfilter_checksum(uint8 *src, int width, int height, int size, int rowStride, uint8 *palette)
81 return txFilter->checksum64(src, width, height, size, rowStride, palette);
86 TAPI boolean TAPIENTRY
87 txfilter_dmptx(uint8 *src, int width, int height, int rowStridePixel, uint16 gfmt, uint16 n64fmt, uint64 r_crc64)
90 return txFilter->dmptx(src, width, height, rowStridePixel, gfmt, n64fmt, r_crc64);
95 TAPI boolean TAPIENTRY
96 txfilter_reloadhirestex()
99 return txFilter->reloadhirestex();