Prev: 26923 Up: Map Next: 27026
26924: Routine at 692C
Used by the routines at 27437 and 30423.
26924 LD B,A B=A.
26925 LD A,C A=C.
26926 EXX Switch to the shadow registers.
26927 LD HL,(30748) HL'=*30748.
26930 LD C,A C'=A.
26931 LD A,(30747) A=*30747.
26934 LD B,A B'=A.
26935 EXX Switch back to the normal registers.
26936 LD A,B A=B.
26937 ADD A,A A+=A.
26938 LD L,A L=A.
26939 ADC A,190 A+=190 (including carry).
26941 SUB L A-=L.
26942 LD H,A H=A.
26943 LD A,B A=B.
26944 LD C,(HL) C=*HL.
26945 INC L Increment L by one.
26946 LD B,(HL) B=*HL.
26947 BIT 5,A Test bit 5 of A.
26949 JP NZ,28072 Jump to 28072 if {} is not zero.
26952 LD A,(BC) A=*BC.
26953 INC BC Increment BC by one.
26954 ADD A,E A+=E.
26955 LD E,A E=A.
26956 LD A,(BC) A=*BC.
26957 INC BC Increment BC by one.
26958 ADD A,D A+=D.
26959 LD D,A D=A.
26960 CP 16 Jump to 26969 if A is higher than 16.
26962 JR NC,26969
26964 LD A,E Jump to 26990 if E is lower than 32.
26965 CP 32
26967 JR C,26990
26969 LD HL,8 BC+=0008.
26972 ADD HL,BC
26973 LD B,H
26974 LD C,L
26975 LD A,(BC) A=*BC.
Check for the terminator (255+1 will set the Z flag).
26976 INC A Increment A by one.
26977 LD A,1 A=1.
26979 JR NZ,26958 Jump to 26958 if A was not zero (on line 26976).
We reached the terminator.
26981 INC BC Increment BC by one.
26982 LD A,(BC) Jump to 26953 if *BC is not equal to 128.
26983 CP 128
26985 JR NZ,26953
26987 JP 26860 Jump to 26860.
26990 LD A,D A=D.
26991 ADD A,64 A+=64.
26993 AND %01001000 Keep only bits 3 and 6.
26995 LD H,A H=A.
26996 LD A,D A=D.
26997 RRCA Rotate A right three positions (bits 0 to 2 are now in positions 5 to 7).
26998 RRCA
26999 RRCA
27000 AND %11100000 Keep only bits 5-7.
27002 ADD A,E A+=E.
27003 LD L,A L=A.
27004 CALL DrawSprite Call DrawSprite.
27007 INC H Increment H by one.
27008 CALL DrawSprite Call DrawSprite.
27011 CALL ScreenBufferToAttributeBuffer Call ScreenBufferToAttributeBuffer.
27014 JR 26975 Jump to 26975.
27016 LD (30757),A Write A to *30757.
27019 EXX Switch to the shadow registers.
27020 LD (HL),A Write A to *HL.
27021 LD H,B H=B.
27022 LD L,C L=C.
27023 JP ColouriseSprite Jump to ColouriseSprite.
Prev: 26923 Up: Map Next: 27026