AC2D: Replaces the background for a moving (onscreen) actor.
Actor_UpdateBg |
AC2D |
LD HL,Actors_background |
|
AC30 |
LD C,$00 |
Actor_UpdateBg_0 |
AC32 |
LD A,(HL) |
|
AC33 |
INC HL |
|
AC34 |
OR (HL) |
|
AC35 |
JR Z,Actor_UpdateBg_2 |
|
AC37 |
PUSH HL |
|
AC38 |
INC HL |
|
AC39 |
LD B,(HL) |
|
AC3A |
INC HL |
|
AC3B |
LD E,(HL) |
|
AC3C |
INC HL |
|
AC3D |
LD D,$00 |
Actor_UpdateBg_1 |
AC3F |
ADD HL,DE |
|
AC40 |
DJNZ Actor_UpdateBg_1 |
|
AC42 |
INC C |
|
AC43 |
JR Actor_UpdateBg_0 |
Actor_UpdateBg_2 |
AC45 |
LD A,C |
Actor_UpdateBg_3 |
AC46 |
AND A |
|
AC47 |
JR Z,Actor_UpdateBg_4 |
|
AC49 |
POP HL |
|
AC4A |
DEC HL |
|
AC4B |
PUSH AF |
|
AC4C |
CALL Background_Blit |
|
AC4F |
POP AF |
|
AC50 |
DEC A |
|
AC51 |
JR Actor_UpdateBg_3 |
Actor_UpdateBg_4 |
AC53 |
LD HL,$0000 |
|
AC56 |
LD (Actors_background),HL |
|
AC59 |
RET |