[Scummvm-cvs-logs] CVS: scummvm/graphics animation.cpp,1.30,1.31 animation.h,1.18,1.19 font.cpp,1.12,1.13 font.h,1.9,1.10 fontman.h,1.3,1.4 ilbm.cpp,1.2,1.3 surface.cpp,1.8,1.9 surface.h,1.9,1.10
Eugene Sandulenko
sev at users.sourceforge.net
Sat Jul 30 14:14:54 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/base engine.cpp,1.45,1.46 engine.h,1.24,1.25 gameDetector.cpp,1.120,1.121 gameDetector.h,1.34,1.35 main.cpp,1.87,1.88 plugins.cpp,1.44,1.45 plugins.h,1.28,1.29
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm/imuse_digi dimuse_bndmgr.cpp,1.36,1.37 dimuse_bndmgr.h,1.17,1.18 dimuse_codecs.cpp,1.12,1.13 dimuse_music.cpp,1.38,1.39 dimuse_sndmgr.cpp,1.72,1.73 dimuse_sndmgr.h,1.33,1.34
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/graphics
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9428/graphics
Modified Files:
animation.cpp animation.h font.cpp font.h fontman.h ilbm.cpp
surface.cpp surface.h
Log Message:
Remove trailing whitespaces.
Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/graphics/animation.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- animation.cpp 10 May 2005 23:48:36 -0000 1.30
+++ animation.cpp 30 Jul 2005 21:11:00 -0000 1.31
@@ -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 @@
if (p >= _maxPalNum)
return;
-
+
if (p != _curPal) {
_curPal = p;
_cr = 0;
@@ -284,7 +284,7 @@
}
}
_lut2[_pos++] = bst;
-
+
r += (1 << SHIFT);
g += (1 << SHIFT);
b += (1 << SHIFT);
Index: animation.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/graphics/animation.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- animation.h 11 May 2005 00:01:25 -0000 1.18
+++ animation.h 30 Jul 2005 21:11:00 -0000 1.19
@@ -37,7 +37,7 @@
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 @@
protected:
const int _movieWidth;
const int _movieHeight;
-
+
Audio::Mixer *_snd;
OSystem *_sys;
Index: font.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/graphics/font.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- font.cpp 4 Jun 2005 13:19:53 -0000 1.12
+++ font.cpp 30 Jul 2005 21:11:00 -0000 1.13
@@ -55,7 +55,7 @@
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 @@
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 @@
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 @@
// 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 @@
continue;
}
}
-
+
// If the max line width would be exceeded by adding this char,
// insert a line break.
if (wouldExceedWidth) {
@@ -232,11 +232,11 @@
}
}
-
+
tmpWidth += w;
tmpStr += c;
}
-
+
// If some text is left over, add it as the final line
line += tmpStr;
lineWidth += tmpWidth;
Index: font.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/graphics/font.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- font.h 20 Jun 2005 17:59:00 -0000 1.9
+++ font.h 30 Jul 2005 21:11:00 -0000 1.10
@@ -50,18 +50,18 @@
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
Index: fontman.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/graphics/fontman.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- fontman.h 24 Jun 2005 15:22:40 -0000 1.3
+++ fontman.h 30 Jul 2005 21:11:00 -0000 1.4
@@ -55,9 +55,9 @@
* @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>;
Index: ilbm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/graphics/ilbm.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ilbm.cpp 29 Jul 2005 16:50:09 -0000 1.2
+++ ilbm.cpp 30 Jul 2005 21:11:00 -0000 1.3
@@ -53,7 +53,7 @@
return (size - bytesRead) == 0;
}
- void feed() {
+ void feed() {
if (size % 2) {
size++;
}
@@ -88,7 +88,7 @@
int32 readSint32() {
return (int32)readUint32();
- }
+ }
};
static char * ID2string(IFF_ID id) {
@@ -156,7 +156,7 @@
/* 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 @@
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 @@
idx = chunk.readByte();
for (j = 0; j < i; j++) {
((byte*)surface.pixels)[si++] = idx;
- }
+ }
}
}
break;
@@ -315,7 +315,7 @@
error("unknown chunk : %s\n", ID2string(chunk.id));
}
- chunk.feed();
+ chunk.feed();
formChunk.incBytesRead(chunk.size);
}
}
Index: surface.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/graphics/surface.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- surface.cpp 17 May 2005 12:17:30 -0000 1.8
+++ surface.cpp 30 Jul 2005 21:11:00 -0000 1.9
@@ -52,16 +52,16 @@
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 @@
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 @@
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::fillRect(const Common::Rect &rOld, uint32 color) {
Common::Rect r(rOld);
r.clip(w, h);
-
+
if (!r.isValidRect())
return;
Index: surface.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/graphics/surface.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- surface.h 21 Jun 2005 22:08:14 -0000 1.9
+++ surface.h 30 Jul 2005 21:11:00 -0000 1.10
@@ -52,7 +52,7 @@
* 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().
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/base engine.cpp,1.45,1.46 engine.h,1.24,1.25 gameDetector.cpp,1.120,1.121 gameDetector.h,1.34,1.35 main.cpp,1.87,1.88 plugins.cpp,1.44,1.45 plugins.h,1.28,1.29
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm/imuse_digi dimuse_bndmgr.cpp,1.36,1.37 dimuse_bndmgr.h,1.17,1.18 dimuse_codecs.cpp,1.12,1.13 dimuse_music.cpp,1.38,1.39 dimuse_sndmgr.cpp,1.72,1.73 dimuse_sndmgr.h,1.33,1.34
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list