Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize judgement vs judgment spelling #1748

Merged
merged 1 commit into from
Sep 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/battle_message.h
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ extern const u8 gText_OpponentMon1Name[];
extern const u8 gText_Mind[];
extern const u8 gText_Skill[];
extern const u8 gText_Body[];
extern const u8 gText_Judgement[];
extern const u8 gText_Judgment[];
extern const u8 gText_EmptyString3[];
extern const u8 gText_RecordBattleToPass[];
extern const u8 gText_BattleRecordedOnPass[];
Expand Down
4 changes: 2 additions & 2 deletions include/constants/battle.h
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,8 @@
#define ARENA_WIN_MIND 18
#define ARENA_WIN_SKILL 19
#define ARENA_WIN_BODY 20
#define ARENA_WIN_JUDGEMENT_TITLE 21
#define ARENA_WIN_JUDGEMENT_TEXT 22
#define ARENA_WIN_JUDGMENT_TITLE 21
#define ARENA_WIN_JUDGMENT_TEXT 22

// Flag for BattlePutTextOnWindow. Never set
#define B_WIN_COPYTOVRAM (1 << 7)
Expand Down
4 changes: 2 additions & 2 deletions include/graphics.h
Original file line number Diff line number Diff line change
Expand Up @@ -4138,8 +4138,8 @@ extern const u16 gTilesetAnims_BattleDomePals0_1[];
extern const u16 gTilesetAnims_BattleDomePals0_2[];
extern const u16 gTilesetAnims_BattleDomePals0_3[];

extern const u32 gBattleArenaJudgementSymbolsGfx[];
extern const u32 gBattleArenaJudgementSymbolsPalette[];
extern const u32 gBattleArenaJudgmentSymbolsGfx[];
extern const u32 gBattleArenaJudgmentSymbolsPalette[];

extern const u32 gBattleWindowTextPalette[];

Expand Down
66 changes: 33 additions & 33 deletions src/battle_arena.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ static void BufferArenaOpponentName(void);
static void SpriteCB_JudgmentIcon(struct Sprite *sprite);
static void ShowJudgmentSprite(u8 x, u8 y, u8 category, u8 battler);

#define JUDGEMENT_STATE_FINISHED 8
#define JUDGMENT_STATE_FINISHED 8

#define TAG_JUDGEMENT_ICON 1000
#define TAG_JUDGMENT_ICON 1000

enum {
ANIM_ICON_X, // Player lost
Expand Down Expand Up @@ -275,7 +275,7 @@ static const s8 sMindRatings[MOVES_COUNT] =
[MOVE_PSYCHO_BOOST] = 1,
};

static const struct OamData sOam_JudgementIcon =
static const struct OamData sOam_JudgmentIcon =
{
.y = 0,
.affineMode = ST_OAM_AFFINE_OFF,
Expand All @@ -292,52 +292,52 @@ static const struct OamData sOam_JudgementIcon =
.affineParam = 0
};

static const union AnimCmd sAnim_JudgementIcon_X[] =
static const union AnimCmd sAnim_JudgmentIcon_X[] =
{
ANIMCMD_FRAME(0, 1),
ANIMCMD_END
};

static const union AnimCmd sAnim_JudgementIcon_Triangle[] =
static const union AnimCmd sAnim_JudgmentIcon_Triangle[] =
{
ANIMCMD_FRAME(4, 1),
ANIMCMD_END
};

static const union AnimCmd sAnim_JudgementIcon_Circle[] =
static const union AnimCmd sAnim_JudgmentIcon_Circle[] =
{
ANIMCMD_FRAME(8, 1),
ANIMCMD_END
};

static const union AnimCmd sAnim_JudgementIcon_Line[] =
static const union AnimCmd sAnim_JudgmentIcon_Line[] =
{
ANIMCMD_FRAME(12, 1),
ANIMCMD_END
};

static const union AnimCmd *const sAnims_JudgementIcon[] =
static const union AnimCmd *const sAnims_JudgmentIcon[] =
{
[ANIM_ICON_X] = sAnim_JudgementIcon_X,
[ANIM_ICON_TRIANGLE] = sAnim_JudgementIcon_Triangle,
[ANIM_ICON_CIRCLE] = sAnim_JudgementIcon_Circle,
[ANIM_ICON_LINE] = sAnim_JudgementIcon_Line,
[ANIM_ICON_X] = sAnim_JudgmentIcon_X,
[ANIM_ICON_TRIANGLE] = sAnim_JudgmentIcon_Triangle,
[ANIM_ICON_CIRCLE] = sAnim_JudgmentIcon_Circle,
[ANIM_ICON_LINE] = sAnim_JudgmentIcon_Line,
};

static const struct SpriteTemplate sSpriteTemplate_JudgmentIcon =
{
.tileTag = TAG_JUDGEMENT_ICON,
.tileTag = TAG_JUDGMENT_ICON,
.paletteTag = TAG_NONE,
.oam = &sOam_JudgementIcon,
.anims = sAnims_JudgementIcon,
.oam = &sOam_JudgmentIcon,
.anims = sAnims_JudgmentIcon,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = SpriteCB_JudgmentIcon,
};

static const struct CompressedSpriteSheet sBattleArenaJudgementSymbolsSpriteSheet[] =
static const struct CompressedSpriteSheet sBattleArenaJudgmentSymbolsSpriteSheet[] =
{
{gBattleArenaJudgementSymbolsGfx, 0x200, TAG_JUDGEMENT_ICON},
{gBattleArenaJudgmentSymbolsGfx, 0x200, TAG_JUDGMENT_ICON},
{0}
};

Expand Down Expand Up @@ -389,8 +389,8 @@ u8 BattleArena_ShowJudgmentWindow(u8 *state)
case 0:
BeginNormalPaletteFade(0x7FFFFF1C, 4, 0, 8, RGB_BLACK);
SetGpuReg(REG_OFFSET_WININ, (WININ_WIN0_ALL & ~WININ_WIN0_BG0) | WININ_WIN1_ALL);
LoadCompressedSpriteSheet(sBattleArenaJudgementSymbolsSpriteSheet);
LoadCompressedPalette(gBattleArenaJudgementSymbolsPalette, 0x1F0, 0x20);
LoadCompressedSpriteSheet(sBattleArenaJudgmentSymbolsSpriteSheet);
LoadCompressedPalette(gBattleArenaJudgmentSymbolsPalette, 0x1F0, 0x20);
gBattle_WIN0H = 0xFF;
gBattle_WIN0V = 0x70;
(*state)++;
Expand All @@ -417,8 +417,8 @@ u8 BattleArena_ShowJudgmentWindow(u8 *state)
BattlePutTextOnWindow(gText_Mind, ARENA_WIN_MIND);
BattlePutTextOnWindow(gText_Skill, ARENA_WIN_SKILL);
BattlePutTextOnWindow(gText_Body, ARENA_WIN_BODY);
BattleStringExpandPlaceholdersToDisplayedString(gText_Judgement);
BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_JUDGEMENT_TITLE);
BattleStringExpandPlaceholdersToDisplayedString(gText_Judgment);
BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_JUDGMENT_TITLE);
(*state)++;
}
break;
Expand All @@ -441,26 +441,26 @@ u8 BattleArena_ShowJudgmentWindow(u8 *state)
PlaySE(SE_ARENA_TIMEUP1);
ShowJudgmentSprite(80, 40, ARENA_CATEGORY_MIND, B_POSITION_PLAYER_LEFT);
ShowJudgmentSprite(160, 40, ARENA_CATEGORY_MIND, B_POSITION_OPPONENT_LEFT);
BattleStringExpandPlaceholdersToDisplayedString(gText_Judgement);
BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_JUDGEMENT_TITLE);
BattleStringExpandPlaceholdersToDisplayedString(gText_Judgment);
BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_JUDGMENT_TITLE);
(*state)++;
result = ARENA_RESULT_STEP_DONE;
break;
case 5:
PlaySE(SE_ARENA_TIMEUP1);
ShowJudgmentSprite(80, 56, ARENA_CATEGORY_SKILL, B_POSITION_PLAYER_LEFT);
ShowJudgmentSprite(160, 56, ARENA_CATEGORY_SKILL, B_POSITION_OPPONENT_LEFT);
BattleStringExpandPlaceholdersToDisplayedString(gText_Judgement);
BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_JUDGEMENT_TITLE);
BattleStringExpandPlaceholdersToDisplayedString(gText_Judgment);
BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_JUDGMENT_TITLE);
(*state)++;
result = ARENA_RESULT_STEP_DONE;
break;
case 6:
PlaySE(SE_ARENA_TIMEUP1);
ShowJudgmentSprite(80, 72, ARENA_CATEGORY_BODY, B_POSITION_PLAYER_LEFT);
ShowJudgmentSprite(160, 72, ARENA_CATEGORY_BODY, B_POSITION_OPPONENT_LEFT);
BattleStringExpandPlaceholdersToDisplayedString(gText_Judgement);
BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_JUDGEMENT_TITLE);
BattleStringExpandPlaceholdersToDisplayedString(gText_Judgment);
BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_JUDGMENT_TITLE);
(*state)++;
result = ARENA_RESULT_STEP_DONE;
break;
Expand All @@ -482,23 +482,23 @@ u8 BattleArena_ShowJudgmentWindow(u8 *state)
}
(*state)++;
break;
case JUDGEMENT_STATE_FINISHED:
// Finishing this state is the indicator to SpriteCB_JudgmentIcon that its safe to destroy the judgement icon sprites
case JUDGMENT_STATE_FINISHED:
// Finishing this state is the indicator to SpriteCB_JudgmentIcon that its safe to destroy the judgment icon sprites
(*state)++;
break;
case JUDGEMENT_STATE_FINISHED + 1:
case JUDGMENT_STATE_FINISHED + 1:
SetGpuReg(REG_OFFSET_WININ, (WININ_WIN0_ALL & ~WININ_WIN0_BG0) | WININ_WIN1_ALL);
HandleBattleWindow(5, 0, 24, 13, WINDOW_CLEAR);
CopyBgTilemapBufferToVram(0);
m4aMPlayVolumeControl(&gMPlayInfo_BGM, TRACKS_ALL, 256);
BeginNormalPaletteFade(0x7FFFFF1C, 4, 8, 0, RGB_BLACK);
(*state)++;
break;
case JUDGEMENT_STATE_FINISHED + 2:
case JUDGMENT_STATE_FINISHED + 2:
if (!gPaletteFade.active)
{
SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_ALL | WININ_WIN1_ALL);
FreeSpriteTilesByTag(TAG_JUDGEMENT_ICON);
FreeSpriteTilesByTag(TAG_JUDGMENT_ICON);
result = ARENA_RESULT_STEP_DONE;
(*state)++;
}
Expand Down Expand Up @@ -562,7 +562,7 @@ static void ShowJudgmentSprite(u8 x, u8 y, u8 category, u8 battler)

static void SpriteCB_JudgmentIcon(struct Sprite *sprite)
{
if (gBattleCommunication[0] > JUDGEMENT_STATE_FINISHED)
if (gBattleCommunication[0] > JUDGMENT_STATE_FINISHED)
DestroySprite(sprite);
}

Expand Down
4 changes: 2 additions & 2 deletions src/battle_bg.c
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ static const struct WindowTemplate sBattleArenaWindowTemplates[] =
.paletteNum = 5,
.baseBlock = 0x013c,
},
[ARENA_WIN_JUDGEMENT_TITLE] = {
[ARENA_WIN_JUDGMENT_TITLE] = {
.bg = 0,
.tilemapLeft = 8,
.tilemapTop = 11,
Expand All @@ -580,7 +580,7 @@ static const struct WindowTemplate sBattleArenaWindowTemplates[] =
.paletteNum = 5,
.baseBlock = 0x0148,
},
[ARENA_WIN_JUDGEMENT_TEXT] = {
[ARENA_WIN_JUDGMENT_TEXT] = {
.bg = 0,
.tilemapLeft = 2,
.tilemapTop = 15,
Expand Down
10 changes: 5 additions & 5 deletions src/battle_message.c
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,7 @@ const u8 gText_OpponentMon1Name[] = _("{B_OPPONENT_MON1_NAME}");
const u8 gText_Mind[] = _("Mind");
const u8 gText_Skill[] = _("Skill");
const u8 gText_Body[] = _("Body");
const u8 gText_Judgement[] = _("{B_BUFF1}{CLEAR 13}Judgment{CLEAR 13}{B_BUFF2}");
const u8 gText_Judgment[] = _("{B_BUFF1}{CLEAR 13}Judgment{CLEAR 13}{B_BUFF2}");
static const u8 sText_TwoTrainersSentPkmn[] = _("{B_TRAINER1_CLASS} {B_TRAINER1_NAME} sent\nout {B_OPPONENT_MON1_NAME}!\p{B_TRAINER2_CLASS} {B_TRAINER2_NAME} sent\nout {B_OPPONENT_MON2_NAME}!");
static const u8 sText_Trainer2SentOutPkmn[] = _("{B_TRAINER2_CLASS} {B_TRAINER2_NAME} sent\nout {B_BUFF1}!");
static const u8 sText_TwoTrainersWantToBattle[] = _("{B_TRAINER1_CLASS} {B_TRAINER1_NAME} and\n{B_TRAINER2_CLASS} {B_TRAINER2_NAME}\lwant to battle!\p");
Expand Down Expand Up @@ -2020,7 +2020,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
},
[ARENA_WIN_JUDGEMENT_TITLE] = {
[ARENA_WIN_JUDGMENT_TITLE] = {
.fillValue = PIXEL_FILL(0xE),
.fontId = FONT_NORMAL,
.x = -1,
Expand All @@ -2032,7 +2032,7 @@ static const struct BattleWindowText sTextOnWindowsInfo_Arena[] =
.bgColor = TEXT_DYNAMIC_COLOR_5,
.shadowColor = TEXT_DYNAMIC_COLOR_6,
},
[ARENA_WIN_JUDGEMENT_TEXT] = {
[ARENA_WIN_JUDGMENT_TEXT] = {
.fillValue = PIXEL_FILL(0x1),
.fontId = FONT_NORMAL,
.x = 0,
Expand Down Expand Up @@ -3081,7 +3081,7 @@ void BattlePutTextOnWindow(const u8 *text, u8 windowId)
printerTemplate.x = printerTemplate.currentX = alignX;
}

if (windowId == ARENA_WIN_JUDGEMENT_TEXT)
if (windowId == ARENA_WIN_JUDGMENT_TEXT)
gTextFlags.useAlternateDownArrow = FALSE;
else
gTextFlags.useAlternateDownArrow = TRUE;
Expand All @@ -3091,7 +3091,7 @@ void BattlePutTextOnWindow(const u8 *text, u8 windowId)
else
gTextFlags.autoScroll = FALSE;

if (windowId == B_WIN_MSG || windowId == ARENA_WIN_JUDGEMENT_TEXT)
if (windowId == B_WIN_MSG || windowId == ARENA_WIN_JUDGMENT_TEXT)
{
if (gBattleTypeFlags & (BATTLE_TYPE_LINK | BATTLE_TYPE_RECORDED_LINK))
speed = 1;
Expand Down
6 changes: 3 additions & 3 deletions src/battle_script_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -5226,7 +5226,7 @@ static void Cmd_switchineffects(void)
else
{
// There is a hack here to ensure the truant counter will be 0 when the battler's next turn starts.
// The truant counter is not updated in the case where a mon switches in after a lost judgement in the battle arena.
// The truant counter is not updated in the case where a mon switches in after a lost judgment in the battle arena.
if (gBattleMons[gActiveBattler].ability == ABILITY_TRUANT && !gDisableStructs[gActiveBattler].truantSwitchInHack)
gDisableStructs[gActiveBattler].truantCounter = 1;

Expand Down Expand Up @@ -6412,10 +6412,10 @@ static void Cmd_various(void)
break;
case VARIOUS_ARENA_JUDGMENT_STRING:
BattleStringExpandPlaceholdersToDisplayedString(gRefereeStringsTable[gBattlescriptCurrInstr[1]]);
BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_JUDGEMENT_TEXT);
BattlePutTextOnWindow(gDisplayedStringBattle, ARENA_WIN_JUDGMENT_TEXT);
break;
case VARIOUS_ARENA_WAIT_STRING:
if (IsTextPrinterActive(ARENA_WIN_JUDGEMENT_TEXT))
if (IsTextPrinterActive(ARENA_WIN_JUDGMENT_TEXT))
return;
break;
case VARIOUS_WAIT_CRY:
Expand Down
4 changes: 2 additions & 2 deletions src/graphics.c
Original file line number Diff line number Diff line change
Expand Up @@ -963,8 +963,8 @@ const u32 gDomeTourneyTree_Pal[] = INCBIN_U32("graphics/battle_frontier/tourney.
const u32 gDomeTourneyTreeButtons_Pal[] = INCBIN_U32("graphics/battle_frontier/tourney_buttons.gbapal.lz");
const u32 gDomeTourneyMatchCardBg_Pal[] = INCBIN_U32("graphics/battle_frontier/tourney_match_card_bg.gbapal.lz");

const u32 gBattleArenaJudgementSymbolsGfx[] = INCBIN_U32("graphics/battle_frontier/arena_judgement_symbols.4bpp.lz");
const u32 gBattleArenaJudgementSymbolsPalette[] = INCBIN_U32("graphics/battle_frontier/arena_judgement_symbols.gbapal.lz");
const u32 gBattleArenaJudgmentSymbolsGfx[] = INCBIN_U32("graphics/battle_frontier/arena_judgment_symbols.4bpp.lz");
const u32 gBattleArenaJudgmentSymbolsPalette[] = INCBIN_U32("graphics/battle_frontier/arena_judgment_symbols.gbapal.lz");

const u32 gBattleWindowTextPalette[] = INCBIN_U32("graphics/battle_interface/text.gbapal.lz");
const u16 gPPTextPalette[] = INCBIN_U16("graphics/battle_interface/text_pp.gbapal");
Expand Down