Rev 908 | Rev 928 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 908 | Rev 914 | ||
---|---|---|---|
Line 56... | Line 56... | ||
56 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
56 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
57 | 57 | ||
Line 58... | Line 58... | ||
58 | include 'macros.inc' |
58 | include 'macros.inc' |
Line 59... | Line 59... | ||
59 | 59 | ||
Line 60... | Line 60... | ||
60 | $Revision: 908 $ |
60 | $Revision: 914 $ |
Line 61... | Line 61... | ||
61 | 61 | ||
Line 4312... | Line 4312... | ||
4312 | rol edx, 16 |
4312 | rol edx, 16 |
4313 | add dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.left] |
4313 | add dx, word [eax+SLOT_BASE+APPDATA.wnd_clientbox.left] |
4314 | rol edx, 16 |
4314 | rol edx, 16 |
4315 | .forced: |
4315 | .forced: |
4316 | push ebp esi ebp |
4316 | cmp esi, 1 |
- | 4317 | jnz @f |
|
- | 4318 | push edi |
|
- | 4319 | mov eax, [edi+4] |
|
- | 4320 | sub eax, [edi] |
|
- | 4321 | push eax |
|
- | 4322 | push dword [edi] |
|
- | 4323 | push 0ffffff80h |
|
- | 4324 | mov edi, esp |
|
- | 4325 | call put_mono_image |
|
- | 4326 | add esp, 12 |
|
- | 4327 | pop edi |
|
- | 4328 | ret |
|
- | 4329 | @@: |
|
- | 4330 | cmp esi, 4 |
|
- | 4331 | jnz @f |
|
- | 4332 | push edi |
|
- | 4333 | push 0ffffff80h |
|
- | 4334 | mov edi, esp |
|
- | 4335 | call put_4bit_image |
|
- | 4336 | pop eax |
|
- | 4337 | pop edi |
|
- | 4338 | ret |
|
- | 4339 | @@: |
|
- | 4340 | push ebp esi ebp |
|
4317 | cmp esi, 8 |
4341 | cmp esi, 8 |
4318 | jnz @f |
4342 | jnz @f |
4319 | mov ebp, putimage_get8bpp |
4343 | mov ebp, putimage_get8bpp |
4320 | mov esi, putimage_init8bpp |
4344 | mov esi, putimage_init8bpp |
4321 | jmp sys_putimage_bpp |
4345 | jmp sys_putimage_bpp |
4322 | @@: |
4346 | @@: |
4323 | cmp esi, 16 |
4347 | cmp esi, 15 |
- | 4348 | jnz @f |
|
- | 4349 | mov ebp, putimage_get15bpp |
|
- | 4350 | mov esi, putimage_init15bpp |
|
- | 4351 | jmp sys_putimage_bpp |
|
- | 4352 | @@: |
|
- | 4353 | cmp esi, 16 |
|
4324 | jnz @f |
4354 | jnz @f |
4325 | mov ebp, putimage_get16bpp |
4355 | mov ebp, putimage_get16bpp |
4326 | mov esi, putimage_init16bpp |
4356 | mov esi, putimage_init16bpp |
4327 | jmp sys_putimage_bpp |
4357 | jmp sys_putimage_bpp |
4328 | @@: |
4358 | @@: |
Line 4340... | Line 4370... | ||
4340 | @@: |
4370 | @@: |
4341 | pop ebp esi ebp |
4371 | pop ebp esi ebp |
4342 | ret |
4372 | ret |
4343 | 4373 | ||
Line -... | Line 4374... | ||
- | 4374 | put_mono_image: |
|
- | 4375 | push ebp esi ebp |
|
- | 4376 | mov ebp, putimage_get1bpp |
|
- | 4377 | mov esi, putimage_init1bpp |
|
- | 4378 | jmp sys_putimage_bpp |
|
- | 4379 | put_4bit_image: |
|
- | 4380 | push ebp esi ebp |
|
- | 4381 | mov ebp, putimage_get4bpp |
|
- | 4382 | mov esi, putimage_init4bpp |
|
- | 4383 | jmp sys_putimage_bpp |
|
- | 4384 | ||
4344 | putimage_init24bpp: |
4385 | putimage_init24bpp: |
4345 | lea eax, [eax*3] |
4386 | lea eax, [eax*3] |
4346 | putimage_init8bpp: |
4387 | putimage_init8bpp: |
4347 | ret |
4388 | ret |
Line -... | Line 4389... | ||
- | 4389 | ||
4348 | 4390 | align 16 |
|
4349 | putimage_get24bpp: |
4391 | putimage_get24bpp: |
4350 | mov eax, [esi] |
4392 | mov eax, [esi] |
4351 | add esi, 3 |
4393 | add esi, 3 |
- | 4394 | ret 4 |
|
4352 | ret 4 |
4395 | align 16 |
4353 | putimage_get8bpp: |
4396 | putimage_get8bpp: |
4354 | movzx eax, byte [esi] |
4397 | movzx eax, byte [esi] |
4355 | push edx |
4398 | push edx |
4356 | mov edx, [esp+8] |
4399 | mov edx, [esp+8] |
4357 | mov eax, [edx+eax*4] |
4400 | mov eax, [edx+eax*4] |
4358 | pop edx |
4401 | pop edx |
4359 | inc esi |
4402 | inc esi |
Line -... | Line 4403... | ||
- | 4403 | ret 4 |
|
- | 4404 | ||
- | 4405 | putimage_init1bpp: |
|
- | 4406 | add eax, ecx |
|
- | 4407 | push ecx |
|
- | 4408 | add eax, 7 |
|
- | 4409 | add ecx, 7 |
|
- | 4410 | shr eax, 3 |
|
- | 4411 | shr ecx, 3 |
|
- | 4412 | sub eax, ecx |
|
- | 4413 | pop ecx |
|
- | 4414 | ret |
|
- | 4415 | align 16 |
|
- | 4416 | putimage_get1bpp: |
|
- | 4417 | push edx |
|
- | 4418 | mov edx, [esp+8] |
|
- | 4419 | mov al, [edx] |
|
- | 4420 | add al, al |
|
- | 4421 | jnz @f |
|
- | 4422 | lodsb |
|
- | 4423 | adc al, al |
|
- | 4424 | @@: |
|
- | 4425 | mov [edx], al |
|
- | 4426 | sbb eax, eax |
|
- | 4427 | and eax, [edx+8] |
|
- | 4428 | add eax, [edx+4] |
|
- | 4429 | pop edx |
|
- | 4430 | ret 4 |
|
- | 4431 | ||
- | 4432 | putimage_init4bpp: |
|
- | 4433 | add eax, ecx |
|
- | 4434 | push ecx |
|
- | 4435 | add ecx, 1 |
|
- | 4436 | add eax, 1 |
|
- | 4437 | shr ecx, 1 |
|
- | 4438 | shr eax, 1 |
|
- | 4439 | sub eax, ecx |
|
- | 4440 | pop ecx |
|
- | 4441 | ret |
|
- | 4442 | align 16 |
|
- | 4443 | putimage_get4bpp: |
|
- | 4444 | push edx |
|
- | 4445 | mov edx, [esp+8] |
|
- | 4446 | add byte [edx], 80h |
|
- | 4447 | jc @f |
|
- | 4448 | movzx eax, byte [edx+1] |
|
- | 4449 | mov edx, [edx+4] |
|
- | 4450 | and eax, 0x0F |
|
- | 4451 | mov eax, [edx+eax*4] |
|
- | 4452 | pop edx |
|
- | 4453 | ret 4 |
|
- | 4454 | @@: |
|
- | 4455 | movzx eax, byte [esi] |
|
- | 4456 | add esi, 1 |
|
- | 4457 | mov [edx+1], al |
|
- | 4458 | shr eax, 4 |
|
- | 4459 | mov edx, [edx+4] |
|
- | 4460 | mov eax, [edx+eax*4] |
|
- | 4461 | pop edx |
|
4360 | ret 4 |
4462 | ret 4 |
4361 | 4463 | ||
4362 | putimage_init32bpp: |
4464 | putimage_init32bpp: |
- | 4465 | shl eax, 2 |
|
4363 | shl eax, 2 |
4466 | ret |
4364 | ret |
4467 | align 16 |
4365 | putimage_get32bpp: |
4468 | putimage_get32bpp: |
Line -... | Line 4469... | ||
- | 4469 | lodsd |
|
4366 | lodsd |
4470 | ret 4 |
4367 | ret 4 |
4471 | |
4368 | 4472 | putimage_init15bpp: |
|
- | 4473 | putimage_init16bpp: |
|
4369 | putimage_init16bpp: |
4474 | add eax, eax |
4370 | add eax, eax |
4475 | ret |
4371 | ret |
4476 | align 16 |
4372 | putimage_get16bpp: |
4477 | putimage_get15bpp: |
4373 | ; 0RRRRRGGGGGBBBBB -> 00000000RRRRR000GGGGG000BBBBB000 |
4478 | ; 0RRRRRGGGGGBBBBB -> 00000000RRRRR000GGGGG000BBBBB000 |
4374 | push ecx edx |
4479 | push ecx edx |
Line 4384... | Line 4489... | ||
4384 | shl edx, 9 |
4489 | shl edx, 9 |
4385 | or eax, ecx |
4490 | or eax, ecx |
4386 | or eax, edx |
4491 | or eax, edx |
4387 | pop edx ecx |
4492 | pop edx ecx |
4388 | ret |
4493 | ret 4 |
4389 | 4494 | ||
- | 4495 | align 16 |
|
- | 4496 | putimage_get16bpp: |
|
- | 4497 | ; RRRRRGGGGGGBBBBB -> 00000000RRRRR000GGGGGG00BBBBB000 |
|
- | 4498 | push ecx edx |
|
- | 4499 | movzx eax, word [esi] |
|
- | 4500 | add esi, 2 |
|
- | 4501 | mov ecx, eax |
|
- | 4502 | mov edx, eax |
|
- | 4503 | and eax, 0x1F |
|
- | 4504 | and ecx, 0x3F shl 5 |
|
- | 4505 | and edx, 0x1F shl 11 |
|
- | 4506 | shl eax, 3 |
|
- | 4507 | shl ecx, 5 |
|
- | 4508 | shl edx, 8 |
|
- | 4509 | or eax, ecx |
|
- | 4510 | or eax, edx |
|
- | 4511 | pop edx ecx |
|
- | 4512 | ret 4 |
|
- | 4513 | ||
Line 4390... | Line 4514... | ||
4390 | ; eax x beginning |
4514 | ; eax x beginning |
4391 | ; ebx y beginning |
4515 | ; ebx y beginning |
4392 | ; ecx x end |
4516 | ; ecx x end |
4393 | ; edx y end |
4517 | ; edx y end |