Rev 9449 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9449 | Rev 9450 | ||
---|---|---|---|
1 | ; |
1 | ; |
2 | ; Crown_s Soft Screensaver v1.13m |
2 | ; Crown_s Soft Screensaver v1.13m |
3 | ; WWW: http://www.crown-s-soft.com |
3 | ; WWW: http://www.crown-s-soft.com |
4 | ; |
4 | ; |
5 | ; You may add you own figures. See file FIGURES.INC |
5 | ; You may add you own figures. See file FIGURES.INC |
6 | ; |
6 | ; |
7 | ; Compile with FASM v1.48 for Menuet or hier (FASM v1.40 contains bug) |
7 | ; Compile with FASM v1.48 for Menuet or hier (FASM v1.40 contains bug) |
8 | ; |
8 | ; |
9 | ; Copyright(c) 2002-2004 Crown_s Soft. All rights reserved. |
9 | ; Copyright(c) 2002-2004 Crown_s Soft. All rights reserved. |
10 | ; |
10 | ; |
11 | 11 | ||
12 | fullscreen = 1 |
12 | fullscreen = 1 |
13 | n_points = 0x1800 |
13 | n_points = 0x1800 |
14 | delay = 2 |
14 | delay = 2 |
15 | const480 = 480 |
15 | const480 = 480 |
16 | speed equ 0.004 |
16 | speed equ 0.004 |
17 | 17 | ||
18 | 18 | ||
19 | macro align value { rb (value-1) - ($ + value-1) mod value } |
19 | macro align value { rb (value-1) - ($ + value-1) mod value } |
20 | 20 | ||
21 | use32 |
21 | use32 |
22 | org 0x0 |
22 | org 0x0 |
23 | db 'MENUET01' ; 8 byte id |
23 | db 'MENUET01' ; 8 byte id |
24 | dd 0x01 ; header version |
24 | dd 0x01 ; header version |
25 | dd start ; start of code |
25 | dd start ; start of code |
26 | dd i_end ; size of image |
26 | dd i_end ; size of image |
27 | dd i_end+0x1000 ; memory for app |
27 | dd i_end+0x1000 ; memory for app |
28 | dd i_end+0x1000 ; esp |
28 | dd i_end+0x1000 ; esp |
29 | dd params ; I_Param |
29 | dd params ; I_Param |
30 | dd 0x0 ; I_Icon |
30 | dd 0x0 ; I_Icon |
31 | 31 | ||
32 | copyright db 'Crown_s Soft(c) Screensaver - www.crown-s-soft.com',0 |
32 | copyright db 'Crown_s Soft(c) Screensaver - www.crown-s-soft.com',0 |
33 | copyrightlen: |
33 | copyrightlen: |
34 | 34 | ||
35 | include "lang.inc" |
35 | include "lang.inc" |
36 | include "figuresi.inc" |
36 | include "figuresi.inc" |
37 | include "..\..\..\macros.inc" |
37 | include "..\..\..\macros.inc" |
38 | start: |
38 | start: |
39 | cmp dword[params], '@ss' |
39 | cmp dword[params], '@ss' |
40 | setz [screensaver] |
40 | setz [screensaver] |
41 | mov ebx, EVM_REDRAW + EVM_KEY |
41 | mov ebx, EVM_REDRAW + EVM_KEY + EVM_BUTTON |
42 | cmovz ebx, EVM_REDRAW + EVM_KEY + EVM_MOUSE |
42 | cmovz ebx, EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE |
43 | mcall 40 |
43 | mcall 40 |
44 | 44 | ||
45 | cmp [flscr],0 |
45 | cmp [flscr],0 |
46 | jz @f |
46 | jz @f |
47 | mov edi, transparent_cursor |
47 | mov edi, transparent_cursor |
48 | xor eax, eax |
48 | xor eax, eax |
49 | mov ecx, 32*32 |
49 | mov ecx, 32*32 |
50 | rep stosd |
50 | rep stosd |
51 | mcall 37, 4, transparent_cursor, 2 |
51 | mcall 37, 4, transparent_cursor, 2 |
52 | mov ecx, eax |
52 | mov ecx, eax |
53 | mcall 37, 5 |
53 | mcall 37, 5 |
54 | @@: |
54 | @@: |
55 | cld |
55 | cld |
56 | finit |
56 | finit |
57 | call filling_alfbet ; fill table alfbet by casual numbers |
57 | call filling_alfbet ; fill table alfbet by casual numbers |
58 | 58 | ||
59 | mov eax,[tabl_calls] |
59 | mov eax,[tabl_calls] |
60 | mov [pp1adr],eax |
60 | mov [pp1adr],eax |
61 | 61 | ||
62 | 62 | ||
63 | cmp [flscr],0 |
63 | cmp [flscr],0 |
64 | jz nofullscreen |
64 | jz nofullscreen |
65 | mov eax,14 |
65 | mov eax,14 |
66 | mcall |
66 | mcall |
67 | 67 | ||
68 | mov [maxy],ax |
68 | mov [maxy],ax |
69 | sub ax,const480 |
69 | sub ax,const480 |
70 | jnc m5 |
70 | jnc m5 |
71 | xor ax,ax |
71 | xor ax,ax |
72 | m5: |
72 | m5: |
73 | shr ax,1 |
73 | shr ax,1 |
74 | mov [posy],ax |
74 | mov [posy],ax |
75 | 75 | ||
76 | shr eax,16 |
76 | shr eax,16 |
77 | mov [maxx],ax |
77 | mov [maxx],ax |
78 | sub ax,const480 |
78 | sub ax,const480 |
79 | jnc m6 |
79 | jnc m6 |
80 | xor ax,ax |
80 | xor ax,ax |
81 | m6: |
81 | m6: |
82 | shr ax,1 |
82 | shr ax,1 |
83 | mov [posx],ax |
83 | mov [posx],ax |
84 | 84 | ||
85 | mov [outsize],const480+65536*const480 |
85 | mov [outsize],const480+65536*const480 |
86 | jmp m4 |
86 | jmp m4 |
87 | nofullscreen: |
87 | nofullscreen: |
88 | mov [posx],75 |
88 | mov [posx],75 |
89 | mov [posy],20 |
89 | mov [posy],20 |
90 | 90 | ||
91 | mov [outsize],const480+65536*const480 |
91 | mov [outsize],const480+65536*const480 |
92 | m4: |
92 | m4: |
93 | 93 | ||
94 | red: |
94 | red: |
95 | call draw_window |
95 | call draw_window |
96 | 96 | ||
97 | still: |
97 | still: |
98 | mcall 23,delay ; wait here for event |
98 | mcall 23,delay ; wait here for event |
99 | 99 | ||
100 | cmp eax,1 ; redraw request ? |
100 | cmp eax,1 ; redraw request ? |
101 | je red |
101 | je red |
102 | cmp eax,2 ; key in buffer ? |
102 | cmp eax,2 ; key in buffer ? |
103 | je key |
103 | je key |
104 | cmp eax,3 ; button in buffer ? |
104 | cmp eax,3 ; button in buffer ? |
105 | je close |
105 | je close |
106 | cmp eax,6 ; mouse moved ? |
106 | cmp eax,6 ; mouse moved ? |
107 | je close |
107 | je close |
108 | 108 | ||
109 | call calcframe |
109 | call calcframe |
110 | mov eax,07 ; putimage |
110 | mov eax,07 ; putimage |
111 | mov ebx,scr ; ebx pointer to image in memory |
111 | mov ebx,scr ; ebx pointer to image in memory |
112 | mov ecx,[outsize] ; ecx=image position in window [w]*65536+[h] |
112 | mov ecx,[outsize] ; ecx=image position in window [w]*65536+[h] |
113 | mov edx,dword [posy] ; edx=image position in window [x]*65536+[y] |
113 | mov edx,dword [posy] ; edx=image position in window [x]*65536+[y] |
114 | mcall |
114 | mcall |
115 | jmp still |
115 | jmp still |
116 | 116 | ||
117 | key: |
117 | key: |
118 | cmp [screensaver], 0 |
118 | cmp [screensaver], 0 |
119 | jnz close |
119 | jnz close |
120 | 120 | ||
121 | mov eax,2 |
121 | mov eax,2 |
122 | mcall |
122 | mcall |
123 | 123 | ||
124 | cmp al,1 ; is key in buffer ? |
124 | cmp al,1 ; is key in buffer ? |
125 | jz still |
125 | jz still |
126 | cmp ah,0x1B ; is key ESC ? |
126 | cmp ah,0x1B ; is key ESC ? |
127 | jz close |
127 | jz close |
128 | jmp still |
128 | jmp still |
129 | 129 | ||
130 | close: |
130 | close: |
131 | cmp [screensaver], 0 |
131 | cmp [screensaver], 0 |
132 | jz @f |
132 | jz @f |
133 | mcall 70, f70 |
133 | mcall 70, f70 |
134 | @@: |
134 | @@: |
135 | mcall -1 |
135 | mcall -1 |
136 | 136 | ||
137 | 137 | ||
138 | ; ********************************************* |
138 | ; ********************************************* |
139 | ; ******* WINDOW DEFINITIONS AND DRAW ******** |
139 | ; ******* WINDOW DEFINITIONS AND DRAW ******** |
140 | ; ********************************************* |
140 | ; ********************************************* |
141 | 141 | ||
142 | 142 | ||
143 | draw_window: |
143 | draw_window: |
144 | mcall 12, 1 ;start draw |
144 | mcall 12, 1 ;start draw |
145 | 145 | ||
146 | cmp [flscr],0 |
146 | cmp [flscr],0 |
147 | jnz m2 |
147 | jnz m2 |
148 | mcall 48,4 |
148 | mcall 48,4 |
149 | mov esi, eax |
149 | mov esi, eax |
150 | ; DRAW WINDOW |
150 | ; DRAW WINDOW |
151 | mov ecx,100*65536+const480+4 ; [y start] *65536 + [y size] |
151 | mov ecx,100*65536+const480+4 ; [y start] *65536 + [y size] |
152 | add ecx, esi |
152 | add ecx, esi |
153 | mcall 0, 100*65536+const480+9,,0x74000000,,copyright |
153 | mcall 0, 100*65536+const480+9,,0x74000000,,copyright |
154 | 154 | ||
155 | jmp m3 |
155 | jmp m3 |
156 | m2: |
156 | m2: |
157 | movzx ebx,[maxx] ; [x start] *65536 + [x size] |
157 | movzx ebx,[maxx] ; [x start] *65536 + [x size] |
158 | movzx ecx,[maxy] ; [y start] *65536 + [y size] |
158 | movzx ecx,[maxy] ; [y start] *65536 + [y size] |
159 | 159 | ||
160 | mov edx,0x01000000 ; color of work area RRGGBB,8->color gl |
160 | mov edx,0x01000000 ; color of work area RRGGBB,8->color gl |
161 | mov esi,0x805080d0 ; color of grab bar RRGGBB,8->color gl |
161 | mov esi,0x805080d0 ; color of grab bar RRGGBB,8->color gl |
162 | mov edi,0x005080d0 ; color of frames RRGGBB |
162 | mov edi,0x005080d0 ; color of frames RRGGBB |
163 | xor eax,eax ; function 0 : define and draw window |
163 | xor eax,eax ; function 0 : define and draw window |
164 | mcall |
164 | mcall |
165 | 165 | ||
166 | inc bx |
166 | inc bx |
167 | inc cx |
167 | inc cx |
168 | mov eax,13 ; functiom 13 : draw bar |
168 | mov eax,13 ; functiom 13 : draw bar |
169 | mcall |
169 | mcall |
170 | m3: |
170 | m3: |
171 | 171 | ||
172 | mcall 12, 2 ;end draw |
172 | mcall 12, 2 ;end draw |
173 | ret |
173 | ret |
174 | 174 | ||
175 | 175 | ||
176 | calcframe: |
176 | calcframe: |
177 | cld |
177 | cld |
178 | mov edi,scr |
178 | mov edi,scr |
179 | mov ecx,const480*const480*3/4 |
179 | mov ecx,const480*const480*3/4 |
180 | xor eax,eax |
180 | xor eax,eax |
181 | rep stosd ; CLS |
181 | rep stosd ; CLS |
182 | 182 | ||
183 | 183 | ||
184 | mov ebx,[frame] |
184 | mov ebx,[frame] |
185 | not bh |
185 | not bh |
186 | test bh,03h |
186 | test bh,03h |
187 | not bh |
187 | not bh |
188 | jnz lb1 |
188 | jnz lb1 |
189 | ; ebx=xxxx xxxx xxxx xxxx xxxx xx11 xxxx xxxxb |
189 | ; ebx=xxxx xxxx xxxx xxxx xxxx xx11 xxxx xxxxb |
190 | mov byte [p],bl |
190 | mov byte [p],bl |
191 | lb1: |
191 | lb1: |
192 | 192 | ||
193 | test bx,03ffh |
193 | test bx,03ffh |
194 | jnz lb2 |
194 | jnz lb2 |
195 | ; ebx=xxxx xxxx xxxx xxxx xxxx xx00 0000 0000b |
195 | ; ebx=xxxx xxxx xxxx xxxx xxxx xx00 0000 0000b |
196 | mov [p],0 |
196 | mov [p],0 |
197 | 197 | ||
198 | mov eax,[pp1adr] |
198 | mov eax,[pp1adr] |
199 | mov [pp0adr],eax |
199 | mov [pp0adr],eax |
200 | 200 | ||
201 | inc [pp1] |
201 | inc [pp1] |
202 | cmp [pp1],num_tabl_calls |
202 | cmp [pp1],num_tabl_calls |
203 | jnz lb3 |
203 | jnz lb3 |
204 | mov [pp1],0 |
204 | mov [pp1],0 |
205 | lb3: |
205 | lb3: |
206 | 206 | ||
207 | movzx eax,[pp1] |
207 | movzx eax,[pp1] |
208 | mov eax,[tabl_calls+eax*4] |
208 | mov eax,[tabl_calls+eax*4] |
209 | mov [pp1adr],eax |
209 | mov [pp1adr],eax |
210 | lb2: |
210 | lb2: |
211 | 211 | ||
212 | 212 | ||
213 | fild [frame] ; st0=STime |
213 | fild [frame] ; st0=STime |
214 | fmul [speed1] ; st0=STime*Speed |
214 | fmul [speed1] ; st0=STime*Speed |
215 | fst [bt_r] ; al_rSTime*Speed |
215 | fst [bt_r] ; al_rSTime*Speed |
216 | fadd st0,st0 |
216 | fadd st0,st0 |
217 | fstp [al_r] ; al_rSTime*Speed*2 |
217 | fstp [al_r] ; al_rSTime*Speed*2 |
218 | 218 | ||
219 | 219 | ||
220 | mov [Fl],0 |
220 | mov [Fl],0 |
221 | mov ecx,[mFl] |
221 | mov ecx,[mFl] |
222 | mov esi,alfbet |
222 | mov esi,alfbet |
223 | ckl1: |
223 | ckl1: |
224 | call [pp0adr] |
224 | call [pp0adr] |
225 | cmp [p],0 |
225 | cmp [p],0 |
226 | jz lb4 |
226 | jz lb4 |
227 | fstp [x1] |
227 | fstp [x1] |
228 | fstp [y1] |
228 | fstp [y1] |
229 | fstp [z1] |
229 | fstp [z1] |
230 | call [pp1adr] |
230 | call [pp1adr] |
231 | call mix |
231 | call mix |
232 | lb4: |
232 | lb4: |
233 | 233 | ||
234 | call turn |
234 | call turn |
235 | 235 | ||
236 | add esi,4 |
236 | add esi,4 |
237 | inc [Fl] |
237 | inc [Fl] |
238 | loop ckl1 |
238 | loop ckl1 |
239 | 239 | ||
240 | inc ebx |
240 | inc ebx |
241 | mov [frame],ebx |
241 | mov [frame],ebx |
242 | ret |
242 | ret |
243 | 243 | ||
244 | 244 | ||
245 | ; turn coordinate system |
245 | ; turn coordinate system |
246 | turn: |
246 | turn: |
247 | ; around Y |
247 | ; around Y |
248 | ; x= x*cos(a)-z*sin(a) |
248 | ; x= x*cos(a)-z*sin(a) |
249 | ; y= y |
249 | ; y= y |
250 | ; z= x*sin(a)+z*cos(a) |
250 | ; z= x*sin(a)+z*cos(a) |
251 | fld st2 ; st0=z st1=x st2=y st3=z |
251 | fld st2 ; st0=z st1=x st2=y st3=z |
252 | fld st1 ; st0=x st1=z st2=x st3=y st4=z |
252 | fld st1 ; st0=x st1=z st2=x st3=y st4=z |
253 | fld [al_r] ; st0=a st1=x st2=z st3=x st4=y st5=z |
253 | fld [al_r] ; st0=a st1=x st2=z st3=x st4=y st5=z |
254 | fsincos ; st0=cos(a) st1=sin(a) st2=x st3=z st4=x st5=y st6=z |
254 | fsincos ; st0=cos(a) st1=sin(a) st2=x st3=z st4=x st5=y st6=z |
255 | fmul st4,st0 |
255 | fmul st4,st0 |
256 | fmulp st6,st0 ; st0=sin(a) st1=x st2=z st3=x*cos(a) st4=y st5=z*cos(a) |
256 | fmulp st6,st0 ; st0=sin(a) st1=x st2=z st3=x*cos(a) st4=y st5=z*cos(a) |
257 | fmul st2,st0 |
257 | fmul st2,st0 |
258 | fmulp st1,st0 ; st0=x*sin(a) st1=z*sin(a) st2=x*cos(a) st3=y st4=z*c |
258 | fmulp st1,st0 ; st0=x*sin(a) st1=z*sin(a) st2=x*cos(a) st3=y st4=z*c |
259 | faddp st4,st0 |
259 | faddp st4,st0 |
260 | fsubp st1,st0 |
260 | fsubp st1,st0 |
261 | 261 | ||
262 | 262 | ||
263 | ; around X |
263 | ; around X |
264 | ; x=x |
264 | ; x=x |
265 | ; y= y*cos(b)+z*sin(b) |
265 | ; y= y*cos(b)+z*sin(b) |
266 | ; z=-y*sin(b)+z*cos(b) |
266 | ; z=-y*sin(b)+z*cos(b) |
267 | fld st2 ; st0=z st1=x st2=y st3=z |
267 | fld st2 ; st0=z st1=x st2=y st3=z |
268 | fld st2 ; st0=y st1=z st2=x st3=y st4=z |
268 | fld st2 ; st0=y st1=z st2=x st3=y st4=z |
269 | fld [bt_r] ; st0=b st1=y st2=z st3=x st4=y st5=z |
269 | fld [bt_r] ; st0=b st1=y st2=z st3=x st4=y st5=z |
270 | fsincos ; st0=cos(b) st1=sin(b) st2=y st3=z st4=x st5=y st6=z |
270 | fsincos ; st0=cos(b) st1=sin(b) st2=y st3=z st4=x st5=y st6=z |
271 | fmul st5,st0 |
271 | fmul st5,st0 |
272 | fmulp st6,st0 ; st0=sin(b) st1=y st2=z st3=x st4=y*cos(b) st5=z*cos(b) |
272 | fmulp st6,st0 ; st0=sin(b) st1=y st2=z st3=x st4=y*cos(b) st5=z*cos(b) |
273 | fmul st2,st0 |
273 | fmul st2,st0 |
274 | fmulp st1,st0 ; st0=y*sin(b) st1=z*sin(b) st2=x st3=y*cos(b) st4=z*cos(b) |
274 | fmulp st1,st0 ; st0=y*sin(b) st1=z*sin(b) st2=x st3=y*cos(b) st4=z*cos(b) |
275 | fsubp st4,st0 ; st0=z*sin(b) st1=x st2=y*cos(b) st3=z*cos(b)-y*sin(b) |
275 | fsubp st4,st0 ; st0=z*sin(b) st1=x st2=y*cos(b) st3=z*cos(b)-y*sin(b) |
276 | faddp st2,st0 |
276 | faddp st2,st0 |
277 | 277 | ||
278 | ; st0=x st1=y st2=z |
278 | ; st0=x st1=y st2=z |
279 | fistp [x1] |
279 | fistp [x1] |
280 | fistp [y1] |
280 | fistp [y1] |
281 | fmul [Zdepth] ; st0=z*Zdepth |
281 | fmul [Zdepth] ; st0=z*Zdepth |
282 | fiadd [Zcolor] ; st0=z*Zdepth+Zcolor |
282 | fiadd [Zcolor] ; st0=z*Zdepth+Zcolor |
283 | fistp [z_w] ; st0z*Zdepth+Zcolor |
283 | fistp [z_w] ; st0z*Zdepth+Zcolor |
284 | 284 | ||
285 | 285 | ||
286 | push edx |
286 | push edx |
287 | 287 | ||
288 | mov eax,[x1] |
288 | mov eax,[x1] |
289 | add eax,[mid] |
289 | add eax,[mid] |
290 | mul [consts] |
290 | mul [consts] |
291 | add eax,[y1] |
291 | add eax,[y1] |
292 | add eax,[mid] |
292 | add eax,[mid] |
293 | mul [const3] |
293 | mul [const3] |
294 | 294 | ||
295 | mov dl,byte [z_w] ; al=ZZ |
295 | mov dl,byte [z_w] ; al=ZZ |
296 | mov [scr+0+eax],dl |
296 | mov [scr+0+eax],dl |
297 | mov [scr+1+eax],dl |
297 | mov [scr+1+eax],dl |
298 | mov [scr+2+eax],dl |
298 | mov [scr+2+eax],dl |
299 | 299 | ||
300 | pop edx |
300 | pop edx |
301 | ret |
301 | ret |
302 | 302 | ||
303 | 303 | ||
304 | 304 | ||
305 | mix: |
305 | mix: |
306 | fild [p] ; st0=p |
306 | fild [p] ; st0=p |
307 | fmul [mp] ; st0=p=p*mp |
307 | fmul [mp] ; st0=p=p*mp |
308 | fld st0 ; st0=p st1=p |
308 | fld st0 ; st0=p st1=p |
309 | fmul st4,st0 |
309 | fmul st4,st0 |
310 | fmul st3,st0 |
310 | fmul st3,st0 |
311 | fmulp st2,st0 ; st0=p st1=x*p st2=y*p st3=z*p |
311 | fmulp st2,st0 ; st0=p st1=x*p st2=y*p st3=z*p |
312 | 312 | ||
313 | fld1 |
313 | fld1 |
314 | fsubrp st1,st0 ; st0=1-p st1=x*p st2=y*p st3=z*p |
314 | fsubrp st1,st0 ; st0=1-p st1=x*p st2=y*p st3=z*p |
315 | fld [z1] ; st0=z1 st1=1-p st2=x*p st3=y*p st4=z*p |
315 | fld [z1] ; st0=z1 st1=1-p st2=x*p st3=y*p st4=z*p |
316 | fmul st0,st1 |
316 | fmul st0,st1 |
317 | faddp st4,st0 |
317 | faddp st4,st0 |
318 | fld [y1] ; st0=y1 st1=1-p st2=x*p st3=y*p st4= |
318 | fld [y1] ; st0=y1 st1=1-p st2=x*p st3=y*p st4= |
319 | fmul st0,st1 |
319 | fmul st0,st1 |
320 | faddp st3,st0 |
320 | faddp st3,st0 |
321 | fld [x1] ; st0=x1 st1=1-p st2=x*p st3=y*p+y1*(1-p) st4= |
321 | fld [x1] ; st0=x1 st1=1-p st2=x*p st3=y*p+y1*(1-p) st4= |
322 | fmulp st1,st0 ; st0=x1*(1-p) st1=x*p st2=y*p+y1*(1-p) st3= |
322 | fmulp st1,st0 ; st0=x1*(1-p) st1=x*p st2=y*p+y1*(1-p) st3= |
323 | faddp st1,st0 ; st0=x=x*p+x1*(1-p) st1=y=y*p+y1*(1-p) st2=z |
323 | faddp st1,st0 ; st0=x=x*p+x1*(1-p) st1=y=y*p+y1*(1-p) st2=z |
324 | ret |
324 | ret |
325 | 325 | ||
326 | 326 | ||
327 | filling_alfbet: |
327 | filling_alfbet: |
328 | ; Initialize RND |
328 | ; Initialize RND |
329 | mov eax,3 |
329 | mov eax,3 |
330 | mcall |
330 | mcall |
331 | ; eax - fist random number |
331 | ; eax - fist random number |
332 | 332 | ||
333 | mov ecx,n_points |
333 | mov ecx,n_points |
334 | mov edi,alfbet |
334 | mov edi,alfbet |
335 | mov ebx,8088405h |
335 | mov ebx,8088405h |
336 | ck2: |
336 | ck2: |
337 | stosd |
337 | stosd |
338 | ; Compute next random number |
338 | ; Compute next random number |
339 | ; New := 8088405H * Old + 1 |
339 | ; New := 8088405H * Old + 1 |
340 | mul ebx |
340 | mul ebx |
341 | inc eax |
341 | inc eax |
342 | loop ck2 |
342 | loop ck2 |
343 | ret |
343 | ret |
344 | 344 | ||
345 | 345 | ||
346 | ; DATA AREA |
346 | ; DATA AREA |
347 | align 2 |
347 | align 2 |
348 | 348 | ||
349 | frame dd 0 |
349 | frame dd 0 |
350 | 350 | ||
351 | mp dd 0.00390625 |
351 | mp dd 0.00390625 |
352 | n_r dd 0.00390625 |
352 | n_r dd 0.00390625 |
353 | 353 | ||
354 | mal_r dd 6.28318530717958648 |
354 | mal_r dd 6.28318530717958648 |
355 | mbt_r dd 6.28318530717958648 |
355 | mbt_r dd 6.28318530717958648 |
356 | 356 | ||
357 | const3 dd 3 |
357 | const3 dd 3 |
358 | const6 dw 6 |
358 | const6 dw 6 |
359 | consts dd const480 |
359 | consts dd const480 |
360 | 360 | ||
361 | mFl dd n_points |
361 | mFl dd n_points |
362 | pp1 dw 0 |
362 | pp1 dw 0 |
363 | 363 | ||
364 | Zdepth dd 0.3 |
364 | Zdepth dd 0.3 |
365 | Zcolor dw 140 |
365 | Zcolor dw 140 |
366 | 366 | ||
367 | mid dd 240 ; centre of screen |
367 | mid dd 240 ; centre of screen |
368 | 368 | ||
369 | speed1 dd speed |
369 | speed1 dd speed |
370 | flscr db fullscreen |
370 | flscr db fullscreen |
371 | 371 | ||
372 | align 4 |
372 | align 4 |
373 | 373 | ||
374 | outsize dd ? |
374 | outsize dd ? |
375 | posy dw ? |
375 | posy dw ? |
376 | posx dw ? |
376 | posx dw ? |
377 | maxy dw ? |
377 | maxy dw ? |
378 | maxx dw ? |
378 | maxx dw ? |
379 | 379 | ||
380 | Fl dd ? |
380 | Fl dd ? |
381 | 381 | ||
382 | p dd ? |
382 | p dd ? |
383 | al_r dd ? |
383 | al_r dd ? |
384 | bt_r dd ? |
384 | bt_r dd ? |
385 | 385 | ||
386 | 386 | ||
387 | pp0adr dd ? |
387 | pp0adr dd ? |
388 | pp1adr dd ? |
388 | pp1adr dd ? |
389 | 389 | ||
390 | z_w dw ? |
390 | z_w dw ? |
391 | 391 | ||
392 | x1 dd ? |
392 | x1 dd ? |
393 | y1 dd ? |
393 | y1 dd ? |
394 | z1 dd ? |
394 | z1 dd ? |
395 | 395 | ||
396 | f70: ; run |
396 | f70: ; run |
397 | dd 7, 0, 0, 0, 0 |
397 | dd 7, 0, 0, 0, 0 |
398 | db '/sys/@SS',0 |
398 | db '/sys/@SS',0 |
399 | 399 | ||
400 | screensaver db ? |
400 | screensaver db ? |
401 | params rb 4 |
401 | params rb 4 |
402 | transparent_cursor rd 32*32 |
402 | transparent_cursor rd 32*32 |
403 | 403 | ||
404 | align 16 |
404 | align 16 |
405 | alfbet: ; alfbet db n_points*4 dup (?) |
405 | alfbet: ; alfbet db n_points*4 dup (?) |
406 | scr = alfbet+n_points*4 ; scr db 480*480*3+1 dup (?) |
406 | scr = alfbet+n_points*4 ; scr db 480*480*3+1 dup (?) |
407 | i_end = scr+const480*const480*3+1 ; i_param db 256 dup (?) |
407 | i_end = scr+const480*const480*3+1 ; i_param db 256 dup (?) |