Prev: 37011 Up: Map Next: 37080
37051: 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 37051 LD DE,36949 DE=MarkedCards.
37054 LD HL,38599 HL=PlayersHand.
Cycle through each marked card from MarkedCards, and set the appropriate card in the players hand to be redrawn (255) if it's set to do so.
37057 LD B,5 Set a counter in B for the 5 cards in a hand.
HandlerMarkCards_Loop 37059 LD A,(DE) A=*DE.
37060 OR A Jump to DontMarkCard if A is zero.
37061 JR Z,DontMarkCard
Set the card in the hand to be redrawn.
37063 LD (HL),255 Write 255 to *HL.
Move onto the next card.
DontMarkCard 37065 INC HL Increment both DE and HL by one.
37066 INC DE
37067 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.
37069 LD HL,23073 HL=23073 (attribute buffer location).
37072 LD B,30 B=30.
ResetMarkCardsAttributes_Loop 37074 LD (HL),0 Write INK: BLACK, PAPER: BLACK to *HL.
37076 INC HL Increment HL by one.
37077 DJNZ ResetMarkCardsAttributes_Loop Decrease counter by one and loop back to ResetMarkCardsAttributes_Loop until counter is zero.
37079 RET Return.
Prev: 37011 Up: Map Next: 37080