-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLCARSeffects5.bas
2095 lines (1891 loc) · 105 KB
/
LCARSeffects5.bas
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
B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=StaticCode
Version=7.3
@EndOfDesignText@
'Code module
'Subs in this code module will be accessible from all modules.
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim Dots As List, MaxDots As Int = 6, CardyColors(6) As Byte, LastDrawnAt As Byte = -1,PreviousMode As Int ,CardyCache As List
'Type RomPoint(rf As Float, ri As Int)
Dim RomX As List, RomY As List, ROM_Beige As Int = Colors.rgb(199, 161, 148), ROM_LightBlue As Int = Colors.rgb(13, 165, 176), ROM_DarkBlue As Int = Colors.rgb(4, 137, 146), ROM_Green As Int = Colors.rgb(4, 118, 84)
Dim Rom_Fontsize As Int , Rom_FontsizeP As Int , ROM_LastUpdate As Int=-1, ROM_Texts As List , ROM_Angle As Int
'Tactical stuff
Type TacStarship(X As Int, Y As Int, Name As String, Serial As String, Alpha As Int, Cloaked As Boolean, Velocity As Int, Angle As Int, RedAlert As Boolean, PhaserRecharge As Int, TorpedoRecharge As Int, Target As Point, Shields As Int)
Type TacBattleGroup(Name As String, Prepend As String, Faction As Int, Ships As List, MaxShips As Int, HasCloak As Boolean, FollowFlagship As Boolean )
Dim BattleGroups As List , PhaserRechargeTime As Int=20, TorpedoRechargeTime As Int=50, TacPlanet As Int = 9999, TacMaxWidth As Int = 500, TacMaxHeight As Int = 100
Dim PhaserDamage As Int = 5, TorpedoDamage As Int = 10, SensorRange As Int = 50, EnemyShips As Int, AlliedShips As Int
'Qnet stuff
Dim Q_Angles(3) As TweenAlpha, Q_BMP As Bitmap, Q_Stars As List
'Sheliak stuff
Type SheliakChar(Index As Int, FlipX As Boolean, FlipY As Boolean, Color1 As Int, Color2 As Int)
Type SheliakString(Chars As List, X As Int, Y As Int, Speed As Int, Size As Int, Alpha As Int)
Dim Sheliak As List, SheliakStrings As List, ShowText As Boolean, S_CurrentLine As Int= -1, S_Lines As Int, S_Text() As String, S_Width As Int, S_LastUpdate As Long
'WARP FIELD stuff
Dim WF_RND_ID As Int
'CARDY STUFF
Dim CRD_LastUpdate As Long, GIFloaded As Boolean
End Sub
Sub SetUpSheliak(Strings As Int)
If Not(Sheliak.IsInitialized) Then
Sheliak.Initialize
Sheliak.Add(Array As Double(0.0125,0.475,0.25,0,0.475,0,0.475,0.175,0.4,0.175,0.25,0.475,-1,0,0.525,0.175,0.525,0,0.75,0,0.9875,0.475,0.75,0.475,0.6,0.175,-1,0,0.75,0.525,0.9875,0.525,0.75,1,0.525,1,0.525,0.825,0.6,0.825,-1,0))
Sheliak.Add(Array As Double(0.0125,0.475,0.9875,0.475,0.75,0,0.25,0,0.15,0.2,0.25,0.2,0.3,0.1,0.7,0.1,0.8125,0.325,0.0875,0.325,-1,0,0.9875,0.525,0.825,0.525,0.6875,0.8,0.4125,0.8,0.4125,0.675,0.0875,0.675,0.25,1,0.75,1,-1,0))
Sheliak.Add(Array As Double(0.0125,0.475,0.9875,0.475,0.75,0,0.625,0,0.8125,0.375,0.1625,0.375,0.35,0,0.25,0,-1,0,0.0125,0.525,0.9875,0.525,0.75,1,0.4,1,0.55,0.7,0.1875,0.7,0.3375,1,0.25,1,-1,0))
Sheliak.Add(Array As Double(0,0.5,0.1125,0.275,0.35,0.275,0.4625,0.5,0.35,0.725,0.1125,0.725,-1,0,1,0.5,0.8875,0.275,0.65,0.275,0.5375,0.5,0.65,0.725,0.8875,0.725,-1,0))
Sheliak.Add(Array As Double(0.0125,0.475,0.3,0.475,0.375,0.325,0.8,0.325,0.875,0.475,0.9875,0.475,0.75,0,0.25,0,-1,0,0.0125,0.525,0.9875,0.525,0.75,1,0.65,1,0.8125,0.675,0.375,0.675,0.5375,1,0.25,1,-1,0))
Sheliak.Add(Array As Double(0.0125,0.475,0.9875,0.475,0.75,0,0.25,0,-1,0,0.0125,0.525,0.9875,0.525,0.75,1,0.25,1,-1,0))
Sheliak.Add(Array As Double(0.0125,0.475,0.55,0.475,0.6125,0.35,0.925,0.35,0.75,0,0.65,0,0.775,0.25,0.125,0.25,-1,0,0.075,0.65,0.825,0.65,0.8875,0.525,0.9875,0.525,0.8625,0.775,0.6625,0.775,0.55,1,0.25,1,-1,0))
Sheliak.Add(Array As Double(0.025,0.45,0.25,0,0.3,0,0.4625,0.325,0.525,0.325,0.6875,0,0.75,0,0.975,0.45,-1,0,0,0.5,1,0.5,0.95,0.6,0.4875,0.6,0.2875,1,0.25,1,-1,0))
Sheliak.Add(Array As Double(0.0125,0.475,0.175,0.475,0.3,0.225,0.55,0.225,0.6625,0,0.25,0,-1,0,0.0125,0.525,0.175,0.525,0.325,0.825,0.8375,0.825,0.75,1,0.25,1,-1,0,0.475,0.5125,0.6,0.7,0.7125,0.5125,-1,0,0.75,0.475,0.9875,0.475,0.86875,0.2375,-1,0))
Sheliak.Add(Array As Double(1,0.5,0.9125,0.675,0.64375,0.2,0.74375,0,-1,0,0.75,1,0.625,0.75,0.375,0.75,0.23125,0.4625,0.36875,0.225,0.25625,0,0.00625,0.5,0.125,0.5,0.3125,0.875,0.1875,0.875,0.25,1,-1,0))
Sheliak.Add(Array As Double(0.0875,0.325,0.6625,0.325,0.5,0,0.25,0,-1,0,0.4,0.375,0.35,0.475,0.9875,0.475,0.75,0,0.65,0,0.8375,0.375,-1,0,0,0.5,0.15,0.5,0.2875,0.775,0.4625,0.775,0.6,0.5,0.7875,0.5,0.65,0.775,0.8625,0.775,0.75,1,0.25,1,-1,0))
Sheliak.Add(Array As Double(0.025,0.45,0.975,0.45,0.75,0,0.25,0,0.1625,0.175,0.25,0.175,0.3,0.075,0.675,0.075,0.775,0.275,0.1125,0.275,-1,0,0.25,1,0.1625,0.825,0.1875,0.775,0.3625,0.775,0.225,0.5,0.4125,0.5,0.55,0.775,0.7,0.775,0.8375,0.5,1,0.5,0.75,1,-1,0))
Sheliak.Add(Array As Double(0.0125,0.525,0.175,0.525,0.3375,0.85,0.825,0.85,0.75,1,0.25,1,-1,0,0.9875,0.475,0.7875,0.475,0.625,0.15,0.525,0.15,0.525,0,0.75,0,-1,0,0.475,0.5,0.7125,0.5,0.5875,0.7,-1,0,0.0125,0.475,0.175,0.475,0.3375,0.15,0.425,0.15,0.425,0,0.25,0,-1,0))
SheliakStrings.Initialize
Do Until Strings < 1
MakeSheliak (0, -1)
Strings = Strings -1
Loop
End If
End Sub
Sub MakeSheliak(Digits As Int, Index As Int)
Dim SS As SheliakString, PrevChar As Int = -1
If Digits = 0 Then Digits = Rnd(5,13)
SS.Initialize
SS.Size = Rnd(5,11)
SS.Speed = Rnd(1,5)
SS.Alpha = Min(Rnd(6,16)*16, 255)
If Index = -1 Then SS.X = Rnd(0,100) Else SS.X = 100
SS.Y = Rnd(5,95)
SS.Chars.Initialize
Do Until Digits = 0
Dim sChar As SheliakChar
sChar.Initialize
sChar.Index = PrevChar
Do While sChar.Index = PrevChar
sChar.Index = Rnd(-1, Sheliak.Size)
Loop
If Rnd(0,100) > 50 Then sChar.FlipX = True
If Rnd(0,100) > 50 Then sChar.FlipY = True
sChar.Color1 = RandomSheliakColor
sChar.Color2 = RandomSheliakColor
Do While sChar.Color1 = sChar.Color2
sChar.Color2 = RandomSheliakColor
Loop
SS.Chars.Add(sChar)
Digits = Digits - 1
PrevChar = sChar.Index
Loop
If Index = -1 Then
SheliakStrings.Add(SS)
Else
SheliakStrings.Set(Index, SS)
End If
End Sub
Sub RandomSheliakColor As Int
Select Case Rnd(0, 6)
Case 0: Return LCAR.LCAR_Yellow 'Colors.RGB(180,255,161)'yellow
Case 1: Return LCAR.Classic_Turq 'Colors.rgb(142,228,201)'light green
Case 2: Return LCAR.Classic_Green 'Colors.rgb(104,186,104)'dark green
Case 3: Return LCAR.Classic_Blue 'Colors.rgb(38,70,157)'blue
Case 4: Return LCAR.LCAR_Blue 'Colors.rgb(94,93,173)'purple
Case 5: Return LCAR.Classic_LightBlue 'Colors.rgb(134,242,254)'teal
End Select
End Sub
Sub DrawSheliak(BG As Canvas, X As Int, Y As Int, Width As Int, Height As Int, FlipX As Boolean, FlipY As Boolean, Index As Int, Color1 As Int, Color2 As Int, Alpha As Int)
Dim IsEven As Boolean, temp As Int, Character() As Double = Sheliak.Get(Index), temp2 As Int, P As Path,NeedsInit As Boolean, Color As Int
If Index =-1 Then Return
If FlipX Then
X=X+Width
Width = Width*-1
End If
If FlipY Then
Y=Y+Height
Height=Height*-1
End If
AddSheliakPoint(P, X, Y, Width, Height, Character, 0, True)
For temp = 2 To Character.Length-1 Step 2
temp2 = Character(temp)
If temp2 = -1 Then
Color = LCAR.GetColor(API.IIF(IsEven, Color2,Color1), False, Alpha)
BG.DrawPath(P, Color, True, 0)
IsEven=Not(IsEven)
NeedsInit=True
Else
AddSheliakPoint (P, X, Y, Width, Height, Character, temp, NeedsInit)
NeedsInit=False
End If
Next
End Sub
Sub AddSheliakPoint(P As Path, X As Int, Y As Int, Width As Int, Height As Int, Character() As Double, Index As Int, IsFirst As Boolean)
X = X + Character(Index) * Width
Y = Y + Character(Index+1) * Height
If IsFirst Or Not(P.IsInitialized) Then
P.Initialize(X,Y)
Else
P.LineTo(X,Y)
End If
End Sub
Sub DrawFederationContract(BG As Canvas, X As Int, Y As Int, Width As Int, Height As Int, SubtractLines As Int)
Dim Temp As Int, LineHeight As Int = BG.MeasureStringHeight("ABC[](),", LCAR.LCARfont, LCAR.Fontsize) + LCAR.ListitemWhiteSpace, Lines As Int = Height / LineHeight - SubtractLines, MaxHeight As Int = Y+Height - LineHeight*SubtractLines
'S_CurrentLine As Int, S_Lines As Int, S_LastUpdate
LCARSeffects.MakeClipPath(BG,X,Y,Width,Height)
If S_Width <> Width Then
S_Text = Regex.Split(CRLF, API.TextWrap(BG, LCAR.LCARfont, LCAR.Fontsize, File.ReadString(File.DirAssets, "armens.txt"), Width))
S_Width = Width
End If
If S_CurrentLine >= S_Text.Length Then
S_CurrentLine = -1
S_Lines=0
Else
For Temp = S_CurrentLine To S_CurrentLine + S_Lines
If Temp > -1 And Temp < S_Text.Length And Y+LineHeight < MaxHeight Then
If Not( S_Text(Temp).StartsWith("%N%")) Then
LCAR.DrawTextbox(BG, S_Text(Temp), LCAR.LCAR_LightPurple, X, Y, 0,0, 7)
End If
End If
Y=Y+LineHeight
Next
If S_Lines > S_CurrentLine + Lines + 10 Then
S_CurrentLine = S_CurrentLine + Lines
S_Lines=0
End If
End If
BG.RemoveClip
End Sub
Sub DrawSheliakContract(BG As Canvas, X As Int, Y As Int, Width As Int, Height As Int)
Dim Y2 As Int = Y+Height-LCAR.ItemHeight, Y3 As Int
If Not(SheliakStrings.IsInitialized) Then IncrementSheliak
If ShowText Then
Y3 = Height*0.5
DrawFederationContract(BG, X+LCAR.leftside, Y+LCAR.ItemHeight+LCAR.ListitemWhiteSpace, Width - LCAR.leftside*2, Y3 - LCAR.ListitemWhiteSpace*3, 2)
DrawSheliakStrings(BG, X,Y+Y3+ 10+LCAR.ListitemWhiteSpace, Width, Y3 - LCAR.ListitemWhiteSpace*2)
LCAR.DrawTextbox(BG, "ENGLISH LANGUAGE VERSION (UNITED FEDERATION OF PLANETS)", LCAR.LCAR_LightPurple, X+Width-LCAR.leftside, Y+ Y3 - 10 - LCAR.ListitemWhiteSpace*2, 0,0, 9)
LCAR.DrawTextbox(BG, "SHELIAK LANGUAGE VERSION (SHELIAK CORPORATE)", LCAR.LCAR_LightPurple, X+Width-LCAR.leftside, Y2 - LCAR.ListitemWhiteSpace*2, 0,0,9)
LCARSeffects4.DrawRect(BG, X+ LCAR.leftside, Y+Y3-10, Width-LCAR.leftside*2, 20, LCAR.GetColor(LCAR.LCAR_Purple, False, 255), 0)
Else
DrawSheliakStrings(BG, X,Y+LCAR.ItemHeight+ LCAR.ListitemWhiteSpace, Width, Height - LCAR.ItemHeight*2 - LCAR.ListitemWhiteSpace*2)
End If
LCARSeffects4.DrawRect(BG,X,Y,Width,LCAR.ItemHeight+LCAR.ListitemWhiteSpace, LCAR.LCAR_Black, 0)
LCARSeffects4.DrawRect(BG,X,Y2-LCAR.ListitemWhiteSpace,Width,LCAR.ItemHeight+LCAR.ListitemWhiteSpace, LCAR.LCAR_Black, 0)
LCARSeffects2.DrawTextButton(BG,X,Y,Width,LCAR.LCAR_LightYellow,LCAR.LCAR_LightOrange,LCAR.LCAR_LightYellow, 255,False, "FILE 337-02 TREATY OF ARMENS", LCAR.LCAR_Orange, False, True,False)
LCARSeffects2.DrawTextButton(BG,X,Y2,Width, LCAR.LCAR_LightBlue,LCAR.LCAR_LightOrange,LCAR.LCAR_Orange, 255,False, "", LCAR.LCAR_LightOrange, True, True,False)
End Sub
Sub DrawSheliakStrings(BG As Canvas, X As Int, Y As Int, Width As Int, Height As Int)
Dim temp As Int, SS As SheliakString, X2 As Int, Y2 As Int, Size As Int, temp2 As Int, WhiteSpace As Int = 2, sChar As SheliakChar
For temp = 0 To SheliakStrings.Size - 1
SS = SheliakStrings.Get(temp)
X2 = X + Width * (SS.X * 0.01)
Y2 = Y + Height * (SS.Y * 0.01)
Size = Min(Width,Height) * (SS.Size * 0.01)
For temp2 = 0 To SS.Chars.Size - 1
sChar = SS.Chars.Get(temp2)
If X2 + Size > X And X2 < X + Width And sChar.Index > -1 Then
DrawSheliak(BG, X2,Y2, Size,Size, sChar.FlipX, sChar.FlipY, sChar.Index, sChar.Color1, sChar.Color2, SS.Alpha)
End If
X2 = X2 + Size + WhiteSpace
Next
Next
End Sub
Sub IncrementSheliak As Boolean
Dim temp As Int, SS As SheliakString
If Not(SheliakStrings.IsInitialized) Then
SetUpSheliak(15)
S_LastUpdate = DateTime.Now
Else
For temp = 0 To SheliakStrings.Size - 1
SS = SheliakStrings.Get(temp)
SS.X = SS.X - SS.Speed
If SS.X < 0 Then
If SS.X + (SS.Size * SS.Chars.Size) <= 0 Then
MakeSheliak (0, temp)
End If
End If
Next
If ShowText And S_LastUpdate < DateTime.Now - DateTime.TicksPerSecond*0.1 Then
S_Lines = S_Lines+ 1
S_LastUpdate = DateTime.Now
End If
End If
Return True
End Sub
Sub RandomizeCardyColors
Dim temp As Int , temp2 As Int, temp3 As Int,temp4 As Int, MaxColors As Int = CardyColor(-4, 0)
If LastDrawnAt = -1 Then
For temp = 0 To CardyColors.Length -1
CardyColors(temp)= Rnd(1,MaxColors)
If temp>0 Then
Do While CardyColors(temp)=CardyColors(temp-1)'reduce touching colors
CardyColors(temp)= Rnd(1,MaxColors)
Loop
End If
Next
LastDrawnAt = DateTime.GetSecond(DateTime.Now)
Else If LastDrawnAt <> DateTime.GetSecond(DateTime.Now) Then
temp = Rnd(0, CardyColors.Length)
temp2= Rnd(1,MaxColors)
temp3 = temp+1
If temp3 = CardyColors.Length Then temp3=0'reduce touching colors
temp4= temp-1
If temp4<0 Then temp4 = CardyColors.Length-1
Do While temp2 = CardyColors(temp) Or temp2 = CardyColors(temp3) Or temp2 = CardyColors(temp4)
temp2= Rnd(1,MaxColors)
Loop
CardyColors(temp) = temp2
LastDrawnAt = DateTime.GetSecond(DateTime.Now)
End If
End Sub
Sub DrawShatterglass(BG As Canvas, X As Int, Y As Int, Width As Int, Height As Int, Mode As Int)
Dim MaxRadius As Int = Min(Width,Height)*0.5, CenterX As Int = X + Width*0.5, CenterY As Int = Y + Height*0.5, R2 As Int = MaxRadius*2, temp As Int ,P As Path, Gray As Int = CardyColor(-2,128), DrawCardy As Boolean
LCARSeffects4.DrawRect(BG,X,Y,Width,Height,Colors.black, 0)
DrawCardy = DrawCardyMode(BG, CenterX, CenterY, MaxRadius, Mode, True)
RandomizeCardyColors
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, R2, CardyColor(-3,0), MaxRadius*-0.95, MaxRadius, Array As Int(0,50))
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, R2, CardyColor(-3,0), MaxRadius*-1.00, MaxRadius, Array As Int(50,90))
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, R2, CardyColor(-3,1), MaxRadius*-1.00, MaxRadius, Array As Int(90,130))
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, R2, CardyColor(-3,1), MaxRadius*-0.85, MaxRadius, Array As Int(130,135))
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, R2, CardyColor(-3,2), MaxRadius*-1.00, MaxRadius, Array As Int(180,220))
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, R2, CardyColor(-3,2), MaxRadius*-0.95, MaxRadius, Array As Int(220,270))
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, R2, CardyColor(-3,3), MaxRadius*-0.95, MaxRadius, Array As Int(270,290))
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, R2, CardyColor(-3,4), MaxRadius*-0.95, MaxRadius, Array As Int(290,315))
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, R2, CardyColor(-3,5), MaxRadius*-0.95, MaxRadius, Array As Int(315,360))
If Width>Height Then
temp=Width*0.5-MaxRadius
LCARSeffects4.DrawRect(BG,X,Y, temp, Height, Colors.Black,0)
LCARSeffects4.DrawRect(BG,X+Width-temp,Y, temp, Height, Colors.Black,0)
Else
temp=Height*0.5-MaxRadius
LCARSeffects4.DrawRect(BG,X,Y, Width,temp,Colors.Black,0)
LCARSeffects4.DrawRect(BG,X,Y+Height-temp, Width,temp,Colors.Black,0)
End If
'block 1 (up)
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, R2, Colors.Gray, MaxRadius*0.95, 4, Array As Int(0,50, 220,245, 245,290, 290,360))
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, R2, Gray, MaxRadius*0.75,4, Array As Int(0,50))
'block 2 (right)
DrawLine(BG, CenterX,CenterY, 50, MaxRadius*0.55, MaxRadius*1.00, Gray, 4)
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, R2, Gray, MaxRadius*0.55,4, Array As Int(50,130))
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, R2, Colors.Gray, MaxRadius*1.00,4, Array As Int(50,130))
DrawLine(BG, CenterX,CenterY, 130, MaxRadius*0.55, MaxRadius*1.00, Gray, 4)
'block 3 (small segments, down right)
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, R2, Gray, MaxRadius*0.65,4, Array As Int(130,140))
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, R2, Gray, MaxRadius*0.75,4, Array As Int(130,140))
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, R2, Colors.Gray, MaxRadius*0.85,4, Array As Int(130,140))
'block 4 (down)
DrawLine(BG, CenterX,CenterY, 140, MaxRadius*0.55, MaxRadius*1.00, Gray, 4)
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, R2, Gray, MaxRadius*0.55,4, Array As Int(140,220))
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, R2, Colors.Gray, MaxRadius*1.00,4, Array As Int(140,220))
DrawLine(BG, CenterX,CenterY, 220, MaxRadius*0.55, MaxRadius*1.00, Gray, 4)
'block 5 (left)
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, R2, Gray, MaxRadius*0.65,16, Array As Int(220,245, 245,290, 290,360))'220 to 360 THICK
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, R2, Gray, MaxRadius*0.75,4, Array As Int(220,270))
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, R2, Gray, MaxRadius*0.85,4, Array As Int(270,300, 300,330, 330,360))'270 to 360
DrawLine(BG, CenterX,CenterY, 0, MaxRadius*0.65, MaxRadius*0.85, Gray, 4)
DrawDots(BG, CenterX,CenterY, MaxRadius, Gray,16)
'extra lines
LCARSeffects.MakeClipPath(BG,CenterX-MaxRadius,CenterY-MaxRadius,R2,R2)
DrawLine(BG, CenterX,CenterY, 0, MaxRadius*0.95, MaxRadius*1.50, Colors.Gray, 4)'block 1
DrawLine(BG, CenterX,CenterY, 65, MaxRadius*1.00, MaxRadius*1.50, Colors.Gray, 4)'block 2
DrawLine(BG, CenterX,CenterY, 135, MaxRadius*0.65, MaxRadius*1.5, Colors.Gray, 4)'block 3
DrawLine(BG, CenterX,CenterY, 270, MaxRadius*0.65, MaxRadius*1.5, Colors.Gray, 4)'block 5a
DrawLine(BG, CenterX,CenterY, 280, MaxRadius*0.85, MaxRadius*1.5, Colors.Gray, 4)'block 5b
DrawLine(BG, CenterX,CenterY, 290, MaxRadius*0.95, MaxRadius*1.50, Colors.Gray, 4)'block 5c
DrawLine(BG, CenterX,CenterY, 315, MaxRadius*0.95, MaxRadius*1.50, Colors.Gray, 4)'block 5d
If DrawCardy Then DrawCardyMode(BG, CenterX, CenterY, MaxRadius, Mode, True)
BG.RemoveClip
'borders
LCARSeffects.MakeClipPath(BG,CenterX-MaxRadius-temp*2,CenterY-MaxRadius-temp*2,R2+temp*3,R2+temp*3)
temp=8
CenterX=CenterX-MaxRadius
CenterY=CenterY-MaxRadius
'top
BG.DrawLine(CenterX, CenterY, CenterX+R2-MaxRadius*0.6, CenterY, Colors.Gray, 16)
P.Initialize (CenterX+R2-MaxRadius*0.6, CenterY)
P.LineTo(CenterX+R2, CenterY+MaxRadius*0.4)
P.LineTo(CenterX+R2, CenterY)
P.LineTo(CenterX+R2-MaxRadius*0.6, CenterY)
BG.DrawPath(P, Colors.black, True,0)
BG.DrawLine(CenterX+R2-MaxRadius*0.6-temp, CenterY, CenterX+R2+temp*2, CenterY+MaxRadius*0.4+temp, Colors.Gray, 16)
BG.RemoveClip
LCARSeffects4.DrawRect(BG, CenterX+R2+temp*2, CenterY, 10, R2, Colors.Black, 0)'cover up edge
If Height>Width Then
'bottom
BG.DrawLine(CenterX-temp, CenterY+R2+temp, CenterX+MaxRadius*1.2, CenterY+R2+temp, Colors.Gray, 16)
BG.DrawLine(CenterX+MaxRadius*1.4, CenterY+R2+temp, CenterX+R2+temp, CenterY+R2+temp, Colors.Gray, 16)
Gray=Height*0.5 - MaxRadius
'down/left
BG.DrawLine(CenterX+MaxRadius*1.2, CenterY+R2, CenterX+MaxRadius*1.3, CenterY+R2+(Gray*0.5), Colors.Gray, 16)
BG.DrawLine(CenterX+MaxRadius*1.3+temp, CenterY+R2+(Gray*0.5)-temp, CenterX, Y+Height, Colors.Gray, 16)
'down right
BG.DrawLine(CenterX+MaxRadius*1.4, CenterY+R2, CenterX+MaxRadius*1.5, CenterY+R2+(Gray*0.5), Colors.Gray, 16)
BG.DrawLine(CenterX+MaxRadius*1.5-temp, CenterY+R2+(Gray*0.5)-temp, X+Width+(Gray*0.5), Y+Height, Colors.Gray, 16)
BG.DrawLine(X+Height-temp, CenterY+MaxRadius*0.5, CenterX+MaxRadius , Y-Gray, Colors.Gray, 16)
Else
'left
BG.DrawLine(CenterX-temp, CenterY-temp, CenterX-temp, CenterY+MaxRadius*0.2, Colors.Gray, 16)
BG.DrawLine(CenterX-temp, CenterY+MaxRadius*0.2-temp, X, CenterY+MaxRadius*0.1-temp, Colors.Gray, 16)'out
BG.DrawLine(CenterX-temp, CenterY+MaxRadius*0.4+temp, X, CenterY+MaxRadius*0.3+temp, Colors.Gray, 16)'out
BG.DrawLine(CenterX-temp, CenterY+MaxRadius*0.4, CenterX-temp, CenterY+MaxRadius*1.2, Colors.Gray, 16)
BG.DrawLine(CenterX-temp, CenterY+MaxRadius*1.2-temp, X, CenterY+MaxRadius*1.3-temp, Colors.Gray, 16)'out
BG.DrawLine(CenterX-temp, CenterY+MaxRadius*1.4+temp, X, CenterY+MaxRadius*1.5+temp, Colors.Gray, 16)'out
BG.DrawLine(CenterX-temp, CenterY+MaxRadius*1.4, CenterX-temp, CenterY+MaxRadius*2, Colors.Gray, 16)
'right
BG.DrawLine(CenterX+R2+temp, CenterY+MaxRadius*0.4, CenterX+R2+temp, CenterY+MaxRadius*0.9, Colors.Gray, 16)
BG.DrawLine(CenterX+R2+temp, CenterY+MaxRadius*1.1, CenterX+R2+temp, CenterY+R2+temp, Colors.Gray, 16)
Gray=Width*0.5 - MaxRadius
'right/up
BG.DrawLine(CenterX+R2+temp, CenterY+MaxRadius*0.9-temp, X+Width, CenterY+MaxRadius*0.8, Colors.Gray, 16)
BG.DrawLine(X+Width-temp, CenterY+MaxRadius*0.8, X+Width-temp, CenterY+MaxRadius*0.5, Colors.Gray, 16)
'right/down
BG.DrawLine(CenterX+R2+temp, CenterY+MaxRadius*1.1+temp, X+Width, CenterY+MaxRadius*1.2, Colors.Gray, 16)
BG.DrawLine(X+Width-temp, CenterY+MaxRadius*1.2, X+Width-temp, Y+Height, Colors.Gray, 16)
BG.DrawLine(X+Width, CenterY+MaxRadius*0.5+temp, CenterX+MaxRadius*1.2 , Y-Gray, Colors.Gray, 16)
End If
'return centerX/Y to center coordinates
If DrawCardy Then DrawCardyMode(BG, CenterX+MaxRadius, CenterY+MaxRadius , MaxRadius, Mode, False)
End Sub
Sub DrawLine(BG As Canvas, X As Int, Y As Int, Angle As Int, StartRadius As Int, EndRadius As Int, Color As Int, Stroke As Int)
BG.DrawLine( Trig.findXYAngle(X,Y,StartRadius, Angle, True), Trig.findXYAngle(X,Y,StartRadius, Angle, False), Trig.findXYAngle(X,Y,EndRadius, Angle, True), Trig.findXYAngle(X,Y,EndRadius, Angle, False), Color,Stroke)
End Sub
Sub CardyColor(Index As Int, Alpha As Int) As Int
Select Case Index
Case -4: Return 10'max colors
Case -3: Return CardyColor(CardyColors(Alpha), 255)
Case -2: Return Colors.ARGB(Alpha, 182, 176, 167) 'grey
Case -1: Return Colors.Transparent 'transparent
Case 0: Return Colors.ARGB(Alpha, 0, 0, 0) 'black
Case 1: Return Colors.ARGB(Alpha, 143, 141, 48) 'gold
Case 2: Return Colors.ARGB(Alpha, 187, 53, 30) 'light red
Case 3: Return Colors.ARGB(Alpha, 97, 29, 10) 'dark red
Case 4: Return Colors.ARGB(Alpha, 28, 217, 234) 'turquoise
Case 5: Return Colors.ARGB(Alpha, 89, 215, 124) 'neon green
Case 6: Return Colors.ARGB(Alpha, 174, 153, 210) 'light purple
Case 7: Return Colors.ARGB(Alpha, 105, 130, 135) 'dark turquoise
Case 8: Return Colors.ARGB(Alpha, 199, 124, 63) 'dark orange
Case 9: Return Colors.ARGB(Alpha, 202, 189, 128) 'dark yellow
End Select
End Sub
Sub SetupAndIncrementDots As Int
Dim temp As Int
If Not(Dots.IsInitialized) Then 'dots are of type tweenalpha
Dots.Initialize
For temp = 1 To MaxDots
Dim tempDot As TweenAlpha
tempDot.Initialize
tempDot.Current = Rnd(0,301)
tempDot.Desired = Rnd(0,301)
Dots.Add(tempDot)
Next
End If
For temp = 0 To Dots.Size-1 'increment dots
Dim tempDot As TweenAlpha = Dots.Get(temp)
tempDot.Current = LCAR.Increment(tempDot.Current, 5, tempDot.Desired)
If tempDot.Current = tempDot.Desired Then tempDot.Desired = Rnd(0,301)
Next
End Sub
Sub DrawDots(BG As Canvas, CenterX As Int, CenterY As Int, MaxRadius As Int, Color As Int, Radius As Int)
SetupAndIncrementDots
DrawDot(BG,CenterX,CenterY,MaxRadius,Color,Radius, Dots.Get(0), 220, 1.00, 0.65, 360, 0.85)'along thick left edge
DrawDot(BG,CenterX,CenterY,MaxRadius,Color,Radius, Dots.Get(1), 50, 0.55, 1.00, 130, 0.55)'right block
DrawDot(BG,CenterX,CenterY,MaxRadius,Color,Radius, Dots.Get(2), 130, 1.00, 0.65, 140, 1.00)'small segments, down right
DrawDot(BG,CenterX,CenterY,MaxRadius,Color,Radius, Dots.Get(3), 140, 0.55, 1.00, 220, 0.55)'bottom block
DrawDot(BG,CenterX,CenterY,MaxRadius,Color,Radius, Dots.Get(4), 220, 0.55, 0.95, 50, 0.55)'left/top outer edge
DrawDot(BG,CenterX,CenterY,MaxRadius,Color,Radius, Dots.Get(5), 270, 0.65, 0.85, 360, 0.65)'upper/left middle edge
End Sub
Sub DrawDot(BG As Canvas, CenterX As Int, CenterY As Int, MaxRadius As Int, Color As Int, Radius As Int, Dot As TweenAlpha, LeftAngle As Int, LeftStartRadius As Float, LeftEndRadius As Float, RightAngle As Int, RightEndRadius As Float)
Dim Angle As Int=-1, Distance As Int ,Value As Int = Dot.Current
If Value> 100 And Value < 200 Then
Distance= LeftEndRadius*MaxRadius
Value=Value-100
If LeftAngle<RightAngle Then
Angle = (RightAngle-LeftAngle) * (Value*0.01) + LeftAngle
Else
Angle = ((360-LeftAngle +RightAngle) * (Value*0.01) + LeftAngle) Mod 360
End If
Else
If Value<=100 Then
Angle = LeftAngle
Distance = GetDistance(Value*0.01,LeftStartRadius,LeftEndRadius,MaxRadius)
Else
Angle = RightAngle
Distance = GetDistance((Value-200)*0.01,LeftEndRadius,RightEndRadius,MaxRadius)
End If
End If
BG.DrawCircle(Trig.findXYAngle(CenterX,CenterY,Distance,Angle, True), Trig.findXYAngle(CenterX,CenterY,Distance,Angle, False), Radius, Color, True, 0)
End Sub
Sub GetDistance(Value As Float, StartDistance As Float, EndDistance As Float,MaxRadius As Int) As Int
If StartDistance < EndDistance Then
Return ((EndDistance-StartDistance) * Value + StartDistance) * MaxRadius
Else
Return ((StartDistance-EndDistance) * (1-Value) + EndDistance) * MaxRadius
End If
End Sub
Sub SetupDS9(CurrentSection As Int, IsMain As Boolean)
If (CurrentSection = 63 And IsMain) Or Not(IsMain) Then
GIFloaded = File.exists(LCAR.DirDefaultExternal, "sysds9.png")
If GIFloaded Then LCARSeffects2.LoadUniversalBMP(LCAR.DirDefaultExternal, "sysds9.png", LCAR.CRD_Shatter)
End If
End Sub
Sub IncrementCardy(Mode As Int)
Dim NeedsInit As Boolean = PreviousMode <> Mode, temp As Int
If NeedsInit Then CardyCache.Initialize
Select Case Mode
Case 1'weird, green line things
If NeedsInit Then
CardyCache.Add( Rnd(0, 360))'0
CardyCache.Add( Rnd(0, 360))'1
For temp = 1 To 10 'each unit
CardyCache.Add(CardyColor(Rnd(4,6),255))'0 color
Dim tempAlpha As TweenAlpha , tempBeta As TweenAlpha
tempAlpha.Initialize
tempAlpha.Current = Rnd(10,110)
tempAlpha.desired = Rnd(10,110)
CardyCache.Add( tempAlpha)'1 (radius %*100)
tempBeta.Initialize
tempBeta.Current=Rnd(0,360)
tempBeta.Desired=Rnd(0,360)
CardyCache.Add(tempBeta)'2 (angle)
Next
End If
CardyCache.Set(0, (CardyCache.Get(0) + 15) Mod 360)'0
temp = CardyCache.Get(1) - 15
If temp <0 Then temp = temp+ 360
CardyCache.Set(1, temp)'1
For temp = 2 To CardyCache.Size - 1 Step 3
CardyCache.Set(temp+1, IncrementTweenAlpha(CardyCache.Get(temp+1), 5, 10,110))'1 (radius %*100)
CardyCache.Set(temp+2, IncrementAngle(CardyCache.Get(temp+2), 5))'2 (angle)
Next
Case 2'DS9 wireframe
If GIFloaded Then
If DateTime.Now < CRD_LastUpdate + 100 Then Return
End If
ROM_Angle=ROM_Angle+1
If GIFloaded Then
If ROM_Angle >= 15 Then ROM_Angle= 0
Else
Wireframe.GetModel(File.DirAssets, "ds9.3d").isClean=False
If ROM_Angle >=360 Then ROM_Angle = 0
End If
CRD_LastUpdate = DateTime.Now
End Select
NeedsInit=False
PreviousMode=Mode
End Sub
Sub DrawCardyMode(BG As Canvas, CenterX As Int, CenterY As Int, Radius As Int, Mode As Int, Before As Boolean) As Boolean
Dim temp As Int, X As Int=CenterX-Radius, Y As Int=CenterY-Radius, Angle As Int, Distance As Int =Radius*2, Color As Int
If PreviousMode = Mode Or GIFloaded Then
'Log("CARDY: " & PreviousMode & " " & Mode & " " & GIFloaded & " " & Before)
Select Case Mode
Case 1'weird, green line things
If Before Then Return True
Angle = CardyCache.Get(0)
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, Radius, CardyColor(7,255), 0, Radius*0.55, Array As Int(Angle, Angle+45, Angle+45, Angle+90, Angle+90, Angle+135, Angle+135, Angle+180))
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, Radius, CardyColor(8,255), 0, Radius*0.55, Array As Int(Angle+180,Angle+225, Angle+225,Angle+270, Angle+270,Angle+315, Angle+315,Angle))
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, Radius, Colors.Gray, Radius*0.55, 4, Array As Int(0,45, 45,90, 90,135, 135,180, 180,225, 225,270, 270,315, 315,360))
For temp = 2 To CardyCache.Size - 1 Step 3
Color = CardyCache.Get(temp)
Distance = ReturnTweenAlpha(CardyCache.Get(temp+1)).Current * 0.01 * Radius
Angle = ReturnTweenAlpha(CardyCache.Get(temp+2)).Current
X = Trig.findXYAngle(CenterX,CenterY,Distance,Angle,True)
Y = Trig.findXYAngle(CenterX,CenterY,Distance,Angle,False)
BG.DrawLine(CenterX,CenterY, X,Y, Color, 20)
BG.DrawCircle(X, Y, 40, Color, True, 0)
Next
Angle = CardyCache.Get(1)'6 purple 9 yellow
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, Radius, CardyColor(9,255), 0, Radius*0.25, Array As Int(Angle, Angle+45, Angle+90, Angle+135, Angle+145, Angle+150 ))
LCARSeffects2.DrawSegmentedCircle(BG, CenterX,CenterY, Radius, CardyColor(6,255), 0, Radius*0.25, Array As Int(Angle+45,Angle+90, Angle+135,Angle+145, Angle+150, Angle+225 ))
Case 2'DS9 wireframe
'If WallpaperService.CurrentMode="PRV" Then
' LCARSeffects2.LoadUniversalGIF(LCAR.DirDefaultExternal, "ds9.gif", LCAR.CRD_Shatter)
'End If
Angle=Radius*0.2
If GIFloaded And Before Then
'LCARSeffects2.DrawGIF(BG, ROM_Angle, X+Angle ,Y+Angle, Distance-Angle*2, Distance-Angle*2)
BG.DrawBitmap( LCARSeffects2.CenterPlatform, LCARSeffects4.SetRect(495*ROM_Angle,0,495,410), LCARSeffects4.SetRect(X+Angle ,Y+Angle, Distance-Angle*2, Distance-Angle*2))
Return False
Else if Not(Before) Then
temp=35
Wireframe.DrawVerteces(BG, X+Angle ,Y+Angle, Distance-Angle*2, Distance-Angle*2, Wireframe.GetModel(File.DirAssets, "ds9.3d"), 1, False,255, ROM_Angle,temp, temp, False)
End If
End Select
End If
Return True
End Sub
'Sub ReturnSegments(Start As Int, Finish As Int, Increment As Int) As List
' Dim temp As Int, templist As List
' templist.Initialize
' For temp = start To finish Step increment
' templist.Add(temp Mod 360)
' templist.Add(temp Mod 360)
' Next
' Return templist
'End Sub
Sub ReturnTweenAlpha(Value As TweenAlpha) As TweenAlpha
Return Value
End Sub
Sub IncrementAngle(Value As TweenAlpha, Speed As Int) As TweenAlpha
If Value.Desired<90 And Value.Current > 270 Then
Value.Current = (Value.Current + Speed) Mod 360
Else If Value.Desired > 270 And Value.Current <90 Then
Value.Current = Value.Current - Speed
If Value.Current <0 Then Value.Current = Value.Current + 360
Else
Return IncrementTweenAlpha(Value,Speed,0,360)
End If
If Value.Current = Value.Desired Then Value.Desired = Rnd(0,360)
Return Value
End Sub
Sub IncrementTweenAlpha(Value As TweenAlpha, Speed As Int, RndMin As Int, RndMax As Int) As TweenAlpha
Value.Current = LCAR.Increment(Value.Current, Speed, Value.Desired)
If Value.Current = Value.Desired Then Value.Desired = Rnd(RndMin,RndMax)
Return Value
End Sub
Sub DrawMiniFrame(BG As Canvas, X As Int, Y As Int, DividerWidth As Int, TotalWidth As Int, Height As Int, ID As Int, Alpha As Int, Text As String)
Dim WhiteSpace As Int = 10, Width As Int =TotalWidth, Y2 As Int = Y, X2 As Int = TotalWidth*0.25, X3 As Int = X2, C As Float
LCAR.DrawText(BG, X+TotalWidth+1, Y, Text, LCAR.LCAR_Orange, 3,False,Alpha,-1)
If ID = 1 Then X3 = TotalWidth * 0.15
LCAR.DrawLCARelbow(BG, X, Y+Height-X3-DividerWidth,X2,X3+DividerWidth,DividerWidth,DividerWidth, -4, LCAR.Classic_Blue, False, "", 0, Alpha, False)
Select Case ID
Case 0
C= DrawMiniSquare( BG, X,Y, X3, DividerWidth, TotalWidth,Height, Alpha, 0, C, 1, 0.16375 , True, LCAR.LCAR_LightBlue, False)
C= DrawMiniSquare( BG, X,Y, X3, DividerWidth, TotalWidth,Height, Alpha, 0, C, 1, 0.135625 , True, LCAR.LCAR_LightBlue, True)
C= DrawMiniSquare( BG, X,Y, X3, DividerWidth, TotalWidth,Height, Alpha, 0, C, 1, 0.07625 , True, LCAR.LCAR_Orange, False)
C= DrawMiniSquare( BG, X,Y, X3, DividerWidth, TotalWidth,Height, Alpha, 0, C, 1, 0.245 , True, LCAR.LCAR_LightBlue, False)
C= DrawMiniSquare( BG, X,Y, X3, DividerWidth, TotalWidth,Height, Alpha, 0, C, 1, 0.0825 , True, LCAR.LCAR_Orange, False)
C= DrawMiniSquare( BG, X,Y, X3, DividerWidth, TotalWidth,Height, Alpha, 0, C, 1, 0.148125 , True, LCAR.LCAR_Orange, False)
C= DrawMiniSquare( BG, X,Y, X3, DividerWidth, TotalWidth,Height, Alpha, 0, C, 1, 1-C , True, LCAR.LCAR_LightBlue, True)
C=0
C= DrawMiniSquare( BG, X,Y, X2, DividerWidth, TotalWidth,Height, Alpha, C, 0, 0.60, 0.75 , False, LCAR.LCAR_LightBlue, False)
C= DrawMiniSquare( BG, X,Y, X2, DividerWidth, TotalWidth,Height, Alpha, C, 0, 0.35, 1.00 , False, LCAR.LCAR_Orange, False)
C= DrawMiniSquare( BG, X,Y, X2, DividerWidth, TotalWidth,Height, Alpha, C, 0, 0.05, 1.00 , False, LCAR.LCAR_LightBlue, True)
Case 1
C= DrawMiniSquare( BG, X,Y, X3, DividerWidth, TotalWidth,Height, Alpha, 0, C, 1, 0.25 , True, LCAR.LCAR_LightPurple, False)
C= DrawMiniSquare( BG, X,Y, X3, DividerWidth, TotalWidth,Height, Alpha, 0, C, 1, 0.10 , True, LCAR.LCAR_Yellow, False)
C= DrawMiniSquare( BG, X,Y, X3, DividerWidth, TotalWidth,Height, Alpha, 0, C, 1, 0.05 , True, LCAR.LCAR_Yellow, False)
C= DrawMiniSquare( BG, X,Y, X3, DividerWidth, TotalWidth,Height, Alpha, 0, C, 1, 0.20 , True, LCAR.LCAR_LightPurple, False)
C= DrawMiniSquare( BG, X,Y, X3, DividerWidth, TotalWidth,Height, Alpha, 0, C, 1, 1-C , True, LCAR.LCAR_LightBlue, False)
C=0
DrawMiniSquare( BG, X,Y, X2, DividerWidth, TotalWidth,Height, Alpha, C, 0, 0.60, 0.20 , False, LCAR.LCAR_LightPurple, False)
C= DrawMiniSquare( BG, X,Y, X2, DividerWidth, TotalWidth,Height, Alpha, C, 0.25, 0.60, 0.80 , False, LCAR.LCAR_LightPurple, False)
C= DrawMiniSquare( BG, X,Y, X2, DividerWidth, TotalWidth,Height, Alpha, C, 0, 0.32, 1.00 , False, LCAR.LCAR_LightBlue, False)
C= DrawMiniSquare( BG, X,Y, X2, DividerWidth, TotalWidth,Height, Alpha, C, 0, 0.08, 1.00 , False, LCAR.LCAR_LightBlue, True)
Case 2
C= DrawMiniSquare( BG, X,Y, X3, DividerWidth, TotalWidth,Height, Alpha, 0, C, 1, 0.15 , True, LCAR.LCAR_LightBlue, True)
C= DrawMiniSquare( BG, X,Y, X3, DividerWidth, TotalWidth,Height, Alpha, 0, C, 1, 0.12 , True, LCAR.LCAR_LightBlue, False)
C= DrawMiniSquare( BG, X,Y, X3, DividerWidth, TotalWidth,Height, Alpha, 0, C, 1, 0.32 , True, LCAR.LCAR_LightPurple, False)
C= DrawMiniSquare( BG, X,Y, X3, DividerWidth, TotalWidth,Height, Alpha, 0, C, 1, 0.06 , True, LCAR.LCAR_LightBlue, False)
C= DrawMiniSquare( BG, X,Y, X3, DividerWidth, TotalWidth,Height, Alpha, 0, C, 1, 0.04 , True, LCAR.LCAR_Orange, False)
C= DrawMiniSquare( BG, X,Y, X3, DividerWidth, TotalWidth,Height, Alpha, 0, C, 1, 1-C , True, LCAR.LCAR_LightPurple, False)
C=0
C= DrawMiniSquare( BG, X,Y, X2, DividerWidth, TotalWidth,Height, Alpha, C, 0, 0.60, 0.30 , False, LCAR.LCAR_LightBlue, True)
C= DrawMiniSquare( BG, X,Y, X2, DividerWidth, TotalWidth,Height, Alpha, C, 0, 0.35, 1.00 , False, LCAR.LCAR_Orange, False)
C= DrawMiniSquare( BG, X,Y, X2, DividerWidth, TotalWidth,Height, Alpha, C, 0, 0.05, 1.00 , False, LCAR.LCAR_LightBlue, False)
End Select
' Y2 = LCARSeffects4.DrawRect(BG,X,Y2,DividerWidth, Height*0.25, Red, 0)
' Y2 = LCARSeffects4.DrawRect(BG,X,Y2+ WhiteSpace,DividerWidth, Height*0.15, LCAR.GetColor( API.IIF(ID=1,LCAR.LCAR_DarkOrange, LCAR.LCAR_LightBlue ),False,Alpha), 0)
' Y2 = LCARSeffects4.DrawRect(BG,X,Y2+ WhiteSpace,DividerWidth, Height*0.25, Orange, 0)+WhiteSpace
'
' LCAR.DrawLCARelbow(BG,X, Y2, X2, Height-(Y2-Y), DividerWidth,DividerWidth, -4, LCAR.Classic_Blue, False, "", 0, Alpha, False)
'
' TotalWidth=TotalWidth-X2-WhiteSpace
' X2=X+X2+WhiteSpace
' Y2=Y+Height-DividerWidth
' If ID=1 Then
' LCARSeffects4.DrawRect(BG,X2,Y2, TotalWidth*0.8, DividerWidth*0.5, Red, 0)
' LCARSeffects4.DrawRect(BG,X2,Y2+DividerWidth*0.1, TotalWidth*0.8, DividerWidth*0.3, Red, 0)
' LCARSeffects4.DrawRect(BG,X2+TotalWidth*0.8+WhiteSpace,Y2, TotalWidth*0.2-WhiteSpace, DividerWidth*0.9, Orange,0)
' Else
' LCARSeffects4.DrawRect(BG,X2,Y2, TotalWidth*0.7, DividerWidth * API.IIF(ID=0,0.7,0.5),LCAR.GetColor(LCAR.LCAR_LightPurple,False,Alpha), 0)
'
' DividerWidth=DividerWidth*0.9
' X2=X2+ TotalWidth*0.7+WhiteSpace
' LCARSeffects4.DrawRect(BG,X2,Y2, TotalWidth * 0.15, DividerWidth, Orange, 0)
'
' X2=X2+ TotalWidth*0.15+WhiteSpace
' LCARSeffects4.DrawRect(BG,X2,Y2, TotalWidth * 0.10, DividerWidth, LCAR.GetColor( API.IIF(ID=0,LCAR.Classic_Blue, LCAR.LCAR_Red ), False,Alpha), 0)
'
' X2=X2+ TotalWidth*0.10+WhiteSpace
' Y=X2-X
' LCARSeffects4.DrawRect(BG,X2,Y2, Width-Y, DividerWidth, LCAR.GetColor( LCAR.LCAR_DarkOrange, False,Alpha),0)
' End If
End Sub
Sub DrawMiniSquare(BG As Canvas, X As Int, Y As Int, X3 As Int, DividerWidth As Int, TotalWidth As Int, Height As Int, Alpha As Int, X2 As Float, Y2 As Float, Width2 As Float, Height2 As Float, IsX As Boolean, ColorID As Int, State As Boolean) As Float
Dim Whitespace As Int = 4
If IsX Then
Height=Height-DividerWidth-X3
LCARSeffects4.DrawRect(BG, X, Y+ Y2*Height, Width2*DividerWidth, (Height*Height2)-Whitespace, LCAR.GetColor(ColorID,State,Alpha), 0)
Return Y2+Height2
Else
TotalWidth = TotalWidth-X3-Whitespace
X=X+ X3+Whitespace'+DividerWidth
LCARSeffects4.DrawRect(BG, X + TotalWidth*X2, Y+Height-DividerWidth+(DividerWidth*Y2), TotalWidth*Width2-Whitespace, DividerWidth*Height2 - API.IIF(Height2=1, 0,Whitespace), LCAR.GetColor(ColorID,State,Alpha), 0)
Return X2+Width2
End If
End Sub
Sub AddRomPoint(IsXaxis As Boolean, Pos As Int)
Dim temp As Float
'temp.Initialize
temp = Pos/API.IIF(IsXaxis, 717,558)
If IsXaxis Then
RomX.Add(temp)
Else
RomY.Add(temp)
End If
End Sub
'Alpha: Hour, Beta: Minute, Gamma: Month, Delta: Day
Sub DrawRomulan(BG As Canvas, X As Int, Y As Int, Width As Int, Height As Int, AlphaQ As Int, BetaQ As Int, GammaQ As Int, DeltaQ As Int, Scale As Boolean )
Dim P As Path , temp As Int , Size As tween
If AlphaQ = -1 Then AlphaQ = DateTime.GetHour(DateTime.Now)
If BetaQ = -1 Then BetaQ = DateTime.GetMinute(DateTime.Now)
If GammaQ = -1 Then GammaQ = DateTime.GetMonth(DateTime.Now)
If DeltaQ = -1 Then DeltaQ = DateTime.GetDayOfMonth(DateTime.Now)
If Scale Then
Size = LCAR.ThumbSize(717,558, Width, Height, True, False)
X= X + Width*0.5 - Size.currX *0.5
Y= Y+ Height*0.5-Size.curry*0.5
Width=Size.currX
Height=Size.curry
End If
If Not(RomX.IsInitialized) Then
If Not(LCAR.ROMfont.IsInitialized) Then LCAR.ROMfont = Typeface.LoadFromAssets("rom.ttf")
RomX.Initialize
RomY.Initialize
AddRomPoint(True, 0 )
AddRomPoint(True, 28 )
AddRomPoint(True, 55 )
AddRomPoint(True, 60 )
AddRomPoint(True, 102 )
AddRomPoint(True, 130 )
AddRomPoint(True, 159 )
AddRomPoint(True, 188 )
AddRomPoint(True, 218 )
AddRomPoint(True, 247 )
AddRomPoint(True, 298 )
AddRomPoint(True, 309 )
AddRomPoint(True, 328 )
AddRomPoint(True, 346 )
AddRomPoint(True, 367 )
AddRomPoint(True, 387 )
AddRomPoint(True, 404 )
AddRomPoint(True, 416 )
AddRomPoint(True, 431 )
AddRomPoint(True, 443 )
AddRomPoint(True, 473 )
AddRomPoint(True, 502 )
AddRomPoint(True, 496 )
AddRomPoint(True, 526 )
AddRomPoint(True, 555 )
AddRomPoint(True, 584 )
AddRomPoint(True, 615 )
AddRomPoint(True, 620 )
AddRomPoint(True, 657 )
AddRomPoint(True, 662 )
AddRomPoint(True, 688 )
AddRomPoint(True, 716 )
AddRomPoint(True, 282 )
AddRomPoint(True, 169)
AddRomPoint(True, 324)
AddRomPoint(True, 393)
AddRomPoint(True, 548)
AddRomPoint(True, 96)
AddRomPoint(False, 0 )
AddRomPoint(False, 18 )
AddRomPoint(False, 25 )
AddRomPoint(False, 53 )
AddRomPoint(False, 65 )
AddRomPoint(False, 80 )
AddRomPoint(False, 84 )
AddRomPoint(False, 103 )
AddRomPoint(False, 122 )
AddRomPoint(False, 143 )
AddRomPoint(False, 161 )
AddRomPoint(False, 179 )
AddRomPoint(False, 202 )
AddRomPoint(False, 220 )
AddRomPoint(False, 231 )
AddRomPoint(False, 250 )
AddRomPoint(False, 270 )
AddRomPoint(False, 289 )
AddRomPoint(False, 309 )
AddRomPoint(False, 328 )
AddRomPoint(False, 341 )
AddRomPoint(False, 358 )
AddRomPoint(False, 376 )
AddRomPoint(False, 418 )
AddRomPoint(False, 437 )
AddRomPoint(False, 456 )
AddRomPoint(False, 471 )
AddRomPoint(False, 475 )
AddRomPoint(False, 480 )
AddRomPoint(False, 494 )
AddRomPoint(False, 506 )
AddRomPoint(False, 534 )
AddRomPoint(False, 541 )
AddRomPoint(False, 558 )
AddRomPoint(False, 151)
AddRomPoint(False, 396)
End If'ROM_Beige, ROM_LightBlue, ROM_DarkBlue, ROM_Green
Rom_FontsizeP = ROM_GetPoint(0,0,Width,Height, False, 17) - ROM_GetPoint(0,0,Width,Height, False, 16)
Rom_Fontsize = API.GetTextHeight(BG, Rom_FontsizeP, "ABC", LCAR.ROMfont)
If ROM_LastUpdate <> DateTime.GetMinute(DateTime.Now) Then
ROM_Texts.Initialize
For temp = 0 To 21
ROM_Texts.Add(ROM_MakeText(API.IIF(temp<4,2,1),3))
Next
ROM_LastUpdate=DateTime.GetMinute(DateTime.Now)
End If
'top left squares
ROM_DrawShape(BG, X, Y, Width, Height, 2, 4, 38, 14, ROM_Beige, 0,1,1, 5)
ROM_DrawShape(BG, X, Y, Width, Height, 38, 4, 11, 14, ROM_LightBlue, 0,1,3, 6)
ROM_PrintText(BG, ROM_GetPoint(X,Y,Width,Height,True,38), Y, 0, ROM_Texts.Get(0), ROM_LightBlue, Rom_Fontsize*2)
'top right
ROM_DrawShape(BG, X, Y, Width, Height, 18, 4, 28, 14, ROM_LightBlue,0,1,0,0)
ROM_DrawShape(BG, X, Y, Width, Height, 28, 4, 31, 14, ROM_DarkBlue,0,1,3, 7)
ROM_PrintText(BG, ROM_GetPoint(X,Y,Width,Height,True,28), Y, 2, ROM_Texts.Get(1), ROM_LightBlue, Rom_Fontsize*2)
'bottom left
ROM_DrawShape(BG, X, Y, Width, Height, 2, 21, 38, 31, ROM_DarkBlue,0,1,1, 8)
ROM_DrawShape(BG, X, Y, Width, Height, 38, 21, 33, 31, ROM_LightBlue,0,1,0, 0)
ROM_PrintText(BG, ROM_GetPoint(X,Y,Width,Height,True,38), Y+Height-Rom_FontsizeP*2, 0, ROM_Texts.Get(2), ROM_LightBlue, Rom_Fontsize*2)
'bottom right
ROM_DrawShape(BG, X, Y, Width, Height, 19, 21, 28, 31, ROM_LightBlue,0,1,10,11)
ROM_DrawShape(BG, X, Y, Width, Height, 28, 21, 31, 31, ROM_Beige, 0,1,3,13 )
ROM_PrintText(BG, ROM_GetPoint(X,Y,Width,Height,True,28), Y+Height-Rom_FontsizeP*2, 2, ROM_Texts.Get(3), ROM_LightBlue, Rom_Fontsize*2)
'middle
ROM_DrawShape(BG, X, Y, Width, Height, 6, 9, 26, 25, Colors.Transparent, 0, 2, 0,0)
'top 3 squares
ROM_DrawShape(BG, X, Y, Width, Height, 12, 1, 13, 2, ROM_LightBlue,0,2,0,0)
ROM_DrawShape(BG, X, Y, Width, Height, 13, 1, 16, 2, ROM_LightBlue,0,2,0,0)
ROM_DrawShape(BG, X, Y, Width, Height, 16, 1, 17, 2, ROM_LightBlue,0,2,0,0)
'below top 3 squares (5 rects,0)
ROM_DrawShape(BG, X, Y, Width, Height, 12, 3, 13, 6, ROM_LightBlue,0,1,2,0)
ROM_DrawShape(BG, X, Y, Width, Height, 13, 3, 14, 6, ROM_DarkBlue,0,1,2,0)
ROM_DrawShape(BG, X, Y, Width, Height, 14, 3, 15, 6, ROM_DarkBlue,0,1,2,0)
ROM_DrawShape(BG, X, Y, Width, Height, 15, 3, 16, 6, ROM_DarkBlue,0,1,2,0)
ROM_DrawShape(BG, X, Y, Width, Height, 16, 3, 17, 6, ROM_LightBlue,0,1,2,0)
'below that
ROM_DrawShape(BG, X, Y, Width, Height, 12, 7, 13, 10, ROM_LightBlue,0,1,0,0)
ROM_DrawShape(BG, X, Y, Width, Height, 13, 7, 16, 10, ROM_DarkBlue,0,1,11, 14)
ROM_DrawShape(BG, X, Y, Width, Height, 16, 7, 17, 10, ROM_LightBlue,0,1,0,0)
'middle-left
ROM_DrawShape(BG, X, Y, Width, Height, 1, 15, 3, 16, ROM_DarkBlue,0,1,6,0)
ROM_DrawShape(BG, X, Y, Width, Height, 1, 16, 3, 17, ROM_LightBlue,0,1,6,0)
ROM_DrawShape(BG, X, Y, Width, Height, 1, 17, 3, 18, ROM_LightBlue,0,1,6,0)
ROM_DrawShape(BG, X, Y, Width, Height, 1, 18, 3, 19, ROM_LightBlue,0,1,6,0)
ROM_DrawShape(BG, X, Y, Width, Height, 1, 19, 3, 20, ROM_DarkBlue,0,1,6,0)
'right of middle-left
ROM_DrawShape(BG, X, Y, Width, Height, 4, 15, 7, 16, ROM_LightBlue,0,1,0,0)
ROM_DrawShape(BG, X, Y, Width, Height, 4, 16, 7, 19, ROM_DarkBlue,0,1,5, 15)
ROM_DrawShape(BG, X, Y, Width, Height, 4, 19, 7, 20, ROM_LightBlue,0,1,0,0)
'middle-right
ROM_DrawShape(BG, X, Y, Width, Height, 30, 15, 32, 16, ROM_LightBlue,0,1,4,0)
ROM_DrawShape(BG, X, Y, Width, Height, 30, 16, 32, 17, ROM_LightBlue,0,1,4,0)
ROM_DrawShape(BG, X, Y, Width, Height, 30, 17, 32, 18, ROM_LightBlue,0,1,4,0)
ROM_DrawShape(BG, X, Y, Width, Height, 30, 18, 32, 19, ROM_LightBlue,0,1,4,0)
ROM_DrawShape(BG, X, Y, Width, Height, 30, 19, 32, 20, ROM_LightBlue,0,1,4,0)
'left of middle-right
ROM_DrawShape(BG, X, Y, Width, Height, 25, 15, 29, 16, ROM_LightBlue,0,1,0,0)
ROM_DrawShape(BG, X, Y, Width, Height, 25, 16, 29, 19, ROM_DarkBlue,0,1,7,17)
ROM_DrawShape(BG, X, Y, Width, Height, 25, 19, 29, 20, ROM_LightBlue,0,1,0,0)
'top of bottom
ROM_DrawShape(BG, X, Y, Width, Height, 12, 24, 13, 27, ROM_LightBlue,0,1,0,0)
ROM_DrawShape(BG, X, Y, Width, Height, 13, 24, 16, 27, ROM_DarkBlue,0,1,9, 19)
ROM_DrawShape(BG, X, Y, Width, Height, 16, 24, 17, 27, ROM_LightBlue,0,1,0,0)
'middle of bottom
ROM_DrawShape(BG, X, Y, Width, Height, 12, 29, 13, 32, ROM_LightBlue,0,1,8,0)
ROM_DrawShape(BG, X, Y, Width, Height, 13, 29, 14, 32, ROM_DarkBlue,0,1,8,0)
ROM_DrawShape(BG, X, Y, Width, Height, 14, 29, 15, 32, ROM_DarkBlue,0,1,8,0)
ROM_DrawShape(BG, X, Y, Width, Height, 15, 29, 16, 32, ROM_DarkBlue,0,1,8,0)
ROM_DrawShape(BG, X, Y, Width, Height, 16, 29, 17, 32, ROM_LightBlue,0,1,8,0)
'bottom of bottom
ROM_DrawShape(BG, X, Y, Width, Height, 12, 33, 14, 34, ROM_LightBlue,0,1,0,0)
ROM_DrawShape(BG, X, Y, Width, Height, 14, 33, 15, 34, ROM_LightBlue,0,1,0,0)
ROM_DrawShape(BG, X, Y, Width, Height, 15, 33, 17, 34, ROM_LightBlue,0,1,0,0)
'middle
ROM_DrawShape(BG, X, Y, Width, Height, 7, 10, 25, 24, ROM_Green, 0, 4,10, 20)
BG.drawpath(ROM_MakePath(X, Y, Width, Height, Array As Int(7, 10, 33, 24, 12, 24)), Colors.Black , True, 0)'left
BG.drawpath(ROM_MakePath(X, Y, Width, Height, Array As Int(25, 10, 17, 24, 19, 24)), Colors.Black , True, 0)'right
BG.drawpath(ROM_MakePath(X, Y, Width, Height, Array As Int(7, 10, 12, 24, 17, 24, 25, 10)), ROM_LightBlue, True,0)'center
'.'. pattern
P = ROM_MakePath(X, Y, Width, Height, Array As Int(34, 35, 35, 36, 36, 36, 37, 35))
BG.ClipPath(P)
ROM_DrawShape(BG, X, Y, Width, Height, 34, 35, 37, 36, Colors.Black,1, 2, 0,0)
BG.RemoveClip
'Alpha Quadrant (hour) 'ROM_Beige, ROM_Green
ROM_DrawBit(BG, X, Y, Width, Height, 23, 26, 24, 28, ROM_Beige, AlphaQ, 0, 1)
ROM_DrawBit(BG, X, Y, Width, Height, 24, 26, 25, 28, ROM_Beige, AlphaQ, 0, 2)
ROM_DrawBit(BG, X, Y, Width, Height, 24, 28, 25, 30, ROM_Beige, AlphaQ, 0, 3)
ROM_DrawBit(BG, X, Y, Width, Height, 25, 25, 26, 26, ROM_Green, AlphaQ, 0, 4)
ROM_DrawBit(BG, X, Y, Width, Height, 26, 21, 27, 22, ROM_Green, AlphaQ, 0, 5)
ROM_DrawBit(BG, X, Y, Width, Height, 26, 22, 27, 23, ROM_Green, AlphaQ, 0, 6)
'Beta Quadrant (minute)
ROM_DrawBit(BG, X, Y, Width, Height, 5, 24, 6, 25, ROM_Beige, BetaQ, 1, 1)
ROM_DrawBit(BG, X, Y, Width, Height, 5, 25, 6, 26, ROM_Beige, BetaQ, 1, 2)
ROM_DrawBit(BG, X, Y, Width, Height, 5, 26, 6, 28, ROM_Beige, BetaQ, 1, 3)
ROM_DrawBit(BG, X, Y, Width, Height, 6, 25, 7, 26, ROM_Green, BetaQ, 1, 4)
ROM_DrawBit(BG, X, Y, Width, Height, 7, 26, 8, 28, ROM_Beige, BetaQ, 1, 5)
ROM_DrawBit(BG, X, Y, Width, Height, 8, 28, 9, 30, ROM_Green, BetaQ, 1, 6)
ROM_DrawBit(BG, X, Y, Width, Height, 9, 25, 10, 26, ROM_Green, BetaQ, 1, 7)
ROM_DrawBit(BG, X, Y, Width, Height, 9, 26, 10, 28, ROM_Green, BetaQ, 1, 8)
'Gamma Quadrant (month)
ROM_DrawBit(BG, X, Y, Width, Height, 5, 5, 6, 7, ROM_Beige, GammaQ, 2, 1)
ROM_DrawBit(BG, X, Y, Width, Height, 5, 13, 6, 14, ROM_Beige, GammaQ, 2, 2)
ROM_DrawBit(BG, X, Y, Width, Height, 6, 7, 7, 8, ROM_Green, GammaQ, 2, 3)
ROM_DrawBit(BG, X, Y, Width, Height, 6, 8, 7, 9, ROM_Beige, GammaQ, 2, 4)
ROM_DrawBit(BG, X, Y, Width, Height, 7, 8, 8, 9, ROM_Green, GammaQ, 2, 5)
ROM_DrawBit(BG, X, Y, Width, Height, 8, 7, 9, 8, ROM_Green, GammaQ, 2, 6)
ROM_DrawBit(BG, X, Y, Width, Height, 9, 7, 10, 8, ROM_Beige, GammaQ, 2, 7)
'Delta Quadrant (day)
ROM_DrawBit(BG, X, Y, Width, Height, 18, 8, 20, 9, ROM_Green, DeltaQ, 3, 1)
ROM_DrawBit(BG, X, Y, Width, Height, 20, 7, 21, 8, ROM_Green, DeltaQ, 3, 2)
ROM_DrawBit(BG, X, Y, Width, Height, 20, 8, 21, 9, ROM_Green, DeltaQ, 3, 3)
ROM_DrawBit(BG, X, Y, Width, Height, 21, 7, 22, 8, ROM_Green, DeltaQ, 3, 4)
ROM_DrawBit(BG, X, Y, Width, Height, 26, 5, 27, 7, ROM_Beige, DeltaQ, 3, 5)
ROM_DrawBit(BG, X, Y, Width, Height, 26, 7, 27, 8, ROM_Beige, DeltaQ, 3, 6)
ROM_DrawBit(BG, X, Y, Width, Height, 26, 8, 27, 9, ROM_Beige, DeltaQ, 3, 7)
ROM_DrawBit(BG, X, Y, Width, Height, 26, 9, 27, 10, ROM_Beige, DeltaQ, 3, 8)
ROM_DrawBit(BG, X, Y, Width, Height, 26, 11, 27, 12, ROM_Green, DeltaQ, 3, 9)
End Sub
Sub ROM_DrawBit(BG As Canvas, X As Int, Y As Int, Width As Int, Height As Int, X1 As Int, Y1 As Int, X2 As Int, Y2 As Int, Color As Int, Value As Int, Quadrant As Int, BitIndex As Int)
Dim DoIt As Boolean = Bit.And(Value, Power(2, BitIndex-1)) >0, BitC As Int , Dest As Rect
Dest = ROM_DrawShape(BG, X, Y, Width, Height, X1,Y1,X2,Y2, API.IIF(DoIt, Color, Colors.Transparent), 0, 2, BitC,0)
'If Quadrant = 2 AND BitIndex = 2 Then
'Select Case Quadrant + BitIndex * 0.1
'Gamma
'Case 2.2
'ROM_PrintText(BG, Dest.Left + Rom_FontsizeP*0.5, Dest.Top, 3, ROM_MakeText(1,3), Colors.Black, Rom_Fontsize)
'End Select
'End If
End Sub
Sub ROM_GetPoint(X As Int, Y As Int, Width As Int, Height As Int, Xaxis As Boolean, Index As Int) As Int
If Xaxis Then Return X + (RomX.Get(Index-1) * Width)
Return Y + (RomY.Get(Index-1) * Height)
End Sub
Sub ROM_MakePath(X As Int, Y As Int, Width As Int, Height As Int, Points() As Int) As Path
Dim P As Path , temp As Int
P.Initialize( ROM_GetPoint(X,Y,Width,Height,True, Points(0)), ROM_GetPoint(X,Y,Width,Height,False, Points(1)))
For temp = 2 To Points.Length-1 Step 2
P.LineTo( ROM_GetPoint(X,Y,Width,Height,True, Points(temp)), ROM_GetPoint(X,Y,Width,Height,False, Points(temp+1)))
Next
Return P
End Sub
Sub ROM_MakeText(MinDigits As Int, MaxDigits As Int) As String
Dim Count As Int = Rnd(MinDigits, MaxDigits+1), temp As Int, tempstr As StringBuilder , Low As Int = Asc("A"), High As Int = Asc("Z")+1
tempstr.Initialize
For temp = 1 To Count
tempstr.Append(Chr(Rnd(Low,High)))
Next
Return tempstr.ToString
End Sub
'Dir: 0=left to right, 1=top to bottom
Sub ROM_PrintText(BG As Canvas, X As Int, Y As Int, Dir As Int, Text As String, Color As Int, Size As Int)
If Not(LCAR.ROMfont.IsInitialized) Then LCAR.ROMfont = Typeface.LoadFromAssets("rom.ttf")
If Dir = 0 Then
API.DrawText(BG, Text, X,Y, LCAR.ROMfont, Size, Color, 0)
Else
Dim Height As Int = BG.MeasureStringHeight(Text, LCAR.ROMfont, Size), Degree As Float = Dir * 90
Select Case Dir
Case 1:X=X-Height
Case 2
Case 3:X=X+Height
End Select
BG.DrawTextRotated(Text, X,Y, LCAR.ROMfont, Size, Color, "LEFT", Degree)
End If
End Sub
'BitC: 0 = normal/nothing, MARKS: 2=bottom, 4=left, 6=right, 8=top, TEXT: 1=bottom left, 3=top right, 5=left side*2, 7=right side*2, 9=bottom, 10=bottom left and right*2, 11=top
Sub ROM_DrawShape(BG As Canvas, X As Int, Y As Int, Width As Int, Height As Int, X1 As Int, Y1 As Int, X2 As Int, Y2 As Int, Color As Int, Tool As Int, Stroke As Int, BitC As Int, TextID As Int) As Rect
Dim temp As Int, temp2 As Int, temp3 As Int ,temp4 As Int, temp5 As Int , temp6 As Boolean ,Size As tween
X1=ROM_GetPoint(X,Y,Width,Height,True, X1)
Y1=ROM_GetPoint(X,Y,Width,Height,False, Y1)
X2=ROM_GetPoint(X,Y,Width,Height,True, X2)
Y2=ROM_GetPoint(X,Y,Width,Height,False, Y2)
X=Width
Y=Height
Width=X2-X1
Height=Y2-Y1
Select Case Tool
Case 0'square
If Color <> Colors.Transparent Then LCARSeffects4.DrawRect(BG, X1,Y1, Width, Height, Color,0)
If Stroke>0 Then LCARSeffects4.DrawRect(BG, X1,Y1, Width, Height, Colors.black,Stroke)
If BitC >0 Then temp = Y * 0.0075
Select Case BitC
Case 0'GNDN
'MARKS
Case 2,8' |