-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug_ship.idc
More file actions
43 lines (37 loc) · 1.01 KB
/
debug_ship.idc
File metadata and controls
43 lines (37 loc) · 1.01 KB
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
#include <idc.idc>
#include "lib/lib.idc"
static main() {}
static debug_ship(index) {
// suspend_process?
auto ship = get_ship_by_index(index);
auto str = ship.to_string() + "\n";
// Artillery
auto i;
for (i = 0; i < 24; i++) {
str = sprintf("%s %02x", str, ship.get_weapon(i));
if (i == 11 || i == 23) {
str = str + "\n";
}
}
for (i = 0; i < 24;) {
auto w1 = ship_weapon_str(ship.get_weapon(i));
auto w2 = ship_weapon_str(ship.get_weapon(i+1));
str = str + w1 + w2;
i = i + 4;
}
str = str + "\n";
for (i = 2; i < 24;) {
w1 = ship_weapon_str(ship.get_weapon(i));
w2 = ship_weapon_str(ship.get_weapon(i+1));
str = str + w1 + w2;
i = i + 4;
}
str = str + "\n";
// Captain
auto captain = ship.get_captain();
if (captain) {
str = str + captain.to_string() + "\n";
}
str = str + "\n\n";
Message(str);
}