1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-02 00:42:33 +01:00
Commit Graph

1244 Commits

Author SHA1 Message Date
darkf
c08342f1f7 Add FindFFmpeg.cmake 2017-09-16 19:50:51 +01:00
Filip
8b067f4f69 Replacing "new" operators with make_unique/shared (#306)
* Replace "new" operator with std::make_unique for BS in BinaryStream.cpp

* Replace "new" operator with std::make_unique for textureArchive in TextureArchive.cpp

* Replace "new" operator with std::make_unique for variables in LoaderIDE.cpp

* Addition constructor for InstanceData

* Replace "new" operator with std::make_shared for instance  in LoaderIPL.cpp
2017-09-12 02:00:03 +01:00
Daniel Evans
b7ae0a54e4 Fix unused variable warning in rwengine 2017-09-12 01:44:22 +01:00
Aldoxtor
7a8c602c75 add missing override 2017-09-12 01:40:31 +01:00
Aldoxtor
fd5acc2be2 fixing magic numbers in playAnimation() 2017-09-12 01:35:24 +01:00
Anonymous Maarten
17bfa2cf74 rwengine: check for valid reads in DAT readers (in debug mode) 2017-09-12 00:55:41 +01:00
Anonymous Maarten
2e62a115bd rwengine: Ignore lines in DAT files starting with '*'
Last line starts with asterisk and would cause an uninitialized
DynamicsObjectDataPtr object to be inserted.
2017-09-12 00:55:41 +01:00
Anonymous Maarten
3488baae18 rwengine: Do not copy EndOfArgList to locals of created thread
integerValue RW_ERRORs for non-integer types
2017-09-12 00:55:41 +01:00
Anonymous Maarten
4700adb8c0 rwengine: std::map::end returns an iterator to the past-the-end element
Use std::map::rbegin instead
2017-09-12 00:55:41 +01:00
Anonymous Maarten
692ba92167 rwengine: extracting a float from a stream does not extract the f suffix
On Visual Studio 2017

std::istringstream ss("0.4f,0.8f,");
float f1, f2;
ss >> f1;          /* Will leave the f suffix available on the stream. */
ss.ignore(2, ','); /* Ignore until the comma. */
ss >> f2;
...
2017-09-12 00:55:41 +01:00
Anonymous Maarten
06c0f58ae8 config: add test about non-existing configuration directory 2017-08-15 15:58:01 +01:00
Anonymous Maarten
0308f809d6 config: Add the unknown keys to the what() message 2017-08-15 15:58:01 +01:00
Anonymous Maarten
a92f24cbb4 config: unknown data will be kept in memory and saved onto disk 2017-08-15 15:58:01 +01:00
Anonymous Maarten
7a86c199b0 tests: only include GameConfig.hpp in source file (no header file)
This reduces compile time from 1m19s to 9s when touching GameConfig.hpp.

(Executed from rwgame/build/tests)
before:
$ make >/dev/null
$ touch ../../rwgame/GameConfig.hpp
$ time make>/dev/null

real	1m18.643s
user	1m13.069s
sys	0m5.266s

after:
$ make >/dev/null
$ touch ../../rwgame/GameConfig.hpp
$ time make>/dev/null

real	0m9.247s
user	0m8.374s
sys	0m0.836s
2017-08-15 15:58:01 +01:00
Anonymous Maarten
b1976fbcf2 tests: test_globals.hpp has a dependency on boost/test/unit_test.hpp 2017-08-15 15:58:01 +01:00
Anonymous Maarten
9e9e684a44 tests: only include test_globals.hpp when needed 2017-08-15 15:58:01 +01:00
Filip Gawin
9e20ad6c20 ‘ObjectRenderer::m_errorTexture’ will be initialized after [-Wreorder] 2017-08-03 11:52:24 +01:00
Filip Gawin
950a83d4ba removing warning: ‘VehicleObject::mHasSpecial’ will be initialized after [-Wreorder] 2017-08-03 11:52:24 +01:00
tsjost
45814cce07 Merge pull request #296 from ShFil119/patch-3
Replace manual radian conversion with glm's function
2017-07-26 00:34:22 +02:00
ShFil119
d08c2686e1 Replace manual conversion with glm's function
Glm allows to use angle manipulation functions. One of them is conversion degrees to radians.
It gives optimal precision and isn't strictly connected with float.
https://glm.g-truc.net/0.9.4/api/a00136.html#ga4fb76e28851c9ff6653532566084e091
// Please close https://github.com/rwengine/openrw/pull/295 New pull request prevents trash in history, and it's easier to read.
2017-06-18 18:10:46 +02:00
Aldoxtor
963f490cf0 small clean up 2017-04-21 20:24:32 +01:00
Aldoxtor
81734ae2fe initialize some variables in constructor 2017-04-21 20:24:32 +01:00
Aldoxtor
4fdf3a2280 add missing headers 2017-04-21 20:24:32 +01:00
vflyson
79bdd78952 Implement in-car perks 2017-03-15 21:41:39 +00:00
vflyson
a0beb47c5d Prevent Rhino's front wheels from changing steering angle 2017-03-13 22:15:22 +00:00
vflyson
57ad566681 improve the ammo count display logic 2017-03-13 19:15:15 +00:00
vflyson
87fb087485 only allow to scroll through weapons if alive 2017-03-13 19:15:15 +00:00
Daniel Evans
cf767d161f Use the correct animation group for each character 2017-03-03 20:31:57 +00:00
Daniel Evans
974d7e826a Use AnimCycle IDs instead of Animation* in CharacterController 2017-03-03 20:31:57 +00:00
Daniel Evans
adb0214351 Add interface for using AnimCycle in CharacterObject 2017-03-03 20:31:57 +00:00
Daniel Evans
4644c60c17 Replace AnimGroup implementation with animation table 2017-03-03 20:31:57 +00:00
Daniel Evans
a59fb1ae56 Extract AnimGroup to own header and cleanup 2017-03-03 20:31:57 +00:00
Anonymous Maarten
d8cda62668 config: fix input string parsing 2017-02-20 01:01:30 +00:00
Anonymous Maarten
9cf939433c tests: set the test module name to openrw 2017-02-20 01:01:30 +00:00
Anonymous Maarten
e28e429b86 rwgame+config: show an error dialog when an error occurred on parsing the config file 2017-02-20 01:01:30 +00:00
Anonymous Maarten
76f2665acf config: log parsing Errors to a ParseResult object (which is queryable) 2017-02-20 01:01:30 +00:00
Anonymous Maarten
e0813e4378 config: fix TempFile.touch() + TempFile test + extra doc of getValidConfig 2017-02-20 01:01:30 +00:00
Anonymous Maarten
90001b11ac config: fix reading of illegal values
The parser would crash when trying to convert e.g. "d" to an integer.
2017-02-20 01:01:30 +00:00
Anonymous Maarten
fe156e2984 config: bail out on invalid values
Avoid srcTree being filled with un-initialized values
such as bools, ints, floats...
2017-02-20 01:01:30 +00:00
Anonymous Maarten
66b09a64a5 config: added default INI string test + simplified tests + removed WTF 2017-02-20 01:01:30 +00:00
Anonymous Maarten
8f5664498c config: saveConfig + tests added 2017-02-20 01:01:30 +00:00
Anonymous Maarten
ed185f2526 config: add tests on reading good and bad configuration files 2017-02-20 01:01:30 +00:00
Anonymous Maarten
1dc06d9a35 config: do not use dynamic memory + bail out early on error 2017-02-20 01:01:30 +00:00
Anonymous Maarten
05db65dbbc config: allow reading INI from string, file, default and current config
This (slightly more complicated implementation) allows us,
once a configuration menu has been implemented,
to store the current/new configuration to a INI file.

The definitions of the parameters in rwgame/GameConfig.cpp
is limited to one location.
2017-02-20 01:01:30 +00:00
Anonymous Maarten
a725a51baa spelling: recieve -> receive 2017-02-20 01:01:30 +00:00
Anonymous Maarten
65b14fcb9c config: use boost::property_tree for INI read and default generation
* remove inih
* input.invert_y has now behavior as described on wiki
2017-02-20 01:01:30 +00:00
Anonymous Maarten
7bc501106c cmake: cmake does not fail when libmad-devel is not installed 2017-02-20 01:01:30 +00:00
Anonymous Maarten
d2b706b874 tests: added test for comments in INI files
tests: test whitespaces and comments handling in config unit test
2017-02-20 01:01:30 +00:00
Daniel Evans
aec738c396 Remove un-needed assert in WaterRenderer
Values above height count are valid and indicate water disabled.
2017-02-19 01:51:01 +00:00
vflyson
aa8ea65f92 properly display the ammo count for weapons which don't have a clip 2017-02-19 00:57:30 +00:00