diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-04-05 11:45:30 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-04-05 11:45:30 +0200 |
commit | 5cbcaa57d7160fc4e20254fcedfec3609e8521ef (patch) | |
tree | 000c9de98a1a8c06c0dfb08d355310dc73753cb9 /src/core | |
parent | shoreside garage fix (diff) | |
parent | Merge pull request #377 from Fire-Head/master (diff) | |
download | re3-5cbcaa57d7160fc4e20254fcedfec3609e8521ef.tar re3-5cbcaa57d7160fc4e20254fcedfec3609e8521ef.tar.gz re3-5cbcaa57d7160fc4e20254fcedfec3609e8521ef.tar.bz2 re3-5cbcaa57d7160fc4e20254fcedfec3609e8521ef.tar.lz re3-5cbcaa57d7160fc4e20254fcedfec3609e8521ef.tar.xz re3-5cbcaa57d7160fc4e20254fcedfec3609e8521ef.tar.zst re3-5cbcaa57d7160fc4e20254fcedfec3609e8521ef.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/Radar.cpp | 5 | ||||
-rw-r--r-- | src/core/common.h | 1 | ||||
-rw-r--r-- | src/core/config.h | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp index 1c634760..f1d8ec96 100644 --- a/src/core/Radar.cpp +++ b/src/core/Radar.cpp @@ -1106,8 +1106,11 @@ void CRadar::TransformRadarPointToRealWorldSpace(CVector2D &out, const CVector2D // Radar space goes from -1.0 to 1.0 in x and y, top right is (1.0, 1.0)
void CRadar::TransformRadarPointToScreenSpace(CVector2D &out, const CVector2D &in)
{
- // FIX? scale RADAR_LEFT here somehow
+#ifdef FIX_BUGS
+ out.x = (in.x + 1.0f)*0.5f*SCREEN_SCALE_X(RADAR_WIDTH) + SCREEN_SCALE_X(RADAR_LEFT);
+#else
out.x = (in.x + 1.0f)*0.5f*SCREEN_SCALE_X(RADAR_WIDTH) + RADAR_LEFT;
+#endif
out.y = (1.0f - in.y)*0.5f*SCREEN_SCALE_Y(RADAR_HEIGHT) + SCREEN_SCALE_FROM_BOTTOM(RADAR_BOTTOM + RADAR_HEIGHT);
}
diff --git a/src/core/common.h b/src/core/common.h index 7b4ff4a0..b58b93af 100644 --- a/src/core/common.h +++ b/src/core/common.h @@ -215,6 +215,7 @@ void re3_assert(const char *expr, const char *filename, unsigned int lineno, con #define ABS(a) (((a) < 0) ? (-(a)) : (a)) #define norm(value, min, max) (((value) < (min)) ? 0 : (((value) > (max)) ? 1 : (((value) - (min)) / ((max) - (min))))) +#define lerp(norm, min, max) ( (norm) * ((max) - (min)) + (min) ) #define STRINGIFY(x) #x #define STR(x) STRINGIFY(x) diff --git a/src/core/config.h b/src/core/config.h index 58885e57..4d66eef5 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -94,6 +94,8 @@ enum Config { NUM_GARAGES = 32, NUM_PROJECTILES = 32, + NUM_GLASSPANES = 45, + NUM_GLASSENTITIES = 32, NUM_WATERCANNONS = 3, NUMPEDROUTES = 200, |