- Messages
- 5
- Country
hello community, I have always found answers here (Many thanks to everyone for this) and finally decided to sign up.
I have a question: I want to insert coordinates in the asm file, I have the coordinates in decimal degrees - how can I bring them to the format of hex to asm file?
for example: I have a makeMDL latitude and longitude of 10 (N10*E10*)
asm code is created
As far as I can understand 00010F509h,0071C71C7h is latitude and longitude
I tried this:
hexdec("00010F509h") * 90
result is 100017450
quite strange
point out my mistake please
I have a question: I want to insert coordinates in the asm file, I have the coordinates in decimal degrees - how can I bring them to the format of hex to asm file?
for example: I have a makeMDL latitude and longitude of 10 (N10*E10*)
asm code is created
Code:
;compile with BGLC /BGL 10.asm
header label word
dw 0001 ; 00 World set number
dd 00010FA44H ; 02 North bound
dd 00010EFCEH ; 06 South bound
dd 0071C71C8H ; 10 East bound
dd 0071C71C6H ; 14 West bound
dw 20 dup(0)
dd (offset OBJECT_DATA) - (offset header)
dw 33 dup(0)
OBJECT_DATA label word
db 21 ;;LATBAND_REL
dw 00877h ;;lat min (inclusive) 512M units
dw 0087Eh ;;lat max (exclusive)
dd (offset OBJECT_0) - (offset OBJECT_DATA)
db 0 ;;EOL
OBJECT_0 label BGLCODE
db 12 ; NEAR_FAR_HUGE_OBJECT_HEADER
[COLOR="Red"]dd 00010F509h,0071C71C7h ; latitude,longitude[/COLOR]
db 100 ; image power
dd (offset OBJECT_0_END) - (offset OBJECT_0)
OBJECT_0_START label word
IFIN1 OBJECT_0_FAIL, image_complex, 2, 32767
ADDOBJ OBJECT_0_SCALE
SHADOW_CALL OBJECT_0_SCALE
OBJECT_0_FAIL label BGLCODE
BGL_JUMP_32 OBJECT_0_END
OBJECT_0_SCALE label BGLCODE
SCALE_AGL OBJECT_0_RETURN, 10000, 1339, 131072, [COLOR="red"]00010F509h[/COLOR], 08E39h, [COLOR="red"]0071C71C7h[/COLOR], 01C72h, 0, 0
BGL_CALL OBJECT_0_BEGIN
OBJECT_0_RETURN label word
BGL_RETURN
OBJECT_0_BEGIN label word
model_outside label BGLCODE
model_shadow label BGLCODE
LOD_0 label BGLCODE
BGL_JUMP_32 LOD_0L
model_inside label BGLCODE
BGL_RETURN
LOD_0L label BGLCODE
include 10_0.asm
OBJECT_0_END label word
EOF
As far as I can understand 00010F509h,0071C71C7h is latitude and longitude
I tried this:
hexdec("00010F509h") * 90
result is 100017450
quite strange
point out my mistake please