diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2021-06-18 14:36:48 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2021-06-18 14:36:48 -0400 |
commit | c5dd8f884abbcdcab67bcb89e4b8cc84a47f6d64 (patch) | |
tree | ae50949089a3aab92cac03e47c4f37fe5d1a1f64 /src | |
parent | b6bdaedb77a740893ebb66a85ebecbfa64353ba6 (diff) |
Revert these symbols back to ewram.h
Diffstat (limited to 'src')
-rw-r--r-- | src/contest_link_80C2020.c | 4 | ||||
-rw-r--r-- | src/contest_painting.c | 38 | ||||
-rw-r--r-- | src/debug/tomomichi_debug_menu.c | 2 | ||||
-rw-r--r-- | src/scrcmd.c | 2 | ||||
-rw-r--r-- | src/script_pokemon_util_80C4BF0.c | 4 |
5 files changed, 25 insertions, 25 deletions
diff --git a/src/contest_link_80C2020.c b/src/contest_link_80C2020.c index 6f176e2b0..e76e7322b 100644 --- a/src/contest_link_80C2020.c +++ b/src/contest_link_80C2020.c @@ -727,8 +727,8 @@ static void sub_80C2E14(u8 taskId) sub_810FB10(2); Contest_SaveWinner(gSpecialVar_ContestRank); Contest_SaveWinner(0xFE); - gBattleStruct->contestWinnerIsForArtist = 1; - gBattleStruct->contestWinnerSaveIdx = sub_80B2C4C(0xfe, 0); + eCurContestWinnerIsForArtist = TRUE; + eCurContestWinnerSaveIdx = sub_80B2C4C(0xfe, 0); BeginHardwarePaletteFade(0xff, 0, 0, 16, 0); gTasks[taskId].func = sub_80C2EA0; } diff --git a/src/contest_painting.c b/src/contest_painting.c index c502bd83a..24a63b48f 100644 --- a/src/contest_painting.c +++ b/src/contest_painting.c @@ -86,14 +86,14 @@ const struct LabelPair sMuseumCaptions[] = const struct OamData sContestPaintingMonOamData = { .y = 0, - .affineMode = 0, - .objMode = 0, - .mosaic = 1, - .bpp = 1, - .shape = 0, + .affineMode = ST_OAM_AFFINE_OFF, + .objMode = ST_OAM_OBJ_NORMAL, + .mosaic = TRUE, + .bpp = ST_OAM_8BPP, + .shape = SPRITE_SHAPE(64x64), .x = 0, .matrixNum = 0, - .size = 3, + .size = SPRITE_SIZE(64x64), .tileNum = 0, .priority = 0, .paletteNum = 0, @@ -111,17 +111,17 @@ static void ContestPaintingInitBG(void); static void ContestPaintingInitVars(u8 arg0); static void VBlankCB_ContestPainting(void); static void sub_8106B90(u8 *a, u16 *b, u16 *c); -static void sub_8107090(u8 arg0, u8 arg1); +static void CreateContestPaintingPicture(u8 arg0, u8 arg1); -void sub_8106630(u32 contestWinnerId) +void SetContestWinnerForPainting(u32 contestWinnerId) { // probably fakematching - struct ContestWinner *ptr1 = &eContestPaintingWinner; // TODO: resolve messy struct duplicates - u8 *ptr2 = (u8*)&gBattleStruct->contestWinnerSaveIdx; - u8 *ptr3 = (u8*)&gBattleStruct->contestWinnerIsForArtist; - *ptr1 = gSaveBlock1.contestWinners[contestWinnerId - 1]; - *ptr2 = contestWinnerId - 1; - *ptr3 = 0; + struct ContestWinner *curWinner = &eCurContestWinner; + u8 *saveIdx = (u8*)&eCurContestWinnerSaveIdx; + u8 *isForArtist = (u8*)&eCurContestWinnerIsForArtist; + *curWinner = gSaveBlock1.contestWinners[contestWinnerId - 1]; + *saveIdx = contestWinnerId - 1; + *isForArtist = FALSE; } void CB2_ContestPainting(void) @@ -136,7 +136,7 @@ static void ShowContestPainting(void) case 0: ScanlineEffect_Stop(); SetVBlankCallback(NULL); - gContestPaintingWinner = &eContestPaintingWinner; + gContestPaintingWinner = &eCurContestWinner; ContestPaintingInitVars(TRUE); ContestPaintingInitBG(); gMain.state++; @@ -152,15 +152,15 @@ static void ShowContestPainting(void) case 2: SeedRng(gMain.vblankCounter1); InitKeys(); - ContestPaintingInitWindow(gBattleStruct->contestWinnerIsForArtist); + ContestPaintingInitWindow(eCurContestWinnerIsForArtist); gMain.state++; break; case 3: - sub_8107090(gBattleStruct->contestWinnerSaveIdx, gBattleStruct->contestWinnerIsForArtist); + CreateContestPaintingPicture(eCurContestWinnerSaveIdx, eCurContestWinnerIsForArtist); gMain.state++; break; case 4: - ContestPaintingPrintCaption(gBattleStruct->contestWinnerSaveIdx, gBattleStruct->contestWinnerIsForArtist); + ContestPaintingPrintCaption(eCurContestWinnerSaveIdx, eCurContestWinnerIsForArtist); LoadPalette(sBgPalette, 0, 1 * 2); DmaClear32(3, PLTT, 0x400); BeginFastPaletteFade(2); @@ -572,7 +572,7 @@ static void sub_8106F6C(u8 arg0) LoadPalette(gContestPaintingMonPalette, 256, 256 * 2); } -static void sub_8107090(u8 arg0, u8 arg1) +static void CreateContestPaintingPicture(u8 arg0, u8 arg1) { sub_8106F4C(); sub_8106AC4(gContestPaintingWinner->species, 0); diff --git a/src/debug/tomomichi_debug_menu.c b/src/debug/tomomichi_debug_menu.c index 771aa7d18..81435c366 100644 --- a/src/debug/tomomichi_debug_menu.c +++ b/src/debug/tomomichi_debug_menu.c @@ -4470,7 +4470,7 @@ NAKED void PicTest_Redraw(u8 a0) static void PrepareDebugOverlayBeforeShowingContestPainting(u8 a0) { - struct ContestWinner *contestEntry = &eContestPaintingWinner; + struct ContestWinner *contestEntry = &eCurContestWinner; contestEntry->species = sPicTest_Species; contestEntry->otId = sPicTest_OTID; contestEntry->personality = sPicTest_Personality; diff --git a/src/scrcmd.c b/src/scrcmd.c index 1a2d55f2e..3f65d0f02 100644 --- a/src/scrcmd.c +++ b/src/scrcmd.c @@ -1411,7 +1411,7 @@ bool8 ScrCmd_showcontestwinner(struct ScriptContext *ctx) u8 v1 = ScriptReadByte(ctx); if (v1) - sub_8106630(v1); + SetContestWinnerForPainting(v1); ShowContestWinner(); ScriptContext1_Stop(); return TRUE; diff --git a/src/script_pokemon_util_80C4BF0.c b/src/script_pokemon_util_80C4BF0.c index 4ccc59540..ff82adf74 100644 --- a/src/script_pokemon_util_80C4BF0.c +++ b/src/script_pokemon_util_80C4BF0.c @@ -222,8 +222,8 @@ void ShowContestWinner(void) if(gUnknown_0203856C) { sub_80AAF30(); - gBattleStruct->contestWinnerIsForArtist = 1; - gBattleStruct->contestWinnerSaveIdx = sub_80B2C4C(254, 0); + eCurContestWinnerIsForArtist = TRUE; + eCurContestWinnerSaveIdx = sub_80B2C4C(254, 0); Contest_SaveWinner(3); gUnknown_0203856C = 0; } |