cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

set_prop.s (261B)


      1	.include	"global.s"
      2
      3	.area	_HOME
      4
      5	;; Set properties of sprite number C to D
      6.set_sprite_prop::
      7	LD	HL,#_shadow_OAM+3	; Calculate origin of sprite info
      8
      9	SLA	C		; Multiply C by 4
     10	SLA	C
     11	LD	B,#0x00
     12	ADD	HL,BC
     13
     14	LD	A,D		; Set sprite properties
     15	LD	(HL),A
     16	RET