mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 18:35:37 +00:00
more warning fixes
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@483 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
8201ead1d9
commit
7026025a2d
@ -135,7 +135,7 @@ static const char *tevOpTable[] = { // TEV
|
||||
"-", //TEVOP_SUB = 1,
|
||||
};
|
||||
|
||||
static const char *tevCompOpTable[] = { ">", "==" };
|
||||
//static const char *tevCompOpTable[] = { ">", "==" };
|
||||
|
||||
#define TEVCMP_R8 0
|
||||
#define TEVCMP_GR16 1
|
||||
@ -242,7 +242,7 @@ static const char *alphaRef[2] =
|
||||
I_ALPHA"[0].y"
|
||||
};
|
||||
|
||||
static const char *tevTexFunc[] = { "tex2D", "texRECT" };
|
||||
//static const char *tevTexFunc[] = { "tex2D", "texRECT" };
|
||||
|
||||
static const char *tevCOutputTable[] = { "prev.rgb", "c0.rgb", "c1.rgb", "c2.rgb" };
|
||||
static const char *tevAOutputTable[] = { "prev.a", "c0.a", "c1.a", "c2.a" };
|
||||
@ -460,7 +460,6 @@ void WriteStage(char *&p, int n, u32 texture_mask)
|
||||
char *rasswap = swapModeTable[bpmem.combiners[n].alphaC.rswap];
|
||||
char *texswap = swapModeTable[bpmem.combiners[n].alphaC.tswap];
|
||||
|
||||
int colchan = bpmem.tevorders[n/2].getColorChan(n&1);
|
||||
|
||||
int texcoord = bpmem.tevorders[n/2].getTexCoord(n&1);
|
||||
int texfun = xfregs.texcoords[texcoord].texmtxinfo.projection;
|
||||
@ -804,7 +803,6 @@ bool WriteAlphaTest(char *&p)
|
||||
break;
|
||||
}
|
||||
|
||||
bool bFirst = false;
|
||||
WRITE(p, "discard( ");
|
||||
WriteAlphaCompare(p, 0, bpmem.alphaFunc.comp0);
|
||||
|
||||
|
@ -169,7 +169,8 @@ void PixelShaderMngr::Cleanup()
|
||||
|
||||
bool PixelShaderMngr::CompilePixelShader(FRAGMENTSHADER& ps, const char* pstrprogram)
|
||||
{
|
||||
CGerror cgerr = cgGetError();
|
||||
// todo: Should error be checked?
|
||||
// CGerror cgerr = cgGetError();
|
||||
|
||||
char stropt[64];
|
||||
sprintf(stropt, "MaxLocalParams=32,NumInstructionSlots=%d", s_nMaxPixelInstructions);
|
||||
@ -237,7 +238,7 @@ void PixelShaderMngr::SetConstants(FRAGMENTSHADER& ps)
|
||||
}
|
||||
|
||||
u32 newmask = 0;
|
||||
for(u32 i = 0; i < bpmem.genMode.numtevstages+1; ++i) {
|
||||
for(u32 i = 0; i < (u32)bpmem.genMode.numtevstages+1; ++i) {
|
||||
if( bpmem.tevorders[i/2].getEnable(i&1) ) {
|
||||
int texmap = bpmem.tevorders[i/2].getTexMap(i&1);
|
||||
maptocoord[texmap] = bpmem.tevorders[i/2].getTexCoord(i&1);
|
||||
@ -496,7 +497,7 @@ GLuint PixelShaderMngr::GetColorMatrixProgram()
|
||||
void PixelShaderMngr::GetPixelShaderId(PixelShaderMngr::PIXELSHADERUID& uid)
|
||||
{
|
||||
u32 projtexcoords = 0;
|
||||
for (u32 i = 0; i < bpmem.genMode.numtevstages+1; i++) {
|
||||
for (u32 i = 0; i < (u32)bpmem.genMode.numtevstages+1; i++) {
|
||||
if( bpmem.tevorders[i/2].getEnable(i&1) ) {
|
||||
int texcoord = bpmem.tevorders[i/2].getTexCoord(i&1);
|
||||
if( xfregs.texcoords[texcoord].texmtxinfo.projection )
|
||||
@ -520,7 +521,7 @@ void PixelShaderMngr::GetPixelShaderId(PixelShaderMngr::PIXELSHADERUID& uid)
|
||||
int hdr = 3;
|
||||
|
||||
u32* pcurvalue = &uid.values[hdr];
|
||||
for(u32 i = 0; i < bpmem.genMode.numtevstages+1; ++i) {
|
||||
for(u32 i = 0; i < (u32)bpmem.genMode.numtevstages+1; ++i) {
|
||||
TevStageCombiner::ColorCombiner &cc = bpmem.combiners[i].colorC;
|
||||
TevStageCombiner::AlphaCombiner &ac = bpmem.combiners[i].alphaC;
|
||||
|
||||
@ -534,7 +535,7 @@ void PixelShaderMngr::GetPixelShaderId(PixelShaderMngr::PIXELSHADERUID& uid)
|
||||
pcurvalue+=2;
|
||||
}
|
||||
|
||||
for(u32 i = 0; i < (bpmem.genMode.numtevstages+1)/2; ++i) {
|
||||
for(u32 i = 0; i < ((u32)bpmem.genMode.numtevstages+1)/2; ++i) {
|
||||
u32 val0, val1;
|
||||
if( bpmem.tevorders[i].hex&0x40 ) val0 = bpmem.tevorders[i].hex&0x3ff;
|
||||
else val0 = bpmem.tevorders[i].hex&0x380;
|
||||
|
@ -154,7 +154,7 @@ bool Renderer::Create2()
|
||||
|
||||
// create the framebuffer targets
|
||||
glGenTextures(ARRAYSIZE(s_RenderTargets), (GLuint *)s_RenderTargets);
|
||||
for(int i = 0; i < ARRAYSIZE(s_RenderTargets); ++i) {
|
||||
for(u32 i = 0; i < ARRAYSIZE(s_RenderTargets); ++i) {
|
||||
glBindTexture(GL_TEXTURE_RECTANGLE_NV, s_RenderTargets[i]);
|
||||
// initialize to default
|
||||
glTexImage2D(GL_TEXTURE_RECTANGLE_NV, 0, 4, nBackbufferWidth, nBackbufferHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
|
||||
|
@ -205,7 +205,7 @@ TextureMngr::TCacheEntry* TextureMngr::Load(int texstage, u32 address, int width
|
||||
if (iter != textures.end()) {
|
||||
TCacheEntry &entry = iter->second;
|
||||
|
||||
if( entry.isRenderTarget || ((u32 *)ptr)[entry.hashoffset] == entry.hash && palhash == entry.paletteHash) { //stupid, improve
|
||||
if((entry.isRenderTarget || ((u32 *)ptr)[entry.hashoffset] == entry.hash) && palhash == entry.paletteHash) { //stupid, improve
|
||||
entry.frameCount = frameCount;
|
||||
//glEnable(entry.isNonPow2?GL_TEXTURE_RECTANGLE_NV:GL_TEXTURE_2D);
|
||||
glBindTexture(entry.isNonPow2?GL_TEXTURE_RECTANGLE_NV:GL_TEXTURE_2D, entry.texture);
|
||||
|
@ -52,7 +52,6 @@ static void (*fnSetupVertexPointers)() = NULL;
|
||||
|
||||
//these don't need to be saved
|
||||
static float posScale;
|
||||
static float tcScale[8];
|
||||
static int colElements[2];
|
||||
static float tcScaleU[8];
|
||||
static float tcScaleV[8];
|
||||
@ -388,7 +387,6 @@ void VertexLoader::ProcessFormat()
|
||||
// Normals
|
||||
if (m_VtxDesc.Normal != NOT_PRESENT) {
|
||||
VertexLoader_Normal::index3 = m_VtxAttr.NormalIndex3 ? true : false;
|
||||
unsigned int uSize = VertexLoader_Normal::GetSize(m_VtxDesc.Normal, m_VtxAttr.NormalFormat, m_VtxAttr.NormalElements);
|
||||
TPipelineFunction pFunc = VertexLoader_Normal::GetFunction(m_VtxDesc.Normal, m_VtxAttr.NormalFormat, m_VtxAttr.NormalElements);
|
||||
if (pFunc == 0)
|
||||
{
|
||||
@ -855,7 +853,7 @@ void VertexLoader::RunVertices(int primitive, int count)
|
||||
colIndex = 0;
|
||||
s_texmtxwrite = s_texmtxread = 0;
|
||||
|
||||
int pred_size = m_VertexSize;
|
||||
// int pred_size = m_VertexSize;
|
||||
|
||||
//int start = GetBufferPosition();
|
||||
//if (!m_numPipelineStates)
|
||||
@ -909,12 +907,12 @@ bool VertexManager::Init()
|
||||
s_pBaseBufferPointer = (u8*)AllocateMemoryPages(MAX_BUFFER_SIZE);
|
||||
s_pCurBufferPointer = s_pBaseBufferPointer;
|
||||
|
||||
for (int i = 0; i < ARRAYSIZE(shiftLookup); i++)
|
||||
for (u32 i = 0; i < ARRAYSIZE(shiftLookup); i++)
|
||||
shiftLookup[i] = 1.0f / float(1 << i);
|
||||
|
||||
s_nCurVBOIndex = 0;
|
||||
glGenBuffers(ARRAYSIZE(s_vboBuffers), s_vboBuffers);
|
||||
for (int i = 0; i < ARRAYSIZE(s_vboBuffers); ++i) {
|
||||
for (u32 i = 0; i < ARRAYSIZE(s_vboBuffers); ++i) {
|
||||
glBindBuffer(GL_ARRAY_BUFFER, s_vboBuffers[i]);
|
||||
glBufferData(GL_ARRAY_BUFFER, MAX_BUFFER_SIZE, NULL, GL_STREAM_DRAW);
|
||||
}
|
||||
@ -970,8 +968,10 @@ void VertexManager::AddVertices(int primitive, int numvertices)
|
||||
ADDSTAT(stats.thisFrame.numPrims, numvertices);
|
||||
s_vStoredPrimitives.push_back(pair<int, int>(c_primitiveType[primitive], numvertices));
|
||||
|
||||
#ifdef _DEBUG
|
||||
static const char *sprims[8] = {"quads", "nothing", "tris", "tstrip", "tfan", "lines", "lstrip", "points"};
|
||||
PRIM_LOG("prim: %s, c=%d\n", sprims[primitive], numvertices);
|
||||
#endif
|
||||
}
|
||||
|
||||
void VertexManager::Flush()
|
||||
@ -1023,13 +1023,13 @@ void VertexManager::Flush()
|
||||
DVProfileFunc _pf("VertexManager::Flush:textures");
|
||||
|
||||
u32 usedtextures = 0;
|
||||
for (u32 i = 0; i < bpmem.genMode.numtevstages+1; ++i) {
|
||||
for (u32 i = 0; i < (u32)bpmem.genMode.numtevstages+1; ++i) {
|
||||
if( bpmem.tevorders[i/2].getEnable(i&1) )
|
||||
usedtextures |= 1<<bpmem.tevorders[i/2].getTexMap(i&1);
|
||||
}
|
||||
|
||||
if( bpmem.genMode.numindstages > 0 ) {
|
||||
for(u32 i = 0; i < bpmem.genMode.numtevstages+1; ++i) {
|
||||
for(u32 i = 0; i < (u32)bpmem.genMode.numtevstages+1; ++i) {
|
||||
if( bpmem.tevind[i].IsActive() && bpmem.tevind[i].bt < bpmem.genMode.numindstages ) {
|
||||
usedtextures |= 1<<bpmem.tevindref.getTexMap(bpmem.tevind[i].bt);
|
||||
}
|
||||
|
@ -269,7 +269,6 @@ void LOADERDECL TexCoord_ReadIndex16_Byte2(void* _p)
|
||||
|
||||
void LOADERDECL TexCoord_ReadIndex16_UShort1(void* _p)
|
||||
{
|
||||
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
|
||||
u16 Index = ReadBuffer16();
|
||||
u32 iAddress = arraybases[ARRAY_TEXCOORD0+tcIndex] + (Index * arraystrides[ARRAY_TEXCOORD0+tcIndex]);
|
||||
|
||||
@ -280,7 +279,6 @@ void LOADERDECL TexCoord_ReadIndex16_UShort1(void* _p)
|
||||
}
|
||||
void LOADERDECL TexCoord_ReadIndex16_UShort2(void* _p)
|
||||
{
|
||||
TVtxAttr* pVtxAttr = (TVtxAttr*)_p;
|
||||
u16 Index = ReadBuffer16();
|
||||
u32 iAddress = arraybases[ARRAY_TEXCOORD0+tcIndex] + (Index * arraystrides[ARRAY_TEXCOORD0+tcIndex]);
|
||||
|
||||
|
@ -201,7 +201,7 @@ void RasterFont::printMultilineText(const char *text, double start_x, double sta
|
||||
|
||||
int cpos = strlen(temp);
|
||||
|
||||
int newpos = cpos+4&(~3);
|
||||
int newpos = (cpos+4)&(~3);
|
||||
|
||||
|
||||
printString(temp,x,y,z);
|
||||
|
Loading…
x
Reference in New Issue
Block a user