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
| 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 |
| 2073 | int 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 |
no outgoing calls
no test coverage detected