Source Code Update

Eggheads talking about bytes and stuff.
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

Re: Source Code Update

Post by Krishty »

The repository has been force-pushed to a new version. git pull --rebase is required.

This update brings the new wheel simulation and a bugfix:
  • New Wheel Simulation
    Now modelling angular momentum of the wheel, as well as slip between contact patch and surface.
     
  • Fix External View
    The camera is no longer too far away when pressing F6.
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

Re: Source Code Update

Post by Krishty »

The repository has been force-pushed to a new version. git pull --rebase is required.

This update fixes several dozen code problems like variable overflows, underflows, misalignments, and invalid bit shifts. These were mostly found by Clang + Undefined Behavior Sanitizer during my build system preparations. The only visible change is that it fixed the scroll bar with empty mission briefings.

Like always, most of the fixes have time-travelled back to the commit that introduced them, hence the need for pull-with-rebase.
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

Re: Source Code Update

Post by Krishty »

The repository has been force-pushed to a new version. git pull --rebase is required.
  • New Build System
    TFXplorer can now be built without Visual Studio. It can still be built/debugged from Visual Studio, but you need to click slightly different buttons. Details in the thread.
     
  • New API
  • Improve extension bug checks
  • Add ability to deactivate extensions
    I wish the API was complete, but it’s not. Yet, it’s a vast leap forward. Documentation to follow. This fixes the catastrophic bug when mixing extensions, e.g. EF2000 terrain with TAW planes and will allow for a plane selection screen in the future.
     
  • Re-organize extensions TFX3, TFX3 F22, TFX KC135, and TFX to UAW into DIDtoUAW EF2000 and DIDtoUAW F22
    We now have all TFX3 stuff in one extension and all TFX2 stuff in another. That makes it much easier for me, especially with the Ace Combat 3 extension underway. The new extemsions need different registry keys to run; docs incoming.
     
  • Add new sound API
    This is oriented heavily towards the engine API. Performance and implementation are still crap, but now I can refactor it without breaking TAW stuff.
     
  • Add support for spatial non-looped sound
     
  • Add ability to disable depth buffering
    Important to fix cockpit overdraw problems with TAW’s F-22 (also introduces new ones because fml).
     
  • Add second horizon color
     
  • Fix F-22 Draw Distance
    This, btw, also increases the draw distance for all TFX shapes after thoroughly comparing with ADF/TAW.
     
  • Move traffic routes to API
    Formerly, all traffic was hard-coded. Now we can have different traffic for each level, and extensions have control over the vehicles that spawn there. This enables us to place ships/trains in AC3, and different ones in TAW.
     
  • Improve contrail rendering performance
  • remove legacy contrail rendering
    We now have dynamic contrails in F-22 detail for all planes. You can’t see while the planes just move in straight lines, but they’re there …
     
  • Change API coordinate system
    Makes it easier to create terrain. I noticed with AC3 that my obsession with very complex fixed-point types was reeeally annoying. It’s much simpler now; you just pass three doubles in North-East-Down convention.
     
  • remove AGP/D3D toggle
    It’s not removed per se; it has moved from TFXplorer core to the DID f22 extension.
     
  • Fix vehicle sound crash when leaving range of sight
  • Fix compiler warnings
  • Fix undefined behavior
  • Improve vehicle data handling towards ECS to allow more vehicles
  • Move vehicle debris to API
  • remove legacy Win32 window wrapper
  • Add limited Linux support
  • Win32 cursors are now “const”-correct
    Just programming stuff
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

Re: Source Code Update

Post by Krishty »

The repository has been force-pushed to a new version. git pull --rebase is required.
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

Re: Source Code Update

Post by Krishty »

The repository has been force-pushed to a new version. git pull --rebase is required.
  • Restore Particles
    This brings the new particle system and improved craters. An update I like a lot; it really adds to the tiny bit of gameplay we have 🙂
     
  • GUI: Fix Loading Page on Error
    The layout was not updated after the error message was revealed.
     
  • GUI: Update Credits
    Added DSXIII because he lets me use his AC3 translation.
     
  • Code: Fix Typos; Improve Comments
    Code: Remove Redundant Expression
    Just a bit of cleanup.
     
  • Remove Dead EF2000 Target Code
    Since buildings don’t work without EF2000 providing the TARGETS block in its supershapes, that code has been removed from the DIDtoUAW EF2000 extension. The removal has been retroactively applied to the initial commit.
     
  • Code Enhancements
    Whitespace fixes; typos; duplicate semicolons; useless function calls. These fixes have been retroactively applied to the commits that originally introduced the original issues.
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

Re: Source Code Update

Post by Krishty »

The repository has been force-pushed to a new version. git pull --rebase is required.
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

Re: Source Code Update

Post by Krishty »

The repository has been force-pushed to a new version. git pull --rebase is required.
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

Re: Source Code Update

Post by Krishty »

The repository has been force-pushed to a new version. git pull --rebase is required.
  • Fix Debugger Configuration
    This prevented us from using stuff like Edit & Continue and data breakpoints during debugging.
     
  • Fix Typo
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

Re: Source Code Update

Post by Krishty »

The repository has been force-pushed to a new version. git pull --rebase is required.
  •  API: Terrain API Refactoring
    • unified North-East-Down coordinate space for terrain & scenarios
    • coherent naming of data structures
    • this pointer coherently as first parameter for interfaces
    • API interface coherently next parameter
    • replaced legacy tile IDs with tile indices
    • re-grouped functions
    • improved comments
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

Re: Source Code Update

Post by Krishty »

The repository has been force-pushed to a new version. git pull --rebase is required.
  • Improve Two Horizon Colors
    Makes the colors more appealing by interpolating in sRGB color space.
     
  • Add Horizon Curvature
     
  • Improve Scenario Data Handling in Terrain API
    More type safety and improved separation of concerns.
    Caution: Breaking change! Change the signatures of prepareScenarioRendering() and getScenarioSkyColors():

    Code: Select all

    void UAW_CALL prepareScenarioRendering(
    	void *                    extensionData,
    	UAW_API_TerrainGraphics * uaw,
    	UAW_Clock                 utc
    )
    is now

    Code: Select all

    void UAW_CALL prepareScenarioRendering(
    	UAW_Extension_Scenario * extensionData,
    	UAW_Clock                utc
    )
    and

    Code: Select all

    void UAW_CALL getScenarioSkyColors(
    	UAW_Extension_Terrain const * terrain,
    	void const *                  extensionData,
    	UAW_Scenario_SkyColors *      result,
    	UAW_Clock                     utc
    )
    has become

    Code: Select all

    void UAW_CALL getScenarioSkyColors(
    	UAW_Extension_Scenario const * scenario,
    	UAW_Scenario_SkyColors *       result,
    	UAW_Clock                      utc
    )
  • Use NED in Terrain Collisions
     
  • GUI: Add Hardware Transform & Lighting for Dynamic Contrails
    ~7 % performance improvement in Red Sea.
     
  • Remove Dead Code
     
  • GUI: Fix HID Enumeration
    Fixes a crash with Clang.
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

Re: Source Code Update

Post by Krishty »

The repository has been force-pushed to a new version. git pull --rebase is required.
  • Remove TFX1 Workaround from TFX3 Rendering
    A tiny performance improvement
     
  • Terrain API Overhaul
    More uniform behavior for data types (regarding lifetime management and names). It was urgent because I myself did not understand which void * denotes global data and which one doesn’t.
    Furthermore, we want to be able to quit a scenario and select a different one in the future, which requires these changes to lifetime management.
    I hope this is the last change to documented parts of the API. Documentation and samples have just been updated.
Here’s what needs to be done to existing code (delete lines starting with minus and add those starting with plus):

Code: Select all

 // Returns a string in UAW’s current language.
 UAW_Char const * UAW_CALL stringFromStringID(
-	void *                 extensionData, // explained later
+	UAW_Extension const *  extension, // explained later
 	UAW_Extension_StringID id
 ) {

Code: Select all

 UAW_Extension_Terrain * UAW_CALL loadTerrain(
-	void *                      extensionData,
+	UAW_Extension *             extension,
	UAW_API_TerrainLoad *       uaw,
	UAW_Extension_TerrainID     id,
	UAW_Extension_Terrain_API * result
 ) {

Code: Select all

+struct UAW_Extension_Scenario {
+	// empty placeholder
+};
+
+void UAW_CALL destroyScenario(
+	UAW_Extension_Scenario * scenario
+) try {
+	delete scenario;
+} catch(...) {
+}
+
 void UAW_CALL prepareScenarioRendering(
	UAW_Extension_Scenario * extension,
	UAW_Clock                utc
 ) {
	// nothing to do yet
 }

Code: Select all

-int UAW_CALL populateScenario(
-	void *                       extensionData,
+UAW_Extension_Scenario * UAW_CALL createScenario(
+	UAW_Extension *              extension,
	UAW_API_ScenarioPopulate *   uaw,
	UAW_Extension_ScenarioID     id,
	UAW_Extension_Scenario_API * result
-) {
+) try {
	result->prepareRendering = &prepareScenarioRendering; // pass our callback
	result->getSkyColors     = &getScenarioSkyColors;
-	return 1; // success (nothing to do yet)
-}
+	return new UAW_Extension_Scenario{ };
+} catch(...) {
+	return nullptr;
+}

Code: Select all

-	scenario.populate  = &populateScenario; // pass our callback
+	scenario.create    = &createScenario; // pass our callback
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

Re: Source Code Update

Post by Krishty »

The repository has been force-pushed to a new version. git pull --rebase is required.
  • New Input API
    • Settings > Controls > Plane is now fully functional.
    • Settings > Controls > Plane now uses the new layout system. This commit therefore completely removes the legacy layout system.
    • Plane controls can now be re-mapped by users via registry.
    • Vast simplification of vehicle input processing.
    • More efficient Win32 window size event processing.
     
  • Fix Progress Bar Background
    Prevents the background of the bar and the background of the dialog from being identical.
     
  • Fix Check Box Size
    The check box under Settings was not drawn correctly.
     
  • Improve Terrain Drawing Performance
    Barely measurable, but better than nothing.
     
  • Code: Remove Clutter
  • Code: Fix Warning
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

Re: Source Code Update

Post by Krishty »

User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

Re: Source Code Update

Post by Krishty »

The repository has been force-pushed to a new version. git pull --rebase is required.
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

Re: Source Code Update

Post by Krishty »

The repository has been force-pushed to a new version. git pull --rebase is required.
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

Re: Source Code Update

Post by Krishty »

The repository has been force-pushed to a new version. git pull --rebase is required.
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

Re: Source Code Update

Post by Krishty »

The repository has been force-pushed to a new version. git pull --rebase is required.
  • GUI: Remove Snapshots
     
  • EF2000: Add More Hidden Worlds
    This slipped in because it’s too exciting: Tim, World1…4, Angola and Korea at different times of day. (For the latter, search REPETITIVE_SCENARIOS and replace with 1) Improves briefings and re-orders EF2000 scenarios so that the broken/boring ones are at the bottom of the list.
     
  • Fix Contrail Crashes
     
  • F-22: Fix Oscillation at High Speeds
     
  • Fix Wheel Collision at Tile Edges (rebased)
     
  • F22: Spread Out Traffic
     
  • Code: Isolate Scenario; Minor Performance Improvements
    Separates scenario logic from GUI and API, thus reducing compile time. Some minor tweaks in iterating through scenarios and terrain tiles as well as sharing trail animation frames instead of copying them improve performance slightly.
     
  • Remove isNoFlyZone() from terrain API
    Because we never used it anyway. We can put it back when we find proper use.
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

Re: Source Code Update

Post by Krishty »

The repository has been force-pushed to a new version. git pull --rebase is required.
  • EF2000/TAW Terrain Randomization
     
  • TAW: Fix Moving Map Crash
    This is the 3rd or 4th crash introduced by signed integers in the terrain API, and I’m fed up. Well possible a future commit will revert to unsigned coordinates.
     
  • More Legacy EF2000 Scenarios
    If you build with the macro from the previous update enabled, more boring EF2000 worlds get listed. I needed this to enumerate the files but figured it would be useful anyway.
User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

Re: Source Code Update

Post by Krishty »

User avatar
Krishty
Site Admin
Posts: 1364
Joined: 2022-Jan-09, 00:59

Re: Source Code Update

Post by Krishty »

The repository has been force-pushed to a new version. git pull --rebase is required.
Post Reply