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
Anonymous Maarten
fa36c56813
rwgame: close window explicitly at end of event loop to free GL Context
2017-10-18 21:52:29 +01:00
Filip Gawin
bc8652baba
Interpolating dynamic objects
...
How?
Calling stepsimulation each frame,
bullet interpolate vehicles and characters for us.
Removed unneeded code:
"float alpha = fmod(dt, GAME_TIMESTEP) / GAME_TIMESTEP;"
It looks like alpha shift is
I also removed unneeded variable clock
and refactored names to match bullet's example.
We should alse think about problem of
crossing the range of float.
2017-10-18 21:29:17 +01:00
Waritnan Sookbuntherng
c4f532fd56
Pause chase when the game paused
2017-10-13 19:12:30 +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
Aldoxtor
81734ae2fe
initialize some variables in constructor
2017-04-21 20:24:32 +01:00
Daniel Evans
bb9e368dca
Prevent traffic from spawning in cutscenes
2017-01-30 21:40:17 +00:00
haphzd
e6ec1b69f0
Bring back culling events counter
2016-12-10 22:19:38 +03:00
haphzd
b5079f4ae2
Update profiler graphs drawing routine to use GameString
2016-12-10 21:52:02 +03:00
Daniel Evans
247f66f60d
Move cutscene and fixed camera control into IngameState
2016-12-04 01:33:26 +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
b65a513bbb
Remove usages of WorkContext
2016-12-02 00:56:38 +00:00
Daniel Evans
f0e0e6e747
Extract game input state handling from IngameState
...
Prevents input getting "stuck" when input is removed in the pause menu
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
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
81c27da97b
Make GameState instance a direct member of RWGame
2016-10-24 21:29:41 +01:00
Daniel Evans
6a7802de87
Overhaul State and StateManager to remove pointers
...
Removed raw State pointers in favour of unique_ptrs
Avoid allowing control flow to re-enter States that have exited
Defer releasing states until the end of the frame
2016-10-24 21:29:40 +01:00
Daniel Evans
ad998e8a80
Avoid allocating RWGame members where possible
...
These objects don't need to be dynamically allocated, they can
take on the same lifetime as RWGame itself.
2016-10-19 22:34:51 +01:00
Daniel Evans
2f118631dc
Move some non-game code into GameBase class
...
This moves window setup and configuration loading into a base
class so that RWGame can focus on game related matters
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
13f504d699
Draw nearby object state in object debug view
2016-10-13 22:31:26 +01:00
Daniel Evans
fe0d2f92b0
Initial objects debug view
2016-10-13 22:31:26 +01:00
Daniel Evans
c4a34da36a
Simplify debug stats text
2016-10-13 22:31:26 +01:00
Daniel Evans
baca296436
Remove useless information from debug stats
2016-10-13 22:31:26 +01:00
Daniel Evans
40d27b4a07
Clean up debug view selection code
2016-10-13 22:31:26 +01:00
Daniel Evans
e31c30efe9
Improve loading of hard-coded models
2016-10-10 20:49:44 +01:00
Daniel Evans
e39ee21ca8
clang-format files in rwgame
2016-09-09 21:13:20 +01:00
Daniel Evans
53e996aac7
Merge pull request #234 from danhedron/improved-file-handling
...
Improved file handling for un-archived files
2016-09-07 22:39:35 +01:00
dan
810c6658d0
use openFilePath to open data files
2016-09-07 22:06:38 +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
Sven Stucki
f5d76fbbcd
Catch all command line parsing errors, properly exit on --help
2016-09-06 20:11:54 +02:00
Sven Stucki
0847c85abd
Make --test work without --newgame, update help text
2016-09-06 20:11:53 +02:00
Sven Stucki
431e218a64
Use Boost to parse command line arguments ( #177 )
...
There are still some rough edges, first version to send in for
discussion.
2016-09-06 20:11:41 +02:00
Jannik Vogel
5f86003758
Add cheat handler
2016-09-02 15:33:45 +02:00
Sven Stucki
449289c06a
Make sure SDL_Quit() is called on exit
2016-09-01 22:58:06 +02:00
Daniel Evans
609790674a
Use new GTA3Module
2016-08-30 19:57:47 +01: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
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
d823a97308
Make debug keys use gameOffsetTime method
2016-08-17 01:03:31 +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
Jannik Vogel
cda72bb87f
Don't grab mouse cursor before going ingame
2016-08-12 02:14:15 +02:00
Jannik Vogel
f7fca167dc
Allow language selection in config
2016-08-12 02:14:15 +02:00
Jannik Vogel
e7c772967f
Switch default english.gxt to american.gxt
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
Daniel Evans
8a985309f9
Remove breakpoint system from ScriptMachine
2016-08-12 01:02:24 +01:00
Daniel Evans
a0b995c97e
Move game state classes into states folder
2016-08-07 14:32:22 +01:00
darkf
836e51aff7
Torch the HTTP script debugger
2016-08-03 13:30:40 -07:00