added underscore to charmap.txt, updated tools/preproc

This commit is contained in:
cawtds 2024-06-19 19:10:52 +02:00
parent cd9254cd42
commit bd97821ba6
4 changed files with 28 additions and 36 deletions

View File

@ -78,6 +78,7 @@ SUPER_RE = A0
'?' = AC
'.' = AD
'-' = AE
'_' = AE
'·' = AF
'…' = B0
'“' = B1

View File

@ -123,7 +123,7 @@
#define B_HEAL_BELL_SOUNDPROOF GEN_LATEST // In Gen5, Heal Bell affects all mons with Soundproof. In Gen6-8 it affects inactive mons, but not battlers. In Gen9 it always affects the user.
// Ability settings
#define B_EXPANDED_ABILITY_NAMES TRUE // If TRUE, ability names are increased from 12 characters to 16 characters.
#define B_EXPANDED_ABILITY_NAMES FALSE // If TRUE, ability names are increased from 12 characters to 16 characters.
#define B_ABILITY_WEATHER GEN_LATEST // In Gen6+, ability-induced weather lasts 5 turns. Before, it lasted until the battle ended or until it was changed by a move or a different weather-affecting ability.
#define B_GALE_WINGS GEN_LATEST // In Gen7+ requires full HP to trigger.
#define B_STANCE_CHANGE_FAIL GEN_LATEST // In Gen7+, Stance Change fails if the Pokémon is unable to use a move because of confusion, paralysis, etc. In Gen6, it doesn't.

View File

@ -4374,50 +4374,35 @@ static void DebugAction_Sound_MUS_SelectId(u8 taskId)
#undef tInput
#undef tDigit
// #define SOUND_LIST_BGM
// X(MUS_CAUGHT)
#define SOUND_LIST_BGM \
X(MUS_CAUGHT) \
// #define SOUND_LIST_SE
// X(SE_USE_ITEM)
#define SOUND_LIST_SE \
X(SE_USE_ITEM) \
// // Create BGM list
// #define X(songId) static const u8 sBGMName_##songId[] = _(#songId);
// SOUND_LIST_BGM
// #undef X
// #define X(songId) sBGMName_##songId,
// static const u8 *const sBGMNames[] =
// {
// SOUND_LIST_BGM
// };
// #undef X
// // Create SE list
// #define X(songId) static const u8 sSEName_##songId[] = _(#songId);
// SOUND_LIST_SE
// #undef X
// #define X(songId) sSEName_##songId,
// static const u8 *const sSENames[] =
// {
// SOUND_LIST_SE
// };
// #undef X
static const u8 sBGMName_MUS_Caught[] = _("Caught");
// Create BGM list
#define X(songId) static const u8 sBGMName_##songId[] = _(#songId);
SOUND_LIST_BGM
#undef X
#define X(songId) sBGMName_##songId,
static const u8 *const sBGMNames[] =
{
sBGMName_MUS_Caught,
SOUND_LIST_BGM
};
#undef X
static const u8 sSEName_SE_UseItem[] = _("UseItem");
// Create SE list
#define X(songId) static const u8 sSEName_##songId[] = _(#songId);
SOUND_LIST_SE
#undef X
#define X(songId) sSEName_##songId,
static const u8 *const sSENames[] =
{
sSEName_SE_UseItem,
SOUND_LIST_SE
};
#undef X
// *******************************
// Actions Party/Boxes

View File

@ -321,10 +321,10 @@ int ExtractData(const std::unique_ptr<unsigned char[]>& buffer, int offset, int
void CFile::TryConvertIncbin()
{
std::string idents[6] = { "INCBIN_S8", "INCBIN_U8", "INCBIN_S16", "INCBIN_U16", "INCBIN_S32", "INCBIN_U32" };
std::string idents[8] = { "INCBIN_S8", "INCBIN_U8", "INCBIN_S16", "INCBIN_U16", "INCBIN_S32", "INCBIN_U32", "DUMMY_PLACEHOLDER", "INCBIN_COMP"};
int incbinType = -1;
for (int i = 0; i < 6; i++)
for (int i = 0; i < 8; i++)
{
if (CheckIdentifier(idents[i]))
{
@ -337,6 +337,8 @@ void CFile::TryConvertIncbin()
return;
int size = 1 << (incbinType / 2);
if (size > 4)
size = 4;
bool isSigned = ((incbinType % 2) == 0);
long oldPos = m_pos;
@ -389,6 +391,10 @@ void CFile::TryConvertIncbin()
std::string path(&m_buffer[startPos], m_pos - startPos);
// INCBIN_COMP; include *compressed* version of file
if (incbinType == 7)
path = path.append(".lz");
m_pos++;
int fileSize;