diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-01-08 19:24:43 +0100 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-01-08 19:24:43 +0100 |
commit | 4debd89d8e3d0d7a442594dab0aa1cb61e7ae8e3 (patch) | |
tree | 0f796734c22fc26264f6d032af96a9cdedbba150 | |
parent | Enable trains (diff) | |
parent | Add multisampling (diff) | |
download | re3-4debd89d8e3d0d7a442594dab0aa1cb61e7ae8e3.tar re3-4debd89d8e3d0d7a442594dab0aa1cb61e7ae8e3.tar.gz re3-4debd89d8e3d0d7a442594dab0aa1cb61e7ae8e3.tar.bz2 re3-4debd89d8e3d0d7a442594dab0aa1cb61e7ae8e3.tar.lz re3-4debd89d8e3d0d7a442594dab0aa1cb61e7ae8e3.tar.xz re3-4debd89d8e3d0d7a442594dab0aa1cb61e7ae8e3.tar.zst re3-4debd89d8e3d0d7a442594dab0aa1cb61e7ae8e3.zip |
-rw-r--r-- | src/control/Script8.cpp | 18 | ||||
-rw-r--r-- | src/core/Frontend.h | 4 | ||||
-rw-r--r-- | src/core/config.h | 3 | ||||
-rw-r--r-- | src/render/Timecycle.cpp | 2 |
4 files changed, 13 insertions, 14 deletions
diff --git a/src/control/Script8.cpp b/src/control/Script8.cpp index 0416d464..74552b23 100644 --- a/src/control/Script8.cpp +++ b/src/control/Script8.cpp @@ -443,7 +443,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) { CollectParameters(&m_nIp, 1); CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); - *(CVector*)ScriptParams[0] = GAME_SPEED_TO_METERS_PER_SECOND * pObject->GetMoveSpeed(); + *(CVector*)&ScriptParams[0] = GAME_SPEED_TO_METERS_PER_SECOND * pObject->GetMoveSpeed(); StoreParameters(&m_nIp, 3); return 0; } @@ -454,7 +454,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) { CollectParameters(&m_nIp, 4); CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); - CVector newSpeed = pObject->GetTurnSpeed() + *(CVector*)ScriptParams[1] / GAME_SPEED_TO_METERS_PER_SECOND; + CVector newSpeed = pObject->GetTurnSpeed() + *(CVector*)&ScriptParams[1] / GAME_SPEED_TO_METERS_PER_SECOND; if (pObject->bIsStatic) { pObject->SetIsStatic(false); pObject->AddToMovingList(); @@ -466,7 +466,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) { CollectParameters(&m_nIp, 4); CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); - CVector newSpeed = *(CVector*)ScriptParams[1] / GAME_SPEED_TO_METERS_PER_SECOND; + CVector newSpeed = *(CVector*)&ScriptParams[1] / GAME_SPEED_TO_METERS_PER_SECOND; if (pObject->bIsStatic) { pObject->SetIsStatic(false); pObject->AddToMovingList(); @@ -484,13 +484,13 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) case COMMAND_GET_ANGLE_BETWEEN_2D_VECTORS: { CollectParameters(&m_nIp, 4); - CVector2D v1 = *(CVector2D*)ScriptParams[0]; - CVector2D v2 = *(CVector2D*)ScriptParams[2]; + CVector2D v1 = *(CVector2D*)&ScriptParams[0]; + CVector2D v2 = *(CVector2D*)&ScriptParams[2]; float c = DotProduct2D(v1, v2) / (v1.Magnitude() * v2.Magnitude()); #ifdef FIX_BUGS // command is a SA leftover where it was fixed to this - *(float*)ScriptParams[0] = RADTODEG(Acos(c)); + *(float*)&ScriptParams[0] = RADTODEG(Acos(c)); #else - *(float*)ScriptParams[0] = Acos(c); + *(float*)&ScriptParams[0] = Acos(c); #endif return 0; } @@ -521,7 +521,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) { CollectParameters(&m_nIp, 1); CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); - *(CVector*)ScriptParams[0] = pObject->GetTurnSpeed() * GAME_SPEED_TO_METERS_PER_SECOND; + *(CVector*)&ScriptParams[0] = pObject->GetTurnSpeed() * GAME_SPEED_TO_METERS_PER_SECOND; StoreParameters(&m_nIp, 3); return 0; } @@ -552,7 +552,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command) { CollectParameters(&m_nIp, 1); CObject* pObject = CPools::GetObjectPool()->GetAt(ScriptParams[0]); - *(float*)ScriptParams[0] = pObject->GetMoveSpeed().Magnitude() * GAME_SPEED_TO_METERS_PER_SECOND; + *(float*)&ScriptParams[0] = pObject->GetMoveSpeed().Magnitude() * GAME_SPEED_TO_METERS_PER_SECOND; StoreParameters(&m_nIp, 1); return 0; } diff --git a/src/core/Frontend.h b/src/core/Frontend.h index b27cccb5..4a812b05 100644 --- a/src/core/Frontend.h +++ b/src/core/Frontend.h @@ -661,8 +661,8 @@ public: int32 m_nSelectedScreenMode; #endif #ifdef MULTISAMPLING - static int8 m_nPrefsMSAALevel; - static int8 m_nDisplayMSAALevel; + int8 m_nPrefsMSAALevel; + int8 m_nDisplayMSAALevel; #endif enum LANGUAGE diff --git a/src/core/config.h b/src/core/config.h index d4da96e6..4aaeb3c1 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -314,7 +314,7 @@ enum Config { # define GRAPHICS_MENU_OPTIONS // otherwise Display settings will be scrollable //# define NO_ISLAND_LOADING // disable loadscreen between islands via loading all island data at once, consumes more memory and CPU # define CUTSCENE_BORDERS_SWITCH -//# define MULTISAMPLING // adds MSAA option +# define MULTISAMPLING // adds MSAA option # define INVERT_LOOK_FOR_PAD // enable the hidden option # endif #endif @@ -384,7 +384,6 @@ static_assert(false, "SUPPORT_XBOX_SCRIPT and SUPPORT_MOBILE_SCRIPT are mutually #ifdef LIBRW // these are not supported with librw yet -# undef MULTISAMPLING #endif // IMG #define BIG_IMG // allows to read larger img files diff --git a/src/render/Timecycle.cpp b/src/render/Timecycle.cpp index 3cb5a0b0..af70a9f3 100644 --- a/src/render/Timecycle.cpp +++ b/src/render/Timecycle.cpp @@ -228,7 +228,7 @@ CTimeCycle::Initialise(void) for(h = 0; h < NUMHOURS; h++){ li = 0; while(work_buff[bi] == '/' || work_buff[bi] == '\n' || - work_buff[bi] == '\0' || work_buff[bi] == '\r'){ + work_buff[bi] == '\0' || work_buff[bi] == ' ' || work_buff[bi] == '\r'){ while(work_buff[bi] != '\n' && work_buff[bi] != '\0' && work_buff[bi] != '\r') bi++; bi++; |