Loads a generic found in the net table file. It then allocs a generic and then calls SetAndLoadgeneric to actually load in any images/models associated with it
| 2195 | // then calls SetAndLoadgeneric to actually load in any images/models associated |
| 2196 | // with it |
| 2197 | void mng_LoadNetGenericPage(CFILE *infile, bool overlay) { |
| 2198 | mngs_generic_page genericpage; |
| 2199 | memset(&genericpage, 0, sizeof(mngs_generic_page)); |
| 2200 | |
| 2201 | if (mng_ReadNewGenericPage(infile, &genericpage)) { |
| 2202 | int n = FindObjectIDName(genericpage.objinfo_struct.name); |
| 2203 | if (n != -1) { |
| 2204 | if (overlay) { |
| 2205 | mprintf(0, "OVERLAYING GENERIC %s\n", genericpage.objinfo_struct.name); |
| 2206 | mng_FreePagetypePrimitives(PAGETYPE_GENERIC, genericpage.objinfo_struct.name, 0); |
| 2207 | mng_AssignGenericPageToObjInfo(&genericpage, n); |
| 2208 | } |
| 2209 | return; // A weapon has already loaded this generic |
| 2210 | } |
| 2211 | |
| 2212 | int ret = mng_SetAndLoadGeneric(&genericpage, infile); |
| 2213 | ASSERT(ret >= 0); |
| 2214 | } else |
| 2215 | mprintf(0, "Could not load genericpage named %s!\n", genericpage.objinfo_struct.name); |
| 2216 | } |
| 2217 | |
| 2218 | // Reads a generic page from a local table file. It then allocs a generic and |
| 2219 | // loads any images/models associated with that generic |
no test coverage detected