diff --git a/desmume/src/windows/DeSmuME_2008.vcproj b/desmume/src/windows/DeSmuME_2008.vcproj index 39affa6a5..d9b5a5d84 100644 --- a/desmume/src/windows/DeSmuME_2008.vcproj +++ b/desmume/src/windows/DeSmuME_2008.vcproj @@ -1,7 +1,7 @@ - - @@ -1060,6 +1056,10 @@ RelativePath=".\palView.h" > + + @@ -1224,6 +1224,10 @@ RelativePath="..\saves.h" > + + diff --git a/desmume/src/windows/IORegView.cpp b/desmume/src/windows/IORegView.cpp index bbfe65eb1..e588666d8 100644 --- a/desmume/src/windows/IORegView.cpp +++ b/desmume/src/windows/IORegView.cpp @@ -1,171 +1,172 @@ -/* Copyright (C) 2006 yopyop - yopyop156@ifrance.com - yopyop156.ifrance.com - - 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 "ioregview.h" -#include -#include "debug.h" -#include "resource.h" -#include "../MMU.h" -#include "../armcpu.h" - -typedef struct -{ - u32 autoup_secs; - bool autoup; -} ioregview_struct; - -ioregview_struct *IORegView; - -LRESULT Ioreg_OnPaint(HWND hwnd, WPARAM wParam, LPARAM lParam) -{ - HDC hdc; - PAINTSTRUCT ps; - TCHAR text[80]; - - hdc = BeginPaint(hwnd, &ps); - - // ARM9 registers - sprintf(text, "0x%08X", (int)((u32 *)ARM9Mem.ARM9_DTCM)[0x3FFC>>2]); - SetWindowText(GetDlgItem(hwnd, IDC_INTHAND9), text); - - sprintf(text, "0x%08X", (int)MMU.reg_IE[ARMCPU_ARM9]); - SetWindowText(GetDlgItem(hwnd, IDC_IE9), text); - - sprintf(text, "0x%08X", (int)MMU.reg_IF[ARMCPU_ARM9]); - SetWindowText(GetDlgItem(hwnd, IDC_IF9), text); - - sprintf(text, "0x%08X", (int)MMU.reg_IME[ARMCPU_ARM9]); - SetWindowText(GetDlgItem(hwnd, IDC_IME9), text); - - sprintf(text, "0x%08X", ((u16 *)ARM9Mem.ARM9_REG)[0x0000>>1]); - SetWindowText(GetDlgItem(hwnd, IDC_DISPCNTA9), text); - - sprintf(text, "0x%08X", ((u16 *)ARM9Mem.ARM9_REG)[0x0004>>1]); - SetWindowText(GetDlgItem(hwnd, IDC_DISPSTATA9), text); - - sprintf(text, "0x%08X", ((u16 *)ARM9Mem.ARM9_REG)[0x1000>>1]); - SetWindowText(GetDlgItem(hwnd, IDC_DISPCNTB9), text); - - sprintf(text, "0x%08X", ((u16 *)ARM9Mem.ARM9_REG)[0x1004>>1]); - SetWindowText(GetDlgItem(hwnd, IDC_DISPSTATB9), text); - - sprintf(text, "0x%08X", (int)((u32 *)ARM9Mem.ARM9_REG)[0x180>>2]); - SetWindowText(GetDlgItem(hwnd, IDC_IPCSYNC9), text); - - sprintf(text, "0x%08X", (int)((u32 *)ARM9Mem.ARM9_REG)[0x184>>2]); - SetWindowText(GetDlgItem(hwnd, IDC_IPCFIFO9), text); - - sprintf(text, "0x%08X", (int)((u32 *)(MMU.MMU_MEM[ARMCPU_ARM9][0x40]))[0x600>>2]); - SetWindowText(GetDlgItem(hwnd, IDC_GXSTAT9), text); - - // ARM7 registers - sprintf(text, "0x%08X", (int)MMU.reg_IE[ARMCPU_ARM7]); - SetWindowText(GetDlgItem(hwnd, IDC_IE7), text); - - sprintf(text, "0x%08X", (int)MMU.reg_IF[ARMCPU_ARM7]); - SetWindowText(GetDlgItem(hwnd, IDC_IF7), text); - - sprintf(text, "0x%08X", (int)MMU.reg_IME[ARMCPU_ARM7]); - SetWindowText(GetDlgItem(hwnd, IDC_IME7), text); - - sprintf(text, "0x%08X", (int)((u32 *)MMU.ARM7_REG)[0x180>>2]); - SetWindowText(GetDlgItem(hwnd, IDC_IPCSYNC7), text); - - sprintf(text, "0x%08X", (int)((u32 *)MMU.ARM7_REG)[0x184>>2]); - SetWindowText(GetDlgItem(hwnd, IDC_IPCFIFO7), text); - EndPaint(hwnd, &ps); - - return 0; -} - -BOOL CALLBACK IoregView_Proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - switch (message) - { - case WM_INITDIALOG : - IORegView = new ioregview_struct; - memset(IORegView, 0, sizeof(ioregview_struct)); - IORegView->autoup_secs = 5; - SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), - UDM_SETRANGE, 0, MAKELONG(99, 1)); - SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), - UDM_SETPOS32, 0, IORegView->autoup_secs); - return 1; - case WM_CLOSE : - if(IORegView->autoup) - { - KillTimer(hwnd, IDT_VIEW_IOREG); - IORegView->autoup = false; +/* Copyright (C) 2006 yopyop + yopyop156@ifrance.com + yopyop156.ifrance.com + + 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 "ioregview.h" +#include +#include "debug.h" +#include "resource.h" +#include "res_timer_ids.h" +#include "../MMU.h" +#include "../armcpu.h" + +typedef struct +{ + u32 autoup_secs; + bool autoup; +} ioregview_struct; + +ioregview_struct *IORegView; + +LRESULT Ioreg_OnPaint(HWND hwnd, WPARAM wParam, LPARAM lParam) +{ + HDC hdc; + PAINTSTRUCT ps; + TCHAR text[80]; + + hdc = BeginPaint(hwnd, &ps); + + // ARM9 registers + sprintf(text, "0x%08X", (int)((u32 *)ARM9Mem.ARM9_DTCM)[0x3FFC>>2]); + SetWindowText(GetDlgItem(hwnd, IDC_INTHAND9), text); + + sprintf(text, "0x%08X", (int)MMU.reg_IE[ARMCPU_ARM9]); + SetWindowText(GetDlgItem(hwnd, IDC_IE9), text); + + sprintf(text, "0x%08X", (int)MMU.reg_IF[ARMCPU_ARM9]); + SetWindowText(GetDlgItem(hwnd, IDC_IF9), text); + + sprintf(text, "0x%08X", (int)MMU.reg_IME[ARMCPU_ARM9]); + SetWindowText(GetDlgItem(hwnd, IDC_IME9), text); + + sprintf(text, "0x%08X", ((u16 *)ARM9Mem.ARM9_REG)[0x0000>>1]); + SetWindowText(GetDlgItem(hwnd, IDC_DISPCNTA9), text); + + sprintf(text, "0x%08X", ((u16 *)ARM9Mem.ARM9_REG)[0x0004>>1]); + SetWindowText(GetDlgItem(hwnd, IDC_DISPSTATA9), text); + + sprintf(text, "0x%08X", ((u16 *)ARM9Mem.ARM9_REG)[0x1000>>1]); + SetWindowText(GetDlgItem(hwnd, IDC_DISPCNTB9), text); + + sprintf(text, "0x%08X", ((u16 *)ARM9Mem.ARM9_REG)[0x1004>>1]); + SetWindowText(GetDlgItem(hwnd, IDC_DISPSTATB9), text); + + sprintf(text, "0x%08X", (int)((u32 *)ARM9Mem.ARM9_REG)[0x180>>2]); + SetWindowText(GetDlgItem(hwnd, IDC_IPCSYNC9), text); + + sprintf(text, "0x%08X", (int)((u32 *)ARM9Mem.ARM9_REG)[0x184>>2]); + SetWindowText(GetDlgItem(hwnd, IDC_IPCFIFO9), text); + + sprintf(text, "0x%08X", (int)((u32 *)(MMU.MMU_MEM[ARMCPU_ARM9][0x40]))[0x600>>2]); + SetWindowText(GetDlgItem(hwnd, IDC_GXSTAT9), text); + + // ARM7 registers + sprintf(text, "0x%08X", (int)MMU.reg_IE[ARMCPU_ARM7]); + SetWindowText(GetDlgItem(hwnd, IDC_IE7), text); + + sprintf(text, "0x%08X", (int)MMU.reg_IF[ARMCPU_ARM7]); + SetWindowText(GetDlgItem(hwnd, IDC_IF7), text); + + sprintf(text, "0x%08X", (int)MMU.reg_IME[ARMCPU_ARM7]); + SetWindowText(GetDlgItem(hwnd, IDC_IME7), text); + + sprintf(text, "0x%08X", (int)((u32 *)MMU.ARM7_REG)[0x180>>2]); + SetWindowText(GetDlgItem(hwnd, IDC_IPCSYNC7), text); + + sprintf(text, "0x%08X", (int)((u32 *)MMU.ARM7_REG)[0x184>>2]); + SetWindowText(GetDlgItem(hwnd, IDC_IPCFIFO7), text); + EndPaint(hwnd, &ps); + + return 0; +} + +BOOL CALLBACK IoregView_Proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + switch (message) + { + case WM_INITDIALOG : + IORegView = new ioregview_struct; + memset(IORegView, 0, sizeof(ioregview_struct)); + IORegView->autoup_secs = 5; + SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), + UDM_SETRANGE, 0, MAKELONG(99, 1)); + SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), + UDM_SETPOS32, 0, IORegView->autoup_secs); + return 1; + case WM_CLOSE : + if(IORegView->autoup) + { + KillTimer(hwnd, IDT_VIEW_IOREG); + IORegView->autoup = false; } if (IORegView!=NULL) { delete IORegView; IORegView = NULL; - } - PostQuitMessage(0); - return 1; - case WM_PAINT: - Ioreg_OnPaint(hwnd, wParam, lParam); - return 1; - case WM_TIMER: - SendMessage(hwnd, WM_COMMAND, IDC_REFRESH, 0); - return 1; - case WM_COMMAND : - switch (LOWORD (wParam)) - { - case IDC_FERMER : - SendMessage(hwnd, WM_CLOSE, 0, 0); - return 1; - case IDC_AUTO_UPDATE : - if(IORegView->autoup) - { - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), false); - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), false); - KillTimer(hwnd, IDT_VIEW_IOREG); - IORegView->autoup = FALSE; - return 1; - } - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), true); - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), true); - IORegView->autoup = TRUE; - SetTimer(hwnd, IDT_VIEW_IOREG, IORegView->autoup_secs*1000, (TIMERPROC) NULL); - return 1; - case IDC_AUTO_UPDATE_SECS: - { - int t = GetDlgItemInt(hwnd, IDC_AUTO_UPDATE_SECS, FALSE, TRUE); - if (t != IORegView->autoup_secs) - { - IORegView->autoup_secs = t; - if (IORegView->autoup) - SetTimer(hwnd, IDT_VIEW_IOREG, - IORegView->autoup_secs*1000, (TIMERPROC) NULL); - } - } - return 1; - case IDC_REFRESH: - InvalidateRect(hwnd, NULL, FALSE); - return 1; - } - return 0; - } - return FALSE; -} + } + PostQuitMessage(0); + return 1; + case WM_PAINT: + Ioreg_OnPaint(hwnd, wParam, lParam); + return 1; + case WM_TIMER: + SendMessage(hwnd, WM_COMMAND, IDC_REFRESH, 0); + return 1; + case WM_COMMAND : + switch (LOWORD (wParam)) + { + case IDC_FERMER : + SendMessage(hwnd, WM_CLOSE, 0, 0); + return 1; + case IDC_AUTO_UPDATE : + if(IORegView->autoup) + { + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), false); + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), false); + KillTimer(hwnd, IDT_VIEW_IOREG); + IORegView->autoup = FALSE; + return 1; + } + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), true); + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), true); + IORegView->autoup = TRUE; + SetTimer(hwnd, IDT_VIEW_IOREG, IORegView->autoup_secs*1000, (TIMERPROC) NULL); + return 1; + case IDC_AUTO_UPDATE_SECS: + { + int t = GetDlgItemInt(hwnd, IDC_AUTO_UPDATE_SECS, FALSE, TRUE); + if (t != IORegView->autoup_secs) + { + IORegView->autoup_secs = t; + if (IORegView->autoup) + SetTimer(hwnd, IDT_VIEW_IOREG, + IORegView->autoup_secs*1000, (TIMERPROC) NULL); + } + } + return 1; + case IDC_REFRESH: + InvalidateRect(hwnd, NULL, FALSE); + return 1; + } + return 0; + } + return FALSE; +} diff --git a/desmume/src/windows/disView.cpp b/desmume/src/windows/disView.cpp index 2454081d0..97b5b361b 100644 --- a/desmume/src/windows/disView.cpp +++ b/desmume/src/windows/disView.cpp @@ -1,319 +1,320 @@ -/* Copyright (C) 2006 yopyop - yopyop156@ifrance.com - yopyop156.ifrance.com - - 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 -#include -#include -#include "../MMU.h" -#include "../Disassembler.h" -#include "../NDSSystem.h" -#include "../armcpu.h" -#include "disView.h" -#include -#include "resource.h" - -typedef struct -{ - BOOL autogo; - BOOL autoup; - u32 autoup_secs; - u32 curr_ligne; - armcpu_t *cpu; - u16 mode; -} disview_struct; - +/* Copyright (C) 2006 yopyop + yopyop156@ifrance.com + yopyop156.ifrance.com + + 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 +#include +#include +#include "../MMU.h" +#include "../Disassembler.h" +#include "../NDSSystem.h" +#include "../armcpu.h" +#include "disView.h" +#include +#include "resource.h" +#include "res_timer_ids.h" + +typedef struct +{ + BOOL autogo; + BOOL autoup; + u32 autoup_secs; + u32 curr_ligne; + armcpu_t *cpu; + u16 mode; +} disview_struct; + disview_struct *DisView7 = NULL; -disview_struct *DisView9 = NULL; - -static HWND DisViewWnd[2] = {NULL, NULL}; - -#define INDEX(i) ((((i)>>16)&0xFF0)|(((i)>>4)&0xF)) - -LRESULT DisViewBox_OnPaint(HWND hwnd, disview_struct *win, WPARAM wParam, LPARAM lParam) -{ - HDC hdc; - PAINTSTRUCT ps; - SIZE fontsize; - TCHAR text[100]; - TCHAR txt[100]; - RECT rect; - int lg; - int ht; - HDC mem_dc; - HBITMAP mem_bmp; - u32 nbligne; - - GetClientRect(hwnd, &rect); - lg = rect.right - rect.left; - ht = rect.bottom - rect.top; - - hdc = BeginPaint(hwnd, &ps); - - mem_dc = CreateCompatibleDC(hdc); - mem_bmp = CreateCompatibleBitmap(hdc, lg, ht); - SelectObject(mem_dc, mem_bmp); - - FillRect(mem_dc, &rect, (HBRUSH)GetStockObject(WHITE_BRUSH)); - - SelectObject(mem_dc, GetStockObject(SYSTEM_FIXED_FONT)); - - GetTextExtentPoint32(mem_dc, "0", 1, &fontsize); - - nbligne = ht/fontsize.cy; - - SetTextColor(mem_dc, RGB(0,0,0)); - - if((win->mode==1) || ((win->mode==0) && (win->cpu->CPSR.bits.T == 0))) - { - u32 i; - u32 adr; - - if (win->autoup||win->autogo) - win->curr_ligne = (win->cpu->instruct_adr >> 2) - (win->curr_ligne % nbligne) ; - adr = win->curr_ligne*4; - - for(i = 0; i < nbligne; ++i) - { - u32 ins = MMU_read32(win->cpu->proc_ID, adr); - des_arm_instructions_set[INDEX(ins)](adr, ins, txt); - sprintf(text, "%04X:%04X %08X %s", (int)(adr>>16), (int)(adr&0xFFFF), (int)ins, txt); - DrawText(mem_dc, text, -1, &rect, DT_TOP | DT_LEFT | DT_NOPREFIX); - rect.top+=fontsize.cy; - adr += 4; - } - - - - if(((win->cpu->instruct_adr&0x0FFFFFFF) >= win->curr_ligne<<2)&&((win->cpu->instruct_adr&0x0FFFFFFF) <= (win->curr_ligne+nbligne<<2))) - { - HBRUSH brjaune = CreateSolidBrush(RGB(255, 255, 0)); - SetBkColor(mem_dc, RGB(255, 255, 0)); - rect.top = (((win->cpu->instruct_adr&0x0FFFFFFF)>>2) - win->curr_ligne)*fontsize.cy; - rect.bottom = rect.top + fontsize.cy; - FillRect(mem_dc, &rect, brjaune); - des_arm_instructions_set[INDEX(win->cpu->instruction)](win->cpu->instruct_adr, win->cpu->instruction, txt); - sprintf(text, "%04X:%04X %08X %s", (int)((win->cpu->instruct_adr&0x0FFFFFFF)>>16), (int)(win->cpu->instruct_adr&0xFFFF), (int)win->cpu->instruction, txt); - DrawText(mem_dc, text, -1, &rect, DT_TOP | DT_LEFT | DT_NOPREFIX); - DeleteObject(brjaune); - } - } - else - { /* thumb display */ - u32 i; - u32 adr; - if (win->autoup) - win->curr_ligne = (win->cpu->instruct_adr >> 1) - (win->curr_ligne % nbligne) ; - - adr = win->curr_ligne*2; - - for(i = 0; i < nbligne; ++i) - { - u32 ins = MMU_read16(win->cpu->proc_ID, adr); - des_thumb_instructions_set[ins>>6](adr, ins, txt); - sprintf(text, "%04X:%04X %04X %s", (int)(adr>>16), (int)(adr&0xFFFF), (int)ins, txt); - DrawText(mem_dc, text, -1, &rect, DT_TOP | DT_LEFT | DT_NOPREFIX); - rect.top+=fontsize.cy; - adr += 2; - } - - if(((win->cpu->instruct_adr&0x0FFFFFFF) >= win->curr_ligne<<1)&&((win->cpu->instruct_adr&0x0FFFFFFF) <= (win->curr_ligne+nbligne<<1))) - { - HBRUSH brjaune = CreateSolidBrush(RGB(255, 255, 0)); - SetBkColor(mem_dc, RGB(255, 255, 0)); - - rect.top = (((win->cpu->instruct_adr&0x0FFFFFFF)>>1) - win->curr_ligne)*fontsize.cy; - rect.bottom = rect.top + fontsize.cy; - FillRect(mem_dc, &rect, brjaune); - des_thumb_instructions_set[((win->cpu->instruction)&0xFFFF)>>6](win->cpu->instruct_adr, win->cpu->instruction&0xFFFF, txt); - sprintf(text, "%04X:%04X %04X %s", (int)((win->cpu->instruct_adr&0x0FFFFFFF)>>16), (int)(win->cpu->instruct_adr&0xFFFF), (int)(win->cpu->instruction&0xFFFF), txt); - DrawText(mem_dc, text, -1, &rect, DT_TOP | DT_LEFT | DT_NOPREFIX); - DeleteObject(brjaune); - } - } - - BitBlt(hdc, 0, 0, lg, ht, mem_dc, 0, 0, SRCCOPY); - - DeleteDC(mem_dc); - DeleteObject(mem_bmp); - - EndPaint(hwnd, &ps); - return 1; -} - -LRESULT DisViewDialog_OnPaint(HWND hwnd, disview_struct *win, WPARAM wParam, LPARAM lParam) -{ - HDC hdc; - PAINTSTRUCT ps; - TCHAR text[80]; - u32 i; - - hdc = BeginPaint(hwnd, &ps); - - for(i = 0; i < 16; ++i) - { - sprintf(text, "%08X", (int)win->cpu->R[i]); - SetWindowText(GetDlgItem(hwnd, IDC_R0+i), text); - } - - #define OFF 16 - - SetBkMode(hdc, TRANSPARENT); - if(win->cpu->CPSR.bits.N) - SetTextColor(hdc, RGB(255,0,0)); - else - SetTextColor(hdc, RGB(70, 70, 70)); - TextOut(hdc, 452+OFF, 238, "N", 1); - - if(win->cpu->CPSR.bits.Z) - SetTextColor(hdc, RGB(255,0,0)); - else - SetTextColor(hdc, RGB(70, 70, 70)); - TextOut(hdc, 464+OFF, 238, "Z", 1); - - if(win->cpu->CPSR.bits.C) - SetTextColor(hdc, RGB(255,0,0)); - else - SetTextColor(hdc, RGB(70, 70, 70)); - TextOut(hdc, 475+OFF, 238, "C", 1); - - if(win->cpu->CPSR.bits.V) - SetTextColor(hdc, RGB(255,0,0)); - else - SetTextColor(hdc, RGB(70, 70, 70)); - TextOut(hdc, 486+OFF, 238, "V", 1); - - if(win->cpu->CPSR.bits.Q) - SetTextColor(hdc, RGB(255,0,0)); - else - SetTextColor(hdc, RGB(70, 70, 70)); - TextOut(hdc, 497+OFF, 238, "Q", 1); - - if(!win->cpu->CPSR.bits.I) - SetTextColor(hdc, RGB(255,0,0)); - else - SetTextColor(hdc, RGB(70, 70, 70)); - TextOut(hdc, 508+OFF, 238, "I", 1); - - sprintf(text, "%02X", (int)win->cpu->CPSR.bits.mode); - SetWindowText(GetDlgItem(hwnd, IDC_MODE), text); - - sprintf(text, "%08X", MMU.timer[0][0]);//win->cpu->SPSR); - SetWindowText(GetDlgItem(hwnd, IDC_TMP), text); - - EndPaint(hwnd, &ps); - return 1; -} - -// =================================================== ARM7 -LRESULT CALLBACK ViewDisasm_ARM7BoxProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch(msg) - { - case WM_NCCREATE: - SetScrollRange(hwnd, SB_VERT, 0, 0x3FFFFF7, TRUE); - SetScrollPos(hwnd, SB_VERT, 10, TRUE); - return 1; - - case WM_NCDESTROY: - //free(win); - return 1; - - case WM_PAINT: - DisViewBox_OnPaint(hwnd, DisView7, wParam, lParam); - return 1; - - case WM_VSCROLL : - { - RECT rect; - SIZE fontsize; - HDC dc; - HFONT old; - int nbligne; - - GetClientRect(hwnd, &rect); - dc = GetDC(hwnd); - old = (HFONT)SelectObject(dc, GetStockObject(SYSTEM_FIXED_FONT)); - GetTextExtentPoint32(dc, "0", 1, &fontsize); - - nbligne = (rect.bottom - rect.top)/fontsize.cy; - - switch LOWORD(wParam) - { - case SB_LINEDOWN : - DisView7->curr_ligne = std::min(0x3FFFFF7*(1+DisView7->cpu->CPSR.bits.T), DisView7->curr_ligne+1); - break; - case SB_LINEUP : - DisView7->curr_ligne = (u32)std::max(0, (s32)DisView7->curr_ligne-1); - break; - case SB_PAGEDOWN : - DisView7->curr_ligne = std::min(0x3FFFFF7*(1+DisView7->cpu->CPSR.bits.T), DisView7->curr_ligne+nbligne); - break; - case SB_PAGEUP : - DisView7->curr_ligne = (u32)std::max(0, DisView7->curr_ligne-nbligne); - break; - } - - SelectObject(dc, old); - SetScrollPos(hwnd, SB_VERT, DisView7->curr_ligne, TRUE); - InvalidateRect(hwnd, NULL, FALSE); - } - return 1; - - case WM_ERASEBKGND: - return 1; - } - return FALSE; -} - -BOOL CALLBACK ViewDisasm_ARM7Proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - //bail out early if the dialog isnt initialized - if(!DisView7 && message != WM_INITDIALOG) - return false; - - switch (message) - { - case WM_INITDIALOG : - { - SetWindowText(hwnd, "ARM7 Disassembler"); - SetDlgItemInt(hwnd, IDC_SETPNUM, 1, FALSE); - SendMessage(GetDlgItem(hwnd, IDC_AUTO_DES), BM_SETCHECK, TRUE, 0); - DisView7 = new disview_struct; - memset(DisView7, 0, sizeof(disview_struct)); - DisView7->cpu = &NDS_ARM7; - DisView7->autoup_secs = 5; - SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), - UDM_SETRANGE, 0, MAKELONG(99, 1)); - SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), - UDM_SETPOS32, 0, DisView7->autoup_secs); - DisViewWnd[1] = NULL; - return 1; - } - case WM_CLOSE : - { - if(DisView7->autoup) - { - KillTimer(hwnd, IDT_VIEW_DISASM7); - DisView7->autoup = false; - } +disview_struct *DisView9 = NULL; + +static HWND DisViewWnd[2] = {NULL, NULL}; + +#define INDEX(i) ((((i)>>16)&0xFF0)|(((i)>>4)&0xF)) + +LRESULT DisViewBox_OnPaint(HWND hwnd, disview_struct *win, WPARAM wParam, LPARAM lParam) +{ + HDC hdc; + PAINTSTRUCT ps; + SIZE fontsize; + TCHAR text[100]; + TCHAR txt[100]; + RECT rect; + int lg; + int ht; + HDC mem_dc; + HBITMAP mem_bmp; + u32 nbligne; + + GetClientRect(hwnd, &rect); + lg = rect.right - rect.left; + ht = rect.bottom - rect.top; + + hdc = BeginPaint(hwnd, &ps); + + mem_dc = CreateCompatibleDC(hdc); + mem_bmp = CreateCompatibleBitmap(hdc, lg, ht); + SelectObject(mem_dc, mem_bmp); + + FillRect(mem_dc, &rect, (HBRUSH)GetStockObject(WHITE_BRUSH)); + + SelectObject(mem_dc, GetStockObject(SYSTEM_FIXED_FONT)); + + GetTextExtentPoint32(mem_dc, "0", 1, &fontsize); + + nbligne = ht/fontsize.cy; + + SetTextColor(mem_dc, RGB(0,0,0)); + + if((win->mode==1) || ((win->mode==0) && (win->cpu->CPSR.bits.T == 0))) + { + u32 i; + u32 adr; + + if (win->autoup||win->autogo) + win->curr_ligne = (win->cpu->instruct_adr >> 2) - (win->curr_ligne % nbligne) ; + adr = win->curr_ligne*4; + + for(i = 0; i < nbligne; ++i) + { + u32 ins = MMU_read32(win->cpu->proc_ID, adr); + des_arm_instructions_set[INDEX(ins)](adr, ins, txt); + sprintf(text, "%04X:%04X %08X %s", (int)(adr>>16), (int)(adr&0xFFFF), (int)ins, txt); + DrawText(mem_dc, text, -1, &rect, DT_TOP | DT_LEFT | DT_NOPREFIX); + rect.top+=fontsize.cy; + adr += 4; + } + + + + if(((win->cpu->instruct_adr&0x0FFFFFFF) >= win->curr_ligne<<2)&&((win->cpu->instruct_adr&0x0FFFFFFF) <= (win->curr_ligne+nbligne<<2))) + { + HBRUSH brjaune = CreateSolidBrush(RGB(255, 255, 0)); + SetBkColor(mem_dc, RGB(255, 255, 0)); + rect.top = (((win->cpu->instruct_adr&0x0FFFFFFF)>>2) - win->curr_ligne)*fontsize.cy; + rect.bottom = rect.top + fontsize.cy; + FillRect(mem_dc, &rect, brjaune); + des_arm_instructions_set[INDEX(win->cpu->instruction)](win->cpu->instruct_adr, win->cpu->instruction, txt); + sprintf(text, "%04X:%04X %08X %s", (int)((win->cpu->instruct_adr&0x0FFFFFFF)>>16), (int)(win->cpu->instruct_adr&0xFFFF), (int)win->cpu->instruction, txt); + DrawText(mem_dc, text, -1, &rect, DT_TOP | DT_LEFT | DT_NOPREFIX); + DeleteObject(brjaune); + } + } + else + { /* thumb display */ + u32 i; + u32 adr; + if (win->autoup) + win->curr_ligne = (win->cpu->instruct_adr >> 1) - (win->curr_ligne % nbligne) ; + + adr = win->curr_ligne*2; + + for(i = 0; i < nbligne; ++i) + { + u32 ins = MMU_read16(win->cpu->proc_ID, adr); + des_thumb_instructions_set[ins>>6](adr, ins, txt); + sprintf(text, "%04X:%04X %04X %s", (int)(adr>>16), (int)(adr&0xFFFF), (int)ins, txt); + DrawText(mem_dc, text, -1, &rect, DT_TOP | DT_LEFT | DT_NOPREFIX); + rect.top+=fontsize.cy; + adr += 2; + } + + if(((win->cpu->instruct_adr&0x0FFFFFFF) >= win->curr_ligne<<1)&&((win->cpu->instruct_adr&0x0FFFFFFF) <= (win->curr_ligne+nbligne<<1))) + { + HBRUSH brjaune = CreateSolidBrush(RGB(255, 255, 0)); + SetBkColor(mem_dc, RGB(255, 255, 0)); + + rect.top = (((win->cpu->instruct_adr&0x0FFFFFFF)>>1) - win->curr_ligne)*fontsize.cy; + rect.bottom = rect.top + fontsize.cy; + FillRect(mem_dc, &rect, brjaune); + des_thumb_instructions_set[((win->cpu->instruction)&0xFFFF)>>6](win->cpu->instruct_adr, win->cpu->instruction&0xFFFF, txt); + sprintf(text, "%04X:%04X %04X %s", (int)((win->cpu->instruct_adr&0x0FFFFFFF)>>16), (int)(win->cpu->instruct_adr&0xFFFF), (int)(win->cpu->instruction&0xFFFF), txt); + DrawText(mem_dc, text, -1, &rect, DT_TOP | DT_LEFT | DT_NOPREFIX); + DeleteObject(brjaune); + } + } + + BitBlt(hdc, 0, 0, lg, ht, mem_dc, 0, 0, SRCCOPY); + + DeleteDC(mem_dc); + DeleteObject(mem_bmp); + + EndPaint(hwnd, &ps); + return 1; +} + +LRESULT DisViewDialog_OnPaint(HWND hwnd, disview_struct *win, WPARAM wParam, LPARAM lParam) +{ + HDC hdc; + PAINTSTRUCT ps; + TCHAR text[80]; + u32 i; + + hdc = BeginPaint(hwnd, &ps); + + for(i = 0; i < 16; ++i) + { + sprintf(text, "%08X", (int)win->cpu->R[i]); + SetWindowText(GetDlgItem(hwnd, IDC_R0+i), text); + } + + #define OFF 16 + + SetBkMode(hdc, TRANSPARENT); + if(win->cpu->CPSR.bits.N) + SetTextColor(hdc, RGB(255,0,0)); + else + SetTextColor(hdc, RGB(70, 70, 70)); + TextOut(hdc, 452+OFF, 238, "N", 1); + + if(win->cpu->CPSR.bits.Z) + SetTextColor(hdc, RGB(255,0,0)); + else + SetTextColor(hdc, RGB(70, 70, 70)); + TextOut(hdc, 464+OFF, 238, "Z", 1); + + if(win->cpu->CPSR.bits.C) + SetTextColor(hdc, RGB(255,0,0)); + else + SetTextColor(hdc, RGB(70, 70, 70)); + TextOut(hdc, 475+OFF, 238, "C", 1); + + if(win->cpu->CPSR.bits.V) + SetTextColor(hdc, RGB(255,0,0)); + else + SetTextColor(hdc, RGB(70, 70, 70)); + TextOut(hdc, 486+OFF, 238, "V", 1); + + if(win->cpu->CPSR.bits.Q) + SetTextColor(hdc, RGB(255,0,0)); + else + SetTextColor(hdc, RGB(70, 70, 70)); + TextOut(hdc, 497+OFF, 238, "Q", 1); + + if(!win->cpu->CPSR.bits.I) + SetTextColor(hdc, RGB(255,0,0)); + else + SetTextColor(hdc, RGB(70, 70, 70)); + TextOut(hdc, 508+OFF, 238, "I", 1); + + sprintf(text, "%02X", (int)win->cpu->CPSR.bits.mode); + SetWindowText(GetDlgItem(hwnd, IDC_MODE), text); + + sprintf(text, "%08X", MMU.timer[0][0]);//win->cpu->SPSR); + SetWindowText(GetDlgItem(hwnd, IDC_TMP), text); + + EndPaint(hwnd, &ps); + return 1; +} + +// =================================================== ARM7 +LRESULT CALLBACK ViewDisasm_ARM7BoxProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch(msg) + { + case WM_NCCREATE: + SetScrollRange(hwnd, SB_VERT, 0, 0x3FFFFF7, TRUE); + SetScrollPos(hwnd, SB_VERT, 10, TRUE); + return 1; + + case WM_NCDESTROY: + //free(win); + return 1; + + case WM_PAINT: + DisViewBox_OnPaint(hwnd, DisView7, wParam, lParam); + return 1; + + case WM_VSCROLL : + { + RECT rect; + SIZE fontsize; + HDC dc; + HFONT old; + int nbligne; + + GetClientRect(hwnd, &rect); + dc = GetDC(hwnd); + old = (HFONT)SelectObject(dc, GetStockObject(SYSTEM_FIXED_FONT)); + GetTextExtentPoint32(dc, "0", 1, &fontsize); + + nbligne = (rect.bottom - rect.top)/fontsize.cy; + + switch LOWORD(wParam) + { + case SB_LINEDOWN : + DisView7->curr_ligne = std::min(0x3FFFFF7*(1+DisView7->cpu->CPSR.bits.T), DisView7->curr_ligne+1); + break; + case SB_LINEUP : + DisView7->curr_ligne = (u32)std::max(0, (s32)DisView7->curr_ligne-1); + break; + case SB_PAGEDOWN : + DisView7->curr_ligne = std::min(0x3FFFFF7*(1+DisView7->cpu->CPSR.bits.T), DisView7->curr_ligne+nbligne); + break; + case SB_PAGEUP : + DisView7->curr_ligne = (u32)std::max(0, DisView7->curr_ligne-nbligne); + break; + } + + SelectObject(dc, old); + SetScrollPos(hwnd, SB_VERT, DisView7->curr_ligne, TRUE); + InvalidateRect(hwnd, NULL, FALSE); + } + return 1; + + case WM_ERASEBKGND: + return 1; + } + return FALSE; +} + +BOOL CALLBACK ViewDisasm_ARM7Proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + //bail out early if the dialog isnt initialized + if(!DisView7 && message != WM_INITDIALOG) + return false; + + switch (message) + { + case WM_INITDIALOG : + { + SetWindowText(hwnd, "ARM7 Disassembler"); + SetDlgItemInt(hwnd, IDC_SETPNUM, 1, FALSE); + SendMessage(GetDlgItem(hwnd, IDC_AUTO_DES), BM_SETCHECK, TRUE, 0); + DisView7 = new disview_struct; + memset(DisView7, 0, sizeof(disview_struct)); + DisView7->cpu = &NDS_ARM7; + DisView7->autoup_secs = 5; + SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), + UDM_SETRANGE, 0, MAKELONG(99, 1)); + SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), + UDM_SETPOS32, 0, DisView7->autoup_secs); + DisViewWnd[1] = NULL; + return 1; + } + case WM_CLOSE : + { + if(DisView7->autoup) + { + KillTimer(hwnd, IDT_VIEW_DISASM7); + DisView7->autoup = false; + } if (DisView7!=NULL) { delete DisView7; @@ -321,243 +322,243 @@ BOOL CALLBACK ViewDisasm_ARM7Proc (HWND hwnd, UINT message, WPARAM wParam, LPARA } DisViewWnd[1] = NULL; //INFO("Close ARM7 disassembler\n"); - PostQuitMessage(0); - return 1; - } - case WM_PAINT: - DisViewDialog_OnPaint(hwnd, DisView7, wParam, lParam); - return 1; - case WM_TIMER: - SendMessage(hwnd, WM_COMMAND, IDC_REFRESH, 0); - return 1; - case WM_COMMAND : - switch (LOWORD (wParam)) - { - case IDC_FERMER : - SendMessage(hwnd, WM_CLOSE, 0, 0); - return 0; - case IDC_AUTO_DES : - /* address to line correction */ - if ((DisView7->cpu->CPSR.bits.T) && (DisView7->mode == 1)) { - /* from arm to thumb, line * 2*/ - DisView7->curr_ligne <<= 1 ; - } else if (!(DisView7->cpu->CPSR.bits.T) && (DisView7->mode == 2)) { - /* from thumb to arm, line / 2 */ - DisView7->curr_ligne >>= 1 ; - } - DisView7->mode = 0; - InvalidateRect(GetDlgItem(hwnd, IDC_DES_BOX), NULL, FALSE); - return 1; - case IDC_ARM : - /* address to line correction */ - if ((DisView7->mode==2) || ((DisView7->mode==0) && (DisView7->cpu->CPSR.bits.T))) { - DisView7->curr_ligne >>= 1 ; - } ; - DisView7->mode = 1; - InvalidateRect(GetDlgItem(hwnd, IDC_DES_BOX), NULL, FALSE); - return 1; - case IDC_THUMB : - /* address to line correction */ - if ((DisView7->mode==1) || ((DisView7->mode==0) && !(DisView7->cpu->CPSR.bits.T))) { - DisView7->curr_ligne <<= 1 ; - } ; - DisView7->mode = 2; - InvalidateRect(GetDlgItem(hwnd, IDC_DES_BOX), NULL, FALSE); - return 1; - case IDC_AUTO_UPDATE : - if(DisView7->autoup) - { - EnableWindow(GetDlgItem(hwnd, IDC_AUTOUPDATE_ASM), TRUE); - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), false); - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), false); - KillTimer(hwnd, IDT_VIEW_DISASM7); - DisView7->autoup = FALSE; - return 1; - } - EnableWindow(GetDlgItem(hwnd, IDC_AUTOUPDATE_ASM), FALSE); - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), true); - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), true); - DisView7->autoup = TRUE; - SetTimer(hwnd, IDT_VIEW_DISASM7, DisView7->autoup_secs*1000, (TIMERPROC) NULL); - return 1; - case IDC_STEP : // TODO: draw in DD - { - int ndstep; - ndstep = GetDlgItemInt(hwnd, IDC_SETPNUM, NULL, FALSE); - NDS_exec(ndstep); - } - return 1; - case IDC_GO : - { - u16 i; - char tmp[16]; - int lg = GetDlgItemText(hwnd, IDC_GOTODES, tmp, 16); - u32 adr = 0; - for(i = 0; i='A')&&(tmp[i]<='F')) - { - adr = adr*16 + (tmp[i]-'A'+10); - continue; - } - if((tmp[i]>='0')&&(tmp[i]<='9')) - { - adr = adr*16 + (tmp[i]-'0'); - continue; - } - } - /* address to line correction */ - switch (DisView7->mode) { - case 0: /* auto */ - DisView7->curr_ligne = adr>>1; - if (DisView7->cpu->CPSR.bits.T) { - DisView7->curr_ligne = adr>>1; - } - break ; - case 1: /* thumb */ - DisView7->curr_ligne = adr>>2; - break ; - case 2: /* arm */ - DisView7->curr_ligne = adr>>1; - break ; - } ; - InvalidateRect(hwnd, NULL, FALSE); - } - return 1; - case IDC_REFRESH: - DisView7->autogo=true; - InvalidateRect(GetDlgItem(hwnd, IDC_DES_BOX), NULL, FALSE); - DisView7->autogo=false; - InvalidateRect(hwnd, NULL, FALSE); - return 1; - case IDC_AUTO_UPDATE_SECS: - { - u16 t = GetDlgItemInt(hwnd, IDC_AUTO_UPDATE_SECS, FALSE, TRUE); + PostQuitMessage(0); + return 1; + } + case WM_PAINT: + DisViewDialog_OnPaint(hwnd, DisView7, wParam, lParam); + return 1; + case WM_TIMER: + SendMessage(hwnd, WM_COMMAND, IDC_REFRESH, 0); + return 1; + case WM_COMMAND : + switch (LOWORD (wParam)) + { + case IDC_FERMER : + SendMessage(hwnd, WM_CLOSE, 0, 0); + return 0; + case IDC_AUTO_DES : + /* address to line correction */ + if ((DisView7->cpu->CPSR.bits.T) && (DisView7->mode == 1)) { + /* from arm to thumb, line * 2*/ + DisView7->curr_ligne <<= 1 ; + } else if (!(DisView7->cpu->CPSR.bits.T) && (DisView7->mode == 2)) { + /* from thumb to arm, line / 2 */ + DisView7->curr_ligne >>= 1 ; + } + DisView7->mode = 0; + InvalidateRect(GetDlgItem(hwnd, IDC_DES_BOX), NULL, FALSE); + return 1; + case IDC_ARM : + /* address to line correction */ + if ((DisView7->mode==2) || ((DisView7->mode==0) && (DisView7->cpu->CPSR.bits.T))) { + DisView7->curr_ligne >>= 1 ; + } ; + DisView7->mode = 1; + InvalidateRect(GetDlgItem(hwnd, IDC_DES_BOX), NULL, FALSE); + return 1; + case IDC_THUMB : + /* address to line correction */ + if ((DisView7->mode==1) || ((DisView7->mode==0) && !(DisView7->cpu->CPSR.bits.T))) { + DisView7->curr_ligne <<= 1 ; + } ; + DisView7->mode = 2; + InvalidateRect(GetDlgItem(hwnd, IDC_DES_BOX), NULL, FALSE); + return 1; + case IDC_AUTO_UPDATE : + if(DisView7->autoup) + { + EnableWindow(GetDlgItem(hwnd, IDC_AUTOUPDATE_ASM), TRUE); + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), false); + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), false); + KillTimer(hwnd, IDT_VIEW_DISASM7); + DisView7->autoup = FALSE; + return 1; + } + EnableWindow(GetDlgItem(hwnd, IDC_AUTOUPDATE_ASM), FALSE); + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), true); + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), true); + DisView7->autoup = TRUE; + SetTimer(hwnd, IDT_VIEW_DISASM7, DisView7->autoup_secs*1000, (TIMERPROC) NULL); + return 1; + case IDC_STEP : // TODO: draw in DD + { + int ndstep; + ndstep = GetDlgItemInt(hwnd, IDC_SETPNUM, NULL, FALSE); + NDS_exec(ndstep); + } + return 1; + case IDC_GO : + { + u16 i; + char tmp[16]; + int lg = GetDlgItemText(hwnd, IDC_GOTODES, tmp, 16); + u32 adr = 0; + for(i = 0; i='A')&&(tmp[i]<='F')) + { + adr = adr*16 + (tmp[i]-'A'+10); + continue; + } + if((tmp[i]>='0')&&(tmp[i]<='9')) + { + adr = adr*16 + (tmp[i]-'0'); + continue; + } + } + /* address to line correction */ + switch (DisView7->mode) { + case 0: /* auto */ + DisView7->curr_ligne = adr>>1; + if (DisView7->cpu->CPSR.bits.T) { + DisView7->curr_ligne = adr>>1; + } + break ; + case 1: /* thumb */ + DisView7->curr_ligne = adr>>2; + break ; + case 2: /* arm */ + DisView7->curr_ligne = adr>>1; + break ; + } ; + InvalidateRect(hwnd, NULL, FALSE); + } + return 1; + case IDC_REFRESH: + DisView7->autogo=true; + InvalidateRect(GetDlgItem(hwnd, IDC_DES_BOX), NULL, FALSE); + DisView7->autogo=false; + InvalidateRect(hwnd, NULL, FALSE); + return 1; + case IDC_AUTO_UPDATE_SECS: + { + u16 t = GetDlgItemInt(hwnd, IDC_AUTO_UPDATE_SECS, FALSE, TRUE); if (!DisView7) { SendMessage(hwnd, WM_INITDIALOG, 0, 0); - } - if (t != DisView7->autoup_secs) - { - DisView7->autoup_secs = t; - if (DisView7->autoup) - SetTimer(hwnd, IDT_VIEW_DISASM7, - DisView7->autoup_secs*1000, (TIMERPROC) NULL); - } - } - return 1; - case IDC_AUTOUPDATE_ASM: - { - if (DisViewWnd[1] == NULL) - { - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE), FALSE); - DisViewWnd[1] = GetDlgItem(hwnd, IDC_DES_BOX); - return 1; - } - DisViewWnd[1] = NULL; - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE), TRUE); - } - return 1; - return 1; - } - return 0; - } - - return FALSE; -} - -// =================================================== ARM9 -LRESULT CALLBACK ViewDisasm_ARM9BoxProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch(msg) - { - case WM_NCCREATE: - SetScrollRange(hwnd, SB_VERT, 0, 0x3FFFFF7, TRUE); - SetScrollPos(hwnd, SB_VERT, 10, TRUE); - return 1; - - case WM_NCDESTROY: - //free(win); - return 1; - - case WM_PAINT: - DisViewBox_OnPaint(hwnd, DisView9, wParam, lParam); - return 1; - - case WM_VSCROLL : - { - RECT rect; - SIZE fontsize; - HDC dc; - HFONT old; - int nbligne; - - GetClientRect(hwnd, &rect); - dc = GetDC(hwnd); - old = (HFONT)SelectObject(dc, GetStockObject(SYSTEM_FIXED_FONT)); - GetTextExtentPoint32(dc, "0", 1, &fontsize); - - nbligne = (rect.bottom - rect.top)/fontsize.cy; - - switch LOWORD(wParam) - { - case SB_LINEDOWN : - DisView9->curr_ligne = std::min(0x3FFFFF7*(1+DisView9->cpu->CPSR.bits.T), DisView9->curr_ligne+1); - break; - case SB_LINEUP : - DisView9->curr_ligne = (u32)std::max(0, (s32)DisView9->curr_ligne-1); - break; - case SB_PAGEDOWN : - DisView9->curr_ligne = std::min(0x3FFFFF7*(1+DisView9->cpu->CPSR.bits.T), DisView9->curr_ligne+nbligne); - break; - case SB_PAGEUP : - DisView9->curr_ligne = (u32)std::max(0, DisView9->curr_ligne-nbligne); - break; - } - - SelectObject(dc, old); - SetScrollPos(hwnd, SB_VERT, DisView9->curr_ligne, TRUE); - InvalidateRect(hwnd, NULL, FALSE); - } - return 1; - - case WM_ERASEBKGND: - return 1; - } - return FALSE; -} - -BOOL CALLBACK ViewDisasm_ARM9Proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - //bail out early if the dialog isnt initialized - if(!DisView9 && message != WM_INITDIALOG) - return false; - - switch (message) - { - case WM_INITDIALOG : - { - SetWindowText(hwnd, "ARM9 Disassembler"); - SetDlgItemInt(hwnd, IDC_SETPNUM, 1, FALSE); - SendMessage(GetDlgItem(hwnd, IDC_AUTO_DES), BM_SETCHECK, TRUE, 0); - DisView9 = new disview_struct; - memset(DisView9, 0, sizeof(disview_struct)); - DisView9->cpu = &NDS_ARM9; - DisView9->autoup_secs = 5; - SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), - UDM_SETRANGE, 0, MAKELONG(99, 1)); - SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), - UDM_SETPOS32, 0, DisView9->autoup_secs); - DisViewWnd[0] = NULL; - return 1; - } - case WM_CLOSE : - { - if(DisView9->autoup) - { - KillTimer(hwnd, IDT_VIEW_DISASM9); - DisView9->autoup = false; - } + } + if (t != DisView7->autoup_secs) + { + DisView7->autoup_secs = t; + if (DisView7->autoup) + SetTimer(hwnd, IDT_VIEW_DISASM7, + DisView7->autoup_secs*1000, (TIMERPROC) NULL); + } + } + return 1; + case IDC_AUTOUPDATE_ASM: + { + if (DisViewWnd[1] == NULL) + { + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE), FALSE); + DisViewWnd[1] = GetDlgItem(hwnd, IDC_DES_BOX); + return 1; + } + DisViewWnd[1] = NULL; + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE), TRUE); + } + return 1; + return 1; + } + return 0; + } + + return FALSE; +} + +// =================================================== ARM9 +LRESULT CALLBACK ViewDisasm_ARM9BoxProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch(msg) + { + case WM_NCCREATE: + SetScrollRange(hwnd, SB_VERT, 0, 0x3FFFFF7, TRUE); + SetScrollPos(hwnd, SB_VERT, 10, TRUE); + return 1; + + case WM_NCDESTROY: + //free(win); + return 1; + + case WM_PAINT: + DisViewBox_OnPaint(hwnd, DisView9, wParam, lParam); + return 1; + + case WM_VSCROLL : + { + RECT rect; + SIZE fontsize; + HDC dc; + HFONT old; + int nbligne; + + GetClientRect(hwnd, &rect); + dc = GetDC(hwnd); + old = (HFONT)SelectObject(dc, GetStockObject(SYSTEM_FIXED_FONT)); + GetTextExtentPoint32(dc, "0", 1, &fontsize); + + nbligne = (rect.bottom - rect.top)/fontsize.cy; + + switch LOWORD(wParam) + { + case SB_LINEDOWN : + DisView9->curr_ligne = std::min(0x3FFFFF7*(1+DisView9->cpu->CPSR.bits.T), DisView9->curr_ligne+1); + break; + case SB_LINEUP : + DisView9->curr_ligne = (u32)std::max(0, (s32)DisView9->curr_ligne-1); + break; + case SB_PAGEDOWN : + DisView9->curr_ligne = std::min(0x3FFFFF7*(1+DisView9->cpu->CPSR.bits.T), DisView9->curr_ligne+nbligne); + break; + case SB_PAGEUP : + DisView9->curr_ligne = (u32)std::max(0, DisView9->curr_ligne-nbligne); + break; + } + + SelectObject(dc, old); + SetScrollPos(hwnd, SB_VERT, DisView9->curr_ligne, TRUE); + InvalidateRect(hwnd, NULL, FALSE); + } + return 1; + + case WM_ERASEBKGND: + return 1; + } + return FALSE; +} + +BOOL CALLBACK ViewDisasm_ARM9Proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + //bail out early if the dialog isnt initialized + if(!DisView9 && message != WM_INITDIALOG) + return false; + + switch (message) + { + case WM_INITDIALOG : + { + SetWindowText(hwnd, "ARM9 Disassembler"); + SetDlgItemInt(hwnd, IDC_SETPNUM, 1, FALSE); + SendMessage(GetDlgItem(hwnd, IDC_AUTO_DES), BM_SETCHECK, TRUE, 0); + DisView9 = new disview_struct; + memset(DisView9, 0, sizeof(disview_struct)); + DisView9->cpu = &NDS_ARM9; + DisView9->autoup_secs = 5; + SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), + UDM_SETRANGE, 0, MAKELONG(99, 1)); + SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), + UDM_SETPOS32, 0, DisView9->autoup_secs); + DisViewWnd[0] = NULL; + return 1; + } + case WM_CLOSE : + { + if(DisView9->autoup) + { + KillTimer(hwnd, IDT_VIEW_DISASM9); + DisView9->autoup = false; + } if (DisView9!=NULL) { delete DisView9; @@ -565,164 +566,164 @@ BOOL CALLBACK ViewDisasm_ARM9Proc (HWND hwnd, UINT message, WPARAM wParam, LPARA } DisViewWnd[0] = NULL; //INFO("Close ARM9 disassembler\n"); - PostQuitMessage(0); - return 1; - } - case WM_PAINT: - DisViewDialog_OnPaint(hwnd, DisView9, wParam, lParam); - return 1; - case WM_TIMER: - SendMessage(hwnd, WM_COMMAND, IDC_REFRESH, 0); - return 1; - case WM_COMMAND : - switch (LOWORD (wParam)) - { - case IDC_FERMER : - SendMessage(hwnd, WM_CLOSE, 0, 0); - return 0; - case IDC_AUTO_DES : - /* address to line correction */ - if ((DisView9->cpu->CPSR.bits.T) && (DisView9->mode == 1)) { - /* from arm to thumb, line * 2*/ - DisView9->curr_ligne <<= 1 ; - } else if (!(DisView9->cpu->CPSR.bits.T) && (DisView9->mode == 2)) { - /* from thumb to arm, line / 2 */ - DisView9->curr_ligne >>= 1 ; - } - DisView9->mode = 0; - InvalidateRect(GetDlgItem(hwnd, IDC_DES_BOX), NULL, FALSE); - return 1; - case IDC_ARM : - /* address to line correction */ - if ((DisView9->mode==2) || ((DisView9->mode==0) && (DisView9->cpu->CPSR.bits.T))) { - DisView9->curr_ligne >>= 1 ; - } ; - DisView9->mode = 1; - InvalidateRect(GetDlgItem(hwnd, IDC_DES_BOX), NULL, FALSE); - return 1; - case IDC_THUMB : - /* address to line correction */ - if ((DisView9->mode==1) || ((DisView9->mode==0) && !(DisView9->cpu->CPSR.bits.T))) { - DisView9->curr_ligne <<= 1 ; - } ; - DisView9->mode = 2; - InvalidateRect(GetDlgItem(hwnd, IDC_DES_BOX), NULL, FALSE); - return 1; - case IDC_AUTO_UPDATE : - if(DisView9->autoup) - { - EnableWindow(GetDlgItem(hwnd, IDC_AUTOUPDATE_ASM), TRUE); - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), false); - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), false); - KillTimer(hwnd, IDT_VIEW_DISASM9); - DisView9->autoup = FALSE; - return 1; - } - EnableWindow(GetDlgItem(hwnd, IDC_AUTOUPDATE_ASM), FALSE); - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), true); - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), true); - DisView9->autoup = TRUE; - SetTimer(hwnd, IDT_VIEW_DISASM9, DisView9->autoup_secs*1000, (TIMERPROC) NULL); - return 1; - case IDC_STEP : // TODO: draw in DD - { - int ndstep; - ndstep = GetDlgItemInt(hwnd, IDC_SETPNUM, NULL, FALSE); - NDS_exec(ndstep); - } - return 1; - case IDC_GO : - { - u16 i; - char tmp[16]; - int lg = GetDlgItemText(hwnd, IDC_GOTODES, tmp, 16); - u32 adr = 0; - for(i = 0; i='A')&&(tmp[i]<='F')) - { - adr = adr*16 + (tmp[i]-'A'+10); - continue; - } - if((tmp[i]>='0')&&(tmp[i]<='9')) - { - adr = adr*16 + (tmp[i]-'0'); - continue; - } - } - /* address to line correction */ - switch (DisView9->mode) { - case 0: /* auto */ - DisView9->curr_ligne = adr>>1; - if (DisView9->cpu->CPSR.bits.T) { - DisView9->curr_ligne = adr>>1; - } - break ; - case 1: /* thumb */ - DisView9->curr_ligne = adr>>2; - break ; - case 2: /* arm */ - DisView9->curr_ligne = adr>>1; - break ; - } ; - InvalidateRect(hwnd, NULL, FALSE); - } - return 1; - case IDC_REFRESH: - DisView9->autogo=true; - InvalidateRect(GetDlgItem(hwnd, IDC_DES_BOX), NULL, FALSE); - DisView9->autogo=false; - InvalidateRect(hwnd, NULL, FALSE); - return 1; - case IDC_AUTO_UPDATE_SECS: - { - u16 t = GetDlgItemInt(hwnd, IDC_AUTO_UPDATE_SECS, FALSE, TRUE); + PostQuitMessage(0); + return 1; + } + case WM_PAINT: + DisViewDialog_OnPaint(hwnd, DisView9, wParam, lParam); + return 1; + case WM_TIMER: + SendMessage(hwnd, WM_COMMAND, IDC_REFRESH, 0); + return 1; + case WM_COMMAND : + switch (LOWORD (wParam)) + { + case IDC_FERMER : + SendMessage(hwnd, WM_CLOSE, 0, 0); + return 0; + case IDC_AUTO_DES : + /* address to line correction */ + if ((DisView9->cpu->CPSR.bits.T) && (DisView9->mode == 1)) { + /* from arm to thumb, line * 2*/ + DisView9->curr_ligne <<= 1 ; + } else if (!(DisView9->cpu->CPSR.bits.T) && (DisView9->mode == 2)) { + /* from thumb to arm, line / 2 */ + DisView9->curr_ligne >>= 1 ; + } + DisView9->mode = 0; + InvalidateRect(GetDlgItem(hwnd, IDC_DES_BOX), NULL, FALSE); + return 1; + case IDC_ARM : + /* address to line correction */ + if ((DisView9->mode==2) || ((DisView9->mode==0) && (DisView9->cpu->CPSR.bits.T))) { + DisView9->curr_ligne >>= 1 ; + } ; + DisView9->mode = 1; + InvalidateRect(GetDlgItem(hwnd, IDC_DES_BOX), NULL, FALSE); + return 1; + case IDC_THUMB : + /* address to line correction */ + if ((DisView9->mode==1) || ((DisView9->mode==0) && !(DisView9->cpu->CPSR.bits.T))) { + DisView9->curr_ligne <<= 1 ; + } ; + DisView9->mode = 2; + InvalidateRect(GetDlgItem(hwnd, IDC_DES_BOX), NULL, FALSE); + return 1; + case IDC_AUTO_UPDATE : + if(DisView9->autoup) + { + EnableWindow(GetDlgItem(hwnd, IDC_AUTOUPDATE_ASM), TRUE); + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), false); + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), false); + KillTimer(hwnd, IDT_VIEW_DISASM9); + DisView9->autoup = FALSE; + return 1; + } + EnableWindow(GetDlgItem(hwnd, IDC_AUTOUPDATE_ASM), FALSE); + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), true); + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), true); + DisView9->autoup = TRUE; + SetTimer(hwnd, IDT_VIEW_DISASM9, DisView9->autoup_secs*1000, (TIMERPROC) NULL); + return 1; + case IDC_STEP : // TODO: draw in DD + { + int ndstep; + ndstep = GetDlgItemInt(hwnd, IDC_SETPNUM, NULL, FALSE); + NDS_exec(ndstep); + } + return 1; + case IDC_GO : + { + u16 i; + char tmp[16]; + int lg = GetDlgItemText(hwnd, IDC_GOTODES, tmp, 16); + u32 adr = 0; + for(i = 0; i='A')&&(tmp[i]<='F')) + { + adr = adr*16 + (tmp[i]-'A'+10); + continue; + } + if((tmp[i]>='0')&&(tmp[i]<='9')) + { + adr = adr*16 + (tmp[i]-'0'); + continue; + } + } + /* address to line correction */ + switch (DisView9->mode) { + case 0: /* auto */ + DisView9->curr_ligne = adr>>1; + if (DisView9->cpu->CPSR.bits.T) { + DisView9->curr_ligne = adr>>1; + } + break ; + case 1: /* thumb */ + DisView9->curr_ligne = adr>>2; + break ; + case 2: /* arm */ + DisView9->curr_ligne = adr>>1; + break ; + } ; + InvalidateRect(hwnd, NULL, FALSE); + } + return 1; + case IDC_REFRESH: + DisView9->autogo=true; + InvalidateRect(GetDlgItem(hwnd, IDC_DES_BOX), NULL, FALSE); + DisView9->autogo=false; + InvalidateRect(hwnd, NULL, FALSE); + return 1; + case IDC_AUTO_UPDATE_SECS: + { + u16 t = GetDlgItemInt(hwnd, IDC_AUTO_UPDATE_SECS, FALSE, TRUE); if (!DisView9) { SendMessage(hwnd, WM_INITDIALOG, 0, 0); - } - if (t != DisView9->autoup_secs) - { - DisView9->autoup_secs = t; - if (DisView9->autoup) - SetTimer(hwnd, IDT_VIEW_DISASM9, - DisView9->autoup_secs*1000, (TIMERPROC) NULL); - } - } - return 1; - case IDC_AUTOUPDATE_ASM: - { - if (DisViewWnd[0] == NULL) - { - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE), FALSE); - DisViewWnd[0] = GetDlgItem(hwnd, IDC_DES_BOX); - return 1; - } - DisViewWnd[0] = NULL; - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE), TRUE); - } - return 1; - return 1; - } - return 0; - } - - return FALSE; -} - -void DisassemblerTools_Refresh(u8 proc) -{ - if (DisViewWnd[proc] == NULL) return; - if (proc == 0) - { - DisView9->autogo=true; - InvalidateRect(DisViewWnd[proc], NULL, FALSE); - DisView9->autogo=false; - } - else - { - DisView7->autogo=true; - InvalidateRect(DisViewWnd[proc], NULL, FALSE); - DisView7->autogo=false; - } + } + if (t != DisView9->autoup_secs) + { + DisView9->autoup_secs = t; + if (DisView9->autoup) + SetTimer(hwnd, IDT_VIEW_DISASM9, + DisView9->autoup_secs*1000, (TIMERPROC) NULL); + } + } + return 1; + case IDC_AUTOUPDATE_ASM: + { + if (DisViewWnd[0] == NULL) + { + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE), FALSE); + DisViewWnd[0] = GetDlgItem(hwnd, IDC_DES_BOX); + return 1; + } + DisViewWnd[0] = NULL; + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE), TRUE); + } + return 1; + return 1; + } + return 0; + } + + return FALSE; +} + +void DisassemblerTools_Refresh(u8 proc) +{ + if (DisViewWnd[proc] == NULL) return; + if (proc == 0) + { + DisView9->autogo=true; + InvalidateRect(DisViewWnd[proc], NULL, FALSE); + DisView9->autogo=false; + } + else + { + DisView7->autogo=true; + InvalidateRect(DisViewWnd[proc], NULL, FALSE); + DisView7->autogo=false; + } } \ No newline at end of file diff --git a/desmume/src/windows/lightView.cpp b/desmume/src/windows/lightView.cpp index 011bdcb14..594ee7110 100644 --- a/desmume/src/windows/lightView.cpp +++ b/desmume/src/windows/lightView.cpp @@ -1,184 +1,185 @@ -/* 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 "lightView.h" -#include "commctrl.h" -#include "colorctrl.h" -#include "gfx3d.h" -#include "resource.h" -#include "debug.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 -} - -typedef struct -{ - u32 autoup_secs; - bool autoup; -} lightsview_struct; - -lightsview_struct *LightsView = NULL; - -void LightView_OnPaintLight(HWND hwnd, 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 gfx3d module - gfx3d_glGetLightColor(index, &color); - gfx3d_glGetLightDirection(index, &direction); - - // Print Light Direction - sprintf(buffer, "%.8x", direction); - SetWindowText(GetDlgItem(hwnd, idcDir[index]), buffer); - - // Print Light Color - sprintf(buffer, "%.4x", color); - SetWindowText(GetDlgItem(hwnd, idcColorEdit[index]), buffer); - - // Set Light Color in ColorDisplay component - ColorCtrl_SetColor(GetDlgItem(hwnd, idcColorCtrl[index]), ColorConv_B5R5R5ToR8G8B8(color)); -} - -////////////////////////////////////////////////////////////////////////////// - -BOOL LightView_OnPaint(HWND hwnd, WPARAM wParam, LPARAM lParam) -{ - HDC hdc; - PAINTSTRUCT ps; - - hdc = BeginPaint(hwnd, &ps); - - LightView_OnPaintLight(hwnd, 0); - LightView_OnPaintLight(hwnd, 1); - LightView_OnPaintLight(hwnd, 2); - LightView_OnPaintLight(hwnd, 3); - - EndPaint(hwnd, &ps); - - return TRUE; -} - -BOOL CALLBACK ViewLightsProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - switch (message) - { - case WM_INITDIALOG: - LightsView = new lightsview_struct; - memset(LightsView, 0, sizeof(lightsview_struct)); - LightsView->autoup_secs = 5; - SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), - UDM_SETRANGE, 0, MAKELONG(99, 1)); - SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), - UDM_SETPOS32, 0, LightsView->autoup_secs); - break; - - case WM_CLOSE: - if(LightsView->autoup) - { - KillTimer(hwnd, IDT_VIEW_LIGHTS); - LightsView->autoup = false; +/* 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 "lightView.h" +#include "commctrl.h" +#include "colorctrl.h" +#include "gfx3d.h" +#include "resource.h" +#include "res_timer_ids.h" +#include "debug.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 +} + +typedef struct +{ + u32 autoup_secs; + bool autoup; +} lightsview_struct; + +lightsview_struct *LightsView = NULL; + +void LightView_OnPaintLight(HWND hwnd, 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 gfx3d module + gfx3d_glGetLightColor(index, &color); + gfx3d_glGetLightDirection(index, &direction); + + // Print Light Direction + sprintf(buffer, "%.8x", direction); + SetWindowText(GetDlgItem(hwnd, idcDir[index]), buffer); + + // Print Light Color + sprintf(buffer, "%.4x", color); + SetWindowText(GetDlgItem(hwnd, idcColorEdit[index]), buffer); + + // Set Light Color in ColorDisplay component + ColorCtrl_SetColor(GetDlgItem(hwnd, idcColorCtrl[index]), ColorConv_B5R5R5ToR8G8B8(color)); +} + +////////////////////////////////////////////////////////////////////////////// + +BOOL LightView_OnPaint(HWND hwnd, WPARAM wParam, LPARAM lParam) +{ + HDC hdc; + PAINTSTRUCT ps; + + hdc = BeginPaint(hwnd, &ps); + + LightView_OnPaintLight(hwnd, 0); + LightView_OnPaintLight(hwnd, 1); + LightView_OnPaintLight(hwnd, 2); + LightView_OnPaintLight(hwnd, 3); + + EndPaint(hwnd, &ps); + + return TRUE; +} + +BOOL CALLBACK ViewLightsProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + switch (message) + { + case WM_INITDIALOG: + LightsView = new lightsview_struct; + memset(LightsView, 0, sizeof(lightsview_struct)); + LightsView->autoup_secs = 5; + SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), + UDM_SETRANGE, 0, MAKELONG(99, 1)); + SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), + UDM_SETPOS32, 0, LightsView->autoup_secs); + break; + + case WM_CLOSE: + if(LightsView->autoup) + { + KillTimer(hwnd, IDT_VIEW_LIGHTS); + LightsView->autoup = false; } if (LightsView!=NULL) { delete LightsView; LightsView = NULL; - } + } //INFO("Close lights viewer dialog\n"); - PostQuitMessage(0); - break; - - case WM_PAINT: - LightView_OnPaint(hwnd, wParam, lParam); - break; - - case WM_TIMER: - SendMessage(hwnd, WM_COMMAND, IDC_REFRESH, 0); - return 1; - - case WM_COMMAND: - switch (LOWORD (wParam)) - { - case IDOK: - SendMessage(hwnd, WM_CLOSE, 0, 0); - return 1; - case IDC_AUTO_UPDATE : - if(LightsView->autoup) - { - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), false); - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), false); - KillTimer(hwnd, IDT_VIEW_LIGHTS); - LightsView->autoup = FALSE; - return 1; - } - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), true); - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), true); - LightsView->autoup = TRUE; - SetTimer(hwnd, IDT_VIEW_LIGHTS, LightsView->autoup_secs*1000, (TIMERPROC) NULL); - return 1; - case IDC_AUTO_UPDATE_SECS: - { - int t = GetDlgItemInt(hwnd, IDC_AUTO_UPDATE_SECS, FALSE, TRUE); + PostQuitMessage(0); + break; + + case WM_PAINT: + LightView_OnPaint(hwnd, wParam, lParam); + break; + + case WM_TIMER: + SendMessage(hwnd, WM_COMMAND, IDC_REFRESH, 0); + return 1; + + case WM_COMMAND: + switch (LOWORD (wParam)) + { + case IDOK: + SendMessage(hwnd, WM_CLOSE, 0, 0); + return 1; + case IDC_AUTO_UPDATE : + if(LightsView->autoup) + { + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), false); + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), false); + KillTimer(hwnd, IDT_VIEW_LIGHTS); + LightsView->autoup = FALSE; + return 1; + } + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), true); + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), true); + LightsView->autoup = TRUE; + SetTimer(hwnd, IDT_VIEW_LIGHTS, LightsView->autoup_secs*1000, (TIMERPROC) NULL); + return 1; + case IDC_AUTO_UPDATE_SECS: + { + int t = GetDlgItemInt(hwnd, IDC_AUTO_UPDATE_SECS, FALSE, TRUE); if (!LightsView) { SendMessage(hwnd, WM_INITDIALOG, 0, 0); - } - if (t != LightsView->autoup_secs) - { - LightsView->autoup_secs = t; - if (LightsView->autoup) - SetTimer(hwnd, IDT_VIEW_LIGHTS, - LightsView->autoup_secs*1000, (TIMERPROC) NULL); - } - } - return 1; - case IDC_REFRESH: - InvalidateRect(hwnd, NULL, FALSE); - return 1; - } - return 0; - } - return FALSE; -} + } + if (t != LightsView->autoup_secs) + { + LightsView->autoup_secs = t; + if (LightsView->autoup) + SetTimer(hwnd, IDT_VIEW_LIGHTS, + LightsView->autoup_secs*1000, (TIMERPROC) NULL); + } + } + return 1; + case IDC_REFRESH: + InvalidateRect(hwnd, NULL, FALSE); + return 1; + } + return 0; + } + return FALSE; +} diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index 386fafe9a..1752a803f 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -44,6 +44,7 @@ #include "../addons.h" #endif #include "resource.h" +#include "res_timer_ids.h" #include "memView.h" #include "disView.h" #include "ginfo.h" diff --git a/desmume/src/windows/mapView.cpp b/desmume/src/windows/mapView.cpp index 0fff52893..b9bb09d82 100644 --- a/desmume/src/windows/mapView.cpp +++ b/desmume/src/windows/mapView.cpp @@ -21,6 +21,7 @@ #include "mapView.h" #include "resource.h" +#include "res_timer_ids.h" #include #include "../MMU.h" diff --git a/desmume/src/windows/matrixView.cpp b/desmume/src/windows/matrixView.cpp index 42bdca24a..d1be75d28 100644 --- a/desmume/src/windows/matrixView.cpp +++ b/desmume/src/windows/matrixView.cpp @@ -21,6 +21,7 @@ #include #include "debug.h" #include "resource.h" +#include "res_timer_ids.h" #include "gfx3d.h" typedef struct diff --git a/desmume/src/windows/memView.cpp b/desmume/src/windows/memView.cpp index 215c0b18a..826dedad3 100644 --- a/desmume/src/windows/memView.cpp +++ b/desmume/src/windows/memView.cpp @@ -25,12 +25,13 @@ #include "../MMU.h" #include "debug.h" #include "resource.h" +#include "res_timer_ids.h" typedef struct { - u32 autoup_secs; - bool autoup; - + u32 autoup_secs; + bool autoup; + s8 cpu; u32 curr_ligne; u8 representation; @@ -205,8 +206,8 @@ LRESULT CALLBACK ViewMem_ARM7BoxProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM BOOL CALLBACK ViewMem_ARM7Proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { - //bail out early if the dialog isnt initialized - if(!MemView7 && message != WM_INITDIALOG) + //bail out early if the dialog isnt initialized + if(!MemView7 && message != WM_INITDIALOG) return false; switch (message) @@ -218,19 +219,19 @@ BOOL CALLBACK ViewMem_ARM7Proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM l MemView7 = new memview_struct; memset(MemView7, 0, sizeof(memview_struct)); MemView7->cpu = 1; - MemView7->autoup_secs = 5; - SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), - UDM_SETRANGE, 0, MAKELONG(99, 1)); - SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), + MemView7->autoup_secs = 5; + SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), + UDM_SETRANGE, 0, MAKELONG(99, 1)); + SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), UDM_SETPOS32, 0, MemView7->autoup_secs); return 0; } case WM_CLOSE: { - if(MemView7->autoup) - { - KillTimer(hwnd, IDT_VIEW_MEM7); - MemView7->autoup = false; + if(MemView7->autoup) + { + KillTimer(hwnd, IDT_VIEW_MEM7); + MemView7->autoup = false; } if (MemView7!=NULL) @@ -242,8 +243,8 @@ BOOL CALLBACK ViewMem_ARM7Proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM l PostQuitMessage(0); return 0; } - case WM_TIMER: - SendMessage(hwnd, WM_COMMAND, IDC_REFRESH, 0); + case WM_TIMER: + SendMessage(hwnd, WM_COMMAND, IDC_REFRESH, 0); return 1; case WM_COMMAND : @@ -264,38 +265,38 @@ BOOL CALLBACK ViewMem_ARM7Proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM l InvalidateRect(GetDlgItem(hwnd, IDC_MEM_BOX), NULL, FALSE); UpdateWindow(GetDlgItem(hwnd, IDC_MEM_BOX)); return 1; - case IDC_AUTO_UPDATE : - if(MemView7->autoup) - { - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), false); - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), false); - KillTimer(hwnd, IDT_VIEW_MEM7); - MemView7->autoup = FALSE; - return 1; - } - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), true); - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), true); - MemView7->autoup = TRUE; - SetTimer(hwnd, IDT_VIEW_MEM7, MemView7->autoup_secs*1000, (TIMERPROC) NULL); - return 1; - case IDC_AUTO_UPDATE_SECS: - { - int t = GetDlgItemInt(hwnd, IDC_AUTO_UPDATE_SECS, FALSE, TRUE); + case IDC_AUTO_UPDATE : + if(MemView7->autoup) + { + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), false); + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), false); + KillTimer(hwnd, IDT_VIEW_MEM7); + MemView7->autoup = FALSE; + return 1; + } + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), true); + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), true); + MemView7->autoup = TRUE; + SetTimer(hwnd, IDT_VIEW_MEM7, MemView7->autoup_secs*1000, (TIMERPROC) NULL); + return 1; + case IDC_AUTO_UPDATE_SECS: + { + int t = GetDlgItemInt(hwnd, IDC_AUTO_UPDATE_SECS, FALSE, TRUE); if (!MemView7) { SendMessage(hwnd, WM_INITDIALOG, 0, 0); - } - if (t != MemView7->autoup_secs) - { - MemView7->autoup_secs = t; - if (MemView7->autoup) - SetTimer(hwnd, IDT_VIEW_MEM7, - MemView7->autoup_secs*1000, (TIMERPROC) NULL); - } - } - return 1; - case IDC_REFRESH: - InvalidateRect(hwnd, NULL, FALSE); + } + if (t != MemView7->autoup_secs) + { + MemView7->autoup_secs = t; + if (MemView7->autoup) + SetTimer(hwnd, IDT_VIEW_MEM7, + MemView7->autoup_secs*1000, (TIMERPROC) NULL); + } + } + return 1; + case IDC_REFRESH: + InvalidateRect(hwnd, NULL, FALSE); return 1; case IDC_GO : { @@ -393,8 +394,8 @@ LRESULT CALLBACK ViewMem_ARM9BoxProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM BOOL CALLBACK ViewMem_ARM9Proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { - //bail out early if the dialog isnt initialized - if(!MemView9 && message != WM_INITDIALOG) + //bail out early if the dialog isnt initialized + if(!MemView9 && message != WM_INITDIALOG) return false; switch (message) @@ -406,19 +407,19 @@ BOOL CALLBACK ViewMem_ARM9Proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM l MemView9 = new memview_struct; memset(MemView9, 0, sizeof(memview_struct)); MemView9->cpu = 0; - MemView9->autoup_secs = 5; - SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), - UDM_SETRANGE, 0, MAKELONG(99, 1)); - SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), + MemView9->autoup_secs = 5; + SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), + UDM_SETRANGE, 0, MAKELONG(99, 1)); + SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), UDM_SETPOS32, 0, MemView9->autoup_secs); return 1; } case WM_CLOSE: { - if(MemView9->autoup) - { - KillTimer(hwnd, IDT_VIEW_MEM9); - MemView9->autoup = false; + if(MemView9->autoup) + { + KillTimer(hwnd, IDT_VIEW_MEM9); + MemView9->autoup = false; } if (MemView9!=NULL) @@ -430,8 +431,8 @@ BOOL CALLBACK ViewMem_ARM9Proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM l PostQuitMessage(0); return 0; } - case WM_TIMER: - SendMessage(hwnd, WM_COMMAND, IDC_REFRESH, 0); + case WM_TIMER: + SendMessage(hwnd, WM_COMMAND, IDC_REFRESH, 0); return 1; case WM_COMMAND : @@ -452,38 +453,38 @@ BOOL CALLBACK ViewMem_ARM9Proc (HWND hwnd, UINT message, WPARAM wParam, LPARAM l InvalidateRect(GetDlgItem(hwnd, IDC_MEM_BOX), NULL, FALSE); UpdateWindow(GetDlgItem(hwnd, IDC_MEM_BOX)); return 1; - case IDC_AUTO_UPDATE : - if(MemView9->autoup) - { - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), false); - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), false); - KillTimer(hwnd, IDT_VIEW_MEM9); - MemView9->autoup = FALSE; - return 1; - } - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), true); - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), true); - MemView9->autoup = TRUE; - SetTimer(hwnd, IDT_VIEW_MEM9, MemView9->autoup_secs*1000, (TIMERPROC) NULL); - return 1; - case IDC_AUTO_UPDATE_SECS: - { - int t = GetDlgItemInt(hwnd, IDC_AUTO_UPDATE_SECS, FALSE, TRUE); + case IDC_AUTO_UPDATE : + if(MemView9->autoup) + { + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), false); + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), false); + KillTimer(hwnd, IDT_VIEW_MEM9); + MemView9->autoup = FALSE; + return 1; + } + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), true); + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), true); + MemView9->autoup = TRUE; + SetTimer(hwnd, IDT_VIEW_MEM9, MemView9->autoup_secs*1000, (TIMERPROC) NULL); + return 1; + case IDC_AUTO_UPDATE_SECS: + { + int t = GetDlgItemInt(hwnd, IDC_AUTO_UPDATE_SECS, FALSE, TRUE); if (!MemView9) { SendMessage(hwnd, WM_INITDIALOG, 0, 0); - } - if (t != MemView9->autoup_secs) - { - MemView9->autoup_secs = t; - if (MemView9->autoup) - SetTimer(hwnd, IDT_VIEW_MEM9, - MemView9->autoup_secs*1000, (TIMERPROC) NULL); - } - } - return 1; - case IDC_REFRESH: - InvalidateRect(hwnd, NULL, FALSE); + } + if (t != MemView9->autoup_secs) + { + MemView9->autoup_secs = t; + if (MemView9->autoup) + SetTimer(hwnd, IDT_VIEW_MEM9, + MemView9->autoup_secs*1000, (TIMERPROC) NULL); + } + } + return 1; + case IDC_REFRESH: + InvalidateRect(hwnd, NULL, FALSE); return 1; case IDC_GO : { diff --git a/desmume/src/windows/oamView.cpp b/desmume/src/windows/oamView.cpp index 466afb8d7..54140d367 100644 --- a/desmume/src/windows/oamView.cpp +++ b/desmume/src/windows/oamView.cpp @@ -23,6 +23,7 @@ #include #include "debug.h" #include "resource.h" +#include "res_timer_ids.h" #include "../MMU.h" #include "../GPU.h" #include "../NDSSystem.h" diff --git a/desmume/src/windows/palView.cpp b/desmume/src/windows/palView.cpp index 12d91d9ae..78d2acf21 100644 --- a/desmume/src/windows/palView.cpp +++ b/desmume/src/windows/palView.cpp @@ -1,139 +1,140 @@ -/* Copyright (C) 2006 yopyop - yopyop156@ifrance.com - yopyop156.ifrance.com - - 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 "palView.h" -#include -#include "debug.h" -#include "resource.h" -#include "../MMU.h" - -typedef struct -{ - u32 autoup_secs; - bool autoup; - - u16 *adr; - s16 palnum; -} palview_struct; - -palview_struct *PalView = NULL; - -LRESULT PalView_OnPaint(const u16 * adr, u16 num, HWND hwnd, WPARAM wParam, LPARAM lParam) -{ - HDC hdc; - PAINTSTRUCT ps; - RECT rect; - HBRUSH brush; - u16 c; - char tmp[80]; - - rect.left = 3; - rect.top = 55; - rect.right = 13; - rect.bottom = 65; - hdc = BeginPaint(hwnd, &ps); - - if(adr) - { - u32 y; - - for(y = 0; y < 16; ++y) - { - u32 x; - - for(x = 0; x < 16; ++x) - { - c = adr[(y<<4)+x+0x100*num]; - brush = CreateSolidBrush(RGB((c&0x1F)<<3, (c&0x3E0)>>2, (c&0x7C00)>>7)); - FillRect(hdc, &rect, brush); - DeleteObject(brush); - rect.left += 11; - rect.right += 11; - } - rect.top += 11; - rect.bottom += 11; - rect.left = 3; - rect.right = 13; - } - sprintf(tmp, "Pal : %d", num); - SetWindowText(GetDlgItem(hwnd, IDC_PALNUM), tmp); - } - else - TextOut(hdc, 3, 55, "Pas de palette", 14); - EndPaint(hwnd, &ps); - - return 0; -} - -BOOL CALLBACK ViewPalProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - //bail out early if the dialog isnt initialized - if(!PalView && message != WM_INITDIALOG) - return false; - - switch (message) - { - case WM_INITDIALOG : - { - PalView = new palview_struct; - memset(PalView, 0, sizeof(palview_struct)); - PalView->adr = (u16 *)ARM9Mem.ARM9_VMEM; - PalView->autoup_secs = 5; - SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), - UDM_SETRANGE, 0, MAKELONG(99, 1)); - SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), - UDM_SETPOS32, 0, PalView->autoup_secs); - - HWND combo = GetDlgItem(hwnd, IDC_PAL_SELECT); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main screen BG PAL"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub screen BG PAL"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main screen SPR PAL"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub screen SPR PAL"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main screen ExtPAL 0"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main screen ExtPAL 1"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main screen ExtPAL 2"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main screen ExtPAL 3"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub screen ExtPAL 0"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub screen ExtPAL 1"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub screen ExtPAL 2"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub screen ExtPAL 3"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main spr ExtPAL 0"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main spr ExtPAL 1"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub spr ExtPAL 0"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub spr ExtPAL 1"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Texture pal 0"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Texture pal 1"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Texture pal 2"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Texture pal 3"); - SendMessage(combo, CB_SETCURSEL, 0, 0); - ShowWindow(GetDlgItem(hwnd, IDC_SCROLLER), SW_HIDE); - EnableWindow(GetDlgItem(hwnd, IDC_SCROLLER), FALSE); - } - return 1; +/* Copyright (C) 2006 yopyop + yopyop156@ifrance.com + yopyop156.ifrance.com + + 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 "palView.h" +#include +#include "debug.h" +#include "resource.h" +#include "res_timer_ids.h" +#include "../MMU.h" + +typedef struct +{ + u32 autoup_secs; + bool autoup; + + u16 *adr; + s16 palnum; +} palview_struct; + +palview_struct *PalView = NULL; + +LRESULT PalView_OnPaint(const u16 * adr, u16 num, HWND hwnd, WPARAM wParam, LPARAM lParam) +{ + HDC hdc; + PAINTSTRUCT ps; + RECT rect; + HBRUSH brush; + u16 c; + char tmp[80]; + + rect.left = 3; + rect.top = 55; + rect.right = 13; + rect.bottom = 65; + hdc = BeginPaint(hwnd, &ps); + + if(adr) + { + u32 y; + + for(y = 0; y < 16; ++y) + { + u32 x; + + for(x = 0; x < 16; ++x) + { + c = adr[(y<<4)+x+0x100*num]; + brush = CreateSolidBrush(RGB((c&0x1F)<<3, (c&0x3E0)>>2, (c&0x7C00)>>7)); + FillRect(hdc, &rect, brush); + DeleteObject(brush); + rect.left += 11; + rect.right += 11; + } + rect.top += 11; + rect.bottom += 11; + rect.left = 3; + rect.right = 13; + } + sprintf(tmp, "Pal : %d", num); + SetWindowText(GetDlgItem(hwnd, IDC_PALNUM), tmp); + } + else + TextOut(hdc, 3, 55, "Pas de palette", 14); + EndPaint(hwnd, &ps); + + return 0; +} + +BOOL CALLBACK ViewPalProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + //bail out early if the dialog isnt initialized + if(!PalView && message != WM_INITDIALOG) + return false; + + switch (message) + { + case WM_INITDIALOG : + { + PalView = new palview_struct; + memset(PalView, 0, sizeof(palview_struct)); + PalView->adr = (u16 *)ARM9Mem.ARM9_VMEM; + PalView->autoup_secs = 5; + SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), + UDM_SETRANGE, 0, MAKELONG(99, 1)); + SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), + UDM_SETPOS32, 0, PalView->autoup_secs); + + HWND combo = GetDlgItem(hwnd, IDC_PAL_SELECT); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main screen BG PAL"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub screen BG PAL"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main screen SPR PAL"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub screen SPR PAL"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main screen ExtPAL 0"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main screen ExtPAL 1"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main screen ExtPAL 2"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main screen ExtPAL 3"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub screen ExtPAL 0"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub screen ExtPAL 1"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub screen ExtPAL 2"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub screen ExtPAL 3"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main spr ExtPAL 0"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main spr ExtPAL 1"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub spr ExtPAL 0"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub spr ExtPAL 1"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Texture pal 0"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Texture pal 1"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Texture pal 2"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Texture pal 3"); + SendMessage(combo, CB_SETCURSEL, 0, 0); + ShowWindow(GetDlgItem(hwnd, IDC_SCROLLER), SW_HIDE); + EnableWindow(GetDlgItem(hwnd, IDC_SCROLLER), FALSE); + } + return 1; case WM_CLOSE : { - if(PalView->autoup) - { - KillTimer(hwnd, IDT_VIEW_DISASM7); - PalView->autoup = false; + if(PalView->autoup) + { + KillTimer(hwnd, IDT_VIEW_DISASM7); + PalView->autoup = false; } if (PalView!=NULL) @@ -144,152 +145,152 @@ BOOL CALLBACK ViewPalProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam //INFO("Close Palette view dialog\n"); PostQuitMessage(0); return 0; - } - case WM_PAINT: - PalView_OnPaint(PalView->adr, PalView->palnum, hwnd, wParam, lParam); - return 1; - case WM_TIMER: - SendMessage(hwnd, WM_COMMAND, IDC_REFRESH, 0); - return 1; - case WM_HSCROLL : - switch LOWORD(wParam) - { - case SB_LINERIGHT : - ++(PalView->palnum); - if(PalView->palnum>15) - PalView->palnum = 15; - break; - case SB_LINELEFT : - --(PalView->palnum); - if(PalView->palnum<0) - PalView->palnum = 0; - break; - } - InvalidateRect(hwnd, NULL, FALSE); - return 1; - case WM_COMMAND : - switch (LOWORD (wParam)) - { - case IDC_FERMER : - SendMessage(hwnd, WM_CLOSE, 0, 0); - return 1; - case IDC_AUTO_UPDATE : - if(PalView->autoup) - { - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), false); - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), false); - KillTimer(hwnd, IDT_VIEW_PAL); - PalView->autoup = FALSE; - return 1; - } - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), true); - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), true); - PalView->autoup = TRUE; - SetTimer(hwnd, IDT_VIEW_PAL, PalView->autoup_secs*1000, (TIMERPROC) NULL); - return 1; - case IDC_AUTO_UPDATE_SECS: - { - int t = GetDlgItemInt(hwnd, IDC_AUTO_UPDATE_SECS, FALSE, TRUE); + } + case WM_PAINT: + PalView_OnPaint(PalView->adr, PalView->palnum, hwnd, wParam, lParam); + return 1; + case WM_TIMER: + SendMessage(hwnd, WM_COMMAND, IDC_REFRESH, 0); + return 1; + case WM_HSCROLL : + switch LOWORD(wParam) + { + case SB_LINERIGHT : + ++(PalView->palnum); + if(PalView->palnum>15) + PalView->palnum = 15; + break; + case SB_LINELEFT : + --(PalView->palnum); + if(PalView->palnum<0) + PalView->palnum = 0; + break; + } + InvalidateRect(hwnd, NULL, FALSE); + return 1; + case WM_COMMAND : + switch (LOWORD (wParam)) + { + case IDC_FERMER : + SendMessage(hwnd, WM_CLOSE, 0, 0); + return 1; + case IDC_AUTO_UPDATE : + if(PalView->autoup) + { + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), false); + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), false); + KillTimer(hwnd, IDT_VIEW_PAL); + PalView->autoup = FALSE; + return 1; + } + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), true); + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), true); + PalView->autoup = TRUE; + SetTimer(hwnd, IDT_VIEW_PAL, PalView->autoup_secs*1000, (TIMERPROC) NULL); + return 1; + case IDC_AUTO_UPDATE_SECS: + { + int t = GetDlgItemInt(hwnd, IDC_AUTO_UPDATE_SECS, FALSE, TRUE); if (!PalView) { SendMessage(hwnd, WM_INITDIALOG, 0, 0); - } - if (t != PalView->autoup_secs) - { - PalView->autoup_secs = t; - if (PalView->autoup) - SetTimer(hwnd, IDT_VIEW_PAL, - PalView->autoup_secs*1000, (TIMERPROC) NULL); - } - } - return 1; - case IDC_REFRESH: - InvalidateRect(hwnd, NULL, FALSE); - return 1; - case IDC_PAL_SELECT : - switch(HIWORD(wParam)) - { - case CBN_SELCHANGE : - case CBN_CLOSEUP : - { - u32 sel = SendMessage(GetDlgItem(hwnd, IDC_PAL_SELECT), CB_GETCURSEL, 0, 0); - switch(sel) - { - case 0 : - PalView->adr = (u16 *)ARM9Mem.ARM9_VMEM; - PalView->palnum = 0; - ShowWindow(GetDlgItem(hwnd, IDC_SCROLLER), SW_HIDE); - EnableWindow(GetDlgItem(hwnd, IDC_SCROLLER), FALSE); - break; - case 1 : - PalView->adr = ((u16 *)ARM9Mem.ARM9_VMEM) + 0x200; - PalView->palnum = 0; - ShowWindow(GetDlgItem(hwnd, IDC_SCROLLER), SW_HIDE); - EnableWindow(GetDlgItem(hwnd, IDC_SCROLLER), FALSE); - break; - case 2 : - PalView->adr = (u16 *)ARM9Mem.ARM9_VMEM + 0x100; - PalView->palnum = 0; - ShowWindow(GetDlgItem(hwnd, IDC_SCROLLER), SW_HIDE); - EnableWindow(GetDlgItem(hwnd, IDC_SCROLLER), FALSE); - break; - case 3 : - PalView->adr = ((u16 *)ARM9Mem.ARM9_VMEM) + 0x300; - PalView->palnum = 0; - ShowWindow(GetDlgItem(hwnd, IDC_SCROLLER), SW_HIDE); - EnableWindow(GetDlgItem(hwnd, IDC_SCROLLER), FALSE); - break; - case 4 : - case 5 : - case 6 : - case 7 : - PalView->adr = ((u16 *)(ARM9Mem.ExtPal[0][sel-4])); - PalView->palnum = 0; - ShowWindow(GetDlgItem(hwnd, IDC_SCROLLER), SW_SHOW); - EnableWindow(GetDlgItem(hwnd, IDC_SCROLLER), TRUE); - break; - case 8 : - case 9 : - case 10 : - case 11 : - PalView->adr = ((u16 *)(ARM9Mem.ExtPal[1][sel-8])); - PalView->palnum = 0; - ShowWindow(GetDlgItem(hwnd, IDC_SCROLLER), SW_SHOW); - EnableWindow(GetDlgItem(hwnd, IDC_SCROLLER), TRUE); - break; - case 12 : - case 13 : - PalView->adr = ((u16 *)(ARM9Mem.ObjExtPal[0][sel-12])); - PalView->palnum = 0; - ShowWindow(GetDlgItem(hwnd, IDC_SCROLLER), SW_SHOW); - EnableWindow(GetDlgItem(hwnd, IDC_SCROLLER), TRUE); - break; - case 14 : - case 15 : - PalView->adr = ((u16 *)(ARM9Mem.ObjExtPal[1][sel-14])); - PalView->palnum = 0; - ShowWindow(GetDlgItem(hwnd, IDC_SCROLLER), SW_SHOW); - EnableWindow(GetDlgItem(hwnd, IDC_SCROLLER), TRUE); - break; - case 16 : - case 17 : - case 18 : - case 19 : - PalView->adr = ((u16 *)(ARM9Mem.texPalSlot[sel-16])); - PalView->palnum = 0; - ShowWindow(GetDlgItem(hwnd, IDC_SCROLLER), SW_SHOW); - EnableWindow(GetDlgItem(hwnd, IDC_SCROLLER), TRUE); - break; - default : - return 1; - } - InvalidateRect(hwnd, NULL, FALSE); - return 1; - } - } - return 1; - } - return 0; - } - return false; -} + } + if (t != PalView->autoup_secs) + { + PalView->autoup_secs = t; + if (PalView->autoup) + SetTimer(hwnd, IDT_VIEW_PAL, + PalView->autoup_secs*1000, (TIMERPROC) NULL); + } + } + return 1; + case IDC_REFRESH: + InvalidateRect(hwnd, NULL, FALSE); + return 1; + case IDC_PAL_SELECT : + switch(HIWORD(wParam)) + { + case CBN_SELCHANGE : + case CBN_CLOSEUP : + { + u32 sel = SendMessage(GetDlgItem(hwnd, IDC_PAL_SELECT), CB_GETCURSEL, 0, 0); + switch(sel) + { + case 0 : + PalView->adr = (u16 *)ARM9Mem.ARM9_VMEM; + PalView->palnum = 0; + ShowWindow(GetDlgItem(hwnd, IDC_SCROLLER), SW_HIDE); + EnableWindow(GetDlgItem(hwnd, IDC_SCROLLER), FALSE); + break; + case 1 : + PalView->adr = ((u16 *)ARM9Mem.ARM9_VMEM) + 0x200; + PalView->palnum = 0; + ShowWindow(GetDlgItem(hwnd, IDC_SCROLLER), SW_HIDE); + EnableWindow(GetDlgItem(hwnd, IDC_SCROLLER), FALSE); + break; + case 2 : + PalView->adr = (u16 *)ARM9Mem.ARM9_VMEM + 0x100; + PalView->palnum = 0; + ShowWindow(GetDlgItem(hwnd, IDC_SCROLLER), SW_HIDE); + EnableWindow(GetDlgItem(hwnd, IDC_SCROLLER), FALSE); + break; + case 3 : + PalView->adr = ((u16 *)ARM9Mem.ARM9_VMEM) + 0x300; + PalView->palnum = 0; + ShowWindow(GetDlgItem(hwnd, IDC_SCROLLER), SW_HIDE); + EnableWindow(GetDlgItem(hwnd, IDC_SCROLLER), FALSE); + break; + case 4 : + case 5 : + case 6 : + case 7 : + PalView->adr = ((u16 *)(ARM9Mem.ExtPal[0][sel-4])); + PalView->palnum = 0; + ShowWindow(GetDlgItem(hwnd, IDC_SCROLLER), SW_SHOW); + EnableWindow(GetDlgItem(hwnd, IDC_SCROLLER), TRUE); + break; + case 8 : + case 9 : + case 10 : + case 11 : + PalView->adr = ((u16 *)(ARM9Mem.ExtPal[1][sel-8])); + PalView->palnum = 0; + ShowWindow(GetDlgItem(hwnd, IDC_SCROLLER), SW_SHOW); + EnableWindow(GetDlgItem(hwnd, IDC_SCROLLER), TRUE); + break; + case 12 : + case 13 : + PalView->adr = ((u16 *)(ARM9Mem.ObjExtPal[0][sel-12])); + PalView->palnum = 0; + ShowWindow(GetDlgItem(hwnd, IDC_SCROLLER), SW_SHOW); + EnableWindow(GetDlgItem(hwnd, IDC_SCROLLER), TRUE); + break; + case 14 : + case 15 : + PalView->adr = ((u16 *)(ARM9Mem.ObjExtPal[1][sel-14])); + PalView->palnum = 0; + ShowWindow(GetDlgItem(hwnd, IDC_SCROLLER), SW_SHOW); + EnableWindow(GetDlgItem(hwnd, IDC_SCROLLER), TRUE); + break; + case 16 : + case 17 : + case 18 : + case 19 : + PalView->adr = ((u16 *)(ARM9Mem.texPalSlot[sel-16])); + PalView->palnum = 0; + ShowWindow(GetDlgItem(hwnd, IDC_SCROLLER), SW_SHOW); + EnableWindow(GetDlgItem(hwnd, IDC_SCROLLER), TRUE); + break; + default : + return 1; + } + InvalidateRect(hwnd, NULL, FALSE); + return 1; + } + } + return 1; + } + return 0; + } + return false; +} diff --git a/desmume/src/windows/res_timer_ids.h b/desmume/src/windows/res_timer_ids.h new file mode 100644 index 000000000..043ba409d --- /dev/null +++ b/desmume/src/windows/res_timer_ids.h @@ -0,0 +1,12 @@ +#define IDT_VIEW_DISASM7 50001 +#define IDT_VIEW_DISASM9 50002 +#define IDT_VIEW_MEM7 50003 +#define IDT_VIEW_MEM9 50004 +#define IDT_VIEW_IOREG 50005 +#define IDT_VIEW_PAL 50006 +#define IDT_VIEW_TILE 50007 +#define IDT_VIEW_MAP 50008 +#define IDT_VIEW_OAM 50009 +#define IDT_VIEW_MATRIX 50010 +#define IDT_VIEW_LIGHTS 50011 +#define IDM_EXEC 50112 \ No newline at end of file diff --git a/desmume/src/windows/resource.h b/desmume/src/windows/resource.h index c42dbe639..4e79735f4 100644 --- a/desmume/src/windows/resource.h +++ b/desmume/src/windows/resource.h @@ -1,2192 +1,397 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by resources.rc -// -#define SW_HIDE 0 -#define HIDE_WINDOW 0 -#define WM_NULL 0x0000 -#define WA_INACTIVE 0 -#define HTNOWHERE 0 -#define SMTO_NORMAL 0x0000 -#define ICON_SMALL 0 -#define SIZE_RESTORED 0 -#define BN_CLICKED 0 -#define BST_UNCHECKED 0x0000 -#define HDS_HORZ 0x0000 -#define TBS_HORZ 0x0000 -#define TBS_BOTTOM 0x0000 -#define TBS_RIGHT 0x0000 -#define LVS_ICON 0x0000 -#define LVS_ALIGNTOP 0x0000 -#define TCS_TABS 0x0000 -#define TCS_SINGLELINE 0x0000 -#define TCS_RIGHTJUSTIFY 0x0000 -#define DTS_SHORTDATEFORMAT 0x0000 -#define PGS_VERT 0x00000000 -#define LANG_NEUTRAL 0x00 -#define SUBLANG_NEUTRAL 0x00 -#define SORT_DEFAULT 0x0 -#define SORT_JAPANESE_XJIS 0x0 -#define SORT_CHINESE_BIG5 0x0 -#define SORT_CHINESE_PRCP 0x0 -#define SORT_KOREAN_KSC 0x0 -#define SORT_HUNGARIAN_DEFAULT 0x0 -#define SORT_GEORGIAN_TRADITIONAL 0x0 -#define PSP_DEFAULT 0x00000000 -#define PSPCB_ADDREF 0 -#define PSH_DEFAULT 0x00000000 -#define PSNRET_NOERROR 0 -#define PSBTN_BACK 0 -#define CDRF_DODEFAULT 0x00000000 -#define ILC_COLOR 0x00000000 -#define ILD_NORMAL 0x00000000 -#define ILS_NORMAL 0x00000000 -#define ILCF_MOVE 0x00000000 -#define HDFT_ISSTRING 0x0000 -#define HDF_LEFT 0x0000 -#define TBSTYLE_BUTTON 0x0000 -#define IDB_STD_SMALL_COLOR 0 -#define STD_CUT 0 -#define VIEW_LARGEICONS 0 -#define HIST_BACK 0 -#define HICF_OTHER 0x00000000 -#define TBDDRET_DEFAULT 0 -#define TTDT_AUTOMATIC 0 -#define TTI_NONE 0 -#define TBTS_TOP 0 -#define TB_LINEUP 0 -#define DL_CURSORSET 0 -#define LVSIL_NORMAL 0 -#define LVNI_ALL 0x0000 -#define LVIR_BOUNDS 0 -#define LVA_DEFAULT 0x0000 -#define LVCFMT_LEFT 0x0000 -#define LVBKIF_SOURCE_NONE 0x00000000 -#define LVBKIF_STYLE_NORMAL 0x00000000 -#define LVCDI_ITEM 0x00000000 -#define TVSIL_NORMAL 0 -#define TVGN_ROOT 0x0000 -#define TVC_UNKNOWN 0x0000 -#define TVNRET_DEFAULT 0 -#define MCSC_BACKGROUND 0 -#define MCHT_NOWHERE 0x00000000 -#define GMR_VISIBLE 0 -#define GDT_VALID 0 -#define PGF_INVISIBLE 0 -#define PGB_TOPORLEFT 0 -#define FSB_REGULAR_MODE 0 -#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1 -#define MINIMUM_RESERVED_MANIFEST_RESOURCE_ID 1 -#define SW_SHOWNORMAL 1 -#define SW_NORMAL 1 -#define SHOW_OPENWINDOW 1 -#define SW_PARENTCLOSING 1 -#define VK_LBUTTON 0x01 -#define WM_CREATE 0x0001 -#define WA_ACTIVE 1 -#define PWR_OK 1 -#define PWR_SUSPENDREQUEST 1 -#define NFR_ANSI 1 -#define UIS_SET 1 -#define UISF_HIDEFOCUS 0x1 -#define XBUTTON1 0x0001 -#define WMSZ_LEFT 1 -#define HTCLIENT 1 -#define SMTO_BLOCK 0x0001 -#define MA_ACTIVATE 1 -#define ICON_BIG 1 -#define SIZE_MINIMIZED 1 -#define MK_LBUTTON 0x0001 -#define TME_HOVER 0x00000001 -#define CS_VREDRAW 0x0001 -#define CF_TEXT 1 -#define IDOK 1 -#define BN_PAINT 1 -#define BST_CHECKED 0x0001 -#define TTS_ALWAYSTIP 0x01 -#define TBS_AUTOTICKS 0x0001 -#define UDS_WRAP 0x0001 -#define PBS_SMOOTH 0x01 -#define LVS_REPORT 0x0001 -#define TVS_HASBUTTONS 0x0001 -#define TCS_SCROLLOPPOSITE 0x0001 -#define ACS_CENTER 0x0001 -#define MCS_DAYSTATE 0x0001 -#define DTS_UPDOWN 0x0001 -#define PGS_HORZ 0x00000001 -#define NFS_EDIT 0x0001 -#define LANG_ARABIC 0x01 -#define SUBLANG_DEFAULT 0x01 -#define SUBLANG_ARABIC_SAUDI_ARABIA 0x01 -#define SUBLANG_AZERI_LATIN 0x01 -#define SUBLANG_CHINESE_TRADITIONAL 0x01 -#define SUBLANG_DUTCH 0x01 -#define SUBLANG_GERMAN 0x01 -#define SUBLANG_ITALIAN 0x01 -#define SUBLANG_KOREAN 0x01 -#define SUBLANG_LITHUANIAN 0x01 -#define SUBLANG_MALAY_MALAYSIA 0x01 -#define SUBLANG_NORWEGIAN_BOKMAL 0x01 -#define SUBLANG_PORTUGUESE_BRAZILIAN 0x01 -#define SUBLANG_SPANISH 0x01 -#define SUBLANG_SWEDISH 0x01 -#define SUBLANG_URDU_PAKISTAN 0x01 -#define SUBLANG_UZBEK_LATIN 0x01 -#define SORT_JAPANESE_UNICODE 0x1 -#define SORT_CHINESE_UNICODE 0x1 -#define SORT_KOREAN_UNICODE 0x1 -#define SORT_GERMAN_PHONE_BOOK 0x1 -#define SORT_HUNGARIAN_TECHNICAL 0x1 -#define SORT_GEORGIAN_MODERN 0x1 -#define VS_VERSION_INFO 1 -#define VFFF_ISSHAREDFILE 0x0001 -#define VFF_CURNEDEST 0x0001 -#define VIFF_FORCEINSTALL 0x0001 -#define PSP_DLGINDIRECT 0x00000001 -#define PSPCB_RELEASE 1 -#define PSH_PROPTITLE 0x00000001 -#define PSCB_INITIALIZED 1 -#define PSNRET_INVALID 1 -#define PSWIZB_BACK 0x00000001 -#define PSBTN_NEXT 1 -#define ICC_LISTVIEW_CLASSES 0x00000001 -#define CDDS_PREPAINT 0x00000001 -#define CDIS_SELECTED 0x0001 -#define ILC_MASK 0x00000001 -#define ILD_TRANSPARENT 0x00000001 -#define ILS_GLOW 0x00000001 -#define ILCF_SWAP 0x00000001 -#define HDFT_ISNUMBER 0x0001 -#define HDI_WIDTH 0x0001 -#define HDF_RIGHT 0x0001 -#define HHT_NOWHERE 0x0001 -#define TBSTATE_CHECKED 0x01 -#define TBSTYLE_SEP 0x0001 -#define TBSTYLE_EX_DRAWDDARROWS 0x00000001 -#define IDB_STD_LARGE_COLOR 1 -#define STD_COPY 1 -#define VIEW_SMALLICONS 1 -#define HIST_FORWARD 1 -#define TBIMHT_AFTER 0x00000001 -#define TBBF_LARGE 0x0001 -#define TBIF_IMAGE 0x00000001 -#define HICF_MOUSE 0x00000001 -#define TBNRF_HIDEHELP 0x00000001 -#define TBNF_IMAGE 0x00000001 -#define TBDDRET_NODEFAULT 1 -#define RBIM_IMAGELIST 0x00000001 -#define RBBS_BREAK 0x00000001 -#define RBBIM_STYLE 0x00000001 -#define RBNM_ID 0x00000001 -#define RBHT_NOWHERE 0x0001 -#define TTF_IDISHWND 0x0001 -#define TTDT_RESHOW 1 -#define TTI_INFO 1 -#define TBTS_LEFT 1 -#define TB_LINEDOWN 1 -#define TBCD_TICS 0x0001 -#define DL_STOPCURSOR 1 -#define HOTKEYF_SHIFT 0x01 -#define HKCOMB_NONE 0x0001 -#define LVSIL_SMALL 1 -#define LVIF_TEXT 0x0001 -#define LVIS_FOCUSED 0x0001 -#define LVNI_FOCUSED 0x0001 -#define LVFI_PARAM 0x0001 -#define LVIR_ICON 1 -#define LVHT_NOWHERE 0x0001 -#define LVA_ALIGNLEFT 0x0001 -#define LVCF_FMT 0x0001 -#define LVCFMT_RIGHT 0x0001 -#define LVSICF_NOINVALIDATEALL 0x00000001 -#define LVS_EX_GRIDLINES 0x00000001 -#define LVBKIF_SOURCE_HBITMAP 0x00000001 -#define LVKF_ALT 0x0001 -#define LVCDI_GROUP 0x00000001 -#define LVGIT_UNFOLDED 0x0001 -#define TVIF_TEXT 0x0001 -#define TVE_COLLAPSE 0x0001 -#define TVGN_NEXT 0x0001 -#define TVHT_NOWHERE 0x0001 -#define TVC_BYMOUSE 0x0001 -#define TVNRET_SKIPOLD 1 -#define CBEIF_TEXT 0x00000001 -#define CBES_EX_NOEDITIMAGE 0x00000001 -#define CBENF_KILLFOCUS 1 -#define TCS_EX_FLATSEPARATORS 0x00000001 -#define TCIF_TEXT 0x0001 -#define TCIS_BUTTONPRESSED 0x0001 -#define TCHT_NOWHERE 0x0001 -#define ACN_START 1 -#define MCSC_TEXT 1 -#define GMR_DAYSTATE 1 -#define GDTR_MIN 0x0001 -#define GDT_NONE 1 -#define PGF_NORMAL 1 -#define PGB_BOTTOMORRIGHT 1 -#define PGF_SCROLLUP 1 -#define PGK_SHIFT 1 -#define PGF_CALCWIDTH 1 -#define DPAS_SORTED 0x0001 -#define FSB_ENCARTA_MODE 1 -#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID 2 -#define SW_SHOWMINIMIZED 2 -#define SHOW_ICONWINDOW 2 -#define SW_OTHERZOOM 2 -#define VK_RBUTTON 0x02 -#define WM_DESTROY 0x0002 -#define WA_CLICKACTIVE 2 -#define PWR_SUSPENDRESUME 2 -#define NFR_UNICODE 2 -#define UIS_CLEAR 2 -#define UISF_HIDEACCEL 0x2 -#define XBUTTON2 0x0002 -#define WMSZ_RIGHT 2 -#define HTCAPTION 2 -#define SMTO_ABORTIFHUNG 0x0002 -#define MA_ACTIVATEANDEAT 2 -#define SIZE_MAXIMIZED 2 -#define MK_RBUTTON 0x0002 -#define TME_LEAVE 0x00000002 -#define CS_HREDRAW 0x0002 -#define CF_BITMAP 2 -#define IDCANCEL 2 -#define BN_HILITE 2 -#define BST_INDETERMINATE 0x0002 -#define HDS_BUTTONS 0x0002 -#define TTS_NOPREFIX 0x02 -#define TBS_VERT 0x0002 -#define UDS_SETBUDDYINT 0x0002 -#define LVS_SMALLICON 0x0002 -#define TVS_HASLINES 0x0002 -#define TCS_BOTTOM 0x0002 -#define TCS_RIGHT 0x0002 -#define ACS_TRANSPARENT 0x0002 -#define MCS_MULTISELECT 0x0002 -#define DTS_SHOWNONE 0x0002 -#define PGS_AUTOSCROLL 0x00000002 -#define NFS_STATIC 0x0002 -#define LANG_BULGARIAN 0x02 -#define SUBLANG_SYS_DEFAULT 0x02 -#define SUBLANG_ARABIC_IRAQ 0x02 -#define SUBLANG_AZERI_CYRILLIC 0x02 -#define SUBLANG_CHINESE_SIMPLIFIED 0x02 -#define SUBLANG_DUTCH_BELGIAN 0x02 -#define SUBLANG_ENGLISH_UK 0x02 -#define SUBLANG_FRENCH_BELGIAN 0x02 -#define SUBLANG_GERMAN_SWISS 0x02 -#define SUBLANG_ITALIAN_SWISS 0x02 -#define SUBLANG_KASHMIRI_INDIA 0x02 -#define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02 -#define SUBLANG_NEPALI_INDIA 0x02 -#define SUBLANG_NORWEGIAN_NYNORSK 0x02 -#define SUBLANG_PORTUGUESE 0x02 -#define SUBLANG_SERBIAN_LATIN 0x02 -#define SUBLANG_SPANISH_MEXICAN 0x02 -#define SUBLANG_SWEDISH_FINLAND 0x02 -#define SUBLANG_URDU_INDIA 0x02 -#define SUBLANG_UZBEK_CYRILLIC 0x02 -#define SORT_CHINESE_PRC 0x2 -#define VFF_FILEINUSE 0x0002 -#define VIFF_DONTDELETEOLD 0x0002 -#define PSP_USEHICON 0x00000002 -#define PSPCB_CREATE 2 -#define PSH_USEHICON 0x00000002 -#define PSCB_PRECREATE 2 -#define PSNRET_INVALID_NOCHANGEPAGE 2 -#define PSWIZB_NEXT 0x00000002 -#define PSBTN_FINISH 2 -#define ID_PSRESTARTWINDOWS 0x2 -#define ICC_TREEVIEW_CLASSES 0x00000002 -#define CDRF_NEWFONT 0x00000002 -#define CDDS_POSTPAINT 0x00000002 -#define CDIS_GRAYED 0x0002 -#define ILD_BLEND25 0x00000002 -#define ILS_SHADOW 0x00000002 -#define HDI_TEXT 0x0002 -#define HDF_CENTER 0x0002 -#define HHT_ONHEADER 0x0002 -#define CMB_MASKED 0x02 -#define TBSTATE_PRESSED 0x02 -#define TBSTYLE_CHECK 0x0002 -#define STD_PASTE 2 -#define VIEW_LIST 2 -#define HIST_FAVORITES 2 -#define TBIMHT_BACKGROUND 0x00000002 -#define TBIF_TEXT 0x00000002 -#define HICF_ARROWKEYS 0x00000002 -#define TBNRF_ENDCUSTOMIZE 0x00000002 -#define TBNF_TEXT 0x00000002 -#define TBDDRET_TREATPRESSED 2 -#define RBBS_FIXEDSIZE 0x00000002 -#define RBBIM_COLORS 0x00000002 -#define RBNM_STYLE 0x00000002 -#define RBHT_CAPTION 0x0002 -#define TTF_CENTERTIP 0x0002 -#define TTDT_AUTOPOP 2 -#define TTI_WARNING 2 -#define TBTS_BOTTOM 2 -#define TB_PAGEUP 2 -#define TBCD_THUMB 0x0002 -#define DL_COPYCURSOR 2 -#define HOTKEYF_CONTROL 0x02 -#define HKCOMB_S 0x0002 -#define LVSIL_STATE 2 -#define LVIF_IMAGE 0x0002 -#define LVIS_SELECTED 0x0002 -#define LVNI_SELECTED 0x0002 -#define LVFI_STRING 0x0002 -#define LVIR_LABEL 2 -#define LVHT_ONITEMICON 0x0002 -#define LVA_ALIGNTOP 0x0002 -#define LVCF_WIDTH 0x0002 -#define LVCFMT_CENTER 0x0002 -#define LVSICF_NOSCROLL 0x00000002 -#define LVS_EX_SUBITEMIMAGES 0x00000002 -#define LVBKIF_SOURCE_URL 0x00000002 -#define LVKF_CONTROL 0x0002 -#define TVIF_IMAGE 0x0002 -#define TVIS_SELECTED 0x0002 -#define TVE_EXPAND 0x0002 -#define TVSIL_STATE 2 -#define TVGN_PREVIOUS 0x0002 -#define TVHT_ONITEMICON 0x0002 -#define TVC_BYKEYBOARD 0x0002 -#define TVNRET_SKIPNEW 2 -#define CBEIF_IMAGE 0x00000002 -#define CBES_EX_NOEDITIMAGEINDENT 0x00000002 -#define CBENF_RETURN 2 -#define TCS_EX_REGISTERDROP 0x00000002 -#define TCIF_IMAGE 0x0002 -#define TCIS_HIGHLIGHTED 0x0002 -#define TCHT_ONITEMICON 0x0002 -#define ACN_STOP 2 -#define MCSC_TITLEBK 2 -#define GDTR_MAX 0x0002 -#define PGF_GRAYED 2 -#define PGF_SCROLLDOWN 2 -#define PGK_CONTROL 2 -#define PGF_CALCHEIGHT 2 -#define DPAS_INSERTBEFORE 0x0002 -#define FSB_FLAT_MODE 2 -#define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID 3 -#define SW_SHOWMAXIMIZED 3 -#define SW_MAXIMIZE 3 -#define SHOW_FULLSCREEN 3 -#define SW_PARENTOPENING 3 -#define VK_CANCEL 0x03 -#define WM_MOVE 0x0003 -#define PWR_CRITICALRESUME 3 -#define NF_QUERY 3 -#define UIS_INITIALIZE 3 -#define WMSZ_TOP 3 -#define HTSYSMENU 3 -#define MA_NOACTIVATE 3 -#define SIZE_MAXSHOW 3 -#define CF_METAFILEPICT 3 -#define IDABORT 3 -#define BN_UNHILITE 3 -#define LVS_LIST 0x0003 -#define LVS_TYPEMASK 0x0003 -#define LANG_CATALAN 0x03 -#define SUBLANG_ARABIC_EGYPT 0x03 -#define SUBLANG_CHINESE_HONGKONG 0x03 -#define SUBLANG_ENGLISH_AUS 0x03 -#define SUBLANG_FRENCH_CANADIAN 0x03 -#define SUBLANG_GERMAN_AUSTRIAN 0x03 -#define SUBLANG_SERBIAN_CYRILLIC 0x03 -#define SUBLANG_SPANISH_MODERN 0x03 -#define SORT_CHINESE_BOPOMOFO 0x3 -#define PSNRET_MESSAGEHANDLED 3 -#define PSBTN_OK 3 -#define CDDS_PREERASE 0x00000003 -#define HDF_JUSTIFYMASK 0x0003 -#define STD_UNDO 3 -#define VIEW_DETAILS 3 -#define HIST_ADDTOFAVORITES 3 -#define RBHT_CLIENT 0x0003 -#define TTDT_INITIAL 3 -#define TTI_ERROR 3 -#define TBTS_RIGHT 3 -#define TB_PAGEDOWN 3 -#define TBCD_CHANNEL 0x0003 -#define DL_MOVECURSOR 3 -#define LVIR_SELECTBOUNDS 3 -#define LVCFMT_JUSTIFYMASK 0x0003 -#define LVBKIF_SOURCE_MASK 0x00000003 -#define TVE_TOGGLE 0x0003 -#define TVGN_PARENT 0x0003 -#define CBENF_ESCAPE 3 -#define MCSC_TITLETEXT 3 -#define SW_SHOWNOACTIVATE 4 -#define SHOW_OPENNOACTIVATE 4 -#define SW_OTHERUNZOOM 4 -#define VK_MBUTTON 0x04 -#define NF_REQUERY 4 -#define WMSZ_TOPLEFT 4 -#define HTGROWBOX 4 -#define MA_NOACTIVATEANDEAT 4 -#define SIZE_MAXHIDE 4 -#define MK_SHIFT 0x0004 -#define CF_SYLK 4 -#define IDRETRY 4 -#define BN_DISABLE 4 -#define BST_PUSHED 0x0004 -#define HDS_HOTTRACK 0x0004 -#define TBS_TOP 0x0004 -#define TBS_LEFT 0x0004 -#define UDS_ALIGNRIGHT 0x0004 -#define PBS_VERTICAL 0x04 -#define LVS_SINGLESEL 0x0004 -#define TVS_LINESATROOT 0x0004 -#define TCS_MULTISELECT 0x0004 -#define ACS_AUTOPLAY 0x0004 -#define MCS_WEEKNUMBERS 0x0004 -#define DTS_LONGDATEFORMAT 0x0004 -#define PGS_DRAGNDROP 0x00000004 -#define NFS_LISTCOMBO 0x0004 -#define LANG_CHINESE 0x04 -#define SUBLANG_ARABIC_LIBYA 0x04 -#define SUBLANG_CHINESE_SINGAPORE 0x04 -#define SUBLANG_ENGLISH_CAN 0x04 -#define SUBLANG_FRENCH_SWISS 0x04 -#define SUBLANG_GERMAN_LUXEMBOURG 0x04 -#define SUBLANG_SPANISH_GUATEMALA 0x04 -#define VFF_BUFFTOOSMALL 0x0004 -#define PSP_USEICONID 0x00000004 -#define PSH_USEICONID 0x00000004 -#define PSWIZB_FINISH 0x00000004 -#define PSBTN_APPLYNOW 4 -#define ICC_BAR_CLASSES 0x00000004 -#define CDRF_SKIPDEFAULT 0x00000004 -#define CDDS_POSTERASE 0x00000004 -#define CDIS_DISABLED 0x0004 -#define ILC_COLOR4 0x00000004 -#define ILD_BLEND50 0x00000004 -#define ILS_SATURATE 0x00000004 -#define HDI_FORMAT 0x0004 -#define HDF_RTLREADING 0x0004 -#define HHT_ONDIVIDER 0x0004 -#define TBSTATE_ENABLED 0x04 -#define TBSTYLE_GROUP 0x0004 -#define IDB_VIEW_SMALL_COLOR 4 -#define STD_REDOW 4 -#define VIEW_SORTNAME 4 -#define HIST_VIEWTREE 4 -#define TBIF_STATE 0x00000004 -#define HICF_ACCELERATOR 0x00000004 -#define RBBS_CHILDEDGE 0x00000004 -#define RBBIM_TEXT 0x00000004 -#define RBNM_LPARAM 0x00000004 -#define RBHT_GRABBER 0x0004 -#define TTF_RTLREADING 0x0004 -#define TB_THUMBPOSITION 4 -#define HOTKEYF_ALT 0x04 -#define HKCOMB_C 0x0004 -#define LVIF_PARAM 0x0004 -#define LVIS_CUT 0x0004 -#define LVNI_CUT 0x0004 -#define LVHT_ONITEMLABEL 0x0004 -#define LVCF_TEXT 0x0004 -#define LVS_EX_CHECKBOXES 0x00000004 -#define LVKF_SHIFT 0x0004 -#define TVIF_PARAM 0x0004 -#define TVIS_CUT 0x0004 -#define TVGN_CHILD 0x0004 -#define TVHT_ONITEMLABEL 0x0004 -#define CBEIF_SELECTEDIMAGE 0x00000004 -#define CBES_EX_PATHWORDBREAKPROC 0x00000004 -#define CBENF_DROPDOWN 4 -#define TCIF_RTLREADING 0x0004 -#define TCHT_ONITEMLABEL 0x0004 -#define MCSC_MONTHBK 4 -#define PGF_DEPRESSED 4 -#define PGF_SCROLLLEFT 4 -#define PGK_MENU 4 -#define DPAS_INSERTAFTER 0x0004 -#define SW_SHOW 5 -#define VK_XBUTTON1 0x05 -#define WM_SIZE 0x0005 -#define WMSZ_TOPRIGHT 5 -#define HTMENU 5 -#define CF_DIF 5 -#define IDIGNORE 5 -#define BN_DOUBLECLICKED 5 -#define LANG_CZECH 0x05 -#define SUBLANG_ARABIC_ALGERIA 0x05 -#define SUBLANG_CHINESE_MACAU 0x05 -#define SUBLANG_ENGLISH_NZ 0x05 -#define SUBLANG_FRENCH_LUXEMBOURG 0x05 -#define SUBLANG_GERMAN_LIECHTENSTEIN 0x05 -#define SUBLANG_SPANISH_COSTA_RICA 0x05 -#define PSBTN_CANCEL 5 -#define COMCTL32_VERSION 5 -#define IDB_VIEW_LARGE_COLOR 5 -#define STD_DELETE 5 -#define VIEW_SORTSIZE 5 -#define TB_THUMBTRACK 5 -#define LVA_SNAPTOGRID 0x0005 -#define TVGN_FIRSTVISIBLE 0x0005 -#define MCSC_TRAILINGTEXT 5 -#define SW_MINIMIZE 6 -#define VK_XBUTTON2 0x06 -#define WM_ACTIVATE 0x0006 -#define WMSZ_BOTTOM 6 -#define HTHSCROLL 6 -#define CF_TIFF 6 -#define IDYES 6 -#define BN_SETFOCUS 6 -#define LANG_DANISH 0x06 -#define SUBLANG_ARABIC_MOROCCO 0x06 -#define SUBLANG_ENGLISH_EIRE 0x06 -#define SUBLANG_FRENCH_MONACO 0x06 -#define SUBLANG_SPANISH_PANAMA 0x06 -#define PSBTN_HELP 6 -#define PSBTN_MAX 6 -#define STD_FILENEW 6 -#define VIEW_SORTDATE 6 -#define TB_TOP 6 -#define TVGN_NEXTVISIBLE 0x0006 -#define SW_SHOWMINNOACTIVE 7 -#define WM_SETFOCUS 0x0007 -#define WMSZ_BOTTOMLEFT 7 -#define HTVSCROLL 7 -#define CF_OEMTEXT 7 -#define IDNO 7 -#define BN_KILLFOCUS 7 -#define LANG_GERMAN 0x07 -#define SUBLANG_ARABIC_TUNISIA 0x07 -#define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07 -#define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07 -#define STD_FILEOPEN 7 -#define VIEW_SORTTYPE 7 -#define TB_BOTTOM 7 -#define TVGN_PREVIOUSVISIBLE 0x0007 -#define SW_SHOWNA 8 -#define VK_BACK 0x08 -#define WM_KILLFOCUS 0x0008 -#define WMSZ_BOTTOMRIGHT 8 -#define HTMINBUTTON 8 -#define SMTO_NOTIMEOUTIFNOTHUNG 0x0008 -#define MK_CONTROL 0x0008 -#define CS_DBLCLKS 0x0008 -#define CF_DIB 8 -#define IDCLOSE 8 -#define BST_FOCUS 0x0008 -#define HDS_HIDDEN 0x0008 -#define TBS_BOTH 0x0008 -#define UDS_ALIGNLEFT 0x0008 -#define LVS_SHOWSELALWAYS 0x0008 -#define TVS_EDITLABELS 0x0008 -#define TCS_FLATBUTTONS 0x0008 -#define ACS_TIMER 0x0008 -#define MCS_NOTODAYCIRCLE 0x0008 -#define NFS_BUTTON 0x0008 -#define LANG_GREEK 0x08 -#define SUBLANG_ARABIC_OMAN 0x08 -#define SUBLANG_ENGLISH_JAMAICA 0x08 -#define SUBLANG_SPANISH_VENEZUELA 0x08 -#define PSP_USETITLE 0x00000008 -#define PSH_PROPSHEETPAGE 0x00000008 -#define PSWIZB_DISABLEDFINISH 0x00000008 -#define ICC_TAB_CLASSES 0x00000008 -#define CDIS_CHECKED 0x0008 -#define ILC_COLOR8 0x00000008 -#define ILS_ALPHA 0x00000008 -#define HDI_LPARAM 0x0008 -#define HHT_ONDIVOPEN 0x0008 -#define TBSTATE_HIDDEN 0x08 -#define TBSTYLE_DROPDOWN 0x0008 -#define TBSTYLE_EX_MIXEDBUTTONS 0x00000008 -#define IDB_HIST_SMALL_COLOR 8 -#define STD_FILESAVE 8 -#define VIEW_PARENTFOLDER 8 -#define TBIF_STYLE 0x00000008 -#define HICF_DUPACCEL 0x00000008 -#define RBBS_HIDDEN 0x00000008 -#define RBBIM_IMAGE 0x00000008 -#define RBHT_CHEVRON 0x0008 -#define TB_ENDTRACK 8 -#define HOTKEYF_EXT 0x08 -#define HKCOMB_A 0x0008 -#define LVIF_STATE 0x0008 -#define LVIS_DROPHILITED 0x0008 -#define LVNI_DROPHILITED 0x0008 -#define LVFI_PARTIAL 0x0008 -#define LVHT_ONITEMSTATEICON 0x0008 -#define LVHT_ABOVE 0x0008 -#define LVCF_SUBITEM 0x0008 -#define LVS_EX_TRACKSELECT 0x00000008 -#define TVIF_STATE 0x0008 -#define TVIS_DROPHILITED 0x0008 -#define TVGN_DROPHILITE 0x0008 -#define TVHT_ONITEMINDENT 0x0008 -#define CBEIF_OVERLAY 0x00000008 -#define CBES_EX_NOSIZELIMIT 0x00000008 -#define TCIF_PARAM 0x0008 -#define PGF_HOT 8 -#define PGF_SCROLLRIGHT 8 -#define SW_RESTORE 9 -#define VK_TAB 0x09 -#define HTMAXBUTTON 9 -#define CF_PALETTE 9 -#define IDHELP 9 -#define DTS_TIMEFORMAT 0x0009 -#define LANG_ENGLISH 0x09 -#define SUBLANG_ARABIC_YEMEN 0x09 -#define SUBLANG_ENGLISH_CARIBBEAN 0x09 -#define SUBLANG_SPANISH_COLOMBIA 0x09 -#define IDB_HIST_LARGE_COLOR 9 -#define STD_PRINTPRE 9 -#define VIEW_NETCONNECT 9 -#define TVGN_CARET 0x0009 -#define SW_SHOWDEFAULT 10 -#define WM_ENABLE 0x000A -#define HTLEFT 10 -#define CF_PENDATA 10 -#define IDTRYAGAIN 10 -#define HELP_CONTEXTMENU 0x000a -#define LANG_SPANISH 0x0a -#define SUBLANG_ARABIC_SYRIA 0x0a -#define SUBLANG_ENGLISH_BELIZE 0x0a -#define SUBLANG_SPANISH_PERU 0x0a -#define STD_PROPERTIES 10 -#define VIEW_NETDISCONNECT 10 -#define TVGN_LASTVISIBLE 0x000A -#define SW_FORCEMINIMIZE 11 -#define SW_MAX 11 -#define WM_SETREDRAW 0x000B -#define HTRIGHT 11 -#define CF_RIFF 11 -#define IDCONTINUE 11 -#define HELP_FINDER 0x000b -#define LANG_FINNISH 0x0b -#define SUBLANG_ARABIC_JORDAN 0x0b -#define SUBLANG_ENGLISH_TRINIDAD 0x0b -#define SUBLANG_SPANISH_ARGENTINA 0x0b -#define STD_HELP 11 -#define VIEW_NEWFOLDER 11 -#define VK_CLEAR 0x0C -#define WM_SETTEXT 0x000C -#define HTTOP 12 -#define CF_WAVE 12 -#define HELP_WM_HELP 0x000c -#define DTS_SHORTDATECENTURYFORMAT 0x000C -#define LANG_FRENCH 0x0c -#define SUBLANG_ARABIC_LEBANON 0x0c -#define SUBLANG_ENGLISH_ZIMBABWE 0x0c -#define SUBLANG_SPANISH_ECUADOR 0x0c -#define STD_FIND 12 -#define VIEW_VIEWMENU 12 -#define VK_RETURN 0x0D -#define WM_GETTEXT 0x000D -#define HTTOPLEFT 13 -#define CF_UNICODETEXT 13 -#define HELP_SETPOPUP_POS 0x000d -#define LANG_HEBREW 0x0d -#define SUBLANG_ARABIC_KUWAIT 0x0d -#define SUBLANG_ENGLISH_PHILIPPINES 0x0d -#define SUBLANG_SPANISH_CHILE 0x0d -#define STD_REPLACE 13 -#define WM_GETTEXTLENGTH 0x000E -#define HTTOPRIGHT 14 -#define CF_ENHMETAFILE 14 -#define LANG_HUNGARIAN 0x0e -#define SUBLANG_ARABIC_UAE 0x0e -#define SUBLANG_SPANISH_URUGUAY 0x0e -#define STD_PRINT 14 -#define WM_PAINT 0x000F -#define HTBOTTOM 15 -#define CF_HDROP 15 -#define LANG_ICELANDIC 0x0f -#define SUBLANG_ARABIC_BAHRAIN 0x0f -#define SUBLANG_SPANISH_PARAGUAY 0x0f -#define MAXIMUM_RESERVED_MANIFEST_RESOURCE_ID 16 -#define VK_SHIFT 0x10 -#define WM_CLOSE 0x0010 -#define HTBOTTOMLEFT 16 -#define WVR_ALIGNTOP 0x0010 -#define MK_MBUTTON 0x0010 -#define TME_NONCLIENT 0x00000010 -#define CF_LOCALE 16 -#define HELP_TCARD_DATA 0x0010 -#define TTS_NOANIMATE 0x10 -#define TBS_NOTICKS 0x0010 -#define UDS_AUTOBUDDY 0x0010 -#define LVS_SORTASCENDING 0x0010 -#define TVS_DISABLEDRAGDROP 0x0010 -#define TCS_FORCEICONLEFT 0x0010 -#define MCS_NOTODAY 0x0010 -#define DTS_APPCANPARSE 0x0010 -#define NFS_ALL 0x0010 -#define LANG_ITALIAN 0x10 -#define SUBLANG_ARABIC_QATAR 0x10 -#define SUBLANG_SPANISH_BOLIVIA 0x10 -#define PSP_RTLREADING 0x00000010 -#define PSH_WIZARDHASFINISH 0x00000010 -#define ICC_UPDOWN_CLASS 0x00000010 -#define CDRF_NOTIFYPOSTPAINT 0x00000010 -#define CDIS_FOCUS 0x0010 -#define ILC_COLOR16 0x00000010 -#define ILD_MASK 0x00000010 -#define HDI_BITMAP 0x0010 -#define HHT_ONFILTER 0x0010 -#define TBSTATE_INDETERMINATE 0x10 -#define TBSTYLE_AUTOSIZE 0x0010 -#define TBSTYLE_EX_HIDECLIPPEDBUTTONS 0x00000010 -#define TBIF_LPARAM 0x00000010 -#define HICF_ENTERING 0x00000010 -#define RBBS_NOVERT 0x00000010 -#define RBBIM_CHILD 0x00000010 -#define TTF_SUBCLASS 0x0010 -#define HKCOMB_SC 0x0010 -#define LVIF_INDENT 0x0010 -#define LVIS_GLOW 0x0010 -#define LVHT_BELOW 0x0010 -#define LVCF_IMAGE 0x0010 -#define LVS_EX_HEADERDRAGDROP 0x00000010 -#define LV_MAX_WORKAREAS 16 -#define LVBKIF_STYLE_TILE 0x00000010 -#define LVBKIF_STYLE_MASK 0x00000010 -#define TVIF_HANDLE 0x0010 -#define TVIS_BOLD 0x0010 -#define TVHT_ONITEMBUTTON 0x0010 -#define CBEIF_INDENT 0x00000010 -#define CBES_EX_CASESENSITIVE 0x00000010 -#define TCIF_STATE 0x0010 -#define VK_CONTROL 0x11 -#define WM_QUERYENDSESSION 0x0011 -#define HTBOTTOMRIGHT 17 -#define CF_DIBV5 17 -#define HELP_TCARD_OTHER_CALLER 0x0011 -#define LANG_JAPANESE 0x11 -#define SUBLANG_SPANISH_EL_SALVADOR 0x11 -#define VK_MENU 0x12 -#define WM_QUIT 0x0012 -#define HTBORDER 18 -#define CF_MAX 18 -#define LANG_KOREAN 0x12 -#define SUBLANG_SPANISH_HONDURAS 0x12 -#define VK_PAUSE 0x13 -#define WM_QUERYOPEN 0x0013 -#define HTOBJECT 19 -#define LANG_DUTCH 0x13 -#define SUBLANG_SPANISH_NICARAGUA 0x13 -#define VK_CAPITAL 0x14 -#define WM_ERASEBKGND 0x0014 -#define HTCLOSE 20 -#define LANG_NORWEGIAN 0x14 -#define SUBLANG_SPANISH_PUERTO_RICO 0x14 -#define VK_KANA 0x15 -#define VK_HANGEUL 0x15 -#define VK_HANGUL 0x15 -#define WM_SYSCOLORCHANGE 0x0015 -#define HTHELP 21 -#define LANG_POLISH 0x15 -#define WM_ENDSESSION 0x0016 -#define LANG_PORTUGUESE 0x16 -#define VK_JUNJA 0x17 -#define RT_MANIFEST 24 -#define VK_FINAL 0x18 -#define WM_SHOWWINDOW 0x0018 -#define LANG_ROMANIAN 0x18 -#define ILC_COLOR24 0x00000018 -#define VK_HANJA 0x19 -#define VK_KANJI 0x19 -#define LANG_RUSSIAN 0x19 -#define WM_WININICHANGE 0x001A -#define LANG_CROATIAN 0x1a -#define LANG_SERBIAN 0x1a -#define VK_ESCAPE 0x1B -#define WM_DEVMODECHANGE 0x001B -#define LANG_SLOVAK 0x1b -#define VK_CONVERT 0x1C -#define WM_ACTIVATEAPP 0x001C -#define LANG_ALBANIAN 0x1c -#define VK_NONCONVERT 0x1D -#define WM_FONTCHANGE 0x001D -#define LANG_SWEDISH 0x1d -#define VK_ACCEPT 0x1E -#define WM_TIMECHANGE 0x001E -#define LANG_THAI 0x1e -#define VK_MODECHANGE 0x1F -#define WM_CANCELMODE 0x001F -#define LANG_TURKISH 0x1f -#define VK_SPACE 0x20 -#define WM_SETCURSOR 0x0020 -#define WVR_ALIGNLEFT 0x0020 -#define MK_XBUTTON1 0x0020 -#define CS_OWNDC 0x0020 -#define TTS_NOFADE 0x20 -#define TBS_ENABLESELRANGE 0x0020 -#define UDS_ARROWKEYS 0x0020 -#define LVS_SORTDESCENDING 0x0020 -#define TVS_SHOWSELALWAYS 0x0020 -#define TCS_FORCELABELLEFT 0x0020 -#define DTS_RIGHTALIGN 0x0020 -#define NFS_USEFONTASSOC 0x0020 -#define LANG_URDU 0x20 -#define PSP_HASHELP 0x00000020 -#define PSH_WIZARD 0x00000020 -#define ICC_PROGRESS_CLASS 0x00000020 -#define CDRF_NOTIFYITEMDRAW 0x00000020 -#define CDRF_NOTIFYSUBITEMDRAW 0x00000020 -#define CDIS_DEFAULT 0x0020 -#define ILC_COLOR32 0x00000020 -#define ILD_IMAGE 0x00000020 -#define HDI_IMAGE 0x0020 -#define HHT_ONFILTERBUTTON 0x0020 -#define TBSTATE_WRAP 0x20 -#define TBSTYLE_NOPREFIX 0x0020 -#define TBIF_COMMAND 0x00000020 -#define HICF_LEAVING 0x00000020 -#define RBBS_FIXEDBMP 0x00000020 -#define RBBIM_CHILDSIZE 0x00000020 -#define TTF_TRACK 0x0020 -#define HKCOMB_SA 0x0020 -#define LVIS_ACTIVATING 0x0020 -#define LVFI_WRAP 0x0020 -#define LVHT_TORIGHT 0x0020 -#define LVCF_ORDER 0x0020 -#define LVS_EX_FULLROWSELECT 0x00000020 -#define TVIF_SELECTEDIMAGE 0x0020 -#define TVIS_EXPANDED 0x0020 -#define TVHT_ONITEMRIGHT 0x0020 -#define CBEIF_LPARAM 0x00000020 -#define VK_PRIOR 0x21 -#define WM_MOUSEACTIVATE 0x0021 -#define LANG_INDONESIAN 0x21 -#define VK_NEXT 0x22 -#define WM_CHILDACTIVATE 0x0022 -#define LANG_UKRAINIAN 0x22 -#define VK_END 0x23 -#define WM_QUEUESYNC 0x0023 -#define LANG_BELARUSIAN 0x23 -#define VK_HOME 0x24 -#define WM_GETMINMAXINFO 0x0024 -#define LANG_SLOVENIAN 0x24 -#define VK_LEFT 0x25 -#define LANG_ESTONIAN 0x25 -#define VK_UP 0x26 -#define WM_PAINTICON 0x0026 -#define LANG_LATVIAN 0x26 -#define VK_RIGHT 0x27 -#define WM_ICONERASEBKGND 0x0027 -#define LANG_LITHUANIAN 0x27 -#define VK_DOWN 0x28 -#define WM_NEXTDLGCTL 0x0028 -#define VK_SELECT 0x29 -#define LANG_FARSI 0x29 -#define VK_PRINT 0x2A -#define WM_SPOOLERSTATUS 0x002A -#define LANG_VIETNAMESE 0x2a -#define VK_EXECUTE 0x2B -#define WM_DRAWITEM 0x002B -#define LANG_ARMENIAN 0x2b -#define VK_SNAPSHOT 0x2C -#define WM_MEASUREITEM 0x002C -#define LANG_AZERI 0x2c -#define VK_INSERT 0x2D -#define WM_DELETEITEM 0x002D -#define LANG_BASQUE 0x2d -#define VK_DELETE 0x2E -#define WM_VKEYTOITEM 0x002E -#define VK_HELP 0x2F -#define WM_CHARTOITEM 0x002F -#define LANG_MACEDONIAN 0x2f -#define WM_SETFONT 0x0030 -#define WM_GETFONT 0x0031 -#define WM_SETHOTKEY 0x0032 -#define WM_GETHOTKEY 0x0033 -#define LANG_AFRIKAANS 0x36 -#define WM_QUERYDRAGICON 0x0037 -#define LANG_GEORGIAN 0x37 -#define LANG_FAEROESE 0x38 -#define WM_COMPAREITEM 0x0039 -#define LANG_HINDI 0x39 -#define WM_GETOBJECT 0x003D -#define LANG_MALAY 0x3e -#define LANG_KAZAK 0x3f -#define WVR_ALIGNBOTTOM 0x0040 -#define MK_XBUTTON2 0x0040 -#define CS_CLASSDC 0x0040 -#define HDS_DRAGDROP 0x0040 -#define TTS_BALLOON 0x40 -#define TBS_FIXEDLENGTH 0x0040 -#define UDS_HORZ 0x0040 -#define LVS_SHAREIMAGELISTS 0x0040 -#define TVS_RTLREADING 0x0040 -#define TCS_HOTTRACK 0x0040 -#define LANG_KYRGYZ 0x40 -#define PSP_USEREFPARENT 0x00000040 -#define PSH_USEPSTARTPAGE 0x00000040 -#define ICC_HOTKEY_CLASS 0x00000040 -#define CDRF_NOTIFYPOSTERASE 0x00000040 -#define CDIS_HOT 0x0040 -#define ILD_ROP 0x00000040 -#define HDI_DI_SETITEM 0x0040 -#define TBSTATE_ELLIPSES 0x40 -#define BTNS_SHOWTEXT 0x0040 -#define TBIF_SIZE 0x00000040 -#define HICF_RESELECT 0x00000040 -#define RBBS_VARIABLEHEIGHT 0x00000040 -#define RBBIM_SIZE 0x00000040 -#define HKCOMB_CA 0x0040 -#define LVFI_NEARESTXY 0x0040 -#define LVHT_TOLEFT 0x0040 -#define LVS_EX_ONECLICKACTIVATE 0x00000040 -#define TVIF_CHILDREN 0x0040 -#define TVIS_EXPANDEDONCE 0x0040 -#define TVHT_ONITEMSTATEICON 0x0040 -#define WM_COMPACTING 0x0041 -#define LANG_SWAHILI 0x41 -#define LANG_UZBEK 0x43 -#define WM_COMMNOTIFY 0x0044 -#define LANG_TATAR 0x44 -#define LANG_BENGALI 0x45 -#define WM_WINDOWPOSCHANGING 0x0046 -#define LANG_PUNJABI 0x46 -#define WM_WINDOWPOSCHANGED 0x0047 -#define LANG_GUJARATI 0x47 -#define WM_POWER 0x0048 -#define LANG_ORIYA 0x48 -#define LANG_TAMIL 0x49 -#define WM_COPYDATA 0x004A -#define LANG_TELUGU 0x4a -#define WM_CANCELJOURNAL 0x004B -#define LANG_KANNADA 0x4b -#define LANG_MALAYALAM 0x4c -#define LANG_ASSAMESE 0x4d -#define WM_NOTIFY 0x004E -#define LANG_MARATHI 0x4e -#define LANG_SANSKRIT 0x4f -#define WM_INPUTLANGCHANGEREQUEST 0x0050 -#define LANG_MONGOLIAN 0x50 -#define WIZ_CXBMP 80 -#define WM_INPUTLANGCHANGE 0x0051 -#define WM_TCARD 0x0052 -#define WM_HELP 0x0053 -#define WM_USERCHANGED 0x0054 -#define WM_NOTIFYFORMAT 0x0055 -#define LANG_GALICIAN 0x56 -#define LANG_KONKANI 0x57 -#define LANG_MANIPURI 0x58 -#define LANG_SINDHI 0x59 -#define LANG_SYRIAC 0x5a -#define VK_LWIN 0x5B -#define VK_RWIN 0x5C -#define WIZ_BODYX 92 -#define VK_APPS 0x5D -#define VK_SLEEP 0x5F -#define VK_NUMPAD0 0x60 -#define LANG_KASHMIRI 0x60 -#define VK_NUMPAD1 0x61 -#define LANG_NEPALI 0x61 -#define VK_NUMPAD2 0x62 -#define VK_NUMPAD3 0x63 -#define VK_NUMPAD4 0x64 -#define VS_USER_DEFINED 100 -#define MAXPROPPAGES 100 -#define ODT_HEADER 100 -#define IDM_OPEN 101 -#define VK_NUMPAD5 0x65 -#define LANG_DIVEHI 0x65 -#define ODT_TAB 101 -#define IDM_QUIT 102 -#define VK_NUMPAD6 0x66 -#define ODT_LISTVIEW 102 -#define IDC_FERMER 103 -#define IDD_DESASSEMBLEUR_VIEWER7 103 -#define VK_NUMPAD7 0x67 -#define IDC_STEP 104 -#define IDD_MEM_VIEWER7 104 -#define VK_NUMPAD8 0x68 -#define IDC_SETPNUM 105 -#define IDD_CONFIG 105 -#define VK_NUMPAD9 0x69 -#define IDC_SCROLLER 106 -#define IDD_SOUNDSETTINGS 106 -#define VK_MULTIPLY 0x6A -#define IDC_GO 107 -#define VK_ADD 0x6B -#define IDC_AUTO_UPDATE 108 -#define VK_SEPARATOR 0x6C -#define IDM_MEMORY 109 -#define VK_SUBTRACT 0x6D -#define IDM_DISASSEMBLER 110 -#define VK_DECIMAL 0x6E -#define IDC_AUTO_UPDATE2 111 -#define IDD_3DSETTINGS 111 -#define IDM_GAME_INFO 111 -#define VK_DIVIDE 0x6F -#define VK_F1 0x70 -#define IDD_GBASLOT 113 -#define IDM_PAUSE 113 -#define VK_F2 0x71 -#define IDD_GBASLOT_CFLASH 114 -#define IDM_RESET 114 -#define VK_F3 0x72 -#define IDD_CHEAT_SEARCH_VIEW 115 -#define IDM_IOREG 115 -#define VK_F4 0x73 -#define IDD_CHEAT_LIST 116 -#define VK_F5 0x74 -#define IDD_CHEAT_ADD 117 -#define IDM_PAL 117 -#define VK_F6 0x75 -#define IDM_TILE 118 -#define VK_F7 0x76 -#define IDM_MAP 119 -#define VK_F8 0x77 -#define IDM_MBG0 120 -#define VK_F9 0x78 -#define WHEEL_DELTA 120 -#define IDM_MBG1 121 -#define VK_F10 0x79 -#define IDM_MBG2 122 -#define VK_F11 0x7A -#define IDM_MBG3 123 -#define VK_F12 0x7B -#define WM_CONTEXTMENU 0x007B -#define IDM_SBG0 124 -#define VK_F13 0x7C -#define WM_STYLECHANGING 0x007C -#define IDM_SBG1 125 -#define VK_F14 0x7D -#define WM_STYLECHANGED 0x007D -#define IDM_SBG2 126 -#define VK_F15 0x7E -#define WM_DISPLAYCHANGE 0x007E -#define IDM_SBG3 127 -#define VK_F16 0x7F -#define WM_GETICON 0x007F -#define LANG_INVARIANT 0x7f -#define IDM_OAM 128 -#define VK_F17 0x80 -#define WM_SETICON 0x0080 -#define WVR_ALIGNRIGHT 0x0080 -#define CS_PARENTDC 0x0080 -#define CF_OWNERDISPLAY 0x0080 -#define HDS_FULLDRAG 0x0080 -#define TTS_CLOSE 0x80 -#define TBS_NOTHUMB 0x0080 -#define UDS_NOTHOUSANDS 0x0080 -#define LVS_NOLABELWRAP 0x0080 -#define TVS_NOTOOLTIPS 0x0080 -#define TCS_VERTICAL 0x0080 -#define PSP_USECALLBACK 0x00000080 -#define PSH_NOAPPLYNOW 0x00000080 -#define ICC_ANIMATE_CLASS 0x00000080 -#define CDIS_MARKED 0x0080 -#define HDI_ORDER 0x0080 -#define TBSTATE_MARKED 0x80 -#define BTNS_WHOLEDROPDOWN 0x0080 -#define HICF_LMOUSE 0x00000080 -#define RBBS_GRIPPERALWAYS 0x00000080 -#define RBBIM_BACKGROUND 0x00000080 -#define TTF_ABSOLUTE 0x0080 -#define HKCOMB_SCA 0x0080 -#define LVS_EX_TWOCLICKACTIVATE 0x00000080 -#define TVIF_INTEGRAL 0x0080 -#define TVIS_EXPANDPARTIAL 0x0080 -#define IDM_PRINTSCREEN 129 -#define VK_F18 0x81 -#define WM_NCCREATE 0x0081 -#define CF_DSPTEXT 0x0081 -#define IDM_QUICK_PRINTSCREEN 130 -#define VK_F19 0x82 -#define WM_NCDESTROY 0x0082 -#define CF_DSPBITMAP 0x0082 -#define IDM_SOUNDSETTINGS 131 -#define VK_F20 0x83 -#define WM_NCCALCSIZE 0x0083 -#define CF_DSPMETAFILEPICT 0x0083 -#define IDM_WEBSITE 132 -#define VK_F21 0x84 -#define WM_NCHITTEST 0x0084 -#define IDM_FORUM 133 -#define VK_F22 0x85 -#define WM_NCPAINT 0x0085 -#define IDM_SUBMITBUGREPORT 134 -#define VK_F23 0x86 -#define WM_NCACTIVATE 0x0086 -#define IDM_STATE_LOAD 135 -#define VK_F24 0x87 -#define WM_GETDLGCODE 0x0087 -#define IDM_STATE_SAVE 136 -#define WM_SYNCPAINT 0x0088 -#define IDR_MAIN_ACCEL 137 -#define IDM_STATE_SAVE_F1 140 -#define WIZ_CYDLG 140 -#define IDM_STATE_SAVE_F2 141 -#define IDM_STATE_SAVE_F3 142 -#define CF_DSPENHMETAFILE 0x008E -#define IDM_STATE_SAVE_F4 143 -#define IDM_STATE_SAVE_F5 144 -#define VK_NUMLOCK 0x90 -#define IDM_STATE_SAVE_F6 145 -#define VK_SCROLL 0x91 -#define IDM_STATE_SAVE_F7 146 -#define VK_OEM_NEC_EQUAL 0x92 -#define VK_OEM_FJ_JISHO 0x92 -#define IDM_STATE_SAVE_F8 147 -#define VK_OEM_FJ_MASSHOU 0x93 -#define IDM_STATE_SAVE_F9 148 -#define VK_OEM_FJ_TOUROKU 0x94 -#define IDM_STATE_SAVE_F10 149 -#define VK_OEM_FJ_LOYA 0x95 -#define IDM_STATE_LOAD_F1 150 -#define VK_OEM_FJ_ROYA 0x96 -#define IDM_STATE_LOAD_F2 151 -#define IDM_STATE_LOAD_F3 152 -#define IDM_STATE_LOAD_F4 153 -#define IDM_STATE_LOAD_F5 154 -#define IDM_STATE_LOAD_F6 155 -#define IDM_STATE_LOAD_F7 156 -#define IDM_STATE_LOAD_F8 157 -#define IDM_STATE_LOAD_F9 158 -#define IDM_STATE_LOAD_F10 159 -#define IDC_COMBO1 160 -#define VK_LSHIFT 0xA0 -#define WM_NCMOUSEMOVE 0x00A0 -#define IDC_COMBO2 161 -#define VK_RSHIFT 0xA1 -#define WM_NCLBUTTONDOWN 0x00A1 -#define IDC_COMBO3 162 -#define VK_LCONTROL 0xA2 -#define WM_NCLBUTTONUP 0x00A2 -#define IDC_COMBO4 163 -#define VK_RCONTROL 0xA3 -#define WM_NCLBUTTONDBLCLK 0x00A3 -#define IDC_COMBO5 164 -#define VK_LMENU 0xA4 -#define WM_NCRBUTTONDOWN 0x00A4 -#define IDC_COMBO6 165 -#define VK_RMENU 0xA5 -#define WM_NCRBUTTONUP 0x00A5 -#define IDC_COMBO7 166 -#define VK_BROWSER_BACK 0xA6 -#define WM_NCRBUTTONDBLCLK 0x00A6 -#define IDC_COMBO8 167 -#define VK_BROWSER_FORWARD 0xA7 -#define WM_NCMBUTTONDOWN 0x00A7 -#define IDC_COMBO9 168 -#define VK_BROWSER_REFRESH 0xA8 -#define WM_NCMBUTTONUP 0x00A8 -#define IDC_COMBO10 169 -#define VK_BROWSER_STOP 0xA9 -#define WM_NCMBUTTONDBLCLK 0x00A9 -#define IDC_COMBO11 170 -#define VK_BROWSER_SEARCH 0xAA -#define IDC_COMBO12 171 -#define VK_BROWSER_FAVORITES 0xAB -#define WM_NCXBUTTONDOWN 0x00AB -#define VK_BROWSER_HOME 0xAC -#define WM_NCXBUTTONUP 0x00AC -#define IDC_BUTTON1 173 -#define VK_VOLUME_MUTE 0xAD -#define WM_NCXBUTTONDBLCLK 0x00AD -#define VK_VOLUME_DOWN 0xAE -#define VK_VOLUME_UP 0xAF -#define VK_MEDIA_NEXT_TRACK 0xB0 -#define EM_GETSEL 0x00B0 -#define VK_MEDIA_PREV_TRACK 0xB1 -#define EM_SETSEL 0x00B1 -#define VK_MEDIA_STOP 0xB2 -#define EM_GETRECT 0x00B2 -#define VK_MEDIA_PLAY_PAUSE 0xB3 -#define EM_SETRECT 0x00B3 -#define IDM_CONFIG 180 -#define VK_LAUNCH_MAIL 0xB4 -#define EM_SETRECTNP 0x00B4 -#define IDD_INPUT 181 -#define VK_LAUNCH_MEDIA_SELECT 0xB5 -#define EM_SCROLL 0x00B5 -#define IDC_SAVETYPE1 182 -#define VK_LAUNCH_APP1 0xB6 -#define EM_LINESCROLL 0x00B6 -#define IDC_SAVETYPE2 183 -#define VK_LAUNCH_APP2 0xB7 -#define EM_SCROLLCARET 0x00B7 -#define IDC_SAVETYPE3 184 -#define EM_GETMODIFY 0x00B8 -#define WIZ_BODYCX 184 -#define IDC_SAVETYPE4 185 -#define EM_SETMODIFY 0x00B9 -#define IDC_SAVETYPE5 186 -#define VK_OEM_1 0xBA -#define EM_GETLINECOUNT 0x00BA -#define IDC_SAVETYPE6 187 -#define VK_OEM_PLUS 0xBB -#define EM_LINEINDEX 0x00BB -#define VK_OEM_COMMA 0xBC -#define EM_SETHANDLE 0x00BC -#define PROP_SM_CYDLG 188 -#define VK_OEM_MINUS 0xBD -#define EM_GETHANDLE 0x00BD -#define IDC_FRAMESKIPAUTO 190 -#define VK_OEM_PERIOD 0xBE -#define EM_GETTHUMB 0x00BE -#define IDC_FRAMESKIP0 191 -#define VK_OEM_2 0xBF -#define IDC_FRAMESKIP1 192 -#define VK_OEM_3 0xC0 -#define IDC_FRAMESKIP2 193 -#define EM_LINELENGTH 0x00C1 -#define IDC_FRAMESKIP3 194 -#define EM_REPLACESEL 0x00C2 -#define IDC_FRAMESKIP4 195 -#define IDC_FRAMESKIP5 196 -#define EM_GETLINE 0x00C4 -#define IDC_FRAMESKIP6 197 -#define EM_LIMITTEXT 0x00C5 -#define IDC_FRAMESKIP7 198 -#define EM_CANUNDO 0x00C6 -#define IDC_FRAMESKIP8 199 -#define EM_UNDO 0x00C7 -#define IDC_FRAMESKIP9 200 -#define EM_FMTLINES 0x00C8 -#define IDM_IMPORTBACKUPMEMORY 201 -#define EM_LINEFROMCHAR 0x00C9 -#define EM_SETTABSTOPS 0x00CB -#define EM_SETPASSWORDCHAR 0x00CC -#define EM_EMPTYUNDOBUFFER 0x00CD -#define EM_GETFIRSTVISIBLELINE 0x00CE -#define EM_SETREADONLY 0x00CF -#define EM_SETWORDBREAKPROC 0x00D0 -#define EM_GETWORDBREAKPROC 0x00D1 -#define IDC_LANGENGLISH 210 -#define EM_GETPASSWORDCHAR 0x00D2 -#define IDC_LANGFRENCH 211 -#define EM_SETMARGINS 0x00D3 -#define IDC_LANGDANISH 212 -#define EM_GETMARGINS 0x00D4 -#define PROP_SM_CXDLG 212 -#define EM_GETLIMITTEXT 0x00D5 -#define EM_POSFROMCHAR 0x00D6 -#define EM_CHARFROMPOS 0x00D7 -#define PROP_MED_CYDLG 215 -#define EM_SETIMESTATUS 0x00D8 -#define EM_GETIMESTATUS 0x00D9 -#define PROP_LG_CYDLG 218 -#define VK_OEM_4 0xDB -#define VK_OEM_5 0xDC -#define VK_OEM_6 0xDD -#define VK_OEM_7 0xDE -#define VK_OEM_8 0xDF -#define VK_OEM_AX 0xE1 -#define VK_OEM_102 0xE2 -#define VK_ICO_HELP 0xE3 -#define PROP_MED_CXDLG 227 -#define VK_ICO_00 0xE4 -#define VK_PROCESSKEY 0xE5 -#define VK_ICO_CLEAR 0xE6 -#define VK_PACKET 0xE7 -#define VK_OEM_RESET 0xE9 -#define VK_OEM_JUMP 0xEA -#define VK_OEM_PA1 0xEB -#define VK_OEM_PA2 0xEC -#define VK_OEM_PA3 0xED -#define VK_OEM_WSCTRL 0xEE -#define VK_OEM_CUSEL 0xEF -#define VK_OEM_ATTN 0xF0 -#define BM_GETCHECK 0x00F0 -#define VK_OEM_FINISH 0xF1 -#define BM_SETCHECK 0x00F1 -#define VK_OEM_COPY 0xF2 -#define BM_GETSTATE 0x00F2 -#define VK_OEM_AUTO 0xF3 -#define BM_SETSTATE 0x00F3 -#define VK_OEM_ENLW 0xF4 -#define BM_SETSTYLE 0x00F4 -#define VK_OEM_BACKTAB 0xF5 -#define BM_CLICK 0x00F5 -#define VK_ATTN 0xF6 -#define BM_GETIMAGE 0x00F6 -#define VK_CRSEL 0xF7 -#define BM_SETIMAGE 0x00F7 -#define VK_EXSEL 0xF8 -#define VK_EREOF 0xF9 -#define VK_PLAY 0xFA -#define VK_ZOOM 0xFB -#define VK_NONAME 0xFC -#define PROP_LG_CXDLG 252 -#define VK_PA1 0xFD -#define VK_OEM_CLEAR 0xFE -#define ILC_COLORDDB 0x000000FE -#define ICC_WIN95_CLASSES 0x000000FF -#define SB_SIMPLEID 0x00ff -#define WM_KEYFIRST 0x0100 -#define WM_KEYDOWN 0x0100 -#define WVR_HREDRAW 0x0100 -#define HDS_FILTERBAR 0x0100 -#define RBS_TOOLTIPS 0x0100 -#define SBARS_SIZEGRIP 0x0100 -#define TBS_TOOLTIPS 0x0100 -#define UDS_HOTTRACK 0x0100 -#define LVS_AUTOARRANGE 0x0100 -#define TVS_CHECKBOXES 0x0100 -#define TCS_BUTTONS 0x0100 -#define PSH_USECALLBACK 0x00000100 -#define ICC_DATE_CLASSES 0x00000100 -#define CDIS_INDETERMINATE 0x0100 -#define HDI_FILTER 0x0100 -#define HHT_ABOVE 0x0100 -#define TBSTYLE_TOOLTIPS 0x0100 -#define HICF_TOGGLEDROPDOWN 0x00000100 -#define RBBS_NOGRIPPER 0x00000100 -#define RBBIM_ID 0x00000100 -#define TTF_TRANSPARENT 0x0100 -#define SBT_NOBORDERS 0x0100 -#define LVNI_ABOVE 0x0100 -#define LVS_EX_FLATSB 0x00000100 -#define TVHT_ABOVE 0x0100 -#define WM_KEYUP 0x0101 -#define WM_CHAR 0x0102 -#define WM_DEADCHAR 0x0103 -#define WM_SYSKEYDOWN 0x0104 -#define CBEMAXSTRLEN 260 -#define WM_SYSKEYUP 0x0105 -#define WM_SYSCHAR 0x0106 -#define WM_SYSDEADCHAR 0x0107 -#define WM_KEYLAST 0x0108 -#define WM_IME_STARTCOMPOSITION 0x010D -#define WM_IME_ENDCOMPOSITION 0x010E -#define WM_IME_COMPOSITION 0x010F -#define WM_IME_KEYLAST 0x010F -#define WM_INITDIALOG 0x0110 -#define WM_COMMAND 0x0111 -#define WM_SYSCOMMAND 0x0112 -#define WM_TIMER 0x0113 -#define WM_HSCROLL 0x0114 -#define WIZ_CXDLG 276 -#define WM_VSCROLL 0x0115 -#define WM_INITMENU 0x0116 -#define WM_INITMENUPOPUP 0x0117 -#define WM_MENUSELECT 0x011F -#define WM_MENUCHAR 0x0120 -#define WM_ENTERIDLE 0x0121 -#define WM_MENURBUTTONUP 0x0122 -#define WM_MENUDRAG 0x0123 -#define WM_MENUGETOBJECT 0x0124 -#define WM_UNINITMENUPOPUP 0x0125 -#define WM_MENUCOMMAND 0x0126 -#define WM_CHANGEUISTATE 0x0127 -#define WM_UPDATEUISTATE 0x0128 -#define WM_QUERYUISTATE 0x0129 -#define IDC_8_BIT 302 -#define IDC_16_BIT 303 -#define IDC_32_BIT 304 -#define IDC_MEM_BOX 305 -#define IDC_GOTOMEM 306 -#define WM_CTLCOLORMSGBOX 0x0132 -#define WM_CTLCOLOREDIT 0x0133 -#define WM_CTLCOLORLISTBOX 0x0134 -#define WM_CTLCOLORBTN 0x0135 -#define WM_CTLCOLORDLG 0x0136 -#define WM_CTLCOLORSCROLLBAR 0x0137 -#define WM_CTLCOLORSTATIC 0x0138 -#define IDC_DES_BOX 402 -#define IDC_R0 403 -#define IDC_R1 404 -#define IDC_R2 405 -#define IDC_R3 406 -#define IDC_R4 407 -#define IDC_R5 408 -#define IDC_R6 409 -#define IDC_R7 410 -#define IDC_R8 411 -#define IDC_R9 412 -#define IDC_R10 413 -#define IDC_R11 414 -#define IDC_R12 415 -#define IDC_R13 416 -#define IDC_R14 417 -#define IDC_R15 418 -#define IDC_MODE 419 -#define IDC_AUTO_DES 420 -#define IDC_ARM 421 -#define IDC_THUMB 422 -#define IDC_GOTODES 423 -#define IDC_TMP 424 -#define MN_GETHMENU 0x01E1 -#define IDD_GAME_INFO 501 -#define IDC_NOM_JEU 502 -#define IDC_CDE 503 -#define IDC_FAB 504 -#define IDC_TAILLE 505 -#define IDC_ARM9_T 506 -#define IDC_ARM7_T 507 -#define IDC_DATA 508 -#define WM_MOUSEFIRST 0x0200 -#define WM_MOUSEMOVE 0x0200 -#define WVR_VREDRAW 0x0200 -#define CS_NOCLOSE 0x0200 -#define CF_PRIVATEFIRST 0x0200 -#define RBS_VARHEIGHT 0x0200 -#define TBS_REVERSED 0x0200 -#define LVS_EDITLABELS 0x0200 -#define TVS_TRACKSELECT 0x0200 -#define TCS_MULTILINE 0x0200 -#define PSH_HASHELP 0x00000200 -#define ICC_USEREX_CLASSES 0x00000200 -#define HHT_BELOW 0x0200 -#define TBSTYLE_WRAPABLE 0x0200 -#define RBBS_USECHEVRON 0x00000200 -#define RBBIM_IDEALSIZE 0x00000200 -#define SBT_POPOUT 0x0200 -#define LVNI_BELOW 0x0200 -#define LVS_EX_REGIONAL 0x00000200 -#define TVHT_BELOW 0x0200 -#define WM_LBUTTONDOWN 0x0201 -#define WM_LBUTTONUP 0x0202 -#define WM_LBUTTONDBLCLK 0x0203 -#define WM_RBUTTONDOWN 0x0204 -#define WM_RBUTTONUP 0x0205 -#define WM_RBUTTONDBLCLK 0x0206 -#define WM_MBUTTONDOWN 0x0207 -#define WM_MBUTTONUP 0x0208 -#define WM_MBUTTONDBLCLK 0x0209 -#define WM_MOUSEWHEEL 0x020A -#define WM_XBUTTONDOWN 0x020B -#define WM_XBUTTONUP 0x020C -#define WM_XBUTTONDBLCLK 0x020D -#define WM_MOUSELAST 0x020D -#define WM_PARENTNOTIFY 0x0210 -#define WM_ENTERMENULOOP 0x0211 -#define WM_EXITMENULOOP 0x0212 -#define WM_NEXTMENU 0x0213 -#define WM_SIZING 0x0214 -#define WM_CAPTURECHANGED 0x0215 -#define WM_MOVING 0x0216 -#define WM_POWERBROADCAST 0x0218 -#define WM_DEVICECHANGE 0x0219 -#define WM_MDICREATE 0x0220 -#define WM_MDIDESTROY 0x0221 -#define WM_MDIACTIVATE 0x0222 -#define WM_MDIRESTORE 0x0223 -#define WM_MDINEXT 0x0224 -#define WM_MDIMAXIMIZE 0x0225 -#define WM_MDITILE 0x0226 -#define WM_MDICASCADE 0x0227 -#define WM_MDIICONARRANGE 0x0228 -#define WM_MDIGETACTIVE 0x0229 -#define WM_MDISETMENU 0x0230 -#define WM_ENTERSIZEMOVE 0x0231 -#define WM_EXITSIZEMOVE 0x0232 -#define WM_DROPFILES 0x0233 -#define WM_MDIREFRESHMENU 0x0234 -#define IDD_IO_REG 601 -#define WM_IME_SETCONTEXT 0x0281 -#define WM_IME_NOTIFY 0x0282 -#define WM_IME_CONTROL 0x0283 -#define WM_IME_COMPOSITIONFULL 0x0284 -#define WM_IME_SELECT 0x0285 -#define WM_IME_CHAR 0x0286 -#define WM_IME_REQUEST 0x0288 -#define WM_IME_KEYDOWN 0x0290 -#define WM_IME_KEYUP 0x0291 -#define WM_NCMOUSEHOVER 0x02A0 -#define WM_MOUSEHOVER 0x02A1 -#define WM_NCMOUSELEAVE 0x02A2 -#define WM_MOUSELEAVE 0x02A3 -#define IDD_PAL 703 -#define IDD_TILE 704 -#define IDC_PAL_SELECT 705 -#define IDC_PALNUM 706 -#define IDC_MEM_SELECT 707 -#define IDC_Tile_BOX 708 -#define IDC_BITMAP 709 -#define IDC_256COUL 710 -#define IDC_16COUL 711 -#define IDC_MINI_TILE 712 -#define IDC_TILENUM 713 -#define CF_PRIVATELAST 0x02FF -#define WM_CUT 0x0300 -#define CF_GDIOBJFIRST 0x0300 -#define WM_COPY 0x0301 -#define WM_PASTE 0x0302 -#define WM_CLEAR 0x0303 -#define WM_UNDO 0x0304 -#define WM_RENDERFORMAT 0x0305 -#define WM_RENDERALLFORMATS 0x0306 -#define WM_DESTROYCLIPBOARD 0x0307 -#define WM_DRAWCLIPBOARD 0x0308 -#define WM_PAINTCLIPBOARD 0x0309 -#define WM_VSCROLLCLIPBOARD 0x030A -#define WM_SIZECLIPBOARD 0x030B -#define WM_ASKCBFORMATNAME 0x030C -#define WM_CHANGECBCHAIN 0x030D -#define WM_HSCROLLCLIPBOARD 0x030E -#define WM_QUERYNEWPALETTE 0x030F -#define WM_PALETTEISCHANGING 0x0310 -#define WM_PALETTECHANGED 0x0311 -#define WM_HOTKEY 0x0312 -#define WM_PRINT 0x0317 -#define WM_PRINTCLIENT 0x0318 -#define WM_APPCOMMAND 0x0319 -#define IDD_MAP 800 -#define IDC_BG_SELECT 801 -#define IDC_PAL 803 -#define IDC_PRIO 804 -#define IDC_CHAR 805 -#define IDC_SCR 806 -#define IDC_MSIZE 807 -#define IDC_SCROLL 808 -#define WM_HANDHELDFIRST 0x0358 -#define WM_HANDHELDLAST 0x035F -#define WM_AFXFIRST 0x0360 -#define WM_AFXLAST 0x037F -#define WM_PENWINFIRST 0x0380 -#define IDD_OAM 900 -#define IDC_SCR_SELECT 901 -#define IDC_TILE 902 -#define IDC_OAMNUM 903 -#define IDC_COOR 904 -#define IDC_DIM 905 -#define IDC_ROT 906 -#define IDC_MOS 907 -#define IDC_PROP0 908 -#define IDC_PROP1 909 -#define WM_PENWINLAST 0x038F -#define WM_DDE_FIRST 0x03E0 -#define IDC_EDIT03 1000 -#define IDC_SOUNDCORECB 1000 -#define IDC_EDIT01 1001 -#define IDC_SOUNDBUFFERET 1001 -#define IDC_EDIT05 1002 -#define IDC_SLVOLUME 1002 -#define IDC_EDIT08 1003 -#define IDC_ROTATE0 1003 -#define IDC_EDIT11 1004 -#define IDC_ROTATE90 1004 -#define IDC_EDIT07 1005 -#define IDC_ROTATE180 1005 -#define IDC_EDIT12 1006 -#define IDC_ROTATE270 1006 -#define IDC_EDIT06 1007 -#define IDC_EDIT09 1008 -#define IDC_EDIT10 1009 -#define IDC_FORCERATIO 1009 -#define IDC_AUTO_UPDATE_SPIN 1010 -#define IDC_EDIT15 1010 -#define IDC_WINDOW1X 1010 -#define IDC_AUTO_UPDATE_SECS 1011 -#define IDC_WINDOW2X 1011 -#define IDC_REFRESH 1012 -#define IDC_WINDOW3X 1012 -#define IDC_EDIT02 1013 -#define IDC_WINDOW4X 1013 -#define IDC_EDIT04 1014 -#define IDC_AUTOUPDATE_ASM 1018 -#define IDC_VISIBLE 1019 -#define IDC_IPCFIFO9 1020 -#define IDC_IPCSYNC9 1021 -#define IDC_IF9 1022 -#define IDC_INTHAND9 1023 -#define CF_GDIOBJLAST 0x03FF -#define IDC_IE9 1024 -#define WM_USER 0x0400 -#define WVR_VALIDRECTS 0x0400 -#define RBS_BANDBORDERS 0x0400 -#define TBS_DOWNISLEFT 0x0400 -#define LVS_OWNERDRAWFIXED 0x0400 -#define TVS_SINGLEEXPAND 0x0400 -#define TCS_FIXEDWIDTH 0x0400 -#define ctlFirst 0x0400 -#define psh1 0x0400 -#define PSP_PREMATURE 0x00000400 -#define PSH_MODELESS 0x00000400 -#define ICC_COOL_CLASSES 0x00000400 -#define INFOTIPSIZE 1024 -#define HHT_TORIGHT 0x0400 -#define TBSTYLE_ALTDRAG 0x0400 -#define RBBS_HIDETITLE 0x00000400 -#define RBBIM_LPARAM 0x00000400 -#define SBT_RTLREADING 0x0400 -#define LVNI_TOLEFT 0x0400 -#define LVS_EX_INFOTIP 0x00000400 -#define TVHT_TORIGHT 0x0400 -#define IDC_DISPCNTA9 1025 -#define psh2 0x0401 -#define IDC_DISPSTATA9 1026 -#define psh3 0x0402 -#define IDC_DEFAULT 1027 -#define IDC_DISPCNTB9 1027 -#define psh4 0x0403 -#define IDC_3DCORE 1028 -#define IDC_DISPSTATB9 1028 -#define psh5 0x0404 -#define IDC_IME9 1029 -#define IDC_TXT_COMPILED 1029 -#define psh6 0x0405 -#define IDC_GXSTAT9 1030 -#define IDC_TXT_VERSION 1030 -#define psh7 0x0406 -#define psh8 0x0407 -#define IDC_IE7 1032 -#define psh9 0x0408 -#define IDC_ADDONS_LIST 1033 -#define IDC_IF7 1033 -#define psh10 0x0409 -#define IDC_ADDONS_INFO 1034 -#define IDC_IME7 1034 -#define psh11 0x040a -#define IDC_BBROWSE 1035 -#define IDC_IPCSYNC7 1035 -#define psh12 0x040b -#define IDC_IPCFIFO7 1036 -#define IDC_PATHIMG 1036 -#define psh13 0x040c -#define IDC_PATH 1037 -#define IDC_PATHGAME 1037 -#define psh14 0x040d -#define IDC_RFILE 1038 -#define psh15 0x040e -#define IDC_RFOLDER 1039 -#define psh16 0x040f -#define IDC_BBROWSE2 1040 -#define _WIN32_WINDOWS 0x0410 -#define chx1 0x0410 -#define IDC_PATHDESMUME 1041 -#define chx2 0x0411 -#define IDC_BRESTART 1042 -#define chx3 0x0412 -#define IDC_BVIEW 1043 -#define chx4 0x0413 -#define IDC_BSEARCH 1044 -#define chx5 0x0414 -#define IDC_RADIO1 1045 -#define chx6 0x0415 -#define IDC_RADIO2 1046 -#define chx7 0x0416 -#define IDC_RADIO3 1047 -#define chx8 0x0417 -#define IDC_RADIO4 1048 -#define chx9 0x0418 -#define IDC_RADIO5 1049 -#define chx10 0x0419 -#define IDC_RADIO6 1050 -#define chx11 0x041a -#define IDC_RADIO7 1051 -#define chx12 0x041b -#define IDC_RADIO8 1052 -#define chx13 0x041c -#define chx14 0x041d -#define chx15 0x041e -#define chx16 0x041f -#define IDC_LIST1 1056 -#define rad1 0x0420 -#define IDC_BADD_AR 1057 -#define rad2 0x0421 -#define IDC_BADD_CB 1058 -#define rad3 0x0422 -#define rad4 0x0423 -#define IDC_BREMOVE 1060 -#define rad5 0x0424 -#define IDC_BEDIT 1061 -#define IDC_STATIC_S1 1061 -#define rad6 0x0425 -#define IDC_STATIC_S2 1062 -#define rad7 0x0426 -#define IDC_STATIC_S3 1063 -#define rad8 0x0427 -#define IDC_STATIC_S4 1064 -#define rad9 0x0428 -#define IDC_EVALUE 1065 -#define rad10 0x0429 -#define IDC_STATIC_RANGE 1066 -#define rad11 0x042a -#define rad12 0x042b -#define IDC_BADD 1068 -#define rad13 0x042c -#define IDC_LIST 1069 -#define rad14 0x042d -#define rad15 0x042e -#define IDC_SNUMBER 1071 -#define rad16 0x042f -#define grp1 0x0430 -#define grp2 0x0431 -#define IDC_CHECK1 1074 -#define grp3 0x0432 -#define IDC_RADIO9 1075 -#define grp4 0x0433 -#define frm1 0x0434 -#define frm2 0x0435 -#define frm3 0x0436 -#define frm4 0x0437 -#define rct1 0x0438 -#define rct2 0x0439 -#define rct3 0x043a -#define rct4 0x043b -#define ico1 0x043c -#define ico2 0x043d -#define ico3 0x043e -#define ico4 0x043f -#define stc1 0x0440 -#define stc2 0x0441 -#define stc3 0x0442 -#define stc4 0x0443 -#define stc5 0x0444 -#define stc6 0x0445 -#define stc7 0x0446 -#define stc8 0x0447 -#define stc9 0x0448 -#define stc10 0x0449 -#define stc11 0x044a -#define stc12 0x044b -#define IDM_FIRMSETTINGS 1100 -#define stc13 0x044c -#define IDD_FIRMSETTINGS 1101 -#define stc14 0x044d -#define IDC_EDIT1 1102 -#define stc15 0x044e -#define IDC_EDIT2 1103 -#define stc16 0x044f -#define IDC_EDIT13 1104 -#define IDC_EDIT3 1104 -#define stc17 0x0450 -#define IDC_EDIT14 1105 -#define stc18 0x0451 -#define stc19 0x0452 -#define stc20 0x0453 -#define stc21 0x0454 -#define stc22 0x0455 -#define stc23 0x0456 -#define stc24 0x0457 -#define stc25 0x0458 -#define stc26 0x0459 -#define stc27 0x045a -#define stc28 0x045b -#define stc29 0x045c -#define stc30 0x045d -#define stc31 0x045e -#define stc32 0x045f -#define lst1 0x0460 -#define lst2 0x0461 -#define lst3 0x0462 -#define lst4 0x0463 -#define lst5 0x0464 -#define lst6 0x0465 -#define lst7 0x0466 -#define lst8 0x0467 -#define lst9 0x0468 -#define lst10 0x0469 -#define lst11 0x046a -#define lst12 0x046b -#define lst13 0x046c -#define lst14 0x046d -#define lst15 0x046e -#define lst16 0x046f -#define cmb1 0x0470 -#define cmb2 0x0471 -#define cmb3 0x0472 -#define cmb4 0x0473 -#define cmb5 0x0474 -#define cmb6 0x0475 -#define cmb7 0x0476 -#define cmb8 0x0477 -#define cmb9 0x0478 -#define cmb10 0x0479 -#define cmb11 0x047a -#define cmb12 0x047b -#define cmb13 0x047c -#define cmb14 0x047d -#define cmb15 0x047e -#define cmb16 0x047f -#define edt1 0x0480 -#define edt2 0x0481 -#define edt3 0x0482 -#define edt4 0x0483 -#define edt5 0x0484 -#define edt6 0x0485 -#define edt7 0x0486 -#define edt8 0x0487 -#define edt9 0x0488 -#define edt10 0x0489 -#define edt11 0x048a -#define edt12 0x048b -#define edt13 0x048c -#define edt14 0x048d -#define edt15 0x048e -#define edt16 0x048f -#define scr1 0x0490 -#define scr2 0x0491 -#define scr3 0x0492 -#define scr4 0x0493 -#define scr5 0x0494 -#define scr6 0x0495 -#define scr7 0x0496 -#define scr8 0x0497 -#define ctl1 0x04A0 -#define IDD_MATRIX_VIEWER 1200 -#define IDM_MATRIX_VIEWER 1200 -#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 -#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 -#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 -#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 -#define ctlLast 0x04ff -#define _WIN32_WINNT 0x0500 -#define WINVER 0x0501 -#define _WIN32_IE 0x0501 -#define IDD_LIGHT_VIEWER 1300 -#define IDM_LIGHT_VIEWER 1300 -#define IDC_LIGHT_VIWER_LIGHT0_GROUP 1301 -#define IDD_ABOUT_BOX 1301 -#define IDC_AUTHORS_LIST 1302 -#define IDC_LIGHT_VIEWER_LIGHT0COLOR_COLORCTRL 1302 -#define IDD_DESASSEMBLEUR_VIEWER9 1302 -#define IDC_LIGHT_VIEWER_LIGHT0COLOR_EDIT 1303 -#define IDD_MEM_VIEWER9 1303 -#define IDC_LIGHT_VIEWER_LIGHT0VECTOR_EDIT 1304 -#define IDD_GBASLOT_NONE 1304 -#define IDD_GBASLOT_RUMBLEPAK 1305 -#define IDD_GBASLOT_GBAGAME 1306 -#define IDD_CHEAT_SEARCH_COMP 1307 -#define IDD_CHEAT_SEARCH_MAIN 1308 -#define IDD_CHEAT_SEARCH_RESULT 1310 -#define IDC_LIGHT_VIWER_LIGHT1_GROUP 1311 -#define IDD_CHEAT_SEARCH_EXACT 1311 -#define IDC_LIGHT_VIEWER_LIGHT1COLOR_COLORCTRL 1312 -#define IDD_CHEAT_SEARCH 1312 -#define IDC_LIGHT_VIEWER_LIGHT1COLOR_EDIT 1313 -#define IDD_CHEAT_ADD_AR_CODE 1313 -#define IDC_LIGHT_VIEWER_LIGHT1VECTOR_EDIT 1314 -#define IDD_CHEAT_ADD_BC_CODE 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 -#define FILEOPENORD 1536 -#define MULTIFILEOPENORD 1537 -#define PRINTDLGORD 1538 -#define PRNSETUPDLGORD 1539 -#define FINDDLGORD 1540 -#define REPLACEDLGORD 1541 -#define FONTDLGORD 1542 -#define FORMATDLGORD31 1543 -#define FORMATDLGORD30 1544 -#define RUNDLGORD 1545 -#define PAGESETUPDLGORD 1546 -#define NEWFILEOPENORD 1547 -#define PRINTDLGEXORD 1549 -#define PAGESETUPDLGORDMOTIF 1550 -#define COLORMGMTDLGORD 1551 -#define NEWFILEOPENV2ORD 1552 -#define CS_SAVEBITS 0x0800 -#define RBS_FIXEDORDER 0x0800 -#define SBARS_TOOLTIPS 0x0800 -#define SBT_TOOLTIPS 0x0800 -#define LVS_ALIGNLEFT 0x0800 -#define TVS_INFOTIP 0x0800 -#define TCS_RAGGEDRIGHT 0x0800 -#define PSP_HIDEHEADER 0x00000800 -#define PSH_RTLREADING 0x00000800 -#define ICC_INTERNET_CLASSES 0x00000800 -#define ILC_PALETTE 0x00000800 -#define HDF_IMAGE 0x0800 -#define HHT_TOLEFT 0x0800 -#define TBSTYLE_FLAT 0x0800 -#define RBBS_TOPALIGN 0x00000800 -#define RBBIM_HEADERSIZE 0x00000800 -#define SBT_NOTABPARSING 0x0800 -#define LVIF_NORECOMPUTE 0x0800 -#define LVNI_TORIGHT 0x0800 -#define LVCFMT_IMAGE 0x0800 -#define LVS_EX_UNDERLINEHOT 0x00000800 -#define TVHT_TOLEFT 0x0800 -#define LVS_ALIGNMASK 0x0c00 -#define ILD_OVERLAYMASK 0x00000F00 -#define LVIS_OVERLAYMASK 0x0F00 -#define TVIS_OVERLAYMASK 0x0F00 -#define CS_BYTEALIGNCLIENT 0x1000 -#define RBS_REGISTERDROP 0x1000 -#define LVS_OWNERDATA 0x1000 -#define TVS_FULLROWSELECT 0x1000 -#define TCS_FOCUSONBUTTONDOWN 0x1000 -#define PSP_USEHEADERTITLE 0x00001000 -#define PSH_WIZARDCONTEXTHELP 0x00001000 -#define ICC_PAGESCROLLER_CLASS 0x00001000 -#define LVM_FIRST 0x1000 -#define ILD_PRESERVEALPHA 0x00001000 -#define HDF_BITMAP_ON_RIGHT 0x1000 -#define TBSTYLE_LIST 0x1000 -#define TTF_PARSELINKS 0x1000 -#define SBT_OWNERDRAW 0x1000 -#define LVCFMT_BITMAP_ON_RIGHT 0x1000 -#define LVS_EX_UNDERLINECOLD 0x00001000 -#define LVIF_DI_SETITEM 0x1000 -#define TVIF_DI_SETITEM 0x1000 -#define MCM_FIRST 0x1000 -#define DTM_FIRST 0x1000 -#define TV_FIRST 0x1100 -#define HDM_FIRST 0x1200 -#define TCM_FIRST 0x1300 -#define PGM_FIRST 0x1400 -#define CS_BYTEALIGNWINDOW 0x2000 -#define RBS_AUTOSIZE 0x2000 -#define LVS_NOSCROLL 0x2000 -#define TVS_NOSCROLL 0x2000 -#define TCS_OWNERDRAWFIXED 0x2000 -#define PSP_USEHEADERSUBTITLE 0x00002000 -#define ICC_NATIVEFNTCTL_CLASS 0x00002000 -#define CCM_FIRST 0x2000 -#define ILD_SCALE 0x00002000 -#define HDF_BITMAP 0x2000 -#define TBSTYLE_CUSTOMERASE 0x2000 -#define LVS_EX_MULTIWORKAREAS 0x00002000 -#define CS_GLOBALCLASS 0x4000 -#define RBS_VERTICALGRIPPER 0x4000 -#define LVS_NOCOLUMNHEADER 0x4000 -#define TVS_NONEVENHEIGHT 0x4000 -#define TCS_TOOLTIPS 0x4000 -#define ILD_DPISCALE 0x00004000 -#define HDF_STRING 0x4000 -#define TBSTYLE_REGISTERDROP 0x4000 -#define LVS_EX_LABELTIP 0x00004000 -#define TVE_EXPANDPARTIAL 0x4000 -#define MSGF_COMMCTRL_BEGINDRAG 0x4200 -#define MSGF_COMMCTRL_SIZEHEADER 0x4201 -#define MSGF_COMMCTRL_DRAGSELECT 0x4202 -#define MSGF_COMMCTRL_TOOLBARCUST 0x4203 -#define IDH_NO_HELP 28440 -#define IDH_MISSING_CONTEXT 28441 -#define IDH_GENERIC_HELP_BUTTON 28442 -#define IDH_OK 28443 -#define IDH_CANCEL 28444 -#define IDH_HELP 28445 -#define IDTIMEOUT 32000 -#define OCR_NORMAL 32512 -#define OIC_SAMPLE 32512 -#define IDI_APPLICATION 32512 -#define OCR_IBEAM 32513 -#define OIC_HAND 32513 -#define IDI_HAND 32513 -#define OCR_WAIT 32514 -#define OIC_QUES 32514 -#define IDI_QUESTION 32514 -#define OCR_CROSS 32515 -#define OIC_BANG 32515 -#define IDI_EXCLAMATION 32515 -#define OCR_UP 32516 -#define OIC_NOTE 32516 -#define IDI_ASTERISK 32516 -#define OIC_WINLOGO 32517 -#define IDI_WINLOGO 32517 -#define OCR_SIZE 32640 -#define OCR_ICON 32641 -#define OCR_SIZENWSE 32642 -#define OCR_SIZENESW 32643 -#define OCR_SIZEWE 32644 -#define OCR_SIZENS 32645 -#define OCR_SIZEALL 32646 -#define OCR_ICOCUR 32647 -#define OCR_NO 32648 -#define OCR_HAND 32649 -#define OCR_APPSTARTING 32650 -#define OBM_LFARROWI 32734 -#define OBM_RGARROWI 32735 -#define OBM_DNARROWI 32736 -#define OBM_UPARROWI 32737 -#define OBM_COMBO 32738 -#define OBM_MNARROW 32739 -#define OBM_LFARROWD 32740 -#define OBM_RGARROWD 32741 -#define OBM_DNARROWD 32742 -#define OBM_UPARROWD 32743 -#define OBM_RESTORED 32744 -#define OBM_ZOOMD 32745 -#define OBM_REDUCED 32746 -#define OBM_RESTORE 32747 -#define OBM_ZOOM 32748 -#define OBM_REDUCE 32749 -#define OBM_LFARROW 32750 -#define OBM_RGARROW 32751 -#define OBM_DNARROW 32752 -#define OBM_UPARROW 32753 -#define OBM_CLOSE 32754 -#define OBM_OLD_RESTORE 32755 -#define OBM_OLD_ZOOM 32756 -#define OBM_OLD_REDUCE 32757 -#define OBM_BTNCORNERS 32758 -#define OBM_CHECKBOXES 32759 -#define OBM_CHECK 32760 -#define OBM_BTSIZE 32761 -#define OBM_OLD_LFARROW 32762 -#define OBM_OLD_RGARROW 32763 -#define OBM_OLD_DNARROW 32764 -#define OBM_OLD_UPARROW 32765 -#define OBM_SIZE 32766 -#define OBM_OLD_CLOSE 32767 -#define UD_MAXVAL 0x7fff -#define WM_APP 0x8000 -#define HELP_TCARD 0x8000 -#define RBS_DBLCLKTOGGLE 0x8000 -#define LVS_NOSORTHEADER 0x8000 -#define TVS_NOHSCROLL 0x8000 -#define TCS_FOCUSNEVER 0x8000 -#define PSH_WATERMARK 0x00008000 -#define HDFT_HASNOVALUE 0x8000 -#define HDF_OWNERDRAW 0x8000 -#define TBSTYLE_TRANSPARENT 0x8000 -#define TTF_DI_SETITEM 0x8000 -#define LVCFMT_COL_HAS_IMAGES 0x8000 -#define LVS_EX_BORDERSELECT 0x00008000 -#define TVE_COLLAPSERESET 0x8000 -#define IDM_ABOUT 40003 -#define ACCEL_P 40004 -#define ACCEL_SPACEBAR 40005 -#define ACCEL_N 40007 -#define ID_VIEW_FRAMECOUNTER 40009 -#define ID_VIEW_DISPLAYFPS 40010 -#define IDM_FILE_RECORDAVI 40015 -#define IDM_FILE_STOPAVI 40016 -#define ACCEL_I 40018 -#define ACCEL_0 40020 -#define ACCEL_1 40021 -#define ACCEL_3 40023 -#define ACCEL_2 40024 -#define ACCEL_4 40025 -#define ACCEL_5 40026 -#define ACCEL_6 40027 -#define ACCEL_7 40028 -#define ACCEL_8 40029 -#define ACCEL_9 40030 -#define ACCEL_CTRL_O 40032 -#define ID_FILE_RECENTROM 40034 -#define IDC_SAVETYPE7 40037 -#define IDM_DEFSIZE 40038 -#define IDM_3DCONFIG 40040 -#define IDM_GBASLOT 40042 -#define IDM_CHEATS_LIST 40050 -#define IDM_CHEATS_SEARCH 40051 -#define IDT_VIEW_DISASM7 50001 -#define IDT_VIEW_DISASM9 50002 -#define IDT_VIEW_MEM7 50003 -#define IDT_VIEW_MEM9 50004 -#define IDT_VIEW_IOREG 50005 -#define IDT_VIEW_PAL 50006 -#define IDT_VIEW_TILE 50007 -#define IDT_VIEW_MAP 50008 -#define IDT_VIEW_OAM 50009 -#define IDT_VIEW_MATRIX 50010 -#define IDT_VIEW_LIGHTS 50011 -#define IDM_EXEC 50112 -#define SC_SIZE 0xF000 -#define LVIS_STATEIMAGEMASK 0xF000 -#define TVIS_STATEIMAGEMASK 0xF000 -#define TVIS_USERMASK 0xF000 -#define SC_SEPARATOR 0xF00F -#define SC_MOVE 0xF010 -#define SC_MINIMIZE 0xF020 -#define SC_MAXIMIZE 0xF030 -#define SC_NEXTWINDOW 0xF040 -#define SC_PREVWINDOW 0xF050 -#define SC_CLOSE 0xF060 -#define SC_VSCROLL 0xF070 -#define SC_HSCROLL 0xF080 -#define SC_MOUSEMENU 0xF090 -#define SC_KEYMENU 0xF100 -#define SC_ARRANGE 0xF110 -#define SC_RESTORE 0xF120 -#define SC_TASKLIST 0xF130 -#define SC_SCREENSAVE 0xF140 -#define SC_HOTKEY 0xF150 -#define SC_DEFAULT 0xF160 -#define SC_MONITORPOWER 0xF170 -#define SC_CONTEXTHELP 0xF180 -#define LVS_TYPESTYLEMASK 0xfc00 -#define HTERROR -2 -#define I_IMAGENONE -2 -#define LVSCW_AUTOSIZE_USEHEADER -2 -#define IDC_STATIC -1 -#define PWR_FAIL -1 -#define HTTRANSPARENT -1 -#define I_INDENTCALLBACK -1 -#define I_IMAGECALLBACK -1 -#define LVSCW_AUTOSIZE -1 -#define I_CHILDRENCALLBACK -1 -#define GDT_ERROR -1 -#define DPA_ERR -1 -#define DSA_ERR -1 +#ifndef IDC_STATIC +#define IDC_STATIC (-1) +#endif -// Next default values for new objects -// -#ifdef APSTUDIO_INVOKED -#ifndef APSTUDIO_READONLY_SYMBOLS -#define _APS_NEXT_RESOURCE_VALUE 101 -#define _APS_NEXT_COMMAND_VALUE 40001 -#define _APS_NEXT_CONTROL_VALUE 1000 -#define _APS_NEXT_SYMED_VALUE 101 -#endif -#endif +#define IDM_OPEN 101 +#define IDM_QUIT 102 +#define IDC_FERMER 103 +#define IDD_DESASSEMBLEUR_VIEWER7 103 +#define IDC_STEP 104 +#define IDD_MEM_VIEWER7 104 +#define IDC_SETPNUM 105 +#define IDD_CONFIG 105 +#define IDC_SCROLLER 106 +#define IDD_SOUNDSETTINGS 106 +#define IDC_GO 107 +#define IDC_AUTO_UPDATE 108 +#define IDM_MEMORY 109 +#define IDM_DISASSEMBLER 110 +#define IDC_AUTO_UPDATE2 111 +#define IDD_3DSETTINGS 111 +#define IDM_GAME_INFO 111 +#define IDD_GBASLOT 113 +#define IDM_PAUSE 113 +#define IDD_GBASLOT_CFLASH 114 +#define IDM_RESET 114 +#define IDD_CHEAT_SEARCH_VIEW 115 +#define IDM_IOREG 115 +#define IDD_CHEAT_LIST 116 +#define IDD_CHEAT_ADD 117 +#define IDM_PAL 117 +#define IDM_TILE 118 +#define IDM_MAP 119 +#define IDM_MBG0 120 +#define IDM_MBG1 121 +#define IDM_MBG2 122 +#define IDM_MBG3 123 +#define IDM_SBG0 124 +#define IDM_SBG1 125 +#define IDM_SBG2 126 +#define IDM_SBG3 127 +#define IDM_OAM 128 +#define IDM_PRINTSCREEN 129 +#define IDM_QUICK_PRINTSCREEN 130 +#define IDM_SOUNDSETTINGS 131 +#define IDM_WEBSITE 132 +#define IDM_FORUM 133 +#define IDM_SUBMITBUGREPORT 134 +#define IDM_STATE_LOAD 135 +#define IDM_STATE_SAVE 136 +#define IDR_MAIN_ACCEL 137 +#define IDM_STATE_SAVE_F1 140 +#define IDM_STATE_SAVE_F2 141 +#define IDM_STATE_SAVE_F3 142 +#define IDM_STATE_SAVE_F4 143 +#define IDM_STATE_SAVE_F5 144 +#define IDM_STATE_SAVE_F6 145 +#define IDM_STATE_SAVE_F7 146 +#define IDM_STATE_SAVE_F8 147 +#define IDM_STATE_SAVE_F9 148 +#define IDM_STATE_SAVE_F10 149 +#define IDM_STATE_LOAD_F1 150 +#define IDM_STATE_LOAD_F2 151 +#define IDM_STATE_LOAD_F3 152 +#define IDM_STATE_LOAD_F4 153 +#define IDM_STATE_LOAD_F5 154 +#define IDM_STATE_LOAD_F6 155 +#define IDM_STATE_LOAD_F7 156 +#define IDM_STATE_LOAD_F8 157 +#define IDM_STATE_LOAD_F9 158 +#define IDM_STATE_LOAD_F10 159 +#define IDC_COMBO1 160 +#define IDC_COMBO2 161 +#define IDC_COMBO3 162 +#define IDC_COMBO4 163 +#define IDC_COMBO5 164 +#define IDC_COMBO6 165 +#define IDC_COMBO7 166 +#define IDC_COMBO8 167 +#define IDC_COMBO9 168 +#define IDC_COMBO10 169 +#define IDC_COMBO11 170 +#define IDC_COMBO12 171 +#define IDC_BUTTON1 173 +#define IDM_CONFIG 180 +#define IDD_INPUT 181 +#define IDC_SAVETYPE1 182 +#define IDC_SAVETYPE2 183 +#define IDC_SAVETYPE3 184 +#define IDC_SAVETYPE4 185 +#define IDC_SAVETYPE5 186 +#define IDC_SAVETYPE6 187 +#define IDC_FRAMESKIPAUTO 190 +#define IDC_FRAMESKIP0 191 +#define IDC_FRAMESKIP1 192 +#define IDC_FRAMESKIP2 193 +#define IDC_FRAMESKIP3 194 +#define IDC_FRAMESKIP4 195 +#define IDC_FRAMESKIP5 196 +#define IDC_FRAMESKIP6 197 +#define IDC_FRAMESKIP7 198 +#define IDC_FRAMESKIP8 199 +#define IDC_FRAMESKIP9 200 +#define IDM_IMPORTBACKUPMEMORY 201 +#define IDC_LANGENGLISH 210 +#define IDC_LANGFRENCH 211 +#define IDC_LANGDANISH 212 +#define IDC_8_BIT 302 +#define IDC_16_BIT 303 +#define IDC_32_BIT 304 +#define IDC_MEM_BOX 305 +#define IDC_GOTOMEM 306 +#define IDC_DES_BOX 402 +#define IDC_R0 403 +#define IDC_R1 404 +#define IDC_R2 405 +#define IDC_R3 406 +#define IDC_R4 407 +#define IDC_R5 408 +#define IDC_R6 409 +#define IDC_R7 410 +#define IDC_R8 411 +#define IDC_R9 412 +#define IDC_R10 413 +#define IDC_R11 414 +#define IDC_R12 415 +#define IDC_R13 416 +#define IDC_R14 417 +#define IDC_R15 418 +#define IDC_MODE 419 +#define IDC_AUTO_DES 420 +#define IDC_ARM 421 +#define IDC_THUMB 422 +#define IDC_GOTODES 423 +#define IDC_TMP 424 +#define IDD_GAME_INFO 501 +#define IDC_NOM_JEU 502 +#define IDC_CDE 503 +#define IDC_FAB 504 +#define IDC_TAILLE 505 +#define IDC_ARM9_T 506 +#define IDC_ARM7_T 507 +#define IDC_DATA 508 +#define IDD_IO_REG 601 +#define IDD_PAL 703 +#define IDD_TILE 704 +#define IDC_PAL_SELECT 705 +#define IDC_PALNUM 706 +#define IDC_MEM_SELECT 707 +#define IDC_Tile_BOX 708 +#define IDC_BITMAP 709 +#define IDC_256COUL 710 +#define IDC_16COUL 711 +#define IDC_MINI_TILE 712 +#define IDC_TILENUM 713 +#define IDD_MAP 800 +#define IDC_BG_SELECT 801 +#define IDC_PAL 803 +#define IDC_PRIO 804 +#define IDC_CHAR 805 +#define IDC_SCR 806 +#define IDC_MSIZE 807 +#define IDC_SCROLL 808 +#define IDD_OAM 900 +#define IDC_SCR_SELECT 901 +#define IDC_TILE 902 +#define IDC_OAMNUM 903 +#define IDC_COOR 904 +#define IDC_DIM 905 +#define IDC_ROT 906 +#define IDC_MOS 907 +#define IDC_PROP0 908 +#define IDC_PROP1 909 +#define IDC_EDIT03 1000 +#define IDC_SOUNDCORECB 1000 +#define IDC_EDIT01 1001 +#define IDC_SOUNDBUFFERET 1001 +#define IDC_EDIT05 1002 +#define IDC_SLVOLUME 1002 +#define IDC_EDIT08 1003 +#define IDC_ROTATE0 1003 +#define IDC_EDIT11 1004 +#define IDC_ROTATE90 1004 +#define IDC_EDIT07 1005 +#define IDC_ROTATE180 1005 +#define IDC_EDIT12 1006 +#define IDC_ROTATE270 1006 +#define IDC_EDIT06 1007 +#define IDC_EDIT09 1008 +#define IDC_EDIT10 1009 +#define IDC_FORCERATIO 1009 +#define IDC_AUTO_UPDATE_SPIN 1010 +#define IDC_EDIT15 1010 +#define IDC_WINDOW1X 1010 +#define IDC_AUTO_UPDATE_SECS 1011 +#define IDC_WINDOW2X 1011 +#define IDC_REFRESH 1012 +#define IDC_WINDOW3X 1012 +#define IDC_EDIT02 1013 +#define IDC_WINDOW4X 1013 +#define IDC_EDIT04 1014 +#define IDC_AUTOUPDATE_ASM 1018 +#define IDC_VISIBLE 1019 +#define IDC_IPCFIFO9 1020 +#define IDC_IPCSYNC9 1021 +#define IDC_IF9 1022 +#define IDC_INTHAND9 1023 +#define IDC_IE9 1024 +#define IDC_DISPCNTA9 1025 +#define IDC_DISPSTATA9 1026 +#define IDC_DEFAULT 1027 +#define IDC_DISPCNTB9 1027 +#define IDC_3DCORE 1028 +#define IDC_DISPSTATB9 1028 +#define IDC_IME9 1029 +#define IDC_TXT_COMPILED 1029 +#define IDC_GXSTAT9 1030 +#define IDC_TXT_VERSION 1030 +#define IDC_IE7 1032 +#define IDC_ADDONS_LIST 1033 +#define IDC_IF7 1033 +#define IDC_ADDONS_INFO 1034 +#define IDC_IME7 1034 +#define IDC_BBROWSE 1035 +#define IDC_IPCSYNC7 1035 +#define IDC_IPCFIFO7 1036 +#define IDC_PATHIMG 1036 +#define IDC_PATH 1037 +#define IDC_PATHGAME 1037 +#define IDC_RFILE 1038 +#define IDC_RFOLDER 1039 +#define IDC_BBROWSE2 1040 +#define IDC_PATHDESMUME 1041 +#define IDC_BRESTART 1042 +#define IDC_BVIEW 1043 +#define IDC_BSEARCH 1044 +#define IDC_RADIO1 1045 +#define IDC_RADIO2 1046 +#define IDC_RADIO3 1047 +#define IDC_RADIO4 1048 +#define IDC_RADIO5 1049 +#define IDC_RADIO6 1050 +#define IDC_RADIO7 1051 +#define IDC_RADIO8 1052 +#define IDC_LIST1 1056 +#define IDC_BADD_AR 1057 +#define IDC_BADD_CB 1058 +#define IDC_BREMOVE 1060 +#define IDC_BEDIT 1061 +#define IDC_STATIC_S1 1061 +#define IDC_STATIC_S2 1062 +#define IDC_STATIC_S3 1063 +#define IDC_STATIC_S4 1064 +#define IDC_EVALUE 1065 +#define IDC_STATIC_RANGE 1066 +#define IDC_BADD 1068 +#define IDC_LIST 1069 +#define IDC_SNUMBER 1071 +#define IDC_CHECK1 1074 +#define IDC_RADIO9 1075 +#define IDM_FIRMSETTINGS 1100 +#define IDD_FIRMSETTINGS 1101 +#define IDC_EDIT1 1102 +#define IDC_EDIT2 1103 +#define IDC_EDIT13 1104 +#define IDC_EDIT3 1104 +#define IDC_EDIT14 1105 +#define IDD_MATRIX_VIEWER 1200 +#define IDM_MATRIX_VIEWER 1200 +#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 +#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 +#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 +#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 +#define IDD_LIGHT_VIEWER 1300 +#define IDM_LIGHT_VIEWER 1300 +#define IDC_LIGHT_VIWER_LIGHT0_GROUP 1301 +#define IDD_ABOUT_BOX 1301 +#define IDC_AUTHORS_LIST 1302 +#define IDC_LIGHT_VIEWER_LIGHT0COLOR_COLORCTRL 1302 +#define IDD_DESASSEMBLEUR_VIEWER9 1302 +#define IDC_LIGHT_VIEWER_LIGHT0COLOR_EDIT 1303 +#define IDD_MEM_VIEWER9 1303 +#define IDC_LIGHT_VIEWER_LIGHT0VECTOR_EDIT 1304 +#define IDD_GBASLOT_NONE 1304 +#define IDD_GBASLOT_RUMBLEPAK 1305 +#define IDD_GBASLOT_GBAGAME 1306 +#define IDD_CHEAT_SEARCH_COMP 1307 +#define IDD_CHEAT_SEARCH_MAIN 1308 +#define IDD_CHEAT_SEARCH_RESULT 1310 +#define IDC_LIGHT_VIWER_LIGHT1_GROUP 1311 +#define IDD_CHEAT_SEARCH_EXACT 1311 +#define IDC_LIGHT_VIEWER_LIGHT1COLOR_COLORCTRL 1312 +#define IDD_CHEAT_SEARCH 1312 +#define IDC_LIGHT_VIEWER_LIGHT1COLOR_EDIT 1313 +#define IDD_CHEAT_ADD_AR_CODE 1313 +#define IDC_LIGHT_VIEWER_LIGHT1VECTOR_EDIT 1314 +#define IDD_CHEAT_ADD_BC_CODE 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 +#define IDM_ABOUT 40003 +#define ACCEL_P 40004 +#define ACCEL_SPACEBAR 40005 +#define ACCEL_N 40007 +#define ID_VIEW_FRAMECOUNTER 40009 +#define ID_VIEW_DISPLAYFPS 40010 +#define IDM_FILE_RECORDAVI 40015 +#define IDM_FILE_STOPAVI 40016 +#define ACCEL_I 40018 +#define ACCEL_0 40020 +#define ACCEL_1 40021 +#define ACCEL_3 40023 +#define ACCEL_2 40024 +#define ACCEL_4 40025 +#define ACCEL_5 40026 +#define ACCEL_6 40027 +#define ACCEL_7 40028 +#define ACCEL_8 40029 +#define ACCEL_9 40030 +#define ACCEL_CTRL_O 40032 +#define ID_FILE_RECENTROM 40034 +#define IDC_SAVETYPE7 40037 +#define IDM_DEFSIZE 40038 +#define IDM_3DCONFIG 40040 +#define IDM_GBASLOT 40042 +#define IDM_CHEATS_LIST 40050 +#define IDM_CHEATS_SEARCH 40051 diff --git a/desmume/src/windows/tileView.cpp b/desmume/src/windows/tileView.cpp index 5ac79289f..5a25bf79b 100644 --- a/desmume/src/windows/tileView.cpp +++ b/desmume/src/windows/tileView.cpp @@ -1,636 +1,637 @@ -/* Copyright (C) 2006 yopyop - yopyop156@ifrance.com - yopyop156.ifrance.com - - 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 "tileView.h" -#include "commctrl.h" -#include "resource.h" -#include "debug.h" -#include "../MMU.h" - -typedef struct -{ - u32 autoup_secs; - bool autoup; - - HWND hwnd; - u8 * mem; - u16 * pal; - s16 palnum; - u16 tilenum; - u8 coul; - u32 x; - u32 y; -} tileview_struct; - -tileview_struct *TileView = NULL; - -LRESULT TileViewBox_Direct(HWND hwnd, tileview_struct * win, WPARAM wParam, LPARAM lParam) -{ - HDC hdc; - PAINTSTRUCT ps; -// SIZE fontsize; -// TCHAR text[80]; - BITMAPV4HEADER bmi; - RECT rect; - HDC mem_dc; - HBITMAP mem_bmp; - int lg; - int ht; - - memset(&bmi, 0, sizeof(bmi)); - bmi.bV4Size = sizeof(bmi); - bmi.bV4Planes = 1; - bmi.bV4BitCount = 16; - bmi.bV4V4Compression = BI_RGB|BI_BITFIELDS; - bmi.bV4RedMask = 0x001F; - bmi.bV4GreenMask = 0x03E0; - bmi.bV4BlueMask = 0x7C00; - bmi.bV4Width = 256; - bmi.bV4Height = -256; - - GetClientRect(hwnd, &rect); - lg = rect.right - rect.left; - ht = rect.bottom - rect.top; - - hdc = BeginPaint(hwnd, &ps); - - mem_dc = CreateCompatibleDC(hdc); - mem_bmp = CreateCompatibleBitmap(hdc, lg, ht); - SelectObject(mem_dc, mem_bmp); - - FillRect(mem_dc, &rect, (HBRUSH)GetStockObject(WHITE_BRUSH)); - - SetDIBitsToDevice(mem_dc, 0, 0, 256, 256, 0, 0, 0, 256, win->mem, (BITMAPINFO*)&bmi, DIB_RGB_COLORS); - - BitBlt(hdc, 0, 0, lg, ht, mem_dc, 0, 0, SRCCOPY); - - DeleteDC(mem_dc); - DeleteObject(mem_bmp); - - EndPaint(hwnd, &ps); - return 0; -} - -////////////////////////////////////////////////////////////////////////////// - -LRESULT TileViewBox_Pal256(HWND hwnd, tileview_struct * win, WPARAM wParam, LPARAM lParam) -{ - HDC hdc; - PAINTSTRUCT ps; -// SIZE fontsize; - TCHAR text[80]; - u16 bitmap[256*256]; - u16 * pal = ((u16 *)win->pal) + win->palnum*256; - BITMAPV4HEADER bmi; - RECT rect; - int lg; - int ht; - HDC mem_dc; - HBITMAP mem_bmp; - - memset(&bmi, 0, sizeof(bmi)); - bmi.bV4Size = sizeof(bmi); - bmi.bV4Planes = 1; - bmi.bV4BitCount = 16; - bmi.bV4V4Compression = BI_RGB|BI_BITFIELDS; - bmi.bV4RedMask = 0x001F; - bmi.bV4GreenMask = 0x03E0; - bmi.bV4BlueMask = 0x7C00; - bmi.bV4Width = 256; - bmi.bV4Height = -256; - - GetClientRect(hwnd, &rect); - lg = rect.right - rect.left; - ht = rect.bottom - rect.top; - - hdc = BeginPaint(hwnd, &ps); - - mem_dc = CreateCompatibleDC(hdc); - mem_bmp = CreateCompatibleBitmap(hdc, lg, ht); - SelectObject(mem_dc, mem_bmp); - - FillRect(mem_dc, &rect, (HBRUSH)GetStockObject(WHITE_BRUSH)); - - if(win->pal) - { - u32 i, num2, num, y, x; - - //for(i = 0; i<256*256; ++i) - // bitmap[i] = pal[win->mem[i]]; - for(num2 = 0; num2<32; ++num2) - for(num = 0; num<32; ++num) - for(y = 0; y<8; ++y) - for(x = 0; x<8; ++x) - bitmap[x + (y*256) + (num*8) +(num2*256*8)] = pal[win->mem[x + (y*8) + (num*64) +(num2*2048)]]; - SetDIBitsToDevice(mem_dc, 0, 0, 256, 256, 0, 0, 0, 256, bitmap, (BITMAPINFO*)&bmi, DIB_RGB_COLORS); - sprintf(text, "Pal : %d", win->palnum); - SetWindowText(GetDlgItem(hwnd, IDC_PALNUM), text); - } - else - TextOut(mem_dc, 3, 3, "Il n'y a pas de palette", 23); - - BitBlt(hdc, 0, 0, lg, ht, mem_dc, 0, 0, SRCCOPY); - - DeleteDC(mem_dc); - DeleteObject(mem_bmp); - - EndPaint(hwnd, &ps); - return 0; -} - -////////////////////////////////////////////////////////////////////////////// - -LRESULT TileViewBox_Pal16(HWND hwnd, tileview_struct * win, WPARAM wParam, LPARAM lParam) -{ - HDC hdc; - PAINTSTRUCT ps; -// SIZE fontsize; - TCHAR text[80]; - u16 bitmap[512*512]; - u16 * pal = ((u16 *)win->pal) + win->palnum*16; - BITMAPV4HEADER bmi; - RECT rect; - int lg; - int ht; - HDC mem_dc; - HBITMAP mem_bmp; - - memset(&bmi, 0, sizeof(bmi)); - bmi.bV4Size = sizeof(bmi); - bmi.bV4Planes = 1; - bmi.bV4BitCount = 16; - bmi.bV4V4Compression = BI_RGB|BI_BITFIELDS; - bmi.bV4RedMask = 0x001F; - bmi.bV4GreenMask = 0x03E0; - bmi.bV4BlueMask = 0x7C00; - bmi.bV4Width = 512; - bmi.bV4Height = -256; - - GetClientRect(hwnd, &rect); - lg = rect.right - rect.left; - ht = rect.bottom - rect.top; - - hdc = BeginPaint(hwnd, &ps); - - mem_dc = CreateCompatibleDC(hdc); - mem_bmp = CreateCompatibleBitmap(hdc, 512, 256); - SelectObject(mem_dc, mem_bmp); - - FillRect(mem_dc, &rect, (HBRUSH)GetStockObject(WHITE_BRUSH)); - - if(win->pal) - { - u32 num2, num, y, x; - for(num2 = 0; num2<32; ++num2) - for(num = 0; num<64; ++num) - for(y = 0; y<8; ++y) - for(x = 0; x<4; ++x) - { - bitmap[(x<<1) + (y*512) + (num*8) +(num2*512*8)] = pal[win->mem[x + (y*4) + (num*32) +(num2*2048)]&0xF]; - bitmap[(x<<1)+1 + (y*512) + (num*8) +(num2*512*8)] = pal[win->mem[x + (y*4) + (num*32) +(num2*2048)]>>4]; - } - SetDIBitsToDevice(mem_dc, 0, 0, 512, 256, 0, 0, 0, 256, bitmap, (BITMAPINFO*)&bmi, DIB_RGB_COLORS); - sprintf(text, "Pal : %d", win->palnum); - SetWindowText(GetDlgItem(hwnd, IDC_PALNUM), text); - } - else - TextOut(mem_dc, 3, 3, "Il n'y a pas de palette", 23); - - BitBlt(hdc, 0, 0, lg, ht, mem_dc, 0, 0, SRCCOPY); - - DeleteDC(mem_dc); - DeleteObject(mem_bmp); - - EndPaint(hwnd, &ps); - return 0; -} - -////////////////////////////////////////////////////////////////////////////// - -LRESULT CALLBACK TileViewBoxProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch(msg) - { - case WM_INITDIALOG: - return 1; - case WM_NCCREATE: - return 1; - case WM_NCDESTROY: - return 1; - case WM_PAINT: - switch(TileView->coul) - { - case 0 : - TileViewBox_Direct(hwnd, TileView, wParam, lParam); - break; - case 1 : - TileViewBox_Pal256(hwnd, TileView, wParam, lParam); - break; - case 2 : - TileViewBox_Pal16(hwnd, TileView, wParam, lParam); - break; - } - break; - case WM_LBUTTONDOWN : - switch(TileView->coul) - { - case 0 : - case 1 : - if(LOWORD(lParam)<(32*8)) - { - TileView->x = ((LOWORD(lParam)>>3)<<3); - TileView->y = (HIWORD(lParam)>>3)<<3; - TileView->tilenum = (LOWORD(lParam)>>3) + (HIWORD(lParam)>>3)*32; - } - break; - case 2 : - TileView->x = ((LOWORD(lParam)>>3)<<3); - TileView->y = (HIWORD(lParam)>>3)<<3; - TileView->tilenum = (LOWORD(lParam)>>3) + (HIWORD(lParam)>>3)*64; - break; - } - InvalidateRect(GetDlgItem(hwnd, IDC_MINI_TILE), NULL, FALSE); - return 1; - case WM_ERASEBKGND: - return 1; - } - return DefWindowProc(hwnd, msg, wParam, lParam); -} - -LRESULT MiniTileViewBox_Paint(HWND hwnd, tileview_struct * win, WPARAM wParam, LPARAM lParam) -{ - HWND hwnd_src = GetDlgItem(hwnd, IDC_Tile_BOX); - HDC hdc_src; - HDC hdc_dst; - char txt[80]; - - PAINTSTRUCT ps; - - hdc_dst = BeginPaint(hwnd, &ps); - hdc_src = GetDC(hwnd_src); - StretchBlt(hdc_dst, 0, 0, 80, 80, hdc_src, win->x, win->y, 8, 8, SRCCOPY); - sprintf(txt, "Tile num : 0x%X", win->tilenum); - SetWindowText(GetDlgItem(win->hwnd, IDC_TILENUM), txt); - EndPaint(hwnd, &ps); - return 0; -} - -LRESULT CALLBACK MiniTileViewBoxProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - switch(msg) - { - case WM_NCCREATE: - return 1; - case WM_NCDESTROY: - return 1; - case WM_PAINT : - MiniTileViewBox_Paint(hwnd, TileView, wParam, lParam); - break; - case WM_ERASEBKGND: - return 1; - default: - break; - } - return DefWindowProc(hwnd, msg, wParam, lParam); -} - -BOOL CALLBACK ViewTilesProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - //bail out early if the dialog isnt initialized - if(!TileView && message != WM_INITDIALOG) - return false; - - switch (message) - { - case WM_INITDIALOG : - { - TileView = new tileview_struct; - memset(TileView, 0, sizeof(tileview_struct)); - TileView->hwnd = hwnd; - TileView->mem = ARM9Mem.ARM9_ABG; - TileView->pal = ((u16 *)ARM9Mem.ARM9_VMEM); - TileView->autoup_secs = 5; - SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), - UDM_SETRANGE, 0, MAKELONG(99, 1)); - SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), - UDM_SETPOS32, 0, TileView->autoup_secs); - - HWND combo = GetDlgItem(hwnd, IDC_PAL_SELECT); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main screen BG PAL"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub screen BG PAL"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main screen SPR PAL"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub screen SPR PAL"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main screen ExtPAL 0"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main screen ExtPAL 1"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main screen ExtPAL 2"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main screen ExtPAL 3"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub screen ExtPAL 0"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub screen ExtPAL 1"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub screen ExtPAL 2"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub screen ExtPAL 3"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main spr ExtPAL 0"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main spr ExtPAL 1"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub spr ExtPAL 0"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub spr ExtPAL 1"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Texture PAL 0"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Texture PAL 1"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Texture PAL 2"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Texture PAL 3"); - SendMessage(combo, CB_SETCURSEL, 0, 0); - - combo = GetDlgItem(hwnd, IDC_MEM_SELECT); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"A-BG - 0x6000000"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"A-BG - 0x6010000"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"A-BG - 0x6020000"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"A-BG - 0x6030000"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"A-BG - 0x6040000"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"A-BG - 0x6050000"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"A-BG - 0x6060000"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"A-BG - 0x6070000"); - - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"B-BG - 0x6200000"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"B-BG - 0x6210000"); - - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"A-OBJ- 0x6400000"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"A-OBJ- 0x6410000"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"A-OBJ- 0x6420000"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"A-OBJ- 0x6430000"); - - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"B-OBJ- 0x6600000"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"B-OBJ- 0x6610000"); - - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"LCD - 0x6800000"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"LCD - 0x6810000"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"LCD - 0x6820000"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"LCD - 0x6830000"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"LCD - 0x6840000"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"LCD - 0x6850000"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"LCD - 0x6860000"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"LCD - 0x6870000"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"LCD - 0x6880000"); - SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"LCD - 0x6890000"); - SendMessage(combo, CB_SETCURSEL, 0, 0); - SendMessage(GetDlgItem(hwnd, IDC_BITMAP), BM_SETCHECK, TRUE, 0); - } - return 1; - case WM_CLOSE : - if(TileView->autoup) - { - KillTimer(hwnd, IDT_VIEW_TILE); - TileView->autoup = false; - } +/* Copyright (C) 2006 yopyop + yopyop156@ifrance.com + yopyop156.ifrance.com + + 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 "tileView.h" +#include "commctrl.h" +#include "resource.h" +#include "res_timer_ids.h" +#include "debug.h" +#include "../MMU.h" + +typedef struct +{ + u32 autoup_secs; + bool autoup; + + HWND hwnd; + u8 * mem; + u16 * pal; + s16 palnum; + u16 tilenum; + u8 coul; + u32 x; + u32 y; +} tileview_struct; + +tileview_struct *TileView = NULL; + +LRESULT TileViewBox_Direct(HWND hwnd, tileview_struct * win, WPARAM wParam, LPARAM lParam) +{ + HDC hdc; + PAINTSTRUCT ps; +// SIZE fontsize; +// TCHAR text[80]; + BITMAPV4HEADER bmi; + RECT rect; + HDC mem_dc; + HBITMAP mem_bmp; + int lg; + int ht; + + memset(&bmi, 0, sizeof(bmi)); + bmi.bV4Size = sizeof(bmi); + bmi.bV4Planes = 1; + bmi.bV4BitCount = 16; + bmi.bV4V4Compression = BI_RGB|BI_BITFIELDS; + bmi.bV4RedMask = 0x001F; + bmi.bV4GreenMask = 0x03E0; + bmi.bV4BlueMask = 0x7C00; + bmi.bV4Width = 256; + bmi.bV4Height = -256; + + GetClientRect(hwnd, &rect); + lg = rect.right - rect.left; + ht = rect.bottom - rect.top; + + hdc = BeginPaint(hwnd, &ps); + + mem_dc = CreateCompatibleDC(hdc); + mem_bmp = CreateCompatibleBitmap(hdc, lg, ht); + SelectObject(mem_dc, mem_bmp); + + FillRect(mem_dc, &rect, (HBRUSH)GetStockObject(WHITE_BRUSH)); + + SetDIBitsToDevice(mem_dc, 0, 0, 256, 256, 0, 0, 0, 256, win->mem, (BITMAPINFO*)&bmi, DIB_RGB_COLORS); + + BitBlt(hdc, 0, 0, lg, ht, mem_dc, 0, 0, SRCCOPY); + + DeleteDC(mem_dc); + DeleteObject(mem_bmp); + + EndPaint(hwnd, &ps); + return 0; +} + +////////////////////////////////////////////////////////////////////////////// + +LRESULT TileViewBox_Pal256(HWND hwnd, tileview_struct * win, WPARAM wParam, LPARAM lParam) +{ + HDC hdc; + PAINTSTRUCT ps; +// SIZE fontsize; + TCHAR text[80]; + u16 bitmap[256*256]; + u16 * pal = ((u16 *)win->pal) + win->palnum*256; + BITMAPV4HEADER bmi; + RECT rect; + int lg; + int ht; + HDC mem_dc; + HBITMAP mem_bmp; + + memset(&bmi, 0, sizeof(bmi)); + bmi.bV4Size = sizeof(bmi); + bmi.bV4Planes = 1; + bmi.bV4BitCount = 16; + bmi.bV4V4Compression = BI_RGB|BI_BITFIELDS; + bmi.bV4RedMask = 0x001F; + bmi.bV4GreenMask = 0x03E0; + bmi.bV4BlueMask = 0x7C00; + bmi.bV4Width = 256; + bmi.bV4Height = -256; + + GetClientRect(hwnd, &rect); + lg = rect.right - rect.left; + ht = rect.bottom - rect.top; + + hdc = BeginPaint(hwnd, &ps); + + mem_dc = CreateCompatibleDC(hdc); + mem_bmp = CreateCompatibleBitmap(hdc, lg, ht); + SelectObject(mem_dc, mem_bmp); + + FillRect(mem_dc, &rect, (HBRUSH)GetStockObject(WHITE_BRUSH)); + + if(win->pal) + { + u32 i, num2, num, y, x; + + //for(i = 0; i<256*256; ++i) + // bitmap[i] = pal[win->mem[i]]; + for(num2 = 0; num2<32; ++num2) + for(num = 0; num<32; ++num) + for(y = 0; y<8; ++y) + for(x = 0; x<8; ++x) + bitmap[x + (y*256) + (num*8) +(num2*256*8)] = pal[win->mem[x + (y*8) + (num*64) +(num2*2048)]]; + SetDIBitsToDevice(mem_dc, 0, 0, 256, 256, 0, 0, 0, 256, bitmap, (BITMAPINFO*)&bmi, DIB_RGB_COLORS); + sprintf(text, "Pal : %d", win->palnum); + SetWindowText(GetDlgItem(hwnd, IDC_PALNUM), text); + } + else + TextOut(mem_dc, 3, 3, "Il n'y a pas de palette", 23); + + BitBlt(hdc, 0, 0, lg, ht, mem_dc, 0, 0, SRCCOPY); + + DeleteDC(mem_dc); + DeleteObject(mem_bmp); + + EndPaint(hwnd, &ps); + return 0; +} + +////////////////////////////////////////////////////////////////////////////// + +LRESULT TileViewBox_Pal16(HWND hwnd, tileview_struct * win, WPARAM wParam, LPARAM lParam) +{ + HDC hdc; + PAINTSTRUCT ps; +// SIZE fontsize; + TCHAR text[80]; + u16 bitmap[512*512]; + u16 * pal = ((u16 *)win->pal) + win->palnum*16; + BITMAPV4HEADER bmi; + RECT rect; + int lg; + int ht; + HDC mem_dc; + HBITMAP mem_bmp; + + memset(&bmi, 0, sizeof(bmi)); + bmi.bV4Size = sizeof(bmi); + bmi.bV4Planes = 1; + bmi.bV4BitCount = 16; + bmi.bV4V4Compression = BI_RGB|BI_BITFIELDS; + bmi.bV4RedMask = 0x001F; + bmi.bV4GreenMask = 0x03E0; + bmi.bV4BlueMask = 0x7C00; + bmi.bV4Width = 512; + bmi.bV4Height = -256; + + GetClientRect(hwnd, &rect); + lg = rect.right - rect.left; + ht = rect.bottom - rect.top; + + hdc = BeginPaint(hwnd, &ps); + + mem_dc = CreateCompatibleDC(hdc); + mem_bmp = CreateCompatibleBitmap(hdc, 512, 256); + SelectObject(mem_dc, mem_bmp); + + FillRect(mem_dc, &rect, (HBRUSH)GetStockObject(WHITE_BRUSH)); + + if(win->pal) + { + u32 num2, num, y, x; + for(num2 = 0; num2<32; ++num2) + for(num = 0; num<64; ++num) + for(y = 0; y<8; ++y) + for(x = 0; x<4; ++x) + { + bitmap[(x<<1) + (y*512) + (num*8) +(num2*512*8)] = pal[win->mem[x + (y*4) + (num*32) +(num2*2048)]&0xF]; + bitmap[(x<<1)+1 + (y*512) + (num*8) +(num2*512*8)] = pal[win->mem[x + (y*4) + (num*32) +(num2*2048)]>>4]; + } + SetDIBitsToDevice(mem_dc, 0, 0, 512, 256, 0, 0, 0, 256, bitmap, (BITMAPINFO*)&bmi, DIB_RGB_COLORS); + sprintf(text, "Pal : %d", win->palnum); + SetWindowText(GetDlgItem(hwnd, IDC_PALNUM), text); + } + else + TextOut(mem_dc, 3, 3, "Il n'y a pas de palette", 23); + + BitBlt(hdc, 0, 0, lg, ht, mem_dc, 0, 0, SRCCOPY); + + DeleteDC(mem_dc); + DeleteObject(mem_bmp); + + EndPaint(hwnd, &ps); + return 0; +} + +////////////////////////////////////////////////////////////////////////////// + +LRESULT CALLBACK TileViewBoxProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch(msg) + { + case WM_INITDIALOG: + return 1; + case WM_NCCREATE: + return 1; + case WM_NCDESTROY: + return 1; + case WM_PAINT: + switch(TileView->coul) + { + case 0 : + TileViewBox_Direct(hwnd, TileView, wParam, lParam); + break; + case 1 : + TileViewBox_Pal256(hwnd, TileView, wParam, lParam); + break; + case 2 : + TileViewBox_Pal16(hwnd, TileView, wParam, lParam); + break; + } + break; + case WM_LBUTTONDOWN : + switch(TileView->coul) + { + case 0 : + case 1 : + if(LOWORD(lParam)<(32*8)) + { + TileView->x = ((LOWORD(lParam)>>3)<<3); + TileView->y = (HIWORD(lParam)>>3)<<3; + TileView->tilenum = (LOWORD(lParam)>>3) + (HIWORD(lParam)>>3)*32; + } + break; + case 2 : + TileView->x = ((LOWORD(lParam)>>3)<<3); + TileView->y = (HIWORD(lParam)>>3)<<3; + TileView->tilenum = (LOWORD(lParam)>>3) + (HIWORD(lParam)>>3)*64; + break; + } + InvalidateRect(GetDlgItem(hwnd, IDC_MINI_TILE), NULL, FALSE); + return 1; + case WM_ERASEBKGND: + return 1; + } + return DefWindowProc(hwnd, msg, wParam, lParam); +} + +LRESULT MiniTileViewBox_Paint(HWND hwnd, tileview_struct * win, WPARAM wParam, LPARAM lParam) +{ + HWND hwnd_src = GetDlgItem(hwnd, IDC_Tile_BOX); + HDC hdc_src; + HDC hdc_dst; + char txt[80]; + + PAINTSTRUCT ps; + + hdc_dst = BeginPaint(hwnd, &ps); + hdc_src = GetDC(hwnd_src); + StretchBlt(hdc_dst, 0, 0, 80, 80, hdc_src, win->x, win->y, 8, 8, SRCCOPY); + sprintf(txt, "Tile num : 0x%X", win->tilenum); + SetWindowText(GetDlgItem(win->hwnd, IDC_TILENUM), txt); + EndPaint(hwnd, &ps); + return 0; +} + +LRESULT CALLBACK MiniTileViewBoxProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) +{ + switch(msg) + { + case WM_NCCREATE: + return 1; + case WM_NCDESTROY: + return 1; + case WM_PAINT : + MiniTileViewBox_Paint(hwnd, TileView, wParam, lParam); + break; + case WM_ERASEBKGND: + return 1; + default: + break; + } + return DefWindowProc(hwnd, msg, wParam, lParam); +} + +BOOL CALLBACK ViewTilesProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) +{ + //bail out early if the dialog isnt initialized + if(!TileView && message != WM_INITDIALOG) + return false; + + switch (message) + { + case WM_INITDIALOG : + { + TileView = new tileview_struct; + memset(TileView, 0, sizeof(tileview_struct)); + TileView->hwnd = hwnd; + TileView->mem = ARM9Mem.ARM9_ABG; + TileView->pal = ((u16 *)ARM9Mem.ARM9_VMEM); + TileView->autoup_secs = 5; + SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), + UDM_SETRANGE, 0, MAKELONG(99, 1)); + SendMessage(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), + UDM_SETPOS32, 0, TileView->autoup_secs); + + HWND combo = GetDlgItem(hwnd, IDC_PAL_SELECT); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main screen BG PAL"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub screen BG PAL"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main screen SPR PAL"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub screen SPR PAL"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main screen ExtPAL 0"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main screen ExtPAL 1"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main screen ExtPAL 2"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main screen ExtPAL 3"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub screen ExtPAL 0"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub screen ExtPAL 1"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub screen ExtPAL 2"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub screen ExtPAL 3"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main spr ExtPAL 0"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Main spr ExtPAL 1"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub spr ExtPAL 0"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Sub spr ExtPAL 1"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Texture PAL 0"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Texture PAL 1"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Texture PAL 2"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"Texture PAL 3"); + SendMessage(combo, CB_SETCURSEL, 0, 0); + + combo = GetDlgItem(hwnd, IDC_MEM_SELECT); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"A-BG - 0x6000000"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"A-BG - 0x6010000"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"A-BG - 0x6020000"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"A-BG - 0x6030000"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"A-BG - 0x6040000"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"A-BG - 0x6050000"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"A-BG - 0x6060000"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"A-BG - 0x6070000"); + + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"B-BG - 0x6200000"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"B-BG - 0x6210000"); + + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"A-OBJ- 0x6400000"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"A-OBJ- 0x6410000"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"A-OBJ- 0x6420000"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"A-OBJ- 0x6430000"); + + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"B-OBJ- 0x6600000"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"B-OBJ- 0x6610000"); + + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"LCD - 0x6800000"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"LCD - 0x6810000"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"LCD - 0x6820000"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"LCD - 0x6830000"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"LCD - 0x6840000"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"LCD - 0x6850000"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"LCD - 0x6860000"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"LCD - 0x6870000"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"LCD - 0x6880000"); + SendMessage(combo, CB_ADDSTRING, 0,(LPARAM)"LCD - 0x6890000"); + SendMessage(combo, CB_SETCURSEL, 0, 0); + SendMessage(GetDlgItem(hwnd, IDC_BITMAP), BM_SETCHECK, TRUE, 0); + } + return 1; + case WM_CLOSE : + if(TileView->autoup) + { + KillTimer(hwnd, IDT_VIEW_TILE); + TileView->autoup = false; + } if (TileView!=NULL) { delete TileView; TileView = NULL; } //INFO("Close Tile view dialog\n"); - PostQuitMessage(0); - return 1; - case WM_TIMER: - SendMessage(hwnd, WM_COMMAND, IDC_REFRESH, 0); - return 1; - case WM_HSCROLL : - switch LOWORD(wParam) - { - case SB_LINERIGHT : - ++(TileView->palnum); - if(TileView->palnum>15) - TileView->palnum = 15; - break; - case SB_LINELEFT : - --(TileView->palnum); - if(TileView->palnum<0) - TileView->palnum = 0; - break; - } - InvalidateRect(hwnd, NULL, FALSE); - return 1; - case WM_COMMAND : - switch (LOWORD (wParam)) - { - case IDC_FERMER : - SendMessage(hwnd, WM_CLOSE, 0, 0); - return 1; - case IDC_AUTO_UPDATE : - if(TileView->autoup) - { - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), false); - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), false); - KillTimer(hwnd, IDT_VIEW_TILE); - TileView->autoup = FALSE; - return 1; - } - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), true); - EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), true); - TileView->autoup = TRUE; - SetTimer(hwnd, IDT_VIEW_TILE, TileView->autoup_secs*1000, (TIMERPROC) NULL); - return 1; - case IDC_AUTO_UPDATE_SECS: - { - int t = GetDlgItemInt(hwnd, IDC_AUTO_UPDATE_SECS, FALSE, TRUE); + PostQuitMessage(0); + return 1; + case WM_TIMER: + SendMessage(hwnd, WM_COMMAND, IDC_REFRESH, 0); + return 1; + case WM_HSCROLL : + switch LOWORD(wParam) + { + case SB_LINERIGHT : + ++(TileView->palnum); + if(TileView->palnum>15) + TileView->palnum = 15; + break; + case SB_LINELEFT : + --(TileView->palnum); + if(TileView->palnum<0) + TileView->palnum = 0; + break; + } + InvalidateRect(hwnd, NULL, FALSE); + return 1; + case WM_COMMAND : + switch (LOWORD (wParam)) + { + case IDC_FERMER : + SendMessage(hwnd, WM_CLOSE, 0, 0); + return 1; + case IDC_AUTO_UPDATE : + if(TileView->autoup) + { + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), false); + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), false); + KillTimer(hwnd, IDT_VIEW_TILE); + TileView->autoup = FALSE; + return 1; + } + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SECS), true); + EnableWindow(GetDlgItem(hwnd, IDC_AUTO_UPDATE_SPIN), true); + TileView->autoup = TRUE; + SetTimer(hwnd, IDT_VIEW_TILE, TileView->autoup_secs*1000, (TIMERPROC) NULL); + return 1; + case IDC_AUTO_UPDATE_SECS: + { + int t = GetDlgItemInt(hwnd, IDC_AUTO_UPDATE_SECS, FALSE, TRUE); if (!TileView) { SendMessage(hwnd, WM_INITDIALOG, 0, 0); - } - if (t != TileView->autoup_secs) - { - TileView->autoup_secs = t; - if (TileView->autoup) - SetTimer(hwnd, IDT_VIEW_TILE, - TileView->autoup_secs*1000, (TIMERPROC) NULL); - } - } - return 1; - case IDC_REFRESH: - InvalidateRect(hwnd, NULL, FALSE); - return 1; - case IDC_BITMAP : - TileView->coul = 0; - InvalidateRect(hwnd, NULL, FALSE); - return 1; - case IDC_256COUL : - TileView->coul = 1; - InvalidateRect(hwnd, NULL, FALSE); - return 1; - case IDC_16COUL : - TileView->coul = 2; - InvalidateRect(hwnd, NULL, FALSE); - return 1; - case IDC_MEM_SELECT : - switch(HIWORD(wParam)) - { - case CBN_SELCHANGE : - case CBN_CLOSEUP : - { - u32 sel = SendMessage(GetDlgItem(hwnd, IDC_MEM_SELECT), CB_GETCURSEL, 0, 0); - switch(sel) - { - case 0 : - case 1 : - case 2 : - case 3 : - case 4 : - case 5 : - case 6 : - case 7 : - TileView->mem = ARM9Mem.ARM9_ABG + 0x10000*sel; - break; - case 8 : - case 9 : - TileView->mem = ARM9Mem.ARM9_BBG + 0x10000*(sel-8); - break; - case 10 : - case 11 : - case 12 : - case 13 : - TileView->mem = ARM9Mem.ARM9_AOBJ + 0x10000*(sel-10); - break; - case 14 : - case 15 : - TileView->mem = ARM9Mem.ARM9_BOBJ + 0x10000*(sel-14); - break; - case 16 : - case 17 : - case 18 : - case 19 : - case 20 : - case 21 : - case 22 : - case 23 : - case 24 : - case 25 : - TileView->mem = ARM9Mem.ARM9_LCD + 0x10000*(sel-16); - break; - default : - return 1; - } - InvalidateRect(hwnd, NULL, FALSE); - return 1; - } - } - return 1; - case IDC_PAL_SELECT : - switch(HIWORD(wParam)) - { - case CBN_SELCHANGE : - case CBN_CLOSEUP : - { - u32 sel = SendMessage(GetDlgItem(hwnd, IDC_PAL_SELECT), CB_GETCURSEL, 0, 0); - switch(sel) - { - case 0 : - TileView->pal = (u16 *)ARM9Mem.ARM9_VMEM; - TileView->palnum = 0; - ShowWindow(GetDlgItem(hwnd, IDC_16COUL), SW_SHOW); - EnableWindow(GetDlgItem(hwnd, IDC_16COUL), TRUE); - break; - case 1 : - TileView->pal = ((u16 *)ARM9Mem.ARM9_VMEM) + 0x200; - TileView->palnum = 0; - ShowWindow(GetDlgItem(hwnd, IDC_16COUL), SW_SHOW); - EnableWindow(GetDlgItem(hwnd, IDC_16COUL), TRUE); - break; - case 2 : - TileView->pal = (u16 *)ARM9Mem.ARM9_VMEM + 0x100; - TileView->palnum = 0; - ShowWindow(GetDlgItem(hwnd, IDC_16COUL), SW_SHOW); - EnableWindow(GetDlgItem(hwnd, IDC_16COUL), TRUE); - break; - case 3 : - TileView->pal = ((u16 *)ARM9Mem.ARM9_VMEM) + 0x300; - TileView->palnum = 0; - ShowWindow(GetDlgItem(hwnd, IDC_16COUL), SW_SHOW); - EnableWindow(GetDlgItem(hwnd, IDC_16COUL), TRUE); - break; - case 4 : - case 5 : - case 6 : - case 7 : - TileView->pal = ((u16 *)(ARM9Mem.ExtPal[0][sel-4])); - TileView->palnum = 0; - ShowWindow(GetDlgItem(hwnd, IDC_16COUL), SW_HIDE); - EnableWindow(GetDlgItem(hwnd, IDC_16COUL), FALSE); - if(TileView->coul == 2) - { - SendMessage(GetDlgItem(hwnd, IDC_256COUL), BM_SETCHECK, TRUE, 0); - SendMessage(GetDlgItem(hwnd, IDC_16COUL), BM_SETCHECK, FALSE, 0); - TileView->coul = 1; - } - break; - case 8 : - case 9 : - case 10 : - case 11 : - TileView->pal = ((u16 *)(ARM9Mem.ExtPal[1][sel-8])); - TileView->palnum = 0; - ShowWindow(GetDlgItem(hwnd, IDC_16COUL), SW_HIDE); - EnableWindow(GetDlgItem(hwnd, IDC_16COUL), FALSE); - if(TileView->coul == 2) - { - SendMessage(GetDlgItem(hwnd, IDC_256COUL), BM_SETCHECK, TRUE, 0); - SendMessage(GetDlgItem(hwnd, IDC_16COUL), BM_SETCHECK, FALSE, 0); - TileView->coul = 1; - } - break; - case 12 : - case 13 : - TileView->pal = ((u16 *)(ARM9Mem.ObjExtPal[0][sel-12])); - TileView->palnum = 0; - if(TileView->coul == 2) - { - SendMessage(GetDlgItem(hwnd, IDC_256COUL), BM_SETCHECK, TRUE, 0); - SendMessage(GetDlgItem(hwnd, IDC_16COUL), BM_SETCHECK, FALSE, 0); - TileView->coul = 1; - } - break; - case 14 : - case 15 : - TileView->pal = ((u16 *)(ARM9Mem.ObjExtPal[1][sel-14])); - TileView->palnum = 0; - if(TileView->coul == 2) - { - SendMessage(GetDlgItem(hwnd, IDC_256COUL), BM_SETCHECK, TRUE, 0); - SendMessage(GetDlgItem(hwnd, IDC_16COUL), BM_SETCHECK, FALSE, 0); - TileView->coul = 1; - } - break; - case 16 : - case 17 : - case 18 : - case 19 : - TileView->pal = ((u16 *)(ARM9Mem.texPalSlot[sel-16])); - TileView->palnum = 0; - ShowWindow(GetDlgItem(hwnd, IDC_16COUL), SW_SHOW); - EnableWindow(GetDlgItem(hwnd, IDC_16COUL), TRUE); - break; - default : - return 1; - } - InvalidateRect(hwnd, NULL, FALSE); - return 1; - } - } - } - return 0; - } - return FALSE; -} + } + if (t != TileView->autoup_secs) + { + TileView->autoup_secs = t; + if (TileView->autoup) + SetTimer(hwnd, IDT_VIEW_TILE, + TileView->autoup_secs*1000, (TIMERPROC) NULL); + } + } + return 1; + case IDC_REFRESH: + InvalidateRect(hwnd, NULL, FALSE); + return 1; + case IDC_BITMAP : + TileView->coul = 0; + InvalidateRect(hwnd, NULL, FALSE); + return 1; + case IDC_256COUL : + TileView->coul = 1; + InvalidateRect(hwnd, NULL, FALSE); + return 1; + case IDC_16COUL : + TileView->coul = 2; + InvalidateRect(hwnd, NULL, FALSE); + return 1; + case IDC_MEM_SELECT : + switch(HIWORD(wParam)) + { + case CBN_SELCHANGE : + case CBN_CLOSEUP : + { + u32 sel = SendMessage(GetDlgItem(hwnd, IDC_MEM_SELECT), CB_GETCURSEL, 0, 0); + switch(sel) + { + case 0 : + case 1 : + case 2 : + case 3 : + case 4 : + case 5 : + case 6 : + case 7 : + TileView->mem = ARM9Mem.ARM9_ABG + 0x10000*sel; + break; + case 8 : + case 9 : + TileView->mem = ARM9Mem.ARM9_BBG + 0x10000*(sel-8); + break; + case 10 : + case 11 : + case 12 : + case 13 : + TileView->mem = ARM9Mem.ARM9_AOBJ + 0x10000*(sel-10); + break; + case 14 : + case 15 : + TileView->mem = ARM9Mem.ARM9_BOBJ + 0x10000*(sel-14); + break; + case 16 : + case 17 : + case 18 : + case 19 : + case 20 : + case 21 : + case 22 : + case 23 : + case 24 : + case 25 : + TileView->mem = ARM9Mem.ARM9_LCD + 0x10000*(sel-16); + break; + default : + return 1; + } + InvalidateRect(hwnd, NULL, FALSE); + return 1; + } + } + return 1; + case IDC_PAL_SELECT : + switch(HIWORD(wParam)) + { + case CBN_SELCHANGE : + case CBN_CLOSEUP : + { + u32 sel = SendMessage(GetDlgItem(hwnd, IDC_PAL_SELECT), CB_GETCURSEL, 0, 0); + switch(sel) + { + case 0 : + TileView->pal = (u16 *)ARM9Mem.ARM9_VMEM; + TileView->palnum = 0; + ShowWindow(GetDlgItem(hwnd, IDC_16COUL), SW_SHOW); + EnableWindow(GetDlgItem(hwnd, IDC_16COUL), TRUE); + break; + case 1 : + TileView->pal = ((u16 *)ARM9Mem.ARM9_VMEM) + 0x200; + TileView->palnum = 0; + ShowWindow(GetDlgItem(hwnd, IDC_16COUL), SW_SHOW); + EnableWindow(GetDlgItem(hwnd, IDC_16COUL), TRUE); + break; + case 2 : + TileView->pal = (u16 *)ARM9Mem.ARM9_VMEM + 0x100; + TileView->palnum = 0; + ShowWindow(GetDlgItem(hwnd, IDC_16COUL), SW_SHOW); + EnableWindow(GetDlgItem(hwnd, IDC_16COUL), TRUE); + break; + case 3 : + TileView->pal = ((u16 *)ARM9Mem.ARM9_VMEM) + 0x300; + TileView->palnum = 0; + ShowWindow(GetDlgItem(hwnd, IDC_16COUL), SW_SHOW); + EnableWindow(GetDlgItem(hwnd, IDC_16COUL), TRUE); + break; + case 4 : + case 5 : + case 6 : + case 7 : + TileView->pal = ((u16 *)(ARM9Mem.ExtPal[0][sel-4])); + TileView->palnum = 0; + ShowWindow(GetDlgItem(hwnd, IDC_16COUL), SW_HIDE); + EnableWindow(GetDlgItem(hwnd, IDC_16COUL), FALSE); + if(TileView->coul == 2) + { + SendMessage(GetDlgItem(hwnd, IDC_256COUL), BM_SETCHECK, TRUE, 0); + SendMessage(GetDlgItem(hwnd, IDC_16COUL), BM_SETCHECK, FALSE, 0); + TileView->coul = 1; + } + break; + case 8 : + case 9 : + case 10 : + case 11 : + TileView->pal = ((u16 *)(ARM9Mem.ExtPal[1][sel-8])); + TileView->palnum = 0; + ShowWindow(GetDlgItem(hwnd, IDC_16COUL), SW_HIDE); + EnableWindow(GetDlgItem(hwnd, IDC_16COUL), FALSE); + if(TileView->coul == 2) + { + SendMessage(GetDlgItem(hwnd, IDC_256COUL), BM_SETCHECK, TRUE, 0); + SendMessage(GetDlgItem(hwnd, IDC_16COUL), BM_SETCHECK, FALSE, 0); + TileView->coul = 1; + } + break; + case 12 : + case 13 : + TileView->pal = ((u16 *)(ARM9Mem.ObjExtPal[0][sel-12])); + TileView->palnum = 0; + if(TileView->coul == 2) + { + SendMessage(GetDlgItem(hwnd, IDC_256COUL), BM_SETCHECK, TRUE, 0); + SendMessage(GetDlgItem(hwnd, IDC_16COUL), BM_SETCHECK, FALSE, 0); + TileView->coul = 1; + } + break; + case 14 : + case 15 : + TileView->pal = ((u16 *)(ARM9Mem.ObjExtPal[1][sel-14])); + TileView->palnum = 0; + if(TileView->coul == 2) + { + SendMessage(GetDlgItem(hwnd, IDC_256COUL), BM_SETCHECK, TRUE, 0); + SendMessage(GetDlgItem(hwnd, IDC_16COUL), BM_SETCHECK, FALSE, 0); + TileView->coul = 1; + } + break; + case 16 : + case 17 : + case 18 : + case 19 : + TileView->pal = ((u16 *)(ARM9Mem.texPalSlot[sel-16])); + TileView->palnum = 0; + ShowWindow(GetDlgItem(hwnd, IDC_16COUL), SW_SHOW); + EnableWindow(GetDlgItem(hwnd, IDC_16COUL), TRUE); + break; + default : + return 1; + } + InvalidateRect(hwnd, NULL, FALSE); + return 1; + } + } + } + return 0; + } + return FALSE; +}