1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-09 20:32:43 +01:00
Commit Graph

740 Commits

Author SHA1 Message Date
Filip Gawin
c16f565136 Implement 02f6 02f7 2017-09-28 22:21:53 +01:00
Filip Gawin
11e90c61e5 Simplify condition
Like suggested in #293.
2017-09-19 14:23:31 +01:00
Filip Gawin
391e993d1f Simplify condition and increase readability 2017-09-19 14:23:31 +01:00
Filip Gawin
27113e540f Deleting "empty", duplicated variables in CharacterState
All objects inherites variables: rotation and position from GameObject,
CharacterObject contains also CharacterState with empty,
never used position and rotation. They are not even initialized.

https://github.com/rwengine/openrw/search?utf8=%E2%9C%93&q=currentState&type=
https://github.com/rwengine/openrw/search?p=1&q=getCurrentState&type=&utf8=%E2%9C%93
2017-09-19 14:23:31 +01:00
Filip Gawin
2890280934 Convert default initialization to value initialization
Default initialization has a problem,
it doesn't initialize POD class,
so it's safer to use value initialization,
especially for "outside" class (like bullet).
2017-09-19 14:23:31 +01:00
Anonymous Maarten
02c60311ee rwlib/rwengine: make use of RW_ASSERT instead of assert 2017-09-16 22:19:39 +01:00
darkf
afe4928678 SoundManager: use av_frame_free, not av_free 2017-09-16 19:50:51 +01:00
darkf
8fd6d2f125 SoundManager: Set log level to error on release, warning on debug 2017-09-16 19:50:51 +01:00
darkf
f4f0f28a14 Support older libavcodec versions and update .travis.yml for new dependencies 2017-09-16 19:50:51 +01:00
darkf
ec2e940924 Remove libsndfile dependency 2017-09-16 19:50:51 +01:00
darkf
d69fdffdd1 Remove mman-win32 dependency 2017-09-16 19:50:51 +01:00
darkf
8e26431665 Remove dependency on libMAD (hurrah!) 2017-09-16 19:50:51 +01:00
darkf
4f60dcb663 Replace Music with Sound 2017-09-16 19:50:51 +01:00
darkf
c474bbe280 Implement FFmpeg audio decoder 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
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
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
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
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
a725a51baa spelling: recieve -> receive 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
01241f33d9 make it possible to scroll down to the fist 2017-02-19 00:57:30 +00:00
Vincent Flyson
edcf62c04a apply various colors to pickups' coronas, use the correct texture (#269)
* apply various colors to pickups' coronas, use the correct texture

* give coronas the pulsating effect
2017-02-16 20:12:06 +00:00
Daniel Evans
d6e2057f8f Apply LOD multiplier correctly when rendering 2017-02-08 21:45:01 +00:00
Daniel Evans
e1f7d11c82 Fix off-by-one error in Simple Model atomic lookup 2017-02-08 21:45:01 +00:00
Daniel Evans
308d1d6deb Implement Building LOD transitions 2017-02-08 21:45:01 +00:00
Daniel Evans
5f6f3fe66f Implement vehicle LOD rendering 2017-02-08 21:45:01 +00:00
Daniel Evans
d84b492412 Remove all traces of Skeleton 2017-02-08 21:45:01 +00:00
Daniel Evans
94456aa732 Convert CutsceneObject to use Frame animation 2017-02-08 21:44:25 +00:00
Daniel Evans
a6396ec6e8 Remove forward movement from Character Animation 2017-02-08 21:44:25 +00:00
Daniel Evans
ec5f1d7b55 Change Animator to animate Frames directly instead of Skeleton 2017-02-08 21:44:25 +00:00
Daniel Evans
3163a5dd57 Initial CharacterObject Clump implementation 2017-02-08 21:44:25 +00:00
Daniel Evans
1514bd2cc5 Implement Vehicle dynamics with Frames instead of Skeleton 2017-02-08 21:44:25 +00:00
Daniel Evans
f64104600e Add a clump instance for each VehicleObject 2017-02-08 21:44:25 +00:00
Daniel Evans
80c9b73ac5 Initial Instance Object Rendering via atomics 2017-02-08 21:44:25 +00:00
Daniel Evans
729085d08c Re-implement vehicle parts for changed frame interfaces 2017-02-08 21:44:25 +00:00
Daniel Evans
0a0be3c52a Use new Clump structures in rwviewer + remove old renderer 2017-02-08 21:44:25 +00:00
Daniel Evans
d798509f93 Use Atomic instead of ModelFrame in ObjectRenderer 2017-02-08 21:44:25 +00:00
Daniel Evans
a0eaf5b8b0 Move Atomic and Geometry out of Clump class 2017-02-08 21:44:25 +00:00
Daniel Evans
8e4d73fca9 Rename Model -> Clump 2017-02-08 21:44:25 +00:00
Daniel Evans
3b3f1c8631 Spawn locale appropriate pedestrians near the camera 2017-02-08 20:30:30 +00:00
Daniel Evans
b1582bae4a Name save file variables 2017-02-08 20:30:30 +00:00
Daniel Evans
162ff258c8 Load ped group data 2017-02-08 20:30:30 +00:00
Daniel Evans
79533fac8a Load ped type relationship data 2017-02-08 20:30:30 +00:00
Daniel Evans
b0e7cbdadd Add PedType save game block details 2017-02-08 20:30:30 +00:00
Daniel Evans
4f5987c7b0 Load and associated pedstats with ped models 2017-02-08 20:30:29 +00:00
Daniel Evans
3247fafa90 Load game zones from save file block 2017-01-30 00:24:44 +00:00
Daniel Evans
bb6698e373 Implement Hierarchy of game ZoneData
This allows querying of the most specific ZoneData for a given point
2017-01-30 00:24:44 +00:00
Daniel Evans
f12186dede Implement 0373, fix stuck player after "Drive Misty For Me"
Leave opcode unimplemented directive, as behaviour is likely not correct
2017-01-16 22:36:38 +00:00
haphzd
e6ec1b69f0 Bring back culling events counter 2016-12-10 22:19:38 +03:00
Daniel Evans
eb71f59594 Update character look direction when setting orientation 2016-12-06 22:43:01 +00:00
Daniel Evans
b9740b3b8a Only face movement direction when not strafing 2016-12-04 01:06:27 +00:00
Daniel Evans
920d3f86fe Use look angles for weapon hitscans 2016-12-04 01:06:27 +00:00
Daniel Evans
ddb62ed3cd Rewrite of camera and character look code
Make states responsible for interpolating camera transformation
Apply look direction to character orientation
2016-12-04 01:06:27 +00:00
Daniel Evans
c00145e551 Reduce code duplication for DFF texture lookup 2016-12-03 21:59:37 +00:00
Daniel Evans
d75c476221 Remove global texture list and use a slot name to lookup textures 2016-12-03 21:59:37 +00:00
Daniel Evans
8d10c80196 Remove all traces of WorkContext 2016-12-02 01:00:22 +00:00
Daniel Evans
b65a513bbb Remove usages of WorkContext 2016-12-02 00:56:38 +00:00
Daniel Evans
7ad8ae5e40 Make loadTXD synchronous only 2016-12-02 00:42:38 +00:00
Daniel Evans
c63d12b70a Merge pull request #250 from JohnPaulHarold/openal_headers
OpenAL headers, fix for OSX compile
2016-11-22 21:00:49 +00:00
John-Paul Harold
9a1d1033e7 Fix OpenAL includes (fixes OSX build) 2016-11-21 11:19:29 +00:00
Daniel Evans
d0e01465ff Merge pull request #248 from danhedron/input-fixup
Input fixup
2016-11-20 00:15:08 +00:00
Daniel Evans
9c8690bfae Fix Control enum order which was causing excessive aliasing 2016-11-19 23:50:34 +00:00
Daniel Evans
57edc3648b Detect event starts by double-buffering state 2016-11-19 23:50:34 +00:00
Jannik Vogel
d5ff5601be Fixup BT_BULLET_VERSION check
Bullet 2.83.5 was 283, 2.83.6 was 284, 2.84 (API changes affecting OpenRW) was 285, 2.85.1 is still 285.
We want to check for 2.84 and upwards, so our check must be for 285.
2016-11-07 22:38:38 +01:00
Daniel Evans
9f2fb5aa19 Merge pull request #245 from danhedron/physics-cleanup-1
Physics cleanup
2016-11-04 20:41:30 +00:00
Daniel Evans
6ce9ecedcc Rewrite collision model data assignment 2016-11-03 23:26:09 +00:00
Daniel Evans
ca5649b840 Rewrite LoaderCOL and CollisionModel 2016-11-03 23:25:57 +00:00
Jannik Vogel
10c4f6dc86 Adapt for Bullet >= 2.84 2016-10-29 01:02:07 +02:00
Daniel Evans
684e32f4a9 Simplify Script system by removing SCMOpcodes
This was just a useless container for a set of modules. We only have
one module now so don't bother with it. This means we can remove some
more raw new & deletes from RWGame too.
2016-10-24 21:29:41 +01:00
Daniel Evans
fb4d9ea8c3 Use unique_ptr for GameWorld instance 2016-10-24 21:29:41 +01:00
Daniel Evans
ad998e8a80 Avoid allocating RWGame members where possible
These objects don't need to be dynamically allocated, they can
take on the same lifetime as RWGame itself.
2016-10-19 22:34:51 +01:00
Daniel Evans
657a726a9b Initialise logging outside of RWGame 2016-10-19 22:34:51 +01:00
Daniel Evans
5c78930c1b Remove InventoryItem and WeaponItem
They served no purpose other than to awkwardly implement weapon firing
This is now handled in the Weapon::fire* functions, and everything else
has been changed to reference weapon data or inventory indices directly
2016-10-19 22:14:52 +01:00
Daniel Evans
e31c30efe9 Improve loading of hard-coded models 2016-10-10 20:49:44 +01:00
Daniel Evans
a861309936 Change special and cutscene logic to load and unload models 2016-10-07 01:04:48 +01:00
Daniel Evans
e1ab5b1f69 Use ObjectRenderer to draw Goals and Arrows 2016-10-05 22:38:35 +01:00
Daniel Evans
9b45a31834 Remove BackgroundLoader.hpp 2016-10-05 22:38:35 +01:00
Daniel Evans
62ad6b8628 Remove monolithic model list 2016-10-05 22:38:03 +01:00
Daniel Evans
6951434be8 Load objects directly 2016-09-27 22:49:08 +01:00
Daniel Evans
218ffdf66c Load and associate model data when creating objects 2016-09-27 22:49:07 +01:00
Daniel Evans
6888fa3558 Load and associate MODELFILE entries 2016-09-27 22:48:48 +01:00
Daniel Evans
996a82c4bf Overhaul Model data handling to improve accuracy 2016-09-27 22:48:45 +01:00
Daniel Evans
479aaab666 Fix header guard in LoaderIDE.hpp 2016-09-11 02:59:03 +01:00