Subversion Repositories Kolibri OS

Rev

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

Rev 2028 Rev 2597
Line 6... Line 6...
6
WND_SIZE_Y		= 200
6
WND_SIZE_Y		= 200
Line 7... Line 7...
7
 
7
 
8
MEOS_APP_START
8
MEOS_APP_START
9
CODE
9
CODE
10
    fninit
-
 
11
    mov al,40
10
    fninit
12
    mov bl,101b
-
 
13
    mcall
11
    mcall 40,101b
14
    call init_palette
12
    call init_palette
15
    call init_texture
13
    call init_texture
16
    jmp .paint_window
14
    jmp .paint_window
17
.event_loop:
-
 
18
    mov al,23
-
 
19
    mov ebx,1
15
.event_loop:
20
    mcall
16
    mcall 23,1
21
    test eax,eax
17
    test eax,eax
22
    je .draw_screen
18
    je .draw_screen
23
    dec eax
19
    dec eax
Line 24... Line 20...
24
    je .paint_window
20
    je .paint_window
25
 
21
 
Line 26... Line 22...
26
    or  eax,-1
22
    or  eax,-1
27
    mcall
-
 
28
 
23
    mcall
29
.draw_screen:
-
 
30
    call blit_8_to_32
24
 
31
    mov al,7
-
 
32
    mov ebx,virtual_screen_32
-
 
33
    mov ecx,(WND_SIZE_X shl 16)+WND_SIZE_Y
25
.draw_screen:
34
    xor edx,edx
26
    xor ebp,ebp
Line 35... Line 27...
35
    mcall
27
    mcall 65,virtual_screen_8,,0,8,_palette
36
    call rotate_pal
-
 
37
    jmp .event_loop
-
 
38
 
-
 
39
.paint_window:
-
 
40
    mov al,12
28
    call rotate_pal
Line 41... Line -...
41
    push eax
-
 
42
    xor ebx,ebx
29
    jmp .event_loop
43
    inc ebx
30
 
44
    mcall
-
 
45
 
31
.paint_window:
46
    xor eax,eax
32
    mcall 12,1
Line 47... Line 33...
47
    mov ebx,(110 shl 16)+(WND_SIZE_X+9)
33
 
48
    mov ecx,(110 shl 16)+(WND_SIZE_Y+26)
-
 
49
    mov edx,0x74000000
34
    mcall 48,4 ; get skin height
50
    mov edi,title
-
 
51
    mcall
-
 
Line 52... Line -...
52
 
-
 
53
    mov al,7
-
 
54
    mov ebx,virtual_screen_32
35
    lea ecx,[eax + (110 shl 16) + WND_SIZE_Y + 4]
Line 55... Line 36...
55
    mov ecx,(WND_SIZE_X shl 16)+WND_SIZE_Y
36
    mov edi,title
Line 56... Line 37...
56
    xor edx,edx
37
    mcall 0,<110,WND_SIZE_X+9>,,0x74000000
57
    mcall
38
 
Line 71... Line 52...
71
    mov al,ah
52
    mov al,ah
72
    stosb
53
    stosb
73
    xor al,al
54
    xor al,al
74
    stosb
55
    stosb
75
    stosb
56
    stosb
76
    inc edi
57
    stosb
77
    loop .color1
58
    loop .color1
78
    mov ecx,64
59
    mov ecx,64
79
    push ecx
60
    push ecx
80
    xor eax,eax
61
    xor eax,eax
81
.color2:
62
.color2:
Line 83... Line 64...
83
    stosb
64
    stosb
84
    mov al,ah
65
    mov al,ah
85
    stosb
66
    stosb
86
    xor al,al
67
    xor al,al
87
    stosb
68
    stosb
-
 
69
    stosb
88
    inc ah
70
    inc ah
89
    inc edi
-
 
90
    loop .color2
71
    loop .color2
91
    pop ecx
72
    pop ecx
92
    push ecx
73
    push ecx
93
    xor eax,eax
74
    xor eax,eax
94
.color3:
75
.color3:
95
    mov al,63
76
    mov al,63
96
    stosb
77
    stosb
97
    stosb
78
    stosb
98
    mov al,ah
79
    mov al,ah
99
    stosb
80
    stosb
-
 
81
    mov al,0
-
 
82
    stosb
100
    inc ah
83
    inc ah
101
    inc edi
-
 
102
    loop .color3
84
    loop .color3
103
    pop ecx
85
    pop ecx
104
    mov eax,0x003f3f3f
86
    mov eax,0x003f3f3f
105
    rep stosd
87
    rep stosd
106
    ret
88
    ret
Line 154... Line 136...
154
;    cld
136
;    cld
155
    rep movsd
137
    rep movsd
156
    mov [_palette+1020],ebx
138
    mov [_palette+1020],ebx
157
    ret
139
    ret
Line 158... Line -...
158
 
-
 
159
include "graph8.inc"
-
 
160
 
140
 
161
DATA
141
DATA
Line 162... Line 142...
162
  _multiplier	dd 63.5
142
  _multiplier	dd 63.5
Line 170... Line 150...
170
  _palette:	rd 256
150
  _palette:	rd 256
Line 171... Line 151...
171
 
151
 
172
  virtual_screen_8:
152
  virtual_screen_8:
Line 173... Line -...
173
   	rb WND_SIZE_X*WND_SIZE_Y
-
 
174
 
-
 
175
  virtual_screen_32:
-
 
176
   	rb WND_SIZE_X*WND_SIZE_Y*3
153
   	rb WND_SIZE_X*WND_SIZE_Y