1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-22 02:12:45 +01:00
Commit Graph

1324 Commits

Author SHA1 Message Date
Christoph Heiss
67482135bc Add .DS_Store to ignored files 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
Waritnan Sookbuntherng
c4f532fd56 Pause chase when the game paused 2017-10-13 19:12:30 +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
Filip
ed52d9acb9 Update Readme.md (FFmpeg)
Replace mad with ffmpeg.
2017-09-17 00:49:43 +01:00
Daniel Evans
887e0333c8 Improve state access to always get the current scene
Prevents events being recieved by states that are no-longer in effect

Fixes #292
2017-09-17 00:45:58 +01:00
Anonymous Maarten
02c60311ee rwlib/rwengine: make use of RW_ASSERT instead of assert 2017-09-16 22:19:39 +01:00
Anonymous Maarten
a1333360c5 rwlib: Add option to abort/break on failed checks or at request
- RW_ABORT/RW_ASSERT/RW_BREAKPOINT are only defined in debug mode
- the callback is needed to unlock the mouse when entering
    the debugger
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
1bca493dfa Remove last mman reference 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
727dbbd218 Remove unnecessary CMake modules 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
darkf
6493908d5c Link FFmpeg 2017-09-16 19:50:51 +01:00
darkf
c08342f1f7 Add FindFFmpeg.cmake 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
Anonymous Maarten
06c0f58ae8 config: add test about non-existing configuration directory 2017-08-15 15:58:01 +01:00
Anonymous Maarten
0308f809d6 config: Add the unknown keys to the what() message 2017-08-15 15:58:01 +01:00
Anonymous Maarten
a92f24cbb4 config: unknown data will be kept in memory and saved onto disk 2017-08-15 15:58:01 +01:00
Anonymous Maarten
7a86c199b0 tests: only include GameConfig.hpp in source file (no header file)
This reduces compile time from 1m19s to 9s when touching GameConfig.hpp.

(Executed from rwgame/build/tests)
before:
$ make >/dev/null
$ touch ../../rwgame/GameConfig.hpp
$ time make>/dev/null

real	1m18.643s
user	1m13.069s
sys	0m5.266s

after:
$ make >/dev/null
$ touch ../../rwgame/GameConfig.hpp
$ time make>/dev/null

real	0m9.247s
user	0m8.374s
sys	0m0.836s
2017-08-15 15:58:01 +01:00
Anonymous Maarten
b1976fbcf2 tests: test_globals.hpp has a dependency on boost/test/unit_test.hpp 2017-08-15 15:58:01 +01:00
Anonymous Maarten
9e9e684a44 tests: only include test_globals.hpp when needed 2017-08-15 15:58:01 +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
tsjost
45814cce07 Merge pull request #296 from ShFil119/patch-3
Replace manual radian conversion with glm's function
2017-07-26 00:34:22 +02: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