-
Notifications
You must be signed in to change notification settings - Fork 8
/
plhud.txt
170 lines (149 loc) · 3.27 KB
/
plhud.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
{$CLEO}
{$NOSOURCE}
03A4: name_thread 'PLHUD01'
// >>>>>>> compability checks
0A8D: 0@ = read_memory 0x58EBAF size 1 vp 0
0039: 0@ == 0xE8 // l==i (int) // sprintf call
004D: jump_if_false @INCOMPATIBLE
0A8D: 0@ = read_memory 0x58EAF6 size 4 vp 0
0039: 0@ == 0x7405B60F // l==i (int) // drawhud rewritten part
004D: jump_if_false @INCOMPATIBLE
// <<<<<<< compability checks
0002: jump @HOOKER
:NOMOREHOOKER
const
OPTIONS = 0@
_OPTIONS = 1@
AUTOHIDETIME = 2550
end
0006: OPTIONS = 0 // l=i (int)
0AC6: _OPTIONS = label @_OPTIONS offset
0006: 9@ = 0x0 // l=i (int) // hold keypress state
0006: 10@ = 0x79 // l=i (int) // F10
0006: 11@ = 0x27 // l=i (int) // right
0006: 12@ = 0x28 // l=i (int) // down
0006: 13@ = 0x26 // l=i (int) // up
0006: 14@ = 0x25 // l=i (int) // left
:MAIN_LOOP
0001: wait 0
// >>>>>>> keys
0006: 30@ = 0 // l=i (int)
0002: jump @KEYS_LOOP_START
:KEYS_LOOP
08C3: clear 9@ bit 30@
000A: 30@ += 1 // l+=i (int)
001B: 5 > 30@ // i>l (int)
004D: jump_if_false @KEYS_LOOP_END
:KEYS_LOOP_START
0AB0: key_pressed 10@(30@,1i)
004D: jump_if_false @KEYS_LOOP
88B7: not test 9@ bit 30@
004D: jump_if_false @KEYS_LOOP_END
0006: 33@ = 0x0 // l=i (int)
08BD: set 9@ bit 30@
000A: 30@ += 2 // l+=i (int)
0A8D: OPTIONS = read_memory _OPTIONS size 4 vp 0
08BD: set OPTIONS bit 30@
0A8C: write_memory _OPTIONS size 4 value OPTIONS vp 0
:KEYS_LOOP_END
// <<<<<<< keys
// >>>>>>> autohide
0019: 33@ > AUTOHIDETIME // l>i (int)
004D: jump_if_false @MAIN_LOOP
0A8D: OPTIONS = read_memory _OPTIONS size 4 vp 0
08C3: clear OPTIONS bit 7
0A8C: write_memory _OPTIONS size 4 value OPTIONS vp 0
// <<<<<<< autohide
0002: jump @MAIN_LOOP
:INCOMPATIBLE
0001: wait 5000
00BA: show_text_styled GXT 'RATNG23' time 2000 style 6 // Playa
0002: jump @INCOMPATIBLE
{$INCLUDE plhud-asm.txt}
:_MENUTEXT
:DATA01
{
stores menu text to show
when changing, change the offsets in
asm !!MENUOFFSET define section
}
hex
"USE THE UP AND DOWN ARROW KEYS" "~n~"
"TO BROWSE THIS MENU. _USE THE" "~n~"
"LEFT AND RIGHT ARROW KEYS TO" "~n~"
"CHANGE VALUES OR ACCEPT." "~n~"
"~n~"
"> CONTINUE_____________" "~n~"
" _SMART MODE: ~g~ON_~w~" "~n~"
" _VIEW DISTANCE: _1500M" "~n~"
" _COLOR: PINK__________" "~n~"
"~n~"
"v32 ___ runways" "~n~"
"________________"
00
end
:_OPTIONS
:DATA02
{
stores options, states, stuffs
bit 9: result of [redacted]
bit 8: do runonce
bit 7: show menu?
bit 6: left arrow pressed?
bit 5: up arrow pressed?
bit 4: down arrow pressed?
bit 3: right arrow pressed?
bit 2: F10 pressed?
bit 1: smart mode?
bit 0: is active?
key states reset by asm
}
hex
02 01 00 00
end
:_MENUIDX
:DATA03
{
currently selected menu idx
}
hex
00 00 00 00
end
:_VIEWDISTANCE
:DATA04
{
view distance for the esp
}
hex
DC 05 00 00
end
:_SPRINTF
:DATA05
{
ptr to _sprintf proc
}
hex
00 00 00 00
end
:_RUNWAYS
:DATA06
{
runways
}
{$INCLUDE ../plhudairports.txt}
:_ESPCOLR
:DATA07
{
esp color (ARGB, so BGRA)
}
hex
FF 48 FF 55
end
:_LASTRDR
:DATA08
{
last runway used for radar
}
hex
00 00 00 00
end