Routines |
Prev: 37826 | Up: Map | Next: 38221 |
37880 | LD HL,0 | Write 0000 to 37770. | ||
37883 | LD (37770),HL | |||
37886 | CALL DrawFrame | Call DrawFrame. | ||
37889 | LD HL,48896 | HL=48896 (screen co-ordinates). | ||
37892 | LD DE,37419 | DE=37419. | ||
37895 | CALL 46620 | Call 46620. | ||
37898 | LD HL,46856 | HL=46856 (screen co-ordinates). | ||
37901 | LD DE,37767 | DE=37767. | ||
37904 | CALL 46620 | Call 46620. | ||
37907 | LD HL,18200 | HL=18200 (screen buffer location). | ||
37910 | LD DE,37772 | DE=37772. | ||
37913 | CALL PrintLine_15 | Call PrintLine_15. | ||
37916 | LD HL,18376 | HL=18376 (screen buffer location). | ||
37919 | LD DE,37826 | DE=37826. | ||
37922 | CALL PrintLine_15 | Call PrintLine_15. | ||
37925 | LD HL,47086 | HL=47086. | ||
37928 | LD DE,38241 | DE=38241. | ||
37931 | CALL 37539 | Call 37539. | ||
37934 | LD HL,47094 | HL=47094. | ||
37937 | LD DE,38251 | DE=38251. | ||
37940 | CALL 37539 | Call 37539. | ||
37943 | LD DE,38221 | DE=Messaging_1UP. | ||
37946 | LD B,15 | B=15. | ||
37948 | CALL 46998 | Call 46998. | ||
37951 | LD HL,(37565) | HL=*37565. | ||
37954 | LD DE,37569 | DE=37569. | ||
37957 | CALL PrintLine_15 | Call PrintLine_15. | ||
37960 | LD HL,(37567) | HL=*37567. | ||
37963 | LD DE,37635 | DE=37635. | ||
37966 | CALL PrintLine_15 | Call PrintLine_15. | ||
37969 | LD HL,(36166) | HL=*36166. | ||
37972 | INC HL | Increment HL by one. | ||
37973 | LD (36166),HL | Write HL to *36166. | ||
37976 | BIT 6,H | Jump to 37503 if bit 6 of H is set. | ||
37978 | JP NZ,37503 | |||
37981 | CALL 36532 | Call 36532. | ||
37984 | LD DE,(47077) | DE=*GameMode. | ||
37988 | LD A,247 | A=247. | ||
37990 | CALL 38823 | Call 38823. | ||
37993 | BIT 0,A | Jump to 38008 if bit 0 of A is not set. | ||
37995 | JR Z,38008 | |||
37997 | LD A,E | Jump to 38065 if E is zero. | ||
37998 | AND A | |||
37999 | JR Z,38065 | |||
38001 | LD E,0 | E=0. | ||
38003 | LD HL,38257 | HL=Messaging_1Player. | ||
38006 | JR 38036 | Jump to 38036. | ||
38008 | BIT 2,A | Jump to 38024 if bit 2 of A is not set. | ||
38010 | JR Z,38024 | |||
38012 | LD A,E | A=E. | ||
38013 | CP 2 | Jump to 38065 if A is equal to 2. | ||
38015 | JR Z,38065 | |||
38017 | LD E,2 | E=2. | ||
38019 | LD HL,38290 | HL=Messaging_DoublePlay. | ||
38022 | JR 38036 | Jump to 38036. | ||
38024 | BIT 1,A | Jump to 38065 if bit 1 of A is not set. | ||
38026 | JR Z,38065 | |||
38028 | DEC E | Decrease E by one. | ||
38029 | JR Z,38065 | Jump to 38065 until E is zero. | ||
38031 | LD E,1 | E=1. | ||
38033 | LD HL,38273 | HL=Messaging_2Players. | ||
38036 | LD A,E | Write E to *GameMode. | ||
38037 | LD (47077),A | |||
38040 | ADD A,A | E=47+E*16. | ||
38041 | ADD A,A | |||
38042 | ADD A,A | |||
38043 | ADD A,A | |||
38044 | ADD A,47 | |||
38046 | LD E,A | |||
38047 | LD D,0 | D=0. | ||
38049 | LD (38424),DE | Write DE to *38424. | ||
38053 | PUSH HL | Stash HL on the stack. | ||
38054 | LD DE,(38420) | DE=*38420. | ||
38058 | CALL PrintLine | Call PrintLine. | ||
38061 | POP HL | Restore HL from the stack. | ||
38062 | LD (38420),HL | Write HL to *38420. | ||
38065 | LD A,(37770) | A=*37770. | ||
38068 | AND A | Set flags. | ||
38069 | JR Z,38077 | Jump to 38077 if {} is zero. | ||
38071 | DEC A | Decrease A by one. | ||
38072 | LD (37770),A | Write A to *37770. | ||
38075 | JR 38134 | Jump to 38134. | ||
38077 | LD A,253 | A=253. | ||
38079 | CALL 38823 | Call 38823. | ||
38082 | RRA | RRA. | ||
38083 | JR NC,38134 | Jump to 38134 if {} is higher. | ||
38085 | LD A,(47087) | A=*47087. | ||
38088 | INC A | Increment A by one. | ||
38089 | AND %00000011 | Keep only bits 0-1. | ||
38091 | LD (47087),A | Write A to *47087. | ||
38094 | LD HL,(37565) | HL=*37565. | ||
38097 | LD DE,37701 | DE=37701. | ||
38100 | CALL PrintLine_15 | Call PrintLine_15. | ||
38103 | LD A,(37566) | A=*37566. | ||
38106 | ADD A,16 | A+=16. | ||
38108 | CP 160 | Jump to 38114 if A is lower than 160. | ||
38110 | JR C,38114 | |||
38112 | LD A,108 | A=108. | ||
38114 | LD (37566),A | Write A to *37566. | ||
38117 | LD HL,(37565) | HL=*37565. | ||
38120 | LD DE,37569 | DE=37569. | ||
38123 | CALL PrintLine_15 | Call PrintLine_15. | ||
38126 | LD A,255 | A=255. | ||
38128 | LD (37770),A | Write A to *37770. | ||
38131 | CALL 49475 | Call 49475. | ||
38134 | LD A,(37771) | Jump to 38146 if *37771 is zero. | ||
38137 | AND A | |||
38138 | JR Z,38146 | |||
38140 | DEC A | Decrease A by one. | ||
38141 | LD (37771),A | Write A to *37771. | ||
38144 | JR 38204 | Jump to 38204. | ||
38146 | LD A,127 | A=127. | ||
38148 | CALL 38823 | Call 38823. | ||
38151 | AND %00010000 | Keep only bits 4. | ||
38153 | JR Z,38204 | Jump to 38204 if the result is zero. | ||
38155 | LD A,(47095) | A=*47095. | ||
38158 | INC A | Increment A by one. | ||
38159 | AND %00000011 | Keep only bits 0-1. | ||
38161 | LD (47095),A | Write A to *47095. | ||
38164 | LD HL,(37567) | HL=*37567. | ||
38167 | LD DE,37701 | DE=37701. | ||
38170 | CALL PrintLine_15 | Call PrintLine_15. | ||
38173 | LD A,(37568) | A=*37568. | ||
38176 | ADD A,16 | A+=16. | ||
38178 | CP 160 | Jump to 38184 if A is lower than 160. | ||
38180 | JR C,38184 | |||
38182 | LD A,108 | A=108. | ||
38184 | LD (37568),A | Write A to *37568. | ||
38187 | LD HL,(37567) | HL=*37567. | ||
38190 | LD DE,37635 | DE=37635. | ||
38193 | CALL PrintLine_15 | Call PrintLine_15. | ||
38196 | LD A,255 | A=255. | ||
38198 | LD (37771),A | Write A to *37771. | ||
38201 | CALL 49475 | Call 49475. | ||
38204 | LD DE,38424 | DE=38424. | ||
38207 | CALL 38428 | Call 38428. | ||
38210 | LD A,239 | A=239. | ||
38212 | CALL 38823 | Call 38823. | ||
38215 | AND %00000001 | Keep only bits 0. | ||
38217 | RET NZ | Return if the result is not zero. | ||
38218 | JP 37969 | Jump to 37969. |
Prev: 37826 | Up: Map | Next: 38221 |