Rev 2597 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2597 | Rev 9647 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | include "lang.inc" |
1 | include "lang.inc" |
2 | include "../../../macros.inc" |
2 | include "../../../macros.inc" |
- | 3 | include "../../../KOSfuncs.inc" |
|
Line 3... | Line 4... | ||
3 | 4 | ||
4 | WND_SIZE_X = 320 |
5 | WND_SIZE_X = 320 |
Line 5... | Line 6... | ||
5 | WND_SIZE_Y = 200 |
6 | WND_SIZE_Y = 200 |
Line 11... | Line 12... | ||
11 | CODE |
12 | CODE |
12 | fninit |
13 | fninit |
13 | call init_sinus_table |
14 | call init_sinus_table |
14 | call init_background |
15 | call init_background |
15 | call init_palette |
16 | call init_palette |
16 | mov eax,40 |
- | |
17 | mov ebx,101b |
17 | mcall SF_SET_EVENTS_MASK, 101b |
18 | mcall |
- | |
19 | jmp .paint_window |
18 | jmp .paint_window |
Line 20... | Line 19... | ||
20 | 19 | ||
21 | .event_loop: |
- | |
22 | mov eax,23 |
20 | .event_loop: |
23 | mov ebx,1 |
- | |
Line 24... | Line 21... | ||
24 | mcall |
21 | mcall SF_WAIT_EVENT_TIMEOUT, 1 |
25 | 22 | ||
26 | test eax,eax |
23 | test eax,eax |
27 | je .draw_screen |
24 | je .draw_screen |
Line 28... | Line -... | ||
28 | dec eax |
- | |
29 | je .paint_window |
25 | dec eax |
Line 30... | Line 26... | ||
30 | 26 | je .paint_window |
|
31 | or eax,-1 |
27 | |
32 | mcall |
28 | mcall SF_TERMINATE_PROCESS |
33 | 29 | ||
34 | .draw_screen: |
30 | .draw_screen: |
35 | test [proc_info.wnd_state], 0x04 |
31 | test [proc_info.wnd_state], 0x04 |
36 | jnz .event_loop |
32 | jnz .event_loop |
37 | add word [ver_counter],VC_DELTA |
33 | add word [ver_counter],VC_DELTA |
38 | add word [hor_counter],HC_DELTA |
34 | add word [hor_counter],HC_DELTA |
Line 39... | Line 35... | ||
39 | call handle_animation |
35 | call handle_animation |
40 | xor ebp,ebp |
36 | xor ebp,ebp |
41 | mcall 65,virtual_screen_8, |
37 | mcall SF_PUT_IMAGE_EXT, virtual_screen_8, |
42 | jmp .event_loop |
- | |
43 | - | ||
Line 44... | Line 38... | ||
44 | .paint_window: |
38 | jmp .event_loop |
45 | mcall 9,proc_info,-1 |
39 | |
46 | mov eax,12 |
40 | .paint_window: |
47 | mov ebx,1 |
41 | mcall SF_THREAD_INFO, proc_info,-1 |
Line 48... | Line 42... | ||
48 | mcall |
42 | mcall SF_REDRAW, SSF_BEGIN_DRAW |
49 | 43 | ||
Line 50... | Line 44... | ||
50 | mcall 48,4 ; get skin height |
44 | mcall SF_STYLE_SETTINGS, SSF_GET_SKIN_HEIGHT |
51 | lea ecx,[eax + (100 shl 16) + WND_SIZE_Y+4] |
45 | lea ecx,[eax + (100 shl 16) + WND_SIZE_Y+4] |
52 | mov edi,title |
46 | mov edi,title |
53 | mcall 0,<100,WND_SIZE_X+9>,,0x74000000 |
47 | mcall SF_CREATE_WINDOW, <100,WND_SIZE_X+9>,,0x74000000 |
54 | - | ||
55 | test [proc_info.wnd_state], 0x04 |
- | |
Line 56... | Line 48... | ||
56 | jnz @f |
48 | |
Line 57... | Line 49... | ||
57 | 49 | test [proc_info.wnd_state], 0x04 |
|
58 | xor ebp,ebp |
50 | jnz @f |