diff options
| author | dannye <33dannye@gmail.com> | 2020-11-04 00:06:44 -0600 |
|---|---|---|
| committer | dannye <33dannye@gmail.com> | 2020-11-04 00:06:44 -0600 |
| commit | 5647ca687b92954dcf37a6ea6bfbc9a341c32de4 (patch) | |
| tree | dde1937a1bfdb3a835f4155e1c2eb8f1aaf86f63 /home/copy2.asm | |
| parent | Merge pull request #55 from Deokishisu/patch-1 (diff) | |
| download | pokeyellow-5647ca687b92954dcf37a6ea6bfbc9a341c32de4.tar.gz pokeyellow-5647ca687b92954dcf37a6ea6bfbc9a341c32de4.tar.xz pokeyellow-5647ca687b92954dcf37a6ea6bfbc9a341c32de4.zip | |
Sync with pokered
Diffstat (limited to 'home/copy2.asm')
| -rw-r--r-- | home/copy2.asm | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/home/copy2.asm b/home/copy2.asm index c14112bb..bff26570 100644 --- a/home/copy2.asm +++ b/home/copy2.asm @@ -2,7 +2,7 @@ FarCopyDataDouble:: ; Expand bc bytes of 1bpp image data ; from a:de to 2bpp data at hl. ld [wFarCopyDataSavedROMBank], a - ld a, [H_LOADEDROMBANK] + ldh a, [hLoadedROMBank] push af ld a, [wFarCopyDataSavedROMBank] call BankswitchCommon @@ -38,26 +38,26 @@ CopyVideoData:: ; tiles from b:de to hl, 8 tiles at a time. ; This takes c/8 frames. - ld a, [H_AUTOBGTRANSFERENABLED] + ldh a, [hAutoBGTransferEnabled] push af xor a ; disable auto-transfer while copying - ld [H_AUTOBGTRANSFERENABLED], a + ldh [hAutoBGTransferEnabled], a - ld a, [H_LOADEDROMBANK] + ldh a, [hLoadedROMBank] push af ld a, b call BankswitchCommon ld a, e - ld [H_VBCOPYSRC], a + ldh [hVBlankCopySource], a ld a, d - ld [H_VBCOPYSRC + 1], a + ldh [hVBlankCopySource + 1], a ld a, l - ld [H_VBCOPYDEST], a + ldh [hVBlankCopyDest], a ld a, h - ld [H_VBCOPYDEST + 1], a + ldh [hVBlankCopyDest + 1], a .loop ld a, c @@ -65,17 +65,17 @@ CopyVideoData:: jr nc, .keepgoing .done - ld [H_VBCOPYSIZE], a + ldh [hVBlankCopySize], a call DelayFrame pop af call BankswitchCommon pop af - ld [H_AUTOBGTRANSFERENABLED], a + ldh [hAutoBGTransferEnabled], a ret .keepgoing ld a, 8 - ld [H_VBCOPYSIZE], a + ldh [hVBlankCopySize], a call DelayFrame ld a, c sub 8 @@ -86,25 +86,25 @@ CopyVideoDataDouble:: ; Wait for the next VBlank, then copy c 1bpp ; tiles from b:de to hl, 8 tiles at a time. ; This takes c/8 frames. - ld a, [H_AUTOBGTRANSFERENABLED] + ldh a, [hAutoBGTransferEnabled] push af xor a ; disable auto-transfer while copying - ld [H_AUTOBGTRANSFERENABLED], a - ld a, [H_LOADEDROMBANK] + ldh [hAutoBGTransferEnabled], a + ldh a, [hLoadedROMBank] push af ld a, b call BankswitchCommon ld a, e - ld [H_VBCOPYDOUBLESRC], a + ldh [hVBlankCopyDoubleSource], a ld a, d - ld [H_VBCOPYDOUBLESRC + 1], a + ldh [hVBlankCopyDoubleSource + 1], a ld a, l - ld [H_VBCOPYDOUBLEDEST], a + ldh [hVBlankCopyDoubleDest], a ld a, h - ld [H_VBCOPYDOUBLEDEST + 1], a + ldh [hVBlankCopyDoubleDest + 1], a .loop ld a, c @@ -112,17 +112,17 @@ CopyVideoDataDouble:: jr nc, .keepgoing .done - ld [H_VBCOPYDOUBLESIZE], a + ldh [hVBlankCopyDoubleSize], a call DelayFrame pop af call BankswitchCommon pop af - ld [H_AUTOBGTRANSFERENABLED], a + ldh [hAutoBGTransferEnabled], a ret .keepgoing ld a, 8 - ld [H_VBCOPYDOUBLESIZE], a + ldh [hVBlankCopyDoubleSize], a call DelayFrame ld a, c sub 8 @@ -131,10 +131,10 @@ CopyVideoDataDouble:: FillMemory:: push af - ld a,b + ld a, b and a jr z, .eightbitcopyamount - ld a,c + ld a, c and a jr z, .mulitpleof0x100 .eightbitcopyamount @@ -142,7 +142,7 @@ FillMemory:: .mulitpleof0x100 pop af .loop - ld [hli],a + ld [hli], a dec c jr nz, .loop dec b @@ -154,7 +154,7 @@ GetFarByte:: ; and return it in a push bc ld b, a - ld a, [H_LOADEDROMBANK] + ldh a, [hLoadedROMBank] push af ld a, b call BankswitchCommon @@ -190,32 +190,32 @@ CopyScreenTileBufferToVRAM:: ld c, 6 ld hl, $600 * 0 - coord de, 0, 6 * 0 + decoord 0, 6 * 0 call .setup call DelayFrame ld hl, $600 * 1 - coord de, 0, 6 * 1 + decoord 0, 6 * 1 call .setup call DelayFrame ld hl, $600 * 2 - coord de, 0, 6 * 2 + decoord 0, 6 * 2 call .setup jp DelayFrame .setup ld a, d - ld [H_VBCOPYBGSRC+1], a + ldh [hVBlankCopyBGSource+1], a call GetRowColAddressBgMap ld a, l - ld [H_VBCOPYBGDEST], a + ldh [hVBlankCopyBGDest], a ld a, h - ld [H_VBCOPYBGDEST+1], a + ldh [hVBlankCopyBGDest+1], a ld a, c - ld [H_VBCOPYBGNUMROWS], a + ldh [hVBlankCopyBGNumRows], a ld a, e - ld [H_VBCOPYBGSRC], a + ldh [hVBlankCopyBGSource], a ret ClearScreen:: @@ -223,7 +223,7 @@ ClearScreen:: ; for the bg map to update. ld bc, 20 * 18 inc b - coord hl, 0, 0 + hlcoord 0, 0 ld a, " " .loop ld [hli], a |
