forked from JBontes/Life32
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDDraw.pas
1867 lines (1434 loc) · 69.7 KB
/
DDraw.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{***************************************************************************}
{ DirectDraw Import Unit for Delphi32 }
{ }
{ Copyright (c) 1995 Mike Scott All Rights Reserved }
{ }
{ For support or information, contact Mike Scott at:- }
{ Internet : [email protected] }
{ CompuServe: 100140,2420 }
{ Telephone: +44 131 467 3267 }
{ Snail-mail: 3 East End, West Calder, West Lothian EH55 8AB, UK. }
{ }
{ THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, }
{ EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED }
{ MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE. MICHAEL SCOTT }
{ CANNOT BE HELD RESPONSIBLE FOR ANY LOSSES, EITHER DIRECT OR INDIRECT, }
{ OF ANY PARTY MAKING USE OF THIS SOFTWARE. IN MAKING USE OF THIS }
{ SOFTWARE, YOU AGREE TO BE BOUND BY THE TERMS AND CONDITIONS FOUND IN }
{ THE ACCOMPANYING WINDOWS HELP FILE AND TO INDEMNIFY MICHAEL SCOTT }
{ AGAINST ANY ACTION TAKEN AGAINST HIM WITH RESPECT TO YOUR OR YOUR }
{ CLIENTS USE OF THIS SOFTWARE. }
{***************************************************************************}
unit DDraw;
{$WEAKPACKAGEUNIT ON}
interface
uses Windows , OLE2;
const
{ddsCaps field is valid.}
DDSD_CAPS = $00000000; {default}
{dwHeight field is valid.}
DDSD_HEIGHT = $00000002;
{dwWidth field is valid.}
DDSD_WIDTH = $00000004;
{lPitch is valid.}
DDSD_PITCH = $00000008;
{dwBackBufferCount is valid.}
DDSD_BACKBUFFERCOUNT = $00000020;
{dwZBufferBitDepth is valid.}
DDSD_ZBUFFERBITDEPTH = $00000040;
{dwAlphaBitDepth is valid.}
DDSD_ALPHABITDEPTH = $00000080;
{lpSurface is valid.}
DDSD_LPSURFACE = $00000800;
{ddpfPixelFormat is valid.}
DDSD_PIXELFORMAT = $00001000;
{ddckCKDestOverlay is valid.}
DDSD_CKDESTOVERLAY = $00002000;
{ddckCKDestBlt is valid.}
DDSD_CKDESTBLT = $00004000;
{ddckCKSrcOverlay is valid.}
DDSD_CKSRCOVERLAY = $00008000;
{ddckCKSrcBlt is valid.}
DDSD_CKSRCBLT = $00010000;
{All input fields are valid.}
DDSD_ALL = $0001f9ee;
{============================================================================
Direct Draw Capability Flags
These flags are used to describe the capabilities of a given Surface.
All flags are bit flags.
==========================================================================}
{***************************************************************************
DIRECTDRAWSURFACE CAPABILITY FLAGS
***************************************************************************}
{Indicates that this surface is a front buffer, back buffer, or
texture map that is being used in conjunction with a 3DDDI or
Direct3D HAL.}
DDSCAPS_3D = $00000001;
{Indicates that this surface contains alpha information. The pixe;
format must be interrogated to determine whether this surface
contains only alpha information or alpha information interlaced
with pixel color data (e.g. RGBA or YUVA).}
DDSCAPS_ALPHA = $00000002;
{Indicates that this surface is a backbuffer. It is generally
set by CreateSurface when the DDSCAPS_FLIP capability bit is set.
It indicates that this surface is THE back buffer of a surface
flipping structure. DirectDraw supports N surfaces in a
surface flipping structure. Only the surface that immediately
precedeces the DDSCAPS_FRONTBUFFER has this capability bit set.
The other surfaces are identified as back buffers by the presence
of the DDSCAPS_FLIP capability, their attachment order, and the
absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER
capabilities. The bit is sent to CreateSurface when a standalone
back buffer is being created. This surface could be attached to
a front buffer and/or back buffers to form a flipping surface
structure after the CreateSurface call. See AddAttachments for
a detailed description of the behaviors in this case.}
DDSCAPS_BACKBUFFER = $00000004;
{Indicates a complex surface structure is being described. A
complex surface structure results in the creation of more than
one surface. The additional surfaces are attached to the root
surface. The complex structure can only be destroyed by
destroying the root.}
DDSCAPS_COMPLEX = $00000008;
{Indicates that this surface is a part of a surface flipping structure.
When it is passed to CreateSurface the DDSCAPS_FRONTBUFFER and
DDSCAP_BACKBUFFER bits are not set. They are set by CreateSurface
on the resulting creations. The dwBackBufferCount field in the
DDSURFACEDESC structure must be set to at least 1 in order for
the CreateSurface call to succeed. The DDSCAPS_COMPLEX capability
must always be set with creating multiple surfaces through CreateSurface.}
DDSCAPS_FLIP = $00000010;
{Indicates that this surface is THE front buffer of a surface flipping
structure. It is generally set by CreateSurface when the DDSCAPS_FLIP
capability bit is set.
If this capability is sent to CreateSurface then a standalonw front buffer
is created. This surface will not have the DDSCAPS_FLIP capability.
It can be attached to other back buffers to form a flipping structure.
See AddAttachments for a detailed description of the behaviors in this
case.}
DDSCAPS_FRONTBUFFER = $00000020;
{Indicates that this surface is any offscreen surface that is not an overlay,
texture, zbuffer, front buffer, back buffer, or alpha surface. It is used
to identify plain vanilla surfaces.}
DDSCAPS_OFFSCREENPLAIN = $00000040;
{Indicates that this surface is an overlay. It may or may not be directly visible
depending on whether or not it is currently being overlayed onto the primary
surface. DDSCAPS_VISIBLE can be used to determine whether or not it is being
overlayed at the moment.}
DDSCAPS_OVERLAY = $00000080;
{Indicates that unique DirectDrawPalette objects can be created and
attached to this surface.}
DDSCAPS_PALETTE = $00000100;
{Indicates that this surface is the primary surface. The primary
surface represents what the user is seeing at the moment.}
DDSCAPS_PRIMARYSURFACE = $00000200;
{Indicates that this surface is the primary surface for the left eye.
The primary surface for the left eye represents what the user is seeing
at the moment with the users left eye. When this surface is created the
DDSCAPS_PRIMARYSURFACE represents what the user is seeing with the users
right eye.}
DDSCAPS_PRIMARYSURFACELEFT = $00000400;
{Indicates that this surface memory was allocated in system memory}
DDSCAPS_SYSTEMMEMORY = $00000800;
{Indicates that this surface can be used as a 3D texture. It does not
indicate whether or not the surface is being used for that purpose.}
DDSCAPS_TEXTUREMAP = $00001000;
{Indicates that this surface exists in video memory.}
DDSCAPS_VIDEOMEMORY = $00004000;
{Indicates that changes made to this surface are immediately visible.
It is always set for the primary surface and is set for overlays while
they are being overlayed and texture maps while they are being textured.}
DDSCAPS_VISIBLE = $00008000;
{Indicates that only writes are permitted to the surface. Read accesses
from the surface may or may not generate a protection fault, but the
results of a read from this surface will not be meaningful. READ ONLY.}
DDSCAPS_WRITEONLY = $00010000;
{Indicates that this surface is the z buffer. The z buffer does not contain
displayable information. Instead it contains bit depth information that is
used to determine which pixels are visible and which are obscured.}
DDSCAPS_ZBUFFER = $00020000;
{Indicates surface will have a DC associated long term}
DDSCAPS_OWNDC = $00040000;
{Indicates surface should be able to receive live video}
DDSCAPS_LIVEVIDEO = $00080000;
{Indicates surface should be able to have a stream decompressed
to it by the hardware.}
DDSCAPS_HWCODEC = $00100000;
{Surface is a 32 = $200 or 32 = $240 ModeX surface}
DDSCAPS_MODEX = $00200000;
{***************************************************************************
DIRECTDRAW DRIVER CAPABILITY FLAGS
***************************************************************************}
{Display hardware has 3D acceleration.}
DDCAPS_3D = $00000001;
{Indicates that DirectDraw will support only dest rectangles that are aligned
on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively.
READ ONLY.}
DDCAPS_ALIGNBOUNDARYDEST = $00000002;
{Indicates that DirectDraw will support only source rectangles whose sizes in
BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively. READ ONLY.}
DDCAPS_ALIGNSIZEDEST = $00000004;
{Indicates that DirectDraw will support only source rectangles that are aligned
on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively.
READ ONLY.}
DDCAPS_ALIGNBOUNDARYSRC = $00000008;
{Indicates that DirectDraw will support only source rectangles whose sizes in
BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively. READ ONLY.}
DDCAPS_ALIGNSIZESRC = $00000010;
{Indicates that DirectDraw will create video memory surfaces that have a stride
alignment equal to DIRECTDRAWCAPS.dwAlignStride. READ ONLY.}
DDCAPS_ALIGNSTRIDE = $00000020;
{Display hardware is capable of blt operations.}
DDCAPS_BLT = $00000040;
{Display hardware is capable of asynchronous blt operations.}
DDCAPS_BLTQUEUE = $00000080;
{Display hardware is capable of color space conversions during the blt operation.}
DDCAPS_BLTFOURCC = $00000100;
{Display hardware is capable of stretching during blt operations.}
DDCAPS_BLTSTRETCH = $00000200;
{Display hardware is shared with GDI.}
DDCAPS_GDI = $00000400;
{Display hardware can overlay.}
DDCAPS_OVERLAY = $00000800;
{Set if display hardware supports overlays but can not clip them.}
DDCAPS_OVERLAYCANTCLIP = $00001000;
{Indicates that overlay hardware is capable of color space conversions during
the overlay operation.}
DDCAPS_OVERLAYFOURCC = $00002000;
{Indicates that stretching can be done by the overlay hardware.}
DDCAPS_OVERLAYSTRETCH = $00004000;
{Indicates that unique DirectDrawPalettes can be created for DirectDrawSurfaces
other than the primary surface.}
DDCAPS_PALETTE = $00008000;
{Indicates that palette changes can be syncd with the veritcal refresh.}
DDCAPS_PALETTEVSYNC = $00010000;
{Display hardware can return the current scan line.}
DDCAPS_READSCANLINE = $00020000;
{Display hardware has stereo vision capabilities. DDSCAPS_PRIMARYSURFACELEFT
can be created.}
DDCAPS_STEREOVIEW = $00040000;
{Display hardware is capable of generating a vertical blank interrupt.}
DDCAPS_VBI = $00080000;
{Supports the use of z buffers with blt operations.}
DDCAPS_ZBLTS = $00100000;
{Supports Z Ordering of overlays.}
DDCAPS_ZOVERLAYS = $00200000;
{Supports color key}
DDCAPS_COLORKEY = $00400000;
{Supports alpha surfaces}
DDCAPS_ALPHA = $00800000;
{colorkey is hardware assisted(DDCAPS_COLORKEY will also be set)}
DDCAPS_COLORKEYHWASSIST = $01000000;
{no hardware support at al;}
DDCAPS_NOHARDWARE = $02000000;
{Display hardware is capable of color fill with bltter}
DDCAPS_BLTCOLORFILL = $04000000;
{Display hardware is bank switched, and potentially very slow at
random access to VRAM.}
DDCAPS_BANKSWITCHED = $08000000;
{***************************************************************************
MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2)
***************************************************************************}
{Display hardware is certified}
DDCAPS2_CERTIFIED = $00000001;
{***************************************************************************
DIRECTDRAW FX ALPHA CAPABILITY FLAGS
***************************************************************************}
{Supports alpha blending around the edge of a source color keyed surface.
For Blt.}
DDFXALPHACAPS_BLTALPHAEDGEBLEND = $00000001;
{Supports alpha information in the pixel format. The bit depth of alpha
information in the pixel format can be 1,2,4, or 8. The alpha value becomes
more opaque as the alpha value increases. (0 is transparent.)
For Blt.}
DDFXALPHACAPS_BLTALPHAPIXELS = $00000002;
{Supports alpha information in the pixel format. The bit depth of alpha
information in the pixel format can be 1,2,4, or 8. The alpha value
becomes more transparent as the alpha value increases. (0 is opaque.)
This flag can only be set if DDCAPS_ALPHA is set.
For Blt.}
DDFXALPHACAPS_BLTALPHAPIXELSNEG = $00000004;
{Supports alpha only surfaces. The bit depth of an alpha only surface can be
1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
(0 is transparent.)
For Blt.}
DDFXALPHACAPS_BLTALPHASURFACES = $00000008;
{The depth of the alpha channel data can range can be 1,2,4, or 8.
The NEG suffix indicates that this alpha channel becomes more transparent
as the alpha value increases. (0 is opaque.) This flag can only be set if
DDCAPS_ALPHA is set.
For Blt.}
DDFXALPHACAPS_BLTALPHASURFACESNEG = $00000010;
{Supports alpha blending around the edge of a source color keyed surface.
For Overlays.}
DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND = $00000020;
{Supports alpha information in the pixel format. The bit depth of alpha
information in the pixel format can be 1,2,4, or 8. The alpha value becomes
more opaque as the alpha value increases. (0 is transparent.)
For Overlays.}
DDFXALPHACAPS_OVERLAYALPHAPIXELS = $00000040;
{Supports alpha information in the pixel format. The bit depth of alpha
information in the pixel format can be 1,2,4, or 8. The alpha value
becomes more transparent as the alpha value increases. (0 is opaque.)
This flag can only be set if DDCAPS_ALPHA is set.
For Overlays.}
DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG = $00000080;
{Supports alpha only surfaces. The bit depth of an alpha only surface can be
1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases.
(0 is transparent.)
For Overlays.}
DDFXALPHACAPS_OVERLAYALPHASURFACES = $00000100;
{The depth of the alpha channel data can range can be 1,2,4, or 8.
The NEG suffix indicates that this alpha channel becomes more transparent
as the alpha value increases. (0 is opaque.) This flag can only be set if
DDCAPS_ALPHA is set.
For Overlays.}
DDFXALPHACAPS_OVERLAYALPHASURFACESNEG = $00000200;
{***************************************************************************
DIRECTDRAW FX CAPABILITY FLAGS
***************************************************************************}
{Uses arithmetic operations to stretch and shrink surfaces during blt
rather than pixel doubling techniques. Along the Y axis.}
DDFXCAPS_BLTARITHSTRETCHY = $00000020;
{Uses arithmetic operations to stretch during blt
rather than pixel doubling techniques. Along the Y axis. Only
works for x1, x2, etc.}
DDFXCAPS_BLTARITHSTRETCHYN = $00000010;
{Supports mirroring left to right in blt.}
DDFXCAPS_BLTMIRRORLEFTRIGHT = $00000040;
{Supports mirroring top to bottom in blt.}
DDFXCAPS_BLTMIRRORUPDOWN = $00000080;
{Supports arbitrary rotation for blts.}
DDFXCAPS_BLTROTATION = $00000100;
{Supports 90 degree rotations for blts.}
DDFXCAPS_BLTROTATION90 = $00000200;
{DirectDraw supports arbitrary shrinking of a surface along the
x axis (horizontal direction) for blts.}
DDFXCAPS_BLTSHRINKX = $00000400;
{
DirectDraw supports integer shrinking (1x,2x,) of a surface
along the x axis (horizontal direction) for blts.
}
DDFXCAPS_BLTSHRINKXN = $00000800;
{DirectDraw supports arbitrary shrinking of a surface along the
y axis (horizontal direction) for blts.}
DDFXCAPS_BLTSHRINKY = $00001000;
{DirectDraw supports integer shrinking (1x,2x,) of a surface
along the y axis (vertical direction) for blts.}
DDFXCAPS_BLTSHRINKYN = $00002000;
{DirectDraw supports arbitrary stretching of a surface along the
x axis (horizontal direction) for blts.}
DDFXCAPS_BLTSTRETCHX = $00004000;
{DirectDraw supports integer stretching (1x,2x,) of a surface
along the x axis (horizontal direction) for blts.}
DDFXCAPS_BLTSTRETCHXN = $00008000;
{DirectDraw supports arbitrary stretching of a surface along the
y axis (horizontal direction) for blts.}
DDFXCAPS_BLTSTRETCHY = $00010000;
{DirectDraw supports integer stretching (1x,2x,) of a surface
along the y axis (vertical direction) for blts.}
DDFXCAPS_BLTSTRETCHYN = $00020000;
{Uses arithmetic operations to stretch and shrink surfaces during
overlay rather than pixel doubling techniques. Along the Y axis
for overlays.}
DDFXCAPS_OVERLAYARITHSTRETCHY = $00040000;
{Uses arithmetic operations to stretch surfaces during
overlay rather than pixel doubling techniques. Along the Y axis
for overlays. Only works for x1, x2, etc.}
DDFXCAPS_OVERLAYARITHSTRETCHYN = $00000008;
{DirectDraw supports arbitrary shrinking of a surface along the
x axis (horizontal direction) for overlays.}
DDFXCAPS_OVERLAYSHRINKX = $00080000;
{DirectDraw supports integer shrinking (1x,2x,) of a surface
along the x axis (horizontal direction) for overlays.}
DDFXCAPS_OVERLAYSHRINKXN = $00100000;
{DirectDraw supports arbitrary shrinking of a surface along the
y axis (horizontal direction) for overlays.}
DDFXCAPS_OVERLAYSHRINKY = $00200000;
{DirectDraw supports integer shrinking (1x,2x,) of a surface
along the y axis (vertical direction) for overlays.}
DDFXCAPS_OVERLAYSHRINKYN = $00400000;
{DirectDraw supports arbitrary stretching of a surface along the
x axis (horizontal direction) for overlays.}
DDFXCAPS_OVERLAYSTRETCHX = $00800000;
{DirectDraw supports integer stretching (1x,2x,) of a surface
along the x axis (horizontal direction) for overlays.}
DDFXCAPS_OVERLAYSTRETCHXN = $01000000;
{DirectDraw supports arbitrary stretching of a surface along the
y axis (horizontal direction) for overlays.}
DDFXCAPS_OVERLAYSTRETCHY = $02000000;
{DirectDraw supports integer stretching (1x,2x,) of a surface
along the y axis (vertical direction) for overlays.}
DDFXCAPS_OVERLAYSTRETCHYN = $04000000;
{DirectDraw supports mirroring of overlays across the vertical axis}
DDFXCAPS_OVERLAYMIRRORLEFTRIGHT = $08000000;
{DirectDraw supports mirroring of overlays across the horizontal axis}
DDFXCAPS_OVERLAYMIRRORUPDOWN = $10000000;
{***************************************************************************
DIRECTDRAW STEREO VIEW CAPABILITIES
***************************************************************************}
{The stereo view is accomplished via enigma encoding.}
DDSVCAPS_ENIGMA = $00000001;
{The stereo view is accomplished via high frequency flickering.}
DDSVCAPS_FLICKER = $00000002;
{The stereo view is accomplished via red and blue filters applied
to the left and right eyes. All images must adapt their colorspaces
for this process.}
DDSVCAPS_REDBLUE = $00000004;
{The stereo view is accomplished with split screen technology.}
DDSVCAPS_SPLIT = $00000008;
{***************************************************************************
DIRECTDRAWPALETTE CAPABILITIES
***************************************************************************}
{Index is 4 bits. There are sixteen color entries in the palette table.}
DDPCAPS_4BIT = $00000001;
{Index is onto a 8 bit color index. This field is only valid with the
DDPCAPS_4BIT capability and the target surface is in 8bpp. Each color
entry is one byte long and is an index into destination surface's 8bpp
palette.}
DDPCAPS_8BITENTRIES = $00000002;
{Index is 8 bits. There are 256 color entries in the palette table.}
DDPCAPS_8BIT = $00000004;
{Indicates that this DIRECTDRAWPALETTE should use the palette color array
passed into the lpDDColorArray parameter to initialize the DIRECTDRAWPALETTE
object.}
DDPCAPS_INITIALIZE = $00000008;
{This palette is the one attached to the primary surface. Changing this
table has immediate effect on the display unless DDPSETPAL_VSYNC is specified
and supported.}
DDPCAPS_PRIMARYSURFACE = $00000010;
{This palette is the one attached to the primary surface left. Changing
this table has immediate effect on the display for the left eye unless
DDPSETPAL_VSYNC is specified and supported.}
DDPCAPS_PRIMARYSURFACELEFT = $00000020;
{This palette can have all 256 entries defined}
DDPCAPS_ALLOW256 = $00000040;
{This palette can have modifications to it synced with the monitors
refresh rate.}
DDPCAPS_VSYNC = $00000080;
{***************************************************************************
DIRECTDRAWPALETTE SETENTRY CONSTANTS
***************************************************************************}
{Palette changes take effect immediately.}
DDPSETPAL_IMMEDIATE = $00000000; {default}
{Palette changes should take effect during the vertical blank to avoid
palette tearing.}
DDPSETPAL_VSYNC = $00000002;
{***************************************************************************
DIRECTDRAWPALETTE GETENTRY CONSTANTS
***************************************************************************}
{0 is the only legal value}
{***************************************************************************
DIRECTDRAWSURFACE SETPALETTE CONSTANTS
***************************************************************************}
{Palette change takes effect immediately.}
DDSETPAL_IMMEDIATE = $00000000; {default}
{Palette change should take effect during the vertical blank to avoid
palette tearing.}
DDSETPAL_VSYNC = $00000002;
{***************************************************************************
DIRECTDRAW BITDEPTH CONSTANTS
*
NOTE: These are only used to indicate supported bit depths. These
are flags only, they are not to be used as an actual bit depth. The
absolute numbers 1, 2, 4, 8, 16, 24 and 32 are used to indicate actua;
bit depths in a surface or for changing the display mode.
***************************************************************************}
{1 bit per pixel.}
DDBD_1 = $00004000;
{2 bits per pixel.}
DDBD_2 = $00002000;
{4 bits per pixel. }
DDBD_4 = $00001000;
{8 bits per pixel.}
DDBD_8 = $00000800;
{16 bits per pixel.}
DDBD_16 = $00000400;
{24 bits per pixel.}
DDBD_24 = $00000200;
{32 bits per pixel.}
DDBD_32 = $00000100;
{***************************************************************************
DIRECTDRAWSURFACE SET/GET COLOR KEY FLAGS
***************************************************************************}
{Set if the structure contains a color space. Not set if the structure
contains a single color key.}
DDCKEY_COLORSPACE = $00000001;
{Set if the structure specifies a color key or color space which is to be
used as a destination color key for blt operations.}
DDCKEY_DESTBLT = $00000002;
{Set if the structure specifies a color key or color space which is to be
used as a destination color key for overlay operations.}
DDCKEY_DESTOVERLAY = $00000004;
{Set if the structure specifies a color key or color space which is to be
used as a source color key for blt operations.}
DDCKEY_SRCBLT = $00000008;
{Set if the structure specifies a color key or color space which is to be
used as a source color key for overlay operations. }
DDCKEY_SRCOVERLAY = $00000010;
{***************************************************************************
DIRECTDRAW COLOR KEY CAPABILITY FLAGS
***************************************************************************}
{Supports transparent blting using a color key to identify the replaceable
bits of the destination surface for RGB colors.}
DDCKEYCAPS_DESTBLT = $00000001;
{Supports transparent blting using a color space to identify the replaceable
bits of the destination surface for RGB colors.}
DDCKEYCAPS_DESTBLTCLRSPACE = $00000002;
{Supports transparent blting using a color space to identify the replaceable
bits of the destination surface for YUV colors.}
DDCKEYCAPS_DESTBLTCLRSPACEYUV = $00000004;
{Supports transparent blting using a color key to identify the replaceable
bits of the destination surface for YUV colors. }
DDCKEYCAPS_DESTBLTYUV = $00000008;
{Supports overlaying using colorkeying of the replaceable bits of the surface
being overlayed for RGB colors. }
DDCKEYCAPS_DESTOVERLAY = $00000010;
{Supports a color space as the color key for the destination for RGB colors.}
DDCKEYCAPS_DESTOVERLAYCLRSPACE = $00000020;
{Supports a color space as the color key for the destination for YUV colors.}
DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV = $00000040;
{Supports only one active destination color key value for visible overlay
surfaces.}
DDCKEYCAPS_DESTOVERLAYONEACTIVE = $00000080;
{Supports overlaying using colorkeying of the replaceable bits of the
surface being overlayed for YUV colors.}
DDCKEYCAPS_DESTOVERLAYYUV = $00000100;
{Supports transparent blting using the color key for the source with
this surface for RGB colors.}
DDCKEYCAPS_SRCBLT = $00000200;
{Supports transparent blting using a color space for the source with
this surface for RGB colors.}
DDCKEYCAPS_SRCBLTCLRSPACE = $00000400;
{Supports transparent blting using a color space for the source with
this surface for YUV colors.}
DDCKEYCAPS_SRCBLTCLRSPACEYUV = $00000800;
{Supports transparent blting using the color key for the source with
this surface for YUV colors.}
DDCKEYCAPS_SRCBLTYUV = $00001000;
{Supports overlays using the color key for the source with this
overlay surface for RGB colors.}
DDCKEYCAPS_SRCOVERLAY = $00002000;
{Supports overlays using a color space as the source color key for
the overlay surface for RGB colors.}
DDCKEYCAPS_SRCOVERLAYCLRSPACE = $00004000;
{Supports overlays using a color space as the source color key for
the overlay surface for YUV colors.}
DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV = $00008000;
{Supports only one active source color key value for visible
overlay surfaces.}
DDCKEYCAPS_SRCOVERLAYONEACTIVE = $00010000;
{
Supports overlays using the color key for the source with this
overlay surface for YUV colors.
}
DDCKEYCAPS_SRCOVERLAYYUV = $00020000;
{there are no bandwidth trade-offs for using colorkey with an overlay}
DDCKEYCAPS_NOCOSTOVERLAY = $00040000;
{***************************************************************************
DIRECTDRAW PIXELFORMAT FLAGS
***************************************************************************}
{The surface has alpha channel information in the pixel format.}
DDPF_ALPHAPIXELS = $00000001;
{The pixel format contains alpha only information}
DDPF_ALPHA = $00000002;
{The FourCC code is valid.}
DDPF_FOURCC = $00000004;
{The surface is 1-bit color indexed.}
DDPF_PALETTEINDEXED1 = 2048;
{The surface is 4-bit color indexed.}
DDPF_PALETTEINDEXED4 = $00000008;
{The surface is 4-bit color indexed to an 8-bit palette.}
DDPF_PALETTEINDEXED4TO8 = $00000010;
{The surface is 8-bit color indexed.}
DDPF_PALETTEINDEXED8 = $00000020;
{The RGB data in the pixel format structure is valid.}
DDPF_RGB = $00000040;
{The surface will accept pixel data in the format specified
and compress it during the write.}
DDPF_COMPRESSED = $00000080;
{The surface will accept RGB data and translate it during
the write to YUV data. The format of the data to be written
will be contained in the pixel format structure. The DDPF_RGB
flag will be set.}
DDPF_RGBTOYUV = $00000100;
{pixel format is YUV - YUV data in pixel format struct is valid}
DDPF_YUV = $00000200;
{pixel format is a z buffer only surface}
DDPF_ZBUFFER = $00000400;
{===========================================================================
DIRECTDRAW CALLBACK FLAGS
*==========================================================================}
{***************************************************************************
DIRECTDRAW ENUMSURFACES FLAGS
***************************************************************************}
{Enumerate all of the surfaces that meet the search criterion.}
DDENUMSURFACES_ALL = $00000001;
{A search hit is a surface that matches the surface description.}
DDENUMSURFACES_MATCH = $00000002;
{A search hit is a surface that does not match the surface description.}
DDENUMSURFACES_NOMATCH = $00000004;
{Enumerate the first surface that can be created which meets the search criterion.}
DDENUMSURFACES_CANBECREATED = $00000008;
{Enumerate the surfaces that already exist that meet the search criterion.}
DDENUMSURFACES_DOESEXIST = $00000010;
{***************************************************************************
DIRECTDRAW SETCOOPERATIVELEVEL FLAGS
***************************************************************************}
{Exclusive mode owner will be responsible for the entire primary surface.
GDI can be ignored. used with DD}
DDSCL_FULLSCREEN = $00000001;
{allow CTRL_ALT_DEL to work while in fullscreen exclusive mode}
DDSCL_ALLOWREBOOT = $00000002;
{prevents DDRAW from modifying the application window.
prevents DDRAW from minimize/restore the application window on activation.}
DDSCL_NOWINDOWCHANGES = $00000004;
{app wants to work as a regular Windows application}
DDSCL_NORMAL = $00000008;
{app wants exclusive access}
DDSCL_EXCLUSIVE = $00000010;
{app can deal with non-windows display modes}
DDSCL_ALLOWMODEX = $00000040;
{***************************************************************************
DIRECTDRAW BLT FLAGS
***************************************************************************}
{Use the alpha information in the pixel format or the alpha channel surface
attached to the destination surface as the alpha channel for this blt.}
DDBLT_ALPHADEST = $00000001;
{Use the dwConstAlphaDest field in the DDBLTFX structure as the alpha channe;
for the destination surface for this blt.}
DDBLT_ALPHADESTCONSTOVERRIDE = $00000002;
{The NEG suffix indicates that the destination surface becomes more
transparent as the alpha value increases. (0 is opaque)}
DDBLT_ALPHADESTNEG = $00000004;
{Use the lpDDSAlphaDest field in the DDBLTFX structure as the alpha
channel for the destination for this blt.}
DDBLT_ALPHADESTSURFACEOVERRIDE = $00000008;
{Use the dwAlphaEdgeBlend field in the DDBLTFX structure as the alpha channe;
for the edges of the image that border the color key colors.}
DDBLT_ALPHAEDGEBLEND = $00000010;
{Use the alpha information in the pixel format or the alpha channel surface
attached to the source surface as the alpha channel for this blt.}
DDBLT_ALPHASRC = $00000020;
{Use the dwConstAlphaSrc field in the DDBLTFX structure as the alpha channe;
for the source for this blt.}
DDBLT_ALPHASRCCONSTOVERRIDE = $00000040;
{The NEG suffix indicates that the source surface becomes more transparent
as the alpha value increases. (0 is opaque)}
DDBLT_ALPHASRCNEG = $00000080;
{Use the lpDDSAlphaSrc field in the DDBLTFX structure as the alpha channe;
for the source for this blt.}
DDBLT_ALPHASRCSURFACEOVERRIDE = $00000100;
{Do this blt asynchronously through the FIFO in the order received. If
there is no room in the hardware FIFO fail the call.}
DDBLT_ASYNC = $00000200;
{Uses the dwFillColor field in the DDBLTFX structure as the RGB color
to fill the destination rectangle on the destination surface with.}
DDBLT_COLORFILL = $00000400;
{Uses the dwDDFX field in the DDBLTFX structure to specify the effects
to use for the blt.}
DDBLT_DDFX = $00000800;
{Uses the dwDDROPS field in the DDBLTFX structure to specify the ROPS
that are not part of the Win32 API.}
DDBLT_DDROPS = $00001000;
{Use the color key associated with the destination surface.}
DDBLT_KEYDEST = $00002000;
{Use the dckDestColorkey field in the DDBLTFX structure as the color key
for the destination surface.}
DDBLT_KEYDESTOVERRIDE = $00004000;
{Use the color key associated with the source surface.}
DDBLT_KEYSRC = $00008000;
{Use the dckSrcColorkey field in the DDBLTFX structure as the color key
for the source surface.}
DDBLT_KEYSRCOVERRIDE = $00010000;
{Use the dwROP field in the DDBLTFX structure for the raster operation
for this blt. These ROPs are the same as the ones defined in the Win32 API.}
DDBLT_ROP = $00020000;
{Use the dwRotationAngle field in the DDBLTFX structure as the angle
(specified in 1/100th of a degree) to rotate the surface.}
DDBLT_ROTATIONANGLE = $00040000;
{Z-buffered blt using the z-buffers attached to the source and destination
surfaces and the dwZBufferOpCode field in the DDBLTFX structure as the
z-buffer opcode.}
DDBLT_ZBUFFER = $00080000;
{Z-buffered blt using the dwConstDest Zfield and the dwZBufferOpCode field
in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
for the destination.}
DDBLT_ZBUFFERDESTCONSTOVERRIDE = $00100000;
{Z-buffered blt using the lpDDSDestZBuffer field and the dwZBufferOpCode
field in the DDBLTFX structure as the z-buffer and z-buffer opcode
respectively for the destination.}
DDBLT_ZBUFFERDESTOVERRIDE = $00200000;
{Z-buffered blt using the dwConstSrcZ field and the dwZBufferOpCode field
in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively
for the source.}
DDBLT_ZBUFFERSRCCONSTOVERRIDE = $00400000;
{Z-buffered blt using the lpDDSSrcZBuffer field and the dwZBufferOpCode
field in the DDBLTFX structure as the z-buffer and z-buffer opcode
respectively for the source.}
DDBLT_ZBUFFERSRCOVERRIDE = $00800000;
{wait until the device is ready to handle the blt
this will cause blt to not return DDERR_WASSTILLDRAWING}
DDBLT_WAIT = $01000000;
{***************************************************************************
BLTFAST FLAGS
***************************************************************************}
DDBLTFAST_NOCOLORKEY = $00000000;
DDBLTFAST_SRCCOLORKEY = $00000001;
DDBLTFAST_DESTCOLORKEY = $00000002;
DDBLTFAST_WAIT = $00000010;
{***************************************************************************
LOCK FLAGS
***************************************************************************}
DDLOCK_WAIT = $00000001;
DDLOCK_READONLY = $00000010; {surface will only be read from}
DDLOCK_WRITEONLY = $00000020; {surface will only be written to}
{***************************************************************************
FLIP FLAGS
***************************************************************************}
DDFLIP_WAIT = $00000001;
{***************************************************************************
DIRECTDRAW SURFACE OVERLAY FLAGS
***************************************************************************}
{Use the alpha information in the pixel format or the alpha channel surface
attached to the destination surface as the alpha channel for the
destination overlay.}
DDOVER_ALPHADEST = $00000001;
{Use the dwConstAlphaDest field in the DDOVERLAYFX structure as the
destination alpha channel for this overlay.}
DDOVER_ALPHADESTCONSTOVERRIDE = $00000002;
{The NEG suffix indicates that the destination surface becomes more
transparent as the alpha value increases.}
DDOVER_ALPHADESTNEG = $00000004;
{Use the lpDDSAlphaDest field in the DDOVERLAYFX structure as the alpha
channel destination for this overlay.}
DDOVER_ALPHADESTSURFACEOVERRIDE = $00000008;
{Use the dwAlphaEdgeBlend field in the DDOVERLAYFX structure as the alpha
channel for the edges of the image that border the color key colors.}
DDOVER_ALPHAEDGEBLEND = $00000010;
{Use the alpha information in the pixel format or the alpha channel surface
attached to the source surface as the source alpha channel for this overlay.}
DDOVER_ALPHASRC = $00000020;
{Use the dwConstAlphaSrc field in the DDOVERLAYFX structure as the source
alpha channel for this overlay.}
DDOVER_ALPHASRCCONSTOVERRIDE = $00000040;
{The NEG suffix indicates that the source surface becomes more transparent
as the alpha value increases.}
DDOVER_ALPHASRCNEG = $00000080;
{Use the lpDDSAlphaSrc field in the DDOVERLAYFX structure as the alpha channe;
source for this overlay.}
DDOVER_ALPHASRCSURFACEOVERRIDE = $00000100;
{Turn this overlay off.}
DDOVER_HIDE = $00000200;
{Use the color key associated with the destination surface.}
DDOVER_KEYDEST = $00000400;
{Use the dckDestColorkey field in the DDOVERLAYFX structure as the color key
for the destination surface}
DDOVER_KEYDESTOVERRIDE = $00000800;
{Use the color key associated with the source surface.}
DDOVER_KEYSRC = $00001000;
{Use the dckSrcColorkey field in the DDOVERLAYFX structure as the color key
for the source surface.}
DDOVER_KEYSRCOVERRIDE = $00002000;
{Turn this overlay on.}
DDOVER_SHOW = $00004000;
{Add a dirty rect to an emulated overlayed surface.}
DDOVER_ADDDIRTYRECT = $00008000;
{Redraw all dirty rects on an emulated overlayed surface.}
DDOVER_REFRESHDIRTYRECTS = $00010000;
{Redraw the entire surface on an emulated overlayed surface.}
DDOVER_REFRESHALL = $00020000;
{Force redrawing onto the destination surface without regard for the background}
DDOVER_REFRESHPOUND = $00040000;
{Use the overlay FX flags to define special overlay FX}
DDOVER_DDFX = $00080000;
{***************************************************************************
DIRECTDRAWSURFACE LOCK FLAGS