BREAK_INFOp SetupWallForBreak(WALLp wallp) { BREAK_INFOp break_info; break_info = FindWallBreakInfo(wallp->picnum); if (break_info) { wallp->lotag = TAG_WALL_BREAK; SET(wallp->extra, WALLFX_DONT_STICK); // set for cacheing if (break_info->breaknum >= 0) SET_GOTPIC(break_info->breaknum); } if (wallp->overpicnum > 0 && TEST(wallp->cstat, CSTAT_WALL_MASKED)) { break_info = FindWallBreakInfo(wallp->overpicnum); if (break_info) { wallp->lotag = TAG_WALL_BREAK; SET(wallp->extra, WALLFX_DONT_STICK); } } return(break_info); }
BREAK_INFOp SetupSpriteForBreak ( SPRITEp sp ) { short picnum = sp->picnum; BREAK_INFOp break_info; // ignore as a breakable if true if ( sp->lotag == TAG_SPRITE_HIT_MATCH ) { return ( NULL ); } break_info = FindSpriteBreakInfo ( picnum ); if ( break_info ) { // use certain sprites own blocking for determination if ( TEST ( break_info->flags, BF_OVERRIDE_BLOCK ) ) { // if not blocking then skip this code if ( !TEST ( sp->cstat, CSTAT_SPRITE_BLOCK ) ) { return ( BREAK_INFOp ) ( -1 ); } } if ( TEST ( break_info->flags, BF_BURN ) ) { SET ( sp->extra, SPRX_BURNABLE ); } else { SET ( sp->extra, SPRX_BREAKABLE ); } sp->clipdist = SPRITEp_SIZE_X ( sp ); SET ( sp->cstat, CSTAT_SPRITE_BREAKABLE ); // set for cacheing if ( break_info->breaknum >= 0 ) { SET_GOTPIC ( break_info->breaknum ); } } return ( break_info ); }