AE42: Take an object.
Obj_Take |
AE42 |
XOR A |
|
AE43 |
LD HL,$5E57 |
|
AE46 |
LD BC,$0002 |
|
AE49 |
CPDR |
|
AE4B |
RET Z |
|
AE4C |
CPDR |
|
AE4E |
INC HL |
|
AE4F |
INC HL |
|
AE50 |
LD A,(HL) |
|
AE51 |
LD ($BD1E),A |
|
AE54 |
LD E,A |
|
AE55 |
LD D,$00 |
|
AE57 |
INC HL |
|
AE58 |
LD C,(HL) |
|
AE59 |
LD HL,(Handle_Lockers) |
|
AE5C |
ADD HL,DE |
|
AE5D |
SLA C |
|
AE5F |
JR NC,Obj_Take_0 |
|
AE61 |
DEC HL |
|
AE62 |
LD A,(HL) |
|
AE63 |
DEC HL |
|
AE64 |
CP (HL) |
|
AE65 |
RET NZ |
|
AE66 |
INC HL |
|
AE67 |
INC HL |
Obj_Take_0 |
AE68 |
SRL C |
|
AE6A |
LD A,(HL) |
|
AE6B |
AND A |
|
AE6C |
RET Z |
|
AE6D |
LD A,(Hero_Pocket4) |
|
AE70 |
AND A |
|
AE71 |
JP Z,Obj_Take_1 |
|
AE74 |
CALL Print_WarningCentered |
|
AE77 |
DEFM "your hands are full",$5E |
|
AE8B |
RET |
Obj_Take_1 |
AE8C |
LD A,C |
|
AE8D |
CP $02 |
|
AE8F |
LD A,(HL) |
|
AE90 |
JR NZ,Obj_Take_2 |
|
AE92 |
LD E,L |
|
AE93 |
LD D,H |
|
AE94 |
INC HL |
|
AE95 |
LD BC,$0004 |
|
AE98 |
LDIR |
|
AE9A |
DEC HL |
Obj_Take_2 |
AE9B |
AND $7F |
|
AE9D |
LD (HL),$00 |
|
AE9F |
LD HL,Hero_Pocket3 |
|
AEA2 |
LD DE,Hero_Pocket4 |
|
AEA5 |
LD BC,$0003 |
|
AEA8 |
LDDR |
|
AEAA |
LD ($BD1D),A |
|
AEAD |
CP $3C |
|
AEAF |
JR NZ,Obj_Take_3 |
|
AEB1 |
LD HL,$0090 |
|
AEB4 |
LD (Plans_CountDownTime),HL |
|
AEB7 |
LD A,($5C78) |
|
AEBA |
LD (Plans_CountDownFrames),A |
|
AEBD |
LD HL,Str_FinalCoundown |
|
AEC0 |
CALL Message_ClearIfNoPlans |
Obj_Take_3 |
AEC3 |
LD A,($BD1D) |
|
AEC6 |
LD (Hero_Pocket1),A |
|
AEC9 |
LD A,$01 |
|
AECB |
LD (Hero_Select),A |
|
AECE |
LD DE,$0005 |
|
AED1 |
LD HL,$02EE |
|
AED4 |
CALL $03B5 |
|
AED7 |
JP Pockets_UpdateInv |