1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-07 19:32:49 +01:00
Commit Graph

42 Commits

Author SHA1 Message Date
Filip Gawin
44148c528a Use '\n' instead of std::endl 2019-01-21 00:29:11 +01:00
Filip Gawin
dd8de77b8e Cleanup headers of rwengine 2019-01-20 20:00:00 +01:00
Filip Gawin
1a7d4ac7e6 Cleanup interfaces of rwgame 2019-01-20 20:00:00 +01:00
Daniel Evans
f59653eeea Make DamageInfo construction more explicit 2019-01-06 02:54:03 +00: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
80666bc38d Start using structure bindings 2018-10-31 17:51:18 +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
2a1163d391 rwgame: fix Visual Studio warnings 2018-09-16 00:52:41 +02:00
Filip Gawin
711fa70950 Remove unneeded dynamic alocation of SCMFile 2018-09-01 17:50:03 +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
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
husho
d753d8cf20 Fixed warnings 2018-05-23 16:56:07 +03: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
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
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
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
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
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
6951434be8 Load objects directly 2016-09-27 22:49:08 +01:00
Daniel Evans
a403cc87b7 clang-format files in rwgame/states 2016-09-09 21:13:20 +01: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
Daniel Evans
67aa5150ca Replace mb strings with 16-bit char strings
The game indexes into the font map directly, it doesn't use any font
 encoding scheme like UTF-16. This corrects the behaviour and removes
 dependancy on iconv.
2016-08-21 17:40:35 +01:00
Daniel Evans
a0b995c97e Move game state classes into states folder 2016-08-07 14:32:22 +01:00