Still looking ...
(gdb) break DoRouting
Breakpoint 4 at 0x1deb4: file src/tools/ufo2map/routing.c, line 155.
(gdb) c
Continuing.
LEVEL: 0...1...2...3...4...5...6...7...8...9... (time: 0s, #: 258)
Breakpoint 4, DoRouting () at src/tools/ufo2map/routing.c:155
155 if (config.generateDebugTrace)
(gdb) p curTile->models[255]
$6 = {
mins = {0, 0, 0},
maxs = {0, 0, 0},
origin = {0, 0, 0},
headnode = 14,
firstface = 0,
numfaces = 14
}
(gdb)
Not broken yet
Found it!
When the maps are written out, then it gets byteswapped.
(gdb) n
219 data = curTile->routedata;
(gdb) n
220 for (i = 0; i < 3; i++)
(gdb) n
221 wpMins[i] = LittleLong(wpMins[i]);
(gdb) # Ohh ...
(gdb) list
216 }
217
218 /* store the data */
219 data = curTile->routedata;
220 for (i = 0; i < 3; i++)
221 wpMins[i] = LittleLong(wpMins[i]);
222 data = CompressRouting((byte*)wpMins, data, sizeof(wpMins));
223 for (i = 0; i < 3; i++)
224 wpMaxs[i] = LittleLong(wpMaxs[i]);
225 data = CompressRouting((byte*)wpMaxs, data, sizeof(wpMaxs));
(gdb)
226 data = CompressRouting((byte*)Nmap, data, sizeof(Nmap));
227
228 curTile->routedatasize = data - curTile->routedata;
229
230 /* Ensure that we did not exceed our allotment of memory for this data. */
231 assert(curTile->routedatasize <= MAX_MAP_ROUTING);
232
233 /* Remove the CLIPS fom the tracing structure by resetting it. */
234 PopInfo();
235 }
(gdb) break 232
Breakpoint 6 at 0x1e758: file src/tools/ufo2map/routing.c, line 232.
(gdb) c
Continuing.
Breakpoint 6, DoRouting () at src/tools/ufo2map/routing.c:234
234 PopInfo();
(gdb) p curTile->models[255]
$15 = {
mins = {0, 0, 0},
maxs = {0, 0, 0},
origin = {0, 0, 0},
headnode = 14,
firstface = 0,
numfaces = 14
}
(gdb) # Huh ...
(gdb) n
235 }
(gdb) n
ProcessWorldModel () at src/tools/ufo2map/bsp.c:50
50 }
(gdb) n
ProcessModels (filename=0xbffff6a8 "maps/africa/af_drop_herakles.bsp") at src/tools/ufo2map/bsp.c:116
116 if (!config.verboseentities)
(gdb) p curTile->models[255]
$16 = {
mins = {0, 0, 0},
maxs = {0, 0, 0},
origin = {0, 0, 0},
headnode = 14,
firstface = 0,
numfaces = 14
}
(gdb) n
117 config.verbose = qfalse; /* don't bother printing submodels */
(gdb) n
105 for (entity_num = 0; entity_num < num_entities; entity_num++) {
(gdb) p num_entities
$17 = 2
(gdb) p entity_num
$18 = 0
(gdb) n
106 if (!entities[entity_num].numbrushes)
(gdb) p entity_num
$19 = 1
(gdb) list
101 void ProcessModels (const char *filename)
102 {
103 BeginBSPFile();
104
105 for (entity_num = 0; entity_num < num_entities; entity_num++) {
106 if (!entities[entity_num].numbrushes)
107 continue;
108
109 Verb_Printf(VERB_EXTRA, "############### model %i ###############\n", curTile->nummodels);
110
(gdb) n
105 for (entity_num = 0; entity_num < num_entities; entity_num++) {
(gdb) n
120 EndBSPFile(filename);
(gdb) n
Writing maps/africa/af_drop_herakles.bsp
121 }
(gdb) p curTile->models[255]
$20 = {
mins = {0, 0, 0},
maxs = {0, 0, 0},
origin = {0, 0, 0},
headnode = 234881024,
firstface = 0,
numfaces = 234881024
}
(gdb) # Ahh
(gdb)