MapInfo struct

MapInfo struct

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
Betalord
Former Engine Dev
Posts: 543
Joined: 29 Jun 2005, 09:31

MapInfo struct

Post by Betalord »

MapInfo lacks two important information:
- map width and height
- start positions

I have code that reads positions and dimensions from 0.51 map files (in Delphi), but since new map files are compressed my code is useless. Besides, I'd like to use UnitSync.dll's functions. I propose new MapInfo struct:

Code: Select all

struct MapInfo
{
	char* description;
	int mapWidth; // new
	int mapHeight; // new
	int tidalStrength;
	int gravity;
	float maxMetal;
	int extractorRadius;
	int minWind;
	int maxWind;
	int posCount; // new
	StartPos* posList; // new
};

struct StartPos
{
	int x;
	int y;
}
User avatar
Buggi
Posts: 875
Joined: 29 Apr 2005, 07:46

Post by Buggi »

Um... Have you looked at an SMD file?

-Buggi
Betalord
Former Engine Dev
Posts: 543
Joined: 29 Jun 2005, 09:31

Post by Betalord »

Sorry, I don't see what is your point Buggi.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I'd like it if this could be obtained through the GlobalAI callback too, along with the commander unitID
Fnordia
Former Engine Dev
Posts: 425
Joined: 13 Aug 2004, 16:11

Post by Fnordia »

I've updated the unitsync dll in cvs to include this.
Post Reply

Return to “Engine”