Browse Source

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

Michael Panzlaff 6 years ago
parent
commit
a6e6015101

+ 3
- 0
base/readme_base.md View File

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 View File

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
-Subproject commit 62f31b413bc364b5616d2240e0a4cbb050902f31
1
+Subproject commit 96f9db527ac23ab26be5614c2aeda2b1e3e5c7ab

+ 3
- 3
icons.makefile View File

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

+ 21
- 21
makefile View File

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

+ 2
- 2
patches/game_engine/quick_hacks.asm View File

1
 EGG_HATCH_LEVEL EQU 1
1
 EGG_HATCH_LEVEL EQU 1
2
 EV_CAP EQU 252
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
 PLAYER_S_B EQU 0x0
7
 PLAYER_S_B EQU 0x0
8
 PLAYER_S_M EQU 0x0
8
 PLAYER_S_M EQU 0x0

+ 1
- 1
sots-private

1
-Subproject commit 397965069d35a0c0b96de7488e254080af911cbd
1
+Subproject commit d78db20338af087422889fc23d0ad91207e26b62

+ 17
- 17
sprites.makefile View File

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

+ 6
- 0
src/battle_engine/battle_help.c View File

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

+ 2
- 0
src/evolution/evolution_methods.c View File

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

+ 1
- 1
src/include/types.h View File

19
 #include <stddef.h>
19
 #include <stddef.h>
20
 #include <stdbool.h>
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
 #endif
24
 #endif

+ 21
- 0
src/interface/show_item.c View File

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 View File

29
  */
29
  */
30
 
30
 
31
 /* === INCLUDES === */
31
 /* === INCLUDES === */
32
-#include <objects.h>
33
-#include <callback.h>
32
+#include <pokeagb/pokeagb.h>
34
 #include <config/core.h>
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
 /* === PROTOTYPES === */
35
 /* === PROTOTYPES === */
41
 
36
 
43
  * @brief null callback
38
  * @brief null callback
44
  * @param self object
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
  * @brief called when tb is opened to create mugshot
44
  * @brief called when tb is opened to create mugshot
58
 
53
 
59
 /* === STRUCTURES === */
54
 /* === STRUCTURES === */
60
 
55
 
61
-typedef struct mug_mugshot {
56
+typedef struct Mugshot {
62
     void *gfx;
57
     void *gfx;
63
     void *pal;
58
     void *pal;
64
-} mug_mugshot;
59
+} Mugshot;
65
 
60
 
66
 /* === STATIC GLOBALS === */
61
 /* === STATIC GLOBALS === */
67
 
62
 
68
-extern mug_mugshot mugshots[0xFF];
63
+extern Mugshot mugshots[0xFF];
69
 
64
 
70
 u8 *temp_obj_id1 = (u8*) OBJ_1_TEMP;
65
 u8 *temp_obj_id1 = (u8*) OBJ_1_TEMP;
71
 u8 *temp_obj_id2 = (u8*) OBJ_2_TEMP;
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
 /* === IMPLEMENTATIONS === */
84
 /* === IMPLEMENTATIONS === */
81
 
85
 
90
         u16 *mug1_y = var_access(MUGSHOT_1_Y);
94
         u16 *mug1_y = var_access(MUGSHOT_1_Y);
91
 
95
 
92
         mug_id_1--;
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
         if (h_flip)
106
         if (h_flip)
103
-            objects[*temp_obj_id1].final_oam.attr1 |= 0x1000;
107
+            objects[*temp_obj_id1].final_oam.h_flip = true;
104
         if (v_flip)
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
     u16 *mug2_var = var_access(MUGHSOT_2_TABLE);
114
     u16 *mug2_var = var_access(MUGHSOT_2_TABLE);
111
     u16 c_mug2_var = *mug2_var;
115
     u16 c_mug2_var = *mug2_var;
117
         u16 *mug2_y = var_access(MUGSHOT_2_Y);
121
         u16 *mug2_y = var_access(MUGSHOT_2_Y);
118
 
122
 
119
         mug_id_2--;
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
         c_mug2_var = *mug2_var;
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
         if (h_flip)
134
         if (h_flip)
131
-            objects[*temp_obj_id2].final_oam.attr1 |= 0x1000;
135
+            objects[*temp_obj_id2].final_oam.h_flip = true;
132
         if (v_flip)
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
 
147
 
144
     if (*temp_obj_id1 != 0) {
148
     if (*temp_obj_id1 != 0) {
145
         gpu_pal_free_by_tag(MUGSHOT_1_TAG);
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
         //*mug1_var = 0;
152
         //*mug1_var = 0;
149
         //do reset mugshot var ; set it to old value instead
153
         //do reset mugshot var ; set it to old value instead
157
     //return;
161
     //return;
158
     if (*temp_obj_id2 != 0) {
162
     if (*temp_obj_id2 != 0) {
159
         gpu_pal_free_by_tag(MUGSHOT_2_TAG);
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
         //*mug2_var = 0;
166
         //*mug2_var = 0;
163
         //do reset mugshot var ; set it to old value instead
167
         //do reset mugshot var ; set it to old value instead
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
     return;
179
     return;
175
 }
180
 }

+ 3
- 0
src/overworld/dns/dns.c View File

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

+ 2
- 2
src/overworld/tileset_animation/main_animator.c View File

46
     void *vram_address = (void *)(0x06000000 + (tile_skip * 0x20));
46
     void *vram_address = (void *)(0x06000000 + (tile_skip * 0x20));
47
     u8 cur_anim = 0;
47
     u8 cur_anim = 0;
48
     while (anim[cur_anim].image != (void *)0xFFFFFFFF && cur_anim < NUM_MAX_ANIMATIONS) {
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
         if (anim_state->cur_frame[cur_anim] == 0) {
51
         if (anim_state->cur_frame[cur_anim] == 0) {
52
             memcpy(current_vram,
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
                    anim[cur_anim].tile_length * 0x20);
54
                    anim[cur_anim].tile_length * 0x20);
55
         }
55
         }
56
 
56
 

+ 2
- 2
src/specials/custom_specials.c View File

31
 /* === INCLUDES === */
31
 /* === INCLUDES === */
32
 
32
 
33
 #include "camera_move.h"
33
 #include "camera_move.h"
34
-#include "cutscene_meteor.h"
34
+//#include "cutscene_meteor.h"
35
 #include <config/core.h>
35
 #include <config/core.h>
36
 #include <pokeagb/pokeagb.h>
36
 #include <pokeagb/pokeagb.h>
37
 
37
 
81
 /* === STATICS === */
81
 /* === STATICS === */
82
 
82
 
83
 static special_func special_routines[10] = {
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
     sp_random_number, sp_check_tileset,   sp_batchmaptile, sp_crystal_fade, sp_set_rival,
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 View File


src/specials/cutscene_meteor.h → src/specials/cutscene_meteor.h.old View File