Run code through the advanced tool 'sed' to remove trailing whitespace.

This commit is contained in:
comex
2013-10-29 01:23:17 -04:00
parent 965b32be9c
commit c579637eaf
568 changed files with 8650 additions and 8654 deletions

View File

@ -97,7 +97,7 @@ void SWBPWritten(int address, int newvalue)
case BPMEM_LOADTLUT1: // Load a Texture Look Up Table
{
u32 tlutTMemAddr = (newvalue & 0x3FF) << 9;
u32 tlutXferCount = (newvalue & 0x1FFC00) >> 5;
u32 tlutXferCount = (newvalue & 0x1FFC00) >> 5;
u8 *ptr = 0;

View File

@ -8,18 +8,18 @@ Copyright (c) 2007, 2008 Markus Trenkwalder
All rights reserved.
Redistribution and use in source and binary forms, with or without
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the library's copyright owner nor the names of its
contributors may be used to endorse or promote products derived from this
* Neither the name of the library's copyright owner nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
@ -190,7 +190,7 @@ namespace Clipper
inlist[1] = 1;
inlist[2] = 2;
// mark this triangle as unused in case it should be completely
// mark this triangle as unused in case it should be completely
// clipped
indices[0] = SKIP_FLAG;
indices[1] = SKIP_FLAG;
@ -229,13 +229,13 @@ namespace Clipper
mask |= clip_mask[i];
}
if (mask == 0)
if (mask == 0)
return;
float t0 = 0;
float t1 = 0;
// Mark unused in case of early termination
// Mark unused in case of early termination
// of the macros below. (When fully clipped)
indices[0] = SKIP_FLAG;
indices[1] = SKIP_FLAG;
@ -247,7 +247,7 @@ namespace Clipper
LINE_CLIP(CLIP_POS_Z_BIT, 0, 0, -1, 1);
LINE_CLIP(CLIP_NEG_Z_BIT, 0, 0, 1, 1);
// Restore the old values as this line
// Restore the old values as this line
// was not fully clipped.
indices[0] = 0;
indices[1] = 1;
@ -305,7 +305,7 @@ namespace Clipper
PerspectiveDivide(Vertices[indices[i+1]]);
PerspectiveDivide(Vertices[indices[i+2]]);
Rasterizer::DrawTriangleFrontFace(Vertices[indices[i]], Vertices[indices[i+1]], Vertices[indices[i+2]]);
Rasterizer::DrawTriangleFrontFace(Vertices[indices[i]], Vertices[indices[i+1]], Vertices[indices[i+2]]);
}
}
}
@ -349,7 +349,7 @@ namespace Clipper
float dx = v1->screenPosition.x - v0->screenPosition.x;
float dy = v1->screenPosition.y - v0->screenPosition.y;
float screenDx = 0;
float screenDy = 0;
@ -405,7 +405,7 @@ namespace Clipper
float w1 = v1->projectedPosition.w;
float w2 = v2->projectedPosition.w;
float normalZDir = (x0*w2 - x2*w0)*y1 + (x2*y0 - x0*y2)*w1 + (y2*w0 - y0*w2)*x1;
float normalZDir = (x0*w2 - x2*w0)*y1 + (x2*y0 - x0*y2)*w1 + (y2*w0 - y0*w2)*x1;
backface = normalZDir <= 0.0f;

View File

@ -24,4 +24,4 @@ namespace DebugUtil
void CopyTempBuffer(s16 x, s16 y, int bufferBase, int subBuffer, const char *name);
}
#endif
#endif

View File

@ -19,7 +19,7 @@ namespace EfbCopy
{
void CopyToXfb()
{
GLInterface->Update(); // just updates the render window position and the backbuffer size
GLInterface->Update(); // just updates the render window position and the backbuffer size
if (!g_SWVideoConfig.bHwRasterizer)
{

View File

@ -185,7 +185,7 @@ namespace EfbInterface
u32 *dst = (u32*)&efb[offset];
u32 val = *dst & 0xff000000;
val |= depth & 0x00ffffff;
*dst = val;
*dst = val;
}
break;
case PIXELFMT_RGB565_Z16:
@ -194,7 +194,7 @@ namespace EfbInterface
u32 *dst = (u32*)&efb[offset];
u32 val = *dst & 0xff000000;
val |= depth & 0x00ffffff;
*dst = val;
*dst = val;
}
break;
default:

View File

@ -130,7 +130,7 @@ namespace HwRasterizer
glDepthFunc(GL_LEQUAL);
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
CreateShaders();
GL_REPORT_ERRORD();
}
@ -141,7 +141,7 @@ namespace HwRasterizer
u32 imageAddr = texUnit.texImage3[0].image_base;
// Texture Rectangle uses pixel coordinates
// While GLES uses texture coordinates
#ifdef USE_GLES
#ifdef USE_GLES
width = texUnit.texImage0[0].width;
height = texUnit.texImage0[0].height;
#else
@ -303,7 +303,7 @@ namespace HwRasterizer
{
glUseProgram(clearProg);
glVertexAttribPointer(clear_apos, 3, GL_FLOAT, GL_FALSE, 0, verts);
glUniform4f(clear_ucol, r, g, b, a);
glUniform4f(clear_ucol, r, g, b, a);
glEnableVertexAttribArray(col_apos);
glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
glDisableVertexAttribArray(col_apos);

View File

@ -28,10 +28,10 @@ namespace HwRasterizer
struct TexCacheEntry
{
TexImage0 texImage0;
TexImage1 texImage1;
TexImage2 texImage2;
TexImage3 texImage3;
TexImage0 texImage0;
TexImage1 texImage1;
TexImage2 texImage2;
TexImage3 texImage3;
TexTLUT texTlut;
GLuint texture;
@ -47,4 +47,4 @@ namespace HwRasterizer
static TextureCache textures;
}
#endif
#endif

View File

@ -82,7 +82,7 @@ void DecodePrimitiveStream(u32 iBufferSize)
void ReadXFData(u32 iBufferSize)
{
_assert_msg_(VIDEO, iBufferSize >= (u32)(streamSize * 4), "Underflow during standard opcode decoding");
_assert_msg_(VIDEO, iBufferSize >= (u32)(streamSize * 4), "Underflow during standard opcode decoding");
u32 pData[16];
for (int i = 0; i < streamSize; i++)
@ -109,7 +109,7 @@ void ExecuteDisplayList(u32 addr, u32 count)
u32 readCount = (u32)(g_pVideoData - dlStart);
dlStart = g_pVideoData;
_assert_msg_(VIDEO, count >= readCount, "Display list underrun");
_assert_msg_(VIDEO, count >= readCount, "Display list underrun");
count -= readCount;
}
@ -119,7 +119,7 @@ void ExecuteDisplayList(u32 addr, u32 count)
void DecodeStandard(u32 bufferSize)
{
_assert_msg_(VIDEO, CommandRunnable(bufferSize), "Underflow during standard opcode decoding");
_assert_msg_(VIDEO, CommandRunnable(bufferSize), "Underflow during standard opcode decoding");
int Cmd = DataReadU8();
@ -191,7 +191,7 @@ void DecodeStandard(u32 bufferSize)
// zelda 4 swords calls it and checks the metrics registers after that
break;
case GX_CMD_INVL_VC:// Invalidate (vertex cache?)
case GX_CMD_INVL_VC:// Invalidate (vertex cache?)
DEBUG_LOG(VIDEO, "Invalidate (vertex cache?)");
break;
@ -202,7 +202,7 @@ void DecodeStandard(u32 bufferSize)
}
break;
// draw primitives
// draw primitives
default:
if (Cmd & 0x80)
{
@ -284,7 +284,7 @@ bool CommandRunnable(u32 iBufferSize)
minSize = 5;
break;
// draw primitives
// draw primitives
default:
if (Cmd & 0x80)
minSize = 3;

View File

@ -88,7 +88,7 @@ void Init()
cpreg.bboxbottom = 0;
cpreg.token = 0;
et_UpdateInterrupts = CoreTiming::RegisterEvent("UpdateInterrupts", UpdateInterrupts_Wrapper);
// internal buffer position
@ -174,7 +174,7 @@ void Write16(const u16 _Value, const u32 _Address)
cpreg.status.UnderflowLoWatermark = 0;
INFO_LOG(COMMANDPROCESSOR,"\t write to CLEAR_REGISTER : %04x",_Value);
}
}
break;
// Fifo Registers

View File

@ -81,7 +81,7 @@ void Write16(const u16 _iValue, const u32 _iAddress)
switch (address)
{
case PE_CTRL_REGISTER:
case PE_CTRL_REGISTER:
{
UPECtrlReg tmpCtrl(_iValue);
@ -135,7 +135,7 @@ void SetToken_OnMainThread(u64 userdata, int cyclesLate)
void SetFinish_OnMainThread(u64 userdata, int cyclesLate)
{
g_bSignalFinishInterrupt = true;
g_bSignalFinishInterrupt = true;
UpdateInterrupts();
}

View File

@ -46,7 +46,7 @@ namespace SWPixelEngine
union UPEZConfReg
{
u16 Hex;
struct
struct
{
u16 ZCompEnable : 1; // Z Comparator Enable
u16 Function : 3;
@ -58,7 +58,7 @@ namespace SWPixelEngine
union UPEAlphaConfReg
{
u16 Hex;
struct
struct
{
u16 BMMath : 1; // GX_BM_BLEND || GX_BM_SUBSTRACT
u16 BMLogic : 1; // GX_BM_LOGIC
@ -75,7 +75,7 @@ namespace SWPixelEngine
union UPEDstAlphaConfReg
{
u16 Hex;
struct
struct
{
u16 DstAlpha : 8;
u16 Enable : 1;
@ -86,7 +86,7 @@ namespace SWPixelEngine
union UPEAlphaModeConfReg
{
u16 Hex;
struct
struct
{
u16 Threshold : 8;
u16 CompareMode : 8;
@ -96,7 +96,7 @@ namespace SWPixelEngine
union UPEAlphaReadReg
{
u16 Hex;
struct
struct
{
u16 ReadMode : 3;
u16 : 13;
@ -105,7 +105,7 @@ namespace SWPixelEngine
union UPECtrlReg
{
struct
struct
{
u16 PETokenEnable : 1;
u16 PEFinishEnable : 1;

View File

@ -30,7 +30,7 @@ void SWRenderer::Init()
void SWRenderer::Shutdown()
{
glDeleteProgram(program);
glDeleteTextures(1, &s_RenderTarget);
glDeleteTextures(1, &s_RenderTarget);
#ifndef USE_GLES
delete s_pfont;
s_pfont = 0;
@ -62,7 +62,7 @@ void CreateShaders()
uni_tex = glGetUniformLocation(program, "Texture");
attr_pos = glGetAttribLocation(program, "pos");
attr_tex = glGetAttribLocation(program, "TexCoordIn");
attr_tex = glGetAttribLocation(program, "TexCoordIn");
}
void SWRenderer::Prepare()
@ -100,7 +100,7 @@ void SWRenderer::DrawDebugText()
char *p = debugtext_buffer;
p[0] = 0;
if (g_SWVideoConfig.bShowStats)
if (g_SWVideoConfig.bShowStats)
{
p+=sprintf(p,"Objects: %i\n",swstats.thisFrame.numDrawnObjects);
p+=sprintf(p,"Primitives: %i\n",swstats.thisFrame.numPrimatives);
@ -136,7 +136,7 @@ void SWRenderer::DrawTexture(u8 *texture, int width, int height)
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, (GLsizei)width, (GLsizei)height, 0, GL_RGBA, GL_UNSIGNED_BYTE, texture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glUseProgram(program);
static const GLfloat verts[4][2] = {
{ -1, -1}, // Left top
@ -161,13 +161,13 @@ void SWRenderer::DrawTexture(u8 *texture, int width, int height)
glDisableVertexAttribArray(attr_pos);
glDisableVertexAttribArray(attr_tex);
glBindTexture(GL_TEXTURE_2D, 0);
glBindTexture(GL_TEXTURE_2D, 0);
GL_REPORT_ERRORD();
}
void SWRenderer::SwapBuffer()
{
// Do our OSD callbacks
// Do our OSD callbacks
OSD::DoCallbacks(OSD::OSD_ONFRAME);
DrawDebugText();
@ -177,7 +177,7 @@ void SWRenderer::SwapBuffer()
GLInterface->Swap();
swstats.ResetFrame();
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
GL_REPORT_ERRORD();

View File

@ -76,13 +76,13 @@ void SWVertexLoader::SetFormat(u8 attributeIndex, u8 primitiveType)
g_VtxDesc.Tex4Coord, g_VtxDesc.Tex5Coord, g_VtxDesc.Tex6Coord, (const u32)((g_VtxDesc.Hex >> 31) & 3)
};
const u32 tcElements[8] = {
m_CurrentVat->g0.Tex0CoordElements, m_CurrentVat->g1.Tex1CoordElements, m_CurrentVat->g1.Tex2CoordElements,
m_CurrentVat->g0.Tex0CoordElements, m_CurrentVat->g1.Tex1CoordElements, m_CurrentVat->g1.Tex2CoordElements,
m_CurrentVat->g1.Tex3CoordElements, m_CurrentVat->g1.Tex4CoordElements, m_CurrentVat->g2.Tex5CoordElements,
m_CurrentVat->g2.Tex6CoordElements, m_CurrentVat->g2.Tex7CoordElements
};
const u32 tcFormat[8] = {
m_CurrentVat->g0.Tex0CoordFormat, m_CurrentVat->g1.Tex1CoordFormat, m_CurrentVat->g1.Tex2CoordFormat,
m_CurrentVat->g0.Tex0CoordFormat, m_CurrentVat->g1.Tex1CoordFormat, m_CurrentVat->g1.Tex2CoordFormat,
m_CurrentVat->g1.Tex3CoordFormat, m_CurrentVat->g1.Tex4CoordFormat, m_CurrentVat->g2.Tex5CoordFormat,
m_CurrentVat->g2.Tex6CoordFormat, m_CurrentVat->g2.Tex7CoordFormat
};
@ -161,10 +161,10 @@ void SWVertexLoader::SetFormat(u8 attributeIndex, u8 primitiveType)
{
m_VertexSize += VertexLoader_Normal::GetSize(g_VtxDesc.Normal,
m_CurrentVat->g0.NormalFormat, m_CurrentVat->g0.NormalElements, m_CurrentVat->g0.NormalIndex3);
m_normalLoader = VertexLoader_Normal::GetFunction(g_VtxDesc.Normal,
m_CurrentVat->g0.NormalFormat, m_CurrentVat->g0.NormalElements, m_CurrentVat->g0.NormalIndex3);
if (m_normalLoader == 0)
{
ERROR_LOG(VIDEO, "VertexLoader_Normal::GetFunction returned zero!");
@ -192,7 +192,7 @@ void SWVertexLoader::SetFormat(u8 attributeIndex, u8 primitiveType)
}
AddAttributeLoader(LoadColor, i);
break;
case INDEX8:
case INDEX8:
m_VertexSize += 1;
switch (colComp[i])
{

View File

@ -12,7 +12,7 @@ SWVideoConfig::SWVideoConfig()
{
bFullscreen = false;
bHideCursor = false;
renderToMainframe = false;
renderToMainframe = false;
bHwRasterizer = false;

View File

@ -19,7 +19,7 @@ struct SWVideoConfig : NonCopyable
// General
bool bFullscreen;
bool bHideCursor;
bool renderToMainframe;
bool renderToMainframe;
bool bHwRasterizer;

View File

@ -61,8 +61,8 @@ void VideoSoftware::ShowConfig(void *_hParent)
bool VideoSoftware::Initialize(void *&window_handle)
{
g_SWVideoConfig.Load((File::GetUserPath(D_CONFIG_IDX) + "gfx_software.ini").c_str());
InitInterface();
InitInterface();
if (!GLInterface->Create(window_handle))
{
INFO_LOG(VIDEO, "%s", "SWRenderer::Create failed\n");
@ -150,7 +150,7 @@ void VideoSoftware::Shutdown()
HwRasterizer::Shutdown();
SWRenderer::Shutdown();
// Do our OSD callbacks
// Do our OSD callbacks
OSD::DoCallbacks(OSD::OSD_SHUTDOWN);
GLInterface->Shutdown();
@ -177,7 +177,7 @@ void VideoSoftware::Video_Prepare()
// Handle VSync on/off
GLInterface->SwapInterval(VSYNC_ENABLED);
// Do our OSD callbacks
// Do our OSD callbacks
OSD::DoCallbacks(OSD::OSD_INIT);
HwRasterizer::Prepare();
@ -188,7 +188,7 @@ void VideoSoftware::Video_Prepare()
// Run from the CPU thread (from VideoInterface.cpp)
void VideoSoftware::Video_BeginField(u32 xfbAddr, u32 fbWidth, u32 fbHeight)
{
{
}
// Run from the CPU thread (from VideoInterface.cpp)
@ -263,7 +263,7 @@ void VideoSoftware::Video_EnterLoop()
Common::SleepCurrentThread(1);
m_csSWVidOccupied.lock();
}
}
}
}
void VideoSoftware::Video_ExitLoop()

View File

@ -99,7 +99,7 @@ void SetupUnit::SetupTriStrip()
m_VertPointer[2 - (m_VertexCounter & 1)] = m_VertPointer[0];
m_VertWritePointer = m_VertPointer[0];
m_VertPointer[0] = &m_Vertices[(m_VertexCounter + 1) % 3];
m_VertPointer[0] = &m_Vertices[(m_VertexCounter + 1) % 3];
}
void SetupUnit::SetupTriFan()

View File

@ -179,7 +179,7 @@ void Tev::DrawColorRegular(TevStageCombiner::ColorCombiner &cc)
InputReg.c = *m_ColorInputLUT[cc.c][i];
InputReg.d = *m_ColorInputLUT[cc.d][i];
u16 c = InputReg.c + (InputReg.c >> 7);
u16 c = InputReg.c + (InputReg.c >> 7);
s32 temp = InputReg.a * (256 - c) + (InputReg.b * c);
temp = cc.op?(-temp >> 8):(temp >> 8);
@ -285,7 +285,7 @@ void Tev::DrawColorCompare(TevStageCombiner::ColorCombiner &cc)
Reg[cc.dest][BLU_C + i] = InputReg.d + ((InputReg.a > InputReg.b) ? InputReg.c : 0);
}
break;
case TEVCMP_RGB8_EQ:
case TEVCMP_RGB8_EQ:
for (int i = 0; i < 3; i++)
{
InputReg.a = *m_ColorInputLUT[cc.a][i];
@ -307,7 +307,7 @@ void Tev::DrawAlphaRegular(TevStageCombiner::AlphaCombiner &ac)
InputReg.c = m_AlphaInputLUT[ac.c][ALP_C];
InputReg.d = m_AlphaInputLUT[ac.d][ALP_C];
u16 c = InputReg.c + (InputReg.c >> 7);
u16 c = InputReg.c + (InputReg.c >> 7);
s32 temp = InputReg.a * (256 - c) + (InputReg.b * c);
temp = ac.op?(-temp >> 8):(temp >> 8);
@ -736,8 +736,8 @@ void Tev::Draw()
s32 denom = bpmem.fog.b_magnitude - (Position[2] >> bpmem.fog.b_shift);
//in addition downscale magnitude and zs to 0.24 bits
ze = (bpmem.fog.a.GetA() * 16777215.0f) / (float)denom;
}
else
}
else
{
// orthographic
// ze = a*Zs
@ -848,7 +848,7 @@ void Tev::SetRegColor(int reg, int comp, bool konst, s16 color)
void Tev::DoState(PointerWrap &p)
{
p.DoArray(Reg, sizeof(Reg));
p.DoArray(KonstantColors, sizeof(KonstantColors));
p.DoArray(TexColor,4);
p.DoArray(RasColor,4);

View File

@ -9,7 +9,7 @@
#include "ChunkFile.h"
class Tev
{
{
struct InputRegType
{
unsigned a : 8;
@ -49,7 +49,7 @@ class Tev
{
BLU_INP,
GRN_INP,
RED_INP
RED_INP
};
enum BufferBase

View File

@ -359,7 +359,7 @@ void EncodeRGBA6(u8 *dst, u8 *src, u32 format)
SetSpans(sBlkSize, tBlkSize, tSpan, sBlkSpan, tBlkSpan, writeStride);
ENCODE_LOOP_BLOCKS
{
RGBA_to_RGBA8(src, dst[1], dst[32], dst[33], dst[0]);
RGBA_to_RGBA8(src, dst[1], dst[32], dst[33], dst[0]);
src += readStride;
dst += 2;
}
@ -563,7 +563,7 @@ void EncodeRGBA6halfscale(u8 *dst, u8 *src, u32 format)
boxfilterRGBA_to_RGB8(src, r, g, b);
src += readStride;
u16 val = ((r << 8) & 0xf800) | ((g << 3) & 0x07e0) | ((b >> 3) & 0x001e);
u16 val = ((r << 8) & 0xf800) | ((g << 3) & 0x07e0) | ((b >> 3) & 0x001e);
*(u16*)dst = Common::swap16(val);
dst+=2;
}
@ -595,7 +595,7 @@ void EncodeRGBA6halfscale(u8 *dst, u8 *src, u32 format)
SetSpans(sBlkSize, tBlkSize, tSpan, sBlkSpan, tBlkSpan, writeStride);
ENCODE_LOOP_BLOCKS
{
boxfilterRGBA_to_RGBA8(src, dst[1], dst[32], dst[33], dst[0]);
boxfilterRGBA_to_RGBA8(src, dst[1], dst[32], dst[33], dst[0]);
src += readStride;
dst += 2;
}
@ -721,7 +721,7 @@ void EncodeRGBA6halfscale(u8 *dst, u8 *src, u32 format)
default:
PanicAlert("Unknown texture copy format: 0x%x\n", format);
break;
break;
}
}
@ -790,7 +790,7 @@ void EncodeRGB8(u8 *dst, u8 *src, u32 format)
SetSpans(sBlkSize, tBlkSize, tSpan, sBlkSpan, tBlkSpan, writeStride);
ENCODE_LOOP_BLOCKS
{
u16 val = ((src[2] << 8) & 0xf800) | ((src[1] << 3) & 0x07e0) | ((src[0] >> 3) & 0x001e);
u16 val = ((src[2] << 8) & 0xf800) | ((src[1] << 3) & 0x07e0) | ((src[0] >> 3) & 0x001e);
*(u16*)dst = Common::swap16(val);
src += readStride;
dst+=2;
@ -935,7 +935,7 @@ void EncodeRGB8(u8 *dst, u8 *src, u32 format)
default:
PanicAlert("Unknown texture copy format: 0x%x\n", format);
break;
break;
}
}
@ -1010,7 +1010,7 @@ void EncodeRGB8halfscale(u8 *dst, u8 *src, u32 format)
ENCODE_LOOP_BLOCKS
{
boxfilterRGB_to_RGB8(src, r, g, b);
u16 val = ((r << 8) & 0xf800) | ((g << 3) & 0x07e0) | ((b >> 3) & 0x001e);
u16 val = ((r << 8) & 0xf800) | ((g << 3) & 0x07e0) | ((b >> 3) & 0x001e);
*(u16*)dst = Common::swap16(val);
src += readStride;
dst+=2;
@ -1166,7 +1166,7 @@ void EncodeRGB8halfscale(u8 *dst, u8 *src, u32 format)
default:
PanicAlert("Unknown texture copy format: 0x%x\n", format);
break;
break;
}
}
@ -1270,7 +1270,7 @@ void EncodeZ24(u8 *dst, u8 *src, u32 format)
default:
PanicAlert("Unknown texture copy format: 0x%x\n", format);
break;
break;
}
}
@ -1314,7 +1314,7 @@ void EncodeZ24halfscale(u8 *dst, u8 *src, u32 format)
SetSpans(sBlkSize, tBlkSize, tSpan, sBlkSpan, tBlkSpan, writeStride);
ENCODE_LOOP_BLOCKS
{
boxfilterRGB_to_RGB8(src, dst[33], dst[32], dst[1]);
boxfilterRGB_to_RGB8(src, dst[33], dst[32], dst[1]);
dst[0] = 255;
src += readStride;
dst += 2;
@ -1380,7 +1380,7 @@ void EncodeZ24halfscale(u8 *dst, u8 *src, u32 format)
default:
PanicAlert("Unknown texture copy format: 0x%x\n", format);
break;
break;
}
}
@ -1389,7 +1389,7 @@ void Encode(u8 *dest_ptr)
int pixelformat = bpmem.zcontrol.pixel_format;
bool bFromZBuffer = pixelformat == PIXELFMT_Z24;
bool bIsIntensityFmt = bpmem.triggerEFBCopy.intensity_fmt > 0;
u32 copyfmt = ((bpmem.triggerEFBCopy.target_pixel_format / 2) + ((bpmem.triggerEFBCopy.target_pixel_format & 1) * 8));
u32 copyfmt = ((bpmem.triggerEFBCopy.target_pixel_format / 2) + ((bpmem.triggerEFBCopy.target_pixel_format & 1) * 8));
// pack copy format information into a single variable
u32 format = copyfmt;

View File

@ -124,7 +124,7 @@ void SampleMip(s32 s, s32 t, s32 mip, bool linear, u8 texmap, u8 *sample)
int imageHeight = ti0.height;
int tlutAddress = texTlut.tmem_offset << 9;
// reduce sample location and texture size to mip level
// move texture pointer to mip location
if (mip)

View File

@ -248,7 +248,7 @@ void LightColor(const Vec3 &pos, const Vec3 &normal, u8 lightNum, const LitChann
float attn;
if (chan.attnfunc == 3) // spot
{
{
float dist2 = ldir.length2();
float dist = sqrtf(dist2);
ldir = ldir / dist;
@ -259,7 +259,7 @@ void LightColor(const Vec3 &pos, const Vec3 &normal, u8 lightNum, const LitChann
attn = SafeDivide(max(0.0f, cosAtt), distAtt);
}
else if (chan.attnfunc == 1) // specular
{
{
// donko - what is going on here? 655.36 is a guess but seems about right.
attn = (light->pos * normal) > -655.36 ? max(0.0f, (light->dir * normal)) : 0;
ldir.set(1.0f, attn, attn * attn);

View File

@ -62,7 +62,7 @@ public:
Vec3 operator %(const Vec3 &v) const {
return Vec3(y*v.z-z*v.y, z*v.x-x*v.z, x*v.y-y*v.x);
}
}
float length2() const {
return x*x+y*y+z*z;
}
@ -88,11 +88,11 @@ public:
{
return *((&x) + i);
}
bool operator == (const Vec3 &other) const
bool operator == (const Vec3 &other) const
{
if (x==other.x && y==other.y && z==other.z)
return true;
else
else
return false;
}
void setZero()

View File

@ -27,7 +27,7 @@ class VideoSoftware : public VideoBackend
void Video_ExitLoop();
void Video_BeginField(u32, u32, u32);
void Video_EndField();
u32 Video_AccessEFB(EFBAccessType, u32, u32, u32);
u32 Video_GetQueryResult(PerfQueryType type);
@ -57,7 +57,7 @@ class VideoSoftware : public VideoBackend
void PauseAndLock(bool doLock, bool unpauseOnUnlock=true);
void DoState(PointerWrap &p);
public:
void CheckInvalidState();
};

View File

@ -28,7 +28,7 @@ VideoConfigDialog::VideoConfigDialog(wxWindow* parent, const std::string& title,
{
vconfig.Load((File::GetUserPath(D_CONFIG_IDX) + ininame + ".ini").c_str());
wxNotebook* const notebook = new wxNotebook(this, -1, wxDefaultPosition, wxDefaultSize);
wxNotebook* const notebook = new wxNotebook(this, -1, wxDefaultPosition, wxDefaultSize);
// -- GENERAL --
{
@ -79,7 +79,7 @@ VideoConfigDialog::VideoConfigDialog(wxWindow* parent, const std::string& title,
szr_info->Add(new SettingCheckBox(page_general, wxT("Various Statistics"), wxT(""), vconfig.bShowStats));
}
// - utility
{
wxStaticBoxSizer* const group_utility = new wxStaticBoxSizer(wxVERTICAL, page_general, wxT("Utility"));

View File

@ -23,7 +23,7 @@ void XFWritten(u32 transferSize, u32 baseAddress)
if (baseAddress <= 0x1026 && topAddress >= 0x1020)
Clipper::SetViewOffset();
// fix lights so invalid values don't trash the lighting computations
// fix lights so invalid values don't trash the lighting computations
if (baseAddress <= 0x067f && topAddress >= 0x0604)
{
u32* x = swxfregs.lights;

View File

@ -158,7 +158,7 @@ struct Projection
union TexMtxInfo
{
struct
struct
{
u32 unknown : 1;
u32 projection : 1; // XF_TEXPROJ_X
@ -173,7 +173,7 @@ union TexMtxInfo
union PostMtxInfo
{
struct
struct
{
u32 index : 6; // base row of dual transform matrix
u32 unused : 2;

View File

@ -9,5 +9,5 @@
#endif
#include <tchar.h>
#include <windows.h>
#include <windows.h>