![]() |
Routines |
Prev: 26011 | Up: Map | Next: 26190 |
Scrolls the play area horizontally by shifting pixel data left using
RLD instructions.
|
||||
ScrollPlayarea_Left | 26012 | LD HL,(30743) | HL=*Current_ScreenPosition. | |
26015 | LD D,H | Copy the screen position pointer into DE. | ||
26016 | LD E,L | |||
26017 | LD A,(30745) | A=*ScrollPhase_Counter. | ||
26020 | LD C,A | Copy the scroll phase counter into C. | ||
26021 | INC A | Increment the scroll phase counter by one. | ||
26022 | AND %00000111 | Ensure the counter is limited to being a number between 0-7. | ||
26024 | LD (30745),A | Write the scroll phase counter back to *ScrollPhase_Counter. | ||
26027 | JR NZ,ScrollPlayarea_UpdateColumnPointer | Jump to ScrollPlayarea_UpdateColumnPointer if A is not zero. | ||
26029 | INC L | Increment L by one. | ||
26030 | JR NZ,ScrollPlayarea_StorePointer | Jump to ScrollPlayarea_StorePointer if L is not zero. | ||
26032 | LD A,H | H+=5. | ||
26033 | ADD A,5 | |||
26035 | LD H,A | |||
ScrollPlayarea_StorePointer | 26036 | LD (30743),HL | Write HL to *Current_ScreenPosition. | |
Set up the column data pointer for new graphics data.
|
||||
ScrollPlayarea_UpdateColumnPointer | 26039 | LD A,E | E+=8. | |
26040 | ADD A,8 | |||
26042 | LD E,A | |||
26043 | JR NC,ScrollPlayarea_SetupScroll | Jump to ScrollPlayarea_SetupScroll if {} is higher. | ||
26045 | LD A,D | D+=5. | ||
26046 | ADD A,5 | |||
26048 | LD D,A | |||
ScrollPlayarea_SetupScroll | 26049 | LD A,C | Load the original scroll phase counter value into A. | |
26050 | LD B,1 | Set a counter in B for 1 column to process. | ||
26052 | CALL PrepareScrollData | Call PrepareScrollData. | ||
Start of screen buffer.
|
||||
26055 | LD HL,16415 | HL=16415 (screen buffer location). | ||
26058 | LD D,H | Copy the screen position pointer into DE. | ||
26059 | LD E,L | |||
26060 | EXX | Switch to the shadow registers. | ||
ScrollPlayarea_ProcessRows | 26061 | LD A,(DE) | A=*DE. | |
26062 | INC E | Increment E by one. | ||
26063 | LD L,A | L=A. | ||
26064 | LD H,31 | H=31. | ||
26066 | ADD HL,HL | Multiply HL by 4. | ||
26067 | ADD HL,HL | |||
26068 | EXX | Switch to the shadow registers. | ||
Scroll one character row (32 characters) left by 1 pixel using
RLD .
|
||||
26069 | LD B,4 | B=4. | ||
ScrollCharacterRow_Left | 26071 | EXX | Switch to the shadow registers. | |
26072 | LD A,(HL) | A=*HL. | ||
26073 | INC L | Increment L by one. | ||
26074 | EXX | Switch to the shadow registers. | ||
26075 | RLD | RLD. | ||
26077 | DEC L | Decrease L by one. | ||
26078 | RLD | RLD. | ||
26080 | DEC L | Decrease L by one. | ||
26081 | RLD | RLD. | ||
26083 | DEC L | Decrease L by one. | ||
26084 | RLD | RLD. | ||
26086 | DEC L | Decrease L by one. | ||
26087 | RLD | RLD. | ||
26089 | DEC L | Decrease L by one. | ||
26090 | RLD | RLD. | ||
26092 | DEC L | Decrease L by one. | ||
26093 | RLD | RLD. | ||
26095 | DEC L | Decrease L by one. | ||
26096 | RLD | RLD. | ||
26098 | DEC L | Decrease L by one. | ||
26099 | RLD | RLD. | ||
26101 | DEC L | Decrease L by one. | ||
26102 | RLD | RLD. | ||
26104 | DEC L | Decrease L by one. | ||
26105 | RLD | RLD. | ||
26107 | DEC L | Decrease L by one. | ||
26108 | RLD | RLD. | ||
26110 | DEC L | Decrease L by one. | ||
26111 | RLD | RLD. | ||
26113 | DEC L | Decrease L by one. | ||
26114 | RLD | RLD. | ||
26116 | DEC L | Decrease L by one. | ||
26117 | RLD | RLD. | ||
26119 | DEC L | Decrease L by one. | ||
26120 | RLD | RLD. | ||
26122 | DEC L | Decrease L by one. | ||
26123 | RLD | RLD. | ||
26125 | DEC L | Decrease L by one. | ||
26126 | RLD | RLD. | ||
26128 | DEC L | Decrease L by one. | ||
26129 | RLD | RLD. | ||
26131 | DEC L | Decrease L by one. | ||
26132 | RLD | RLD. | ||
26134 | DEC L | Decrease L by one. | ||
26135 | RLD | RLD. | ||
26137 | DEC L | Decrease L by one. | ||
26138 | RLD | RLD. | ||
26140 | DEC L | Decrease L by one. | ||
26141 | RLD | RLD. | ||
26143 | DEC L | Decrease L by one. | ||
26144 | RLD | RLD. | ||
26146 | DEC L | Decrease L by one. | ||
26147 | RLD | RLD. | ||
26149 | DEC L | Decrease L by one. | ||
26150 | RLD | RLD. | ||
26152 | DEC L | Decrease L by one. | ||
26153 | RLD | RLD. | ||
26155 | DEC L | Decrease L by one. | ||
26156 | RLD | RLD. | ||
26158 | DEC L | Decrease L by one. | ||
26159 | RLD | RLD. | ||
26161 | DEC L | Decrease L by one. | ||
26162 | RLD | RLD. | ||
26164 | DEC L | Decrease L by one. | ||
26165 | RLD | RLD. | ||
26167 | DEC L | Decrease L by one. | ||
26168 | RLD | RLD. | ||
26170 | LD L,E | L=E. | ||
26171 | INC H | Increment H by two. | ||
26172 | INC H | |||
26173 | DJNZ ScrollCharacterRow_Left | Decrease counter by one and loop back to ScrollCharacterRow_Left until counter is zero. | ||
26175 | LD A,32 | Move down one character row. | ||
26177 | ADD A,E | |||
26178 | LD E,A | |||
26179 | LD L,A | Update the screen pointer. | ||
26180 | JR NC,ScrollPlayarea_NextRow | Jump to ScrollPlayarea_NextRow if {} is higher. | ||
26182 | LD D,72 | D=72. | ||
ScrollPlayarea_NextRow | 26184 | LD H,D | Update the screen pointer. | |
26185 | EXX | Switch to the shadow registers. | ||
26186 | DJNZ ScrollPlayarea_ProcessRows | Decrease counter by one and loop back to ScrollPlayarea_ProcessRows until counter is zero. | ||
26188 | EXX | Switch back to the normal registers. | ||
26189 | RET | Return. |
Prev: 26011 | Up: Map | Next: 26190 |