diff options
author | ProjectRevoTPP <projectrevotpp@hotmail.com> | 2017-11-06 03:46:09 -0500 |
---|---|---|
committer | ProjectRevoTPP <projectrevotpp@hotmail.com> | 2017-11-06 03:46:09 -0500 |
commit | 5711615c6067e49c3254f9568be55dc6ed3d5c2f (patch) | |
tree | ac0e55b1797d8b2a913bb500cb31e2fff67c8211 /src/battle | |
parent | 618240c62639bc4da73d400965b6df67b2c3619e (diff) |
finish refactoring ewram defines into ewram.h.
Diffstat (limited to 'src/battle')
-rw-r--r-- | src/battle/battle_2.c | 8 | ||||
-rw-r--r-- | src/battle/battle_4.c | 12 | ||||
-rw-r--r-- | src/battle/battle_7.c | 12 | ||||
-rw-r--r-- | src/battle/battle_party_menu.c | 2 |
4 files changed, 17 insertions, 17 deletions
diff --git a/src/battle/battle_2.c b/src/battle/battle_2.c index 38c60dee1..8d27750bd 100644 --- a/src/battle/battle_2.c +++ b/src/battle/battle_2.c @@ -2290,7 +2290,7 @@ void sub_8012258(u8 a) u8 r1; for (i = 0; i < 3; i++) - gUnknown_02038470[i] = ewram1606Carr(i, a, 3); + gUnknown_02038470[i] = ewram1606Carr(i, a); r4 = pokemon_order_func(gBattlePartyID[a]); r1 = pokemon_order_func(ewram16068arr(a)); sub_8094C98(r4, r1); @@ -2298,15 +2298,15 @@ void sub_8012258(u8 a) { for (i = 0; i < 3; i++) { - ewram1606Carr(i, a, 3) = gUnknown_02038470[i]; - ewram1606Carr(i, (a ^ 2), 3) = gUnknown_02038470[i]; + ewram1606Carr(i, a) = gUnknown_02038470[i]; + ewram1606Carr(i, (a ^ 2)) = gUnknown_02038470[i]; } } else { for (i = 0; i < 3; i++) { - ewram1606Carr(i, a, 3) = gUnknown_02038470[i]; + ewram1606Carr(i, a) = gUnknown_02038470[i]; } } } diff --git a/src/battle/battle_4.c b/src/battle/battle_4.c index 5c028d86b..d7ca298c3 100644 --- a/src/battle/battle_4.c +++ b/src/battle/battle_4.c @@ -10768,12 +10768,12 @@ static void atk51_switch_handle_order(void) ewram16068arr(gActiveBank) = gBattleBufferB[gActiveBank][1]; if (gBattleTypeFlags & BATTLE_TYPE_MULTI) { - ewram1606Carr(0, gActiveBank, 3) &= 0xF; - ewram1606Carr(0, gActiveBank, 3) |= (gBattleBufferB[gActiveBank][2] & 0xF0); - ewram1606Carr(1, gActiveBank, 3) = gBattleBufferB[gActiveBank][3]; - ewram1606Carr(0, (gActiveBank ^ 2), 3) &= (0xF0); - ewram1606Carr(0, (gActiveBank ^ 2), 3) |= (gBattleBufferB[gActiveBank][2] & 0xF0) >> 4; - ewram1606Carr(2, (gActiveBank ^ 2), 3) = gBattleBufferB[gActiveBank][3]; + ewram1606Carr(0, gActiveBank) &= 0xF; + ewram1606Carr(0, gActiveBank) |= (gBattleBufferB[gActiveBank][2] & 0xF0); + ewram1606Carr(1, gActiveBank) = gBattleBufferB[gActiveBank][3]; + ewram1606Carr(0, (gActiveBank ^ 2)) &= (0xF0); + ewram1606Carr(0, (gActiveBank ^ 2)) |= (gBattleBufferB[gActiveBank][2] & 0xF0) >> 4; + ewram1606Carr(2, (gActiveBank ^ 2)) = gBattleBufferB[gActiveBank][3]; } else sub_8012258(gActiveBank); diff --git a/src/battle/battle_7.c b/src/battle/battle_7.c index 6c0a4489c..4ca1baa53 100644 --- a/src/battle/battle_7.c +++ b/src/battle/battle_7.c @@ -309,8 +309,8 @@ void BattleLoadOpponentMonSprite(struct Pokemon *pkmn, u8 b) if (species == SPECIES_CASTFORM) { paletteOffset = 0x100 + b * 16; - LZDecompressWram(lzPaletteData, ewram + 0x16400); - LoadPalette(ewram + 0x16400 + gBattleMonForms[b] * 32, paletteOffset, 0x20); + LZDecompressWram(lzPaletteData, ewram16400); + LoadPalette(ewram16400 + gBattleMonForms[b] * 32, paletteOffset, 0x20); } if (ewram17800[b].transformedSpecies != 0) { @@ -361,8 +361,8 @@ void BattleLoadPlayerMonSprite(struct Pokemon *pkmn, u8 b) if (species == SPECIES_CASTFORM) { paletteOffset = 0x100 + b * 16; - LZDecompressWram(lzPaletteData, ewram + 0x16400); - LoadPalette(ewram + 0x16400 + gBattleMonForms[b] * 32, paletteOffset, 0x20); + LZDecompressWram(lzPaletteData, ewram16400); + LoadPalette(ewram16400 + gBattleMonForms[b] * 32, paletteOffset, 0x20); } if (ewram17800[b].transformedSpecies != 0) { @@ -622,7 +622,7 @@ void sub_8031FC4(u8 a, u8 b, bool8 c) { StartSpriteAnim(&gSprites[gObjectBankIDs[a]], ewram17840.unk0); paletteOffset = 0x100 + a * 16; - LoadPalette(ewram + 0x16400 + ewram17840.unk0 * 32, paletteOffset, 32); + LoadPalette(ewram16400 + ewram17840.unk0 * 32, paletteOffset, 32); gBattleMonForms[a] = ewram17840.unk0; if (ewram17800[a].transformedSpecies != 0) { @@ -694,7 +694,7 @@ void sub_8031FC4(u8 a, u8 b, bool8 c) LoadPalette(ewram, paletteOffset, 32); if (species == SPECIES_CASTFORM) { - u16 *paletteSrc = (u16 *)(ewram + 0x16400); + u16 *paletteSrc = (u16 *)ewram16400; // TODO: avoid casting? LZDecompressWram(lzPaletteData, paletteSrc); LoadPalette(paletteSrc + gBattleMonForms[b] * 16, paletteOffset, 32); diff --git a/src/battle/battle_party_menu.c b/src/battle/battle_party_menu.c index ab8b7a694..97e9dc0fc 100644 --- a/src/battle/battle_party_menu.c +++ b/src/battle/battle_party_menu.c @@ -204,7 +204,7 @@ void sub_8094B6C(u8 a, u8 b, u8 c) if (IsLinkDoubleBattle()) { - u8 *arr = ewram + 0x1606C + a * 3; + u8 *arr = &ewram1606Carr(0, a); for (i = 0, j = 0; i < 3; i++) { |