Reduce max radar zoom to 1, because a value of 2 is buggy. Replace
hard-coded radar size values with a slightly better define. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2841 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
163c7b062c
commit
345d335790
|
@ -48,9 +48,12 @@
|
|||
*/
|
||||
/***************************************************************************/
|
||||
|
||||
#define RADARX 128
|
||||
#define RADARY 128
|
||||
|
||||
static PIESTYLE rendStyle;
|
||||
static UDWORD radarTexture;
|
||||
static unsigned char radarBitmap[128 * 128 * 4];
|
||||
static unsigned char radarBitmap[RADARX * RADARY * 4];
|
||||
|
||||
/***************************************************************************/
|
||||
/*
|
||||
|
@ -352,7 +355,8 @@ void pie_DownLoadRadar( unsigned char *buffer )
|
|||
unsigned int i, j;
|
||||
iColour* psPalette = pie_GetGamePal();
|
||||
|
||||
for (i = 0, j = 0; i < 128*128; ++i) {
|
||||
for (i = 0, j = 0; i < RADARX * RADARY; ++i)
|
||||
{
|
||||
radarBitmap[j++] = psPalette[buffer[i]].r;
|
||||
radarBitmap[j++] = psPalette[buffer[i]].g;
|
||||
radarBitmap[j++] = psPalette[buffer[i]].b;
|
||||
|
@ -363,7 +367,7 @@ void pie_DownLoadRadar( unsigned char *buffer )
|
|||
}
|
||||
}
|
||||
pie_SetTexturePage(radarTexture);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, wz_texture_compression, 128, 128, 0,
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, wz_texture_compression, RADARX, RADARY, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE, radarBitmap);
|
||||
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
|
@ -389,8 +393,8 @@ void pie_RenderRadar( int x, int y )
|
|||
pieImage.th = 256;
|
||||
dest.x = x;
|
||||
dest.y = y;
|
||||
dest.w = 128;
|
||||
dest.h = 128;
|
||||
dest.w = RADARX;
|
||||
dest.h = RADARY;
|
||||
pie_DrawImage(&pieImage, &dest, &rendStyle);
|
||||
}
|
||||
|
||||
|
|
|
@ -486,14 +486,6 @@ void ProcessRadarInput(void)
|
|||
setViewPos(PosX,PosY,TRUE);
|
||||
CheckScrollLimits();
|
||||
#endif
|
||||
/*
|
||||
RadarZoomLevel++;
|
||||
if(RadarZoomLevel > MAX_RADARZOOM) {
|
||||
RadarZoomLevel = 0;
|
||||
}
|
||||
SetRadarZoom(RadarZoomLevel);
|
||||
audio_PlayTrack( ID_SOUND_BUTTON_CLICK_5 );
|
||||
*/
|
||||
CalcRadarPosition(x,y,(UDWORD*)&PosX,(UDWORD*)&PosY);
|
||||
|
||||
if(bInstantRadarJump)
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
void radarColour(UDWORD tileNumber, uint8_t r, uint8_t g, uint8_t b);
|
||||
|
||||
#define RGB_ENTRIES 3
|
||||
#define MAX_RADARZOOM 2
|
||||
#define MAX_RADARZOOM 1
|
||||
|
||||
/* Radar.h */
|
||||
extern void resetRadarRedraw(void);
|
||||
|
|
Loading…
Reference in New Issue