Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Merge branch 'master' into miami
# Conflicts:
#	src/animation/AnimBlendAssocGroup.cpp
#	src/animation/AnimBlendAssociation.cpp
#	src/animation/AnimManager.cpp
#	src/core/Streaming.cpp
  • Loading branch information
Sergeanur committed May 8, 2020
2 parents 08de6d4 + d686f58 commit 4b8d6a3223c9eeaeebb979945553704987b3c625
Showing with 11 additions and 6 deletions.
  1. +1 −0 src/animation/AnimBlendAssociation.cpp
  2. +0 −2 src/core/Cam.cpp
  3. +2 −0 src/core/Camera.h
  4. +8 −4 src/render/Sprite.cpp
@@ -159,6 +159,7 @@ CAnimBlendAssociation::Start(float time)
flags |= ASSOC_RUNNING;
SetCurrentTime(time);
}

bool
CAnimBlendAssociation::UpdateTime(float timeDelta, float relSpeed)
{
@@ -25,8 +25,6 @@
#include "Camera.h"
#include "DMAudio.h"

const float DefaultFOV = 70.0f; // beta: 80.0f

bool PrintDebugCode = false;
int16 DebugCamMode;

@@ -40,6 +40,8 @@ enum
#define DEFAULT_CAR_ZOOM_VALUE_2 (1.9f)
#define DEFAULT_CAR_ZOOM_VALUE_3 (3.9f)

const float DefaultFOV = 70.0f; // beta: 80.0f

class CCam
{
public:
@@ -29,13 +29,17 @@ CSprite::CalcScreenCoors(const RwV3d &in, RwV3d *out, float *outw, float *outh,
float recip = 1.0f/out->z;
out->x *= SCREEN_WIDTH * recip;
out->y *= SCREEN_HEIGHT * recip;
// What is this? size?
*outw = 70.0f/CDraw::GetFOV() * SCREEN_WIDTH * recip;
#ifdef ASPECT_RATIO_SCALE
*outh = 70.0f/CDraw::GetFOV() / (DEFAULT_ASPECT_RATIO / SCREEN_ASPECT_RATIO) * SCREEN_HEIGHT * recip;
float fov = CDraw::ConvertFOV(DefaultFOV);
#else
*outh = 70.0f/CDraw::GetFOV() * SCREEN_HEIGHT * recip;
const float fov = DefaultFOV;
#endif
// this is used to scale correctly if you zoom in with sniper rifle
float fovScale = fov / CDraw::GetFOV();

*outw = fovScale * SCREEN_SCALE_AR(recip) * SCREEN_WIDTH;
*outh = fovScale * recip * SCREEN_HEIGHT;

return true;
}

0 comments on commit 4b8d6a3

Please sign in to comment.