Loads surfaces.
(lump_t l)
| 321 | |
| 322 | /** Loads surfaces. */ |
| 323 | public void CMod_LoadSurfaces(lump_t l) { |
| 324 | Com.DPrintf("CMod_LoadSurfaces()\n"); |
| 325 | texinfo_t in; |
| 326 | mapsurface_t out; |
| 327 | int i, count; |
| 328 | |
| 329 | if ((l.filelen % texinfo_t.SIZE) != 0) |
| 330 | Com.Error(Defines.ERR_DROP, "MOD_LoadBmodel: funny lump size"); |
| 331 | |
| 332 | count = l.filelen / texinfo_t.SIZE; |
| 333 | if (count < 1) |
| 334 | Com.Error(Defines.ERR_DROP, "Map with no surfaces"); |
| 335 | if (count > Defines.MAX_MAP_TEXINFO) |
| 336 | Com.Error(Defines.ERR_DROP, "Map has too many surfaces"); |
| 337 | |
| 338 | numtexinfo = count; |
| 339 | Com.DPrintf(" numtexinfo=" + count + "\n"); |
| 340 | if (debugloadmap) |
| 341 | Com.DPrintf("surfaces:\n"); |
| 342 | |
| 343 | for (i = 0; i < count; i++) { |
| 344 | out = map_surfaces[i] = new mapsurface_t(); |
| 345 | in = new texinfo_t(cmod_base, l.fileofs + i * texinfo_t.SIZE, |
| 346 | texinfo_t.SIZE); |
| 347 | |
| 348 | out.c.name = in.texture; |
| 349 | out.rname = in.texture; |
| 350 | out.c.flags = in.flags; |
| 351 | out.c.value = in.value; |
| 352 | |
| 353 | if (debugloadmap) { |
| 354 | Com.DPrintf("|%20s|%20s|%6i|%6i|\n", new Vargs() |
| 355 | .add(out.c.name).add(out.rname).add(out.c.value).add( |
| 356 | out.c.flags)); |
| 357 | } |
| 358 | |
| 359 | } |
| 360 | } |
| 361 | |
| 362 | /** Loads nodes. */ |
| 363 | public void CMod_LoadNodes(lump_t l) { |
no test coverage detected