diff --git a/WorldData.c b/WorldData.c index 0995266..2eef2c8 100644 --- a/WorldData.c +++ b/WorldData.c @@ -168,6 +168,19 @@ int buildObstruction(char* props) 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 r, x, y, w, h, dC, dR, dX, dY; diff --git a/WorldData.h b/WorldData.h index bf074f6..e947388 100644 --- a/WorldData.h +++ b/WorldData.h @@ -13,6 +13,8 @@ int buildPerson(char* props); int buildObstruction(char* props); +int buildFGImage(char* props); + int countMapThings(char x, enum dataChunks chunk); void unloadData(enum dataChunks chunk);