Changeset 21875 for branches/gcc-kmk/src
- Timestamp:
- Dec 9, 2011, 9:23:34 PM (14 years ago)
- Location:
- branches/gcc-kmk/src
- Files:
-
- 1 added
- 12 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/gcc-kmk/src/Makefile.kmk
r21874 r21875 36 36 include $(PATH_SUB_CURRENT)/winspool/Makefile.kmk 37 37 include $(PATH_SUB_CURRENT)/comdlg32/Makefile.kmk 38 include $(PATH_SUB_CURRENT)/ddraw/Makefile.kmk 38 39 include $(PATH_SUB_CURRENT)/crypt32/Makefile.kmk 39 40 include $(PATH_SUB_CURRENT)/ctl3d32/Makefile.kmk -
branches/gcc-kmk/src/ddraw/ddmain.cpp
r21494 r21875 79 79 dprintf(("DDRAW: DirectDrawEnumerateA\n Callback for DIVE")); 80 80 //call it twice for the DirectDraw & Direct3D classes 81 if(lpCallback(NULL, "DIVE DirectDraw for OS/2",82 "DirectDraw/2 v0.4", lpContext) == DDENUMRET_CANCEL)81 if(lpCallback(NULL, (LPSTR)"DIVE DirectDraw for OS/2", 82 (LPSTR)"DirectDraw/2 v0.4", lpContext) == DDENUMRET_CANCEL) 83 83 { 84 84 dprintf(("DDRAW: Cancel Callback")); … … 91 91 { 92 92 dprintf(("DDRAW: Callback for 3Dfx Voodoo")); 93 if(lpCallback((GUID *)&IID_IDirect3D, "3Dfx Voodoo Direct3D/2",94 "Direct3D/2 v0.2", lpContext) == DDENUMRET_CANCEL)93 if(lpCallback((GUID *)&IID_IDirect3D, (LPSTR)"3Dfx Voodoo Direct3D/2", 94 (LPSTR)"Direct3D/2 v0.2", lpContext) == DDENUMRET_CANCEL) 95 95 { 96 96 dprintf(("DDRAW: Cancel Callback")); -
branches/gcc-kmk/src/ddraw/ddraw.def
r21692 r21875 17 17 ; D3DParseUnknownCommand @2 18 18 ; DDGetAttachedSurfaceLcl @3 19 DDHAL32_VidMemFree = _DDHAL32_VidMemFree@4@420 DDHAL32_VidMemAlloc = _DDHAL32_VidMemAlloc@4@519 DDHAL32_VidMemFree = "_DDHAL32_VidMemFree@4" @4 20 DDHAL32_VidMemAlloc = "_DDHAL32_VidMemAlloc@4" @5 21 21 ; DDInternalLock @6 22 22 ; DDInternalUnlock @7 23 23 ; DSoundHelp @8 24 DirectDrawCreate = _OS2DirectDrawCreate@12@925 DirectDrawCreateClipper = _OS2DirectDrawCreateClipper@12@1026 DirectDrawCreateEx = _DirectDrawCreateEx@16@1127 DirectDrawEnumerateA = _OS2DirectDrawEnumerateA@8@1228 DirectDrawEnumerateExA = _OS2DirectDrawEnumerateExA@12@1324 DirectDrawCreate = "_OS2DirectDrawCreate@12" @9 25 DirectDrawCreateClipper = "_OS2DirectDrawCreateClipper@12" @10 26 DirectDrawCreateEx = "_DirectDrawCreateEx@16" @11 27 DirectDrawEnumerateA = "_OS2DirectDrawEnumerateA@8" @12 28 DirectDrawEnumerateExA = "_OS2DirectDrawEnumerateExA@12" @13 29 29 ; DirectDrawEnumerateExW @14 30 30 ; DirectDrawEnumerateW @15 31 DllCanUnloadNow = _DDrawDllCanUnloadNow@0@1632 DllGetClassObject = _DDrawDllGetClassObject@12@1731 DllCanUnloadNow = "_DDrawDllCanUnloadNow@0" @16 32 DllGetClassObject = "_DDrawDllGetClassObject@12" @17 33 33 ; GetAliasedVidMem @18 34 34 ; GetDDSurfaceLocal @19 -
branches/gcc-kmk/src/ddraw/ddraw2d.cpp
r21494 r21875 130 130 131 131 pdwUnknownData = (DWORD*) malloc (255*sizeof(DWORD)); 132 for(int i= 0 ;i<255;i++) 132 int i; 133 for(i= 0 ;i<255;i++) 133 134 pdwUnknownData[i] = 0; 134 135 -
branches/gcc-kmk/src/ddraw/ddraw2d.h
r9560 r21875 163 163 }; 164 164 165 #ifdef __GNUC__ 166 // abuse the real address instead of NULL to supress GCC warnings 167 // (note that it will not work right if OS2IDirectDraw gets virtual methods etc.) 168 #define OFFSET_D3DVTABLE (LONG)(&((OS2IDirectDraw *)1)->lpVtbl3D-1) 169 #else 165 170 #define OFFSET_D3DVTABLE (LONG)(&((OS2IDirectDraw *)NULL)->lpVtbl3D) 171 #endif 166 172 #define DDraw3D_GetThisPtr(a) (OS2IDirectDraw *)((ULONG)a-OFFSET_D3DVTABLE) 167 173 -
branches/gcc-kmk/src/ddraw/initterm.cpp
r21842 r21875 1 /* $Id: init ddraw.cpp,v 1.2 2003-02-07 13:58:17sandervl Exp $1 /* $Id: initterm.cpp,v 1.20 2003-01-21 11:20:35 sandervl Exp $ 2 2 * 3 * D LL entry point3 * DDRAW DLL entry point 4 4 * 5 5 * Copyright 1998 Sander van Leeuwen 6 6 * Copyright 1998 Peter Fitzsimmons 7 7 * 8 *9 8 * Project Odin Software License can be found in LICENSE.TXT 10 *11 9 */ 12 10 13 /*-------------------------------------------------------------*/14 /* INITERM.C -- Source for a custom dynamic link library */15 /* initialization and termination (_DLL_InitTerm) */16 /* function. */17 /* */18 /* When called to perform initialization, this sample function */19 /* gets storage for an array of integers, and initializes its */20 /* elements with random integers. At termination time, it */21 /* frees the array. Substitute your own special processing. */22 /*-------------------------------------------------------------*/23 24 25 /* Include files */26 11 #define INCL_DOSMODULEMGR 27 12 #define INCL_DOSPROCESS … … 35 20 #include <odinlx.h> 36 21 #include <dbglog.h> 22 #include <exitlist.h> 23 #include <misc.h> /*PLF Wed 98-03-18 23:18:15*/ 24 #include <initdll.h> 25 26 #ifdef FULLSCREEN_DDRAW 27 #include "os2fsdd.h" // For RestorePM() 28 #endif 37 29 #include "divewrap.h" 38 30 39 extern "C" { 40 //Win32 resource table (produced by wrc) 41 extern DWORD ddraw_PEResTab; 42 } 31 // Win32 resource table (produced by wrc) 32 extern DWORD ddraw_PEResTab; 43 33 44 34 char ddrawPath[CCHMAXPATH] = ""; 45 35 static HMODULE dllHandle = 0; 46 36 47 static void APIENTRY cleanup(ULONG ulReason); 37 #if 0 // not currently needed 38 BOOL WINAPI LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) 39 { 40 switch (fdwReason) 41 { 42 case DLL_PROCESS_ATTACH: 43 return TRUE; 48 44 49 /****************************************************************************/ 50 /* _DLL_InitTerm is the function that gets called by the operating system */ 51 /* loader when it loads and frees this DLL for each process that accesses */ 52 /* this DLL. However, it only gets called the first time the DLL is loaded */ 53 /* and the last time it is freed for a particular process. The system */ 54 /* linkage convention MUST be used because the operating system loader is */ 55 /* calling this function. */ 56 /****************************************************************************/ 57 ULONG APIENTRY inittermDDraw(ULONG hModule, ULONG ulFlag) 45 case DLL_THREAD_ATTACH: 46 case DLL_THREAD_DETACH: 47 return TRUE; 48 49 case DLL_PROCESS_DETACH: 50 return TRUE; 51 } 52 return FALSE; 53 } 54 #endif 55 56 ULONG SYSTEM DLL_InitDDraw(ULONG hModule) 58 57 { 59 /*-------------------------------------------------------------------------*/ 60 /* If ulFlag is zero then the DLL is being loaded so initialization should */ 61 /* be performed. If ulFlag is 1 then the DLL is being freed so */ 62 /* termination should be performed. */ 63 /*-------------------------------------------------------------------------*/ 58 APIRET rc; 64 59 65 switch (ulFlag) {66 case 0 :67 {68 APIRET rc;60 DosQueryModuleName(hModule, CCHMAXPATH, ddrawPath); 61 char *endofpath = strrchr(ddrawPath, '\\'); 62 if (endofpath) 63 *(endofpath+1) = '\0'; 69 64 70 DosQueryModuleName(hModule, CCHMAXPATH, ddrawPath); 71 char *endofpath = strrchr(ddrawPath, '\\'); 72 if (endofpath) 73 *(endofpath+1) = '\0'; 65 CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 74 66 75 CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 67 dllHandle = RegisterLxDll(hModule, NULL, (PVOID)&ddraw_PEResTab, 68 DDRAW_MAJORIMAGE_VERSION, DDRAW_MINORIMAGE_VERSION, 69 IMAGE_SUBSYSTEM_WINDOWS_GUI); 70 if (dllHandle == 0) 71 return -1; 76 72 77 dllHandle = RegisterLxDll(hModule, NULL, (PVOID)&ddraw_PEResTab, 78 DDRAW_MAJORIMAGE_VERSION, DDRAW_MINORIMAGE_VERSION, 79 IMAGE_SUBSYSTEM_WINDOWS_GUI); 80 if (dllHandle == 0) 81 return 0UL; 73 DiveLoad(); 82 74 83 DiveLoad(); 84 break; 85 } 86 case 1 : 87 DiveUnload(); 88 if(dllHandle) { 89 UnregisterLxDll(dllHandle); 90 } 91 break; 92 default : 93 return 0UL; 94 } 75 #ifdef FULLSCREEN_DDRAW 76 return EXITLIST_NONCOREDLL; 77 #else 78 return 0; 79 #endif 80 } 95 81 96 /***********************************************************/ 97 /* A non-zero value must be returned to indicate success. */ 98 /***********************************************************/ 99 return 1UL; 82 void SYSTEM DLL_TermDDraw(ULONG hModule) 83 { 84 #ifdef FULLSCREEN_DDRAW 85 dprintf(("DDRAW processing exitlist")); 86 RestorePM(); 87 dprintf(("DDRAW exitlist done")); 88 #endif 89 90 DiveUnload(); 91 92 if (dllHandle) 93 UnregisterLxDll(dllHandle); 100 94 } 101 //****************************************************************************** 102 //****************************************************************************** 95 96 ULONG SYSTEM DLL_Init(ULONG hModule) 97 { 98 if (DLL_InitDefault(hModule) == -1) 99 return -1; 100 return DLL_InitDDraw(hModule); 101 } 102 103 void SYSTEM DLL_Term(ULONG hModule) 104 { 105 DLL_TermDDraw(hModule); 106 DLL_TermDefault(hModule); 107 } -
branches/gcc-kmk/src/ddraw/os2fsdd.cpp
r6646 r21875 15 15 #include <misc.h> 16 16 17 #include <svgadefs.h>17 #include "svgadefs.h" 18 18 19 19 #include "os2fsdd.h" … … 53 53 static ULONG ulTotalModes; 54 54 55 static bIsInFS = FALSE;55 static BOOL bIsInFS = FALSE; 56 56 57 57 /* -
branches/gcc-kmk/src/ddraw/surface.cpp
r21494 r21875 44 44 #include "wndproc.h" 45 45 46 #if ndef __WATCOMC__46 #ifdef __IBMC__ 47 47 #include <builtin.h> 48 48 #endif -
branches/gcc-kmk/src/ddraw/surfacehlp.cpp
r21494 r21875 314 314 const struct { 315 315 DWORD mask; 316 c har *name;316 const char *name; 317 317 } flags[] = { 318 318 #define FE(x) { x, #x}, … … 339 339 const struct { 340 340 DWORD mask; 341 c har *name;341 const char *name; 342 342 } flags[] = { 343 343 #define FE(x) { x, #x}, … … 357 357 const struct { 358 358 DWORD mask; 359 c har *name;359 const char *name; 360 360 } flags[] = { 361 361 #define FE(x) { x, #x}, … … 397 397 const struct { 398 398 DWORD mask; 399 c har *name;399 const char *name; 400 400 } flags[] = { 401 401 #define FE(x) { x, #x}, … … 441 441 const struct { 442 442 DWORD mask; 443 c har *name;443 const char *name; 444 444 } flags[] = { 445 445 #define FE(x) { x, #x}, … … 462 462 const struct { 463 463 DWORD mask; 464 c har *name;464 const char *name; 465 465 } flags[] = { 466 466 FE(DDSD_CAPS) … … 492 492 const struct { 493 493 DWORD mask; 494 c har *name;494 const char *name; 495 495 } flags[] = { 496 496 #define FE(x) { x, #x}, … … 511 511 const struct { 512 512 DWORD mask; 513 c har *name;513 const char *name; 514 514 } flags[] = { 515 515 #define FE(x) { x, #x}, -
branches/gcc-kmk/src/ddraw/surfblit.cpp
r21494 r21875 46 46 #include "divewrap.h" 47 47 48 #if ndef __WATCOMC__48 #ifdef __IBMC__ 49 49 #include <builtin.h> 50 50 #endif -
branches/gcc-kmk/src/ddraw/surfoverlay.cpp
r21494 r21875 45 45 #include "wndproc.h" 46 46 47 #if ndef __WATCOMC__47 #ifdef __IBMC__ 48 48 #include <builtin.h> 49 49 #endif -
branches/gcc-kmk/src/ddraw/svgadefs.h
r21692 r21875 82 82 /* NOINC */ 83 83 84 #include <svgapmi.h>84 #include "svgapmi.h" 85 85 86 86 /* INC */ -
branches/gcc-kmk/src/ddraw/wndproc.c
r9459 r21875 107 107 "WINE_DDRAW", "DirectDraw", 108 108 WS_POPUP, 0, 0, dwWidth, dwHeight, 109 GetDesktopWindow(), 0, 0, hwndOwner);109 GetDesktopWindow(), 0, 0, (LPVOID)hwndOwner); 110 110 111 111 SetWindowPos(hwnd, HWND_TOP, 0, 0, 0, 0,
Note:
See TracChangeset
for help on using the changeset viewer.