1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-09-19 08:52:33 +02:00
Commit Graph

57 Commits

Author SHA1 Message Date
Daniel Evans
b7d657b9ab
Merge pull request #449 from husho/pickups
[Ready] Got some pickups working
2018-05-25 12:56:11 +01:00
husho
d753d8cf20 Fixed warnings 2018-05-23 16:56:07 +03:00
husho
5c1dbbd8b6 Added pickups 2018-05-22 23:19:19 +03:00
Filip Gawin
4e1948c23c Rearrange passing args to functions/ctors
Kill extra shared_ptr by passing them using const reference.
Use perfect forwarding for strings.
Remove redundant std::move.
2018-05-16 19:17:13 +02:00
husho
ffeb83d56b Off by 1 error fix 2018-05-16 17:51:33 +03:00
husho
ee2421de41 Missions debug menu 2018-05-15 23:44:34 +03:00
Filip Gawin
2d5d70c1b2 More constexpr 2018-04-17 16:15:17 +02:00
Lucas Eriksson
51a547ee45 Create debugstate submenu weather. 2018-02-09 22:48:09 +00:00
Lucas Eriksson
3e96ad9c92 Stop using default initialization onglm datatypes.
It results in undefined behaviour with glm 0.9.9
2018-02-09 22:33:10 +00:00
Anonymous Maarten
c0a4d627af rwengine: iwyu: reduce warnings in render subdirectory 2018-01-08 22:52:48 +00:00
Anonymous Maarten
d07beff43e rwengine: iwyu: reduce warnings in objects subdirectory 2018-01-08 22:52:48 +00:00
Anonymous Maarten
fb58dfb082 rwengine: iwyu: reduce warnings in engine subdirectory 2018-01-08 22:52:48 +00:00
Filip Gawin
6d80ce6424 Cleanup, use c++11 override
Maybe some of replace with
final, what do think?
2018-01-08 22:35:21 +00:00
Filip Gawin
ef4456e623 size() -> empty()
Empty has always
computational complexity O(1).
2017-12-17 01:48:49 +00:00
Anonymous Maarten
07a5729cef rwgame: create matrix from vectors (instead of elements) 2017-11-17 00:50:50 +00:00
Anonymous Maarten
820c4bd25c rwengine: GameData accepts rwfs::path as path of game data 2017-11-17 00:50:50 +00:00
Christoph Heiss
6cab5ee31a Fix some warnings
openrw/rwengine/src/engine/GameData.cpp:358:26: warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
    textureslots[slot] = std::move(loadTextureArchive(name));
                         ^
openrw/rwengine/src/engine/GameData.cpp:358:26: note: remove std::move call here
    textureslots[slot] = std::move(loadTextureArchive(name));
                         ^~~~~~~~~~                        ~

openrw/rwengine/src/objects/CharacterObject.cpp:16:18: warning: unused variable 'enter_offset' [-Wunused-variable]
static glm::vec3 enter_offset(0.81756252f, 0.34800607f, -0.486281008f);
                 ^

In file included from openrw/rwgame/RWGame.cpp:5:
openrw/rwgame/states/BenchmarkState.hpp:33:23: warning: 'BenchmarkState::getCamera' hides overloaded virtual function
      [-Woverloaded-virtual]
    const ViewCamera& getCamera();
                      ^
openrw/rwgame/State.hpp:51:31: note: hidden overloaded virtual function 'State::getCamera' declared here: different number of
      parameters (1 vs 0)
    virtual const ViewCamera& getCamera(float alpha);
                              ^
In file included from openrw/rwgame/RWGame.cpp:6:
openrw/rwgame/states/IngameState.hpp:53:18: warning: 'draw' overrides a member function but is not marked 'override'
      [-Winconsistent-missing-override]
    virtual void draw(GameRenderer* r);
                 ^
openrw/rwgame/State.hpp:28:18: note: overridden virtual function is here
    virtual void draw(GameRenderer* r) {
                 ^
In file included from openrw/rwgame/RWGame.cpp:6:
openrw/rwgame/states/IngameState.hpp:60:23: warning: 'getCamera' overrides a member function but is not marked 'override'
      [-Winconsistent-missing-override]
    const ViewCamera& getCamera(float alpha);
                      ^
openrw/rwgame/State.hpp:51:31: note: overridden virtual function is here
    virtual const ViewCamera& getCamera(float alpha);
                              ^
openrw/rwgame/RWGame.cpp:242:22: warning: unused variable 'vehicleModel' [-Wunused-variable]
            uint16_t vehicleModel = 110;  // @todo Which cars are spawned?!
                     ^

In file included from openrw/rwengine/src/script/modules/GTA3Module.cpp:1:
In file included from openrw/rwengine/src/engine/GameState.hpp:7:
openrw/rwengine/src/engine/ScreenText.hpp:140:63: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        const std::array<GameString, sizeof...(args)> vals = {args...};
                                                              ^~~~
                                                              {   }
openrw/rwengine/src/script/modules/GTA3ModuleImpl.inl:5669:16: note: in instantiation of function template specialization
      'ScreenText::format<std::__1::basic_string<unsigned short, std::__1::char_traits<unsigned short>, std::__1::allocator<unsigned short> > >'
      requested here
                        ScreenText::format(
                                    ^
In file included from openrw/rwengine/src/script/modules/GTA3Module.cpp:1:
In file included from openrw/rwengine/src/engine/GameState.hpp:7:
openrw/rwengine/src/engine/ScreenText.hpp:140:63: warning: suggest braces around initialization of subobject [-Wmissing-braces]
        const std::array<GameString, sizeof...(args)> vals = {args...};
                                                              ^~~~
                                                              {   }
openrw/rwengine/src/script/modules/GTA3ModuleImpl.inl:10214:18: note: in instantiation of function template specialization
      'ScreenText::format<std::__1::basic_string<unsigned short, std::__1::char_traits<unsigned short>, std::__1::allocator<unsigned short> >,
      std::__1::basic_string<unsigned short, std::__1::char_traits<unsigned short>, std::__1::allocator<unsigned short> > >' requested here
            ScreenText::format(script::gxt(args, gxtEntry),
                        ^

openrw/rwgame/State.cpp:40:42: warning: unused parameter 'alpha' [-Wunused-parameter]
const ViewCamera& State::getCamera(float alpha) {
                                         ^

openrw/rwengine/src/render/ObjectRenderer.cpp:20:17: warning: unused variable 'kWorldDrawDistanceFactor'
      [-Wunused-const-variable]
constexpr float kWorldDrawDistanceFactor = kDrawDistanceFactor;
                ^
2017-10-13 19:54:10 +01:00
Aldoxtor
7a8c602c75 add missing override 2017-09-12 01:40:31 +01:00
Aldoxtor
81734ae2fe initialize some variables in constructor 2017-04-21 20:24:32 +01:00
vflyson
87fb087485 only allow to scroll through weapons if alive 2017-03-13 19:15:15 +00:00
vflyson
4121378729 make it impossible to scroll through weapons while driving 2017-02-19 00:57:30 +00:00
Daniel Evans
8e4d73fca9 Rename Model -> Clump 2017-02-08 21:44:25 +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
7c41821b6c Use relative mouse motion to control player look 2016-12-06 22:43:01 +00:00
Daniel Evans
247f66f60d Move cutscene and fixed camera control into IngameState 2016-12-04 01:33:26 +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
b65a513bbb Remove usages of WorkContext 2016-12-02 00:56:38 +00:00
Daniel Evans
6ef99c0de9 Fix crash starting new game
The player doesn't always exist, so we do need to check..
2016-11-24 21:30:43 +00:00
Daniel Evans
f0e0e6e747 Extract game input state handling from IngameState
Prevents input getting "stuck" when input is removed in the pause menu
2016-11-19 23:50:34 +00:00
Daniel Evans
40f18dabb0 zero all input when player input is disabled 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
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
32352baedd Remove very dead debug code 2016-10-24 21:29:41 +01:00
Daniel Evans
d62e8a6cd2 Make MenuEntry height a property of the Menu 2016-10-24 21:29:41 +01:00
Daniel Evans
613d386488 Improve Menu system implementation 2016-10-24 21:29:41 +01:00
Daniel Evans
6a7802de87 Overhaul State and StateManager to remove pointers
Removed raw State pointers in favour of unique_ptrs
Avoid allowing control flow to re-enter States that have exited
Defer releasing states until the end of the frame
2016-10-24 21:29:40 +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
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
02efff6f8f Merge pull request #241 from danhedron/new-object-data
Correct object data storage
2016-10-10 20:51:25 +01:00
Daniel Evans
17315c7974 Make the test vehicle list explicit
The object order is no longer sorted, so we have to specify exactly
which vehicles to spawn in the test mode
2016-10-05 22:38:35 +01:00
Daniel Evans
6951434be8 Load objects directly 2016-09-27 22:49:08 +01:00
Daniel Evans
996a82c4bf Overhaul Model data handling to improve accuracy 2016-09-27 22:48:45 +01:00
Daniel Evans
fe77995e1f Fix uninitialised moneyTimer variable 2016-09-12 00:35:09 +01:00
Daniel Evans
a403cc87b7 clang-format files in rwgame/states 2016-09-09 21:13:20 +01:00
dan
810c6658d0 use openFilePath to open data files 2016-09-07 22:06:38 +01:00
Daniel Evans
03309d76d9 Don't defer loading IDE files 2016-09-07 01:34:42 +01:00
Jannik Vogel
70f777c685 Zero-Pad displayed money value and slowly update it 2016-09-02 15:35:34 +02:00
Jannik Vogel
c3c1c8781e Adjust debug-camera speed 2016-09-01 02:56:47 +02:00
Jannik Vogel
4ac3bc185f Fix debug-camera speed-modifier 2016-09-01 02:56:29 +02:00
Jannik Vogel
72a03fcdd6 Fix debug-camera undefined behaviour 2016-09-01 02:53:28 +02:00