1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-07 03:12:36 +01:00
Commit Graph

1042 Commits

Author SHA1 Message Date
Filip Gawin
ef4456e623 size() -> empty()
Empty has always
computational complexity O(1).
2017-12-17 01:48:49 +00:00
Miloslav Číž
57284fdade Fix particle rendering transform matrix 2017-11-20 21:48:00 +00:00
Filip Gawin
d934f1c9b0 Forgotten flush of packet 2017-11-17 22:53:42 +00:00
Miloslav Číž
7715dbaf6e Make vehicle wheels steer smoothly 2017-11-17 21:09:05 +01:00
Anonymous Maarten
c5523d6728 rwengine: Remove usused SCMTypeInfoTable 2017-11-17 00:50:50 +00:00
Anonymous Maarten
6142e0bf80 rwengine: remove unused ScriptDisassembly 2017-11-17 00:50:50 +00:00
Anonymous Maarten
deb7db5faf rwengine: remove ScriptFunctionMeta->conditional + extended definition
Not used anywhere
2017-11-17 00:50:50 +00:00
Anonymous Maarten
4bf95cd903 rwengine: SCMMicrocode is not used anywhere 2017-11-17 00:50:50 +00:00
Anonymous Maarten
5299f4df08 spelling: yeild -> yield 2017-11-17 00:50:50 +00:00
Anonymous Maarten
85ac15078a rwengine: Removed unused functions and defines 2017-11-17 00:50:50 +00:00
Anonymous Maarten
1378931eba rwengine: throw runtime_error on shader error instead of straight exit 2017-11-17 00:50:50 +00:00
Anonymous Maarten
32fb5eb409 rwlib: LoaderIMG accepts rwfs::path 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
Daniel Evans
9c48b4424a Add build time option for CXX17 or boost filesystem 2017-10-31 00:55:19 +00:00
Anonymous Maarten
a40a2706a9 cmake: add support for include-what-you-use to check #include's
The output is currently very verbose and includes many false positives.
Adding a mapping file should solve this.

See
https://github.com/include-what-you-use/include-what-you-use/blob/master/docs/IWYUMappings.md
2017-10-29 20:40:57 +00:00
Anonymous Maarten
5dc707aaed cmake: make OpenAL an imported target 2017-10-29 20:40:57 +00:00
Anonymous Maarten
6ccf85b770 cmake: make bullet an imported target 2017-10-29 20:40:57 +00:00
Anonymous Maarten
9f1ba0fe76 cmake: make ffmpeg an imported target 2017-10-29 20:40:57 +00:00
Anonymous Maarten
47dbea1bb4 cmake: make glm an imported target 2017-10-29 20:40:57 +00:00
Anonymous Maarten
f5a237bf7b cmake: reformat rwengine/CMakeLists.txt 2017-10-29 20:40:57 +00:00
Anonymous Maarten
1926795d63 cmake: use rwengine::interface + no more add_definitions & include_directories 2017-10-29 20:40:57 +00:00
Filip
b9d306ae70 Improving handling game shaders (#302)
* move delete to earlier stage

* lines for better readability

* Added detach shader

* Addition forgotten glDeleteProgram

https://github.com/rwengine/openrw/search?utf8=%E2%9C%93&q=glDeleteProgram&type=
In project there's no necessary clearing call of glDeleteProgram.

* Removing/Closing shader programs

Each shader program should be taken care by glDeleteProgram.
To make it works/usefull, each shader's raw ptr will convertet to unique_ptr
in next commit.

* Converting ShaderProgram's ptr to unique

Actually deleting isn't handled,
so this commit removes memory leak.
2017-10-29 18:47:52 +00:00
Filip
c54cfa0ae8 Avoid making unnecessary copies (#337)
* frames.emplace_back

* vehicleColours.emplace_back

* colours.emplace_back

* waterBlocks.emplace_back

* state.garages.emplace_back

* bonedata->frames.emplace_back

* lines.emplace_back

* circleVerts.emplace_back

* geo.emplace_back

* Water renderer

* perf_colours.emplace_back
2017-10-29 17:14:07 +00:00
Filip Gawin
9aa01b69e1 Resolve cases found by gcc-5 2017-10-26 21:22:08 +01:00
Filip Gawin
512ac6f5ee Fix double promotion 2017-10-25 01:17:46 +01:00
Daniel Evans
43047269ab Offset vehicle spawn height to account for dimensions
Should prevent vehicles spawning in, and falling through, the ground.
2017-10-19 23:42:41 +01:00
Anonymous Maarten
14ef8c2539 rwengine: incorporate review 2017-10-18 21:52:29 +01:00
Anonymous Maarten
8012a5065d rwengine: Store btOverlappingPairCallback in GameWorld
Should fix this memory leak:
==16721== 8 bytes in 1 blocks are definitely lost in loss record 7 of 264
==16721==    at 0x4C2F1CA: operator new(unsigned long) (vg_replace_malloc.c:334)
==16721==    by 0x7E7B5D: GameWorld::GameWorld(Logger*, GameData*) (GameWorld.cpp:100)
==16721==    by 0x76EC0B: std::_MakeUniq<GameWorld>::__single_object std::make_unique<GameWorld, Logger*,
 GameData*>(Logger*&&, GameData*&&) (unique_ptr.h:825)
==16721==    by 0x760F50: RWGame::newGame() (RWGame.cpp:107)
==16721==    by 0x78E713: LoadingState::enter() (LoadingState.cpp:9)
==16721==    by 0x76602B: void StateManager::enter<LoadingState, RWGame*, RWGame::RWGame(Logger&, int, ch
ar**)::{lambda()#1}>(RWGame*&&, RWGame::RWGame(Logger&, int, char**)::{lambda()#1}&&) (StateManager.hpp:4
0)
==16721==    by 0x760842: RWGame::RWGame(Logger&, int, char**) (RWGame.cpp:81)
==16721==    by 0x750385: main (main.cpp:13)
2017-10-18 21:52:29 +01:00
Anonymous Maarten
a610ea2387 rwengine: store btCollisionShape along btRigidBody in Part
Should fix this memory leak:
==16721== 103 bytes in 1 blocks are definitely lost in loss record 181 of 264
==16721==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==16721==    by 0x58F1AF3: ??? (in /usr/lib64/libLinearMath.so.2.83)
==16721==    by 0x83E3C9: btBoxShape::operator new(unsigned long) (btBoxShape.h:34)
==16721==    by 0x83CD75: VehicleObject::createObjectHinge(VehicleObject::Part*) (VehicleObject.cpp:722)
==16721==    by 0x83C251: VehicleObject::setPartLocked(VehicleObject::Part*, bool) (VehicleObject.cpp:610)
==16721==    by 0x83C2D0: VehicleObject::setPartTarget(VehicleObject::Part*, bool, float) (VehicleObject.cpp:623)
==16721==    by 0x7B10CD: Activities::EnterVehicle::update(CharacterObject*, CharacterController*) (CharacterController.cpp:226)
==16721==    by 0x7B062D: CharacterController::updateActivity() (CharacterController.cpp:26)
==16721==    by 0x7B09FE: CharacterController::update(float) (CharacterController.cpp:98)
==16721==    by 0x8EBBFA: DefaultAIController::update(float) (DefaultAIController.cpp:87)
==16721==    by 0x82ED5A: CharacterObject::tick(float) (CharacterObject.cpp:240)
==16721==    by 0x763630: RWGame::tick(float) (RWGame.cpp:506)
==16721==
==16721== 120 bytes in 5 blocks are definitely lost in loss record 187 of 264
==16721==    at 0x4C2F1CA: operator new(unsigned long) (vg_replace_malloc.c:334)
==16721==    by 0x8EBA26: DefaultAIController::update(float) (DefaultAIController.cpp:63)
==16721==    by 0x82ED5A: CharacterObject::tick(float) (CharacterObject.cpp:240)
==16721==    by 0x763630: RWGame::tick(float) (RWGame.cpp:506)
==16721==    by 0x763128: RWGame::run() (RWGame.cpp:420)
==16721==    by 0x750394: main (main.cpp:15)
2017-10-18 21:52:29 +01:00
Anonymous Maarten
eba262b789 rwengine: make Activity a std::unique_ptr
Should fix this memory leak:
==16721== 120 bytes in 5 blocks are definitely lost in loss record 187 of 264
==16721==    at 0x4C2F1CA: operator new(unsigned long) (vg_replace_malloc.c:334)
==16721==    by 0x8EBA26: DefaultAIController::update(float) (DefaultAIController.cpp:63)
==16721==    by 0x82ED5A: CharacterObject::tick(float) (CharacterObject.cpp:240)
==16721==    by 0x763630: RWGame::tick(float) (RWGame.cpp:506)
==16721==    by 0x763128: RWGame::run() (RWGame.cpp:420)
==16721==    by 0x750394: main (main.cpp:15)
2017-10-18 21:52:29 +01:00
Anonymous Maarten
e448f610ff rwengine: make Renderer a shared_ptr
Should fix this memory leak:
==16721== 912 (600 direct, 312 indirect) bytes in 1 blocks are definitely lost in loss record 225 of 264
==16721==    at 0x4C2F1CA: operator new(unsigned long) (vg_replace_malloc.c:334)
==16721==    by 0x84A697: GameRenderer::GameRenderer(Logger*, GameData*) (GameRenderer.cpp:71)
==16721==    by 0x75FC7D: RWGame::RWGame(Logger&, int, char**) (RWGame.cpp:35)
==16721==    by 0x750385: main (main.cpp:13)
2017-10-18 21:52:29 +01:00
Anonymous Maarten
8175666092 rwengine: make AnimationBone a shared pointer
Should fix this memory leak:
==10780== 4,341,444 (269,712 direct, 4,071,732 indirect) bytes in 3,746 blocks are definitely lost in los
s record 2,652 of 2,654
==10780==    at 0x4C2F1CA: operator new(unsigned long) (vg_replace_malloc.c:334)
==10780==    by 0x8219B2: LoaderIFP::loadFromMemory(char*) (LoaderIFP.cpp:82)
==10780==    by 0x7C22C0: GameData::loadIFP(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (GameData.cpp:506)
==10780==    by 0x7BD838: GameData::load() (GameData.cpp:59)
==10780==    by 0x75CD35: RWGame::RWGame(Logger&, int, char**) (RWGame.cpp:51)
==10780==    by 0x74CDE5: main (main.cpp:13)
==10780==
==10780== 6,516,576 (13,968 direct, 6,502,608 indirect) bytes in 194 blocks are definitely lost in loss record 2,654 of 2,654
==10780==    at 0x4C2F1CA: operator new(unsigned long) (vg_replace_malloc.c:334)
==10780==    by 0x8219B2: LoaderIFP::loadFromMemory(char*) (LoaderIFP.cpp:82)
==10780==    by 0x7C22C0: GameData::loadIFP(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (GameData.cpp:506)
==10780==    by 0x7E7ECC: GameWorld::loadCutscene(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (GameWorld.cpp:693)
==10780==    by 0x87453E: opcode_02e4(ScriptArguments const&, char const*) (GTA3ModuleImpl.inl:8245)
==10780==    by 0x8D8149: void script_bind::call_unpacked<0u, 2u, void>::call<void (*)(ScriptArguments const&, char const*), ScriptArguments const&, char const*>(void (*)(ScriptArguments const&, char const*), ScriptArguments const&, ScriptArguments const&, char const*&&) (ScriptModule.hpp:80)
==10780==    by 0x8D2765: void script_bind::call_unpacked<1u, 1u, void, char const*>::call<void (*)(ScriptArguments const&, char const*), ScriptArguments const&>(void (*)(ScriptArguments const&, char const*), ScriptArguments const&, ScriptArguments const&) (ScriptModule.hpp:90)
==10780==    by 0x8C7EFE: void script_bind::call_unpacked<2u, 0u, void, ScriptArguments const&, char const*>::call<void (*)(ScriptArguments const&, char const*)>(void (*)(ScriptArguments const&, char const*), ScriptArguments const&) (ScriptModule.hpp:90)
==10780==    by 0x8B5A05: void script_bind::binder<void, ScriptArguments const&, char const*>::call<void (*)(ScriptArguments const&, char const*)>(void (*)(ScriptArguments const&, char const*), ScriptArguments const&) (ScriptModule.hpp:104)
==10780==    by 0x8A2E3A: void script_bind::do_unpacked_call<void, ScriptArguments const&, char const*>(void (* const&)(ScriptArguments const&, char const*), ScriptArguments const&) (ScriptModule.hpp:137)
==10780==    by 0x893BB0: void ScriptModule::bind<void (*)(ScriptArguments const&, char const*)>(unsigned short, int, void (*)(ScriptArguments const&, char const*))::{lambda(ScriptArguments const&)#1}::operator()(ScriptArguments const&) const (ScriptModule.hpp:166)
==10780==    by 0x8B5A8D: std::_Function_handler<void (ScriptArguments const&), void ScriptModule::bind<void (*)(ScriptArguments const&, char const*)>(unsigned short, int, void (*)(ScriptArguments const&, char const*))::{lambda(ScriptArguments const&)#1}>::_M_invoke(std::_Any_data const&, ScriptArguments const&) (std_function.h:316)
2017-10-18 21:52:29 +01:00
Anonymous Maarten
5e330346ec rwengine: delete corona VisualFX on delete of PickupObject
Should fix this memory leak:
==31441== 1,184 (1,144 direct, 40 indirect) bytes in 11 blocks are definitely lost in loss record 2,344 of 2,723
==31441==    at 0x4C2F1CA: operator new(unsigned long) (vg_replace_malloc.c:334)
==31441==    by 0x7E30D5: GameWorld::createEffect(VisualFX::EffectType) (GameWorld.cpp:495)
==31441==    by 0x82CE16: PickupObject::PickupObject(GameWorld*, glm::tvec3<float, (glm::precision)0> const&, BaseModelInfo*, PickupObject::PickupType) (PickupObject.cpp:126)
==31441==    by 0x82C505: ItemPickup::ItemPickup(GameWorld*, glm::tvec3<float, (glm::precision)0> const&, BaseModelInfo*, PickupObject::PickupType, WeaponData*) (ItemPickup.cpp:11)
==31441==    by 0x7E2953: GameWorld::createPickup(glm::tvec3<float, (glm::precision)0> const&, int, int) (GameWorld.cpp:389)
==31441==    by 0x86D209: opcode_0213(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&) (GTA3ModuleImpl.inl:6350)
==31441==    by 0x8DC0EF: void script_bind::call_unpacked<0u, 7u, void>::call<void (*)(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&), ScriptArguments const&, int&, int&, glm::tvec3<float, (glm::precision)0>&, ScriptObjectType<PickupObject> >(void (*)(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&), ScriptArguments const&, ScriptArguments const&, int&, int&, glm::tvec3<float, (glm::precision)0>&, ScriptObjectType<PickupObject>&&) (ScriptModule.hpp:80)
==31441==    by 0x8D9B82: void script_bind::call_unpacked<1u, 6u, void, ScriptObjectType<PickupObject>&>::call<void (*)(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&), ScriptArguments const&, int&, int&, glm::tvec3<float, (glm::precision)0> >(void (*)(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&), ScriptArguments const&, ScriptArguments const&, int&, int&, glm::tvec3<float, (glm::precision)0>&&) (ScriptModule.hpp:90)
==31441==    by 0x8D6753: void script_bind::call_unpacked<2u, 3u, void, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&>::call<void (*)(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&), ScriptArguments const&, int&, int>(void (*)(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&), ScriptArguments const&, ScriptArguments const&, int&, int&&) (ScriptModule.hpp:90)
==31441==    by 0x8D213D: void script_bind::call_unpacked<3u, 2u, void, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&>::call<void (*)(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&), ScriptArguments const&, int>(void (*)(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&), ScriptArguments const&, ScriptArguments const&, int&&) (ScriptModule.hpp:90)
==31441==    by 0x8CBEE0: void script_bind::call_unpacked<4u, 1u, void, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&>::call<void (*)(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&), ScriptArguments const&>(void (*)(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&), ScriptArguments const&, ScriptArguments const&) (ScriptModule.hpp:90)
==31441==    by 0x8C0078: void script_bind::call_unpacked<5u, 0u, void, ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&>::call<void (*)(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&)>(void (*)(ScriptArguments const&, int, int, glm::tvec3<float, (glm::precision)0>, ScriptObjectType<PickupObject>&), ScriptArguments const&) (ScriptModule.hpp:90)
2017-10-18 21:52:29 +01:00
Anonymous Maarten
8e98cf2311 rwengine: Pass CharacterController to the CharacterObject constructor
The CharacterObject should remove the CharacterController upon
destruction.

Should fix this memory leak:
==31441== 480 (360 direct, 120 indirect) bytes in 5 blocks are definitely lost in loss record 2,038 of 2,723
==31441==    at 0x4C2F1CA: operator new(unsigned long) (vg_replace_malloc.c:334)
==31441==    by 0x7E2370: GameWorld::createPedestrian(unsigned short, glm::tvec3<float, (glm::precision)0> const&, glm::tquat<float, (glm::precision)0> const&, unsigned int) (GameWorld.cpp:334)
==31441==    by 0x8E2F01: TrafficDirector::populateNearby(ViewCamera const&, float, int) (TrafficDirector.cpp:164)
==31441==    by 0x7E1170: GameWorld::createTraffic(ViewCamera const&) (GameWorld.cpp:176)
==31441==    by 0x75C616: RWGame::tick(float) (RWGame.cpp:531)
==31441==    by 0x75BF18: RWGame::run() (RWGame.cpp:420)
==31441==    by 0x749184: main (main.cpp:15)
2017-10-18 21:52:29 +01:00
Anonymous Maarten
c2da40d0a0 rwlib/rwengine: Use AnimationPtr instead of Animation*
Should fix these memory leaks:
==31441== 3,694,699 (17,248 direct, 3,677,451 indirect) bytes in 196 blocks are definitely lost in loss record 2,720 of 2,723
==31441==    at 0x4C2F1CA: operator new(unsigned long) (vg_replace_malloc.c:334)
==31441==    by 0x81D98E: LoaderIFP::loadFromMemory(char*) (LoaderIFP.cpp:69)
==31441==    by 0x7BE5D2: GameData::loadIFP(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (GameData.cpp:506)
==31441==    by 0x7B9B4A: GameData::load() (GameData.cpp:59)
==31441==    by 0x7590C5: RWGame::RWGame(Logger&, int, char**) (RWGame.cpp:51)
==31441==    by 0x749175: main (main.cpp:13)
==31441==
==31441== 5,298,984 (1,080 direct, 5,297,904 indirect) bytes in 15 blocks are definitely lost in loss record 2,722 of 2,723
==31441==    at 0x4C2F1CA: operator new(unsigned long) (vg_replace_malloc.c:334)
==31441==    by 0x820253: __gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> > >::allocate(unsigned long, void const*) (new_allocator.h:111)
==31441==    by 0x820175: std::allocator_traits<std::allocator<std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> > > >::allocate(std::allocator<std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> > >&, unsigned long) (alloc_traits.h:436)
==31441==    by 0x81FFB4: std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*>, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> > >::_M_get_node() (stl_tree.h:588)
==31441==    by 0x81FE03: std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> >* std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*>, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> > >::_M_create_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> const&>(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> const&) (stl_tree.h:642)
==31441==    by 0x81FC26: std::_Rb_tree_node<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> >* std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*>, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> > >::_Alloc_node::operator()<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> const&>(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> const&) const (stl_tree.h:556)
==31441==    by 0x81F620: std::_Rb_tree_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> > std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*>, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> > >::_M_insert_<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> const&, std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*>, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> > >::_Alloc_node>(std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> const&, std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*>, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> > >::_Alloc_node&) (stl_tree.h:1753)
==31441==    by 0x81EDFD: std::pair<std::_Rb_tree_iterator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> >, bool> std::_Rb_tree<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*>, std::_Select1st<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> > >::_M_insert_unique<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> const&>(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> const&) (stl_tree.h:2096)
==31441==    by 0x81E9F0: std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, AnimationBone*, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> > >::insert(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, AnimationBone*> const&) (stl_map.h:796)
==31441==    by 0x81E0BB: LoaderIFP::loadFromMemory(char*) (LoaderIFP.cpp:132)
==31441==    by 0x7BE5D2: GameData::loadIFP(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (GameData.cpp:506)
==31441==    by 0x7E4060: GameWorld::loadCutscene(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (GameWorld.cpp:692)
2017-10-18 21:52:29 +01:00
Anonymous Maarten
7e4e1db85d rwlib: Use ClumpPtr instead of Clump*
Should fix these memory leaks:
==22737== 14,598,040 (131,472 direct, 14,466,568 indirect) bytes in 2,739 blocks are definitely lost in loss record 3,124 of 3,126
==22737==    at 0x4C2F1CA: operator new(unsigned long) (vg_replace_malloc.c:334)
==22737==    by 0x90FE4B: LoaderDFF::loadFromMemory(std::shared_ptr<FileContentsInfo>) (LoaderDFF.cpp:443)
==22737==    by 0x7BCC86: GameData::loadModel(unsigned short) (GameData.cpp:474)
==22737==    by 0x7DF7BC: GameWorld::createInstance(unsigned short, glm::tvec3<float, (glm::precision)0> const&, glm::tquat<float, (glm::precision)0> const&) (GameWorld.cpp:144)
==22737==    by 0x7DF44C: GameWorld::placeItems(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (GameWorld.cpp:120)
==22737==    by 0x758D38: RWGame::newGame() (RWGame.cpp:116)
==22737==    by 0x786389: LoadingState::enter() (LoadingState.cpp:9)
==22737==    by 0x75DC59: void StateManager::enter<LoadingState, RWGame*, RWGame::RWGame(Logger&, int, char**)::{lambda()#1}>(RWGame*&&, RWGame::RWGame(Logger&, int, char**)::{lambda()#1}&&) (StateManager.hpp:40)
==22737==    by 0x758484: RWGame::RWGame(Logger&, int, char**) (RWGame.cpp:81)
==22737==    by 0x747815: main (main.cpp:13)
2017-10-18 21:52:29 +01:00
Filip Gawin
c5ade22377 Implement 0197-01B0 2017-10-17 22:26:15 +01:00
Filip Gawin
863d69656d Implement 00b0, 00b1 2017-10-17 22:26:15 +01:00
Filip Gawin
5cb1cd884c Implement 00a3, 00a4
As you can see, they are copies
of 0056, 0057.

32a64aa214/rwengine/src/script/modules/GTA3ModuleImpl.inl (L939)
2017-10-17 22:26:15 +01:00
Tomi Lähteenmäki
4bf1d3795b Fix jumping in newer bullet version (#328)
* Fix jumping in newer bullet version

* Added check for bullet version
jump() was changed in bullet version 2.84
2017-10-16 22:37:02 +01:00
Christoph Heiss
a347c07961 Use memcpy instead of mempcpy as mempcpy is glibc-specific.
This fixes #324 on macOS.
The only difference between memcpy and mempcpy is that mempcpy returns
a pointer one after the last written byte - the return value is unused.
2017-10-13 23:20:23 +01:00
Daniel Evans
8e86786e5b Update Character movement at each physics sub-step 2017-10-13 21:40:40 +01:00
Daniel Evans
c915521436 Use a sliding range within a larger UBO for object data.
Improves performance quite considerably (30%) on Ivy Bridge
2017-10-13 19:58:27 +01: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
Filip Gawin
7b706e11d4 Fix text colors
On gtamodding.com is list
https://www.gtamodding.com/wiki/GXT#Tokens
2017-10-13 19:48:12 +01:00
Aldoxtor
7b0b82c502 implement isPlayer() 2017-10-08 18:29:14 +01:00
Daniel Evans
7f2c512f50 Use Renderer in place of raw GL calls in more places
Additionally, fix setBlend() enabling blending on every draw
2017-10-08 18:18:28 +01:00
Filip Gawin
6d67728b4f Fix opcode 00bc
After some researches I found that,
script with opcode 03d5 removes only short
connected with sound, not cutscene's text.

Example:
aa12022061/19_8ball.sc (L164)

But in case of cutscenes, script doesn't do anything,
so logically suspecting, all opcodes connected with key word NOW,
are flushing currently used text.

aa12022061/19_8ball.sc (L862)
2017-10-08 14:37:16 +01:00
Filip Gawin
26e7d57905 Fix opcode 03d5
As you can see in script:
https://github.com/Lighnat0r/GTA-III-SCM-Converted/search?utf8=%E2%9C%93&q=03d5&type=
Opcode 03d5 is cleaning only after 00BC.

00BC is using HighPriority, not Big.
2017-10-08 14:37:16 +01:00
Filip Gawin
cc61d3858d Implement opcodes arg = abs(arg)
Commit implements 0094, 0095,
0096, 0097
2017-09-28 22:21:53 +01:00
Filip Gawin
ca819e9ddc Implement opcodes feet --> meters
Implement 0425, 042D.
2017-09-28 22:21:53 +01:00
Filip Gawin
a6d153b163 Implement opcodes int <--> float
Implements 008c, 008d, 008e, 008f,
0090, 0091, 0092, 0093.
2017-09-28 22:21:53 +01:00
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
Daniel Evans
46a68de406 Fix header guard in ModelData.hpp 2016-09-11 02:59:02 +01:00
Daniel Evans
707ee4b32a Rename ObjectData.hpp -> ModelData.hpp 2016-09-11 02:59:02 +01:00
Daniel Evans
e888d04303 clang-format files in rwengine/src/render 2016-09-09 21:13:20 +01:00
Daniel Evans
1e4d7ea133 clang-format files in rwengine/src/data 2016-09-09 21:13:20 +01:00
Daniel Evans
6444bca8db clang-format files in rwengine/src/loaders 2016-09-09 21:13:19 +01:00
Daniel Evans
83cfb4d1e3 clang-format files in rwengine/src/audio 2016-09-09 21:13:19 +01:00
Daniel Evans
869c15a4ea clang-format files in rwengine/src/script/modules 2016-09-09 21:13:19 +01:00
Daniel Evans
b064ad2aeb clang-format files in rwengine/src/script 2016-09-09 21:13:19 +01:00
Daniel Evans
f2eede5301 clang-format files in rwengine/src/objects 2016-09-09 21:13:19 +01:00
Daniel Evans
305737cc3d clang-format files in rwengine/src/items 2016-09-09 21:13:19 +01:00
Daniel Evans
80e6317c24 clang-format files in rwengine/src/engine 2016-09-09 21:13:19 +01:00
Daniel Evans
8534d7ff5d clang-format files in rwengine/src/dynamics 2016-09-09 21:13:18 +01:00
Daniel Evans
d5e853d23f clang-format files in rwengine/src/ai 2016-09-09 21:13:18 +01:00
Daniel Evans
9aa3af6703 clang-format files in rwengine/src/core 2016-09-09 21:13:18 +01:00
Daniel Evans
36a2c57d91 clang-format files in rwengine/src 2016-09-09 21:13:18 +01:00
Daniel Evans
43c2f00f47 Correct header guard and missing include in CollisionModel 2016-09-09 20:16:51 +01:00
Daniel Evans
239d19a310 Don't cast from wide chars to chars on windows 2016-09-09 00:07:17 +01:00
PerikiyoXD
62d0bf796a Fixed .native() and some cast errors
Signed-off-by: PerikiyoXD <perikiyoxd@gmail.com>
2016-09-08 21:17:30 +02:00
Daniel Evans
0abfc695fb Remove GameData::openFile
The openFile API is not useful for implementing the correct
behaviour, so the underlying FileIndex method will be removed
soon.
2016-09-07 22:06:38 +01:00
Daniel Evans
0be8586135 Improve indentation of loadLevelFile 2016-09-07 22:06:38 +01:00
Daniel Evans
930e10ce16 Rename parseDAT to loadLevelFile
There are many dat files in the game, but this function
only deals with the the level files
2016-09-07 22:06:38 +01:00
dan
5e0659fccf Remove now unused fixPath function 2016-09-07 22:06:38 +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
dan
306f6fa9d7 Use findFilePath when loading data files
This should make file loading more reliable for case sensitive
operating systems.
2016-09-07 00:42:27 +01:00
Daniel Evans
674ce55af3 Replace findPathRealCase with FileIndex methods
This introduces indexGameDirectory and findFilePath.
indexGameDirectory indexes the files in the game directory.
findFilePath returns the on-disk location of a case-insensitive
game data path.
2016-09-06 00:23:25 +01:00
Jannik Vogel
fd6be733e0 Use correct int-width in State block 16 and 17 2016-09-02 15:33:45 +02:00
Daniel Evans
95a0e31484 Merge pull request #222 from JayFoxRox/radar-blips
Coloured radar-blips and radardisc z-order
2016-09-01 21:00:28 +01:00
haphzd
ae75254848 Fix mingw build 2016-09-01 00:56:14 +03:00
Daniel Evans
904817cb9e Merge pull request #221 from JayFoxRox/hide-objects
Script: Implement opcode_0363 (Object visibility)
2016-08-31 22:08:25 +01:00
Daniel Evans
53a77d26ed Merge pull request #220 from Mischa-Alff/tobj
Fixes #219: Take TOBJ data into account when building render lists
2016-08-31 22:07:50 +01:00
Jannik Vogel
1e265b0e9c Script: Correct colour/size for location-radar-blips 2016-08-31 00:28:58 +02:00
Jannik Vogel
270b0ce8be Script: Correct colour/size for object-radar-blips 2016-08-31 00:28:58 +02:00
Jannik Vogel
635d10abfa Script: Implement 0188 2016-08-31 00:28:58 +02:00
Jannik Vogel
6117be689d Script: Support MarkerOnly in 018B 2016-08-31 00:23:02 +02:00
Jannik Vogel
2fdde9a94f Draw colored radar-blips 2016-08-31 00:23:02 +02:00
Jannik Vogel
c379c5d5e4 Extend BlipData with colour/size 2016-08-31 00:23:02 +02:00
Jannik Vogel
7d96f28ab9 Seperate radar blip setup and drawing 2016-08-31 00:23:02 +02:00
Jannik Vogel
d9e202faba MapRenderer::draw cleanup 2016-08-31 00:23:02 +02:00
Jannik Vogel
10dba6dbf3 Use a triangle-fan for radar-sprites (allows outline drawing) 2016-08-31 00:23:02 +02:00
Jannik Vogel
de62bd2bd9 Only draw arrow-markers which are not hidden 2016-08-31 00:23:02 +02:00
Jannik Vogel
e99cfd3979 Only draw radar-blips which are not hidden 2016-08-31 00:23:02 +02:00
Jannik Vogel
2d3a8856da Draw blips after radar-north and player-marker 2016-08-31 00:23:02 +02:00
Jannik Vogel
e2a27711b2 Script: Implement opcode_0363 2016-08-31 00:12:38 +02:00
Daniel Evans
cd0f15bdb9 Use plain references for Local and Global script types 2016-08-30 19:57:47 +01:00
Daniel Evans
23752c33fa Fix post-mission cleanup: actually destroy objects 2016-08-30 19:57:47 +01:00
Daniel Evans
34bdfbacfa Remove old script modules 2016-08-30 19:57:47 +01:00
Daniel Evans
51cd277610 Implement various object related opcodes 2016-08-30 19:57:38 +01:00
Daniel Evans
0dd292ba28 Implement text opcodes 2016-08-30 19:56:41 +01:00
Daniel Evans
6f8364a9e8 Implement game opcodes 2016-08-30 19:56:39 +01:00
Daniel Evans
4aea8cc6aa Implement arithmetic opcodes 2016-08-30 19:51:25 +01:00
Daniel Evans
4344bf40c3 Implement VM opcodes 2016-08-30 19:51:25 +01:00
Daniel Evans
e6c62d15e5 Add generated stubs from script interface descriptions 2016-08-30 19:51:19 +01:00
Daniel Evans
d25c1a45a6 Add Script interfaces to support generated functions 2016-08-30 19:46:59 +01:00
Mischa Aster Alff
a56b25d4cd Change default object timeOff from 0 to 24
Remove now-useless check in ObjectRenderer
2016-08-28 14:32:34 +02:00
Mischa Aster Alff
397e8ecba8 Take TOBJ data into account when building render lists 2016-08-28 14:25:03 +02:00
Jannik Vogel
8e2dca9cfa MinGW: rwengine depends on mman 2016-08-23 23:09:52 +02:00
Jannik Vogel
bdfa30729f Replace uses of cmath constants by glm 2016-08-23 23:05:22 +02:00
Daniel Evans
3a53089d68 Merge pull request #190 from tsjost/fix/timecheat
Add method to modify game time properly
2016-08-23 00:28:54 +01:00
Daniel Evans
f82d48d52a Add constants for non alphanumeric symbols 2016-08-23 00:05:25 +01:00
Daniel Evans
3123571894 Convert save games to use GameStringChar 2016-08-23 00:05:18 +01: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
Timmy Sjöstedt
03d27a0e80 Implemented method to modify game time properly 2016-08-17 01:03:31 +02:00
Daniel Evans
e449a25071 Replace hack with correct font-map lookup function 2016-08-16 21:46:53 +01:00
Daniel Evans
222c3df68d Correct header guards in text related headers 2016-08-16 21:46:53 +01:00
Christoph Heiss
664451f63c Fix -Winconsistent-missing-override warnings
Fixes all occurences of this warning:
warning: '<method-name>' overrides a member function but is not marked
      'override' [-Winconsistent-missing-override]
2016-08-14 18:57:18 +02:00
Christoph Heiss
180ca626a5 Fix -Wmismatched-tags warnings
Fixes all occurences of this warning:
warning: '<type>' defined as a struct here but previously declared as a class
      [-Wmismatched-tags]
2016-08-14 18:57:18 +02:00
Daniel Evans
771fafbd0e Merge pull request #203 from danhedron/fix-vehicle-doors
Fix entering & exiting vehicle animations
2016-08-14 00:37:12 +01:00
Kamil Rytarowski
0ef224df90 Add preliminary NetBSD support
The iconv(3) function on NetBSD has a custom prototype due to old mistake in
the POSIX specification. The issue has been resolved but we keep using original
form with a constified parameter.
2016-08-13 21:33:04 +02:00
Daniel Evans
2f0b24c6ea Merge pull request #188 from danhedron/feature/cleanup-script
Script cleanup and remove old tool
2016-08-12 23:36:26 +01:00
Daniel Evans
e7d14ffc25 Add right side animations to vehicle entering / exit list 2016-08-12 23:31:04 +01:00
Daniel Evans
9ac62d6521 Fix crash when entering vehicles without doors 2016-08-12 23:26:00 +01:00
Daniel Evans
ebc312bc9e Merge pull request #198 from JayFoxRox/seats
Refactor seat storage, fixes entering wrong seat
2016-08-12 19:27:05 +01:00
Jannik Vogel
b0a2e79599 Refactor seat storage, fixes entering wrong seat 2016-08-12 16:39:29 +02:00
Jannik Vogel
a70931ee7c Remove screen-door fade-in effect 2016-08-12 15:57:17 +02:00
Jannik Vogel
778ca63803 Script: Initialize globals from SCMFile 2016-08-12 02:14:15 +02:00
Jannik Vogel
6277d7981b Script: Refactor player_near_point script functions 0xF5 - 0xFA 2016-08-12 02:14:15 +02:00
Jannik Vogel
f82beeefac Avoid error in substr if short modelname in LOD selection 2016-08-12 02:14:15 +02:00
Jannik Vogel
f591c66422 Avoid crash if scriptOnMissionFlag is not linked 2016-08-12 02:14:15 +02:00
Jannik Vogel
571fd08631 Replace strcasecmp with boost::iequals 2016-08-12 02:14:15 +02:00
Jannik Vogel
cb347143f8 Cleanup: Replace non-std C++ code 2016-08-12 02:14:15 +02:00
Jannik Vogel
bda0107bb1 Cleanup: include-what-you-use 2016-08-12 02:14:15 +02:00
Jannik Vogel
9d34a16fbc Cleanup: Remove empty FileArchive.hpp 2016-08-12 02:14:15 +02:00
Jannik Vogel
623e3c16a5 Fix Bullet #include paths 2016-08-12 02:14:15 +02:00
Daniel Evans
6ad05a3110 Remove unused UnimplementedOpcode exception 2016-08-12 01:02:24 +01:00
Daniel Evans
8a985309f9 Remove breakpoint system from ScriptMachine 2016-08-12 01:02:24 +01:00
Daniel Evans
0a982c1fca Remove useless include 2016-08-12 01:02:24 +01:00
Daniel Evans
d414991d68 Correct script include guards 2016-08-12 01:02:24 +01:00
Daniel Evans
d9aded5415 Cleanup SCMFile 2016-08-12 01:02:24 +01:00
Daniel Evans
81c1bb947d Improve debug output of script 2016-08-12 01:02:24 +01:00
Daniel Evans
d8841c7561 Remove include directory from rwengine for consistency 2016-08-07 14:41:45 +01:00
Daniel Evans
85b24231f5 Don't glob for files in rwengine CMakeLists.txt 2016-08-07 14:30:21 +01:00
darkf
0242868caa Use boost::make_iterator_range, as older boost lacks ranges in filesystem iterators 2016-08-06 08:43:28 -07:00
darkf
62532107ee Rewrite SaveGame::getAllSaveGameInfo to use boost::filesystem 2016-08-03 18:31:47 -07:00
darkf
40705a6666 Rewrite findPathRealCase to use boost::filesystem, move it to FileIndex 2016-08-03 18:31:47 -07:00
Timmy Sjöstedt
756ddf2df2 Removed GL_ARB_explicit_attrib_location extension 2016-08-03 19:00:20 +02:00
Timmy Sjöstedt
1500b6acbb Removed GL_ARB_uniform_buffer_object extension 2016-08-03 18:56:50 +02:00
darkf
6d6d772653 Open binary files in binary mode 2016-08-02 04:38:35 -07:00
darkf
77ca9054c6 De-initialize OpenAL 2016-08-02 04:38:34 -07:00
darkf
a574649dce Silence a lot of warnings 2016-08-02 04:31:12 -07:00
Daniel Evans
f3151fe0b7 Merge pull request #166 from danhedron/feature/input-improvements
Seperate Input state from binding
2016-08-01 20:06:37 +01:00
Daniel Evans
c48bc26c1e Merge pull request #158 from danhedron/feature/physics-overhaul-1
MotionStates & physics cleanup
2016-08-01 19:32:30 +01:00
haphzd
114abe2286 Windows/MinGW-W64 compatibility 2016-07-28 14:46:48 +03:00
Daniel Evans
c2fc2359e3 Add primitive sprint behaviour 2016-07-02 20:51:30 +01:00
Daniel Evans
91428fbff1 Use input state for player movement 2016-07-02 20:51:30 +01:00
Daniel Evans
cf2347ba02 Disable un-latching of vehicle parts during damage
The implementation currently causes crashes when vehicles are deleted
2016-07-02 20:37:05 +01:00
Daniel Evans
21d103642e Add bullet motion states for dynamic vehicle parts 2016-07-02 20:37:04 +01:00
Daniel Evans
f860e4c9a7 Overhaul object transformation handling
Objects must now write back to their position and rotations using
updateTransform(position, rotation) to updae their transform. This
allows the getPosition and getRotation methods to become non virtual
2016-07-02 20:37:04 +01:00
Daniel Evans
b3fe87c2ea Clean up CollisionInstance and some of VehicleObject 2016-07-02 20:37:04 +01:00
Daniel Evans
280f83ecc7 Remove defunct grid code 2016-07-02 20:33:25 +01:00
Daniel Evans
cd0a11d899 Merge pull request #164 from JayFoxRox/fix-taxi
Stub Taxi-Mission
2016-07-02 17:51:04 +01:00
Daniel Evans
50e059daf0 Add GameInputState to store all control state 2016-07-02 17:23:01 +01:00
Daniel Evans
600333e20b Merge pull request #159 from danhedron/feature/traffic-vehicles
Parked traffic and out-of-view spawning
2016-06-29 23:04:00 +01:00
Daniel Evans
30e4a7faf1 Merge pull request #137 from haphzd/patch-1
File loading improvements
2016-06-29 22:26:58 +01:00
Jannik Vogel
7deeda71f5 Script: Fix 01D3 (game_character_exit_vehicle) 2016-06-29 21:06:08 +02:00
Jannik Vogel
86afe4761a Script: 01AC (Is Vehicle Stopped in volume) 2016-06-29 21:06:08 +02:00
Jannik Vogel
6491acf035 Script: 01FB (Sqrt) and 0209 (Random Int in Range) 2016-06-29 21:06:08 +02:00
Jannik Vogel
bb3b879848 Script: 0291 (Set Character Attack When Provoked) 2016-06-29 21:06:08 +02:00
Jannik Vogel
ec2e70e3bf Script: 0216 (Set Taxi Available Light) 2016-06-29 21:06:08 +02:00
Jannik Vogel
27ba6756dd Script: 020F (Turn Character to Face Player) 2016-06-29 21:06:08 +02:00
Jannik Vogel
5895fca398 Script: 0365 (Set Character Objective to Hail Taxi) 2016-06-29 21:06:08 +02:00
Jannik Vogel
159f2463ef Script: 0319 (Set Character Running) 2016-06-29 21:06:08 +02:00
Jannik Vogel
cbd5637fdd Script: 02DD (Get Random Character In Zone) 2016-06-29 21:06:08 +02:00
Jannik Vogel
81b5dd2f36 Script: 0185 (Is Vehicle Health Greater Than) 2016-06-28 15:30:29 +02:00
Jannik Vogel
88e205df7f Script: 00FD (Is Player in Vehicle Near Character) 2016-06-28 15:30:29 +02:00
Jannik Vogel
bac779b53d Script: 00A0 (Get Character Position) 2016-06-28 15:30:29 +02:00
Jannik Vogel
e5e3ed7b1e Script: 0315 (Increment Taxi Dropoffs) and 0316 (Register Taxi Money) 2016-06-28 15:30:29 +02:00
Jannik Vogel
d3c70140cf Script: 018C (Play Sound At) 2016-06-28 02:39:00 +02:00
Jannik Vogel
d1131a63a8 Add isStopped() in VehicleObject and CharacterObject 2016-06-28 02:39:00 +02:00
Daniel Evans
b6d8618e6f Spawn at ground level if vehicle generator z is < -90 2016-06-27 23:37:47 +01:00
Daniel Evans
d2ec218f89 Restore vehicle generators from save data 2016-06-27 22:55:13 +01:00
Daniel Evans
69e7d32f3a Use view frustum for traffic spawning and cleanup 2016-06-27 22:33:22 +01:00
Daniel Evans
50eee4e5ff Implement static VehicleGenerator traffic 2016-06-27 22:33:22 +01:00
Jannik Vogel
c5083701ea Script: 036D (Print Big With 2 Numbers) 2016-06-27 02:05:34 +02:00
Jannik Vogel
86d31328c3 Script: 00BD (Print Message Soon) 2016-06-27 02:05:34 +02:00
Jannik Vogel
37e0ba943e Script: 008C (Floor Float To Int) 2016-06-27 01:44:51 +02:00
Jannik Vogel
089d0efe5b Script: 0069 (Multiply Global Float by Global Float) 2016-06-27 01:44:51 +02:00
Jannik Vogel
3869cd608a Script: 0058 (Increment Global Integer by Global Integer) and 0059 (Increment Global Float by Global Float) 2016-06-27 01:44:51 +02:00
Jannik Vogel
9042e235a8 Script: 003A (Global Int Equal to Global Int) 2016-06-27 01:44:51 +02:00
Jannik Vogel
004f42504a Script: 001F (Local Int Greater than Global Int) 2016-06-27 01:44:50 +02:00
Jannik Vogel
6f49cc579a Script: 0010 (Multiply Global Int by Int) and 0014 (Divide Global by Integer) 2016-06-27 01:44:50 +02:00
Jannik Vogel
709cbc5686 Fix vm_int_ge_global_int and vm_global_int_eq_int 2016-06-27 01:44:50 +02:00
Jannik Vogel
3789a8454d Fix game_add_location_blip by using realValue() 2016-06-27 01:44:50 +02:00
Jannik Vogel
ae7b70bed9 Introduce realValue() to load script real from var or immediate automaticly 2016-06-27 01:44:50 +02:00
haphzd
593aa73bda Use existing file loading method for SCM 2016-06-26 13:25:26 +03:00
haphzd
e82be612a1 Open binary files in binary mode 2016-06-26 13:24:43 +03:00
Jannik Vogel
cf33ef8ca6 Hardwire sub-mission button in is_button_pressed to player->isRunning() 2016-06-25 23:40:12 +02:00
Daniel Evans
a58486fc4f Merge pull request #147 from danhedron/fix/script-opcode-1
Fix opcodes 0x0213 & 0x032B
2016-06-25 22:34:43 +01:00
Daniel Evans
4568a2aebb Merge pull request #155 from aap/feature-vertex-colours
Implemented proper RW-style shading for world objects, in particular …
2016-06-25 21:48:02 +01:00
Daniel Evans
fddc254812 Re-enable opcode 0x3DD: required opcode 0x32B now implemented 2016-06-25 21:35:34 +01:00
Daniel Evans
9307dedbbe 0x32B: Implement additional pickup opcode 2016-06-25 21:34:57 +01:00
Daniel Evans
75fd42e29b Add GameWorld::createPickup() and improve opcode 0x213 implementation 2016-06-25 21:33:37 +01:00
Daniel Evans
4ff4515ad7 add getModel to ScriptArguments to lookup script models 2016-06-25 20:39:01 +01:00
Daniel Evans
f2eaa05759 Improve integerValue function for script parameters 2016-06-25 20:38:38 +01:00
Daniel Evans
9aaeb2ceda Remove screenshot functionality, as it's broken. 2016-06-23 22:43:00 +01:00
aap
a01e190c6a Implemented proper RW-style shading for world objects, in particular vertex colours 2016-06-23 23:29:52 +02:00
Jannik Vogel
9bfb9f8002 CMake: Use FindSDL2.cmake 2016-06-22 23:58:27 +02:00
Christoph Heiss
3281e31dda Fix build on OS X 2016-06-22 12:32:10 +02:00
Christoph Heiss
649f7b144d Replace SFML with SDL2
This entirely replaces all remaining SFML pieces with SDL2 and
brings OpenRW up to OpenGL 3.3
2016-06-22 12:29:39 +02:00
Christoph Heiss
938a2e4bfc Introduce Renderer::readPixels
This is needed for taking screenshots.
2016-06-22 11:14:47 +02:00
Jannik Vogel
3400603f64 Script: 0243 (Set Character Personality) 2016-06-16 01:04:05 +02:00
Jannik Vogel
45d22e42bb Script: 01CC (Set Character Objective to Kill Player by Any Means) 2016-06-16 01:03:54 +02:00
Jannik Vogel
e961ff26cc Script: 039C (Set Car Watertight) 2016-06-16 01:03:47 +02:00
Jannik Vogel
e731f8d989 Script: 02AA (Set Car Only Damageable by Player) 2016-06-16 01:03:47 +02:00
Jannik Vogel
a19e10e26d Script: 00AF (Set Vehicle Objective) 2016-06-16 01:03:47 +02:00
Jannik Vogel
e2afae66ea Script: 0227 (Get Vehicle Health) 2016-06-16 01:03:47 +02:00
Jannik Vogel
cdb67956ee Script: 01C8 (Create Character as Passenger) 2016-06-16 01:03:47 +02:00
Jannik Vogel
95390d5fb3 Script: 02BF (Is Vehicle in Water) 2016-06-16 01:03:47 +02:00
Jannik Vogel
490f5f2cb0 Script: 01AD (Locate Vehicle Near Point 2D) 2016-06-16 01:03:47 +02:00
Jannik Vogel
7fbdc0d86f Script: 03DD (Add Sprite Blip for Pickup) 2016-06-16 01:03:46 +02:00
Jannik Vogel
0944ab7dab Fix signedness warning in game_give_weapon_to_character 2016-06-16 01:03:46 +02:00
Daniel Evans
d8b46b24c0 Fix door closing logic to require door be open for a time 2016-06-15 22:11:07 +01:00
Daniel Evans
ff96a460a0 Implement carjacking 2016-06-15 22:05:00 +01:00
Daniel Evans
ce4d5061e8 Merge pull request #141 from danhedron/fix/opcodes-1
Fix opcodes 0121 & 0395
2016-06-11 13:44:52 +01:00
Sam Nicholls
99ec7b5a6e Attempt to remove compiler warning //?? (#104)
* Attempt to remove compiler warning
2016-06-11 12:58:11 +01:00
Daniel Evans
636f0db9e5 0x395: Don't delete the player in game_clear_area 2016-06-10 08:13:56 +01:00
Daniel Evans
98d690a13f 0x0121: Use template to determine parameter type 2016-06-10 08:13:41 +01:00
Jannik Vogel
384f6bced8 Script: 0199 (Is Player In Area Or Cylinder) 2016-06-04 18:50:51 +02:00
Jannik Vogel
cfb5dfbf1d Script: 03BC and 03BD (Create Cylinder / Destroy Cylinder) 2016-06-04 18:50:51 +02:00
Jannik Vogel
a87df6579e Script: 0329 (Has Respray Happened) 2016-06-04 18:50:50 +02:00
Jannik Vogel
c5269eeb6a Script: 0335 (Set Free Respray) 2016-06-04 18:50:50 +02:00
Jannik Vogel
37dbd5a8ed Script: 0395 (Clear Area Vehicles and Pedestrians) 2016-06-04 18:50:50 +02:00
Jannik Vogel
340b2f7159 Don't replace nearby vehicles / characters on creation 2016-06-04 18:50:50 +02:00
Jannik Vogel
8bf6780e84 Spawn script cars on ground level 2016-06-04 18:50:50 +02:00
Daniel Evans
1f5fcb16ca Merge pull request #121 from JayFoxRox/improve-text
Improve text styles
2016-06-04 17:41:32 +01:00
Daniel Evans
5d203ee59c Merge pull request #122 from JayFoxRox/fix-fishgen
Fix FISHGEN
2016-06-04 17:31:48 +01:00
Jannik Vogel
6fda71329f Script: 03EC (Has Crane Collected All Cars) 2016-06-04 17:23:52 +02:00
Jannik Vogel
b7970c4915 Script: 03D4 (Import Garage Contains Needed Car) 2016-06-04 17:23:52 +02:00
Jannik Vogel
fbb02e14fb Load import / export garage lists from savegame 2016-06-04 17:23:52 +02:00
Jannik Vogel
ab130d3ba1 Fix typo for script opcode 03AD 2016-06-04 17:23:51 +02:00
Jannik Vogel
53ee6443ef Script: 01C2 (Mark Character as Unneeded) 2016-06-03 02:40:14 +02:00
Jannik Vogel
9c8f01629f Script: 011A (Set Character Search Threat) 2016-06-03 02:30:41 +02:00
Jannik Vogel
817247ed1e Script: 009C (Set Character Wander Path) 2016-06-03 02:30:41 +02:00
Jannik Vogel
63aae5a452 Script: 01B2 (Give Weapon to Character) 2016-06-03 02:30:41 +02:00
Jannik Vogel
8770f954c0 Support all text markup-colours 2016-06-02 19:11:22 +02:00
Jannik Vogel
823891a84e Fix shadow position for HighPriority-text 2016-06-02 18:58:09 +02:00
Jannik Vogel
5780aaa4f7 Document, improve and add all styles for Big-text 2016-06-02 18:58:09 +02:00
Jannik Vogel
6bb43324a2 Support negative shadow offsets for texts and force shadow colour 2016-06-02 18:57:54 +02:00