Subversion Repositories Kolibri OS

Rev

Rev 2094 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2094 Rev 2597
Line 35... Line 35...
35
    test [proc_info.wnd_state], 0x04
35
    test [proc_info.wnd_state], 0x04
36
    jnz .event_loop
36
    jnz .event_loop
37
    add word [ver_counter],VC_DELTA
37
    add word [ver_counter],VC_DELTA
38
    add word [hor_counter],HC_DELTA
38
    add word [hor_counter],HC_DELTA
39
    call handle_animation
39
    call handle_animation
40
    mov eax,7
40
    xor ebp,ebp
41
    mov ebx,virtual_screen_32
-
 
42
    mov ecx,(WND_SIZE_X shl 16)+WND_SIZE_Y
41
    mcall 65,virtual_screen_8,,<0,0>,8,_palette
43
    xor edx,edx
-
 
44
    mcall
-
 
45
    jmp .event_loop
42
    jmp .event_loop
Line 46... Line 43...
46
 
43
 
47
.paint_window:
44
.paint_window:
48
	mcall	9,proc_info,-1
45
	mcall	9,proc_info,-1
49
    mov eax,12
46
    mov eax,12
50
    mov ebx,1
47
    mov ebx,1
Line 51... Line -...
51
    mcall
-
 
52
 
48
    mcall
53
    xor eax,eax
49
 
54
    mov ebx,(100 shl 16)+(WND_SIZE_X+9)
-
 
55
    mov ecx,(100 shl 16)+(WND_SIZE_Y+26)
50
    mcall 48,4 ; get skin height
56
    mov edx,0x74000000
51
    lea ecx,[eax + (100 shl 16) + WND_SIZE_Y+4]
Line 57... Line 52...
57
    mov edi,title
52
    mov edi,title
58
    mcall
53
    mcall 0,<100,WND_SIZE_X+9>,,0x74000000
Line 59... Line 54...
59
 
54
 
60
    test [proc_info.wnd_state], 0x04
-
 
61
    jnz @f
55
    test [proc_info.wnd_state], 0x04
62
 
-
 
63
    mov eax,7
-
 
64
    mov ebx,virtual_screen_32
56
    jnz @f
65
    mov ecx,(WND_SIZE_X shl 16)+WND_SIZE_Y
57
 
66
    xor edx,edx
58
    xor ebp,ebp
67
    mcall
59
    mcall 65,virtual_screen_8,,<0,0>,8,_palette
Line 80... Line 72...
80
    mov al,ah
72
    mov al,ah
81
    shr al,2
73
    shr al,2
82
    stosb
74
    stosb
83
    stosb
75
    stosb
84
    stosb
76
    stosb
85
    inc edi
77
    stosb
86
    inc ah
78
    inc ah
87
    loop .next_pal
79
    loop .next_pal
88
    ret
80
    ret
Line 89... Line 81...
89
 
81
 
Line 134... Line 126...
134
    mov ebx,[hor_counter]
126
    mov ebx,[hor_counter]
135
    and ebx,255
127
    and ebx,255
136
    add ebx,ebx
128
    add ebx,ebx
137
    mov ax,[sinetable+ebx]
129
    mov ax,[sinetable+ebx]
138
    mov [esp+s_OFFX],ax
130
    mov [esp+s_OFFX],ax
139
    mov edi,virtual_screen_32
131
    mov edi,virtual_screen_8
140
    mov edx,WND_SIZE_Y-1
132
    mov edx,WND_SIZE_Y-1
141
.a_ver:
133
.a_ver:
142
    mov ecx,WND_SIZE_X-1
134
    mov ecx,WND_SIZE_X-1
143
    mov bx,[esp+s_OFFY]
135
    mov bx,[esp+s_OFFY]
144
    add bx,dx
136
    add bx,dx
Line 146... Line 138...
146
    shl ebx,8
138
    shl ebx,8
147
.a_hor:
139
.a_hor:
148
    mov ax,[esp+s_OFFX]
140
    mov ax,[esp+s_OFFX]
149
    add ax,cx
141
    add ax,cx
150
    and eax,255
142
    and eax,255
151
    lea esi,[background+ebx+eax]
143
    mov al,[background+ebx+eax]
152
    mov al,[esi]
-
 
153
    and eax,0xff
-
 
154
    mov eax,[_palette+eax*4]
-
 
155
    stosw
-
 
156
    shr eax,16
-
 
157
    stosb
144
    stosb
158
    dec ecx
145
    dec ecx
159
    jge .a_hor
146
    jge .a_hor
160
    dec edx
147
    dec edx
161
    jge .a_ver
148
    jge .a_ver
Line 172... Line 159...
172
  ver_counter dd ?
159
  ver_counter dd ?
173
  hor_counter dd ?
160
  hor_counter dd ?
Line 174... Line 161...
174
 
161
 
Line 175... Line 162...
175
  _palette:	rd 256
162
  _palette:	rd 256
176
 
163
 
Line 177... Line 164...
177
  virtual_screen_32:
164
  virtual_screen_8:
178
  	rb WND_SIZE_X*WND_SIZE_Y*3
165
  	rb WND_SIZE_X*WND_SIZE_Y
Line 179... Line 166...
179
 
166