ref: d922826d6f323931f038628a59f639827eeb03c5
parent: a7154846095479996f387435a2de4317e67cbd8c
author: IIMarckus <mail@iimarck.us>
date: Fri Mar 19 06:43:22 EDT 2010
add AddNTimes function hg-commit-id: 52c0a95534f2
--- a/pokered.asm
+++ b/pokered.asm
@@ -441,8 +441,20 @@
Section "start",HOME[$150]
Start:
-INCBIN "baserom.gbc",$150,$4000 - $150
+INCBIN "baserom.gbc",$150,$3A87 - $150
+AddNTimes: ; 3A87
+; add bc to hl a times
+ and a
+ ret z
+.loop\@
+ add hl,bc
+ dec a
+ jr nz,.loop\@
+ ret
+
+INCBIN "baserom.gbc",$3A8E,$4000 - $3A8E
+
SECTION "bank1",DATA,BANK[$1]
INCBIN "baserom.gbc",$4000,$4000
@@ -1745,7 +1757,7 @@
ld d,[hl]
ld hl,W_ENEMYMON1MOVE3
ld bc,W_ENEMYMON2MOVE3 - W_ENEMYMON1MOVE3
- call $3A87
+ call AddNTimes
ld [hl],d
jr .FinishUp\@
.AddTeamAttack\@