Mercurial > vba-clojure
view src/win32/VBA.h @ 6:458a4f18f3cd
working on lua generation
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 03 Mar 2012 10:48:33 -0600 |
parents | f9f4f1b99eed |
children |
line wrap: on
line source
1 #if !defined(AFX_VBA_H__57514A10_49F9_4B83_A928_0D8A4A7306A3__INCLUDED_)2 #define AFX_VBA_H__57514A10_49F9_4B83_A928_0D8A4A7306A3__INCLUDED_4 #if _MSC_VER > 10005 #pragma once6 #endif // _MSC_VER > 10008 /*9 #ifndef __AFXWIN_H__10 #error include 'stdafx.h' before including this file for PCH11 #endif12 */14 #include <afxtempl.h>16 #include "AcceleratorManager.h"17 #include "AVIWrite.h"18 #include "Display.h"19 #include "../common/System.h"21 /////////////////////////////////////////////////////////////////////////////22 // VBA:23 // See VBA.cpp for the implementation of this class24 //26 enum27 {28 VIDEO_1X, VIDEO_2X, VIDEO_3X, VIDEO_4X,29 VIDEO_320x240, VIDEO_640x480, VIDEO_800x600, VIDEO_OTHER30 };32 #define REWIND_SIZE 40000033 #define MAX_REWIND_SLOTS 25634 #define SCREEN_MESSAGE_SLOTS 836 /////////////////////////////////////////////////////////////////////////////37 // forward decl38 class IUpdateListener;39 class Input;40 class ISound;41 class AVIWrite;42 class WavWriter;44 class VBA : public CWinApp45 {46 public:47 CMenu m_menu;48 HMENU menu;49 HMENU popup;50 bool mode320Available;51 bool mode640Available;52 bool mode800Available;53 int windowPositionX;54 int windowPositionY;55 void (*filterFunction)(u8 *, u32, u8 *, u8 *, u32, int, int);56 void (*ifbFunction)(u8 *, u32, int, int);57 int ifbType;58 int filterType;59 int filterWidth;60 int filterHeight;61 int fsWidth;62 int fsHeight;63 int fsColorDepth;64 bool fsForceChange;65 bool AsscWithSaveState;66 int sizeX;67 int sizeY;68 int surfaceSizeX;69 int surfaceSizeY;70 int videoOption;71 bool fullScreenStretch;72 bool disableStatusMessage;73 int showSpeed;74 BOOL showSpeedTransparent;75 int showRenderedFrames;76 bool screenMessage [SCREEN_MESSAGE_SLOTS];77 CString screenMessageBuffer [SCREEN_MESSAGE_SLOTS];78 DWORD screenMessageTime [SCREEN_MESSAGE_SLOTS];79 int screenMessageDuration [SCREEN_MESSAGE_SLOTS];80 CString screenMessageColorBuffer [SCREEN_MESSAGE_SLOTS];81 u8 * delta[257 * 244 * 4];82 bool menuToggle;83 IDisplay *display;84 bool soundInitialized;85 bool useBiosFile;86 bool skipBiosFile;87 CString biosFileName;88 bool allowLeftRight;89 bool autofireAccountForLag;90 bool nextframeAccountForLag;91 bool active;92 bool iconic;93 bool paused;94 CString recentFiles[10];95 bool recentFreeze;96 bool autoSaveLoadCheatList;97 bool pauseDuringCheatSearch;98 bool modelessCheatDialogIsOpen;99 // FILE * winout;100 // bool removeIntros;101 bool autoIPS;102 int winGbBorderOn;103 bool hideMovieBorder;104 int winFlashSize;105 bool winRtcEnable;106 int winSaveType;107 char *rewindMemory;108 int rewindPos;109 int rewindTopPos;110 int rewindCounter;111 int rewindCount;112 bool rewindSaveNeeded;113 int rewindTimer;114 int rewindSlots;115 int captureFormat;116 bool tripleBuffering;117 bool autoHideMenu;118 bool speedupToggle;119 int throttle;120 u32 throttleLastTime;121 /// u32 autoFrameSkipLastTime;122 /// bool autoFrameSkip;123 bool accuratePitchThrottle;124 bool vsync;125 bool changingVideoSize;126 GUID videoDriverGUID;127 GUID * pVideoDriverGUID;128 DISPLAY_TYPE renderMethod;129 bool ddrawEmulationOnly;130 bool ddrawUsingEmulationOnly;131 bool ddrawDebug;132 bool ddrawUseVideoMemory;133 int d3dFilter;134 int glFilter;135 int glType;136 bool muteWhenInactive;137 bool muteFrameAdvance;138 bool pauseWhenInactive;139 bool enableBackgroundInput;140 bool alwaysOnTop;141 bool useOldSync;142 bool winGbPrinterEnabled;143 int threadPriority;144 bool disableMMX;145 int languageOption;146 CString languageName;147 HINSTANCE languageModule;148 int renderedFrames;149 Input * input;150 int joypadDefault;151 int autoFire, autoFire2;152 int autoHold;153 bool autoFireToggle;154 bool frameCounter;155 bool lagCounter;156 bool extraCounter;157 bool inputDisplay;158 bool movieReadOnly;159 bool movieOnEndPause;160 int movieOnEndBehavior;161 bool soundRecording;162 WavWriter * soundRecorder;163 CString soundRecordName;164 ISound * sound;165 bool aviRecording;166 AVIWrite * aviRecorder;167 CString aviRecordName;168 bool altAviRecordMethod;169 bool nvVideoLog;170 bool nvAudioLog;171 bool painting; // for systemDrawScreen()172 int mouseCounter;173 bool winMuteForNow;174 bool winPauseNextFrame;175 bool wasPaused;176 int fsMaxScale;177 int romSize;178 bool autoLoadMostRecent;179 bool loadMakesRecent;180 bool loadMakesCurrent;181 bool saveMakesCurrent;182 int currentSlot;183 bool showSlotTime;184 int filenamePreference;185 int LuaFastForward;186 bool frameSearching;187 bool frameSearchSkipping;188 bool frameSearchFirstStep;189 bool frameSearchLoadValid;190 int frameSearchLength;191 int frameSearchStart;192 u32 frameSearchOldInput[4];193 char * frameSearchMemory;194 DWORD wmTimerRes;196 CList<IUpdateListener *, IUpdateListener * &> updateList;197 int updateCount;199 CAcceleratorManager winAccelMgr;200 HACCEL hAccel;202 RECT rect;203 RECT dest;205 struct EmulatedSystem &emulator;207 CString romFilename;208 CString gameFilename;209 CString exeName;210 CString exeDir;211 CString wndClass;213 public:214 VBA();215 ~VBA();217 void adjustDestRect();218 void recreateMenuBar();219 void updateIFB();220 void updateFilter();221 void updateMenuBar();222 void winAddUpdateListener(IUpdateListener *l);223 void winRemoveUpdateListener(IUpdateListener *l);225 // Overrides226 // ClassWizard generated virtual function overrides227 //{{AFX_VIRTUAL(VBA)228 public:229 virtual BOOL InitInstance();230 virtual BOOL OnIdle(LONG lCount);231 //}}AFX_VIRTUAL233 // Implementation234 public:235 HINSTANCE winLoadLanguage(const char *name);236 void winSetLanguageOption(int option, bool force);237 #ifdef MMX238 bool detectMMX();239 #endif240 void updatePriority();241 void shutdownDisplay();242 void winCheckFullscreen();243 bool updateRenderMethod(bool force);244 bool initDisplay();245 void updateWindowSize(int value);246 void updateVideoSize(UINT id);247 void updateFrameSkip();248 void loadSettings();249 void saveSettings();250 bool initInput();251 void addRecentFile(const CString &file);252 void saveRewindStateIfNecessary();253 //{{AFX_MSG(VBA)254 afx_msg void OnAppAbout();255 // NOTE - the ClassWizard will add and remove member functions here.256 // DO NOT EDIT what you see in these blocks of generated code !257 //}}AFX_MSG258 DECLARE_MESSAGE_MAP()259 };261 extern VBA theApp;263 #ifdef MMX264 extern "C" bool cpu_mmx;265 #endif267 extern void DrawTextMessages(u8 *dest, int pitch, int left, int bottom);269 /////////////////////////////////////////////////////////////////////////////271 //{{AFX_INSERT_LOCATION}}272 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.274 #endif // !defined(AFX_VBA_H__57514A10_49F9_4B83_A928_0D8A4A7306A3__INCLUDED_)