diff options
author | Eugene Sandulenko | 2005-07-30 21:11:48 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2005-07-30 21:11:48 +0000 |
commit | 6b4484472b79dc7ea7d1ce545a28fba7d3b7696f (patch) | |
tree | c44c4e61f18ddd537f7082cb48869cf33d422fbd /graphics | |
parent | 86ab70b149e5cd00cf54f2e41896e2c4e16795e4 (diff) | |
download | scummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.tar.gz scummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.tar.bz2 scummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.zip |
Remove trailing whitespaces.
svn-id: r18604
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/animation.cpp | 6 | ||||
-rw-r--r-- | graphics/animation.h | 4 | ||||
-rw-r--r-- | graphics/font.cpp | 18 | ||||
-rw-r--r-- | graphics/font.h | 6 | ||||
-rw-r--r-- | graphics/fontman.h | 4 | ||||
-rw-r--r-- | graphics/ilbm.cpp | 12 | ||||
-rw-r--r-- | graphics/surface.cpp | 16 | ||||
-rw-r--r-- | graphics/surface.h | 2 |
8 files changed, 34 insertions, 34 deletions
diff --git a/graphics/animation.cpp b/graphics/animation.cpp index 9a237e5f72..e37629fc1d 100644 --- a/graphics/animation.cpp +++ b/graphics/animation.cpp @@ -30,7 +30,7 @@ namespace Graphics { -BaseAnimationState::BaseAnimationState(Audio::Mixer *snd, OSystem *sys, int width, int height) +BaseAnimationState::BaseAnimationState(Audio::Mixer *snd, OSystem *sys, int width, int height) : _movieWidth(width), _movieHeight(height), _snd(snd), _sys(sys) { #ifndef BACKEND_8BIT _colorTab = NULL; @@ -256,7 +256,7 @@ void BaseAnimationState::buildLookup(int p, int lines) { if (p >= _maxPalNum) return; - + if (p != _curPal) { _curPal = p; _cr = 0; @@ -284,7 +284,7 @@ void BaseAnimationState::buildLookup(int p, int lines) { } } _lut2[_pos++] = bst; - + r += (1 << SHIFT); g += (1 << SHIFT); b += (1 << SHIFT); diff --git a/graphics/animation.h b/graphics/animation.h index 30957cb90e..5197cfb6bb 100644 --- a/graphics/animation.h +++ b/graphics/animation.h @@ -37,7 +37,7 @@ typedef int32 int32_t; typedef uint8 uint8_t; typedef uint16 uint16_t; -typedef uint32 uint32_t; +typedef uint32 uint32_t; extern "C" { #include <mpeg2dec/mpeg2.h> @@ -73,7 +73,7 @@ class BaseAnimationState { protected: const int _movieWidth; const int _movieHeight; - + Audio::Mixer *_snd; OSystem *_sys; diff --git a/graphics/font.cpp b/graphics/font.cpp index 10d237747e..6f763ed52e 100644 --- a/graphics/font.cpp +++ b/graphics/font.cpp @@ -55,7 +55,7 @@ void NewFont::drawChar(Surface *dst, byte chr, int tx, int ty, uint32 color) con bitmap_t mask = 0x8000; if (ty + y < 0 || ty + y >= dst->h) continue; - + for (int x = 0; x < w; x++, mask >>= 1) { if (tx + x < 0 || tx + x >= dst->w) continue; @@ -155,16 +155,16 @@ void Font::drawString(Surface *dst, const Common::String &s, int x, int y, int w struct WordWrapper { Common::StringList &lines; int actualMaxLineWidth; - + WordWrapper(Common::StringList &l) : lines(l), actualMaxLineWidth(0) { } - + void add(Common::String &line, int &w) { if (actualMaxLineWidth < w) actualMaxLineWidth = w; lines.push_back(line); - + line.clear(); w = 0; } @@ -176,7 +176,7 @@ int Font::wordWrapText(const Common::String &str, int maxWidth, Common::StringLi Common::String tmpStr; int lineWidth = 0; int tmpWidth = 0; - + // The rough idea behind this algorithm is as follows: // We accumulate characters into the string tmpStr. Whenever a full word // has been gathered together this way, we 'commit' it to the line buffer @@ -189,7 +189,7 @@ int Font::wordWrapText(const Common::String &str, int maxWidth, Common::StringLi // Special care has to be taken to account for 'words' that exceed the width // of a line. If we encounter such a word, we have to wrap it over multiple // lines. - + for (Common::String::const_iterator x = str.begin(); x != str.end(); ++x) { const char c = *x; const int w = getCharWidth(c); @@ -213,7 +213,7 @@ int Font::wordWrapText(const Common::String &str, int maxWidth, Common::StringLi continue; } } - + // If the max line width would be exceeded by adding this char, // insert a line break. if (wouldExceedWidth) { @@ -232,11 +232,11 @@ int Font::wordWrapText(const Common::String &str, int maxWidth, Common::StringLi } } - + tmpWidth += w; tmpStr += c; } - + // If some text is left over, add it as the final line line += tmpStr; lineWidth += tmpWidth; diff --git a/graphics/font.h b/graphics/font.h index 6799d6769e..c67ad1990c 100644 --- a/graphics/font.h +++ b/graphics/font.h @@ -50,18 +50,18 @@ public: virtual void drawChar(Surface *dst, byte chr, int x, int y, uint32 color) const = 0; void drawString(Surface *dst, const Common::String &str, int x, int y, int w, uint32 color, TextAlignment align = kTextAlignLeft, int deltax = 0, bool useEllipsis = true) const; - + /** * Compute and return the width the string str has when rendered using this font. */ int getStringWidth(const Common::String &str) const; - + /** * Take a text (which may contain newlines characters) and word wrap it so thata * no text line is wider than maxWidth pixels. If necessary, additional line breaks * are generated, preferably between words (i.e. were whitespaces are). * The resulting lines are appended to the string list lines. - * It returns the maximal width of any of the new lines (i.e. a value which is less + * It returns the maximal width of any of the new lines (i.e. a value which is less * or equal to maxWidth). * * @param str the string to word wrap diff --git a/graphics/fontman.h b/graphics/fontman.h index 3cbe5f2bf1..215f35c03d 100644 --- a/graphics/fontman.h +++ b/graphics/fontman.h @@ -55,9 +55,9 @@ public: * @return a pointer to a font, or 0 if no suitable font was found. */ const Font *getFontByUsage(FontUsage usage) const; - + //const Font *getFontBySize(int size???) const; - + private: friend class Common::Singleton<SingletonBaseType>; diff --git a/graphics/ilbm.cpp b/graphics/ilbm.cpp index e4cdaaa79c..ccb3ec3a45 100644 --- a/graphics/ilbm.cpp +++ b/graphics/ilbm.cpp @@ -53,7 +53,7 @@ struct Chunk { return (size - bytesRead) == 0; } - void feed() { + void feed() { if (size % 2) { size++; } @@ -88,7 +88,7 @@ struct Chunk { int32 readSint32() { return (int32)readUint32(); - } + } }; static char * ID2string(IFF_ID id) { @@ -156,7 +156,7 @@ page 376) */ /* EA IFF 85 Generic character string chunk */ #define ID_NAME MKID_BE('NAME') /* EA IFF 85 Generic Name of art, music, etc. chunk */ -#define ID_TEXT MKID_BE('TEXT')) +#define ID_TEXT MKID_BE('TEXT')) /* EA IFF 85 Generic unformatted ASCII text chunk */ #define ID_copy MKID_BE('(c) ') /* EA IFF 85 Generic Copyright text chunk */ @@ -253,7 +253,7 @@ void decodeILBM(Common::ReadStream &input, Surface &surface, byte *&colors) { if (bitmapHeader.depth > 8) { error("decodeILBM() depth > 8"); } - bitmapHeader.masking = chunk.readByte(); + bitmapHeader.masking = chunk.readByte(); bitmapHeader.pack = chunk.readByte(); if ((bitmapHeader.pack != 0) && (bitmapHeader.pack != 1)) { error("decodeILBM() unsupported pack"); @@ -303,7 +303,7 @@ void decodeILBM(Common::ReadStream &input, Surface &surface, byte *&colors) { idx = chunk.readByte(); for (j = 0; j < i; j++) { ((byte*)surface.pixels)[si++] = idx; - } + } } } break; @@ -315,7 +315,7 @@ void decodeILBM(Common::ReadStream &input, Surface &surface, byte *&colors) { error("unknown chunk : %s\n", ID2string(chunk.id)); } - chunk.feed(); + chunk.feed(); formChunk.incBytesRead(chunk.size); } } diff --git a/graphics/surface.cpp b/graphics/surface.cpp index 2c0f2c4da1..5283aedf39 100644 --- a/graphics/surface.cpp +++ b/graphics/surface.cpp @@ -52,16 +52,16 @@ void Surface::drawLine(int x0, int y0, int x1, int y1, uint32 color) { void Surface::create(uint16 width, uint16 height, uint8 bytesPP) { free(); - + w = width; h = height; bytesPerPixel = bytesPP; pitch = w * bytesPP; - + pixels = calloc(width * height, bytesPP); assert(pixels); } - + void Surface::free() { ::free(pixels); pixels = 0; @@ -76,12 +76,12 @@ void Surface::hLine(int x, int y, int x2, uint32 color) { if (x2 < x) SWAP(x2, x); - + if (x < 0) x = 0; if (x2 >= w) x2 = w - 1; - + if (bytesPerPixel == 1) { byte *ptr = (byte *)getBasePtr(x, y); if (x2 >= x) @@ -103,12 +103,12 @@ void Surface::vLine(int x, int y, int y2, uint32 color) { if (y2 < y) SWAP(y2, y); - + if (y < 0) y = 0; if (y2 >= h) y2 = h - 1; - + if (bytesPerPixel == 1) { byte *ptr = (byte *)getBasePtr(x, y); while (y++ <= y2) { @@ -129,7 +129,7 @@ void Surface::vLine(int x, int y, int y2, uint32 color) { void Surface::fillRect(const Common::Rect &rOld, uint32 color) { Common::Rect r(rOld); r.clip(w, h); - + if (!r.isValidRect()) return; diff --git a/graphics/surface.h b/graphics/surface.h index 2e98ec0bef..6118ab76b2 100644 --- a/graphics/surface.h +++ b/graphics/surface.h @@ -52,7 +52,7 @@ struct Surface { * Allocate pixels memory for this surface and for the specified dimension. */ void create(uint16 width, uint16 height, uint8 bytesPP); - + /** * Release the memory used by the pixels memory of this surface. This is the * counterpart to create(). |