Prev: A8D4 Up: Map Next: A97A
A944: Initialise Street
Used by the routine at GameEntryPoint.
InitialiseStreet A944 LD HL,($AB7E) HL=*ActivePlayer.
A947 INC HL Increment HL by one.
Fetch the active players level.
A948 LD A,(HL) A=*HL.
Point to the active players score.
A949 INC HL Increment HL by one.
Copy the players score to the active players score memory location.
A94A LD DE,$CB96 DE=ActivePlayer_Score.
A94D LD BC,$0003 BC=0003.
A950 LDIR Copy HL to DE 0003 times.
A952 LD E,A E=current level.
A953 LD HL,$BA6A HL=BA6A.
A956 LD (HL),$00 Write 00 to *HL.
A958 CP $0A Jump to InitialiseStreet_Max if A is lower than 0A.
A95A JR C,InitialiseStreet_Max
A95C LD (HL),$08 Write 08 to *HL.
Create an offset in DE for the current level.
InitialiseStreet_Max A95E LD D,$00 D=00.
A960 LD IX,$B073 IX=Table_Levels.
A964 ADD IX,DE IX+=DE.
Fetch the pointer to the level data.
A966 LD L,(IX+$00) L=*IX+00.
A969 LD H,(IX+$01) H=*IX+01.
A96C LD DE,$C270 DE=String_NumberOfBins.
A96F LD BC,$0217 BC=0217.
A972 LDIR Copy all the level data to the active game, starting from String_NumberOfBins.
A974 LD A,$00 Write 00 to B008.
A976 LD ($B008),A
A979 RET Return.
Prev: A8D4 Up: Map Next: A97A