mirror of
https://github.com/pret/pokered.git
synced 2026-04-25 15:57:04 -05:00
Some checks failed
CI / build (push) Has been cancelled
- Use `OBJ_SIZE` and `TILE_SIZE` from hardware.inc. - `SPRITESTATEDATA1_LENGTH`, `NUM_SPRITESTATEDATA_STRUCTS` and `TILE_1BPP_SIZE` are used in some places. - Highlight an oversight in `OakSpeech` where several direct MBC bank switches are requested. - Remove redundant comments in home/overworld.asm. - Add unreferenced `FillBgMap` function to avoid a byte of dead code. - Some constants added in wram.asm. - Correctly separate the commented code in `SaveMainData`.
22 lines
589 B
NASM
22 lines
589 B
NASM
ResetPlayerSpriteData::
|
|
ld hl, wSpriteStateData1
|
|
call ResetPlayerSpriteData_ClearSpriteData
|
|
ld hl, wSpriteStateData2
|
|
call ResetPlayerSpriteData_ClearSpriteData
|
|
ld a, $1
|
|
ld [wSpritePlayerStateData1PictureID], a
|
|
ld [wSpritePlayerStateData2ImageBaseOffset], a
|
|
ld hl, wSpritePlayerStateData1YPixels
|
|
ld [hl], $3c ; set Y screen pos
|
|
inc hl
|
|
inc hl
|
|
ld [hl], $40 ; set X screen pos
|
|
ret
|
|
|
|
; overwrites sprite data with zeroes
|
|
ResetPlayerSpriteData_ClearSpriteData::
|
|
ld bc, SPRITESTATEDATA1_LENGTH
|
|
ASSERT SPRITESTATEDATA2_LENGTH == SPRITESTATEDATA1_LENGTH
|
|
xor a
|
|
jp FillMemory
|