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

Function BriefEditFreeEffect

editor/BriefEdit.cpp:203–227  ·  view source on GitHub ↗

BriefEditFreeEffect Frees up any memory allocated in an effect

Source from the content-addressed store, hash-verified

201//
202// Frees up any memory allocated in an effect
203void BriefEditFreeEffect(tBriefEffect *efx) {
204 switch (efx->type) {
205 case BE_TEXT:
206 case BE_BMP:
207 case BE_MOVIE:
208 case BE_BKG:
209 case BE_POLY:
210 case BE_SND:
211 case BE_BUTTON:
212 break;
213 default:
214 Int3(); // Get Jeff
215 };
216
217 if (efx->text) {
218 mem_free(efx->text);
219 efx->text = NULL;
220 }
221
222 efx->used = false;
223 efx->next = efx->prev = -1;
224 efx->description[0] = '\0';
225 efx->id = 0;
226 efx->type = BE_NONE;
227}
228
229void BuildMissionFlagMask(uint32_t mask, char *string, uint8_t isset) {
230 int counter = 0;

Callers 2

BriefEditFreeScreenFunction · 0.85
OnBriefEffectDelMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected