- Patch #1806966 by "Acid Burn"

This commit is contained in:
shashclp 2007-10-28 17:01:41 +00:00
parent 0bf9d1e413
commit 446f959787
15 changed files with 1271 additions and 92 deletions

View File

@ -29,6 +29,8 @@ void NDS_nullFunc6 (unsigned int one, unsigned int two, unsigned int v){}
int NDS_nullFunc7 (void) {return 0;}
long NDS_nullFunc8 (unsigned int index){ return 0; }
void NDS_nullFunc9 (int line, unsigned short * DST) { };
void NDS_nullFunc10 (unsigned int mode, unsigned int index, float* dest) {}; // NDS_3D_GetMatrix
void NDS_nullFunc11 (unsigned int index, unsigned int* dest) {}; // NDS_glGetLightDirection
GPU3DInterface gpu3DNull = { NDS_nullFunc1,
NDS_nullFunc3,
@ -76,7 +78,12 @@ GPU3DInterface gpu3DNull = { NDS_nullFunc1,
NDS_nullFunc8,
NDS_nullFunc8,
NDS_nullFunc9 };
NDS_nullFunc9,
NDS_nullFunc10, // NDS_3D_GetMatrix
NDS_nullFunc11, // NDS_glGetLightDirection
NDS_nullFunc11, // NDS_glGetLightColor
};
GPU3DInterface *gpu3D = &gpu3DNull;

View File

@ -84,6 +84,40 @@ typedef struct GPU3DInterface
long (CALL_CONVENTION* NDS_3D_GetClipMatrix) (unsigned int index);
long (CALL_CONVENTION* NDS_3D_GetDirectionalMatrix) (unsigned int index);
void (CALL_CONVENTION* NDS_3D_GetLine) (int line, unsigned short * DST);
//////////////////////////////////////////////////////////////////////////////
// NDS_3D_GetMatrix
//
// mode: 0 = projection
// 1 = coordinate
// 2 = direction
// 3 = texture
//
// index: the matrix stack index or -1 for current
//
// dest: pointer to the destination float[16] buffer
//////////////////////////////////////////////////////////////////////////////
void (CALL_CONVENTION* NDS_3D_GetMatrix) (unsigned int mode, unsigned int index, float* dest);
//////////////////////////////////////////////////////////////////////////////
// NDS_glGetLightDirection
//
// index: light index
//
// dest: pointer to the destination variable
//////////////////////////////////////////////////////////////////////////////
void (CALL_CONVENTION* NDS_glGetLightDirection) (unsigned int index, unsigned int* dest);
//////////////////////////////////////////////////////////////////////////////
// NDS_glGetLightColor
//
// index: light index
//
// dest: pointer to the destination variable
//////////////////////////////////////////////////////////////////////////////
void (CALL_CONVENTION* NDS_glGetLightColor) (unsigned int index, unsigned int* dest);
} GPU3DInterface;
// gpu 3D core list, per port

View File

@ -97,6 +97,8 @@ int CWindow_Init(void *win, HINSTANCE hInst, const char * cname, const char * ti
int CWindow_Init2(void *win, HINSTANCE hInst, HWND parent, char * title, int ID, DLGPROC wP)
{
HMENU hSystemMenu;
cwindow_struct *win2=(cwindow_struct *)win;
win2->autoup = FALSE;
@ -107,6 +109,14 @@ int CWindow_Init2(void *win, HINSTANCE hInst, HWND parent, char * title, int ID,
win2->next = NULL;
win2->Refresh = &CWindow_Refresh;
// Append the "Auto Update" to the System Menu
hSystemMenu = GetSystemMenu(win2->hwnd, FALSE);
if(hSystemMenu != 0)
{
AppendMenu(hSystemMenu, MF_MENUBREAK, 0, NULL);
AppendMenu(hSystemMenu, MF_ENABLED|MF_STRING, IDC_AUTO_UPDATE, "Auto Update");
}
return 0;
}
@ -133,6 +143,26 @@ void CWindow_Refresh(void *win)
//////////////////////////////////////////////////////////////////////////////
void CWindow_UpdateAutoUpdateItem(cwindow_struct *win, int check)
{
HMENU hSystemMenu;
// Update the "auto update" menu item
hSystemMenu = GetSystemMenu(win->hwnd, FALSE);
if(hSystemMenu != 0)
{
const int checkState[] =
{
MF_UNCHECKED,
MF_CHECKED
};
CheckMenuItem(hSystemMenu, IDC_AUTO_UPDATE, checkState[check]);
}
}
//////////////////////////////////////////////////////////////////////////////
void CWindow_AddToRefreshList(void *win)
{
cwindow_struct *win2=(cwindow_struct *)win;
@ -144,6 +174,8 @@ void CWindow_AddToRefreshList(void *win)
updatewindowlist->prev = win;
updatewindowlist = (cwindow_struct *)win;
LeaveCriticalSection(&section);
CWindow_UpdateAutoUpdateItem(win, TRUE);
}
//////////////////////////////////////////////////////////////////////////////
@ -167,7 +199,30 @@ void CWindow_RemoveFromRefreshList(void *win)
win2->next = NULL;
win2->prev = NULL;
LeaveCriticalSection(&section);
CWindow_UpdateAutoUpdateItem(win, FALSE);
}
//////////////////////////////////////////////////////////////////////////////
int CWindow_ToggleAutoUpdate(void *win)
{
cwindow_struct *win2=(cwindow_struct *)win;
// remove window from refresh list
if(win2->autoup)
CWindow_RemoveFromRefreshList(win);
// toggle autoup variable
win2->autoup = !win2->autoup;
// add window to refresg list if autoupdate is desired
if(win2->autoup)
CWindow_AddToRefreshList(win);
// checks or unchecks the auto update item in the system menu
CWindow_UpdateAutoUpdateItem(win, win2->autoup);
return win2->autoup;
}

View File

@ -45,6 +45,7 @@ void CWindow_Hide(void *win);
void CWindow_Refresh(void *win);
void CWindow_AddToRefreshList(void *win);
void CWindow_RemoveFromRefreshList(void *win);
int CWindow_ToggleAutoUpdate(void *win);
extern cwindow_struct *updatewindowlist;

View File

@ -116,6 +116,14 @@ static unsigned int vtxFormat;
static unsigned int textureFormat=0, texturePalette=0;
static unsigned int lastTextureFormat=0, lastTexturePalette=0;
typedef struct
{
unsigned int color; // Color in hardware format
unsigned int direction; // Direction in hardware format
} LightInformation;
LightInformation g_lightInfo[4] = { 0 };
#ifndef DESMUME_COCOA
extern HWND hwnd;
#endif
@ -1247,22 +1255,28 @@ signed long NDS_glGetDirectionalMatrix (unsigned int index)
void NDS_glLightDirection (unsigned long v)
{
float lightDirection[4] = {0};
lightDirection[0] = -normalTable[v&1023];
lightDirection[1] = -normalTable[(v>>10)&1023];
lightDirection[2] = -normalTable[(v>>20)&1023];
int index = v>>30;
float direction[4];
if (beginCalled)
{
glEnd();
}
glLightfv (GL_LIGHT0 + (v>>30), GL_POSITION, lightDirection);
// Convert format into floating point value
// and pass it to OpenGL
direction[0] = -normalTable[v&1023];
direction[1] = -normalTable[(v>>10)&1023];
direction[2] = -normalTable[(v>>20)&1023];
direction[3] = 0;
// glLightf (GL_LIGHT0 + index, GL_CONSTANT_ATTENUATION, 0);
glLightfv(GL_LIGHT0 + index, GL_POSITION, direction);
if (beginCalled)
{
glBegin (vtxFormat);
}
// Keep information for GetLightDirection function
g_lightInfo[index].direction = v;
}
void NDS_glLightColor (unsigned long v)
@ -1271,20 +1285,19 @@ void NDS_glLightColor (unsigned long v)
((v>> 5)&0x1F)<<26,
((v>>10)&0x1F)<<26,
0x7fffffff};
int index = v>>30;
if (beginCalled)
{
glEnd();
}
glLightiv (GL_LIGHT0 + (v>>30), GL_AMBIENT, lightColor);
glLightiv (GL_LIGHT0 + (v>>30), GL_DIFFUSE, lightColor);
glLightiv (GL_LIGHT0 + (v>>30), GL_SPECULAR, lightColor);
glLightiv(GL_LIGHT0 + index, GL_AMBIENT_AND_DIFFUSE, lightColor);
glLightiv(GL_LIGHT0 + index, GL_SPECULAR, lightColor);
if (beginCalled)
{
glBegin (vtxFormat);
}
// Keep color information for NDS_glGetColor
g_lightInfo[index].color = v;
}
void NDS_glAlphaFunc(unsigned long v)
@ -1753,6 +1766,28 @@ void NDS_glCallList(unsigned long v)
}
}
void NDS_glGetMatrix(unsigned int mode, unsigned int index, float* dest)
{
int n;
if(index == -1)
{
MatrixCopy(dest, mtxCurrent[mode]);
return;
}
MatrixCopy(dest, MatrixStackGetPos(&mtxStack[mode], index));
}
void NDS_glGetLightDirection(unsigned int index, unsigned int* dest)
{
*dest = g_lightInfo[index].direction;
}
void NDS_glGetLightColor(unsigned int index, unsigned int* dest)
{
*dest = g_lightInfo[index].color;
}
GPU3DInterface gpu3Dgl = { NDS_glInit,
NDS_glViewPort,
@ -1800,5 +1835,10 @@ GPU3DInterface gpu3Dgl = { NDS_glInit,
NDS_glGetClipMatrix,
NDS_glGetDirectionalMatrix,
NDS_glGetLine};
NDS_glGetLine,
NDS_glGetMatrix,
NDS_glGetLightDirection,
NDS_glGetLightColor
};

View File

@ -0,0 +1,12 @@
#ifndef COLORCONV_H
#define COLORCONV_H
// Convert B5G5R5 color format into R8G8B8 color format
unsigned int ColorConv_B5R5R5ToR8G8B8(const unsigned int color)
{
return (((color&31)<<16)<<3) | // red
((((color>>5)&31)<<8)<<3) | // green
(((color>>10)&31)<<3); // blue
}
#endif // COLORCONV_H

View File

@ -0,0 +1,138 @@
#include <windows.h>
#include <stdio.h>
#include "colorctrl.h"
static char szClassName[] = "DeSmuME_ColorCtrl";
LRESULT CALLBACK ColorCtrl_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
LRESULT ColorCtrl_OnPaint(ColorCtrl *ccp, WPARAM wParam, LPARAM lParam);
LRESULT ColorCtrl_OnNCCreate(HWND hWnd, WPARAM wParam, LPARAM lParam);
LRESULT ColorCtrl_OnNCDestroy(ColorCtrl *ccp, WPARAM wParam, LPARAM lParam);
static ColorCtrl* ColorCtrl_Get(HWND hWnd)
{
return (ColorCtrl*)GetWindowLong(hWnd, 0);
}
void ColorCtrl_Register()
{
WNDCLASSEX wc;
wc.cbSize = sizeof(wc);
wc.lpszClassName = szClassName;
wc.hInstance = GetModuleHandle(0);
wc.lpfnWndProc = ColorCtrl_WndProc;
wc.hCursor = LoadCursor (NULL, IDC_ARROW);
wc.hIcon = 0;
wc.lpszMenuName = 0;
wc.hbrBackground = (HBRUSH)GetSysColorBrush(COLOR_BTNFACE);
wc.style = 0;
wc.cbClsExtra = 0;
wc.cbWndExtra = sizeof(ColorCtrl*);
wc.hIconSm = 0;
RegisterClassEx(&wc);
}
HWND ColorCtrl_Create(HWND hParent)
{
HWND hwndCtrl;
hwndCtrl = CreateWindowEx(
WS_EX_CLIENTEDGE, // give it a standard border
szClassName,
NULL,
WS_VISIBLE | WS_CHILD,
0, 0, 16, 16,
hParent,
NULL, GetModuleHandle(0), NULL
);
return hwndCtrl;
}
LRESULT CALLBACK ColorCtrl_WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
ColorCtrl *pCtrl = ColorCtrl_Get(hwnd);
switch(msg)
{
case WM_NCCREATE:
return ColorCtrl_OnNCCreate(hwnd, wParam, lParam);
case WM_NCDESTROY:
ColorCtrl_OnNCDestroy(pCtrl, wParam, lParam);
break;
case WM_PAINT:
return ColorCtrl_OnPaint(pCtrl, wParam, lParam);
case WM_ERASEBKGND:
return 1;
default:
break;
}
return DefWindowProc(hwnd, msg, wParam, lParam);
}
LRESULT ColorCtrl_OnNCCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
{
// Allocate a new CustCtrl structure for this window.
ColorCtrl* pCtrl = malloc(sizeof(ColorCtrl));
// Failed to allocate, stop window creation.
if(pCtrl == NULL)
return FALSE;
// Initialize the CustCtrl structure.
pCtrl->hWnd = hWnd;
pCtrl->color = 0;
// Attach custom structure to this window.
SetWindowLong(hWnd, 0, (LONG)pCtrl);
// Continue with window creation.
return TRUE;
}
LRESULT ColorCtrl_OnNCDestroy(ColorCtrl *pCtrl, WPARAM wParam, LPARAM lParam)
{
free(pCtrl);
return TRUE;
}
LRESULT ColorCtrl_OnPaint(ColorCtrl *pCtrl, WPARAM wParam, LPARAM lParam)
{
HDC hdc;
PAINTSTRUCT ps;
RECT rect;
HBRUSH brush;
// Get a device context for this window
hdc = BeginPaint(pCtrl->hWnd, &ps);
// Work out where to draw
GetClientRect(pCtrl->hWnd, &rect);
// Create brush and fill
brush = CreateSolidBrush(pCtrl->color);
FillRect(hdc, &rect, brush);
// Release the device context
EndPaint(pCtrl->hWnd, &ps);
// free brush again
DeleteObject(brush);
return 0;
}
void ColorCtrl_SetColor(HWND hWnd, COLORREF color)
{
ColorCtrl *pCtrl = ColorCtrl_Get(hWnd);
pCtrl->color = color;
InvalidateRect(hWnd, NULL, FALSE);
}

View File

@ -0,0 +1,14 @@
#ifndef COLORCTRL_H
#define COLORCTRL_H
typedef struct
{
HWND hWnd;
COLORREF color;
} ColorCtrl;
void ColorCtrl_Register();
HWND ColorCtrl_Create(HWND hParent);
void ColorCtrl_SetColor(HWND hWnd, COLORREF color);
#endif // COLORCTRL_H

View File

@ -0,0 +1,181 @@
/* Copyright (C) 2007 Acid Burn
This file is part of DeSmuME
DeSmuME is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
DeSmuME is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with DeSmuME; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <windows.h>
#include <stdio.h>
#include "lightView.h"
#include "resource.h"
#include "matrix.h"
#include "render3d.h"
#include "armcpu.h"
#include "colorctrl.h"
#include "colorconv.h"
//////////////////////////////////////////////////////////////////////////////
BOOL LightView_OnInitDialog(HWND hwnd)
{
return TRUE;
}
//////////////////////////////////////////////////////////////////////////////
BOOL LightView_OnClose(lightview_struct* win)
{
win->window.autoup = FALSE;
CWindow_RemoveFromRefreshList(win);
LightView_Deinit(win);
EndDialog(win->window.hwnd, 0);
return TRUE;
}
//////////////////////////////////////////////////////////////////////////////
void LightView_OnPaintLight(lightview_struct* win, int index)
{
const int idcDir[4] =
{
IDC_LIGHT_VIEWER_LIGHT0VECTOR_EDIT, IDC_LIGHT_VIEWER_LIGHT1VECTOR_EDIT,
IDC_LIGHT_VIEWER_LIGHT2VECTOR_EDIT, IDC_LIGHT_VIEWER_LIGHT3VECTOR_EDIT
};
const int idcColorEdit[4] =
{
IDC_LIGHT_VIEWER_LIGHT0COLOR_EDIT, IDC_LIGHT_VIEWER_LIGHT1COLOR_EDIT,
IDC_LIGHT_VIEWER_LIGHT2COLOR_EDIT, IDC_LIGHT_VIEWER_LIGHT3COLOR_EDIT
};
const int idcColorCtrl[4] =
{
IDC_LIGHT_VIEWER_LIGHT0COLOR_COLORCTRL, IDC_LIGHT_VIEWER_LIGHT1COLOR_COLORCTRL,
IDC_LIGHT_VIEWER_LIGHT2COLOR_COLORCTRL, IDC_LIGHT_VIEWER_LIGHT3COLOR_COLORCTRL
};
unsigned int color;
unsigned int direction;
ColorCtrl* colorCtrl;
char buffer[128];
// Get necessary information from render module
gpu3D->NDS_glGetLightColor(index, &color);
gpu3D->NDS_glGetLightDirection(index, &direction);
// Print Light Direction
sprintf(buffer, "%.8x", direction);
SetWindowText(GetDlgItem(win->window.hwnd, idcDir[index]), buffer);
// Print Light Color
sprintf(buffer, "%.4x", color);
SetWindowText(GetDlgItem(win->window.hwnd, idcColorEdit[index]), buffer);
// Set Light Color in ColorDisplay component
ColorCtrl_SetColor(GetDlgItem(win->window.hwnd, idcColorCtrl[index]), ColorConv_B5R5R5ToR8G8B8(color));
}
//////////////////////////////////////////////////////////////////////////////
BOOL LightView_OnPaint(lightview_struct* win, HWND hwnd, WPARAM wParam, LPARAM lParam)
{
HDC hdc;
PAINTSTRUCT ps;
hdc = BeginPaint(hwnd, &ps);
LightView_OnPaintLight(win, 0);
LightView_OnPaintLight(win, 1);
LightView_OnPaintLight(win, 2);
LightView_OnPaintLight(win, 3);
EndPaint(hwnd, &ps);
return TRUE;
}
//////////////////////////////////////////////////////////////////////////////
BOOL CALLBACK LightView_Proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
lightview_struct *win = (lightview_struct *)GetWindowLong(hwnd, DWL_USER);
switch (message)
{
case WM_INITDIALOG:
LightView_OnInitDialog(hwnd);
break;
case WM_CLOSE:
LightView_OnClose(win);
break;
case WM_PAINT:
LightView_OnPaint(win, hwnd, wParam, lParam);
break;
case WM_COMMAND:
switch (LOWORD (wParam))
{
case IDOK:
CWindow_RemoveFromRefreshList(win);
LightView_Deinit(win);
EndDialog(hwnd, 0);
return 1;
}
return 0;
case WM_SYSCOMMAND:
switch (LOWORD (wParam))
{
case IDC_AUTO_UPDATE:
CWindow_ToggleAutoUpdate(win);
return 1;
}
return 0;
}
return 0;
}
//////////////////////////////////////////////////////////////////////////////
lightview_struct *LightView_Init(HINSTANCE hInst, HWND parent)
{
lightview_struct *LightView=NULL;
if ((LightView = (lightview_struct *)malloc(sizeof(lightview_struct))) == NULL)
return NULL;
if (CWindow_Init2(LightView, hInst, parent, "Light Viewer", IDD_LIGHT_VIEWER, LightView_Proc) != 0)
{
free(LightView);
return NULL;
}
return LightView;
}
//////////////////////////////////////////////////////////////////////////////
void LightView_Deinit(lightview_struct *LightView)
{
if (LightView)
free(LightView);
}
//////////////////////////////////////////////////////////////////////////////

View File

@ -0,0 +1,34 @@
/* Copyright (C) 2007 Acid Burn
This file is part of DeSmuME
DeSmuME is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
DeSmuME is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with DeSmuME; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef LIGHTVIEW_H
#define LIGHTVIEW_H
#include "CWindow.h"
typedef struct
{
cwindow_struct window;
} lightview_struct;
lightview_struct *LightView_Init(HINSTANCE hInst, HWND parent);
void LightView_Deinit(lightview_struct *view);
#endif

View File

@ -21,8 +21,6 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
//#define RENDER3D
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <shellapi.h>
@ -46,11 +44,14 @@
#include "tileView.h"
#include "oamView.h"
#include "mapview.h"
#include "matrixview.h"
#include "lightview.h"
#include "ConfigKeys.h"
#include "FirmConfig.h"
#include "OGLRender.h"
#include "../render3D.h"
#include "../gdbstub.h"
#include "colorctrl.h"
#include "snddx.h"
@ -633,6 +634,11 @@ void ChangeLanguage(int id)
menu = newmenu;
}
void InitCustomControls()
{
ColorCtrl_Register();
}
int WINAPI WinMain (HINSTANCE hThisInstance,
HINSTANCE hPrevInstance,
LPSTR lpszArgument,
@ -657,6 +663,8 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
HACCEL hAccel;
hAppInst=hThisInstance;
InitCustomControls();
/* default the firmware settings, they may get changed later */
NDS_FillDefaultFirmwareConfigData( &win_fw_config);
@ -1449,7 +1457,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
return 0;
case IDM_OAM:
{
oamview_struct *OamView;
oamview_struct *OamView;
if ((OamView = OamView_Init(hAppInst, HWND_DESKTOP)) != NULL)
{
@ -1458,7 +1466,30 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
}
}
return 0;
case IDM_MBG0 :
case IDM_MATRIX_VIEWER:
{
matrixview_struct *MatrixView;
if ((MatrixView = MatrixView_Init(hAppInst, HWND_DESKTOP)) != NULL)
{
CWindow_Show(MatrixView);
}
}
return 0;
case IDM_LIGHT_VIEWER:
{
lightview_struct *LightView;
if ((LightView = LightView_Init(hAppInst, HWND_DESKTOP)) != NULL)
{
CWindow_Show(LightView);
}
}
return 0;
case IDM_MBG0 :
if(MainScreen.gpu->dispBG[0])
{
GPU_remove(MainScreen.gpu, 0);
@ -1871,3 +1902,4 @@ LRESULT CALLBACK SoundSettingsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam,
return FALSE;
}

View File

@ -0,0 +1,258 @@
/* Copyright (C) 2007 Acid Burn
This file is part of DeSmuME
DeSmuME is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
DeSmuME is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with DeSmuME; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <windows.h>
#include <stdio.h>
#include "matrixView.h"
#include "resource.h"
#include "matrix.h"
#include "render3d.h"
#include "armcpu.h"
//////////////////////////////////////////////////////////////////////////////
void MatrixView_SetMatrix(matrixview_struct* win, const int* idcs, float* matrix)
{
int n;
char buffer[64];
for(n = 0; n < 16; n++)
{
sprintf(buffer, "%.4f", matrix[n]);
//sprintf(buffer, "%.8x", (int)(matrix[n]*4096));
SetWindowText(GetDlgItem(win->window.hwnd, idcs[n]), buffer);
}
}
//////////////////////////////////////////////////////////////////////////////
BOOL MatrixView_OnInitDialog(HWND hwnd)
{
int n;
HWND hPosCombo = GetDlgItem(hwnd, IDC_MATRIX_VIEWER_COORD_COMBO);
HWND hDirCombo = GetDlgItem(hwnd, IDC_MATRIX_VIEWER_DIR_COMBO);
// Setup position and direction matrix comboboxes with stack indices
SendMessage(hPosCombo, CB_ADDSTRING, 0,(LPARAM)"Current");
SendMessage(hDirCombo, CB_ADDSTRING, 0,(LPARAM)"Current");
for(n = 0; n < 32; n++)
{
char buffer[4];
sprintf(buffer, "%d", n);
SendMessage(hPosCombo, CB_ADDSTRING, 0,(LPARAM)buffer);
SendMessage(hDirCombo, CB_ADDSTRING, 0,(LPARAM)buffer);
}
SendMessage(hPosCombo, CB_SETCURSEL, 0, 0);
SendMessage(hDirCombo, CB_SETCURSEL, 0, 0);
return TRUE;
}
//////////////////////////////////////////////////////////////////////////////
BOOL MatrixView_OnClose(matrixview_struct* win)
{
win->window.autoup = FALSE;
CWindow_RemoveFromRefreshList(win);
MatrixView_Deinit(win);
EndDialog(win->window.hwnd, 0);
return TRUE;
}
//////////////////////////////////////////////////////////////////////////////
void MatrixView_OnPaintPositionMatrix(matrixview_struct* win)
{
// IDC for each matrix coefficient
const int idcGroup[16] =
{
IDC_MATRIX_VIEWER_COORD_11_EDIT, IDC_MATRIX_VIEWER_COORD_12_EDIT, IDC_MATRIX_VIEWER_COORD_13_EDIT, IDC_MATRIX_VIEWER_COORD_14_EDIT,
IDC_MATRIX_VIEWER_COORD_21_EDIT, IDC_MATRIX_VIEWER_COORD_22_EDIT, IDC_MATRIX_VIEWER_COORD_23_EDIT, IDC_MATRIX_VIEWER_COORD_24_EDIT,
IDC_MATRIX_VIEWER_COORD_31_EDIT, IDC_MATRIX_VIEWER_COORD_32_EDIT, IDC_MATRIX_VIEWER_COORD_33_EDIT, IDC_MATRIX_VIEWER_COORD_34_EDIT,
IDC_MATRIX_VIEWER_COORD_41_EDIT, IDC_MATRIX_VIEWER_COORD_42_EDIT, IDC_MATRIX_VIEWER_COORD_43_EDIT, IDC_MATRIX_VIEWER_COORD_44_EDIT
};
float matrix[16];
HWND hStackCombo = GetDlgItem(win->window.hwnd, IDC_MATRIX_VIEWER_COORD_COMBO);
int stackIndex;
stackIndex = SendMessage(hStackCombo, CB_GETCURSEL, 0, 0) - 1;
gpu3D->NDS_3D_GetMatrix(1, stackIndex, matrix);
MatrixView_SetMatrix(win, idcGroup, matrix);
}
//////////////////////////////////////////////////////////////////////////////
void MatrixView_OnPaintDirectionMatrix(matrixview_struct* win)
{
// IDC for each matrix coefficient
const int idcGroup[16] =
{
IDC_MATRIX_VIEWER_DIR_11_EDIT, IDC_MATRIX_VIEWER_DIR_12_EDIT, IDC_MATRIX_VIEWER_DIR_13_EDIT, IDC_MATRIX_VIEWER_DIR_14_EDIT,
IDC_MATRIX_VIEWER_DIR_21_EDIT, IDC_MATRIX_VIEWER_DIR_22_EDIT, IDC_MATRIX_VIEWER_DIR_23_EDIT, IDC_MATRIX_VIEWER_DIR_24_EDIT,
IDC_MATRIX_VIEWER_DIR_31_EDIT, IDC_MATRIX_VIEWER_DIR_32_EDIT, IDC_MATRIX_VIEWER_DIR_33_EDIT, IDC_MATRIX_VIEWER_DIR_34_EDIT,
IDC_MATRIX_VIEWER_DIR_41_EDIT, IDC_MATRIX_VIEWER_DIR_42_EDIT, IDC_MATRIX_VIEWER_DIR_43_EDIT, IDC_MATRIX_VIEWER_DIR_44_EDIT
};
float matrix[16];
HWND hStackCombo = GetDlgItem(win->window.hwnd, IDC_MATRIX_VIEWER_DIR_COMBO);
int stackIndex;
stackIndex = SendMessage(hStackCombo, CB_GETCURSEL, 0, 0) - 1;
gpu3D->NDS_3D_GetMatrix(2, stackIndex, matrix);
MatrixView_SetMatrix(win, idcGroup, matrix);
}
//////////////////////////////////////////////////////////////////////////////
void MatrixView_OnPaintProjectionMatrix(matrixview_struct* win)
{
// IDC for each matrix coefficient
const int idcGroup[16] =
{
IDC_MATRIX_VIEWER_PROJ_11_EDIT, IDC_MATRIX_VIEWER_PROJ_12_EDIT, IDC_MATRIX_VIEWER_PROJ_13_EDIT, IDC_MATRIX_VIEWER_PROJ_14_EDIT,
IDC_MATRIX_VIEWER_PROJ_21_EDIT, IDC_MATRIX_VIEWER_PROJ_22_EDIT, IDC_MATRIX_VIEWER_PROJ_23_EDIT, IDC_MATRIX_VIEWER_PROJ_24_EDIT,
IDC_MATRIX_VIEWER_PROJ_31_EDIT, IDC_MATRIX_VIEWER_PROJ_32_EDIT, IDC_MATRIX_VIEWER_PROJ_33_EDIT, IDC_MATRIX_VIEWER_PROJ_34_EDIT,
IDC_MATRIX_VIEWER_PROJ_41_EDIT, IDC_MATRIX_VIEWER_PROJ_42_EDIT, IDC_MATRIX_VIEWER_PROJ_43_EDIT, IDC_MATRIX_VIEWER_PROJ_44_EDIT
};
float mat[16];
gpu3D->NDS_3D_GetMatrix(0, -1, mat);
MatrixView_SetMatrix(win, idcGroup, mat);
}
//////////////////////////////////////////////////////////////////////////////
void MatrixView_OnPaintTextureMatrix(matrixview_struct* win)
{
// IDC for each matrix coefficient
const int idcGroup[16] =
{
IDC_MATRIX_VIEWER_TEX_11_EDIT, IDC_MATRIX_VIEWER_TEX_12_EDIT, IDC_MATRIX_VIEWER_TEX_13_EDIT, IDC_MATRIX_VIEWER_TEX_14_EDIT,
IDC_MATRIX_VIEWER_TEX_21_EDIT, IDC_MATRIX_VIEWER_TEX_22_EDIT, IDC_MATRIX_VIEWER_TEX_23_EDIT, IDC_MATRIX_VIEWER_TEX_24_EDIT,
IDC_MATRIX_VIEWER_TEX_31_EDIT, IDC_MATRIX_VIEWER_TEX_32_EDIT, IDC_MATRIX_VIEWER_TEX_33_EDIT, IDC_MATRIX_VIEWER_TEX_34_EDIT,
IDC_MATRIX_VIEWER_TEX_41_EDIT, IDC_MATRIX_VIEWER_TEX_42_EDIT, IDC_MATRIX_VIEWER_TEX_43_EDIT, IDC_MATRIX_VIEWER_TEX_44_EDIT
};
float mat[16];
gpu3D->NDS_3D_GetMatrix(3, -1, mat);
MatrixView_SetMatrix(win, idcGroup, mat);
}
//////////////////////////////////////////////////////////////////////////////
BOOL MatrixView_OnPaint(matrixview_struct* win, HWND hwnd, WPARAM wParam, LPARAM lParam)
{
HDC hdc;
PAINTSTRUCT ps;
hdc = BeginPaint(hwnd, &ps);
MatrixView_OnPaintProjectionMatrix(win);
MatrixView_OnPaintPositionMatrix(win);
MatrixView_OnPaintDirectionMatrix(win);
MatrixView_OnPaintTextureMatrix(win);
EndPaint(hwnd, &ps);
return TRUE;
}
//////////////////////////////////////////////////////////////////////////////
BOOL CALLBACK MatrixView_Proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
matrixview_struct *win = (matrixview_struct *)GetWindowLong(hwnd, DWL_USER);
switch (message)
{
case WM_INITDIALOG:
return MatrixView_OnInitDialog(hwnd);
case WM_CLOSE:
return MatrixView_OnClose(win);
case WM_PAINT:
return MatrixView_OnPaint(win, hwnd, wParam, lParam);
case WM_COMMAND:
switch (LOWORD (wParam))
{
case IDOK:
CWindow_RemoveFromRefreshList(win);
MatrixView_Deinit(win);
EndDialog(hwnd, 0);
return 1;
case IDC_MATRIX_VIEWER_DIR_COMBO:
case IDC_MATRIX_VIEWER_COORD_COMBO:
InvalidateRect(hwnd, NULL, FALSE);
return 1;
}
return 0;
case WM_SYSCOMMAND:
switch (LOWORD (wParam))
{
case IDC_AUTO_UPDATE:
CWindow_ToggleAutoUpdate(win);
return 1;
}
return 0;
}
return 0;
}
//////////////////////////////////////////////////////////////////////////////
matrixview_struct *MatrixView_Init(HINSTANCE hInst, HWND parent)
{
matrixview_struct *MatrixView=NULL;
if ((MatrixView = (matrixview_struct *)malloc(sizeof(matrixview_struct))) == NULL)
return NULL;
if (CWindow_Init2(MatrixView, hInst, parent, "Matrix viewer", IDD_MATRIX_VIEWER, MatrixView_Proc) != 0)
{
free(MatrixView);
return NULL;
}
return MatrixView;
}
//////////////////////////////////////////////////////////////////////////////
void MatrixView_Deinit(matrixview_struct *MatrixView)
{
if (MatrixView)
free(MatrixView);
}
//////////////////////////////////////////////////////////////////////////////

View File

@ -0,0 +1,34 @@
/* Copyright (C) 2007 Acid Burn
This file is part of DeSmuME
DeSmuME is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
DeSmuME is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with DeSmuME; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MATRIXVIEW_H
#define MATRIXVIEW_H
#include "CWindow.h"
typedef struct
{
cwindow_struct window;
} matrixview_struct;
matrixview_struct *MatrixView_Init(HINSTANCE hInst, HWND parent);
void MatrixView_Deinit(matrixview_struct *MatrixView);
#endif

View File

@ -243,4 +243,117 @@ void refreshAll();
#define IDC_EDIT1 1102
#define IDC_EDIT2 1103
// ============================================================================
// Matrix Viewer ID's (1200 to 1299)
// ============================================================================
#define IDD_MATRIX_VIEWER 1200
#define IDM_MATRIX_VIEWER IDD_MATRIX_VIEWER
// Position
#define IDC_MATRIX_VIEWER_COORD_GROUP 1201
#define IDC_MATRIX_VIEWER_COORD_COMBO 1202
#define IDC_MATRIX_VIEWER_COORD_11_EDIT 1203
#define IDC_MATRIX_VIEWER_COORD_12_EDIT 1204
#define IDC_MATRIX_VIEWER_COORD_13_EDIT 1205
#define IDC_MATRIX_VIEWER_COORD_14_EDIT 1206
#define IDC_MATRIX_VIEWER_COORD_21_EDIT 1207
#define IDC_MATRIX_VIEWER_COORD_22_EDIT 1208
#define IDC_MATRIX_VIEWER_COORD_23_EDIT 1209
#define IDC_MATRIX_VIEWER_COORD_24_EDIT 1210
#define IDC_MATRIX_VIEWER_COORD_31_EDIT 1211
#define IDC_MATRIX_VIEWER_COORD_32_EDIT 1212
#define IDC_MATRIX_VIEWER_COORD_33_EDIT 1213
#define IDC_MATRIX_VIEWER_COORD_34_EDIT 1214
#define IDC_MATRIX_VIEWER_COORD_41_EDIT 1215
#define IDC_MATRIX_VIEWER_COORD_42_EDIT 1216
#define IDC_MATRIX_VIEWER_COORD_43_EDIT 1217
#define IDC_MATRIX_VIEWER_COORD_44_EDIT 1218
// Direction
#define IDC_MATRIX_VIEWER_DIR_GROUP 1221
#define IDC_MATRIX_VIEWER_DIR_COMBO 1222
#define IDC_MATRIX_VIEWER_DIR_11_EDIT 1223
#define IDC_MATRIX_VIEWER_DIR_12_EDIT 1224
#define IDC_MATRIX_VIEWER_DIR_13_EDIT 1225
#define IDC_MATRIX_VIEWER_DIR_14_EDIT 1226
#define IDC_MATRIX_VIEWER_DIR_21_EDIT 1227
#define IDC_MATRIX_VIEWER_DIR_22_EDIT 1228
#define IDC_MATRIX_VIEWER_DIR_23_EDIT 1229
#define IDC_MATRIX_VIEWER_DIR_24_EDIT 1230
#define IDC_MATRIX_VIEWER_DIR_31_EDIT 1231
#define IDC_MATRIX_VIEWER_DIR_32_EDIT 1232
#define IDC_MATRIX_VIEWER_DIR_33_EDIT 1233
#define IDC_MATRIX_VIEWER_DIR_34_EDIT 1234
#define IDC_MATRIX_VIEWER_DIR_41_EDIT 1235
#define IDC_MATRIX_VIEWER_DIR_42_EDIT 1236
#define IDC_MATRIX_VIEWER_DIR_43_EDIT 1237
#define IDC_MATRIX_VIEWER_DIR_44_EDIT 1238
// Projection
#define IDC_MATRIX_VIEWER_PROJ_GROUP 1241
#define IDC_MATRIX_VIEWER_PROJ_11_EDIT 1243
#define IDC_MATRIX_VIEWER_PROJ_12_EDIT 1244
#define IDC_MATRIX_VIEWER_PROJ_13_EDIT 1245
#define IDC_MATRIX_VIEWER_PROJ_14_EDIT 1246
#define IDC_MATRIX_VIEWER_PROJ_21_EDIT 1247
#define IDC_MATRIX_VIEWER_PROJ_22_EDIT 1248
#define IDC_MATRIX_VIEWER_PROJ_23_EDIT 1249
#define IDC_MATRIX_VIEWER_PROJ_24_EDIT 1250
#define IDC_MATRIX_VIEWER_PROJ_31_EDIT 1251
#define IDC_MATRIX_VIEWER_PROJ_32_EDIT 1252
#define IDC_MATRIX_VIEWER_PROJ_33_EDIT 1253
#define IDC_MATRIX_VIEWER_PROJ_34_EDIT 1254
#define IDC_MATRIX_VIEWER_PROJ_41_EDIT 1255
#define IDC_MATRIX_VIEWER_PROJ_42_EDIT 1256
#define IDC_MATRIX_VIEWER_PROJ_43_EDIT 1257
#define IDC_MATRIX_VIEWER_PROJ_44_EDIT 1258
// Texture
#define IDC_MATRIX_VIEWER_TEX_GROUP 1261
#define IDC_MATRIX_VIEWER_TEX_11_EDIT 1263
#define IDC_MATRIX_VIEWER_TEX_12_EDIT 1264
#define IDC_MATRIX_VIEWER_TEX_13_EDIT 1265
#define IDC_MATRIX_VIEWER_TEX_14_EDIT 1266
#define IDC_MATRIX_VIEWER_TEX_21_EDIT 1267
#define IDC_MATRIX_VIEWER_TEX_22_EDIT 1268
#define IDC_MATRIX_VIEWER_TEX_23_EDIT 1269
#define IDC_MATRIX_VIEWER_TEX_24_EDIT 1270
#define IDC_MATRIX_VIEWER_TEX_31_EDIT 1271
#define IDC_MATRIX_VIEWER_TEX_32_EDIT 1272
#define IDC_MATRIX_VIEWER_TEX_33_EDIT 1273
#define IDC_MATRIX_VIEWER_TEX_34_EDIT 1274
#define IDC_MATRIX_VIEWER_TEX_41_EDIT 1275
#define IDC_MATRIX_VIEWER_TEX_42_EDIT 1276
#define IDC_MATRIX_VIEWER_TEX_43_EDIT 1277
#define IDC_MATRIX_VIEWER_TEX_44_EDIT 1278
// ============================================================================
// Light Viewer ID's (1300 to 1399)
// ============================================================================
#define IDD_LIGHT_VIEWER 1300
#define IDM_LIGHT_VIEWER IDD_LIGHT_VIEWER
#define IDC_LIGHT_VIWER_LIGHT0_GROUP 1301
#define IDC_LIGHT_VIEWER_LIGHT0COLOR_COLORCTRL 1302
#define IDC_LIGHT_VIEWER_LIGHT0COLOR_EDIT 1303
#define IDC_LIGHT_VIEWER_LIGHT0VECTOR_EDIT 1304
#define IDC_LIGHT_VIWER_LIGHT1_GROUP 1311
#define IDC_LIGHT_VIEWER_LIGHT1COLOR_COLORCTRL 1312
#define IDC_LIGHT_VIEWER_LIGHT1COLOR_EDIT 1313
#define IDC_LIGHT_VIEWER_LIGHT1VECTOR_EDIT 1314
#define IDC_LIGHT_VIWER_LIGHT2_GROUP 1321
#define IDC_LIGHT_VIEWER_LIGHT2COLOR_COLORCTRL 1322
#define IDC_LIGHT_VIEWER_LIGHT2COLOR_EDIT 1323
#define IDC_LIGHT_VIEWER_LIGHT2VECTOR_EDIT 1324
#define IDC_LIGHT_VIWER_LIGHT3_GROUP 1331
#define IDC_LIGHT_VIEWER_LIGHT3COLOR_COLORCTRL 1332
#define IDC_LIGHT_VIEWER_LIGHT3COLOR_EDIT 1333
#define IDC_LIGHT_VIEWER_LIGHT3VECTOR_EDIT 1334
#endif

View File

@ -58,7 +58,7 @@ END
/////////////////////////////////////////////////////////////////////////////
// Danés resources
// Danish resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DAN)
#ifdef _WIN32
@ -534,12 +534,123 @@ BEGIN
WS_GROUP
END
#endif // Danés resources
#endif // Danish resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Inglés (Estados Unidos) resources
// German (Germany) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
#ifdef _WIN32
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_LIGHT_VIEWER DIALOGEX 0, 0, 197, 89
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CAPTION | WS_SYSMENU
CAPTION "Light Viewer"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,140,68,50,14
GROUPBOX "Light0",IDC_LIGHT_VIWER_LIGHT0_GROUP,7,7,90,27
EDITTEXT IDC_LIGHT_VIEWER_LIGHT0VECTOR_EDIT,58,16,35,14,
ES_AUTOHSCROLL | ES_READONLY | WS_GROUP
EDITTEXT IDC_LIGHT_VIEWER_LIGHT0COLOR_EDIT,33,16,23,14,
ES_AUTOHSCROLL | ES_READONLY | WS_GROUP
CONTROL "",IDC_LIGHT_VIEWER_LIGHT0COLOR_COLORCTRL,
"DeSmuME_ColorCtrl",WS_TABSTOP,11,16,19,14
GROUPBOX "Light1",IDC_LIGHT_VIWER_LIGHT1_GROUP,100,7,90,27
EDITTEXT IDC_LIGHT_VIEWER_LIGHT1VECTOR_EDIT,151,16,35,14,
ES_AUTOHSCROLL | ES_READONLY | WS_GROUP
EDITTEXT IDC_LIGHT_VIEWER_LIGHT1COLOR_EDIT,126,16,23,14,
ES_AUTOHSCROLL | ES_READONLY | WS_GROUP
CONTROL "",IDC_LIGHT_VIEWER_LIGHT1COLOR_COLORCTRL,
"DeSmuME_ColorCtrl",WS_TABSTOP,104,16,19,14
GROUPBOX "Light2",IDC_LIGHT_VIWER_LIGHT2_GROUP,7,33,90,27
EDITTEXT IDC_LIGHT_VIEWER_LIGHT2VECTOR_EDIT,58,43,35,14,
ES_AUTOHSCROLL | ES_READONLY | WS_GROUP
EDITTEXT IDC_LIGHT_VIEWER_LIGHT2COLOR_EDIT,33,43,23,14,
ES_AUTOHSCROLL | ES_READONLY | WS_GROUP
CONTROL "",IDC_LIGHT_VIEWER_LIGHT2COLOR_COLORCTRL,
"DeSmuME_ColorCtrl",WS_TABSTOP,11,43,19,14
GROUPBOX "Light3",IDC_LIGHT_VIWER_LIGHT3_GROUP,100,33,90,27
EDITTEXT IDC_LIGHT_VIEWER_LIGHT3VECTOR_EDIT,151,43,35,14,
ES_AUTOHSCROLL | ES_READONLY | WS_GROUP
EDITTEXT IDC_LIGHT_VIEWER_LIGHT3COLOR_EDIT,126,43,23,14,
ES_AUTOHSCROLL | ES_READONLY | WS_GROUP
CONTROL "",IDC_LIGHT_VIEWER_LIGHT3COLOR_COLORCTRL,
"DeSmuME_ColorCtrl",WS_TABSTOP,104,43,19,14
END
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IconDeSmuME ICON "DeSmuME.ico"
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resrc1.h\0"
END
2 TEXTINCLUDE
BEGIN
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""windows.h""\r\n"
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""resource.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
IDD_LIGHT_VIEWER, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 190
TOPMARGIN, 7
BOTTOMMARGIN, 82
END
END
#endif // APSTUDIO_INVOKED
#endif // German (Germany) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
@ -663,6 +774,8 @@ BEGIN
MENUITEM "View &Tiles", IDM_TILE
MENUITEM "View M&aps", IDM_MAP
MENUITEM "View &OAM", IDM_OAM
MENUITEM "View Matrices", IDM_MATRIX_VIEWER
MENUITEM "View Lights", IDM_LIGHT_VIEWER
MENUITEM SEPARATOR
POPUP "&View &Layers"
BEGIN
@ -691,48 +804,48 @@ END
// Dialog
//
IDD_CONFIG DIALOGEX 0, 0, 125, 227
IDD_CONFIG DIALOG 0, 0, 125, 227
STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | WS_POPUP | WS_CAPTION
CAPTION "Configure Keys"
FONT 8, "MS Sans Serif", 0, 0, 0x0
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDC_FERMER,67,208,50,14
PUSHBUTTON "Default",IDC_BUTTON1,7,208,50,14
COMBOBOX IDC_COMBO1,46,13,59,93,CBS_DROPDOWNLIST | WS_VSCROLL |
COMBOBOX IDC_COMBO1,46,13,59,14,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "Up:",IDC_STATIC,17,14,27,10
COMBOBOX IDC_COMBO4,46,29,59,76,CBS_DROPDOWNLIST | WS_VSCROLL |
COMBOBOX IDC_COMBO4,46,29,59,14,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "Down:",IDC_STATIC,17,31,28,9
COMBOBOX IDC_COMBO2,46,45,59,92,CBS_DROPDOWNLIST | WS_VSCROLL |
COMBOBOX IDC_COMBO2,46,45,59,14,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "Left:",IDC_STATIC,17,47,28,9
COMBOBOX IDC_COMBO3,46,61,59,76,CBS_DROPDOWNLIST | WS_VSCROLL |
COMBOBOX IDC_COMBO3,46,61,59,14,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "Right:",IDC_STATIC,17,63,28,9
COMBOBOX IDC_COMBO7,46,77,59,76,CBS_DROPDOWNLIST | WS_VSCROLL |
COMBOBOX IDC_COMBO7,46,77,59,14,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "A:",IDC_STATIC,18,78,28,9
COMBOBOX IDC_COMBO8,46,92,59,95,CBS_DROPDOWNLIST | WS_VSCROLL |
COMBOBOX IDC_COMBO8,46,92,59,14,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "B:",IDC_STATIC,17,94,28,9
COMBOBOX IDC_COMBO10,46,108,59,83,CBS_DROPDOWNLIST | WS_VSCROLL |
COMBOBOX IDC_COMBO10,46,108,59,14,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "L:",IDC_STATIC,17,110,28,9
COMBOBOX IDC_COMBO11,46,124,59,101,CBS_DROPDOWNLIST | WS_VSCROLL |
COMBOBOX IDC_COMBO11,46,124,59,14,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "R:",IDC_STATIC,17,126,28,9
COMBOBOX IDC_COMBO6,46,140,59,99,CBS_DROPDOWNLIST | WS_VSCROLL |
COMBOBOX IDC_COMBO6,46,140,59,14,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "X:",IDC_STATIC,17,142,28,9
COMBOBOX IDC_COMBO5,46,156,59,108,CBS_DROPDOWNLIST | WS_VSCROLL |
COMBOBOX IDC_COMBO5,46,156,59,14,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "Y:",IDC_STATIC,17,158,28,9
GROUPBOX "",IDC_STATIC,7,3,111,203
COMBOBOX IDC_COMBO9,46,172,59,119,CBS_DROPDOWNLIST | WS_VSCROLL |
COMBOBOX IDC_COMBO9,46,172,59,14,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "Start:",IDC_STATIC,17,174,28,9
COMBOBOX IDC_COMBO12,46,188,59,104,CBS_DROPDOWNLIST | WS_VSCROLL |
COMBOBOX IDC_COMBO12,46,188,59,14,CBS_DROPDOWNLIST | WS_VSCROLL |
WS_TABSTOP
LTEXT "Select:",IDC_STATIC,17,190,28,9
END
@ -1015,12 +1128,175 @@ BEGIN
WS_GROUP
END
#endif // Inglés (Estados Unidos) resources
IDD_MATRIX_VIEWER DIALOGEX 0, 0, 364, 177
STYLE DS_SETFONT | DS_FIXEDSYS | WS_CAPTION | WS_SYSMENU
CAPTION "Matrix Viewer"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,307,156,50,14
GROUPBOX "Projection",IDC_MATRIX_VIEWER_PROJ_GROUP,7,86,173,65
EDITTEXT IDC_MATRIX_VIEWER_PROJ_11_EDIT,11,95,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_PROJ_21_EDIT,11,108,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_PROJ_31_EDIT,11,122,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_PROJ_41_EDIT,11,135,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_PROJ_12_EDIT,52,95,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_PROJ_22_EDIT,52,108,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_PROJ_32_EDIT,52,122,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_PROJ_42_EDIT,52,135,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_PROJ_13_EDIT,94,95,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_PROJ_23_EDIT,94,108,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_PROJ_33_EDIT,94,122,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_PROJ_43_EDIT,94,135,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_PROJ_14_EDIT,136,95,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_PROJ_24_EDIT,136,108,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_PROJ_34_EDIT,136,122,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_PROJ_44_EDIT,136,135,40,12,
ES_AUTOHSCROLL | ES_READONLY
GROUPBOX "Position",IDC_MATRIX_VIEWER_COORD_GROUP,7,7,173,80
EDITTEXT IDC_MATRIX_VIEWER_COORD_11_EDIT,11,15,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_COORD_21_EDIT,11,28,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_COORD_31_EDIT,11,42,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_COORD_41_EDIT,11,55,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_COORD_12_EDIT,52,15,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_COORD_22_EDIT,52,28,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_COORD_32_EDIT,52,42,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_COORD_42_EDIT,52,55,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_COORD_13_EDIT,94,15,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_COORD_23_EDIT,94,28,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_COORD_33_EDIT,94,42,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_COORD_43_EDIT,94,55,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_COORD_14_EDIT,136,15,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_COORD_24_EDIT,136,28,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_COORD_34_EDIT,136,42,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_COORD_44_EDIT,136,55,40,12,
ES_AUTOHSCROLL | ES_READONLY
COMBOBOX IDC_MATRIX_VIEWER_COORD_COMBO,136,70,40,88,
CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Direction",IDC_MATRIX_VIEWER_DIR_GROUP,184,7,173,80
EDITTEXT IDC_MATRIX_VIEWER_DIR_11_EDIT,188,15,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_DIR_21_EDIT,188,29,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_DIR_31_EDIT,188,42,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_DIR_41_EDIT,188,55,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_DIR_12_EDIT,228,15,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_DIR_22_EDIT,228,29,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_DIR_32_EDIT,228,42,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_DIR_42_EDIT,228,55,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_DIR_13_EDIT,270,15,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_DIR_23_EDIT,270,29,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_DIR_33_EDIT,270,42,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_DIR_43_EDIT,270,55,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_DIR_14_EDIT,312,15,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_DIR_24_EDIT,312,29,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_DIR_34_EDIT,312,42,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_DIR_44_EDIT,312,55,40,12,
ES_AUTOHSCROLL | ES_READONLY
COMBOBOX IDC_MATRIX_VIEWER_DIR_COMBO,312,71,40,88,
CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
GROUPBOX "Texture",IDC_MATRIX_VIEWER_TEX_GROUP,184,86,173,65
EDITTEXT IDC_MATRIX_VIEWER_TEX_11_EDIT,187,95,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_TEX_21_EDIT,187,108,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_TEX_31_EDIT,187,122,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_TEX_41_EDIT,187,135,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_TEX_12_EDIT,228,95,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_TEX_22_EDIT,228,108,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_TEX_32_EDIT,228,122,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_TEX_42_EDIT,228,135,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_TEX_13_EDIT,270,95,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_TEX_23_EDIT,270,108,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_TEX_33_EDIT,270,122,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_TEX_43_EDIT,270,135,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_TEX_14_EDIT,312,95,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_TEX_24_EDIT,312,108,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_TEX_34_EDIT,312,122,40,12,
ES_AUTOHSCROLL | ES_READONLY
EDITTEXT IDC_MATRIX_VIEWER_TEX_44_EDIT,312,135,40,12,
ES_AUTOHSCROLL | ES_READONLY
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
IDD_MATRIX_VIEWER, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 357
TOPMARGIN, 7
BOTTOMMARGIN, 170
END
END
#endif // APSTUDIO_INVOKED
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Francés (Francia) resources
// French (France) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
#ifdef _WIN32
@ -1397,57 +1673,7 @@ BEGIN
PUSHBUTTON "&Fermer",IDC_FERMER,50,134,50,14
END
#endif // Francés (Francia) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Español resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ESN)
#ifdef _WIN32
LANGUAGE LANG_SPANISH, SUBLANG_SPANISH_MODERN
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IconDeSmuME ICON "DeSmuME.ico"
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resrc1.h\0"
END
2 TEXTINCLUDE
BEGIN
"#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""windows.h""\r\n"
"#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
"#include ""resource.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#endif // Español resources
#endif // French (France) resources
/////////////////////////////////////////////////////////////////////////////