Rev 2102 | Rev 3178 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2102 | Rev 2317 | ||
---|---|---|---|
Line 122... | Line 122... | ||
122 | mov [mem.realloc], ecx |
122 | mov [mem.realloc], ecx |
123 | mov [dll.load], edx |
123 | mov [dll.load], edx |
124 | ret |
124 | ret |
Line -... | Line 125... | ||
- | 125 | ||
- | 126 | ||
- | 127 | align 4 |
|
- | 128 | proc draw_edge uses eax ebx ecx edx edi esi, box_l:dword, box_t:dword, box_w:dword, box_h:dword,\ |
|
- | 129 | col_0:dword, col_1:dword, col_2:dword |
|
- | 130 | ||
- | 131 | mov esi,dword[col_1] |
|
- | 132 | and esi,111111101111111011111110b |
|
- | 133 | ||
- | 134 | mov eax,13 |
|
- | 135 | ;bottom line |
|
- | 136 | mov edx,dword[col_2] |
|
- | 137 | mov ebx,dword[box_l] |
|
- | 138 | shl ebx,16 |
|
- | 139 | add ebx,dword[box_w] |
|
- | 140 | inc ebx ;äëÿ çàëèâêè äèàãîíàëüíûõ ïèêñåëåé |
|
- | 141 | mov ecx,dword[box_t] |
|
- | 142 | add ecx,dword[box_h] |
|
- | 143 | shl ecx,16 |
|
- | 144 | inc ecx |
|
- | 145 | ||
- | 146 | mov edi,3 ;for cycle |
|
- | 147 | @@: |
|
- | 148 | ;calculate colors |
|
- | 149 | and edx,111111101111111011111110b |
|
- | 150 | add edx,esi |
|
- | 151 | shr edx,1 |
|
- | 152 | ;line move up and ->...<- |
|
- | 153 | sub ecx,1 shl 16 ;move up |
|
- | 154 | add ebx,1 shl 16 ;->... |
|
- | 155 | sub ebx,2 ;...<- |
|
- | 156 | ;draw line |
|
- | 157 | int 0x40 |
|
- | 158 | dec edi |
|
- | 159 | jnz @b |
|
- | 160 | ||
- | 161 | ;right line |
|
- | 162 | mov edx,dword[col_2] |
|
- | 163 | mov ebx,dword[box_l] |
|
- | 164 | add ebx,dword[box_w] |
|
- | 165 | shl ebx,16 |
|
- | 166 | inc ebx |
|
- | 167 | mov ecx,dword[box_t] |
|
- | 168 | shl ecx,16 |
|
- | 169 | add ecx,dword[box_h] |
|
- | 170 | ||
- | 171 | mov edi,3 ;for cycle |
|
- | 172 | @@: |
|
- | 173 | ;calculate colors |
|
- | 174 | and edx,111111101111111011111110b |
|
- | 175 | add edx,esi |
|
- | 176 | shr edx,1 |
|
- | 177 | ;line move left and ... |
|
- | 178 | sub ebx,1 shl 16 ;move left |
|
- | 179 | add ecx,1 shl 16 |
|
- | 180 | sub ecx,2 |
|
- | 181 | ;draw line |
|
- | 182 | int 0x40 |
|
- | 183 | dec edi |
|
- | 184 | jnz @b |
|
- | 185 | ||
- | 186 | ;top line |
|
- | 187 | mov edx,dword[col_0] |
|
- | 188 | mov ebx,dword[box_l] |
|
- | 189 | shl ebx,16 |
|
- | 190 | add ebx,dword[box_w] |
|
- | 191 | mov ecx,dword[box_t] |
|
- | 192 | shl ecx,16 |
|
- | 193 | inc ecx |
|
- | 194 | ||
- | 195 | mov edi,3 ;for cycle |
|
- | 196 | @@: |
|
- | 197 | ;calculate colors |
|
- | 198 | and edx,111111101111111011111110b |
|
- | 199 | add edx,esi |
|
- | 200 | shr edx,1 |
|
- | 201 | ;line move down and ->...<- |
|
- | 202 | add ecx,1 shl 16 ;move down |
|
- | 203 | add ebx,1 shl 16 ;->... |
|
- | 204 | sub ebx,2 ;...<- |
|
- | 205 | ;draw line |
|
- | 206 | int 0x40 |
|
- | 207 | dec edi |
|
- | 208 | jnz @b |
|
- | 209 | ||
- | 210 | ;left line |
|
- | 211 | mov edx,dword[col_0] |
|
- | 212 | mov ebx,dword[box_l] |
|
- | 213 | shl ebx,16 |
|
- | 214 | inc ebx |
|
- | 215 | mov ecx,dword[box_t] |
|
- | 216 | shl ecx,16 |
|
- | 217 | add ecx,dword[box_h] |
|
- | 218 | ||
- | 219 | mov edi,3 ;for cycle |
|
- | 220 | @@: |
|
- | 221 | ;calculate colors |
|
- | 222 | and edx,111111101111111011111110b |
|
- | 223 | add edx,esi |
|
- | 224 | shr edx,1 |
|
- | 225 | ;line move left and ... |
|
- | 226 | add ebx,1 shl 16 ;move left |
|
- | 227 | add ecx,1 shl 16 |
|
- | 228 | sub ecx,2 |
|
- | 229 | ;draw line |
|
- | 230 | int 0x40 |
|
- | 231 | dec edi |
|
- | 232 | jnz @b |
|
- | 233 | ||
- | 234 | ret |
|
- | 235 | endp |
|
125 | 236 | ||
126 | 237 | ||
Line 127... | Line 238... | ||
127 | align 16 |
238 | align 16 |