win32: fix matrixview (which was broken during fixedpoint conversions)
This commit is contained in:
parent
fb7b9a2104
commit
5e8fa718c6
|
@ -2266,6 +2266,12 @@ void gfx3d_glGetMatrix(unsigned int m_mode, int index, float* dest)
|
|||
//}
|
||||
|
||||
//MatrixCopy(dest, MatrixStackGetPos(&mtxStack[m_mode], index));
|
||||
s32* src;
|
||||
if(index==-1)
|
||||
src = mtxCurrent[m_mode];
|
||||
else src=MatrixStackGetPos(&mtxStack[m_mode],index);
|
||||
for(int i=0;i<16;i++)
|
||||
dest[i] = src[i]/4096.0f;
|
||||
}
|
||||
|
||||
void gfx3d_glGetLightDirection(unsigned int index, unsigned int* dest)
|
||||
|
|
|
@ -4,58 +4,58 @@
|
|||
#define mkdir _mkdir
|
||||
#endif
|
||||
|
||||
#if defined(_WINDOWS)
|
||||
#if defined(_WINDOWS)
|
||||
#include <direct.h>
|
||||
#if !defined(WXPORT)
|
||||
#include "resource.h"
|
||||
#else
|
||||
#include <glib.h>
|
||||
#endif /* !WXPORT */
|
||||
#else
|
||||
#include <glib.h>
|
||||
#else
|
||||
#include <glib.h>
|
||||
#endif /* _WINDOWS */
|
||||
|
||||
|
||||
#include "time.h"
|
||||
#include "utils/xstring.h"
|
||||
|
||||
//-----------------------------------
|
||||
//This is taken from mono Path.cs
|
||||
static const char InvalidPathChars[] = {
|
||||
'\x22', '\x3C', '\x3E', '\x7C', '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07',
|
||||
'\x08', '\x09', '\x0A', '\x0B', '\x0C', '\x0D', '\x0E', '\x0F', '\x10', '\x11', '\x12',
|
||||
'\x13', '\x14', '\x15', '\x16', '\x17', '\x18', '\x19', '\x1A', '\x1B', '\x1C', '\x1D',
|
||||
'\x1E', '\x1F'
|
||||
static const char InvalidPathChars[] = {
|
||||
'\x22', '\x3C', '\x3E', '\x7C', '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07',
|
||||
'\x08', '\x09', '\x0A', '\x0B', '\x0C', '\x0D', '\x0E', '\x0F', '\x10', '\x11', '\x12',
|
||||
'\x13', '\x14', '\x15', '\x16', '\x17', '\x18', '\x19', '\x1A', '\x1B', '\x1C', '\x1D',
|
||||
'\x1E', '\x1F'
|
||||
};
|
||||
|
||||
//but it is sort of windows-specific. Does it work in linux? Maybe we'll have to make it smarter
|
||||
static const char VolumeSeparatorChar = ':';
|
||||
static const char DirectorySeparatorChar = '\\';
|
||||
static const char AltDirectorySeparatorChar = '/';
|
||||
static const char VolumeSeparatorChar = ':';
|
||||
static const char DirectorySeparatorChar = '\\';
|
||||
static const char AltDirectorySeparatorChar = '/';
|
||||
static bool dirEqualsVolume = (DirectorySeparatorChar == VolumeSeparatorChar);
|
||||
|
||||
class Path
|
||||
{
|
||||
public:
|
||||
static bool IsPathRooted (const std::string& path)
|
||||
{
|
||||
if (path.size() == 0)
|
||||
return false;
|
||||
|
||||
|
||||
if (path.find_first_of(InvalidPathChars) != -1)
|
||||
{
|
||||
//yuck.
|
||||
//throw new ArgumentException ("Illegal characters in path.");
|
||||
}
|
||||
|
||||
char c = path [0];
|
||||
return (c == DirectorySeparatorChar ||
|
||||
c == AltDirectorySeparatorChar ||
|
||||
(!dirEqualsVolume && path.size() > 1 && path [1] == VolumeSeparatorChar));
|
||||
public:
|
||||
static bool IsPathRooted (const std::string& path)
|
||||
{
|
||||
if (path.size() == 0)
|
||||
return false;
|
||||
|
||||
|
||||
if (path.find_first_of(InvalidPathChars) != -1)
|
||||
{
|
||||
//yuck.
|
||||
//throw new ArgumentException ("Illegal characters in path.");
|
||||
}
|
||||
|
||||
char c = path [0];
|
||||
return (c == DirectorySeparatorChar ||
|
||||
c == AltDirectorySeparatorChar ||
|
||||
(!dirEqualsVolume && path.size() > 1 && path [1] == VolumeSeparatorChar));
|
||||
}
|
||||
};
|
||||
//-----------------------------------
|
||||
#if defined(_WINDOWS)
|
||||
#if defined(_WINDOWS)
|
||||
static void FCEUD_MakePathDirs(const char *fname)
|
||||
{
|
||||
char path[MAX_PATH];
|
||||
|
@ -89,7 +89,7 @@ static void FCEUD_MakePathDirs(const char *fname)
|
|||
|
||||
} while(1);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
//------------------------------
|
||||
|
||||
class PathInfo
|
||||
|
|
|
@ -62,7 +62,7 @@ void MatrixView_OnPaintPositionMatrix(HWND hwnd)
|
|||
|
||||
stackIndex = SendMessage(hStackCombo, CB_GETCURSEL, 0, 0) - 1;
|
||||
|
||||
//gfx3d_glGetMatrix(1, stackIndex, matrix);
|
||||
gfx3d_glGetMatrix(1, stackIndex, matrix);
|
||||
MatrixView_SetMatrix(hwnd, idcGroup, matrix);
|
||||
}
|
||||
|
||||
|
@ -85,7 +85,7 @@ void MatrixView_OnPaintDirectionMatrix(HWND hwnd)
|
|||
|
||||
stackIndex = SendMessage(hStackCombo, CB_GETCURSEL, 0, 0) - 1;
|
||||
|
||||
//gfx3d_glGetMatrix(2, stackIndex, matrix);
|
||||
gfx3d_glGetMatrix(2, stackIndex, matrix);
|
||||
MatrixView_SetMatrix(hwnd, idcGroup, matrix);
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ void MatrixView_OnPaintProjectionMatrix(HWND hwnd)
|
|||
|
||||
float mat[16];
|
||||
|
||||
//gfx3d_glGetMatrix(0, -1, mat);
|
||||
gfx3d_glGetMatrix(0, -1, mat);
|
||||
MatrixView_SetMatrix(hwnd, idcGroup, mat);
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ void MatrixView_OnPaintTextureMatrix(HWND hwnd)
|
|||
|
||||
float mat[16];
|
||||
|
||||
//gfx3d_glGetMatrix(3, -1, mat);
|
||||
gfx3d_glGetMatrix(3, -1, mat);
|
||||
MatrixView_SetMatrix(hwnd, idcGroup, mat);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue