forked from z88dk/z88dk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwall.c
796 lines (691 loc) · 15.8 KB
/
wall.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
/*
* * * * * * *
*
* This game was originally published on the ZX Spectrum 'Horizons' demo tape
* Converted to 'C' by Stefano Bodrato, September 2014
* It is still a little buggy, but it works !
*
* Non-Joystick mode keys:
* 1:fast-left
* 2:left
* 9:right
* 0:fast-right
*
*
* Build options
* ===========
* -DSOUND sound effects
* -DBORDERS draw the wall borders
* -DLOMEM minimalistic mode to save memory
* -DBANNERS (where available) big top score display
*
* Values for 'spritesize' need roughly for following resolution table:
* 16: 512x186 (vert. sprite size is 8)
* 10: 320x186
* 8: 256x186
* 4: 128x94
* 3: 96x72
* 2: 64x48 spritesizeh=3: 64x72
*
*
*
* Build and RUN hints
* ===================
*
* ZX Spectrum 16K (non-joystick mode saves more memory)
* zcc +zx -lndos -create-app -DJOYSTICK -Dspritesize=8 -DSOUND -DCLOCK -zorg=24600 -O3 wall.c
*
* ZX Spectrum 48K
* zcc +zx -lndos -create-app -DJOYSTICK -DBANNERS -Dspritesize=8 -DSOUND -DCLOCK -zorg=24600 -O3 wall.c
*
* Lambda 8300
* zcc +lambda -create-app -Dspritesize=2 wall.c
*
* ZX81
* zcc +zx81 -create-app -Dspritesize=2 -DBORDERS wall.c
*
* ZX81 UDG (programmable characters board is required)
* zcc +zx81 -clib=udg -create-app -Dspritesize=2 -Dspritesizeh=3 wall.c
*
* ZX81 WRX (Wilf Rigter's High Resolution mod on RamPack or RAM addressing lines)
* zcc +zx81 -subtype=wrx -clib=wrx -create-app -Dspritesize=8 -DBANNERS -O3 wall.c
*
* ZX81 CHROMA-81 (the newest zx81 expansion, color attribute mode)
* zcc +zx81 -subtype=chroma -clib=wrx -create-app -Dspritesize=8 -DBANNERS -DSPECTRUM -O3 wall.c
*
* ZX81 ARX (Andy Rea's High Resolution trick based on extra RAM over ROM addresses, could work with few programmable characters boards)
* zcc +zx81 -subtype=arx -clib=arx -create-app -Dspritesize=8 -DBANNERS -O3 wall.c
*
* ZX81 + Memotech HRG board (16K or more)
* zcc +zx81 -clib=mt -create-app -Dspritesize=7 -DBANNERS -O3 wall.c
*
* Jupiter ACE
* zcc +ace -create-app -Dspritesize=2 -Dspritesizeh=3 wall.c
* 0 0 bload a.bin
*
* Mattel Aquarius
* zcc +aquarius -create-app -Dspritesize=2 -Dspritesizeh=3 -DSOUND wall.c
* CLOAD (play _a.caq)
* RUN (play a.caq)
*
* ABC80 (Intel HEX for the abc80 simulator)
* zcc +abc80 -subtype=hex -create-app -zorg=20000 -owall -Dspritesize=2 -Dspritesizeh=3 wall.c
* A=CALL(20000)
*
* ABC80 (BAS & BAC formats)
* zcc +abc80 -create-app -owall -Dspritesize=2 -Dspritesizeh=3 wall.c
* LOAD WALL
*
* SORD M5
* zcc +m5 -create-app -Cz--audio -Dspritesize=8 -DBANNERS -O3 -lndos wall.c
* TAPE
*
* MSX, Spectravideo SVI
* zcc +msx -create-app -DJOYSTICK -Dspritesize=8 -DSOUND -DBANNERS -lndos -lmsxbios wall.c
* zcc +svi -create-app -DJOYSTICK -Dspritesize=8 -DSOUND -DBANNERS -lndos -lsvibios wall.c
* BLOAD "CAS:",R
*
* SEGA SC-3000
* zcc +sc3000 -create-app -Dspritesize=8 -DBANNERS wall.c
* (insert the BASIC cartridge, then..) LOAD
*
* Memotech MTX 500 (use POKE 64122,0 or compile with "-startup=2" for the MTX 512)
* zcc +mtx -create-app -Dspritesize=8 -DJOYSTICK -DBANNERS wall.c
* LOAD "A"
*
* Tatung Einstein
* zcc +cpm -DEINSTEIN -leinstein -oWALL -create-app -Dspritesize=8 -DBANNERS wall.c
* (transfer WALL.COM on a disk image, i.e. using 'EDIP')
*
* Amstrad CPC
* zcc +cpc -subtype=wav -lndos -create-app -Dspritesize=8 -DJOYSTICK -DBANNERS wall.c
*
* Robotron KC85/1, KC/87 (Joystick optionally available)
* zcc +z9001 -lgfx9001krt -create-app -DSOUND -DBANNERS -Dspritesize=10 -Dspritesizeh=8 wall.c
*
* Robotron KC85/2 .. KC85/5
* zcc +kc -create-app -DBANNERS -Dspritesize=10 -Dspritesizeh=8 wall.c
*
* Commodore 128
* zcc +c128 -lgfx128hr -create-app -DSOUND -DBANNERS -Dspritesize=16 -DJOYSTICK -Dspritesizeh=8 wall.c
*
* Timex TS2068
* zcc +ts2068 -create-app -DSOUND -DBANNERS -DJOYSTICK -Dspritesize=16 -Dspritesizeh=8 wall.c
*
* * * * * * *
*
* $Id: wall.c,v 1.13 2016-11-11 07:55:37 stefano Exp $
*
* * * * * * *
*
*
*/
#ifdef SPECTRUM
#ifdef ZX81
//#pragma output hrgpage = 36096
#endif
#endif
#include <stdio.h>
#include <stdlib.h>
#include <games.h>
#include <stdlib.h>
#include <graphics.h>
#include <time.h>
#ifdef LAMBDA
#include <zx81.h>
#endif
#ifdef SPECTRUM
#ifdef ZX81
#include <zx81.h>
#else
#include <spectrum.h>
#endif
#endif
#if defined(MSX) || defined(SVI) || defined(SC3000) || defined(MTX) || defined(EINSTEIN) || defined(M5)
#include <msx.h>
#include <msx/gfx.h>
#endif
#ifdef SOUND
#include <sound.h>
#endif
#ifndef spritesize
#define spritesize 4
#endif
#ifndef spritesizeh
#define spritesizeh spritesize
#endif
#include "wallg.h"
int stick,t,tt;
int m,n,p;
int u,v,a,w,r,g;
int c,b;
int i,k;
int speed;
#ifndef LOMEM
char scoretxt[7];
#ifdef BANNERS
int temp;
#endif
#endif
#if defined(MSX) || defined(SVI) || defined(SC3000) || defined(MTX) || defined(EINSTEIN) || defined(M5)
void set_attr (int x, int y, int attr) {
for (k=0; k<8; k++)
vpoke(MODE2_ATTR + (256*x) + (8*y) + k, attr);
}
#endif
void do_delay () {
for (k=0; k<speed; k++) {}
}
int hit_brick() {
#if (spritesize == 2)
if (m>=20) return (0);
#endif
return ((point(n*spritesize,(m+1)*spritesizeh-1)) && (point((n+1)*spritesize-1,(m+1)*spritesizeh-1)));
}
void hit_border() {
#ifdef SOUND
bit_synth(15, 35, 34, 33, 32);
#endif
#ifdef SPECTRUM
#if (spritesize == 8)
zx_border (INK_CYAN);
#endif
#endif
#if defined(MSX) || defined(SVI) || defined(SC3000) || defined(MTX)
#if (spritesize == 8)
vdp_set_border(VDP_INK_CYAN);
#endif
#endif
#ifdef BORDERS
/* draw/refresh borders */
draw(0,0,32*spritesize-1,0);
draw(0,0,0,21*spritesizeh);
draw(32*spritesize-1,0,32*spritesize-1,21*spritesizeh);
#endif
}
void destroy_brick() {
t = t+13-m;
b = abs(m-n);
putsprite(spr_and,(n*spritesize),(m*spritesizeh),blank);
#ifdef SPECTRUM
#if (spritesize == 8)
#ifdef ZX81
*zx_cyx2aaddr(m,n) = 112;
#else
*zx_cyx2aaddr(m,n) = 56;
#endif
#endif
#endif
#ifdef LAMBDA
*zx_cyx2aaddr(m,n) = 112;
#endif
#if defined(MSX) || defined(SVI) || defined(SC3000) || defined(MTX) || defined(EINSTEIN) || defined(M5)
#if (spritesize == 8)
set_attr (m,n,0x1f);
#endif
#endif
if ((b&1) && (n>0)) {
putsprite(spr_and,((n-1)*spritesize),(m*spritesizeh),blank);
#ifdef SPECTRUM
#if (spritesize == 8)
#ifdef ZX81
*zx_cyx2aaddr(m,n-1) = 112;
#else
*zx_cyx2aaddr(m,n-1) = 56;
#endif
#endif
#endif
#ifdef LAMBDA
*zx_cyx2aaddr(m,n-1) = 112;
#endif
#if defined(MSX) || defined(SVI) || defined(SC3000) || defined(MTX) || defined(EINSTEIN) || defined(M5)
#if (spritesize == 8)
set_attr (m,n-1,0x1F);
#endif
#endif
}
if ((!(b&1)) && (n<31)) {
putsprite(spr_and,((n+1)*spritesize),(m*spritesizeh),blank);
#ifdef SPECTRUM
#if (spritesize == 8)
#ifdef ZX81
*zx_cyx2aaddr(m,n+1) = 112;
#else
*zx_cyx2aaddr(m,n+1) = 56;
#endif
#endif
#endif
#ifdef LAMBDA
*zx_cyx2aaddr(m,n+1) = 112;
#endif
#if defined(MSX) || defined(SVI) || defined(SC3000) || defined(MTX) || defined(EINSTEIN) || defined(M5)
#if (spritesize == 8)
set_attr (m,n+1,0x1F);
#endif
#endif
}
#ifdef SOUND
bit_synth(10, 55, 54, 53, 52);
#endif
#ifndef LOMEM
sprintf (scoretxt,"%05u",tt*1000+t);
for (i=0; i<5; i++) {
putsprite (spr_and, (2+i)*5, 23*spritesizeh-3, numblank);
putsprite (spr_or, (2+i)*5, 23*spritesizeh-3, &numbers[(scoretxt[i]-48)*7]);
}
#endif
}
void move_ball() {
switch (g) {
case 100:
l_100:
if (m<20) goto l_106;
p=0; w=0;
if ((n==(a+1)||(n==(a+2)))) {
g=120; goto l_120;
}
if (n==a) {
g=180; goto l_180;
}
if (n==(a-1)) {
g=140; goto l_140;
}
l_106:
if (n>30) {
hit_border();
g=160; goto l_160;
}
m++; n++;
if (hit_brick()) {
destroy_brick();
if ((p==0) || (w==1))
g=120;
}
break;
case 120:
l_120:
#ifdef SOUND
if (m==20)
bit_synth(20, 25, 24, 23, 22);
#endif
if (n>30) {
hit_border();
g=140; goto l_140;
}
if (m<1) {
hit_border();
/* A new trick to shake the ball and make possible
to hit all the bricks with a single ball */
if (n>30) n--;
w=1;
g=100; goto l_100;
}
m--; n++;
if (hit_brick()) {
destroy_brick();
p=1;
g=100+40*w;
}
break;
case 140:
l_140:
#ifdef SOUND
if (m==20)
bit_synth(20, 25, 24, 23, 22);
#endif
if (m<1) {
hit_border();
/* A new trick to shake the ball and make possible
to hit all the bricks with a single ball */
if (n<1) n++;
w=1;
g=160; goto l_160;
}
if (n<1) {
hit_border();
g=120; goto l_120;
}
m--; n--;
if (hit_brick()) {
destroy_brick();
p=1;
g=160-40*w;
}
break;
case 160:
l_160:
if (m<20) goto l_166;
p=0; w=0;
if (n==(a+3)) {
g=120; goto l_120;
}
if (n==(a+2)) {
g=180; goto l_180;
}
if ((n==a)||(n==(a+1))) {
g=140; goto l_140;
}
l_166:
if (n<1) {
hit_border();
g=100; goto l_100;
}
m++; n--;
if (hit_brick()) {
destroy_brick();
if ((p==0) || (w==1))
g=140;
}
break;
case 180:
l_180:
#ifdef SOUND
if (m==20)
bit_synth(20, 25, 24, 23, 22);
#endif
if (m<1) {
hit_border();
g=200; goto l_212;
}
l_190:
m--;
if (hit_brick()) {
destroy_brick();
g=200;
}
break;
case 200:
if (m<20)
goto l_212;
p=0; w=0;
if (n==(a+2)) {
g=120; goto l_120;
}
if (n==a+1) {
if (rand()&1) {
g=120; goto l_120;
} else {
g=140; goto l_140;
}
}
if (n==a) {
g=140; goto l_140;
}
l_212:
m++;
break;
}
}
void move_left() {
if (a>0) {
#if (spritesize == 2)
putsprite(spr_and,(a*spritesize),(21*spritesizeh)-1,paddle);
a--;
putsprite(spr_or,(a*spritesize),(21*spritesizeh)-1,paddle);
#else
putsprite(spr_and,(a*spritesize),(21*spritesizeh),paddle);
a--;
putsprite(spr_or,(a*spritesize),(21*spritesizeh),paddle);
#endif
}
}
void move_right() {
if (a<29) {
#if (spritesize == 2)
putsprite(spr_and,(a*spritesize),(21*spritesizeh)-1,paddle);
a++;
putsprite(spr_or,(a*spritesize),(21*spritesizeh)-1,paddle);
#else
putsprite(spr_and,(a*spritesize),(21*spritesizeh),paddle);
a++;
putsprite(spr_or,(a*spritesize),(21*spritesizeh),paddle);
#endif
}
}
/**** MAIN PROGRAM ****/
void main()
{
restart:
#ifdef JOYSTICK
hit_border();
#ifndef LOMEM
#if defined(MSX) || defined(SVI)
vdp_set_mode(0);
#endif
#ifdef SPECTRUM
#ifdef ZX81
hrg_off();
zx_colour(112);
#endif
#endif
printf("%c",12);
printf("\n CHOOSE YOUR JOYSTICK INTERFACE\n\n");
for (k=0 ; k!=GAME_DEVICES; k++)
printf(" %u - %s\n\n",k+1,joystick_type[k]);
stick=0;
while ((stick<1) || (stick>GAME_DEVICES)) {
stick=getk()-48;
}
#else
stick=1;
#endif
#endif
#ifdef SPECTRUM
#ifdef ZX81
hrg_on();
zx_colour(112);
#endif
#endif
#ifdef CLOCK
srand(clock());
#endif
tt=-1;
#ifdef ZX81
#if (spritesize == 2)
speed=500;
#else
speed=300;
#endif
#else
#ifdef C128
speed=300;
#else
speed=1000;
#endif
#endif
start_level:
#ifdef ZX81
speed-=100;
#else
speed-=200;
#endif
tt++; t=0; p=1;
clg();
hit_border();
#ifdef LAMBDA
zx_border (INK_CYAN);
zx_colour(112);
#endif
for (m=1; m<=4; m+=2)
for (n=0; n<=30; n+=2) {
putsprite(spr_or,(n*spritesize),((m+3)*spritesizeh),brick_l);
putsprite(spr_or,((n+1)*spritesize),((m+3)*spritesizeh),brick_r);
putsprite(spr_or,(n*spritesize),((m+4)*spritesizeh),brick_r);
putsprite(spr_or,((n+1)*spritesize),((m+4)*spritesizeh),brick_l);
#if (spritesize == 8)
#ifdef SPECTRUM
#ifdef ZX81
*zx_cyx2aaddr(m+3,n) = m<<4;
*zx_cyx2aaddr(m+3,n+1) = m<<4;
*zx_cyx2aaddr(m+4,n) = (m+1)<<4;
*zx_cyx2aaddr(m+4,n+1) = (m+1)<<4;
#else
*zx_cyx2aaddr(m+3,n) = m<<3;
*zx_cyx2aaddr(m+3,n+1) = m<<3;
*zx_cyx2aaddr(m+4,n) = (m+1)<<3;
*zx_cyx2aaddr(m+4,n+1) = (m+1)<<3;
#endif
#endif
#endif
#ifdef LAMBDA
*zx_cyx2aaddr(m+3,n) = m<<4;
*zx_cyx2aaddr(m+3,n+1) = m<<4;
*zx_cyx2aaddr(m+4,n) = (m+1)<<4;
*zx_cyx2aaddr(m+4,n+1) = (m+1)<<4;
#endif
#if defined(MSX) || defined(SVI) || defined(SC3000) || defined(MTX) || defined(EINSTEIN) || defined(M5)
#if (spritesize == 8)
set_attr(m+3,n,((m+1)<<1)|0x10);
set_attr(m+3,n+1,((m+1)<<1)|0x10);
set_attr(m+4,n,(m<<1)|0x10);
set_attr(m+4,n+1,(m<<1)|0x10);
#endif
#endif
}
for (n=0; n<=30; n+=2) {
putsprite(spr_or,(n*spritesize),((m+3)*spritesizeh),brick_l);
putsprite(spr_or,((n+1)*spritesize),((m+3)*spritesizeh),brick_r);
#if (spritesize == 8)
#ifdef SPECTRUM
#ifdef ZX81
*zx_cyx2aaddr(m+3,n) = 6<<4;
*zx_cyx2aaddr(m+3,n+1) = 6<<4;
#else
*zx_cyx2aaddr(m+3,n) = 6<<3;
*zx_cyx2aaddr(m+3,n+1) = 6<<3;
#endif
#endif
#endif
#ifdef LAMBDA
*zx_cyx2aaddr(m+3,n) = 6<<4;
*zx_cyx2aaddr(m+3,n+1) = 6<<4;
#endif
#if defined(MSX) || defined(SVI) || defined(SC3000) || defined(MTX) || defined(EINSTEIN) || defined(M5)
#if (spritesize == 8)
set_attr(m+3,n,VDP_INK_LIGHT_YELLOW|0x10);
set_attr(m+3,n+1,VDP_INK_LIGHT_YELLOW|0x10);
#endif
#endif
}
u=0; v=0; a=14; t=0; w=0;
for (r=0; r<=6; r++) {
m=10; n=8+rand()%15;
p=0; a=13;
#if (spritesize == 2)
putsprite(spr_or,(a*spritesize),(21*spritesizeh)-1,paddle);
#else
putsprite(spr_or,(a*spritesize),(21*spritesizeh),paddle);
#endif
#ifndef LOMEM
for (i=0; i<=6; i++) {
putsprite (spr_and, (24+i)*spritesize, 23*spritesizeh, ball);
if (i>r)
putsprite (spr_or, (24+i)*spritesize, 23*spritesizeh, ball);
}
#endif
g=200;
/* Let's show where the ball stars before the dance begins */
putsprite(spr_or,(n*spritesize),(m*spritesizeh),ball);
hit_border();
#ifdef SOUND
for (i=1; i<14; i++) {
bit_synth(4, 199+i, 200+i, 239+i, 240+i);
putsprite(spr_and,(n*spritesize),(m*spritesizeh),ball);
}
bit_synth(9, 255, 254, 253, 252);
#endif
putsprite(spr_and,(n*spritesize),(m*spritesizeh),ball);
while (m <= 20) {
/* delay */
do_delay();
move_ball();
/* total score count is 574 */
if (t>=573) goto start_level;
if (u==20)
putsprite(spr_and,(v*spritesize),(u*spritesizeh),bounce);
else
putsprite(spr_and,(v*spritesize),(u*spritesizeh),ball);
/* Intermediate step to move the ball smoothly */
putsprite(spr_xor,(((n+v)*spritesize)>>1),(((m+u)*spritesizeh)>>1),ball);
do_delay();
putsprite(spr_xor,(((n+v)*spritesize)>>1),(((m+u)*spritesizeh)>>1),ball);
u=m; v=n;
if (m==20)
putsprite(spr_or,(n*spritesize),(m*spritesizeh),bounce);
else
putsprite(spr_or,(n*spritesize),(m*spritesizeh),ball);
/*
#ifdef SOUND
bit_click();
#endif
*/
#ifdef JOYSTICK
if (joystick(stick) & MOVE_LEFT) {
move_left();
if (joystick(stick) & MOVE_FIRE)
move_left();
}
if (joystick(stick) & MOVE_RIGHT) {
move_right();
if (joystick(stick) & MOVE_FIRE)
move_right();
}
#else
k=getk();
switch (k) {
case '2':
move_left();
break;
case '1':
move_left();
move_left();
break;
case '9':
move_right();
break;
case '0':
move_right();
move_right();
break;
}
#endif
}
/* ball is lost */
#if (spritesize == 2)
putsprite(spr_and,(a*spritesize),(21*spritesizeh)-1,paddle);
#else
putsprite(spr_and,(a*spritesize),(21*spritesizeh),paddle);
#endif
}
#ifdef ZX81
#if (spritesize == 2)
#asm
ld a,$1e
ld i,a
#endasm
#endif
#endif
#ifndef LOMEM
#ifdef BANNERS
putsprite(spr_or,40,(12*spritesizeh),scorebanner);
sprintf (scoretxt,"%05u",tt*1000+t);
k=0;
for (i=0; i<5; i++) {
putsprite (spr_or, 140+i+k, 12*spritesizeh+7, &bigdigit[(scoretxt[i]-48)*38]);
if (scoretxt[i]=='1')
k+=5;
else
k+=14;
}
#else
printf("%c\n\n Score: %u ",12,tt*1000+t);
#endif
#endif
/* return (tt*1000+t); */
#ifdef SOUND
bit_fx2(5);
#endif
while (getk()) {}
while (!getk()) {}
goto restart;
}