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

Function GetNextRoom

editor/Erooms.cpp:1075–1094  ·  view source on GitHub ↗

Gets next palette room (from n) that has actually been alloced

Source from the content-addressed store, hash-verified

1073
1074// Gets next palette room (from n) that has actually been alloced
1075int GetNextRoom(int n) {
1076 int i;
1077
1078 ASSERT((n == -1) || ((n >= FIRST_PALETTE_ROOM) && n < FIRST_PALETTE_ROOM + MAX_PALETTE_ROOMS));
1079
1080 if (n == -1) // start at beginning
1081 n = FIRST_PALETTE_ROOM - 1;
1082
1083 for (i = n + 1; i < FIRST_PALETTE_ROOM + MAX_PALETTE_ROOMS; i++)
1084 if (Rooms[i].used)
1085 return i;
1086
1087 for (i = FIRST_PALETTE_ROOM; i <= n; i++)
1088 if (Rooms[i].used)
1089 return i;
1090
1091 // no room found
1092
1093 return -1;
1094}
1095
1096void GetIJ(const vector *normal, int *ii, int *jj);
1097

Callers 1

UpdateDialogMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected