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

Function BuildListOfPortalVerts

editor/Erooms.cpp:2073–2093  ·  view source on GitHub ↗

Builds a list of all the vertices in a room that are part of a portal Parameters: rp - the room to check list - filled in with the list of vert numbers. List should be MAX_VERTS_PER_ROOM big Returns: the number of verts in the list

Source from the content-addressed store, hash-verified

2071// list - filled in with the list of vert numbers. List should be
2072//MAX_VERTS_PER_ROOM big Returns: the number of verts in the list
2073int BuildListOfPortalVerts(room *rp, int *list) {
2074 int i, t, j;
2075 int count = 0;
2076
2077 for (i = 0; i < rp->num_portals; i++) {
2078 face *fp = &rp->faces[rp->portals[i].portal_face];
2079
2080 for (t = 0; t < fp->num_verts; t++) {
2081 int v = fp->face_verts[t];
2082
2083 for (j = 0; j < count; j++)
2084 if (list[j] == v)
2085 break;
2086
2087 if (j == count)
2088 list[count++] = v;
2089 }
2090 }
2091
2092 return count;
2093}
2094
2095#define BUF_LEN 100000
2096

Callers 5

SizeRoomVerticesFunction · 0.85
SizeFaceVerticesFunction · 0.85
SizeFaceEdgeFunction · 0.85
MoveRoomFaceFunction · 0.85
JoinRoomsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected