diff options
author | Eldred Habert <eldredhabert0@gmail.com> | 2020-05-28 17:29:47 +0200 |
---|---|---|
committer | Eldred Habert <eldredhabert0@gmail.com> | 2020-05-28 17:29:47 +0200 |
commit | df7ad42acbb75eddee66ad2926635f4d586d6b5b (patch) | |
tree | 85aa3fb1f31a3c51eb5a8e1b6137d32bcb516dcd | |
parent | d5b2b437e2be3fd4aab06425bd4b4f1d1516f231 (diff) |
Optimize GetAutomaticBattleWeather slightly by issuing dummy incrementing reads
-rw-r--r-- | Automatic-battle-weather-on-certain-maps.md | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/Automatic-battle-weather-on-certain-maps.md b/Automatic-battle-weather-on-certain-maps.md index 378a3b9..451a0f2 100644 --- a/Automatic-battle-weather-on-certain-maps.md +++ b/Automatic-battle-weather-on-certain-maps.md @@ -110,19 +110,14 @@ Edit [engine/battle/core.asm](../blob/master/engine/battle/core.asm): + and a + ret z ; end + cp b -+ jr nz, .wrong_group -+ ld a, [hli] ; map ++ ld a, [hli] ; map, ignored if taking jump ++ jr nz, .wrong ; the jump after `.wrong` will be taken as well + cp c -+ jr nz, .wrong_map -+ ld a, [hl] ; weather ++.wrong ++ ld a, [hli] ; weather, ignored if taking jump ++ jr nz, .loop + ret + -+.wrong_group: -+ inc hl ; skip map -+.wrong_map -+ inc hl ; skip weather -+ jr .loop -+ +INCLUDE "data/battle/automatic_weather.asm" ``` |