LGDR Posted July 4, 2012 Author Share Posted July 4, 2012 Delete this topic please. Link to comment Share on other sites More sharing options...
Joost Posted July 5, 2012 Share Posted July 5, 2012 ```Sub ConvertOldMapsToNew()Dim FileName As StringDim i As LongDim F As LongDim X As Long, Y As LongDim OldMap As OldMapRecDim NewMap As MapRec For i = 1 To MAX_MAPS FileName = App.Path & "\maps\map" & i & ".dat" ' Get the old file F = FreeFile Open FileName For Binary As #F Get #F, , OldMap Close #F ' Delete the old file Call Kill(FileName) ' Convert NewMap.Name = OldMap.Name NewMap.Revision = OldMap.Revision + 1 NewMap.Moral = OldMap.Moral NewMap.Up = OldMap.Up NewMap.Down = OldMap.Down NewMap.Left = OldMap.Left NewMap.Right = OldMap.Right NewMap.Music = OldMap.Music NewMap.BootMap = OldMap.BootMap NewMap.BootX = OldMap.BootX NewMap.BootY = OldMap.BootY NewMap.Shop = OldMap.Shop For Y = 0 To MAX_MAPY For X = 0 To MAX_MAPX NewMap.Tile(X, Y).Ground = OldMap.Tile(X, Y).Ground NewMap.Tile(X, Y).Mask = OldMap.Tile(X, Y).Mask NewMap.Tile(X, Y).Anim = OldMap.Tile(X, Y).Anim NewMap.Tile(X, Y).Fringe = OldMap.Tile(X, Y).Fringe NewMap.Tile(X, Y).Type = OldMap.Tile(X, Y).Type NewMap.Tile(X, Y).Data1 = OldMap.Tile(X, Y).Data1 NewMap.Tile(X, Y).Data2 = OldMap.Tile(X, Y).Data2 NewMap.Tile(X, Y).Data3 = OldMap.Tile(X, Y).Data3 Next X Next Y For X = 1 To MAX_MAP_NPCS NewMap.Npc(X) = OldMap.Npc(X) Next X ' Set new values to 0 or null NewMap.Indoors = NO ' Save the new map F = FreeFile Open FileName For Binary As #F Put #F, , NewMap Close #F Next iEnd Sub```You will have to look at the differences between the map types inbetween 3.0.3 and eclipse and change that sub accordingly to make it work for you, but it is probably silly to pay 30 bucks for that. Link to comment Share on other sites More sharing options...
jcsnider Posted July 5, 2012 Share Posted July 5, 2012 @Joost, consider this… the Nightly version of EO converts all graphics in memory to powers of two... if his tilesets are thousands of pixels in length, then finding the next power of 2 to fit would be huge and 90% of graphics cards could not support it. So there is a good chance that a part of the job will be splitting his tilesets and therefore editing each of the maps values to draw from different tilesets. This could be significantly larger of a project than you think. Link to comment Share on other sites More sharing options...
crzyone9584 Posted July 5, 2012 Share Posted July 5, 2012 So you need your maps to be converted to three different eclipse styles? Why? Link to comment Share on other sites More sharing options...
jcsnider Posted July 5, 2012 Share Posted July 5, 2012 Because, he can't decide what he wants to use but he knows that w/e choice he makes… he will need the maps converted lol. Link to comment Share on other sites More sharing options...
crzyone9584 Posted July 5, 2012 Share Posted July 5, 2012 Well I'll make aconvertor for each at $30 a pop… so $90 all together Link to comment Share on other sites More sharing options...
Joost Posted July 5, 2012 Share Posted July 5, 2012 @jcsnider:> @Joost, consider this… the Nightly version of EO converts all graphics in memory to powers of two... if his tilesets are thousands of pixels in length, then finding the next power of 2 to fit would be huge and 90% of graphics cards could not support it. So there is a good chance that a part of the job will be splitting his tilesets and therefore editing each of the maps values to draw from different tilesets. This could be significantly larger of a project than you think.True, but only for the nightly version. For everything else paying anything more than 10 bucks (hour of work) would be getting ripped off imo. Link to comment Share on other sites More sharing options...
jcsnider Posted July 5, 2012 Share Posted July 5, 2012 Yes, in DX8 it will not support a tileset that big. It would have to be split into 512 by 512 segments and then a ton of calculations would have to be done to revise your mapdata to work. In other words, it is very difficult especially for an average programmer. Link to comment Share on other sites More sharing options...
Joost Posted July 5, 2012 Share Posted July 5, 2012 couldn't you split up each tile seperately in 32*32 and just load the appropiate number? or am I missing something there? Link to comment Share on other sites More sharing options...
jcsnider Posted July 5, 2012 Share Posted July 5, 2012 You missing the fact that the maps save the tiles as TileSet,X,and Y… when you split up the tileset at all, you have to load all the maps and fix the values. It is a pain in the arse. Link to comment Share on other sites More sharing options...
Joost Posted July 5, 2012 Share Posted July 5, 2012 so cant u just do```newtileset = oldmapx * oldmapynewmapx = 0newmapy = 0```And split up every tile in 32*32 with top left tile being tileset 1, tile next to it tileset 2, etcetera. The x/y data for the tile will be irrelevant so all you need is right tileset. Link to comment Share on other sites More sharing options...
Ruins of Hell Posted July 5, 2012 Share Posted July 5, 2012 @Joost:> so cant u just do> ```> newtileset = oldmapx * oldmapy> newmapx = 0> newmapy = 0> > ```And split up every tile in 32*32 with top left tile being tileset 1, tile next to it tileset 2, etcetera. The x/y data for the tile will be irrelevant so all you need is right tileset.Then you have to create a new surface for every tile, which would be waaay slower than just using a tileset. (Since there is an overhead for each surface you have to keep track of.)Also, why would you do that instead of splitting up the tileset manually? Seems like a lot of work for something so menial. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now