Fix some unused variable warnings.

The CheckAlpha one looks like it will matter.
This commit is contained in:
Unknown W. Brackets 2015-11-25 16:00:25 -08:00
parent 0cea0b09a2
commit 7bfe100b0f
8 changed files with 13 additions and 30 deletions

View File

@ -389,8 +389,6 @@ void ConvertRGBA5551ToRGBA8888(u32 *dst32, const u16 *src, const u32 numPixels)
void ConvertRGBA4444ToRGBA8888(u32 *dst32, const u16 *src, const u32 numPixels) {
#ifdef _M_SSE
const __m128i mask4 = _mm_set1_epi16(0x000f);
const __m128i mask8 = _mm_set1_epi16(0x00ff);
const __m128i one = _mm_set1_epi16(0x0001);
const __m128i *srcp = (const __m128i *)src;
__m128i *dstp = (__m128i *)dst32;

View File

@ -791,8 +791,6 @@ bool KeyToPspButton(int deviceId, int key, std::vector<int> *pspKeys) {
// TODO: vector output
bool KeyFromPspButton(int btn, std::vector<KeyDef> *keys) {
int search_start_layer = 0;
for (auto iter = g_controllerMap.begin(); iter != g_controllerMap.end(); ++iter) {
if (iter->first == btn) {
for (auto iter2 = iter->second.begin(); iter2 != iter->second.end(); ++iter2) {
@ -800,7 +798,7 @@ bool KeyFromPspButton(int btn, std::vector<KeyDef> *keys) {
}
}
}
return false;
return keys->size() > 0;
}
bool AxisToPspButton(int deviceId, int axisId, int direction, std::vector<int> *pspKeys) {
@ -809,8 +807,6 @@ bool AxisToPspButton(int deviceId, int axisId, int direction, std::vector<int> *
}
bool AxisFromPspButton(int btn, int *deviceId, int *axisId, int *direction) {
int search_start_layer = 0;
for (auto iter = g_controllerMap.begin(); iter != g_controllerMap.end(); ++iter) {
for (auto iter2 = iter->second.begin(); iter2 != iter->second.end(); ++iter2) {
if (iter->first == btn && iter2->keyCode >= AXIS_BIND_NKCODE_START) {

View File

@ -61,8 +61,6 @@ const int SCE_ERROR_MODULE_BAD_ID = 0x80111101;
const int SCE_ERROR_MODULE_ALREADY_LOADED = 0x80111102;
const int SCE_ERROR_MODULE_NOT_LOADED = 0x80111103;
const int SCE_ERROR_AV_MODULE_BAD_ID = 0x80110F01;
const u32 PSP_MODULE_NET_HTTP = 0x0105;
const u32 PSP_MODULE_NET_HTTPSTORAGE = 0x0108;
int oldStatus = 100; //random value
struct ModuleLoadInfo {

View File

@ -195,7 +195,6 @@ namespace MIPSDis
}
void Dis_ori(MIPSOpcode op, char *out)
{
s32 simm = (s32)(s16)(op & 0xFFFF);
u32 uimm = (u32)(u16)(op & 0xFFFF);
int rt = _RT;
int rs = _RS;

View File

@ -101,7 +101,6 @@ static bool IsReallyAClear(const TransformedVertex *transformed, int numVerts) {
int bufW = gstate_c.curRTWidth;
int bufH = gstate_c.curRTHeight;
float prevX = 0.0f;
for (int i = 1; i < numVerts; i++) {
if (transformed[i].color0_32 != matchcolor || transformed[i].z != matchz)
return false;

View File

@ -441,7 +441,7 @@ static void SplinePatchFullQuality(u8 *&dest, u16 *indices, int &count, const Sp
delete[] knot_v;
// Hacky normal generation through central difference.
if (spatch.computeNormals && !origNrm) {
if (computeNormals && !origNrm) {
#ifdef _M_SSE
const __m128 facing = spatch.patchFacing ? _mm_set_ps1(-1.0f) : _mm_set_ps1(1.0f);
#endif
@ -451,7 +451,6 @@ static void SplinePatchFullQuality(u8 *&dest, u16 *indices, int &count, const Sp
Vec3f vc_pos = vertices[v * (patch_div_s + 1)].pos;
for (int u = 0; u < patch_div_s + 1; u++) {
const int l = std::max(0, u - 1);
const int t = std::max(0, v - 1);
const int r = std::min(patch_div_s, u + 1);
const int b = std::min(patch_div_t, v + 1);
@ -659,7 +658,6 @@ static void _BezierPatchHighQuality(u8 *&dest, u16 *&indices, int &count, int te
for (int tile_u = 0; tile_u < tess_u + 1; ++tile_u) {
float u = ((float)tile_u / (float)tess_u);
float v = ((float)tile_v / (float)tess_v);
float bu = u;
float bv = v;
// TODO: Should be able to precompute the four curves per U, then just Bernstein per V. Will benefit large tesselation factors.

View File

@ -677,8 +677,6 @@ CheckAlphaResult CheckAlphaABGR1555Basic(const u32 *pixelData, int stride, int w
#endif
}
u32 hitZeroAlpha = 0;
const u32 *p = pixelData;
const int w2 = (w + 1) / 2;
const int stride2 = (stride + 1) / 2;
@ -755,7 +753,7 @@ CheckAlphaResult CheckAlphaRGBA5551Basic(const u32 *pixelData, int stride, int w
return CHECKALPHA_ZERO;
}
p += stride;
p += stride2;
}
return CHECKALPHA_FULL;

View File

@ -1338,24 +1338,21 @@ void DrawTriangle(const VertexData& v0, const VertexData& v1, const VertexData&
int range = (maxY - minY) / 16 + 1;
if (gstate.isModeClear()) {
if (range >= 24 && (maxX - minX) >= 24 * 16)
{
VertexData v[3] = { v0, v1, v2 };
auto bound = [&](int a, int b) -> void {DrawTriangleSlice<true>(v0, v1, v2, minX, minY, maxX, maxY, a, b); };
if (range >= 24 && (maxX - minX) >= 24 * 16) {
auto bound = [&](int a, int b) -> void {
DrawTriangleSlice<true>(v0, v1, v2, minX, minY, maxX, maxY, a, b);
};
GlobalThreadPool::Loop(bound, 0, range);
}
else
{
} else {
DrawTriangleSlice<true>(v0, v1, v2, minX, minY, maxX, maxY, 0, range);
}
} else {
if (range >= 24 && (maxX - minX) >= 24 * 16)
{
auto bound = [&](int a, int b) -> void {DrawTriangleSlice<false>(v0, v1, v2, minX, minY, maxX, maxY, a, b); };
if (range >= 24 && (maxX - minX) >= 24 * 16) {
auto bound = [&](int a, int b) -> void {
DrawTriangleSlice<false>(v0, v1, v2, minX, minY, maxX, maxY, a, b);
};
GlobalThreadPool::Loop(bound, 0, range);
}
else
{
} else {
DrawTriangleSlice<false>(v0, v1, v2, minX, minY, maxX, maxY, 0, range);
}
}