AD88: Update the onscreen inventory.
Pockets_UpdateInv |
AD88 |
LD HL,$0000 |
|
AD8B |
LD (Obj_SelectedDescrStr),HL |
|
AD8E |
LD A,$01 |
|
AD90 |
CALL $1601 |
|
AD93 |
LD C,$01 |
|
AD95 |
LD HL,Hero_Pocket1 |
|
AD98 |
LD E,L |
|
AD99 |
LD D,H |
|
AD9A |
LD B,$04 |
Pockets_UpdateInv_0 |
AD9C |
LD A,(DE) |
|
AD9D |
AND A |
|
AD9E |
JR Z,Pockets_UpdateInv_1 |
|
ADA0 |
LD (HL),A |
|
ADA1 |
INC HL |
|
ADA2 |
INC C |
Pockets_UpdateInv_1 |
ADA3 |
INC DE |
|
ADA4 |
DJNZ Pockets_UpdateInv_0 |
|
ADA6 |
LD A,$05 |
|
ADA8 |
SUB C |
|
ADA9 |
JR Z,Pockets_UpdateInv_3 |
|
ADAB |
LD B,A |
Pockets_UpdateInv_2 |
ADAC |
LD (HL),$00 |
|
ADAE |
INC HL |
|
ADAF |
DJNZ Pockets_UpdateInv_2 |
Pockets_UpdateInv_3 |
ADB1 |
LD A,(HL) |
|
ADB2 |
CP C |
|
ADB3 |
JR C,Pockets_UpdateInv_4 |
|
ADB5 |
LD (HL),$01 |
Pockets_UpdateInv_4 |
ADB7 |
LD HL,$5A41 |
|
ADBA |
LD A,$04 |
Pockets_UpdateInv_5 |
ADBC |
LD (HL),$64 |
|
ADBE |
LD E,L |
|
ADBF |
LD D,H |
|
ADC0 |
INC DE |
|
ADC1 |
LD BC,$0009 |
|
ADC4 |
LDIR |
|
ADC6 |
LD BC,$0017 |
|
ADC9 |
ADD HL,BC |
|
ADCA |
DEC A |
|
ADCB |
JR NZ,Pockets_UpdateInv_5 |
|
ADCD |
CALL Print_StringOnStack |
|
ADD0 |
DEFM $10,$00,$11,$04,$13,$01,$5E |
|
ADD7 |
LD DE,(Hero_Pocket4) |
|
ADDB |
LD E,$07 |
|
ADDD |
LD IX,$BD3A |
Pockets_UpdateInv_6 |
ADE1 |
INC IX |
|
ADE3 |
LD A,E |
|
ADE4 |
CP $0B |
|
ADE6 |
JP NC,Pockets_UpdateInv_9 |
|
ADE9 |
LD A,(IX+$00) |
|
ADEC |
AND A |
|
ADED |
JP Z,Pockets_UpdateInv_9 |
|
ADF0 |
PUSH DE |
|
ADF1 |
CALL ObjStr_FindByIndex |
|
ADF4 |
POP DE |
|
ADF5 |
INC E |
|
ADF6 |
LD A,$16 |
|
ADF8 |
RST $10 |
|
ADF9 |
LD A,E |
|
ADFA |
RST $10 |
|
ADFB |
LD A,$01 |
|
ADFD |
RST $10 |
|
ADFE |
DEC D |
|
ADFF |
JR NZ,Pockets_UpdateInv_7 |
|
AE01 |
LD A,$2A |
|
AE03 |
CALL Print_Character |
|
AE06 |
JR Pockets_UpdateInv_8 |
Pockets_UpdateInv_7 |
AE08 |
LD A,$20 |
|
AE0A |
CALL Print_Character |
Pockets_UpdateInv_8 |
AE0D |
CALL Print_TermString |
|
AE10 |
CP $2B |
|
AE12 |
JR NZ,Pockets_UpdateInv_6 |
|
AE14 |
LD A,D |
|
AE15 |
AND A |
|
AE16 |
JR NZ,Pockets_UpdateInv_6 |
|
AE18 |
LD (Obj_SelectedDescrStr),HL |
|
AE1B |
JR Pockets_UpdateInv_6 |
Pockets_UpdateInv_9 |
AE1D |
LD HL,(Obj_SelectedDescrStr) |
|
AE20 |
LD A,L |
|
AE21 |
OR H |
|
AE22 |
JP NZ,Print_AdditionalText |
|
AE25 |
RET |