Apply ldesnogu signed long -> s32 conversion to help x86-64 from #2752961

This commit is contained in:
riccardom 2009-04-11 17:14:19 +00:00
parent 17fa00685f
commit 0854f57647
2 changed files with 23 additions and 23 deletions

View File

@ -355,7 +355,7 @@ void gfx3d_glLoadIdentity()
MatrixIdentity (mtxCurrent[1]);
}
BOOL gfx3d_glLoadMatrix4x4(signed long v)
BOOL gfx3d_glLoadMatrix4x4(s32 v)
{
mtxCurrent[mode][ML4x4ind] = fix2float(v);
@ -369,7 +369,7 @@ BOOL gfx3d_glLoadMatrix4x4(signed long v)
return TRUE;
}
BOOL gfx3d_glLoadMatrix4x3(signed long v)
BOOL gfx3d_glLoadMatrix4x3(s32 v)
{
mtxCurrent[mode][ML4x3ind] = fix2float(v);
@ -438,7 +438,7 @@ void gfx3d_glPushMatrix()
T1WriteLong(MMU.MMU_MEM[ARMCPU_ARM9][0x40], 0x600, gxstat);
}
void gfx3d_glPopMatrix(signed long i)
void gfx3d_glPopMatrix(s32 i)
{
u32 gxstat = T1ReadLong(MMU.MMU_MEM[ARMCPU_ARM9][0x40], 0x600);
@ -464,7 +464,7 @@ void gfx3d_glPopMatrix(signed long i)
T1WriteLong(MMU.MMU_MEM[ARMCPU_ARM9][0x40], 0x600, gxstat);
}
BOOL gfx3d_glTranslate(signed long v)
BOOL gfx3d_glTranslate(s32 v)
{
trans[transind] = fix2float(v);
@ -480,7 +480,7 @@ BOOL gfx3d_glTranslate(signed long v)
return TRUE;
}
BOOL gfx3d_glScale(signed long v)
BOOL gfx3d_glScale(s32 v)
{
short mymode = (mode==2?1:mode);
@ -501,7 +501,7 @@ BOOL gfx3d_glScale(signed long v)
return TRUE;
}
BOOL gfx3d_glMultMatrix3x3(signed long v)
BOOL gfx3d_glMultMatrix3x3(s32 v)
{
mtxTemporal[MM3x3ind] = fix2float(v);
@ -525,7 +525,7 @@ BOOL gfx3d_glMultMatrix3x3(signed long v)
return TRUE;
}
BOOL gfx3d_glMultMatrix4x3(signed long v)
BOOL gfx3d_glMultMatrix4x3(s32 v)
{
mtxTemporal[MM4x3ind] = fix2float(v);
@ -547,7 +547,7 @@ BOOL gfx3d_glMultMatrix4x3(signed long v)
return TRUE;
}
BOOL gfx3d_glMultMatrix4x4(signed long v)
BOOL gfx3d_glMultMatrix4x4(s32 v)
{
mtxTemporal[MM4x4ind] = fix2float(v);
@ -971,7 +971,7 @@ void gfx3d_glNormal(u32 v)
for(c = 0; c < 3; c++)
{
vertexColor[c] += (((specular[c] * _lightColor[c] * shininessLevel)
vertexColor[c] += (int)(((specular[c] * _lightColor[c] * shininessLevel)
+ (diffuse[c] * _lightColor[c] * diffuseLevel)
+ (ambient[c] * _lightColor[c])) / 31.0f);
}
@ -984,20 +984,20 @@ void gfx3d_glNormal(u32 v)
}
signed long gfx3d_GetClipMatrix (unsigned int index)
s32 gfx3d_GetClipMatrix (unsigned int index)
{
float val = MatrixGetMultipliedIndex (index, mtxCurrent[0], mtxCurrent[1]);
val *= (1<<12);
return (signed long)val;
return (s32)val;
}
signed long gfx3d_GetDirectionalMatrix (unsigned int index)
s32 gfx3d_GetDirectionalMatrix (unsigned int index)
{
int _index = (((index / 3) * 4) + (index % 3));
return (signed long)(mtxCurrent[2][_index]*(1<<12));
return (s32)(mtxCurrent[2][_index]*(1<<12));
}
static void gfx3d_glLightDirection_cache(int index)

View File

@ -194,17 +194,17 @@ void gfx3d_glFogOffset (u32 v);
void gfx3d_glClearDepth(u32 v);
void gfx3d_glMatrixMode(u32 v);
void gfx3d_glLoadIdentity();
BOOL gfx3d_glLoadMatrix4x4(signed long v);
BOOL gfx3d_glLoadMatrix4x3(signed long v);
BOOL gfx3d_glLoadMatrix4x4(s32 v);
BOOL gfx3d_glLoadMatrix4x3(s32 v);
void gfx3d_glStoreMatrix(u32 v);
void gfx3d_glRestoreMatrix(u32 v);
void gfx3d_glPushMatrix(void);
void gfx3d_glPopMatrix(signed long i);
BOOL gfx3d_glTranslate(signed long v);
BOOL gfx3d_glScale(signed long v);
BOOL gfx3d_glMultMatrix3x3(signed long v);
BOOL gfx3d_glMultMatrix4x3(signed long v);
BOOL gfx3d_glMultMatrix4x4(signed long v);
void gfx3d_glPopMatrix(s32 i);
BOOL gfx3d_glTranslate(s32 v);
BOOL gfx3d_glScale(s32 v);
BOOL gfx3d_glMultMatrix3x3(s32 v);
BOOL gfx3d_glMultMatrix4x3(s32 v);
BOOL gfx3d_glMultMatrix4x4(s32 v);
void gfx3d_glBegin(u32 v);
void gfx3d_glEnd(void);
void gfx3d_glColor3b(u32 v);
@ -225,8 +225,8 @@ void gfx3d_glTexImage(u32 val);
void gfx3d_glTexPalette(u32 val);
void gfx3d_glTexCoord(u32 val);
void gfx3d_glNormal(u32 v);
signed long gfx3d_GetClipMatrix (unsigned int index);
signed long gfx3d_GetDirectionalMatrix (unsigned int index);
s32 gfx3d_GetClipMatrix (unsigned int index);
s32 gfx3d_GetDirectionalMatrix (unsigned int index);
void gfx3d_glLightDirection (u32 v);
void gfx3d_glLightColor (u32 v);
void gfx3d_glAlphaFunc(u32 v);