diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/battle_anim_flying.c | 475 | ||||
-rw-r--r-- | src/battle_controller_player.c | 12 | ||||
-rw-r--r-- | src/battle_message.c | 2 | ||||
-rw-r--r-- | src/battle_script_commands.c | 8 | ||||
-rwxr-xr-x | src/berry_crush.c | 2 | ||||
-rw-r--r-- | src/data/union_room.h | 12 | ||||
-rw-r--r-- | src/dynamic_placeholder_text_util.c | 2 | ||||
-rw-r--r-- | src/international_string_util.c | 2 | ||||
-rw-r--r-- | src/link_rfu_3.c | 6 | ||||
-rw-r--r-- | src/mauville_old_man.c | 2 | ||||
-rw-r--r-- | src/menu_specialized.c | 42 | ||||
-rw-r--r-- | src/pokeblock.c | 4 | ||||
-rw-r--r-- | src/pokedex.c | 2 | ||||
-rw-r--r-- | src/pokemon_storage_system.c | 34 | ||||
-rw-r--r-- | src/pokemon_summary_screen.c | 6 | ||||
-rw-r--r-- | src/pokenav_conditions_1.c | 44 | ||||
-rw-r--r-- | src/pokenav_conditions_2.c | 8 | ||||
-rw-r--r-- | src/pokenav_conditions_3.c | 2 | ||||
-rw-r--r-- | src/pokenav_ribbons_1.c | 2 | ||||
-rw-r--r-- | src/pokenav_ribbons_2.c | 2 | ||||
-rw-r--r-- | src/strings.c | 76 | ||||
-rwxr-xr-x | src/union_room_chat.c | 14 | ||||
-rw-r--r-- | src/unk_text_util_2.c | 36 |
23 files changed, 384 insertions, 411 deletions
diff --git a/src/battle_anim_flying.c b/src/battle_anim_flying.c index 5179c1364..b4454b2e7 100644 --- a/src/battle_anim_flying.c +++ b/src/battle_anim_flying.c @@ -380,21 +380,18 @@ static void AnimTask_AnimateGustTornadoPalette_Step(u8 taskId) { u8 data2; u16 temp; - int i, base; if (gTasks[taskId].data[10]++ == gTasks[taskId].data[1]) { + int i, base; gTasks[taskId].data[10] = 0; data2 = gTasks[taskId].data[2]; temp = gPlttBufferFaded[16 * data2 + 0x108]; i = 7; base = data2 * 16; - do - { + for (; i > 0; --i) gPlttBufferFaded[base + 0x101 + i] = gPlttBufferFaded[base + 0x100 + i]; - i--; - } while (i > 0); gPlttBufferFaded[base + 0x101] = temp; } @@ -536,17 +533,16 @@ static void AnimFlyBallAttack_Step(struct Sprite *sprite) void DestroyAnimSpriteAfterTimer(struct Sprite *sprite) { - if (sprite->data[0]-- <= 0) + if (sprite->data[0]-- > 0) + return; + if (sprite->oam.affineMode & ST_OAM_AFFINE_ON_MASK) { - if (sprite->oam.affineMode & ST_OAM_AFFINE_ON_MASK) - { - FreeOamMatrix(sprite->oam.matrixNum); - sprite->oam.affineMode = ST_OAM_AFFINE_OFF; - } - - DestroySprite(sprite); - gAnimVisualTaskCount--; + FreeOamMatrix(sprite->oam.matrixNum); + sprite->oam.affineMode = ST_OAM_AFFINE_OFF; } + + DestroySprite(sprite); + gAnimVisualTaskCount--; } struct FeatherDanceData @@ -570,30 +566,27 @@ struct FeatherDanceData static void AnimFallingFeather(struct Sprite *sprite) { u8 battler, matrixNum, sinIndex; - s16 spriteCoord, sinVal; + s16 sinVal; struct FeatherDanceData *data = (struct FeatherDanceData *)sprite->data; - if (gBattleAnimArgs[7] & 0x100) - battler = gBattleAnimAttacker; - else - battler = gBattleAnimTarget; + battler = (gBattleAnimArgs[7] & 0x100) ? gBattleAnimAttacker : gBattleAnimTarget; if (GetBattlerSide(battler) == B_SIDE_PLAYER) gBattleAnimArgs[0] = -gBattleAnimArgs[0]; sprite->pos1.x = GetBattlerSpriteCoord(battler, BATTLER_COORD_ATTR_HEIGHT) + gBattleAnimArgs[0]; - spriteCoord = GetBattlerSpriteCoord(battler, BATTLER_COORD_ATTR_WIDTH); - sprite->pos1.y = spriteCoord + gBattleAnimArgs[1]; + sinVal = GetBattlerSpriteCoord(battler, BATTLER_COORD_ATTR_WIDTH); + sprite->pos1.y = sinVal + gBattleAnimArgs[1]; - data->unk8 = sprite->pos1.y << 8; - data->unkE_1 = spriteCoord + gBattleAnimArgs[6]; + data->unk8 = (u16)(sprite->pos1.y) << 8; + data->unkE_1 = (u16)(sinVal + gBattleAnimArgs[6]); data->unk0_0c = 1; - data->unk2 = gBattleAnimArgs[2] & 0xFF; - data->unkA = (gBattleAnimArgs[2] >> 8) & 0xFF; + data->unk2 = (u16)(gBattleAnimArgs[2] & 0xFF); + data->unkA = (u16)((gBattleAnimArgs[2] >> 8) & 0xFF) ; data->unk4 = gBattleAnimArgs[3]; - data->unk6 = gBattleAnimArgs[4]; - *(u16*)(data->unkC) = gBattleAnimArgs[5]; + data->unk6 = (u16)gBattleAnimArgs[4]; + *(u16*)(data->unkC) = (u16)gBattleAnimArgs[5]; if (data->unk2 >= 64 && data->unk2 <= 191) { @@ -628,27 +621,16 @@ static void AnimFallingFeather(struct Sprite *sprite) } } - data->unk0_1 = data->unk2 >> 6; - sprite->pos2.x = (gSineTable[data->unk2] * data->unkC[0]) >> 8; + data->unk0_1 = data->unk2/64; + sprite->pos2.x = (gSineTable[data->unk2] * (s32)data->unkC[0]) >> 8; matrixNum = sprite->oam.matrixNum; sinIndex = (-sprite->pos2.x >> 1) + data->unkA; sinVal = gSineTable[sinIndex]; gOamMatrices[matrixNum].a = gOamMatrices[matrixNum].d = gSineTable[sinIndex + 64]; - // The comparison below is completely pointless. 'sprite' is sure to be a valid pointer and - // both the 'if' and 'else' parts are exactly the same. - // The only reason for this is making sure the compiler generates the exact ASM. - if (sprite) - { - gOamMatrices[matrixNum].b = sinVal; - gOamMatrices[matrixNum].c = -sinVal; - } - else - { - gOamMatrices[matrixNum].b = sinVal; - gOamMatrices[matrixNum].c = -sinVal; - } + gOamMatrices[matrixNum].b = sinVal; + gOamMatrices[matrixNum].c = -sinVal; sprite->callback = sub_810E520; } @@ -665,242 +647,239 @@ static void sub_810E520(struct Sprite *sprite) data->unk0_0a = 0; data->unk1 = 0; } + return; } - else + + switch (data->unk2 / 64) { - switch (data->unk2 / 64) + case 0: + if ((u8)data->unk0_1 == 1) // this must be cast to u8 { - case 0: - if (data->unk0_1 << 24 >> 24 == 1) // the shifts have to be here - { - data->unk0_0d = 1; - data->unk0_0a = 1; - data->unk1 = 0; - } - else if (data->unk0_1 << 24 >> 24 == 3) - { - data->unk0_0b ^= 1; - data->unk0_0a = 1; - data->unk1 = 0; - } - else if (data->unk0_0d) + data->unk0_0d = 1; + data->unk0_0a = 1; + data->unk1 = 0; + } + else if ((u8)data->unk0_1 == 3) + { + data->unk0_0b ^= 1; + data->unk0_0a = 1; + data->unk1 = 0; + } + else if (data->unk0_0d) + { + sprite->hFlip ^= 1; + sprite->animNum = sprite->hFlip; + sprite->animBeginning = TRUE; + sprite->animEnded = FALSE; + if (data->unk0_0c) { - sprite->hFlip ^= 1; - sprite->animNum = sprite->hFlip; - sprite->animBeginning = TRUE; - sprite->animEnded = FALSE; - if (data->unk0_0c) + if (!IsContest()) { - if (!IsContest()) + if (!data->unkE_0) { - if (!data->unkE_0) - { - sprite->oam.priority--; - data->unkE_0 ^= 1; - } - else - { - sprite->oam.priority++; - data->unkE_0 ^= 1; - } + sprite->oam.priority--; + data->unkE_0 ^= 1; } else { - if (!data->unkE_0) - { - sprite->subpriority -= 12; - data->unkE_0 ^= 1; - } - else - { - sprite->subpriority += 12; - data->unkE_0 ^= 1; - } + sprite->oam.priority++; + data->unkE_0 ^= 1; } } - data->unk0_0d = 0; - data->unk2; - } - data->unk0_1 = 0; - break; - case 1: - if (data->unk0_1 << 24 >> 24 == 0) - { - data->unk0_0d = 1; - data->unk0_0a = 1; - data->unk1 = 0; - } - else if (data->unk0_1 << 24 >> 24 == 2) - { - data->unk0_0a = 1; - data->unk1 = 0; - } - else if (data->unk0_0d) - { - sprite->hFlip ^= 1; - sprite->animNum = sprite->hFlip; - sprite->animBeginning = TRUE; - sprite->animEnded = FALSE; - if (data->unk0_0c) + else { - if (!IsContest()) + if (!data->unkE_0) { - if (!data->unkE_0) - { - sprite->oam.priority--; - data->unkE_0 ^= 1; - } - else - { - sprite->oam.priority++; - data->unkE_0 ^= 1; - } + sprite->subpriority -= 12; + data->unkE_0 ^= 1; } else { - if (!data->unkE_0) - { - sprite->subpriority -= 12; - data->unkE_0 ^= 1; - } - else - { - sprite->subpriority += 12; - data->unkE_0 ^= 1; - } + sprite->subpriority += 12; + data->unkE_0 ^= 1; } } - data->unk0_0d = 0; - } - data->unk0_1 = 1; - break; - case 2: - if (data->unk0_1 << 24 >> 24 == 3) - { - data->unk0_0d = 1; - data->unk0_0a = 1; - data->unk1 = 0; - } - else if (data->unk0_1 << 24 >> 24 == 1) - { - data->unk0_0a = 1; - data->unk1 = 0; } - else if (data->unk0_0d) + data->unk0_0d = 0; + data->unk2; + } + data->unk0_1 = 0; + break; + case 1: + if ((u8)data->unk0_1 == 0) + { + data->unk0_0d = 1; + data->unk0_0a = 1; + data->unk1 = 0; + } + else if ((u8)data->unk0_1 == 2) + { + data->unk0_0a = 1; + data->unk1 = 0; + } + else if (data->unk0_0d) + { + sprite->hFlip ^= 1; + sprite->animNum = sprite->hFlip; + sprite->animBeginning = TRUE; + sprite->animEnded = FALSE; + if (data->unk0_0c) { - sprite->hFlip ^= 1; - sprite->animNum = sprite->hFlip; - sprite->animBeginning = TRUE; - sprite->animEnded = FALSE; - if (data->unk0_0c) + if (!IsContest()) { - if (!IsContest()) + if (!data->unkE_0) { - if (!data->unkE_0) - { - sprite->oam.priority--; - data->unkE_0 ^= 1; - } - else - { - sprite->oam.priority++; - data->unkE_0 ^= 1; - } + sprite->oam.priority--; + data->unkE_0 ^= 1; } else { - if (!data->unkE_0) - { - sprite->subpriority -= 12; - data->unkE_0 ^= 1; - } - else - { - sprite->subpriority += 12; - data->unkE_0 ^= 1; - } + sprite->oam.priority++; + data->unkE_0 ^= 1; + } + } + else + { + if (!data->unkE_0) + { + sprite->subpriority -= 12; + data->unkE_0 ^= 1; + } + else + { + sprite->subpriority += 12; + data->unkE_0 ^= 1; } } - data->unk0_0d = 0; - } - data->unk0_1 = 2; - break; - case 3: - if (data->unk0_1 << 24 >> 24 == 2) - { - data->unk0_0d = 1; } - else if (data->unk0_1 << 24 >> 24 == 0) + data->unk0_0d = 0; + } + data->unk0_1 = 1; + break; + case 2: + if ((u8)data->unk0_1 == 3) + { + data->unk0_0d = 1; + data->unk0_0a = 1; + data->unk1 = 0; + } + else if ((u8)data->unk0_1 == 1) + { + data->unk0_0a = 1; + data->unk1 = 0; + } + else if (data->unk0_0d) + { + sprite->hFlip ^= 1; + sprite->animNum = sprite->hFlip; + sprite->animBeginning = TRUE; + sprite->animEnded = FALSE; + if (data->unk0_0c) { - data->unk0_0b ^= 1; - data->unk0_0a = 1; - data->unk1 = 0; + if (!IsContest()) + { + if (!data->unkE_0) + { + sprite->oam.priority--; + data->unkE_0 ^= 1; + } + else + { + sprite->oam.priority++; + data->unkE_0 ^= 1; + } + } + else + { + if (!data->unkE_0) + { + sprite->subpriority -= 12; + data->unkE_0 ^= 1; + } + else + { + sprite->subpriority += 12; + data->unkE_0 ^= 1; + } + } } - else if (data->unk0_0d) + data->unk0_0d = 0; + } + data->unk0_1 = 2; + break; + case 3: + if ((u8)data->unk0_1 == 2) + { + data->unk0_0d = 1; + } + else if ((u8)data->unk0_1 == 0) + { + data->unk0_0b ^= 1; + data->unk0_0a = 1; + data->unk1 = 0; + } + else if (data->unk0_0d) + { + sprite->hFlip ^= 1; + sprite->animNum = sprite->hFlip; + sprite->animBeginning = TRUE; + sprite->animEnded = FALSE; + if (data->unk0_0c) { - sprite->hFlip ^= 1; - sprite->animNum = sprite->hFlip; - sprite->animBeginning = TRUE; - sprite->animEnded = FALSE; - if (data->unk0_0c) + if (!IsContest()) + { + if (!data->unkE_0) + { + sprite->oam.priority--; + data->unkE_0 ^= 1; + } + else + { + sprite->oam.priority++; + data->unkE_0 ^= 1; + } + } + else { - if (!IsContest()) + if (!data->unkE_0) { - if (!data->unkE_0) - { - sprite->oam.priority--; - data->unkE_0 ^= 1; - } - else - { - sprite->oam.priority++; - data->unkE_0 ^= 1; - } + sprite->subpriority -= 12; + data->unkE_0 ^= 1; } else { - if (!data->unkE_0) - { - sprite->subpriority -= 12; - data->unkE_0 ^= 1; - } - else - { - sprite->subpriority += 12; - data->unkE_0 ^= 1; - } + sprite->subpriority += 12; + data->unkE_0 ^= 1; } } - data->unk0_0d = 0; } - data->unk0_1 = 3; - break; + data->unk0_0d = 0; } - #ifndef NONMATCHING - asm("":::"r8"); - #endif - sprite->pos2.x = (data->unkC[data->unk0_0b] * gSineTable[data->unk2]) >> 8; - matrixNum = sprite->oam.matrixNum; + data->unk0_1 = 3; + break; + } - sinIndex = (-sprite->pos2.x >> 1) + data->unkA; - sinVal = gSineTable[sinIndex]; + sprite->pos2.x = ((s32)(data->unkC[data->unk0_0b]) * gSineTable[data->unk2]) >> 8; + matrixNum = sprite->oam.matrixNum; - gOamMatrices[matrixNum].a = gOamMatrices[matrixNum].d = gSineTable[sinIndex + 64]; - gOamMatrices[matrixNum].b = sinVal; - gOamMatrices[matrixNum].c = -sinVal; + sinIndex = ((-sprite->pos2.x >> 1) + data->unkA); + sinVal = gSineTable[sinIndex]; - data->unk8 += data->unk6; - sprite->pos1.y = data->unk8 >> 8; - if (data->unk4 & 0x8000) - data->unk2 = (data->unk2 - (data->unk4 & 0x7FFF)) & 0xFF; - else - data->unk2 = (data->unk2 + (data->unk4 & 0x7FFF)) & 0xFF; + gOamMatrices[matrixNum].a = gOamMatrices[matrixNum].d = gSineTable[sinIndex + 64]; + gOamMatrices[matrixNum].b = sinVal; + gOamMatrices[matrixNum].c = -sinVal; - if (sprite->pos1.y + sprite->pos2.y >= data->unkE_1) - { - sprite->data[0] = 0; - sprite->callback = DestroyAnimSpriteAfterTimer; - } + data->unk8 += data->unk6; + sprite->pos1.y = (s16)(data->unk8 >> 8); + if (data->unk4 & 0x8000) + data->unk2 = (data->unk2 - (data->unk4 & 0x7FFF)) & 0xFF; + else + data->unk2 = (data->unk2 + (data->unk4 & 0x7FFF)) & 0xFF; + + if (sprite->pos1.y + sprite->pos2.y >= data->unkE_1) + { + sprite->data[0] = 0; + sprite->callback = DestroyAnimSpriteAfterTimer; } } @@ -944,20 +923,20 @@ static void sub_810EB40(struct Sprite *sprite) { sprite->pos2.x += sprite->data[1] >> 8; - if (++sprite->data[0] == 6) + if (sprite->data[0]++ == 5) { sprite->data[0] = 0; sprite->pos2.x = 0; StartSpriteAnim(sprite, 0); } - if (--sprite->data[7] == -1) + if (sprite->data[7]-- == 0) DestroyAnimSprite(sprite); } void AnimTask_DrillPeckHitSplats(u8 task) { - if (!(gTasks[task].data[0] % 32)) + if ((gTasks[task].data[0] % 32) == 0) { gAnimVisualTaskCount++; @@ -1060,8 +1039,8 @@ static void AnimDiveBall_Step2(struct Sprite *sprite) static void AnimDiveWaterSplash(struct Sprite *sprite) { - u32 matrixNum; - int t1, t2; + u8 matrixNum; + s32 t1, t2; switch (sprite->data[0]) { @@ -1083,7 +1062,7 @@ static void AnimDiveWaterSplash(struct Sprite *sprite) sprite->data[0]++; break; case 1: - if (sprite->data[2] <= 11) + if (sprite->data[2] < 12) sprite->data[1] -= 40; else sprite->data[1] += 40; @@ -1091,7 +1070,7 @@ static void AnimDiveWaterSplash(struct Sprite *sprite) sprite->data[2]++; TrySetSpriteRotScale(sprite, 0, 256, sprite->data[1], 0); - + matrixNum = sprite->oam.matrixNum; t1 = 15616; @@ -1115,8 +1094,8 @@ static void AnimDiveWaterSplash(struct Sprite *sprite) // Launches a water droplet away from the specified battler. Used by Astonish and Dive static void AnimSprayWaterDroplet(struct Sprite *sprite) { - int v1 = 0x1ff & Random2(); - int v2 = 0x7f & Random2(); + const u16 v1 = Random2() & 0x1ff; + const u16 v2 = Random2() & 0x07f; if (v1 % 2) sprite->data[0] = 736 + v1; @@ -1160,13 +1139,13 @@ static void AnimSprayWaterDroplet_Step(struct Sprite *sprite) sprite->pos2.y -= sprite->data[1] >> 8; } - sprite->data[0] = sprite->data[0]; + sprite->data[0] -= 0; // Needed to Match sprite->data[1] -= 32; if (sprite->data[0] < 0) sprite->data[0] = 0; - if (++sprite->data[3] == 31) + if (sprite->data[3]++ == 30) DestroyAnimSprite(sprite); } @@ -1212,7 +1191,7 @@ static void AnimSkyAttackBird(struct Sprite *sprite) sprite->data[7] = ((posy - sprite->pos1.y) << 4) / 12; rotation = ArcTan2Neg(posx - sprite->pos1.x, posy - sprite->pos1.y); - rotation += 49152; + rotation -= 16384; TrySetSpriteRotScale(sprite, 1, 0x100, 0x100, rotation); @@ -1236,12 +1215,12 @@ void unref_sub_810F184(u8 taskId) { if (gBattleAnimArgs[0] == 0) { - u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); + const u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); gSprites[spriteId].invisible = TRUE; } else { - u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); + const u8 spriteId = GetAnimBattlerSpriteId(ANIM_ATTACKER); gSprites[spriteId].invisible = FALSE; } DestroyAnimVisualTask(taskId); diff --git a/src/battle_controller_player.c b/src/battle_controller_player.c index fd18c3187..1dd0914e4 100644 --- a/src/battle_controller_player.c +++ b/src/battle_controller_player.c @@ -1468,8 +1468,7 @@ static void MoveSelectionDisplayPpNumber(void) SetPpNumbersPaletteInMoveSelection(); moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]); txtPtr = ConvertIntToDecimalStringN(gDisplayedStringBattle, moveInfo->currentPp[gMoveSelectionCursor[gActiveBattler]], STR_CONV_MODE_RIGHT_ALIGN, 2); - txtPtr[0] = CHAR_SLASH; - txtPtr++; + *(txtPtr)++ = CHAR_SLASH; ConvertIntToDecimalStringN(txtPtr, moveInfo->maxPp[gMoveSelectionCursor[gActiveBattler]], STR_CONV_MODE_RIGHT_ALIGN, 2); BattlePutTextOnWindow(gDisplayedStringBattle, 9); @@ -1481,12 +1480,9 @@ static void MoveSelectionDisplayMoveType(void) struct ChooseMoveStruct *moveInfo = (struct ChooseMoveStruct*)(&gBattleBufferA[gActiveBattler][4]); txtPtr = StringCopy(gDisplayedStringBattle, gText_MoveInterfaceType); - txtPtr[0] = EXT_CTRL_CODE_BEGIN; - txtPtr++; - txtPtr[0] = 6; - txtPtr++; - txtPtr[0] = 1; - txtPtr++; + *(txtPtr)++ = EXT_CTRL_CODE_BEGIN; + *(txtPtr)++ = EXT_CTRL_CODE_SIZE; + *(txtPtr)++ = 1; StringCopy(txtPtr, gTypeNames[gBattleMoves[moveInfo->moves[gMoveSelectionCursor[gActiveBattler]]].type]); BattlePutTextOnWindow(gDisplayedStringBattle, 10); diff --git a/src/battle_message.c b/src/battle_message.c index 2fba578dc..14eba28ab 100644 --- a/src/battle_message.c +++ b/src/battle_message.c @@ -2756,7 +2756,7 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst) { dst[dstID] = EXT_CTRL_CODE_BEGIN; dstID++; - dst[dstID] = 9; + dst[dstID] = EXT_CTRL_CODE_PAUSE_UNTIL_PRESS; dstID++; } } diff --git a/src/battle_script_commands.c b/src/battle_script_commands.c index 6ccefd7be..5c1b1e370 100644 --- a/src/battle_script_commands.c +++ b/src/battle_script_commands.c @@ -6340,15 +6340,13 @@ static void PutLevelAndGenderOnLvlUpBox(void) AddTextPrinter(&printerTemplate, 0xFF, NULL); txtPtr = gStringVar4; - gStringVar4[0] = CHAR_SPECIAL_F9; - txtPtr++; - txtPtr[0] = CHAR_LV_2; - txtPtr++; + *(txtPtr)++ = CHAR_EXTRA_SYMBOL; + *(txtPtr)++ = CHAR_LV_2; var = (u32)(txtPtr); txtPtr = ConvertIntToDecimalStringN(txtPtr, monLevel, STR_CONV_MODE_LEFT_ALIGN, 3); var = (u32)(txtPtr) - var; - txtPtr = StringFill(txtPtr, 0x77, 4 - var); + txtPtr = StringFill(txtPtr, CHAR_UNK_SPACER, 4 - var); if (monGender != MON_GENDERLESS) { diff --git a/src/berry_crush.c b/src/berry_crush.c index cf4c99f5a..ff544a01d 100755 --- a/src/berry_crush.c +++ b/src/berry_crush.c @@ -3271,7 +3271,7 @@ static void BerryCrush_SetPaletteFadeParams(u8 *params, bool8 communicateAfter, void sub_8024644(u8 *r0, u32 r1, u32 r2, u32 r3, u32 r5) { - u8 sp[4]; + u8 sp[2]; 0[(u16 *)sp] = r3; r0[0] = r1; diff --git a/src/data/union_room.h b/src/data/union_room.h index 704978766..be7bfae71 100644 --- a/src/data/union_room.h +++ b/src/data/union_room.h @@ -222,7 +222,7 @@ static const u8 *const sAwaitingResponseTexts[] = { ALIGNED(4) const u8 sText_ShowTrainerCard[] = _("The other TRAINER showed\nyou their TRAINER CARD.\pWould you like to show your\nTRAINER CARD?"); ALIGNED(4) const u8 sText_BattleChallenge[] = _("The other TRAINER challenges you\nto battle.\pWill you accept the battle\nchallenge?"); ALIGNED(4) const u8 sText_ChatInvitation[] = _("The other TRAINER invites you\nto chat.\pWill you accept the chat\ninvitation?"); -ALIGNED(4) const u8 sText_OfferToTradeMon[] = _("There is an offer to trade your\nregistered Lv. {SPECIAL_F7 0x00} {SPECIAL_F7 0x01}\pin exchange for a\nLv. {SPECIAL_F7 0x02} {SPECIAL_F7 0x03}.\pWill you accept this trade\noffer?"); +ALIGNED(4) const u8 sText_OfferToTradeMon[] = _("There is an offer to trade your\nregistered Lv. {DYNAMIC 0} {DYNAMIC 1}\pin exchange for a\nLv. {DYNAMIC 2} {DYNAMIC 3}.\pWill you accept this trade\noffer?"); ALIGNED(4) const u8 sText_OfferToTradeEgg[] = _("There is an offer to trade your\nregistered EGG.\lWill you accept this trade offer?"); ALIGNED(4) const u8 sText_ChatDropped[] = _("The chat has been dropped.\p"); ALIGNED(4) const u8 sText_OfferDeclined1[] = _("You declined the offer.\p"); @@ -567,17 +567,17 @@ static const u8 *const sCardColorTexts[] = { sText_ItsGoldCard }; -ALIGNED(4) const u8 sText_TrainerCardInfoPage1[] = _("This is {SPECIAL_F7 0x00} {SPECIAL_F7 0x01}'s\nTRAINER CARD…\l{SPECIAL_F7 0x02}\pPOKéDEX: {SPECIAL_F7 0x03}\nTIME: {SPECIAL_F7 0x04}:{SPECIAL_F7 0x05}\p"); -ALIGNED(4) const u8 sText_TrainerCardInfoPage2[] = _("BATTLES: WINS: {SPECIAL_F7 0x00} LOSSES: {SPECIAL_F7 0x02}\nTRADES: {SPECIAL_F7 0x03}\p“{SPECIAL_F7 0x04} {SPECIAL_F7 0x05}\n{SPECIAL_F7 0x06} {SPECIAL_F7 0x07}”\p"); -ALIGNED(4) const u8 sText_GladToMeetYouMale[] = _("{SPECIAL_F7 0x01}: Glad to have met you!{PAUSE 60}"); -ALIGNED(4) const u8 sText_GladToMeetYouFemale[] = _("{SPECIAL_F7 0x01}: Glad to meet you!{PAUSE 60}"); +ALIGNED(4) const u8 sText_TrainerCardInfoPage1[] = _("This is {DYNAMIC 0} {DYNAMIC 1}'s\nTRAINER CARD…\l{DYNAMIC 2}\pPOKéDEX: {DYNAMIC 3}\nTIME: {DYNAMIC 4}:{DYNAMIC 5}\p"); +ALIGNED(4) const u8 sText_TrainerCardInfoPage2[] = _("BATTLES: WINS: {DYNAMIC 0} LOSSES: {DYNAMIC 2}\nTRADES: {DYNAMIC 3}\p“{DYNAMIC 4} {DYNAMIC 5}\n{DYNAMIC 6} {DYNAMIC 7}”\p"); +ALIGNED(4) const u8 sText_GladToMeetYouMale[] = _("{DYNAMIC 1}: Glad to have met you!{PAUSE 60}"); +ALIGNED(4) const u8 sText_GladToMeetYouFemale[] = _("{DYNAMIC 1}: Glad to meet you!{PAUSE 60}"); const u8 *const sGladToMeetYouTexts[GENDER_COUNT] = { sText_GladToMeetYouMale, sText_GladToMeetYouFemale }; -ALIGNED(4) const u8 sText_FinishedCheckingPlayersTrainerCard[] = _("Finished checking {SPECIAL_F7 0x01}'s\nTRAINER CARD.{PAUSE 60}"); +ALIGNED(4) const u8 sText_FinishedCheckingPlayersTrainerCard[] = _("Finished checking {DYNAMIC 1}'s\nTRAINER CARD.{PAUSE 60}"); static const u8 *const sLinkGroupActivityNameTexts[] = { [ACTIVITY_NONE] = sText_EmptyString, diff --git a/src/dynamic_placeholder_text_util.c b/src/dynamic_placeholder_text_util.c index bdfcf6653..1ec0c1e06 100644 --- a/src/dynamic_placeholder_text_util.c +++ b/src/dynamic_placeholder_text_util.c @@ -32,7 +32,7 @@ u8 *DynamicPlaceholderTextUtil_ExpandPlaceholders(u8 *dest, const u8 *src) { while (*src != EOS) { - if (*src != CHAR_SPECIAL_F7) + if (*src != CHAR_DYNAMIC) { *dest++ = *src++; } diff --git a/src/international_string_util.c b/src/international_string_util.c index ec5057359..23ca6c081 100644 --- a/src/international_string_util.c +++ b/src/international_string_util.c @@ -136,7 +136,7 @@ void PadNameString(u8 *dest, u8 padChar) while (length < PLAYER_NAME_LENGTH - 1) { dest[length] = EXT_CTRL_CODE_BEGIN; - dest[length + 1] = EXT_CTRL_CODE_UNKNOWN_7; + dest[length + 1] = EXT_CTRL_CODE_RESET_SIZE; length += 2; } } diff --git a/src/link_rfu_3.c b/src/link_rfu_3.c index c53e1c59e..db1ba8b43 100644 --- a/src/link_rfu_3.c +++ b/src/link_rfu_3.c @@ -220,9 +220,9 @@ static const u8 sWireless_RSEtoASCIITable[256] = { [CHAR_y] = 'y', [CHAR_z] = 'z', 0x20, 0x20, 0x2b, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, - [CHAR_SPECIAL_F7] = ' ', - [CHAR_SPECIAL_F8] = ' ', - [CHAR_SPECIAL_F9] = ' ', + [CHAR_DYNAMIC] = ' ', + [CHAR_KEYPAD_ICON] = ' ', + [CHAR_EXTRA_SYMBOL] = ' ', [CHAR_PROMPT_SCROLL] = ' ', [CHAR_PROMPT_CLEAR] = ' ', [EXT_CTRL_CODE_BEGIN] = ' ', diff --git a/src/mauville_old_man.c b/src/mauville_old_man.c index bbf0f8972..af68c6116 100644 --- a/src/mauville_old_man.c +++ b/src/mauville_old_man.c @@ -220,7 +220,7 @@ static void PrepareSongText(void) if (lineNum == 0) { *(wordEnd++) = EXT_CTRL_CODE_BEGIN; - *(wordEnd++) = 15; + *(wordEnd++) = EXT_CTRL_CODE_FILL_WINDOW; } } } diff --git a/src/menu_specialized.c b/src/menu_specialized.c index b7dd1f33a..ecef9982b 100644 --- a/src/menu_specialized.c +++ b/src/menu_specialized.c @@ -884,10 +884,10 @@ static u8 *sub_81D2CD0(u8 *dst, u16 boxId, u16 monId) u8 *str; *(dst++) = EXT_CTRL_CODE_BEGIN; - *(dst++) = 4; - *(dst++) = 8; - *(dst++) = 0; - *(dst++) = 9; + *(dst++) = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; + *(dst++) = TEXT_COLOR_BLUE; + *(dst++) = TEXT_COLOR_TRANSPARENT; + *(dst++) = TEXT_COLOR_LIGHT_BLUE; if (GetBoxOrPartyMonData(boxId, monId, MON_DATA_IS_EGG, NULL)) { return StringCopyPadded(dst, gText_EggNickname, 0, 12); @@ -920,8 +920,8 @@ static u8 *sub_81D2CD0(u8 *dst, u16 boxId, u16 monId) ; *(str++) = EXT_CTRL_CODE_BEGIN; - *(str++) = 0x12; - *(str++) = 0x3C; + *(str++) = EXT_CTRL_CODE_SKIP; + *(str++) = 60; switch (gender) { @@ -931,30 +931,30 @@ static u8 *sub_81D2CD0(u8 *dst, u16 boxId, u16 monId) case MON_MALE: *(str++) = EXT_CTRL_CODE_BEGIN; *(str++) = EXT_CTRL_CODE_COLOR; - *(str++) = 4; + *(str++) = TEXT_COLOR_RED; *(str++) = EXT_CTRL_CODE_BEGIN; - *(str++) = 3; - *(str++) = 5; + *(str++) = EXT_CTRL_CODE_SHADOW; + *(str++) = TEXT_COLOR_LIGHT_RED; *(str++) = CHAR_MALE; break; case MON_FEMALE: *(str++) = EXT_CTRL_CODE_BEGIN; *(str++) = EXT_CTRL_CODE_COLOR; - *(str++) = 6; + *(str++) = TEXT_COLOR_GREEN; *(str++) = EXT_CTRL_CODE_BEGIN; - *(str++) = 3; - *(str++) = 7; + *(str++) = EXT_CTRL_CODE_SHADOW; + *(str++) = TEXT_COLOR_LIGHT_GREEN; *(str++) = CHAR_FEMALE; break; } *(str++) = EXT_CTRL_CODE_BEGIN; - *(str++) = 4; - *(str++) = 8; - *(str++) = 0; - *(str++) = 9; + *(str++) = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; + *(str++) = TEXT_COLOR_BLUE; + *(str++) = TEXT_COLOR_TRANSPARENT; + *(str++) = TEXT_COLOR_LIGHT_BLUE; *(str++) = CHAR_SLASH; - *(str++) = CHAR_SPECIAL_F9; + *(str++) = CHAR_EXTRA_SYMBOL; *(str++) = CHAR_LV_2; str = ConvertIntToDecimalStringN(str, level, STR_CONV_MODE_LEFT_ALIGN, 3); *(str++) = CHAR_SPACE; @@ -989,10 +989,10 @@ void sub_81D2ED4(u8 *dst, u8 *nameDst, u16 boxId, u16 monId, u16 arg5, u16 arg6, { sub_81D2CD0(nameDst, boxId, monId); dst[0] = EXT_CTRL_CODE_BEGIN; - dst[1] = 4; - dst[2] = 8; - dst[3] = 0; - dst[4] = 9; + dst[1] = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; + dst[2] = TEXT_COLOR_BLUE; + dst[3] = TEXT_COLOR_TRANSPARENT; + dst[4] = TEXT_COLOR_LIGHT_BLUE; if (boxId == TOTAL_BOXES_COUNT) // Party mon. { sub_81D2E7C(dst + 5, gText_InParty, 8); diff --git a/src/pokeblock.c b/src/pokeblock.c index f654e0782..025adf875 100644 --- a/src/pokeblock.c +++ b/src/pokeblock.c @@ -725,8 +725,8 @@ static void PutPokeblockListMenuString(u8 *dst, u16 pkblId) u8 *txtPtr = StringCopy(dst, gPokeblockNames[pkblock->color]); *(txtPtr++) = EXT_CTRL_CODE_BEGIN; - *(txtPtr++) = 0x12; - *(txtPtr++) = 0x57; + *(txtPtr++) = EXT_CTRL_CODE_SKIP; + *(txtPtr++) = 87; ConvertIntToDecimalStringN(gStringVar1, GetHighestPokeblocksFlavorLevel(pkblock), STR_CONV_MODE_LEFT_ALIGN, 3); StringExpandPlaceholders(txtPtr, gText_LvVar1); diff --git a/src/pokedex.c b/src/pokedex.c index 777cc52cd..2a6a33633 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -4145,7 +4145,7 @@ static void PrintMonHeight(u16 height, u8 left, u8 top) inches = (inches - (feet * 120)) / 10; buffer[i++] = EXT_CTRL_CODE_BEGIN; - buffer[i++] = 0x13; + buffer[i++] = EXT_CTRL_CODE_CLEAR_TO; if (feet / 10 == 0) { buffer[i++] = 18; diff --git a/src/pokemon_storage_system.c b/src/pokemon_storage_system.c index 59dc0acce..115c369af 100644 --- a/src/pokemon_storage_system.c +++ b/src/pokemon_storage_system.c @@ -6869,36 +6869,36 @@ static void SetCursorMonData(void *pokemon, u8 mode) txtPtr = sPSSData->cursorMonGenderLvlText; *(txtPtr)++ = EXT_CTRL_CODE_BEGIN; - *(txtPtr)++ = 4; + *(txtPtr)++ = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; switch (gender) { case MON_MALE: - *(txtPtr)++ = 4; - *(txtPtr)++ = 1; - *(txtPtr)++ = 5; + *(txtPtr)++ = TEXT_COLOR_RED; + *(txtPtr)++ = TEXT_COLOR_WHITE; + *(txtPtr)++ = TEXT_COLOR_LIGHT_RED; *(txtPtr)++ = CHAR_MALE; break; case MON_FEMALE: - *(txtPtr)++ = 6; - *(txtPtr)++ = 1; - *(txtPtr)++ = 7; + *(txtPtr)++ = TEXT_COLOR_GREEN; + *(txtPtr)++ = TEXT_COLOR_WHITE; + *(txtPtr)++ = TEXT_COLOR_LIGHT_GREEN; *(txtPtr)++ = CHAR_FEMALE; break; default: - *(txtPtr)++ = 2; - *(txtPtr)++ = 1; - *(txtPtr)++ = 3; - *(txtPtr)++ = 0x77; + *(txtPtr)++ = TEXT_COLOR_DARK_GREY; + *(txtPtr)++ = TEXT_COLOR_WHITE; + *(txtPtr)++ = TEXT_COLOR_LIGHT_GREY; + *(txtPtr)++ = CHAR_UNK_SPACER; break; } *(txtPtr++) = EXT_CTRL_CODE_BEGIN; - *(txtPtr++) = 4; - *(txtPtr++) = 2; - *(txtPtr++) = 1; - *(txtPtr++) = 3; - *(txtPtr++) = 0; - *(txtPtr++) = CHAR_SPECIAL_F9; + *(txtPtr++) = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; + *(txtPtr++) = TEXT_COLOR_DARK_GREY; + *(txtPtr++) = TEXT_COLOR_WHITE; + *(txtPtr++) = TEXT_COLOR_LIGHT_GREY; + *(txtPtr++) = CHAR_SPACE; + *(txtPtr++) = CHAR_EXTRA_SYMBOL; *(txtPtr++) = CHAR_LV_2; txtPtr = ConvertIntToDecimalStringN(txtPtr, sPSSData->cursorMonLevel, STR_CONV_MODE_LEFT_ALIGN, 3); diff --git a/src/pokemon_summary_screen.c b/src/pokemon_summary_screen.c index a3efe09d7..2e7995222 100644 --- a/src/pokemon_summary_screen.c +++ b/src/pokemon_summary_screen.c @@ -709,9 +709,9 @@ static void (*const sTextPrinterTasks[])(u8 taskId) = static const u8 sMemoNatureTextColor[] = _("{COLOR LIGHT_RED}{SHADOW GREEN}"); static const u8 sMemoMiscTextColor[] = _("{COLOR WHITE}{SHADOW DARK_GREY}"); // This is also affected by palettes, apparently -static const u8 sStatsLeftColumnLayout[] = _("{SPECIAL_F7 0x00}/{SPECIAL_F7 0x01}\n{SPECIAL_F7 0x02}\n{SPECIAL_F7 0x03}"); -static const u8 sStatsRightColumnLayout[] = _("{SPECIAL_F7 0x00}\n{SPECIAL_F7 0x01}\n{SPECIAL_F7 0x02}"); -static const u8 sMovesPPLayout[] = _("{PP}{SPECIAL_F7 0x00}/{SPECIAL_F7 0x01}"); +static const u8 sStatsLeftColumnLayout[] = _("{DYNAMIC 0}/{DYNAMIC 1}\n{DYNAMIC 2}\n{DYNAMIC 3}"); +static const u8 sStatsRightColumnLayout[] = _("{DYNAMIC 0}\n{DYNAMIC 1}\n{DYNAMIC 2}"); +static const u8 sMovesPPLayout[] = _("{PP}{DYNAMIC 0}/{DYNAMIC 1}"); #define TAG_MOVE_SELECTOR 30000 #define TAG_MON_STATUS 30001 diff --git a/src/pokenav_conditions_1.c b/src/pokenav_conditions_1.c index 84e2a9682..7184271ea 100644 --- a/src/pokenav_conditions_1.c +++ b/src/pokenav_conditions_1.c @@ -337,10 +337,10 @@ u8 *sub_81CD624(u8 *str, u16 id, bool8 arg3) boxId = unkPtr->unk4[id].boxId; monId = unkPtr->unk4[id].monId; *(str++) = EXT_CTRL_CODE_BEGIN; - *(str++) = 4; - *(str++) = 8; - *(str++) = 0; - *(str++) = 9; + *(str++) = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; + *(str++) = TEXT_COLOR_BLUE; + *(str++) = TEXT_COLOR_TRANSPARENT; + *(str++) = TEXT_COLOR_LIGHT_BLUE; if (GetBoxOrPartyMonData(boxId, monId, MON_DATA_IS_EGG, NULL)) return StringCopyPadded(str, gText_EggNickname, CHAR_SPACE, 12); @@ -368,40 +368,40 @@ u8 *sub_81CD624(u8 *str, u16 id, bool8 arg3) (str_++); *(str_++) = EXT_CTRL_CODE_BEGIN; - *(str_++) = 0x12; - *(str_++) = 0x3C; + *(str_++) = EXT_CTRL_CODE_SKIP; + *(str_++) = 60; switch (gender) { default: - *(str_++) = 0x77; + *(str_++) = CHAR_UNK_SPACER; break; case MON_MALE: *(str_++) = EXT_CTRL_CODE_BEGIN; *(str_++) = EXT_CTRL_CODE_COLOR; - *(str_++) = 4; + *(str_++) = TEXT_COLOR_RED; *(str_++) = EXT_CTRL_CODE_BEGIN; - *(str_++) = 3; - *(str_++) = 5; + *(str_++) = EXT_CTRL_CODE_SHADOW; + *(str_++) = TEXT_COLOR_LIGHT_RED; *(str_++) = CHAR_MALE; break; case MON_FEMALE: *(str_++) = EXT_CTRL_CODE_BEGIN; *(str_++) = EXT_CTRL_CODE_COLOR; - *(str_++) = 6; + *(str_++) = TEXT_COLOR_GREEN; *(str_++) = EXT_CTRL_CODE_BEGIN; - *(str_++) = 3; - *(str_++) = 7; + *(str_++) = EXT_CTRL_CODE_SHADOW; + *(str_++) = TEXT_COLOR_LIGHT_GREEN; *(str_++) = CHAR_FEMALE; break; } *(str_++) = EXT_CTRL_CODE_BEGIN; - *(str_++) = 4; - *(str_++) = 8; - *(str_++) = 0; - *(str_++) = 9; + *(str_++) = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; + *(str_++) = TEXT_COLOR_BLUE; + *(str_++) = TEXT_COLOR_TRANSPARENT; + *(str_++) = TEXT_COLOR_LIGHT_BLUE; *(str_++) = CHAR_SLASH; - *(str_++) = CHAR_SPECIAL_F9; + *(str_++) = CHAR_EXTRA_SYMBOL; *(str_++) = CHAR_LV_2; txtPtr = str_; str_ = ConvertIntToDecimalStringN(str_, level, STR_CONV_MODE_LEFT_ALIGN, 3); @@ -429,10 +429,10 @@ void sub_81CD824(s16 arg0, u8 arg1) sub_81CD624(structPtr->unk6368[arg1], arg0, FALSE); boxId = unkPtr->unk4[arg0].boxId; structPtr->unk6320[arg1][0] = EXT_CTRL_CODE_BEGIN; - structPtr->unk6320[arg1][1] = 4; - structPtr->unk6320[arg1][2] = 8; - structPtr->unk6320[arg1][3] = 0; - structPtr->unk6320[arg1][4] = 9; + structPtr->unk6320[arg1][1] = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; + structPtr->unk6320[arg1][2] = TEXT_COLOR_BLUE; + structPtr->unk6320[arg1][3] = TEXT_COLOR_TRANSPARENT; + structPtr->unk6320[arg1][4] = TEXT_COLOR_LIGHT_BLUE; if (boxId == TOTAL_BOXES_COUNT) sub_81CD5CC(&structPtr->unk6320[arg1][5], gText_InParty, 8); else diff --git a/src/pokenav_conditions_2.c b/src/pokenav_conditions_2.c index 65a85aa7e..32e673aa4 100644 --- a/src/pokenav_conditions_2.c +++ b/src/pokenav_conditions_2.c @@ -581,10 +581,10 @@ bool32 sub_81CE754(u8 a0, u16 a1, bool8 a2) str = sub_81CDD24(a1); AddTextPrinterParameterized(structPtr->unk1820, 1, str, 0, 17, 0, NULL); text[0] = EXT_CTRL_CODE_BEGIN; - text[1] = 4; - text[2] = 8; - text[3] = 0; - text[4] = 9; + text[1] = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW; + text[2] = TEXT_COLOR_BLUE; + text[3] = TEXT_COLOR_TRANSPARENT; + text[4] = TEXT_COLOR_LIGHT_BLUE; StringCopy(text + 5, gText_Number2); AddTextPrinterParameterized(structPtr->unk1821, 1, text, 4, 1, 0, NULL); ConvertIntToDecimalStringN(text + 5, sub_81CDD48(), STR_CONV_MODE_RIGHT_ALIGN, 4); diff --git a/src/pokenav_conditions_3.c b/src/pokenav_conditions_3.c index 7a48b9234..eea4aa397 100644 --- a/src/pokenav_conditions_3.c +++ b/src/pokenav_conditions_3.c @@ -707,7 +707,7 @@ static void sub_81CF8E4(struct PokenavMonList * item, u8 * dest) } s = StringCopy(gStringVar1, genderStr); *s++ = CHAR_SLASH; - *s++ = CHAR_SPECIAL_F9; + *s++ = CHAR_EXTRA_SYMBOL; *s++ = CHAR_LV_2; ConvertIntToDecimalStringN(s, level, STR_CONV_MODE_LEFT_ALIGN, 3); sub_81DB494(dest, 1, gStringVar1, 40); diff --git a/src/pokenav_ribbons_1.c b/src/pokenav_ribbons_1.c index ffc049c47..aad0053a8 100644 --- a/src/pokenav_ribbons_1.c +++ b/src/pokenav_ribbons_1.c @@ -724,7 +724,7 @@ static void BufferRibbonMonInfoText(struct PokenavMonList * item0, u8 * dest) s = StringCopy(gStringVar1, genderStr); *s++ = CHAR_SLASH; - *s++ = CHAR_SPECIAL_F9; + *s++ = CHAR_EXTRA_SYMBOL; *s++ = CHAR_LV_2; ConvertIntToDecimalStringN(s, level, STR_CONV_MODE_LEFT_ALIGN, 3); dest = sub_81DB494(dest, 1, gStringVar1, 54); diff --git a/src/pokenav_ribbons_2.c b/src/pokenav_ribbons_2.c index bb6116472..e5a89acad 100644 --- a/src/pokenav_ribbons_2.c +++ b/src/pokenav_ribbons_2.c @@ -836,7 +836,7 @@ void sub_81D0FF0(struct PokenavSub14 *structPtr) txtPtr = StringCopy(gStringVar1, genderTxt); *(txtPtr++) = CHAR_SLASH; - *(txtPtr++) = CHAR_SPECIAL_F9; + *(txtPtr++) = CHAR_EXTRA_SYMBOL; *(txtPtr++) = CHAR_LV_2; ConvertIntToDecimalStringN(txtPtr, level, STR_CONV_MODE_LEFT_ALIGN, 3); AddTextPrinterParameterized(windowId, 1, gStringVar1, 60, 1, TEXT_SPEED_FF, NULL); diff --git a/src/strings.c b/src/strings.c index 2ea06c1ad..07361ba60 100644 --- a/src/strings.c +++ b/src/strings.c @@ -512,14 +512,14 @@ const u8 gText_EggWillTakeSomeTime[] = _("What will hatch from this?\nIt will ta const u8 gText_EggWillHatchSoon[] = _("It moves occasionally.\nIt should hatch soon."); const u8 gText_EggAboutToHatch[] = _("It's making sounds.\nIt's about to hatch!"); const u8 gText_HMMovesCantBeForgotten2[] = _("HM moves can't be\nforgotten now."); -const u8 gText_XNatureMetAtYZ[] = _("{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nmet at {LV_2}{SPECIAL_F7 0x00}{SPECIAL_F7 0x03}{SPECIAL_F7 0x01},\n{SPECIAL_F7 0x00}{SPECIAL_F7 0x04}{SPECIAL_F7 0x01}."); -const u8 gText_XNatureHatchedAtYZ[] = _("{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nhatched at {LV_2}{SPECIAL_F7 0x00}{SPECIAL_F7 0x03}{SPECIAL_F7 0x01},\n{SPECIAL_F7 0x00}{SPECIAL_F7 0x04}{SPECIAL_F7 0x01}."); -const u8 gText_XNatureObtainedInTrade[] = _("{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nobtained in a trade."); -const u8 gText_XNatureFatefulEncounter[] = _("{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nobtained in a fateful\nencounter at {LV_2}{SPECIAL_F7 0x00}{SPECIAL_F7 0x03}{SPECIAL_F7 0x01}."); -const u8 gText_XNatureProbablyMetAt[] = _("{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nprobably met at {LV_2}{SPECIAL_F7 0x00}{SPECIAL_F7 0x03}{SPECIAL_F7 0x01},\n{SPECIAL_F7 0x00}{SPECIAL_F7 0x04}{SPECIAL_F7 0x01}."); -const u8 gText_XNature[] = _("{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature"); -const u8 gText_XNatureMetSomewhereAt[] = _("{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nmet somewhere at {LV_2}{SPECIAL_F7 0x00}{SPECIAL_F7 0x03}{SPECIAL_F7 0x01}."); -const u8 gText_XNatureHatchedSomewhereAt[] = _("{SPECIAL_F7 0x00}{SPECIAL_F7 0x02}{SPECIAL_F7 0x01}{SPECIAL_F7 0x05} nature,\nhatched somewhere at {LV_2}{SPECIAL_F7 0x00}{SPECIAL_F7 0x03}{SPECIAL_F7 0x01}."); +const u8 gText_XNatureMetAtYZ[] = _("{DYNAMIC 0}{DYNAMIC 2}{DYNAMIC 1}{DYNAMIC 5} nature,\nmet at {LV_2}{DYNAMIC 0}{DYNAMIC 3}{DYNAMIC 1},\n{DYNAMIC 0}{DYNAMIC 4}{DYNAMIC 1}."); +const u8 gText_XNatureHatchedAtYZ[] = _("{DYNAMIC 0}{DYNAMIC 2}{DYNAMIC 1}{DYNAMIC 5} nature,\nhatched at {LV_2}{DYNAMIC 0}{DYNAMIC 3}{DYNAMIC 1},\n{DYNAMIC 0}{DYNAMIC 4}{DYNAMIC 1}."); +const u8 gText_XNatureObtainedInTrade[] = _("{DYNAMIC 0}{DYNAMIC 2}{DYNAMIC 1}{DYNAMIC 5} nature,\nobtained in a trade."); +const u8 gText_XNatureFatefulEncounter[] = _("{DYNAMIC 0}{DYNAMIC 2}{DYNAMIC 1}{DYNAMIC 5} nature,\nobtained in a fateful\nencounter at {LV_2}{DYNAMIC 0}{DYNAMIC 3}{DYNAMIC 1}."); +const u8 gText_XNatureProbablyMetAt[] = _("{DYNAMIC 0}{DYNAMIC 2}{DYNAMIC 1}{DYNAMIC 5} nature,\nprobably met at {LV_2}{DYNAMIC 0}{DYNAMIC 3}{DYNAMIC 1},\n{DYNAMIC 0}{DYNAMIC 4}{DYNAMIC 1}."); +const u8 gText_XNature[] = _("{DYNAMIC 0}{DYNAMIC 2}{DYNAMIC 1}{DYNAMIC 5} nature"); +const u8 gText_XNatureMetSomewhereAt[] = _("{DYNAMIC 0}{DYNAMIC 2}{DYNAMIC 1}{DYNAMIC 5} nature,\nmet somewhere at {LV_2}{DYNAMIC 0}{DYNAMIC 3}{DYNAMIC 1}."); +const u8 gText_XNatureHatchedSomewhereAt[] = _("{DYNAMIC 0}{DYNAMIC 2}{DYNAMIC 1}{DYNAMIC 5} nature,\nhatched somewhere at {LV_2}{DYNAMIC 0}{DYNAMIC 3}{DYNAMIC 1}."); const u8 gText_OddEggFoundByCouple[] = _("An odd POKéMON EGG found\nby the DAY CARE couple."); const u8 gText_PeculiarEggNicePlace[] = _("A peculiar POKéMON EGG\nobtained at the nice place."); const u8 gText_PeculiarEggTrade[] = _("A peculiar POKéMON EGG\nobtained in a trade."); @@ -861,14 +861,14 @@ const u8 gText_ExitFromBox[] = _("Exit from the BOX?"); const u8 gText_WhatDoYouWantToDo[] = _("What do you want to do?"); const u8 gText_PleasePickATheme[] = _("Please pick a theme."); const u8 gText_PickTheWallpaper[] = _("Pick the wallpaper."); -const u8 gText_PkmnIsSelected[] = _("{SPECIAL_F7 0x00} is selected."); +const u8 gText_PkmnIsSelected[] = _("{DYNAMIC 0} is selected."); const u8 gText_JumpToWhichBox[] = _("Jump to which BOX?"); const u8 gText_DepositInWhichBox[] = _("Deposit in which BOX?"); -const u8 gText_PkmnWasDeposited[] = _("{SPECIAL_F7 0x00} was deposited."); +const u8 gText_PkmnWasDeposited[] = _("{DYNAMIC 0} was deposited."); const u8 gText_BoxIsFull2[] = _("The BOX is full."); const u8 gText_ReleaseThisPokemon[] = _("Release this POKéMON?"); -const u8 gText_PkmnWasReleased[] = _("{SPECIAL_F7 0x00} was released."); -const u8 gText_ByeByePkmn[] = _("Bye-bye, {SPECIAL_F7 0x00}!"); +const u8 gText_PkmnWasReleased[] = _("{DYNAMIC 0} was released."); +const u8 gText_ByeByePkmn[] = _("Bye-bye, {DYNAMIC 0}!"); const u8 gText_MarkYourPkmn[] = _("Mark your POKéMON."); const u8 gText_ThatsYourLastPkmn[] = _("That's your last POKéMON!"); const u8 gText_YourPartysFull[] = _("Your party's full!"); @@ -876,7 +876,7 @@ const u8 gText_YoureHoldingAPkmn[] = _("You're holding a POKéMON!"); const u8 gText_WhichOneWillYouTake[] = _("Which one will you take?"); const u8 gText_YouCantReleaseAnEgg[] = _("You can't release an EGG."); const u8 gText_ContinueBoxOperations[] = _("Continue BOX operations?"); -const u8 gText_PkmnCameBack[] = _("{SPECIAL_F7 0x00} came back!"); +const u8 gText_PkmnCameBack[] = _("{DYNAMIC 0} came back!"); const u8 gText_WasItWorriedAboutYou[] = _("Was it worried about you?"); const u8 gText_FourEllipsesExclamation[] = _("… … … … !"); const u8 gText_PleaseRemoveTheMail[] = _("Please remove the MAIL."); @@ -884,8 +884,8 @@ const u8 gText_GiveToAPkmn[] = _("GIVE to a POKéMON?"); const u8 gText_PlacedItemInBag[] = _("Placed item in the BAG."); const u8 gText_BagIsFull2[] = _("The BAG is full."); const u8 gText_PutItemInBag[] = _("Put this item in the BAG?"); -const u8 gText_ItemIsNowHeld[] = _("{SPECIAL_F7 0x00} is now held."); -const u8 gText_ChangedToNewItem[] = _("Changed to {SPECIAL_F7 0x00}."); +const u8 gText_ItemIsNowHeld[] = _("{DYNAMIC 0} is now held."); +const u8 gText_ChangedToNewItem[] = _("Changed to {DYNAMIC 0}."); const u8 gText_MailCantBeStored[] = _("MAIL can't be stored!"); const u8 gPCText_Cancel[] = _("CANCEL"); const u8 gPCText_Store[] = _("STORE"); @@ -981,18 +981,18 @@ const u8 gText_TrainerCloseBy[] = _("That TRAINER is close by.\nTalk to the TRAI const u8 gText_InParty[] = _("IN PARTY"); const u8 gText_Number2[] = _("No. "); const u8 gText_Ribbons[] = _("RIBBONS"); // Unused -const u8 gText_PokemonMaleLv[] = _("{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}"); // Unused -const u8 gText_PokemonFemaleLv[] = _("{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_GREEN WHITE BLUE}♀{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}"); // Unused -const u8 gText_PokemonNoGenderLv[] = _("{SPECIAL_F7 0x00}/{LV}{SPECIAL_F7 0x01}"); // Unused +const u8 gText_PokemonMaleLv[] = _("{DYNAMIC 0}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{DYNAMIC 1}"); // Unused +const u8 gText_PokemonFemaleLv[] = _("{DYNAMIC 0}{COLOR_HIGHLIGHT_SHADOW LIGHT_GREEN WHITE BLUE}♀{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{DYNAMIC 1}"); // Unused +const u8 gText_PokemonNoGenderLv[] = _("{DYNAMIC 0}/{LV}{DYNAMIC 1}"); // Unused const u8 gText_Unknown[] = _("UNKNOWN"); const u8 gText_Call[] = _("CALL"); const u8 gText_Check[] = _("CHECK"); const u8 gText_Cancel6[] = _("CANCEL"); -const u8 gText_NumberF700[] = _("No. {SPECIAL_F7 0x00}"); -const u8 gText_RibbonsF700[] = _("RIBBONS {SPECIAL_F7 0x00}"); -const u8 gText_PokemonMaleLv2[] = _("{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}"); // Unused -const u8 gText_PokemonFemaleLv2[] = _("{SPECIAL_F7 0x00}{COLOR_HIGHLIGHT_SHADOW LIGHT_GREEN WHITE BLUE}♀{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}"); // Unused -const u8 gText_PokemonNoGenderLv2[] = _("{SPECIAL_F7 0x00}/{LV}{SPECIAL_F7 0x01}{SPECIAL_F7 0x02}"); // Unused +const u8 gText_NumberF700[] = _("No. {DYNAMIC 0}"); +const u8 gText_RibbonsF700[] = _("RIBBONS {DYNAMIC 0}"); +const u8 gText_PokemonMaleLv2[] = _("{DYNAMIC 0}{COLOR_HIGHLIGHT_SHADOW LIGHT_RED WHITE GREEN}♂{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{DYNAMIC 1}{DYNAMIC 2}"); // Unused +const u8 gText_PokemonFemaleLv2[] = _("{DYNAMIC 0}{COLOR_HIGHLIGHT_SHADOW LIGHT_GREEN WHITE BLUE}♀{COLOR_HIGHLIGHT_SHADOW DARK_GREY WHITE LIGHT_GREY}/{LV}{DYNAMIC 1}{DYNAMIC 2}"); // Unused +const u8 gText_PokemonNoGenderLv2[] = _("{DYNAMIC 0}/{LV}{DYNAMIC 1}{DYNAMIC 2}"); // Unused const u8 gText_CombineFourWordsOrPhrases[] = _("Combine four words or phrases"); const u8 gText_AndMakeYourProfile[] = _("and make your profile."); const u8 gText_CombineSixWordsOrPhrases[] = _("Combine six words or phrases"); @@ -1063,7 +1063,7 @@ const u8 gText_ApprenticesPhrase[] = _("Apprentice's phrase"); const u8 gText_Questionnaire[] = _("QUESTIONNAIRE"); const u8 gText_YouCannotQuitHere[] = _("You cannot quit here."); const u8 gText_SectionMustBeCompleted[] = _("This section must be completed."); -const u8 gText_F700sQuiz[] = _("{SPECIAL_F7 0x00}'s quiz"); +const u8 gText_F700sQuiz[] = _("{DYNAMIC 0}'s quiz"); const u8 gText_Lady[] = _("Lady"); const u8 gText_AfterYouHaveReadTheQuiz[] = _("After you have read the quiz"); const u8 gText_QuestionPressTheAButton[] = _("question, press the A Button."); @@ -1255,16 +1255,16 @@ const u8 gText_QuitChatting[] = _("Quit chatting?"); const u8 gText_RegisterTextWhere[] = _("Register text where?"); const u8 gText_RegisterTextHere[] = _("Register text here?"); const u8 gText_InputText[] = _("Input text."); -const u8 gText_F700JoinedChat[] = _("{SPECIAL_F7 0x00} joined the chat!"); -const u8 gText_F700LeftChat[] = _("{SPECIAL_F7 0x00} left the chat."); -const u8 gJPText_PlayersXPokemon[] = _("{SPECIAL_F7 0x00}の{SPECIAL_F7 0x01}ひきめ:"); // Unused -const u8 gJPText_PlayersXPokmonDoesNotExist[] = _("{SPECIAL_F7 0x00}の{SPECIAL_F7 0x01}ひきめは いません"); // Unused +const u8 gText_F700JoinedChat[] = _("{DYNAMIC 0} joined the chat!"); +const u8 gText_F700LeftChat[] = _("{DYNAMIC 0} left the chat."); +const u8 gJPText_PlayersXPokemon[] = _("{DYNAMIC 0}の{DYNAMIC 1}ひきめ:"); // Unused +const u8 gJPText_PlayersXPokmonDoesNotExist[] = _("{DYNAMIC 0}の{DYNAMIC 1}ひきめは いません"); // Unused const u8 gText_ExitingChat[] = _("Exiting the chat…"); -const u8 gText_LeaderLeftEndingChat[] = _("The LEADER, {SPECIAL_F7 0x00}, has\nleft, ending the chat."); +const u8 gText_LeaderLeftEndingChat[] = _("The LEADER, {DYNAMIC 0}, has\nleft, ending the chat."); const u8 gText_RegisteredTextChangedOKToSave[] = _("The registered text has been changed.\nIs it okay to save the game?"); const u8 gText_AlreadySavedFile_Chat[] = _("There is already a saved file.\nIs it okay to overwrite it?"); const u8 gText_SavingDontTurnOff_Chat[] = _("SAVING…\nDON'T TURN OFF THE POWER."); -const u8 gText_PlayerSavedGame_Chat[] = _("{SPECIAL_F7 0x00} saved the game."); +const u8 gText_PlayerSavedGame_Chat[] = _("{DYNAMIC 0} saved the game."); const u8 gText_IfLeaderLeavesChatEnds[] = _("If the LEADER leaves, the chat\nwill end. Is that okay?"); const u8 gText_Hello[] = _("HELLO"); const u8 gText_Pokemon2[] = _("POKéMON"); @@ -1301,8 +1301,8 @@ ALIGNED(4) const u8 gText_YouHaveNoBerries[] = _("You have no BERRIES.\nThe game ALIGNED(4) const u8 gText_MemberDroppedOut[] = _("A member dropped out.\nThe game will be canceled."); ALIGNED(4) const u8 gText_TimesUpNoGoodPowder[] = _("Time's up.\pGood BERRY POWDER could not be\nmade…\p"); ALIGNED(4) const u8 gText_CommunicationStandby2[] = _("Communication standby…"); -ALIGNED(4) const u8 gText_1DotBlueF700[] = _("1. {COLOR BLUE}{SHADOW LIGHT_BLUE}{SPECIAL_F7 0x00}"); -ALIGNED(4) const u8 gText_1DotF700[] = _("1. {SPECIAL_F7 0x00}"); +ALIGNED(4) const u8 gText_1DotBlueF700[] = _("1. {COLOR BLUE}{SHADOW LIGHT_BLUE}{DYNAMIC 0}"); +ALIGNED(4) const u8 gText_1DotF700[] = _("1. {DYNAMIC 0}"); ALIGNED(4) const u8 gText_SpaceTimes2[] = _(" time(s)"); ALIGNED(4) const u8 gText_XDotY[] = _("{STR_VAR_1}.{STR_VAR_2}"); ALIGNED(4) const u8 gText_Var1Berry[] = _("{STR_VAR_1} BERRY"); @@ -1375,7 +1375,7 @@ const u8 gText_2Colon[] = _("2:"); const u8 gText_3Colon[] = _("3:"); const u8 gText_4Colon[] = _("4:"); const u8 gText_5Colon[] = _("5:"); -const u8 gText_FirstPlacePrize[] = _("The first-place winner gets\nthis {SPECIAL_F7 0x00}!"); +const u8 gText_FirstPlacePrize[] = _("The first-place winner gets\nthis {DYNAMIC 0}!"); const u8 gText_CantHoldAnyMore[] = _("You can't hold any more!"); const u8 gText_FilledStorageSpace[] = _("It filled its storage space."); const u8 gText_WantToPlayAgain[] = _("Want to play again?"); @@ -1388,7 +1388,7 @@ const u8 gText_PkmnJumpRecords[] = _("POKéMON JUMP RECORDS"); const u8 gText_JumpsInARow[] = _("Jumps in a row:"); const u8 gText_BestScore2[] = _("Best score:"); const u8 gText_ExcellentsInARow[] = _("EXCELLENTS in a row:"); -const u8 gText_AwesomeWonF701F700[] = _("Awesome score! You've\nwon {SPECIAL_F7 0x01} {SPECIAL_F7 0x00}!"); +const u8 gText_AwesomeWonF701F700[] = _("Awesome score! You've\nwon {DYNAMIC 1} {DYNAMIC 0}!"); const u8 gText_FilledStorageSpace2[] = _("It filled its storage space."); const u8 gText_CantHoldMore[] = _("You can't hold any more!"); const u8 gText_WantToPlayAgain2[] = _("Want to play again?"); @@ -1645,10 +1645,10 @@ const u8 gText_PeopleTrading[] = _("People trading:"); const u8 gText_PeopleBattling[] = _("People battling:"); const u8 gText_PeopleInUnionRoom[] = _("People in the UNION ROOM:"); const u8 gText_PeopleCommunicating[] = _("People communicating:"); -const u8 gText_F700Players[] = _("{SPECIAL_F7 0} players"); -const u8 gText_F701Players[] = _("{SPECIAL_F7 1} players"); -const u8 gText_F702Players[] = _("{SPECIAL_F7 2} players"); -const u8 gText_F703Players[] = _("{SPECIAL_F7 3} players"); +const u8 gText_F700Players[] = _("{DYNAMIC 0} players"); +const u8 gText_F701Players[] = _("{DYNAMIC 1} players"); +const u8 gText_F702Players[] = _("{DYNAMIC 2} players"); +const u8 gText_F703Players[] = _("{DYNAMIC 3} players"); const u8 *const gTextTable_Players[] = { gText_F700Players, diff --git a/src/union_room_chat.c b/src/union_room_chat.c index fefb285a8..c656063a2 100755 --- a/src/union_room_chat.c +++ b/src/union_room_chat.c @@ -1646,7 +1646,7 @@ static void AppendTextToMessage(void) charsStr = sUnionRoomKeyboardText[sChat->currentPage][sChat->currentRow]; for (i = 0; i < sChat->currentCol; i++) { - if (*charsStr == CHAR_SPECIAL_F9) + if (*charsStr == CHAR_EXTRA_SYMBOL) charsStr++; charsStr++; } @@ -1670,7 +1670,7 @@ static void AppendTextToMessage(void) str = GetEndOfMessagePtr(); while (--strLength != -1 && sChat->bufferCursorPos < MAX_MESSAGE_LENGTH) { - if (*charsStr == CHAR_SPECIAL_F9) + if (*charsStr == CHAR_EXTRA_SYMBOL) { *str = *charsStr; charsStr++; @@ -1705,7 +1705,7 @@ static void SwitchCaseOfLastMessageCharacter(void) sChat->lastBufferCursorPos = sChat->bufferCursorPos - 1; str = GetLastCharOfMessagePtr(); - if (*str != CHAR_SPECIAL_F9) + if (*str != CHAR_EXTRA_SYMBOL) { character = sCaseToggleTable[*str]; if (character) @@ -1763,7 +1763,7 @@ static u8 *GetLastCharOfMessagePtr(void) while (*currChar != EOS) { lastChar = currChar; - if (*currChar == CHAR_SPECIAL_F9) + if (*currChar == CHAR_EXTRA_SYMBOL) currChar++; currChar++; } @@ -1784,7 +1784,7 @@ static u16 GetNumOverflowCharsInMessage(void) strLength -= 10; for (i = 0; i < strLength; i++) { - if (*str == CHAR_SPECIAL_F9) + if (*str == CHAR_EXTRA_SYMBOL) str++; str++; @@ -1925,7 +1925,7 @@ static u8 *GetLimitedMessageStartPtr(void) u8 *str = sChat->messageEntryBuffer; for (i = 0; i < numChars; i++) { - if (*str == CHAR_SPECIAL_F9) + if (*str == CHAR_EXTRA_SYMBOL) *str++; str++; @@ -1942,7 +1942,7 @@ static u16 GetLimitedMessageStartPos(void) u8 *str = sChat->messageEntryBuffer; for (count = 0, i = 0; i < numChars; count++, i++) { - if (*str == CHAR_SPECIAL_F9) + if (*str == CHAR_EXTRA_SYMBOL) str++; str++; diff --git a/src/unk_text_util_2.c b/src/unk_text_util_2.c index a0b1281a4..2ff8c6507 100644 --- a/src/unk_text_util_2.c +++ b/src/unk_text_util_2.c @@ -57,19 +57,19 @@ u16 Font6Func(struct TextPrinter *textPrinter) char_ = *textPrinter->printerTemplate.currentChar++; switch (char_) { - case 1: + case EXT_CTRL_CODE_COLOR: textPrinter->printerTemplate.fgColor = *textPrinter->printerTemplate.currentChar++; GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor); return 2; - case 2: + case EXT_CTRL_CODE_HIGHLIGHT: textPrinter->printerTemplate.bgColor = *textPrinter->printerTemplate.currentChar++; GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor); return 2; - case 3: + case EXT_CTRL_CODE_SHADOW: textPrinter->printerTemplate.shadowColor = *textPrinter->printerTemplate.currentChar++; GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor); return 2; - case 4: + case EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW: textPrinter->printerTemplate.fgColor = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.bgColor = *++textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.shadowColor = *++textPrinter->printerTemplate.currentChar; @@ -77,43 +77,43 @@ u16 Font6Func(struct TextPrinter *textPrinter) GenerateFontHalfRowLookupTable(textPrinter->printerTemplate.fgColor, textPrinter->printerTemplate.bgColor, textPrinter->printerTemplate.shadowColor); return 2; - case 5: + case EXT_CTRL_CODE_PALETTE: textPrinter->printerTemplate.currentChar++; return 2; - case 6: + case EXT_CTRL_CODE_SIZE: subStruct->glyphId = *textPrinter->printerTemplate.currentChar; textPrinter->printerTemplate.currentChar++; return 2; - case 7: + case EXT_CTRL_CODE_RESET_SIZE: return 2; - case 8: + case EXT_CTRL_CODE_PAUSE: textPrinter->delayCounter = *textPrinter->printerTemplate.currentChar++; textPrinter->state = 6; return 2; - case 9: + case EXT_CTRL_CODE_PAUSE_UNTIL_PRESS: textPrinter->state = 1; if (gTextFlags.autoScroll) { subStruct->autoScrollDelay = 0; } return 3; - case 10: + case EXT_CTRL_CODE_WAIT_SE: textPrinter->state = 5; return 3; - case 11: - case 16: + case EXT_CTRL_CODE_PLAY_BGM: + case EXT_CTRL_CODE_PLAY_SE: textPrinter->printerTemplate.currentChar += 2; return 2; - case 12: + case EXT_CTRL_CODE_ESCAPE: char_ = *++textPrinter->printerTemplate.currentChar; break; - case 13: + case EXT_CTRL_CODE_SHIFT_TEXT: textPrinter->printerTemplate.currentX = textPrinter->printerTemplate.x + *textPrinter->printerTemplate.currentChar++; return 2; - case 14: + case EXT_CTRL_CODE_SHIFT_DOWN: textPrinter->printerTemplate.currentY = textPrinter->printerTemplate.y + *textPrinter->printerTemplate.currentChar++; return 2; - case 15: + case EXT_CTRL_CODE_FILL_WINDOW: FillWindowPixelBuffer(textPrinter->printerTemplate.windowId, PIXEL_FILL(textPrinter->printerTemplate.bgColor)); return 2; } @@ -126,10 +126,10 @@ u16 Font6Func(struct TextPrinter *textPrinter) textPrinter->state = 3; TextPrinterInitDownArrowCounters(textPrinter); return 3; - case 0xF9: + case CHAR_EXTRA_SYMBOL: char_ = *textPrinter->printerTemplate.currentChar++| 0x100; break; - case 0xF8: + case CHAR_KEYPAD_ICON: textPrinter->printerTemplate.currentChar++; return 0; } |