Commit 2d7772d

Nick committed on
Removing AgOpenDialog and AgSaveDialog-- just use built in TOpenDialog and friends
commit 2d7772d64393f0e6d5a6a2a8a451d7edfaca030b parent 0b694e2
7 changed files +165−226
DeletedComponents/AgOpenDialog.pas +0−186
@@ -1,186 +0,0 @@
1 (************************************************************
2 Author: Deepak Shenoy
3 [email protected]
4 Copyright (C) 2000 Agni Software Pvt. Ltd.
5 All Rights Reserved.
6 http://www.agnisoft.com
7
8 Change Log:
9 11.09.2000
10 Now works for Windows ME too. Thanks to Petri Mustonen <[email protected]>
11 and Mark Carrington <[email protected]> for their help and code.
12 06.03.2000
13 Bug fix on suggestion from Jean-Fabien Connault <[email protected]> (Thanks)
14 Save Dialog on Win9x/NT would show "Open" as the caption if no title was
15 assigned. Added DoExecute Procedure.
16
17 22.01.2000
18 IsWin2000 fix on suggestion from Jean-Fabien Connault <[email protected]>
19 - Major Version check should be >= 5
20 ********************************************************)
21
22 unit AgOpenDialog;
23
24 {$MODE Delphi}
25
26 interface
27
28 uses
29 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, CommDlg;
30
31 type
32 TAgOpenDialog = class(TOpenDialog)
33 protected
34 FShowPlacesBar : boolean; // shows the left bar
35 FInterceptor : Pointer; // pointer to intercepting function
36 function IsWin2000 : boolean; // are we on Windows2000?
37 public
38 constructor Create(AOwner: TComponent); override;
39 function Execute: Boolean; override;
40 published
41 property ShowPlacesBar : boolean read FShowPlacesBar write FShowPlacesBar;
42 end;
43
44 TAgSaveDialog = class(TAgOpenDialog)
45 public
46 constructor Create(AOwner: TComponent); override;
47 function Execute: Boolean; override;
48 end;
49
50
51 procedure Register;
52
53 type
54 TOpenFileNameEx = packed record
55 lStructSize: DWORD;
56 hWndOwner: HWND;
57 hInstance: HINST;
58 lpstrFilter: PAnsiChar;
59 lpstrCustomFilter: PAnsiChar;
60 nMaxCustFilter: DWORD;
61 nFilterIndex: DWORD;
62 lpstrFile: PAnsiChar;
63 nMaxFile: DWORD;
64 lpstrFileTitle: PAnsiChar;
65 nMaxFileTitle: DWORD;
66 lpstrInitialDir: PAnsiChar;
67 lpstrTitle: PAnsiChar;
68 Flags: DWORD;
69 nFileOffset: Word;
70 nFileExtension: Word;
71 lpstrDefExt: PAnsiChar;
72 lCustData: LPARAM;
73 lpfnHook: function(Wnd: HWND; Msg: UINT; wParam: WPARAM; lParam: LPARAM): UINT stdcall;
74 lpTemplateName: PAnsiChar;
75 pvReserved : Pointer;
76 dwReserved : DWORD;
77 FlagsEx : DWORD;
78 end;
79
80 const OFN_EX_NOPLACESBAR = 1;
81
82 function GetOpenFileNameEx(var OpenFile: TOpenFilenameEx): Bool; stdcall;
83 function GetSaveFileNameEx(var OpenFile: TOpenFilenameEx): Bool; stdcall;
84 implementation
85
86 {$R *.res}
87
88 function GetOpenFileNameEx; external 'comdlg32.dll' name 'GetOpenFileNameA';
89 function GetSaveFileNameEx; external 'comdlg32.dll' name 'GetSaveFileNameA';
90
91 procedure Register;
92 begin
93 RegisterComponents('Samples', [TAgOpenDialog, TAgSaveDialog]);
94 end;
95
96 var
97 CurInstanceShowPlacesBar : boolean;
98
99 function OpenInterceptor(var DialogData: TOpenFileName): Bool; stdcall;
100 var DialogDataEx : TOpenFileNameEx;
101 begin
102 Move(DialogData, DialogDataEx, sizeof(DialogData));
103 if CurInstanceShowPlacesBar then
104 DialogDataEx.FlagsEx := 0
105 else
106 DialogDataEx.FlagsEx := OFN_EX_NOPLACESBAR;
107 DialogDataEx.lStructSize := sizeof(TOpenFileNameEx); // size of new structure
108 Result := GetOpenFileNameEx( DialogDataEx );
109 end;
110
111 function SaveInterceptor(var DialogData: TOpenFileName): Bool; stdcall;
112 var DialogDataEx : TOpenFileNameEx;
113 begin
114 Move(DialogData, DialogDataEx, sizeof(DialogData));
115 if CurInstanceShowPlacesBar then
116 DialogDataEx.FlagsEx := 0
117 else
118 DialogDataEx.FlagsEx := 1;
119 DialogDataEx.lStructSize := sizeof(TOpenFileNameEx); // size of new structure
120 Result := GetSaveFileNameEx( DialogDataEx );
121 end;
122
123 { TAgOpenDialog }
124
125 constructor TAgOpenDialog.Create(AOwner: TComponent);
126 begin
127 inherited;
128 FShowPlacesBar := TRUE;
129 FInterceptor := @OpenInterceptor;
130 end;
131
132 function TAgOpenDialog.Execute: Boolean;
133 begin
134 if IsWin2000 then
135 begin
136 CurInstanceShowPlacesBar := FShowPlacesBar;
137 Result := True; //DoExecute(FInterceptor);
138 end
139 else
140 Result := inherited Execute;
141 end;
142
143 // CHANGED - 11 Sep 2000
144 // Function returns true on Windows ME too. Should change the name.
145 function TAgOpenDialog.IsWin2000: boolean;
146 var ver : TOSVersionInfo;
147 begin
148 Result := FALSE;
149 ver.dwOSVersionInfoSize := SizeOf(TOSVersionInfo);
150 if not GetVersionEx(ver ) then
151 Exit;
152
153 if ( ver.dwPlatformId=VER_PLATFORM_WIN32_NT) then
154 begin // Detect Windows 2000
155 if (ver.dwMajorVersion >= 5 ) then
156 Result := TRUE;
157 end
158 else // Detect Windows ME
159 if ((ver.dwPlatformId=VER_PLATFORM_WIN32_WINDOWS) and
160 (ver.dwMajorVersion >= 4) and
161 (ver.dwMinorVersion >= 90)
162 ) then
163 Result := TRUE;
164 end;
165
166
167 { TAgSaveDialog }
168
169 constructor TAgSaveDialog.Create(AOwner: TComponent);
170 begin
171 inherited;
172 FInterceptor := @SaveInterceptor;
173 end;
174
175 function TAgSaveDialog.Execute: Boolean;
176 begin
177 if IsWin2000 then
178 begin
179 Result := Inherited Execute; // TAgOpenDialog has the functionality
180 end
181 else
182 Result := True; //DoExecute(@GetSaveFileName); // can't call inherited because
183 // it will call opendialogs DoExecute
184 end;
185
186 end.
ModifiedGBEmu.lps +45−18
@@ -4,13 +4,14 @@
4 <PathDelim Value="\"/> 4 <PathDelim Value="\"/>
5 <Version Value="10"/> 5 <Version Value="10"/>
6 <BuildModes Active="Default"/> 6 <BuildModes Active="Default"/>
7 <Units Count="24"> 7 <Units Count="26">
8 <Unit0> 8 <Unit0>
9 <Filename Value="GBEmu.lpr"/> 9 <Filename Value="GBEmu.lpr"/>
10 <IsPartOfProject Value="True"/> 10 <IsPartOfProject Value="True"/>
11 <EditorIndex Value="-1"/>
12 <TopLine Value="9"/>
11 <CursorPos X="25" Y="12"/> 13 <CursorPos X="25" Y="12"/>
12 <UsageCount Value="21"/> 14 <UsageCount Value="21"/>
13 <Loaded Value="True"/>
14 <DefaultSyntaxHighlighter Value="Delphi"/> 15 <DefaultSyntaxHighlighter Value="Delphi"/>
15 </Unit0> 16 </Unit0>
16 <Unit1> 17 <Unit1>
@@ -18,9 +19,8 @@
18 <IsPartOfProject Value="True"/> 19 <IsPartOfProject Value="True"/>
19 <HasResources Value="True"/> 20 <HasResources Value="True"/>
20 <IsVisibleTab Value="True"/> 21 <IsVisibleTab Value="True"/>
21 <EditorIndex Value="1"/> 22 <TopLine Value="4"/>
22 <TopLine Value="258"/> 23 <CursorPos X="37" Y="20"/>
23 <CursorPos X="23" Y="275"/>
24 <UsageCount Value="21"/> 24 <UsageCount Value="21"/>
25 <Loaded Value="True"/> 25 <Loaded Value="True"/>
26 <DefaultSyntaxHighlighter Value="Delphi"/> 26 <DefaultSyntaxHighlighter Value="Delphi"/>
@@ -108,18 +108,17 @@
108 <Unit10> 108 <Unit10>
109 <Filename Value="Sound\sound.pas"/> 109 <Filename Value="Sound\sound.pas"/>
110 <IsPartOfProject Value="True"/> 110 <IsPartOfProject Value="True"/>
111 <EditorIndex Value="3"/> 111 <EditorIndex Value="-1"/>
112 <TopLine Value="225"/> 112 <TopLine Value="225"/>
113 <UsageCount Value="21"/> 113 <UsageCount Value="21"/>
114 <Loaded Value="True"/>
115 <DefaultSyntaxHighlighter Value="Delphi"/> 114 <DefaultSyntaxHighlighter Value="Delphi"/>
116 </Unit10> 115 </Unit10>
117 <Unit11> 116 <Unit11>
118 <Filename Value="Global\vars.pas"/> 117 <Filename Value="Global\vars.pas"/>
119 <IsPartOfProject Value="True"/> 118 <IsPartOfProject Value="True"/>
120 <EditorIndex Value="2"/> 119 <EditorIndex Value="1"/>
121 <TopLine Value="331"/> 120 <TopLine Value="334"/>
122 <CursorPos X="16" Y="347"/> 121 <CursorPos X="6" Y="346"/>
123 <UsageCount Value="21"/> 122 <UsageCount Value="21"/>
124 <Loaded Value="True"/> 123 <Loaded Value="True"/>
125 <DefaultSyntaxHighlighter Value="Delphi"/> 124 <DefaultSyntaxHighlighter Value="Delphi"/>
@@ -127,10 +126,9 @@
127 <Unit12> 126 <Unit12>
128 <Filename Value="mainloop.pas"/> 127 <Filename Value="mainloop.pas"/>
129 <IsPartOfProject Value="True"/> 128 <IsPartOfProject Value="True"/>
130 <EditorIndex Value="4"/> 129 <EditorIndex Value="-1"/>
131 <CursorPos X="33" Y="10"/> 130 <CursorPos X="33" Y="10"/>
132 <UsageCount Value="21"/> 131 <UsageCount Value="21"/>
133 <Loaded Value="True"/>
134 <DefaultSyntaxHighlighter Value="Delphi"/> 132 <DefaultSyntaxHighlighter Value="Delphi"/>
135 </Unit12> 133 </Unit12>
136 <Unit13> 134 <Unit13>
@@ -215,20 +213,49 @@
215 <UsageCount Value="10"/> 213 <UsageCount Value="10"/>
216 <DefaultSyntaxHighlighter Value="Delphi"/> 214 <DefaultSyntaxHighlighter Value="Delphi"/>
217 </Unit23> 215 </Unit23>
216 <Unit24>
217 <Filename Value="UnitMain.lfm"/>
218 <ComponentName Value="frmGameboy"/>
219 <HasResources Value="True"/>
220 <ResourceBaseClass Value="Form"/>
221 <EditorIndex Value="3"/>
222 <UsageCount Value="10"/>
223 <Loaded Value="True"/>
224 <DefaultSyntaxHighlighter Value="LFM"/>
225 </Unit24>
226 <Unit25>
227 <Filename Value="C:\lazarus\lcl\include\control.inc"/>
228 <EditorIndex Value="2"/>
229 <TopLine Value="3881"/>
230 <CursorPos Y="3898"/>
231 <UsageCount Value="10"/>
232 <Loaded Value="True"/>
233 </Unit25>
218 </Units> 234 </Units>
219 <JumpHistory Count="3" HistoryIndex="2"> 235 <JumpHistory Count="6" HistoryIndex="5">
220 <Position1> 236 <Position1>
221 <Filename Value="UnitMain.pas"/> 237 <Filename Value="UnitMain.pas"/>
222 <Caret Line="8" Column="39"/> 238 <Caret Line="266" Column="69" TopLine="251"/>
223 </Position1> 239 </Position1>
224 <Position2> 240 <Position2>
225 <Filename Value="Global\vars.pas"/> 241 <Filename Value="UnitMain.pas"/>
226 <Caret Line="385" Column="28" TopLine="380"/> 242 <Caret Line="99" Column="28" TopLine="83"/>
227 </Position2> 243 </Position2>
228 <Position3> 244 <Position3>
229 <Filename Value="UnitMain.pas"/> 245 <Filename Value="Global\vars.pas"/>
230 <Caret Line="228" Column="37" TopLine="218"/> 246 <Caret Line="346" Column="6" TopLine="334"/>
231 </Position3> 247 </Position3>
248 <Position4>
249 <Filename Value="UnitMain.lfm"/>
250 <Caret Line="390" Column="33" TopLine="366"/>
251 </Position4>
252 <Position5>
253 <Filename Value="C:\lazarus\lcl\include\control.inc"/>
254 <Caret Line="3884" Column="44" TopLine="3882"/>
255 </Position5>
256 <Position6>
257 <Filename Value="UnitMain.lfm"/>
258 </Position6>
232 </JumpHistory> 259 </JumpHistory>
233 </ProjectSession> 260 </ProjectSession>
234 </CONFIG> 261 </CONFIG>
ModifiedGlobal/vars.pas +0−1
@@ -344,7 +344,6 @@ var cf:file;
344 i,c1:Byte; 344 i,c1:Byte;
345 S:String; 345 S:String;
346 begin 346 begin
347 name := 'mario.gb';
348 assignfile(cf,name);reset(cf,1); 347 assignfile(cf,name);reset(cf,1);
349 blockread(cf,m_rom,$180); 348 blockread(cf,m_rom,$180);
350 closefile(cf); 349 closefile(cf);
ModifiedUnitMain.lfm +18−18
@@ -1,18 +1,19 @@
1 object frmGameboy: TfrmGameboy 1 object frmGameboy: TfrmGameboy
2 Left = 369 2 Left = 387
3 Top = 205
4 Width = 318
5 Height = 354 3 Height = 354
4 Top = 232
5 Width = 318
6 Caption = 'Gameboy' 6 Caption = 'Gameboy'
7 ClientHeight = 320
8 ClientWidth = 318
7 Color = clBlack 9 Color = clBlack
8 DefaultMonitor = dmMainForm 10 DefaultMonitor = dmMainForm
9 Font.Charset = ANSI_CHARSET 11 DesignTimePPI = 168
12 Font.CharSet = ANSI_CHARSET
10 Font.Color = clWindowText 13 Font.Color = clWindowText
11 Font.Height = -12 14 Font.Height = -12
12 Font.Name = 'Arial' 15 Font.Name = 'Arial'
13 Font.Style = []
14 Menu = MainMenu 16 Menu = MainMenu
15 Position = poScreenCenter
16 OnActivate = FormActivate 17 OnActivate = FormActivate
17 OnClose = FormClose 18 OnClose = FormClose
18 OnCreate = FormCreate 19 OnCreate = FormCreate
@@ -20,12 +21,13 @@ object frmGameboy: TfrmGameboy
20 OnKeyUp = FormKeyUp 21 OnKeyUp = FormKeyUp
21 OnMouseDown = FormMouseDown 22 OnMouseDown = FormMouseDown
22 OnResize = FormResize 23 OnResize = FormResize
23 PixelsPerInch = 96 24 Position = poScreenCenter
25 LCLVersion = '1.8.4.0'
24 object StatusBar: TStatusBar 26 object StatusBar: TStatusBar
25 Left = 0 27 Left = 0
26 Top = 289 28 Height = 43
27 Width = 310 29 Top = 277
28 Height = 19 30 Width = 318
29 Panels = < 31 Panels = <
30 item 32 item
31 Text = 'Memory' 33 Text = 'Memory'
@@ -42,8 +44,8 @@ object frmGameboy: TfrmGameboy
42 SimplePanel = False 44 SimplePanel = False
43 end 45 end
44 object MainMenu: TMainMenu 46 object MainMenu: TMainMenu
45 Left = 40 47 left = 40
46 Top = 8 48 top = 8
47 object File1: TMenuItem 49 object File1: TMenuItem
48 Caption = '&File' 50 Caption = '&File'
49 object Load1: TMenuItem 51 object Load1: TMenuItem
@@ -385,17 +387,15 @@ object frmGameboy: TfrmGameboy
385 end 387 end
386 end 388 end
387 end 389 end
388 object OpenDialog: TAgOpenDialog 390 object OpenDialog: TOpenDialog
389 ShowPlacesBar = True
390 end 391 end
391 object SaveDialog: TAgSaveDialog 392 object SaveDialog: TSaveDialog
392 ShowPlacesBar = True
393 end 393 end
394 object Timer: TTimer 394 object Timer: TTimer
395 Enabled = False 395 Enabled = False
396 Interval = 17 396 Interval = 17
397 OnTimer = TimerTimer 397 OnTimer = TimerTimer
398 Left = 40 398 left = 40
399 Top = 40 399 top = 40
400 end 400 end
401 end 401 end
AddedUnitMain.lrs +99−0
@@ -0,0 +1,99 @@
1 { This is an automatically generated lazarus resource file }
2
3 LazarusResources.Add('TfrmGameboy','FORMDATA',[
4 'TPF0'#11'TfrmGameboy'#10'frmGameboy'#4'Left'#3#131#1#6'Height'#3'b'#1#3'Top'
5 +#3#232#0#5'Width'#3'>'#1#7'Caption'#6#7'Gameboy'#12'ClientHeight'#3'@'#1#11
6 +'ClientWidth'#3'>'#1#5'Color'#7#7'clBlack'#14'DefaultMonitor'#7#10'dmMainFor'
7 +'m'#13'DesignTimePPI'#3#168#0#12'Font.CharSet'#7#12'ANSI_CHARSET'#10'Font.Co'
8 +'lor'#7#12'clWindowText'#11'Font.Height'#2#244#9'Font.Name'#6#5'Arial'#4'Men'
9 +'u'#7#8'MainMenu'#10'OnActivate'#7#12'FormActivate'#7'OnClose'#7#9'FormClose'
10 +#8'OnCreate'#7#10'FormCreate'#9'OnKeyDown'#7#11'FormKeyDown'#7'OnKeyUp'#7#9
11 +'FormKeyUp'#11'OnMouseDown'#7#13'FormMouseDown'#8'OnResize'#7#10'FormResize'
12 +#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#7'1.8.4.0'#0#10'TStatusBa'
13 +'r'#9'StatusBar'#4'Left'#2#0#6'Height'#2'+'#3'Top'#3#21#1#5'Width'#3'>'#1#6
14 +'Panels'#14#1#4'Text'#6#6'Memory'#5'Width'#2'P'#0#1#4'Text'#6#7'Gameboy'#5'W'
15 +'idth'#3#145#0#0#1#4'Text'#6#7'Company'#5'Width'#2'2'#0#0#11'SimplePanel'#8#0
16 +#0#9'TMainMenu'#8'MainMenu'#4'left'#2'('#3'top'#2#8#0#9'TMenuItem'#5'File1'#7
17 +'Caption'#6#5'&File'#0#9'TMenuItem'#5'Load1'#7'Caption'#6#9'&Load ...'#7'OnC'
18 +'lick'#7#13'FileOpenClick'#0#0#9'TMenuItem'#2'N3'#7'Caption'#6#1'-'#10'Group'
19 +'Index'#2#2#0#0#9'TMenuItem'#8'Message1'#7'Caption'#6#12'&Message ...'#7'Ena'
20 +'bled'#8#10'GroupIndex'#2#2#0#0#9'TMenuItem'#2'N4'#7'Caption'#6#1'-'#10'Grou'
21 +'pIndex'#2#2#0#0#9'TMenuItem'#5'Exit1'#7'Caption'#6#5'E&xit'#10'GroupIndex'#2
22 +#2#7'OnClick'#7#10'Exit1Click'#0#0#0#9'TMenuItem'#4'CPU1'#7'Caption'#6#4'&CP'
23 +'U'#0#9'TMenuItem'#6'Reset2'#7'Caption'#6#7'&Reset '#7'OnClick'#7#10'ResetCl'
24 +'ick'#0#0#9'TMenuItem'#6'Pause1'#7'Caption'#6#6'&Pause'#7'OnClick'#7#5'Pause'
25 +#0#0#9'TMenuItem'#2'N2'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#8'LoadStat'#7'Cap'
26 +'tion'#6#10'&Load Stat'#10'GroupIndex'#2#2#7'OnClick'#7#13'LoadStatClick'#0#0
27 +#9'TMenuItem'#8'SaveStat'#7'Caption'#6#10'&Save Stat'#10'GroupIndex'#2#2#7'O'
28 +'nClick'#7#13'SaveStatClick'#0#0#9'TMenuItem'#2'N8'#7'Caption'#6#1'-'#10'Gro'
29 +'upIndex'#2#2#0#0#9'TMenuItem'#8'Debugger'#7'Caption'#6#9'&Debugger'#10'Grou'
30 +'pIndex'#2#2#7'OnClick'#7#13'DebuggerClick'#0#0#9'TMenuItem'#5'Dump1'#7'Capt'
31 +'ion'#6#5'&Dump'#7'Enabled'#8#10'GroupIndex'#2#2#0#9'TMenuItem'#10'MemoryMap'
32 +'1'#7'Caption'#6#10'&MemoryMap'#0#0#9'TMenuItem'#8'RamBank1'#7'Caption'#6#8
33 +'&RamBank'#0#0#9'TMenuItem'#8'ChrData1'#7'Caption'#6#9'&Chr Data'#0#0#9'TMen'
34 +'uItem'#2'N1'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#8'CGBVRAM1'#7'Caption'#6#9
35 +'CGB &VRAM'#0#0#9'TMenuItem'#8'CGBWRAM1'#7'Caption'#6#9'CGB &WRAM'#0#0#9'TMe'
36 +'nuItem'#8'CGBCRAM1'#7'Caption'#6#9'CGB &CRAM'#0#0#9'TMenuItem'#2'N9'#7'Capt'
37 +'ion'#6#1'-'#0#0#9'TMenuItem'#8'SGBVRAM1'#7'Caption'#6#9'SGB &VRAM'#0#0#9'TM'
38 +'enuItem'#12'sgbtiledata1'#7'Caption'#6#12'SGB Chr Data'#0#0#0#0#9'TMenuItem'
39 +#7'Option3'#7'Caption'#6#7'&Option'#0#9'TMenuItem'#8'AutoWait'#7'Caption'#6
40 +#10'Auto &Wait'#7'OnClick'#7#13'AutoWaitClick'#0#0#9'TMenuItem'#10'FrameSkip'
41 +'1'#7'Caption'#6#11'&Frame Skip'#0#9'TMenuItem'#3'N01'#7'Caption'#6#2'&0'#7
42 +'Checked'#9#10'GroupIndex'#2#16#7'OnClick'#7#10'FrameClick'#0#0#9'TMenuItem'
43 +#3'N11'#3'Tag'#2#1#7'Caption'#6#2'&1'#10'GroupIndex'#2#16#7'OnClick'#7#10'Fr'
44 +'ameClick'#0#0#9'TMenuItem'#3'N21'#3'Tag'#2#2#7'Caption'#6#2'&2'#10'GroupInd'
45 +'ex'#2#16#7'OnClick'#7#10'FrameClick'#0#0#9'TMenuItem'#3'N31'#3'Tag'#2#3#7'C'
46 +'aption'#6#2'&3'#10'GroupIndex'#2#16#7'OnClick'#7#10'FrameClick'#0#0#9'TMenu'
47 +'Item'#3'N41'#3'Tag'#2#4#7'Caption'#6#2'&4'#10'GroupIndex'#2#16#7'OnClick'#7
48 +#10'FrameClick'#0#0#9'TMenuItem'#3'N51'#3'Tag'#2#5#7'Caption'#6#2'&5'#10'Gro'
49 +'upIndex'#2#16#7'OnClick'#7#10'FrameClick'#0#0#0#9'TMenuItem'#8'Priority'#7
50 +'Caption'#6#9'&Priority'#0#9'TMenuItem'#9'priority1'#7'Caption'#6#4'Idle'#7
51 +'OnClick'#7#11'setPriority'#0#0#9'TMenuItem'#9'priority2'#3'Tag'#2#1#7'Capti'
52 +'on'#6#6'Normal'#7'OnClick'#7#11'setPriority'#0#0#9'TMenuItem'#9'priority3'#3
53 +'Tag'#2#2#7'Caption'#6#4'High'#7'OnClick'#7#11'setPriority'#0#0#9'TMenuItem'
54 +#3'N14'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#9'priority4'#3'Tag'#2#3#7'Caption'
55 +#6#8'RealTime'#7'OnClick'#7#11'setPriority'#0#0#0#9'TMenuItem'#3'N12'#7'Capt'
56 +'ion'#6#1'-'#0#0#9'TMenuItem'#6'Video1'#7'Caption'#6#6'&Video'#0#9'TMenuItem'
57 +#11'Outputmode1'#7'Caption'#6#7'&Output'#0#9'TMenuItem'#13'mnuDirectdraw'#7
58 +'Caption'#6#11'&Directdraw'#7'OnClick'#7#14'mnuOutputClick'#0#0#9'TMenuItem'
59 +#6'mnuDib'#7'Caption'#6#4'D&ib'#7'Checked'#9#7'OnClick'#7#14'mnuOutputClick'
60 +#0#0#0#9'TMenuItem'#2'N5'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#3'x11'#7'Captio'
61 +'n'#6#10'x&1 window'#10'GroupIndex'#2#2#7'OnClick'#7#13'setResolution'#0#0#9
62 +'TMenuItem'#3'x21'#3'Tag'#2#1#7'Caption'#6#3'x&2'#10'GroupIndex'#2#2#7'OnCli'
63 +'ck'#7#13'setResolution'#0#0#9'TMenuItem'#3'x31'#3'Tag'#2#2#7'Caption'#6#3'x'
64 +'&3'#10'GroupIndex'#2#2#7'OnClick'#7#13'setResolution'#0#0#9'TMenuItem'#3'x4'
65 +'1'#3'Tag'#2#3#7'Caption'#6#3'x&4'#10'GroupIndex'#2#2#7'OnClick'#7#13'setRes'
66 +'olution'#0#0#9'TMenuItem'#2'N7'#7'Caption'#6#1'-'#10'GroupIndex'#2#2#7'Visi'
67 +'ble'#8#0#0#9'TMenuItem'#5'full1'#3'Tag'#2'P'#7'Caption'#6#19'320x240 full s'
68 ,'creen'#10'GroupIndex'#2#2#7'Visible'#8#7'OnClick'#7#13'setResolution'#0#0#9
69 +'TMenuItem'#11'fullscreen1'#3'Tag'#2'Q'#7'Caption'#6#7'400x300'#10'GroupInde'
70 +'x'#2#2#7'Visible'#8#7'OnClick'#7#13'setResolution'#0#0#9'TMenuItem'#5'full2'
71 +#3'Tag'#2'R'#7'Caption'#6#7'512x384'#10'GroupIndex'#2#2#7'Visible'#8#7'OnCli'
72 +'ck'#7#13'setResolution'#0#0#9'TMenuItem'#5'full3'#3'Tag'#2'S'#7'Caption'#6#7
73 +'640x400'#10'GroupIndex'#2#2#7'Visible'#8#7'OnClick'#7#13'setResolution'#0#0
74 +#9'TMenuItem'#5'full4'#3'Tag'#2'T'#7'Caption'#6#7'640x480'#10'GroupIndex'#2#2
75 +#7'Visible'#8#7'OnClick'#7#13'setResolution'#0#0#0#9'TMenuItem'#6'Sound1'#7
76 +'Caption'#6#6'&Sound'#0#9'TMenuItem'#3'Off'#7'Caption'#6#4'&Off'#7'OnClick'#7
77 +#8'SetSound'#0#0#9'TMenuItem'#2'N6'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#3'Ch1'
78 +#7'Caption'#6#4'Ch&1'#7'Checked'#9#7'OnClick'#7#15'SetAudioChannel'#0#0#9'TM'
79 +'enuItem'#3'Ch2'#3'Tag'#2#1#7'Caption'#6#4'Ch&2'#7'Checked'#9#7'OnClick'#7#15
80 +'SetAudioChannel'#0#0#9'TMenuItem'#3'Ch3'#3'Tag'#2#2#7'Caption'#6#4'Ch&3'#7
81 +'Checked'#9#7'OnClick'#7#15'SetAudioChannel'#0#0#9'TMenuItem'#3'Ch4'#3'Tag'#2
82 +#3#7'Caption'#6#4'Ch&4'#7'Checked'#9#7'OnClick'#7#15'SetAudioChannel'#0#0#0#9
83 +'TMenuItem'#4'Net1'#7'Caption'#6#4'&Net'#7'Enabled'#8#0#0#9'TMenuItem'#3'N15'
84 +#7'Caption'#6#1'-'#0#0#9'TMenuItem'#9'SerialIF1'#7'Caption'#6#10'Serial I/F'
85 +#7'Enabled'#8#0#9'TMenuItem'#7'serial1'#7'Caption'#6#4'None'#0#0#9'TMenuItem'
86 +#7'serial2'#3'Tag'#2#1#7'Caption'#6#14'Pocket Printer'#0#0#9'TMenuItem'#7'se'
87 +'rial3'#3'Tag'#2#2#7'Caption'#6#11'Gameboy ...'#7'Visible'#8#0#0#0#9'TMenuIt'
88 +'em'#8'Palette1'#7'Caption'#6#8'&Palette'#7'Enabled'#8#0#9'TMenuItem'#8'pres'
89 +'et11'#7'Caption'#6#7'preset1'#7'Checked'#9#10'GroupIndex'#2#10#0#0#9'TMenuI'
90 +'tem'#8'preset21'#3'Tag'#2#1#7'Caption'#6#7'preset2'#10'GroupIndex'#2#10#0#0
91 +#9'TMenuItem'#8'preset31'#3'Tag'#2#2#7'Caption'#6#7'preset3'#10'GroupIndex'#2
92 +#10#0#0#9'TMenuItem'#8'preset41'#3'Tag'#2#3#7'Caption'#6#7'preset4'#10'Group'
93 +'Index'#2#10#0#0#9'TMenuItem'#8'preset51'#3'Tag'#2#4#7'Caption'#6#7'preset5'
94 +#10'GroupIndex'#2#10#0#0#0#9'TMenuItem'#3'N10'#7'Caption'#6#1'-'#0#0#9'TMenu'
95 +'Item'#8'Setting1'#7'Caption'#6#12'&Setting ...'#7'Enabled'#8#0#0#0#0#11'TOp'
96 +'enDialog'#10'OpenDialog'#0#0#11'TSaveDialog'#10'SaveDialog'#0#0#6'TTimer'#5
97 +'Timer'#7'Enabled'#8#8'Interval'#2#17#7'OnTimer'#7#10'TimerTimer'#4'left'#2
98 +'('#3'top'#2'('#0#0#0
99 ]);
ModifiedUnitMain.pas +3−3
@@ -17,7 +17,7 @@ uses
17 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 17 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
18 ddraw_out,dib_out,DirectDraw,vars,z80cpu, 18 ddraw_out,dib_out,DirectDraw,vars,z80cpu,
19 gfx,mainloop,machine, debugger,sound, 19 gfx,mainloop,machine, debugger,sound,
20 StdCtrls, ExtCtrls,ComCtrls, Menus, AgOpenDialog; 20 StdCtrls, ExtCtrls,ComCtrls, Menus;
21 21
22 22
23 type 23 type
@@ -96,9 +96,9 @@ type
96 N10: TMenuItem; 96 N10: TMenuItem;
97 Setting1: TMenuItem; 97 Setting1: TMenuItem;
98 StatusBar: TStatusBar; 98 StatusBar: TStatusBar;
99 OpenDialog: TAgOpenDialog; 99 OpenDialog: TOpenDialog;
100 Debugger: TMenuItem; 100 Debugger: TMenuItem;
101 SaveDialog: TAgSaveDialog; 101 SaveDialog: TSaveDialog;
102 Timer: TTimer; 102 Timer: TTimer;
103 N5: TMenuItem; 103 N5: TMenuItem;
104 Outputmode1: TMenuItem; 104 Outputmode1: TMenuItem;