Ignore:
Timestamp:
Jan 21, 2003, 12:20:36 PM (23 years ago)
Author:
sandervl
Message:

Removed dependency on dive.dll. Load it on demand.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ddraw/divewrap.h

    r5326 r9698  
    1 /* $Id: divewrap.h,v 1.4 2001-03-18 21:44:44 mike Exp $ */
     1/* $Id: divewrap.h,v 1.5 2003-01-21 11:20:35 sandervl Exp $ */
    22
    33/*
     
    1818  #include <dive.h>
    1919
    20   inline ULONG APIENTRY _DiveQueryCaps ( PDIVE_CAPS a,
    21                                         ULONG      b )
    22   {
    23     ULONG yyrc;
    24     USHORT sel = RestoreOS2FS();
     20void DiveUnload();
     21BOOL DiveLoad();
    2522
    26     yyrc = DiveQueryCaps(a, b);
    27     SetFS(sel);
     23ULONG APIENTRY _DiveOpen ( HDIVE *a, BOOL   b, PVOID  c );
     24ULONG APIENTRY _DiveQueryCaps ( PDIVE_CAPS a, ULONG      b );
     25ULONG APIENTRY _DiveSetupBlitter ( HDIVE a, PSETUP_BLITTER b );
     26ULONG APIENTRY _DiveBlitImage ( HDIVE a, ULONG b, ULONG c );
     27ULONG APIENTRY _DiveBlitImageLines ( HDIVE a, ULONG b,
     28                                     ULONG c, PBYTE d );
     29ULONG APIENTRY _DiveClose ( HDIVE a );
     30ULONG APIENTRY _DiveAcquireFrameBuffer ( HDIVE   a, PRECTL  b );
     31ULONG APIENTRY _DiveSwitchBank ( HDIVE a, ULONG b );
     32ULONG APIENTRY _DiveDeacquireFrameBuffer ( HDIVE a );
     33ULONG APIENTRY _DiveCalcFrameBufferAddress ( HDIVE  a, PRECTL b,
     34                                             PBYTE *c, PULONG d,
     35                                             PULONG e );
     36ULONG APIENTRY _DiveAllocImageBuffer ( HDIVE  a, PULONG b,
     37                                       FOURCC c, ULONG  d,
     38                                       ULONG  e, ULONG  f,
     39                                       PBYTE  g );
     40ULONG APIENTRY _DiveFreeImageBuffer ( HDIVE a, ULONG b );
     41ULONG APIENTRY _DiveBeginImageBufferAccess ( HDIVE  a, ULONG  b,
     42                                             PBYTE *c, PULONG d,
     43                                             PULONG e );
     44ULONG APIENTRY _DiveEndImageBufferAccess ( HDIVE a, ULONG b );
     45ULONG APIENTRY _DiveSetDestinationPalette ( HDIVE a, ULONG b,
     46                                            ULONG c, PBYTE d );
     47ULONG APIENTRY _DiveSetSourcePalette ( HDIVE a, ULONG b,
     48                                       ULONG c, PBYTE d );
     49ULONG APIENTRY _DiveSetTransparentBlitMode ( HDIVE a, ULONG b,
     50                                             ULONG c, ULONG d );
    2851
    29     return yyrc;
    30   }
    3152  #undef  DiveQueryCaps
    3253  #define DiveQueryCaps _DiveQueryCaps
    3354
    34   inline ULONG APIENTRY _DiveOpen ( HDIVE *a,
    35                                    BOOL   b,
    36                                    PVOID  c )
    37   {
    38     ULONG yyrc;
    39     USHORT sel = RestoreOS2FS();
    40 
    41     yyrc = DiveOpen(a, b, c);
    42     SetFS(sel);
    43 
    44     return yyrc;
    45   }
    4655  #undef  DiveOpen
    4756  #define DiveOpen _DiveOpen
    4857
    49   inline ULONG APIENTRY _DiveSetupBlitter ( HDIVE          a,
    50                                            PSETUP_BLITTER b )
    51   {
    52     ULONG yyrc;
    53     USHORT sel = RestoreOS2FS();
    54 
    55     yyrc = DiveSetupBlitter(a, b);
    56     SetFS(sel);
    57 
    58     return yyrc;
    59   }
    6058  #undef  DiveSetupBlitter
    6159  #define DiveSetupBlitter _DiveSetupBlitter
    6260
    63   inline ULONG APIENTRY _DiveBlitImage ( HDIVE a,
    64                                         ULONG b,
    65                                         ULONG c )
    66   {
    67     ULONG yyrc;
    68     USHORT sel = RestoreOS2FS();
    69 
    70     yyrc = DiveBlitImage(a, b, c);
    71     SetFS(sel);
    72 
    73     return yyrc;
    74   }
    7561  #undef  DiveBlitImage
    7662  #define DiveBlitImage _DiveBlitImage
    7763
    78   inline ULONG APIENTRY _DiveBlitImageLines ( HDIVE a,
    79                                              ULONG b,
    80                                              ULONG c,
    81                                              PBYTE d )
    82   {
    83     ULONG yyrc;
    84     USHORT sel = RestoreOS2FS();
    85 
    86     yyrc = DiveBlitImageLines(a, b, c, d);
    87     SetFS(sel);
    88 
    89     return yyrc;
    90   }
    9164  #undef  DiveBlitImageLines
    9265  #define DiveBlitImageLines _DiveBlitImageLines
    9366
    94   inline ULONG APIENTRY _DiveClose ( HDIVE a )
    95   {
    96     ULONG yyrc;
    97     USHORT sel = RestoreOS2FS();
    98 
    99     yyrc = DiveClose(a);
    100     SetFS(sel);
    101 
    102     return yyrc;
    103   }
    10467  #undef  DiveClose
    10568  #define DiveClose _DiveClose
    10669
    107   inline ULONG APIENTRY _DiveAcquireFrameBuffer ( HDIVE   a,
    108                                                  PRECTL  b )
    109   {
    110     ULONG yyrc;
    111     USHORT sel = RestoreOS2FS();
    112 
    113     yyrc = DiveAcquireFrameBuffer(a, b);
    114     SetFS(sel);
    115 
    116     return yyrc;
    117   }
    11870  #undef  DiveAcquireFrameBuffer
    11971  #define DiveAcquireFrameBuffer _DiveAcquireFrameBuffer
    12072
    121   inline ULONG APIENTRY _DiveSwitchBank ( HDIVE a,
    122                                          ULONG b )
    123   {
    124     ULONG yyrc;
    125     USHORT sel = RestoreOS2FS();
    126 
    127     yyrc = DiveSwitchBank(a, b);
    128     SetFS(sel);
    129 
    130     return yyrc;
    131   }
    13273  #undef  DiveSwitchBank
    13374  #define DiveSwitchBank _DiveSwitchBank
    13475
    135   inline ULONG APIENTRY _DiveDeacquireFrameBuffer ( HDIVE a )
    136   {
    137     ULONG yyrc;
    138     USHORT sel = RestoreOS2FS();
    139 
    140     yyrc = DiveDeacquireFrameBuffer(a);
    141     SetFS(sel);
    142 
    143     return yyrc;
    144   }
    14576  #undef  DiveDeacquireFrameBuffer
    14677  #define DiveDeacquireFrameBuffer _DiveDeacquireFrameBuffer
    14778
    148   inline ULONG APIENTRY _DiveCalcFrameBufferAddress ( HDIVE  a,
    149                                                      PRECTL b,
    150                                                      PBYTE *c,
    151                                                      PULONG d,
    152                                                      PULONG e )
    153   {
    154    ULONG yyrc;
    155    USHORT sel = RestoreOS2FS();
    156 
    157       yyrc = DiveCalcFrameBufferAddress(a, b, c, d, e);
    158       SetFS(sel);
    159 
    160       return yyrc;
    161   }
    16279  #undef  DiveCalcFrameBufferAddress
    16380  #define DiveCalcFrameBufferAddress _DiveCalcFrameBufferAddress
    16481
    165   inline ULONG APIENTRY _DiveAllocImageBuffer ( HDIVE  a,
    166                                                PULONG b,
    167                                                FOURCC c,
    168                                                ULONG  d,
    169                                                ULONG  e,
    170                                                ULONG  f,
    171                                                PBYTE  g )
    172   {
    173     ULONG yyrc;
    174     USHORT sel = RestoreOS2FS();
    175 
    176     yyrc = DiveAllocImageBuffer(a, b, c, d, e, f, g);
    177     SetFS(sel);
    178 
    179     return yyrc;
    180   }
    18182  #undef  DiveAllocImageBuffer
    18283  #define DiveAllocImageBuffer _DiveAllocImageBuffer
    18384
    184   inline ULONG APIENTRY _DiveFreeImageBuffer ( HDIVE a,
    185                                               ULONG b )
    186   {
    187     ULONG yyrc;
    188     USHORT sel = RestoreOS2FS();
    189 
    190     yyrc = DiveFreeImageBuffer(a, b);
    191     SetFS(sel);
    192 
    193     return yyrc;
    194   }
    19585  #undef  DiveFreeImageBuffer
    19686  #define DiveFreeImageBuffer _DiveFreeImageBuffer
    19787
    198   inline ULONG APIENTRY _DiveBeginImageBufferAccess ( HDIVE  a,
    199                                                      ULONG  b,
    200                                                      PBYTE *c,
    201                                                      PULONG d,
    202                                                      PULONG e )
    203   {
    204     ULONG yyrc;
    205     USHORT sel = RestoreOS2FS();
    206 
    207     yyrc = DiveBeginImageBufferAccess(a, b, c, d, e);
    208     SetFS(sel);
    209 
    210     return yyrc;
    211   }
    21288  #undef  DiveBeginImageBufferAccess
    21389  #define DiveBeginImageBufferAccess _DiveBeginImageBufferAccess
    21490
    215   inline ULONG APIENTRY _DiveEndImageBufferAccess ( HDIVE a,
    216                                                    ULONG b )
    217   {
    218     ULONG yyrc;
    219     USHORT sel = RestoreOS2FS();
    220 
    221     yyrc = DiveEndImageBufferAccess(a, b);
    222     SetFS(sel);
    223 
    224     return yyrc;
    225   }
    22691  #undef  DiveEndImageBufferAccess
    22792  #define DiveEndImageBufferAccess _DiveEndImageBufferAccess
    22893
    229   inline ULONG APIENTRY _DiveSetDestinationPalette ( HDIVE a,
    230                                                     ULONG b,
    231                                                     ULONG c,
    232                                                     PBYTE d )
    233   {
    234     ULONG yyrc;
    235     USHORT sel = RestoreOS2FS();
    236 
    237     yyrc = DiveSetDestinationPalette(a, b, c, d);
    238     SetFS(sel);
    239 
    240     return yyrc;
    241   }
    24294  #undef  DiveSetDestinationPalette
    24395  #define DiveSetDestinationPalette _DiveSetDestinationPalette
    24496
    245   inline ULONG APIENTRY _DiveSetSourcePalette ( HDIVE a,
    246                                                ULONG b,
    247                                                ULONG c,
    248                                                PBYTE d )
    249   {
    250     ULONG yyrc;
    251     USHORT sel = RestoreOS2FS();
    252 
    253     yyrc = DiveSetSourcePalette(a, b, c, d);
    254     SetFS(sel);
    255 
    256     return yyrc;
    257   }
    25897  #undef  DiveSetSourcePalette
    25998  #define DiveSetSourcePalette _DiveSetSourcePalette
    26099
    261   inline ULONG APIENTRY _DiveSetTransparentBlitMode ( HDIVE a,
    262                                                      ULONG b,
    263                                                      ULONG c,
    264                                                      ULONG d )
    265   {
    266     ULONG yyrc;
    267     USHORT sel = RestoreOS2FS();
    268 
    269     yyrc = DiveSetTransparentBlitMode(a, b, c, d);
    270     SetFS(sel);
    271 
    272     return yyrc;
    273   }
    274100  #undef  DiveSetTransparentBlitMode
    275101  #define DiveSetTransparentBlitMode _DiveSetTransparentBlitMode
Note: See TracChangeset for help on using the changeset viewer.