[Add] Load mission factions and such.
This commit is contained in:
parent
e58813337b
commit
fc0a6776c2
4
bin/conf
4
bin/conf
@ -1,6 +1,6 @@
|
|||||||
--WINDOW.
|
--WINDOW.
|
||||||
width = 1280
|
width = 800
|
||||||
height = 1024
|
height = 600
|
||||||
fullscreen = 0
|
fullscreen = 0
|
||||||
|
|
||||||
-- SCREEN.
|
-- SCREEN.
|
||||||
|
@ -131,8 +131,22 @@ static MissionData* mission_parse(const xmlNodePtr parent) {
|
|||||||
do {
|
do {
|
||||||
if(xml_isNode(cur, "location"))
|
if(xml_isNode(cur, "location"))
|
||||||
tmp->avail.loc = mission_location(xml_get(cur));
|
tmp->avail.loc = mission_location(xml_get(cur));
|
||||||
/*else if(xml_isNode(cur, "")) // Need to parse other thingies.
|
else if(xml_isNode(cur, "planet"))
|
||||||
tmp->u.amm.damage_shield = xml_getFloat(cur);*/
|
tmp->avail.planet = strdup(xml_get(cur));
|
||||||
|
else if(xml_isNode(cur, "system"))
|
||||||
|
tmp->avail.system = strdup(xml_get(cur));
|
||||||
|
else if(xml_isNode(cur, "alliance")) {
|
||||||
|
tmp->avail.factions = realloc(tmp->avail.factions,
|
||||||
|
sizeof(int) * ++tmp->avail.nfactions);
|
||||||
|
tmp->avail.factions[tmp->avail.nfactions-1] =
|
||||||
|
faction_getAlliance(xml_get(cur));
|
||||||
|
}
|
||||||
|
else if(xml_isNode(cur, "faction")) {
|
||||||
|
tmp->avail.factions = realloc(tmp->avail.factions,
|
||||||
|
sizeof(int) * ++tmp->avail.nfactions);
|
||||||
|
tmp->avail.factions[tmp->avail.nfactions-1] =
|
||||||
|
faction_get(xml_get(cur));
|
||||||
|
}
|
||||||
} while((cur = cur->next));
|
} while((cur = cur->next));
|
||||||
}
|
}
|
||||||
} while((node = node->next));
|
} while((node = node->next));
|
||||||
|
Loading…
Reference in New Issue
Block a user