-
Notifications
You must be signed in to change notification settings - Fork 989
Back Sprites 48x48 (Like GEN 2)
mauvesea edited this page Aug 2, 2024
·
3 revisions
...
; de: destination location
LoadMonFrontSprite::
push de
ld hl, wMonHFrontSprite - wMonHeader
call UncompressMonSprite
ld hl, wMonHSpriteDim
ld a, [hli]
+LoadUncompressedBackSprite::
ld c, a
pop de
; fall through
; postprocesses uncompressed sprite chunks to a 2bpp sprite and loads it into video ram
; calculates alignment parameters to place both sprite chunks in the center of the 7*7 tile sprite buffers
; de: destination location
; a,c: sprite dimensions (in tiles of 8x8 each)
LoadUncompressedSpriteData::
...
engine\movie\hall_of_fame.asm:
...
ld de, RedPicBack
ld a, BANK(RedPicBack)
call UncompressSpriteFromDE
- predef ScaleSpriteByTwo
+ ld a, $66
ld de, vBackPic
- call InterlaceMergeSpriteBuffers
+ push de
+ jp LoadUncompressedBackSprite
+ nop
ld c, $1
HoFLoadMonPlayerPicTileIDs
...
...
ld a, BANK(RedPicBack)
ASSERT BANK(RedPicBack) == BANK(OldManPicBack)
call UncompressSpriteFromDE
- predef ScaleSpriteByTwo
+ call LoadBackSpriteUnzoomed
ld hl, wShadowOAM
xor a
ldh [hOAMTile], a ; initial tile number
...
...
ld e, a
dec b
jr nz, .loop
- ld de, vBackPic
- call InterlaceMergeSpriteBuffers
ld a, $a
ld [MBC1SRamEnable], a
xor a
...
...
call ClearScreenArea
ld hl, wMonHBackSprite - wMonHeader
call UncompressMonSprite
- predef ScaleSpriteByTwo
- ld de, vBackPic
- call InterlaceMergeSpriteBuffers ; combine the two buffers to a single 2bpp sprite
+ call LoadBackSpriteUnzoomed
ld hl, vSprites
ld de, vBackPic
ld c, (2*SPRITEBUFFERSIZE)/16 ; count of 16-byte chunks to be copied
...
...
+LoadBackSpriteUnzoomed:
+ ld a, $66
+ ld de, vBackPic
+ push de
+ jp LoadUncompressedBackSprite