Prev: 8121 Up: Map Next: 83D5
8354: Start off the action 'offer'.
Used by the routine at Game_Main.
Input
Output
Offer_Action 8354 LD A,(Offer_Count) See if an offer is already in place, if so do nothing.
8357 AND A
8358 RET NZ
8359 LD HL,Hero_Frame Set frame to 12 (Facing in).
835C LD (HL),$12
835E LD DE,(Bg_ItemTableMid)
8362 LD A,E
8363 OR D
8364 BIT 4,A
8366 JR NZ,Offer_Action_0
8368 LD A,(Camera_Compass)
836B BIT 1,A
836D JR Z,Offer_Action_0
836F INC (HL) Change frame to facing front.
Offer_Action_0 8370 LD A,$16 Start offer.
8372 LD (Offer_Count),A
8375 LD HL,$0000 Clear who we are offering to.
8378 LD (Offer_PersonPtr),HL
837B LD HL,(Inv_Select) Set the attribute of the offer character to flashing.
837E LD H,$00
8380 ADD HL,HL
8381 ADD HL,HL
8382 ADD HL,HL
8383 ADD HL,HL
8384 ADD HL,HL
8385 LD DE,ATTR_5a81
8388 ADD HL,DE
8389 SET 7,(HL)
838B LD A,(Inv_Select) See if offering iridi
838E AND A
838F JR NZ,Offer_Action_1
8391 LD (Offer_ObjIndex),A
8394 CALL Message_Display
8397 DEFM "iridi?"
839D DEFB $5E
839E RET
Offer_Action_1 839F CALL Message_Display
83A2 DEFB $5E
83A3 LD HL,(Inv_Select) Get selected object index.
83A6 LD H,$00
83A8 LD DE,_b14e
83AB ADD HL,DE
83AC LD A,(HL)
83AD LD (Offer_ObjIndex),A
83B0 CP $18 Is it the Telestone.
83B2 JR NZ,Offer_Action_2
83B4 LD A,$3C Start searching for Skar...
83B6 LD (Skar_ShowCount),A
83B9 CALL Print_StrFromStack
83BC DEFM "searching..."
83C8 DEFB $5E
83C9 RET
Offer_Action_2 83CA CALL Object_GetNounAddr Offer the object.
83CD CALL Print_String
83D0 LD A,$3F Add '?' to the end, making it a question.
83D2 JP Print_SelectChar Do the print, then return.
Prev: 8121 Up: Map Next: 83D5