Prev: AC13 Up: Map Next: AC5A
AC2D: Replaces the background for a moving (onscreen) actor.
Used by the routine at DF_UpdateBg.
Input
Output
Actor_UpdateBg AC2D LD HL,Actors_background
AC30 LD C,$00 Counts number of blocks to blit.
Actor_UpdateBg_0 AC32 LD A,(HL) Add address of offscreen, where stored background is blitted.
AC33 INC HL
AC34 OR (HL) If set to zero, end of data.
AC35 JR Z,Actor_UpdateBg_2
AC37 PUSH HL Put start of data on stack.
AC38 INC HL Get width, height.
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 Calculate address of next block of background data.
AC40 DJNZ Actor_UpdateBg_1
AC42 INC C
AC43 JR Actor_UpdateBg_0
Blit eaach block onto DF screen.
Actor_UpdateBg_2 AC45 LD A,C
Actor_UpdateBg_3 AC46 AND A
AC47 JR Z,Actor_UpdateBg_4
AC49 POP HL Get address of next background data.
AC4A DEC HL
AC4B PUSH AF
AC4C CALL Background_Blit Blit.
AC4F POP AF Next.
AC50 DEC A
AC51 JR Actor_UpdateBg_3
Actor_UpdateBg_4 AC53 LD HL,$0000 Clear store data.
AC56 LD (Actors_background),HL
AC59 RET
Prev: AC13 Up: Map Next: AC5A