XWAUP: 1999 vs 2020

In here you can discuss what is going on in the project, offer help, praise or critique!

Re: XWAUP: 1999 vs 2020

User avatar
JeremyaFr
XWAU Member
Posts: 3921
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Mar 28, 2020 8:57 pm

keiranhalcyon7 wrote:
Sun Mar 22, 2020 5:24 am
locating and disabling the part of the original game code that toggles the six HUD elements' visibility in response to those six keystrokes (I'm sure Jeremy could help with that; note though that delete and page down have the dual functions of toggling the HUD element visibility and selecting which MFD is the active one).
blue_max wrote:
Sun Mar 22, 2020 6:07 am
Would you know where XWA stores the HUD visibility flags? Somewhere in the PlayerDataTable, perhaps?
Hello,

The variable that define if the HUDs are visible is a byte situated at offset 0x0064 in the player table.

Code: Select all

s_XwaPlayers[playerIndex].IsHudVisible
/* 0x0064 */ byte IsHudVisible ;
The variable that define if the left MFD is visible is a byte situated at offset 0x0067 in the player table.

Code: Select all

!KEY_DELETE!169 Delete Toggle left MFD
Key_DELETE
s_XwaPlayers[playerIndex].IsHudMfd1Visible
/* 0x0067 */ byte IsHudMfd1Visible ;
The variable that define if the right MFD is visible is a byte situated at offset 0x0068 in the player table.

Code: Select all

!KEY_PAGEDOWN!173 PageDown Toggle right MFD
Key_NEXT
s_XwaPlayers[playerIndex].IsHudMfd2Visible
/* 0x0068 */ byte IsHudMfd2Visible ;
The variable that define if the left sensor/indicator is visible is a byte situated at offset 0x005B5338.

Code: Select all

!KEY_INSERT!168 Insert Toggle Left Sensor/Shield Indicator
Key_INSERT
byte s_V0x05B5338 = (byte)0x01;
The variable that define if the right sensor/indicator is visible is a byte situated at offset 0x005B533C.

Code: Select all

!KEY_PAGEUP!172 PageUp Toggle Right Sensor/Beam Indicator
Key_PRIOR
byte s_V0x05B533C = (byte)0x01;
The variable that define if the center indicators are visible is a byte situated at offset 0x005B5340.

Code: Select all

!KEY_HOME!170 Home Center indicators
Key_HOME
byte s_V0x05B5340 = (byte)0x01;
The variable that define if the toggle CMD is visible is a byte situated at offset 0x005B5334.

Code: Select all

!KEY_END!171 End Toggle CMD
Key_END
byte s_V0x05B5334 = (byte)0x01;

User avatar
keiranhalcyon7
Lieutenant JG
Posts: 599
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Sat Mar 28, 2020 9:55 pm

Thanks, Jeremy!

Huh, strange that some are in the player data table and others are global. I know that the MFDs have slightly more complex handling than the others, but still.

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Sat Mar 28, 2020 11:01 pm

Wow, thanks Jeremy! So... keiranhalcyon7, could you please remind me what was your idea regarding HUD visibility and DC? I might as well revisit that.

User avatar
keiranhalcyon7
Lieutenant JG
Posts: 599
Joined: Tue Jan 02, 2018 6:41 am

Post by keiranhalcyon7 » Sun Mar 29, 2020 12:23 am

The idea is to enable the six original HUD visibility control keys to appear to retain their functions, while under the hood all the HUD elements are always drawn so that they can be copied to the cockpit textures. The simplest implementation would probably be to check these variables each frame, and whenever you see one set to off, set it back to on and toggle the corresponding erase region. This may lead to single-frame flickers upon toggle, depending on the timing of events, but I think that would be acceptable. Then, you could use the per-craft files to set the initial states, and perhaps even save the last state at mission end back to the craft file.

User avatar
GavUK
Cadet 3rd Class
Posts: 27
Joined: Fri May 01, 2015 7:49 pm

Post by GavUK » Sun Mar 29, 2020 1:36 am

DTM wrote:
Thu Mar 19, 2020 7:35 pm
It is not easy to realize how much XWA has changed over the years. This comparative video can give us a precise idea of all the improvements. Some of the things you see are an anticipation of what will be available in a very short time. Good vision!

https://youtu.be/9BBFVMD-PrU
WOW... that video was amazing... it's like a completely new game that's been built from the ground up... Cannot wait to have mine look as good as that....

User avatar
blue_max
XWAU Member
Posts: 2295
Joined: Wed Mar 20, 2019 5:12 am

Post by blue_max » Sun Mar 29, 2020 7:10 am

darklord wrote:
Fri Mar 27, 2020 4:03 am
could we put all these patches in a single thread on the first post? Preferably a sticky?
Sorry about that. This is pretty much my fault. I used to have one thread; but it got lost. However, DTM and Jeremy are helping me create some very cool installers. I'll post these installers on a separate thread and ask the admins to make it sticky.

User avatar
haui
Cadet 1st Class
Posts: 122
Joined: Mon Apr 15, 2019 9:29 am
Contact:

Post by haui » Fri Apr 03, 2020 7:16 pm

unbelivable what you have done. Thank you for all your work.
I play this game now over 20 years and it is getting better and better :D
It's better to burn out than to fade away .

Gringlas
XWAU Member
Posts: 1289
Joined: Mon Oct 30, 2000 12:01 am
Contact:

Post by Gringlas » Wed Apr 15, 2020 1:26 pm

Holy shit guys. This looks totally freaking awesome! As soon as I'm back from work I will install the game again. :shock:

Post Reply