Remove all code from main.asm (some labeled INCBINs, like out-of-context graphics, are still present)

engine/routines/ stores isolated out-of-context routines as individual files. It might be preferable later to append them to their related engine/ files in unique little SECTIONs, relying on the linkerscript to place them appropriately; or some other organization method. In the meantime, they're now easily findable apart from main.asm's other content.
This commit is contained in:
Remy Oukaour
2017-12-24 19:35:35 -05:00
parent 15f1fc7c6c
commit 7d4486e6a3
47 changed files with 513 additions and 517 deletions

View File

@@ -2573,11 +2573,11 @@ WinTrainerBattle: ; 3cfa4
.CheckMaxedOutMomMoney: ; 3d0b1
ld hl, wMomsMoney + 2
ld a, [hld]
cp 999999 % $100
cp MAX_MONEY % $100
ld a, [hld]
sbc 999999 / $100 % $100
sbc MAX_MONEY / $100 % $100
ld a, [hl]
sbc 999999 / $10000 % $100
sbc MAX_MONEY / $10000 % $100
ret
; 3d0be
@@ -2602,17 +2602,17 @@ AddBattleMoneyToAccount: ; 3d0be
jr nz, .loop
pop hl
ld a, [hld]
cp 999999 % $100
cp MAX_MONEY % $100
ld a, [hld]
sbc 999999 / $100 % $100
sbc MAX_MONEY / $100 % $100
ld a, [hl]
sbc 999999 / $10000 % $100
sbc MAX_MONEY / $10000 % $100
ret c
ld [hl], 999999 / $10000 % $100
ld [hl], MAX_MONEY / $10000 % $100
inc hl
ld [hl], 999999 / $100 % $100
ld [hl], MAX_MONEY / $100 % $100
inc hl
ld [hl], 999999 % $100
ld [hl], MAX_MONEY % $100
ret
; 3d0ea