Subversion Repositories Kolibri OS

Rev

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

Rev 316 Rev 485
Line 1... Line 1...
1
include "lang.inc"
1
include "lang.inc"
2
include "macros.inc"
2
include "..\..\..\macros.inc"
Line 3... Line 3...
3
 
3
 
4
WND_SIZE_X		= 320
4
WND_SIZE_X		= 320
Line 5... Line 5...
5
WND_SIZE_Y		= 200
5
WND_SIZE_Y		= 200
Line 13... Line 13...
13
    call init_sinus_table
13
    call init_sinus_table
14
    call init_background
14
    call init_background
15
    call init_palette
15
    call init_palette
16
    mov eax,40
16
    mov eax,40
17
    mov ebx,101b
17
    mov ebx,101b
18
    int 0x40
18
    mcall
19
    jmp .paint_window
19
    jmp .paint_window
Line 20... Line 20...
20
 
20
 
21
.event_loop:
21
.event_loop:
22
    mov eax,23
22
    mov eax,23
23
    mov ebx,1
23
    mov ebx,1
Line 24... Line 24...
24
    int 0x40
24
    mcall
25
 
25
 
26
    test eax,eax
26
    test eax,eax
27
    je .draw_screen
27
    je .draw_screen
Line 28... Line 28...
28
    dec eax
28
    dec eax
29
    je .paint_window
29
    je .paint_window
Line 30... Line 30...
30
 
30
 
31
    or  eax,-1
31
    or  eax,-1
32
    int 0x40
32
    mcall
33
 
33
 
34
.draw_screen:
34
.draw_screen:
35
    add word [ver_counter],VC_DELTA
35
    add word [ver_counter],VC_DELTA
36
    add word [hor_counter],HC_DELTA
36
    add word [hor_counter],HC_DELTA
37
    call handle_animation
37
    call handle_animation
38
    mov eax,7
38
    mov eax,7
39
    mov ebx,virtual_screen_32
39
    mov ebx,virtual_screen_32
Line 40... Line 40...
40
    mov ecx,(WND_SIZE_X shl 16)+WND_SIZE_Y
40
    mov ecx,(WND_SIZE_X shl 16)+WND_SIZE_Y
41
    xor edx,edx
41
    xor edx,edx
42
    int 0x40
42
    mcall
43
    jmp .event_loop
43
    jmp .event_loop
Line 44... Line 44...
44
 
44
 
45
.paint_window:
45
.paint_window:
46
    mov eax,12
46
    mov eax,12
47
    mov ebx,1
47
    mov ebx,1
48
    int 0x40
48
    mcall
49
 
49
 
Line 50... Line 50...
50
    xor eax,eax
50
    xor eax,eax
51
    mov ebx,(100 shl 16)+(WND_SIZE_X+9)
51
    mov ebx,(100 shl 16)+(WND_SIZE_X+9)
52
    mov ecx,(100 shl 16)+(WND_SIZE_Y+28)
52
    mov ecx,(100 shl 16)+(WND_SIZE_Y+28)
53
    mov edx,0x33000000
53
    mov edx,0x33000000
54
    mov edi,header
54
    mov edi,title
Line 55... Line 55...
55
    int 0x40
55
    mcall
56
 
56
 
57
    mov eax,7
57
    mov eax,7
Line 58... Line 58...
58
    mov ebx,virtual_screen_32
58
    mov ebx,virtual_screen_32
Line 59... Line 59...
59
    mov ecx,(WND_SIZE_X shl 16)+WND_SIZE_Y
59
    mov ecx,(WND_SIZE_X shl 16)+WND_SIZE_Y
60
    xor edx,edx
60
    xor edx,edx
Line 158... Line 158...
158
 
158
 
159
DATA
159
DATA
160
  delta_angle dd 0.0245436926066		; pi/128
160
  delta_angle dd 0.0245436926066		; pi/128
Line 161... Line 161...
161
  scale_sin dd 128.0
161
  scale_sin dd 128.0
Line 162... Line 162...
162
 
162
 
163
  header      db 'MoveBack',0
163
  title      db 'MoveBack',0
164
 
164