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
; Originally written by Jarek Pelczar
1
; Originally written by Jarek Pelczar
2
include "lang.inc"
2
include "lang.inc"
3
include "macros.inc"
3
include "..\..\..\macros.inc"
Line 4... Line 4...
4
 
4
 
5
WND_SIZE_X		= 320
5
WND_SIZE_X		= 320
Line 6... Line 6...
6
WND_SIZE_Y		= 200
6
WND_SIZE_Y		= 200
7
 
7
 
8
MEOS_APP_START
8
MEOS_APP_START
9
CODE
9
CODE
10
    fninit
10
    fninit
11
    mov al,40
11
    mov al,40
12
    mov bl,101b
12
    mov bl,101b
13
    int 0x40
13
    mcall
14
    call init_palette
14
    call init_palette
15
    call init_texture
15
    call init_texture
16
    jmp .paint_window
16
    jmp .paint_window
17
.event_loop:
17
.event_loop:
18
    mov al,23
18
    mov al,23
19
    mov ebx,1
19
    mov ebx,1
20
    int 0x40
20
    mcall
21
    test eax,eax
21
    test eax,eax
22
    je .draw_screen
22
    je .draw_screen
Line 23... Line 23...
23
    dec eax
23
    dec eax
24
    je .paint_window
24
    je .paint_window
Line 25... Line 25...
25
 
25
 
26
    or  eax,-1
26
    or  eax,-1
27
    int 0x40
27
    mcall
28
 
28
 
29
.draw_screen:
29
.draw_screen:
30
    call blit_8_to_32
30
    call blit_8_to_32
31
    mov al,7
31
    mov al,7
32
    mov ebx,virtual_screen_32
32
    mov ebx,virtual_screen_32
33
    mov ecx,(WND_SIZE_X shl 16)+WND_SIZE_Y
33
    mov ecx,(WND_SIZE_X shl 16)+WND_SIZE_Y
Line 34... Line 34...
34
    xor edx,edx
34
    xor edx,edx
35
    int 0x40
35
    mcall
36
    call rotate_pal
36
    call rotate_pal
37
    jmp .event_loop
37
    jmp .event_loop
38
 
38
 
39
.paint_window:
39
.paint_window:
Line 40... Line 40...
40
    mov al,12
40
    mov al,12
41
    push eax
41
    push eax
42
    xor ebx,ebx
42
    xor ebx,ebx
43
    inc ebx
43
    inc ebx
44
    int 0x40
44
    mcall
45
 
45
 
Line 46... Line 46...
46
    xor eax,eax
46
    xor eax,eax
47
    mov ebx,(100 shl 16)+(WND_SIZE_X+8)
47
    mov ebx,(100 shl 16)+(WND_SIZE_X+8)
48
    mov ecx,(100 shl 16)+(WND_SIZE_Y+25)
48
    mov ecx,(100 shl 16)+(WND_SIZE_Y+25)
49
    mov edx,0x33000000
49
    mov edx,0x33000000
50
    mov edi,header
50
    mov edi,title
Line 51... Line 51...
51
    int 0x40
51
    mcall
52
 
52
 
53
    mov al,7
53
    mov al,7
Line 54... Line 54...
54
    mov ebx,virtual_screen_32
54
    mov ebx,virtual_screen_32
Line 55... Line 55...
55
    mov ecx,(WND_SIZE_X shl 16)+WND_SIZE_Y
55
    mov ecx,(WND_SIZE_X shl 16)+WND_SIZE_Y
56
    xor edx,edx
56
    xor edx,edx
Line 159... Line 159...
159
include "graph8.inc"
159
include "graph8.inc"
Line 160... Line 160...
160
 
160
 
161
DATA
161
DATA
Line 162... Line 162...
162
  _multiplier	dd 63.5
162
  _multiplier	dd 63.5
Line 163... Line 163...
163
 
163
 
164
  header          db 'Plasma',0
164
  title          db 'Plasma',0
165
 
165
 
166
UDATA
166
UDATA