Subversion Repositories Kolibri OS

Rev

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

Rev 122 Rev 485
Line 31... Line 31...
31
copyright db   'Crown_s Soft(c) Screensaver v1.13m    www.crown-s-soft.com',0
31
copyright db   'Crown_s Soft(c) Screensaver v1.13m    www.crown-s-soft.com',0
32
copyrightlen:
32
copyrightlen:
Line 33... Line 33...
33
 
33
 
34
include "lang.inc"
34
include "lang.inc"
35
include "figuresi.inc"
35
include "figuresi.inc"
36
include "macros.inc"
36
include "..\..\..\macros.inc"
37
start:
37
start:
38
    cld
38
    cld
39
    finit
39
    finit
Line 44... Line 44...
44
 
44
 
45
 
45
 
46
    cmp [flscr],0
46
    cmp [flscr],0
47
    jz	nofullscreen
47
    jz	nofullscreen
Line 48... Line 48...
48
      mov  eax,14
48
      mov  eax,14
49
      int  0x40
49
      mcall
50
 
50
 
51
      mov  [maxy],ax
51
      mov  [maxy],ax
Line 78... Line 78...
78
    call draw_window
78
    call draw_window
Line 79... Line 79...
79
 
79
 
80
still:
80
still:
81
    mov  eax,23
81
    mov  eax,23
82
    mov  ebx,delay
82
    mov  ebx,delay
Line 83... Line 83...
83
    int  0x40			; wait here for event
83
    mcall			; wait here for event
84
 
84
 
85
    cmp  eax,1			; redraw request ?
85
    cmp  eax,1			; redraw request ?
86
    je	 red
86
    je	 red
Line 93... Line 93...
93
    call calcframe
93
    call calcframe
94
    mov  edx,dword [posy]     ; edx=image position in window [x]*65536+[y]
94
    mov  edx,dword [posy]     ; edx=image position in window [x]*65536+[y]
95
    mov  ecx,[outsize]	      ; ecx=image position in window [x]*65536+[y]
95
    mov  ecx,[outsize]	      ; ecx=image position in window [x]*65536+[y]
96
    mov  ebx,scr	      ; ebx pointer to image in memory
96
    mov  ebx,scr	      ; ebx pointer to image in memory
97
    mov  eax,07 	      ; putimage
97
    mov  eax,07 	      ; putimage
98
    int  0x40
98
    mcall
99
jmp  still
99
jmp  still
Line 100... Line 100...
100
 
100
 
101
key:
101
key:
102
    mov  eax,2
102
    mov  eax,2
Line 103... Line 103...
103
    int  0x40
103
    mcall
104
 
104
 
105
    cmp  al,1			; is key in buffer ?
105
    cmp  al,1			; is key in buffer ?
106
    jz	 still
106
    jz	 still
107
    cmp  ah,0x1B		; is key ESC ?
107
    cmp  ah,0x1B		; is key ESC ?
Line 108... Line 108...
108
    jz	 close
108
    jz	 close
109
jmp  still
109
jmp  still
110
 
110
 
Line 111... Line 111...
111
button: 			; button
111
button: 			; button
112
    mov  eax,17 		; get id
112
    mov  eax,17 		; get id
Line 113... Line 113...
113
    int  0x40
113
    mcall
114
 
114
 
115
;    cmp  ah,1                   ; button id=1 ?
115
;    cmp  ah,1                   ; button id=1 ?
Line 116... Line 116...
116
;    jne  still
116
;    jne  still
117
 
117
 
118
close:
118
close:
Line 119... Line 119...
119
    mov  eax,-1 		; close this program
119
    mov  eax,-1 		; close this program
120
    int  0x40
120
    mcall
121
 
121
 
122
 
122
 
Line 123... Line 123...
123
;   *********************************************
123
;   *********************************************
124
;   *******  WINDOW DEFINITIONS AND DRAW ********
124
;   *******  WINDOW DEFINITIONS AND DRAW ********
125
;   *********************************************
125
;   *********************************************
126
 
126
 
127
 
127
 
128
draw_window:
128
draw_window:
129
    mov  eax,12 		     ; function 12:tell os about windowdraw
129
    mov  eax,12 		     ; function 12:tell os about windowdraw
130
    mov  ebx,1			     ; 1, start of draw
130
    mov  ebx,1			     ; 1, start of draw
131
    int  0x40
131
    mcall
Line 132... Line 132...
132
 
132
 
133
    cmp  [flscr],0
133
    cmp  [flscr],0
134
    jnz  m2
134
    jnz  m2
135
      mov  ebx,1*65536+638	     ; [x start] *65536 + [x size]
135
      mov  ebx,1*65536+638	     ; [x start] *65536 + [x size]
136
      mov  ecx,1*65536+478	     ; [y start] *65536 + [y size]
136
      mov  ecx,1*65536+478	     ; [y start] *65536 + [y size]
137
      mov  edx,0x02000000	     ; color of work area RRGGBB,8->color gl
137
      mov  edx,0x02000000	     ; color of work area RRGGBB,8->color gl
138
      mov  esi,0x805080d0	     ; color of grab bar  RRGGBB,8->color gl
138
      mov  esi,0x805080d0	     ; color of grab bar  RRGGBB,8->color gl
Line 139... Line 139...
139
      mov  edi,0x005080d0	     ; color of frames    RRGGBB
139
      mov  edi,0x005080d0	     ; color of frames    RRGGBB
140
      xor  eax,eax		     ; function 0 : define and draw window
140
      xor  eax,eax		     ; function 0 : define and draw window
141
      int  0x40
141
      mcall
142
 
142
 
143
				     ; WINDOW LABEL
143
				     ; WINDOW LABEL
144
      mov  ebx,8*65536+8	     ; [x start] *65536 + [y start]
144
      mov  ebx,8*65536+8	     ; [x start] *65536 + [y start]
145
      mov  ecx,0x10ddeeff	     ; color of text RRGGBB
145
      mov  ecx,0x10ddeeff	     ; color of text RRGGBB
146
      mov  edx,copyright	     ; pointer to text beginning
146
      mov  edx,copyright	     ; pointer to text beginning
147
      mov  esi,copyrightlen-copyright; text length
147
      mov  esi,copyrightlen-copyright; text length
148
      mov  eax,4		     ; function 4 : write text to window
148
      mov  eax,4		     ; function 4 : write text to window
149
      int  0x40
149
      mcall
Line 150... Line 150...
150
 
150
 
151
				     ; CLOSE BUTTON
151
				     ; CLOSE BUTTON
152
      mov  ebx,(640-19)*65536+12     ; [x start] *65536 + [x size]
152
      mov  ebx,(640-19)*65536+12     ; [x start] *65536 + [x size]
153
      mov  ecx,5*65536+12	     ; [y start] *65536 + [y size]
153
      mov  ecx,5*65536+12	     ; [y start] *65536 + [y size]
154
      mov  edx,1		     ; button id
154
      mov  edx,1		     ; button id
Line 155... Line 155...
155
      mov  esi,0x6688dd 	     ; button color RRGGBB
155
      mov  esi,0x6688dd 	     ; button color RRGGBB
156
      mov  eax,8		     ; function 8 : define and draw button
156
      mov  eax,8		     ; function 8 : define and draw button
157
      int  0x40
157
      mcall
158
    jmp m3
158
    jmp m3
159
    m2:
159
    m2:
Line 160... Line 160...
160
      movzx  ebx,[maxx] 	     ; [x start] *65536 + [x size]
160
      movzx  ebx,[maxx] 	     ; [x start] *65536 + [x size]
161
      movzx  ecx,[maxy] 	     ; [y start] *65536 + [y size]
161
      movzx  ecx,[maxy] 	     ; [y start] *65536 + [y size]
162
 
162
 
163
      mov  edx,0x01000000	     ; color of work area RRGGBB,8->color gl
163
      mov  edx,0x01000000	     ; color of work area RRGGBB,8->color gl
Line 164... Line 164...
164
      mov  esi,0x805080d0	     ; color of grab bar  RRGGBB,8->color gl
164
      mov  esi,0x805080d0	     ; color of grab bar  RRGGBB,8->color gl
165
      mov  edi,0x005080d0	     ; color of frames    RRGGBB
165
      mov  edi,0x005080d0	     ; color of frames    RRGGBB
Line 330... Line 330...
330
 
330
 
331
 
331
 
332
filling_alfbet:
332
filling_alfbet:
333
     ; Initialize RND
333
     ; Initialize RND
334
     mov   eax,3
334
     mov   eax,3
Line 335... Line 335...
335
     int   40h
335
     mcall
336
     ; eax - fist random number
336
     ; eax - fist random number
337
 
337