|
@@ -1,126 +1,5 @@
|
1
|
1
|
#include <bpre.h>
|
2
|
2
|
|
3
|
|
-enum time_type {
|
4
|
|
- DAY,
|
5
|
|
- NIGHT,
|
6
|
|
- EVENING,
|
7
|
|
- MORNING
|
8
|
|
-};
|
9
|
|
-
|
10
|
|
-enum map_type {
|
11
|
|
- UNK_00,
|
12
|
|
- VILLAGE,
|
13
|
|
- CITY,
|
14
|
|
- ROUTE,
|
15
|
|
- CELLAR,
|
16
|
|
- UNDERWATER,
|
17
|
|
- UNK_07,
|
18
|
|
- UNK_08,
|
19
|
|
- INSIDE,
|
20
|
|
- SECRET_BASE
|
21
|
|
-};
|
22
|
|
-
|
23
|
|
-struct mapdata_header {
|
24
|
|
- u32 width;
|
25
|
|
- u32 height;
|
26
|
|
- void* border;
|
27
|
|
- void* data;
|
28
|
|
- struct blockset* blockset_one;
|
29
|
|
- struct blockset* blockset_two;
|
30
|
|
- u8 border_width;
|
31
|
|
- u8 border_height;
|
32
|
|
- u16 unknown;
|
33
|
|
-};
|
34
|
|
-
|
35
|
|
-struct mapheader {
|
36
|
|
- struct mapdata_header* data_header;
|
37
|
|
- void* events;
|
38
|
|
- void* scripts;
|
39
|
|
- void* connections;
|
40
|
|
- u16 music;
|
41
|
|
- u16 mapindex;
|
42
|
|
- u8 name;
|
43
|
|
- u8 cave;
|
44
|
|
- u8 weather;
|
45
|
|
- enum map_type maptype;
|
46
|
|
- u8 field18;
|
47
|
|
- u8 escape_rope;
|
48
|
|
- u8 showname;
|
49
|
|
- u8 battletype;
|
50
|
|
-};
|
51
|
|
-
|
52
|
|
-extern struct mapheader current_mapheader;
|
53
|
|
-
|
54
|
|
-struct color_shade {
|
55
|
|
- struct color color;
|
56
|
|
- u8 alpha;
|
57
|
|
-};
|
58
|
|
-
|
59
|
|
-struct npc_palette {
|
60
|
|
- struct color* palette;
|
61
|
|
- u16 tag;
|
62
|
|
- u16 fill;
|
63
|
|
-};
|
64
|
|
-
|
65
|
|
-struct pal_replace {
|
66
|
|
- void* blockset;
|
67
|
|
- u8 pal;
|
68
|
|
- u8 index;
|
69
|
|
- struct color color;
|
70
|
|
-};
|
71
|
|
-
|
72
|
|
-struct blockset {
|
73
|
|
- u8 is_compressed;
|
74
|
|
- u8 is_secondary;
|
75
|
|
- u16 padding;
|
76
|
|
- void* tiles;
|
77
|
|
- void* palette;
|
78
|
|
- void* block_tiles;
|
79
|
|
- void* funcptr;
|
80
|
|
- void* behavior;
|
81
|
|
-};
|
82
|
|
-
|
83
|
|
-struct dynamic_pal {
|
84
|
|
- u8 type;
|
85
|
|
- u8 count;
|
86
|
|
- u16 tag;
|
87
|
|
-};
|
88
|
|
-
|
89
|
|
-#define dynamic_palettes ((struct dynamic_pal*) 0x0203FF00)
|
90
|
|
-
|
91
|
|
-void blockset_load_virtual_palette_and_shade(struct blockset* blockset, u16 start, u16 len, struct color* destination);
|
92
|
|
-extern struct npc_palette* npc_palettes;
|
93
|
|
-extern volatile u8 tint_filter;
|
94
|
|
-void apply_shaders(u8 pal, u8 fade_copy, struct color* to_apply);
|
95
|
|
-struct color alpha_blend(struct color a, struct color b, u8 alpha);
|
96
|
|
-extern void blockset_load_palette_to_gpu(void* blockset, u16 start, u16 len);
|
97
|
|
-extern void gpu_pal_apply(struct color* src, u16 dst, u16 len);
|
98
|
|
-extern void load_palette_3(u16 start, u16 len);
|
99
|
|
-extern void tint_palette(u8 pal_slot);
|
100
|
|
-extern u8 gpu_pal_tags_index_of(u16 pal_tag);
|
101
|
|
-extern void lz77u_wram(void* src, void* dst);
|
102
|
|
-extern void* oe_read_word(void* oe_script_pointer);
|
103
|
|
-extern void some_weather_func(u8 pal_index);
|
104
|
|
-void copy_unfaded(u8 slot);
|
105
|
|
-void pal_patch_for_npc(u16 tag, u8 pal);
|
106
|
|
-u8 is_current_map_dn_valid(enum map_type current_type);
|
107
|
|
-//care, this has to be manually patched to be u16
|
108
|
|
-extern u16 npc_pal_idx_for_given_tag(u16 tag);
|
109
|
|
-struct color_shade get_color_from_time(enum time_type current_time);
|
110
|
|
-enum time_type get_time_of_day();
|
111
|
|
-void update_dns_palettes();
|
112
|
|
-void apply_lighting(void* blockset, u8 copy, struct color* to_apply);
|
113
|
|
-
|
114
|
|
-extern void mapdata_load_palettes_to_gpu(struct mapdata_header* data_header);
|
115
|
|
-extern u16 npc_paltag_by_palslot(u8 slot);
|
116
|
|
-
|
117
|
|
-extern void script_something();
|
118
|
|
-extern void camera_update();
|
119
|
|
-extern void foo_115798();
|
120
|
|
-extern void foo_5ae28();
|
121
|
|
-extern void foo_6ffbc();
|
122
|
|
-extern void tilemaps_sync();
|
123
|
|
-
|
124
|
3
|
enum time_type get_time_of_day() {
|
125
|
4
|
volatile u8* time_pointer = (u8*) (0x0203FAB1);
|
126
|
5
|
return *time_pointer;
|