Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Problems decoding bgl-file

Featured Replies

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

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

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

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

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

correct.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.