diff options
Diffstat (limited to 'src/menus.c')
| -rw-r--r-- | src/menus.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/menus.c b/src/menus.c index ec73820..00f7a83 100644 --- a/src/menus.c +++ b/src/menus.c @@ -118,7 +118,7 @@ AVPMENUGFX AvPMenuGfxStorage[MAX_NO_OF_AVPMENUGFXS] = static void DrawAvPMenuGlowyBar(int topleftX, int topleftY, int alpha, int length) { enum AVPMENUGFX_ID menuGfxID = AVPMENUGFX_GLOWY_MIDDLE; - unsigned char *srcPtr; + const unsigned char *srcPtr; unsigned short *destPtr; AVPMENUGFX *gfxPtr; D3DTexture *image; @@ -194,7 +194,7 @@ static void DrawAvPMenuGlowyBar(int topleftX, int topleftY, int alpha, int lengt static void DrawAvPMenuGlowyBar_Clipped(int topleftX, int topleftY, int alpha, int length, int topY, int bottomY) { enum AVPMENUGFX_ID menuGfxID = AVPMENUGFX_GLOWY_MIDDLE; - unsigned char *srcPtr; + const unsigned char *srcPtr; unsigned short *destPtr; AVPMENUGFX *gfxPtr; D3DTexture *image; @@ -323,7 +323,7 @@ static void LoadMenuFont() { D3DTexture *image = gfxPtr->ImagePtr; - unsigned char *srcPtr = image->buf; + const unsigned char *srcPtr = image->buf; int c; if ((image->w != 30) || ((image->h % 33) != 0)) { @@ -345,7 +345,7 @@ static void LoadMenuFont() int blank = 1; for (y=y1; y<y1+31; y++) { - unsigned char *s = &srcPtr[(x + y*image->w) * 4]; + const unsigned char *s = &srcPtr[(x + y*image->w) * 4]; if (s[2]) { blank = 0; break; @@ -381,7 +381,7 @@ int LengthOfMenuText(const char *textPtr) return width; } -int LengthOfSmallMenuText(char *textPtr) +int LengthOfSmallMenuText(const char *textPtr) { int width = 0; @@ -424,7 +424,7 @@ int RenderMenuText(const char *textPtr, int sx, int sy, int alpha, enum AVPMENUF DrawAvPMenuGfx(AVPMENUGFX_GLOWY_RIGHT,sx+size,sy-8,alpha,AVPMENUFORMAT_LEFTJUSTIFIED); } { - unsigned char *srcPtr; + const unsigned char *srcPtr; unsigned short *destPtr; AVPMENUGFX *gfxPtr; D3DTexture *image; @@ -500,7 +500,7 @@ int RenderMenuText(const char *textPtr, int sx, int sy, int alpha, enum AVPMENUF } -int RenderMenuText_Clipped(char *textPtr, int sx, int sy, int alpha, enum AVPMENUFORMAT_ID format, int topY, int bottomY) +int RenderMenuText_Clipped(const char *textPtr, int sx, int sy, int alpha, enum AVPMENUFORMAT_ID format, int topY, int bottomY) { int width = LengthOfMenuText(textPtr); @@ -529,7 +529,7 @@ int RenderMenuText_Clipped(char *textPtr, int sx, int sy, int alpha, enum AVPMEN DrawAvPMenuGfx_Clipped(AVPMENUGFX_GLOWY_RIGHT,sx+size,sy-8,alpha,AVPMENUFORMAT_LEFTJUSTIFIED,topY,bottomY); } { - unsigned char *srcPtr; + const unsigned char *srcPtr; unsigned short *destPtr; AVPMENUGFX *gfxPtr; D3DTexture *image; @@ -609,9 +609,9 @@ int RenderMenuText_Clipped(char *textPtr, int sx, int sy, int alpha, enum AVPMEN } -static int RenderSmallFontString(char *textPtr,int sx,int sy,int alpha, int red, int green, int blue) +static int RenderSmallFontString(const char *textPtr,int sx,int sy,int alpha, int red, int green, int blue) { - unsigned char *srcPtr; + const unsigned char *srcPtr; unsigned short *destPtr; int alphaR = MUL_FIXED(alpha,red); int alphaG = MUL_FIXED(alpha,green); @@ -678,7 +678,7 @@ static int RenderSmallFontString(char *textPtr,int sx,int sy,int alpha, int red, void RenderSmallFontString_Wrapped(const char *textPtr,RECT* area,int alpha,int* output_x,int* output_y) { - unsigned char *srcPtr; + const unsigned char *srcPtr; unsigned short *destPtr; AVPMENUGFX *gfxPtr; D3DTexture *image; @@ -860,10 +860,10 @@ Determine area used by text , so we can draw it centrally if(output_y) *output_y=sy; } -int RenderSmallMenuText(char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format) +int RenderSmallMenuText(const char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format) { int length; - char *ptr; + const char *ptr; switch(format) { default: @@ -898,10 +898,10 @@ int RenderSmallMenuText(char *textPtr, int x, int y, int alpha, enum AVPMENUFORM return RenderSmallFontString(textPtr,x,y,alpha,ONE_FIXED,ONE_FIXED,ONE_FIXED); } -int RenderSmallMenuText_Coloured(char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format, int red, int green, int blue) +int RenderSmallMenuText_Coloured(const char *textPtr, int x, int y, int alpha, enum AVPMENUFORMAT_ID format, int red, int green, int blue) { int length; - char *ptr; + const char *ptr; switch(format) { default: @@ -938,7 +938,7 @@ int RenderSmallMenuText_Coloured(char *textPtr, int x, int y, int alpha, enum AV static void CalculateWidthsOfAAFont() { - unsigned char *srcPtr; + const unsigned char *srcPtr; AVPMENUGFX *gfxPtr; D3DTexture *image; int c; @@ -961,7 +961,7 @@ static void CalculateWidthsOfAAFont() int blank = 1; for (y=y1; y<y1+HUD_FONT_HEIGHT; y++) { - unsigned char *s = &srcPtr[(x + y*image->w) * 4]; + const unsigned char *s = &srcPtr[(x + y*image->w) * 4]; if (s[2] >= 0x80) { blank = 0; break; @@ -1123,7 +1123,7 @@ void LoadAllAvPMenuGfx() LoadMenuFont(); { - unsigned char *srcPtr; + const unsigned char *srcPtr; AVPMENUGFX *gfxPtr = &AvPMenuGfxStorage[AVPMENUGFX_CLOUDY]; D3DTexture *image; @@ -1223,7 +1223,7 @@ void DrawAvPMenuGfx(enum AVPMENUGFX_ID menuGfxID, int topleftX, int topleftY, in { AVPMENUGFX *gfxPtr; D3DTexture *image; - unsigned char *srcPtr; + const unsigned char *srcPtr; unsigned short *destPtr; int length; @@ -1319,7 +1319,7 @@ void DrawAvPMenuGfx_CrossFade(enum AVPMENUGFX_ID menuGfxID,enum AVPMENUGFX_ID me { AVPMENUGFX *gfxPtr, *gfxPtr2; D3DTexture *image, *image2; - unsigned char *srcPtr, *srcPtr2; + const unsigned char *srcPtr, *srcPtr2; unsigned short *destPtr; int length; @@ -1399,7 +1399,7 @@ void DrawAvPMenuGfx_Faded(enum AVPMENUGFX_ID menuGfxID, int topleftX, int toplef { AVPMENUGFX *gfxPtr; D3DTexture *image; - unsigned char *srcPtr; + const unsigned char *srcPtr; unsigned short *destPtr; int length; @@ -1471,7 +1471,7 @@ void DrawAvPMenuGfx_Clipped(enum AVPMENUGFX_ID menuGfxID, int topleftX, int topl { AVPMENUGFX *gfxPtr; D3DTexture *image; - unsigned char *srcPtr; + const unsigned char *srcPtr; unsigned short *destPtr; int length; |
