Rev 882 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 882 | Rev 1002 | ||
---|---|---|---|
Line 124... | Line 124... | ||
124 | call [imp_Blit] |
124 | call [imp_Blit] |
125 | add esp, 8*4 |
125 | add esp, 8*4 |
126 | } |
126 | } |
127 | 127 | ||
Line -... | Line 128... | ||
- | 128 | macro BlitAlpha dstpix, dstx, dsty, srcpix, srcx, srcy, w, h, alpha |
|
- | 129 | { |
|
- | 130 | pushd alpha |
|
- | 131 | pushd h |
|
- | 132 | pushd w |
|
- | 133 | pushd srcy |
|
- | 134 | pushd srcx |
|
- | 135 | pushd srcpix |
|
- | 136 | pushd dsty |
|
- | 137 | pushd dstx |
|
- | 138 | pushd dstpix |
|
- | 139 | call [imp_BlitAlpha] |
|
- | 140 | add esp, 9*4 |
|
- | 141 | } |
|
- | 142 | ||
128 | macro TransparentBlit dstpix, dstx, dsty, srcpix, srcx, srcy, w, h, key |
143 | macro TransparentBlit dstpix, dstx, dsty, srcpix, srcx, srcy, w, h, key |
129 | { |
144 | { |
130 | pushd key |
145 | pushd key |
131 | pushd h |
146 | pushd h |
132 | pushd w |
147 | pushd w |
Line 139... | Line 154... | ||
139 | call [imp_TransparentBlit] |
154 | call [imp_TransparentBlit] |
140 | add esp, 9*4 |
155 | add esp, 9*4 |
141 | } |
156 | } |
142 | 157 | ||
Line -... | Line 158... | ||
- | 158 | ||
- | 159 | macro fix_cwd path |
|
- | 160 | { |
|
- | 161 | pushd path |
|
- | 162 | ||
- | 163 | push '/' |
|
- | 164 | push path |
|
- | 165 | call _strrchr |
|
- | 166 | ||
- | 167 | mov byte [eax], 0 |
|
- | 168 | ||
- | 169 | mov eax, 30 |
|
- | 170 | mov ebx, 1 |
|
- | 171 | mov ecx, [esp+8] |
|
- | 172 | int 0x40 |
|
- | 173 | ||
- | 174 | add esp, 12 |
|
- | 175 | } |
|
- | 176 | ||
143 | szPxlib db '/rd/1/lib/pixlib.obj',0 |
177 | szPxlib db '/rd/1/lib/pixlib.obj',0 |
Line 144... | Line 178... | ||
144 | 178 | ||
145 | szStart db 'START',0 |
179 | szStart db 'START',0 |
Line 160... | Line 194... | ||
160 | szDrawRect db 'DrawRect',0 |
194 | szDrawRect db 'DrawRect',0 |
161 | szFillRect db 'FillRect',0 |
195 | szFillRect db 'FillRect',0 |
162 | szBlit db 'Blit',0 |
196 | szBlit db 'Blit',0 |
163 | szTransparentBlit db 'TransparentBlit',0 |
197 | szTransparentBlit db 'TransparentBlit',0 |
164 | 198 | szBlitAlpha db 'BlitAlpha',0 |
|
- | 199 | ||
Line 165... | Line 200... | ||
165 | align 4 |
200 | align 4 |
Line 166... | Line 201... | ||
166 | 201 | ||
Line 184... | Line 219... | ||
184 | imp_DrawRect dd szDrawRect |
219 | imp_DrawRect dd szDrawRect |
185 | imp_FillRect dd szFillRect |
220 | imp_FillRect dd szFillRect |
186 | imp_Blit dd szBlit |
221 | imp_Blit dd szBlit |
187 | imp_TransparentBlit dd szTransparentBlit |
222 | imp_TransparentBlit dd szTransparentBlit |
188 | 223 | imp_BlitAlpha dd szBlitAlpha |
|
- | 224 | ||
Line 189... | Line 225... | ||
189 | dd 0 |
225 | dd 0 |
Line 190... | Line 226... | ||
190 | 226 | ||
Line 255... | Line 291... | ||
255 | .fail: |
291 | .fail: |
256 | xor eax, eax |
292 | xor eax, eax |
257 | ret |
293 | ret |
258 | 294 | ||
Line 259... | Line 295... | ||
259 | 295 | align 4 |
|
- | 296 | _strrchr: |
|
- | 297 | push ebp |
|
- | 298 | mov ebp, esp |
|
- | 299 | push edi |
|
- | 300 | mov edi, [8+ebp] |
|
- | 301 | mov ecx, -1 |
|
- | 302 | xor al, al |
|
- | 303 | cld |
|
- | 304 | repne |
|
- | 305 | scasb |
|
- | 306 | not ecx |
|
- | 307 | dec edi |
|
- | 308 | mov al, [12+ebp] |
|
- | 309 | std |
|
- | 310 | repne |
|
- | 311 | scasb |
|
- | 312 | cld |
|
- | 313 | jne .failure |
|
- | 314 | lea eax, [edi+1] |
|
- | 315 | pop edi |
|
- | 316 | pop ebp |
|
- | 317 | ret |
|
- | 318 | .failure: |
|
- | 319 | xor eax, eax |
|
- | 320 | pop edi |
|
- | 321 | pop ebp |
|
- | 322 | ret |