Jump to content
Sign in to follow this  
Guest GerrishGray

New Macros

Recommended Posts

Guest Keyno

Hi,I take the new vehicles GUIDs from FS2004 vehicles.bgl.I checked some by placing by BGLPlacer.Look screenshot please.EAB79A00,4FE2C060,3FF670BE,264C8B4B cruise_linearb7F58F108,43AAD72E,E6EE9D9E,6DD6D4E5 ApowerboatsF468350B,4EEF1C1B,F676C29E,9489A49E wash_ferry9D917126,4D489054,688F2CB2,61B49D41 4170E428,43996E21,C586C782,F4A3524A 6880D52B,4AA28DD7,A7038AB8,0E60DDA5 68992E3D,47F1C52A,70395480,757C01C6 886E7D43,4BC2380A,78A255A7,48D5121D A5D38D43,4D53A509,89C538BB,D358BB59 8EDDAC4C,43BC013F,98A20487,F5F401F7 cargo60EB7054,40BE8969,76ED60A5,0E63C7E1 0A66A25E,47E9DD10,1378619C,23CB694A BB720361,42806D74,232CE4BD,C1455EA8 17A54B77,459DD0A2,55707BAB,3B7EBD87 9EEA367B,4BDC18C3,CF4C6AB1,FD4C2199 22D9AE7C,491C3CF1,DEA010BE,D5153C27 58276A7D,4051D068,BB31B6AA,9D4DF5AB 7766807E,48629FB7,5180AE8A,EE78E6CD FE2E607F,490DA1D1,6604C293,CCE49856 cargo650A8B83,4F63F7E2,E75AB2BB,6ED2053B 5CB7E883,4A8478E9,8C729C90,B0F83994 4D9E1588,4234E509,AE6874A3,8C714D11 cargo82E4AC8F,4AD32AD1,DE5811B2,6CC22E9D C545A295,11D2E2EC,1000849C,2AE60C5A C545A296,11D2E2EC,1000849C,2AE60C5A C545A297,11D2E2EC,1000849C,2AE60C5A C545A298,11D2E2EC,1000849C,2AE60C5A 03E43599,4E876FE6,8D3CB28F,CEC91B4D C545A299,11D2E2EC,1000849C,2AE60C5A C545A29A,11D2E2EC,1000849C,2AE60C5A C545A29B,11D2E2EC,1000849C,2AE60C5A C545A29C,11D2E2EC,1000849C,2AE60C5A C545A29D,11D2E2EC,1000849C,2AE60C5AC545A29E,11D2E2EC,1000849C,2AE60C5AC545A29F,11D2E2EC,1000849C,2AE60C5AC545A2A0,11D2E2EC,1000849C,2AE60C5AC545A2A1,11D2E2EC,1000849C,2AE60C5A2BF74EA2,4A067DF8,4F077B9A,4090907DC545A2A2,11D2E2EC,1000849C,2AE60C5AE6058DA3,48D8C50C,05C8DAA6,5C43111DC545A2A3,11D2E2EC,1000849C,2AE60C5A317374A4,436BC44F,55FFCE8B,DF3F83DDC545A2A4,11D2E2EC,1000849C,2AE60C5AC545A2A5,11D2E2EC,1000849C,2AE60C5AC545A2A6,11D2E2EC,1000849C,2AE60C5AC545A2A7,11D2E2EC,1000849C,2AE60C5AF2C5E6A9,4D32D7AF,0D24249D,F25949E9E9A4ECA9,49C08E1A,74555E8D,6C315D86089841EC,45F40A99,FDBE8E9B,CA89834ECC073DED,45F54F98,51C09482,41429510595FD3ED,44AA585D,E1248895,C1E37ABE8B9CF4FE,4D62FF44,2E8DCD90,89A4E90Dhttp://forums.avsim.net/user_files/51810.jpg

Share this post


Link to post
Share on other sites

Interesting. How did you find all those GUIDs?


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites
Guest Keyno

With a HEX editor from vehicles.bgl.There are some difference in new vehicles.bgl. I could'nt find the name of objects now in vehicles.bgl so I gave name to objects myself, from their bitmaps. (For ex:Cargo). I think there are 3 cargo new ship,2 wash_ferry ,2 cruise ship , 2 or more new truck and some that I could'nt find.Kenan

Share this post


Link to post
Share on other sites

OK, thanks now I understand :). I tried to look at them with a hex editor myself, but couldn't really understand the structure of the file yet.


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites
Guest Keyno

Hi Arno,GUIDs are starting at offset 92 (decimal). Each GUID is 16byte long (4* int32)as you know and there are 8 byte data between each GUID. Here is the first 300 byte of vehicles.bgl . I put "<" for start of firstand second GUID that I sent and ">" for end of them. (EAB79A00,4FE2C060,3FF670BE,264C8B4B and 7F58F108,43AAD72E,E6EE9D9E,6DD6D4E5). Each int32 value is in reverse order so you will see 00 9A B7 EA at start of first GUID.Offset 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1500000000 01 02 92 19 38 00 00 00 90 F4 05 82 57 31 C3 01 ..

Share this post


Link to post
Share on other sites
Guest sapper42

This is sensational news. thanks for your efforts, i really must learn how to use a hex editor and understand the workings.Thanks again for sharing this info.rgds Jeff

Share this post


Link to post
Share on other sites
Guest jsvw2001

I am busy extracting the GUID's from the FS2004 generic.bgl and will publish it in a day or two.Thanks to Keyno for the initial breakthrough!RegardsJohan

Share this post


Link to post
Share on other sites

Great, for my autogen macros I made a small tool that created the APIs by reading the default.xml file. I think I will change it, so it can read a list of these new GUIDs. That would make it easier to create a set of APIs for all those objects.


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites
Guest GerrishGray

HiThis is interesting stuff because it reveals some fundemental changes in the structure and indexing of the new-format BGL files as regards library objects. We seem to have lost the min/max values that were written into the header of the old-style BGL's to enable rapid location of the correct BGL for any particular object GUID.The index of the GUID's now also seems to be in sorted order - although I am not absolutely certain about this because there appears to be one exception in the example presented?This suggests that the indexing/location system for library objects has changed in the new format, and my previous notes on the most efficient way of assigning GUID's may need some fundamental changes for the new format. This is not a trivial subject - those of you who have read my previous notes will realise that this can have a significant effect on frame rates when using library objects (an effect which it seems that MS themselves have overlooked).We shall only know this properly when we eventually get the SDK (if it tells us the necessary details?!), but perhaps those of you now dipping into the default libraries can provide some further light on this in the meantime, such as confirming whether (a) the index is indeed in sorted order and (:( whether this reflects the order that the objects appear in the main body of the BGL, or whether the index has instead been sorted by the compiler with the main body of the objects not necessarily arranged in the same order (this should be revealed by analysis of the 8 bytes following each GUID, 4 bytes of which should be a pointer to the main body).I'll see if I can find some time for some further analysis myself, but any input from others will be very welcome!RegardsGerrish

Share this post


Link to post
Share on other sites
Guest jsvw2001

The attached file is a plain text file with all the GUID's extracted from the default generic.bgl (FS2004). This file can be directly compiled with BGLC, no need to put in any header information. The location of the starting point for the objects is N26*, W26* and then fly/slew direct to the North (013* Magnetic). The line of 220 objects ends at N26* 54'. If you do slew, you will, at times, have to wait for the objects to built up again. I have used the same scale and V values for all objects, which is in theory not ideal.I will now prepare a document to try and give each object the proper name. It will make things easier if we know that. All 41 objects, named in the default.xml file, are contained in this file.RegardsJohan

Share this post


Link to post
Share on other sites
Guest jsvw2001

Saved by MS. Download the latest SDK (BGLComp)from their site and you will find all the information.RegardsJohan

Share this post


Link to post
Share on other sites

I think I will change my tool that made the autogen APIs one of the next days. Then I can automatically create macros for these objects listed.The only problem would then be to sort the usefull from the less usefull :D.


Arno

If the world should blow itself up, the last audible voice would be that of an expert saying it can't be done.

FSDeveloper.com | Former Microsoft FS MVP | Blog

Share this post


Link to post
Share on other sites
Guest JR Morgan

Thanks for your work Arno.. Don't worry about the sorting.. The (us) users can pick and choose the objects..J.R.

Share this post


Link to post
Share on other sites
Guest JR Morgan

Hi again Arno and all.. Here's an example of the first GUID identified on Johan's list. The universally usable Macro below was used to call the object in AFW 3.0/185. I like the utility of Arno's macro format better, because it features a seperate macro for each object, however, in my fiddling-around, this macro works to call any object on the list.============================================;Universal API Macro to call Lib objects in AFW 3.0/185 (look familar Dick?);GUID is entered via %6, %7, %8 and %9 parameter boxes;Copyright SCASM; Macro by J.R.;Area( A %1 %2 100 )PerspectiveCall( :_object )ShadowCall( :_object )Jump( : ):_objectMif( %11 )RefPoint( Abs :_Fail %4 %1 %2 E= %11 V1= 6000 V2= 100 )MelseRefPoint( Rel :_Fail %4 %1 %2 E= %11 V1= 6000 V2= 100 )MifendRotatedCall( :RO 0 0 %5 ):ROCallLibObj( 0 %6 %7 %8 %9 ); Using AFW 3.0/185 3D object call;CallLibObj( 0 781C4106 49258CA9 75D080AF E913F7B2 ); Actual resulting format of Call;This 3D obj is some sort of Radar approach (?) station; scale set to 5.00:_FailReturnEndA=======================================53338.jpgJ.R

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...