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,4 +47,4 @@ bxr1:
47 47
 	bx r1
48 48
 bxr0:
49 49
 	bx r0
50
-*/
50
+*/

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

@@ -367,7 +367,7 @@ void dns_mapdata_load_palette_one(struct mapdata_header* data_header) {
367 367
 void dns_apply_lighting(void* blockset, u8 secondary, struct color* buffer) {
368 368
     if (dns_get_time_of_day() != NIGHT)
369 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 371
         if (blockset == lightmap[i].blockset) {
372 372
             buffer[(lightmap[i].pal - (secondary ? 7 : 0)) * 16 + lightmap[i].index] = lightmap[i].color;
373 373
         }
@@ -442,4 +442,4 @@ void dns_pal_patch_for_npc(u16 tag, u8 pal_slot) {
442 442
     tint_palette(pal_slot);
443 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,6 +28,8 @@
28 28
 */
29 29
 #include <pokeagb/pokeagb.h>
30 30
 
31
+#include <agb_debug.h>
32
+
31 33
 #define TRAINER_FLAG_SPACE_START 0x1000
32 34
 
33 35
 extern u16 tb_modify_flag_id(u16 flag_id);
@@ -122,4 +124,4 @@ bool var_set_script_hack(struct ScriptEnvironment *env) {
122 124
     u16 val = script_read_halfword(env);
123 125
     var_set_hack(var, val);
124 126
     return 0;
125
-}
127
+}