Browse Source

fix text animation variable

SBird1337 7 years ago
parent
commit
23249262d1
1 changed files with 4 additions and 2 deletions
  1. 4
    2
      src/overworld/tileset_animation/text_animator.c

+ 4
- 2
src/overworld/tileset_animation/text_animator.c View File

1
 #include <pokeagb/pokeagb.h>
1
 #include <pokeagb/pokeagb.h>
2
 #include <tileset_animation/font.h>
2
 #include <tileset_animation/font.h>
3
+#include <config.h>
3
 
4
 
4
 #define CANVAS_X_START (22)
5
 #define CANVAS_X_START (22)
5
 #define CANVAS_Y_START (35)
6
 #define CANVAS_Y_START (35)
103
     blockset_one_current_tile = 0;
104
     blockset_one_current_tile = 0;
104
     blockset_one_max_tile = 0x280;
105
     blockset_one_max_tile = 0x280;
105
     blockset_one_animator = NULL;
106
     blockset_one_animator = NULL;
106
-    if (var_8000 != 0) {
107
-        draw_text_on_canvas(map_texts[var_8000]);
107
+    u16 text = var_load(TEXT_ANIMATION_VAR);
108
+    if (text != 0) {
109
+        draw_text_on_canvas(map_texts[text]);
108
         blockset_one_animator = text_animator;
110
         blockset_one_animator = text_animator;
109
     }
111
     }
110
 }
112
 }