diff --git a/Makefile b/Makefile index 095b6b6ac8..f2128cc25d 100644 --- a/Makefile +++ b/Makefile @@ -162,8 +162,16 @@ MAPJSON := $(TOOLS_DIR)/mapjson/mapjson$(EXE) JSONPROC := $(TOOLS_DIR)/jsonproc/jsonproc$(EXE) TRAINERPROC := $(TOOLS_DIR)/trainerproc/trainerproc$(EXE) PATCHELF := $(TOOLS_DIR)/patchelf/patchelf$(EXE) -ROMTEST ?= $(shell { command -v mgba-rom-test || command -v $(TOOLS_DIR)/mgba/mgba-rom-test$(EXE); } 2>/dev/null) -ROMTESTHYDRA := $(TOOLS_DIR)/mgba-rom-test-hydra/mgba-rom-test-hydra$(EXE) +ifeq ($(shell uname),Darwin) + ROMTEST ?= $(shell command -v mgba-rom-test-mac 2>/dev/null || echo $(TOOLS_DIR)/mgba/mgba-rom-test-mac) + ROMTESTHYDRA := $(shell command -v mgba-rom-test-hydra 2>/dev/null || echo $(TOOLS_DIR)/mgba-rom-test-hydra/mgba-rom-test-hydra) +else ifeq ($(shell uname),Linux) + ROMTEST ?= $(shell command -v mgba-rom-test 2>/dev/null || echo $(TOOLS_DIR)/mgba/mgba-rom-test) + ROMTESTHYDRA := $(shell command -v mgba-rom-test-hydra 2>/dev/null || echo $(TOOLS_DIR)/mgba-rom-test-hydra/mgba-rom-test-hydra) +else + ROMTEST ?= $(TOOLS_DIR)/mgba/mgba-rom-test$(EXE) + ROMTESTHYDRA := $(TOOLS_DIR)/mgba-rom-test-hydra/mgba-rom-test-hydra$(EXE) +endif PERL := perl SHA1 := $(shell { command -v sha1sum || command -v shasum; } 2>/dev/null) -c diff --git a/data/battle_scripts_1.s b/data/battle_scripts_1.s index 93873871f9..8ae63d6164 100644 --- a/data/battle_scripts_1.s +++ b/data/battle_scripts_1.s @@ -2222,13 +2222,13 @@ BattleScript_AttackAccUpDoMoveAnim:: attackanimation waitanimation setbyte sSTAT_ANIM_PLAYED, FALSE - playstatchangeanimation BS_ATTACKER, BIT_SPATK | BIT_SPDEF, 0 + playstatchangeanimation BS_ATTACKER, BIT_ATK | BIT_ACC, 0 setstatchanger STAT_ATK, 1, FALSE - statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AttackAccUpTrySpDef - jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_AttackAccUpTrySpDef + statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AttackAccUpTryAcc + jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_AttackAccUpTryAcc printfromtable gStatUpStringIds waitmessage B_WAIT_TIME_LONG -BattleScript_AttackAccUpTrySpDef:: +BattleScript_AttackAccUpTryAcc:: setstatchanger STAT_ACC, 1, FALSE statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_CHANGE_ALLOW_PTR, BattleScript_AttackAccUpEnd jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_AttackAccUpEnd @@ -4731,7 +4731,7 @@ BattleScript_MoveEffectStockpileWoreOff:: return BattleScript_StockpileStatChangeDown: - statbuffchange MOVE_EFFECT_AFFECTS_USER, BattleScript_StockpileStatChangeDown_Ret + statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN, BattleScript_StockpileStatChangeDown_Ret setgraphicalstatchangevalues playanimation BS_ATTACKER, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1 printfromtable gStatDownStringIds diff --git a/docs/install/mac/MAC_OS.md b/docs/install/mac/MAC_OS.md index 8ffa4df089..7491427cb6 100644 --- a/docs/install/mac/MAC_OS.md +++ b/docs/install/mac/MAC_OS.md @@ -10,6 +10,18 @@ - If devkitARM is **not installed**, then go to [Installing devkitARM (macOS)](#installing-devkitarm-macos). - Otherwise, **open the Terminal** and go to [Choosing where to store pokeemerald-expansion (macOS)](#choosing-where-to-store-pokeemerald-expansion-macos) +3. **Optional: To run tests**, if the homebrew environment is not installed, install the package manager using [this reference](https://brew.sh). Open your terminal and run the following commands: + + ```bash + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + brew install coreutils + ``` + +4. **Optional: To run tests via Rosetta** + - You probably don't want to do this as it's much slower. Most users can use native tools, but some may have other reasons to use this setup such as working with Intel-only custom tooling. + - You will need an Intel-compatible homebrew installation. Understanding how to get one can be found [here](https://github.com/Homebrew/brew/issues/9173#issuecomment-729206868). + - Install `coreutils` like in step 3, but using your Intel-compatible installation of homebrew. + ### Installing libpng (macOS)
Note for advanced users... diff --git a/tools/mgba/README.md b/tools/mgba/README.md index 617e6e058f..246d681d05 100644 --- a/tools/mgba/README.md +++ b/tools/mgba/README.md @@ -5,3 +5,4 @@ The source code for these specific builds is available from: - Windows: - Linux: + - Mac: diff --git a/tools/mgba/mgba-rom-test-mac b/tools/mgba/mgba-rom-test-mac new file mode 100755 index 0000000000..43c8976c09 Binary files /dev/null and b/tools/mgba/mgba-rom-test-mac differ