1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-09-18 16:32:32 +02:00
Commit Graph

1080 Commits

Author SHA1 Message Date
Filip Gawin
3821244c95 Use lambda for removing VisualFX 2018-09-19 22:02:16 +01:00
Anonymous Maarten
d06d4fc264 rwengine: use applyOffset 2018-09-16 01:14:11 +02:00
Anonymous Maarten
40575e79b6 rwengine: pass const glm::vec's to constructors 2018-09-16 00:53:18 +02:00
Anonymous Maarten
e873f826fc rwengine: remove errorTexture from Game- and ObjectRenderer 2018-09-16 00:53:18 +02:00
Anonymous Maarten
9189a02860 rwengine: remove unused private field 2018-09-16 00:53:18 +02:00
Anonymous Maarten
0b8bc41fa7 all: fix 'warning: missing braces around initializer' 2018-09-16 00:53:16 +02:00
Anonymous Maarten
32d3ab7508 rwengine+tests: disable C4305 warning for bullet3
warning C4305: 'argument': truncation from 'double' to 'const btScalar'
2018-09-16 00:52:41 +02:00
Anonymous Maarten
7bea25e487 rwengine: some variables are only used in debug builds
Fixes clang warnings about unused private fields: -Wunused-private-field
2018-09-16 00:52:41 +02:00
Anonymous Maarten
2d595bede7 cmake: add all files to cmake 2018-09-16 00:52:41 +02:00
Anonymous Maarten
2a1163d391 rwgame: fix Visual Studio warnings 2018-09-16 00:52:41 +02:00
Anonymous Maarten
05896caac5 rwengine: fix Visual Studio warnings 2018-09-16 00:52:40 +02:00
mole99
b92f9f059f Implement and use applyOffset() 2018-09-04 00:46:15 +01:00
Daniel Evans
52dbe78b4a
Merge pull request #621 from danhedron/feat/use_microprofile
Use microprofile for profiling
2018-09-04 00:41:01 +01:00
Berk Özkütük
8e2d17d52b Ignore jump input while in airborne state 2018-09-03 20:41:55 +01:00
Daniel Evans
0e098b4fa0
Merge pull request #604 from ShFil119/minor_memory_improvements
Minor memory improvements
2018-09-01 23:55:48 +01:00
Daniel Evans
02b42a8fed
Merge pull request #616 from ShFil119/remove_raw_ptrs_from_objects
Remove raw ptrs from game objects
2018-09-01 23:37:42 +01:00
Daniel Evans
be55b616f7 Add additional profiler scopes for increased resolution 2018-09-01 22:58:25 +01:00
Daniel Evans
14885c24dc Move opengl debuging from RW_PROFILER, it interferes with CPU timing. 2018-09-01 22:58:25 +01:00
Daniel Evans
1efe3840b8 Increase profiler coverage in GameRenderer/OpenGLRenderer 2018-09-01 22:58:25 +01:00
Daniel Evans
080a0fe050 Use microprofile for profiling 2018-09-01 22:58:24 +01:00
Daniel Evans
63a2caa471 Add microprofile to rwengine dependencies 2018-09-01 22:58:24 +01:00
Filip Gawin
1f3462fb3f Use std::make_shared in GenericDATLoader.cpp 2018-09-01 17:50:03 +02:00
Filip Gawin
ffb1092077 Remove raw ptr from DebugDraw 2018-09-01 17:50:03 +02:00
Filip Gawin
4ff4356986 Replace raw ptr from OpenGLRenderer with unique_ptr 2018-09-01 17:50:03 +02:00
Filip Gawin
3ef7570fb5 Replace raw ptr in SCMFile with unique_ptr 2018-09-01 17:50:03 +02:00
Filip Gawin
711fa70950 Remove unneeded dynamic alocation of SCMFile 2018-09-01 17:50:03 +02:00
Filip Gawin
d4061540d0 Use ClumpPtr for clone 2018-09-01 17:49:52 +02:00
Filip Gawin
63ab663ea5 Remove raw ptrs from VehicleObject 2018-08-31 20:04:39 +02:00
Daniel Evans
b9ef99e752 Extract GameRenderer object handling into seperate method 2018-08-30 20:28:10 +01:00
Anonymous Maarten
372381843c rwengine: delete OpenAL buffers and sources before OpenAL shutdown
OpenAL printing
```
AL lib: (WW) FreeContext: (0x614000052440) Deleting 22 Sources
AL lib: (WW) FreeDevice: (0x62d0001f4400) Deleting 22 Buffers
```
at program shutdown is actually a warning that not all sources and
buffers were deleted.

Included suggestions from @ShFil119
2018-08-30 12:05:47 +01:00
Daniel Evans
26398ca636
Merge pull request #603 from ShFil119/sounds_tests
Prepare tests for Sound and SoundBuffer
2018-08-29 20:30:13 +01:00
Filip Gawin
77e0e3a3bc Prepare tests for Sound and SoundBuffer
Also refactored SoundBuffer a bit.
2018-08-29 19:43:18 +02:00
Filip Gawin
fae8f0c1a9 Remove raw ptrs from ProjectileObject 2018-08-28 23:24:57 +02:00
Filip Gawin
70304dd276 Remove raw ptrs from PickupObject 2018-08-28 23:18:27 +02:00
Filip Gawin
071481f617 Remove raw ptrs from CharacterObject 2018-08-28 23:18:20 +02:00
Daniel Evans
2670de509f
Merge pull request #573 from ShFil119/raii_effects
Refactor VisualFX and fix memory leaks
2018-08-28 14:28:55 +01:00
Anonymous Maarten
b10c36e747 rwengine: throw runtime_error on loading illegal font 2018-08-23 16:49:12 +02:00
Anonymous Maarten
804276668b rwlib: enable RW_DEBUG if RW_DEBUG is defined 2018-08-23 15:45:39 +02:00
Anonymous Maarten
014a9b1bda rwengine: enable profiler if RW_PROFILER is defined + RENDER_PROFILER unused 2018-08-23 15:44:39 +02:00
Daniel Evans
7d894b2da5
Merge pull request #600 from danhedron/cleanup/game_renderer
Cleanup Game Renderer
2018-08-23 10:33:46 +01:00
Filip Gawin
3cd9c7722a Reduce number of frames dynamic allocation and fix leak 2018-08-22 20:22:34 +01:00
Filip Gawin
e8fe8b614a Refactor VisualFX and fix memory leaks 2018-08-21 21:51:28 +02:00
Daniel Evans
7b3bc093b3 Use array in place of vector for draw texture state 2018-08-21 19:46:53 +01:00
Daniel Evans
14255e5fe1 Disable depth test for post-process pass 2018-08-21 01:04:04 +01:00
Daniel Evans
34b8976856 Extract common rect rendering code 2018-08-21 01:04:04 +01:00
Daniel Evans
2aa0f3a371 Disable depth test for text rendering 2018-08-21 01:04:04 +01:00
Daniel Evans
c4364d037a Remove OpenGL from rect rendering 2018-08-21 01:04:04 +01:00
Daniel Evans
2e472dd25c Introduce depth test render state 2018-08-21 01:04:04 +01:00
Daniel Evans
7337da3133 Extract fade/splash rendering into its own Method. 2018-08-21 01:04:04 +01:00
Daniel Evans
fada60225c GameRenderer: delete dead code 2018-08-21 01:04:04 +01:00
Daniel Evans
d9255cb5df
Merge pull request #594 from madebr/conan
Conan updates
2018-08-20 22:45:42 +01:00
Filip Gawin
884e035602 Fix opcode_03e5
https://github.com/Lighnat0r/GTA-III-SCM-Converted/blob/master/
02_wanted.sc
As you can see there's no another cleaning functionality,
so 03e5 should clean after itself.
2018-08-15 18:17:31 +01:00
Filip Gawin
37a677802d Fix problem with case sensivity of sfx files name 2018-08-15 13:03:36 +02:00
Anonymous Maarten
b545b79a4b cmake: do not use rwdep::xxx targets 2018-08-15 09:12:01 +02:00
Filip Gawin
ed24fe71aa Enable av_register_all() for older version of ffmpeg
They require it before calling  avformat_alloc_context()
2018-08-15 01:12:40 +02:00
Filip Gawin
cb69ad596e Fix grabbing orientation from camera to listener
Codes has been a bit refactored.
Btw it looks like resampling of sfx won't be needed.
2018-08-15 01:12:40 +02:00
Filip Gawin
a8bdc83b0e Implement opcode 03d7 2018-08-15 01:12:40 +02:00
Filip Gawin
7b8e7a4e9f Implement 018e 2018-08-15 01:12:40 +02:00
Filip Gawin
048839e000 Implement 018d 2018-08-15 01:12:29 +02:00
Filip Gawin
1769830af0 Implement 018c 2018-08-15 01:07:21 +02:00
Filip Gawin
746b8f7d20 Update Listener parameters 2018-08-15 01:02:11 +02:00
Filip Gawin
1b1b924d8f Sound as ScriptType 2018-08-15 01:02:11 +02:00
Filip Gawin
4119afbae3 Add hardcoded metadata about sfx 2018-08-15 01:02:02 +02:00
Filip Gawin
5b110126d2 Store ptr to GameWorld in SoundManager
It's allowed to remove duplicated calls of
LoaderSDT's `load`, and need of calling `loadSound`
before `createSfxInstance`.
2018-08-13 21:44:35 +02:00
Anonymous Maarten
8d6b9492a3 rwengine: remove unused source files 2018-08-10 00:49:08 +02:00
Daniel Evans
50bbfb40f3
Merge pull request #574 from danhedron/rename_rwlib
Rename rwlib library to "core" to fit its new role
2018-08-09 21:28:19 +01:00
Daniel Evans
4fd92a1549 Rename rwlib library to "core" to fit its new role
Also move up source files into the root directory, as there's nothing else in this directory
2018-08-09 20:28:24 +01:00
Daniel Evans
844fdf8d33
Merge pull request #558 from ShFil119/soundRefactor
Implement methods for sfx, and refactor Sound system
2018-08-08 20:21:54 +01:00
Filip Gawin
11bc35c3f2 Implement methods for sfx, and refactor Sound system
SoundBuffer and SoundSource got their own
files.
2018-08-08 02:12:29 +02:00
Daniel Evans
be2816c398
Merge pull request #572 from danhedron/test_update/IPL
Remove data dependency from LoaderIPL tests
2018-08-08 00:34:27 +01:00
Daniel Evans
31f32b2173
Merge pull request #571 from madebr/kerning
Add font-dependent kerning
2018-08-07 23:06:12 +01:00
Daniel Evans
457364eca3
Merge pull request #566 from paulkocialkowski/vehicles
Various vehicle improvements
2018-08-07 23:05:58 +01:00
Paul Kocialkowski
ff9ccd5f07 rwengine: Set the linear velocity to a zero vector when stopped
Vehicles have a tendency to move on their own when they are stopped, due
to their interactions with other surfaces that result in a non-zero
velocity.

Since we have a threshold with the isStopped() method, fix this situation
by setting the linear velocity and wheels rotation (that otherwise also
rotate on their own) to zero vectors.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2018-08-07 21:25:30 +02:00
Anonymous Maarten
99dca06dbc rwengine: avoid crash of rwviewer/rwgmae when rendering incomplete color string
The string "~g" would crash rwviewer.
2018-08-07 12:39:59 +02:00
Anonymous Maarten
09026ae8b0 rwengine: allow newline in GameString's 2018-08-07 12:39:05 +02:00
Anonymous Maarten
38fca841e7 rwengine: add font-dependent kerning 2018-08-07 12:39:05 +02:00
Daniel Evans
f95427c136
Merge pull request #540 from ShFil119/remove_FileHandle
Remove unneeded FileHandle (aka shared_ptr)
2018-08-07 00:31:19 +01:00
Daniel Evans
0af9b23fe1 Add stream interface to LoaderIPL and use it in test 2018-08-06 23:37:37 +01:00
Filip Gawin
f3a718611e Convert data of FileContentsInfo to unique_ptr
I've removed copy ctor and copy assign operator.
We use here unique_ptr so copying should not happen.
2018-08-06 23:08:34 +02:00
Daniel Evans
634a3940ac
Merge pull request #570 from danhedron/test_up/IDE
Remove data dependency from LoaderIDE test suite
2018-08-06 21:43:46 +01:00
Filip Gawin
27333efd8c Remove unneed FileHandle (aka shared_ptr) 2018-08-06 22:42:09 +02:00
Daniel Evans
3941dde8d6 Add overload for lexical_cast<T> to select the base of the conversion 2018-08-06 20:45:40 +01:00
Daniel Evans
0743ac9681
Merge pull request #528 from madebr/fonts
Convert utf8 string to GameStrings using current font mapping + add string viewer to rwviewer
2018-08-06 20:25:38 +01:00
Daniel Evans
fc64c5e87e Add more object tests and fix a ped info bug
The car mask ped info member was being loaded as base 10 instead of base 16
2018-08-05 23:55:20 +01:00
Anonymous Maarten
a15413f997 rwlib+rwengine+rwviewer: address feedback comments 2018-08-06 00:16:33 +02:00
Paul Kocialkowski
295cb25cb0 Improve jump by getting inertia from the previous movement
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2018-08-05 23:08:51 +01:00
Daniel Evans
3b7bb14de6 Extract object data assertions to functions 2018-08-05 22:22:13 +01:00
Anonymous Maarten
37fcebee40 rwlib+rwengine: add string conversion independent of font 2018-08-05 23:20:58 +02:00
Daniel Evans
19368133b5 Extract IDE loading from file opening
This provides a way to parse IDE contents without a real file.
2018-08-05 21:23:36 +01:00
Filip Gawin
491e5303d0 Replace std::ptr_fun with lambda
It is deprecated in c++11,
and remove in c++17.
2018-08-04 23:16:04 +01:00
Filip Gawin
4baeeb9ae8 Replace raw ptr with unique_ptr in CollisionInstance 2018-08-04 14:22:10 +01:00
Anonymous Maarten
640af372ba rwengine+rwgame: convert utf8 to GameString depending on used font 2018-08-04 01:17:13 +02:00
Anonymous Maarten
12afe81a35 rwengine: spelling fix: 'Alignemnt' 2018-08-04 01:11:47 +02:00
Anonymous Maarten
2ad9667b50 rwengine: add per-font mapping + unicode support + tests 2018-08-04 01:11:47 +02:00
Daniel Evans
74a4398e69
Merge pull request #559 from ShFil119/casting
Remove old style casts
2018-08-03 23:47:00 +01:00
Filip Gawin
24b47a53f3 Remove unwanted memory leak in script 2018-08-02 21:39:36 +01:00
Paul Kocialkowski
17b6c13a6a rwgame: Adapt the friction slip based on handling data to ease steering
A constant friction slip for all vehicles does not seem to work very
well and most are rather hard to steer with. This introduces a somewhat
empirical formula to get a rather sane friction slip value based on
handling data, where coefficients are used in a way compatible with the
required friction slip value for most vehicles.

This is by far not a perfect approach and the steering on some vehicles
still feels out of line with the realistic expected behaviour, but most
remain fairly drivable.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2018-08-02 21:37:44 +02:00
Paul Kocialkowski
e3e8b3acb9 rwengine: Reduce vehicle roll influence to avoid easily flipping wheels
The current roll influence value makes it much too easy to flip vehicles
upside down. More generally, the vehicles tend to not stick to the ground
enough as they are too easily moved around when hit with another vehicle.

Reduce the roll influence value for vehicles to make them stick more to
the ground.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2018-08-02 21:37:44 +02:00
Paul Kocialkowski
20ac5b2a39 rwengine: Slow down engine force when the vehicle is braking
This introduces a linear reduction of the engine force when braking is
applied. The division factor increases with the steering angle to
max steering angle ratio, reducing the engine force by a factor of
up to 1.25.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2018-08-02 21:37:44 +02:00
Paul Kocialkowski
77b3df037e rwengine: Adapt the nominal engine force for our physics
This introduces a coefficient to adapt the nominal engine force to our
physics and ensure that top speed is not reached too fast.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2018-08-02 21:37:44 +02:00