- Timestamp:
- Aug 17, 1999, 2:44:46 PM (26 years ago)
- Location:
- trunk/src/ddraw
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ddraw/OS2CLIPPER.CPP
r503 r522 8 8 #include "misc.h" 9 9 #include <winerror.h> 10 #include <odincrt.h>11 10 12 11 //****************************************************************************** … … 84 83 if(me->Referenced == 0) 85 84 { 86 ODIN_delete( me);85 delete( me); 87 86 return(0); 88 87 } -
trunk/src/ddraw/OS2D3D.CPP
r503 r522 11 11 #include <winerror.h> 12 12 #include <builtin.h> 13 #include <odincrt.h>14 13 #undef THIS 15 14 #define THIS VOID* … … 52 51 if(me->Referenced == 0) 53 52 { 54 ODIN_delete(me);53 delete(me); 55 54 return(0); 56 55 } -
trunk/src/ddraw/OS2DDRAW.CPP
r503 r522 22 22 #include "os2DDWindow.h" 23 23 #include "os2palset.h" 24 #include <odincrt.h> 24 25 25 #define KEY_DIRECT2 "\\Software\\Win32OS2\\Direct2" 26 26 #define KEY_DIRECT2DRAW "\\Software\\Win32OS2\\Direct2\\Draw" … … 128 128 } 129 129 130 ODIN_FS_BEGIN 131 rc = DiveOpen( &hDive, 132 FALSE, 133 &pFrameBuffer); 134 ODIN_FS_END 130 rc = DiveOpen( &hDive, 131 FALSE, 132 &pFrameBuffer); 135 133 if(rc) 136 134 { … … 242 240 if(me->Referenced == 0) 243 241 { 244 ODIN_delete(me);242 delete(me); 245 243 rc = 0; 246 244 } … … 271 269 HRESULT rc; 272 270 273 ODIN_FS_BEGIN274 275 271 newclip = new OS2IDirectDrawClipper(me); 276 272 … … 295 291 *lplpDD = (IDirectDrawClipper *)newclip; 296 292 } 297 298 ODIN_FS_END299 293 300 294 return(rc); … … 311 305 HRESULT rc = DD_OK; 312 306 int palsize = 0; 313 314 ODIN_FS_BEGIN315 307 316 308 if(dwFlags & DDPCAPS_8BITENTRIES) … … 360 352 } 361 353 362 ODIN_FS_END363 364 354 return(rc); 365 355 } … … 373 363 OS2IDirectDrawSurface *newsurf; 374 364 HRESULT rc; 375 376 ODIN_FS_BEGIN377 365 378 366 #ifdef DEBUG … … 410 398 } 411 399 412 ODIN_FS_END413 414 400 return(rc); 415 401 } … … 423 409 OS2IDirectDrawSurface *newsurf; 424 410 HRESULT rc; 425 426 ODIN_FS_BEGIN427 411 428 412 #ifdef DEBUG … … 461 445 } 462 446 463 ODIN_FS_END464 465 447 return(rc); 466 448 } … … 508 490 } 509 491 510 511 ODIN_FS_BEGIN512 492 513 493 // Setting up the surface … … 538 518 if(!lpDDEnumModesCallback(&DDSurfAct,lpContext)) 539 519 { 540 {ODIN_FS_END541 520 return (DD_OK); 542 521 } … … 610 589 if(!lpDDEnumModesCallback(&DDSurfAct,lpContext)) 611 590 { 612 {ODIN_FS_END613 591 return (DD_OK); 614 592 } … … 682 660 if (lpDDSurfaceDesc->dwFlags & !(DDSD_WIDTH|DDSD_HEIGHT|DDSD_PIXELFORMAT)) 683 661 { 684 {ODIN_FS_END685 662 return(DDERR_INVALIDPARAMS); 686 663 } … … 717 694 } 718 695 719 ODIN_FS_END696 720 697 721 698 return(DD_OK); … … 786 763 // Clear structure so we only have to set the supported flags 787 764 788 ODIN_FS_BEGIN765 789 766 memset(lpDDDriverCaps,0,sizeof(DDCAPS)); 790 ODIN_FS_END767 791 768 792 769 // Reset the size … … 1160 1137 return(DDERR_INVALIDPARAMS); 1161 1138 1162 ODIN_FS_BEGIN1139 1163 1140 1164 1141 if(DD_OK==DrawWaitForVerticalBlank(This, dwFlags, 0)) … … 1183 1160 } 1184 1161 1185 ODIN_FS_END1162 1186 1163 1187 1164 return(DD_OK); … … 1222 1199 return(DDERR_INVALIDPARAMS); 1223 1200 1224 ODIN_FS_BEGIN1201 1225 1202 rc = io_init1(); 1226 ODIN_FS_END1203 1227 1204 1228 1205 if(0==rc) // try to get IOPL for the thread 1229 1206 { 1230 1207 *lpbIsInVB = (c_inb1(0x3da)&0x08)!=0; 1231 ODIN_FS_BEGIN1208 1232 1209 io_exit1(); // reset IOPL 1233 ODIN_FS_END1210 1234 1211 return(DD_OK); 1235 1212 } … … 1340 1317 return (DDERR_UNSUPPORTED); 1341 1318 1342 ODIN_FS_BEGIN1319 1343 1320 rci = io_init1(); 1344 ODIN_FS_END1321 1345 1322 1346 1323 if(rci) // try to get IOPL for the thread … … 1373 1350 } 1374 1351 1375 ODIN_FS_BEGIN1352 1376 1353 io_exit1(); 1377 ODIN_FS_END1354 1378 1355 1379 1356 return (rc); … … 1472 1449 return DDERR_INVALIDPARAMS; 1473 1450 1474 ODIN_FS_BEGIN1451 1475 1452 1476 1453 memset( lpdddi, … … 1483 1460 "ODIN DD Emulation Driver"); 1484 1461 1485 ODIN_FS_END1462 1486 1463 1487 1464 return(DD_OK); … … 1494 1471 HKEY hkDirectDraw2; 1495 1472 1496 ODIN_FS_BEGIN1473 1497 1474 1498 1475 if (bScale) … … 1510 1487 } 1511 1488 1512 ODIN_FS_END1513 } 1514 //****************************************************************************** 1515 //****************************************************************************** 1516 1489 1490 } 1491 //****************************************************************************** 1492 //****************************************************************************** 1493 -
trunk/src/ddraw/OS2PALETTE.CPP
r503 r522 10 10 #include "os2palset.h" 11 11 #include <winerror.h> 12 #include <odincrt.h>13 12 14 13 //****************************************************************************** … … 97 96 if(me->Referenced == 0) 98 97 { 99 ODIN_delete(me);98 delete(me); 100 99 return(0); 101 100 } … … 142 141 return(DDERR_INVALIDPARAMS); 143 142 144 ODIN_FS_BEGIN145 146 143 memcpy( (char *)lpEntries, 147 144 (char *)(me->os2pal + dwBase), 148 145 dwNumEntries*sizeof(PALETTEENTRY)); 149 150 ODIN_FS_END151 146 152 147 return(DD_OK); … … 176 171 return(DDERR_INVALIDPARAMS); 177 172 178 ODIN_FS_BEGIN179 180 173 memcpy((char *)(me->os2pal + dwBase), 181 174 (char *)lpNewEntries, 182 175 dwNumEntries*sizeof(PALETTEENTRY)); 183 184 ODIN_FS_END185 176 186 177 if(me->fAttachedToPrimary) -
trunk/src/ddraw/OS2PALSET.CPP
r503 r522 7 7 #include <string.h> 8 8 #include "os2palset.h" 9 #include <odincrt.h> 9 10 10 //****************************************************************************** 11 11 //****************************************************************************** … … 18 18 int i; 19 19 20 ODIN_FS_BEGIN20 21 21 22 22 hps = WinGetPS(HWND_DESKTOP); … … 45 45 WinReleasePS(hps); 46 46 47 ODIN_FS_END47 48 48 49 49 } … … 55 55 HDC hdc; 56 56 57 ODIN_FS_BEGIN57 58 58 59 59 hps = WinGetPS( HWND_DESKTOP); … … 71 71 WinReleasePS(hps); 72 72 73 ODIN_FS_END73 74 74 75 75 } -
trunk/src/ddraw/OS2SURFACE.CPP
r503 r522 13 13 #include "asmutil.h" 14 14 #include <winerror.h> 15 #include <odincrt.h>16 15 17 16 #ifndef __WATCOMC__ … … 994 993 pFillPos = pLine + dwPitchDB; 995 994 996 #ifndef USE_ASM997 ODIN_FS_BEGIN998 #endif999 995 for( y=0;y<FillHeight;y++,pFillPos+=dwPitchDB) 1000 996 { … … 1008 1004 #endif 1009 1005 } 1010 #ifndef USE_ASM1011 ODIN_FS_END1012 #endif1013 1006 1014 1007 return(DD_OK); … … 1234 1227 { 1235 1228 DDRectangle *pItem = (DDRectangle*) lpItem; 1236 ODIN_delete(pItem);1229 delete(pItem); 1237 1230 return 1; 1238 1231 } … … 1252 1245 OS2IDirectDrawSurface *AttachedSurface; 1253 1246 1254 ODIN_FS_BEGIN1255 1247 1256 1248 if(DDSurfaceDesc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) … … 1328 1320 1329 1321 lpDraw->Vtbl.Release(lpDraw); 1330 1331 ODIN_FS_END1332 1322 1333 1323 } … … 1420 1410 if(me->Referenced == 0) 1421 1411 { 1422 ODIN_delete( me);1412 delete( me); 1423 1413 #ifndef __WATCOMC__ 1424 1414 //_interrupt(3); … … 1482 1472 if(me->DDSurfaceDesc.ddsCaps.dwCaps & DDSCAPS_MIPMAP) 1483 1473 { 1484 ODIN_FS_BEGIN1485 1474 rc = DPA_InsertPtr( me->DPA_SurfaceMipMaps, 1486 1475 DPA_GetPtrCount(me->DPA_SurfaceMipMaps), 1487 1476 AttachedSurface); 1488 ODIN_FS_END1489 1477 1490 1478 if( rc>=0) … … 1513 1501 else 1514 1502 { 1515 ODIN_FS_BEGIN1516 1503 rc = DPA_InsertPtr( me->DPA_SurfaceAttached, 1517 1504 DPA_GetPtrCount(me->DPA_SurfaceAttached), 1518 1505 AttachedSurface); 1519 ODIN_FS_END1520 1506 1521 1507 if(rc>=0) … … 1711 1697 #endif 1712 1698 1713 ODIN_FS_BEGIN1714 1699 1715 1700 if (NULL!=lpDestRect) … … 1760 1745 WriteLog("Blt: Dest Surface partly locked\n"); 1761 1746 #endif 1762 {ODIN_FS_END1763 1747 return(DDERR_SURFACEBUSY); 1764 1748 } 1765 1749 } 1766 1767 ODIN_FS_END1768 1750 1769 1751 DestSurfaceDesc.dwSize = sizeof(DDSURFACEDESC2); … … 1853 1835 } 1854 1836 1855 ODIN_FS_BEGIN1856 1857 1837 if (NULL!=lpSrcRect) 1858 1838 { … … 1903 1883 WriteLog("Blt: Src Surface partly locked\n"); 1904 1884 #endif 1905 {ODIN_FS_END1906 1885 return(DDERR_SURFACEBUSY); 1907 1886 } 1908 1887 } 1909 1910 ODIN_FS_END1911 1888 1912 1889 if( ( (NULL==lpDestRect) && (NULL!=lpSrcRect) ) || … … 1991 1968 #else 1992 1969 // Solid Blit 1993 ODIN_FS_BEGIN1994 1970 while(1) 1995 1971 { … … 2000 1976 break; 2001 1977 } 2002 ODIN_FS_END2003 1978 #endif 2004 1979 } … … 2055 2030 #else 2056 2031 // Solid Blit 2057 ODIN_FS_BEGIN2058 2032 while(1) 2059 2033 { … … 2064 2038 break; 2065 2039 } 2066 ODIN_FS_END2067 2040 #endif 2068 2041 } … … 2128 2101 #else 2129 2102 // Solid Blit 2130 ODIN_FS_BEGIN2131 2103 while(1) 2132 2104 { … … 2137 2109 break; 2138 2110 } 2139 ODIN_FS_END2140 2111 #endif 2141 2112 } … … 2577 2548 } 2578 2549 2579 ODIN_FS_BEGIN2580 2581 2550 if (NULL!=lpSrcRect) 2582 2551 { … … 2879 2848 dest->lpVtbl->ChangeUniquenessValue(dest); 2880 2849 2881 ODIN_FS_END2882 2850 2883 2851 return(DD_OK); … … 3000 2968 } 3001 2969 3002 ODIN_FS_BEGIN3003 2970 3004 2971 if ( (!Found) && (AttachedSurface->DDSurfaceDesc.ddsCaps.dwCaps & DDSCAPS_MIPMAP ) ) … … 3040 3007 } 3041 3008 3042 ODIN_FS_END3043 3009 3044 3010 return(Found?DD_OK:DDERR_SURFACENOTATTACHED); … … 3076 3042 if(me->BackBuffer != NULL) 3077 3043 { 3078 ODIN_FS_BEGIN 3079 memcpy(&EnumDesc,&(me->DDSurfaceDesc),sizeof(DDSURFACEDESC2)); 3080 ODIN_FS_END 3044 memcpy(&EnumDesc,&(me->DDSurfaceDesc),sizeof(DDSURFACEDESC2)); 3081 3045 rc = lpCallBack((LPDIRECTDRAWSURFACE4)me->BackBuffer,&EnumDesc,lpContext); 3082 3046 } 3083 3047 3084 ODIN_FS_BEGIN 3085 count = DPA_GetPtrCount(me->DPA_SurfaceMipMaps); 3086 ODIN_FS_END 3048 count = DPA_GetPtrCount(me->DPA_SurfaceMipMaps); 3087 3049 3088 3050 if(count>0) … … 3091 3053 while( (DDENUMRET_OK == rc) && i<count ) 3092 3054 { 3093 ODIN_FS_BEGIN3094 3055 EnumSurface = (OS2IDirectDrawSurface*) DPA_FastGetPtr(me->DPA_SurfaceMipMaps,i); 3095 3056 memcpy( &EnumDesc, 3096 3057 &(EnumSurface->DDSurfaceDesc), 3097 3058 sizeof(DDSURFACEDESC2)); 3098 ODIN_FS_END3099 3059 // Calling back into WIN32 app so we had to reset FS 3100 3060 rc = lpCallBack((LPDIRECTDRAWSURFACE4)EnumSurface,&EnumDesc,lpContext); … … 3103 3063 } 3104 3064 3105 ODIN_FS_BEGIN 3106 count = DPA_GetPtrCount(me->DPA_SurfaceAttached); 3107 ODIN_FS_END 3065 count = DPA_GetPtrCount(me->DPA_SurfaceAttached); 3108 3066 3109 3067 if(count>0) … … 3112 3070 while( (DDENUMRET_OK == rc) && i<count ) 3113 3071 { 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)); 3120 3076 rc = lpCallBack((LPDIRECTDRAWSURFACE4)EnumSurface,&EnumDesc,lpContext); 3121 3077 i++; … … 3305 3261 } 3306 3262 3307 ODIN_FS_BEGIN3308 3263 3309 3264 rc = DD_OK; … … 3367 3322 } 3368 3323 3369 ODIN_FS_END3370 3324 3371 3325 return rc; … … 3410 3364 return(DDERR_INVALIDPARAMS); 3411 3365 3412 ODIN_FS_BEGIN 3413 memcpy(lpDDCaps, &(me->DDSurfaceDesc.ddsCaps), sizeof(DDSCAPS2) ); 3414 ODIN_FS_END 3366 memcpy(lpDDCaps, &(me->DDSurfaceDesc.ddsCaps), sizeof(DDSCAPS2) ); 3415 3367 3416 3368 return(DD_OK); … … 3455 3407 if(DDCKEY_SRCBLT & dwFlags) 3456 3408 { 3457 ODIN_FS_BEGIN 3458 memcpy(lpDDColKey,&(me->DDSurfaceDesc.ddckCKSrcBlt),sizeof(DDCOLORKEY) ); 3459 ODIN_FS_END 3409 memcpy(lpDDColKey,&(me->DDSurfaceDesc.ddckCKSrcBlt),sizeof(DDCOLORKEY) ); 3460 3410 } 3461 3411 else … … 3493 3443 return(DDERR_DCALREADYCREATED); 3494 3444 } 3495 3496 ODIN_FS_BEGIN3497 3445 3498 3446 rc = DD_OK; … … 3641 3589 } 3642 3590 3643 ODIN_FS_END3644 3645 3591 return rc; 3646 3592 } … … 3717 3663 return DDERR_INVALIDPARAMS; 3718 3664 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)); 3725 3668 3726 3669 return(DD_OK); … … 3739 3682 return(DDERR_INVALIDPARAMS); 3740 3683 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)); 3746 3687 3747 3688 return(DD_OK); … … 3760 3701 return(DDERR_INVALIDPARAMS); 3761 3702 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)); 3767 3706 3768 3707 return(DD_OK); … … 3832 3771 if (DD_OK==rc) 3833 3772 { 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) ); 3839 3776 } 3840 3777 … … 3869 3806 return DDERR_INVALIDPARAMS; 3870 3807 3871 ODIN_FS_BEGIN3872 3808 3873 3809 if (NULL!=lpRect) … … 3958 3894 } 3959 3895 3960 ODIN_FS_END3961 3896 3962 3897 return rc; … … 3980 3915 if(hdc != me->hdcImage) 3981 3916 return(DDERR_INVALIDOBJECT); 3982 3983 ODIN_FS_BEGIN3984 3917 3985 3918 //unselect our bitmap … … 4029 3962 me->dwLastDCUnique = me->dwUniqueValue; // Store this to see if the surface was locked after we released the DC 4030 3963 4031 ODIN_FS_END4032 4033 3964 return(DD_OK); 4034 3965 } … … 4097 4028 return(DDERR_UNSUPPORTED); 4098 4029 4099 ODIN_FS_BEGIN4100 4101 4030 if(DDCKEY_SRCBLT & dwFlags) 4102 4031 { … … 4118 4047 else 4119 4048 rc = DDERR_INVALIDPARAMS; // some other flags where set => error 4120 4121 ODIN_FS_END4122 4049 4123 4050 return rc; … … 4230 4157 return(DDERR_NOTLOCKED); 4231 4158 } 4232 4233 ODIN_FS_BEGIN4234 4159 4235 4160 #ifdef DEBUG … … 4377 4302 } 4378 4303 4379 ODIN_FS_END4380 4381 4304 return rc; 4382 4305 } … … 4411 4334 } 4412 4335 4413 ODIN_FS_BEGIN4414 4415 4336 if(NULL!=lpSurfaceRect) 4416 4337 { … … 4508 4429 } 4509 4430 4510 ODIN_FS_END4511 4512 4431 return rc; 4513 4432 } … … 4611 4530 return DDERR_INVALIDSURFACETYPE; // only work for system alloced surfaces 4612 4531 4613 ODIN_FS_BEGIN4614 4615 4532 if (!me->Updated) 4616 4533 { … … 4622 4539 me->lpVtbl->ChangeUniquenessValue(me); 4623 4540 memcpy((char *)&(me->DDSurfaceDesc), (char *)lpSurfDesc, sizeof(DDSURFACEDESC)); 4624 4625 ODIN_FS_END4626 4541 4627 4542 return DD_OK; … … 4646 4561 return DDERR_INVALIDSURFACETYPE; // only work for system alloced surfaces 4647 4562 4648 ODIN_FS_BEGIN4649 4650 4563 if (!me->Updated) 4651 4564 { … … 4657 4570 me->lpVtbl->ChangeUniquenessValue(me); 4658 4571 memcpy((char *)&(me->DDSurfaceDesc), (char *)lpSurfDesc, sizeof(DDSURFACEDESC2)); 4659 4660 ODIN_FS_END4661 4572 4662 4573 return DD_OK; … … 4686 4597 (dwFlags & ~(DDSPD_IUNKNOWNPOINTER|DDSPD_VOLATILE))) 4687 4598 return(DDERR_INVALIDPARAMS); 4688 4689 ODIN_FS_BEGIN4690 4599 4691 4600 // first check if the refGUID is stored as then the content will be updated … … 4849 4758 } 4850 4759 4851 ODIN_FS_END4852 4853 4760 return rc; 4854 4761 } … … 4873 4780 return(DDERR_INVALIDPARAMS); 4874 4781 4875 ODIN_FS_BEGIN4876 4877 4782 if(DPA_GetPtrCount(me->DPA_SurfacePrivateData)>0) 4878 4783 { … … 4913 4818 rc = DDERR_NOTFOUND; 4914 4819 4915 ODIN_FS_END4916 4820 4917 4821 return rc; … … 4932 4836 if(NULL==me) 4933 4837 return(DDERR_INVALIDOBJECT); 4934 4935 ODIN_FS_BEGIN4936 4838 4937 4839 if(DPA_GetPtrCount(me->DPA_SurfacePrivateData)>0) … … 4967 4869 } 4968 4870 4969 ODIN_FS_END4970 4971 4871 return (bFound?DD_OK:DDERR_NOTFOUND); 4972 4872 } … … 4993 4893 PSURFPRIVATEDATA pSData; 4994 4894 4995 ODIN_FS_BEGIN4996 4895 4997 4896 #ifdef DEBUG … … 5026 4925 } 5027 4926 5028 ODIN_FS_END5029 5030 4927 return (DD_OK); 5031 4928 } … … 5043 4940 int BlitWidth,BlitHeight; 5044 4941 static char Scanline[6400]; // sufficient for 1600 at 32 bit 5045 5046 ODIN_FS_BEGIN5047 4942 5048 4943 // Bridge, we may got a problem ;) … … 5107 5002 } 5108 5003 5109 ODIN_FS_END5110 5004 } 5111 5005 -
trunk/src/ddraw/OS2UTIL.CPP
r503 r522 1 /* $Id: OS2UTIL.CPP,v 1. 4 1999-08-16 00:40:48 hughExp $ */1 /* $Id: OS2UTIL.CPP,v 1.5 1999-08-17 12:44:46 sandervl Exp $ */ 2 2 3 3 /* … … 10 10 */ 11 11 #define INCL_DOSMEMMGR 12 #include <os2 .h>12 #include <os2wrap.h> 13 13 #include "misc.h" 14 14 #include "os2util.h" … … 43 43 void OS2MaximizeWindow(HWND hwndClient) 44 44 { 45 ODIN_FS_BEGIN46 45 WinSetWindowPos(hwndClient, HWND_TOP, 0, 0, 0, 0, SWP_MAXIMIZE); 47 ODIN_FS_END48 46 } 49 47 -
trunk/src/ddraw/ddraw.CPP
r503 r522 2 2 3 3 #include <builtin.h> 4 #include <odincrt.h>5 4 #define INITGUID 6 5 #include "os2ddraw.h" … … 18 17 OS2IDirectDraw *newdraw; 19 18 HRESULT rc; 20 21 ODIN_FS_BEGIN22 19 23 20 WriteLog("DirectDrawCreate %X %X %X\n", lpGUID, lplpDD, pUnkOuter); … … 42 39 *lplpDD = (LPDIRECTDRAW)newdraw; 43 40 } 44 ODIN_FS_END45 46 41 return(rc); 47 42 } -
trunk/src/ddraw/divewrap.h
r422 r522 8 8 #include <dive.h> 9 9 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 } 10 21 #undef DiveQueryCaps 11 22 #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 } 24 36 #undef DiveOpen 25 37 #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 } 39 50 #undef DiveSetupBlitter 40 51 #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 } 53 65 #undef DiveBlitImage 54 66 #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, 71 69 ULONG b, 72 70 ULONG c, … … 81 79 return yyrc; 82 80 } 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 } 84 94 #undef DiveClose 85 95 #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 } 97 108 #undef DiveAcquireFrameBuffer 98 109 #define DiveAcquireFrameBuffer _DiveAcquireFrameBuffer 99 inline ULONG APIENTRY DiveAcquireFrameBuffer ( HDIVE a, 100 PRECTL b )101 {102 ULONG yyrc;103 U SHORT 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 } 111 122 #undef DiveSwitchBank 112 123 #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 } 125 135 #undef DiveDeacquireFrameBuffer 126 136 #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, 141 139 PRECTL b, 142 140 PBYTE *c, … … 152 150 return yyrc; 153 151 } 154 155 # undef DiveAllocImageBuffer156 #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, 158 156 PULONG b, 159 157 FOURCC c, … … 171 169 return yyrc; 172 170 } 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 } 174 185 #undef DiveFreeImageBuffer 175 186 #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, 191 189 ULONG b, 192 190 PBYTE *c, … … 202 200 return yyrc; 203 201 } 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 } 205 216 #undef DiveEndImageBufferAccess 206 217 #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, 222 220 ULONG b, 223 221 ULONG c, … … 232 230 return yyrc; 233 231 } 234 235 # undef DiveSetSourcePalette236 #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, 238 236 ULONG b, 239 237 ULONG c, … … 248 246 return yyrc; 249 247 } 250 251 # undef DiveSetTransparentBlitMode252 #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, 254 252 ULONG b, 255 253 ULONG c, … … 264 262 return yyrc; 265 263 } 264 #undef DiveSetTransparentBlitMode 265 #define DiveSetTransparentBlitMode _DiveSetTransparentBlitMode 266 266 267 267 -
trunk/src/ddraw/os2DDWindow.cpp
r503 r522 1 1 #define INCL_WIN 2 2 #include <os2wrap.h> 3 #include <odincrt.h>4 3 #include <odinwrap.h> 5 4 #include "os2DDWindow.h" … … 38 37 USHORT usFlags; 39 38 40 ODIN_FS_BEGIN41 42 39 switch(ulMsg) 43 40 { … … 65 62 } 66 63 67 ODIN_FS_END68 69 64 return pfnOrgClientProc(hwnd, ulMsg, mp1,mp2); 70 65 }
Note:
See TracChangeset
for help on using the changeset viewer.