From: Pokemonhacker <pok...@us...> - 2005-06-25 06:19:13
|
Update of /cvsroot/vba/VisualBoyAdvance/src/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9829 Modified Files: GameOverrides.cpp GameOverrides.h Log Message: - Added support for the new 'mirroringEnabled' option in vba-over.ini Index: GameOverrides.h =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/GameOverrides.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GameOverrides.h 6 Nov 2004 14:19:56 -0000 1.1 --- GameOverrides.h 25 Jun 2005 06:19:04 -0000 1.2 *************** *** 1,2 **** --- 1,20 ---- + // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. + // Copyright (C) 1999-2003 Forgotten + // Copyright (C) 2005 Forgotten and the VBA development team + + // This program 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, or(at your option) + // any later version. + // + // This program 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 this program; if not, write to the Free Software Foundation, + // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + #if !defined(AFX_GAMEOVERRIDES_H__EEEFE37F_F477_455D_8682_705FB2DBCC0C__INCLUDED_) #define AFX_GAMEOVERRIDES_H__EEEFE37F_F477_455D_8682_705FB2DBCC0C__INCLUDED_ *************** *** 21,24 **** --- 39,43 ---- enum { IDD = IDD_GAME_OVERRIDES }; CEdit m_name; + CComboBox m_mirroring; CComboBox m_flashSize; CComboBox m_saveType; Index: GameOverrides.cpp =================================================================== RCS file: /cvsroot/vba/VisualBoyAdvance/src/win32/GameOverrides.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GameOverrides.cpp 6 Nov 2004 14:19:40 -0000 1.1 --- GameOverrides.cpp 25 Jun 2005 06:19:04 -0000 1.2 *************** *** 1,2 **** --- 1,20 ---- + // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. + // Copyright (C) 1999-2003 Forgotten + // Copyright (C) 2005 Forgotten and the VBA development team + + // This program 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, or(at your option) + // any later version. + // + // This program 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 this program; if not, write to the Free Software Foundation, + // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + // GameOverrides.cpp : implementation file // *************** *** 31,34 **** --- 49,53 ---- //{{AFX_DATA_MAP(GameOverrides) DDX_Control(pDX, IDC_NAME, m_name); + DDX_Control(pDX, IDC_MIRRORING, m_mirroring); DDX_Control(pDX, IDC_FLASH_SIZE, m_flashSize); DDX_Control(pDX, IDC_SAVE_TYPE, m_saveType); *************** *** 66,70 **** int flash = m_flashSize.GetCurSel(); int save = m_saveType.GetCurSel(); ! if(rtc == 0 && flash == 0 && save == 0) WritePrivateProfileString(buffer, NULL, NULL, tempName); else { --- 85,90 ---- int flash = m_flashSize.GetCurSel(); int save = m_saveType.GetCurSel(); ! int mirroring = m_mirroring.GetCurSel(); ! if(rtc == 0 && flash == 0 && save == 0 && mirroring == 0) WritePrivateProfileString(buffer, NULL, NULL, tempName); else { *************** *** 111,114 **** --- 131,144 ---- } WritePrivateProfileString(buffer, "saveType", value, tempName); + value = NULL; + switch(mirroring) { + case 1: + value = "0"; + break; + case 2: + value = "1"; + break; + } + WritePrivateProfileString(buffer, "mirroringEnabled", value, tempName); } CDialog::OnOK(); *************** *** 120,123 **** --- 150,154 ---- m_flashSize.SetCurSel(0); m_saveType.SetCurSel(0); + m_mirroring.SetCurSel(0); } *************** *** 152,155 **** --- 183,191 ---- "None" }; + const char *mirroringValues[] = { + "Default", + "Disabled", + "Enabled" + }; int i; *************** *** 164,168 **** m_saveType.AddString(saveValues[i]); } ! GetModuleFileName(NULL, tempName, 2048); --- 200,207 ---- m_saveType.AddString(saveValues[i]); } ! for(i = 0; i < 3; i++) { ! m_mirroring.AddString(mirroringValues[i]); ! } ! GetModuleFileName(NULL, tempName, 2048); *************** *** 219,222 **** --- 258,276 ---- m_saveType.SetCurSel(0); + v = GetPrivateProfileInt(buffer, + "mirroringEnabled", + -1, + tempName); + switch(v) { + case 0: + m_mirroring.SetCurSel(1); + break; + case 1: + m_mirroring.SetCurSel(2); + break; + default: + m_mirroring.SetCurSel(0); + } + return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE |