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.
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.
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.
"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
TEXTURE_INDEX_LAST_DEFAULT_INDEX = TEXTURE_INDEX_WOOD_PLANK,
// DO NOT EDIT THESE NAMES, THEY ARE HARDCODED
// INSERT NEW TEXTURE INDICES HERE (before TEXTURE_INDEX_LAST, after everything else)
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.
I'm going to leave this for now and concentrate on finishing off the instruments for the KA50. I'm not far from having them all working. Maybe Javelin can progress some more with what I've found so far.
I just need the HAVOC_TRQ_GAUGE.lwo or eeo with the copied Comanche texture attached to it. I can take it from there. It will have to wait until Friday though, I'm on 12 hr shift work until Thursday. Don't worry about the code, I can make it work with new.
Well, I tried a few more things, but no luck. I need someone who does modeling to paste a working MFD screen object from a different helicopter into the Havoc HAVOC_VIRTUAL_COCKPIT_INSTRUMENT_NEEDLES.ees file right over the engine gauges, then save it. Send me the ees or lws file and the name of the MFD object you pasted in (and the texture name if you know what it is) then I can fix the Havoc engine gauges. I don't think it will work any other way.
I can send you the NEEDLES.lws file if you tell me where to send it via a PM.
I think I'll go work on something else for a while.