TColLineTM.exe readme:
(ver 2 corrected for error of "wilx341.dll not included", which occured in first version - also for any of my programs that have that error you can now D/l the wilx341.zip and just unzip the wilx341.dll to that program's own folder to fix it)


Program shows EAW Column, Line and eaw.tm tile locations
of base records in your Targets.dat

Instructions:
Place an EAW Targets.dat in the folder

Run program and it prompts you for a Tcode.
Enter the Tcode as hexidecimal number
If it is a Tcode greater than FF (255 of the 302 possible EAW bases)
Just enter the number in the format example;
Zwickau would be:
119

----
((Tcode and Hex primer For newbies: Why?..
 because really the Tcode is just a hex number: 119 which in decimal is 281.. now if you would look in the document available from my site: "EAWK3wdb.html" , you would see the Tcode for Zwickau is listed as 1901 but that is because if you were to look with a hex editor at the binary file the 2 bytes would appear like that.Because of the format that became standardized for writing a hexidecimal number requiring 2 bytes to a disk file.
Actually the hex number is 119 as said.119 in decimal is 281.
It is (256 x 1) + 25..
25 in hex is 19 ..do you see? ))
----

O.k.:
The program will read the targets.dat record based on the Tcode you provide.
(it finds the record by the formula: Tcode * 32 (+4 to skip header) = record)

and return a message showing you the decimal Column value (the X )
and the Line value (the Y)
for the EAW World decimal grid of 640 wide (Col) x  320 high (Line)
of the "center" of the "Base" coded.

And it also shows the eaw.tm location for the tile.



----------
Only a few technical details:
The data is rough in that only the 2 most significant bytes for X and again for Y are used.The small bytes are ignored.For all purposes this is all that matters for EAW.
----------

The program also writes ascii output of this data to a text file named:
eawxytm.txt
it creates in the same folder if it doesn't exist.
If it already does exist it appends the data to that file.


Here's an example:
-----
Thu 3/3/05 7:27:38 PM
targets.dat dated: 2005:03:02:18:33:30
Tcode:
91
Record #:
145
Column (X):
297
Line (Y):
132
eaw.tm (tile) #:
84777


----------------
That's it!
----------------
Calculate formula for EAW World described:


;convert x val ("col.") to dec
;for addr east of 00 col.
(x val / 4)(then drop the .XX remainder) + 160 = column

;for west of "00"
;convert to dec 
(x val - 64896) /4 = column  


;for line values
;convert to dec ,then
(y val - 58496) / 4 (then drop the .XX remainder) = line


;eaw.tm tile= col + (line * 640)

------------
Take care to note the above Formula.. Very useful to know..
I only calculated this just now since DOM never posted it years ago... 
(and my math is very weak :/ !)
I release the program on the way to making other program I needed this code for.
So it is just a quick tool.
------------
p.s. the program also creates its own self-extracted .dll files:
Wbdcg34i.dll and wilx34i.dll , like most of my WinBatch programs do.
These are used by the program itself.
--------------------

-S!
RAF_Roy
3/3/05














