mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-13 02:21:53 +00:00
Buildfix for 32-bit x86, arg.
This commit is contained in:
parent
833c93bd98
commit
1ce6bf399a
@ -94,7 +94,7 @@ static u32 blendColor2Func(u32 fix) {
|
||||
if (fix == 0)
|
||||
return D3DBLEND_ZERO;
|
||||
|
||||
Vec3f fix3 = Vec3f::FromRGB(fix);
|
||||
const Vec3f fix3 = Vec3f::FromRGB(fix);
|
||||
if (fix3.x >= 0.99 && fix3.y >= 0.99 && fix3.z >= 0.99)
|
||||
return D3DBLEND_ONE;
|
||||
else if (fix3.x <= 0.01 && fix3.y <= 0.01 && fix3.z <= 0.01)
|
||||
@ -102,8 +102,8 @@ static u32 blendColor2Func(u32 fix) {
|
||||
return D3DBLEND_UNK;
|
||||
}
|
||||
|
||||
static bool blendColorSimilar(Vec3f a, Vec3f b, float margin = 0.1f) {
|
||||
Vec3f diff = a - b;
|
||||
static bool blendColorSimilar(const Vec3f &a, const Vec3f &b, float margin = 0.1f) {
|
||||
const Vec3f diff = a - b;
|
||||
if (fabsf(diff.x) <= margin && fabsf(diff.y) <= margin && fabsf(diff.z) <= margin)
|
||||
return true;
|
||||
return false;
|
||||
|
@ -138,7 +138,7 @@ using namespace DX9;
|
||||
class Lighter {
|
||||
public:
|
||||
Lighter(int vertType);
|
||||
void Light(float colorOut0[4], float colorOut1[4], const float colorIn[4], Vec3f pos, Vec3f normal);
|
||||
void Light(float colorOut0[4], float colorOut1[4], const float colorIn[4], const Vec3f &pos, const Vec3f &normal);
|
||||
|
||||
private:
|
||||
Color4 globalAmbient;
|
||||
@ -170,7 +170,7 @@ Lighter::Lighter(int vertType) {
|
||||
materialUpdate_ = hasColor ? gstate.materialupdate & 7 : 0;
|
||||
}
|
||||
|
||||
void Lighter::Light(float colorOut0[4], float colorOut1[4], const float colorIn[4], Vec3f pos, Vec3f norm)
|
||||
void Lighter::Light(float colorOut0[4], float colorOut1[4], const float colorIn[4], const Vec3f &pos, const Vec3f &norm)
|
||||
{
|
||||
// Color are in dx format
|
||||
Color4 in;
|
||||
|
@ -53,7 +53,7 @@ inline float clamp(float in, float min, float max) {
|
||||
class Lighter {
|
||||
public:
|
||||
Lighter(int vertType);
|
||||
void Light(float colorOut0[4], float colorOut1[4], const float colorIn[4], Vec3f pos, Vec3f normal);
|
||||
void Light(float colorOut0[4], float colorOut1[4], const float colorIn[4], const Vec3f &pos, const Vec3f &normal);
|
||||
|
||||
private:
|
||||
Color4 globalAmbient;
|
||||
@ -85,7 +85,7 @@ Lighter::Lighter(int vertType) {
|
||||
materialUpdate_ = hasColor ? gstate.materialupdate & 7 : 0;
|
||||
}
|
||||
|
||||
void Lighter::Light(float colorOut0[4], float colorOut1[4], const float colorIn[4], Vec3f pos, Vec3f norm) {
|
||||
void Lighter::Light(float colorOut0[4], float colorOut1[4], const float colorIn[4], const Vec3f &pos, const Vec3f &norm) {
|
||||
Color4 in(colorIn);
|
||||
|
||||
const Color4 *ambient;
|
||||
|
@ -148,7 +148,7 @@ static GLenum blendColor2Func(u32 fix) {
|
||||
if (fix == 0)
|
||||
return GL_ZERO;
|
||||
|
||||
Vec3f fix3 = Vec3f::FromRGB(fix);
|
||||
const Vec3f fix3 = Vec3f::FromRGB(fix);
|
||||
if (fix3.x >= 0.99 && fix3.y >= 0.99 && fix3.z >= 0.99)
|
||||
return GL_ONE;
|
||||
else if (fix3.x <= 0.01 && fix3.y <= 0.01 && fix3.z <= 0.01)
|
||||
@ -156,8 +156,8 @@ static GLenum blendColor2Func(u32 fix) {
|
||||
return GL_INVALID_ENUM;
|
||||
}
|
||||
|
||||
static bool blendColorSimilar(Vec3f a, Vec3f b, float margin = 0.1f) {
|
||||
Vec3f diff = a - b;
|
||||
static inline bool blendColorSimilar(const Vec3f &a, const Vec3f &b, float margin = 0.1f) {
|
||||
const Vec3f diff = a - b;
|
||||
if (fabsf(diff.x) <= margin && fabsf(diff.y) <= margin && fabsf(diff.z) <= margin)
|
||||
return true;
|
||||
return false;
|
||||
|
@ -714,7 +714,7 @@ static inline Vec4<int> GetTextureFunctionOutput(const Vec4<int>& prim_color, co
|
||||
return Vec4<int>(out_rgb.r(), out_rgb.g(), out_rgb.b(), out_a);
|
||||
}
|
||||
|
||||
static inline bool ColorTestPassed(Vec3<int> color)
|
||||
static inline bool ColorTestPassed(const Vec3<int> &color)
|
||||
{
|
||||
const u32 mask = gstate.getColorTestMask();
|
||||
const u32 c = color.ToRGB() & mask;
|
||||
@ -874,7 +874,7 @@ static inline Vec3<int> GetDestFactor(const Vec4<int>& source, const Vec4<int>&
|
||||
}
|
||||
}
|
||||
|
||||
static inline Vec3<int> AlphaBlendingResult(const Vec4<int>& source, const Vec4<int> dst)
|
||||
static inline Vec3<int> AlphaBlendingResult(const Vec4<int> &source, const Vec4<int> &dst)
|
||||
{
|
||||
Vec3<int> srcfactor = GetSourceFactor(source, dst);
|
||||
Vec3<int> dstfactor = GetDestFactor(source, dst);
|
||||
@ -935,7 +935,8 @@ static inline Vec3<int> AlphaBlendingResult(const Vec4<int>& source, const Vec4<
|
||||
}
|
||||
|
||||
template <bool clearMode>
|
||||
inline void DrawSinglePixel(const DrawingCoords &p, u16 z, Vec4<int> prim_color) {
|
||||
inline void DrawSinglePixel(const DrawingCoords &p, u16 z, const Vec4<int> &color_in) {
|
||||
Vec4<int> prim_color = color_in;
|
||||
// Depth range test
|
||||
// TODO: Clear mode?
|
||||
if (!gstate.isModeThrough())
|
||||
|
@ -43,7 +43,7 @@ void TouchInputHandler::handleTouchEvent(HWND hWnd, UINT message, WPARAM wParam,
|
||||
inputs,
|
||||
sizeof(TOUCHINPUT)))
|
||||
{
|
||||
for (int i = 0; i < inputCount; i++) {
|
||||
for (UINT i = 0; i < inputCount; i++) {
|
||||
int id = 0;
|
||||
|
||||
//here we map the windows touch id to the ppsspp internal touch id
|
||||
@ -64,7 +64,7 @@ void TouchInputHandler::handleTouchEvent(HWND hWnd, UINT message, WPARAM wParam,
|
||||
}
|
||||
//finding first free internal touch id and map this windows id to an internal id
|
||||
bool *first_free = std::find(input_state.pointer_down, input_state.pointer_down + MAX_POINTERS, false);
|
||||
id = (first_free - input_state.pointer_down) / sizeof(bool);
|
||||
id = (int)(first_free - input_state.pointer_down) / (int)sizeof(bool);
|
||||
touchTranslate[inputs[i].dwID] = id;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user