Subversion Repositories Kolibri OS

Rev

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

Rev 109 Rev 485
Line 18... Line 18...
18
               dd     0x200000                ; memory for app
18
               dd     0x200000                ; memory for app
19
               dd     0x200000                ; esp
19
               dd     0x200000                ; esp
20
               dd     0x0 , 0x0               ; I_Param , I_Icon
20
               dd     0x0 , 0x0               ; I_Param , I_Icon
Line 21... Line 21...
21
 
21
 
-
 
22
include 'lang.inc'
22
include 'lang.inc'
23
include '..\..\..\macros.inc'
23
MAX_DEGS equ 512 ;quantity of angels 2^n.Minimize for speedup
24
MAX_DEGS equ 512 ;quantity of angels 2^n.Minimize for speedup
24
MAX_POINTS equ 8 ;quantity of points
25
MAX_POINTS equ 8 ;quantity of points
Line 25... Line 26...
25
MAX_FACES equ 6  ;quantity of points
26
MAX_FACES equ 6  ;quantity of points
Line 31... Line 32...
31
    call init_sincos
32
    call init_sincos
Line 32... Line 33...
32
 
33
 
33
still:
34
still:
34
    mov eax,23  ; wait for system event with 2 ms timeout
35
    mov eax,23  ; wait for system event with 2 ms timeout
35
    mov ebx,2   ; wait 2 ms, then continue
36
    mov ebx,2   ; wait 2 ms, then continue
Line 36... Line 37...
36
    int  0x40
37
    mcall
37
 
38
 
Line 38... Line 39...
38
;    mov eax,11 ;If you want maximum speed! :)
39
;    mov eax,11 ;If you want maximum speed! :)
39
;    int 0x40
40
;    mcall
40
 
41
 
41
    dec  eax                  ; window redraw request ?
42
    dec  eax                  ; window redraw request ?
Line 84... Line 85...
84
key:
85
key:
85
     mov eax,2
86
     mov eax,2
86
     jmp exit
87
     jmp exit
87
button:
88
button:
88
     mov eax,17
89
     mov eax,17
89
     int 0x40
90
     mcall
90
     cmp ah,1
91
     cmp ah,1
91
     jne still
92
     jne still
92
exit:
93
exit:
93
     mov eax,-1
94
     mov eax,-1
94
     int 0x40
95
     mcall
Line 95... Line 96...
95
 
96
 
96
;Draw window
97
;Draw window
97
draw_window:
98
draw_window:
98
    mov eax,12  ;Start
99
    mov eax,12  ;Start
99
    mov ebx,1
100
    mov ebx,1
Line 100... Line 101...
100
    int 0x40
101
    mcall
101
 
102
 
102
    mov eax,0   ;Draw window
103
    mov eax,0   ;Draw window
103
    mov ebx,0*65536+(799) ;x start*65536+x size
104
    mov ebx,0*65536+(799) ;x start*65536+x size
104
    mov ecx,0*65536+(599) ;y start*65536+y size
105
    mov ecx,0*65536+(599) ;y start*65536+y size
Line 105... Line 106...
105
    mov edx,0x00000000         ;0x03 use skinned window
106
    mov edx,0x00000000         ;0x03 use skinned window
Line 106... Line 107...
106
    int 0x40
107
    mcall
107
 
108
 
108
    call clear_screen
109
    call clear_screen
109
 
110
 
Line 110... Line 111...
110
    mov eax,12  ;End
111
    mov eax,12  ;End
111
    mov ebx,2
112
    mov ebx,2
112
    int 0x40
113
    mcall
Line 161... Line 162...
161
clear_screen:
162
clear_screen:
162
 mov eax,13
163
 mov eax,13
163
 mov ebx,0*65536+800
164
 mov ebx,0*65536+800
164
 mov ecx,0*65536+600
165
 mov ecx,0*65536+600
165
 mov edx,0
166
 mov edx,0
166
 int 40h
167
 mcall
Line 167... Line 168...
167
 
168
 
168
 mov eax,4   ;Out Text
169
 mov eax,4   ;Out Text
169
 mov ebx,8*65536+8          ;x start*65536+y start
170
 mov ebx,8*65536+8          ;x start*65536+y start
170
 mov ecx,0x00ffffff         ;color White
171
 mov ecx,0x00ffffff         ;color White
171
 mov edx,head_label
172
 mov edx,head_label
172
 mov esi,hl_end-head_label
173
 mov esi,hl_end-head_label
173
 int 0x40
174
 mcall
Line 174... Line 175...
174
 ret
175
 ret
175
 
176
 
176
clear_screen_buffer:
177
clear_screen_buffer:
177
 mov ebx,scrbuf
178
 mov ebx,scrbuf
178
 mov ecx,800*65536+(600-40)  ;sub 40 for antiflickering title
179
 mov ecx,800*65536+(600-40)  ;sub 40 for antiflickering title
179
 mov edx,0*65536+40
180
 mov edx,0*65536+40
Line 180... Line 181...
180
 mov eax,7
181
 mov eax,7
181
 int 0x40
182
 mcall
182
 
183
 
183
 mov eax,4   ;Out Text
184
 mov eax,4   ;Out Text
184
 mov ebx,8*65536+580          ;x start*65536+y start
185
 mov ebx,8*65536+580          ;x start*65536+y start
185
 mov ebp,[n_step]
186
 mov ebp,[n_step]
186
 shl ebp,16
187
 shl ebp,16
187
 sub ebx,ebp
188
 sub ebx,ebp
188
 mov ecx,0x0000ff00         ;color White
189
 mov ecx,0x0000ff00         ;color White
189
 mov edx,move_text
190
 mov edx,move_text
Line 190... Line 191...
190
 add edx,[step]
191
 add edx,[step]
191
 mov esi,130 ;mt_end-move_text
192
 mov esi,130 ;mt_end-move_text
192
 int 0x40
193
 mcall
193
 
194