windows build is repaired
This commit is contained in:
parent
eede1ef9c2
commit
85d3c82e08
|
@ -3,6 +3,10 @@
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
//ARM9 mem
|
//ARM9 mem
|
||||||
u8 ARM9_ITCM[0x8000];
|
u8 ARM9_ITCM[0x8000];
|
||||||
|
@ -30,4 +34,8 @@ typedef struct {
|
||||||
|
|
||||||
extern ARM9_struct ARM9Mem;
|
extern ARM9_struct ARM9Mem;
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -240,7 +240,8 @@ NDS_exec(s32 nb, BOOL force);
|
||||||
MainScreen.offset = SubScreen.offset;
|
MainScreen.offset = SubScreen.offset;
|
||||||
SubScreen.offset = tmp;
|
SubScreen.offset = tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int NDS_WriteBMP_32bppBuffer(int width, int height, const void* buf, const char *filename);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,10 @@
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SNDCORE_DEFAULT -1
|
#define SNDCORE_DEFAULT -1
|
||||||
#define SNDCORE_DUMMY 0
|
#define SNDCORE_DUMMY 0
|
||||||
#define SNDCORE_FILEWRITE 1
|
#define SNDCORE_FILEWRITE 1
|
||||||
|
@ -91,4 +95,8 @@ void SPU_WriteLong(u32 addr, u32 val);
|
||||||
u32 SPU_ReadLong(u32 addr);
|
u32 SPU_ReadLong(u32 addr);
|
||||||
void SPU_Emulate(void);
|
void SPU_Emulate(void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -23,6 +23,10 @@
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef SSE2
|
#ifdef SSE2
|
||||||
#include <xmmintrin.h>
|
#include <xmmintrin.h>
|
||||||
#include <emmintrin.h>
|
#include <emmintrin.h>
|
||||||
|
@ -87,4 +91,8 @@ void Vector3Normalize(float *dst);
|
||||||
|
|
||||||
void Vector4Copy(float *dst, float *src);
|
void Vector4Copy(float *dst, float *src);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -27,6 +27,10 @@
|
||||||
#define CALL_CONVENTION
|
#define CALL_CONVENTION
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
enum DRIVER_3D
|
enum DRIVER_3D
|
||||||
{
|
{
|
||||||
|
@ -142,4 +146,8 @@ extern GPU3DInterface *gpu3D;
|
||||||
|
|
||||||
void NDS_3D_SetDriver (int core3DIndex);
|
void NDS_3D_SetDriver (int core3DIndex);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -177,7 +177,7 @@ void CWindow_AddToRefreshList(void *win)
|
||||||
updatewindowlist = (cwindow_struct *)win;
|
updatewindowlist = (cwindow_struct *)win;
|
||||||
LeaveCriticalSection(§ion);
|
LeaveCriticalSection(§ion);
|
||||||
|
|
||||||
CWindow_UpdateAutoUpdateItem(win, TRUE);
|
CWindow_UpdateAutoUpdateItem((cwindow_struct*)win, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -202,7 +202,7 @@ void CWindow_RemoveFromRefreshList(void *win)
|
||||||
win2->prev = NULL;
|
win2->prev = NULL;
|
||||||
LeaveCriticalSection(§ion);
|
LeaveCriticalSection(§ion);
|
||||||
|
|
||||||
CWindow_UpdateAutoUpdateItem(win, FALSE);
|
CWindow_UpdateAutoUpdateItem((cwindow_struct*)win, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -223,7 +223,7 @@ int CWindow_ToggleAutoUpdate(void *win)
|
||||||
CWindow_AddToRefreshList(win);
|
CWindow_AddToRefreshList(win);
|
||||||
|
|
||||||
// checks or unchecks the auto update item in the system menu
|
// checks or unchecks the auto update item in the system menu
|
||||||
CWindow_UpdateAutoUpdateItem(win, win2->autoup);
|
CWindow_UpdateAutoUpdateItem((cwindow_struct*)win, win2->autoup);
|
||||||
|
|
||||||
return win2->autoup;
|
return win2->autoup;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,15 +33,13 @@
|
||||||
#include "../debug.h"
|
#include "../debug.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
char IniName[MAX_PATH];
|
static char IniName[MAX_PATH];
|
||||||
char vPath[MAX_PATH],*szPath,currDir[MAX_PATH];
|
char vPath[MAX_PATH],*szPath,currDir[MAX_PATH];
|
||||||
u32 keytab[12];
|
|
||||||
|
|
||||||
const char tabkeytext[52][14] = {"0","1","2","3","4","5","6","7","8","9","A","B","C",
|
const char *tabkeytext[52] = {"0","1","2","3","4","5","6","7","8","9","A","B","C",
|
||||||
"D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X",
|
"D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X",
|
||||||
"Y","Z","SPACE","UP","DOWN","LEFT","RIGHT","TAB","SHIFT","DEL","INSERT","HOME","END","ENTER",
|
"Y","Z","SPACE","UP","DOWN","LEFT","RIGHT","TAB","SHIFT","DEL","INSERT","HOME","END","ENTER",
|
||||||
"Joystick UP","Joystick DOWN","Joystick LEFT","Joystick RIGHT"};
|
"Joystick UP","Joystick DOWN","Joystick LEFT","Joystick RIGHT"};
|
||||||
const char DI_tabkeytext[50][20];
|
|
||||||
|
|
||||||
DWORD dds_up=37;
|
DWORD dds_up=37;
|
||||||
DWORD dds_down=38;
|
DWORD dds_down=38;
|
||||||
|
@ -349,11 +347,11 @@ HRESULT Input_Init(HWND hwnd)
|
||||||
ReadConfig();
|
ReadConfig();
|
||||||
g_pKeyboard=NULL; g_pJoystick=NULL;
|
g_pKeyboard=NULL; g_pJoystick=NULL;
|
||||||
|
|
||||||
if(!FAILED(DirectInput8Create(GetModuleHandle(NULL),DIRECTINPUT_VERSION,&IID_IDirectInput8,(void**)&g_pDI,NULL)))
|
if(!FAILED(DirectInput8Create(GetModuleHandle(NULL),DIRECTINPUT_VERSION,IID_IDirectInput8,(void**)&g_pDI,NULL)))
|
||||||
{
|
{
|
||||||
//******************* Keyboard
|
//******************* Keyboard
|
||||||
res=0;
|
res=0;
|
||||||
if (FAILED(IDirectInput8_CreateDevice(g_pDI,&GUID_SysKeyboard,&g_pKeyboard,NULL))) res=-1;
|
if (FAILED(IDirectInput8_CreateDevice(g_pDI,GUID_SysKeyboard,&g_pKeyboard,NULL))) res=-1;
|
||||||
else
|
else
|
||||||
if (FAILED(IDirectInputDevice8_SetDataFormat(g_pKeyboard,&c_dfDIKeyboard))) res=-1;
|
if (FAILED(IDirectInputDevice8_SetDataFormat(g_pKeyboard,&c_dfDIKeyboard))) res=-1;
|
||||||
else
|
else
|
||||||
|
@ -366,7 +364,7 @@ HRESULT Input_Init(HWND hwnd)
|
||||||
|
|
||||||
//******************** Joystick
|
//******************** Joystick
|
||||||
res=0;
|
res=0;
|
||||||
if(FAILED(IDirectInput8_CreateDevice(g_pDI,&GUID_Joystick,&g_pJoystick,NULL))) res=-1;
|
if(FAILED(IDirectInput8_CreateDevice(g_pDI,GUID_Joystick,&g_pJoystick,NULL))) res=-1;
|
||||||
else
|
else
|
||||||
if(FAILED(IDirectInputDevice8_SetDataFormat(g_pJoystick,&c_dfDIJoystick2))) res=-1;
|
if(FAILED(IDirectInputDevice8_SetDataFormat(g_pJoystick,&c_dfDIJoystick2))) res=-1;
|
||||||
else
|
else
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
#define DIRECTINPUT_VERSION 0x0800
|
#define DIRECTINPUT_VERSION 0x0800
|
||||||
#include <dinput.h>
|
#include <dinput.h>
|
||||||
|
|
||||||
extern unsigned long keytab[12];
|
|
||||||
extern const DWORD tabkey[48];
|
extern const DWORD tabkey[48];
|
||||||
extern DWORD ds_up;
|
extern DWORD ds_up;
|
||||||
extern DWORD ds_down;
|
extern DWORD ds_down;
|
||||||
|
@ -52,5 +51,6 @@ HRESULT Input_DeInit (void);
|
||||||
void Input_Process (void);
|
void Input_Process (void);
|
||||||
|
|
||||||
BOOL CALLBACK ConfigView_Proc(HWND dialog,UINT komunikat,WPARAM wparam,LPARAM lparam);
|
BOOL CALLBACK ConfigView_Proc(HWND dialog,UINT komunikat,WPARAM wparam,LPARAM lparam);
|
||||||
|
void WritePrivateProfileInt(char* appname, char* keyname, int val, char* file);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
EnableEnhancedInstructionSet="0"
|
EnableEnhancedInstructionSet="0"
|
||||||
DebugInformationFormat="4"
|
DebugInformationFormat="4"
|
||||||
CallingConvention="0"
|
CallingConvention="0"
|
||||||
CompileAs="1"
|
CompileAs="0"
|
||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCManagedResourceCompilerTool"
|
Name="VCManagedResourceCompilerTool"
|
||||||
|
|
|
@ -34,8 +34,7 @@
|
||||||
#include "../debug.h"
|
#include "../debug.h"
|
||||||
#include "../NDSSystem.h"
|
#include "../NDSSystem.h"
|
||||||
|
|
||||||
char IniName[MAX_PATH];
|
static char IniName[MAX_PATH];
|
||||||
u32 keytab[12];
|
|
||||||
|
|
||||||
static char nickname_buffer[11];
|
static char nickname_buffer[11];
|
||||||
static char message_buffer[27];
|
static char message_buffer[27];
|
||||||
|
|
|
@ -33,16 +33,19 @@
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <gl/gl.h>
|
#include <gl/gl.h>
|
||||||
#include <gl/glext.h>
|
#include <gl/glext.h>
|
||||||
|
#include "console.h"
|
||||||
#else
|
#else
|
||||||
#define __forceinline
|
#define __forceinline
|
||||||
#include <OpenGL/gl.h>
|
#include <OpenGL/gl.h>
|
||||||
#include <OpenGL/glext.h>
|
#include <OpenGL/glext.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "../types.h"
|
||||||
#include "../debug.h"
|
#include "../debug.h"
|
||||||
#include "../MMU.h"
|
#include "../MMU.h"
|
||||||
#include "../bits.h"
|
#include "../bits.h"
|
||||||
#include "../matrix.h"
|
#include "../matrix.h"
|
||||||
|
#include "../NDSSystem.h"
|
||||||
#include "OGLRender.h"
|
#include "OGLRender.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -284,7 +287,9 @@ static void NDS_3D_UpdateToonTable(void* toonTable) {
|
||||||
#define INITOGLEXT(x,y) y = (x)wglGetProcAddress(#y);
|
#define INITOGLEXT(x,y) y = (x)wglGetProcAddress(#y);
|
||||||
|
|
||||||
OGLEXT(PFNGLCREATESHADERPROC,glCreateShader)
|
OGLEXT(PFNGLCREATESHADERPROC,glCreateShader)
|
||||||
OGLEXT(PFNGLGETSHADERSOURCEPROC,glShaderSource)
|
//zero: i dont understand this at all. my glext.h has the wrong thing declared here... so I have to do it myself
|
||||||
|
typedef void (APIENTRYP X_PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLchar **source, GLsizei *length);
|
||||||
|
OGLEXT(X_PFNGLGETSHADERSOURCEPROC,glShaderSource)
|
||||||
OGLEXT(PFNGLCOMPILESHADERPROC,glCompileShader)
|
OGLEXT(PFNGLCOMPILESHADERPROC,glCompileShader)
|
||||||
OGLEXT(PFNGLCREATEPROGRAMPROC,glCreateProgram)
|
OGLEXT(PFNGLCREATEPROGRAMPROC,glCreateProgram)
|
||||||
OGLEXT(PFNGLATTACHSHADERPROC,glAttachShader)
|
OGLEXT(PFNGLATTACHSHADERPROC,glAttachShader)
|
||||||
|
@ -390,7 +395,7 @@ char NDS_glInit(void)
|
||||||
MatrixInit (mtxTemporal);
|
MatrixInit (mtxTemporal);
|
||||||
|
|
||||||
INITOGLEXT(PFNGLCREATESHADERPROC,glCreateShader)
|
INITOGLEXT(PFNGLCREATESHADERPROC,glCreateShader)
|
||||||
INITOGLEXT(PFNGLGETSHADERSOURCEPROC,glShaderSource)
|
INITOGLEXT(X_PFNGLGETSHADERSOURCEPROC,glShaderSource)
|
||||||
INITOGLEXT(PFNGLCOMPILESHADERPROC,glCompileShader)
|
INITOGLEXT(PFNGLCOMPILESHADERPROC,glCompileShader)
|
||||||
INITOGLEXT(PFNGLCREATEPROGRAMPROC,glCreateProgram)
|
INITOGLEXT(PFNGLCREATEPROGRAMPROC,glCreateProgram)
|
||||||
INITOGLEXT(PFNGLATTACHSHADERPROC,glAttachShader)
|
INITOGLEXT(PFNGLATTACHSHADERPROC,glAttachShader)
|
||||||
|
@ -401,7 +406,7 @@ char NDS_glInit(void)
|
||||||
if(glCreateShader && glShaderSource && glCompileShader && glCreateProgram && glAttachShader && glLinkProgram && glUseProgram && glGetShaderInfoLog)
|
if(glCreateShader && glShaderSource && glCompileShader && glCreateProgram && glAttachShader && glLinkProgram && glUseProgram && glGetShaderInfoLog)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
glGenTextures (MAX_TEXTURE, &oglToonTableTextureID);
|
glGenTextures (1, &oglToonTableTextureID);
|
||||||
glBindTexture(GL_TEXTURE_1D,oglToonTableTextureID);
|
glBindTexture(GL_TEXTURE_1D,oglToonTableTextureID);
|
||||||
glTexParameterf(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
glTexParameterf(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||||
glTexParameterf(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
glTexParameterf(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||||
|
@ -410,8 +415,8 @@ char NDS_glInit(void)
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
char buf[10000];
|
char buf[10000];
|
||||||
const char* toonShaderSource[] = {
|
const char* toonShaderSource[] = {"\
|
||||||
"uniform sampler2D tex2; \
|
uniform sampler2D tex2; \
|
||||||
uniform sampler1D tex1; \
|
uniform sampler1D tex1; \
|
||||||
void main() {\
|
void main() {\
|
||||||
gl_FragColor = gl_Color; \
|
gl_FragColor = gl_Color; \
|
||||||
|
@ -424,8 +429,7 @@ char NDS_glInit(void)
|
||||||
|
|
||||||
toonShader = glCreateShader(GL_FRAGMENT_SHADER);
|
toonShader = glCreateShader(GL_FRAGMENT_SHADER);
|
||||||
toonProgram = glCreateProgram();
|
toonProgram = glCreateProgram();
|
||||||
|
glShaderSource(toonShader, 1, (GLchar**)toonShaderSource, 0);
|
||||||
glShaderSource(toonShader, 1, toonShaderSource, 0);
|
|
||||||
glCompileShader(toonShader);
|
glCompileShader(toonShader);
|
||||||
glGetShaderInfoLog(toonShader,10000,0,buf);
|
glGetShaderInfoLog(toonShader,10000,0,buf);
|
||||||
|
|
||||||
|
@ -695,17 +699,15 @@ __forceinline void NDS_glMultMatrix4x4(signed long v)
|
||||||
// txt_slot_size=txt_slot_current_size=0x020000;\
|
// txt_slot_size=txt_slot_current_size=0x020000;\
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
//zero 9/7/08 - changed *adr= to adr= while changing from c++. was that a bug?
|
||||||
#define CHECKSLOT txt_slot_current_size--;\
|
#define CHECKSLOT txt_slot_current_size--;\
|
||||||
if (txt_slot_current_size<=0)\
|
if (txt_slot_current_size<=0)\
|
||||||
{\
|
{\
|
||||||
txt_slot_current++;\
|
txt_slot_current++;\
|
||||||
*adr=(unsigned char *)ARM9Mem.textureSlotAddr[txt_slot_current];\
|
adr=(unsigned char *)ARM9Mem.textureSlotAddr[txt_slot_current];\
|
||||||
txt_slot_size=txt_slot_current_size=0x020000;\
|
txt_slot_size=txt_slot_current_size=0x020000;\
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//todo - make all color conversions go through a properly spread table!!
|
//todo - make all color conversions go through a properly spread table!!
|
||||||
|
|
||||||
__forceinline void* memcpy_fast(void* dest, const void* src, size_t count)
|
__forceinline void* memcpy_fast(void* dest, const void* src, size_t count)
|
||||||
|
@ -762,7 +764,6 @@ __forceinline void* memcpy_fast(void* dest, const void* src, size_t count)
|
||||||
|
|
||||||
static void DebugDumpTexture(int which)
|
static void DebugDumpTexture(int which)
|
||||||
{
|
{
|
||||||
int NDS_WriteBMP_32bppBuffer(int width, int height, const void* buf, const char *filename);
|
|
||||||
static int ctr = 0;
|
static int ctr = 0;
|
||||||
char fname[100];
|
char fname[100];
|
||||||
FILE* outf;
|
FILE* outf;
|
||||||
|
@ -777,8 +778,6 @@ static void DebugDumpTexture(int which)
|
||||||
texMAP);
|
texMAP);
|
||||||
|
|
||||||
NDS_WriteBMP_32bppBuffer(texcache[which].sizeX,texcache[which].sizeY,texMAP,fname);
|
NDS_WriteBMP_32bppBuffer(texcache[which].sizeX,texcache[which].sizeY,texMAP,fname);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
@ -971,9 +970,9 @@ __forceinline void setTexture(unsigned int format, unsigned int texpal)
|
||||||
unsigned int * dst = (unsigned int *)texMAP;
|
unsigned int * dst = (unsigned int *)texMAP;
|
||||||
if ( (texcache[i].frm & 0xc000) == 0x8000)
|
if ( (texcache[i].frm & 0xc000) == 0x8000)
|
||||||
// texel are in slot 2
|
// texel are in slot 2
|
||||||
slot1=(const unsigned short*)&ARM9Mem.textureSlotAddr[1][((texcache[i].frm&0x3FFF)<<2)+0x010000];
|
slot1=(unsigned short*)&ARM9Mem.textureSlotAddr[1][((texcache[i].frm&0x3FFF)<<2)+0x010000];
|
||||||
else
|
else
|
||||||
slot1=(const unsigned short*)&ARM9Mem.textureSlotAddr[1][(texcache[i].frm&0x3FFF)<<2];
|
slot1=(unsigned short*)&ARM9Mem.textureSlotAddr[1][(texcache[i].frm&0x3FFF)<<2];
|
||||||
|
|
||||||
for (y = 0; y < (texcache[i].sizeY>>2); y ++)
|
for (y = 0; y < (texcache[i].sizeY>>2); y ++)
|
||||||
{
|
{
|
||||||
|
@ -1048,7 +1047,8 @@ __forceinline void setTexture(unsigned int format, unsigned int texpal)
|
||||||
if (txt_slot_current_size<=0)
|
if (txt_slot_current_size<=0)
|
||||||
{
|
{
|
||||||
txt_slot_current++;
|
txt_slot_current++;
|
||||||
*map=(unsigned char *)ARM9Mem.textureSlotAddr[txt_slot_current];
|
//zero 9/7/08 - changed *adr= to adr= while changing from c++. was that a bug?
|
||||||
|
map=(unsigned int*)ARM9Mem.textureSlotAddr[txt_slot_current];
|
||||||
//map-=txt_slot_size>>2; //zero 8/25/08 - I dont understand this. it broke my game.
|
//map-=txt_slot_size>>2; //zero 8/25/08 - I dont understand this. it broke my game.
|
||||||
txt_slot_size=txt_slot_current_size=0x020000;
|
txt_slot_size=txt_slot_current_size=0x020000;
|
||||||
}
|
}
|
||||||
|
@ -1092,7 +1092,8 @@ __forceinline void setTexture(unsigned int format, unsigned int texpal)
|
||||||
if (txt_slot_current_size<=0)
|
if (txt_slot_current_size<=0)
|
||||||
{
|
{
|
||||||
txt_slot_current++;
|
txt_slot_current++;
|
||||||
*map=(unsigned char *)ARM9Mem.textureSlotAddr[txt_slot_current];
|
//zero 9/7/08 - changed *adr= to adr= while changing from c++. was that a bug?
|
||||||
|
map=(unsigned short *)ARM9Mem.textureSlotAddr[txt_slot_current];
|
||||||
map-=txt_slot_size>>1;
|
map-=txt_slot_size>>1;
|
||||||
txt_slot_size=txt_slot_current_size=0x020000;
|
txt_slot_size=txt_slot_current_size=0x020000;
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@ LRESULT CALLBACK ColorCtrl_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
|
||||||
LRESULT ColorCtrl_OnNCCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
LRESULT ColorCtrl_OnNCCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
// Allocate a new CustCtrl structure for this window.
|
// Allocate a new CustCtrl structure for this window.
|
||||||
ColorCtrl* pCtrl = malloc(sizeof(ColorCtrl));
|
ColorCtrl* pCtrl = (ColorCtrl*)malloc(sizeof(ColorCtrl));
|
||||||
|
|
||||||
// Failed to allocate, stop window creation.
|
// Failed to allocate, stop window creation.
|
||||||
if(pCtrl == NULL)
|
if(pCtrl == NULL)
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#ifdef BETA_VERSION
|
#ifdef BETA_VERSION
|
||||||
#define BUFFER_SIZE 100
|
#define BUFFER_SIZE 100
|
||||||
HANDLE hConsole;
|
HANDLE hConsole;
|
||||||
void printlog(char *fmt, ...);
|
void printlog(const char *fmt, ...);
|
||||||
|
|
||||||
void OpenConsole()
|
void OpenConsole()
|
||||||
{
|
{
|
||||||
|
@ -64,7 +64,7 @@ void CloseConsole() {
|
||||||
hConsole = NULL;
|
hConsole = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void printlog(char *fmt, ...)
|
void printlog(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list list;
|
va_list list;
|
||||||
char msg[512];
|
char msg[512];
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#ifdef BETA_VERSION
|
#ifdef BETA_VERSION
|
||||||
void OpenConsole();
|
void OpenConsole();
|
||||||
void CloseConsole();
|
void CloseConsole();
|
||||||
void printlog(LPCTSTR *fmt, ...);
|
void printlog(const char *fmt, ...);
|
||||||
#else
|
#else
|
||||||
#define OpenConsole()
|
#define OpenConsole()
|
||||||
#define CloseConsole()
|
#define CloseConsole()
|
||||||
|
|
|
@ -116,6 +116,7 @@ int sndcoretype=SNDCORE_DIRECTX;
|
||||||
int sndbuffersize=735*4;
|
int sndbuffersize=735*4;
|
||||||
int sndvolume=100;
|
int sndvolume=100;
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
SoundInterface_struct *SNDCoreList[] = {
|
SoundInterface_struct *SNDCoreList[] = {
|
||||||
&SNDDummy,
|
&SNDDummy,
|
||||||
&SNDFile,
|
&SNDFile,
|
||||||
|
@ -127,6 +128,7 @@ GPU3DInterface *core3DList[] = {
|
||||||
&gpu3DNull,
|
&gpu3DNull,
|
||||||
&gpu3Dgl,
|
&gpu3Dgl,
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
int autoframeskipenab=1;
|
int autoframeskipenab=1;
|
||||||
int frameskiprate=0;
|
int frameskiprate=0;
|
||||||
|
@ -390,7 +392,7 @@ DWORD WINAPI run( LPVOID lpParameter)
|
||||||
|
|
||||||
DDCAPS hw_caps, sw_caps;
|
DDCAPS hw_caps, sw_caps;
|
||||||
|
|
||||||
if (DirectDrawCreateEx(NULL, &lpDDraw, &IID_IDirectDraw7, NULL) != DD_OK)
|
if (DirectDrawCreateEx(NULL, (LPVOID*)&lpDDraw, IID_IDirectDraw7, NULL) != DD_OK)
|
||||||
{
|
{
|
||||||
MessageBox(hwnd,"Unable to initialize DirectDraw","Error",MB_OK);
|
MessageBox(hwnd,"Unable to initialize DirectDraw","Error",MB_OK);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -510,7 +512,7 @@ DWORD WINAPI run( LPVOID lpParameter)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
printlog("16bit depth color not supported");
|
printlog("16bit depth color not supported");
|
||||||
IDirectDrawSurface7_Unlock(lpBackSurface,ddsd.lpSurface);
|
IDirectDrawSurface7_Unlock(lpBackSurface,(LPRECT)ddsd.lpSurface);
|
||||||
|
|
||||||
if (IDirectDrawSurface7_Blt(lpPrimarySurface,&MainWindowRect,lpBackSurface,0, DDBLT_WAIT,0)==DDERR_SURFACELOST)
|
if (IDirectDrawSurface7_Blt(lpPrimarySurface,&MainWindowRect,lpBackSurface,0, DDBLT_WAIT,0)==DDERR_SURFACELOST)
|
||||||
{
|
{
|
||||||
|
@ -1411,7 +1413,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||||
{
|
{
|
||||||
cwindow_struct *IoregView;
|
cwindow_struct *IoregView;
|
||||||
|
|
||||||
if ((IoregView = malloc(sizeof(cwindow_struct))) == NULL)
|
if ((IoregView = (cwindow_struct*)malloc(sizeof(cwindow_struct))) == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (CWindow_Init2(IoregView, hAppInst, HWND_DESKTOP, "IO REG VIEW", IDD_IO_REG, IoregView_Proc) == 0)
|
if (CWindow_Init2(IoregView, hAppInst, HWND_DESKTOP, "IO REG VIEW", IDD_IO_REG, IoregView_Proc) == 0)
|
||||||
|
@ -1818,7 +1820,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
||||||
LRESULT CALLBACK SoundSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam,
|
LRESULT CALLBACK SoundSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam,
|
||||||
LPARAM lParam)
|
LPARAM lParam)
|
||||||
{
|
{
|
||||||
static timerid=0;
|
static int timerid=0;
|
||||||
switch (uMsg)
|
switch (uMsg)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
#include <dsound.h>
|
#include <dsound.h>
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
// I have to do this because for some reason because the dxerr8.h header is fubared
|
// I have to do this because for some reason because the dxerr8.h header is fubared
|
||||||
|
|
Loading…
Reference in New Issue