Re-enabling Dream Dex

This commit is contained in:
GearsProgress
2026-08-27 17:51:37 -04:00
parent c454b2a6e2
commit 1afb528c73
6 changed files with 14 additions and 3 deletions

2
PCCS

Submodule PCCS updated: ca9ab8c6ab...9002c56236

View File

@@ -5,6 +5,8 @@
#include "rom_data.h"
#include "translated_text.h"
extern bool newPkmn; // This is stupid and dumb and stupid but we're storing it like this until this whole mess gets rewritten.
// Commands
#define T_SCRIPT_START DIA_END + 0
#define E_SCRIPT_START DIA_END + 1

View File

@@ -435,7 +435,7 @@ int main(void)
set_background_pal(curr_GBA_rom.gamecode, false, true);
if (!g_debug_options.ignore_mg_e4_flags && (!get_tutorial_flag() || g_debug_options.force_tutorial))
if (!get_tutorial_flag() || g_debug_options.force_tutorial)
{
obj_hide_multi(ptgb_logo_l, 2);
text_loop(BTN_TRANSFER);

View File

@@ -6,6 +6,7 @@
#include "translated_text.h"
#include "FileContainerReader.h"
#include "text_tables.h"
#include "script_array.h"
#define MG_SCRIPT false
#define S30_SCRIPT true
@@ -339,6 +340,7 @@ void mystery_gift_script::build_script(PokeBox *box)
// it won't get called automatically because it's part of the union (and neither will the destructor)
new (&decompressed_store.tables.data) PokemonTables();
newPkmn = false;
// TODO make it so that the table is added here(?)
box->setTable(&decompressed_store.tables.data);
box->convertAll();

View File

@@ -5,6 +5,7 @@
#include "button_menu.h"
#include "pokemon_data.h"
#include "libraries/Pokemon-Gen3-to-Gen-X/include/save.h"
#include "script_array.h"
byte save_data_array[SAVE_DATA_SIZE];
@@ -31,6 +32,10 @@ bool is_caught(int dex_num)
void set_caught(int dex_num)
{
if (!is_caught(dex_num))
{
newPkmn |= true;
}
save_data_array[CAUGHT_DATA + (dex_num / 8)] = save_data_array[CAUGHT_DATA + (dex_num / 8)] | (1 << (dex_num % 8));
}

View File

@@ -17,6 +17,7 @@
#include <tonc.h>
int last_error;
bool newPkmn = false;
PokemonTables pokeTable;
PokeBox box(&pokeTable);
@@ -573,7 +574,8 @@ bool run_conditional(int index)
return get_tutorial_flag() && !g_debug_options.force_tutorial;
case COND_NEW_POKEMON:
return box.getHasNewPkmn();
//return box.getHasNewPkmn();
return newPkmn;
case COND_IS_HOENN_RS:
return curr_GBA_rom.is_ruby_sapphire();