MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / d3d_ErrorString

Function d3d_ErrorString

legacy/renderer/Direct3D.cpp:3316–3567  ·  view source on GitHub ↗

Returns a string describing the passed in error

Source from the content-addressed store, hash-verified

3314
3315// Returns a string describing the passed in error
3316const char *d3d_ErrorString(int error) {
3317 switch (error) {
3318 case DD_OK:
3319 return "No error.\0";
3320 case DDERR_ALREADYINITIALIZED:
3321 return "This object is already initialized.\0";
3322 case DDERR_BLTFASTCANTCLIP:
3323 return "Return if a clipper object is attached to the source surface passed into a BltFast call.\0";
3324 case DDERR_CANNOTATTACHSURFACE:
3325 return "This surface can not be attached to the requested surface.\0";
3326 case DDERR_CANNOTDETACHSURFACE:
3327 return "This surface can not be detached from the requested surface.\0";
3328 case DDERR_CANTCREATEDC:
3329 return "Windows can not create any more DCs.\0";
3330 case DDERR_CANTDUPLICATE:
3331 return "Can't duplicate primary & 3D surfaces, or surfaces that are implicitly created.\0";
3332 case DDERR_CLIPPERISUSINGHWND:
3333 return "An attempt was made to set a cliplist for a clipper object that is already monitoring an hwnd.\0";
3334 case DDERR_COLORKEYNOTSET:
3335 return "No src color key specified for this operation.\0";
3336 case DDERR_CURRENTLYNOTAVAIL:
3337 return "Support is currently not available.\0";
3338 case DDERR_DIRECTDRAWALREADYCREATED:
3339 return "A DirectDraw object representing this driver has already been created for this process.\0";
3340 case DDERR_EXCEPTION:
3341 return "An exception was encountered while performing the requested operation.\0";
3342 case DDERR_EXCLUSIVEMODEALREADYSET:
3343 return "An attempt was made to set the cooperative level when it was already set to exclusive.\0";
3344 case DDERR_GENERIC:
3345 return "Generic failure.\0";
3346 case DDERR_HEIGHTALIGN:
3347 return "Height of rectangle provided is not a multiple of reqd alignment.\0";
3348 case DDERR_HWNDALREADYSET:
3349 return "The CooperativeLevel HWND has already been set. It can not be reset while the process has surfaces or "
3350 "palettes created.\0";
3351 case DDERR_HWNDSUBCLASSED:
3352 return "HWND used by DirectDraw CooperativeLevel has been subclassed, this prevents DirectDraw from restoring "
3353 "state.\0";
3354 case DDERR_IMPLICITLYCREATED:
3355 return "This surface can not be restored because it is an implicitly created surface.\0";
3356 case DDERR_INCOMPATIBLEPRIMARY:
3357 return "Unable to match primary surface creation request with existing primary surface.\0";
3358 case DDERR_INVALIDCAPS:
3359 return "One or more of the caps bits passed to the callback are incorrect.\0";
3360 case DDERR_INVALIDCLIPLIST:
3361 return "DirectDraw does not support the provided cliplist.\0";
3362 case DDERR_INVALIDDIRECTDRAWGUID:
3363 return "The GUID passed to DirectDrawCreate is not a valid DirectDraw driver identifier.\0";
3364 case DDERR_INVALIDMODE:
3365 return "DirectDraw does not support the requested mode.\0";
3366 case DDERR_INVALIDOBJECT:
3367 return "DirectDraw received a pointer that was an invalid DIRECTDRAW object.\0";
3368 case DDERR_INVALIDPARAMS:
3369 return "One or more of the parameters passed to the function are incorrect.\0";
3370 case DDERR_INVALIDPIXELFORMAT:
3371 return "The pixel format was invalid as specified.\0";
3372 case DDERR_INVALIDPOSITION:
3373 return "Returned when the position of the overlay on the destination is no longer legal for that destination.\0";

Callers 10

d3d_InitFunction · 0.85
d3d_MakeBitmapCurrentFunction · 0.85
d3d_DrawFlatPolygonFunction · 0.85
d3d_DrawPolygonFunction · 0.85
d3d_BeginFrameFunction · 0.85
d3d_EndFrameFunction · 0.85
d3d_SetGammaValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected