virtual ~mitemslider() { DELETEA(text); DELETEA(valueexp); DELETEA(display); DELETEA(action); }
virtual ~mitemtext() { DELETEA(text); DELETEA(action); DELETEA(hoveraction); DELETEA(desc); }
void resetgrassoffsets(int n) { DELETEA(grassoffsets); DELETEA(grassanimoffsets); grassoffsets = new float[n]; grassanimoffsets = new float[n]; loopi(n) grassoffsets[i] = rnd(0x1000000)/float(0x1000000); }
virtual ~mitemmapload() { DELETEA(filename); //DELETEA(maptitle); //DELETEA(mapstats); DELETEA(text); DELETEA(action); }
virtual ~mitemimage() { DELETEA(filename); DELETEA(text); DELETEA(action); DELETEA(hoveraction); DELETEA(desc); }
void stopsound() { if(nosound) return; DELETEA(musicfile); DELETEA(musicdonecmd); if(mod) { Mix_HaltMusic(); Mix_FreeMusic(mod); mod = NULL; } }
~ziparchive() { DELETEA(name); if(data) { fclose(data); data = NULL; } }
void menufont(void *menu, const char *usefont) { gmenu &m = *(gmenu *)menu; if(usefont==NULL) { DELETEA(m.usefont); m.usefont = NULL; } else m.usefont = newstring(usefont); }
void mdltricollide(char *collide) { checkmdl; DELETEA(loadingmodel->collidemodel); char *end = NULL; int val = strtol(collide, &end, 0); if(*end) { val = 1; loadingmodel->collidemodel = newstring(collide); } loadingmodel->collide = val ? COLLIDE_TRI : COLLIDE_NONE; }
void chmenumdl(char *menu, char *mdl, char *anim, int *rotspeed, int *scale) { if(!menu || !menus.access(menu)) return; gmenu &m = menus[menu]; DELETEA(m.mdl); if(!mdl ||!*mdl) return; m.mdl = newstring(mdl); m.anim = findanim(anim)|ANIM_LOOP; m.rotspeed = clamp(*rotspeed, 0, 100); m.scale = clamp(*scale, 0, 100); }
void musicdone() { if(!musicdonecmd) return; if(mod) Mix_FreeMusic(mod); mod = NULL; DELETEA(musicfile); char *cmd = musicdonecmd; musicdonecmd = NULL; execute(cmd); delete[] cmd; }
~delayedupdate() { if(type == STRING || type == ACTION) DELETEA(val.s); }
~soundsample() { DELETEA(name); }
virtual ~mitemtextvar() { DELETEA(textexp); DELETEA(action); DELETEA(hoveraction); }
~mitemkeyinput() { DELETEA(text); DELETEA(bindcmd); }
void resetgrasswedges(int n) { DELETEA(grassws); grassws = new grasswedge[n]; loopi(n) grassws[i].init(i, n); }
~zipfile() { DELETEA(name); }
~mitemcheckbox() { DELETEA(text); DELETEA(valueexp); DELETEA(action); }
~sample() { DELETEA(name); }
virtual void clear() { DELETEA(onclear); }