source: OniTrainer/current/Unit11.pas@ 445

Last change on this file since 445 was 251, checked in by alloc, 17 years ago
File size: 1.3 KB
RevLine 
[251]1UNIT Unit11;
2
3INTERFACE
4
5USES
6 Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
7 Dialogs, StdCtrls, ExtCtrls;
8
9TYPE
10 TForm11 = Class(TForm)
11 edit_address: TEdit;
12 timer_check_value: TTimer;
13 Label1: TLabel;
14 Label2: TLabel;
15 Label3: TLabel;
16 PROCEDURE timer_check_valueTimer(Sender: TObject);
17 PROCEDURE FormCloseQuery(Sender: TObject; var CanClose: Boolean);
18 PRIVATE
19 PUBLIC
20 END;
21
22VAR
23 Form11: TForm11;
24
25CONST
26 address_script_var_pointer:LongWord=$10EC0;
27
28IMPLEMENTATION
29
30{$R *.dfm}
31
32USES Unit1,Unit2,Unit3,Unit5,Unit6,Unit7,Unit8,Unit9,Unit10;
33
34PROCEDURE TForm11.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
35 BEGIN
36 Self.Visible:=False;
37 CanClose:=False;
38 Form1.Menu_Patch_Scriptvars.Checked:=False;
39 END;
40
41FUNCTION patch_scriptvars_loaded:Boolean;
42 CONST check_for:LongWord=$0B395BE9;
43 address_at:LongWord=$479470;
44 BEGIN
45 IF Decode_Int(ReadMem(address_at,4))=check_for THEN result:=True
46 ELSE result:=False;
47 END;
48
49PROCEDURE TForm11.timer_check_valueTimer(Sender: TObject);
50 BEGIN
51 IF _connected AND patch_scriptvars_loaded THEN BEGIN
52 edit_address.Text:=IntToHex(Decode_Int(ReadMem(address_script_var_pointer,4)),8);
53 END;
54 END;
55
56END.
Note: See TracBrowser for help on using the repository browser.