Previous Thread
Next Thread
Print Thread
Rate This Thread
Hop To
Page 7 of 7 1 2 3 4 5 6 7
#4482911 - 3 hours ago Re: Mi-28 Working Instrument Needles [Re: messyhead]  
Joined: Dec 2010
Posts: 1,346
messyhead Online smile
messyhead  Online Smile

Member

Joined: Dec 2010
Posts: 1,346
Ok, I've got the new MFD to display the same as the existing CRT display. I did this by changing the texture of the new MFD surface to be the same one used by the main CRT. The file I selected in LW is a TGA file, and I converted the objects with the TGA file, and it works. However, I know that the textures.bin contains the BMP version of the file with the same name, so it might be ignoring the TGA file from LW, and using the BMP file. I also think this, as the texture folder does not contain the required TGA file. I think there might be some caching in memory as well, as earlier I got an error when I deleted the texture file, and now I'm not.

But I'm not going to worry about that for now.

I'm going to experiment some more, by changing the main CRT to use the new texture file, and see if I can get it to work the other way round.

Attached Files IMAGE016.jpgIMAGE017.jpg
#4482916 - 3 hours ago Re: Mi-28 Working Instrument Needles [Re: messyhead]  
Joined: Mar 2010
Posts: 520
BANITA Online sigh
Member
BANITA  Online Sigh
Member

Joined: Mar 2010
Posts: 520
if you copy mfd texture and paste in another place , this also works.

#4482920 - 3 hours ago Re: Mi-28 Working Instrument Needles [Re: messyhead]  
Joined: Dec 2010
Posts: 1,346
messyhead Online smile
messyhead  Online Smile

Member

Joined: Dec 2010
Posts: 1,346
Now I changed the main CRT and the small MFD to use a new texture file, copied from the same file that the main CRT uses. In textname.h it is a new entry for this, so I changed the mfd code to use this new entry, but it doesn't render either MFD now. It's using a BMP file, with all the same LW surface settings as in my previous post, with just the texture file changed.

This is the problem we're having trying to add a new MFD.

We can't use the existing MFD filename, as this is what is referred to in the code. It basically says, find a texture called X and render the MFD on it. But copying that code, but for a new MFD doesn't want to work. Each MFD has to have a unique texture name.

Attached Files IMAGE018.jpg
#4482922 - 3 hours ago Re: Mi-28 Working Instrument Needles [Re: messyhead]  
Joined: Mar 2010
Posts: 520
BANITA Online sigh
Member
BANITA  Online Sigh
Member

Joined: Mar 2010
Posts: 520
In apache cpg both mfd were hardcoced, uneditable.
just like here. thealx made them editable.
if you understand what the thealx did in apache cpg, you will find the golden grail wink

#4482924 - 2 hours ago Re: Mi-28 Working Instrument Needles [Re: BANITA]  
Joined: Dec 2010
Posts: 1,346
messyhead Online smile
messyhead  Online Smile

Member

Joined: Dec 2010
Posts: 1,346
Originally Posted by BANITA
In apache cpg both mfd were hardcoced, uneditable.
just like here. thealx made them editable.
if you understand what the thealx did in apache cpg, you will find the golden grail wink


The apache A or D? I'll have a look again at those, but I think I went through a lot of the code already.

#4482925 - 2 hours ago Re: Mi-28 Working Instrument Needles [Re: messyhead]  
Joined: Mar 2010
Posts: 520
BANITA Online sigh
Member
BANITA  Online Sigh
Member

Joined: Mar 2010
Posts: 520
D of course. arneh made this mfd hardcoded.
thealx made editable.

#4482928 - 2 hours ago Re: Mi-28 Working Instrument Needles [Re: messyhead]  
Joined: Dec 2010
Posts: 1,346
messyhead Online smile
messyhead  Online Smile

Member

Joined: Dec 2010
Posts: 1,346
I wonder if it's not rebuilding the index for the textures somehow.

This is the line of code from ha_mfd.c that assigns the texture.

Code
mfd_texture_screen = create_system_texture_screen (mfd_texture_size, mfd_texture_size, TEXTURE_INDEX_HAVOC_TRQ_GAUGE, TEXTURE_TYPE_SINGLEALPHA);


The TEXTURE_INDEX_HAVOC_TRQ_GAUGE refers to the index in textname.h. In the IDE, it resolves as 2318, which relates to the index. But maybe it's not rebuilding the index. I'll try adding some logging and see what happens. If I change textname.h and run a dmake build, it doesn't show anything changing. If I run remake, then dmake, it rebuilds everything again, but hasn't fixed the MFD display.

#4482931 - 2 hours ago Re: Mi-28 Working Instrument Needles [Re: BANITA]  
Joined: Dec 2010
Posts: 1,346
messyhead Online smile
messyhead  Online Smile

Member

Joined: Dec 2010
Posts: 1,346
Originally Posted by BANITA
D of course. arneh made this mfd hardcoded.
thealx made editable.


I had a look. He reused existing textures from the Hokum, so maybe he couldn't get a new one either??

Code
	lhs_mfd_texture_screen = create_system_texture_screen (mfd_texture_size, mfd_texture_size, TEXTURE_INDEX_AVCKPT_DISPLAY_LHS_MFD, TEXTURE_TYPE_NOALPHA);
	rhs_mfd_texture_screen = create_system_texture_screen (mfd_texture_size, mfd_texture_size, TEXTURE_INDEX_AVCKPT_DISPLAY_RHS_MFD, TEXTURE_TYPE_NOALPHA);
	cpg_lhs_mfd_texture_screen = create_system_texture_screen (mfd_texture_size, mfd_texture_size, TEXTURE_INDEX_HOKUM_COCKPIT_MFD_LHS_1, TEXTURE_TYPE_NOALPHA);
	cpg_rhs_mfd_texture_screen = create_system_texture_screen (mfd_texture_size, mfd_texture_size, TEXTURE_INDEX_HOKUM_COCKPIT_MFD_RHS_1, TEXTURE_TYPE_NOALPHA);
	ort_texture_screen = create_system_texture_screen (mfd_texture_size, mfd_texture_size, TEXTURE_INDEX_HOKUM_COCKPIT_MFD_RHS_2, TEXTURE_TYPE_SCREEN);


However, there is a new texture for the Hind Map.

#4482933 - 2 hours ago Re: Mi-28 Working Instrument Needles [Re: messyhead]  
Joined: Mar 2010
Posts: 520
BANITA Online sigh
Member
BANITA  Online Sigh
Member

Joined: Mar 2010
Posts: 520
"He reused existing textures from the Hokum, so maybe he couldn't get a new one either??"

Yes! Is impossible edit hardcoded mfd. you can only reuse another,I thought it was known.

#4482935 - 1 hour ago Re: Mi-28 Working Instrument Needles [Re: BANITA]  
Joined: Dec 2010
Posts: 1,346
messyhead Online smile
messyhead  Online Smile

Member

Joined: Dec 2010
Posts: 1,346
Originally Posted by BANITA
"He reused existing textures from the Hokum, so maybe he couldn't get a new one either??"

Yes! Is impossible edit hardcoded mfd. you can only reuse another,I thought it was known.


What do you mean by hardcoded?

I can't understand why we can't add new MFD's. That's what Javelin and I have been trying to work out.

Do you mean you have to use an existing MFD texture name, instead of being able to add new ones? How did the Hind get added then, as it has a new texture for the moving map.

This is the end of textname.h showing the new Hind ones added, then a comment saying to add new ones at the end

Code
	TEXTURE_INDEX_LAST_DEFAULT_INDEX = TEXTURE_INDEX_WOOD_PLANK,

	// DO NOT EDIT THESE NAMES, THEY ARE HARDCODED
	TEXTURE_INDEX_AVCKPT_DISPLAY_CPG_LHS_MFD,
	TEXTURE_INDEX_AVCKPT_DISPLAY_CPG_RHS_MFD,
	TEXTURE_INDEX_AVCKPT_DISPLAY_ORT,
	TEXTURE_INDEX_AVCKPT_ALNUM_DISPLAY,
	TEXTURE_INDEX_AVCKPT_ALTITUDE_COUNTER,
	TEXTURE_INDEX_HIND_MAP_DISPLAY,

	// INSERT NEW TEXTURE INDICES HERE (before TEXTURE_INDEX_LAST, after everything else)

	TEXTURE_INDEX_HAVOC_TRQ_GAUGE,

	TEXTURE_INDEX_LAST,

#4482936 - 1 hour ago Re: Mi-28 Working Instrument Needles [Re: messyhead]  
Joined: Mar 2010
Posts: 520
BANITA Online sigh
Member
BANITA  Online Sigh
Member

Joined: Mar 2010
Posts: 520
Now we are MUCH closer to find solutnion biggrin

Im not programmer. Hardcoded i think i mean that havoc cockpit, and apache arneh cpg no have any AVCKPT_DISPLAY_CPG_LHS_MFD (or similar)texture. And cannot be editable.

As we see also arneh and thealx made the same, copied ka52 mfd texture, and this is only way to make editable mfds.

#4482940 - 1 hour ago Re: Mi-28 Working Instrument Needles [Re: messyhead]  
Joined: Apr 2018
Posts: 239
Javelin Online content
Member
Javelin  Online Content
Member

Joined: Apr 2018
Posts: 239
Idaho Falls, Idaho USA
Even if we have to reuse an existing texture, there are plenty to choose from. Comanche has eight.

#4482942 - 1 hour ago Re: Mi-28 Working Instrument Needles [Re: messyhead]  
Joined: Dec 2010
Posts: 1,346
messyhead Online smile
messyhead  Online Smile

Member

Joined: Dec 2010
Posts: 1,346
I changed the small MFD to use a comanche one, and now it's not showing at all in the cockpit. However, I think that's progress as I wouldn't expect it to render if the code had found it as an MFD surface. It's not drawing the engine bars on it though, so I'll investigate why.

#4482943 - 56 minutes ago Re: Mi-28 Working Instrument Needles [Re: messyhead]  
Joined: Mar 2010
Posts: 520
BANITA Online sigh
Member
BANITA  Online Sigh
Member

Joined: Mar 2010
Posts: 520
I think you need to find out how it is done, that it recognizes the Hind cockpit instead of ka52 etc



And probably i found reason smile first released ee apache havoc and this game has no editable hardcoded mfds.
netx released much modern ee comanche hokum and this helos has editable mfds.

Last edited by BANITA; 55 minutes ago.
Page 7 of 7 1 2 3 4 5 6 7

Moderated by  messyhead, RacerGT 

Quick Search
Recent Articles
Support SimHQ

If you shop on Amazon use this Amazon link to support SimHQ
.
Social


Recent Topics
The Darwin Effect
by vonBaur. 07/15/19 04:02 PM
Rare Sperm Whale Encounter with ROV
by Blade_RJ. 07/14/19 10:51 PM
Anyone play War of Rights?
by Ajay. 07/14/19 09:55 AM
Top Gun Spoof "USS Cardizem"
by Coot. 07/14/19 03:30 AM
The hidden truth about he-man
by Blade_RJ. 07/13/19 10:45 PM
Storm Barry and Jim Cantore
by Cajun. 07/13/19 02:07 PM
a really old car
by KraziKanuK. 07/12/19 01:46 AM
Greatest child actor performances in movies?
by PanzerMeyer. 07/11/19 06:39 PM
MotoGP rider Marc Marquez makes it a perfect 10
by Patrocles. 07/10/19 12:09 PM
Copyright 1997-2016, SimHQ Inc. All Rights Reserved.

Powered by UBB.threads™ PHP Forum Software 7.6.0