Ticket #9092: descumm-tool.diff

File descumm-tool.diff, 1.1 KB (added by SF/jestar_jokin, 11 years ago)
Line 
182c82,84
2< int offset = g_options.GF_UNBLOCKED ? 17 : 19;
3---
4> byte nameOffset;
5> byte *start = p;
6> int offset = g_options.GF_UNBLOCKED ? 4 : 6;
785a88,128
8> // Output verb metadata
9> printf("#object-data [");
10> printf("id %d, ", READ_LE_UINT16(p));
11> p += 2;
12> printf("unknown %d, ", *p);
13> p++;
14> printf("x-pos %d, ", *p);
15> p++;
16> printf("y-pos %d, ", *p & 0x7F);
17> printf("parent-state %d, ", *p & 0x80);
18> p++;
19> printf("width %d, ", *p);
20> p++;
21> printf("parent %d, ", *p);
22> p++;
23> printf("walk-x %d, ", READ_LE_UINT16(p));
24> p += 2;
25> printf("walk-y %d, ", READ_LE_UINT16(p));
26> p += 2;
27> printf("height %d, ", *p & 0xF8);
28> printf("actor-dir %d, ", *p & 0x07);
29> p++;
30> nameOffset = *p;
31> p = start + nameOffset; // skip to name offset
32> printf("name \"");
33> while (*p != 0) {
34> if (*p > 31 && *p < 128) {
35> printf("%c", *p);
36> // backslashes represent escape char, need to unescape
37> if (*p == '\\') {
38> printf("%c", *p);
39> }
40> } else {
41> printf("\\x%.2X", *p);
42> }
43> p++;
44> }
45> printf("\"]\n");
46> offset = g_options.GF_UNBLOCKED ? 17 : 19;
47> p = start + offset; // jump back to event table location
48>