event data saving is now possible
Co-authored-by: r3cp3ct <45179536+r3cp3ct@users.noreply.github.com> Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
271a6c0f78
commit
2a29e12be5
@ -114,6 +114,15 @@ public class Map {
|
||||
saveByteData(stream,map.map.backgrounds);
|
||||
saveByteData(stream,map.map.colors);
|
||||
saveByteData(stream,map.map.types);
|
||||
int[] eventData = new int[map.map.eventTileCount];
|
||||
int eventCounter = 0;
|
||||
for (int y=0;y<MAP_HEIGHT;y++) {
|
||||
for (int x=0;x<MAP_WIDTH;x++) {
|
||||
if (map.map.data[y*MAP_WIDTH+x]!=0) {
|
||||
eventData[eventCounter++]=map.map.data[y*MAP_WIDTH+x]<<18|y*MAP_WIDTH+x;
|
||||
}
|
||||
}
|
||||
}
|
||||
stream.close();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user