From 40c17c906b2b3f65b3b04b1933b90238a7ac5566 Mon Sep 17 00:00:00 2001 From: yenatch Date: Mon, 26 May 2014 14:04:56 -0700 Subject: Remove most static wram addresses. Use labels instead. For unknown addresses, use "w
". Label overleads are still an issue. --- engine/battle/1a.asm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engine/battle/1a.asm') diff --git a/engine/battle/1a.asm b/engine/battle/1a.asm index 2770a459..2578621c 100755 --- a/engine/battle/1a.asm +++ b/engine/battle/1a.asm @@ -11,10 +11,10 @@ DecrementPP: ; 68000 (1a:4000) ret nz ; if any of these statuses are true, don't decrement PP bit 6, [hl] ; check 6th bit status flag on W_PLAYERBATTSTATUS2 ret nz ; and return if it is set - ld hl, $D02D ; PP of first move (in battle) + ld hl, W_PLAYERMONPP ; PP of first move (in battle) call .DecrementPP - ld a, [$D064] ; load pokemon status bits? + ld a, [W_PLAYERBATTSTATUS3] ; load pokemon status bits? bit 3, a ; XXX transform status? ret nz ; If it is, return. Pokemon Red stores the "current pokemon's" PP ; separately from the "Pokemon in your party's" PP. This is @@ -26,12 +26,12 @@ DecrementPP: ; 68000 (1a:4000) ; its opponent, which is *not* the same as its real PP as part of your ; party. So we return, and don't do that part. - ld hl, $D188 ; PP of first move (in party) - ld a, [$CC2F] ; which mon in party is active + ld hl, W_PARTYMON1_MOVE1PP ; PP of first move (in party) + ld a, [wPlayerMonNumber] ; which mon in party is active ld bc, $2C ; XXX probably size of party pokemon's data structure call AddNTimes ; calculate address of the mon to modify .DecrementPP - ld a, [$CC2E] ; which move (0, 1, 2, 3) did we use? + ld a, [wPlayerMoveListIndex] ; which move (0, 1, 2, 3) did we use? ld c, a ld b, 0 add hl ,bc ; calculate the address in memory of the PP we need to decrement -- cgit v1.2.3 From 53ae0e93fad9f4c3eaef92f102b1eeb531e59d68 Mon Sep 17 00:00:00 2001 From: yenatch Date: Sat, 14 Jun 2014 04:12:40 -0700 Subject: Use monster struct macros in wram. Rename related labels for consistency. --- engine/battle/1a.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engine/battle/1a.asm') diff --git a/engine/battle/1a.asm b/engine/battle/1a.asm index 2578621c..6b502a31 100755 --- a/engine/battle/1a.asm +++ b/engine/battle/1a.asm @@ -11,7 +11,7 @@ DecrementPP: ; 68000 (1a:4000) ret nz ; if any of these statuses are true, don't decrement PP bit 6, [hl] ; check 6th bit status flag on W_PLAYERBATTSTATUS2 ret nz ; and return if it is set - ld hl, W_PLAYERMONPP ; PP of first move (in battle) + ld hl, wBattleMonPP ; PP of first move (in battle) call .DecrementPP ld a, [W_PLAYERBATTSTATUS3] ; load pokemon status bits? @@ -26,7 +26,7 @@ DecrementPP: ; 68000 (1a:4000) ; its opponent, which is *not* the same as its real PP as part of your ; party. So we return, and don't do that part. - ld hl, W_PARTYMON1_MOVE1PP ; PP of first move (in party) + ld hl, wPartyMon1PP ; PP of first move (in party) ld a, [wPlayerMonNumber] ; which mon in party is active ld bc, $2C ; XXX probably size of party pokemon's data structure call AddNTimes ; calculate address of the mon to modify -- cgit v1.2.3