working on world data interpreter some more

This commit is contained in:
Iris Lightshard 2019-02-08 14:54:48 -08:00
parent 5fc726bcdb
commit 4df7ada357
Signed by: Iris Lightshard
GPG key ID: 3B7FBC22144E6398
2 changed files with 15 additions and 0 deletions

View file

@ -168,6 +168,19 @@ int buildObstruction(char* props)
return 0; return 0;
} }
int buildFGImage(char* props)
{
int rm, x, y, w, h, f, d, a;
char filename[256];
if (sscanf(props, "room %u, x %d, y %d, w %u, h %u, sprite %[^,], frames %u, dual %u, alpha %u",
&rm, &x, &y, &w, &h, filename, &f, &d, &a) !=9)
{
return 1;
}
addFGObj(mapBuffer[rm], x, y, w, h, filename, f, d, a);
return 0;
}
int buildWarp(char* props) int buildWarp(char* props)
{ {
int r, x, y, w, h, dC, dR, dX, dY; int r, x, y, w, h, dC, dR, dX, dY;

View file

@ -13,6 +13,8 @@ int buildPerson(char* props);
int buildObstruction(char* props); int buildObstruction(char* props);
int buildFGImage(char* props);
int countMapThings(char x, enum dataChunks chunk); int countMapThings(char x, enum dataChunks chunk);
void unloadData(enum dataChunks chunk); void unloadData(enum dataChunks chunk);