Browse Source

update intro scene

SBird1337 6 years ago
parent
commit
3fb6e038e9

+ 1
- 0
src/include/scene.h View File

9
 const struct BgConfig scene_default_config[4];
9
 const struct BgConfig scene_default_config[4];
10
 void scene_default_cb_handler(void);
10
 void scene_default_cb_handler(void);
11
 const struct TextColor scene_default_text_color;
11
 const struct TextColor scene_default_text_color;
12
+void scene_free_bg_maps(void);
12
 
13
 
13
 #endif
14
 #endif

+ 16
- 2
src/specials/scenes/blackboard_intro.c View File

7
 extern pchar *blackboard_text[];
7
 extern pchar *blackboard_text[];
8
 
8
 
9
 const struct TextboxTemplate blackboard_box[] = {
9
 const struct TextboxTemplate blackboard_box[] = {
10
-    {.bg_id = 0, .x = 4, .y = 7, .width = 6, .height = 3, .pal_id = 15, .charbase = 1},
10
+    {.bg_id = 0, .x = 2, .y = 5, .width = 28, .height = 10, .pal_id = 15, .charbase = 1},
11
 };
11
 };
12
 
12
 
13
 const u16 blackboard_text_pal[] = 
13
 const u16 blackboard_text_pal[] = 
14
-                            {rgb5(255, 255, 255), rgb5(255, 255, 255), rgb5(255, 255, 255), rgb5(255, 255, 255),
14
+                            {rgb5(255, 255, 255), rgb5(255, 255, 255), rgb5(000, 163, 131), rgb5(255, 255, 255),
15
                              rgb5(255, 255, 255), rgb5(255, 255, 255), rgb5(255, 255, 255), rgb5(255, 255, 255),
15
                              rgb5(255, 255, 255), rgb5(255, 255, 255), rgb5(255, 255, 255), rgb5(255, 255, 255),
16
                              rgb5(255, 255, 255), rgb5(255, 255, 255), rgb5(255, 255, 255), rgb5(255, 255, 255),
16
                              rgb5(255, 255, 255), rgb5(255, 255, 255), rgb5(255, 255, 255), rgb5(255, 255, 255),
17
                              rgb5(255, 255, 255), rgb5(255, 255, 255), rgb5(255, 255, 255), rgb5(255, 255, 255)};
17
                              rgb5(255, 255, 255), rgb5(255, 255, 255), rgb5(255, 255, 255), rgb5(255, 255, 255)};
49
                          blackboard_text[0]);
49
                          blackboard_text[0]);
50
             tasks[id].priv[0]++;
50
             tasks[id].priv[0]++;
51
         break;
51
         break;
52
+        case 4:
53
+            if(!dialogid_was_acknowledged(0)) {
54
+                fade_screen(0xFFFFFFFF, 1, 0, 16, 0x0000);
55
+                tasks[id].priv[0]++;
56
+            }
57
+        break;
58
+        case 5:
59
+            if(!pal_fade_control.active){
60
+                task_del(id);
61
+                scene_free_bg_maps();
62
+                set_callback2(c2_exit_to_overworld_2_switch);
63
+                set_callback1(c1_overworld);
64
+            }
65
+        break;
52
         default:
66
         default:
53
         break;
67
         break;
54
     }
68
     }

+ 1
- 1
src/specials/scenes/blackboard_text.s View File

6
 .word bbtext_zero
6
 .word bbtext_zero
7
 
7
 
8
 bbtext_zero:
8
 bbtext_zero:
9
-    .autostring 40 LAN_DE "Feuer, Wasser, Erde, Luft. Aus den vier Elementen erschuf Arceus einst das Universum, ein Ort voller Chaos, in welchem sich letztlich unsere Welt formen konnte."
9
+    .string LAN_DE "Feuer, Wasser, Erde, Luft. Aus den\nvier Elementen erschuf Arceus einst\ndas Universum, ein Ort voller\nChaos, in welchem sich letztlich\nunsere Welt formen konnte.\p"

+ 11
- 0
src/specials/scenes/scene_common.c View File

58
         obj_sync_superstate();
58
         obj_sync_superstate();
59
         tilemaps_sync();
59
         tilemaps_sync();
60
         remoboxes_upload_tilesets();
60
         remoboxes_upload_tilesets();
61
+        rboxid_update_tilemap_and_tileset(0);
62
+    }
63
+}
64
+
65
+void scene_free_bg_maps(void) {
66
+    for (u8 i = 0; i < 3; ++i) {
67
+        void *tmap = bgid_get_tilemap(i);
68
+        if (tmap != NULL) {
69
+            free(tmap);
70
+            bgid_nullify_tilemap(i);
71
+        }
61
     }
72
     }
62
 }
73
 }
63
 
74