Browse Source

fix a few warnings

ipatix 7 years ago
parent
commit
859880c138
3 changed files with 6 additions and 4 deletions
  1. 1
    1
      src/battle_bg/battle_bg_hook.s
  2. 2
    2
      src/dns/dns_core.c
  3. 3
    1
      src/savefile/flag_manipulation.c

+ 1
- 1
src/battle_bg/battle_bg_hook.s View File

47
 	bx r1
47
 	bx r1
48
 bxr0:
48
 bxr0:
49
 	bx r0
49
 	bx r0
50
-*/
50
+*/

+ 2
- 2
src/dns/dns_core.c View File

367
 void dns_apply_lighting(void* blockset, u8 secondary, struct color* buffer) {
367
 void dns_apply_lighting(void* blockset, u8 secondary, struct color* buffer) {
368
     if (dns_get_time_of_day() != NIGHT)
368
     if (dns_get_time_of_day() != NIGHT)
369
         return;
369
         return;
370
-    for (int i = 0; i < (sizeof (lightmap) / sizeof (lightmap[0])); ++i) {
370
+    for (unsigned int i = 0; i < (sizeof (lightmap) / sizeof (lightmap[0])); ++i) {
371
         if (blockset == lightmap[i].blockset) {
371
         if (blockset == lightmap[i].blockset) {
372
             buffer[(lightmap[i].pal - (secondary ? 7 : 0)) * 16 + lightmap[i].index] = lightmap[i].color;
372
             buffer[(lightmap[i].pal - (secondary ? 7 : 0)) * 16 + lightmap[i].index] = lightmap[i].color;
373
         }
373
         }
442
     tint_palette(pal_slot);
442
     tint_palette(pal_slot);
443
     dns_apply_shaders(pal_slot + 16, 1, palette_unfaded_buffer);
443
     dns_apply_shaders(pal_slot + 16, 1, palette_unfaded_buffer);
444
 }
444
 }
445
-/*use fade in animation, load palettes according to current fade state*/
445
+/*use fade in animation, load palettes according to current fade state*/

+ 3
- 1
src/savefile/flag_manipulation.c View File

28
 */
28
 */
29
 #include <pokeagb/pokeagb.h>
29
 #include <pokeagb/pokeagb.h>
30
 
30
 
31
+#include <agb_debug.h>
32
+
31
 #define TRAINER_FLAG_SPACE_START 0x1000
33
 #define TRAINER_FLAG_SPACE_START 0x1000
32
 
34
 
33
 extern u16 tb_modify_flag_id(u16 flag_id);
35
 extern u16 tb_modify_flag_id(u16 flag_id);
122
     u16 val = script_read_halfword(env);
124
     u16 val = script_read_halfword(env);
123
     var_set_hack(var, val);
125
     var_set_hack(var, val);
124
     return 0;
126
     return 0;
125
-}
127
+}