August 19, 200223 yr Hi All, I am a bit confused after trying to decode a bgl file. According to the 2000 Scenery SDK, I have two possible formats of the bgl file: pre-2000 and 2000 (not knowing what the proper format of 2002 bgl files are). If I interpret the file as a pre-2000 scenery file (which I doubt it is), the header is immediately followed by opcode 0x01 (which is deprecated) and then opcode 0xcd which I cannot find any entry for in the SDK. If I interpret the header as a 2000 header, which I think it will be, I am confused by the lack of the magic number. Still, immediately after the header, the opcode 0xdc is present which I also cannot find any entry for. If I go directly to the object section, assuming all data between the end of the header and the beginning of the are some sort of custom data, I am greeted with the 0x0f opcode (BGL_STRRES) but without any definition of vertices to use. The scenery in question is Airport 2000 Volume 3 with the 2K2 patch. Any help is appreciated...With thanks in advance :-waveB. Lev
August 20, 200223 yr Not easy to answer...What sort of bgl is it? You have to find the address jump in the header. That'll tell you what type of bgl it is. Then you have to jump to that address. If it's an object bgl, the section should start with 0x05 (I think), which stand for LATBAND_REF. After the latbands, you will get the object_header and only after that do the opcodes start...Cheers, Christian
August 20, 200223 yr Hi Christian, I was looking for the LATBAND_REL but I could not find it. In the FILE_HEADER2 the object_ptr points to a specific location and at that location I found the BGL_STRRES. Between the BGL_STRRES and the end of the FILE_HEADER2 I found no LATBAND_REL. To answer your question regarding the nature of the bgl I am a little confused. It is the Airport 2000 Volume 3 with the 2K2 patch. According to the FILE_HEADER2, it contains visible data (FL_world_set set to 1). Hope this helps....With thanks in advance :-waveB. Lev
August 20, 200223 yr This is very odd. The object section HAS TO start with '0x15' (LATBAND_REL).Hmm, if there is an object_ptr than it's an object bgl. Are all the other pointers 0?Cheers, Christian
August 20, 200223 yr Yes, with the exception of the misc_data_ptr. The misc_data_ptr is orders of magnitude greater than the object_data_ptr. If I read the SDK right, the object_ptr is an absolute reference, i.e. in terms of bytewise distance from the beginning of the file. Right?B. Lev
Create an account or sign in to comment