mirror of https://github.com/snes9xgit/snes9x.git
Merge branch 'master' of https://github.com/snes9xgit/snes9x
Conflicts: win32/_tfwopen.cpp win32/_tfwopen.h win32/snes9xw.vcproj win32/wsnes9x.h
This commit is contained in:
commit
cea447cf3e
|
@ -3031,7 +3031,7 @@ void CMemory::Map_JumboLoROMMap (void)
|
||||||
map_System();
|
map_System();
|
||||||
|
|
||||||
map_lorom_offset(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize - 0x400000, 0x400000);
|
map_lorom_offset(0x00, 0x3f, 0x8000, 0xffff, CalculatedSize - 0x400000, 0x400000);
|
||||||
map_lorom_offset(0x40, 0x7f, 0x0000, 0xffff, CalculatedSize - 0x400000, 0x400000);
|
map_lorom_offset(0x40, 0x7f, 0x0000, 0xffff, CalculatedSize - 0x600000, 0x600000);
|
||||||
map_lorom_offset(0x80, 0xbf, 0x8000, 0xffff, 0x400000, 0);
|
map_lorom_offset(0x80, 0xbf, 0x8000, 0xffff, 0x400000, 0);
|
||||||
map_lorom_offset(0xc0, 0xff, 0x0000, 0xffff, 0x400000, 0x200000);
|
map_lorom_offset(0xc0, 0xff, 0x0000, 0xffff, 0x400000, 0x200000);
|
||||||
|
|
||||||
|
|
4
sa1.cpp
4
sa1.cpp
|
@ -308,7 +308,9 @@ static void S9xSetSA1MemMap (uint32 which1, uint8 map)
|
||||||
|
|
||||||
for (int c = 0; c < 0x200; c += 16)
|
for (int c = 0; c < 0x200; c += 16)
|
||||||
{
|
{
|
||||||
uint8 *block = &Memory.ROM[(map & 7) * 0x100000 + (c << 11) - 0x8000];
|
// conversion to int is needed here - map is promoted but which1 is not
|
||||||
|
int32 offset = (((map & 0x80) ? map : which1) & 7) * 0x100000 + (c << 11) - 0x8000;
|
||||||
|
uint8 *block = &Memory.ROM[offset];
|
||||||
for (int i = c + 8; i < c + 16; i++)
|
for (int i = c + 8; i < c + 16; i++)
|
||||||
Memory.Map[start2 + i] = SA1.Map[start2 + i] = block;
|
Memory.Map[start2 + i] = SA1.Map[start2 + i] = block;
|
||||||
}
|
}
|
||||||
|
|
31
tile.cpp
31
tile.cpp
|
@ -698,7 +698,7 @@ void S9xSelectTileConverter (int depth, bool8 hires, bool8 sub, bool8 mosaic)
|
||||||
}
|
}
|
||||||
|
|
||||||
#define IS_BLANK_TILE() \
|
#define IS_BLANK_TILE() \
|
||||||
(BG.Buffered[TileNumber] == BLANK_TILE)
|
( ( (Tile & H_FLIP) ? BG.BufferedFlip[TileNumber] : BG.Buffered[TileNumber]) == BLANK_TILE)
|
||||||
|
|
||||||
#define SELECT_PALETTE() \
|
#define SELECT_PALETTE() \
|
||||||
if (BG.DirectColourMode) \
|
if (BG.DirectColourMode) \
|
||||||
|
@ -1387,12 +1387,29 @@ extern struct SLineMatrixData LineMatrixData[240];
|
||||||
// We don't know how Sub(0, y) is handled.
|
// We don't know how Sub(0, y) is handled.
|
||||||
|
|
||||||
#define DRAW_PIXEL_H2x1(N, M) \
|
#define DRAW_PIXEL_H2x1(N, M) \
|
||||||
if (Z1 > GFX.DB[Offset + 2 * N] && (M)) \
|
if (Z1 > GFX.DB[Offset + 2 * N] && (M)) \
|
||||||
{ \
|
{ \
|
||||||
GFX.S[Offset + 2 * N] = MATH((GFX.ClipColors ? 0 : GFX.SubScreen[Offset + 2 * N]), GFX.RealScreenColors[Pix], GFX.SubZBuffer[Offset + 2 * N]); \
|
GFX.S[Offset + 2 * N] = MATH(GFX.ScreenColors[Pix], GFX.SubScreen[Offset + 2 * N], GFX.SubZBuffer[Offset + 2 * N]); \
|
||||||
GFX.S[Offset + 2 * N + 1] = MATH(GFX.ScreenColors[Pix], GFX.SubScreen[Offset + 2 * N], GFX.SubZBuffer[Offset + 2 * N]); \
|
GFX.S[Offset + 2 * N + 1] = MATH((GFX.ClipColors ? 0 : GFX.SubScreen[Offset + 2 * N + 2]), GFX.RealScreenColors[Pix], GFX.SubZBuffer[Offset + 2 * N]); \
|
||||||
GFX.DB[Offset + 2 * N] = GFX.DB[Offset + 2 * N + 1] = Z2; \
|
GFX.DB[Offset + 2 * N] = GFX.DB[Offset + 2 * N + 1] = Z2; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The logic above shifts everything one pixel to the left, thus producing a blank line on the right. The code below places the pixel on correct positions but
|
||||||
|
would incur two additional branches for the edges on every pixel.
|
||||||
|
*/
|
||||||
|
|
||||||
|
//#define DRAW_PIXEL_H2x1(N, M) \
|
||||||
|
// if (Z1 > GFX.DB[Offset + 2 * N] && (M)) \
|
||||||
|
// { \
|
||||||
|
// GFX.S[Offset + 2 * N + 1] = MATH(GFX.ScreenColors[Pix], GFX.SubScreen[Offset + 2 * N], GFX.SubZBuffer[Offset + 2 * N]); \
|
||||||
|
// if ((Offset + 2 * N ) % GFX.RealPPL != (SNES_WIDTH - 1) << 1) \
|
||||||
|
// GFX.S[Offset + 2 * N + 2] = MATH((GFX.ClipColors ? 0 : GFX.SubScreen[Offset + 2 * N + 2]), GFX.RealScreenColors[Pix], GFX.SubZBuffer[Offset + 2 * N]); \
|
||||||
|
// if ((Offset + 2 * N) % GFX.RealPPL == 0) \
|
||||||
|
// GFX.S[Offset + 2 * N] = MATH((GFX.ClipColors ? 0 : GFX.SubScreen[Offset + 2 * N]), GFX.RealScreenColors[Pix], GFX.SubZBuffer[Offset + 2 * N]); \
|
||||||
|
// GFX.DB[Offset + 2 * N] = GFX.DB[Offset + 2 * N + 1] = Z2; \
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define DRAW_PIXEL(N, M) DRAW_PIXEL_H2x1(N, M)
|
#define DRAW_PIXEL(N, M) DRAW_PIXEL_H2x1(N, M)
|
||||||
#define NAME2 Hires
|
#define NAME2 Hires
|
||||||
|
|
|
@ -187,6 +187,7 @@
|
||||||
#include "wsnes9x.h"
|
#include "wsnes9x.h"
|
||||||
#include <Dxerr.h>
|
#include <Dxerr.h>
|
||||||
#include <commctrl.h>
|
#include <commctrl.h>
|
||||||
|
#include "CXML.h"
|
||||||
|
|
||||||
#include "../filter/hq2x.h"
|
#include "../filter/hq2x.h"
|
||||||
#include "../filter/2xsai.h"
|
#include "../filter/2xsai.h"
|
||||||
|
@ -430,17 +431,9 @@ bool CDirect3D::SetShaderHLSL(const TCHAR *file)
|
||||||
TCHAR folder[MAX_PATH];
|
TCHAR folder[MAX_PATH];
|
||||||
TCHAR rubyLUTfileName[MAX_PATH];
|
TCHAR rubyLUTfileName[MAX_PATH];
|
||||||
TCHAR *slash;
|
TCHAR *slash;
|
||||||
char *shaderText = NULL;
|
|
||||||
|
|
||||||
TCHAR errorMsg[MAX_PATH + 50];
|
TCHAR errorMsg[MAX_PATH + 50];
|
||||||
|
|
||||||
IXMLDOMDocument * pXMLDoc = NULL;
|
|
||||||
IXMLDOMElement * pXDE = NULL;
|
|
||||||
IXMLDOMNode * pXDN = NULL;
|
|
||||||
BSTR queryString, nodeContent;
|
|
||||||
|
|
||||||
HRESULT hr;
|
|
||||||
|
|
||||||
shaderTimer = 1.0f;
|
shaderTimer = 1.0f;
|
||||||
shaderTimeStart = 0;
|
shaderTimeStart = 0;
|
||||||
shaderTimeElapsed = 0;
|
shaderTimeElapsed = 0;
|
||||||
|
@ -458,76 +451,20 @@ bool CDirect3D::SetShaderHLSL(const TCHAR *file)
|
||||||
if (file == NULL || *file==TEXT('\0'))
|
if (file == NULL || *file==TEXT('\0'))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
hr = CoCreateInstance(CLSID_DOMDocument,NULL,CLSCTX_INPROC_SERVER,IID_PPV_ARGS(&pXMLDoc));
|
CXML xml;
|
||||||
|
|
||||||
if(FAILED(hr)) {
|
if(!xml.loadXmlFile(file))
|
||||||
MessageBox(NULL, TEXT("Error creating XML Parser"), TEXT("Shader Loading Error"),
|
return false;
|
||||||
MB_OK|MB_ICONEXCLAMATION);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
VARIANT fileName;
|
TCHAR *lang = xml.getAttribute(TEXT("/shader"),TEXT("language"));
|
||||||
VARIANT_BOOL ret;
|
|
||||||
fileName.vt = VT_BSTR;
|
|
||||||
#ifdef UNICODE
|
|
||||||
fileName.bstrVal = SysAllocString(file);
|
|
||||||
#else
|
|
||||||
wchar_t tempfilename[MAX_PATH];
|
|
||||||
MultiByteToWideChar(CP_UTF8,0,file,-1,tempfilename,MAX_PATH);
|
|
||||||
fileName.bstrVal = SysAllocString(tempfilename);
|
|
||||||
#endif
|
|
||||||
hr = pXMLDoc->load(fileName,&ret);
|
|
||||||
SysFreeString(fileName.bstrVal);
|
|
||||||
|
|
||||||
if(FAILED(hr) || hr==S_FALSE) {
|
if(lstrcmpi(lang,TEXT("hlsl"))) {
|
||||||
_stprintf(errorMsg,TEXT("Error loading HLSL shader file:\n%s"),file);
|
_stprintf(errorMsg,TEXT("Shader language is <%s>, expected <HLSL> in file:\n%s"),lang,file);
|
||||||
MessageBox(NULL, errorMsg, TEXT("Shader Loading Error"), MB_OK|MB_ICONEXCLAMATION);
|
MessageBox(NULL, errorMsg, TEXT("Shader Loading Error"), MB_OK|MB_ICONEXCLAMATION);
|
||||||
pXMLDoc->Release();
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
VARIANT attributeValue;
|
TCHAR *shaderText = xml.getNodeContent(TEXT("/shader/source"));
|
||||||
BSTR attributeName;
|
|
||||||
|
|
||||||
hr = pXMLDoc->get_documentElement(&pXDE);
|
|
||||||
if(FAILED(hr) || hr==S_FALSE) {
|
|
||||||
_stprintf(errorMsg,TEXT("Error loading root element from file:\n%s"),file);
|
|
||||||
MessageBox(NULL, errorMsg, TEXT("Shader Loading Error"), MB_OK|MB_ICONEXCLAMATION);
|
|
||||||
pXMLDoc->Release();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
attributeName=SysAllocString(L"language");
|
|
||||||
pXDE->getAttribute(attributeName,&attributeValue);
|
|
||||||
SysFreeString(attributeName);
|
|
||||||
pXDE->Release();
|
|
||||||
|
|
||||||
if(attributeValue.vt!=VT_BSTR || lstrcmpiW(attributeValue.bstrVal,L"hlsl")) {
|
|
||||||
_stprintf(errorMsg,TEXT("Shader language is <%s>, expected <HLSL> in file:\n%s"),attributeValue.bstrVal,file);
|
|
||||||
MessageBox(NULL, errorMsg, TEXT("Shader Loading Error"), MB_OK|MB_ICONEXCLAMATION);
|
|
||||||
if(attributeValue.vt==VT_BSTR) SysFreeString(attributeValue.bstrVal);
|
|
||||||
pXMLDoc->Release();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if(attributeValue.vt==VT_BSTR) SysFreeString(attributeValue.bstrVal);
|
|
||||||
|
|
||||||
queryString=SysAllocString(L"/shader/source");
|
|
||||||
hr = pXMLDoc->selectSingleNode(queryString,&pXDN);
|
|
||||||
SysFreeString(queryString);
|
|
||||||
|
|
||||||
if(hr == S_OK) {
|
|
||||||
hr = pXDN->get_text(&nodeContent);
|
|
||||||
if(hr == S_OK) {
|
|
||||||
int requiredChars = WideCharToMultiByte(CP_ACP,0,nodeContent,-1,shaderText,0,NULL,NULL);
|
|
||||||
shaderText = new char[requiredChars];
|
|
||||||
WideCharToMultiByte(CP_UTF8,0,nodeContent,-1,shaderText,requiredChars,NULL,NULL);
|
|
||||||
}
|
|
||||||
SysFreeString(nodeContent);
|
|
||||||
pXDN->Release();
|
|
||||||
pXDN = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
pXMLDoc->Release();
|
|
||||||
|
|
||||||
if(!shaderText) {
|
if(!shaderText) {
|
||||||
_stprintf(errorMsg,TEXT("No HLSL shader program in file:\n%s"),file);
|
_stprintf(errorMsg,TEXT("No HLSL shader program in file:\n%s"),file);
|
||||||
|
@ -537,11 +474,17 @@ bool CDirect3D::SetShaderHLSL(const TCHAR *file)
|
||||||
}
|
}
|
||||||
|
|
||||||
LPD3DXBUFFER pBufferErrors = NULL;
|
LPD3DXBUFFER pBufferErrors = NULL;
|
||||||
hr = D3DXCreateEffect( pDevice,shaderText,strlen(shaderText),NULL, NULL,
|
#ifdef UNICODE
|
||||||
|
HRESULT hr = D3DXCreateEffect( pDevice,WideToCP(shaderText,CP_ACP),strlen(WideToCP(shaderText,CP_ACP)),NULL, NULL,
|
||||||
D3DXSHADER_ENABLE_BACKWARDS_COMPATIBILITY, NULL, &effect,
|
D3DXSHADER_ENABLE_BACKWARDS_COMPATIBILITY, NULL, &effect,
|
||||||
&pBufferErrors );
|
&pBufferErrors );
|
||||||
delete[] shaderText;
|
#else
|
||||||
if( FAILED(hr) ) {
|
HRESULT hr = D3DXCreateEffect( pDevice,shaderText,strlen(shaderText),NULL, NULL,
|
||||||
|
D3DXSHADER_ENABLE_BACKWARDS_COMPATIBILITY, NULL, &effect,
|
||||||
|
&pBufferErrors );
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if( FAILED(hr) ) {
|
||||||
_stprintf(errorMsg,TEXT("Error parsing HLSL shader file:\n%s"),file);
|
_stprintf(errorMsg,TEXT("Error parsing HLSL shader file:\n%s"),file);
|
||||||
MessageBox(NULL, errorMsg, TEXT("Shader Loading Error"), MB_OK|MB_ICONEXCLAMATION);
|
MessageBox(NULL, errorMsg, TEXT("Shader Loading Error"), MB_OK|MB_ICONEXCLAMATION);
|
||||||
if(pBufferErrors) {
|
if(pBufferErrors) {
|
||||||
|
|
|
@ -0,0 +1,163 @@
|
||||||
|
#include "CXML.h"
|
||||||
|
#include <windows.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include "_tfwopen.h"
|
||||||
|
#ifndef UNICODE
|
||||||
|
#define _tFromTCHAR(x) CPToWide(x,CP_ACP)
|
||||||
|
#define _tToTCHAR(x) WideToCP(x,CP_ACP)
|
||||||
|
#else
|
||||||
|
#define _tFromTCHAR
|
||||||
|
#define _tToTCHAR
|
||||||
|
#endif
|
||||||
|
|
||||||
|
CXML::CXML(void)
|
||||||
|
{
|
||||||
|
pXMLDoc = NULL;
|
||||||
|
xmlLoaded = false;
|
||||||
|
nodeContent = NULL;
|
||||||
|
attrValue = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
CXML::~CXML(void)
|
||||||
|
{
|
||||||
|
unloadXml();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CXML::unloadXml()
|
||||||
|
{
|
||||||
|
if(pXMLDoc) {
|
||||||
|
pXMLDoc->Release();
|
||||||
|
pXMLDoc = NULL;
|
||||||
|
}
|
||||||
|
if(nodeContent) {
|
||||||
|
delete [] nodeContent;
|
||||||
|
nodeContent = NULL;
|
||||||
|
}
|
||||||
|
if(attrValue) {
|
||||||
|
delete [] attrValue;
|
||||||
|
attrValue = NULL;
|
||||||
|
}
|
||||||
|
xmlLoaded = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CXML::loadXmlFile(TCHAR const *file)
|
||||||
|
{
|
||||||
|
unloadXml();
|
||||||
|
|
||||||
|
if(!file)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
TCHAR errorMsg[MAX_PATH + 50];
|
||||||
|
|
||||||
|
HRESULT hr = CoCreateInstance(CLSID_DOMDocument,NULL,CLSCTX_INPROC_SERVER,IID_PPV_ARGS(&pXMLDoc));
|
||||||
|
|
||||||
|
if(FAILED(hr)) {
|
||||||
|
MessageBox(NULL, TEXT("Error creating XML Parser"), TEXT("XML Error"),
|
||||||
|
MB_OK|MB_ICONEXCLAMATION);
|
||||||
|
pXMLDoc = NULL;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
VARIANT fileName;
|
||||||
|
VARIANT_BOOL ret;
|
||||||
|
fileName.vt = VT_BSTR;
|
||||||
|
fileName.bstrVal = SysAllocString(_tFromTCHAR(file));
|
||||||
|
hr = pXMLDoc->load(fileName,&ret);
|
||||||
|
SysFreeString(fileName.bstrVal);
|
||||||
|
|
||||||
|
if(FAILED(hr) || hr==S_FALSE) {
|
||||||
|
_stprintf(errorMsg,TEXT("Error loading XML file:\n%s"),file);
|
||||||
|
MessageBox(NULL, errorMsg, TEXT("XML Error"),
|
||||||
|
MB_OK|MB_ICONEXCLAMATION);
|
||||||
|
unloadXml();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
hr = pXMLDoc->get_documentElement(&pXrootElement);
|
||||||
|
if(FAILED(hr) || hr==S_FALSE) {
|
||||||
|
_stprintf(errorMsg,TEXT("Error loading root element from file:\n%s"),file);
|
||||||
|
MessageBox(NULL, errorMsg, TEXT("XML Error"), MB_OK|MB_ICONEXCLAMATION);
|
||||||
|
unloadXml();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
xmlLoaded = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
IXMLDOMNode *CXML::getNode(TCHAR const *searchNode)
|
||||||
|
{
|
||||||
|
IXMLDOMNode *pXDN;
|
||||||
|
BSTR queryString=SysAllocString(_tFromTCHAR(searchNode));
|
||||||
|
HRESULT hr = pXMLDoc->selectSingleNode(queryString,&pXDN);
|
||||||
|
SysFreeString(queryString);
|
||||||
|
|
||||||
|
return pXDN;
|
||||||
|
}
|
||||||
|
|
||||||
|
TCHAR *CXML::getAttribute(TCHAR const *searchNode, TCHAR const *attrName)
|
||||||
|
{
|
||||||
|
IXMLDOMNode *pXDN = getNode(searchNode);
|
||||||
|
|
||||||
|
if(!pXDN)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
VARIANT attributeValue;
|
||||||
|
BSTR attributeName;
|
||||||
|
|
||||||
|
IXMLDOMElement * pXDE = NULL;
|
||||||
|
HRESULT hr = pXDN->QueryInterface(IID_PPV_ARGS(&pXDE));
|
||||||
|
if(FAILED(hr)) {
|
||||||
|
pXDN->Release();
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
attributeName=SysAllocString(_tFromTCHAR(attrName));
|
||||||
|
pXDE->getAttribute(attributeName,&attributeValue);
|
||||||
|
SysFreeString(attributeName);
|
||||||
|
pXDE->Release();
|
||||||
|
|
||||||
|
if(attributeValue.vt!=VT_BSTR)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if(attrValue) {
|
||||||
|
delete [] attrValue;
|
||||||
|
attrValue = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
attrValue = new TCHAR[lstrlen(_tToTCHAR(attributeValue.bstrVal)) + 1];
|
||||||
|
lstrcpy(attrValue,_tToTCHAR(attributeValue.bstrVal));
|
||||||
|
|
||||||
|
SysFreeString(attributeValue.bstrVal);
|
||||||
|
|
||||||
|
return attrValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
TCHAR *CXML::getNodeContent(TCHAR const *searchNode)
|
||||||
|
{
|
||||||
|
IXMLDOMNode *pXDN = getNode(searchNode);
|
||||||
|
|
||||||
|
if(!pXDN)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
BSTR nodeText;
|
||||||
|
|
||||||
|
HRESULT hr = pXDN->get_text(&nodeText);
|
||||||
|
pXDN->Release();
|
||||||
|
|
||||||
|
if(hr != S_OK)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if(nodeContent) {
|
||||||
|
delete [] nodeContent;
|
||||||
|
nodeContent = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
nodeContent = new TCHAR[lstrlen(_tToTCHAR(nodeText)) + 1];
|
||||||
|
lstrcpy(nodeContent,_tToTCHAR(nodeText));
|
||||||
|
|
||||||
|
SysFreeString(nodeText);
|
||||||
|
|
||||||
|
return nodeContent;
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
#ifndef CXML_H
|
||||||
|
#define CXML_H
|
||||||
|
|
||||||
|
#include "msxml2.h"
|
||||||
|
#include <tchar.h>
|
||||||
|
|
||||||
|
class CXML
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
IXMLDOMDocument * pXMLDoc;
|
||||||
|
IXMLDOMElement * pXrootElement;
|
||||||
|
bool xmlLoaded;
|
||||||
|
TCHAR *nodeContent;
|
||||||
|
TCHAR *attrValue;
|
||||||
|
|
||||||
|
IXMLDOMNode *getNode(TCHAR const *searchNode);
|
||||||
|
|
||||||
|
public:
|
||||||
|
CXML(void);
|
||||||
|
~CXML(void);
|
||||||
|
|
||||||
|
bool loadXmlFile(TCHAR const *xmlFile);
|
||||||
|
void unloadXml();
|
||||||
|
|
||||||
|
TCHAR *getAttribute(TCHAR const *searchNode, TCHAR const *attrName);
|
||||||
|
TCHAR *getNodeContent(TCHAR const *searchNode);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
|
@ -176,7 +176,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef UNICODE
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include "_tfwopen.h"
|
#include "_tfwopen.h"
|
||||||
|
|
||||||
|
@ -192,23 +191,19 @@ WideToUtf8::WideToUtf8(const wchar_t *wideChars) {
|
||||||
WideCharToMultiByte(CP_UTF8,0,wideChars,-1,utf8Chars,requiredChars,NULL,NULL);
|
WideCharToMultiByte(CP_UTF8,0,wideChars,-1,utf8Chars,requiredChars,NULL,NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
MS932ToWide::MS932ToWide(const char *ms932Chars) {
|
CPToWide::CPToWide(const char *chars, unsigned int cp) {
|
||||||
int requiredChars = MultiByteToWideChar(932,0,ms932Chars,-1,wideChars,0);
|
int requiredChars = MultiByteToWideChar(cp,0,chars,-1,wideChars,0);
|
||||||
wideChars = new wchar_t[requiredChars];
|
wideChars = new wchar_t[requiredChars];
|
||||||
MultiByteToWideChar(932,0,ms932Chars,-1,wideChars,requiredChars);
|
MultiByteToWideChar(cp,0,chars,-1,wideChars,requiredChars);
|
||||||
}
|
}
|
||||||
|
|
||||||
AnsiToWide::AnsiToWide(const char *ansiChars) {
|
WideToCP::WideToCP(const wchar_t *wideChars, unsigned int cp) {
|
||||||
int requiredChars = MultiByteToWideChar(CP_ACP,0,ansiChars,-1,wideChars,0);
|
int requiredChars = WideCharToMultiByte(cp,0,wideChars,-1,cpchars,0,NULL,NULL);
|
||||||
wideChars = new wchar_t[requiredChars];
|
cpchars = new char[requiredChars];
|
||||||
MultiByteToWideChar(CP_ACP,0,ansiChars,-1,wideChars,requiredChars);
|
WideCharToMultiByte(cp,0,wideChars,-1,cpchars,requiredChars,NULL,NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
WideToAnsi::WideToAnsi(const wchar_t *wideChars) {
|
#ifdef UNICODE
|
||||||
int requiredChars = WideCharToMultiByte(CP_ACP,0,wideChars,-1,ansiChars,0,NULL,NULL);
|
|
||||||
ansiChars = new char[requiredChars];
|
|
||||||
WideCharToMultiByte(CP_ACP,0,wideChars,-1,ansiChars,requiredChars,NULL,NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" FILE *_tfwopen(const char *filename, const char *mode ) {
|
extern "C" FILE *_tfwopen(const char *filename, const char *mode ) {
|
||||||
wchar_t mode_w[30];
|
wchar_t mode_w[30];
|
||||||
|
|
|
@ -175,12 +175,11 @@
|
||||||
***********************************************************************************/
|
***********************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef UNICODE
|
|
||||||
|
|
||||||
#ifndef _TFWOPEN_H
|
#ifndef _TFWOPEN_H
|
||||||
#define _TFWOPEN_H
|
#define _TFWOPEN_H
|
||||||
|
|
||||||
|
#ifdef UNICODE
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -208,8 +207,9 @@ char *_twcsrchr(const char *_Str, int _Ch);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif // UNICODE
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#include <fstream>
|
|
||||||
|
|
||||||
class Utf8ToWide {
|
class Utf8ToWide {
|
||||||
private:
|
private:
|
||||||
|
@ -229,32 +229,29 @@ public:
|
||||||
operator char *() { return utf8Chars; }
|
operator char *() { return utf8Chars; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class MS932ToWide {
|
class CPToWide {
|
||||||
private:
|
private:
|
||||||
wchar_t *wideChars;
|
wchar_t *wideChars;
|
||||||
public:
|
public:
|
||||||
MS932ToWide(const char *ms932Chars);
|
CPToWide(const char *chars, unsigned int cp);
|
||||||
~MS932ToWide() { delete [] wideChars; }
|
~CPToWide() { delete [] wideChars; }
|
||||||
operator wchar_t *() { return wideChars; }
|
operator wchar_t *() { return wideChars; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class AnsiToWide {
|
class WideToCP {
|
||||||
private:
|
private:
|
||||||
wchar_t *wideChars;
|
char *cpchars;
|
||||||
public:
|
public:
|
||||||
AnsiToWide(const char *ansiChars);
|
WideToCP(const wchar_t *wideChars, unsigned int cp);
|
||||||
~AnsiToWide() { delete [] wideChars; }
|
~WideToCP() { delete [] cpchars; }
|
||||||
operator wchar_t *() { return wideChars; }
|
operator char *() { return cpchars; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class WideToAnsi {
|
#endif // __cplusplus
|
||||||
private:
|
|
||||||
char *ansiChars;
|
#ifdef UNICODE
|
||||||
public:
|
#ifdef __cplusplus
|
||||||
WideToAnsi(const wchar_t *wideChars);
|
#include <fstream>
|
||||||
~WideToAnsi() { delete [] ansiChars; }
|
|
||||||
operator char *() { return ansiChars; }
|
|
||||||
};
|
|
||||||
|
|
||||||
namespace std {
|
namespace std {
|
||||||
class u8nifstream: public std::ifstream
|
class u8nifstream: public std::ifstream
|
||||||
|
@ -353,6 +350,6 @@ __forceinline static int open(const char *filename, int oflag, int pmode) {
|
||||||
#define _makepath _twmakepath
|
#define _makepath _twmakepath
|
||||||
//#define strrchr _twcsrchr
|
//#define strrchr _twcsrchr
|
||||||
|
|
||||||
#endif // _TFWOPEN_H
|
#endif // UNICODE
|
||||||
|
|
||||||
#endif
|
#endif // _TFWOPEN_H
|
||||||
|
|
|
@ -2658,7 +2658,7 @@ void RenderBlarggNTSC( SSurface Src, SSurface Dst, RECT *rect)
|
||||||
|
|
||||||
const unsigned int srcRowPixels = Src.Pitch/2;
|
const unsigned int srcRowPixels = Src.Pitch/2;
|
||||||
|
|
||||||
if(Src.Height > SNES_HEIGHT_EXTENDED || Src.Width == 512)
|
if(Src.Width == 512)
|
||||||
snes_ntsc_blit_hires( ntsc, (unsigned short *)Src.Surface, srcRowPixels, 0,Src.Width, Src.Height, Dst.Surface, Dst.Pitch );
|
snes_ntsc_blit_hires( ntsc, (unsigned short *)Src.Surface, srcRowPixels, 0,Src.Width, Src.Height, Dst.Surface, Dst.Pitch );
|
||||||
else
|
else
|
||||||
snes_ntsc_blit( ntsc, (unsigned short *)Src.Surface, srcRowPixels, 0,Src.Width, Src.Height, Dst.Surface, Dst.Pitch );
|
snes_ntsc_blit( ntsc, (unsigned short *)Src.Surface, srcRowPixels, 0,Src.Width, Src.Height, Dst.Surface, Dst.Pitch );
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="Windows-1252"?>
|
<?xml version="1.0" encoding="Windows-1252"?>
|
||||||
<VisualStudioProject
|
<VisualStudioProject
|
||||||
ProjectType="Visual C++"
|
ProjectType="Visual C++"
|
||||||
Version="9.00"
|
Version="9,00"
|
||||||
Name="Snes9X"
|
Name="Snes9X"
|
||||||
ProjectGUID="{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}"
|
ProjectGUID="{B86059D8-C9A6-46BE-8FBA-3170C54F1DFD}"
|
||||||
RootNamespace="Snes9X"
|
RootNamespace="Snes9X"
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
FavorSizeOrSpeed="1"
|
FavorSizeOrSpeed="1"
|
||||||
OmitFramePointers="true"
|
OmitFramePointers="true"
|
||||||
WholeProgramOptimization="true"
|
WholeProgramOptimization="true"
|
||||||
AdditionalIncludeDirectories="$(ProjectDir),$(ProjectDir)..\,$(ProjectDir)..\..\,$(ProjectDir)..\..\zLib,$(ProjectDir)..\unzip,$(ProjectDir)..\..\FMOD\api\inc,$(ProjectDir)..\..\libPNG\src,$(ProjectDir)..\apu\bapu;$(ProjectDir)..\..\lua"
|
AdditionalIncludeDirectories="$(ProjectDir),$(ProjectDir)..\,$(ProjectDir)..\..\,$(ProjectDir)..\..\zLib,$(ProjectDir)..\unzip,$(ProjectDir)..\..\FMOD\api\inc,$(ProjectDir)..\..\libPNG\src,$(ProjectDir)..\snes9x,$(ProjectDir)..\apu\bapu;$(ProjectDir)..\..\lua"
|
||||||
PreprocessorDefinitions="NDEBUG;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;FMODEX_SUPPORT;NETPLAY_SUPPORT;HAVE_LUA"
|
PreprocessorDefinitions="NDEBUG;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;FMODEX_SUPPORT;NETPLAY_SUPPORT;HAVE_LUA"
|
||||||
StringPooling="true"
|
StringPooling="true"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
|
@ -158,7 +158,7 @@
|
||||||
FavorSizeOrSpeed="1"
|
FavorSizeOrSpeed="1"
|
||||||
OmitFramePointers="true"
|
OmitFramePointers="true"
|
||||||
WholeProgramOptimization="true"
|
WholeProgramOptimization="true"
|
||||||
AdditionalIncludeDirectories="$(ProjectDir),$(ProjectDir)..\,$(ProjectDir)..\..\,$(ProjectDir)..\..\zLib,$(ProjectDir)..\unzip,$(ProjectDir)..\..\FMOD\api\inc,$(ProjectDir)..\..\libPNG\src,$(ProjectDir)..\apu\bapu;$(ProjectDir)..\..\lua"
|
AdditionalIncludeDirectories="$(ProjectDir),$(ProjectDir)..\,$(ProjectDir)..\..\,$(ProjectDir)..\..\zLib,$(ProjectDir)..\unzip,$(ProjectDir)..\..\FMOD\api\inc,$(ProjectDir)..\..\libPNG\src,$(ProjectDir)..\snes9x,$(ProjectDir)..\apu\bapu;$(ProjectDir)..\..\lua"
|
||||||
PreprocessorDefinitions="NDEBUG;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;FMODEX_SUPPORT;NETPLAY_SUPPORT;HAVE_LUA"
|
PreprocessorDefinitions="NDEBUG;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;FMODEX_SUPPORT;NETPLAY_SUPPORT;HAVE_LUA"
|
||||||
StringPooling="true"
|
StringPooling="true"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
|
@ -255,7 +255,7 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="$(ProjectDir),$(ProjectDir)..\,$(ProjectDir)..\..\,$(ProjectDir)..\..\zLib,$(ProjectDir)..\unzip,$(ProjectDir)..\..\FMOD\api\inc,$(ProjectDir)..\..\libPNG\src,$(ProjectDir)..\apu\bapu;$(ProjectDir)..\..\lua"
|
AdditionalIncludeDirectories="$(ProjectDir),$(ProjectDir)..\,$(ProjectDir)..\..\,$(ProjectDir)..\..\zLib,$(ProjectDir)..\unzip,$(ProjectDir)..\..\FMOD\api\inc,$(ProjectDir)..\..\libPNG\src,$(ProjectDir)..\snes9x,$(ProjectDir)..\apu\bapu;$(ProjectDir)..\..\lua"
|
||||||
PreprocessorDefinitions="_DEBUG;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;FMODEX_SUPPORT;NETPLAY_SUPPORT;D3D_DEBUG_INFO;HAVE_LUA"
|
PreprocessorDefinitions="_DEBUG;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;FMODEX_SUPPORT;NETPLAY_SUPPORT;D3D_DEBUG_INFO;HAVE_LUA"
|
||||||
RuntimeLibrary="1"
|
RuntimeLibrary="1"
|
||||||
StructMemberAlignment="0"
|
StructMemberAlignment="0"
|
||||||
|
@ -354,7 +354,7 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="$(ProjectDir),$(ProjectDir)..\,$(ProjectDir)..\..\,$(ProjectDir)..\..\zLib,$(ProjectDir)..\unzip,$(ProjectDir)..\..\FMOD\api\inc,$(ProjectDir)..\..\libPNG\src,$(ProjectDir)..\apu\bapu;$(ProjectDir)..\..\lua"
|
AdditionalIncludeDirectories="$(ProjectDir),$(ProjectDir)..\,$(ProjectDir)..\..\,$(ProjectDir)..\..\zLib,$(ProjectDir)..\unzip,$(ProjectDir)..\..\FMOD\api\inc,$(ProjectDir)..\..\libPNG\src,$(ProjectDir)..\snes9x,$(ProjectDir)..\apu\bapu;$(ProjectDir)..\..\lua"
|
||||||
PreprocessorDefinitions="_DEBUG;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;FMODEX_SUPPORT;NETPLAY_SUPPORT;D3D_DEBUG_INFO;HAVE_LUA"
|
PreprocessorDefinitions="_DEBUG;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;FMODEX_SUPPORT;NETPLAY_SUPPORT;D3D_DEBUG_INFO;HAVE_LUA"
|
||||||
RuntimeLibrary="1"
|
RuntimeLibrary="1"
|
||||||
StructMemberAlignment="0"
|
StructMemberAlignment="0"
|
||||||
|
@ -453,7 +453,7 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="$(ProjectDir),$(ProjectDir)..\,$(ProjectDir)..\..\,$(ProjectDir)..\..\zLib,$(ProjectDir)..\unzip,$(ProjectDir)..\..\FMOD\api\inc,$(ProjectDir)..\..\libPNG\src,$(ProjectDir)..\apu\bapu;$(ProjectDir)..\..\lua"
|
AdditionalIncludeDirectories="$(ProjectDir),$(ProjectDir)..\,$(ProjectDir)..\..\,$(ProjectDir)..\..\zLib,$(ProjectDir)..\unzip,$(ProjectDir)..\..\FMOD\api\inc,$(ProjectDir)..\..\libPNG\src,$(ProjectDir)..\snes9x,$(ProjectDir)..\apu\bapu;$(ProjectDir)..\..\lua"
|
||||||
PreprocessorDefinitions="_DEBUG;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;FMODEX_SUPPORT;NETPLAY_SUPPORT;D3D_DEBUG_INFO;HAVE_LUA"
|
PreprocessorDefinitions="_DEBUG;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;FMODEX_SUPPORT;NETPLAY_SUPPORT;D3D_DEBUG_INFO;HAVE_LUA"
|
||||||
RuntimeLibrary="1"
|
RuntimeLibrary="1"
|
||||||
StructMemberAlignment="0"
|
StructMemberAlignment="0"
|
||||||
|
@ -553,7 +553,7 @@
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
AdditionalIncludeDirectories="$(ProjectDir),$(ProjectDir)..\,$(ProjectDir)..\..\,$(ProjectDir)..\..\zLib,$(ProjectDir)..\unzip,$(ProjectDir)..\..\FMOD\api\inc,$(ProjectDir)..\..\libPNG\src,$(ProjectDir)..\apu\bapu;$(ProjectDir)..\..\lua"
|
AdditionalIncludeDirectories="$(ProjectDir),$(ProjectDir)..\,$(ProjectDir)..\..\,$(ProjectDir)..\..\zLib,$(ProjectDir)..\unzip,$(ProjectDir)..\..\FMOD\api\inc,$(ProjectDir)..\..\libPNG\src,$(ProjectDir)..\snes9x,$(ProjectDir)..\apu\bapu;$(ProjectDir)..\..\lua"
|
||||||
PreprocessorDefinitions="_DEBUG;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;FMODEX_SUPPORT;NETPLAY_SUPPORT;D3D_DEBUG_INFO;HAVE_LUA"
|
PreprocessorDefinitions="_DEBUG;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;FMODEX_SUPPORT;NETPLAY_SUPPORT;D3D_DEBUG_INFO;HAVE_LUA"
|
||||||
RuntimeLibrary="1"
|
RuntimeLibrary="1"
|
||||||
StructMemberAlignment="0"
|
StructMemberAlignment="0"
|
||||||
|
@ -660,7 +660,7 @@
|
||||||
FavorSizeOrSpeed="1"
|
FavorSizeOrSpeed="1"
|
||||||
OmitFramePointers="true"
|
OmitFramePointers="true"
|
||||||
WholeProgramOptimization="true"
|
WholeProgramOptimization="true"
|
||||||
AdditionalIncludeDirectories="$(ProjectDir),$(ProjectDir)..\,$(ProjectDir)..\..\,$(ProjectDir)..\..\zLib,$(ProjectDir)..\unzip,$(ProjectDir)..\..\FMOD\api\inc,$(ProjectDir)..\..\libPNG\src,$(ProjectDir)..\apu\bapu;$(ProjectDir)..\..\lua"
|
AdditionalIncludeDirectories="$(ProjectDir),$(ProjectDir)..\,$(ProjectDir)..\..\,$(ProjectDir)..\..\zLib,$(ProjectDir)..\unzip,$(ProjectDir)..\..\FMOD\api\inc,$(ProjectDir)..\..\libPNG\src,$(ProjectDir)..\snes9x,$(ProjectDir)..\apu\bapu;$(ProjectDir)..\..\lua"
|
||||||
PreprocessorDefinitions="NDEBUG;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;FMODEX_SUPPORT;NETPLAY_SUPPORT;HAVE_LUA"
|
PreprocessorDefinitions="NDEBUG;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;FMODEX_SUPPORT;NETPLAY_SUPPORT;HAVE_LUA"
|
||||||
StringPooling="true"
|
StringPooling="true"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
|
@ -765,7 +765,7 @@
|
||||||
FavorSizeOrSpeed="1"
|
FavorSizeOrSpeed="1"
|
||||||
OmitFramePointers="true"
|
OmitFramePointers="true"
|
||||||
WholeProgramOptimization="true"
|
WholeProgramOptimization="true"
|
||||||
AdditionalIncludeDirectories="$(ProjectDir),$(ProjectDir)..\,$(ProjectDir)..\..\,$(ProjectDir)..\..\zLib,$(ProjectDir)..\unzip,$(ProjectDir)..\..\FMOD\api\inc,$(ProjectDir)..\..\libPNG\src,$(ProjectDir)..\apu\bapu;$(ProjectDir)..\..\lua"
|
AdditionalIncludeDirectories="$(ProjectDir),$(ProjectDir)..\,$(ProjectDir)..\..\,$(ProjectDir)..\..\zLib,$(ProjectDir)..\unzip,$(ProjectDir)..\..\FMOD\api\inc,$(ProjectDir)..\..\libPNG\src,$(ProjectDir)..\snes9x,$(ProjectDir)..\apu\bapu;$(ProjectDir)..\..\lua"
|
||||||
PreprocessorDefinitions="NDEBUG;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;FMODEX_SUPPORT;NETPLAY_SUPPORT;HAVE_LUA"
|
PreprocessorDefinitions="NDEBUG;HAVE_LIBPNG;JMA_SUPPORT;ZLIB;UNZIP_SUPPORT;__WIN32__;FMODEX_SUPPORT;NETPLAY_SUPPORT;HAVE_LUA"
|
||||||
StringPooling="true"
|
StringPooling="true"
|
||||||
RuntimeLibrary="0"
|
RuntimeLibrary="0"
|
||||||
|
@ -3030,6 +3030,14 @@
|
||||||
RelativePath=".\CWindow.h"
|
RelativePath=".\CWindow.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\CXML.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath=".\CXML.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath=".\InputCustom.cpp"
|
RelativePath=".\InputCustom.cpp"
|
||||||
>
|
>
|
||||||
|
|
|
@ -213,9 +213,9 @@
|
||||||
#ifdef UNICODE
|
#ifdef UNICODE
|
||||||
#define _tToChar WideToUtf8
|
#define _tToChar WideToUtf8
|
||||||
#define _tFromChar Utf8ToWide
|
#define _tFromChar Utf8ToWide
|
||||||
#define _tFromMS932 MS932ToWide
|
#define _tFromMS932(x) CPToWide(x,932)
|
||||||
#define _tToAnsi WideToAnsi
|
#define _tToAnsi(x) WideToCP(x,CP_ACP)
|
||||||
#define _tFromAnsi AnsiToWide
|
#define _tFromAnsi(x) CPToWide(x,CP_ACP)
|
||||||
#else
|
#else
|
||||||
#define _tToChar
|
#define _tToChar
|
||||||
#define _tFromChar
|
#define _tFromChar
|
||||||
|
|
Loading…
Reference in New Issue