diff --git a/include/editor.h b/include/editor.h index 6d8d512..c3e7cb2 100644 --- a/include/editor.h +++ b/include/editor.h @@ -56,6 +56,7 @@ extern void ExtShowSpriteData(short spritenum); extern void ExtEditSectorData(short sectnum); extern void ExtEditWallData(short wallnum); extern void ExtEditSpriteData(short spritenum); +extern void ExtDeleteSprite(short spritenum); #define STATUS2DSIZ 144 diff --git a/kenbuild/src/bstub.c b/kenbuild/src/bstub.c index 7144f82..a06043c 100644 --- a/kenbuild/src/bstub.c +++ b/kenbuild/src/bstub.c @@ -257,6 +257,11 @@ void ExtPreCheckKeys(void) #endif } +void ExtDeleteSprite(short spritenum) +{ + (void)spritenum; +} + #define MAXVOXMIPS 5 extern unsigned char *voxoff[][MAXVOXMIPS]; void ExtAnalyzeSprites(void) diff --git a/src/build.c b/src/build.c index c1406a5..9ddf3a1 100644 --- a/src/build.c +++ b/src/build.c @@ -2327,6 +2327,7 @@ void editinput(void) { if (searchstat == 3) { + ExtDeleteSprite(searchwall); deletesprite(searchwall); updatenumsprites(); asksave = 1; @@ -4920,6 +4921,7 @@ void overheadeditor(void) { if ((pointhighlight&0xc000) == 16384) //Sprite Delete { + ExtDeleteSprite(pointhighlight&16383); deletesprite(pointhighlight&16383); printmessage16("Sprite deleted."); updatenumsprites(); @@ -5848,7 +5850,10 @@ int deletesector(short sucksect) int i, j, k, nextk, startwall, endwall; while (headspritesect[sucksect] >= 0) + { + ExtDeleteSprite(headspritesect[sucksect]); deletesprite(headspritesect[sucksect]); + } updatenumsprites(); startwall = sector[sucksect].wallptr;