The Dink Network

Reply to Re: hex edit maps?

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
April 8th 2018, 01:27 PM
peasantm.gif
shevek
Peasant They/Them Netherlands
Never be afraid to ask, but don't demand an answer 
I completely understand. In fact, I already write a preprocessor that takes code that looks more like actual C and turns it into valid DinkC. It's also not entirely usable for others though. I'm working on that.

But from what you're saying, you should be able to do what I was talking about. What I mean is that you can read map.dat and write out a list of files like:
386:0 127:400 485:0 ...
...
the-script
Sprite 1
x 50
y 100
seq 45
frame 1
...

(The first line is the tile codes and their hardness.) This should be pretty easy to write once you have read the data into memory. Those files are easy to edit by hand, and it shouldn't be too hard to construct a new map.dat from them. Especially if you don't check to see if the files are in the proper format (which just means you have to be careful not to break stuff when you edit them): just discard the first word on every line for the sprite and write the values into the new file.

Anyway, this isn't much more useful than using a hex editor, so it's understandable if you don't see the value in doing this.