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

Function ddgr_surf_Create

dd_grwin32/ddgrWin32API.cpp:59–79  ·  view source on GitHub ↗

input: sf->name is optional. sf->w, sf->h, sf->bpp are mandatory sf->type and sf->flags are mandatory. output: sf->obj = surface object. sf->locks = 0 */

Source from the content-addressed store, hash-verified

57 sf->locks = 0
58*/
59bool ddgr_surf_Create(ddgr_surface *sf) {
60 bool success;
61
62 switch (LIB_DATA(subsystem)) {
63 case DDGR_GDIX_SUBSYSTEM:
64 case DDGR_GDI_SUBSYSTEM:
65 success = ddgr_gdi_surf_Create(sf);
66 break;
67 case DDGR_DX_SUBSYSTEM:
68 success = ddgr_dx_surf_Create(sf);
69 break;
70 default:
71 Int3();
72 }
73
74 if (!success) {
75 ddgr_FatalError("Failed to create surface <%s>", sf->name);
76 }
77
78 return success;
79}
80
81void ddgr_surf_Destroy(ddgr_surface *sf) {
82 switch (LIB_DATA(subsystem)) {

Callers 1

createMethod · 0.85

Calls 3

ddgr_gdi_surf_CreateFunction · 0.85
ddgr_dx_surf_CreateFunction · 0.85
ddgr_FatalErrorFunction · 0.85

Tested by

no test coverage detected