Sign in to follow this  
n4gix

Resource Limit in C Multi-Gauges???

Recommended Posts

I seem to have run into an odd problem with a multi-gauge I'm building...For some odd reason, the latest sub-gauge I'm adding seems to have a "resource problem," because it is using bitmaps from the first sub-gauge in the multi-gauge instead of it's own, defined bitmaps.EDIT: It never fails... ten minutes after I post a plea for help, I found my problem. It seems I mistyped one of the linked-list elements, so it was pointing to the next element in the VOR1 gauge instead of the Electrical gauge! :-bang :-bang *:-* *:-* :~P :~P http://forums.avsim.net/user_files/121422.jpg

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

I don't know if this is still true, but in earlier version of FS you couldn't use all resource ids. It worked like this:1000-1499 OK1500-1999 no2000-2499 OK2500-2999 no...4000-4499 OK4500-9999 no10000-10499 OK10500-11000 no...14000-14499 OK14500-19999 no20000-20499 OK...and so on. Using the "no" ids caused pretty weird effects. If this rule still exists in FS2004, it's likely the reason for your problem.

Share this post


Link to post
Share on other sites

Hmmm, that is interesting... Thanks for the list. I'll print it out and keep if for reference, just in case!These are the resources I'm currently using, and all seems well now:#define Rec0 0x1000#define Rec1 0x1005#define Rec2 0x1010#define Rec3 0x1015#define Rec4 0x1020#define Rec5 0x1025#define Rec6 0x1030#define Rec7 0x1035#define Rec8 0x1040#define Rec9 0x1045#define Rec10 0x1050#define Rec11 0x1055#define Rec12 0x1060#define Airspeed_Rec0 0x2100#define Airspeed_Rec1 0x2105#define Airspeed_Rec2 0x2110#define Airspeed_Rec3 0x2115#define VSI_Rec0 0x2200#define VSI_Rec1 0x2205#define VSI_Rec2 0x2210#define ALT_Rec0 0x2300#define ALT_Rec1 0x2305#define ALT_Rec2 0x2310#define ALT_Rec3 0x2315#define ALT_Rec4 0x2320#define ALT_Rec5 0x2325#define ALT_Rec6 0x2330#define ALT_Rec7 0x2335#define ALT_Rec8 0x2340#define ALT_Rec9 0x2345#define ALT_Rec10 0x2350#define HDG_Rec0 0x2400#define HDG_Rec1 0x2405#define HDG_Rec2 0x2410#define HDG_Rec3 0x2415#define TURN_Rec0 0x2500#define TURN_Rec1 0x2505#define TURN_Rec2 0x2510#define TURN_Rec3 0x2515#define TURN_Rec4 0x2520#define TURN_Rec5 0x2525#define FUEL_Rec0 0x2600#define FUEL_Rec1 0x2605#define FUEL_Rec2 0x2610#define FUEL_Rec3 0x2615#define CLOCK_Rec0 0x2700#define CLOCK_Rec1 0x2705#define CLOCK_Rec2 0x2710#define CLOCK_Rec3 0x2715#define CLOCK_Rec4 0x2720#define ATD_Rec0 0x2800#define ATD_Rec1 0x2805#define ATD_Rec2 0x2806#define ATD_Rec3 0x2810#define ATD_Rec4 0x2815#define ATD_Rec5 0x2820#define ATD_Rec6 0x2825#define ATD_Rec7 0x2830#define ATD_Rec8 0x2835#define ATD_Rec9 0x2840#define ATD_Rec10 0x2841#define ELEC_Rec0 0x2900#define ELEC_Rec1 0x2905#define ELEC_Rec2 0x2910#define ELEC_Rec3 0x2915#define ELEC_Rec4 0x2916#define HOBBS_Rec0 0x3000

Share this post


Link to post
Share on other sites

I see you use an interval of 0x0005 between each resource number. I usually use 0x0010 instead for more security...Nevertheless, several times I had a surprise: my panel was working fine on my computers, in 1024x768 and 1280x1024 resolution. Then a beta-tester used them on higher resolution, such as 1600x1200, and the problem appeared. The same problem as yours.The right solution is just to change the resource number of the graphic that fails, and increase the number to a much higher value.Eric

Share this post


Link to post
Share on other sites

You should write a macro for those 'DOH' smily sequences Bill :D- Darren

Share this post


Link to post
Share on other sites

Thanks for the replies, Eric & Darren. I normally use 0x0010 interval myself, but for some inexplicable reason for this multi- I started using 0x0005...It's a trivial matter to renumber them though... I haven't concerned myself with "numbering" since writing programs in DOS BASIC eons ago... ;)As I said though in my first (editied) post, in this specific case I had mistyped the name of the next element in a linked list, so once control had passed to the VOR1 element record... Well, you can see the results! :-eekDarren, I don't need a macro for those smilies. I've typed 'em often enough to have 'em memorized. What I need though is a "blushing" smilie! (-:

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