diff options
author | tron <tron@openttd.org> | 2005-10-22 06:39:32 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-10-22 06:39:32 +0000 |
commit | 2cc2154ad26b96b032df2f4fca0ce1634e6330b2 (patch) | |
tree | 646e010d91defd66326958b9e15c3eb36077760c /gfx.c | |
parent | 01638700067b9720c187598ad6b4bf786e0e63c1 (diff) | |
download | openttd-2cc2154ad26b96b032df2f4fca0ce1634e6330b2.tar.xz |
(svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes
nothing spectacular, just some stuff, which piled up
Diffstat (limited to 'gfx.c')
-rw-r--r-- | gfx.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -115,7 +115,7 @@ void GfxScroll(int left, int top, int width, int height, int xo, int yo) void GfxFillRect(int left, int top, int right, int bottom, int color) { - DrawPixelInfo *dpi = _cur_dpi; + const DrawPixelInfo* dpi = _cur_dpi; Pixel *dst; const int otop = top; const int oleft = left; @@ -167,7 +167,7 @@ void GfxFillRect(int left, int top, int right, int bottom, int color) static void GfxSetPixel(int x, int y, int color) { - DrawPixelInfo *dpi = _cur_dpi; + const DrawPixelInfo* dpi = _cur_dpi; if ((x-=dpi->left) < 0 || x>=dpi->width || (y-=dpi->top)<0 || y>=dpi->height) return; dpi->dst_ptr[y * dpi->pitch + x] = color; @@ -426,7 +426,7 @@ static uint32 FormatStringLinebreaks(char *str, int maxw) } num++; - str[-1] = 0; + str[-1] = '\0'; } } @@ -1361,7 +1361,7 @@ typedef void (*BlitZoomFunc)(BlitterParams *bp); static void GfxMainBlitter(const Sprite* sprite, int x, int y, int mode) { - DrawPixelInfo *dpi = _cur_dpi; + const DrawPixelInfo* dpi = _cur_dpi; int start_x, start_y; byte info; BlitterParams bp; @@ -1871,7 +1871,7 @@ void MarkWholeScreenDirty(void) SetDirtyBlocks(0, 0, _screen.width, _screen.height); } -bool FillDrawPixelInfo(DrawPixelInfo *n, DrawPixelInfo *o, int left, int top, int width, int height) +bool FillDrawPixelInfo(DrawPixelInfo* n, const DrawPixelInfo* o, int left, int top, int width, int height) { int t; |