diff options
-rw-r--r-- | premake5.lua | 7 | ||||
-rw-r--r-- | src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/collision/ColLine.h | 4 | ||||
-rw-r--r-- | src/collision/ColPoint.h | 4 | ||||
-rw-r--r-- | src/collision/ColSphere.h | 5 | ||||
-rw-r--r-- | src/collision/ColTriangle.h | 1 | ||||
-rw-r--r-- | src/collision/Collision.cpp | 18 | ||||
-rw-r--r-- | src/control/Garages.cpp | 2 | ||||
-rw-r--r-- | src/control/Replay.cpp | 8 | ||||
-rw-r--r-- | src/control/Script.cpp | 4 | ||||
-rw-r--r-- | src/control/Script10.cpp | 4 | ||||
-rw-r--r-- | src/control/Script3.cpp | 1 | ||||
-rw-r--r-- | src/control/Script6.cpp | 2 | ||||
-rw-r--r-- | src/control/Script8.cpp | 3 | ||||
-rw-r--r-- | src/control/Script9.cpp | 4 | ||||
-rw-r--r-- | src/core/World.cpp | 6 | ||||
-rw-r--r-- | src/core/re3.cpp | 2 | ||||
-rw-r--r-- | src/math/Vector.cpp | 15 | ||||
-rw-r--r-- | src/math/Vector.h | 9 | ||||
-rw-r--r-- | src/math/VuVector.h | 4 | ||||
-rw-r--r-- | src/modelinfo/VehicleModelInfo.cpp | 20 | ||||
-rw-r--r-- | src/modelinfo/VehicleModelInfo.h | 12 | ||||
-rw-r--r-- | src/vehicles/Ferry.h | 13 | ||||
-rw-r--r-- | utils/gxt/spanish.txt | 210 |
24 files changed, 223 insertions, 137 deletions
diff --git a/premake5.lua b/premake5.lua index 2a8e6c93..010810a0 100644 --- a/premake5.lua +++ b/premake5.lua @@ -71,6 +71,13 @@ workspace "reLCS" symbols "Full" staticruntime "off" + -- for CVECTORHACK + configuration { "gmake*" } + buildoptions { "-fpermissive" } + + filter { "platforms:macosx*" } + buildoptions { "-Wno-address-of-temporary" } + if _OPTIONS["with-asan"] then buildoptions { "-fsanitize=address -g3 -fno-omit-frame-pointer" } linkoptions { "-fsanitize=address" } diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f3d51b06..8325938c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -102,6 +102,8 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang if (NOT LIBRW_PLATFORM_PS2) target_compile_options(${EXECUTABLE} PRIVATE + -fpermissive # for CVECTORHACK + -Wno-address-of-temporary # for CVECTORHACK -Wextra -Wdouble-promotion -Wpedantic diff --git a/src/collision/ColLine.h b/src/collision/ColLine.h index 21587a06..a2cb9a0b 100644 --- a/src/collision/ColLine.h +++ b/src/collision/ColLine.h @@ -4,9 +4,9 @@ struct CColLine { // NB: this has to be compatible with two CVuVectors CVector p0; - int pad0; +// int pad0; CVector p1; - int pad1; +// int pad1; CColLine(void) { }; CColLine(const CVector &p0, const CVector &p1) { this->p0 = p0; this->p1 = p1; }; diff --git a/src/collision/ColPoint.h b/src/collision/ColPoint.h index a15b2345..f978720d 100644 --- a/src/collision/ColPoint.h +++ b/src/collision/ColPoint.h @@ -3,10 +3,10 @@ struct CColPoint { CVector point; - int pad1; + int pad1; // this is stupid // the surface normal on the surface of point CVector normal; - int pad2; + //int pad2; uint8 surfaceA; uint8 pieceA; uint8 surfaceB; diff --git a/src/collision/ColSphere.h b/src/collision/ColSphere.h index f86b282a..3f18d8c0 100644 --- a/src/collision/ColSphere.h +++ b/src/collision/ColSphere.h @@ -2,10 +2,11 @@ #include "SurfaceTable.h" -struct CSphere +// TODO(LCS): maybe this was in a union with CVuVector? or is the alignment manual? +struct TYPEALIGN(16) CSphere { // NB: this has to be compatible with a CVuVector - CVector center; + RwV3d center; float radius; void Set(float radius, const CVector ¢er) { this->center = center; this->radius = radius; } }; diff --git a/src/collision/ColTriangle.h b/src/collision/ColTriangle.h index a2580c58..5ce543b5 100644 --- a/src/collision/ColTriangle.h +++ b/src/collision/ColTriangle.h @@ -62,6 +62,7 @@ struct CColTrianglePlane } #endif #else + // TODO(LCS): LCS actually uses CompressedVector too CVector normal; float dist; uint8 dir; diff --git a/src/collision/Collision.cpp b/src/collision/Collision.cpp index bead5183..82681645 100644 --- a/src/collision/Collision.cpp +++ b/src/collision/Collision.cpp @@ -24,6 +24,10 @@ #include "Camera.h" #include "ColStore.h" +// gotta figure out how they handled CSphere exactly +// so using this to remind me to look into it again. +#define CVECTORHACK(rwv3d) CVector(rwv3d) + #ifdef VU_COLLISION #include "VuCollision.h" @@ -391,7 +395,7 @@ CCollision::TestLineSphere(const CColLine &line, const CColSphere &sph) // The length of the tangent would be this: Sqrt((c-p0)^2 - r^2). // Negative if p0 is inside the sphere! This breaks the test! float tansq = 4.0f * linesq * - (sph.center.MagnitudeSqr() - 2.0f*DotProduct(sph.center, line.p0) + line.p0.MagnitudeSqr() - sph.radius*sph.radius); + (CVECTORHACK(sph.center).MagnitudeSqr() - 2.0f*DotProduct(sph.center, line.p0) + line.p0.MagnitudeSqr() - sph.radius*sph.radius); float diffsq = projline*projline - tansq; // if diffsq < 0 that means the line is a passant, so no intersection if(diffsq < 0.0f) @@ -470,9 +474,9 @@ CCollision::TestSphereTriangle(const CColSphere &sphere, case 2: // closest to an edge // looks like original game as DistToLine manually inlined - if(!insideAB) dist = DistToLine(&va, &vb, &sphere.center); - else if(!insideAC) dist = DistToLine(&va, &vc, &sphere.center); - else if(!insideBC) dist = DistToLine(&vb, &vc, &sphere.center); + if(!insideAB) dist = DistToLine(&va, &vb, &CVECTORHACK(sphere.center)); + else if(!insideAC) dist = DistToLine(&va, &vc, &CVECTORHACK(sphere.center)); + else if(!insideBC) dist = DistToLine(&vb, &vc, &CVECTORHACK(sphere.center)); else assert(0); break; case 3: @@ -1279,9 +1283,9 @@ CCollision::ProcessSphereTriangle(const CColSphere &sphere, case 2: // closest to an edge // looks like original game as DistToLine manually inlined - if(!insideAB) dist = DistToLine(&va, &vb, &sphere.center, p); - else if(!insideAC) dist = DistToLine(&va, &vc, &sphere.center, p); - else if(!insideBC) dist = DistToLine(&vb, &vc, &sphere.center, p); + if(!insideAB) dist = DistToLine(&va, &vb, &CVECTORHACK(sphere.center), p); + else if(!insideAC) dist = DistToLine(&va, &vc, &CVECTORHACK(sphere.center), p); + else if(!insideBC) dist = DistToLine(&vb, &vc, &CVECTORHACK(sphere.center), p); else assert(0); break; case 3: diff --git a/src/control/Garages.cpp b/src/control/Garages.cpp index 0b1f8e19..ede252a7 100644 --- a/src/control/Garages.cpp +++ b/src/control/Garages.cpp @@ -1357,7 +1357,7 @@ bool CGarage::IsAnyOtherCarTouchingGarage(CVehicle * pException) uint32 i = CPools::GetVehiclePool()->GetSize(); while (i--) { CVehicle* pVehicle = CPools::GetVehiclePool()->GetSlot(i); - if (!pVehicle || pVehicle == pException) + if (!pVehicle || pVehicle == pException || pVehicle->GetStatus() == STATUS_WRECKED) continue; if (!IsEntityTouching3D(pVehicle)) continue; diff --git a/src/control/Replay.cpp b/src/control/Replay.cpp index 1fb4b9b0..5f481234 100644 --- a/src/control/Replay.cpp +++ b/src/control/Replay.cpp @@ -521,7 +521,7 @@ void CReplay::StoreDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationState state->aFunctionCallbackID[i] = 0; } }else{ - state->aAnimId[i] = NUM_ANIMS; + state->aAnimId[i] = NUM_STD_ANIMS; state->aCurTime[i] = 0; state->aSpeed[i] = 85; state->aFunctionCallbackID[i] = 0; @@ -548,7 +548,7 @@ void CReplay::StoreDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationState } } else { - state->aAnimId2[i] = NUM_ANIMS; + state->aAnimId2[i] = NUM_STD_ANIMS; state->aCurTime2[i] = 0; state->aSpeed2[i] = 85; state->aFunctionCallbackID2[i] = 0; @@ -659,7 +659,7 @@ void CReplay::RetrieveDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationSt for (int i = 0; ((assoc = RpAnimBlendClumpGetMainPartialAssociation_N(ped->GetClump(), i))); i++) assoc->SetBlend(0.0f, -1.0f); for (int i = 0; i < NUM_MAIN_ANIMS_IN_REPLAY; i++) { - if (state->aAnimId[i] == NUM_ANIMS) + if (state->aAnimId[i] == NUM_STD_ANIMS) continue; CAnimBlendAssociation* anim = CAnimManager::AddAnimation(ped->GetClump(), state->aAnimId[i] > 3 ? (AssocGroupId)state->aGroupId[i] : ped->m_animGroup, @@ -677,7 +677,7 @@ void CReplay::RetrieveDetailedPedAnimation(CPed *ped, CStoredDetailedAnimationSt anim->SetDeleteCallback(FindCBFunction(callback & 0x7F), ped); } for (int i = 0; i < NUM_PARTIAL_ANIMS_IN_REPLAY; i++) { - if (state->aAnimId2[i] == NUM_ANIMS) + if (state->aAnimId2[i] == NUM_STD_ANIMS) continue; CAnimBlendAssociation* anim = CAnimManager::AddAnimation(ped->GetClump(), state->aAnimId2[i] > 3 ? (AssocGroupId)state->aGroupId2[i] : ped->m_animGroup, diff --git a/src/control/Script.cpp b/src/control/Script.cpp index 1b1b9045..d12bbb40 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -1608,7 +1608,7 @@ const tScriptCommandData commands[] = { REGISTER_COMMAND(COMMAND_SET_NAVIGATION_ARROW, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), REGISTER_COMMAND(COMMAND_CLEAR_NAVIGATION_ARROW, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), REGISTER_COMMAND(COMMAND_CALL, INPUT_ARGUMENTS(ARGTYPE_FUNCTION, ), OUTPUT_ARGUMENTS(), false, -1, ""), - REGISTER_COMMAND(COMMAND_CALLNOT, INPUT_ARGUMENTS(), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_CALLNOT, INPUT_ARGUMENTS(ARGTYPE_FUNCTION, ), OUTPUT_ARGUMENTS(), false, -1, ""), REGISTER_COMMAND(COMMAND_IS_CAR_AUTOMOBILE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""), REGISTER_COMMAND(COMMAND_IS_CAR_BIKE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""), REGISTER_COMMAND(COMMAND_IS_CAR_PLANE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), true, -1, ""), @@ -1649,7 +1649,7 @@ const tScriptCommandData commands[] = { REGISTER_COMMAND(COMMAND_SET_DRAW_HUD, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), REGISTER_COMMAND(COMMAND_GET_RANDOM_CHAR_IN_AREA_NO_CHECKS, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), REGISTER_COMMAND(COMMAND_GET_RANDOM_CAR_IN_AREA_NO_CHECKS_NO_SAVE, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(), false, -1, ""), - REGISTER_COMMAND(COMMAND_STORE_CAR_COLLIDED_WITH_NO_SAVE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), + REGISTER_COMMAND(COMMAND_STORE_CAR_COLLIDED_WITH_NO_SAVE, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""), REGISTER_COMMAND(COMMAND_DISABLE_FERRY_PATH, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), REGISTER_COMMAND(COMMAND_ENABLE_FERRY_PATH, INPUT_ARGUMENTS(ARGTYPE_INT, ), OUTPUT_ARGUMENTS(), false, -1, ""), REGISTER_COMMAND(COMMAND_GET_CLOSEST_DOCKED_FERRY, INPUT_ARGUMENTS(ARGTYPE_FLOAT, ARGTYPE_FLOAT, ), OUTPUT_ARGUMENTS(ARGTYPE_INT, ), false, -1, ""), diff --git a/src/control/Script10.cpp b/src/control/Script10.cpp index fef33848..6514ebe5 100644 --- a/src/control/Script10.cpp +++ b/src/control/Script10.cpp @@ -223,8 +223,8 @@ int8 CRunningScript::ProcessCommands1600To1699(int32 command) CObject* pObject = CPools::GetObjectPool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pObject); SET_FLOAT_PARAM(1, LimitAngleOnCircle(RADTODEG(Asin(pObject->GetForward().z)))); - SET_FLOAT_PARAM(2, LimitAngleOnCircle(RADTODEG(CGeneral::GetATanOfXY(pObject->GetForward().x, pObject->GetForward().y)))); - SET_FLOAT_PARAM(0, LimitAngleOnCircle(RADTODEG(CGeneral::GetATanOfXY(pObject->GetUp().z, pObject->GetRight().z)))); + SET_FLOAT_PARAM(2, LimitAngleOnCircle(RADTODEG(Atan2(-pObject->GetForward().x, pObject->GetForward().y)))); + SET_FLOAT_PARAM(0, LimitAngleOnCircle(RADTODEG(Atan2(-pObject->GetRight().z, pObject->GetUp().z)))); StoreParameters(&m_nIp, 3); return 0; } diff --git a/src/control/Script3.cpp b/src/control/Script3.cpp index 7acfdfc8..f05c21eb 100644 --- a/src/control/Script3.cpp +++ b/src/control/Script3.cpp @@ -1714,6 +1714,7 @@ int8 CRunningScript::ProcessCommands700To799(int32 command) pBoat->AutoPilot.m_nCarMission = MISSION_GOTOCOORDS_ASTHECROWSWIMS; pBoat->AutoPilot.m_vecDestinationCoors = pos; pBoat->SetStatus(STATUS_PHYSICS); + pBoat->bEngineOn = true; pBoat->AutoPilot.m_nCruiseSpeed = Max(1, pBoat->AutoPilot.m_nCruiseSpeed); pBoat->AutoPilot.m_nAntiReverseTimer = CTimer::GetTimeInMilliseconds(); return 0; diff --git a/src/control/Script6.cpp b/src/control/Script6.cpp index acc84c31..0e1256fd 100644 --- a/src/control/Script6.cpp +++ b/src/control/Script6.cpp @@ -632,7 +632,7 @@ int8 CRunningScript::ProcessCommands1000To1099(int32 command) if (GET_INTEGER_PARAM(2) < 0) pPed->WarpPedIntoCarAsPassenger(pVehicle, GET_INTEGER_PARAM(2)); else { - script_assert(GET_INTEGER_PARAM(1) >= 0 && GET_INTEGER_PARAM(1) < ARRAY_SIZE(pVehicle->pPassengers)); + script_assert(GET_INTEGER_PARAM(2) >= 0 && GET_INTEGER_PARAM(2) < ARRAY_SIZE(pVehicle->pPassengers)); pPed->WarpPedIntoCarAsPassenger(pVehicle, GET_INTEGER_PARAM(2)); } return 0; diff --git a/src/control/Script8.cpp b/src/control/Script8.cpp index 53e39b68..8a1612fb 100644 --- a/src/control/Script8.cpp +++ b/src/control/Script8.cpp @@ -437,7 +437,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) } case COMMAND_DOT_PRODUCT_3D: { - CollectParameters(&m_nIp, 4); + CollectParameters(&m_nIp, 6); float X1 = GET_FLOAT_PARAM(0); float Y1 = GET_FLOAT_PARAM(1); float Z1 = GET_FLOAT_PARAM(2); @@ -788,6 +788,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) } } } + StoreParameters(&m_nIp, 1); return 0; } default: diff --git a/src/control/Script9.cpp b/src/control/Script9.cpp index 020221c4..3a68e239 100644 --- a/src/control/Script9.cpp +++ b/src/control/Script9.cpp @@ -431,8 +431,8 @@ int8 CRunningScript::ProcessCommands1500To1599(int32 command) CVehicle* pVehicle = CPools::GetVehiclePool()->GetAt(GET_INTEGER_PARAM(0)); script_assert(pVehicle); SET_FLOAT_PARAM(1, LimitAngleOnCircle(RADTODEG(Asin(pVehicle->GetForward().z)))); - SET_FLOAT_PARAM(2, LimitAngleOnCircle(RADTODEG(CGeneral::GetATanOfXY(pVehicle->GetForward().x, pVehicle->GetForward().y)))); - SET_FLOAT_PARAM(0, LimitAngleOnCircle(RADTODEG(CGeneral::GetATanOfXY(pVehicle->GetUp().z, pVehicle->GetRight().z)))); + SET_FLOAT_PARAM(2, LimitAngleOnCircle(RADTODEG(Atan2(-pVehicle->GetForward().x, pVehicle->GetForward().y)))); + SET_FLOAT_PARAM(0, LimitAngleOnCircle(RADTODEG(Atan2(-pVehicle->GetRight().z, pVehicle->GetUp().z)))); StoreParameters(&m_nIp, 3); return 0; } diff --git a/src/core/World.cpp b/src/core/World.cpp index eccbcd89..da1c58b2 100644 --- a/src/core/World.cpp +++ b/src/core/World.cpp @@ -2218,8 +2218,12 @@ CWorld::UseDetonator(CEntity *pEntity) { int32 i = CPools::GetVehiclePool()->GetSize(); while(--i >= 0) { +#ifdef FIX_BUGS + CVehicle* pVehicle = CPools::GetVehiclePool()->GetSlot(i); +#else CAutomobile *pVehicle = (CAutomobile *)CPools::GetVehiclePool()->GetSlot(i); - if(pVehicle && !pVehicle->m_vehType && pVehicle->m_bombType == CARBOMB_REMOTE && +#endif + if(pVehicle && pVehicle->m_bombType == CARBOMB_REMOTE && pVehicle->m_pBombRigger == pEntity) { pVehicle->m_bombType = CARBOMB_NONE; pVehicle->m_nBombTimer = 500; diff --git a/src/core/re3.cpp b/src/core/re3.cpp index 4a2dfe00..773d3765 100644 --- a/src/core/re3.cpp +++ b/src/core/re3.cpp @@ -703,7 +703,7 @@ void CTweakVars::Add(CTweakVar *var) TweakVarsListSize = 0; } if(TweakVarsListSize > 63) - TweakVarsList = (CTweakVar**) realloc(TweakVarsList, (TweakVarsListSize + 1) * sizeof(*var)); + TweakVarsList = (CTweakVar**) realloc(TweakVarsList, (TweakVarsListSize + 1) * sizeof(CTweakVar*)); TweakVarsList[TweakVarsListSize++] = var; // TweakVarsList.push_back(var); diff --git a/src/math/Vector.cpp b/src/math/Vector.cpp index ee76e555..e29d4335 100644 --- a/src/math/Vector.cpp +++ b/src/math/Vector.cpp @@ -44,3 +44,18 @@ operator*(const CMatrix &mat, const CVector &vec) mat.ry * vec.x + mat.fy * vec.y + mat.uy * vec.z + mat.py, mat.rz * vec.x + mat.fz * vec.y + mat.uz * vec.z + mat.pz); } + +void +RwV3dTransformPoints(CVector * pointsOut, const CVector * pointsIn, RwInt32 numPoints, const RwMatrix * matrix) +{ + while(numPoints--){ + float x = pointsIn->x*matrix->right.x + pointsIn->y*matrix->up.x + pointsIn->z*matrix->at.x + matrix->pos.x; + float y = pointsIn->x*matrix->right.y + pointsIn->y*matrix->up.y + pointsIn->z*matrix->at.y + matrix->pos.y; + float z = pointsIn->x*matrix->right.z + pointsIn->y*matrix->up.z + pointsIn->z*matrix->at.z + matrix->pos.z; + pointsOut->x = x; + pointsOut->y = y; + pointsOut->z = z; + pointsOut++; + pointsIn++; + } +} diff --git a/src/math/Vector.h b/src/math/Vector.h index 02128454..87895806 100644 --- a/src/math/Vector.h +++ b/src/math/Vector.h @@ -1,8 +1,12 @@ #pragma once +// TODO(LCS): this should have 16 byte alignment but VS doesn't like passing aligned values by value +// need a solution for this eventually if we ever want to load original assets class CVector : public RwV3d { public: + float w; + CVector(void) {} CVector(float x, float y, float z) { @@ -126,4 +130,7 @@ class CMatrix; CVector Multiply3x3(const CMatrix &mat, const CVector &vec); CVector Multiply3x3(const CVector &vec, const CMatrix &mat); -CVector operator*(const CMatrix &mat, const CVector &vec);
\ No newline at end of file +CVector operator*(const CMatrix &mat, const CVector &vec); + +// we need this because CVector and RwV3d have different size now +void RwV3dTransformPoints(CVector * pointsOut, const CVector * pointsIn, RwInt32 numPoints, const RwMatrix * matrix); diff --git a/src/math/VuVector.h b/src/math/VuVector.h index 30d62cfc..026965d1 100644 --- a/src/math/VuVector.h +++ b/src/math/VuVector.h @@ -3,10 +3,10 @@ class TYPEALIGN(16) CVuVector : public CVector { public: - float w; +// float w; // in CVector now CVuVector(void) {} CVuVector(float x, float y, float z) : CVector(x, y, z) {} - CVuVector(float x, float y, float z, float w) : CVector(x, y, z), w(w) {} + CVuVector(float x, float y, float z, float w) : CVector(x, y, z)/*, w(w)*/ { this->w = w;} CVuVector(const CVector &v) : CVector(v.x, v.y, v.z) {} CVuVector(const RwV3d &v) : CVector(v) {} /* diff --git a/src/modelinfo/VehicleModelInfo.cpp b/src/modelinfo/VehicleModelInfo.cpp index bd3a2154..21583709 100644 --- a/src/modelinfo/VehicleModelInfo.cpp +++ b/src/modelinfo/VehicleModelInfo.cpp @@ -15,6 +15,7 @@ #include "Automobile.h" #include "Boat.h" #include "Train.h" +#include "Ferry.h" #include "Plane.h" #include "Heli.h" #include "Bike.h" @@ -122,6 +123,22 @@ RwObjectNameIdAssocation trainIds[] = { { nil, 0, 0 } }; +RwObjectNameIdAssocation ferryIds[] = { + { "door_front_dummy", FERRY_DOOR_FRONT, VEHICLE_FLAG_LEFT | VEHICLE_FLAG_COLLAPSE }, + { "door_back_dummy", FERRY_DOOR_BACK, VEHICLE_FLAG_LEFT | VEHICLE_FLAG_COLLAPSE }, + { "ramp_front_dummy", FERRY_RAMP_FRONT, VEHICLE_FLAG_LEFT | VEHICLE_FLAG_COLLAPSE }, + { "ramp_back_dummy", FERRY_RAMP_BACK, VEHICLE_FLAG_LEFT | VEHICLE_FLAG_COLLAPSE }, + { "light_front", FERRY_POS_LIGHT_FRONT, VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID }, + { "light_rear", FERRY_POS_LIGHT_REAR, VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID }, + { "chim_left", FERRY_POS_CHIM_LEFT, VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID }, + { "ped_point", FERRY_POS_PED_POINT, VEHICLE_FLAG_DOOR | VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID }, + { "car1_dummy", FERRY_POS_CAR1, VEHICLE_FLAG_DOOR | VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID }, + { "car2_dummy", FERRY_POS_CAR2, VEHICLE_FLAG_DOOR | VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID }, + { "car3_dummy", FERRY_POS_CAR3, VEHICLE_FLAG_DOOR | VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID }, + { "car4_dummy", FERRY_POS_CAR4, VEHICLE_FLAG_DOOR | VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID }, + { nil, 0, 0 } +}; + RwObjectNameIdAssocation heliIds[] = { { "chassis_dummy", HELI_CHASSIS, VEHICLE_FLAG_COLLAPSE }, { "toprotor", HELI_TOPROTOR, 0 }, @@ -170,7 +187,8 @@ RwObjectNameIdAssocation *CVehicleModelInfo::ms_vehicleDescs[] = { trainIds, heliIds, planeIds, - bikeIds + bikeIds, + ferryIds }; bool gbBlackCars; diff --git a/src/modelinfo/VehicleModelInfo.h b/src/modelinfo/VehicleModelInfo.h index f979c2c0..6f2cea3c 100644 --- a/src/modelinfo/VehicleModelInfo.h +++ b/src/modelinfo/VehicleModelInfo.h @@ -49,6 +49,18 @@ enum eBoatPositions BOAT_POS_FRONTSEAT }; +enum eFerryPositions +{ + FERRY_POS_LIGHT_FRONT, + FERRY_POS_LIGHT_REAR, + FERRY_POS_CHIM_LEFT, + FERRY_POS_PED_POINT, + FERRY_POS_CAR1, + FERRY_POS_CAR2, + FERRY_POS_CAR3, + FERRY_POS_CAR4 +}; + enum eTrainPositions { TRAIN_POS_LIGHT_FRONT, diff --git a/src/vehicles/Ferry.h b/src/vehicles/Ferry.h new file mode 100644 index 00000000..375dfce1 --- /dev/null +++ b/src/vehicles/Ferry.h @@ -0,0 +1,13 @@ +#pragma once + +#include "Vehicle.h" +#include "Door.h" + +enum eFerryNodes +{ + FERRY_DOOR_FRONT = 1, + FERRY_RAMP_FRONT, + FERRY_DOOR_BACK, + FERRY_RAMP_BACK, + NUM_FERRY_NODES +}; diff --git a/utils/gxt/spanish.txt b/utils/gxt/spanish.txt index bf2cb721..3f57b1a9 100644 --- a/utils/gxt/spanish.txt +++ b/utils/gxt/spanish.txt @@ -17384,13 +17384,13 @@ This track contains a sample of "Next Level" as performed by Showbiz & AG. Court INICIO [FEP_STG] -INICIAR JUEGO +Iniciar juego [FEP_OPT] -OPCIONES +Opciones [FEP_QUI] -SALIR +Salir [FET_QG] SALIR @@ -17404,87 +17404,87 @@ SALIR OPCIONES [FET_GRA] -Config. Gráficos +Configuración de gráficos [FET_PS] -Config. Jugador +Configuración de hugador [FET_MIG] -IZQUIERDA, DERECHA o RUEDA DEL MOUSE: ajustar. +IZQUIERDA, DERECHA, RUEDA DEL RATÓN PARA AJUSTAR [FET_HRD] -Ajustes reiniciados. +SE HA RESTAURADO LA CONFIGURACIÓN PREDETERMINADA [FET_APP] -CLICK IZQ. o ENTER para aplicar cambios. +APLICAR { controls } [FET_CTL] -CONTROLES +Configuración de controles [FET_CTI] -CONTROLES CLÁSICOS +Controles clásicos [FET_STI] -CONTROLES ESTÁNDAR +Controles estándar [FEC_RED] -REDEFINIR CONTROLES +Redefinir controles [FEC_MOUSE] -CONFIG. MOUSE +Configuración del ratón [FET_DEF] -Reiniciar Ajustes +Restaurar valores por defecto { mouse settings } [FEC_MSH] -SENSIBILIDAD: +SENSIBILIDAD DEL RATÓN: [FEC_IVV] -INVERTIR VERTICALMENTE: +INVERTIR VERTICALIDAD RATÓN: [FET_MST] -CONDUCC. CON MOUSE: +CONDUCIR CON EL RATÓN: { audio } [FEA_NM3] -NO HAY ARCHIVOS +NO HAY ARCHIVOS MP3 [FEA_3DH] -HARDWARE: +HARDWARE DE SONIDO: [FEA_2SP] -2 Altavoces +2 altavoces [FET_DAM] MODELADO ACÚSTICO DINÁMICO: [FEA_4SP] -Más de 2 Altavoces +Más de 2 altavoces [FEA_EAR] Auriculares [FEA_MPB] -VOL. ARCHIVOS MP3: +SUBIR VOLUMEN DE MP3: [FEA_SPK] -CONFIG. ALTAVOCES: +CONFIGURACIÓN DE ALTAVOCES: [FEA_ADP] -AUTO-DETECTAR HARDWARE +DETECTAR AUTOMÁTICAMENTE [FET_RSC] -Hardware no disponible. Ajustes reiniciados. +HARDAWARE NO DISPONIBLE. RESTAURADO AJUSTE ORIGINAL { display } [FEM_LOD] -DISTANCIA VISIBLE: +DISTANCIA DE DIBUJADO: [FEM_CSB] BORDES EN CINEMÁTICAS: @@ -17495,31 +17495,31 @@ CÁMARA LIBRE: { graphics } [FED_RES] -RESOLUCIÓN: +RESOLUCIÓN DE PANTALLA: [FED_FLS] -COMPLETA +PANTALLA COMPLETA [FED_WND] VENTANA [FEM_VSC] -SINC. AUDIO/VIDEO: +SINCRONIZAR IMAGEN: [FEM_FRM] LIMITADOR DE FOTOGRAMAS: [FED_AAS] -ANTI-ALIASING: +SUAVIZADO DE BORDES: [FEM_2PR] -PS2 ALPHA TEST: +ALPHA TEST TIPO PS2: [FEM_MOB] MÓVIL [FED_MBL] -DESENFOQ. MOVIMIENTO: +DESENFOQUE DE MOVIMIENTO: [FEM_NRM] NORMAL @@ -17528,7 +17528,7 @@ NORMAL SIMPLE [FEM_SCF] -FORMATO DE PANTALLA: +FORMATO DE IMAGEN: [FED_CLF] FILTRO DE COLOR: @@ -17536,27 +17536,27 @@ FILTRO DE COLOR: { skin } [FES_SKN] -NOMBRE +NOMBRE DE APARIENCIA [FES_DAT] FECHA [FES_SET] -USAR +Utilizar apariencia [FET_DSN] -Predeterminado.bmp +Apariencia predeterminada del jugador.bmp { pause menu } [FET_PAU] -PAUSA +MENÚ PAUSA [FEP_RES] -CONTINUAR +Continuar [FEQ_SRE] -¿Seguro que quieres salir? Se perderá todo el progreso que hiciste. ¿Continuar? +¿Seguro que quieres salir? Se perderán todos los progresos desde la última partida guardada. ¿Quieres proceder? { map } @@ -17564,7 +17564,7 @@ CONTINUAR ESTÁS AQUÍ [FEH_MPH] -MOUSE o FLECHAS: mover. REPÁG, AVPÁG o RUEDA DEL MOUSE: acercar/alejar. L: referencias. CLICK DCHO: fijar destino. +RATÓN, CURSORES PARA DESPLAZAR - RE PÁG, AV PÁG, RUEDA RATÓN PARA HACER ZOOM, L - LEYENDA { control keys } @@ -17572,16 +17572,16 @@ MOUSE o FLECHAS: mover. REPÁG, AVPÁG o RUEDA DEL MOUSE: acercar/alejar. L: ref A PIE [FET_CCR] -EN VEHÍCULO +EN COCHE [FEC_NMN] NUM. ~1~ [FEC_ETR] -ENT +ENTRAR [FEC_DOT] -NUM. +NUM. . [FEC_UPA] ARRIBA @@ -17599,19 +17599,19 @@ RE PÁG AV PÁG [FEC_RTN] -ENTER +INTRO [FEC_NUS] -NO USADO +NO UTILIZADO [FEC_HME] INICIO [FEC_RCT] -CTRL DCHO +CTRL DCHO. [FEC_LSF] -SHIFT IZQ +MAYÚS IZQ. [FEC_DLL] SUPR @@ -17623,85 +17623,85 @@ TAB - [FEC_LCT] -CTRL IZQ +CTRL IZQ. [FEC_MSL] -CLICK IZQ +RATÓN IZDO. [FEC_MWB] -RUEDA ABAJO +RUEDA RATÓN ABAJO [FEC_MWF] -RUEDA ARRIBA +RUEDA RATÓN ARRIBA [FEC_SPC] ESPACIO [FEC_RSF] -SHIFT DCHO +MAYÚS DCHA. [FEC_MSR] -CLICK DCHO +RATÓN DCHO. [FEC_CLK] BLOQ MAYÚS [FEC_MSM] -CLICK RUEDA +RATÓN CENTRAL [FET_CIG] -RETROCESO: limpiar acción. CLICK IZQ. o ENTER: asignar/agregar. +RETROCESO: QUITAR - BIR, INTRO: CAMBIAR [FET_EIG] -No se puede asignar un botón para ésta acción. +NO SE PUEDE DEFINIR UN CONTROL PARA ESTA ACCIÓN [FEC_CMP] COMBO: MIRAR I+D [FEC_LOR] -Mirar Derecha +Mirar hacia la derecha [FEC_LOL] -Mirar Izquierda +Mirar hacia la izquierda [FEC_LBA] -Mirar Atrás +Mirar hacia atrás [FEC_IRT] -INSERTAR +INSERT [FEC_PLS] -NUM + +NUM. + [FEC_QUE] -????? +¿¿¿??? [FEC_UNB] SIN ASIGNAR [FEC_ERI] -¡Error! Una o más acciones no están vinculadas a una tecla o botón. Verifica que todas las acciones estén configuradas. +¡Error! Una o más acciones de control no están asignadas a una tecla o botón. Comprueba que todas las acciones de control estén asignadas. [FEC_TFD] -Torreta+Inclinar Abajo +Torreta /morro abajo [FET_RIG] -Aprieta el botón/tecla que quieras para ésta acción. +ELIGE UN NUEVO CONTROL PARA ESTA ACCIÓN [FEC_TFU] -Torreta+Inclinar Arriba +Torreta /morro arriba [FEC_TFR] -Mirar+Torreta (Dcha.) +Mirar /Torreta a dcha. [FEC_TFL] -Mirar+Torreta (Izqda.) +Mirar /Torreta a izda. [FEC_ANS] Acción [FEC_HND] -Freno de Mano +Freno de mano [FEC_SPN] Esprintar @@ -17710,25 +17710,25 @@ Esprintar Saltar [FEC_CMR] -Cámara +Cambiar cámara [FEC_SUB] -Misión Secundaria +Misión secundaria [FEC_HRN] Claxon [FEC_RAD] -Cambiar Emisora +Radio [FEC_EEX] -Entrar+Salir +Entrar y salir [FEC_ZOT] -Alejar Zoom +Alejar zoom [FEC_ZIN] -Aumentar Zoom +Acercar zoom [FEC_RIG] Derecha @@ -17737,96 +17737,96 @@ Derecha Izquierda [FEC_CEN] -Centrar Cámara +Centrar cámara [FEC_BAC] Retroceder [FEC_PTT] -Objetivo Anterior +Objetivo anterior [FEC_FOR] -Avanzar/Acelerar +Avanzar [FEC_PWE] -Arma Anterior +Arma anterior [FEC_NWE] -Arma Siguiente +Siguiente arma [FEC_FIR] -Atacar/Disparar +Disparar [FEC_NTR] -Objetivo Siguiente +Siguiente objetivo [FEC_LDU] -Mirar Abajo +Mirar abajo [FEC_LUD] -Mirar Arriba +Mirar arriba { improvements & fixes } [FED_HUD] -MODO INTERFAZ: +INTERFAZ: [FED_RDM] -MAPA E ÍCONOS +MAPA E ICONOS [FED_RDB] -SOLO ÍCONOS +SOLO ICONOS [FEA_MUS] -VOL. DE RADIO: +VOLUMEN DE RADIO: [FEA_SFX] -VOL. DE EFECTOS: +VOLUMEN DE EFECTOS: [BUSTED] -¡ARRESTADO! +¡TRINCADO! [FEM_SL1] -Espacio Libre 1 +Archivo 1 no presente [FEM_SL2] -Espacio Libre 2 +Archivo 2 no presente [FEM_SL3] -Espacio Libre 3 +Archivo 3 no presente [FEM_SL4] -Espacio Libre 4 +Archivo 4 no presente [FEM_SL5] -Espacio Libre 5 +Archivo 5 no presente [FEM_SL6] -Espacio Libre 6 +Archivo 6 no presente [FEM_SL7] -Espacio Libre 7 +Archivo 7 no presente [FEM_SL8] -Espacio Libre 8 +Archivo 8 no presente [FES_DEL] -BORRAR PARTIDA +Borrar partida [FEO_CON] -Config. Controles +Configuración de controles [FEO_AUD] -Config. Audio +Configuración de audio [FEO_DIS] -Config. Pantalla +Configuración de pantalla [FEO_LAN] -Config. Idioma +Configuración de idioma [FEO_PLA] -Config. Jugador +Configuración del jugador [FEB_AUD] Audio @@ -17844,7 +17844,7 @@ AUDIO IZQUIERDA [FEH_SGA] -NUEVO JUEGO +Iniciar nueva partida [DUMMY] THIS LABEL NEEDS TO BE HERE !!! |