diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2018-03-31 09:57:43 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2018-03-31 09:57:43 -0400 |
commit | ba9792e303bf8705334d2645167ae5e5a921460a (patch) | |
tree | 73e9df16106a653e89327004a9b37f932464f741 /src | |
parent | 32b86c14aa57c6e055670daf76f8e1dbccfe00c3 (diff) |
more renaming; wtf was that struct INCBIN_U8 nonsense
Diffstat (limited to 'src')
-rw-r--r-- | src/battle/anim/glow.c | 2 | ||||
-rw-r--r-- | src/battle/anim/love_bg.c | 6 | ||||
-rw-r--r-- | src/battle/anim/scary_face.c | 10 | ||||
-rw-r--r-- | src/contest_effect.c | 38 |
4 files changed, 28 insertions, 28 deletions
diff --git a/src/battle/anim/glow.c b/src/battle/anim/glow.c index 63466c0ff..174655080 100644 --- a/src/battle/anim/glow.c +++ b/src/battle/anim/glow.c @@ -13,7 +13,7 @@ extern u8 gAnimBankTarget; extern u16 gUnknown_083D7A5C[5]; -extern struct INCBIN_U8 gBattleAnimSpritePalette_206; +extern const u8 gBattleAnimSpritePalette_206[]; // glow (a whitening effect where the Pokemon glows white in a cycle.) // Used in Heal Bell. diff --git a/src/battle/anim/love_bg.c b/src/battle/anim/love_bg.c index c3828c681..72d9325f2 100644 --- a/src/battle/anim/love_bg.c +++ b/src/battle/anim/love_bg.c @@ -10,9 +10,9 @@ extern s16 gBattleAnimArgs[]; extern u8 gAnimBankAttacker; extern u8 gAnimBankTarget; -extern struct INCBIN_U8 gAttractTilemap; -extern struct INCBIN_U8 gAttractGfx; -extern struct INCBIN_U8 gAttractPal; +extern const u8 gAttractTilemap[]; +extern const u8 gAttractGfx[]; +extern const u8 gAttractPal[]; extern u16 gBattle_BG1_Y; extern u16 gBattle_BG1_X; diff --git a/src/battle/anim/scary_face.c b/src/battle/anim/scary_face.c index 8d51521ee..8bc7bbd07 100644 --- a/src/battle/anim/scary_face.c +++ b/src/battle/anim/scary_face.c @@ -10,11 +10,11 @@ extern s16 gBattleAnimArgs[]; extern u8 gAnimBankAttacker; extern u8 gAnimBankTarget; -extern struct INCBIN_U8 gBattleAnimBackgroundTilemap_ScaryFaceContest; -extern struct INCBIN_U8 gBattleAnimBackgroundTilemap_ScaryFacePlayer; -extern struct INCBIN_U8 gBattleAnimBackgroundTilemap_ScaryFaceOpponent; -extern struct INCBIN_U8 gBattleAnimBackgroundImage_ScaryFace; -extern struct INCBIN_U8 gBattleAnimBackgroundPalette_ScaryFace; +extern const u8 gBattleAnimBackgroundTilemap_ScaryFaceContest[]; +extern const u8 gBattleAnimBackgroundTilemap_ScaryFacePlayer[]; +extern const u8 gBattleAnimBackgroundTilemap_ScaryFaceOpponent[]; +extern const u8 gBattleAnimBackgroundImage_ScaryFace[]; +extern const u8 gBattleAnimBackgroundPalette_ScaryFace[]; extern u16 gBattle_BG1_Y; extern u16 gBattle_BG1_X; diff --git a/src/contest_effect.c b/src/contest_effect.c index ae082b0e5..6025453ca 100644 --- a/src/contest_effect.c +++ b/src/contest_effect.c @@ -54,8 +54,6 @@ static void sub_80B9200(u8, u8); static s16 RoundTowardsZero(s16); static s16 RoundUp(s16); -#define abs(x) ((x) >= 0 ? (x) : -(x)) - #include "data/contest_moves.h" bool8 AreMovesContestCombo(u16 lastMove, u16 nextMove) { @@ -144,8 +142,8 @@ static void ContestEffect_08(void) if (shared192D0.turnOrder[a] - 1 == shared192D0.turnOrder[i]) break; } - shared192D0.unk8[0] = i; - shared192D0.unk8[1] = 0xFF; + shared192D0.jamQueue[0] = i; + shared192D0.jamQueue[1] = 0xFF; idx = WasAtLeastOneOpponentJammed(); } if (idx == 0) @@ -165,8 +163,8 @@ static void ContestEffect_09(void) for (i = 0; i < 4; i++) if (shared192D0.turnOrder[a] > shared192D0.turnOrder[i]) - shared192D0.unk8[j++] = i; - shared192D0.unk8[j] = 0xFF; + shared192D0.jamQueue[j++] = i; + shared192D0.jamQueue[j] = 0xFF; idx = WasAtLeastOneOpponentJammed(); } if (idx == 0) @@ -178,7 +176,8 @@ static void ContestEffect_14(void) // Startles the POKéMON that appealed before the user. { u8 r0 = Random() % 10; - int r1 = 20; + int r1; + if (r0 < 2) r1 = 20; else if (r0 < 8) @@ -203,11 +202,12 @@ static void ContestEffect_15(void) { if (shared192D0.turnOrder[r6] > shared192D0.turnOrder[r5]) { - shared192D0.unk8[0] = r5; - shared192D0.unk8[1] = 0xFF; + shared192D0.jamQueue[0] = r5; + shared192D0.jamQueue[1] = 0xFF; { u8 r0 = Random() % 10; int r1; + if (r0 == 0) r1 = 0; else if (r0 <= 2) @@ -280,8 +280,8 @@ static void ContestEffect_17(void) shared192D0.jam = 50; else shared192D0.jam = 10; - shared192D0.unk8[0] = r5; - shared192D0.unk8[1] = 0xFF; + shared192D0.jamQueue[0] = r5; + shared192D0.jamQueue[1] = 0xFF; if (WasAtLeastOneOpponentJammed()) r9++; } @@ -489,8 +489,8 @@ static void ContestEffect_28(void) shared192D0.jam = 40; else shared192D0.jam = 10; - shared192D0.unk8[0] = r5; - shared192D0.unk8[1] = 0xFF; + shared192D0.jamQueue[0] = r5; + shared192D0.jamQueue[1] = 0xFF; if (WasAtLeastOneOpponentJammed()) r7++; } @@ -994,8 +994,8 @@ static void ContestEffect_45(void) } else shared192D0.jam = 10; - shared192D0.unk8[0] = i; - shared192D0.unk8[1] = 0xFF; + shared192D0.jamQueue[0] = i; + shared192D0.jamQueue[1] = 0xFF; if (WasAtLeastOneOpponentJammed()) r7++; } @@ -1062,8 +1062,8 @@ static void JamByMoveCategory(u8 category) shared192D0.jam = 40; else shared192D0.jam = 10; - shared192D0.unk8[0] = i; - shared192D0.unk8[1] = 0xFF; + shared192D0.jamQueue[0] = i; + shared192D0.jamQueue[1] = 0xFF; if (WasAtLeastOneOpponentJammed()) r7++; } @@ -1153,9 +1153,9 @@ static bool8 WasAtLeastOneOpponentJammed(void) s16 sp00[4] = {0}; int i; - for (i = 0; shared192D0.unk8[i] != 0xFF; i++) + for (i = 0; shared192D0.jamQueue[i] != 0xFF; i++) { - u8 r4 = shared192D0.unk8[i]; + u8 r4 = shared192D0.jamQueue[i]; if (sub_80B90C0(r4)) { shared192D0.jam2 = shared192D0.jam; |