Prev: 9093 Up: Map Next: 90D8
90BB: Handler: Mark Cards
Used by the routine at MarkCards.
Sets the cards in the players hand to be redrawn, where they've been marked in MarkedCards.
HandlerMarkCards 90BB LD DE,$9055 DE=MarkedCards.
90BE LD HL,$96C7 HL=PlayersHand.
Cycle through each marked card from MarkedCards, and set the appropriate card in the players hand to be redrawn (FF) if it's set to do so.
90C1 LD B,$05 Set a counter in B for the 05 cards in a hand.
HandlerMarkCards_Loop 90C3 LD A,(DE) A=*DE.
90C4 OR A Jump to DontMarkCard if A is zero.
90C5 JR Z,DontMarkCard
Set the card in the hand to be redrawn.
90C7 LD (HL),$FF Write FF to *HL.
Move onto the next card.
DontMarkCard 90C9 INC HL Increment both DE and HL by one.
90CA INC DE
90CB DJNZ HandlerMarkCards_Loop Decrease the card counter by one and loop back to HandlerMarkCards_Loop until all cards have been considered.
Clean up the UI for marking cards.
90CD LD HL,$5A21 HL=5A21 (attribute buffer location).
90D0 LD B,$1E B=1E.
ResetMarkCardsAttributes_Loop 90D2 LD (HL),$00 Write INK: BLACK, PAPER: BLACK to *HL.
90D4 INC HL Increment HL by one.
90D5 DJNZ ResetMarkCardsAttributes_Loop Decrease counter by one and loop back to ResetMarkCardsAttributes_Loop until counter is zero.
90D7 RET Return.
Prev: 9093 Up: Map Next: 90D8