[Glide64] fix up rom name being sscii
This commit is contained in:
parent
0f185260f4
commit
76a3db6568
|
@ -25,7 +25,7 @@
|
|||
#include <stdlib.h>
|
||||
#include "Ext_TxFilter.h"
|
||||
|
||||
extern "C" boolean txfilter_init(int maxwidth, int maxheight, int maxbpp, int options, int cachesize, const wchar_t *path, const wchar_t *ident, dispInfoFuncExt callback);
|
||||
extern "C" boolean txfilter_init(int maxwidth, int maxheight, int maxbpp, int options, int cachesize, const wchar_t *path, const char *ident, dispInfoFuncExt callback);
|
||||
extern "C" void txfilter_shutdown(void);
|
||||
extern "C" boolean txfilter(unsigned char *src, int srcwidth, int srcheight, unsigned short srcformat, uint64 g64crc, GHQTexInfo *info);
|
||||
extern "C" boolean txfilter_hirestex(uint64 g64crc, uint64 r_crc64, unsigned short *palette, GHQTexInfo *info);
|
||||
|
@ -35,43 +35,43 @@ extern "C" boolean txfilter_reloadhirestex();
|
|||
|
||||
void ext_ghq_shutdown(void)
|
||||
{
|
||||
txfilter_shutdown();
|
||||
txfilter_shutdown();
|
||||
}
|
||||
|
||||
boolean ext_ghq_init(int maxwidth, int maxheight, int maxbpp, int options, int cachesize,
|
||||
const wchar_t *path, const wchar_t *ident,
|
||||
dispInfoFuncExt callback)
|
||||
const wchar_t *path, const char *ident,
|
||||
dispInfoFuncExt callback)
|
||||
{
|
||||
return txfilter_init(maxwidth, maxheight, maxbpp, options, cachesize, path, ident, callback);
|
||||
return txfilter_init(maxwidth, maxheight, maxbpp, options, cachesize, path, ident, callback);
|
||||
}
|
||||
|
||||
boolean ext_ghq_txfilter(unsigned char *src, int srcwidth, int srcheight, unsigned short srcformat,
|
||||
uint64 g64crc, GHQTexInfo *info)
|
||||
uint64 g64crc, GHQTexInfo *info)
|
||||
{
|
||||
return txfilter(src, srcwidth, srcheight, srcformat, g64crc, info);;
|
||||
return txfilter(src, srcwidth, srcheight, srcformat, g64crc, info);;
|
||||
}
|
||||
|
||||
boolean ext_ghq_hirestex(uint64 g64crc, uint64 r_crc64, unsigned short *palette, GHQTexInfo *info)
|
||||
{
|
||||
boolean ret = txfilter_hirestex(g64crc, r_crc64, palette, info);
|
||||
return ret;
|
||||
boolean ret = txfilter_hirestex(g64crc, r_crc64, palette, info);
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint64 ext_ghq_checksum(unsigned char *src, int width, int height, int size, int rowStride, unsigned char *palette)
|
||||
{
|
||||
uint64 ret = txfilter_checksum(src, width, height, size, rowStride, palette);
|
||||
return ret;
|
||||
uint64 ret = txfilter_checksum(src, width, height, size, rowStride, palette);
|
||||
return ret;
|
||||
}
|
||||
|
||||
boolean ext_ghq_dmptx(unsigned char *src, int width, int height, int rowStridePixel, unsigned short gfmt, unsigned short n64fmt, uint64 r_crc64)
|
||||
{
|
||||
boolean ret = txfilter_dmptx(src, width, height, rowStridePixel, gfmt, n64fmt, r_crc64);
|
||||
return ret;
|
||||
boolean ret = txfilter_dmptx(src, width, height, rowStridePixel, gfmt, n64fmt, r_crc64);
|
||||
return ret;
|
||||
}
|
||||
|
||||
boolean ext_ghq_reloadhirestex()
|
||||
{
|
||||
boolean ret = txfilter_reloadhirestex();
|
||||
boolean ret = txfilter_reloadhirestex();
|
||||
|
||||
return ret;
|
||||
}
|
||||
return ret;
|
||||
}
|
|
@ -34,7 +34,7 @@
|
|||
#define CHDIR(a) SetCurrentDirectoryW(a)
|
||||
#else
|
||||
#include <iostream>
|
||||
#include <dlfcn.h>
|
||||
#include <dlfcn.h>
|
||||
#define MAX_PATH 4095
|
||||
#define TXHMODULE void*
|
||||
#define DLOPEN(a) dlopen(a, RTLD_LAZY|RTLD_GLOBAL)
|
||||
|
@ -128,20 +128,20 @@ typedef unsigned char boolean;
|
|||
#endif /* GLIDE3 */
|
||||
|
||||
struct GHQTexInfo {
|
||||
unsigned char *data;
|
||||
int width;
|
||||
int height;
|
||||
unsigned short format;
|
||||
unsigned char *data;
|
||||
int width;
|
||||
int height;
|
||||
unsigned short format;
|
||||
|
||||
int smallLodLog2;
|
||||
int largeLodLog2;
|
||||
int aspectRatioLog2;
|
||||
int smallLodLog2;
|
||||
int largeLodLog2;
|
||||
int aspectRatioLog2;
|
||||
|
||||
int tiles;
|
||||
int untiled_width;
|
||||
int untiled_height;
|
||||
int tiles;
|
||||
int untiled_width;
|
||||
int untiled_height;
|
||||
|
||||
unsigned char is_hires_tex;
|
||||
unsigned char is_hires_tex;
|
||||
};
|
||||
|
||||
/* Callback to display hires texture info.
|
||||
|
@ -160,51 +160,51 @@ struct GHQTexInfo {
|
|||
* }
|
||||
*/
|
||||
#define INFO_BUF 4095
|
||||
typedef void (*dispInfoFuncExt)(const wchar_t *format, ...);
|
||||
typedef void(*dispInfoFuncExt)(const wchar_t *format, ...);
|
||||
|
||||
#ifndef TXFILTER_DLL
|
||||
boolean ext_ghq_init(int maxwidth, /* maximum texture width supported by hardware */
|
||||
int maxheight,/* maximum texture height supported by hardware */
|
||||
int maxbpp, /* maximum texture bpp supported by hardware */
|
||||
int options, /* options */
|
||||
int cachesize,/* cache textures to system memory */
|
||||
const wchar_t *path, /* plugin directory. must be smaller than MAX_PATH */
|
||||
const wchar_t *ident, /* name of ROM. must be no longer than 64 in character. */
|
||||
dispInfoFuncExt callback /* callback function to display info */
|
||||
);
|
||||
int maxheight,/* maximum texture height supported by hardware */
|
||||
int maxbpp, /* maximum texture bpp supported by hardware */
|
||||
int options, /* options */
|
||||
int cachesize,/* cache textures to system memory */
|
||||
const wchar_t *path, /* plugin directory. must be smaller than MAX_PATH */
|
||||
const char *ident, /* name of ROM. must be no longer than 64 in character. */
|
||||
dispInfoFuncExt callback /* callback function to display info */
|
||||
);
|
||||
|
||||
void ext_ghq_shutdown(void);
|
||||
|
||||
boolean ext_ghq_txfilter(unsigned char *src, /* input texture */
|
||||
int srcwidth, /* width of input texture */
|
||||
int srcheight, /* height of input texture */
|
||||
unsigned short srcformat, /* format of input texture */
|
||||
uint64 g64crc, /* glide64 crc */
|
||||
GHQTexInfo *info /* output */
|
||||
);
|
||||
int srcwidth, /* width of input texture */
|
||||
int srcheight, /* height of input texture */
|
||||
unsigned short srcformat, /* format of input texture */
|
||||
uint64 g64crc, /* glide64 crc */
|
||||
GHQTexInfo *info /* output */
|
||||
);
|
||||
|
||||
boolean ext_ghq_hirestex(uint64 g64crc, /* glide64 crc */
|
||||
uint64 r_crc64, /* checksum hi:palette low:texture */
|
||||
unsigned short *palette, /* palette for CI textures */
|
||||
GHQTexInfo *info /* output */
|
||||
);
|
||||
uint64 r_crc64, /* checksum hi:palette low:texture */
|
||||
unsigned short *palette, /* palette for CI textures */
|
||||
GHQTexInfo *info /* output */
|
||||
);
|
||||
|
||||
uint64 ext_ghq_checksum(unsigned char *src, /* input texture */
|
||||
int width, /* width of texture */
|
||||
int height, /* height of texture */
|
||||
int size, /* type of texture pixel */
|
||||
int rowStride, /* row stride in bytes */
|
||||
unsigned char *palette /* palette */
|
||||
);
|
||||
int width, /* width of texture */
|
||||
int height, /* height of texture */
|
||||
int size, /* type of texture pixel */
|
||||
int rowStride, /* row stride in bytes */
|
||||
unsigned char *palette /* palette */
|
||||
);
|
||||
|
||||
boolean ext_ghq_dmptx(unsigned char *src, /* input texture (must be in 3Dfx Glide format) */
|
||||
int width, /* width of texture */
|
||||
int height, /* height of texture */
|
||||
int rowStridePixel, /* row stride of input texture in pixels */
|
||||
unsigned short gfmt, /* glide format of input texture */
|
||||
unsigned short n64fmt,/* N64 format hi:format low:size */
|
||||
uint64 r_crc64 /* checksum hi:palette low:texture */
|
||||
);
|
||||
int width, /* width of texture */
|
||||
int height, /* height of texture */
|
||||
int rowStridePixel, /* row stride of input texture in pixels */
|
||||
unsigned short gfmt, /* glide format of input texture */
|
||||
unsigned short n64fmt,/* N64 format hi:format low:size */
|
||||
uint64 r_crc64 /* checksum hi:palette low:texture */
|
||||
);
|
||||
|
||||
boolean ext_ghq_reloadhirestex();
|
||||
#endif /* TXFILTER_DLL */
|
||||
|
|
|
@ -1100,7 +1100,7 @@ int InitGfx()
|
|||
options,
|
||||
settings.ghq_cache_size * 1024 * 1024, // cache texture to system memory
|
||||
stdstr(settings.texture_dir).ToUTF16().c_str(),
|
||||
rdp.RomName.wchar_str(), // name of ROM. must be no longer than 256 characters
|
||||
rdp.RomName, // name of ROM. must be no longer than 256 characters
|
||||
DisplayLoadProgress);
|
||||
}
|
||||
}
|
||||
|
@ -1731,15 +1731,16 @@ void CALL RomOpen(void)
|
|||
|
||||
// remove all trailing spaces
|
||||
while (name[strlen(name) - 1] == ' ')
|
||||
{
|
||||
name[strlen(name) - 1] = 0;
|
||||
}
|
||||
|
||||
wxString strRomName = wxString::FromAscii(name);
|
||||
if (settings.ghq_use && strRomName != rdp.RomName)
|
||||
if (settings.ghq_use && strcmp(rdp.RomName, name) != 0)
|
||||
{
|
||||
ext_ghq_shutdown();
|
||||
settings.ghq_use = 0;
|
||||
}
|
||||
rdp.RomName = strRomName;
|
||||
strcpy(rdp.RomName, name);
|
||||
ReadSpecialSettings(name);
|
||||
ClearCache();
|
||||
|
||||
|
|
|
@ -55,8 +55,11 @@
|
|||
extern CriticalSection * g_ProcessDListCS;
|
||||
#endif
|
||||
|
||||
const int NumOfFormats = 3;
|
||||
SCREEN_SHOT_FORMAT ScreenShotFormats[NumOfFormats] = { { "BMP", "bmp", wxBITMAP_TYPE_BMP }, { "PNG", "png", wxBITMAP_TYPE_PNG }, { "JPEG", "jpeg", wxBITMAP_TYPE_JPEG } };
|
||||
const int NumOfFormats = 1;
|
||||
SCREEN_SHOT_FORMAT ScreenShotFormats[NumOfFormats] =
|
||||
{
|
||||
{ "PNG", "png", rdpBITMAP_TYPE_PNG},
|
||||
};
|
||||
|
||||
const char *ACmp[] = { "NONE", "THRESHOLD", "UNKNOWN", "DITHER" };
|
||||
|
||||
|
|
Loading…
Reference in New Issue