![]() |
Converter from old maps to new - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: General (https://mirage-engine.uk/forums/forumdisplay.php?fid=17) +---- Thread: Converter from old maps to new (/showthread.php?tid=1861) |
Converter from old maps to new - Erik - 25-06-2008 I've been working on adding some more layers lately, and I can't seem to get a converter correctly. I've seen the one posted by grim and messed around with it, but I haven't had much luck with that one so I went back to the one I made. Old TileRec and MapRec: Code: Type OldTileRec New TileRec and MapRec: Code: Type TileRec Converter Code: Code: Sub ConvertOldMapsToNew() I just can't seem to figure it out. The data doesn't seem to be lining up very well. I tested a conversion without and of the new attributes, just the stuff that's already there, and the folder size of maps went from 4.56MB to 4.62MB, so I know something is being added that's unnecessary, but I've no idea what as of now. Thanks. I appreciate your time! :: Erik (Just so you know, I'm pretty unfamiliar with Binary loading and saving, so if it's something obvious, please go and explain well if you wouldn't mind...) Re: Converter from old maps to new - Anthony - 25-06-2008 Did you test to see if the new maps load in Mirage after the conversion? It's bound to increase in size due to the added Mask3 and Fringe3 layers I would assume. Re: Converter from old maps to new - Erik - 25-06-2008 Yup. I did test it, and it doesn't work. The increase in size was from a straight conversion from old->old with no extra changes, just the same stuff. I made sure to not change the recs or anything. I basically loaded it into memory and saved it again, but the folder size went from 4.56MB to 4.62MB with NO changes, just a load and a save with my program, so the new attributes aren't the problem.. With a load into memory and a save from old->new, the folder size goes from 4.56MB to 6.09MB. Re: Converter from old maps to new - Erik - 25-06-2008 I originally had a zero there, but after seeing grim's tutorial, I though it might've been necessary. When they are zeros and everything else is default, it still goes from 4.56MB to 4.62MB. Re: Converter from old maps to new - GIAKEN - 25-06-2008 And what's the problem with that? It should increase in size...I don't see any reason why it might not work... Re: Converter from old maps to new - Erik - 25-06-2008 Grr.. you guys aren't reading what I said. I said I did a straight load->save. I didn't add anything. It increased in size from a straight memory load and a memory save with no changes, so I know there's something wrong with that part. Adding the new layers is the next part I have to fix, but first I must focus on this. As I said before, Quote:Yup. I did test it, and it doesn't work. The increase in size was from a straight conversion from old->old with no extra changes, just the same stuff. I made sure to not change the recs or anything.I loaded the EXACT OldMapRec and OldTileRec into memory and saved it as OldNewMapRec (It's the same as the old one) and OldNewTileRec (Same as the old one) and it's increasing in size with NOTHING added -- just a straight load and save. When I go onto the map on the older client, all the maps are messed up. Re: Converter from old maps to new - Kenko - 28-06-2008 There is no way that the binary file would be any different if you wrote it using the same "Old Map" structure. Check to ensure that your "Old Map" structure has the same variables in your new client as your older client. If necessary, debug to ensure that the correct values are being written. This isn't rocket science. |