| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
. |
| 6 |
|
| 7 |
|
| 8 |
#include "debug.h" |
| 9 |
|
| 10 |
void list_action_addresses(FILE *ptr) |
| 11 |
{ |
| 12 |
int offset = 0x8110 - 0x3fe5; |
| 13 |
int low_byte, high_byte; |
| 14 |
fseek(ptr, offset, SEEK_SET); |
| 15 |
for (int i = 52; i < 102; i++) { |
| 16 |
low_byte = fgetc(ptr); |
| 17 |
high_byte = fgetc(ptr); |
| 18 |
fprintf(stderr, "Address of action %d: %x\n", i, |
| 19 |
low_byte + 256 * high_byte); |
| 20 |
} |
| 21 |
} |
| 22 |
|
| 23 |
void list_condition_addresses(FILE *ptr) |
| 24 |
{ |
| 25 |
int offset = 0x33A0 - 34; |
| 26 |
int low_byte, high_byte; |
| 27 |
fseek(ptr, offset, SEEK_SET); |
| 28 |
for (int i = 0; i < 20; i++) { |
| 29 |
low_byte = fgetc(ptr); |
| 30 |
high_byte = fgetc(ptr); |
| 31 |
fprintf(stderr, "Address of condition %d: %x\n", i, |
| 32 |
low_byte + 256 * high_byte); |
| 33 |
} |
| 34 |
} |