|
Lines 178-185
Link Here
|
| 178 |
|
178 |
|
| 179 |
for (si=sinfo,i=0;i<800;i++) |
179 |
for (si=sinfo,i=0;i<800;i++) |
| 180 |
{ |
180 |
{ |
| 181 |
*(si++)=jrand()%320; |
181 |
*(si++)=jrand()%xres; |
| 182 |
*(si++)=jrand()%200; |
182 |
*(si++)=jrand()%yres; |
| 183 |
*(si++)=c[jrand()%4]; |
183 |
*(si++)=c[jrand()%4]; |
| 184 |
screen->putpixel(si[-3],si[-2],si[-1]); |
184 |
screen->putpixel(si[-3],si[-2],si[-1]); |
| 185 |
} |
185 |
} |
|
Lines 195-201
Link Here
|
| 195 |
paddr[i]=(pal->red(i)<<16)|(pal->green(i)<<8)|(pal->blue(i)); |
195 |
paddr[i]=(pal->red(i)<<16)|(pal->green(i)<<8)|(pal->blue(i)); |
| 196 |
} |
196 |
} |
| 197 |
|
197 |
|
| 198 |
int dx=(xres+1)/2-320/2,dy=(yres+1)/2-200/2; |
198 |
int dx=(xres+1)/2-xres/2,dy=(yres+1)/2-yres/2; |
| 199 |
|
199 |
|
| 200 |
|
200 |
|
| 201 |
scan_map(screen,ex,ey,cash.img(planet),cash.img(planet2),0,paddr,p,cash.img(mask)->height(),eoff,coff); |
201 |
scan_map(screen,ex,ey,cash.img(planet),cash.img(planet2),0,paddr,p,cash.img(mask)->height(),eoff,coff); |
|
Lines 248-255
Link Here
|
| 248 |
cash.sfx(zip_snd)->play(127); |
248 |
cash.sfx(zip_snd)->play(127); |
| 249 |
} |
249 |
} |
| 250 |
|
250 |
|
| 251 |
eoff+=2; if (eoff>=320) eoff-=320; |
251 |
eoff+=2; if (eoff>=xres) eoff-=xres; |
| 252 |
coff+=1; if (coff>=320) coff-=320; |
252 |
coff+=1; if (coff>=xres) coff-=xres; |
| 253 |
eh->flush_screen(); |
253 |
eh->flush_screen(); |
| 254 |
i++; |
254 |
i++; |
| 255 |
} |
255 |
} |
|
Lines 276-283
Link Here
|
| 276 |
scan_map(screen,ex,ey,cash.img(planet), |
276 |
scan_map(screen,ex,ey,cash.img(planet), |
| 277 |
cash.img(planet2),i*256/200,paddr,p,cash.img(mask)->height(),eoff,coff); |
277 |
cash.img(planet2),i*256/200,paddr,p,cash.img(mask)->height(),eoff,coff); |
| 278 |
|
278 |
|
| 279 |
eoff+=2; if (eoff>=320) eoff-=320; |
279 |
eoff+=2; if (eoff>=xres) eoff-=xres; |
| 280 |
coff+=1; if (coff>=320) coff-=320; |
280 |
coff+=1; if (coff>=xres) coff-=xres; |
| 281 |
|
281 |
|
| 282 |
i++; |
282 |
i++; |
| 283 |
if (i<150 || (i<170 && ((i-149)%2)==0) || (i<180 && ((i-149)%4)==0) || (i<190 && ((i-149)%8)==0)) |
283 |
if (i<150 || (i<170 && ((i-149)%2)==0) || (i<180 && ((i-149)%4)==0) || (i<190 && ((i-149)%8)==0)) |
|
Lines 341-348
Link Here
|
| 341 |
cash.img(planet2), |
341 |
cash.img(planet2), |
| 342 |
256,paddr, |
342 |
256,paddr, |
| 343 |
p,cash.img(mask)->height(),eoff,coff); |
343 |
p,cash.img(mask)->height(),eoff,coff); |
| 344 |
eoff+=2; if (eoff>=320) eoff-=320; |
344 |
eoff+=2; if (eoff>=xres) eoff-=xres; |
| 345 |
coff+=1; if (coff>=320) coff-=320; |
345 |
coff+=1; if (coff>=xres) coff-=xres; |
| 346 |
eh->flush_screen(); |
346 |
eh->flush_screen(); |
| 347 |
i++; |
347 |
i++; |
| 348 |
} |
348 |
} |
|
Lines 363-369
Link Here
|
| 363 |
time_marker start; |
363 |
time_marker start; |
| 364 |
|
364 |
|
| 365 |
ev.type=EV_SPURIOUS; |
365 |
ev.type=EV_SPURIOUS; |
| 366 |
for (i=0;i<320 && ev.type!=EV_KEY;i++) |
366 |
for (i=0;i<xres && ev.type!=EV_KEY;i++) |
| 367 |
{ |
367 |
{ |
| 368 |
screen->clear(); |
368 |
screen->clear(); |
| 369 |
int j; |
369 |
int j; |
|
Lines 374-380
Link Here
|
| 374 |
cash.img(planet2), |
374 |
cash.img(planet2), |
| 375 |
256,paddr, |
375 |
256,paddr, |
| 376 |
p,cash.img(mask)->height(),eoff,coff); |
376 |
p,cash.img(mask)->height(),eoff,coff); |
| 377 |
text_draw(205-i,dx+10,dy,dx+319-10,dy+199,lstring_value(end_plot),eh->font(),cmap,eh->bright_color()); |
377 |
text_draw(205-i,dx+10,dy,dx+xres-1-10,dy+yres-1,lstring_value(end_plot),eh->font(),cmap,eh->bright_color()); |
| 378 |
eh->flush_screen(); |
378 |
eh->flush_screen(); |
| 379 |
time_marker now; while (now.diff_time(&start)<0.18) now.get_time(); start.get_time(); |
379 |
time_marker now; while (now.diff_time(&start)<0.18) now.get_time(); start.get_time(); |
| 380 |
|
380 |
|
|
Lines 434-446
Link Here
|
| 434 |
|
434 |
|
| 435 |
event ev; ev.type=EV_SPURIOUS; |
435 |
event ev; ev.type=EV_SPURIOUS; |
| 436 |
time_marker start; |
436 |
time_marker start; |
| 437 |
for (i=0;i<320 && ev.type!=EV_KEY;i++) |
437 |
for (i=0;i<xres && ev.type!=EV_KEY;i++) |
| 438 |
{ |
438 |
{ |
| 439 |
im->put_image(screen,dx,dy); |
439 |
im->put_image(screen,dx,dy); |
| 440 |
console_font->put_string(screen,xres/2+35,yres/2+100-console_font->height()-2, |
440 |
console_font->put_string(screen,xres/2+35,yres/2+100-console_font->height()-2, |
| 441 |
lstring_value(to_be)); |
441 |
lstring_value(to_be)); |
| 442 |
|
442 |
|
| 443 |
text_draw(205-i,dx+10,dy,dx+319-10,dy+199,lstring_value(mid_plot),eh->font(),cmap,eh->bright_color()); |
443 |
text_draw(205-i,dx+10,dy,dx+xres-1-10,dy+yres-1,lstring_value(mid_plot),eh->font(),cmap,eh->bright_color()); |
| 444 |
eh->flush_screen(); |
444 |
eh->flush_screen(); |
| 445 |
time_marker now; while (now.diff_time(&start)<0.18) now.get_time(); start.get_time(); |
445 |
time_marker now; while (now.diff_time(&start)<0.18) now.get_time(); start.get_time(); |
| 446 |
while (eh->event_waiting() && ev.type!=EV_KEY) eh->get_event(ev); |
446 |
while (eh->event_waiting() && ev.type!=EV_KEY) eh->get_event(ev); |
|
Lines 471-477
Link Here
|
| 471 |
|
471 |
|
| 472 |
image *im=cash.img(cash.reg("art/endgame.spe","end.pcx",SPEC_IMAGE,1)); |
472 |
image *im=cash.img(cash.reg("art/endgame.spe","end.pcx",SPEC_IMAGE,1)); |
| 473 |
|
473 |
|
| 474 |
int dx=(xres+1)/2-320/2,dy=(yres+1)/2-200/2; |
474 |
int dx=(xres+1)/2-xres/2,dy=(yres+1)/2-yres/2; |
| 475 |
|
475 |
|
| 476 |
void *end_plot=symbol_value(make_find_symbol("plot_end")); |
476 |
void *end_plot=symbol_value(make_find_symbol("plot_end")); |
| 477 |
p_ref r2(end_plot); |
477 |
p_ref r2(end_plot); |
|
Lines 486-496
Link Here
|
| 486 |
|
486 |
|
| 487 |
event ev; ev.type=EV_SPURIOUS; |
487 |
event ev; ev.type=EV_SPURIOUS; |
| 488 |
time_marker start; |
488 |
time_marker start; |
| 489 |
for (i=0;i<320 && ev.type!=EV_KEY;i++) |
489 |
for (i=0;i<xres && ev.type!=EV_KEY;i++) |
| 490 |
{ |
490 |
{ |
| 491 |
im->put_image(screen,dx,dy); |
491 |
im->put_image(screen,dx,dy); |
| 492 |
|
492 |
|
| 493 |
text_draw(205-i,dx+10,dy,dx+319-10,dy+199,lstring_value(end_plot),eh->font(),cmap,eh->bright_color()); |
493 |
text_draw(205-i,dx+10,dy,dx+xres-1-10,dy+yres-1,lstring_value(end_plot),eh->font(),cmap,eh->bright_color()); |
| 494 |
eh->flush_screen(); |
494 |
eh->flush_screen(); |
| 495 |
time_marker now; while (now.diff_time(&start)<0.18) now.get_time(); start.get_time(); |
495 |
time_marker now; while (now.diff_time(&start)<0.18) now.get_time(); start.get_time(); |
| 496 |
while (eh->event_waiting() && ev.type!=EV_KEY) eh->get_event(ev); |
496 |
while (eh->event_waiting() && ev.type!=EV_KEY) eh->get_event(ev); |