Commit Graph

77 Commits

Author SHA1 Message Date
Mat Sutcliffe
ced60a4768 Issue #79 Path elements below the root are no longer salient in xpmp2 2020-08-21 18:54:28 +01:00
Mat Sutcliffe
3ea0c7f2a5 Issue #17 Report errors for unsupported CSL formats 2020-08-10 22:02:24 +01:00
Mat Sutcliffe
5548d8af2d Issue #17 Udjust to model string changes in xplanemp2 2020-08-02 23:01:30 +01:00
Mat Sutcliffe
670b1a1986 Fix cppcheck and compiler warnings 2020-06-29 18:34:16 +01:00
Mat Sutcliffe
78987a678f Suppress Qt 5.15 deprecation warnings 2020-06-29 18:34:14 +01:00
Klaus Basan
386a0ccd5d [XPlane] Model set must not contain ACF models
Discussion: see https://discordapp.com/channels/539048679160676382/539064750055751690/648974956306366499
2020-01-07 19:57:22 +00:00
Roland Rossgotterer
e8b14c435f Check that X-Plane OBJ8 file exists 2019-09-16 22:41:33 +01:00
Klaus Basan
7b8db694cc Use BLACK_AUDIT_X because this is a check for external data 2019-09-16 22:41:31 +01:00
Klaus Basan
ab281649f8 Minor improvements for XP model loader, file path concatenation 2019-09-16 20:29:59 +01:00
Klaus Basan
d59e1c3332 Style 2019-09-16 20:29:56 +01:00
Roland Rossgotterer
013bd08b5f Fix segfault when a parser error occurred before any parsed CSL plane 2019-05-16 10:12:51 +02:00
Mat Sutcliffe
9c07326462 Treat an OBJ8_AIRCRAFT command with too many arguments as merely a warning.
The aircraft can still be successfully loaded.
2019-05-13 11:21:06 +02:00
Roland Rossgotterer
267a9720da Don't skip CSL package parsing after an error occurred
Summary:
This patch fixes X-Plane CSL package parsing to no longer skip the rest
of the package when an error occurred. Instead CSL planes are marked
having errors and are removed after the full package has been parsed.

Reviewers: #gatekeepers, msutcliffe

Reviewed By: #gatekeepers, msutcliffe

Maniphest Tasks: T616

Differential Revision: https://dev.swift-project.org/D101
2019-05-13 11:20:46 +02:00
Mat Sutcliffe
e9a4c49d68 Ref T547 Update license masthead in all source code files. 2019-02-22 20:36:43 +00:00
Klaus Basan
02f638501e Ref T529, model loader improvements
* XP loader improved progress messages
* added LoadingFailed
* use "Qt::QueuedConnection" for CMultiAircraftModelLoaderProvider

In some cases the loading progress signal was not send properly changing to Qt::QueuedConnection has solved the issue
2019-02-22 20:36:06 +00:00
Klaus Basan
001d90bd6b Ref T529, using sort order in model loader 2019-02-22 20:36:04 +00:00
Mat Sutcliffe
fe7a45afcf Ref T516 Update CStatusMessage call sites to use new syntax. 2019-02-22 20:35:51 +00:00
Roland Rossgotterer
6aa1402303 Improve XP model loader messages
Change the severity to Error for parser errors and raise a prominent popup with all collected issues.
Also be more explicit from which file and line the error came from.

Maniphest Tasks: T462
2019-02-22 20:35:51 +00:00
Roland Rossgotterer
6ea8d16460 Fix CAircraftModelLoaderXPlane::performParsing to accept multiple dirs
This implements an old todo from KB.
2019-02-22 20:35:50 +00:00
Roland Rossgotterer
5181855b59 Update loading progress while parsing X-Plane models
Maniphest Tasks: T517
2019-02-22 20:35:50 +00:00
Mat Sutcliffe
225ff81252 Ref T485 Adjust CLogMessage and CStatusMessage call sites to use the new API. 2019-02-22 20:34:55 +00:00
Mat Sutcliffe
ace7650ebe Ref T480 No need for QStringLiteral when concatenating with %, use UTF-16 string literals. 2019-02-22 20:23:46 +00:00
Mat Sutcliffe
268d858e2d Parse errors in CAircraftModelLoaderXPlane should be errors, not warnings. 2019-02-22 20:23:32 +00:00
Roland Winklmeier
dbbc459dbc Add X-Plane object version into the model description 2018-09-12 17:01:47 +02:00
Roland Winklmeier
01779183c4 Don't set distributor from CSL package name
That is almost always wrong.
2018-09-12 17:01:46 +02:00
Roland Winklmeier
d682df243a Fix loading of older OBJ8 CSL modelsets
- Fix support for older modelsets not using the texture for OBJ8 feature
- Small error when xsb_aircraft.txt was outside the object folder

ref T326
2018-09-12 17:01:45 +02:00
Roland Winklmeier
a19ccabf35 Refactor shared X-Plane model parser in common header only functions
ref T290
2018-08-24 21:27:00 +02:00
Klaus Basan
2838e90e75 Ref T292, Ref T285 XPlane loader to set file timestamp correctly 2018-07-26 04:32:39 +02:00
Klaus Basan
a6ee6d4b72 Ref T292, Ref T285 minor style improvements, renamings 2018-07-26 04:32:38 +02:00
Klaus Basan
74fa7d7289 Ref T292, Ref T285 signal when "real" loading was started (loading from disk) 2018-07-25 02:37:13 +02:00
Klaus Basan
f36ebbfa83 Doxygen and style 2018-07-25 02:37:12 +02:00
Klaus Basan
40c0c6ae35 Ref T292, adjusted the specific model loaders
* no longer using "std::unique_ptr"
* QObject parent
* Style
2018-07-25 02:36:55 +02:00
Klaus Basan
76334b75d1 Ref T246, model loader improvements / renamings 2018-07-17 19:04:55 +02:00
Roland Winklmeier
2ab6a96d57 Adapt to libxplanemp improvements
* XPMPMultiplayerInit API change
* New CSL command 'VERT_OFFSET'
* OBJ8 objects can have multiple textures now. Therefore use the same model
name convention as with OBJ7.
2018-04-05 02:52:24 +02:00
Klaus Basan
640ec3a573 Ref T252, send all loading status messages as list 2018-02-22 01:26:23 +01:00
Klaus Basan
1970ae9f9b Ref T252, formatting 2018-02-16 12:13:50 +01:00
Klaus Basan
e9e0ae1ff4 Ref T241, Ref T243 formatting and minor tweaks
* unified how we write thread_local const
* ASSERTs
* formatting
2018-02-04 08:53:48 +01:00
Klaus Basan
2f0253b3eb Ref T118, support multiple model directories
* this was recently discussed https://swift-project.slack.com/archives/C04J6J76N/p1508430536000065
* for config parser already implemented
* for XP the loading from multiple dirs still needs to be implemented (see todo)
2017-10-31 15:39:15 +01:00
Klaus Basan
e920dc77b8 Ref T118, formatting 2017-10-31 15:39:12 +01:00
Klaus Basan
65bc1c00fb Formatting, "this->m_" to "m_", comments 2017-09-24 20:29:09 +01:00
Mathew Sutcliffe
bc80fd3bd5 [feature][XPlane] Set own aircraft model string when own aircraft changes.
Summary:
Refactored parts of CAircraftModelLoaderXPlane::parseFlyableAirplanes into static method extractAcfProperties that can be called by xswiftbus.

Used extractAcfProperties in xswiftbus to provide the model string to the driver. Implemented CSimulatorXPlane::ps_emitOwnAircraftModelChanged.

Implements T74.

Reviewers: rwinklmeier

Reviewed By: rwinklmeier

Subscribers: jenkins

Tags: #swift_pilot_client

Differential Revision: https://dev.swift-project.org/D23
2017-05-14 17:21:39 +01:00
Mathew Sutcliffe
183d3f58e7 X-Plane model loader: fixed malformed model strings with spurious multiple liveries.
Each livery was being appended to the model string of the previous livery model.
Reported by Alex Beavil.
2017-05-07 21:52:14 +01:00
Mathew Sutcliffe
b1e57e28d0 Fixed QVector out-of-bounds assert in X-Plane model loader. 2017-05-06 20:22:46 +01:00
Klaus Basan
c3ed0bc394 Ref T28, removed areModelFilesUpdated and info if loading was from cache
* removed CacheUntilNewer
* did not really work and had some problems
* cache timestamp not really a good value to compare with
* too slow with remote file
2017-05-05 23:08:04 +01:00
Mathew Sutcliffe
816f3bd48e New X-Plane flyable plane model string schema
Summary:
New aircraft for XP11 should include a name, author, and studio. These can be used to generate a better model string that doesn't depend on file or directory names.

If the `.acf` contains studio, this is used as the distributor. Otherwise, we use author as distributor instead (truncated in case it is a long list of names).

Then the model string is constructed by combining distributor and model name. If the model name already contains the distributor, we just use the model name.

If the name and distributor are missing, we fall back to the old scheme based on `.acf` filename and dirname.

I have also added a space between aircraft and livery. And I have added default description strings.

After this has landed and been deployed to users, we will need to remove all flyable X-Plane planes from the database and start again with them. (These are the excluded ones.) And we can't accept mappings that use the fallback old scheme if the submitted has renamed the `.acf` file or directory name.

Reviewers: rwinklmeier, kbasan

Reviewed By: kbasan

Subscribers: jenkins

Tags: #swift_pilot_client

Differential Revision: https://dev.swift-project.org/D16
2017-05-05 23:07:28 +01:00
Mathew Sutcliffe
fbc9c37646 X-Plane model loader: performance tweaks.
Summary:
Using `QStringRef` and `QLatin1String` to avoid unnecessary allocations and conversions.

Depends on D12.

Reviewers: rwinklmeier, kbasan

Subscribers: jenkins

Tags: #swift_pilot_client

Differential Revision: https://dev.swift-project.org/D13
2017-05-05 23:07:27 +01:00
Mathew Sutcliffe
4e23cd1382 X-Plane model loader: support extra properties of .acf files
Summary:
There are optional fields in an X-Plane flyable aircraft that we can use if they are present:

* Description
* Name
* Distributor

If not present, the user has to edit them manually.

@kbasan Any problem with constructing a `CDistributor` with empty db key?

Reviewers: rwinklmeier, kbasan

Reviewed By: rwinklmeier

Subscribers: jenkins, kbasan

Tags: #swift_pilot_client

Differential Revision: https://dev.swift-project.org/D12
2017-05-05 23:07:25 +01:00
Mathew Sutcliffe
4a4dea8d4d Rename xbus to xswiftbus
Summary:
I wanted to rename xbus because its relation to //swift// is not immediately clear from the name.

xswiftbus seems reasonable.

Reviewers: #swift_pilot_client, kbasan

Reviewed By: kbasan

Subscribers: kbasan, jenkins

Tags: #swift_pilot_client

Differential Revision: https://dev.swift-project.org/D14
2017-05-05 23:07:11 +01:00
Mathew Sutcliffe
fce1513dae refs #937 Resolved clazy warnings: unnecessary detaching of containers. 2017-04-19 19:31:38 +01:00
Mathew Sutcliffe
488f42b0a1 refs #928 Parse and load OBJ8 CSL packages. 2017-04-19 19:31:33 +01:00