forked from KernelEquinox/8F-Helper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
defines.h
47 lines (41 loc) · 845 Bytes
/
defines.h
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
#ifndef DEFINES_H
#define DEFINES_H
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
typedef struct {
unsigned int address;
char* name;
} Label;
typedef struct {
char* code;
int size;
int line;
int jmp_num;
Label* label;
} ASM_code;
typedef struct {
char* code;
int size;
} HEX_code;
typedef struct {
HEX_code hex;
HEX_code hex_nop;
ASM_code asm_code;
int offset;
int cur_offset;
} dataSet;
dataSet generate_code(char*, int, char*);
void ascii2hex(char *str, int len);
void hex_to_joy(char*);
void hex_to_nick(char*);
void hex_to_item(char*);
// ANSI color codes
#define RED "\x1b[1;31m"
#define GREEN "\x1b[1;32m"
#define YELLOW "\x1b[1;33m"
#define BLUE "\x1b[1;34m"
#define MAGENTA "\x1b[1;35m"
#define CYAN "\x1b[1;36m"
#define BLACK "\x1b[0m"
#endif