This repository was archived by the owner on Feb 2, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathmodGraphics.bas
5224 lines (5051 loc) · 370 KB
/
modGraphics.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
Attribute VB_Name = "modGraphics"
Option Explicit
Public Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long
Public Sub UpdateGraphics2() 'draws GFX to screen when on the world map/world map editor
cycleCount = cycleCount + 1
If FrameSkip = True Then
If GetTickCount + Int(1000 * (1 - (cycleCount / 63))) > GoalTime Then
Exit Sub
End If
End If
fpsCount = fpsCount + 1
Dim A As Integer
Dim B As Integer
Dim Z As Integer
Dim WPHeight As Integer
Dim tempLocation As Location
Z = 1
vScreen(Z).Left = 0
vScreen(Z).Top = 0
vScreen(Z).Width = ScreenW
vScreen(Z).Height = ScreenH
SpecialFrames
SceneFrame2(1) = SceneFrame2(1) + 1
If SceneFrame2(1) >= 12 Then
SceneFrame2(1) = 0
SceneFrame(1) = SceneFrame(1) + 1
If SceneFrame(1) >= 4 Then SceneFrame(1) = 0
SceneFrame(4) = SceneFrame(1)
SceneFrame(5) = SceneFrame(1)
SceneFrame(6) = SceneFrame(1)
SceneFrame(9) = SceneFrame(1)
SceneFrame(10) = SceneFrame(1)
SceneFrame(12) = SceneFrame(1)
SceneFrame(51) = SceneFrame(1)
SceneFrame(52) = SceneFrame(1)
SceneFrame(53) = SceneFrame(1)
SceneFrame(54) = SceneFrame(1)
SceneFrame(55) = SceneFrame(1)
End If
SceneFrame2(27) = SceneFrame2(27) + 1
If SceneFrame2(27) >= 8 Then
SceneFrame2(27) = 0
SceneFrame(27) = SceneFrame(27) + 1
If SceneFrame(27) >= 12 Then SceneFrame(27) = 0
SceneFrame(28) = SceneFrame(27)
SceneFrame(29) = SceneFrame(27)
SceneFrame(30) = SceneFrame(27)
End If
SceneFrame2(33) = SceneFrame2(33) + 1
If SceneFrame2(33) >= 4 Then
SceneFrame2(33) = 0
SceneFrame(33) = SceneFrame(27) + 1
If SceneFrame(33) >= 14 Then SceneFrame(33) = 0
SceneFrame(34) = SceneFrame(33)
End If
SceneFrame2(62) = SceneFrame2(62) + 1
If SceneFrame2(62) >= 8 Then
SceneFrame2(62) = 0
SceneFrame(62) = SceneFrame(62) + 1
If SceneFrame(62) >= 8 Then SceneFrame(62) = 0
SceneFrame(63) = SceneFrame(62)
End If
LevelFrame2(2) = LevelFrame2(2) + 1
If LevelFrame2(2) >= 6 Then
LevelFrame2(2) = 0
LevelFrame(2) = LevelFrame(2) + 1
If LevelFrame(2) >= 6 Then LevelFrame(2) = 0
LevelFrame(9) = LevelFrame(2)
LevelFrame(13) = LevelFrame(2)
LevelFrame(14) = LevelFrame(2)
LevelFrame(15) = LevelFrame(2)
LevelFrame(31) = LevelFrame(2)
LevelFrame(32) = LevelFrame(2)
End If
LevelFrame2(8) = LevelFrame2(8) + 1
If LevelFrame2(8) >= 12 Then
LevelFrame2(8) = 0
LevelFrame(8) = LevelFrame(8) + 1
If LevelFrame(8) >= 4 Then LevelFrame(8) = 0
End If
LevelFrame2(12) = LevelFrame2(12) + 1
If LevelFrame2(12) >= 8 Then
LevelFrame2(12) = 0
LevelFrame(12) = LevelFrame(12) + 1
If LevelFrame(12) >= 2 Then LevelFrame(12) = 0
End If
LevelFrame2(25) = LevelFrame2(25) + 1
If LevelFrame2(25) >= 8 Then
LevelFrame2(25) = 0
LevelFrame(25) = LevelFrame(25) + 1
If LevelFrame(25) >= 4 Then LevelFrame(25) = 0
LevelFrame(26) = LevelFrame(25)
End If
TileFrame2(14) = TileFrame2(14) + 1
If TileFrame2(14) >= 14 Then
TileFrame2(14) = 0
TileFrame(14) = TileFrame(14) + 1
If TileFrame(14) >= 4 Then TileFrame(14) = 0
TileFrame(27) = TileFrame(14)
TileFrame(241) = TileFrame(14)
End If
If WorldEditor = True Then
BitBlt myBackBuffer, 0, 0, ScreenW, ScreenH, 0, 0, 0, vbWhiteness
Else
BitBlt myBackBuffer, 0, 0, ScreenW, ScreenH, 0, 0, 0, vbWhiteness
End If
If TakeScreen = True Then
If LevelEditor = True Or MagicHand = True Then
frmLevelWindow.vScreen(1).AutoRedraw = True
Else
frmMain.AutoRedraw = True
End If
End If
If LevelEditor = True Then
For A = 1 To numTiles
With Tile(A)
If vScreenCollision(1, .Location) = True Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXTile(.Type), 0, TileHeight(.Type) * TileFrame(.Type), vbSrcCopy
End If
End With
Next A
For A = 1 To numScenes
With Scene(A)
If vScreenCollision(1, .Location) = True Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXSceneMask(.Type), 0, SceneHeight(.Type) * SceneFrame(.Type), vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXScene(.Type), 0, SceneHeight(.Type) * SceneFrame(.Type), vbSrcPaint
End If
End With
Next A
For A = 1 To numWorldPaths
With WorldPath(A)
If vScreenCollision(1, .Location) = True Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXPathMask(.Type), 0, 0, vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXPath(.Type), 0, 0, vbSrcPaint
End If
End With
Next A
For A = 1 To numWorldLevels
With WorldLevel(A)
If vScreenCollision(1, .Location) = True Then
If .Path = True Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXLevelMask(0), 0, 0, vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXLevel(0), 0, 0, vbSrcPaint
End If
If .Path2 = True Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X - 16, vScreenY(Z) + 8 + .Location.Y, 64, 32, GFXLevelMask(29), 0, 0, vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X - 16, vScreenY(Z) + 8 + .Location.Y, 64, 32, GFXLevel(29), 0, 0, vbSrcPaint
End If
If GFXLevelBig(.Type) = True Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X - (GFXLevelWidth(.Type) - 32) / 2, vScreenY(Z) + .Location.Y - GFXLevelHeight(.Type) + 32, GFXLevelWidth(.Type), GFXLevelHeight(.Type), GFXLevelMask(.Type), 0, 32 * LevelFrame(.Type), vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X - (GFXLevelWidth(.Type) - 32) / 2, vScreenY(Z) + .Location.Y - GFXLevelHeight(.Type) + 32, GFXLevelWidth(.Type), GFXLevelHeight(.Type), GFXLevel(.Type), 0, 32 * LevelFrame(.Type), vbSrcPaint
Else
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXLevelMask(.Type), 0, 32 * LevelFrame(.Type), vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXLevel(.Type), 0, 32 * LevelFrame(.Type), vbSrcPaint
End If
End If
End With
Next A
Else
For A = 1 To numTiles
With Tile(A)
If vScreenCollision2(1, .Location) = True Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXTile(.Type), 0, TileHeight(.Type) * TileFrame(.Type), vbSrcCopy
End If
End With
Next A
For A = 1 To numScenes
With Scene(A)
If vScreenCollision2(1, .Location) = True And .Active = True Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXSceneMask(.Type), 0, SceneHeight(.Type) * SceneFrame(.Type), vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXScene(.Type), 0, SceneHeight(.Type) * SceneFrame(.Type), vbSrcPaint
End If
End With
Next A
For A = 1 To numWorldPaths
With WorldPath(A)
If vScreenCollision2(1, .Location) = True And .Active = True Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXPathMask(.Type), 0, 0, vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXPath(.Type), 0, 0, vbSrcPaint
End If
End With
Next A
For A = 1 To numWorldLevels
With WorldLevel(A)
If vScreenCollision2(1, .Location) = True And .Active = True Then
If .Path = True Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXLevelMask(0), 0, 0, vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXLevel(0), 0, 0, vbSrcPaint
End If
If .Path2 = True Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X - 16, vScreenY(Z) + 8 + .Location.Y, 64, 32, GFXLevelMask(29), 0, 0, vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X - 16, vScreenY(Z) + 8 + .Location.Y, 64, 32, GFXLevel(29), 0, 0, vbSrcPaint
End If
If GFXLevelBig(.Type) = True Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X - (GFXLevelWidth(.Type) - 32) / 2, vScreenY(Z) + .Location.Y - GFXLevelHeight(.Type) + 32, GFXLevelWidth(.Type), GFXLevelHeight(.Type), GFXLevelMask(.Type), 0, 32 * LevelFrame(.Type), vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X - (GFXLevelWidth(.Type) - 32) / 2, vScreenY(Z) + .Location.Y - GFXLevelHeight(.Type) + 32, GFXLevelWidth(.Type), GFXLevelHeight(.Type), GFXLevel(.Type), 0, 32 * LevelFrame(.Type), vbSrcPaint
Else
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXLevelMask(.Type), 0, 32 * LevelFrame(.Type), vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXLevel(.Type), 0, 32 * LevelFrame(.Type), vbSrcPaint
End If
End If
End With
Next A
End If
If WorldEditor = True Then
For A = 1 To numEffects
With Effect(A)
If vScreenCollision(Z, .Location) Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXEffectMask(.Type), 0, .Frame * EffectHeight(.Type), vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXEffect(.Type), 0, .Frame * EffectHeight(.Type), vbSrcPaint
End If
End With
Next A
For A = 1 To numWorldMusic
With WorldMusic(A).Location
BitBlt myBackBuffer, vScreenX(Z) + .X, vScreenY(Z) + .Y, .Width, .Height, GFX.WarpMask(1).hdc, 0, 0, vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .X, vScreenY(Z) + .Y, .Width, .Height, GFX.Warp(1).hdc, 0, 0, vbSrcPaint
SuperPrint Str(WorldMusic(A).Type), 1, Int(.X + 2 + vScreenX(Z)), Int(.Y + 2 + vScreenY(Z))
End With
Next A
If EditorCursor.Mode = 7 Then
With EditorCursor.Tile
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXTile(.Type), 0, TileHeight(.Type) * TileFrame(.Type), vbSrcCopy
End With
End If
If EditorCursor.Mode = 8 Then
With EditorCursor.Scene
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXSceneMask(.Type), 0, SceneHeight(.Type) * SceneFrame(.Type), vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXScene(.Type), 0, SceneHeight(.Type) * SceneFrame(.Type), vbSrcPaint
End With
End If
If EditorCursor.Mode = 9 Then
With EditorCursor.WorldLevel
If .Path = True Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXLevelMask(0), 0, 0, vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXLevel(0), 0, 0, vbSrcPaint
End If
If .Path2 = True Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X - 16, vScreenY(Z) + 8 + .Location.Y, 64, 32, GFXLevelMask(29), 0, 0, vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X - 16, vScreenY(Z) + 8 + .Location.Y, 64, 32, GFXLevel(29), 0, 0, vbSrcPaint
End If
If GFXLevelBig(.Type) = True Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X - (GFXLevelWidth(.Type) - 32) / 2, vScreenY(Z) + .Location.Y - GFXLevelHeight(.Type) + 32, GFXLevelWidth(.Type), GFXLevelHeight(.Type), GFXLevelMask(.Type), 0, 32 * LevelFrame(.Type), vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X - (GFXLevelWidth(.Type) - 32) / 2, vScreenY(Z) + .Location.Y - GFXLevelHeight(.Type) + 32, GFXLevelWidth(.Type), GFXLevelHeight(.Type), GFXLevel(.Type), 0, 32 * LevelFrame(.Type), vbSrcPaint
Else
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXLevelMask(.Type), 0, 32 * LevelFrame(.Type), vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXLevel(.Type), 0, 32 * LevelFrame(.Type), vbSrcPaint
End If
End With
End If
If EditorCursor.Mode = 10 Then
With EditorCursor.WorldPath
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXPathMask(.Type), 0, 0, vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFXPath(.Type), 0, 0, vbSrcPaint
End With
End If
With EditorCursor
If .Mode = 6 Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X - 2, vScreenY(Z) + .Location.Y, 22, 30, GFX.ECursorMask(3).hdc, 0, 0, vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X - 2, vScreenY(Z) + .Location.Y, 22, 30, GFX.ECursor(3).hdc, 0, 0, vbSrcPaint
Else
If .Mode = 11 Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFX.WarpMask(1).hdc, 0, 0, vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, .Location.Height, GFX.Warp(1).hdc, 0, 0, vbSrcPaint
SuperPrint Str(.WorldMusic.Type), 1, Int(.Location.X + 2 + vScreenX(Z)), Int(.Location.Y + 2 + vScreenY(Z))
'BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, .Location.Width, 2, GFX.Split(1).hdc, 0, 0, vbSrcCopy
'BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y + .Location.Height - 2, .Location.Width, 2, GFX.Split(1).hdc, 0, 0, vbSrcCopy
'BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, 2, .Location.Height, GFX.Split(1).hdc, 0, 0, vbSrcCopy
'BitBlt myBackBuffer, vScreenX(Z) + .Location.X + .Location.Width - 2, vScreenY(Z) + .Location.Y, 2, .Location.Height, GFX.Split(1).hdc, 0, 0, vbSrcCopy
End If
BitBlt myBackBuffer, .X, .Y + 8, 32, 32, GFX.ECursorMask(2).hdc, 0, 0, vbSrcAnd
BitBlt myBackBuffer, .X, .Y + 8, 32, 32, GFX.ECursor(2).hdc, 0, 0, vbSrcPaint
End If
End With
'BitBlt frmLevelWindow.vScreen(Z).hdc, 0, 0, frmLevelWindow.vScreen(Z).ScaleWidth, frmLevelWindow.vScreen(Z).ScaleHeight, myBackBuffer, 0, 0, vbSrcCopy
StretchBlt frmLevelWindow.vScreen(Z).hdc, 0, 0, frmLevelWindow.vScreen(Z).ScaleWidth, frmLevelWindow.vScreen(Z).ScaleHeight, myBackBuffer, 0, 0, 800, 600, vbSrcCopy
Else
With WorldPlayer(1)
If .Type = 0 Then .Type = 1
If Player(1).Character = 1 Then .Type = 1
If Player(1).Character = 2 Then .Type = 2
If Player(1).Character = 3 Then .Type = 3
If Player(1).Character = 4 Then .Type = 4
If Player(1).Character = 5 Then .Type = 5
If .Type = 3 Then
WPHeight = 44
ElseIf .Type = 4 Then
WPHeight = 40
Else
WPHeight = 32
End If
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y - 10 + .Location.Height - WPHeight, .Location.Width, WPHeight, GFXPlayerMask(.Type), 0, WPHeight * .Frame, vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y - 10 + .Location.Height - WPHeight, .Location.Width, WPHeight, GFXPlayer(.Type), 0, WPHeight * .Frame, vbSrcPaint
End With
BitBlt myBackBuffer, 0, 0, 800, 130, GFX.Interface(4).hdc, 0, 0, vbSrcCopy
BitBlt myBackBuffer, 0, 534, 800, 66, GFX.Interface(4).hdc, 0, 534, vbSrcCopy
BitBlt myBackBuffer, 0, 130, 66, 404, GFX.Interface(4).hdc, 0, 130, vbSrcCopy
BitBlt myBackBuffer, 734, 130, 66, 404, GFX.Interface(4).hdc, 734, 130, vbSrcCopy
For A = 1 To numPlayers
With Player(A)
.Direction = -1
.Location.SpeedY = 0
.Location.SpeedX = -1
.Controls.Left = False
.Controls.Right = False
If .Duck = True Then UnDuck A
PlayerFrame A
If .Mount = 3 Then
If .MountType = 0 Then .MountType = 1
B = .MountType
'Yoshi's Body
BitBlt myBackBuffer, 32 + (48 * A) + .YoshiBX, 124 - .Location.Height + .YoshiBY, 32, 32, GFXYoshiBMask(B), 0, 32 * .YoshiBFrame, vbSrcAnd
If ShadowMode = False Then BitBlt myBackBuffer, 32 + (48 * A) + .YoshiBX, 124 - .Location.Height + .YoshiBY, 32, 32, GFXYoshiB(B), 0, 32 * .YoshiBFrame, vbSrcPaint
'Yoshi's Head
BitBlt myBackBuffer, 32 + (48 * A) + .YoshiTX, 124 - .Location.Height + .YoshiTY, 32, 32, GFXYoshiTMask(B), 0, 32 * .YoshiTFrame, vbSrcAnd
If ShadowMode = False Then BitBlt myBackBuffer, 32 + (48 * A) + .YoshiTX, 124 - .Location.Height + .YoshiTY, 32, 32, GFXYoshiT(B), 0, 32 * .YoshiTFrame, vbSrcPaint
End If
If .Character = 1 Then
If .Mount = 0 Or .Mount = 3 Then
BitBlt myBackBuffer, 32 + (48 * A) + MarioFrameX((.State * 100) + (.Frame * .Direction)), 124 - .Location.Height + MarioFrameY((.State * 100) + (.Frame * .Direction)) + .MountOffsetY, 99, 99, GFXMarioMask(.State), pfrX(100 + .Frame * .Direction), pfrY(100 + .Frame * .Direction), vbSrcAnd
If ShadowMode = False Then BitBlt myBackBuffer, 32 + (48 * A) + MarioFrameX((.State * 100) + (.Frame * .Direction)), 124 - .Location.Height + MarioFrameY((.State * 100) + (.Frame * .Direction)) + .MountOffsetY, 99, 99, GFXMario(.State), pfrX(100 + .Frame * .Direction), pfrY(100 + .Frame * .Direction), vbSrcPaint
ElseIf .Mount = 1 Then
BitBlt myBackBuffer, 32 + (48 * A) + MarioFrameX((.State * 100) + (.Frame * .Direction)), 124 - .Location.Height + MarioFrameY((.State * 100) + (.Frame * .Direction)), 99, .Location.Height - 26, GFXMarioMask(.State), pfrX(100 + .Frame * .Direction), pfrY(100 + .Frame * .Direction), vbSrcAnd
If ShadowMode = False Then BitBlt myBackBuffer, 32 + (48 * A) + MarioFrameX((.State * 100) + (.Frame * .Direction)), 124 - .Location.Height + MarioFrameY((.State * 100) + (.Frame * .Direction)), 99, .Location.Height - 26, GFXMario(.State), pfrX(100 + .Frame * .Direction), pfrY(100 + .Frame * .Direction), vbSrcPaint
BitBlt myBackBuffer, 32 + (48 * A) + .Location.Width / 2 - 16, 124 - 30, 32, 32, GFX.BootMask(.MountType).hdc, 0, 32 * .MountFrame, vbSrcAnd
If ShadowMode = False Then BitBlt myBackBuffer, 32 + (48 * A) + .Location.Width / 2 - 16, 124 - 30, 32, 32, GFX.Boot(.MountType).hdc, 0, 32 * .MountFrame, vbSrcPaint
If .MountType = 3 Then
.YoshiWingsFrameCount = .YoshiWingsFrameCount + 1
.YoshiWingsFrame = 0
If .YoshiWingsFrameCount <= 12 Then
.YoshiWingsFrame = 1
ElseIf .YoshiWingsFrameCount >= 24 Then
.YoshiWingsFrameCount = 0
End If
BitBlt myBackBuffer, 32 + (48 * A) + .Location.Width / 2 - 16 + 20, 124 - 30 - 10, 32, 32, GFX.YoshiWingsMask.hdc, 0, 0 + 32 * .YoshiWingsFrame, vbSrcAnd
If ShadowMode = False Then BitBlt myBackBuffer, 32 + (48 * A) + .Location.Width / 2 - 16 + 20, 124 - 30 - 10, 32, 32, GFX.YoshiWings.hdc, 0, 0 + 32 * .YoshiWingsFrame, vbSrcPaint
End If
End If
ElseIf .Character = 2 Then
If .Mount = 0 Or .Mount = 3 Then
BitBlt myBackBuffer, 32 + (48 * A) + LuigiFrameX((.State * 100) + (.Frame * .Direction)), 124 - .Location.Height + LuigiFrameY((.State * 100) + (.Frame * .Direction)) + .MountOffsetY, 99, 99, GFXLuigiMask(.State), pfrX(100 + .Frame * .Direction), pfrY(100 + .Frame * .Direction), vbSrcAnd
If ShadowMode = False Then BitBlt myBackBuffer, 32 + (48 * A) + LuigiFrameX((.State * 100) + (.Frame * .Direction)), 124 - .Location.Height + LuigiFrameY((.State * 100) + (.Frame * .Direction)) + .MountOffsetY, 99, 99, GFXLuigi(.State), pfrX(100 + .Frame * .Direction), pfrY(100 + .Frame * .Direction), vbSrcPaint
ElseIf .Mount = 1 Then
BitBlt myBackBuffer, 32 + (48 * A) + LuigiFrameX((.State * 100) + (.Frame * .Direction)), 124 - .Location.Height + LuigiFrameY((.State * 100) + (.Frame * .Direction)), 99, .Location.Height - 24, GFXLuigiMask(.State), pfrX(100 + .Frame * .Direction), pfrY(100 + .Frame * .Direction), vbSrcAnd
If ShadowMode = False Then BitBlt myBackBuffer, 32 + (48 * A) + LuigiFrameX((.State * 100) + (.Frame * .Direction)), 124 - .Location.Height + LuigiFrameY((.State * 100) + (.Frame * .Direction)), 99, .Location.Height - 24, GFXLuigi(.State), pfrX(100 + .Frame * .Direction), pfrY(100 + .Frame * .Direction), vbSrcPaint
BitBlt myBackBuffer, 32 + (48 * A) + .Location.Width / 2 - 16, 124 - 30, 32, 32, GFX.BootMask(.MountType).hdc, 0, 32 * .MountFrame, vbSrcAnd
If ShadowMode = False Then BitBlt myBackBuffer, 32 + (48 * A) + .Location.Width / 2 - 16, 124 - 30, 32, 32, GFX.Boot(.MountType).hdc, 0, 32 * .MountFrame, vbSrcPaint
If .MountType = 3 Then
.YoshiWingsFrameCount = .YoshiWingsFrameCount + 1
.YoshiWingsFrame = 0
If .YoshiWingsFrameCount <= 12 Then
.YoshiWingsFrame = 1
ElseIf .YoshiWingsFrameCount >= 24 Then
.YoshiWingsFrameCount = 0
End If
BitBlt myBackBuffer, 32 + (48 * A) + .Location.Width / 2 - 16 + 20, 124 - 30 - 10, 32, 32, GFX.YoshiWingsMask.hdc, 0, 0 + 32 * .YoshiWingsFrame, vbSrcAnd
If ShadowMode = False Then BitBlt myBackBuffer, 32 + (48 * A) + .Location.Width / 2 - 16 + 20, 124 - 30 - 10, 32, 32, GFX.YoshiWings.hdc, 0, 0 + 32 * .YoshiWingsFrame, vbSrcPaint
End If
End If
ElseIf .Character = 3 Then
If .Mount = 0 Or .Mount = 3 Then
BitBlt myBackBuffer, 32 + (48 * A) + PeachFrameX((.State * 100) + (.Frame * .Direction)), 124 - .Location.Height + PeachFrameY((.State * 100) + (.Frame * .Direction)) + .MountOffsetY, 99, 99, GFXPeachMask(.State), pfrX(100 + .Frame * .Direction), pfrY(100 + .Frame * .Direction), vbSrcAnd
If ShadowMode = False Then BitBlt myBackBuffer, 32 + (48 * A) + PeachFrameX((.State * 100) + (.Frame * .Direction)), 124 - .Location.Height + PeachFrameY((.State * 100) + (.Frame * .Direction)) + .MountOffsetY, 99, 99, GFXPeach(.State), pfrX(100 + .Frame * .Direction), pfrY(100 + .Frame * .Direction), vbSrcPaint
ElseIf .Mount = 1 Then
BitBlt myBackBuffer, 32 + (48 * A) + PeachFrameX((.State * 100) + (.Frame * .Direction)), 124 - .Location.Height + PeachFrameY((.State * 100) + (.Frame * .Direction)), 99, .Location.Height - 24, GFXPeachMask(.State), pfrX(100 + .Frame * .Direction), pfrY(100 + .Frame * .Direction), vbSrcAnd
If ShadowMode = False Then BitBlt myBackBuffer, 32 + (48 * A) + PeachFrameX((.State * 100) + (.Frame * .Direction)), 124 - .Location.Height + PeachFrameY((.State * 100) + (.Frame * .Direction)), 99, .Location.Height - 24, GFXPeach(.State), pfrX(100 + .Frame * .Direction), pfrY(100 + .Frame * .Direction), vbSrcPaint
BitBlt myBackBuffer, 32 + (48 * A) + .Location.Width / 2 - 16, 124 - 30, 32, 32, GFX.BootMask(.MountType).hdc, 0, 32 * .MountFrame, vbSrcAnd
If ShadowMode = False Then BitBlt myBackBuffer, 32 + (48 * A) + .Location.Width / 2 - 16, 124 - 30, 32, 32, GFX.Boot(.MountType).hdc, 0, 32 * .MountFrame, vbSrcPaint
If .MountType = 3 Then
.YoshiWingsFrameCount = .YoshiWingsFrameCount + 1
.YoshiWingsFrame = 0
If .YoshiWingsFrameCount <= 12 Then
.YoshiWingsFrame = 1
ElseIf .YoshiWingsFrameCount >= 24 Then
.YoshiWingsFrameCount = 0
End If
BitBlt myBackBuffer, 32 + (48 * A) + .Location.Width / 2 - 16 + 20, 124 - 30 - 10, 32, 32, GFX.YoshiWingsMask.hdc, 0, 0 + 32 * .YoshiWingsFrame, vbSrcAnd
If ShadowMode = False Then BitBlt myBackBuffer, 32 + (48 * A) + .Location.Width / 2 - 16 + 20, 124 - 30 - 10, 32, 32, GFX.YoshiWings.hdc, 0, 0 + 32 * .YoshiWingsFrame, vbSrcPaint
End If
End If
ElseIf .Character = 4 Then
If .Mount = 0 Or .Mount = 3 Then
BitBlt myBackBuffer, 32 + (48 * A) + ToadFrameX((.State * 100) + (.Frame * .Direction)), 124 - .Location.Height + ToadFrameY((.State * 100) + (.Frame * .Direction)) + .MountOffsetY, 99, 99, GFXToadMask(.State), pfrX(100 + .Frame * .Direction), pfrY(100 + .Frame * .Direction), vbSrcAnd
If ShadowMode = False Then BitBlt myBackBuffer, 32 + (48 * A) + ToadFrameX((.State * 100) + (.Frame * .Direction)), 124 - .Location.Height + ToadFrameY((.State * 100) + (.Frame * .Direction)) + .MountOffsetY, 99, 99, GFXToad(.State), pfrX(100 + .Frame * .Direction), pfrY(100 + .Frame * .Direction), vbSrcPaint
ElseIf .Mount = 1 Then
If .State = 1 Then
BitBlt myBackBuffer, 32 + (48 * A) + ToadFrameX((.State * 100) + (.Frame * .Direction)), 6 + 124 - .Location.Height + ToadFrameY((.State * 100) + (.Frame * .Direction)), 99, .Location.Height - 24, GFXToadMask(.State), pfrX(100 + .Frame * .Direction), pfrY(100 + .Frame * .Direction), vbSrcAnd
If ShadowMode = False Then BitBlt myBackBuffer, 32 + (48 * A) + ToadFrameX((.State * 100) + (.Frame * .Direction)), 6 + 124 - .Location.Height + ToadFrameY((.State * 100) + (.Frame * .Direction)), 99, .Location.Height - 24, GFXToad(.State), pfrX(100 + .Frame * .Direction), pfrY(100 + .Frame * .Direction), vbSrcPaint
Else
BitBlt myBackBuffer, 32 + (48 * A) + ToadFrameX((.State * 100) + (.Frame * .Direction)), 124 - .Location.Height + ToadFrameY((.State * 100) + (.Frame * .Direction)), 99, .Location.Height - 24, GFXToadMask(.State), pfrX(100 + .Frame * .Direction), pfrY(100 + .Frame * .Direction), vbSrcAnd
If ShadowMode = False Then BitBlt myBackBuffer, 32 + (48 * A) + ToadFrameX((.State * 100) + (.Frame * .Direction)), 124 - .Location.Height + ToadFrameY((.State * 100) + (.Frame * .Direction)), 99, .Location.Height - 24, GFXToad(.State), pfrX(100 + .Frame * .Direction), pfrY(100 + .Frame * .Direction), vbSrcPaint
End If
BitBlt myBackBuffer, 32 + (48 * A) + .Location.Width / 2 - 16, 124 - 30, 32, 32, GFX.BootMask(.MountType).hdc, 0, 32 * .MountFrame, vbSrcAnd
If ShadowMode = False Then BitBlt myBackBuffer, 32 + (48 * A) + .Location.Width / 2 - 16, 124 - 30, 32, 32, GFX.Boot(.MountType).hdc, 0, 32 * .MountFrame, vbSrcPaint
If .MountType = 3 Then
.YoshiWingsFrameCount = .YoshiWingsFrameCount + 1
.YoshiWingsFrame = 0
If .YoshiWingsFrameCount <= 12 Then
.YoshiWingsFrame = 1
ElseIf .YoshiWingsFrameCount >= 24 Then
.YoshiWingsFrameCount = 0
End If
BitBlt myBackBuffer, 32 + (48 * A) + .Location.Width / 2 - 16 + 20, 124 - 30 - 10, 32, 32, GFX.YoshiWingsMask.hdc, 0, 0 + 32 * .YoshiWingsFrame, vbSrcAnd
If ShadowMode = False Then BitBlt myBackBuffer, 32 + (48 * A) + .Location.Width / 2 - 16 + 20, 124 - 30 - 10, 32, 32, GFX.YoshiWings.hdc, 0, 0 + 32 * .YoshiWingsFrame, vbSrcPaint
End If
End If
ElseIf .Character = 5 Then
BitBlt myBackBuffer, 32 + (48 * A) + LinkFrameX((.State * 100) + (.Frame * .Direction)), 124 - .Location.Height + LinkFrameY((.State * 100) + (.Frame * .Direction)), 99, 99, GFXLinkMask(.State), pfrX(100 + .Frame * .Direction), pfrY(100 + .Frame * .Direction), vbSrcAnd
If ShadowMode = False Then BitBlt myBackBuffer, 32 + (48 * A) + LinkFrameX((.State * 100) + (.Frame * .Direction)), 124 - .Location.Height + LinkFrameY((.State * 100) + (.Frame * .Direction)), 99, 99, GFXLink(.State), pfrX(100 + .Frame * .Direction), pfrY(100 + .Frame * .Direction), vbSrcPaint
End If
End With
Next A
A = numPlayers + 1
'Print lives on the screen
BitBlt myBackBuffer, 32 + (48 * A), 126 - GFX.Interface(3).ScaleHeight, GFX.Interface(3).ScaleWidth, GFX.Interface(3).ScaleHeight, GFX.InterfaceMask(3).hdc, 0, 0, vbSrcAnd
BitBlt myBackBuffer, 32 + (48 * A), 126 - GFX.Interface(3).ScaleHeight, GFX.Interface(3).ScaleWidth, GFX.Interface(3).ScaleHeight, GFX.Interface(3).hdc, 0, 0, vbSrcPaint
BitBlt myBackBuffer, 32 + (48 * A) + 40, 128 - GFX.Interface(3).ScaleHeight, GFX.Interface(1).ScaleWidth, GFX.Interface(1).ScaleHeight, GFX.InterfaceMask(1).hdc, 0, 0, vbSrcAnd
BitBlt myBackBuffer, 32 + (48 * A) + 40, 128 - GFX.Interface(3).ScaleHeight, GFX.Interface(1).ScaleWidth, GFX.Interface(1).ScaleHeight, GFX.Interface(1).hdc, 0, 0, vbSrcPaint
SuperPrint Str(Lives), 1, 32 + (48 * A) + 62, 112
'Print coins on the screen
If Player(1).Character = 5 Then
BitBlt myBackBuffer, 32 + (48 * A) + 16, 88, GFX.Interface(2).ScaleWidth, GFX.Interface(2).ScaleHeight, GFX.InterfaceMask(6).hdc, 0, 0, vbSrcAnd
BitBlt myBackBuffer, 32 + (48 * A) + 16, 88, GFX.Interface(2).ScaleWidth, GFX.Interface(2).ScaleHeight, GFX.Interface(6).hdc, 0, 0, vbSrcPaint
Else
BitBlt myBackBuffer, 32 + (48 * A) + 16, 88, GFX.Interface(2).ScaleWidth, GFX.Interface(2).ScaleHeight, GFX.InterfaceMask(2).hdc, 0, 0, vbSrcAnd
BitBlt myBackBuffer, 32 + (48 * A) + 16, 88, GFX.Interface(2).ScaleWidth, GFX.Interface(2).ScaleHeight, GFX.Interface(2).hdc, 0, 0, vbSrcPaint
End If
BitBlt myBackBuffer, 32 + (48 * A) + 40, 90, GFX.Interface(1).ScaleWidth, GFX.Interface(1).ScaleHeight, GFX.InterfaceMask(1).hdc, 0, 0, vbSrcAnd
BitBlt myBackBuffer, 32 + (48 * A) + 40, 90, GFX.Interface(1).ScaleWidth, GFX.Interface(1).ScaleHeight, GFX.Interface(1).hdc, 0, 0, vbSrcPaint
SuperPrint Str(Coins), 1, 32 + (48 * A) + 62, 90
'Print stars on the screen
If numStars > 0 Then
BitBlt myBackBuffer, 32 + (48 * A) + 16, 66, GFX.Interface(5).ScaleWidth, GFX.Interface(5).ScaleHeight, GFX.InterfaceMask(5).hdc, 0, 0, vbSrcAnd
BitBlt myBackBuffer, 32 + (48 * A) + 16, 66, GFX.Interface(5).ScaleWidth, GFX.Interface(5).ScaleHeight, GFX.Interface(5).hdc, 0, 0, vbSrcPaint
BitBlt myBackBuffer, 32 + (48 * A) + 40, 68, GFX.Interface(1).ScaleWidth, GFX.Interface(1).ScaleHeight, GFX.InterfaceMask(1).hdc, 0, 0, vbSrcAnd
BitBlt myBackBuffer, 32 + (48 * A) + 40, 68, GFX.Interface(1).ScaleWidth, GFX.Interface(1).ScaleHeight, GFX.Interface(1).hdc, 0, 0, vbSrcPaint
SuperPrint Str(numStars), 1, 32 + (48 * A) + 62, 68
End If
'Print the level's name
If WorldPlayer(1).LevelName <> "" Then
SuperPrint WorldPlayer(1).LevelName, 2, 32 + (48 * A) + 116, 109
End If
If GamePaused = True Then
BitBlt myBackBuffer, 210, 200, 380, 200, 0, 0, 0, vbWhiteness
If Cheater = False Then
SuperPrint "CONTINUE", 3, 272, 257
SuperPrint "SAVE & CONTINUE", 3, 272, 292
SuperPrint "SAVE & QUIT", 3, 272, 327
BitBlt myBackBuffer, 252, 257 + (MenuCursor * 35), 16, 16, GFX.MCursorMask(0).hdc, 0, 0, vbSrcAnd
BitBlt myBackBuffer, 252, 257 + (MenuCursor * 35), 16, 16, GFX.MCursor(0).hdc, 0, 0, vbSrcPaint
Else
SuperPrint "CONTINUE", 3, 272 + 56, 275
SuperPrint "QUIT", 3, 272 + 56, 310
BitBlt myBackBuffer, 252 + 56, 275 + (MenuCursor * 35), 16, 16, GFX.MCursorMask(0).hdc, 0, 0, vbSrcAnd
BitBlt myBackBuffer, 252 + 56, 275 + (MenuCursor * 35), 16, 16, GFX.MCursor(0).hdc, 0, 0, vbSrcPaint
End If
End If
If PrintFPS > 0 Then
SuperPrint Str(PrintFPS), 1, 8, 8
End If
'BitBlt frmMain.hdc, 0, 0, ScreenW, ScreenH, myBackBuffer, 0, 0, vbSrcCopy
StretchBlt frmMain.hdc, 0, 0, frmMain.ScaleWidth, frmMain.ScaleHeight, myBackBuffer, 0, 0, 800, 600, vbSrcCopy
End If
If TakeScreen = True Then ScreenShot
End Sub
Public Sub UpdateGraphics() 'This draws the graphic to the screen when in a level/game menu/outro/level editor
On Error Resume Next
Dim A As Integer
Dim timeStr As String
Dim Z As Integer
Dim numScreens As Integer
'frame skip code
cycleCount = cycleCount + 1
If FrameSkip = True And TakeScreen = False Then
If GetTickCount + Int(1000 * (1 - (cycleCount / 63))) > GoalTime Then 'Don't draw this frame
numScreens = 1
If LevelEditor = False Then
If ScreenType = 1 Then numScreens = 2
If ScreenType = 4 Then numScreens = 2
If ScreenType = 5 Then
DynamicScreen
If vScreen(2).Visible = True Then
numScreens = 2
Else
numScreens = 1
End If
End If
If ScreenType = 8 Then numScreens = 1
End If
For Z = 1 To numScreens
If LevelEditor = False Then
If ScreenType = 2 Or ScreenType = 3 Then
GetvScreenAverage
ElseIf ScreenType = 5 And vScreen(2).Visible = False Then
GetvScreenAverage
ElseIf ScreenType = 7 Then
GetvScreenCredits
Else
GetvScreen Z
End If
End If
For A = 1 To numNPCs
With NPC(A)
If vScreenCollision(Z, .Location) And .Hidden = False Then
If .Reset(Z) = True Or .Active = True Then
If .Active = False Then
.JustActivated = Z
If nPlay.Online = True Then
Netplay.sendData "2a" & A & "|" & nPlay.MySlot + 1 & LB
.JustActivated = nPlay.MySlot + 1
End If
End If
.TimeLeft = Physics.NPCTimeOffScreen
If nPlay.Online = True And nPlay.NPCWaitCount >= 10 And nPlay.Mode = 0 Then timeStr = timeStr & "2b" & A & LB
.Active = True
End If
.Reset(1) = False
.Reset(2) = False
Else
.Reset(Z) = True
If numScreens = 1 Then .Reset(2) = True
If SingleCoop = 1 Then
.Reset(2) = True
ElseIf SingleCoop = 2 Then
.Reset(1) = True
End If
End If
End With
Next A
Next Z
Exit Sub
End If
End If
fpsCount = fpsCount + 1
Dim SuperText As String
Dim tempText As String
Dim BoxY As Integer
Dim tempBool As Boolean
Dim B As Integer
Dim B2 As Integer
Dim C As Integer
Dim D As Integer
Dim E As Integer
Dim d2 As Integer
Dim e2 As Integer
Dim X As Integer
Dim Y As Integer
Dim fBlock As Integer
Dim lBlock As Integer
Dim tempLocation As Location
Dim S As Integer 'Level section to display
If Score > 9999990 Then Score = 9999990
If Lives > 99 Then Lives = 99
numScreens = 1
If TakeScreen = True Then
If LevelEditor = True Or MagicHand = True Then
frmLevelWindow.vScreen(1).AutoRedraw = True
Else
frmMain.AutoRedraw = True
End If
End If
'Background frames
If FreezeNPCs = False Then
BackgroundFrameCount(26) = BackgroundFrameCount(26) + 1
If BackgroundFrameCount(26) >= 8 Then
BackgroundFrame(26) = BackgroundFrame(26) + 1
If BackgroundFrame(26) >= 8 Then BackgroundFrame(26) = 0
BackgroundFrameCount(26) = 0
End If
BackgroundFrameCount(18) = BackgroundFrameCount(18) + 1
If BackgroundFrameCount(18) >= 12 Then
BackgroundFrame(18) = BackgroundFrame(18) + 1
If BackgroundFrame(18) >= 4 Then BackgroundFrame(18) = 0
BackgroundFrame(19) = BackgroundFrame(18)
BackgroundFrame(20) = BackgroundFrame(18)
BackgroundFrame(161) = BackgroundFrame(18)
BackgroundFrameCount(18) = 0
End If
BackgroundFrameCount(36) = BackgroundFrameCount(36) + 1
If BackgroundFrameCount(36) >= 2 Then
BackgroundFrame(36) = BackgroundFrame(36) + 1
If BackgroundFrame(36) >= 4 Then BackgroundFrame(36) = 0
BackgroundFrameCount(36) = 0
End If
BackgroundFrame(68) = BackgroundFrame(36)
BackgroundFrameCount(65) = BackgroundFrameCount(65) + 1
If BackgroundFrameCount(65) >= 8 Then
BackgroundFrame(65) = BackgroundFrame(65) + 1
If BackgroundFrame(65) >= 4 Then BackgroundFrame(65) = 0
BackgroundFrameCount(65) = 0
End If
BackgroundFrame(66) = BackgroundFrame(65)
BackgroundFrame(70) = BackgroundFrame(65)
BackgroundFrame(100) = BackgroundFrame(65)
BackgroundFrame(134) = BackgroundFrame(65)
BackgroundFrame(135) = BackgroundFrame(65)
BackgroundFrame(136) = BackgroundFrame(65)
BackgroundFrame(137) = BackgroundFrame(65)
BackgroundFrame(138) = BackgroundFrame(65)
BackgroundFrameCount(82) = BackgroundFrameCount(82) + 1
If BackgroundFrameCount(82) >= 10 Then
BackgroundFrame(82) = BackgroundFrame(82) + 1
If BackgroundFrame(82) >= 4 Then BackgroundFrame(82) = 0
BackgroundFrameCount(82) = 0
End If
BackgroundFrameCount(170) = BackgroundFrameCount(170) + 1
If BackgroundFrameCount(170) >= 8 Then
BackgroundFrame(170) = BackgroundFrame(170) + 1
If BackgroundFrame(170) >= 4 Then BackgroundFrame(170) = 0
BackgroundFrame(171) = BackgroundFrame(170)
BackgroundFrameCount(170) = 0
End If
BackgroundFrameCount(125) = BackgroundFrameCount(125) + 1
If BackgroundFrameCount(125) >= 4 Then
If BackgroundFrame(125) = 0 Then
BackgroundFrame(125) = 1
Else
BackgroundFrame(125) = 0
End If
BackgroundFrameCount(125) = 0
End If
SpecialFrames
End If
BackgroundFrame(172) = BackgroundFrame(66)
BackgroundFrameCount(158) = BackgroundFrameCount(158) + 1
If BackgroundFrameCount(158) >= 6 Then
BackgroundFrameCount(158) = 0
BackgroundFrame(158) = BackgroundFrame(158) + 1
BackgroundFrame(159) = BackgroundFrame(159) + 1
If BackgroundFrame(158) >= 4 Then BackgroundFrame(158) = 0
If BackgroundFrame(159) >= 8 Then BackgroundFrame(159) = 0
End If
BackgroundFrameCount(168) = BackgroundFrameCount(168) + 1
If BackgroundFrameCount(168) >= 8 Then
BackgroundFrame(168) = BackgroundFrame(168) + 1
If BackgroundFrame(168) >= 8 Then BackgroundFrame(168) = 0
BackgroundFrameCount(168) = 0
End If
BackgroundFrameCount(173) = BackgroundFrameCount(173) + 1
If BackgroundFrameCount(173) >= 8 Then
BackgroundFrameCount(173) = 0
If BackgroundFrame(173) = 0 Then
BackgroundFrame(173) = 1
Else
BackgroundFrame(173) = 0
End If
End If
BackgroundFrameCount(187) = BackgroundFrameCount(187) + 1
If BackgroundFrameCount(187) >= 6 Then
BackgroundFrame(187) = BackgroundFrame(187) + 1
If BackgroundFrame(187) >= 4 Then BackgroundFrame(187) = 0
BackgroundFrame(188) = BackgroundFrame(187)
BackgroundFrame(189) = BackgroundFrame(187)
BackgroundFrame(190) = BackgroundFrame(187)
BackgroundFrameCount(187) = 0
End If
If LevelEditor = False Then 'Sets up the screens if not in level editor
If ScreenType = 1 Then numScreens = 2
If ScreenType = 4 Then numScreens = 2
If ScreenType = 5 Then
DynamicScreen
If vScreen(2).Visible = True Then
numScreens = 2
Else
numScreens = 1
End If
End If
If ScreenType = 8 Then numScreens = 1
End If
If ClearBuffer = True Then
ClearBuffer = False
BitBlt myBackBuffer, 0, 0, ScreenW, ScreenH, 0, 0, 0, vbWhiteness
BitBlt frmMain.hdc, 0, 0, frmMain.ScaleWidth, frmMain.ScaleHeight, 0, 0, 0, vbWhiteness
End If
If SingleCoop = 2 Then numScreens = 2
For Z = 1 To numScreens
If SingleCoop = 2 Then Z = 2
If LevelEditor = True Then
S = curSection
ElseIf nPlay.Online = True Then
S = Player(nPlay.MySlot + 1).Section
Else
S = Player(Z).Section
End If
If GameOutro = True Then ScreenType = 7
If LevelEditor = False Then
If ScreenType = 2 Or ScreenType = 3 Then
GetvScreenAverage
ElseIf ScreenType = 5 And vScreen(2).Visible = False Then
GetvScreenAverage
ElseIf ScreenType = 7 Then
GetvScreenCredits
Else
GetvScreen Z
End If
If Background2(S) = 0 Then BitBlt myBackBuffer, 0, 0, ScreenW, ScreenH, 0, 0, 0, vbWhiteness
Else
If Background2(S) = 0 Then BitBlt myBackBuffer, 0, 0, ScreenW, ScreenH, 0, 0, 0, vbWhiteness
End If
If qScreen = True Then
If vScreenX(1) < qScreenX(1) - 2 Then
qScreenX(1) = qScreenX(1) - 2
ElseIf vScreenX(1) > qScreenX(1) + 2 Then
qScreenX(1) = qScreenX(1) + 2
End If
If vScreenY(1) < qScreenY(1) - 2 Then
qScreenY(1) = qScreenY(1) - 2
ElseIf vScreenY(1) > qScreenY(1) + 2 Then
qScreenY(1) = qScreenY(1) + 2
End If
If qScreenX(1) < vScreenX(1) + 5 And qScreenX(1) > vScreenX(1) - 5 And qScreenY(1) < vScreenY(1) + 5 And qScreenY(1) > vScreenY(1) - 5 Then
qScreen = False
End If
vScreenX(1) = qScreenX(1)
vScreenY(1) = qScreenY(1)
End If
'noturningback
If LevelEditor = False Then
If NoTurnBack(Player(Z).Section) = True Then
A = Z
If numScreens > 1 Then
If Player(1).Section = Player(2).Section Then
If Z = 1 Then GetvScreen 2
If -vScreenX(1) < -vScreenX(2) Then
A = 1
Else
A = 2
End If
End If
End If
If -vScreenX(A) > level(S).X Then
LevelChop(S) = LevelChop(S) + -vScreenX(A) - level(S).X
level(S).X = -vScreenX(A)
End If
End If
End If
DrawBackground S, Z
If LevelEditor = True Then
If BlockFlash <= 30 Then
With tempLocation 'Black out the level edges
.X = level(curSection).X
.Y = level(curSection).Y
.Width = level(curSection).Width
.Height = level(curSection).Height
BitBlt myBackBuffer, 0, 0, vScreenX(Z) + level(curSection).X, vScreen(Z).Height, GFX.Split(2).hdc, 0, 0, vbSrcCopy
BitBlt myBackBuffer, 0, 0, vScreenX(Z) + level(curSection).Width, vScreenY(Z) + level(curSection).Y, GFX.Split(2).hdc, 0, 0, vbSrcCopy
If -vScreenX(Z) < level(curSection).Width Then
BitBlt myBackBuffer, vScreenX(Z) + level(curSection).Width, 0, vScreen(Z).Width, vScreen(Z).Height, GFX.Split(2).hdc, 0, 0, vbSrcCopy
Else
BitBlt myBackBuffer, 0, 0, vScreen(Z).Width, vScreen(Z).Height, GFX.Split(2).hdc, 0, 0, vbSrcCopy
End If
If -vScreenY(Z) < level(curSection).Height Then
BitBlt myBackBuffer, 0, vScreenY(Z) + level(curSection).Height, vScreen(Z).Width, vScreen(Z).Height, GFX.Split(2).hdc, 0, 0, vbSrcCopy
Else
BitBlt myBackBuffer, 0, 0, vScreen(Z).Width, vScreen(Z).Height, GFX.Split(2).hdc, 0, 0, vbSrcCopy
End If
End With
End If
End If
If GameMenu = True Then
'BitBlt myBackBuffer, 0, 0, GFX.MenuGFX(1).ScaleWidth, GFX.MenuGFX(1).ScaleWidth, GFX.MenuGFXMask(1).hdc, 0, 0, vbSrcAnd
'BitBlt myBackBuffer, 0, 0, GFX.MenuGFX(1).ScaleWidth, GFX.MenuGFX(1).ScaleWidth, GFX.MenuGFX(1).hdc, 0, 0, vbSrcPaint
'BitBlt myBackBuffer, ScreenW / 2 - GFX.MenuGFX(2).ScaleWidth / 2, 70, GFX.MenuGFX(2).ScaleWidth, GFX.MenuGFX(2).ScaleWidth, GFX.MenuGFXMask(2).hdc, 0, 0, vbSrcAnd
'BitBlt myBackBuffer, ScreenW / 2 - GFX.MenuGFX(2).ScaleWidth / 2, 70, GFX.MenuGFX(2).ScaleWidth, GFX.MenuGFX(2).ScaleWidth, GFX.MenuGFX(2).hdc, 0, 0, vbSrcPaint
ElseIf LevelEditor = False Then
If numPlayers > 2 And nPlay.Online = False Then
For A = 1 To numPlayers
With Player(A)
If vScreenCollision(Z, .Location) = False And LevelMacro = 0 And .Location.Y < level(.Section).Height And .Location.Y + .Location.Height > level(.Section).Y And .TimeToLive = 0 And .Dead = False Then
For B = 1 To numPlayers
If Player(B).Dead = False And Player(B).TimeToLive = 0 And Player(B).Section = .Section And vScreenCollision(Z, Player(B).Location) = True Then
If C = 0 Or Abs(.Location.X + .Location.Width / 2 - (Player(B).Location.X + Player(B).Location.Width / 2)) < C Then
C = Abs(.Location.X + .Location.Width / 2 - (Player(B).Location.X + Player(B).Location.Width / 2))
D = B
End If
End If
Next B
If C = 0 Then
For B = 1 To numPlayers
If Player(B).Dead = False And Player(B).TimeToLive = 0 And Player(B).Section = .Section Then
If C = 0 Or Abs(.Location.X + .Location.Width / 2 - (Player(B).Location.X + Player(B).Location.Width / 2)) < C Then
C = Abs(.Location.X + .Location.Width / 2 - (Player(B).Location.X + Player(B).Location.Width / 2))
D = B
End If
End If
Next B
End If
.Location.X = Player(D).Location.X + Player(D).Location.Width / 2 - .Location.Width / 2
.Location.Y = Player(D).Location.Y + Player(D).Location.Height - .Location.Height
.Section = Player(D).Section
.Location.SpeedX = Player(D).Location.SpeedX
.Location.SpeedY = Player(D).Location.SpeedY
.Location.SpeedY = Rnd * 12 - 6
.CanJump = True
End If
End With
Next A
End If
End If
If LevelEditor = True Or MagicHand = True Then
For A = 1 To numBackground 'First backgrounds
With Background(A)
If .Type = 11 Then
If vScreenCollision(Z, .Location) And .Hidden = False Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, BackgroundWidth(.Type), BackgroundHeight(.Type), GFXBackgroundMask(.Type), 0, 0, vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, BackgroundWidth(.Type), BackgroundHeight(.Type), GFXBackground(.Type), 0, 0, vbSrcPaint
End If
ElseIf .Type = 12 Or .Type = 60 Or .Type = 61 Or .Type = 75 Or .Type = 76 Or .Type = 77 Or .Type = 78 Or .Type = 79 Then
If vScreenCollision(Z, .Location) And .Hidden = False Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, BackgroundWidth(.Type), BackgroundHeight(.Type), GFXBackground(.Type), 0, 0, vbSrcCopy
End If
End If
End With
Next A
Else
For A = 1 To MidBackground - 1 'First backgrounds
With Background(A)
If BackgroundHasNoMask(Background(A).Type) = False Then
If vScreenCollision(Z, .Location) And .Hidden = False Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, BackgroundWidth(.Type), BackgroundHeight(.Type), GFXBackgroundMask(.Type), 0, BackgroundHeight(.Type) * BackgroundFrame(.Type), vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, BackgroundWidth(.Type), BackgroundHeight(.Type), GFXBackground(.Type), 0, BackgroundHeight(.Type) * BackgroundFrame(.Type), vbSrcPaint
End If
Else
If vScreenCollision(Z, .Location) And .Hidden = False Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, GFXBackgroundWidth(.Type), BackgroundHeight(.Type), GFXBackground(.Type), 0, BackgroundHeight(.Type) * BackgroundFrame(.Type), vbSrcCopy
End If
End If
End With
Next A
End If
tempLocation.Width = 32
tempLocation.Height = 32
For A = 1 To sBlockNum 'Display sizable blocks
With Block(sBlockArray(A))
If BlockIsSizable(.Type) And (Not .Invis = True Or LevelEditor = True) Then
If vScreenCollision(Z, .Location) And .Hidden = False Then
For B = 0 To (.Location.Height / 32) - 1
For C = 0 To (.Location.Width / 32) - 1
tempLocation.X = .Location.X + C * 32
tempLocation.Y = .Location.Y + B * 32
If vScreenCollision(Z, tempLocation) Then
D = C
E = B
If Not D = 0 Then
If D = (.Location.Width / 32) - 1 Then
D = 2
Else
D = 1
d2 = 0.5
End If
End If
If Not E = 0 Then
If E = (.Location.Height / 32) - 1 Then
E = 2
Else
E = 1
End If
End If
If (D = 0 Or D = 2) Or (E = 0 Or E = 2) Or (.Type = 130 And (D = 0 Or D = 2) And E = 1) Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X + C * 32, vScreenY(Z) + .Location.Y + B * 32, 32, 32, GFXBlockMask(.Type), D * 32, E * 32, vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X + C * 32, vScreenY(Z) + .Location.Y + B * 32, 32, 32, GFXBlock(.Type), D * 32, E * 32, vbSrcPaint
Else
BitBlt myBackBuffer, vScreenX(Z) + .Location.X + C * 32, vScreenY(Z) + .Location.Y + B * 32, 32, 32, GFXBlock(.Type), D * 32, E * 32, vbSrcCopy
End If
End If
Next C
Next B
End If
End If
End With
Next A
If LevelEditor = True Or MagicHand = True Then
For A = 1 To numBackground 'Second backgrounds
With Background(A)
If Not (.Type = 11 Or .Type = 12 Or .Type = 60 Or .Type = 61 Or .Type = 75 Or .Type = 76 Or .Type = 77 Or .Type = 78 Or .Type = 79) Then
If vScreenCollision(Z, .Location) And .Hidden = False Then
If BackgroundHasNoMask(.Type) = False Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, BackgroundWidth(.Type), BackgroundHeight(.Type), GFXBackgroundMask(.Type), 0, BackgroundHeight(.Type) * BackgroundFrame(.Type), vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, BackgroundWidth(.Type), BackgroundHeight(.Type), GFXBackground(.Type), 0, BackgroundHeight(.Type) * BackgroundFrame(.Type), vbSrcPaint
Else
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, BackgroundWidth(.Type), BackgroundHeight(.Type), GFXBackground(.Type), 0, BackgroundHeight(.Type) * BackgroundFrame(.Type), vbSrcCopy
End If
End If
End If
End With
Next A
Else
For A = MidBackground To LastBackground 'Second backgrounds
With Background(A)
If vScreenCollision(Z, .Location) And .Hidden = False Then
If BackgroundHasNoMask(.Type) = False Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, BackgroundWidth(.Type), BackgroundHeight(.Type), GFXBackgroundMask(.Type), 0, BackgroundHeight(.Type) * BackgroundFrame(.Type), vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, BackgroundWidth(.Type), BackgroundHeight(.Type), GFXBackground(.Type), 0, BackgroundHeight(.Type) * BackgroundFrame(.Type), vbSrcPaint
Else
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, BackgroundWidth(.Type), BackgroundHeight(.Type), GFXBackground(.Type), 0, BackgroundHeight(.Type) * BackgroundFrame(.Type), vbSrcCopy
End If
End If
End With
Next A
End If
For A = numBackground + 1 To numBackground + numLocked 'Locked doors
With Background(A)
If vScreenCollision(Z, .Location) And (.Type = 98 Or .Type = 160) And .Hidden = False Then
If BackgroundHasNoMask(.Type) = False Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, BackgroundWidth(.Type), BackgroundHeight(.Type), GFXBackgroundMask(.Type), 0, BackgroundHeight(.Type) * BackgroundFrame(.Type), vbSrcAnd
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, BackgroundWidth(.Type), BackgroundHeight(.Type), GFXBackground(.Type), 0, BackgroundHeight(.Type) * BackgroundFrame(.Type), vbSrcPaint
Else
BitBlt myBackBuffer, vScreenX(Z) + .Location.X, vScreenY(Z) + .Location.Y, BackgroundWidth(.Type), BackgroundHeight(.Type), GFXBackground(.Type), 0, BackgroundHeight(.Type) * BackgroundFrame(.Type), vbSrcCopy
End If
End If
End With
Next A
For A = 1 To numNPCs 'Display NPCs that should be behind blocks
With NPC(A)
If (.Effect = 208 Or NPCIsAVine(.Type) = True Or .Type = 209 Or .Type = 159 Or .Type = 245 Or .Type = 8 Or .Type = 93 Or .Type = 74 Or .Type = 256 Or .Type = 257 Or .Type = 51 Or .Type = 52 Or .Effect = 1 Or .Effect = 3 Or .Effect = 4 Or (.Type = 45 And .Special = 0)) And .standingOnPlayer = 0 And (.Generator = False Or LevelEditor = True) Or .Type = 179 Or .Type = 270 Then
If Not .Effect = 2 And (.Generator = False Or LevelEditor = True) Then
If vScreenCollision(Z, .Location) And .Hidden = False Then
If .Active = True Then
If .Type = 8 Or .Type = 74 Or .Type = 93 Or .Type = 245 Or .Type = 256 Or .Type = 270 Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X + NPCFrameOffsetX(.Type), vScreenY(Z) + .Location.Y + NPCFrameOffsetY(.Type), .Location.Width, .Location.Height, GFXNPCMask(.Type), 0, .Frame * NPCHeight(.Type), vbSrcAnd
If .Shadow = False Then BitBlt myBackBuffer, vScreenX(Z) + .Location.X + NPCFrameOffsetX(.Type), vScreenY(Z) + .Location.Y + NPCFrameOffsetY(.Type), .Location.Width, .Location.Height, GFXNPC(.Type), 0, .Frame * NPCHeight(.Type), vbSrcPaint
ElseIf .Type = 51 Or .Type = 257 Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X + NPCFrameOffsetX(.Type), vScreenY(Z) + .Location.Y + NPCFrameOffsetY(.Type), .Location.Width, .Location.Height, GFXNPCMask(.Type), 0, .Frame * NPCHeight(.Type) + NPCHeight(.Type) - .Location.Height, vbSrcAnd
If .Shadow = False Then BitBlt myBackBuffer, vScreenX(Z) + .Location.X + NPCFrameOffsetX(.Type), vScreenY(Z) + .Location.Y + NPCFrameOffsetY(.Type), .Location.Width, .Location.Height, GFXNPC(.Type), 0, .Frame * NPCHeight(.Type) + NPCHeight(.Type) - .Location.Height, vbSrcPaint
ElseIf .Type = 52 Then
If .Direction = -1 Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X + NPCFrameOffsetX(.Type), vScreenY(Z) + .Location.Y + NPCFrameOffsetY(.Type), .Location.Width, .Location.Height, GFXNPCMask(.Type), 0, .Frame * NPCHeight(.Type), vbSrcAnd
If .Shadow = False Then BitBlt myBackBuffer, vScreenX(Z) + .Location.X + NPCFrameOffsetX(.Type), vScreenY(Z) + .Location.Y + NPCFrameOffsetY(.Type), .Location.Width, .Location.Height, GFXNPC(.Type), 0, .Frame * NPCHeight(.Type), vbSrcPaint
Else
BitBlt myBackBuffer, vScreenX(Z) + .Location.X + NPCFrameOffsetX(.Type), vScreenY(Z) + .Location.Y + NPCFrameOffsetY(.Type), .Location.Width, .Location.Height, GFXNPCMask(.Type), NPCWidth(.Type) - .Location.Width, .Frame * NPCHeight(.Type), vbSrcAnd
If .Shadow = False Then BitBlt myBackBuffer, vScreenX(Z) + .Location.X + NPCFrameOffsetX(.Type), vScreenY(Z) + .Location.Y + NPCFrameOffsetY(.Type), .Location.Width, .Location.Height, GFXNPC(.Type), NPCWidth(.Type) - .Location.Width, .Frame * NPCHeight(.Type), vbSrcPaint
End If
ElseIf NPCWidthGFX(.Type) = 0 Or .Effect = 1 Then
BitBlt myBackBuffer, vScreenX(Z) + .Location.X + NPCFrameOffsetX(.Type), vScreenY(Z) + .Location.Y + NPCFrameOffsetY(.Type), .Location.Width, .Location.Height, GFXNPCMask(.Type), 0, .Frame * NPCHeight(.Type), vbSrcAnd
If .Shadow = False Then BitBlt myBackBuffer, vScreenX(Z) + .Location.X + NPCFrameOffsetX(.Type), vScreenY(Z) + .Location.Y + NPCFrameOffsetY(.Type), .Location.Width, .Location.Height, GFXNPC(.Type), 0, .Frame * NPCHeight(.Type), vbSrcPaint
Else
BitBlt myBackBuffer, vScreenX(Z) + .Location.X + NPCFrameOffsetX(.Type) - NPCWidthGFX(.Type) / 2 + .Location.Width / 2, vScreenY(Z) + .Location.Y + NPCFrameOffsetY(.Type) - NPCHeightGFX(.Type) + .Location.Height, NPCWidthGFX(.Type), NPCHeightGFX(.Type), GFXNPCMask(.Type), 0, .Frame * NPCHeightGFX(.Type), vbSrcAnd
If .Shadow = False Then BitBlt myBackBuffer, vScreenX(Z) + .Location.X + NPCFrameOffsetX(.Type) - NPCWidthGFX(.Type) / 2 + .Location.Width / 2, vScreenY(Z) + .Location.Y + NPCFrameOffsetY(.Type) - NPCHeightGFX(.Type) + .Location.Height, NPCWidthGFX(.Type), NPCHeightGFX(.Type), GFXNPC(.Type), 0, .Frame * NPCHeightGFX(.Type), vbSrcPaint
End If
End If
If .Reset(Z) = True Or .Active = True Then
If .Active = False Then
.JustActivated = Z
If nPlay.Online = True Then
Netplay.sendData "2a" & A & "|" & nPlay.MySlot + 1 & LB
.JustActivated = nPlay.MySlot + 1
End If
End If
.TimeLeft = Physics.NPCTimeOffScreen
If nPlay.Online = True And nPlay.NPCWaitCount >= 10 And nPlay.Mode = 0 Then timeStr = timeStr & "2b" & A & LB
.Active = True
End If
.Reset(1) = False
.Reset(2) = False
Else
.Reset(Z) = True
If numScreens = 1 Then .Reset(2) = True
If SingleCoop = 1 Then
.Reset(2) = True
ElseIf SingleCoop = 2 Then
.Reset(1) = True
End If
End If
End If
End If
End With
Next A