Browse Source

fix some warnings

SBird1337 6 years ago
parent
commit
ff0b1350df
3 changed files with 25 additions and 20 deletions
  1. 20
    20
      makefile
  2. 2
    0
      src/evolution/evolution_methods.c
  3. 3
    0
      src/overworld/dns/dns.c

+ 20
- 20
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
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
- 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
 }

+ 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) {