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,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
@@ -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
- 0
src/evolution/evolution_methods.c View File

@@ -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
 }

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

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