This in-game download manager allows users to fetch assets, such as
cars, tracks or drivers, from a configurable list of servers following a
specific JSON schema.
Several smaller classes have been designed to assist the download
manager:
- entry: defines an entry in the assets lists and its state.
- thumbnail: defines a visible entry on the list, will always match
one entry.
- writebuf: allows dumping a file downloaded over HTTP{S} to memory.
- writefile: allows dumping a file downloaded over HTTP{S} to a file.
- unzip: a higher-level, C++ wrapper to minizip.
It was also required to implement a function that removed directories
recursively, namely rmdir_r. Since this is not portable accross POSIX
and Windows systems, their respective implementations have been provided
on src/libs/portability.
The following dependencies have been added:
- libcurl: HTTP{S} operations, already required by webserver.
- OpenSSL: hash calculation.
- minizip: zip extraction, it required its on Findminizip.cmake as it is
not provided by upstream CMake.
- zlib: required by minizip.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9490 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: 915908c54f5ea8d7f6926943b2fea670e9973bea
Former-commit-id: 9cb2a8874779f6b4d9d6201f3d8af8b29c067a13
The JSON schema provides a machine and human-readable specification of
the assets lists that implementors must follow so that Speed Dreams can
fetch them. An example JSON file has also been provided.
Run check-jsonschema(1) to test an assets JSON file. It can be
downloaded via `pip install check-jsonschema`.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9489 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: bff0b86104dfe3e88896e1d5bfcfa35be2008265
Former-commit-id: e830b70b32d944c24515452ebd76f0dfdb0a6860
Future commits will make use of C++11 features.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9488 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: f05b17bcd17f756665d440da4ed8c29a61ca9785
Former-commit-id: 459a21a593e3a2e129a7a1aa08b2cabd45931780
For some unknown reason, labels could not have their text reassigned to
a longer text, being limited to the length of the first text that was
ever assigned to it.
This seems like an arbitrary limitation that does not introduce any
regressions, so it is probably reasonable to remove it.
Additionally, future commits will make use of labels whose text could be
reassigned several times.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9487 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: 2536884b05c76ec5788ef59fc8556cc5a9fe3705
Former-commit-id: 2deec2b67b979e173b4f878dbed1811ebdde475e
There is no actual reason why the path length ought to be limited to
1024 bytes. Since strPath was already a std::string, it made sense to
use to concatenate all tokens with it and use c_str instead.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9486 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: 1ffcb2a1e6b949ce31ddc3466921997b38855f44
Former-commit-id: 1a0565184bdc86ad5c7fd10f1db29b08ae000953
This will be used by future commits.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9485 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: 45f75ac5601b75d4b9abd1d6962dd2144fc20005
Former-commit-id: 1191050c84198aae6f224c7b50eecad6a10fde7b
This new configuration can be adjusted from the display configuration
screen and allows to cap maximum fps so that CPU load is greatly
reduced, especially on menu screens.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9484 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: b63c4a7c907bbfb3fc8d44a6a77c7c1948341174
Former-commit-id: c331b396c32d1fd7d57b17ab880f44b808e12088
Attempting to call isprint(3) for values not representable on an
unsigned char or different than EOF is undefined behaviour
according to the C standard.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9456 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: 2f8d96956ce4b905564c50460092bb265b42a598
Former-commit-id: 8dbc4cfec2603def878794227f621102c7e6e13c
Also, workaround fix for some cars (mainly LMP1 cars) not being able to pit in narrow pit spaces (eg. LongDay/LongJour) due to not having enough time to slow down and enter their box.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9443 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: af96d1d94e13e9e31c411bbd445492cf4a2892ee
Former-commit-id: 4d5dc7ab8ee3efb5ca6b3bb8f527a0e02ee69f3b
As its name suggests, this class allows to perform minor optimizations
to the scene graph, resulting on small frame rate improvements.
That said, this class is meant as a compromise for overly complex scene
graphs that should be optimised properly instead.
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@9441 30fe4595-0a0c-4342-8851-515496e4dcbd
Former-commit-id: 7322252a1d7aa782b6a4b64e8a79178fa5b3afe1
Former-commit-id: 8cac406ace350cfbedc99b700f3a6e4c29414e67