18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-01 09:27:10 +01:00

refactor(physics): physics/mover/ becomes physics/components/

The files of the parts of a vehicle (pneumatics, electrics, traction, doors,
drives...) are in physics/components/, not under the old name of the mover;
the file of the vehicle as a body, its forces and its movement, is body.cpp
(was mover.cpp). The includes, CMakeLists.txt and AGENTS.md name the new
paths.

Renames only. 1144/1144 tests, golden traces exact against staging 62f7a29b.
This commit is contained in:
2026-11-28 00:28:34 +01:00
parent 6003615e3e
commit d4bd3fc5ca
21 changed files with 39 additions and 39 deletions
+2 -2
View File
@@ -107,7 +107,7 @@ Code that isn't otherwise touched keeps its names; renaming a member goes togeth
scripts and the log read stays byte for byte the same whatever the C++ names are: the keywords of the `.fiz` and the scenery, the
keys of the dictionaries of the Python screens, the texts of the log and of `STR(...)`.
The vehicle code is in `physics/` (the physics of the vehicles: `mover.h` and `physics/mover/*.cpp` by subsystem, `brakes.*`,
The vehicle code is in `physics/` (the physics of the vehicles: `mover.h` and `physics/components/*.cpp` by subsystem, `brakes.*`,
couplers, collisions, derailment) and `vehicle/` (the vehicle in the scenery, the cab, the AI). Keep it that way:
- `physics/vehicletypes.h` holds the vocabulary the rest of the simulator passes around (vehicle ends, sides, couplings, lights,
@@ -117,7 +117,7 @@ couplers, collisions, derailment) and `vehicle/` (the vehicle in the scenery, th
an `int`. Numbers of the formats (`.scn`, events, the network) are read into these where they come in and written where they go out.
- The commands between the vehicles are `VehicleCommand` (`physics/vehiclecommand.h`); their text names only matter where a command
comes as text.
- What depends on the kind of drive (`EngineType`) goes into its class in `physics/mover/drive.*`, not into a new `switch`.
- What depends on the kind of drive (`EngineType`) goes into its class in `physics/components/drive.*`, not into a new `switch`.
## Renderers: the move to OpenGL 4.6 and Vulkan
+17 -17
View File
@@ -57,7 +57,7 @@ set(CMAKE_CXX_STANDARD 20)
file(GLOB HEADERS "*.h"
"Console/*.h"
"physics/*.h"
"physics/mover/*.h"
"physics/components/*.h"
"gl/*.h"
"network/*.h"
"vr/*.h"
@@ -745,22 +745,22 @@ set(CORE_SOURCES
"physics/friction.cpp"
"physics/brakes.cpp"
"physics/vehiclecommand.cpp"
"physics/mover/mover.cpp"
"physics/mover/drive.cpp"
"physics/mover/cab.cpp"
"physics/mover/collisions.cpp"
"physics/mover/commands.cpp"
"physics/mover/controllers.cpp"
"physics/mover/couplers.cpp"
"physics/mover/diesel.cpp"
"physics/mover/doors.cpp"
"physics/mover/electrics.cpp"
"physics/mover/fizparser.cpp"
"physics/mover/fizsections.cpp"
"physics/mover/pneumatics.cpp"
"physics/mover/securitysystem.cpp"
"physics/mover/setup.cpp"
"physics/mover/traction.cpp"
"physics/components/body.cpp"
"physics/components/drive.cpp"
"physics/components/cab.cpp"
"physics/components/collisions.cpp"
"physics/components/commands.cpp"
"physics/components/controllers.cpp"
"physics/components/couplers.cpp"
"physics/components/diesel.cpp"
"physics/components/doors.cpp"
"physics/components/electrics.cpp"
"physics/components/fizparser.cpp"
"physics/components/fizsections.cpp"
"physics/components/pneumatics.cpp"
"physics/components/securitysystem.cpp"
"physics/components/setup.cpp"
"physics/components/traction.cpp"
"physics/couplerphysics.cpp"
"physics/derailment.cpp"
"physics/collision.cpp"
@@ -27,7 +27,7 @@ http://mozilla.org/MPL/2.0/.
#include <limits>
#include <utility>
#include <vector>
#include "physics/mover/internal.h"
#include "physics/components/internal.h"
std::vector<std::string> const TMoverParameters::eimc_labels = {"dfic: ", "dfmax:", "p: ", "scfu: ", "cim: ", "icif: ", "Uzmax:", "Uzh: ", "DU: ", "I0: ", "fcfu: ",
@@ -27,7 +27,7 @@ http://mozilla.org/MPL/2.0/.
#include <limits>
#include <utility>
#include <vector>
#include "physics/mover/internal.h"
#include "physics/components/internal.h"
bool TMoverParameters::DirectionForward()
@@ -27,7 +27,7 @@ http://mozilla.org/MPL/2.0/.
#include <limits>
#include <utility>
#include <vector>
#include "physics/mover/internal.h"
#include "physics/components/internal.h"
double ComputeCollision(double &v1, double &v2, double m1, double m2, double beta, bool vc)
@@ -27,7 +27,7 @@ http://mozilla.org/MPL/2.0/.
#include <limits>
#include <utility>
#include <vector>
#include "physics/mover/internal.h"
#include "physics/components/internal.h"
// *************************************************************************************************
@@ -27,7 +27,7 @@ http://mozilla.org/MPL/2.0/.
#include <limits>
#include <utility>
#include <vector>
#include "physics/mover/internal.h"
#include "physics/components/internal.h"
// *************************************************************************************************
@@ -27,7 +27,7 @@ http://mozilla.org/MPL/2.0/.
#include <limits>
#include <utility>
#include <vector>
#include "physics/mover/internal.h"
#include "physics/components/internal.h"
// Ra: tu należy przenosić funcje z mover.pas, które nie są z niego wywoływane.
// Jeśli jakieś zmienne nie są używane w mover.pas, też można je przenosić.
@@ -27,8 +27,8 @@ http://mozilla.org/MPL/2.0/.
#include <limits>
#include <utility>
#include <vector>
#include "physics/mover/internal.h"
#include "physics/mover/drive.h"
#include "physics/components/internal.h"
#include "physics/components/drive.h"
double TMoverParameters::EngineRPMRatio() const
@@ -27,7 +27,7 @@ http://mozilla.org/MPL/2.0/.
#include <limits>
#include <utility>
#include <vector>
#include "physics/mover/internal.h"
#include "physics/components/internal.h"
bool TMoverParameters::AssignLoad(std::string const &Loadname, float const Amount)
@@ -10,7 +10,7 @@ http://mozilla.org/MPL/2.0/.
// the drives of the vehicles, one class for each kind of engine
#include "stdafx.h"
#include "physics/mover/drive.h"
#include "physics/components/drive.h"
#include <algorithm>
#include <cmath>
@@ -27,7 +27,7 @@ http://mozilla.org/MPL/2.0/.
#include <limits>
#include <utility>
#include <vector>
#include "physics/mover/internal.h"
#include "physics/components/internal.h"
// KURS90 - sprężarka pantografów; Ra 2014-07: teraz jest to zbiornik rozrządu, chociaż to jeszcze nie tak
@@ -27,7 +27,7 @@ http://mozilla.org/MPL/2.0/.
#include <limits>
#include <utility>
#include <vector>
#include "physics/mover/internal.h"
#include "physics/components/internal.h"
int ConversionError = 0;
@@ -27,7 +27,7 @@ http://mozilla.org/MPL/2.0/.
#include <limits>
#include <utility>
#include <vector>
#include "physics/mover/internal.h"
#include "physics/components/internal.h"
int s2NPW(std::string s)
@@ -7,7 +7,7 @@ obtain one at
http://mozilla.org/MPL/2.0/.
*/
// the helpers the files of physics/mover/ share: only they include this header
// the helpers the files of physics/components/ share: only they include this header
#pragma once
@@ -27,7 +27,7 @@ http://mozilla.org/MPL/2.0/.
#include <limits>
#include <utility>
#include <vector>
#include "physics/mover/internal.h"
#include "physics/components/internal.h"
// Nastawianie hamulców
@@ -27,7 +27,7 @@ http://mozilla.org/MPL/2.0/.
#include <limits>
#include <utility>
#include <vector>
#include "physics/mover/internal.h"
#include "physics/components/internal.h"
void TSecuritySystem::set_enabled(bool e)
@@ -27,7 +27,7 @@ http://mozilla.org/MPL/2.0/.
#include <limits>
#include <utility>
#include <vector>
#include "physics/mover/internal.h"
#include "physics/components/internal.h"
// *************************************************************************************************
@@ -27,8 +27,8 @@ http://mozilla.org/MPL/2.0/.
#include <limits>
#include <utility>
#include <vector>
#include "physics/mover/internal.h"
#include "physics/mover/drive.h"
#include "physics/components/internal.h"
#include "physics/components/drive.h"
double TableInterpolation(std::map<double, double> &Map, double Parameter)
+1 -1
View File
@@ -2248,7 +2248,7 @@ class TMoverParameters
void FuseOff(void); // wylaczenie nadmiarowego
bool UniversalResetButton(int const Button, range_t const Notify = range_t::consist);
bool RelayReset(int const Relays, range_t const Notify = range_t::consist); // resets specified relays
// the drive of the kind of engine of the vehicle (physics/mover/drive.h)
// the drive of the kind of engine of the vehicle (physics/components/drive.h)
TractionDrive const &Drive() const;
double ShowCurrent(int AmpN) const; // pokazuje bezwgl. wartosc pradu na wybranym amperomierzu
double ShowCurrentP(int AmpN) const; // pokazuje bezwgl. wartosc pradu w wybranym pojezdzie //Q 20160722