| 780 | } |
| 781 | |
| 782 | void NFS3::FreeCOL(const std::shared_ptr<TRACK> &track) { |
| 783 | // Free COL Data |
| 784 | delete[]track->col.texture; |
| 785 | // struct3D XB |
| 786 | if (track->col.nBlocks >= 4) { |
| 787 | COLSTRUCT3D *s = track->col.struct3D; |
| 788 | for (uint32_t colRec_Idx = 0; colRec_Idx < track->col.struct3DHead.nrec; colRec_Idx++, s++) { |
| 789 | delete[]s->vertex; |
| 790 | delete[]s->polygon; |
| 791 | } |
| 792 | delete[] track->col.struct3D; |
| 793 | |
| 794 | // Object XB |
| 795 | COLOBJECT *o = track->col.object; |
| 796 | for (uint32_t colRec_Idx = 0; colRec_Idx < track->col.objectHead.nrec; colRec_Idx++, o++) { |
| 797 | if (o->type == 3) { |
| 798 | delete[]o->animData; |
| 799 | } |
| 800 | } |
| 801 | delete[]track->col.object; |
| 802 | } |
| 803 | |
| 804 | // object2 XB |
| 805 | if (track->col.nBlocks == 5) { |
| 806 | COLOBJECT *o = track->col.object2; |
| 807 | for (uint32_t colRec_Idx = 0; colRec_Idx < track->col.object2Head.nrec; colRec_Idx++, o++) { |
| 808 | if (o->type == 3) { |
| 809 | delete[]o->animData; |
| 810 | } |
| 811 | } |
| 812 | delete[]track->col.object2; |
| 813 | } |
| 814 | delete track->col.vroad; |
| 815 | } |
nothing calls this directly
no outgoing calls
no test coverage detected