📄 config.h
字号:
//
// 愝掕曐懚僋儔僗
//
#ifndef __CCONFIG_INCLUDED__
#define __CCONFIG_INCLUDED__
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <stdlib.h>
#define DIRECTINPUT_VERSION 0x0700
#include <dinput.h>
#include <string>
using namespace std;
#include "extsoundfile.h"
#include "typedef.h"
#include "macro.h"
class CCfgGeneral
{
public:
BOOL bDoubleExecute;
BOOL bStartupLauncher;
BOOL bWindowSave;
BOOL bWindowZoom;
RECT rcWindowPos;
BOOL bScreenMode;
BOOL nScreenZoom;
RECT rcSearchDlgPos;
RECT rcPatternViewPos;
RECT rcNameTableViewPos;
RECT rcPaletteViewPos;
RECT rcMemoryViewPos;
RECT rcBarcodePos;
RECT rcPaletteEditPos;
WORD JoyAxisSetting[16];
// 僕儑僀僷僢僪偺幉偺柍岠壔
// 0 : All enable
// 1 : X幉埲崀慡偰
// 2 : Y幉埲崀慡偰
// 3 : Z幉埲崀慡偰
// 4 : RX幉埲崀慡偰
// 5 : RY幉埲崀慡偰
// 6 : RZ幉埲崀慡偰
INT nJoyAxisDisable;
void Default() {
bWindowSave = FALSE;
bWindowZoom = FALSE;
rcWindowPos.left = rcWindowPos.right =
rcWindowPos.top = rcWindowPos.bottom = 0;
bDoubleExecute = TRUE;
bStartupLauncher = FALSE;
bScreenMode = FALSE;
nScreenZoom = 0;
rcSearchDlgPos.left = rcSearchDlgPos.right =
rcSearchDlgPos.top = rcSearchDlgPos.bottom = 0;
rcPatternViewPos.left = rcPatternViewPos.right =
rcPatternViewPos.top = rcPatternViewPos.bottom = 0;
rcNameTableViewPos.left = rcNameTableViewPos.right =
rcNameTableViewPos.top = rcNameTableViewPos.bottom = 0;
rcPaletteViewPos.left = rcPaletteViewPos.right =
rcPaletteViewPos.top = rcPaletteViewPos.bottom = 0;
rcMemoryViewPos.left = rcMemoryViewPos.right =
rcMemoryViewPos.top = rcMemoryViewPos.bottom = 0;
rcBarcodePos.left = rcBarcodePos.right =
rcBarcodePos.top = rcBarcodePos.bottom = 0;
rcPaletteEditPos.left = rcPaletteEditPos.right =
rcPaletteEditPos.top = rcPaletteEditPos.bottom = 0;
nJoyAxisDisable = 0;
for( INT i = 0; i < 16; i++ ) {
JoyAxisSetting[i] = 0;
}
}
};
class CCfgPath
{
public:
BOOL bRomPath;
BOOL bSavePath;
BOOL bStatePath;
BOOL bSnapshotPath;
BOOL bMoviePath;
BOOL bWavePath;
BOOL bCheatPath;
CHAR szRomPath [_MAX_PATH];
CHAR szSavePath [_MAX_PATH];
CHAR szStatePath [_MAX_PATH];
CHAR szSnapshotPath[_MAX_PATH];
CHAR szMoviePath [_MAX_PATH];
CHAR szWavePath [_MAX_PATH];
CHAR szCheatPath [_MAX_PATH];
void Default() {
#if 0
bRomPath = bSavePath =
bStatePath = bSnapshotPath =
bMoviePath = bWavePath =
bCheatPath = FALSE;
szRomPath[0] = szSavePath[0] =
szStatePath[0] = szSnapshotPath[0] =
szMoviePath[0] = szWavePath[0] =
szCheatPath[0] = 0;
#endif
bRomPath = bSavePath =
bStatePath = bSnapshotPath =
bMoviePath = bWavePath =
bCheatPath = TRUE;
::lstrcpy( szRomPath, ".\\roms\\" );
::lstrcpy( szSavePath, ".\\save\\" );
::lstrcpy( szStatePath, ".\\state\\" );
::lstrcpy( szSnapshotPath, ".\\snapshot\\" );
::lstrcpy( szMoviePath, ".\\movie\\" );
::lstrcpy( szWavePath, ".\\wave\\" );
::lstrcpy( szCheatPath, ".\\cheatcode\\" );
}
};
class CCfgEmulator
{
public:
BOOL bIllegalOp;
BOOL bAutoFrameSkip;
BOOL bThrottle;
INT nThrottleFPS;
BOOL bBackground;
INT nPriority;
BOOL bFourPlayer;
BOOL bCrcCheck;
BOOL bDiskThrottle;
BOOL bLoadFullscreen;
BOOL bPNGsnapshot;
void Default() {
bIllegalOp = FALSE;
bAutoFrameSkip = TRUE;
bThrottle = TRUE;
nThrottleFPS = 120; // 120FPS
bBackground = FALSE;
nPriority = 3; // Normal
bFourPlayer = TRUE; // TRUE:NES FALSE:Famicom
bCrcCheck = TRUE;
bDiskThrottle = TRUE;
bLoadFullscreen = FALSE;
bPNGsnapshot = FALSE;
}
};
class CCfgGraphics
{
public:
BOOL bAspect;
BOOL bAllSprite;
BOOL bAllLine;
BOOL bFPSDisp;
BOOL bTVFrame;
BOOL bScanline;
INT nScanlineColor;
BOOL bSyncDraw;
BOOL bFitZoom;
BOOL bLeftClip;
BOOL bWindowVSync;
BOOL bSyncNoSleep;
BOOL bDiskAccessLamp;
BOOL bDoubleSize;
BOOL bSystemMemory;
BOOL bUseHEL;
BOOL bNoSquareList;
INT nGraphicsFilter;
DWORD dwDisplayWidth;
DWORD dwDisplayHeight;
DWORD dwDisplayDepth;
DWORD dwDisplayRate;
BOOL bPaletteFile;
CHAR szPaletteFile[_MAX_PATH];
void Default() {
bAspect = FALSE;
bAllSprite = TRUE;
bAllLine = FALSE;
bFPSDisp = FALSE;
bTVFrame = FALSE;
bScanline = FALSE;
nScanlineColor = 75;
bSyncDraw = FALSE;
bFitZoom = FALSE;
bLeftClip = TRUE;
bWindowVSync = FALSE;
bSyncNoSleep = FALSE;
bDiskAccessLamp = FALSE;
bDoubleSize = FALSE;
bSystemMemory = FALSE;
bUseHEL = FALSE;
bNoSquareList = FALSE;
nGraphicsFilter = 0;
dwDisplayWidth = 640;
dwDisplayHeight = 480;
dwDisplayDepth = 16;
dwDisplayRate = 0;
bPaletteFile = FALSE;
szPaletteFile[0] = 0;
}
};
class CCfgSound
{
public:
BOOL bEnable;
INT nRate;
INT nBits;
INT nBufferSize;
INT nFilterType;
BOOL bChangeTone;
BOOL bDisableVolumeEffect;
BOOL bExtraSoundEnable;
// 0:Master
// 1:Rectangle 1
// 2:Rectangle 2
// 3:Triangle
// 4:Noise
// 5:DPCM
// 6:VRC6
// 7:VRC7
// 8:FDS
// 9:MMC5
// 10:N106
// 11:FME7
SHORT nVolume[16];
void Default() {
bEnable = TRUE;
nRate = 22050;
nBits = 8;
nBufferSize = 4;
nFilterType = 0;
bChangeTone = FALSE;
bDisableVolumeEffect = FALSE;
bExtraSoundEnable = TRUE;
for( INT i = 0; i < 16; i++ ) {
nVolume[i] = 100;
}
}
};
class CCfgShortCut
{
public:
WORD nShortCut[512];
enum {
K_ALT = 0x8000,
K_CTRL = 0x4000,
K_SHIFT = 0x2000,
};
void Default() {
for( INT i = 0; i < (sizeof(nShortCut)/sizeof(WORD)); i++ ) {
nShortCut[i] = 0;
}
// Main controls
nShortCut[ 0] = DIK_O+K_CTRL; // ID_OPEN
nShortCut[ 1] = DIK_C+K_CTRL; // ID_CLOSE
nShortCut[ 2] = DIK_L+K_CTRL; // ID_LAUNCHER
nShortCut[ 3] = DIK_N+K_CTRL; // ID_NETPLAY_CONNECT
nShortCut[ 4] = DIK_D+K_CTRL; // ID_NETPLAY_DISCONNECT
nShortCut[ 5] = DIK_A+K_CTRL; // ID_NETPLAY_CHAT
nShortCut[ 8] = DIK_I+K_CTRL; // ID_ROMINFO
nShortCut[ 9] = DIK_W+K_CTRL; // ID_WAVERECORD
nShortCut[ 15] = DIK_X+K_CTRL; // ID_EXIT
// Emulation controls
nShortCut[ 16] = DIK_F1; // Hardware reset
nShortCut[ 17] = DIK_F2; // Software reset
nShortCut[ 18] = DIK_P; // Hardware pause
nShortCut[ 19] = DIK_TAB; // Throttle(toggled)
nShortCut[ 20] = DIK_NUMPADENTER; // Frame skip Auto
nShortCut[ 21] = DIK_ADD; // Frame skip +
nShortCut[ 22] = DIK_SUBTRACT; // Frame skip -
nShortCut[ 23] = DIK_SPACE; // One Frame step
nShortCut[ 24] = DIK_BACKSPACE; // Throttle(Not toggle)
// State controls
nShortCut[ 32] = DIK_L; // State Load
nShortCut[ 33] = DIK_S; // State Save
nShortCut[ 34] = DIK_F3; // State Slot +
nShortCut[ 35] = DIK_F4; // State Slot -
// Disk controls
nShortCut[ 48] = DIK_5; // Disk Eject
nShortCut[ 49] = DIK_1; // Disk 0 Side A
nShortCut[ 50] = DIK_2; // Disk 0 Side B
nShortCut[ 51] = DIK_3; // Disk 1 Side A
nShortCut[ 52] = DIK_4; // Disk 1 Side B
// Movie controls
nShortCut[ 56] = DIK_P+K_ALT; // Movie Play
nShortCut[ 57] = DIK_R+K_ALT; // Movie Rec
nShortCut[ 58] = DIK_A+K_ALT; // Movie Rec Append
nShortCut[ 59] = DIK_S+K_ALT; // Movie Stop
nShortCut[ 60] = DIK_M+K_ALT; // Movie Info
// Screen controls
nShortCut[ 64] = DIK_F5; // Zoom x1
nShortCut[ 65] = DIK_F6; // Zoom x2
nShortCut[ 66] = DIK_F7; // Zoom x3
nShortCut[ 67] = DIK_F8; // Zoom x4
nShortCut[ 68] = DIK_RETURN+K_ALT; // Fullscreen
// Sound controls
nShortCut[ 72] = DIK_BACK+K_CTRL; // Mute Master
nShortCut[ 73] = DIK_1+K_CTRL; // Mute Rectangle #1
nShortCut[ 74] = DIK_2+K_CTRL; // Mute Rectangle #2
nShortCut[ 75] = DIK_3+K_CTRL; // Mute Triangle
nShortCut[ 76] = DIK_4+K_CTRL; // Mute Noise
nShortCut[ 77] = DIK_5+K_CTRL; // Mute Dpcm
nShortCut[ 78] = DIK_6+K_CTRL; // Mute External #1
nShortCut[ 79] = DIK_7+K_CTRL; // Mute External #2
nShortCut[ 80] = DIK_8+K_CTRL; // Mute External #3
nShortCut[ 81] = DIK_9+K_CTRL; // Mute External #4
nShortCut[ 82] = DIK_0+K_CTRL; // Mute External #5
nShortCut[ 83] = DIK_MINUS+K_CTRL; // Mute External #6
nShortCut[ 84] = DIK_CIRCUMFLEX+K_CTRL; // Mute External #7
nShortCut[ 85] = DIK_YEN+K_CTRL; // Mute External #8
// Tape controls
nShortCut[ 90] = 0; // Tape Play
nShortCut[ 91] = 0; // Tape Rec
nShortCut[ 92] = 0; // Tape Stop
// Other controls
nShortCut[ 96] = DIK_P+K_CTRL; // Snapshot
nShortCut[ 97] = DIK_F11; // FPSDISP
nShortCut[ 98] = DIK_F12+K_CTRL; // TV Aspect
nShortCut[ 99] = DIK_F11+K_CTRL; // TV frame
nShortCut[100] = DIK_F12; // Scanline
nShortCut[101] = DIK_F9+K_CTRL; // Show 240 lines
nShortCut[102] = DIK_F9; // All sprites
nShortCut[103] = DIK_F10; // Sync draw
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -