1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-13 22:24:17 +01:00
Commit Graph

1071 Commits

Author SHA1 Message Date
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
Jannik Vogel
87bed4cf0f Script: 021B (Set Target Car for Mission Garage) 2016-06-02 18:18:28 +02:00
Jannik Vogel
8c72bd33fb Script: 0422 (Garage Contains Car) 2016-06-02 18:18:28 +02:00
Jannik Vogel
52477013f3 Script: 021C (Is Car Inside Garage) 2016-06-02 18:18:28 +02:00
Jannik Vogel
f850e401cf Script: 02FB (Create Crusher Crane) 2016-06-02 18:01:36 +02:00
Jannik Vogel
830b295867 Make it more obvious that create_garage returns an index 2016-06-02 17:51:22 +02:00
Jannik Vogel
e5014e29f9 Add function to disable collision for InstanceObjects 2016-06-02 17:47:22 +02:00
Daniel Evans
42ef84998a Merge pull request #99 from JayFoxRox/fix-luigi3
Partially fix LUIGI3 (Drive Misty For Me)
2016-05-31 00:22:48 +01:00
Daniel Evans
ddb2457674 Merge pull request #98 from JayFoxRox/load-objects
Create object instances from savegame
2016-05-30 23:53:07 +01:00
Daniel Evans
bf8ea869fb Merge pull request #110 from JayFoxRox/flags-depth-write
Enable / Disable depth writing
2016-05-30 23:03:09 +01:00
Timmy Sjöstedt
4909e68b82 Added explanatory comments to MADStream 2016-05-30 23:44:42 +02:00
Timmy Sjöstedt
5a8b5a603f More alCheck calls 2016-05-30 20:06:34 +02:00
Timmy Sjöstedt
0d443cc535 Improved sound/music loading. No temporary objects 2016-05-30 20:06:34 +02:00
Timmy Sjöstedt
08b45b6c12 Sleep while waiting for OpenAL buffers to become available 2016-05-30 20:06:34 +02:00
Timmy Sjöstedt
d715cfe24a Make the right part of the code store the name of loaded audio
Otherwise game_play_music_id thinks that the audio hasn't loaded
2016-05-30 20:06:34 +02:00
Timmy Sjöstedt
ccabc6f1d8 Improved music map access 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
f40a0cf29f Make the SoundManager OpenAL context current 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
fef71de074 Removed SFML audio things 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
14e712f202 Wait for buffers to become available before uploading data 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
63986edca4 Make libmad decoder run in a thread 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
6a1a204728 Upload audio data to OpenAL 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
963f4c62ea Make cutscene audio use SoundManager 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
5294b40c40 Implement stopMusic method 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
861dbf0c2a Implemented playMusic method 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
6a14dc3e02 Implemented loadMusic method 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
7a5bbea3a3 Keep track of where to write into the circular buffer 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
b539b09975 Set up OpenAL buffers etc for MADStream 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
62243b0382 Move alCheck macrofunction into its separate files 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
58fdcd47dc Moved static scale function into MADStream 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
fa13ace921 Moved MADStream implementation to source file 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
6afc4e7147 Make mission sounds use new audio system 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
9a2bb1b156 Reimplement background noise things 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
2bf0500a34 Implemented pauseSound method 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
ad137421fb Implemented isPlaying method 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
59a7189ab3 Implemented playSound method 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
91c1374b89 Implemented isLoaded method 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
830922c9ca Removed old PlayingSound struct 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
667031c51f Implemented loadSound method 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
f43e13359a Added Sound struct 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
cd0109af82 Added simple method to initialize OpenAL 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
6f8b006787 Implement SoundBuffer class to handle OpenAL uploads 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
0d01be5b27 Implemented SoundSource class to handle libsndfile loading 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
9fcd3433b3 Add OpenAL error checking macro + function 2016-05-30 20:06:33 +02:00
Timmy Sjöstedt
f5390ad4a6 Include libsndfile & OpenAL 2016-05-30 20:06:13 +02:00
Jannik Vogel
9e8d279181 Respect z-write disable from instance objects 2016-05-30 17:14:41 +02:00
Jannik Vogel
fbbb1cfbbf Add @todo that the Blend state setter is broken 2016-05-30 17:14:41 +02:00
Jannik Vogel
9ccbafb03a Add depth-write permission to Renderer 2016-05-30 17:14:41 +02:00
Jannik Vogel
51a013cf34 Replace GTA SA flags with GTA3 flags 2016-05-30 17:14:41 +02:00
Jannik Vogel
67fe32b3a1 Script: 0122 (Is Player Pressing Horn) and 0126 (Character Objective Passed) 2016-05-27 13:28:35 +02:00
Jannik Vogel
574891e57e Script: 00E6, 00E8 and 00EF (Locate .. stopped .. 2D) 2016-05-27 13:28:35 +02:00
Jannik Vogel
ce50e47ab6 Script: 0042 (Global Float Equal to Foat) 2016-05-27 13:28:35 +02:00
Jannik Vogel
adeb39c59b Script: 0443 (Is Player In Any Vehicle) 2016-05-27 13:28:35 +02:00
Jannik Vogel
68f7291c3c Script: 034F (Destroy Character with Fade) 2016-05-27 13:28:35 +02:00
Jannik Vogel
0d089c9f5d Script: 0176 (Get Object Heading) 2016-05-27 13:28:29 +02:00
Jannik Vogel
3271579621 Create object instances from savegame 2016-05-27 13:02:20 +02:00
Jannik Vogel
7e3eb744f8 Fix wrong name in RW_UNIMPLEMENTED for game_has_death_or_arrest_finished 2016-05-27 00:50:35 +02:00
Daniel Evans
6422c8ae97 Move blip object lookup and make arrows work again. 2016-05-26 21:49:26 +01:00
Daniel Evans
50cf4293e4 Give blips the correct type.
Fixes #94
2016-05-26 20:59:15 +01:00
Daniel Evans
b23a81063d Implement ammo: ammo tracking and pickups
Fixes #47
2016-05-26 00:44:09 +01:00
Daniel Evans
327ac49e64 Only alive characters should perform activities.
Fixes #81
2016-05-26 00:40:22 +01:00
Daniel Evans
eef34c972a Script pickups: implement weapon pickups, improve pickup code 2016-05-25 23:00:52 +01:00
Daniel Evans
230ad972f0 Add world space distance fog 2016-05-25 23:00:52 +01:00
Daniel Evans
f8a90a5eb6 Take far plane distance from the correct camera 2016-05-25 23:00:52 +01:00
Daniel Evans
b7ac33caec Improve activities: canSkip(), let player cancel vehicle enter.
Closes #32
2016-05-24 23:49:01 +01:00
Daniel Evans
040f216407 Don't jump if the player doesn't exist 2016-05-24 23:38:12 +01:00
Daniel Evans
451479e454 Improve vehicle exit: stop before exiting. Closes #31 2016-05-24 21:14:41 +01:00
Daniel Evans
369edcee4f Reorg. ObjectRenderer and add missing texture texture. 2016-05-24 01:20:59 +01:00
Daniel Evans
96b26c9237 Remove transparentDrawQueue as it's no longer used by rwgame 2016-05-23 22:05:51 +01:00
Daniel Evans
86fcaf0c7d Improve GoTo activity: stop moving when we reach the destination. 2016-05-23 21:40:55 +01:00
Daniel Evans
478cbf6187 Make forward direction part of character state to simplify
This allows activities to make the final call about what direction a
character should be facing based on the direction they want to be
looking.
2016-05-23 21:40:55 +01:00
Daniel Evans
0d2e34ab58 Make characters give up trying to enter vehicles if they're too far away 2016-05-23 21:40:55 +01:00
Daniel Evans
ddcafc17aa Re-enable screen fade 2016-05-23 21:40:55 +01:00
Timmy Sjöstedt
c8693135f9 Removed unnecessary boost inclusion 2016-05-23 02:57:01 +02:00
Daniel Evans
ede0cf762f Fix some uninitialized reads 2016-05-22 23:45:19 +01:00
Timmy Sjöstedt
9c9900db55 Initialize BasicState struct in GameState, fixes #26 2016-05-22 23:15:35 +02:00
Daniel Evans
459a853670 Fix and update script functions to handle player objects 2016-05-22 20:05:44 +01:00
Daniel Evans
b58cc9b164 Restore script debugging features to trace script threads 2016-05-22 20:05:04 +01:00
Daniel Evans
39c639fc60 Overhaul ingame camera implementation, much better now. 2016-05-21 19:13:27 +01:00
Daniel Evans
8e629fd2ab Add null check for the water texture 2016-05-21 15:58:27 +01:00
Daniel Evans
d64f9a9ffc Add compile time draw distance multiplier for testing.
In the future this should be a runtime option controlled by the game
configuration.
2016-05-21 14:32:23 +01:00
Daniel Evans
1a2a3811f9 Initialise suspension length to 0 2016-05-21 13:11:05 +01:00
Daniel Evans
ca92e1e0aa Fix crash when script attempts to delete null object. Closes #30 2016-05-21 03:00:41 +01:00
Daniel Evans
3e43eb61be Add spawn offset to script set object position function 2016-05-21 02:34:24 +01:00
Christoph Heiss
4c2c42ef6a Fix some OS X/Clang (build) errors.
For rwengine/src/engine/GameData.cpp, `#ifdef __unix__` is used, which
Clang on OS X does not define, thus not finding files while loading.
2016-05-20 16:28:47 +02:00
Timmy Sjöstedt
dff96b7293 Make OpenGLRenderer use correct preprocessor check for profiler 2016-05-20 01:40:11 +02:00
Daniel Evans
9f85f283cb CMake: FindSFML+FindMAD, set library paths as SYSTEM, remove dead stuff. 2016-05-19 22:30:06 +01:00
Daniel Evans
5721333fb0 Overhaul script text display with new text logic system.
Logic for displaying text now belongs in ScreenText, which will
handle type specific text display.
2016-05-07 18:29:08 +01:00
Daniel Evans
e7faa60926 Make unit tests work again, fixing tests & code 2016-05-02 17:38:04 +01:00
Daniel Evans
9bc535d243 Fix uninitalized read in cutscene loading 2016-05-02 17:20:42 +01:00
Daniel Evans
d2f254731a Increase warnings to pedantic and fix rwlib/rwengine warnings 2016-05-01 22:30:15 +01:00
Daniel Evans
0057f76630 fix uninitialized member in GameRenderer 2016-05-01 22:26:59 +01:00
Daniel Evans
185ba23f05 Fix all compiler warnings in rwengine. 2016-04-28 00:54:42 +01:00
Daniel Evans
637a6b97ab Fix compliler error with profiling disabled 2016-04-27 00:18:57 +01:00
Daniel Evans
84c276002c Improve rendering to support screen door transparency for LODs.
The LOD selection and fade logic has been changed to be more.. correct.
The fading now uses screen door transparency so the faded objects don't
need to be sorted with the actually transparent objects.
2016-04-26 23:40:43 +01:00
Daniel Evans
b0a2ae4da5 Implement a trivial profiler for perf. overview 2016-04-26 23:35:04 +01:00
Daniel Evans
3e9b0c64e4 Re-implement object rendering using a depth-sorted approach.
This moves the object rendering logic into ObjectRenderer. This makes
GameRenderer a bit smaller.

There are some rendering logic decisions that haven't been brought
back yet since they may be better placed elsewhere.
2016-04-19 01:20:54 +01:00
Daniel Evans
8a5be54b91 Overhaul animation system and character activities
Replaces animator with a simpler system that can overlay multiple
animations

Character animation split into two layers, motion and action.
Walking, running and jumping animations are played on the first
layer, actions such as firing can be overlayed on the second.
More work is needed to limit overlap to only the weapons that make
sense.
2016-04-17 04:54:19 +01:00
Daniel Evans
f3b81c5690 Bring tests back up to compiling and running. Only a few are failing 2016-04-15 01:06:10 +01:00
Daniel Evans
66aed023b2 Remove Loader.hpp since it wasn't used for anything 2016-04-14 23:33:49 +01:00
Daniel Evans
3af1c37f5e Garage vehicle rotations are just directions. 2016-04-14 23:30:05 +01:00
Daniel Evans
8cd50fadf0 Remove mHealth, clean up code & hook up character health & armour 2016-04-14 01:23:21 +01:00
Daniel Evans
07f7b19ca2 Make it possible to fire weapons again 2016-04-13 21:16:27 +01:00
Daniel Evans
46621093f9 Initial chase scene implementation, opening cutscene chase works 2016-04-13 01:47:19 +01:00
Daniel Evans
7888f05ca4 Re-implement map rendering with nice circular minimap 2016-04-12 01:02:09 +01:00
Daniel Evans
93bf5c6eed Add more opcodes to fix unimplemented opcode crash 2016-04-10 22:27:44 +01:00
Daniel Evans
2d510613fc Load player inventory information 2016-04-10 22:25:50 +01:00
Daniel Evans
3663536714 Copy health and armour from loaded save games 2016-04-10 19:21:23 +01:00
Daniel Evans
691bba5dca New inventory implementation and split char state 2016-04-10 18:57:40 +01:00
Daniel Evans
379f3685a7 Add textured quad rendering function and improve text rendering slightly 2016-04-10 18:48:38 +01:00
Daniel Evans
5ef12d6a40 Adjust text kerning for numbers and colons 2016-04-10 05:53:16 +01:00
Daniel Evans
00db7cef3e Add unimplemented message for opcode 0x014D 2016-04-10 04:47:07 +01:00
Daniel Evans
19d98bec70 Load all data containing sections of save files 2016-04-10 04:38:31 +01:00
Daniel Evans
909f00b079 Clean up game state structure to better match save format 2016-04-09 22:29:32 +01:00
Daniel Evans
d7604531eb Migrate first save state struct and update loading 2016-04-09 02:21:22 +01:00
Daniel Evans
14269d8ae5 Move first of lower level code into rwlib; tear out GLEW. 2016-04-07 01:13:46 +01:00
Daniel Evans
e2bd2b704e Fix crash caused by thread clobbering 2015-07-09 18:29:38 +01:00
Daniel Evans
243bfb18a8 Overhaul breakpoint handling 2015-07-09 13:58:14 +01:00
Daniel Evans
5461f1a5bb Improve debugger functionality and display
* Display Breakpoint information
* Current instruction is hilighted
2015-07-07 03:48:32 +01:00
Daniel Evans
4ce275c381 Improve debug server functionality and appearence 2015-07-06 00:54:13 +01:00
Daniel Evans
868883fd36 Add Debugger functionality
* Include Angluar JS for UI
* Improve styling slightly
* Add Interrupt/Continue buttons and api URLs
* List of threads when game is paused
2015-07-03 02:52:43 +01:00
Daniel Evans
bf1c8bb0ca Fix crashes from mixing player / character references 2015-07-01 23:16:06 +01:00
Daniel Evans
49695a2dc6 Further game save loading
* Give object types individual id namespaces.
2015-06-24 01:48:26 +01:00
Daniel Evans
7ceaac370c Load Weapon inventory data from save files 2015-06-14 21:52:47 +01:00
Daniel Evans
031844c56f Fix save loading path 2015-06-14 18:18:07 +01:00
Daniel Evans
77ca5d96ea Expand Save Game loading to garage data 2015-06-14 18:08:55 +01:00
Daniel Evans
cd7bb3af15 Proof of concept loading save data from save files 2015-06-14 02:44:51 +01:00
Daniel Evans
5399948e05 Merge branch 'rwng' of github.com:danharibo/openrw into rwng 2015-05-18 02:44:56 +01:00
Daniel Evans
cfa4f37479 Enable CharacterObject::isAlive() 2015-05-18 02:40:07 +01:00
Daniel Evans
228db73c7f Update readme informations 2015-05-10 23:57:13 +01:00
Daniel Evans
c1c2d7341f Make certain AI Behviours and opcodes use sprint 2015-05-09 04:40:41 +01:00
Daniel Evans
279407b254 Fix implementation of object rotation opcode 2015-05-09 04:40:10 +01:00
Daniel Evans
98ce9d90e1 Implement some text based markup 2015-05-09 04:02:15 +01:00
Daniel Evans
8e82604fc3 Fix area indicator rendering.
* Increase alpha value from 1/255.
* Don't clear tick data unless the game is updating.
2015-05-09 00:49:28 +01:00
Daniel Evans
1fe572a7cc Remove not really working vehicle anti-flip 2015-05-09 00:26:24 +01:00
Daniel Evans
8b18712d1f Merge branch 'rwng-disassembly' into rwng
Conflicts:
	rwgame/RWGame.hpp
	rwgame/ingamestate.cpp
2015-05-03 23:31:45 +01:00
Daniel Evans
a690c8c08c Implement Script Disassembly 2015-05-03 18:09:25 +01:00
Daniel Evans
53d2e318a3 Ensure icons.txd is loaded for blip arrow 2015-05-03 05:32:08 +01:00
Daniel Evans
91065b6af4 Initial Save + Load implementation
* Fix VM Global Addressing
* Modify VM structures to simplify storage
* Add explicit GameWorld::createPlayer() method
* Move gameTime to GameState for storage
* Add SaveGame class for reading + writing
* New Dependancy: cereal
2015-05-03 05:23:44 +01:00
Daniel Evans
d6eaf6e1f9 Fix double free crash in delayed object deletion 2015-05-02 20:37:20 +01:00
Daniel Evans
b6bd774a06 Fix ScriptMachine behaviour and global addressing 2015-05-01 06:28:39 +01:00
Daniel Evans
d4f0d7dc0d Update VM var size, expose threads 2015-05-01 04:50:33 +01:00
Daniel Evans
a7da8ea424 Remove raw GameObject pointer usage in GameState 2015-05-01 03:53:42 +01:00
Daniel Evans
60cf899c1e Add GameWorld::findObject(GameObjectID) 2015-05-01 03:52:57 +01:00
Daniel Evans
5cfed3a667 Correct broken test 2015-05-01 02:05:49 +01:00
Daniel Evans
85b9378ab0 Add documentation for ScriptMachine 2015-05-01 01:06:21 +01:00
Daniel Evans
968544ce48 Implement GameObject ID referencing within the VM 2015-04-30 16:08:23 +01:00
Daniel Evans
5d3ac6218e Implement Game Object ID allocation 2015-04-29 21:03:53 +01:00
Timmy Sjöstedt
ac18d0a11b Include glm header for distance2() 2015-04-27 18:49:47 +02:00
Daniel Evans
25f62a0a47 Refactor GameWorld into GameState
+ GameState now contains a GameWorld point to store the runtime world
data
2015-04-27 15:31:39 +01:00
Daniel Evans
0507bfdae6 Fix Dynamic objects not visually moving 2015-04-27 04:12:58 +01:00
Daniel Evans
85b1ab120f Move GameState out of GameWorld ownership 2015-04-27 03:55:18 +01:00
Daniel Evans
1daa5a6fb2 Move GameObject to objects directory 2015-04-27 02:09:56 +01:00
Daniel Evans
d7e122306a Refactor Instance path data into ObjectData 2015-04-24 20:22:39 +01:00
Daniel Evans
5db4c28f04 Refactor Object Definition information to GameData 2015-04-24 18:10:42 +01:00
Daniel Evans
4b2fbbd3d8 Fix AI Graph discombobulation and debug rendering 2015-04-20 02:19:30 +01:00
Daniel Evans
e04f9a8d40 Move GameData from GameWorld 2015-04-18 01:11:17 +01:00
Daniel Evans
8ff137017c Simplify Character Movement 2015-04-14 23:03:34 +01:00
Daniel Evans
367b40d868 Merge branch 'rwng' of bitbucket.org:danharibo/openrw into rwng 2015-04-14 10:33:16 +01:00
Daniel Evans
1827b9cca3 Restore rwviewer to functional state 2015-04-13 01:48:29 +01:00
Daniel Evans
97afc19cfb Add Improved Profiling statistics 2015-04-12 19:47:47 +01:00
Daniel Evans
4cf36b8fd6 Add more rendering metrics for GL performance 2015-04-09 23:54:56 +01:00
Daniel Evans
a0446c0ead Fix pedestrians spawning on vehicle nodes 2015-04-06 18:59:37 +01:00
Daniel Evans
dd7e487a55 Improve DrawParameters to support multiple textures 2015-04-06 14:36:23 +01:00
Daniel Evans
3afc5e38fe Add grouping of gl calls with KHR_debug 2015-04-06 13:43:53 +01:00
Daniel Evans
c6664a5a2d Improve static InstanceObject rendering performance
* Cull against a grid instead of free objects
* Async model loading is disabled as model bounds are required
2015-04-06 04:06:35 +01:00
Daniel Evans
4573b88a5a Improve AIGraph performance with a grid-based index 2015-04-05 21:35:45 +01:00
Daniel Evans
861f36bdde Improve TrafficDirector performance with character list 2015-04-05 18:45:03 +01:00
Daniel Evans
66b7c878c1 Improve game text behaviour
* Fix messages not being cleared
* Implemented clearing help messages
2015-04-05 02:08:51 +01:00
Daniel Evans
c7376273b4 Change handling again 2015-04-05 01:34:11 +01:00
Daniel Evans
bfd85878fd Fix dynamic parts when warping vehicles 2015-04-04 21:59:03 +01:00
Daniel Evans
2e9962ef26 Re-implement functional character jumping 2015-04-04 21:50:08 +01:00
Daniel Evans
27c6afba31 Improve character dynamics, step behaviour 2015-04-04 21:23:53 +01:00
Daniel Evans
2f2551bc47 Improve vehicle handling 2015-04-04 20:32:43 +01:00
Daniel Evans
6b38a3e267 Move CollisionInstance into dynamics 2015-04-04 20:11:48 +01:00
Daniel Evans
2f2e099ca6 Merge ClosestNotMeRaycastCallback into header 2015-04-04 20:00:59 +01:00
Daniel Evans
1d3bcfe42b Optimise AI graph construction and traffic spawning 2015-04-04 17:03:06 +01:00
Daniel Evans
7a62c25fbc Add pedestrian population limit to TrafficDirector 2015-04-04 15:05:16 +01:00
Daniel Evans
853623e7f2 Regenerate Character skeleton on Model change 2015-04-04 14:13:04 +01:00
Daniel Evans
e5e4345170 Document ScriptMachine debugging methods 2015-04-04 13:53:11 +01:00
Daniel Evans
159510cace Add breakpoints to ScriptMachine, remove from GameWorld.
+ Adds breakpoints on program counter values to the ScriptMachine.
+ Adds breakpoint handler for acting on breakpoints
+ Remove GameWorld::script and make RWGame responsible for script
2015-04-04 03:12:28 +01:00
Daniel Evans
a20d170d16 Optimize AIGraph Slightly 2015-04-03 16:15:58 +01:00
Daniel Evans
95b6e6a676 Improve pausing behaviour with State::shouldWorldUpdate() 2015-04-03 15:38:24 +01:00
Daniel Evans
bc54fac53a Merge branch 'rwng' of bitbucket.org:danharibo/openrw into rwng
Conflicts:
	rwgame/RWGame.cpp
2015-04-03 03:17:14 +01:00
Daniel Evans
8b1f539b12 Add LoaderDFF normal calculation for models without 2015-04-03 03:07:08 +01:00
Timmy Sjöstedt
33e9920b48 Initialized physRaycater to null, as to not delete an uninitialized pointer later. 2015-04-03 03:07:08 +01:00
Daniel Evans
e50f2226a9 Implement opcode 2015-04-03 03:07:08 +01:00
Daniel Evans
b672e41acf Remove Logger ownership from GameWorld 2015-04-03 03:07:08 +01:00
Daniel Evans
b280aac859 Remove unused struct from GameWorld 2015-04-03 03:07:08 +01:00
Daniel Evans
97807f24b7 Add method to retrieve current draw settings from Renderer 2015-04-03 03:07:08 +01:00
Daniel Evans
49a8b9b2f4 Change how draw calls are counted 2015-04-03 03:07:08 +01:00
Daniel Evans
6851c5e011 Improve graphics performance
+ Add Framebuffer rendering to store data
+ Re-implement water using projected grid aproach
2015-04-03 03:07:07 +01:00
Daniel Evans
f655e454d6 Implement new VisualFX system for particles etc.
- VisualFX stores data about effects like particles and lighting
- Only particles initial implementation
- World stores active VisualFX
2015-04-03 03:04:50 +01:00
Daniel Evans
d1e7dcdcd1 Overhaul Loader framework for Models
- Replace background model loader with generic background loader
- Replace ModelHandle object with generic resource handle
2015-04-03 03:04:50 +01:00
Daniel Evans
ce4b8fc83a Remove old file indexing system and IO handling
- Use FileIndex inside GameData to handle normalisation
- Remove old raw pointer API for loading data
2015-04-03 03:04:50 +01:00
Daniel Evans
c264e78696 Replace most cout/cerr prints with logging output 2015-04-03 03:04:50 +01:00
Daniel Evans
a967e190de Remove GameRenderer from GameWorld
- Particle rendering is broken, since objects can't access renderer
2015-04-03 03:04:50 +01:00
Daniel Evans
dfd68abd8e Add new Logger system.
- Supports multiple log recievers.
- Onscreen log needs to be re-written.
- Replaces GameWorld::logX().
2015-04-03 03:04:50 +01:00
Daniel Evans
abf43f07c8 New File handling implementation
- move FileHandle into a separate header
- Implement FileIndex, a system to normalize filenames and sources
2015-04-03 03:04:50 +01:00
Daniel Evans
3801e69e81 Improve TextRenderer kerning and performance 2015-04-03 02:56:37 +01:00
Daniel Evans
a773262328 Fix crash in SoundManager when pausing 2015-04-03 01:26:55 +01:00
Daniel Evans
4faf07cba3 Fix character inWater behaviour 2015-04-01 04:36:52 +01:00
Daniel Evans
15e2082ebc Add LoaderDFF normal calculation for models without 2015-03-30 22:16:43 +01:00
Timmy Sjöstedt
b55cda56b1 Initialized physRaycater to null, as to not delete an uninitialized pointer later. 2015-03-30 18:25:58 +02:00
Daniel Evans
b9462e077d Implement opcode 2015-03-30 03:34:03 +01:00
Daniel Evans
3975816164 Remove Logger ownership from GameWorld 2015-03-30 02:45:58 +01:00
Daniel Evans
798b24ae83 Remove unused struct from GameWorld 2015-03-30 02:03:38 +01:00
Daniel Evans
78253c59ce Add method to retrieve current draw settings from Renderer 2015-03-29 23:18:27 +01:00
Daniel Evans
980ef71e96 Change how draw calls are counted 2015-03-28 13:54:28 +00:00
Daniel Evans
30e059a0b6 Improve graphics performance
+ Add Framebuffer rendering to store data
+ Re-implement water using projected grid aproach
2015-03-28 13:42:29 +00:00
Daniel Evans
2985a70354 Implement new VisualFX system for particles etc.
- VisualFX stores data about effects like particles and lighting
- Only particles initial implementation
- World stores active VisualFX
2015-03-06 16:55:46 +00:00
Daniel Evans
46cd7b8f51 Overhaul Loader framework for Models
- Replace background model loader with generic background loader
- Replace ModelHandle object with generic resource handle
2015-03-06 04:38:22 +00:00
Daniel Evans
dfe6ec3eaa Remove old file indexing system and IO handling
- Use FileIndex inside GameData to handle normalisation
- Remove old raw pointer API for loading data
2015-03-06 01:40:29 +00:00
Daniel Evans
7e83b815c4 Replace most cout/cerr prints with logging output 2015-03-05 17:29:33 +00:00
Daniel Evans
cf0c37dcc2 Remove GameRenderer from GameWorld
- Particle rendering is broken, since objects can't access renderer
2015-03-05 16:36:14 +00:00
Daniel Evans
536b3f9f0c Add new Logger system.
- Supports multiple log recievers.
- Onscreen log needs to be re-written.
- Replaces GameWorld::logX().
2015-03-05 03:37:13 +00:00
Daniel Evans
25f28dbb42 New File handling implementation
- move FileHandle into a separate header
- Implement FileIndex, a system to normalize filenames and sources
2015-02-26 03:57:28 +00:00
Daniel Evans
7f2c5a4645 Initial Traffic wandering algorithm (pedestrians only) 2015-02-26 01:15:17 +00:00
Daniel Evans
fe4926e5d6 Add object lifetime values, clean up spawned traffic 2015-02-18 16:00:55 +00:00
Daniel Evans
9407ee3135 Add test implementation of pedestrian spawning 2015-02-18 15:29:39 +00:00
Daniel Evans
2ccc1fc33c Add initial TrafficDirector open spawn point methods 2015-02-17 01:31:20 +00:00
Daniel Evans
be023b5093 Overhaul texture handling, add TextureData handles.
+ Use shared ptrs to track loaded texture handles
+ Cache textures on models to avoid lookups
2015-02-16 00:36:11 +00:00
Daniel Evans
9eb4c62a04 Improve HUD and UI rendering
+ Add names for some styles to reduce confusion
+ Move some HUD drawing into a seperate file
2015-02-15 12:41:51 +00:00
Daniel Evans
9855bf2967 Improve map rendering, UI viewport
+ UI Viewport is now window sized
+ Map renderer now supports rotating
2015-02-15 01:41:24 +00:00
Daniel Evans
2344024f08 Text rendering 2015-02-07 22:55:06 +00:00
Daniel Evans
538d0c02f9 Add city.wav 2015-02-04 17:16:46 +00:00
Daniel Evans
6cd36bda43 Add arrow above blip target objects / coordinates 2015-01-29 22:39:26 +00:00
Daniel Evans
eed2377e50 Improve vehicle dynamics
- Fix bouyancy not working at all
- Make it difficult to flip a vehicle going around corners
2015-01-28 01:55:35 +00:00
Daniel Evans
dda2d5a245 Make disable input opcode take effect 2015-01-27 15:25:45 +00:00
Daniel Evans
7568eb8d7f Declare opcodes needed to start Luigi mission 2 2015-01-27 15:21:36 +00:00
Daniel Evans
6a4afea4e6 Make it possible to start the 2nd Luigi mission 2015-01-27 15:02:10 +00:00
Daniel Evans
6e1739138d Add big print with number 2015-01-27 13:59:02 +00:00
Daniel Evans
c87a4a7cb1 Re-allocate audio clips when a new clip is loaded 2015-01-27 13:09:16 +00:00
Daniel Evans
abb6576785 Add implementation for more generic pickups 2015-01-27 02:38:08 +00:00
Daniel Evans
206c61e326 Merge branch 'master' of bitbucket.org:danharibo/openrw 2015-01-27 00:50:55 +00:00
Daniel Evans
cafb002d3b Add more blip opcodes, with sprites 2015-01-27 00:48:09 +00:00
Daniel Evans
5271b6e78b Merge branch 'master' of bitbucket.org:danharibo/openrw 2015-01-26 14:40:17 +00:00
Daniel Evans
d7d52dc892 Improve cutscenes to load wav audio too 2015-01-26 14:40:09 +00:00
Daniel Evans
0d730547fa Fix issues with HUD and widescreen mode 2015-01-26 01:32:21 +00:00
Daniel Evans
91cd7c7edd Add blips and some opcodes 2015-01-26 01:16:25 +00:00
Daniel Evans
87ca358717 Adjust game map a little more 2015-01-25 18:42:29 +00:00
Daniel Evans
cbebbbed87 Minor adjustments to the map 2015-01-25 18:31:22 +00:00
Daniel Evans
87435a2576 Add map renderer and ingame radar display 2015-01-25 18:25:55 +00:00
Daniel Evans
9f1162a945 Add entering to any passenger seat 2015-01-23 17:54:17 +00:00
Daniel Evans
a0eef23da8 Re-add cutscene widescreen; eject occupants properly 2015-01-23 17:44:28 +00:00
Daniel Evans
1961661d14 Implement visible goals for locating characters 2015-01-23 17:18:16 +00:00
Daniel Evans
da2ae998f9 Implement object visibility control 2015-01-23 12:25:15 +00:00
Daniel Evans
5d41002b36 Further improve vehicle door dynamics
+ Rename some part target angle names
+ Improve behaviour of opening and closing doors
+ Use different animations for right hand side of vehicle
2015-01-23 02:03:21 +00:00
Daniel Evans
4ea6e14299 Improve vehicle door dynamics
+ Vehicle doors should move in the right direction now
+ Fix debugging draw class for bullet
2015-01-22 20:16:28 +00:00
Daniel Evans
3f40ba0e18 Add AI Goal system, FollowLeader goal.
+ Add support for setting leader, e.g. Misty follows you during "Luigi's Girls".
2015-01-22 15:00:30 +00:00
Daniel Evans
0c84873be2 Add more opcodes, can now finish mission 1 2015-01-22 11:11:16 +00:00
Daniel Evans
185687b1b5 Add and improve functionality for first mission.
+ Improve GoTo activity behaviour, jumping to target.
+ Fixed crash on non-existing audio file
+ Added correct conditional flag to conditional opcodes
+ Fixed seat state on exit from non 0th seat
+ Implement many opcodes
2015-01-21 20:40:31 +00:00
Daniel Evans
eef4a2d87e Move object script functions to seperate module
Not all script functions involving objects have been moved, some
further movement is expected.
2015-01-19 12:20:35 +00:00
Daniel Evans
39ff9df337 Refactor script system to bind named functions.
Replace ugly macros with named functions and binding to script modules
2015-01-16 02:32:31 +00:00
Daniel Evans
698f5a9d91 Fix some Vehicle behaviour
* Remove characters from vehicle occupants on destruction

* Fix Player being warped back to vehicle on critical reset
2014-12-18 03:31:09 +00:00
Daniel Evans
857951d7df Destroy Vehicle Parts that are still active 2014-12-18 02:38:36 +00:00
Daniel Evans
ed62b758d2 Implement more opcodes
* Is Vehicle Flipped, Create character in vehicle, get time of day and many more
2014-12-17 22:53:25 +00:00
Daniel Evans
ff04daf633 Fix Vehicle Collision objects not being destroyed 2014-12-17 19:31:01 +00:00
Daniel Evans
e3c78fd09c Add more opcodes 2014-12-17 00:39:52 +00:00
Daniel Evans
7963becbd1 Add more opcodes and vehicle handling 2014-12-16 19:17:22 +00:00
Daniel Evans
2709e7d252 Implement and declare more opcodes 2014-12-16 03:30:51 +00:00
Daniel Evans
7e4dea5139 More Script Engine improvements and fixes
* Implement and declare many more opcodes
* Fix incorrect behaviour of If / else jump constructs.
2014-12-16 03:03:15 +00:00
Daniel Evans
0ddc8458d1 Add vehicle generator data and opcodes. 2014-12-16 03:03:15 +00:00
Daniel Evans
a55bcc557d Implement some AI and zone opcodes
* Add disabled flag to AI nodes

* Move ZoneData structure into own file

* Add Gang density to ZoneData.
2014-12-16 03:03:04 +00:00
Daniel Evans
646d0c67fc Improve Script debugging output messages 2014-12-15 20:44:36 +00:00
Daniel Evans
77f2277a68 Improved vehicle door dynamics with opening doors 2014-12-14 20:45:58 +00:00
Daniel Evans
25a3a0183b Overhaul vehicle part system with VehicleObject::Part 2014-12-14 01:32:00 +00:00
Daniel Evans
27104f7b79 Add Jump activity to improve jump dynamics 2014-12-13 01:24:06 +00:00
Daniel Evans
13192c8524 Improve animation interpolation 2014-12-13 00:59:23 +00:00
Daniel Evans
e0b0c4f168 Improve animation interpolation 2014-12-12 12:30:23 +00:00
Daniel Evans
330fa56b77 Fix animation test case 2014-12-12 00:36:45 +00:00
Daniel Evans
1fb8162a7c Fix broken object data test cases 2014-12-11 18:34:39 +00:00
Daniel Evans
584618e991 Overhaul animation support with Skeleton class.
Move frame transform data into Skeleton instead of Animator.
Animator now responsible for mutating Skeleton state.
Skeleton is more flexible for things like vehicle skeletons.
2014-12-11 17:48:47 +00:00