Routines |
Prev: 936E | Up: Map | Next: 93B0 |
Used by the routine at CheckFullHouse.
|
||||
Check if there is a flush.
|
||||
CheckFlush | 9386 | CALL Handler_Flush | Call Handler_Flush. | |
9389 | JR NZ,CheckStraight | Jump to CheckStraight if there are no flush matches. | ||
There is a flush! Process it.
|
||||
938B | LD A,(IX+$00) | A=*IX+00. | ||
938E | LD B,$04 | B=04. | ||
CheckFlush_0 | 9390 | SRA A | Shift A right (with carry). | |
9392 | DJNZ CheckFlush_0 | Decrease counter by one and loop back to CheckFlush_0 until counter is zero. | ||
9394 | LD ($949D),A | Write A to *TableHandEvaluation_BaseCardSuit. | ||
Record this hand "type".
|
||||
9397 | LD A,$06 | Write "Flush" to *TableHandEvaluation_Type. | ||
9399 | LD ($949B),A | |||
939C | LD D,$00 | D=00. | ||
939E | PUSH IX | HL=IX (using the stack). | ||
93A0 | POP HL | |||
93A1 | LD B,$05 | B=05. | ||
CheckFlush_1 | 93A3 | LD A,(HL) | A=*HL. | |
93A4 | AND %00001111 | Keep only bits 0-3. | ||
93A6 | CP D | Jump to CheckFlush_2 if A is higher than D. | ||
93A7 | JR NC,CheckFlush_2 | |||
93A9 | LD D,A | D=A. | ||
CheckFlush_2 | 93AA | DJNZ CheckFlush_1 | Decrease counter by one and loop back to CheckFlush_1 until counter is zero. | |
93AC | LD ($949C),A | Write A to *TableHandEvaluation_BaseCard. | ||
93AF | RET | Return. |
Prev: 936E | Up: Map | Next: 93B0 |