Merge branch '_RHH/master' into _RHH/upcoming

This commit is contained in:
Eduardo Quezada 2024-02-05 17:52:34 -03:00
commit f89efad082
20 changed files with 158 additions and 60 deletions

View file

@ -23,9 +23,10 @@ body:
label: Version
description: What version of pokeemerald-expansion are you using as a base?
options:
- 1.7.2 (Latest release)
- 1.7.3 (Latest release)
- master (default when pulling, unreleased bugfixes)
- upcoming (Edge)
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.2

View file

@ -23,9 +23,10 @@ body:
label: Version
description: What version of pokeemerald-expansion are you using as a base?
options:
- 1.7.2 (Latest release)
- 1.7.3 (Latest release)
- master (default when pulling, unreleased bugfixes)
- upcoming (Edge)
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.2

View file

@ -17,6 +17,7 @@ jobs:
GAME_LANGUAGE: ENGLISH
MODERN: 0
COMPARE: 0
UNUSED_ERROR: 1
steps:
- name: Checkout
uses: actions/checkout@v2

View file

@ -1,9 +1,10 @@
# Pokeemerald-Expansion Changelogs
## [Version 1.7.2](docs/changelogs/1.7.2.md) - Bugfix Release
## Version 1.7.x
### [Version 1.7.3](docs/changelogs/1.7.3.md) - Bugfix Release
### [Version 1.7.2](docs/changelogs/1.7.2.md) - Bugfix Release
### [Version 1.7.1](docs/changelogs/1.7.1.md) - Bugfix Release
### [Version 1.7.0](docs/changelogs/1.7.0.md) - Feature Release
## [Version 1.7.1](docs/changelogs/1.7.1.md) - Bugfix Release
## [Version 1.7.0](docs/changelogs/1.7.0.md) - Feature Release
## [Version 1.6.2](docs/changelogs/1.6.2.md) - Bugfix Release
## Version 1.6.x
### [Version 1.6.2](docs/changelogs/1.6.2.md) - Bugfix Release

View file

@ -36,13 +36,14 @@ else
EXE :=
endif
TITLE := POKEMON EMER
GAME_CODE := BPEE
MAKER_CODE := 01
REVISION := 0
MODERN ?= 1
TEST ?= 0
ANALYZE ?= 0
TITLE := POKEMON EMER
GAME_CODE := BPEE
MAKER_CODE := 01
REVISION := 0
MODERN ?= 1
TEST ?= 0
ANALYZE ?= 0
UNUSED_ERROR ?= 0
ifeq (agbcc,$(MAKECMDGOALS))
MODERN := 0
@ -127,6 +128,12 @@ override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi
ifeq ($(ANALYZE),1)
override CFLAGS += -fanalyzer
endif
# Only throw an error for unused elements if its RH-Hideout's repo
ifeq ($(UNUSED_ERROR),0)
ifneq ($(GITHUB_REPOSITORY_OWNER),rh-hideout)
override CFLAGS += -Wno-error=unused-variable -Wno-error=unused-const-variable -Wno-error=unused-parameter -Wno-error=unused-function -Wno-error=unused-but-set-parameter -Wno-error=unused-but-set-variable -Wno-error=unused-value -Wno-error=unused-local-typedefs
endif
endif
ROM := $(MODERN_ROM_NAME)
OBJ_DIR := $(MODERN_OBJ_DIR_NAME)
LIBPATH := -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libgcc.a))" -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libnosys.a))" -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libc.a))"

View file

@ -7,7 +7,7 @@ pokeemerald-expansion is a decomp hack base project based off pret's [pokeemeral
If you use pokeemerald-expansion in your hack, please add RHH (Rom Hacking Hideout) to your credits list. Optionally, you can list the version used, so it can help players know what features to expect.
You can phrase it as the following:
```
Based off RHH's pokeemerald-expansion v1.7.2 https://github.com/rh-hideout/pokeemerald-expansion/
Based off RHH's pokeemerald-expansion v1.7.3 https://github.com/rh-hideout/pokeemerald-expansion/
```
## What features are included?
@ -167,7 +167,7 @@ With this, you'll get the latest version of pokeemerald-expansion, plus a couple
## **How do I update my version of pokeemerald-expansion?**
- If you haven't set up a remote, run the command `git remote add RHH https://github.com/rh-hideout/pokeemerald-expansion`.
- Once you have your remote set up, run the command `git pull RHH expansion/1.7.2`.
- Once you have your remote set up, run the command `git pull RHH expansion/1.7.3`.
### Please consider crediting the entire [list of contributors](https://github.com/rh-hideout/pokeemerald-expansion/wiki/Credits) in your project, as they have all worked hard to develop this project :)

View file

@ -9278,13 +9278,12 @@ Boomburst_Doubles:
goto Boomburst_Last
Move_FAIRY_LOCK::
loadspritegfx ANIM_TAG_CHAIN_LINK @Chain Colour
loadspritegfx ANIM_TAG_FAIRY_LOCK_CHAINS @AnimTask is missing for Fairy Lock Chain
loadspritegfx ANIM_TAG_FAIRY_LOCK_CHAINS
setalpha 8, 8
monbg ANIM_ATK_PARTNER
createvisualtask AnimTask_BlendBattleAnimPal, 0xa, F_PAL_BG, 0x1, 0x0, 0x8, 0x6B1F
waitforvisualfinish
loopsewithpan SE_M_SCRATCH, SOUND_PAN_TARGET, 0x6, 0x4
loopsewithpan SE_M_SCRATCH, SOUND_PAN_TARGET, 0x6, 0x9
createvisualtask AnimTask_VoltTackleBolt, 0x5, 0x7
createvisualtask AnimTask_VoltTackleBolt, 0x5, 0x33
createvisualtask AnimTask_VoltTackleBolt, 0x5, 0x2

View file

@ -4070,26 +4070,7 @@ BattleScript_EffectDestinyBond::
goto BattleScript_MoveEnd
BattleScript_EffectEerieSpell::
attackcanceler
attackstring
ppreduce
accuracycheck BattleScript_ButItFailed, ACC_CURR_MOVE
attackstring
ppreduce
critcalc
damagecalc
adjustdamage
attackanimation
waitanimation
effectivenesssound
hitanimation BS_TARGET
waitstate
healthbarupdate BS_TARGET
datahpupdate BS_TARGET
critmessage
waitmessage B_WAIT_TIME_LONG
resultmessage
waitmessage B_WAIT_TIME_LONG
call BattleScript_EffectHit_Ret
tryfaintmon BS_TARGET
eeriespellppreduce BattleScript_MoveEnd
printstring STRINGID_PKMNREDUCEDPP

77
docs/changelogs/1.7.3.md Normal file
View file

@ -0,0 +1,77 @@
# Version 1.7.3
```md
## How to update
- If you haven't set up a remote, run the command `git remote add RHH https://github.com/rh-hideout/pokeemerald-expansion`.
- Once you have your remote set up, run the command `git pull RHH expansion/1.7.3`.
```
## 🌋 *IMPORTANT CHANGES* 🌋
* Unused warnings are no longer treated as errrors by default by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4092
* [Critical fix] Backported gHeap alignment fix from upstream pret by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4089
* Fixes issue that causes graphics to bug when leaving Littleroot for Birch's cutscene.
## 🧬 General 🧬
* Fixed HGSS Dex's dark mode search palette by @ravepossum in https://github.com/rh-hideout/pokeemerald-expansion/pull/4095
## 🐉 Pokémon 🐉
### Changed
* Condensed Oinkologne teachable learnsets (they previously had different tables despite having the same learnsets) by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4026
* Removed illegal teachable learnset moves that didn't match Gen 7 or 9 by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4039 and https://github.com/rh-hideout/pokeemerald-expansion/pull/4042
### Fixed
* Fixed incorrect family toggle preproc blocks by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4024
* Cosplay and Cap Pikachu animations were still being included even if disabled.
* Fixed compile errors when:
* Feebas' family was disabled but not Castform.
* Chatot was disabled but not Spiritomb.
* Virizion was disabled but not Tornadus or Thundurus.
* Zekrom was disabled but not Landorus.
* Kyurem was disabled but not Keldeo or Meloetta.
* Wishiwashi was disabled but not Rockruff.
* Fixed compile error when disabling Gen 4 cross-evolutions while having Kingdra enabled by @Skyeward and @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4044 and https://github.com/rh-hideout/pokeemerald-expansion/pull/4046
## ⚔️ Battle General ⚔️ ##
### Fixed
* Fixed Steven double battle palette error by @johannakullmann in https://github.com/rh-hideout/pokeemerald-expansion/pull/4078
## 🤹 Moves 🤹
### Changed
* Renamed `EFFECT_STEEL_BEAM` to `EFFECT_MAX_HP_50_RECOIL` by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4043
### Fixed
* Fixed Pursuit's effect not working by @ZnogyroP @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4086
## 🎭 Abilities 🎭
### Fixed
* Fixed Emergency Exit issues:
* Fixed rounding error that caused it to not switch out when odd-numbered HP was off by 1 by @SBird1337 in https://github.com/rh-hideout/pokeemerald-expansion/pull/4040
* Eg: going from 101 Max HP to 50 HP would've *not* cause it to switch out.
* Fixes Emergency Exit switching out even if the Pokémon was healed above the threshold before it would've triggered by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4041
* Eg: going from 100 Max HP to 45 HP and eating a Sitrus Berry back to 55 HP would've cause it to switch out.
* Cleanup by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4100
* Fixed Corrosion only working for status moves by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4037
* Fixed Magic Guard not preventing Mind Blown recoil damage by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4043
## 🧶 Items 🧶
### Fixed
* Fixed oversight causing chosen fossil to be lost if bag is full by @fakuzatsu in https://github.com/rh-hideout/pokeemerald-expansion/pull/3978
* Fixed other Key Item script oversights by @Bassoonian in https://github.com/rh-hideout/pokeemerald-expansion/pull/4066
* Fixed Life Orb causing damage on switch-in from Eject Pack and Red Card by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4038
* Fixed Glimmering Charm sprite by @SonikkuA-DatH and @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4047
## 🤖 Battle AI 🤖
### Fixed
* Fixed AI trying to switch into the same mon twice in the same turn by @DizzyEggg in https://github.com/rh-hideout/pokeemerald-expansion/pull/4098
## 🧪 Test Runner 🧪
### Added
* Corrosion tests by @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4037
* Pursuit/Tangling Hair interaction by @ZnogyroP @AlexOn1ine in https://github.com/rh-hideout/pokeemerald-expansion/pull/4086
### Changed
* Passing `KNOWN_FAILING` tests are now listed separately from `PASSED` tests by @AsparagusEduardo in https://github.com/rh-hideout/pokeemerald-expansion/pull/4063
## New Contributors
* @Skyeward made their first contribution in https://github.com/rh-hideout/pokeemerald-expansion/pull/4044
**Full Changelog**: https://github.com/rh-hideout/pokeemerald-expansion/compare/expansion/1.7.2...expansion/1.7.3
<!--Last PR: 4098-->

View file

@ -3,7 +3,7 @@
```md
## How to update
- If you haven't set up a remote, run the command `git remote add RHH https://github.com/rh-hideout/pokeemerald-expansion`.
- Once you have your remote set up, run the command `git pull RHH expansion/1.7.2`.
- Once you have your remote set up, run the command `git pull RHH expansion/1.Y.Z`.
```
## 🌋 *IMPORTANT CHANGES* 🌋
@ -88,6 +88,6 @@
## New Contributors
* Tony
**Full Changelog**: https://github.com/rh-hideout/pokeemerald-expansion/compare/expansion/1.7.1...expansion/1.7.2
**Full Changelog**: https://github.com/rh-hideout/pokeemerald-expansion/compare/expansion/1.Y.Z...expansion/1.Y.Z
<!--Last PR: 3697-->
<!--Last PR: ____-->

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -417,6 +417,7 @@ extern const struct OamData gOamData_AffineDouble_ObjNormal_64x64;
extern const struct OamData gOamData_AffineDouble_ObjBlend_64x64;
extern const struct OamData gOamData_AffineDouble_ObjBlend_64x32;
extern const struct OamData gOamData_AffineDouble_ObjNormal_8x16;
extern const struct OamData gOamData_AffineDouble_ObjNormal_64x32;
extern const struct OamData gOamData_AffineOff_ObjBlend_16x16;
extern const struct OamData gOamData_AffineDouble_ObjBlend_16x16;
extern const struct OamData gOamData_AffineNormal_ObjNormal_8x8;

View file

@ -3,7 +3,7 @@
#define EXPANSION_VERSION_MAJOR 1
#define EXPANSION_VERSION_MINOR 7
#define EXPANSION_VERSION_PATCH 2
#define EXPANSION_VERSION_PATCH 3
// FALSE if this this version of Expansion is not a tagged commit, i.e.
// it contains unreleased changes.

View file

@ -66,7 +66,7 @@
// Used in cases where division by 0 can occur in the retail version.
// Avoids invalid opcodes on some emulators, and the otherwise UB.
#ifdef UBFIX
#define SAFE_DIV(a, b) ((b) ? (a) / (b) : 0)
#define SAFE_DIV(a, b) (((b) != 0) ? (a) / (b) : 0)
#else
#define SAFE_DIV(a, b) ((a) / (b))
#endif

View file

@ -479,6 +479,17 @@ const struct SpriteTemplate gVoltTackleBoltSpriteTemplate =
.callback = AnimVoltTackleBolt,
};
const struct SpriteTemplate gFairyLockChainsSpriteTemplate =
{
.tileTag = ANIM_TAG_FAIRY_LOCK_CHAINS,
.paletteTag = ANIM_TAG_FAIRY_LOCK_CHAINS,
.oam = &gOamData_AffineOff_ObjNormal_64x32,
.anims = gDummySpriteAnimTable,
.images = NULL,
.affineAnims = gDummySpriteAffineAnimTable,
.callback = AnimVoltTackleBolt,
};
const struct SpriteTemplate gGrowingShockWaveOrbSpriteTemplate =
{
.tileTag = ANIM_TAG_CIRCLE_OF_LIGHT,
@ -1190,11 +1201,20 @@ void AnimTask_VoltTackleBolt(u8 taskId)
static bool8 CreateVoltTackleBolt(struct Task *task, u8 taskId)
{
u8 spriteId = CreateSprite(&gVoltTackleBoltSpriteTemplate, task->data[3], task->data[5], 35);
u32 spriteId;
bool32 isFairyLock = (gAnimMoveIndex == MOVE_FAIRY_LOCK);
if (isFairyLock)
spriteId = CreateSprite(&gFairyLockChainsSpriteTemplate, task->data[3], task->data[5] + 10, 35);
else
spriteId = CreateSprite(&gVoltTackleBoltSpriteTemplate, task->data[3], task->data[5], 35);
if (spriteId != MAX_SPRITES)
{
gSprites[spriteId].data[6] = taskId;
gSprites[spriteId].data[7] = 7;
gSprites[spriteId].data[1] = isFairyLock ? 25 : 12; // How long the chains / bolts stay on screen.
gSprites[spriteId].data[2] = isFairyLock; // Whether to destroy the Oam Matrix.
task->data[7]++;
}
@ -1220,10 +1240,11 @@ static bool8 CreateVoltTackleBolt(struct Task *task, u8 taskId)
static void AnimVoltTackleBolt(struct Sprite *sprite)
{
if (++sprite->data[0] > 12)
if (++sprite->data[0] > sprite->data[1])
{
gTasks[sprite->data[6]].data[sprite->data[7]]--;
FreeOamMatrix(sprite->oam.matrixNum);
if (!sprite->data[2])
FreeOamMatrix(sprite->oam.matrixNum);
DestroySprite(sprite);
}
}

View file

@ -474,8 +474,8 @@ void AnimShadowBall(struct Sprite *sprite)
sprite->data[3] = gBattleAnimArgs[2];
sprite->data[4] = sprite->x << 4;
sprite->data[5] = sprite->y << 4;
sprite->data[6] = ((oldPosX - sprite->x) << 4) / (gBattleAnimArgs[0] << 1);
sprite->data[7] = ((oldPosY - sprite->y) << 4) / (gBattleAnimArgs[0] << 1);
sprite->data[6] = SAFE_DIV(((oldPosX - sprite->x) << 4), (gBattleAnimArgs[0] << 1));
sprite->data[7] = SAFE_DIV(((oldPosY - sprite->y) << 4), (gBattleAnimArgs[0] << 1));
sprite->callback = AnimShadowBall_Step;
}

View file

@ -1025,8 +1025,8 @@ void InitSpriteDataForLinearTranslation(struct Sprite *sprite)
{
s16 x = (sprite->data[2] - sprite->data[1]) << 8;
s16 y = (sprite->data[4] - sprite->data[3]) << 8;
sprite->data[1] = x / sprite->data[0];
sprite->data[2] = y / sprite->data[0];
sprite->data[1] = SAFE_DIV(x, sprite->data[0]);
sprite->data[2] = SAFE_DIV(y, sprite->data[0]);
sprite->data[4] = 0;
sprite->data[3] = 0;
}

View file

@ -3606,6 +3606,10 @@ u8 AtkCanceller_UnableToUseMove(u32 moveType)
gBattleStruct->beatUpSlot = 0;
PREPARE_BYTE_NUMBER_BUFFER(gBattleScripting.multihitString, 1, 0)
}
else
{
gMultiHitCounter = 0;
}
gBattleStruct->atkCancellerTracker++;
break;
case CANCELLER_END:
@ -8022,6 +8026,7 @@ u8 IsMonDisobedient(void)
} while (gBitTable[gCurrMovePos] & calc);
gCalledMove = gBattleMons[gBattlerAttacker].moves[gCurrMovePos];
SetAtkCancellerForCalledMove();
gBattlescriptCurrInstr = BattleScript_IgnoresAndUsesRandomMove;
gBattlerTarget = GetMoveTarget(gCalledMove, NO_TARGET_OVERRIDE);
gHitMarker |= HITMARKER_DISOBEDIENT_MOVE;

View file

@ -107,9 +107,11 @@ static void CreateAreaUnknownSprites(void);
static void Task_HandlePokedexAreaScreenInput(u8);
static void ResetPokedexAreaMapBg(void);
static void DestroyAreaScreenSprites(void);
static void LoadHGSSScreenSelectBarSubmenu(void);
static const u32 sAreaGlow_Pal[] = INCBIN_U32("graphics/pokedex/area_glow.gbapal");
static const u32 sAreaGlow_Gfx[] = INCBIN_U32("graphics/pokedex/area_glow.4bpp.lz");
static const u32 sPokedexPlusHGSS_ScreenSelectBarSubmenu_Tilemap[] = INCBIN_U32("graphics/pokedex/hgss/SelectBar.bin.lz");
static const u16 sSpeciesHiddenFromAreaScreen[] = { SPECIES_WYNAUT };
@ -639,6 +641,9 @@ static void Task_ShowPokedexAreaScreen(u8 taskId)
BeginNormalPaletteFade(PALETTES_ALL & ~(0x14), 0, 16, 0, RGB_BLACK);
break;
case 10:
if (POKEDEX_PLUS_HGSS)
LoadHGSSScreenSelectBarSubmenu();
SetGpuReg(REG_OFFSET_BLDCNT, BLDCNT_TGT1_BG0 | BLDCNT_EFFECT_BLEND | BLDCNT_TGT2_BG0 | BLDCNT_TGT2_ALL);
StartAreaGlow();
ShowBg(2);
@ -806,3 +811,9 @@ static void CreateAreaUnknownSprites(void)
}
}
}
static void LoadHGSSScreenSelectBarSubmenu(void)
{
CopyToBgTilemapBuffer(1, sPokedexPlusHGSS_ScreenSelectBarSubmenu_Tilemap, 0, 0);
CopyBgTilemapBufferToVram(1);
}

View file

@ -531,7 +531,6 @@ static void Task_LoadSizeScreen(u8);
static void Task_HandleSizeScreenInput(u8);
static void Task_SwitchScreensFromSizeScreen(u8);
static void LoadScreenSelectBarMain(u16);
static void LoadScreenSelectBarSubmenu(u16);
static void HighlightScreenSelectBarItem(u8, u16);
static void Task_HandleCaughtMonPageInput(u8);
static void Task_ExitCaughtMonPage(u8);
@ -4032,7 +4031,6 @@ static void Task_LoadAreaScreen(u8 taskId)
}
break;
case 1:
LoadScreenSelectBarSubmenu(0xD);
LoadPokedexBgPalette(sPokedexView->isSearchResults);
SetGpuReg(REG_OFFSET_BG1CNT, BGCNT_PRIORITY(0) | BGCNT_CHARBASE(0) | BGCNT_SCREENBASE(13) | BGCNT_16COLOR | BGCNT_TXT256x256);
gMain.state++;
@ -4087,12 +4085,6 @@ static void LoadScreenSelectBarMain(u16 unused)
CopyBgTilemapBufferToVram(1);
}
static void LoadScreenSelectBarSubmenu(u16 unused)
{
CopyToBgTilemapBuffer(1, sPokedexPlusHGSS_ScreenSelectBarSubmenu_Tilemap, 0, 0);
CopyBgTilemapBufferToVram(1);
}
static void UNUSED HighlightScreenSelectBarItem(u8 selectedScreen, u16 unused)
{
u8 i;