diff --git a/include/script_builder.h b/include/mystery_gift_builder.h similarity index 98% rename from include/script_builder.h rename to include/mystery_gift_builder.h index da3414e..43eab85 100644 --- a/include/script_builder.h +++ b/include/mystery_gift_builder.h @@ -1,5 +1,5 @@ -#ifndef SCRIPT_BUILDER_H -#define SCRIPT_BUILDER_H +#ifndef MYSTERY_GIFT_BUILDER_H +#define MYSTERY_GIFT_BUILDER_H #include #include diff --git a/include/mystery_gift_injector.h b/include/mystery_gift_injector.h new file mode 100644 index 0000000..1570017 --- /dev/null +++ b/include/mystery_gift_injector.h @@ -0,0 +1,9 @@ +#ifndef MYSTERY_GIFT_INJECTOR_H +#define MYSTERY_GIFT_INJECTOR_H + +#include "pokemon_party.h" +#include "mystery_gift_builder.h" + +void inject_mystery(Pokemon incoming_party_array[]); + +#endif \ No newline at end of file diff --git a/include/script.h b/include/script.h deleted file mode 100644 index 9c1ad57..0000000 --- a/include/script.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef SCRIPT_H -#define SCRIPT_H - -#include "pokemon_party.h" -#include "script_builder.h" - -void inject_mystery(Pokemon incoming_party_array[]); - -#endif \ No newline at end of file diff --git a/include/script_array.h b/include/script_array.h index 743b6e0..47d4181 100644 --- a/include/script_array.h +++ b/include/script_array.h @@ -38,7 +38,7 @@ #define DIA_F_SEND_FRIEND START_SIZE + DIA_INDEX_SEND_FRIEND #define DIA_F_THANK START_SIZE + DIA_INDEX_THANK -#define DIA_SIZE 13 +#define DIA_SIZE 27 #define DIA_END DIA_SIZE + START_SIZE // Commands @@ -70,7 +70,7 @@ extern script_obj script[]; void populate_script(); -void populate_dialouge(); +void populate_dialogue(); void add_script_party_var(Pokemon_Party var); bool run_conditional(int index); diff --git a/source/main.cpp b/source/main.cpp index 48668d6..516a3e3 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -27,8 +27,8 @@ #include "global_frame_counter.h" #include "pkmn_font.h" #include "save_data_manager.h" -#include "script.h" -#include "script_builder.h" +#include "mystery_gift_injector.h" +#include "mystery_gift_builder.h" /*TODO: -------- @@ -125,7 +125,7 @@ void initalization_script(void) add_script_party_var(party); // Prepare dialouge - populate_dialouge(); + populate_dialogue(); populate_script(); // Sound bank init diff --git a/source/script_builder.cpp b/source/mystery_gift_builder.cpp similarity index 99% rename from source/script_builder.cpp rename to source/mystery_gift_builder.cpp index 9c18857..7867e7e 100644 --- a/source/script_builder.cpp +++ b/source/mystery_gift_builder.cpp @@ -1,5 +1,5 @@ #include -#include "script_builder.h" +#include "mystery_gift_builder.h" #include "pokemon_party.h" #include "pokemon_data.h" diff --git a/source/script.cpp b/source/mystery_gift_injector.cpp similarity index 98% rename from source/script.cpp rename to source/mystery_gift_injector.cpp index 8a09664..4eb0bc6 100644 --- a/source/script.cpp +++ b/source/mystery_gift_injector.cpp @@ -1,8 +1,8 @@ #include -#include "script.h" +#include "mystery_gift_injector.h" #include "flash_mem.h" #include "gba_flash.h" -#include "script_builder.h" +#include "mystery_gift_builder.h" static u32 wonder_card[0x14E] = { 0xFC, 0x85, 0x00, 0x00, 0xE8, 0x03, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBB, 0xCF, 0xCC, 0xC9, 0xCC, 0xBB, 0xCE, 0xC3, 0xBD, 0xC5, 0xBF, 0xCE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBF, 0xEC, 0xD7, 0xDC, 0xD5, 0xE2, 0xDB, 0xD9, 0x00, 0xBD, 0xD5, 0xE6, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC1, 0xE3, 0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0xE2, 0xDB, 0xD9, 0x00, 0xBD, 0xD5, 0xE6, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD6, 0xD9, 0xDA, 0xE3, 0xE6, 0xD9, 0x00, 0xE6, 0xD9, 0xD7, 0xD9, 0xDD, 0xEA, 0xDD, 0xE2, 0xDB, 0x00, 0xE8, 0xDC, 0xD9, 0x00, 0xBB, 0xCF, 0xCC, 0xC9, 0xCC, 0xBB, 0xCE, 0xC3, 0xBD, 0xC5, 0xBF, 0xCE, 0xAB, 0xAB, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/source/script_array.cpp b/source/script_array.cpp index 922aae5..999269b 100644 --- a/source/script_array.cpp +++ b/source/script_array.cpp @@ -1,7 +1,7 @@ #include "script_array.h" #include "main_menu.h" #include "text_engine.h" -#include "script.h" +#include "mystery_gift_injector.h" #include "sprite_data.h" #include @@ -9,23 +9,23 @@ int last_error; Pokemon_Party party_data; script_obj script[SCRIPT_SIZE]; -std::string_view dialouge[DIA_SIZE]; +std::string_view dialogue[DIA_SIZE]; -void populate_dialouge() +void populate_dialogue() { - dialouge[DIA_INDEX_OPEN] = "Hey there! I'm Professor Fennel. As you can see, I'm a scientist. In fact, the subject I'm researching is Trainers! My dream is to collect save files of various trainers, but I haven't had any breakthroughs yet. In the center of the region where I'm from, there's a location that can make a Pokemon's dreams into reality! This means that any other Pokemon they meet in their dreams become real! That's fantastic, but my goal is to do the same- but for a trainer! I've successfully been able send a Pokemon in and out of a trainer's dream, but I've been unsuccessful in pulling out a Pokemon without... catastrophic results. That's when I had a breakthrough- I realized if I sent in a DITTO, it could transform into the Pokemon found within that trainer's dream! That's why you're here today- I want to bring as many Pokemon out of your dreams as possible! There's just over 250 different Pokemon I want to catalogue in my Dream Pokedex- or Dream Dex for short. But I'll let you keep any Pokemon- they're from your dreams after all! I think that's everything... whenever you're ready, just let me know!"; - dialouge[DIA_INDEX_E4_1] = "Hi trainer! I'm thrilled\nyou've decided to help with our research, but we need\nthe best of the best!"; - dialouge[DIA_INDEX_E4_2] = "Come back once you've taken down the Elite Four!"; - dialouge[DIA_INDEX_MG] = "Looks like Mystery gift isn't enabled..."; - dialouge[DIA_INDEX_START] = "Alright then, let's get started! Please connect your Game Boy Advance to a Game Boy family system, using a Game Boy Color link cable. Load the Game Boy Pokemon game you want to transfer Pokemon from. Once both devices have been connected and the Game Boy Pokemon game has been loaded, press A."; - dialouge[DIA_INDEX_ERROR_1] = "Hmm, it looks like something isn't right. Let's try that again!"; - dialouge[DIA_INDEX_CONN_GOOD] = "Great! Now head to the nearest Pokemon Center. Put any Pokemon you wish to bring out of your dreams into your party, and go to the Cable Club attendant. Ask them to perform a Link Trade, and then press A."; - dialouge[DIA_INDEX_LINK_GOOD] = "We're almost set! Once you're ready, talk to the trainer across the table from you to start the process!"; - dialouge[DIA_INDEX_TRANS_GOOD] = "Amazing! Fantastic!! Everything went perfectly!"; - dialouge[DIA_INDEX_NEW_DEX] = "It looks like there's at least one new Pokemon here that isn't in the Dream Dex! I'll give it something extra sweet as a reward for you both."; - dialouge[DIA_INDEX_NO_NEW_DEX] = "It doesn't look like there's anything new for your Dream Dex, but that's okay! Any research is good research!"; - dialouge[DIA_INDEX_SEND_FRIEND] = "I'll send these Pokemon to my friend Bill/Lannette so that you can pick them up. Did you know they developed the Storage System for the Kanto/Hoenn region? My younger sister developed the Storage System where I'm from, so Bill/Lannette is a good friend of ours!"; - dialouge[DIA_INDEX_THANK] = "Thank you so much for assisting with my research! Whenever you want to transfer more Pokemon, just let me know!"; + dialogue[DIA_INDEX_OPEN] = "Hey there! I'm Professor Fennel. As you can see, I'm a scientist. In fact, the subject I'm researching is Trainers! My dream is to collect save files of various trainers, but I haven't had any breakthroughs yet. In the center of the region where I'm from, there's a location that can make a Pokemon's dreams into reality! This means that any other Pokemon they meet in their dreams become real! That's fantastic, but my goal is to do the same- but for a trainer! I've successfully been able send a Pokemon in and out of a trainer's dream, but I've been unsuccessful in pulling out a Pokemon without... catastrophic results. That's when I had a breakthrough- I realized if I sent in a DITTO, it could transform into the Pokemon found within that trainer's dream! That's why you're here today- I want to bring as many Pokemon out of your dreams as possible! There's just over 250 different Pokemon I want to catalogue in my Dream Pokedex- or Dream Dex for short. But I'll let you keep any Pokemon- they're from your dreams after all! I think that's everything... whenever you're ready, just let me know!"; + dialogue[DIA_INDEX_E4_1] = "Hi trainer! I'm thrilled\nyou've decided to help with our research, but we need\nthe best of the best!"; + dialogue[DIA_INDEX_E4_2] = "Come back once you've taken down the Elite Four!"; + dialogue[DIA_INDEX_MG] = "Looks like Mystery gift isn't enabled..."; + dialogue[DIA_INDEX_START] = "Alright then, let's get started! Please connect your Game Boy Advance to a Game Boy family system, using a Game Boy Color link cable. Load the Game Boy Pokemon game you want to transfer Pokemon from. Once both devices have been connected and the Game Boy Pokemon game has been loaded, press A."; + dialogue[DIA_INDEX_ERROR_1] = "Hmm, it looks like something isn't right. Let's try that again!"; + dialogue[DIA_INDEX_CONN_GOOD] = "Great! Now head to the nearest Pokemon Center. Put any Pokemon you wish to bring out of your dreams into your party, and go to the Cable Club attendant. Ask them to perform a Link Trade, and then press A."; + dialogue[DIA_INDEX_LINK_GOOD] = "We're almost set! Once you're ready, talk to the trainer across the table from you to start the process!"; + dialogue[DIA_INDEX_TRANS_GOOD] = "Amazing! Fantastic!! Everything went perfectly!"; + dialogue[DIA_INDEX_NEW_DEX] = "It looks like there's at least one new Pokemon here that isn't in the Dream Dex! I'll give it something extra sweet as a reward for you both."; + dialogue[DIA_INDEX_NO_NEW_DEX] = "It doesn't look like there's anything new for your Dream Dex, but that's okay! Any research is good research!"; + dialogue[DIA_INDEX_SEND_FRIEND] = "I'll send these Pokemon to my friend Bill/Lannette so that you can pick them up. Did you know they developed the Storage System for the Kanto/Hoenn region? My younger sister developed the Storage System where I'm from, so Bill/Lannette is a good friend of ours!"; + dialogue[DIA_INDEX_THANK] = "Thank you so much for assisting with my research! Whenever you want to transfer more Pokemon, just let me know!"; } void populate_script() @@ -39,9 +39,9 @@ void populate_script() script[DIA_F_START] = script_obj("welcome", CMD_START_LINK, DIA_F_CONN_GOOD); script[DIA_F_CONN_GOOD] = script_obj("good", CMD_IMPORT_POKEMON, CMD_BACK_TO_MENU); - script[DIA_F_E4_1] = script_obj(dialouge[DIA_INDEX_E4_1], DIA_F_E4_2); - script[DIA_F_E4_2] = script_obj(dialouge[DIA_INDEX_E4_2], CMD_HIDE_PROF, CMD_BACK_TO_MENU); - script[DIA_F_MG] = script_obj(dialouge[DIA_INDEX_MG], CMD_HIDE_PROF, CMD_BACK_TO_MENU); + script[DIA_F_E4_1] = script_obj(dialogue[DIA_INDEX_E4_1], DIA_F_E4_2); + script[DIA_F_E4_2] = script_obj(dialogue[DIA_INDEX_E4_2], CMD_HIDE_PROF, CMD_BACK_TO_MENU); + script[DIA_F_MG] = script_obj(dialogue[DIA_INDEX_MG], CMD_HIDE_PROF, CMD_BACK_TO_MENU); /* script[0] = script_obj("", 17, CMD_SHOW_PROF); // 0 script[1] = script_obj("Game not detected. Please turn off your system and upload the program again.", 2); // 1