Changeset 522 for trunk/src


Ignore:
Timestamp:
Aug 17, 1999, 2:44:46 PM (26 years ago)
Author:
sandervl
Message:

divewrap bugfixes + removal of FS save/restore macro calls

Location:
trunk/src/ddraw
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ddraw/OS2CLIPPER.CPP

    r503 r522  
    88#include "misc.h"
    99#include <winerror.h>
    10 #include <odincrt.h>
    1110
    1211//******************************************************************************
     
    8483    if(me->Referenced == 0)
    8584    {
    86       ODIN_delete( me);
     85      delete( me);
    8786      return(0);
    8887    }
  • trunk/src/ddraw/OS2D3D.CPP

    r503 r522  
    1111#include <winerror.h>
    1212#include <builtin.h>
    13 #include <odincrt.h>
    1413#undef THIS
    1514#define THIS VOID*
     
    5251    if(me->Referenced == 0)
    5352    {
    54       ODIN_delete(me);
     53      delete(me);
    5554      return(0);
    5655    }
  • trunk/src/ddraw/OS2DDRAW.CPP

    r503 r522  
    2222#include "os2DDWindow.h"
    2323#include "os2palset.h"
    24 #include <odincrt.h>
     24
    2525#define KEY_DIRECT2 "\\Software\\Win32OS2\\Direct2"
    2626#define KEY_DIRECT2DRAW "\\Software\\Win32OS2\\Direct2\\Draw"
     
    128128  }
    129129
    130   ODIN_FS_BEGIN
    131     rc = DiveOpen( &hDive,
    132                    FALSE,
    133                    &pFrameBuffer);
    134   ODIN_FS_END
     130  rc = DiveOpen( &hDive,
     131                 FALSE,
     132                 &pFrameBuffer);
    135133  if(rc)
    136134  {
     
    242240    if(me->Referenced == 0)
    243241    {
    244       ODIN_delete(me);
     242      delete(me);
    245243      rc = 0;
    246244    }
     
    271269 HRESULT                rc;
    272270
    273  ODIN_FS_BEGIN
    274 
    275271  newclip = new OS2IDirectDrawClipper(me);
    276272
     
    295291      *lplpDD = (IDirectDrawClipper *)newclip;
    296292  }
    297 
    298   ODIN_FS_END
    299293
    300294  return(rc);
     
    311305  HRESULT                rc = DD_OK;
    312306  int                    palsize = 0;
    313 
    314   ODIN_FS_BEGIN
    315307
    316308  if(dwFlags & DDPCAPS_8BITENTRIES)
     
    360352  }
    361353
    362   ODIN_FS_END
    363 
    364354  return(rc);
    365355}
     
    373363 OS2IDirectDrawSurface *newsurf;
    374364 HRESULT                rc;
    375 
    376   ODIN_FS_BEGIN
    377365
    378366  #ifdef DEBUG
     
    410398  }
    411399
    412   ODIN_FS_END
    413 
    414400  return(rc);
    415401}
     
    423409 OS2IDirectDrawSurface *newsurf;
    424410 HRESULT                rc;
    425 
    426   ODIN_FS_BEGIN
    427411
    428412  #ifdef DEBUG
     
    461445  }
    462446
    463   ODIN_FS_END
    464 
    465447  return(rc);
    466448}
     
    508490  }
    509491
    510 
    511   ODIN_FS_BEGIN
    512492
    513493  // Setting up the surface
     
    538518        if(!lpDDEnumModesCallback(&DDSurfAct,lpContext))
    539519        {
    540           {ODIN_FS_END
    541520          return (DD_OK);
    542521        }
     
    610589        if(!lpDDEnumModesCallback(&DDSurfAct,lpContext))
    611590        {
    612           {ODIN_FS_END
    613591          return (DD_OK);
    614592        }
     
    682660      if (lpDDSurfaceDesc->dwFlags & !(DDSD_WIDTH|DDSD_HEIGHT|DDSD_PIXELFORMAT))
    683661      {
    684         {ODIN_FS_END
    685662        return(DDERR_INVALIDPARAMS);
    686663      }
     
    717694  }
    718695
    719   ODIN_FS_END
     696 
    720697
    721698  return(DD_OK);
     
    786763    // Clear structure so we only have to set the supported flags
    787764
    788     ODIN_FS_BEGIN
     765   
    789766    memset(lpDDDriverCaps,0,sizeof(DDCAPS));
    790     ODIN_FS_END
     767   
    791768
    792769    // Reset the size
     
    11601137    return(DDERR_INVALIDPARAMS);
    11611138
    1162   ODIN_FS_BEGIN
     1139 
    11631140
    11641141  if(DD_OK==DrawWaitForVerticalBlank(This, dwFlags, 0))
     
    11831160  }
    11841161
    1185   ODIN_FS_END
     1162 
    11861163
    11871164  return(DD_OK);
     
    12221199    return(DDERR_INVALIDPARAMS);
    12231200
    1224   ODIN_FS_BEGIN
     1201 
    12251202    rc = io_init1();
    1226   ODIN_FS_END
     1203 
    12271204
    12281205  if(0==rc)  // try to get IOPL for the thread
    12291206  {
    12301207    *lpbIsInVB = (c_inb1(0x3da)&0x08)!=0;
    1231     ODIN_FS_BEGIN
     1208   
    12321209      io_exit1(); // reset IOPL
    1233     ODIN_FS_END
     1210   
    12341211    return(DD_OK);
    12351212  }
     
    13401317    return (DDERR_UNSUPPORTED);
    13411318
    1342   ODIN_FS_BEGIN
     1319 
    13431320    rci = io_init1();
    1344   ODIN_FS_END
     1321 
    13451322
    13461323  if(rci)  // try to get IOPL for the thread
     
    13731350  }
    13741351
    1375   ODIN_FS_BEGIN
     1352 
    13761353    io_exit1();
    1377   ODIN_FS_END
     1354 
    13781355
    13791356  return (rc);
     
    14721449    return DDERR_INVALIDPARAMS;
    14731450
    1474   ODIN_FS_BEGIN
     1451 
    14751452
    14761453  memset( lpdddi,
     
    14831460          "ODIN DD Emulation Driver");
    14841461
    1485   ODIN_FS_END
     1462 
    14861463
    14871464  return(DD_OK);
     
    14941471  HKEY hkDirectDraw2;
    14951472
    1496   ODIN_FS_BEGIN
     1473 
    14971474
    14981475  if (bScale)
     
    15101487  }
    15111488
    1512   ODIN_FS_END
    1513 }
    1514 //******************************************************************************
    1515 //******************************************************************************
    1516 
     1489 
     1490}
     1491//******************************************************************************
     1492//******************************************************************************
     1493
  • trunk/src/ddraw/OS2PALETTE.CPP

    r503 r522  
    1010#include "os2palset.h"
    1111#include <winerror.h>
    12 #include <odincrt.h>
    1312
    1413//******************************************************************************
     
    9796    if(me->Referenced == 0)
    9897    {
    99       ODIN_delete(me);
     98      delete(me);
    10099      return(0);
    101100    }
     
    142141    return(DDERR_INVALIDPARAMS);
    143142
    144   ODIN_FS_BEGIN
    145 
    146143  memcpy( (char *)lpEntries,
    147144          (char *)(me->os2pal + dwBase),
    148145          dwNumEntries*sizeof(PALETTEENTRY));
    149 
    150   ODIN_FS_END
    151146
    152147  return(DD_OK);
     
    176171    return(DDERR_INVALIDPARAMS);
    177172
    178   ODIN_FS_BEGIN
    179 
    180173  memcpy((char *)(me->os2pal + dwBase),
    181174         (char *)lpNewEntries,
    182175         dwNumEntries*sizeof(PALETTEENTRY));
    183 
    184   ODIN_FS_END
    185176
    186177  if(me->fAttachedToPrimary)
  • trunk/src/ddraw/OS2PALSET.CPP

    r503 r522  
    77#include <string.h>
    88#include "os2palset.h"
    9 #include <odincrt.h>
     9
    1010//******************************************************************************
    1111//******************************************************************************
     
    1818 int  i;
    1919
    20   ODIN_FS_BEGIN
     20 
    2121
    2222  hps = WinGetPS(HWND_DESKTOP);
     
    4545  WinReleasePS(hps);
    4646
    47   ODIN_FS_END
     47 
    4848
    4949}
     
    5555 HDC hdc;
    5656
    57   ODIN_FS_BEGIN
     57 
    5858
    5959  hps = WinGetPS( HWND_DESKTOP);
     
    7171  WinReleasePS(hps);
    7272
    73   ODIN_FS_END
     73 
    7474
    7575}
  • trunk/src/ddraw/OS2SURFACE.CPP

    r503 r522  
    1313#include "asmutil.h"
    1414#include <winerror.h>
    15 #include <odincrt.h>
    1615
    1716#ifndef __WATCOMC__
     
    994993  pFillPos = pLine + dwPitchDB;
    995994
    996   #ifndef USE_ASM
    997     ODIN_FS_BEGIN
    998   #endif
    999995  for( y=0;y<FillHeight;y++,pFillPos+=dwPitchDB)
    1000996  {
     
    10081004    #endif
    10091005  }
    1010   #ifndef USE_ASM
    1011     ODIN_FS_END
    1012   #endif
    10131006
    10141007  return(DD_OK);
     
    12341227{
    12351228  DDRectangle *pItem = (DDRectangle*) lpItem;
    1236   ODIN_delete(pItem);
     1229  delete(pItem);
    12371230  return 1;
    12381231}
     
    12521245  OS2IDirectDrawSurface  *AttachedSurface;
    12531246
    1254   ODIN_FS_BEGIN
    12551247
    12561248  if(DDSurfaceDesc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE)
     
    13281320
    13291321  lpDraw->Vtbl.Release(lpDraw);
    1330 
    1331   ODIN_FS_END
    13321322
    13331323}
     
    14201410    if(me->Referenced == 0)
    14211411    {
    1422       ODIN_delete( me);
     1412      delete( me);
    14231413      #ifndef __WATCOMC__
    14241414        //_interrupt(3);
     
    14821472      if(me->DDSurfaceDesc.ddsCaps.dwCaps & DDSCAPS_MIPMAP)
    14831473      {
    1484         ODIN_FS_BEGIN
    14851474          rc = DPA_InsertPtr( me->DPA_SurfaceMipMaps,
    14861475                              DPA_GetPtrCount(me->DPA_SurfaceMipMaps),
    14871476                              AttachedSurface);
    1488         ODIN_FS_END
    14891477
    14901478        if( rc>=0)
     
    15131501    else
    15141502    {
    1515       ODIN_FS_BEGIN
    15161503        rc = DPA_InsertPtr( me->DPA_SurfaceAttached,
    15171504                            DPA_GetPtrCount(me->DPA_SurfaceAttached),
    15181505                            AttachedSurface);
    1519       ODIN_FS_END
    15201506
    15211507      if(rc>=0)
     
    17111697  #endif
    17121698
    1713   ODIN_FS_BEGIN
    17141699
    17151700  if (NULL!=lpDestRect)
     
    17601745        WriteLog("Blt: Dest Surface partly locked\n");
    17611746      #endif
    1762       {ODIN_FS_END
    17631747      return(DDERR_SURFACEBUSY);
    17641748    }
    17651749  }
    1766 
    1767   ODIN_FS_END
    17681750
    17691751  DestSurfaceDesc.dwSize = sizeof(DDSURFACEDESC2);
     
    18531835  }
    18541836
    1855   ODIN_FS_BEGIN
    1856 
    18571837  if (NULL!=lpSrcRect)
    18581838  {
     
    19031883        WriteLog("Blt: Src Surface partly locked\n");
    19041884      #endif
    1905       {ODIN_FS_END
    19061885      return(DDERR_SURFACEBUSY);
    19071886    }
    19081887  }
    1909 
    1910   ODIN_FS_END
    19111888
    19121889  if( ( (NULL==lpDestRect) && (NULL!=lpSrcRect) ) ||
     
    19911968        #else
    19921969        // Solid Blit
    1993         ODIN_FS_BEGIN
    19941970        while(1)
    19951971        {
     
    20001976            break;
    20011977        }
    2002         ODIN_FS_END
    20031978        #endif
    20041979      }
     
    20552030          #else
    20562031          // Solid Blit
    2057           ODIN_FS_BEGIN
    20582032          while(1)
    20592033          {
     
    20642038              break;
    20652039          }
    2066           ODIN_FS_END
    20672040          #endif
    20682041        }
     
    21282101        #else
    21292102        // Solid Blit
    2130         ODIN_FS_BEGIN
    21312103        while(1)
    21322104        {
     
    21372109            break;
    21382110        }
    2139         ODIN_FS_END
    21402111        #endif
    21412112      }
     
    25772548  }
    25782549
    2579   ODIN_FS_BEGIN
    2580 
    25812550  if (NULL!=lpSrcRect)
    25822551  {
     
    28792848  dest->lpVtbl->ChangeUniquenessValue(dest);
    28802849
    2881   ODIN_FS_END
    28822850
    28832851  return(DD_OK);
     
    30002968  }
    30012969
    3002   ODIN_FS_BEGIN
    30032970
    30042971  if ( (!Found) && (AttachedSurface->DDSurfaceDesc.ddsCaps.dwCaps &  DDSCAPS_MIPMAP ) )
     
    30403007  }
    30413008
    3042   ODIN_FS_END
    30433009
    30443010  return(Found?DD_OK:DDERR_SURFACENOTATTACHED);
     
    30763042  if(me->BackBuffer != NULL)
    30773043  {
    3078     ODIN_FS_BEGIN
    3079       memcpy(&EnumDesc,&(me->DDSurfaceDesc),sizeof(DDSURFACEDESC2));
    3080     ODIN_FS_END
     3044    memcpy(&EnumDesc,&(me->DDSurfaceDesc),sizeof(DDSURFACEDESC2));
    30813045    rc = lpCallBack((LPDIRECTDRAWSURFACE4)me->BackBuffer,&EnumDesc,lpContext);
    30823046  }
    30833047
    3084   ODIN_FS_BEGIN
    3085     count = DPA_GetPtrCount(me->DPA_SurfaceMipMaps);
    3086   ODIN_FS_END
     3048  count = DPA_GetPtrCount(me->DPA_SurfaceMipMaps);
    30873049
    30883050  if(count>0)
     
    30913053    while( (DDENUMRET_OK == rc) && i<count )
    30923054    {
    3093       ODIN_FS_BEGIN
    30943055        EnumSurface = (OS2IDirectDrawSurface*) DPA_FastGetPtr(me->DPA_SurfaceMipMaps,i);
    30953056        memcpy( &EnumDesc,
    30963057                &(EnumSurface->DDSurfaceDesc),
    30973058                sizeof(DDSURFACEDESC2));
    3098       ODIN_FS_END
    30993059      // Calling back into WIN32 app so we had to reset FS
    31003060      rc = lpCallBack((LPDIRECTDRAWSURFACE4)EnumSurface,&EnumDesc,lpContext);
     
    31033063  }
    31043064
    3105   ODIN_FS_BEGIN
    3106     count = DPA_GetPtrCount(me->DPA_SurfaceAttached);
    3107   ODIN_FS_END
     3065  count = DPA_GetPtrCount(me->DPA_SurfaceAttached);
    31083066
    31093067  if(count>0)
     
    31123070    while( (DDENUMRET_OK == rc) && i<count )
    31133071    {
    3114       ODIN_FS_BEGIN
    3115         EnumSurface = (OS2IDirectDrawSurface*) DPA_FastGetPtr(me->DPA_SurfaceAttached,i);
    3116         memcpy( &EnumDesc,
    3117                 &(EnumSurface->DDSurfaceDesc),
    3118                 sizeof(DDSURFACEDESC2));
    3119       ODIN_FS_END
     3072      EnumSurface = (OS2IDirectDrawSurface*) DPA_FastGetPtr(me->DPA_SurfaceAttached,i);
     3073      memcpy( &EnumDesc,
     3074              &(EnumSurface->DDSurfaceDesc),
     3075              sizeof(DDSURFACEDESC2));
    31203076      rc = lpCallBack((LPDIRECTDRAWSURFACE4)EnumSurface,&EnumDesc,lpContext);
    31213077      i++;
     
    33053261  }
    33063262
    3307   ODIN_FS_BEGIN
    33083263
    33093264  rc = DD_OK;
     
    33673322  }
    33683323
    3369   ODIN_FS_END
    33703324
    33713325  return rc;
     
    34103364    return(DDERR_INVALIDPARAMS);
    34113365
    3412   ODIN_FS_BEGIN
    3413     memcpy(lpDDCaps, &(me->DDSurfaceDesc.ddsCaps), sizeof(DDSCAPS2) );
    3414   ODIN_FS_END
     3366  memcpy(lpDDCaps, &(me->DDSurfaceDesc.ddsCaps), sizeof(DDSCAPS2) );
    34153367
    34163368  return(DD_OK);
     
    34553407    if(DDCKEY_SRCBLT & dwFlags)
    34563408    {
    3457       ODIN_FS_BEGIN
    3458         memcpy(lpDDColKey,&(me->DDSurfaceDesc.ddckCKSrcBlt),sizeof(DDCOLORKEY) );
    3459       ODIN_FS_END
     3409      memcpy(lpDDColKey,&(me->DDSurfaceDesc.ddckCKSrcBlt),sizeof(DDCOLORKEY) );
    34603410    }
    34613411    else
     
    34933443    return(DDERR_DCALREADYCREATED);
    34943444  }
    3495 
    3496   ODIN_FS_BEGIN
    34973445
    34983446  rc = DD_OK;
     
    36413589  }
    36423590
    3643   ODIN_FS_END
    3644 
    36453591  return rc;
    36463592}
     
    37173663    return DDERR_INVALIDPARAMS;
    37183664
    3719   ODIN_FS_BEGIN
    3720     memcpy( (char*)lpPixelFormat,
    3721             (char*)&(me->DDSurfaceDesc.ddpfPixelFormat),
    3722             sizeof(DDPIXELFORMAT));
    3723   ODIN_FS_END
    3724 
     3665  memcpy( (char*)lpPixelFormat,
     3666          (char*)&(me->DDSurfaceDesc.ddpfPixelFormat),
     3667          sizeof(DDPIXELFORMAT));
    37253668
    37263669  return(DD_OK);
     
    37393682    return(DDERR_INVALIDPARAMS);
    37403683
    3741   ODIN_FS_BEGIN
    3742     memcpy( (char *)lpSurface,
    3743             (char *)&me->DDSurfaceDesc,
    3744             sizeof(DDSURFACEDESC));
    3745   ODIN_FS_END
     3684  memcpy( (char *)lpSurface,
     3685          (char *)&me->DDSurfaceDesc,
     3686          sizeof(DDSURFACEDESC));
    37463687
    37473688  return(DD_OK);
     
    37603701    return(DDERR_INVALIDPARAMS);
    37613702
    3762   ODIN_FS_BEGIN
    3763     memcpy( (char *)lpSurface,
    3764             (char *)&me->DDSurfaceDesc,
    3765             sizeof(DDSURFACEDESC2));
    3766   ODIN_FS_END
     3703  memcpy( (char *)lpSurface,
     3704          (char *)&me->DDSurfaceDesc,
     3705          sizeof(DDSURFACEDESC2));
    37673706
    37683707  return(DD_OK);
     
    38323771  if (DD_OK==rc)
    38333772  {
    3834     ODIN_FS_BEGIN
    3835       memcpy( (char*)lpSurfaceDesc,
    3836               (char*)&SurfaceDesc4,
    3837               sizeof(DDSURFACEDESC) );
    3838     ODIN_FS_END
     3773    memcpy( (char*)lpSurfaceDesc,
     3774            (char*)&SurfaceDesc4,
     3775            sizeof(DDSURFACEDESC) );
    38393776  }
    38403777
     
    38693806    return DDERR_INVALIDPARAMS;
    38703807
    3871   ODIN_FS_BEGIN
    38723808
    38733809  if (NULL!=lpRect)
     
    39583894  }
    39593895
    3960   ODIN_FS_END
    39613896
    39623897  return rc;
     
    39803915  if(hdc != me->hdcImage)
    39813916    return(DDERR_INVALIDOBJECT);
    3982 
    3983   ODIN_FS_BEGIN
    39843917
    39853918  //unselect our bitmap
     
    40293962  me->dwLastDCUnique = me->dwUniqueValue; // Store this to see if the surface was locked after we released the DC
    40303963
    4031   ODIN_FS_END
    4032 
    40333964  return(DD_OK);
    40343965}
     
    40974028    return(DDERR_UNSUPPORTED);
    40984029
    4099   ODIN_FS_BEGIN
    4100 
    41014030  if(DDCKEY_SRCBLT & dwFlags)
    41024031  {
     
    41184047  else
    41194048    rc = DDERR_INVALIDPARAMS; // some other flags where set => error
    4120 
    4121   ODIN_FS_END
    41224049
    41234050  return rc;
     
    42304157    return(DDERR_NOTLOCKED);
    42314158  }
    4232 
    4233   ODIN_FS_BEGIN
    42344159
    42354160  #ifdef DEBUG
     
    43774302  }
    43784303
    4379   ODIN_FS_END
    4380 
    43814304  return rc;
    43824305}
     
    44114334  }
    44124335
    4413   ODIN_FS_BEGIN
    4414 
    44154336  if(NULL!=lpSurfaceRect)
    44164337  {
     
    45084429  }
    45094430
    4510   ODIN_FS_END
    4511 
    45124431  return rc;
    45134432}
     
    46114530    return DDERR_INVALIDSURFACETYPE; // only work for system alloced surfaces
    46124531
    4613   ODIN_FS_BEGIN
    4614 
    46154532  if (!me->Updated)
    46164533  {
     
    46224539  me->lpVtbl->ChangeUniquenessValue(me);
    46234540  memcpy((char *)&(me->DDSurfaceDesc), (char *)lpSurfDesc, sizeof(DDSURFACEDESC));
    4624 
    4625   ODIN_FS_END
    46264541
    46274542  return DD_OK;
     
    46464561    return DDERR_INVALIDSURFACETYPE; // only work for system alloced surfaces
    46474562
    4648   ODIN_FS_BEGIN
    4649 
    46504563  if (!me->Updated)
    46514564  {
     
    46574570  me->lpVtbl->ChangeUniquenessValue(me);
    46584571  memcpy((char *)&(me->DDSurfaceDesc), (char *)lpSurfDesc, sizeof(DDSURFACEDESC2));
    4659 
    4660   ODIN_FS_END
    46614572
    46624573  return DD_OK;
     
    46864597     (dwFlags & ~(DDSPD_IUNKNOWNPOINTER|DDSPD_VOLATILE)))
    46874598    return(DDERR_INVALIDPARAMS);
    4688 
    4689   ODIN_FS_BEGIN
    46904599
    46914600  // first check if the refGUID is stored as then the content will be updated
     
    48494758  }
    48504759
    4851   ODIN_FS_END
    4852 
    48534760  return rc;
    48544761}
     
    48734780    return(DDERR_INVALIDPARAMS);
    48744781
    4875   ODIN_FS_BEGIN
    4876 
    48774782  if(DPA_GetPtrCount(me->DPA_SurfacePrivateData)>0)
    48784783  {
     
    49134818   rc = DDERR_NOTFOUND;
    49144819
    4915   ODIN_FS_END
    49164820
    49174821  return rc;
     
    49324836  if(NULL==me)
    49334837    return(DDERR_INVALIDOBJECT);
    4934 
    4935   ODIN_FS_BEGIN
    49364838
    49374839  if(DPA_GetPtrCount(me->DPA_SurfacePrivateData)>0)
     
    49674869  }
    49684870
    4969   ODIN_FS_END
    4970 
    49714871  return (bFound?DD_OK:DDERR_NOTFOUND);
    49724872}
     
    49934893  PSURFPRIVATEDATA pSData;
    49944894
    4995   ODIN_FS_BEGIN
    49964895
    49974896  #ifdef DEBUG
     
    50264925  }
    50274926
    5028   ODIN_FS_END
    5029 
    50304927  return (DD_OK);
    50314928}
     
    50434940  int BlitWidth,BlitHeight;
    50444941  static char Scanline[6400];  // sufficient for 1600 at 32 bit
    5045 
    5046   ODIN_FS_BEGIN
    50474942
    50484943  // Bridge, we may got a problem ;)
     
    51075002  }
    51085003
    5109   ODIN_FS_END
    51105004}
    51115005
  • trunk/src/ddraw/OS2UTIL.CPP

    r503 r522  
    1 /* $Id: OS2UTIL.CPP,v 1.4 1999-08-16 00:40:48 hugh Exp $ */
     1/* $Id: OS2UTIL.CPP,v 1.5 1999-08-17 12:44:46 sandervl Exp $ */
    22
    33/*
     
    1010 */
    1111#define INCL_DOSMEMMGR
    12 #include <os2.h>
     12#include <os2wrap.h>
    1313#include "misc.h"
    1414#include "os2util.h"
     
    4343void OS2MaximizeWindow(HWND hwndClient)
    4444{
    45   ODIN_FS_BEGIN
    4645  WinSetWindowPos(hwndClient, HWND_TOP, 0, 0, 0, 0, SWP_MAXIMIZE);
    47   ODIN_FS_END
    4846}
    4947
  • trunk/src/ddraw/ddraw.CPP

    r503 r522  
    22
    33#include <builtin.h>
    4 #include <odincrt.h>
    54#define INITGUID
    65#include "os2ddraw.h"
     
    1817  OS2IDirectDraw *newdraw;
    1918  HRESULT         rc;
    20 
    21   ODIN_FS_BEGIN
    2219
    2320  WriteLog("DirectDrawCreate %X %X %X\n", lpGUID, lplpDD, pUnkOuter);
     
    4239      *lplpDD = (LPDIRECTDRAW)newdraw;
    4340  }
    44   ODIN_FS_END
    45 
    4641  return(rc);
    4742}
  • trunk/src/ddraw/divewrap.h

    r422 r522  
    88  #include <dive.h>
    99
     10  inline ULONG APIENTRY _DiveQueryCaps ( PDIVE_CAPS a,
     11                                        ULONG      b )
     12  {
     13    ULONG yyrc;
     14    USHORT sel = RestoreOS2FS();
     15
     16    yyrc = DiveQueryCaps(a, b);
     17    SetFS(sel);
     18
     19    return yyrc;
     20  }
    1021  #undef  DiveQueryCaps
    1122  #define DiveQueryCaps _DiveQueryCaps
    12   inline ULONG APIENTRY DiveQueryCaps ( PDIVE_CAPS a,
    13                                         ULONG      b )
    14   {
    15     ULONG yyrc;
    16     USHORT sel = RestoreOS2FS();
    17 
    18     yyrc = DiveQueryCaps(a, b);
    19     SetFS(sel);
    20 
    21     return yyrc;
    22   }
    23 
     23
     24  inline ULONG APIENTRY _DiveOpen ( HDIVE *a,
     25                                   BOOL   b,
     26                                   PVOID  c )
     27  {
     28    ULONG yyrc;
     29    USHORT sel = RestoreOS2FS();
     30
     31    yyrc = DiveOpen(a, b, c);
     32    SetFS(sel);
     33
     34    return yyrc;
     35  }
    2436  #undef  DiveOpen
    2537  #define DiveOpen _DiveOpen
    26   inline ULONG APIENTRY DiveOpen ( HDIVE *a,
    27                                    BOOL   b,
    28                                    PVOID  c )
    29   {
    30     ULONG yyrc;
    31     USHORT sel = RestoreOS2FS();
    32 
    33     yyrc = DiveOpen(a, b, c);
    34     SetFS(sel);
    35 
    36     return yyrc;
    37   }
    38 
     38
     39  inline ULONG APIENTRY _DiveSetupBlitter ( HDIVE          a,
     40                                           PSETUP_BLITTER b )
     41  {
     42    ULONG yyrc;
     43    USHORT sel = RestoreOS2FS();
     44
     45    yyrc = DiveSetupBlitter(a, b);
     46    SetFS(sel);
     47
     48    return yyrc;
     49  }
    3950  #undef  DiveSetupBlitter
    4051  #define DiveSetupBlitter _DiveSetupBlitter
    41   inline ULONG APIENTRY DiveSetupBlitter ( HDIVE          a,
    42                                            PSETUP_BLITTER b )
    43   {
    44     ULONG yyrc;
    45     USHORT sel = RestoreOS2FS();
    46 
    47     yyrc = DiveSetupBlitter(a, b);
    48     SetFS(sel);
    49 
    50     return yyrc;
    51   }
    52 
     52
     53  inline ULONG APIENTRY _DiveBlitImage ( HDIVE a,
     54                                        ULONG b,
     55                                        ULONG c )
     56  {
     57    ULONG yyrc;
     58    USHORT sel = RestoreOS2FS();
     59
     60    yyrc = DiveBlitImage(a, b, c);
     61    SetFS(sel);
     62
     63    return yyrc;
     64  }
    5365  #undef  DiveBlitImage
    5466  #define DiveBlitImage _DiveBlitImage
    55   inline ULONG APIENTRY DiveBlitImage ( HDIVE a,
    56                                         ULONG b,
    57                                         ULONG c )
    58   {
    59     ULONG yyrc;
    60     USHORT sel = RestoreOS2FS();
    61 
    62     yyrc = DiveBlitImage(a, b, c);
    63     SetFS(sel);
    64 
    65     return yyrc;
    66   }
    67 
    68   #undef  DiveBlitImageLines
    69   #define DiveBlitImageLines _DiveBlitImageLines
    70   inline ULONG APIENTRY DiveBlitImageLines ( HDIVE a,
     67
     68  inline ULONG APIENTRY _DiveBlitImageLines ( HDIVE a,
    7169                                             ULONG b,
    7270                                             ULONG c,
     
    8179    return yyrc;
    8280  }
    83 
     81  #undef  DiveBlitImageLines
     82  #define DiveBlitImageLines _DiveBlitImageLines
     83
     84  inline ULONG APIENTRY _DiveClose ( HDIVE a )
     85  {
     86    ULONG yyrc;
     87    USHORT sel = RestoreOS2FS();
     88
     89    yyrc = DiveClose(a);
     90    SetFS(sel);
     91
     92    return yyrc;
     93  }
    8494  #undef  DiveClose
    8595  #define DiveClose _DiveClose
    86   inline ULONG APIENTRY DiveClose ( HDIVE a )
    87   {
    88     ULONG yyrc;
    89     USHORT sel = RestoreOS2FS();
    90 
    91     yyrc = DiveClose(a);
    92     SetFS(sel);
    93 
    94     return yyrc;
    95   }
    96 
     96
     97  inline ULONG APIENTRY _DiveAcquireFrameBuffer ( HDIVE   a,
     98                                                 PRECTL  b )
     99  {
     100    ULONG yyrc;
     101    USHORT sel = RestoreOS2FS();
     102
     103    yyrc = DiveAcquireFrameBuffer(a, b);
     104    SetFS(sel);
     105
     106    return yyrc;
     107  }
    97108  #undef  DiveAcquireFrameBuffer
    98109  #define DiveAcquireFrameBuffer _DiveAcquireFrameBuffer
    99   inline ULONG APIENTRY DiveAcquireFrameBuffer ( HDIVE   a,
    100                                                  PRECTL  b )
    101   {
    102     ULONG yyrc;
    103     USHORT sel = RestoreOS2FS();
    104 
    105     yyrc = DiveAcquireFrameBuffer(a, b);
    106     SetFS(sel);
    107 
    108     return yyrc;
    109   }
    110 
     110
     111  inline ULONG APIENTRY _DiveSwitchBank ( HDIVE a,
     112                                         ULONG b )
     113  {
     114    ULONG yyrc;
     115    USHORT sel = RestoreOS2FS();
     116
     117    yyrc = DiveSwitchBank(a, b);
     118    SetFS(sel);
     119
     120    return yyrc;
     121  }
    111122  #undef  DiveSwitchBank
    112123  #define DiveSwitchBank _DiveSwitchBank
    113   inline ULONG APIENTRY DiveSwitchBank ( HDIVE a,
    114                                          ULONG b )
    115   {
    116     ULONG yyrc;
    117     USHORT sel = RestoreOS2FS();
    118 
    119     yyrc = DiveSwitchBank(a, b);
    120     SetFS(sel);
    121 
    122     return yyrc;
    123   }
    124 
     124
     125  inline ULONG APIENTRY _DiveDeacquireFrameBuffer ( HDIVE a )
     126  {
     127    ULONG yyrc;
     128    USHORT sel = RestoreOS2FS();
     129
     130    yyrc = DiveDeacquireFrameBuffer(a);
     131    SetFS(sel);
     132
     133    return yyrc;
     134  }
    125135  #undef  DiveDeacquireFrameBuffer
    126136  #define DiveDeacquireFrameBuffer _DiveDeacquireFrameBuffer
    127   inline ULONG APIENTRY DiveDeacquireFrameBuffer ( HDIVE a )
    128   {
    129     ULONG yyrc;
    130     USHORT sel = RestoreOS2FS();
    131 
    132     yyrc = DiveDeacquireFrameBuffer(a);
    133     SetFS(sel);
    134 
    135     return yyrc;
    136   }
    137 
    138   #undef  DiveCalcFrameBufferAddress
    139   #define DiveCalcFrameBufferAddress _DiveCalcFrameBufferAddress
    140   inline ULONG APIENTRY DiveCalcFrameBufferAddress ( HDIVE  a,
     137
     138  inline ULONG APIENTRY _DiveCalcFrameBufferAddress ( HDIVE  a,
    141139                                                     PRECTL b,
    142140                                                     PBYTE *c,
     
    152150      return yyrc;
    153151  }
    154 
    155   #undef  DiveAllocImageBuffer
    156   #define DiveAllocImageBuffer _DiveAllocImageBuffer
    157   inline ULONG APIENTRY DiveAllocImageBuffer ( HDIVE  a,
     152  #undef  DiveCalcFrameBufferAddress
     153  #define DiveCalcFrameBufferAddress _DiveCalcFrameBufferAddress
     154
     155  inline ULONG APIENTRY _DiveAllocImageBuffer ( HDIVE  a,
    158156                                               PULONG b,
    159157                                               FOURCC c,
     
    171169    return yyrc;
    172170  }
    173 
     171  #undef  DiveAllocImageBuffer
     172  #define DiveAllocImageBuffer _DiveAllocImageBuffer
     173
     174  inline ULONG APIENTRY _DiveFreeImageBuffer ( HDIVE a,
     175                                              ULONG b )
     176  {
     177    ULONG yyrc;
     178    USHORT sel = RestoreOS2FS();
     179
     180    yyrc = DiveFreeImageBuffer(a, b);
     181    SetFS(sel);
     182
     183    return yyrc;
     184  }
    174185  #undef  DiveFreeImageBuffer
    175186  #define DiveFreeImageBuffer _DiveFreeImageBuffer
    176   inline ULONG APIENTRY DiveFreeImageBuffer ( HDIVE a,
    177                                               ULONG b )
    178   {
    179     ULONG yyrc;
    180     USHORT sel = RestoreOS2FS();
    181 
    182     yyrc = DiveFreeImageBuffer(a, b);
    183     SetFS(sel);
    184 
    185     return yyrc;
    186   }
    187 
    188   #undef  DiveBeginImageBufferAccess
    189   #define DiveBeginImageBufferAccess _DiveBeginImageBufferAccess
    190   inline ULONG APIENTRY DiveBeginImageBufferAccess ( HDIVE  a,
     187
     188  inline ULONG APIENTRY _DiveBeginImageBufferAccess ( HDIVE  a,
    191189                                                     ULONG  b,
    192190                                                     PBYTE *c,
     
    202200    return yyrc;
    203201  }
    204 
     202  #undef  DiveBeginImageBufferAccess
     203  #define DiveBeginImageBufferAccess _DiveBeginImageBufferAccess
     204
     205  inline ULONG APIENTRY _DiveEndImageBufferAccess ( HDIVE a,
     206                                                   ULONG b )
     207  {
     208    ULONG yyrc;
     209    USHORT sel = RestoreOS2FS();
     210
     211    yyrc = DiveEndImageBufferAccess(a, b);
     212    SetFS(sel);
     213
     214    return yyrc;
     215  }
    205216  #undef  DiveEndImageBufferAccess
    206217  #define DiveEndImageBufferAccess _DiveEndImageBufferAccess
    207   inline ULONG APIENTRY DiveEndImageBufferAccess ( HDIVE a,
    208                                                    ULONG b )
    209   {
    210     ULONG yyrc;
    211     USHORT sel = RestoreOS2FS();
    212 
    213     yyrc = DiveEndImageBufferAccess(a, b);
    214     SetFS(sel);
    215 
    216     return yyrc;
    217   }
    218 
    219   #undef  DiveSetDestinationPalette
    220   #define DiveSetDestinationPalette _DiveSetDestinationPalette
    221   inline ULONG APIENTRY DiveSetDestinationPalette ( HDIVE a,
     218
     219  inline ULONG APIENTRY _DiveSetDestinationPalette ( HDIVE a,
    222220                                                    ULONG b,
    223221                                                    ULONG c,
     
    232230    return yyrc;
    233231  }
    234 
    235   #undef  DiveSetSourcePalette
    236   #define DiveSetSourcePalette _DiveSetSourcePalette
    237   inline ULONG APIENTRY DiveSetSourcePalette ( HDIVE a,
     232  #undef  DiveSetDestinationPalette
     233  #define DiveSetDestinationPalette _DiveSetDestinationPalette
     234
     235  inline ULONG APIENTRY _DiveSetSourcePalette ( HDIVE a,
    238236                                               ULONG b,
    239237                                               ULONG c,
     
    248246    return yyrc;
    249247  }
    250 
    251   #undef  DiveSetTransparentBlitMode
    252   #define DiveSetTransparentBlitMode _DiveSetTransparentBlitMode
    253   inline ULONG APIENTRY DiveSetTransparentBlitMode ( HDIVE a,
     248  #undef  DiveSetSourcePalette
     249  #define DiveSetSourcePalette _DiveSetSourcePalette
     250
     251  inline ULONG APIENTRY _DiveSetTransparentBlitMode ( HDIVE a,
    254252                                                     ULONG b,
    255253                                                     ULONG c,
     
    264262    return yyrc;
    265263  }
     264  #undef  DiveSetTransparentBlitMode
     265  #define DiveSetTransparentBlitMode _DiveSetTransparentBlitMode
    266266
    267267
  • trunk/src/ddraw/os2DDWindow.cpp

    r503 r522  
    11#define INCL_WIN
    22#include <os2wrap.h>
    3 #include <odincrt.h>
    43#include <odinwrap.h>
    54#include "os2DDWindow.h"
     
    3837  USHORT usFlags;
    3938
    40   ODIN_FS_BEGIN
    41 
    4239  switch(ulMsg)
    4340  {
     
    6562  }
    6663
    67   ODIN_FS_END
    68 
    6964  return pfnOrgClientProc(hwnd, ulMsg, mp1,mp2);
    7065}
Note: See TracChangeset for help on using the changeset viewer.