mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-01 04:47:06 +01:00
refactor(physics): the vehicle vocabulary in physics/vehicletypes.h; DynObj.h and Driver.h no longer include mover.h
DynObj.h included physics/mover.h, so nearly every file of the simulator
compiled the whole vehicle physics (TMoverParameters and the brakes) though
most of them only name a vehicle end, a coupling or a light.
- physics/vehicletypes.h: the enums, flags and small structures the rest of
the simulator passes around (end, side, coupling, light, sound, activation,
train_type, TEngineType, TBrakeSystem..., TLocation, TTrackShape,
neighbour_data), moved from mover.h as they were. mover.h includes it.
- DynObj.h and Driver.h include vehicletypes.h; TMoverParameters is forward
declared (utilities/Classes.h). Their inline accessors that read the mover
(NextConnected(), GetVelocity(), is_emu(), DirectionalVel()...) are defined
in DynObj.cpp and Driver.cpp.
- the files that use the mover include physics/mover.h themselves.
Now 140 of the 730 objects of the build depend on mover.h and brakes.h,
about 80 of them unit tests.
No change in behaviour: 1142/1142 tests, golden traces exact against staging
62f7a29b.
This commit is contained in:
@@ -20,6 +20,7 @@ http://mozilla.org/MPL/2.0/.
|
||||
#include "application/editorgestures.h"
|
||||
#include "scene/scenenodegroups.h"
|
||||
#include "application/editoruilayer.h"
|
||||
#include "physics/mover.h"
|
||||
#ifndef _WIN32
|
||||
#include <spawn.h>
|
||||
#include <unistd.h>
|
||||
|
||||
Reference in New Issue
Block a user