diff --git a/programs/demos/movback/trunk/movback.asm b/programs/demos/movback/trunk/movback.asm index e57490145e..6be90ca34b 100644 --- a/programs/demos/movback/trunk/movback.asm +++ b/programs/demos/movback/trunk/movback.asm @@ -37,11 +37,8 @@ CODE add word [ver_counter],VC_DELTA add word [hor_counter],HC_DELTA call handle_animation - mov eax,7 - mov ebx,virtual_screen_32 - mov ecx,(WND_SIZE_X shl 16)+WND_SIZE_Y - xor edx,edx - mcall + xor ebp,ebp + mcall 65,virtual_screen_8,,<0,0>,8,_palette jmp .event_loop .paint_window: @@ -50,21 +47,16 @@ CODE mov ebx,1 mcall - xor eax,eax - mov ebx,(100 shl 16)+(WND_SIZE_X+9) - mov ecx,(100 shl 16)+(WND_SIZE_Y+26) - mov edx,0x74000000 + mcall 48,4 ; get skin height + lea ecx,[eax + (100 shl 16) + WND_SIZE_Y+4] mov edi,title - mcall + mcall 0,<100,WND_SIZE_X+9>,,0x74000000 test [proc_info.wnd_state], 0x04 jnz @f - mov eax,7 - mov ebx,virtual_screen_32 - mov ecx,(WND_SIZE_X shl 16)+WND_SIZE_Y - xor edx,edx - mcall + xor ebp,ebp + mcall 65,virtual_screen_8,,<0,0>,8,_palette @@: mov eax,12 mov ebx,2 @@ -82,7 +74,7 @@ init_palette: stosb stosb stosb - inc edi + stosb inc ah loop .next_pal ret @@ -136,7 +128,7 @@ handle_animation: add ebx,ebx mov ax,[sinetable+ebx] mov [esp+s_OFFX],ax - mov edi,virtual_screen_32 + mov edi,virtual_screen_8 mov edx,WND_SIZE_Y-1 .a_ver: mov ecx,WND_SIZE_X-1 @@ -148,12 +140,7 @@ handle_animation: mov ax,[esp+s_OFFX] add ax,cx and eax,255 - lea esi,[background+ebx+eax] - mov al,[esi] - and eax,0xff - mov eax,[_palette+eax*4] - stosw - shr eax,16 + mov al,[background+ebx+eax] stosb dec ecx jge .a_hor @@ -174,8 +161,8 @@ UDATA _palette: rd 256 - virtual_screen_32: - rb WND_SIZE_X*WND_SIZE_Y*3 + virtual_screen_8: + rb WND_SIZE_X*WND_SIZE_Y background: rb 256*256 diff --git a/programs/demos/plasma/trunk/graph8.inc b/programs/demos/plasma/trunk/graph8.inc deleted file mode 100644 index d8350e56c7..0000000000 --- a/programs/demos/plasma/trunk/graph8.inc +++ /dev/null @@ -1,16 +0,0 @@ -blit_8_to_32: - mov esi,virtual_screen_8 ; ESI=src - mov edi,virtual_screen_32 ; EDI=dst - mov ecx,WND_SIZE_X*WND_SIZE_Y ; ECX=size -.blit_next: - xor eax,eax ; EAX=byte to blit - mov al,[esi] - shl eax,2 - mov eax,[_palette+eax] - mov [edi],ax - shr eax,16 - mov [edi+2],al - inc esi - add edi,3 - loop .blit_next - ret diff --git a/programs/demos/plasma/trunk/plasma.asm b/programs/demos/plasma/trunk/plasma.asm index f547599c11..e10721426f 100644 --- a/programs/demos/plasma/trunk/plasma.asm +++ b/programs/demos/plasma/trunk/plasma.asm @@ -8,16 +8,12 @@ WND_SIZE_Y = 200 MEOS_APP_START CODE fninit - mov al,40 - mov bl,101b - mcall + mcall 40,101b call init_palette call init_texture jmp .paint_window .event_loop: - mov al,23 - mov ebx,1 - mcall + mcall 23,1 test eax,eax je .draw_screen dec eax @@ -27,38 +23,23 @@ CODE mcall .draw_screen: - call blit_8_to_32 - mov al,7 - mov ebx,virtual_screen_32 - mov ecx,(WND_SIZE_X shl 16)+WND_SIZE_Y - xor edx,edx - mcall + xor ebp,ebp + mcall 65,virtual_screen_8,,0,8,_palette call rotate_pal jmp .event_loop .paint_window: - mov al,12 - push eax - xor ebx,ebx - inc ebx - mcall + mcall 12,1 - xor eax,eax - mov ebx,(110 shl 16)+(WND_SIZE_X+9) - mov ecx,(110 shl 16)+(WND_SIZE_Y+26) - mov edx,0x74000000 + mcall 48,4 ; get skin height + lea ecx,[eax + (110 shl 16) + WND_SIZE_Y + 4] mov edi,title - mcall + mcall 0,<110,WND_SIZE_X+9>,,0x74000000 - mov al,7 - mov ebx,virtual_screen_32 - mov ecx,(WND_SIZE_X shl 16)+WND_SIZE_Y - xor edx,edx - mcall + xor ebp,ebp + mcall 65,virtual_screen_8,,0,8,_palette - pop eax - and ebx,2 ; bit 1 is set - mcall + mcall 12,2 jmp .event_loop @@ -73,7 +54,7 @@ init_palette: xor al,al stosb stosb - inc edi + stosb loop .color1 mov ecx,64 push ecx @@ -85,8 +66,8 @@ init_palette: stosb xor al,al stosb + stosb inc ah - inc edi loop .color2 pop ecx push ecx @@ -97,8 +78,9 @@ init_palette: stosb mov al,ah stosb + mov al,0 + stosb inc ah - inc edi loop .color3 pop ecx mov eax,0x003f3f3f @@ -156,8 +138,6 @@ rotate_pal: mov [_palette+1020],ebx ret -include "graph8.inc" - DATA _multiplier dd 63.5 @@ -172,7 +152,4 @@ UDATA virtual_screen_8: rb WND_SIZE_X*WND_SIZE_Y - virtual_screen_32: - rb WND_SIZE_X*WND_SIZE_Y*3 - MEOS_APP_END