ソースを参照

Merge remote-tracking branch 'refs/remotes/origin/master'

Michael Panzlaff 6 年 前
コミット
a6e6015101

+ 3
- 0
base/readme_base.md ファイルの表示

@@ -0,0 +1,3 @@
1
+# Base
2
+
3
+add a `firered(u)` version 1.0 rom named `bpre0.gba` in this folder in order for the build to work.

+ 0
- 3
base/readme_base.txt ファイルの表示

@@ -1,3 +0,0 @@
1
-###README_BASE###
2
-
3
-add a firered(u) version 1.0 rom named "bpre0.gba" in this folder in order for the build to work.

+ 1
- 1
g3headers

@@ -1 +1 @@
1
-Subproject commit 62f31b413bc364b5616d2240e0a4cbb050902f31
1
+Subproject commit 96f9db527ac23ab26be5614c2aeda2b1e3e5c7ab

+ 3
- 3
icons.makefile ファイルの表示

@@ -17,13 +17,13 @@ clean:
17 17
 	@echo -e "TRYING TO CLEAN ICONS FROM WRONG MAKEFILE"
18 18
 
19 19
 #$(ICON_AR): $(OBJ_FILES)
20
-#	@echo -e "\e[1;32mCreating archive $@\e[0m"
20
+#	@echo "\033[1;32mCreating archive $@\033[0m"
21 21
 #	$(AR) rcs $@ $^
22 22
 
23 23
 #$(GFX_BUILD_DIR)/icons/%.o: $(GFX_BUILD_DIR)/icons/%.s
24
-#	@echo -e "\e[32mAssembling $<\e[0m"
24
+#	@echo "\033[32mAssembling $<\033[0m"
25 25
 #	$(AS) -o $@ $<
26 26
 
27 27
 #$(GFX_BUILD_DIR)/icons/%.s: $(I_ASSET_ROOT)/pkmn_icons/%.png
28
-#	@echo -e "\e[34mProcessing image $<\e[0m"
28
+#	@echo  "\033[34mProcessing image $<\033[0m"
29 29
 #	$(GRIT) $< -fts -fh! -g -gB 4 -gt -gz! -m! -p! -s icon_$(notdir $(basename $<)) -o $@

+ 21
- 21
makefile ファイルの表示

@@ -1,7 +1,7 @@
1 1
 AS      := @arm-none-eabi-as
2 2
 LD      := @arm-none-eabi-ld
3 3
 OBJCOPY := @arm-none-eabi-objcopy
4
-GRIT    := grit
4
+GRIT    := @grit
5 5
 CC      := @arm-none-eabi-gcc
6 6
 ARS     := @armips
7 7
 MAKE    := make
@@ -30,7 +30,7 @@ CHARMAP := charmap.txt
30 30
 
31 31
 DEFINES   := -DBPRE -DSOFTWARE_VERSION=0 -DLAN_DE
32 32
 ASFLAGS   := -mthumb
33
-CFLAGS    := -mthumb -mthumb-interwork -g -mcpu=arm7tdmi -fdiagnostics-show-option -mlong-calls -march=armv4t -Og -std=c11 -Wall -Wextra -Wunreachable-code -I$(PAGB_INCLUDE) -Isrc/include -Igenerated_image -fdiagnostics-color=always $(DEFINES)
33
+CFLAGS    := -mthumb -mthumb-interwork -g -mcpu=arm7tdmi -fdiagnostics-show-option -mlong-calls -march=armv4t -Og -std=c11 -Werror -Wall -Wextra -Wunreachable-code -I$(PAGB_INCLUDE) -Isrc/include -Igenerated_image -fdiagnostics-color=always $(DEFINES)
34 34
 GRITFLAGS := -ftc -fa
35 35
 LDFLAGS   := -z muldefs
36 36
 BLDPATH   := object
@@ -95,40 +95,40 @@ SCRIPT_OBJ	:= $(SCRIPT_SRC:%.s=$(BLDPATH)/%.o)
95 95
 ALL_OBJ     := $(GEN_OBJ) $(C_OBJ) $(ASM_OBJ) $(DATA_OBJ) $(STRING_OBJ) $(SCRIPT_OBJ) $(MAP_PROJ_O) $(MAP_FILES_O) $(TS_FILES_O) $(TS_GEN_O)
96 96
 
97 97
 $(MAPMAPS)/%.s: $(MAPMAPS)/%.pmh
98
-	@echo -e "\e[96mGenerating map $<\e[0m"
98
+	@echo "\033[96mGenerating map $<\033[0m"
99 99
 	$(PYMAPS) -o $@ $<
100 100
 
101 101
 $(MAPTS)/%.s: $(MAPTS)/%.pts
102
-	@echo -e "\e[94mGenerating tileset $<\e[0m"
102
+	@echo "\033[94mGenerating tileset $<\033[0m"
103 103
 	$(PYSETS) -o $@ $<
104 104
 
105 105
 $(STRINGDIR)/%.s: $(STRINGDIR)/%.txt
106
-	@echo -e "\e[93mGenerating strings $<\e[0m"
106
+	@echo "\033[93mGenerating strings $<\033[0m"
107 107
 	$(STRAGB) -o $@ -i $< -t string/table.tbl -e 0xFF
108 108
 
109 109
 $(BLDPATH)/%.o: %.c $(ASSETS) $(PAGB_INCLUDE)/pokeagb/pokeagb.h
110
-	@echo -e "\e[32mCompiling $<\e[0m"		
110
+	@echo "\033[32mCompiling $<\033[0m"		
111 111
 	$(shell mkdir -p $(dir $@))		
112 112
 	$(CC) $(CFLAGS) -c $< -o $@		
113 113
 		
114 114
 $(BLDPATH)/%.o: %.s $(PAGB_INCLUDE)/pokeagb/pokeagb.h
115
-	@echo -e "\e[32mAssembling $<\e[0m"		
115
+	@echo "\033[32mAssembling $<\033[0m"		
116 116
 	$(shell mkdir -p $(dir $@))		
117 117
 	$(PREPROC) $< $(CHARMAP) > $*.i		
118 118
 	$(CC) $(CFLAGS) -c -x assembler-with-cpp $*.i -o $@		
119 119
 	@rm -f $*.i
120 120
 
121 121
 $(MAPTS)/%.s: $(MAPTS)/%.png
122
-	@echo -e "\e[34mProcessing image (tileset) $<\e[0m"
122
+	@echo "\033[34mProcessing image (tileset) $<\033[0m"
123 123
 	$(GRIT) $< -o $@ -fts -gzl -pz! -pu16 -gB4 -m! -mR!
124 124
 
125 125
 generated_image/%.c generated_image/%.h: $(AUTO_ASSET_ROOT)/%.png $(AUTO_ASSET_ROOT)/%.grit
126
-	@echo -e "\e[34mProcessing image $<\e[0m"
126
+	@echo "\033[34mProcessing image $<\033[0m"
127 127
 	$(shell mkdir -p $(dir $@))
128 128
 	$(GRIT) $< -o $@ -ftc -ff $(<:%.png=%.grit)
129 129
 
130 130
 generated_image/%.c generated_image/%.h: $(AUTO_ASSET_ROOT)/%.png
131
-	@echo -e "\e[34mProcessing image $< (using directory grit file)\e[0m"
131
+	@echo "\033[34mProcessing image $< (using directory grit file)\033[0m"
132 132
 	$(shell mkdir -p $(dir $@))
133 133
 	$(GRIT) $< -o $@ -ftc -ff $(<D)/$(notdir $(<D)).grit
134 134
 
@@ -136,7 +136,7 @@ all: $(GEN_H) rom
136 136
 
137 137
 .PHONY: rom
138 138
 rom: main.asm $(MAIN_OBJ)
139
-	@echo -e "\e[1;32mCreating ROM\e[0m"
139
+	@echo "\033[1;32mCreating ROM\033[0m"
140 140
 	$(ARS) $<
141 141
 	$(NM) $(BLDPATH)/linked.o -n -g --defined-only | \
142 142
 		sed -e '{s/^/0x/g};{/.*\sA\s.*/d};{s/\sT\s/ /g}' > $(OUTPATH)/__symbols.sym
@@ -145,7 +145,7 @@ rom: main.asm $(MAIN_OBJ)
145 145
 	
146 146
 $(MAIN_OBJ): $(ALL_OBJ) $(SPRITES) $(MUSIC_AR) $(SMPL_AR) $(VOICE_AR) $(LIST_AR) $(CRY_AR) #$(B_ENGINE)
147 147
 	$(MAKE) -f assets.makefile
148
-	@echo -e "\e[1;32mLinking ELF binary $@\e[0m"
148
+	@echo "\033[1;32mLinking ELF binary $@\033[0m"
149 149
 	@echo "INPUT($^)" > $(TMP_LD)
150 150
 	$(LD) $(LDFLAGS) -T $(PAGB_LINK) -T linker.ld -T bpre.sym --whole-archive -r -o $@ --start-group -T $(TMP_LD) --end-group
151 151
 	$(LD) $(LDFLAGS) -T $(PAGB_LINK) -T linker.ld -T bpre.sym --whole-archive -o $@.dbg --start-group -T $(TMP_LD) --end-group
@@ -153,7 +153,7 @@ $(MAIN_OBJ): $(ALL_OBJ) $(SPRITES) $(MUSIC_AR) $(SMPL_AR) $(VOICE_AR) $(LIST_AR)
153 153
 	@rm -f $(TMP_LD)
154 154
 
155 155
 $(MAP_PROJ_S): $(MAP_PROJ)
156
-	@echo -e "\e[91mGenerating map project $<\e[0m"
156
+	@echo "\033[91mGenerating map project $<\033[0m"
157 157
 	$(PYPROJS) -b sovereign_banks -f sovereign_footer -o $@ $<
158 158
 
159 159
 .PHONY: $(B_ENGINE)
@@ -191,42 +191,42 @@ clean:
191 191
 
192 192
 .PHONY: $(ASSETS)
193 193
 $(ASSETS):
194
-	@echo -e "\e[95mMaking Assets\e[0m"
194
+	@echo "\033[95mMaking Assets\033[0m"
195 195
 	$(MAKE) -f assets.makefile
196 196
 
197 197
 .PHONY: $(SPRITES)
198 198
 $(SPRITES):
199
-	@echo -e "\e[95mMaking Sprites\e[0m"
199
+	@echo "\033[95mMaking Sprites\033[0m"
200 200
 	$(MAKE) -f sprites.makefile
201 201
 
202 202
 .PHONY: $(ICONS_AR)
203 203
 $(ICONS_AR):
204
-	@echo -e "\e[95mMaking Icons\e[0m"
204
+	@echo "\033[95mMaking Icons\033[0m"
205 205
 	$(MAKE) -f icons.makefile
206 206
 
207 207
 .PHONY: $(MUSIC_AR)
208 208
 $(MUSIC_AR):
209
-	@echo -e "\e[95mMaking Music\e[0m"
209
+	@echo "\033[95mMaking Music\033[0m"
210 210
 	$(MAKE) -C $(dir $@) all
211 211
 
212 212
 .PHONY: $(SMPL_AR)
213 213
 $(SMPL_AR):
214
-	@echo -e "\e[95mMaking Sampler\e[0m"
214
+	@echo "\033[95mMaking Sampler\033[0m"
215 215
 	$(MAKE) -C $(dir $@) all
216 216
 
217 217
 .PHONY: $(VOICE_AR)
218 218
 $(VOICE_AR):
219
-	@echo -e "\e[95mMaking Voice\e[0m"
219
+	@echo "\033[95mMaking Voice\033[0m"
220 220
 	$(MAKE) -C $(dir $@) all
221 221
 
222 222
 .PHONY: $(LIST_AR)
223 223
 $(LIST_AR):
224
-	@echo -e "\e[95mMaking Songlist\e[0m"
224
+	@echo "\033[95mMaking Songlist\033[0m"
225 225
 	$(MAKE) -C $(dir $@) all
226 226
 
227 227
 .PHONY: $(CRY_AR)
228 228
 $(CRY_AR):
229
-	@echo -e "\e[95mMaking Cries\e[0m"
229
+	@echo "\033[95mMaking Cries\033[0m"
230 230
 	$(MAKE) -C $(dir $@) all
231 231
 
232 232
 .PHONY: constants

+ 2
- 2
patches/game_engine/quick_hacks.asm ファイルの表示

@@ -1,8 +1,8 @@
1 1
 EGG_HATCH_LEVEL EQU 1
2 2
 EV_CAP EQU 252
3 3
 
4
-PLAYER_S_X EQU 0x40
5
-PLAYER_S_Y EQU 0x10
4
+PLAYER_S_X EQU 0x42
5
+PLAYER_S_Y EQU 0x14
6 6
 
7 7
 PLAYER_S_B EQU 0x0
8 8
 PLAYER_S_M EQU 0x0

+ 1
- 1
sots-private

@@ -1 +1 @@
1
-Subproject commit 397965069d35a0c0b96de7488e254080af911cbd
1
+Subproject commit d78db20338af087422889fc23d0ad91207e26b62

+ 17
- 17
sprites.makefile ファイルの表示

@@ -52,46 +52,46 @@ clean:
52 52
 
53 53
 
54 54
 $(SPRITES_BINARY): $(OW_OBJ) $(TS_OBJ) $(ITEM_OBJ)
55
-	@echo -e "\e[1;32mLinking $@\e[0m"
55
+	@echo "\033[1;32mLinking $@\033[0m"
56 56
 	@echo "INPUT($^)" > $(TMP_LD)
57 57
 	$(LD) -r -o $@ -T $(TMP_LD)
58 58
 
59 59
 # Item Targets
60 60
 $(GFX_BUILD_DIR)/item/%.o: $(GFX_BUILD_DIR)/item/%.s
61
-	@echo -e "\e[32mAssembling $<\e[0m"
61
+	@echo "\033[32mAssembling $<\033[0m"
62 62
 	$(AS) -o $@ $<
63 63
 
64 64
 .PRECIOUS: $(GFX_BUILD_DIR)/item/%.s
65 65
 $(GFX_BUILD_DIR)/item/%.s: $(ASSET_ROOT)/item_icons/%.png
66
-	@echo -e "\e[34mProcessing image $<\e[0m"
66
+	@echo "\033[34mProcessing image $<\033[0m"
67 67
 	$(GRIT) $< -fts -fh! -gt -gB4 -gzl -p -pzl -m! -pu16 -o $@
68 68
 
69 69
 # OW Targets
70 70
 $(GFX_BUILD_DIR)/overworlds/%.o: $(GFX_BUILD_DIR)/overworlds/%.s
71
-	@echo -e "\e[32mAssembling $<\e[0m"
71
+	@echo "\033[32mAssembling $<\033[0m"
72 72
 	$(AS) -o $@ $<
73 73
 
74 74
 .PRECIOUS: $(GFX_BUILD_DIR)/overworlds/%.s
75 75
 $(GFX_BUILD_DIR)/overworlds/%.s: $(ASSET_ROOT)/overworld/%.png
76
-	@echo -e "\e[34mProcessing image $<\e[0m"
76
+	@echo "\033[34mProcessing image $<\033[0m"
77 77
 	$(GRIT) $< -fts -fh! -gt -gB4 -gz! -p -pz! -m! -pu16 -o $@
78 78
 
79 79
 # Trainer Sprite Targets
80 80
 $(GFX_BUILD_DIR)/trainer_sprites/%.o: $(GFX_BUILD_DIR)/trainer_sprites/%.s
81
-	@echo -e "\e[32mAssembling $<\e[0m"
81
+	@echo "\033[32mAssembling $<\033[0m"
82 82
 	$(AS) -o $@ $<
83 83
 
84 84
 $(GFX_BUILD_DIR)/trainer_sprites/%.s: $(ASSET_ROOT)/trainer_sprites/%.png
85
-	@echo -e "\e[34mProcessing image $<\e[0m"
85
+	@echo "\033[34mProcessing image $<\033[0m"
86 86
 	$(GRIT) $< -fts -fh! -gt -gB4 -gzl -p -pzl -m! -o $@
87 87
 
88 88
 # Normal Palette Targets
89 89
 $(GFX_BUILD_DIR)/sprites/normal_pal/%.o: $(GFX_BUILD_DIR)/sprites/normal_pal/%.s
90
-	@echo -e "\e[32mAssembling $<\e[0m"
90
+	@echo "\033[32mAssembling $<\033[0m"
91 91
 	$(AS) -o $@ $<
92 92
 
93 93
 $(GFX_BUILD_DIR)/sprites/normal_pal/%.s: $(ASSET_ROOT)/pkmn_sprites/%.png
94
-	@echo -e "\e[34mProcessing palette $< (normal)\e[0m"
94
+	@echo "\033[34mProcessing palette $< (normal)\033[0m"
95 95
 	$(GRIT) $< -fts -fh! -g! -gB 4 -gt -m! -p -pzl -pu16 -pn 16 \
96 96
 		-s $(shell echo $(notdir $(basename $<)) | sed "s/normal_/n_p_/g") \
97 97
 		-o $@
@@ -135,41 +135,41 @@ $(GFX_BUILD_DIR)/sprites/normal_pal/%.s: $(ASSET_ROOT)/pkmn_sprites/%.png
135 135
 
136 136
 # Misc hardcoded targets
137 137
 $(NORMAL_CASTFORM_PAL_OBJ): $(NORMAL_CASTFORM_PAL_OBJ:.o=.s)
138
-	@echo -e "\e[32mAssembling $<\e[0m"
138
+	@echo "\033[32mAssembling $<\033[0m"
139 139
 	$(AS) -o $@ $<
140 140
 
141 141
 $(NORMAL_CASTFORM_PAL_OBJ:.o=.s): $(CASTFORM_PNG)
142
-	@echo -e "\e[34mProcessing palette $< (normal)\e[0m"
142
+	@echo "\033[34mProcessing palette $< (normal)\033[0m"
143 143
 	$(GRIT) $< -fts -fh! -g! -gB 4 -gt -m! -p -pzl -pu16 -pn 64 \
144 144
 		-s n_p_0385 -o $@
145 145
 
146 146
 
147 147
 $(SHINY_CASTFORM_PAL_OBJ): $(SHINY_CASTFORM_PAL_OBJ:.o=.s)
148
-	@echo -e "\e[32mAssembling $<\e[0m"
148
+	@echo "\033[32mAssembling $<\033[0m"
149 149
 	$(AS) -o $@ $<
150 150
 
151 151
 $(SHINY_CASTFORM_PAL_OBJ:.o=.s): $(CASTFORM_PNG)
152
-	@echo -e "\e[34mProcessing palette $< (shiny)\e[0m"
152
+	@echo "\033[34mProcessing palette $< (shiny)\033[0m"
153 153
 	$(GRIT) $< -fts -fh! -g! -gB 4 -gt -m! -p -pzl -pu16 -pn 64 \
154 154
 		-s s_p_0385 -o $@
155 155
 
156 156
 
157 157
 $(CASTFORM_FRONT_OBJ): $(CASTFORM_FRONT_OBJ:.o=.s)
158
-	@echo -e "\e[32mAssembling $<\e[0m"
158
+	@echo "\033[32mAssembling $<\033[0m"
159 159
 	$(AS) -o $@ $<
160 160
 
161 161
 $(CASTFORM_FRONT_OBJ:.o=.s): $(CASTFORM_PNG)
162
-	@echo -e "\e[34mProcessing sprite $< (front)\e[0m"
162
+	@echo "\033[34mProcessing sprite $< (front)\033[0m"
163 163
 	$(GRIT) $< -fts -fh! -g -gB 4 -gt -gzl -al 0 -aw 256 -ah 64 -m! -p! \
164 164
 		-s front_0385 -o $@
165 165
 
166 166
 
167 167
 $(CASTFORM_BACK_OBJ): $(CASTFORM_BACK_OBJ:.o=.s)
168
-	@echo -e "\e[32mAssembling $<\e[0m"
168
+	@echo "\033[32mAssembling $<\033[0m"
169 169
 	$(AS) -o $@ $<
170 170
 
171 171
 $(CASTFORM_BACK_OBJ:.o=.s): $(CASTFORM_PNG)
172
-	@echo -e "\e[34mProcessing sprite $< (back)\e[0m"
172
+	@echo "\033[34mProcessing sprite $< (back)\033[0m"
173 173
 	$(GRIT) $< -fts -fh! -g -gB 4 -gt -gzl -al 0 -aw 256 -at 64 -ah 64 -m! -p! \
174 174
 		-s back_0385 -o $@
175 175
 

+ 6
- 0
src/battle_engine/battle_help.c ファイルの表示

@@ -68,6 +68,9 @@ u8 type_effectiveness_table[TYPE_FAIRY - 0x4][TYPE_FAIRY - 0x4] = {
68 68
 /* === IMPLEMENTATIONS === */
69 69
 u16 battle_damage_type_effectiveness_update(u8 attacking_type, u8 defending_type, u8 atk_bank, u8 def_bank,
70 70
                                             u16 chained_effect, u8 airstatus) {
71
+
72
+    (void)airstatus; //TODO
73
+
71 74
     u8 effect, atype = attacking_type, dtype = defending_type;
72 75
     if (!chained_effect || atype == TYPE_EGG || dtype == TYPE_EGG)
73 76
         return chained_effect;
@@ -124,6 +127,9 @@ u16 battle_apply_type_effectiveness(u16 chained_effect, u8 move_type, u8 target_
124 127
 
125 128
 u16 battle_type_effectiveness_calc(u16 move, u8 move_type, u8 atk_bank, u8 def_bank,
126 129
                                    u8 effects_handling_and_recording) {
130
+    (void)move;
131
+    (void)effects_handling_and_recording;
132
+    
127 133
     u16 chained_effect = 64;
128 134
     // TODO: double_type moves
129 135
     // TODO: get air status

+ 2
- 0
src/evolution/evolution_methods.c ファイルの表示

@@ -375,12 +375,14 @@ struct evo_result evolve_by_move_type(struct evo_call_arguments arguments)
375 375
 
376 376
 struct evo_result evolve_no_method(struct evo_call_arguments arguments)
377 377
 {
378
+    (void)arguments;
378 379
     //For shedninja
379 380
     return EVO_NO_EVO;
380 381
 }
381 382
 
382 383
 struct evo_result evolve_invalid_method(struct evo_call_arguments arguments)
383 384
 {
385
+    (void)arguments;
384 386
     dprintf("A pokemon tried to execute an evolution method that is not yet implemented.\n");
385 387
     return (struct evo_result){false, false, 0};
386 388
 }

+ 1
- 1
src/include/types.h ファイルの表示

@@ -19,6 +19,6 @@ typedef     double                  f64;
19 19
 #include <stddef.h>
20 20
 #include <stdbool.h>
21 21
 
22
-#define rgb5(r,g,b)                 (u16)( r | ( g << 5) | ( b << 10) )
22
+//#define rgb5(r,g,b)                 (u16)( r | ( g << 5) | ( b << 10) )
23 23
 
24 24
 #endif

+ 21
- 0
src/interface/show_item.c ファイルの表示

@@ -0,0 +1,21 @@
1
+#include <pokeagb/pokeagb.h>
2
+
3
+const struct OamData item_oam = {.size = 2};
4
+
5
+void show_item_load_gfx(u16 item)
6
+{
7
+    struct SpriteTiles tiles = {.data = item_gfx_table[item].gfx, .size = 32*16, .tag = 0x1340};
8
+    struct SpritePalette pal = {.data = item_gfx_table[item].pal, .tag = 0x1340};
9
+    struct Template template = {
10
+        .tiles_tag = 0x1340,
11
+        .pal_tag = 0x1340,
12
+        .oam = &item_oam,
13
+        .animation = SPRITE_NO_ANIMATION,
14
+        .graphics = &tiles,
15
+        .rotscale = SPRITE_NO_ROTSCALE,
16
+        .callback = oac_nullsub
17
+    };
18
+    gpu_tile_obj_decompress_alloc_tag_and_upload(&tiles);
19
+    gpu_pal_obj_alloc_tag_and_apply(&pal);
20
+    template_instanciate_forward_search(&template, 100,100,0);
21
+}

+ 40
- 35
src/interface/textbox_mugshots.c ファイルの表示

@@ -29,13 +29,8 @@
29 29
  */
30 30
 
31 31
 /* === INCLUDES === */
32
-#include <objects.h>
33
-#include <callback.h>
32
+#include <pokeagb/pokeagb.h>
34 33
 #include <config/core.h>
35
-#include <lcd.h>
36
-#include <debug.h>
37
-#include <game_engine.h>
38
-#include <memory.h>
39 34
 
40 35
 /* === PROTOTYPES === */
41 36
 
@@ -43,7 +38,7 @@
43 38
  * @brief null callback
44 39
  * @param self object
45 40
  */
46
-void mug_cb_null(struct obj_entity *self);
41
+void mug_cb_null(struct Object *self);
47 42
 
48 43
 /**
49 44
  * @brief called when tb is opened to create mugshot
@@ -58,24 +53,33 @@ void mug_delete();
58 53
 
59 54
 /* === STRUCTURES === */
60 55
 
61
-typedef struct mug_mugshot {
56
+typedef struct Mugshot {
62 57
     void *gfx;
63 58
     void *pal;
64
-} mug_mugshot;
59
+} Mugshot;
65 60
 
66 61
 /* === STATIC GLOBALS === */
67 62
 
68
-extern mug_mugshot mugshots[0xFF];
63
+extern Mugshot mugshots[0xFF];
69 64
 
70 65
 u8 *temp_obj_id1 = (u8*) OBJ_1_TEMP;
71 66
 u8 *temp_obj_id2 = (u8*) OBJ_2_TEMP;
72 67
 
73
-struct obj_oam_attributes mug_sprite = {0, 0x8000, 0, 0};
74
-
75
-struct obj_template mugshot_1_template = {MUGSHOT_1_TAG, MUGSHOT_1_TAG, &mug_sprite, (struct obj_frame **) 0x08231CF0, 0, (struct obj_rotscale_frame **) 0x08231CFC, mug_cb_null};
76
-struct obj_template mugshot_2_template = {MUGSHOT_2_TAG, MUGSHOT_2_TAG, &mug_sprite, (struct obj_frame **) 0x08231CF0, 0, (struct obj_rotscale_frame **) 0x08231CFC, mug_cb_null};
68
+struct OamData mug_sprite = {.size = 3};
77 69
 
70
+struct Template mugshot_1_template = {.tiles_tag = MUGSHOT_1_TAG,
71
+                                      .pal_tag = MUGSHOT_1_TAG, 
72
+                                      .oam = &mug_sprite, .graphics = NULL, 
73
+                                      .animation=SPRITE_NO_ANIMATION,
74
+                                      .rotscale = SPRITE_NO_ROTSCALE,
75
+                                      .callback=mug_cb_null};
78 76
 
77
+struct Template mugshot_2_template = {.tiles_tag = MUGSHOT_2_TAG,
78
+                                      .pal_tag = MUGSHOT_2_TAG, 
79
+                                      .oam = &mug_sprite, .graphics = NULL, 
80
+                                      .animation=SPRITE_NO_ANIMATION,
81
+                                      .rotscale = SPRITE_NO_ROTSCALE,
82
+                                      .callback=mug_cb_null};
79 83
 
80 84
 /* === IMPLEMENTATIONS === */
81 85
 
@@ -90,22 +94,22 @@ void mug_create_on_variable() {
90 94
         u16 *mug1_y = var_access(MUGSHOT_1_Y);
91 95
 
92 96
         mug_id_1--;
93
-        struct obj_resource gfx_mugshot_1 = {(mugshots[mug_id_1].gfx), 0x1C00, MUGSHOT_1_TAG};
94
-        struct obj_resource pal_mugshot_1 = {(mugshots[mug_id_1].pal), MUGSHOT_1_TAG};
97
+        struct SpriteTiles gfx_mugshot_1 = {(mugshots[mug_id_1].gfx), 0x1C00, MUGSHOT_1_TAG};
98
+        struct SpritePalette pal_mugshot_1 = {(mugshots[mug_id_1].pal), MUGSHOT_1_TAG};
95 99
 
96 100
 
97
-        obj_gpu_pal_alloc_tag_and_apply(&pal_mugshot_1);
98
-        obj_gpu_tile_decompress_alloc_tag_and_upload(&gfx_mugshot_1);
101
+        gpu_pal_obj_alloc_tag_and_apply(&pal_mugshot_1);
102
+        gpu_tile_obj_decompress_alloc_tag_and_upload(&gfx_mugshot_1);
99 103
 
100
-        *temp_obj_id1 = (u16) obj_template_instanciate_forward_search(&mugshot_1_template, 0, 100, 1);
104
+        *temp_obj_id1 = (u16) template_instanciate_forward_search(&mugshot_1_template, 0, 100, 1);
101 105
 
102 106
         if (h_flip)
103
-            objects[*temp_obj_id1].final_oam.attr1 |= 0x1000;
107
+            objects[*temp_obj_id1].final_oam.h_flip = true;
104 108
         if (v_flip)
105
-            objects[*temp_obj_id1].final_oam.attr1 |= 0x2000;
109
+            objects[*temp_obj_id1].final_oam.v_flip = true;
106 110
 
107
-        objects[*temp_obj_id1].x = *mug1_x;
108
-        objects[*temp_obj_id1].y = *mug1_y;
111
+        objects[*temp_obj_id1].pos1.x = *mug1_x;
112
+        objects[*temp_obj_id1].pos1.y = *mug1_y;
109 113
     }
110 114
     u16 *mug2_var = var_access(MUGHSOT_2_TABLE);
111 115
     u16 c_mug2_var = *mug2_var;
@@ -117,23 +121,23 @@ void mug_create_on_variable() {
117 121
         u16 *mug2_y = var_access(MUGSHOT_2_Y);
118 122
 
119 123
         mug_id_2--;
120
-        struct obj_resource gfx_mugshot_2 = {(mugshots[mug_id_2].gfx), 0x1C00, MUGSHOT_2_TAG};
121
-        struct obj_resource pal_mugshot_2 = {(mugshots[mug_id_2].pal), MUGSHOT_2_TAG};
124
+        struct SpriteTiles gfx_mugshot_2 = {(mugshots[mug_id_2].gfx), 0x1C00, MUGSHOT_2_TAG};
125
+        struct SpritePalette pal_mugshot_2 = {(mugshots[mug_id_2].pal), MUGSHOT_2_TAG};
122 126
 
123 127
 
124
-        obj_gpu_pal_alloc_tag_and_apply(&pal_mugshot_2);
125
-        obj_gpu_tile_decompress_alloc_tag_and_upload(&gfx_mugshot_2);
128
+        gpu_pal_obj_alloc_tag_and_apply(&pal_mugshot_2);
129
+        gpu_tile_obj_decompress_alloc_tag_and_upload(&gfx_mugshot_2);
126 130
 
127 131
         c_mug2_var = *mug2_var;
128
-        *temp_obj_id2 = (u16) obj_template_instanciate_forward_search(&mugshot_2_template, 0, 100, 1);
132
+        *temp_obj_id2 = (u16) template_instanciate_forward_search(&mugshot_2_template, 0, 100, 1);
129 133
 
130 134
         if (h_flip)
131
-            objects[*temp_obj_id2].final_oam.attr1 |= 0x1000;
135
+            objects[*temp_obj_id2].final_oam.h_flip = true;
132 136
         if (v_flip)
133
-            objects[*temp_obj_id2].final_oam.attr1 |= 0x2000;
137
+            objects[*temp_obj_id2].final_oam.v_flip = true;
134 138
 
135
-        objects[*temp_obj_id2].x = *mug2_x;
136
-        objects[*temp_obj_id2].y = *mug2_y;
139
+        objects[*temp_obj_id2].pos1.x = *mug2_x;
140
+        objects[*temp_obj_id2].pos1.y = *mug2_y;
137 141
     }
138 142
 }
139 143
 
@@ -143,7 +147,7 @@ void mug_delete() {
143 147
 
144 148
     if (*temp_obj_id1 != 0) {
145 149
         gpu_pal_free_by_tag(MUGSHOT_1_TAG);
146
-        obj_gpu_tile_free_by_tag(MUGSHOT_1_TAG);
150
+        gpu_tile_obj_free_by_tag(MUGSHOT_1_TAG);
147 151
 
148 152
         //*mug1_var = 0;
149 153
         //do reset mugshot var ; set it to old value instead
@@ -157,7 +161,7 @@ void mug_delete() {
157 161
     //return;
158 162
     if (*temp_obj_id2 != 0) {
159 163
         gpu_pal_free_by_tag(MUGSHOT_2_TAG);
160
-        obj_gpu_tile_free_by_tag(MUGSHOT_2_TAG);
164
+        gpu_tile_obj_free_by_tag(MUGSHOT_2_TAG);
161 165
 
162 166
         //*mug2_var = 0;
163 167
         //do reset mugshot var ; set it to old value instead
@@ -170,6 +174,7 @@ void mug_delete() {
170 174
 
171 175
 }
172 176
 
173
-void mug_cb_null(struct obj_entity *self) {
177
+void mug_cb_null(struct Object *self) {
178
+    (void)self;
174 179
     return;
175 180
 }

+ 3
- 0
src/overworld/dns/dns.c ファイルの表示

@@ -124,6 +124,9 @@ void dns_pal_patch_for_npc(u16 tag, u8 idx)
124 124
 }
125 125
 
126 126
 void dns_modify_palette(union Color* buffer, u16 size){
127
+    (void)buffer;
128
+    (void)size;
129
+    //to activate remove the above
127 130
    /* if(current_map_header.light == 8)
128 131
         return;
129 132
     for(u16 i = 0; i < size; ++i) {

+ 2
- 2
src/overworld/tileset_animation/main_animator.c ファイルの表示

@@ -46,11 +46,11 @@ void animate_from_structure(const struct TilesetAnimation *anim, u16 tile_skip)
46 46
     void *vram_address = (void *)(0x06000000 + (tile_skip * 0x20));
47 47
     u8 cur_anim = 0;
48 48
     while (anim[cur_anim].image != (void *)0xFFFFFFFF && cur_anim < NUM_MAX_ANIMATIONS) {
49
-        void *current_vram = vram_address + (0x20 * anim[cur_anim].tile_start);
49
+        void *current_vram = (u8*)vram_address + (0x20 * anim[cur_anim].tile_start);
50 50
 
51 51
         if (anim_state->cur_frame[cur_anim] == 0) {
52 52
             memcpy(current_vram,
53
-                   anim[cur_anim].image + (0x20 * anim[cur_anim].tile_length * anim_state->cur_tile[cur_anim]),
53
+                   (u8*)anim[cur_anim].image + (0x20 * anim[cur_anim].tile_length * anim_state->cur_tile[cur_anim]),
54 54
                    anim[cur_anim].tile_length * 0x20);
55 55
         }
56 56
 

+ 2
- 2
src/specials/custom_specials.c ファイルの表示

@@ -31,7 +31,7 @@
31 31
 /* === INCLUDES === */
32 32
 
33 33
 #include "camera_move.h"
34
-#include "cutscene_meteor.h"
34
+//#include "cutscene_meteor.h"
35 35
 #include <config/core.h>
36 36
 #include <pokeagb/pokeagb.h>
37 37
 
@@ -81,7 +81,7 @@ extern pchar name_rival_female[5];
81 81
 /* === STATICS === */
82 82
 
83 83
 static special_func special_routines[10] = {
84
-    met_play,         cam_sp_move_camera, sp_init_script,  NULL, NULL,
84
+    NULL,         cam_sp_move_camera, sp_init_script,  NULL, NULL,
85 85
     sp_random_number, sp_check_tileset,   sp_batchmaptile, sp_crystal_fade, sp_set_rival,
86 86
 };
87 87
 

src/specials/cutscene_meteor.c → src/specials/cutscene_meteor.c.old ファイルの表示


src/specials/cutscene_meteor.h → src/specials/cutscene_meteor.h.old ファイルの表示