-
Notifications
You must be signed in to change notification settings - Fork 0
/
unit1 (copy).pas
2578 lines (2352 loc) · 58.7 KB
/
unit1 (copy).pas
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
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls,
StdCtrls,
//For playing sound
FileUtil{$IFDEF WINDOWS},mmsystem{$ELSE},asyncprocess,process{$ENDIF},StrUtils;
type
//For playing sound
TPlayStyle = (psAsync,psSync);
{ TForm1 }
TForm1 = class(TForm)
Edit1: TEdit;
Image1: TImage;
Image2: TImage;
Image3: TImage;
Image4: TImage;
Image5: TImage;
Label1: TLabel;
Label10: TLabel;
Label11: TLabel;
Label12: TLabel;
Label13: TLabel;
Label14: TLabel;
Label15: TLabel;
Label16: TLabel;
Label75: TLabel;
Label76: TLabel;
Label66: TLabel;
Labelscore5: TLabel;
Label86: TLabel;
Label106: TLabel;
Label116: TLabel;
Labelscore4: TLabel;
Label115: TLabel;
Label105: TLabel;
Label85: TLabel;
Label73: TLabel;
Label65: TLabel;
Label63: TLabel;
Label103: TLabel;
label74: TLabel;
Label83: TLabel;
Label93: TLabel;
Label113: TLabel;
Label95: TLabel;
Label2: TLabel;
Label96: TLabel;
Label64: TLabel;
Label104: TLabel;
Label84: TLabel;
Label94: TLabel;
Label114: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
Labelscore2: TLabel;
Labelscore3: TLabel;
Panel1: TPanel;
Panel2: TPanel;
Panel3: TPanel;
Panel4: TPanel;
Panel5: TPanel;
Panel6: TPanel;
Panel7: TPanel;
Shape1: TShape;
Shape10: TShape;
Shape100: TShape;
Shape101: TShape;
Shape102: TShape;
Shape103: TShape;
Shape104: TShape;
Shape105: TShape;
Shape106: TShape;
Shape107: TShape;
Shape108: TShape;
Shape109: TShape;
Shape110: TShape;
Shape111: TShape;
Shape112: TShape;
Shape113: TShape;
Shape114: TShape;
Shape115: TShape;
Shape116: TShape;
Shape117: TShape;
Shape118: TShape;
Shape119: TShape;
Shape120: TShape;
Shape121: TShape;
Shape122: TShape;
Shapebarre5: TShape;
Shapeball5: TShape;
Shapelimit5: TShape;
Shape11: TShape;
Shape12: TShape;
Shape13: TShape;
Shape14: TShape;
Shape15: TShape;
Shape16: TShape;
Shape17: TShape;
Shape18: TShape;
Shape19: TShape;
Shape2: TShape;
Shape20: TShape;
Shape21: TShape;
Shape22: TShape;
Shape23: TShape;
Shape24: TShape;
Shape25: TShape;
Shape26: TShape;
Shape27: TShape;
Shape28: TShape;
Shape29: TShape;
Shape30: TShape;
Shape31: TShape;
Shape32: TShape;
Shape33: TShape;
Shape34: TShape;
Shape35: TShape;
Shape36: TShape;
Shape37: TShape;
Shape38: TShape;
Shape39: TShape;
Shape40: TShape;
Shape41: TShape;
Shape42: TShape;
Shape43: TShape;
Shape44: TShape;
Shape45: TShape;
Shape46: TShape;
Shape47: TShape;
Shape48: TShape;
Shape49: TShape;
Shape50: TShape;
Shape51: TShape;
Shape52: TShape;
Shape53: TShape;
Shape54: TShape;
Shape55: TShape;
Shape56: TShape;
Shape57: TShape;
Shape58: TShape;
Shape59: TShape;
Shape60: TShape;
Shape61: TShape;
Shape68: TShape;
Shape69: TShape;
Shape70: TShape;
Shape71: TShape;
Shape72: TShape;
Shape73: TShape;
Shape74: TShape;
Shape75: TShape;
Shape76: TShape;
Shape77: TShape;
Shape78: TShape;
Shape79: TShape;
Shape80: TShape;
Shape81: TShape;
Shape82: TShape;
Shape83: TShape;
Shape84: TShape;
Shape85: TShape;
Shape86: TShape;
Shape87: TShape;
Shape88: TShape;
Shape89: TShape;
Shape90: TShape;
Shape91: TShape;
Shape92: TShape;
Shape93: TShape;
Shape94: TShape;
Shape95: TShape;
Shape96: TShape;
Shape97: TShape;
Shape98: TShape;
Shape99: TShape;
Shapebarre4: TShape;
Shapeball4: TShape;
Shapelimit4: TShape;
Shape62: TShape;
Shape63: TShape;
Shape64: TShape;
Shape65: TShape;
Shape66: TShape;
Shape67: TShape;
Shapelimit3: TShape;
Shapebarre3: TShape;
Shapeball3: TShape;
Shapelimit2: TShape;
Shapebarre2: TShape;
Shapeball2: TShape;
Shapelimit1: TShape;
Shape3: TShape;
Shape4: TShape;
Shape5: TShape;
Shape6: TShape;
Shape7: TShape;
Shape8: TShape;
Shape9: TShape;
Shapebarre1: TShape;
Shapeball1: TShape;
Timer1: TTimer;
Timer10: TTimer;
Timer2: TTimer;
Timer3: TTimer;
Timer4: TTimer;
Timer5: TTimer;
Timer6: TTimer;
Timer7: TTimer;
Timer8: TTimer;
Timer9: TTimer;
procedure Button1Click(Sender: TObject);
procedure Edit1Change(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormKeyPress(Sender: TObject; var Key: char);
procedure Image5Click(Sender: TObject);
procedure Label10Click(Sender: TObject);
procedure Label12Click(Sender: TObject);
procedure Label13Click(Sender: TObject);
procedure Label14Click(Sender: TObject);
procedure Label15Click(Sender: TObject);
procedure Label16Click(Sender: TObject);
procedure Label2MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure Label3Click(Sender: TObject);
procedure Label4Click(Sender: TObject);
procedure Label75Click(Sender: TObject);
procedure Label65Click(Sender: TObject);
procedure Label76Click(Sender: TObject);
procedure Label85Click(Sender: TObject);
procedure Label95Click(Sender: TObject);
procedure Label73Click(Sender: TObject);
procedure Label1Click(Sender: TObject);
procedure label74Click(Sender: TObject);
procedure Label84Click(Sender: TObject);
procedure Label2Click(Sender: TObject);
procedure Label5Click(Sender: TObject);
procedure Label7Click(Sender: TObject);
procedure Label8Click(Sender: TObject);
procedure Label93Click(Sender: TObject);
procedure Labelscore3Click(Sender: TObject);
procedure Panel1Click(Sender: TObject);
procedure Panel2Click(Sender: TObject);
procedure Panel3Click(Sender: TObject);
procedure Panel4Click(Sender: TObject);
procedure Panel5Click(Sender: TObject);
procedure Panel6Click(Sender: TObject);
procedure Panel7Click(Sender: TObject);
procedure Shape3ChangeBounds(Sender: TObject);
procedure Shapeball5ChangeBounds(Sender: TObject);
procedure Shapebarre5ChangeBounds(Sender: TObject);
procedure Shape12ChangeBounds(Sender: TObject);
procedure Shape14ChangeBounds(Sender: TObject);
procedure Shape15ChangeBounds(Sender: TObject);
procedure Shape17ChangeBounds(Sender: TObject);
procedure Shape18ChangeBounds(Sender: TObject);
procedure Shape19ChangeBounds(Sender: TObject);
procedure Shape1ChangeBounds(Sender: TObject);
procedure Shape20ChangeBounds(Sender: TObject);
procedure Shape28ChangeBounds(Sender: TObject);
procedure Shape35ChangeBounds(Sender: TObject);
procedure Shape36ChangeBounds(Sender: TObject);
procedure Shape40ChangeBounds(Sender: TObject);
procedure Shape41ChangeBounds(Sender: TObject);
procedure Shape46ChangeBounds(Sender: TObject);
procedure Shape4ChangeBounds(Sender: TObject);
procedure Shape5ChangeBounds(Sender: TObject);
procedure Shape74ChangeBounds(Sender: TObject);
procedure Shape81ChangeBounds(Sender: TObject);
procedure Shapebarre3ChangeBounds(Sender: TObject);
procedure Shape6ChangeBounds(Sender: TObject);
procedure Shape7ChangeBounds(Sender: TObject);
procedure Shape9ChangeBounds(Sender: TObject);
procedure Shapeball1ChangeBounds(Sender: TObject);
procedure Shapebarre1ChangeBounds(Sender: TObject);
procedure Shapelimit2ChangeBounds(Sender: TObject);
procedure Timer10Timer(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure Timer2Timer(Sender: TObject);
procedure Timer3Timer(Sender: TObject);
procedure Timer4Timer(Sender: TObject);
procedure Timer5Timer(Sender: TObject);
procedure Timer6Timer(Sender: TObject);
procedure Timer7Timer(Sender: TObject);
procedure Timer8Timer(Sender: TObject);
procedure Timer9Timer(Sender: TObject);
procedure PlaySound(const szSoundFilename: string; fPlayStyle:TPlayStyle);
procedure DestroyPlaySoundObject();
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
up,rigth,limit_rigth,limit_left,playingPart,bonuslong,bonusvie,growsize,stop:boolean;
playoops,bonusthor,activebonusthor,stopbonusthor:boolean;
s : array [1..20] of Tshape;
s1: array [21..40] of Tshape;
s2: array[41..60] of Tshape;
s3 : array[61..80] of Tshape;
s4 : array[81..122] of Tshape;
tabpanel: array[1..5] of Tpanel;
tabsave: array[1..122] of integer;
tabBarre: array[1..5] of TShape;
tabBall: array[1..5] of TShape;
tabLabel: array[1..5, 1..8] of TLabel;
p, i,j,jv,a,comptvie,al,av,b,c,d,dv,timebonusthor,k,t,time,longbarre:integer;
score,compt,jumpbar,jumpbal:integer;
//For playing sound
{$IFNDEF WINDOWS}
SoundPlayerAsyncProcess:Tasyncprocess;
SoundPlayerSyncProcess:Tprocess;
{$ENDIF}
CONST NUMBER_OF_SOUND_WIN =2; NUMBER_OF_SOUND_LOSE =7; NUMBER_OF_SOUND_START =2; NUMBER_OF_SOUND_QUIT =3; NUMBER_OF_SOUND_GComment =7;
C_UnableToPlay = 'Unable to play ';
{$IFNDEF WINDOWS}
// Defined in mmsystem
SND_SYNC=0;
SND_ASYNC=1;
SND_NODEFAULT=2;
{$ENDIF}
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
{rewrite(fich_noms);
assign(fich_noms,'fnoms');
rewrite(fich_score);
assign(fich_score,'fscore');}
time:=0;
t:=0;
bonusthor:=false;
stopbonusthor:=true;
dv:=0;
timebonusthor:=10;
activebonusthor:=false;
playoops:=false;
stop:=true;
d:=0;
limit_left:=false;
limit_rigth:=false;
playingPart:=true;
growsize:=true;
score:=0;
label9.Left:=270;
label93.Left:=270;
label94.Left:=270;
label95.Left:=270;
label96.Left:=270;
al:=0;
av:=0;
a:=15;
c:=0;
compt:=0;
j:=0;
jv:=0;
label7.caption:='0';
label73.caption:='0';
label74.caption:='0';
label75.caption:='0';
label76.caption:='0';
comptvie:=1;
bonuslong:=false;
bonusvie:=false;
s[1]:=shape1;
s[2]:=shape2;
s[3]:=shape3;
s[4]:=shape4;
s[5]:=shape5;
s[6]:=shape6;
s[7]:=shape7;
s[8]:=shape8;
s[9]:=shape9;
s[10]:=shape10;
s[11]:=shape11;
s[12]:=shape12;
s[13]:=shape13;
s[14]:=shape14;
s[15]:=shape15;
s[16]:=shape16;
s[17]:=shape17;
s[18]:=shape18;
s[19]:=shape19;
s[20]:=shape20;
s1[21]:=shape21;
s1[22]:=shape22;
s1[23]:=shape23;
s1[24]:=shape24;
s1[25]:=shape25;
s1[26]:=shape26;
s1[27]:=shape27;
s1[28]:=shape28;
s1[29]:=shape29;
s1[30]:=shape30;
s1[31]:=shape31;
s1[32]:=shape32;
s1[33]:=shape33;
s1[34]:=shape34;
s1[35]:=shape35;
s1[36]:=shape36;
s1[37]:=shape37;
s1[38]:=shape38;
s1[39]:=shape39;
s1[40]:=shape40;
s2[41]:=shape41;
s2[42]:=shape42;
s2[43]:=shape43;
s2[44]:=shape44;
s2[45]:=shape45;
s2[46]:=shape46;
s2[47]:=shape47;
s2[48]:=shape48;
s2[49]:=shape49;
s2[50]:=shape50;
s2[51]:=shape51;
s2[52]:=shape52;
s2[53]:=shape53;
s2[54]:=shape54;
s2[55]:=shape55;
s2[56]:=shape56;
s2[57]:=shape57;
s2[58]:=shape58;
s2[59]:=shape59;
s2[60]:=shape60;
tabpanel[1]:=panel2;
tabpanel[2]:=panel3;
tabpanel[3]:=panel4;
tabpanel[4]:=panel5;
tabpanel[5]:=panel6;
tabBarre[1]:=shapeBarre1;
tabBarre[2]:=shapeBarre2;
tabBarre[3]:=shapeBarre3;
tabBarre[4]:=shapeBarre4;
tabBarre[5]:=shapeBarre5;
tabBall[1]:=Shapeball1;
tabBall[2]:=Shapeball2;
tabBall[3]:=Shapeball3;
tabBall[4]:=Shapeball4;
tabBall[5]:=Shapeball5;
s3[61]:=shape61;
s3[62]:=shape62;
s3[63]:=shape63;
s3[64]:=shape64;
s3[65]:=shape65;
s3[66]:=shape66;
s3[67]:=shape67;
s3[68]:=shape68;
s3[69]:=shape69;
s3[70]:=shape70;
s3[71]:=shape71;
s3[72]:=shape72;
s3[73]:=shape73;
s3[74]:=shape74;
s3[75]:=shape75;
s3[76]:=shape76;
s3[77]:=shape77;
s3[78]:=shape78;
s3[79]:=shape79;
s3[80]:=shape80;
s4[81]:=shape81;
s4[82]:=shape82;
s4[83]:=shape83;
s4[84]:=shape84;
s4[85]:=shape85;
s4[86]:=shape86;
s4[87]:=shape87;
s4[88]:=shape88;
s4[89]:=shape89;
s4[90]:=shape90;
s4[91]:=shape91;
s4[92]:=shape92;
s4[93]:=shape93;
s4[94]:=shape94;
s4[95]:=shape95;
s4[96]:=shape96;
s4[97]:=shape97;
s4[98]:=shape98;
s4[99]:=shape99;
s4[100]:=shape100;
s4[101]:=shape101;
s4[102]:=shape102;
s4[103]:=shape103;
s4[104]:=shape104;
s4[105]:=shape105;
s4[106]:=shape106;
s4[107]:=shape107;
s4[108]:=shape108;
s4[109]:=shape109;
s4[110]:=shape110;
s4[111]:=shape111;
s4[112]:=shape112;
s4[113]:=shape113;
s4[114]:=shape114;
s4[115]:=shape115;
s4[116]:=shape116;
s4[117]:=shape117;
s4[118]:=shape118;
s4[119]:=shape119;
s4[120]:=shape120;
s4[121]:=shape121;
s4[122]:=shape122;
tabLabel[1][1]= label9; //for bonus message
tabLabel[1][2]= label11; //for bonus thor
tabLabel[1][3]= label5; //for score
tabLabel[1][4]= label7; //for life
tabLabel[1][5]= label10 //for start
tabLabel[1][6]= label8; //for end
tabLabel[2][1]= label93; //for bonus message
tabLabel[2][2]= label113; //for bonus thor
tabLabel[2][3]= label53; //for score
tabLabel[2][4]= label73; //for life
tabLabel[2][5]= label103 //for start
tabLabel[2][6]= label83; //for end
tabLabel[3][1]= label94; //for bonus message
tabLabel[3][2]= label114; //for bonus thor
tabLabel[3][3]= label54; //for score
tabLabel[3][4]= label74; //for life
tabLabel[3][5]= label104 //for start
tabLabel[3][6]= label84; //for end
tabLabel[4][1]= label95; //for bonus message
tabLabel[4][2]= label115; //for bonus thor
tabLabel[4][3]= label55; //for score
tabLabel[4][4]= label75; //for life
tabLabel[4][5]= label105 //for start
tabLabel[4][6]= label85; //for end
tabLabel[5][1]= label96; //for bonus message
tabLabel[5][2]= label116; //for bonus thor
tabLabel[5][3]= label56; //for score
tabLabel[5][4]= label76; //for life
tabLabel[5][5]= label106; //for start
tabLabel[5][6]= label86; //for end
for t:=1 to 20 do
begin
tabsave[t]:=s[t].Top;
end;
for t:=21 to 40 do
begin
tabsave[t]:=s1[t].Top;
end;
for t:=41 to 60 do
begin
tabsave[t]:=s2[t].Top;
end;
for t:=61 to 80 do
begin
tabsave[t]:=s3[t].Top;
end;
for t:=81 to 122 do
begin
tabsave[t]:=s4[t].Top;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
end;
procedure TForm1.Edit1Change(Sender: TObject);
begin
end;
procedure TForm1.FormKeyPress(Sender: TObject; var key: char);
begin
if key='m' then
begin
if k=1 then
begin
limit_left:=false;
if limit_rigth=false then
Shapebarre1.Left:=Shapebarre1.left+jumpbar;
end;
if k=2 then
begin
limit_left:=false;
if limit_rigth=false then
Shapebarre2.Left:=Shapebarre2.left+jumpbar;
end;
if k=3 then
begin
limit_left:=false;
if limit_rigth=false then
Shapebarre3.Left:=Shapebarre3.left+jumpbar;
end;
if k=4 then
begin
limit_left:=false;
if limit_rigth=false then
Shapebarre4.Left:=Shapebarre4.left+jumpbar;
end;
if k=5 then
begin
limit_left:=false;
if limit_rigth=false then
Shapebarre5.Left:=Shapebarre5.left+jumpbar;
end;
end
else
if key='l' then
begin
if k=1 then
begin
limit_rigth:=false;
if limit_left=false then
Shapebarre1.Left:=Shapebarre1.left-jumpbar;
end;
if k=2 then
begin
limit_rigth:=false;
if limit_left=false then
Shapebarre2.Left:=Shapebarre2.left-jumpbar;
end;
if k=3 then
begin
limit_rigth:=false;
if limit_left=false then
Shapebarre3.Left:=Shapebarre3.left-jumpbar;
end;
if k=4 then
begin
limit_rigth:=false;
if limit_left=false then
Shapebarre4.Left:=Shapebarre4.left-jumpbar;
end;
if k=5 then
begin
limit_rigth:=false;
if limit_left=false then
Shapebarre5.Left:=Shapebarre5.left-jumpbar;
end;
end
else
if key='a' then
begin
if bonuslong=true then
begin
//sound effect for bonuslong
PlaySound('BarBonus.wav', psASync);
if k=1 then
Shapebarre1.width:=300;
if k=2 then
Shapebarre2.width:=300;
if k=3 then
Shapebarre3.width:=300;
if k=4 then
Shapebarre4.width:=300;
if k=5 then
Shapebarre5.width:=300;
bonuslong:=false;
end;
if bonusthor=true then
begin
activebonusthor:=true;
bonusthor:=false;
end;
end
else
if key='z' then
begin
if k = 1 then
begin
label10.Caption:='';
label10.top:=30;
label10.left:=1400;
end;
if k = 2 then
begin
label103.Caption:='';
label103.top:=30;
label103.left:=1400;
end;
if k = 3 then
begin
label104.Caption:='';
label104.top:=30;
label104.left:=1400;
end;
if k = 4 then
begin
label105.Caption:='';
label105.top:=30;
label105.left:=1400;
end;
if k = 5 then
begin
label106.Caption:='';
label106.top:=30;
label106.left:=1400;
end;
if comptvie<>0 then
begin
comptvie:=comptvie-1;
end;
if k=1 then
label7.caption:=inttostr(comptvie);
if k=2 then
label73.caption:=inttostr(comptvie);
if k=3 then
label74.caption:=inttostr(comptvie);
if k=4 then
label75.caption:=inttostr(comptvie);
if k=5 then
Label66.caption:=inttostr(comptvie);
timer1.enabled:=true;
timer3.enabled:=true;
c:=0;
timer7.interval:=10;
end;
end;
procedure TForm1.Image5Click(Sender: TObject);
begin
end;
procedure TForm1.Label10Click(Sender: TObject);
begin
end;
procedure TForm1.Label12Click(Sender: TObject);
begin
end;
procedure TForm1.Label13Click(Sender: TObject);
begin
timer1.enabled:=false;
timer2.enabled:=true;
timer3.enabled:=false;
timer4.enabled:=true;
timer5.enabled:=true;
timer7.enabled:=false;
timer6.enabled:=true;
timer8.enabled:=true;
timer9.enabled:=false;
time:=0;
if k= 1 then
begin
Shapeball1.left:=640;
Shapeball1.top:=632;
Shapebarre1.left:=560;
label10.caption:='press z to continue';
for t:=1 to 20 do
begin
s[t].top:=tabsave[t]
end;
end;
if k=2 then
begin
Shapeball2.left:=680;
Shapeball2.top:=624;
Shapebarre2.left:=592;
label103.caption:='press z to continue';
for t:=21 to 40 do
begin
s1[t].top:=tabsave[t]
end;
end;
if k=3 then
begin
Shapeball3.left:=664;
Shapeball3.top:=632;
Shapebarre3.left:=584;
label104.caption:='press z to continue';
for t:=41 to 60 do
begin
s2[t].top:=tabsave[t]
end;
end;
if k=4 then
begin
Shapeball4.left:=648;
Shapeball4.top:=624;
Shapebarre4.left:=560;
label105.caption:='press z to continue';
for t:=61 to 80 do
begin
s3[t].top:=tabsave[t]
end;
end;
if k=5 then
begin
Shapeball5.left:=645;
Shapeball5.top:=632;
Shapebarre5.left:=560;
label106.caption:='press z to continue';
for t:=81 to 122 do
begin
s4[t].top:=tabsave[t]
end;
end;
timer9.enabled:=false;
panel7.Top:=1000;
panel1.top:=160;
bonusthor:=false;
stopbonusthor:=true;
dv:=0;
timebonusthor:=10;
activebonusthor:=false;
playoops:=false;
stop:=true;
t:=0;
d:=0;
limit_left:=false;
limit_rigth:=false;
playingPart:=true;
growsize:=true;
score:=0;
label9.Left:=270;
label93.Left:=270;
label94.Left:=270;
label95.Left:=270;
label96.Left:=270;
al:=0;
av:=0;
a:=15;
c:=0;
compt:=0;
j:=0;
jv:=0;
label6.caption:='1';
label63.caption:='1';
label64.caption:='1';
label65.caption:='1';
label66.caption:='1';
comptvie:=1;
bonuslong:=false;
label6.caption:='0';
label63.caption:='0';
label64.caption:='0';
label65.caption:='0';
label66.caption:='0';
bonusvie:=false;
label8.left:=1400;
label8.top:=304;
label83.left:=1400;
label83.top:=304;
label84.left:=1400;
label84.top:=304;
label85.left:=1400;
label85.top:=304;
label86.left:=1400;
label86.top:=304;
end;
procedure TForm1.Label14Click(Sender: TObject);
begin
Destroy();
application.terminate;
end;
procedure TForm1.Label15Click(Sender: TObject);
begin
end;
procedure TForm1.Label16Click(Sender: TObject);
begin
end;
procedure TForm1.Label2MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
end;
procedure TForm1.Label3Click(Sender: TObject);
begin
Edit1.Enabled := false; //For preventing him to catch the FormKeyressEvent
randomize;
k:=random(5)+1;
tabpanel[k].left:=0;
tabpanel[k].top:=0;
panel1.top:=1000;
jumpbal:=7;
jumpbar:=17;
longbarre:=150;
if k=1 then
shapebarre1.width:=longbarre;
if k=2 then
shapebarre2.width:=longbarre;
if k=3 then
shapebarre3.width:=longbarre;
if k=4 then
shapebarre4.width:=longbarre;
if k=5 then
shapebarre5.width:=longbarre;
end;
procedure TForm1.Label4Click(Sender: TObject);
begin
Edit1.Enabled := false; //For preventing him to catch the FormKeyressEvent
randomize;
k:=random(5)+1;
tabpanel[k].left:=0;
tabpanel[k].top:=0;
panel1.top:=1000;
jumpbal:=10;
jumpbar:=20;
longbarre:=100;
if k=1 then
shapebarre1.width:=longbarre;
if k=2 then
shapebarre2.width:=longbarre;
if k=3 then
shapebarre3.width:=longbarre;
if k=4 then
shapebarre4.width:=longbarre;
if k=5 then
shapebarre5.width:=longbarre;
end;
procedure TForm1.Label75Click(Sender: TObject);
begin
end;
procedure TForm1.Label65Click(Sender: TObject);
begin
end;
procedure TForm1.Label76Click(Sender: TObject);
begin
end;
procedure TForm1.Label85Click(Sender: TObject);
begin
end;
procedure TForm1.Label95Click(Sender: TObject);
begin
end;
procedure TForm1.Label73Click(Sender: TObject);
begin
end;
procedure TForm1.Label1Click(Sender: TObject);
begin
end;
procedure TForm1.label74Click(Sender: TObject);
begin
end;
procedure TForm1.Label84Click(Sender: TObject);
begin
end;
procedure TForm1.Label2Click(Sender: TObject);
begin
Edit1.Enabled := false; //For preventing him to catch the FormKeyressEvent
randomize;
k:=random(5)+1;
tabpanel[k].left:=0;