0 Members and 4 Guests are viewing this topic.
5000 ones. then soldat crashes.
Quote from: Mr on January 20, 2009, 03:48:11 pm5000 ones. then soldat crashes.Wasn't it 10k?I just remember seeing in the mapmaker source a constant called MAXPOLYS2 or something that was set to 10k.
It's currently 5000 in the client, the map maker source is slightly incorrect.
What's the map format going to be when it's changed?
[header: map format version][section header: size of section][section header: id][section data][section header: size of section][section header: id][section data]...[section header: size of section][section header: id][section data]
[polygon header][polygon data]
Note that this isn't currently planned, and if implemented wouldn't be seen until sometime around 2012 xP
Sorry, sort of offtopic but still relatively relevant: do you think Soldat will still be under active development in 2012? It'd reach it's ten year birthday then; I think Soldat's ten year anniversary would be awesome.
function testloadmap(filename: string);var file: TFileStream; header: TFSM_Header; sectionHeader: TFSM_SectionHeader; polygonHeader: TFSM_PolygonHeader; polygonData: array of TFSM_Polygon;begin // Open file for reading nicely file := TFileStream.Create(filename, fmOpenRead or fmShareDenyWrite); // Read header file.Read(header, sizeOf(TFSM_Header)); // sanity check if header.magic <> FSM_Magic then raise EFSM_FileFormatException.Create; // Parse entire file while (file.position < file.size) do begin // Read section header file.Read(sectionHeader, sizeOf(TFSM_SectionHeader)); // Check what section we're working with case sectionHeader.ID of FSM_Polygons: begin // Read section header file.Read(polygonHeader, sizeOf(TFSM_PolygonHeader)); // Section sanity check if (sectionHeader.size - sizeOf(TFSM_PolygonHeader)) <> (polygonHeader.count * sizeOf(TFSM_Polygon)) then raise EFSM_FileSectionSizeException.Create; // Read section data setLength(polygonData, polygonHeader.count); file.Read(polygonData[0], polygonHeader.count * sizeOf(TFSM_Polygons)); end; else // Skip this section file.Seek(sectionHeader.size, soFromCurrent); end; end;end;