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

87 Commits

Author SHA1 Message Date
Anonymous Maarten
53b45f7f25 rwgame: make StateManager non-static
This allows RWGame to be relaunched multiple times in the same process
2019-01-01 23:17:40 +01:00
Daniel Evans
eaf719f973
Merge pull request #676 from madebr/config
Refactor argument & configuration parsing + split rwgame target in librwgame and rwgame
2018-12-31 21:01:14 +00:00
Filip Gawin
9e4e97a58e Convert Renderer to unique_ptr 2018-12-28 13:57:51 +01:00
Anonymous Maarten
8b38fda984 rwgame: merge argument + configuration file parsing + add tests
- definition of arguments an configuration parameters is centralized
  in rwgame/RWConfig.inc
- argument parsing is tested
- the try/catch in main is less weird now (imho)
2018-12-28 00:58:10 +01:00
Filip Gawin
c49b4bbd50 Further refactor of menu managment 2018-12-27 22:50:05 +01:00
Filip Gawin
d5541ac91f Convert Menu instances to std::optional 2018-12-21 22:58:51 +01:00
Filip Gawin
dce5257eb3 Avoid dynamic allocations of WeaponData 2018-11-29 23:36:44 +01:00
Filip Gawin
0322b5c6b9 Grab currentCutscene as const ref 2018-11-17 01:47:39 +01:00
Filip Gawin
056864e1d7 Clean animation and audio after cutscene 2018-11-17 01:47:39 +01:00
Filip Gawin
80666bc38d Start using structure bindings 2018-10-31 17:51:18 +01:00
Petar Kukolj
262523c211 Add HUDDrawer class and add a test 2018-10-30 15:08:25 +01:00
Filip Gawin
4940ae0d6b Disable warnings caused by register in bullet
To revert when https://github.com/bulletphysics/bullet3/pull/1941
will be merged.
2018-10-29 16:35:32 +01:00
Filip Gawin
0ae2a836ca Game objects as unique ptrs 2018-10-05 13:06:53 +01: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
2a1163d391 rwgame: fix Visual Studio warnings 2018-09-16 00:52:41 +02:00
Daniel Evans
0e098b4fa0
Merge pull request #604 from ShFil119/minor_memory_improvements
Minor memory improvements
2018-09-01 23:55:48 +01:00
Filip Gawin
711fa70950 Remove unneeded dynamic alocation of SCMFile 2018-09-01 17:50:03 +02:00
Filip Gawin
071481f617 Remove raw ptrs from CharacterObject 2018-08-28 23:18:20 +02:00
Daniel Evans
457364eca3
Merge pull request #566 from paulkocialkowski/vehicles
Various vehicle improvements
2018-08-07 23:05:58 +01:00
Anonymous Maarten
640af372ba rwengine+rwgame: convert utf8 to GameString depending on used font 2018-08-04 01:17:13 +02:00
Paul Kocialkowski
ec49fe2b27 rwgame: Add more interesting vehicles to DebugStates
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2018-08-02 21:37:36 +02:00
Filip Gawin
d95d05e291 Remove old style cast 2018-07-29 22:21:01 +02:00
Filip Gawin
495c831972 Mark classes as final
It lets complier to make extra optimization.

See:
https://gcc.godbolt.org/#compilers:!((compiler:g6,options:'-O2+-Wall++-
xc%2B%2B+-
std%3Dc%2B%2B11',sourcez:MYGwhgzhAECC0G8BQAHArgIxAS2ALiWiOgDdsAnAFzTBFIHtsATaAMwAoBKaAXmgAYA3EgC%2BwpKEgwAQtDzR0WXHESpMOfIWIlGLDt1bYAdrWj0SAU3LlmF4WKQTwUaAGE5C9cvjJFGgsQMzGxcZpbWtvbiOsGs9PTs0gBk0BjcyIEYAHT69o4xLBhg5OyuKcDpWkTAOVz2QAA%3D%3D)),filterAsm:
(commentOnly:!t,directives:!t,intel:!t,labels:!t),version:3
2018-07-07 22:55:10 +02:00
Daniel Evans
83ee9ef568
Merge pull request #526 from madebr/rwlib_changes
Rwlib changes
2018-07-05 22:05:56 +01:00
Filip Gawin
76c15c2a82 Usage of default member initializer 2018-07-03 20:08:03 +02:00
Anonymous Maarten
062115f6bd rwgame+rwengine: get background from index + pass as rwfs::path 2018-06-30 04:03:20 +02:00
Anonymous Maarten
36149cf38e rwlib: rw/defines.hpp -> rw/debug.hpp 2018-06-30 04:03:20 +02:00
husho
1132a4ba3c Fixed: missions debug menu
starting a mission via debug menu terminated non mission scripts
2018-06-19 21:22:44 +03:00
husho
ca576ac3cf Refactor: moved getPlayer to World class 2018-06-03 03:40:59 +03:00
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