Changeset 20241
- Timestamp:
- Jan 21, 2003, 12:20:36 PM (22 years ago)
- Location:
- tags/trunk/src/ddraw
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified tags/trunk/src/ddraw/divewrap.h ¶
r15887 r20241 1 /* $Id: divewrap.h,v 1. 4 2001-03-18 21:44:44 mikeExp $ */1 /* $Id: divewrap.h,v 1.5 2003-01-21 11:20:35 sandervl Exp $ */ 2 2 3 3 /* … … 18 18 #include <dive.h> 19 19 20 inline ULONG APIENTRY _DiveQueryCaps ( PDIVE_CAPS a, 21 ULONG b ) 22 { 23 ULONG yyrc; 24 USHORT sel = RestoreOS2FS(); 20 void DiveUnload(); 21 BOOL DiveLoad(); 25 22 26 yyrc = DiveQueryCaps(a, b); 27 SetFS(sel); 23 ULONG APIENTRY _DiveOpen ( HDIVE *a, BOOL b, PVOID c ); 24 ULONG APIENTRY _DiveQueryCaps ( PDIVE_CAPS a, ULONG b ); 25 ULONG APIENTRY _DiveSetupBlitter ( HDIVE a, PSETUP_BLITTER b ); 26 ULONG APIENTRY _DiveBlitImage ( HDIVE a, ULONG b, ULONG c ); 27 ULONG APIENTRY _DiveBlitImageLines ( HDIVE a, ULONG b, 28 ULONG c, PBYTE d ); 29 ULONG APIENTRY _DiveClose ( HDIVE a ); 30 ULONG APIENTRY _DiveAcquireFrameBuffer ( HDIVE a, PRECTL b ); 31 ULONG APIENTRY _DiveSwitchBank ( HDIVE a, ULONG b ); 32 ULONG APIENTRY _DiveDeacquireFrameBuffer ( HDIVE a ); 33 ULONG APIENTRY _DiveCalcFrameBufferAddress ( HDIVE a, PRECTL b, 34 PBYTE *c, PULONG d, 35 PULONG e ); 36 ULONG APIENTRY _DiveAllocImageBuffer ( HDIVE a, PULONG b, 37 FOURCC c, ULONG d, 38 ULONG e, ULONG f, 39 PBYTE g ); 40 ULONG APIENTRY _DiveFreeImageBuffer ( HDIVE a, ULONG b ); 41 ULONG APIENTRY _DiveBeginImageBufferAccess ( HDIVE a, ULONG b, 42 PBYTE *c, PULONG d, 43 PULONG e ); 44 ULONG APIENTRY _DiveEndImageBufferAccess ( HDIVE a, ULONG b ); 45 ULONG APIENTRY _DiveSetDestinationPalette ( HDIVE a, ULONG b, 46 ULONG c, PBYTE d ); 47 ULONG APIENTRY _DiveSetSourcePalette ( HDIVE a, ULONG b, 48 ULONG c, PBYTE d ); 49 ULONG APIENTRY _DiveSetTransparentBlitMode ( HDIVE a, ULONG b, 50 ULONG c, ULONG d ); 28 51 29 return yyrc;30 }31 52 #undef DiveQueryCaps 32 53 #define DiveQueryCaps _DiveQueryCaps 33 54 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 }46 55 #undef DiveOpen 47 56 #define DiveOpen _DiveOpen 48 57 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 }60 58 #undef DiveSetupBlitter 61 59 #define DiveSetupBlitter _DiveSetupBlitter 62 60 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 }75 61 #undef DiveBlitImage 76 62 #define DiveBlitImage _DiveBlitImage 77 63 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 }91 64 #undef DiveBlitImageLines 92 65 #define DiveBlitImageLines _DiveBlitImageLines 93 66 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 }104 67 #undef DiveClose 105 68 #define DiveClose _DiveClose 106 69 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 }118 70 #undef DiveAcquireFrameBuffer 119 71 #define DiveAcquireFrameBuffer _DiveAcquireFrameBuffer 120 72 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 }132 73 #undef DiveSwitchBank 133 74 #define DiveSwitchBank _DiveSwitchBank 134 75 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 }145 76 #undef DiveDeacquireFrameBuffer 146 77 #define DiveDeacquireFrameBuffer _DiveDeacquireFrameBuffer 147 78 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 }162 79 #undef DiveCalcFrameBufferAddress 163 80 #define DiveCalcFrameBufferAddress _DiveCalcFrameBufferAddress 164 81 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 }181 82 #undef DiveAllocImageBuffer 182 83 #define DiveAllocImageBuffer _DiveAllocImageBuffer 183 84 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 }195 85 #undef DiveFreeImageBuffer 196 86 #define DiveFreeImageBuffer _DiveFreeImageBuffer 197 87 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 }212 88 #undef DiveBeginImageBufferAccess 213 89 #define DiveBeginImageBufferAccess _DiveBeginImageBufferAccess 214 90 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 }226 91 #undef DiveEndImageBufferAccess 227 92 #define DiveEndImageBufferAccess _DiveEndImageBufferAccess 228 93 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 }242 94 #undef DiveSetDestinationPalette 243 95 #define DiveSetDestinationPalette _DiveSetDestinationPalette 244 96 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 }258 97 #undef DiveSetSourcePalette 259 98 #define DiveSetSourcePalette _DiveSetSourcePalette 260 99 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 }274 100 #undef DiveSetTransparentBlitMode 275 101 #define DiveSetTransparentBlitMode _DiveSetTransparentBlitMode -
TabularUnified tags/trunk/src/ddraw/initterm.cpp ¶
r17206 r20241 1 /* $Id: initterm.cpp,v 1. 19 2001-09-05 12:50:39 birdExp $1 /* $Id: initterm.cpp,v 1.20 2003-01-21 11:20:35 sandervl Exp $ 2 2 * 3 3 * DLL entry point … … 40 40 41 41 42 extern "C" {43 //Win32 resource table (produced by wrc)44 extern DWORD _Resource_PEResTab;45 }46 47 char ddrawPath[CCHMAXPATH] = "";48 static HMODULE dllHandle = 0;49 50 42 static void APIENTRY cleanup(ULONG ulReason); 51 43 … … 82 74 ulFlag) 83 75 { 76 APIRET rc; 84 77 85 78 /*-------------------------------------------------------------------------*/ … … 92 85 case 0 : 93 86 { 94 APIRET rc;95 96 87 #ifdef __IBMCPP__ 97 88 ctordtorInit(); 98 89 #endif 99 DosQueryModuleName(hModule, CCHMAXPATH, ddrawPath);100 char *endofpath = strrchr(ddrawPath, '\\');101 if (endofpath)102 *(endofpath+1) = '\0';103 90 104 CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 105 106 dllHandle = RegisterLxDll(hModule, LibMain, (PVOID)&_Resource_PEResTab, 107 DDRAW_MAJORIMAGE_VERSION, DDRAW_MINORIMAGE_VERSION, 108 IMAGE_SUBSYSTEM_WINDOWS_GUI); 109 if (dllHandle == 0) 110 return 0UL; 111 91 #ifdef FULLSCREEN_DDRAW 112 92 rc = DosExitList(EXITLIST_NONCOREDLL | EXLST_ADD, cleanup); 113 93 if (rc) 114 94 return 0UL; 95 #endif 115 96 97 rc = inittermDDraw(hModule, ulFlag); 116 98 break; 117 99 } 118 100 case 1 : 119 if(dllHandle) { 120 UnregisterLxDll(dllHandle); 121 } 101 #ifdef __IBMCPP__ 102 ctordtorTerm(); 103 #endif 104 105 rc = inittermDDraw(hModule, ulFlag); 122 106 break; 123 107 default : … … 128 112 /* A non-zero value must be returned to indicate success. */ 129 113 /***********************************************************/ 130 return 1UL;114 return rc; 131 115 } 132 116 //****************************************************************************** 133 117 //****************************************************************************** 134 118 #ifdef FULLSCREEN_DDRAW 135 119 static void APIENTRY cleanup(ULONG ulReason) 136 120 { … … 143 127 //****************************************************************************** 144 128 //****************************************************************************** 129 #endif -
TabularUnified tags/trunk/src/ddraw/makefile ¶
r20104 r20241 1 # $Id: makefile,v 1.3 2 2002-12-29 14:11:01sandervl Exp $1 # $Id: makefile,v 1.33 2003-01-21 11:20:36 sandervl Exp $ 2 2 3 3 # … … 35 35 $(OBJDIR)\os2fsdd.obj \ 36 36 $(OBJDIR)\rectangle.obj \ 37 $(OBJDIR)\initddraw.obj \ 37 38 $(OBJDIR)\initterm.obj \ 39 $(OBJDIR)\divewrap.obj \ 38 40 $(OBJDIR)\os2util.obj \ 39 41 $(OBJDIR)\bltFunc.obj \ … … 54 56 $(ODIN32_LIB)/$(ODINCRT).lib \ 55 57 $(ODIN32_LIB)/user32.lib \ 56 mmpm2.lib \57 58 OS2386.LIB \ 58 59 $(RTLLIB_O) -
TabularUnified tags/trunk/src/ddraw/surfblit.cpp ¶
r20110 r20241 1 /* $Id: surfblit.cpp,v 1. 2 2002-12-30 14:05:44sandervl Exp $ */1 /* $Id: surfblit.cpp,v 1.3 2003-01-21 11:20:36 sandervl Exp $ */ 2 2 3 3 /* … … 42 42 #include "asmutil.h" 43 43 #include "wndproc.h" 44 #include "divewrap.h" 44 45 45 46 #ifndef __WATCOMC__ … … 293 294 } //if(src) 294 295 296 #if 0 295 297 if(dest->diveBufNr == DIVE_BUFFER_SCREEN && 296 298 !(dwFlags & (DDBLT_COLORFILL|DDBLT_DEPTHFILL|DDBLT_ROP) ) && … … 405 407 } 406 408 } 409 #endif 407 410 408 411 //TODO: do we need to check the source for clipping information in case
Note:
See TracChangeset
for help on using the changeset viewer.