AGK doesn't understand bytes in Tier1. The smallest thing it will process, in numbers, is a 4 byte integer.
Assuming the hex dump is an ascii file of strings containing pairs of hexadecimal characters, you can use ReadLine to get each line in the file (or the whole file if there are no line breaks). ReadString reads a null terminated string, so that is not what you want to use.
Then you'd manually go through the string, grab each pair of characters and convert them to an appropriate integer value. Something like this:
function processMapFile(fname$)
// open file
fid = OpenToRead(fname$)
// make sure it opened
if fid <= 0
// something that indicates a problem
// exit function indicating error
exitfunction 0
endif
// grab the line (assumes your hex dump has put everything in one line)
line$ = ReadLine(fid)
// close the file
CloseFile(fid)
// figure out how many things there are in the line, there may or may not be a trailing space
slen = Len(line$)
// convince the Ceil function that all inputs are float
thngs = Ceil((slen*1.0)/3.0)
// create an array to hold the values
dim ivals[thngs] AS integer
ivi = 0
// set initial index, strings are indexed starting at 1
for ind = 1 to slen step 3
// increment value index before using so that first index is 1
INC ivi
// grab and convert value
ivals[ivi] = Val(Mid(line$,ind,2))
next ind
// now do something with the values in the array, like
mapwid = ivals[1]
maphih = ivals[2]
...etc..
// done
endfunction 1
Not the most elegant solution, but one quickly come up with.
If you were using Tier2, there would be lots of options, and bytes would be supported.
We give up some things to use either Tier1 or Tier2.
Good Luck!
Cheers,
Ancient Lady