Updating Dream Dex

This commit is contained in:
The Gears of Progress 2025-04-06 11:57:37 -04:00
parent 1ee46e1719
commit a278bfb355
18 changed files with 4424 additions and 976 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -8,14 +8,15 @@
#define PRINT_LINK_DATA (false && DEBUG_MODE) // This is currently broken... not sure why
#define INSTANT_TEXT_SPEED (false && DEBUG_MODE)
#define IGNORE_GAME_PAK (false && DEBUG_MODE)
#define IGNORE_GAME_PAK (true && DEBUG_MODE)
#define IGNORE_LINK_CABLE (true && DEBUG_MODE)
#define IGNORE_MG_E4_FLAGS (true && DEBUG_MODE)
#define IGNORE_UNRECEIVED_PKMN (true && DEBUG_MODE)
#define FORCE_TUTORIAL (false && DEBUG_MODE)
#define FORCE_TUTORIAL (true && DEBUG_MODE)
#define DONT_REMOVE_PKMN (false && DEBUG_MODE)
#define DONT_HIDE_INVALID_PKMN (false && DEBUG_MODE)
#define IGNORE_DEX_COMPLETION (false && DEBUG_MODE)
#define FORCE_ALL_CAUGHT (true && DEBUG_MODE)
#define WRITE_CABLE_DATA_TO_SAVE (false && DEBUG_MODE)
#define SHOW_DATA_PACKETS (false && DEBUG_MODE)
#define DISPLAY_CONTROL_CHAR (false && DEBUG_MODE)

View File

@ -18,5 +18,6 @@ bool get_treecko_enabled();
u32 fnv1a_hash(unsigned char* data, size_t length);
int get_string_length(const byte *str);
void convert_int_to_ptgb_str(int val, byte str[]);
void convert_int_to_ptgb_str(int val, byte str[], int min_length);
#endif

View File

@ -45,7 +45,26 @@
#define DIA_END DIA_SIZE
extern const byte *dialogue[DIA_SIZE];
extern const byte option_english[];
extern const byte dia_textGreet_rse[];
extern const byte dia_textGreet_frlg[];
extern const byte dia_textMoveBox_rs[];
extern const byte dia_textMoveBox_frlg[];
extern const byte dia_textMoveBox_e[];
extern const byte dia_textWeHere_r[];
extern const byte dia_textWeHere_s[];
extern const byte dia_textWeHere_frlg[];
extern const byte dia_textWeHere_e[];
extern const byte dia_textRecieved[];
extern const byte dia_textYouMustBe_first[];
extern const byte dia_textYouMustBe_second[];
extern const byte dia_textIAm_first[];
extern const byte dia_textIAm_second[];
extern const byte dia_textPCConvo[];
extern const byte dia_textPCThanks[];
extern const byte dia_textThank[];
extern const byte dia_textPCFull[];
extern const byte dia_textLookerFull[];extern const byte option_english[];
extern const byte option_japanese[];
extern const byte option_spanish[];
extern const byte option_french[];
@ -61,10 +80,15 @@ extern const byte option_silver[];
extern const byte option_crystal[];
extern const byte option_cancel[];
extern const byte press_start[];
extern const byte intro_legal[];
extern const byte option_transfer[];
extern const byte option_dreamdex[];
extern const byte option_credits[];
extern const byte intro_first[];
extern const byte intro_legal[];
extern const byte cart_load_error[];
extern const byte pulled_cart_error[];
extern const byte kanto_name[];
extern const byte johto_name[];
extern const byte credits_page_1[];
extern const byte credits_page_2[];
extern const byte credits_page_3[];

View File

@ -1,4 +1,5 @@
#include <tonc.h>
#include <cmath>
#include "global_frame_controller.h"
#include "random.h"
@ -29,21 +30,18 @@ void global_next_frame()
set_background_pal(0xFF, false, false);
}
oam_copy(oam_mem, obj_buffer, num_sprites);
VBlankIntrWait();
// mmFrame(); //Music
if (global_frame_count % 60 == 0)
{
set_menu_sprite_pal(0);
if (!curr_rom.verify_rom())
{
REG_BG0CNT = (REG_BG0CNT & ~BG_PRIO_MASK) | BG_PRIO(3);
REG_BG1CNT = (REG_BG1CNT & ~BG_PRIO_MASK) | BG_PRIO(2);
REG_BG0CNT = (REG_BG0CNT & ~BG_PRIO_MASK) | BG_PRIO(2);
REG_BG2CNT = (REG_BG2CNT & ~BG_PRIO_MASK) | BG_PRIO(1);
REG_BG2VOFS = 0;
tte_set_pos(40, 24);
create_textbox(5, 3, 80, 80, true);
tte_write("\n\n#{cx:0xF000}The Pok@mon game was\nremoved. Please turn\noff the system and\nrestart the program.");
// obj_hide_multi(testroid, 128);
create_textbox(4, 1, 160, 80, true);
obj_hide_multi(ptgb_logo_l, num_sprites);
ptgb_write(pulled_cart_error, true);
oam_copy(oam_mem, obj_buffer, num_sprites);
while (true)
{
@ -64,6 +62,7 @@ void global_next_frame()
}
}
global_frame_count++;
VBlankIntrWait();
};
int get_frame_count()
@ -277,14 +276,22 @@ int get_string_length(const byte *str)
return size;
}
void convert_int_to_ptgb_str(int val, byte str[])
void convert_int_to_ptgb_str(int val, byte str[], int min_length)
{
int div = 1;
int count = 0;
int num;
bool non_zero = false;
bool first = true;
while (div < val)
// Set it up so the number has all the zeros it needs
for (int i = 0; i < min_length; i++)
{
div *= 10;
}
// Increase it if the number is still larger
while (div <= val)
{
div *= 10;
}
@ -298,8 +305,24 @@ void convert_int_to_ptgb_str(int val, byte str[])
str[count] = num + 0xA1; // 0xA1 is 0 in the chart
count++;
}
else
{
if (!first)
{
str[count] = 0xA1; // 0xA1 is 0 in the chart
count++;
} else {
first = false;
}
}
val %= div;
div /= 10;
}
str[count] = 0xFF;
}
}
void convert_int_to_ptgb_str(int val, byte str[])
{
convert_int_to_ptgb_str(val, str, 0);
}

View File

@ -16,148 +16,148 @@ japanese_smallFont:
.align 2
.global japanese_smallGlyphs @ 4096 unsigned chars
japanese_smallGlyphs:
.word 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xC0FBFFFF,0xB6AAC1FB,0xFFFFFFD9,0xFFFFFFFF
.word 0xDEFFFFFF,0xF5BEBEBE,0xFFFFFFFB,0xFFFFFFFF,0xFFE1FFFF,0xEFDFDFE1,0xFFFFFFF3,0xFFFFFFFF
.word 0xFFE1FFFF,0xEDF3EFE0,0xFFFFFF9E,0xFFFFFFFF,0xA0BBFFFF,0xBABAC1FB,0xFFFFFFD9,0xFFFFFFFF
.word 0xB0DDFFFF,0xEFEEEDAD,0xFFFFFFF3,0xFFFFFFFF,0xC0F7FFFF,0xFEEF81F7,0xFFFFFFC1,0xFFFFFFFF
.word 0xF7EFFFFF,0xF7FBFDFB,0xFFFFFFEF,0xFFFFFFFF,0x86DFFFFF,0xDEDEDEDE,0xFFFFFFED,0xFFFFFFFF
.word 0xE0FFFFFF,0xFEFFFFDF,0xFFFFFFC1,0xFFFFFFFF,0x80F7FFFF,0xFEFEC1EF,0xFFFFFFC1,0xFFFFFFFF
.word 0xFDFDFFFF,0xBDBDFDFD,0xFFFFFFC3,0xFFFFFFFF,0x80DFFFFF,0xDFC3DDC3,0xFFFFFFE7,0xFFFFFFFF
.word 0xDDDDFFFF,0xFDEDDD80,0xFFFFFFC3,0xFFFFFFFF,0xF7E1FFFF,0xFDF3C0FB,0xFFFFFFE3,0xFFFFFFFF
.word 0x00000000,0x00000000,0x00000000,0x00000000,0x3F040000,0x49553E04,0x00000026,0x00000000
.word 0x21000000,0x0A414141,0x00000004,0x00000000,0x001E0000,0x1020201E,0x0000000C,0x00000000
.word 0x001E0000,0x120C101F,0x00000061,0x00000000,0x5F440000,0x45453E04,0x00000026,0x00000000
.word 0x4F220000,0x10111252,0x0000000C,0x00000000,0x3F080000,0x01107E08,0x0000003E,0x00000000
.word 0x08100000,0x08040204,0x00000010,0x00000000,0x79200000,0x21212121,0x00000012,0x00000000
.word 0x1F000000,0x01000020,0x0000003E,0x00000000,0x7F080000,0x01013E10,0x0000003E,0x00000000
.word 0x02020000,0x42420202,0x0000003C,0x00000000,0x7F200000,0x203C223C,0x00000018,0x00000000
.word 0x22220000,0x0212227F,0x0000003C,0x00000000,0x081E0000,0x020C3F04,0x0000001C,0x00000000
.word 0xC0FBFFFF,0xF6FD85FD,0xFFFFFF8E,0xFFFFFFFF,0xC0FBFFFF,0xBFBDC1FD,0xFFFFFFC7,0xFFFFFFFF
.word 0xC0FFFFFF,0xDFBFBFBF,0xFFFFFFE3,0xFFFFFFFF,0xCF80FFFF,0xF7FBFBF7,0xFFFFFFCF,0xFFFFFFFF
.word 0xCBFBFFFF,0xFEFEFEF1,0xFFFFFF81,0xFFFFFFFF,0xB0DBFFFF,0x9DC3DEFD,0xFFFFFFE3,0xFFFFFFFF
.word 0xFE86FFFF,0xFAFAFEFE,0xFFFFFF86,0xFFFFFFFF,0xEDEDFFFF,0xAA9AB4C1,0xFFFFFFCD,0xFFFFFFFF
.word 0xC8FBFFFF,0xAA99BBB3,0xFFFFFF8B,0xFFFFFFFF,0xD5E3FFFF,0xB6B6B6B6,0xFFFFFFD9,0xFFFFFFFF
.word 0x86DEFFFF,0x9AC6DEDE,0xFFFFFFE6,0xFFFFFFFF,0xDBF0FFFF,0xEECEDD9D,0xFFFFFFF1,0xFFFFFFFF
.word 0xEFE3FFFF,0xAEAEEDF7,0xFFFFFFF3,0xFFFFFFFF,0xFBFFFFFF,0xBFDFEEF5,0xFFFFFFFF,0xFFFFFFFF
.word 0xDE86FFFF,0x9AC6DE86,0xFFFFFFE6,0xFFFFFFFF,0xDF83FFFF,0x9DC3DF83,0xFFFFFFC3,0xFFFFFFFF
.word 0x3F040000,0x09027A02,0x00000071,0x00000000,0x3F040000,0x40423E02,0x00000038,0x00000000
.word 0x3F000000,0x20404040,0x0000001C,0x00000000,0x307F0000,0x08040408,0x00000030,0x00000000
.word 0x34040000,0x0101010E,0x0000007E,0x00000000,0x4F240000,0x623C2102,0x0000001C,0x00000000
.word 0x01790000,0x05050101,0x00000079,0x00000000,0x12120000,0x55654B3E,0x00000032,0x00000000
.word 0x37040000,0x5566444C,0x00000074,0x00000000,0x2A1C0000,0x49494949,0x00000026,0x00000000
.word 0x79210000,0x65392121,0x00000019,0x00000000,0x240F0000,0x11312262,0x0000000E,0x00000000
.word 0x101C0000,0x51511208,0x0000000C,0x00000000,0x04000000,0x4020110A,0x00000000,0x00000000
.word 0x21790000,0x65392179,0x00000019,0x00000000,0x207C0000,0x623C207C,0x0000003C,0x00000000
.word 0xD7F1FFFF,0xDA9AC1D7,0xFFFFFFED,0xFFFFFFFF,0xA0BBFFFF,0xB9BAFAF9,0xFFFFFFC3,0xFFFFFFFF
.word 0xE5EDFFFF,0xB2B6AAC9,0xFFFFFFCD,0xFFFFFFFF,0xE0FBFFFF,0xBBFBE0FB,0xFFFFFFC7,0xFFFFFFFF
.word 0xC0EDFFFF,0xFBCDBDAD,0xFFFFFFFB,0xFFFFFFFF,0xC2F7FFFF,0xC3AEAEAC,0xFFFFFFF7,0xFFFFFFFF
.word 0xC7F7FFFF,0xF6C1F7F7,0xFFFFFFF9,0xFFFFFFFF,0xFEE3FFFF,0xDFDFDCE2,0xFFFFFFE1,0xFFFFFFFF
.word 0xDDDDFFFF,0xEFDFDDDD,0xFFFFFFF3,0xFFFFFFFF,0xF7E1FFFF,0xADB3BEC1,0xFFFFFFC3,0xFFFFFFFF
.word 0xC8FBFFFF,0xDAD9BBB3,0xFFFFFFBB,0xFFFFFFFF,0xE7C1FFFF,0xBFBFBDC3,0xFFFFFFC7,0xFFFFFFFF
.word 0xC8FBFFFF,0xBAB9BBB3,0xFFFFFFDB,0xFFFFFFFF,0xC1FBFFFF,0xFBEBC5F3,0xFFFFFFC7,0xFFFFFFFF
.word 0xFBFBFFFF,0xEEEDF1FB,0xFFFFFF9E,0xFFFFFFFF,0xFBFFFFFF,0xCAE1EBC0,0xFFFFFFD1,0xFFFFFFFF
.word 0x280E0000,0x25653E28,0x00000012,0x00000000,0x5F440000,0x46450506,0x0000003C,0x00000000
.word 0x1A120000,0x4D495536,0x00000032,0x00000000,0x1F040000,0x44041F04,0x00000038,0x00000000
.word 0x3F120000,0x04324252,0x00000004,0x00000000,0x3D080000,0x3C515153,0x00000008,0x00000000
.word 0x38080000,0x093E0808,0x00000006,0x00000000,0x011C0000,0x2020231D,0x0000001E,0x00000000
.word 0x22220000,0x10202222,0x0000000C,0x00000000,0x081E0000,0x524C413E,0x0000003C,0x00000000
.word 0x37040000,0x2526444C,0x00000044,0x00000000,0x183E0000,0x4040423C,0x00000038,0x00000000
.word 0x37040000,0x4546444C,0x00000024,0x00000000,0x3E040000,0x04143A0C,0x00000038,0x00000000
.word 0x04040000,0x11120E04,0x00000061,0x00000000,0x04000000,0x351E143F,0x0000002E,0x00000000
.word 0xFFFFFFFF,0xF5DEDEEE,0xFFFFFFFB,0xFFFFFFFF,0xE1FFFFFF,0xEFDFE1FF,0xFFFFFFF3,0xFFFFFFFF
.word 0xF1FFFFFF,0xE1F7E0FF,0xFFFFFFCE,0xFFFFFFFF,0xDBFFFFFF,0xDAE1FBD0,0xFFFFFFE9,0xFFFFFFFF
.word 0xF5FFFFFF,0xEBDDD4E1,0xFFFFFFFB,0xFFFFFFFF,0xF7FFFFFF,0xE3D6D4E2,0xFFFFFFF7,0xFFFFFFFF
.word 0xF7FFFFFF,0xE6F1F7E7,0xFFFFFFF1,0xFFFFFFFF,0xD0FDAFAF,0xEFEEADAD,0xFFFFFFF3,0xFFFFFFFF
.word 0xC0F7AFAF,0xFEEF81F7,0xFFFFFFC1,0xFFFFFFFF,0xF7EFFFFF,0xF7FBADAB,0xFFFFFFEF,0xFFFFFFFF
.word 0x86DFAFAF,0xDEDEDEDE,0xFFFFFFED,0xFFFFFFFF,0xE0FFAFAF,0xFEFFFFDF,0xFFFFFFC1,0xFFFFFFFF
.word 0x80F7AFAF,0xFEFEC1EF,0xFFFFFFC1,0xFFFFFFFF,0xADFDFFFF,0xBDBDFDAD,0xFFFFFFC3,0xFFFFFFFF
.word 0x80DFAFAF,0xDFC3DDC3,0xFFFFFFE7,0xFFFFFFFF,0xDDDDAFAF,0xFDEDDD80,0xFFFFFFC3,0xFFFFFFFF
.word 0x00000000,0x0A212111,0x00000004,0x00000000,0x1E000000,0x10201E00,0x0000000C,0x00000000
.word 0x0E000000,0x1E081F00,0x00000031,0x00000000,0x24000000,0x251E042F,0x00000016,0x00000000
.word 0x0A000000,0x14222B1E,0x00000004,0x00000000,0x08000000,0x1C292B1D,0x00000008,0x00000000
.word 0x08000000,0x190E0818,0x0000000E,0x00000000,0x2F025050,0x10115252,0x0000000C,0x00000000
.word 0x3F085050,0x01107E08,0x0000003E,0x00000000,0x08100000,0x08045254,0x00000010,0x00000000
.word 0x79205050,0x21212121,0x00000012,0x00000000,0x1F005050,0x01000020,0x0000003E,0x00000000
.word 0x7F085050,0x01013E10,0x0000003E,0x00000000,0x52020000,0x42420252,0x0000003C,0x00000000
.word 0x7F205050,0x203C223C,0x00000018,0x00000000,0x22225050,0x0212227F,0x0000003C,0x00000000
.word 0xF7F1AFAF,0xFDF3C0FB,0xFFFFFFE3,0xFFFFFFFF,0xC0FBAFAF,0xF6FD85FD,0xFFFFFF8E,0xFFFFFFFF
.word 0xC0FBAFAF,0xBFBDC1FD,0xFFFFFFC7,0xFFFFFFFF,0xC0FFAFAF,0xDFBFBFBF,0xFFFFFFE3,0xFFFFFFFF
.word 0xCF80AFAF,0xF7FBFBF7,0xFFFFFFCF,0xFFFFFFFF,0xCBFBAFAF,0xFEFEFEF1,0xFFFFFF81,0xFFFFFFFF
.word 0x86DEAFAF,0x9AC6DEDE,0xFFFFFFE6,0xFFFFFFFF,0xDBF0AFAF,0xEECEDD9D,0xFFFFFFF1,0xFFFFFFFF
.word 0xEFF3AFAF,0xAEAEEDF7,0xFFFFFFF3,0xFFFFFFFF,0xABAFFFFF,0xBFDFEEF5,0xFFFFFFFF,0xFFFFFFFF
.word 0xDE86AFAF,0x9AC6DE86,0xFFFFFFE6,0xFFFFFFFF,0x86DE9F9F,0x9AC6DEDE,0xFFFFFFE6,0xFFFFFFFF
.word 0xDBF09F9F,0xEECEDD9D,0xFFFFFFF1,0xFFFFFFFF,0xEFE39F9F,0xAEAEEDF7,0xFFFFFFF3,0xFFFFFFFF
.word 0xCBCFFFFF,0xBFDFEEF5,0xFFFFFFFF,0xFFFFFFFF,0xDEC69F9F,0x9AC6DE86,0xFFFFFFE6,0xFFFFFFFF
.word 0x080E5050,0x020C3F04,0x0000001C,0x00000000,0x3F045050,0x09027A02,0x00000071,0x00000000
.word 0x3F045050,0x40423E02,0x00000038,0x00000000,0x3F005050,0x20404040,0x0000001C,0x00000000
.word 0x307F5050,0x08040408,0x00000030,0x00000000,0x34045050,0x0101010E,0x0000007E,0x00000000
.word 0x79215050,0x65392121,0x00000019,0x00000000,0x240F5050,0x11312262,0x0000000E,0x00000000
.word 0x100C5050,0x51511208,0x0000000C,0x00000000,0x54500000,0x4020110A,0x00000000,0x00000000
.word 0x21795050,0x65392179,0x00000019,0x00000000,0x79216060,0x65392121,0x00000019,0x00000000
.word 0x240F6060,0x11312262,0x0000000E,0x00000000,0x101C6060,0x51511208,0x0000000C,0x00000000
.word 0x34300000,0x4020110A,0x00000000,0x00000000,0x21396060,0x65392179,0x00000019,0x00000000
.word 0xFFFFFFFF,0xF7EFEFF0,0xFFFFFFF9,0xFFFFFFFF,0xBF80FFFF,0xF7F7C7B7,0xFFFFFFF9,0xFFFFFFFF
.word 0xEFDFFFFF,0xF7F7F4F3,0xFFFFFFF7,0xFFFFFFFF,0x80F7FFFF,0xDFBFBEBE,0xFFFFFFE7,0xFFFFFFFF
.word 0xC1FFFFFF,0xF7F7F7F7,0xFFFFFF80,0xFFFFFFFF,0x80EFFFFF,0xEEEDEBE7,0xFFFFFFE7,0xFFFFFFFF
.word 0x81FBFFFF,0xBDBBBBBB,0xFFFFFFCE,0xFFFFFFFF,0x80F7FFFF,0xF780F7F7,0xFFFFFFF7,0xFFFFFFFF
.word 0xDDC1FFFF,0xEFDFDFDE,0xFFFFFFF1,0xFFFFFFFF,0x81FDFFFF,0xEFDFDEDD,0xFFFFFFF3,0xFFFFFFFF
.word 0xDFC0FFFF,0xDFDFDFDF,0xFFFFFFC0,0xFFFFFFFF,0x80DDFFFF,0xDFDFDDDD,0xFFFFFFE3,0xFFFFFFFF
.word 0xBFF1FFFF,0xDFBFBFB1,0xFFFFFFE1,0xFFFFFFFF,0xDFC0FFFF,0xDBE7EFDF,0xFFFFFFBC,0xFFFFFFFF
.word 0x80FDFFFF,0xFDFDDDBD,0xFFFFFFC3,0xFFFFFFFF,0xBEBEFFFF,0xEFDFDFBD,0xFFFFFFF3,0xFFFFFFFF
.word 0x00000000,0x0810100F,0x00000006,0x00000000,0x407F0000,0x08083848,0x00000006,0x00000000
.word 0x10200000,0x08080B0C,0x00000008,0x00000000,0x7F080000,0x20404141,0x00000018,0x00000000
.word 0x3E000000,0x08080808,0x0000007F,0x00000000,0x7F100000,0x11121418,0x00000018,0x00000000
.word 0x7E040000,0x42444444,0x00000031,0x00000000,0x7F080000,0x087F0808,0x00000008,0x00000000
.word 0x223E0000,0x10202021,0x0000000E,0x00000000,0x7E020000,0x10202122,0x0000000C,0x00000000
.word 0x203F0000,0x20202020,0x0000003F,0x00000000,0x7F220000,0x20202222,0x0000001C,0x00000000
.word 0x400E0000,0x2040404E,0x0000001E,0x00000000,0x203F0000,0x24181020,0x00000043,0x00000000
.word 0x7F020000,0x02022242,0x0000003C,0x00000000,0x41410000,0x10202042,0x0000000C,0x00000000
.word 0xBD81FFFF,0xDFBF8EB1,0xFFFFFFE3,0xFFFFFFFF,0xE1CFFFFF,0xF7EF80EF,0xFFFFFFF9,0xFFFFFFFF
.word 0xB5B5FFFF,0xDFBFBFB5,0xFFFFFFE3,0xFFFFFFFF,0xFFC1FFFF,0xEFEFEF80,0xFFFFFFF3,0xFFFFFFFF
.word 0xFBFBFFFF,0xFBFBBBC3,0xFFFFFFFB,0xFFFFFFFF,0x80EFFFFF,0xF7EFEFEF,0xFFFFFFF9,0xFFFFFFFF
.word 0xC1FFFFFF,0xFFFFFFFF,0xFFFFFF80,0xFFFFFFFF,0xDFC0FFFF,0xEBF7EBDF,0xFFFFFFDC,0xFFFFFFFF
.word 0x80F7FFFF,0xB4D3E7DF,0xFFFFFFF7,0xFFFFFFFF,0xDFDFFFFF,0xF3EFEFDF,0xFFFFFFFC,0xFFFFFFFF
.word 0xEDFFFFFF,0xBEBDDDDD,0xFFFFFFBE,0xFFFFFFFF,0xCEFEFFFF,0xFEFEFEF0,0xFFFFFF81,0xFFFFFFFF
.word 0xBF80FFFF,0xEFDFDFBF,0xFFFFFFF3,0xFFFFFFFF,0xFBFFFFFF,0xBFDFEEF5,0xFFFFFFFF,0xFFFFFFFF
.word 0x80F7FFFF,0xB5B5D5F7,0xFFFFFFB6,0xFFFFFFFF,0xBF80FFFF,0xF7EBDDBF,0xFFFFFFEF,0xFFFFFFFF
.word 0x427E0000,0x2040714E,0x0000001C,0x00000000,0x1E300000,0x08107F10,0x00000006,0x00000000
.word 0x4A4A0000,0x2040404A,0x0000001C,0x00000000,0x003E0000,0x1010107F,0x0000000C,0x00000000
.word 0x04040000,0x0404443C,0x00000004,0x00000000,0x7F100000,0x08101010,0x00000006,0x00000000
.word 0x3E000000,0x00000000,0x0000007F,0x00000000,0x203F0000,0x14081420,0x00000023,0x00000000
.word 0x7F080000,0x4B2C1820,0x00000008,0x00000000,0x20200000,0x0C101020,0x00000003,0x00000000
.word 0x12000000,0x41422222,0x00000041,0x00000000,0x31010000,0x0101010F,0x0000007E,0x00000000
.word 0x407F0000,0x10202040,0x0000000C,0x00000000,0x04000000,0x4020110A,0x00000000,0x00000000
.word 0x7F080000,0x4A4A2A08,0x00000049,0x00000000,0x407F0000,0x08142240,0x00000010,0x00000000
.word 0xFFE1FFFF,0xFCFFE3FD,0xFFFFFFC3,0xFFFFFFFF,0xFBFBFFFF,0xBEDDDDFB,0xFFFFFF80,0xFFFFFFFF
.word 0xDBDFFFFF,0xB3CFEFD7,0xFFFFFFFC,0xFFFFFFFF,0xFBC0FFFF,0xFBFB80FB,0xFFFFFF87,0xFFFFFFFF
.word 0x80FBFFFF,0xFBEBDBBB,0xFFFFFFFB,0xFFFFFFFF,0xEFE1FFFF,0x80EFEFEF,0xFFFFFFFF,0xFFFFFFFF
.word 0xBF80FFFF,0xBFBF81BF,0xFFFFFF80,0xFFFFFFFF,0xFFC1FFFF,0xDFBFBF80,0xFFFFFFE3,0xFFFFFFFF
.word 0xDDDDFFFF,0xEFDFDDDD,0xFFFFFFF3,0xFFFFFFFF,0xF5F5FFFF,0xB5F5F5F5,0xFFFFFFC6,0xFFFFFFFF
.word 0xFDFDFFFF,0xE5DDBDFD,0xFFFFFFF9,0xFFFFFFFF,0xBE80FFFF,0x80BEBEBE,0xFFFFFFFF,0xFFFFFFFF
.word 0xBE80FFFF,0xDFBFBFBE,0xFFFFFFE3,0xFFFFFFFF,0xBF80FFFF,0xDFBF81BF,0xFFFFFFE1,0xFFFFFFFF
.word 0xBFB8FFFF,0xDFBFBFBF,0xFFFFFFE0,0xFFFFFFFF,0xFFFFFFFF,0xF3EBEFE0,0xFFFFFFFD,0xFFFFFFFF
.word 0x001E0000,0x03001C02,0x0000003C,0x00000000,0x04040000,0x41222204,0x0000007F,0x00000000
.word 0x24200000,0x4C301028,0x00000003,0x00000000,0x043F0000,0x04047F04,0x00000078,0x00000000
.word 0x7F040000,0x04142444,0x00000004,0x00000000,0x101E0000,0x7F101010,0x00000000,0x00000000
.word 0x407F0000,0x40407E40,0x0000007F,0x00000000,0x003E0000,0x2040407F,0x0000001C,0x00000000
.word 0x22220000,0x10202222,0x0000000C,0x00000000,0x0A0A0000,0x4A0A0A0A,0x00000039,0x00000000
.word 0x02020000,0x1A224202,0x00000006,0x00000000,0x417F0000,0x7F414141,0x00000000,0x00000000
.word 0x417F0000,0x20404041,0x0000001C,0x00000000,0x407F0000,0x20407E40,0x0000001E,0x00000000
.word 0x40470000,0x20404040,0x0000001F,0x00000000,0x00000000,0x0C14101F,0x00000002,0x00000000
.word 0xFFFFFFFF,0xF7F1F7EF,0xFFFFFFF7,0xFFFFFFFF,0xFFFFFFFF,0xF7EEE0FB,0xFFFFFFF9,0xFFFFFFFF
.word 0xFFFFFFFF,0xFBFBF1FF,0xFFFFFFE0,0xFFFFFFFF,0xFFFFFFFF,0xF5F3E0F7,0xFFFFFFF6,0xFFFFFFFF
.word 0xFFFFFFFF,0xF5EDE0FD,0xFFFFFFFD,0xFFFFFFFF,0xFFFFFFFF,0xF7F7F1FF,0xFFFFFFE0,0xFFFFFFFF
.word 0xFFFFFFFF,0xF7F0F7F0,0xFFFFFFF0,0xFFFFFFFF,0x81FBAFAF,0xBDBBBBBB,0xFFFFFFCE,0xFFFFFFFF
.word 0x80F7AFAF,0xF780F7F7,0xFFFFFFF7,0xFFFFFFFF,0xDDC1AFAF,0xEFDFDFDE,0xFFFFFFF1,0xFFFFFFFF
.word 0x81FDAFAF,0xEFDFDEDD,0xFFFFFFF3,0xFFFFFFFF,0xDFC0AFAF,0xDFDFDFDF,0xFFFFFFC0,0xFFFFFFFF
.word 0x80DDAFAF,0xDFDFDDDD,0xFFFFFFE3,0xFFFFFFFF,0xBFF1AFAF,0xDFBFBFB1,0xFFFFFFE1,0xFFFFFFFF
.word 0xDFC0AFAF,0xDBE7EFDF,0xFFFFFFBC,0xFFFFFFFF,0x80FDAFAF,0xFDFDDDBD,0xFFFFFFC3,0xFFFFFFFF
.word 0x00000000,0x080E0810,0x00000008,0x00000000,0x00000000,0x08111F04,0x00000006,0x00000000
.word 0x00000000,0x04040E00,0x0000001F,0x00000000,0x00000000,0x0A0C1F08,0x00000009,0x00000000
.word 0x00000000,0x0A121F02,0x00000002,0x00000000,0x00000000,0x08080E00,0x0000001F,0x00000000
.word 0x00000000,0x080F080F,0x0000000F,0x00000000,0x7E045050,0x42444444,0x00000031,0x00000000
.word 0x7F085050,0x087F0808,0x00000008,0x00000000,0x223E5050,0x10202021,0x0000000E,0x00000000
.word 0x7E025050,0x10202122,0x0000000C,0x00000000,0x203F5050,0x20202020,0x0000003F,0x00000000
.word 0x7F225050,0x20202222,0x0000001C,0x00000000,0x400E5050,0x2040404E,0x0000001E,0x00000000
.word 0x203F5050,0x24181020,0x00000043,0x00000000,0x7F025050,0x02022242,0x0000003C,0x00000000
.word 0xBEFEAFAF,0xEFDFDFBD,0xFFFFFFF3,0xFFFFFFFF,0xBD81AFAF,0xDFBF8EB1,0xFFFFFFE3,0xFFFFFFFF
.word 0xE1CFAFAF,0xF7EF80EF,0xFFFFFFF9,0xFFFFFFFF,0xB5F5AFAF,0xDFBFBFB5,0xFFFFFFE3,0xFFFFFFFF
.word 0xFFC1AFAF,0xEFEFEF80,0xFFFFFFF3,0xFFFFFFFF,0xFBFBAFAF,0xFBFBBBC3,0xFFFFFFFB,0xFFFFFFFF
.word 0xEDFFAFAF,0xBEBDDDDD,0xFFFFFFBE,0xFFFFFFFF,0xCEFEAFAF,0xFEFEFEF0,0xFFFFFF81,0xFFFFFFFF
.word 0xBF80AFAF,0xEFDFDFBF,0xFFFFFFF3,0xFFFFFFFF,0xABAFFFFF,0xBFDFEEF5,0xFFFFFFFF,0xFFFFFFFF
.word 0x80F7AFAF,0xB5B5D5F7,0xFFFFFFB6,0xFFFFFFFF,0xED9F9FFF,0xBEBDDDDD,0xFFFFFFBE,0xFFFFFFFF
.word 0xE69E9FFF,0xFEFEFEF8,0xFFFFFF81,0xFFFFFFFF,0x809F9FFF,0xEFDFDFBF,0xFFFFFFF3,0xFFFFFFFF
.word 0xCBCFFFFF,0xBFDFEEF5,0xFFFFFFFF,0xFFFFFFFF,0x80979FFF,0xB5B5D5F7,0xFFFFFFB6,0xFFFFFFFF
.word 0x41015050,0x10202042,0x0000000C,0x00000000,0x427E5050,0x2040714E,0x0000001C,0x00000000
.word 0x1E305050,0x08107F10,0x00000006,0x00000000,0x4A0A5050,0x2040404A,0x0000001C,0x00000000
.word 0x003E5050,0x1010107F,0x0000000C,0x00000000,0x04045050,0x0404443C,0x00000004,0x00000000
.word 0x12005050,0x41422222,0x00000041,0x00000000,0x31015050,0x0101010F,0x0000007E,0x00000000
.word 0x407F5050,0x10202040,0x0000000C,0x00000000,0x54500000,0x4020110A,0x00000000,0x00000000
.word 0x7F085050,0x4A4A2A08,0x00000049,0x00000000,0x12606000,0x41422222,0x00000041,0x00000000
.word 0x19616000,0x01010107,0x0000007E,0x00000000,0x7F606000,0x10202040,0x0000000C,0x00000000
.word 0x34300000,0x4020110A,0x00000000,0x00000000,0x7F686000,0x4A4A2A08,0x00000049,0x00000000
.word 0xFFFFFFFF,0xF7EFEAEA,0xFFFFFFF9,0xFFFFFFFF,0xE3FFFFFF,0xD99C9CCD,0xFFFFFFE3,0xFFFFFFFF
.word 0xE7FFFFFF,0xE7E7E7E3,0xFFFFFF81,0xFFFFFFFF,0xC1FFFFFF,0xF8E18F9C,0xFFFFFF80,0xFFFFFFFF
.word 0x81FFFFFF,0x9C9FE3CF,0xFFFFFFC1,0xFFFFFFFF,0xC7FFFFFF,0x80CCC9C3,0xFFFFFFCF,0xFFFFFFFF
.word 0xC0FFFFFF,0x9C9FC0FC,0xFFFFFFC1,0xFFFFFFFF,0xC1FFFFFF,0x9C9CC0FC,0xFFFFFFC1,0xFFFFFFFF
.word 0x80FFFFFF,0xF3E7CF9C,0xFFFFFFF3,0xFFFFFFFF,0xC1FFFFFF,0x9C9CC19C,0xFFFFFFC1,0xFFFFFFFF
.word 0xC1FFFFFF,0x9F819C9C,0xFFFFFFC1,0xFFFFFFFF,0xC3C3FFFF,0xE7FFE7C3,0xFFFFFFE7,0xFFFFFFFF
.word 0x98C1FFFF,0xE7FFE78C,0xFFFFFFE7,0xFFFFFFFF,0xFFFFFFFF,0xF5F1FFFF,0xFFFFFFF1,0xFFFFFFFF
.word 0xFFFFFFFF,0xFFFFC0FF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFE7E7FF,0xFFFFFFFF,0xFFFFFFFF
.word 0x00000000,0x08101515,0x00000006,0x00000000,0x1C000000,0x26636332,0x0000001C,0x00000000
.word 0x18000000,0x1818181C,0x0000007E,0x00000000,0x3E000000,0x071E7063,0x0000007F,0x00000000
.word 0x7E000000,0x63601C30,0x0000003E,0x00000000,0x38000000,0x7F33363C,0x00000030,0x00000000
.word 0x3F000000,0x63603F03,0x0000003E,0x00000000,0x3E000000,0x63633F03,0x0000003E,0x00000000
.word 0x7F000000,0x0C183063,0x0000000C,0x00000000,0x3E000000,0x63633E63,0x0000003E,0x00000000
.word 0x3E000000,0x607E6363,0x0000003E,0x00000000,0x3C3C0000,0x1800183C,0x00000018,0x00000000
.word 0x673E0000,0x18001873,0x00000018,0x00000000,0x00000000,0x0A0E0000,0x0000000E,0x00000000
.word 0x00000000,0x00003F00,0x00000000,0x00000000,0x00000000,0x00181800,0x00000000,0x00000000
.word 0xFFFFFFFF,0xFFDDFFFF,0xFFFFFFFF,0xFFFFFFFF,0xBB83FFFF,0xE3EBEB8B,0xFFFFFFFF,0xFFFFFFFF
.word 0xE3FFFFFF,0xEEE8EBEB,0xFFFFFFE0,0xFFFFFFFF,0xEF8FFFFF,0xFFFFEFEF,0xFFFFFFFF,0xFFFFFFFF
.word 0xFFFFFFFF,0xFBFBFBFF,0xFFFFFFF8,0xFFFFFFFF,0xD5E3FFFF,0xDDDDE3F7,0xFFFFFFE3,0xFFFFFFFF
.word 0xDDE3FFFF,0xC1F7E3DD,0xFFFFF7F7,0xFFFFFFFF,0xB680FFFF,0xBEBE80B6,0xFFFFFF9E,0xFFFFFFFF
.word 0xFFFFFFFF,0xF3F3FFFF,0xFFFFFFFF,0xFFFFFFFF,0xDDFFFFFF,0xDDEBF7EB,0xFFFFFFFF,0xFFFFFFFF
.word 0xDFBFFFFF,0xFDFBF7EF,0xFFFFFFFE,0xFFFFFFFF,0xC9E3FFFF,0x9C809C9C,0xFFFFFF9C,0xFFFFFFFF
.word 0x9CC0FFFF,0x9C9CC09C,0xFFFFFFC0,0xFFFFFFFF,0x98C1FFFF,0x98FCFCFC,0xFFFFFFC1,0xFFFFFFFF
.word 0xCCE0FFFF,0xCC9C9C9C,0xFFFFFFE0,0xFFFFFFFF,0xFC80FFFF,0xFCFCC0FC,0xFFFFFF80,0xFFFFFFFF
.word 0x00000000,0x00220000,0x00000000,0x00000000,0x447C0000,0x1C141474,0x00000000,0x00000000
.word 0x1C000000,0x11171414,0x0000001F,0x00000000,0x10700000,0x00001010,0x00000000,0x00000000
.word 0x00000000,0x04040400,0x00000007,0x00000000,0x2A1C0000,0x22221C08,0x0000001C,0x00000000
.word 0x221C0000,0x3E081C22,0x00000808,0x00000000,0x497F0000,0x41417F49,0x00000061,0x00000000
.word 0x00000000,0x0C0C0000,0x00000000,0x00000000,0x22000000,0x22140814,0x00000000,0x00000000
.word 0x20400000,0x02040810,0x00000001,0x00000000,0x361C0000,0x637F6363,0x00000063,0x00000000
.word 0x633F0000,0x63633F63,0x0000003F,0x00000000,0x673E0000,0x67030303,0x0000003E,0x00000000
.word 0x331F0000,0x33636363,0x0000001F,0x00000000,0x037F0000,0x03033F03,0x0000007F,0x00000000
.word 0xFC80FFFF,0xFCFCC0FC,0xFFFFFFFC,0xFFFFFFFF,0xF881FFFF,0x989C8CFC,0xFFFFFF81,0xFFFFFFFF
.word 0x9C9CFFFF,0x9C9C809C,0xFFFFFF9C,0xFFFFFFFF,0xE781FFFF,0xE7E7E7E7,0xFFFFFF81,0xFFFFFFFF
.word 0x9F9FFFFF,0x9C9C9F9F,0xFFFFFFC1,0xFFFFFFFF,0x9C9CFFFF,0x9CCCE0CC,0xFFFFFF9C,0xFFFFFFFF
.word 0xF9F9FFFF,0xF9F9F9F9,0xFFFFFF81,0xFFFFFFFF,0x9CBEFFFF,0x9C948088,0xFFFFFF9C,0xFFFFFFFF
.word 0x989CFFFF,0x8C848090,0xFFFFFF9C,0xFFFFFFFF,0x9CC1FFFF,0x9C9C9C9C,0xFFFFFFC1,0xFFFFFFFF
.word 0x9CC0FFFF,0xFCC09C9C,0xFFFFFFFC,0xFFFFFFFF,0x9CC1FFFF,0xC49C9C9C,0xFFFFFF91,0xFFFFFFFF
.word 0x9CC0FFFF,0xC4E08C9C,0xFFFFFF8C,0xFFFFFFFF,0xCCE1FFFF,0x9C9FC1FC,0xFFFFFFC1,0xFFFFFFFF
.word 0xE781FFFF,0xE7E7E7E7,0xFFFFFFE7,0xFFFFFFFF,0x9C9CFFFF,0x9C9C9C9C,0xFFFFFFC1,0xFFFFFFFF
.word 0x037F0000,0x03033F03,0x00000003,0x00000000,0x077E0000,0x67637303,0x0000007E,0x00000000
.word 0x63630000,0x63637F63,0x00000063,0x00000000,0x187E0000,0x18181818,0x0000007E,0x00000000
.word 0x60600000,0x63636060,0x0000003E,0x00000000,0x63630000,0x63331F33,0x00000063,0x00000000
.word 0x06060000,0x06060606,0x0000007E,0x00000000,0x63410000,0x636B7F77,0x00000063,0x00000000
.word 0x67630000,0x737B7F6F,0x00000063,0x00000000,0x633E0000,0x63636363,0x0000003E,0x00000000
.word 0x633F0000,0x033F6363,0x00000003,0x00000000,0x633E0000,0x3B636363,0x0000006E,0x00000000
.word 0x633F0000,0x3B1F7363,0x00000073,0x00000000,0x331E0000,0x63603E03,0x0000003E,0x00000000
.word 0x187E0000,0x18181818,0x00000018,0x00000000,0x63630000,0x63636363,0x0000003E,0x00000000
.word 0x9C9CFFFF,0xE3C1889C,0xFFFFFFF7,0xFFFFFFFF,0x9C9CFFFF,0x88808094,0xFFFFFF9C,0xFFFFFFFF
.word 0x9C9CFFFF,0x9CC9E3C9,0xFFFFFF9C,0xFFFFFFFF,0x9999FFFF,0xE7E7C399,0xFFFFFFE7,0xFFFFFFFF
.word 0x8F80FFFF,0xF8F1E3C7,0xFFFFFF80,0xFFFFFFFF,0xFFFFFFFF,0x99819FC3,0xFFFFFF83,0xFFFFFFFF
.word 0xF9FFFFFF,0x9999C1F9,0xFFFFFFC1,0xFFFFFFFF,0xFFFFFFFF,0x99F999C3,0xFFFFFFC3,0xFFFFFFFF
.word 0x9FFFFFFF,0x9999839F,0xFFFFFF83,0xFFFFFFFF,0xFFFFFFFF,0xF98199C3,0xFFFFFFC3,0xFFFFFFFF
.word 0xC7FFFFFF,0xF3F3C1F3,0xFFFFFFF3,0xFFFFFFFF,0x83FFFFFF,0x9F839999,0xFFFFFFC1,0xFFFFFFFF
.word 0xF9FFFFFF,0x9999C1F9,0xFFFFFF99,0xFFFFFFFF,0xE7FFFFFF,0xE7E7E7FF,0xFFFFFFE7,0xFFFFFFFF
.word 0xCFFFFFFF,0xCCCFCFFF,0xFFFFFFE1,0xFFFFFFFF,0xF9FFFFFF,0xC9E1C999,0xFFFFFF99,0xFFFFFFFF
.word 0x63630000,0x1C3E7763,0x00000008,0x00000000,0x63630000,0x777F7F6B,0x00000063,0x00000000
.word 0x63630000,0x63361C36,0x00000063,0x00000000,0x66660000,0x18183C66,0x00000018,0x00000000
.word 0x707F0000,0x070E1C38,0x0000007F,0x00000000,0x00000000,0x667E603C,0x0000007C,0x00000000
.word 0x06000000,0x66663E06,0x0000003E,0x00000000,0x00000000,0x6606663C,0x0000003C,0x00000000
.word 0x60000000,0x66667C60,0x0000007C,0x00000000,0x00000000,0x067E663C,0x0000003C,0x00000000
.word 0x38000000,0x0C0C3E0C,0x0000000C,0x00000000,0x7C000000,0x607C6666,0x0000003E,0x00000000
.word 0x06000000,0x66663E06,0x00000066,0x00000000,0x18000000,0x18181800,0x00000018,0x00000000
.word 0x30000000,0x33303000,0x0000001E,0x00000000,0x06000000,0x361E3666,0x00000066,0x00000000
.word 0xF1FFFFFF,0xF3F3F3F3,0xFFFFFFF3,0xFFFFFFFF,0xFFFFFFFF,0x949494C0,0xFFFFFF9C,0xFFFFFFFF
.word 0xFFFFFFFF,0x999999C1,0xFFFFFF99,0xFFFFFFFF,0xFFFFFFFF,0x999999C3,0xFFFFFFC3,0xFFFFFFFF
.word 0xFFFFFFFF,0xC19999C3,0xFFFFFFF9,0xFFFFFFFF,0xFFFFFFFF,0x839999C3,0xFFFFFF9F,0xFFFFFFFF
.word 0xFFFFFFFF,0xF3F3E393,0xFFFFFFF3,0xFFFFFFFF,0xFFFFFFFF,0xCFC1F9C3,0xFFFFFFE1,0xFFFFFFFF
.word 0xF3FFFFFF,0xF3F3F3E1,0xFFFFFFE3,0xFFFFFFFF,0xFFFFFFFF,0x99999999,0xFFFFFF83,0xFFFFFFFF
.word 0xFFFFFFFF,0xC9999999,0xFFFFFFE3,0xFFFFFFFF,0xFFFFFFFF,0x9494949C,0xFFFFFFC8,0xFFFFFFFF
.word 0xFFFFFFFF,0xC9E3C99C,0xFFFFFF9C,0xFFFFFFFF,0xFFFFFFFF,0x9F839999,0xFFFFFFC3,0xFFFFFFFF
.word 0xFFFFFFFF,0xF3E7CF81,0xFFFFFF81,0xFFFFFFFF,0xF1F9FFFF,0xF1E1C1E1,0xFFFFFFF9,0xFFFFFFFF
.word 0x0E000000,0x0C0C0C0C,0x0000000C,0x00000000,0x00000000,0x6B6B6B3F,0x00000063,0x00000000
.word 0x00000000,0x6666663E,0x00000066,0x00000000,0x00000000,0x6666663C,0x0000003C,0x00000000
.word 0x00000000,0x3E66663C,0x00000006,0x00000000,0x00000000,0x7C66663C,0x00000060,0x00000000
.word 0x00000000,0x0C0C1C6C,0x0000000C,0x00000000,0x00000000,0x303E063C,0x0000001E,0x00000000
.word 0x0C000000,0x0C0C0C1E,0x0000001C,0x00000000,0x00000000,0x66666666,0x0000007C,0x00000000
.word 0x00000000,0x36666666,0x0000001C,0x00000000,0x00000000,0x6B6B6B63,0x00000037,0x00000000
.word 0x00000000,0x361C3663,0x00000063,0x00000000,0x00000000,0x607C6666,0x0000003C,0x00000000
.word 0x00000000,0x0C18307E,0x0000007E,0x00000000,0x0E060000,0x0E1E3E1E,0x00000006,0x00000000
.word 0xFFFFFFFF,0xF7FFFFF7,0xFFFFFFFF,0xFFFFFFFF,0xFF99FFFF,0x809CC9E3,0xFFFFFF9C,0xFFFFFFFF
.word 0xFF99FFFF,0x9C9C9CC1,0xFFFFFFC1,0xFFFFFFFF,0xFF99FFFF,0x9C9C9C9C,0xFFFFFFC1,0xFFFFFFFF
.word 0xFF99FFFF,0x99819FC3,0xFFFFFF83,0xFFFFFFFF,0xFF99FFFF,0x999999C3,0xFFFFFFC3,0xFFFFFFFF
.word 0xFF99FFFF,0x99999999,0xFFFFFF83,0xFFFFFFFF,0xF7F7FFFF,0xC9E3C180,0xFFFFFFDD,0xFFFFFFFF
.word 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF
.word 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF
.word 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF
.word 0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF
.word 0x00000000,0x08000008,0x00000000,0x00000000,0x00660000,0x7F63361C,0x00000063,0x00000000
.word 0x00660000,0x6363633E,0x0000003E,0x00000000,0x00660000,0x63636363,0x0000003E,0x00000000
.word 0x00660000,0x667E603C,0x0000007C,0x00000000,0x00660000,0x6666663C,0x0000003C,0x00000000
.word 0x00660000,0x66666666,0x0000007C,0x00000000,0xFFFFFE7C,0xC68339EF,0x0000007C,0x00000000
.word 0x01010000,0x00010101,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000
.word 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000
.word 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000
.word 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000
@}}BLOCK(japanese_small)

View File

@ -154,8 +154,8 @@ latin_shortGlyphs:
.word 0x06060000,0x06060000,0x00000000,0x00000000,0x0E000011,0x111F1111,0x00000011,0x00000000
.word 0x0E000011,0x11111111,0x0000000E,0x00000000,0x11000011,0x11111111,0x0000000E,0x00000000
.word 0x00001100,0x1911111E,0x00000016,0x00000000,0x00001100,0x1111110E,0x0000000E,0x00000000
.word 0x00001100,0x09090909,0x00000016,0x00000000,0x08080000,0x361C3E7F,0x00000022,0x00000000
.word 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000
.word 0x00001100,0x09090909,0x00000016,0x00000000,0x3F3F3E3C,0x0603392F,0x0000003C,0x00000000
.word 0x07070301,0x03060407,0x00000001,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000
.word 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000
.word 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000
.word 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000

View File

@ -150,7 +150,7 @@ void game_load_error(void)
{
REG_BG2CNT = (REG_BG2CNT & ~BG_PRIO_MASK) | BG_PRIO(1);
create_textbox(4, 1, 160, 80, true);
ptgb_write("#{cx:0xF000}The Pok@mon save\nfile was not loaded successfully.\n\nPlease remove and\nreinsert the Game\nPak, and then press the A button.");
ptgb_write(cart_load_error, true);
key_poll();
while (!key_hit(KEY_A))
{
@ -171,7 +171,7 @@ void first_load_message(void)
{
tte_set_pos(8, 0);
tte_set_ink(INK_ROM_COLOR);
ptgb_write("#{cx:0xD000}\n\nHello! Thank you for using\nPok@ Transporter GB!\n\nJust as a word of caution- \nPok@ Transporter GB WILL\nmodify both the GameBoy and GameBoy Advance save files.\n\nPlease note that Pok@\nTransporter GB is still in\nbeta, so save file backups\nare HIGHLY recommended\nbefore using. With that all\nbeing said, please enjoy!\n\n -The Gears of Progress");
ptgb_write(intro_first, true);
while (!key_hit(KEY_A))
{
global_next_frame();
@ -372,9 +372,12 @@ int main(void)
// Set colors based on current ROM
set_background_pal(0, false, false);
// First load message... which apparently was removed at some point?
first_load_message();
// Legal mumbo jumbo
tte_set_margins(8, 8, H_MAX - 8, V_MAX - 8);
tte_set_pos(8, 0); // There's def a way to set this to the "top left corner"
tte_set_pos(8, 8);
tte_set_ink(INK_ROM_COLOR);
ptgb_write(intro_legal, true);
bool wait = true;

View File

@ -151,42 +151,39 @@ void mystery_gift_script::build_script(Pokemon_Party &incoming_box_data)
// À = Player name
// Ň = New line
// ƞ = string terminator
/*
switch (curr_rom.gamecode)
{
case RUBY_ID:
textGreet.set_text(u"When I was young, I traveled the worldŇas a POKéMON TRAINER.");
textMoveBox.set_text(u"ȆÀËOh, of course, I have to unlockŇthe door!");
textWeHere.set_text(u"ȆÀËLOOKER: I am here in Hoenn to findŇthe leader MAXIE.ȼAs well, I am helping my friendŇProfessor FENNEL.ȼThis is why you are here, no?ŇI shall tell her you are ready.ŞCome! Allons y!");
textGreet.set_text(dia_textGreet_rse);
textMoveBox.set_text(dia_textMoveBox_rs);
textWeHere.set_text(dia_textWeHere_r);
break;
case SAPPHIRE_ID:
textGreet.set_text(u"When I was young, I traveled the worldŇas a POKéMON TRAINER.");
textMoveBox.set_text(u"ȆÀËOh, of course, I have to unlockŇthe door!");
textWeHere.set_text(u"ȆÀËLOOKER: I am here in Hoenn to findŇthe leader ARCHIE.ȼAs well, I am helping my friendŇProfessor FENNEL.ȼThis is why you are here, no?ŇI shall tell her you are ready.ŞCome! Allons y!");
textGreet.set_text(dia_textGreet_rse);
textMoveBox.set_text(dia_textMoveBox_rs);
textWeHere.set_text(dia_textWeHere_s);
break;
case FIRERED_ID:
case LEAFGREEN_ID:
textGreet.set_text(u"I may not look like much now,Ňbut when I was younger…");
textMoveBox.set_text(u"ȆÀËOh, of course, I have to moveŇthe boxes!");
textWeHere.set_text(u"ȆÀËLOOKER: I am here in Kanto to findŇthe leader GIOVANNI.ȼAs well, I am helping my friendŇProfessor FENNEL.ȼThis is why you are here, no?ŇI shall tell her you are ready.ŞCome! Allons y!");
textGreet.set_text(dia_textGreet_frlg);
textMoveBox.set_text(dia_textMoveBox_frlg);
textWeHere.set_text(dia_textWeHere_frlg);
break;
case EMERALD_ID:
textGreet.set_text(u"When I was young, I traveled the worldŇas a POKéMON TRAINER.");
textMoveBox.set_text(u"ȆÀËOh, of course, I have to moveŇthe plants!");
textWeHere.set_text(u"ȆÀËLOOKER: I am here in Hoenn to findŇthe leaders MAXIE and ARCHIE.ȼAs well, I am helping my friendŇProfessor FENNEL.ȼThis is why you are here, no?ŇI shall tell her you are ready.ŞCome! Allons y!");
textGreet.set_text(dia_textGreet_rse);
textMoveBox.set_text(dia_textMoveBox_e);
textWeHere.set_text(dia_textWeHere_e);
break;
}
textReceived.set_text(u"ȆÀÁƲÀS POKéMON were sent to theŇPC!");
textYouMustBe.set_text(first_time ? u"Ah! You must be ƲÀ!ŇI was told youd be coming.ȼOh! I still wear my disguise! Pardon!ŇOr, rather, let me introduce myself." : u"Ah, ƲÀ! Welcome back!ŇGood to see you again!ȼOh! I still wear my disguise! Pardon!");
textIAm.set_text(first_time ? u"ȆÀËI am a globe-trotting elite of theŇInternational Police.ȼMy name…ŞAh, no, I shall inform you of myŇcode name only.ȼMy code name, it is LOOKER!" : u"ȆÀËIt is I, globe-trotting elite of theŇInternational Police.ȼMy code name, it is LOOKER!");
textPCConvo.set_text(u"ȆÀÉFENNEL: Ah, LOOKER! I take itŇƲÀ has arrived?ȼȆÀËLOOKER: Indeed! Theyre ready toŇreceive their POKéMON!ȼȆÀÉFENNEL: Excellent! Ill send themŇover momentarily… stand by!"); // ȼDont worry ƲÀ,Ňyou wont have to do a thing!");
textPCThanks.set_text(u"ȆÀÉFENNEL: It looks like everything wasŇsent to your PC successfully!ȼThank you both for your help!");
textThank.set_text(u"ȆÀËThanks for stopping by, ƲÀ!ȼIf youll excuse me, I must returnŇto my disguise.ŞUntil our paths cross again!");
textPCFull.set_text(u"ȆÀÉFENNEL: It seems like the PC is full!ȼGo make some room, and I can sendŇover the rest of your POKéMON.");
textLookerFull.set_text(u"ȆÀËLOOKER: Speak to me again afterŇyouve made room, ƲÀ!ȼIn the meantime, I will return toŇmy disguise.");
*/
textGreet.set_text(option_english);
textReceived.set_text(dia_textRecieved);
textYouMustBe.set_text(first_time ? dia_textYouMustBe_first : dia_textYouMustBe_second);
textIAm.set_text(first_time ? dia_textIAm_first : dia_textIAm_second);
textPCConvo.set_text(dia_textPCConvo); // ȼDont worry ƲÀ,Ňyou wont have to do a thing!");
textPCThanks.set_text(dia_textPCThanks);
textThank.set_text(dia_textThank);
textPCFull.set_text(dia_textPCFull);
textLookerFull.set_text(dia_textLookerFull);
const int movementSlowSpinArray[16] = {
MOVEMENT_ACTION_FACE_LEFT,

View File

@ -9,6 +9,8 @@
#include "global_frame_controller.h"
#include "save_data_manager.h"
#include "button_handler.h"
#include "translated_text.h"
#include "text_engine.h"
Dex dex_array[DEX_MAX];
int dex_shift = 0;
@ -16,7 +18,6 @@ int dex_x_cord = 8;
int speed = 0;
int delay = 0;
int count = 0;
int leading_zeros = 0;
Button kanto_count;
Button johto_count;
int kanto_dex_num;
@ -72,9 +73,32 @@ int pokedex_loop()
{
pokedex_init();
pokedex_show();
bool init = true;
// TODO: For some reason there is screen tearing here. Probably not noticable on console,
// but it should be removed at some point
bool update = true;
byte undiscovered_text[] = {0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xAE, 0xFF};
byte temp_string[4] = {}; // Should never be longer than 4 characters (including endline)
// TODO: For some reason there is screen tearing here. Probably not noticable on console,
// but it should be removed at some point
tte_set_pos(8, 148);
ptgb_write(kanto_name, true);
convert_int_to_ptgb_str(kanto_dex_num, temp_string, 3);
ptgb_write(temp_string, true);
temp_string[0] = 0xBA; // "/"
temp_string[1] = 0xFF;
ptgb_write(temp_string, true);
convert_int_to_ptgb_str(mew_caught ? 151 : 150, temp_string, 3);
ptgb_write(temp_string, true);
tte_set_pos(128, 148);
ptgb_write(johto_name, true);
convert_int_to_ptgb_str(johto_dex_num, temp_string, 3);
ptgb_write(temp_string, true);
temp_string[0] = 0xBA; // "/"
temp_string[1] = 0xFF;
ptgb_write(temp_string, true);
convert_int_to_ptgb_str(celebi_caught ? 100 : 99, temp_string, 3);
ptgb_write(temp_string, true);
while (true)
{
@ -86,6 +110,7 @@ int pokedex_loop()
else if (key_hit(KEY_DOWN) || key_hit(KEY_UP))
{
dex_shift += key_tri_vert();
update = true;
}
else if (key_held(KEY_DOWN) || key_held(KEY_UP))
{
@ -103,6 +128,7 @@ int pokedex_loop()
count++;
}
dex_shift += key_tri_vert();
update = true;
}
}
else
@ -141,10 +167,10 @@ int pokedex_loop()
obj_unhide(up_arrow, 0);
obj_unhide(down_arrow, 0);
}
if ((key_tri_vert() != 0) | init)
int val = key_tri_vert();
if (update)
{
tte_erase_rect(0, 0, 240, 160);
tte_erase_rect(0, 0, 240, 140);
int mythic_skip = 0;
for (int i = 0; i < DEX_MAX; i++)
{
@ -152,45 +178,31 @@ int pokedex_loop()
{
mythic_skip++;
}
tte_set_pos(dex_x_cord + (2 * 8), (i * 8 * 2) + 32);
tte_write(is_caught(dex_shift + i + 1 + mythic_skip) ? "^" : " ");
if (is_caught(dex_shift + i + 1 + mythic_skip))
{
tte_set_pos(dex_x_cord + (1.5 * 8), (i * 8 * 2) + 32);
temp_string[0] = 0xF7;
temp_string[1] = 0xF8;
temp_string[2] = 0xFF;
ptgb_write(temp_string, true);
}
tte_set_pos(dex_x_cord + (3 * 8), (i * 8 * 2) + 32);
tte_write("000");
if (dex_shift + i + 1 + mythic_skip < 10)
{
leading_zeros = 2;
}
else if (dex_shift + i + 1 + mythic_skip < 100)
{
leading_zeros = 1;
}
else
{
leading_zeros = 0;
}
tte_set_pos(dex_x_cord + ((3 + leading_zeros) * 8), (i * 8 * 2) + 32);
tte_write(std::to_string(dex_shift + i + 1 + mythic_skip).c_str());
convert_int_to_ptgb_str(dex_shift + i + 1 + mythic_skip, temp_string, 3);
ptgb_write(temp_string, true);
tte_set_pos(dex_x_cord + (7 * 8), (i * 8 * 2) + 32);
tte_write(is_caught(dex_shift + i + 1 + mythic_skip) ? std::string(NAMES[dex_shift + i + 1 + mythic_skip]).data() : "----------");
ptgb_write(is_caught(dex_shift + i + 1 + mythic_skip) ? PKMN_NAMES[dex_shift + i + 1 + mythic_skip] : undiscovered_text, true);
}
global_next_frame(); // This is a bit silly, but it works. Makes the types one frame off from the text, but that's 'fine'
// Eventually it could be optimized to move the labels around, but this honestly makes the most sense. Less code but one frame different
for (int i = 0; i < DEX_MAX; i++)
{
load_type_sprites(dex_shift + i + 1 + mythic_skip, i, is_caught(dex_shift + i + 1 + mythic_skip));
}
tte_set_pos(8, 152);
tte_write("KANTO:");
tte_set_pos(56 + (8 * kanto_offset), 152);
tte_write(std::to_string(kanto_dex_num).c_str());
tte_write("/");
tte_write(mew_caught ? "151" : "150");
tte_set_pos(128, 152);
tte_write("JOHTO:");
tte_set_pos(176 + (8 * johto_offset), 152);
tte_write(std::to_string(johto_dex_num).c_str());
tte_write("/");
tte_write(celebi_caught ? "100" : "99");
init = false;
update = false;
}
global_next_frame();
}
}

View File

@ -32,7 +32,7 @@ void write_custom_save_data()
bool is_caught(int dex_num)
{
return (((save_data_array[CAUGHT_DATA + (dex_num / 8)]) >> dex_num % 8) & 1);
return (((save_data_array[CAUGHT_DATA + (dex_num / 8)]) >> dex_num % 8) & 1) || FORCE_ALL_CAUGHT;
}
void set_caught(int dex_num)

View File

@ -243,7 +243,7 @@ static int TILE_SW_L_ARR[4] = {TILE_CLEAR, TILE_CLEAR, TILE_SW_4L, TILE_SW_6L};
void add_menu_box(int options, int startTileX, int startTileY)
{
add_menu_box(startTileX, startTileY, MENU_WIDTH * 8, options * 10);
add_menu_box(startTileX, startTileY, (MENU_WIDTH) * 8, options * 10);
}
void add_menu_box(int startTileX, int startTileY, int width, int height)

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,9 @@ import os
from enum import Enum
import json
import requests
from collections import defaultdict
import copy
import math
update = True
@ -43,6 +45,24 @@ engCharArray = [
0x3A, 0xC4, 0xD6, 0xDC, 0xE4, 0xF6, 0xFC, 0x2A, 0x20, 0x20, 0x15E, 0x23C, 0x206, 0x1B2, 0x147, 0x19E,
]
engCharWidthArray = [
0x4, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x0, 0x6, 0x6, 0x6, 0x6, 0x6,
0x8, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x0, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x0,
0x6, 0x6, 0x6, 0x6, 0x6, 0x8, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x9, 0x6, 0x6, 0x0,
0x0, 0x0, 0x0, 0x0, 0xA, 0x8, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x6, 0x6, 0x4, 0x8, 0x8, 0x8, 0x7, 0x8, 0x8, 0x4, 0x6, 0x6, 0x4, 0x4, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x6,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0x7, 0x7, 0x7, 0x2, 0x3, 0x4,
0x5, 0x5, 0x6, 0x7, 0x5, 0x6, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x8, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x4, 0x6, 0x3, 0x6, 0x3,
0x6, 0x6, 0x6, 0x3, 0x3, 0x6, 0x6, 0x6, 0x3, 0x7, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6,
0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6,
0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x4, 0x5, 0x6,
0x4, 0x6, 0x6, 0x6, 0x6, 0x6, 0x5, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x8,
0x3, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x38, 0x0, 0x0, ]
jpnCharArray = [
0x20, 0x3042, 0x3044, 0x3046, 0x3048, 0x304A, 0x304B, 0x304D, 0x304F, 0x3051, 0x3053, 0x3055, 0x3057, 0x3059, 0x305B, 0x305D,
0x305F, 0x3061, 0x3064, 0x3066, 0x3068, 0x306A, 0x306B, 0x306C, 0x306D, 0x306E, 0x306F, 0x3072, 0x3075, 0x3078, 0x307B, 0x307E,
@ -71,82 +91,88 @@ def convertByte(incoming, array):
for pair in charConversionList:
if incoming == ord(pair[0]):
incoming = ord(pair[1])
print(f"Warning! {pair[0]} found, replacing with {pair[1]} !")
#print(f"Warning! {pair[0]} found, replacing with {pair[1]} !")
next_key = max(mainDict[lang.name]["Warnings"].keys(), default =- 1) + 1
mainDict[lang.name]["Warnings"][next_key] = f"Warning! {pair[0]} found, replacing with {pair[1]} !"
index = 0
for val in array:
if val == incoming:
return index
index += 1
print(f"Warning! No match found for char [ {chr(incoming)} ]!")
#print(f"Error! No match found for char [ {chr(incoming)} ]!")
next_key = max(mainDict[lang.name]["Errors"].keys(), default =- 1) + 1
mainDict[lang.name]["Errors"][next_key] = f"Error! No match found for char [ {chr(incoming)} ]!"
return 0
def SplitSentenceIntoLines(sentence, offset, pixelsPerChar, pixelsInLine):
# If we can optimize this to remove the spaces, it could save some space.
# If we can optimize this to remove the spaces, it could save a few bytes.
outStr = ""
currLine = ""
lineCount = 0
currWordIndex = 0
lineLength = 0
spaceLength = 0
words = sentence.split()
while(currWordIndex < len(words)):
word = words[currWordIndex]
wordLength = 0
# print(word)
if(True):
testOut = ((len(currLine + word) + offset) * pixelsPerChar)
# See if the whole sentence is a newline
if (sentence == "Ň"):
outStr += "Ň"
currLine = ""
lineCount += 1
offset = 0
currWordIndex += 1
# Test if the word is too long in general
elif ((len(word) * pixelsPerChar) > pixelsInLine):
print(f"ERROR: Word {word} exceeds alloted length")
currWordIndex += 1
# Test if adding the word will go over our alloted space
elif (((len(currLine + word) + offset) * pixelsPerChar) <= pixelsInLine):
# If not, add the word and increase the index
currLine += (word + " ")
currWordIndex += 1
# We need to move to the next line
# Figure out the length of the word in pixels
for char in word:
if (pixelsPerChar == "Variable Latin Font"):
wordLength += engCharWidthArray[convertByte(ord(char), engCharArray)]
spaceLength = engCharWidthArray[convertByte(ord(' '), engCharArray)]
else:
# Every line should already have a space at the end of it. Remove it here
outStr += (currLine[:-1] + "Ň")
currLine = ""
lineCount += 1
offset = 0
wordLength += pixelsPerChar
spaceLength = pixelsPerChar
# See if the whole sentence is a newline
if (sentence == "Ň"):
outStr += "Ň"
currLine = ""
lineCount += 1
offset = 0
lineLength = 0
currWordIndex += 1
# See if the sentence is a new box
elif(sentence == "Ş" or sentence == "ȼ"):
outStr += sentence
currLine = ""
offset = 0
lineLength = 0
currWordIndex += 1
# Test if the word is too long in general
elif (wordLength > pixelsInLine):
#print(f"ERROR: Word {word} exceeds alloted length")
next_key = max(mainDict[lang.name]["Errors"].keys(), default =- 1) + 1
mainDict[lang.name]["Errors"][next_key] = f"ERROR: Word {word} exceeds alloted length"
currWordIndex += 1
# Test if adding the word will go over our alloted space
elif ((wordLength + lineLength + offset) <= pixelsInLine):
# If not, add the word and increase the index
currLine += (word + " ")
lineLength += (wordLength + spaceLength)
currWordIndex += 1
# We need to move to the next line
else:
if (word[0] == "Ň"):
if (prevLineLen >= charPerLine + 1):
word = word[1:] # Remove the newline since we just added one
else:
lineCount += 1
currLine = word + " "
offset = 0
prevLineLen = len(currLine)
word = word[1:] # Set up remaining line
elif ((len(currLine + word) + offset) < charPerLine):
currLine += word + " "
elif ((len(currLine + word) + offset) == charPerLine):
currLine += word
else:
if (len(currLine) != 0 and currLine[-1] == " "):
currLine = currLine[:-1]
outStr += currLine + "Ň" # Newline character
lineCount += 1
prevLineLen = len(currLine)
currLine = word + " "
offset = 0
# Every line should already have a space at the end of it. Remove it here
outStr += (currLine[:-1] + "Ň")
currLine = ""
lineCount += 1
lineLength = 0
offset = 0
outStr += currLine
return len(currLine) + offset, lineCount, outStr
return lineLength + offset, lineCount, outStr
# -*- coding: utf-8 -*-
import re
@ -201,14 +227,21 @@ def split_into_sentences(text: str) -> list[str]:
text = text.replace("","<stop>") # Added for Japanese support
text = text.replace("<prd>",".")
text = text.replace("Ň", "<stop>Ň<stop>") # Split newlines into their own sentences
text = text.replace("ȼ", "<stop>ȼ<stop>") # Split new boxes into their own sentences
text = text.replace("Ş", "<stop>Ş<stop>") # Split new boxes into their own sentences
sentences = text.split("<stop>")
sentences = [s.strip() for s in sentences]
if sentences and not sentences[-1]: sentences = sentences[:-1]
return sentences
class Languages(Enum):
English = 1
Japanese = 0
English = 1
French = 2
German = 3
Italian = 4
SpanishEU = 5
SpanishLA = 6
# read by default 1st sheet of an excel file
dir = os.curdir + "\\text_helper"
@ -223,11 +256,16 @@ for lang in Languages:
"GENERAL": {},
"CREDITS": {},
"PKMN_NAMES": {},
"Warnings" : {},
"Errors": {},
}
textDict = copy.deepcopy(mainDict)
def convert_item(line, numLines, pixelsInLine, include_box_breaks):
def convert_item(ogDict):
line = ogDict["bytes"]
numLines = ogDict["numLines"]
pixelsPerChar = ogDict["pixelsPerChar"]
pixelsInLine = ogDict["pixelsInLine"]
include_box_breaks = ogDict["includeBoxBreaks"]
split_sents = split_into_sentences(line)
index = 0
outStr = ""
@ -235,9 +273,16 @@ def convert_item(line, numLines, pixelsInLine, include_box_breaks):
offset = 0
escapeCount = 0
while index < len(split_sents) and escapeCount < 100:
offset, recievedLine, out = SplitSentenceIntoLines(split_sents[index], offset, 6, pixelsInLine)
offset, recievedLine, out = SplitSentenceIntoLines(split_sents[index], offset, pixelsPerChar, pixelsInLine)
currLine += recievedLine
if (currLine < numLines):
if (out == "ȼ"):
offset = 0
currLine = 0
outStr = outStr[:-1]
outStr += "ȼ"
index += 1
elif (currLine < numLines):
#print(split_sents[index])
index += 1
outStr += out
@ -249,9 +294,15 @@ def convert_item(line, numLines, pixelsInLine, include_box_breaks):
escapeCount += 1
#print(index)
if not include_box_breaks:
print(f"ERROR! Made a line break when disabled, sentence \"{outStr}\" is too long!")
#print(f"ERROR! Made a line break when disabled, sentence \"{outStr}\" is too long!")
next_key = max(mainDict[lang.name]["Errors"].keys(), default =- 1) + 1
mainDict[lang.name]["Errors"][next_key] = f"ERROR! Made a line break when disabled, sentence \"{outStr}\" is too long!"
if escapeCount == 100:
print(f"ERROR! Sentence \"{out}\" is too long!")
#print(f"ERROR! Sentence \"{out}\" is too long!")
next_key = max(mainDict[lang.name]["Errors"].keys(), default =- 1) + 1
mainDict[lang.name]["Errors"][next_key] = f"ERROR! Sentence \"{out}\" is too long!"
# Some cases that should be fixed
exitLoop = False
while(not exitLoop):
@ -262,6 +313,12 @@ def convert_item(line, numLines, pixelsInLine, include_box_breaks):
newStr = newStr.replace("ȼŇ", "ȼ")
# Nor should newlines be right before a new textbox
newStr = newStr.replace("Ňȼ", "ȼ")
# Nor should a new textbox be after a new textbox
newStr = newStr.replace("ȼȼ", "ȼ")
# Nor should a new scroll be after a new textbox
newStr = newStr.replace("Şȼ", "Ş")
# Nor should a new scroll be after a new textbox
newStr = newStr.replace("ȼŞ", "ȼ")
exitLoop = (newStr == outStr)
outStr = newStr
@ -277,20 +334,28 @@ def convert_item(line, numLines, pixelsInLine, include_box_breaks):
byteStr += hex(convertByte(ord(outStr[-1]), arr)) + ", "
byteStr += "0xff"
return byteStr
ogDict["bytes"] = byteStr
return ogDict
print("\n\nStarting parse: \n")
sheets = []
for lang in Languages:
sheets.append(pd.read_excel(dir + "\\text.xlsx", sheet_name=lang.name))
for sheet in sheets:
for row in sheet.iterrows():
currRow = row[1]
#print(currRow)
mainDict[lang.name][currRow.iloc[0]][currRow.iloc[1]] = currRow.iloc[2]
currSheet = pd.read_excel(dir + "\\text.xlsx", sheet_name="Translations")
for row in currSheet.iterrows():
#print(row)
for lang in Languages:
currRow = row[1]
#print(currRow)
offset = lang.value
if (pd.isna(currRow.iloc[7 + lang.value])):
offset = Languages.English.value
mainDict[lang.name][currRow.iloc[0]][currRow.iloc[1]] = {"bytes": currRow.iloc[7 + offset],
"numLines": currRow.iloc[2],
"pixelsPerChar": currRow.iloc[3],
"pixelsInLine" : currRow.iloc[4],
"includeBoxBreaks": currRow.iloc[5],
}
with open(os.curdir + '\\source\\translated_text.cpp', 'w') as cppFile:
cppFile.write("#include \"translated_text.h\"\n#include \"debug_mode.h\"\n#include \"pokemon_data.h\"\n")
for lang in Languages: # putting this here is a really silly way to loop through all the CPP values but only write to H once
@ -298,14 +363,15 @@ with open(os.curdir + '\\source\\translated_text.cpp', 'w') as cppFile:
hFile.write("#ifndef DIALOGUE_H\n#define DIALOGUE_H\n\n#include <string>\n#include <tonc.h>\n\n")
cppFile.write(f"#if PTGB_BUILD_LANGUAGE == {lang.value + 1}\n")
# PTGB
PTGB = mainDict[lang.name]["PTGB"]
num = 0
for key, line in PTGB.items():
#print("--------")
PTGB[key] = convert_item(line, 4, 224, True)
cppFile.write("\nconst byte dialogueLine" + str(num) + "[] = {" + PTGB[key] + "};")
PTGB[key] = convert_item(line)
cppFile.write("\nconst byte dialogueLine" + str(num) + "[] = {" + PTGB[key]["bytes"] + "};")
hFile.write(f"#define {key} {num}\n")
num += 1
@ -319,24 +385,24 @@ with open(os.curdir + '\\source\\translated_text.cpp', 'w') as cppFile:
hFile.write("extern const byte *dialogue[DIA_SIZE];\n")
# RSEFRLG
# RSEFRLG = mainDict[lang.name]["RSEFRLG"]
# for key, line in RSEFRLG.items():
# RSEFRLG[key] = convert_item(line, 2, , False)
# cppFile.write(f"\nconst byte {key}[] = {{{RSEFRLG[key]}}};")
# hFile.write(f"\nextern const byte {key}[];")
RSEFRLG = mainDict[lang.name]["RSEFRLG"]
for key, line in RSEFRLG.items():
RSEFRLG[key] = convert_item(line)
cppFile.write(f"\nconst byte {key}[] = {{{RSEFRLG[key]["bytes"]}}};")
hFile.write(f"\nextern const byte {key}[];")
# General
GENERAL = mainDict[lang.name]["GENERAL"]
for key, line in GENERAL.items():
GENERAL[key] = convert_item(line, 16, 240, False) # TODO This should not be for *every* item
cppFile.write(f"const byte {key}[] = {{{GENERAL[key]}}};\n")
GENERAL[key] = convert_item(line)
cppFile.write(f"const byte {key}[] = {{{GENERAL[key]["bytes"]}}};\n")
hFile.write(f"extern const byte {key}[];\n")
# Credits
CREDITS = mainDict[lang.name]["CREDITS"]
for key, line in CREDITS.items():
CREDITS[key] = convert_item(line, 8, 160, False)
cppFile.write(f"const byte {key}[] = {{{CREDITS[key]}}};\n")
CREDITS[key] = convert_item(line)
cppFile.write(f"const byte {key}[] = {{{CREDITS[key]["bytes"]}}};\n")
hFile.write(f"extern const byte {key}[];\n")
cppFile.write("\n")
@ -346,8 +412,8 @@ with open(os.curdir + '\\source\\translated_text.cpp', 'w') as cppFile:
num = 0
for key, line in PKMN_NAMES.items():
#print("--------")
PKMN_NAMES[key] = convert_item(line, 4, 240, True)
cppFile.write("const byte PKMN_NAMES" + str(num) + "[] = {" + PKMN_NAMES[key] + "};\n")
PKMN_NAMES[key] = convert_item(line)
cppFile.write("const byte PKMN_NAMES" + str(num) + "[] = {" + PKMN_NAMES[key]["bytes"] + "};\n")
num += 1
cppFile.write("\n")
@ -369,9 +435,9 @@ with open(os.curdir + '\\source\\translated_text.cpp', 'w') as cppFile:
for lang in Languages:
for cat in mainDict[lang.name]:
if cat in {"PTGB", "GENERAL", "CREDITS", "PKMN_NAMES"}:
if cat in {"PTGB", "RSEFRLG", "GENERAL", "CREDITS", "PKMN_NAMES"}:
for item in mainDict[lang.name][cat]:
string = mainDict[lang.name][cat][item].split(", ")
string = mainDict[lang.name][cat][item]["bytes"].split(", ")
outText = ""
if lang == Languages.Japanese:
arr = jpnCharArray
@ -380,10 +446,8 @@ for lang in Languages:
for byte in string:
byte = engCharArray[int(byte, 0)]
outText += chr(byte)
textDict[lang.name][cat][item] = outText
mainDict[lang.name][cat][item]["text"] = outText
with open(dir + '\\output.json', 'w') as jsonFile:
finalDict = {"dataDict": mainDict, "ogText": textDict}
jsonFile.write(json.dumps(finalDict))
jsonFile.write(json.dumps(mainDict))

File diff suppressed because one or more lines are too long

Binary file not shown.