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

Function InitRoomFace

Descent3/room.cpp:607–630  ·  view source on GitHub ↗

Initialize a room face structure.

Source from the content-addressed store, hash-verified

605
606// Initialize a room face structure.
607void InitRoomFace(face *fp, int nverts) {
608 fp->flags = 0;
609 fp->num_verts = nverts;
610 fp->portal_num = -1;
611 fp->tmap = 0;
612
613#ifdef NEWEDITOR
614 ned_MarkTextureInUse(0, true);
615#endif
616
617 fp->lmi_handle = BAD_LMI_INDEX;
618 fp->special_handle = BAD_SPECIAL_FACE_INDEX;
619 fp->light_multiple = 4;
620
621 fp->face_verts = (short *)RoomMemAlloc(nverts * sizeof(*fp->face_verts));
622 ASSERT(fp->face_verts != NULL);
623 fp->face_uvls = (roomUVL *)RoomMemAlloc(nverts * sizeof(*fp->face_uvls));
624 ASSERT(fp->face_uvls != NULL);
625
626 ASSERT(fp->face_verts);
627 ASSERT(fp->face_uvls);
628 for (int i = 0; i < nverts; i++)
629 fp->face_uvls[i].alpha = 255;
630}
631
632// Finds out if we are in a room or outside the mine (-1 if we are outside)
633int FindPointRoom(vector *pnt) {

Callers 15

CreateDefaultRoomFunction · 0.85
AllocLoadRoomFunction · 0.85
CopyFaceFunction · 0.85
FixConcaveFacesFunction · 0.85
CopyPortalFunction · 0.85
OnTrigAddFloatingMethod · 0.85
OnCreateVolumeConeMethod · 0.85
OnEdgeVolumetricMethod · 0.85
Read3DSMaxFileFunction · 0.85
AddRoomFunction · 0.85
ClipFaceFunction · 0.85
BuildBridgeFunction · 0.85

Calls 1

RoomMemAllocFunction · 0.85

Tested by

no test coverage detected