mirror of
https://github.com/pret/pokeheartgold.git
synced 2026-04-05 00:26:06 -05:00
- all local vars to camelcase - header include guards with lib name - comments for preprocessor directives - asm defs back to respective .inc files - /lib/dsprot/tools/ merged to /tools/ - unprefixed globals prefixed - sdk defs consolidated to sdk include - lsf lib split to objects
41 lines
690 B
C
41 lines
690 B
C
#ifndef ENCODER_H
|
|
#define ENCODER_H
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "elf.h"
|
|
#include "instruction.h"
|
|
#include "rc4.h"
|
|
|
|
enum {
|
|
ENC_ENCODE,
|
|
ENC_DECODE,
|
|
ENC_INVALID
|
|
};
|
|
|
|
enum {
|
|
MODE_KEYED,
|
|
MODE_UNKEYED,
|
|
MODE_INVALID
|
|
};
|
|
|
|
typedef struct {
|
|
char **inputs;
|
|
char *output_fname;
|
|
int encoding_type;
|
|
int key_mode;
|
|
char **symbols;
|
|
char *wrapper_prefix;
|
|
char *replace_prefix;
|
|
char *garbage;
|
|
uint32_t key;
|
|
int verbose;
|
|
} EncodingTask;
|
|
|
|
void Encode_Instruction(Instruction *ins, RC4_Ctx *rc4);
|
|
void Encode_Relocation(Elf32_Rela *reloc);
|
|
void Decode_Instruction(Instruction *ins, RC4_Ctx *rc4);
|
|
void Decode_Relocation(Elf32_Rela *reloc);
|
|
|
|
#endif
|