[Scummvm-cvs-logs] CVS: scummvm/sword2/driver _mouse.cpp,1.34,1.35 animation.cpp,1.38,1.39 animation.h,1.28,1.29 d_draw.h,1.27,1.28 d_sound.cpp,1.109,1.110 driver96.h,1.70,1.71 menu.cpp,1.25,1.26 palette.cpp,1.30,1.31 render.cpp,1.60,1.61 sprite.cpp,1.39,1.40
Torbj?rn Andersson
eriktorbjorn at users.sourceforge.net
Fri Apr 23 00:03:16 CEST 2004
Update of /cvsroot/scummvm/scummvm/sword2/driver
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2431/sword2/driver
Modified Files:
_mouse.cpp animation.cpp animation.h d_draw.h d_sound.cpp
driver96.h menu.cpp palette.cpp render.cpp sprite.cpp
Log Message:
Major revamping of the BS2 memory manager and, some small changes to the
resource manager. All new code! All new bugs!
Index: _mouse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/_mouse.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- _mouse.cpp 7 Apr 2004 12:31:31 -0000 1.34
+++ _mouse.cpp 23 Apr 2004 07:02:08 -0000 1.35
@@ -68,7 +68,7 @@
// 0xFF. That means that parts of the mouse cursor that weren't meant to be
// transparent may be now.
-void Graphics::decompressMouse(uint8 *decomp, uint8 *comp, int width, int height, int pitch, int xOff, int yOff) {
+void Graphics::decompressMouse(byte *decomp, byte *comp, int width, int height, int pitch, int xOff, int yOff) {
int32 size = width * height;
int32 i = 0;
int x = 0;
@@ -155,7 +155,7 @@
memset(_mouseData, 0xFF, mouse_width * mouse_height);
if (_luggageAnim)
- decompressMouse(_mouseData, (uint8 *) _luggageAnim + READ_LE_UINT32(_luggageOffset), _luggageAnim->mousew,
+ decompressMouse(_mouseData, (byte *) _luggageAnim + READ_LE_UINT32(_luggageOffset), _luggageAnim->mousew,
_luggageAnim->mouseh, mouse_width, deltaX, deltaY);
if (_mouseAnim)
@@ -177,7 +177,7 @@
if (++_mouseFrame == _mouseAnim->noAnimFrames)
_mouseFrame = MOUSEFLASHFRAME;
- _mouseSprite = (uint8 *) _mouseAnim + READ_LE_UINT32(_mouseOffsets + _mouseFrame);
+ _mouseSprite = (byte *) _mouseAnim + READ_LE_UINT32(_mouseOffsets + _mouseFrame);
if (_mouseFrame != prevMouseFrame)
drawMouse();
@@ -193,7 +193,7 @@
* or not there is a lead-in animation
*/
-int32 Graphics::setMouseAnim(uint8 *ma, int32 size, int32 mouseFlash) {
+int32 Graphics::setMouseAnim(byte *ma, int32 size, int32 mouseFlash) {
if (_mouseAnim) {
free(_mouseAnim);
_mouseAnim = NULL;
@@ -209,8 +209,8 @@
if (!_mouseAnim)
return RDERR_OUTOFMEMORY;
- memcpy((uint8 *) _mouseAnim, ma, size);
- _mouseOffsets = (int32 *) ((uint8 *) _mouseAnim + sizeof(MouseAnim));
+ memcpy((byte *) _mouseAnim, ma, size);
+ _mouseOffsets = (int32 *) ((byte *) _mouseAnim + sizeof(MouseAnim));
animateMouse();
drawMouse();
@@ -233,7 +233,7 @@
* @param size the size of the animation data
*/
-int32 Graphics::setLuggageAnim(uint8 *ma, int32 size) {
+int32 Graphics::setLuggageAnim(byte *ma, int32 size) {
if (_luggageAnim) {
free(_luggageAnim);
_luggageAnim = NULL;
@@ -244,8 +244,8 @@
if (!_luggageAnim)
return RDERR_OUTOFMEMORY;
- memcpy((uint8 *) _luggageAnim, ma, size);
- _luggageOffset = (int32 *) ((uint8 *) _luggageAnim + sizeof(MouseAnim));
+ memcpy((byte *) _luggageAnim, ma, size);
+ _luggageOffset = (int32 *) ((byte *) _luggageAnim + sizeof(MouseAnim));
animateMouse();
drawMouse();
Index: animation.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/animation.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- animation.cpp 28 Mar 2004 16:30:50 -0000 1.38
+++ animation.cpp 23 Apr 2004 07:02:09 -0000 1.39
@@ -50,7 +50,7 @@
#else
-void AnimationState::drawTextObject(SpriteInfo *s, uint8 *src) {
+void AnimationState::drawTextObject(SpriteInfo *s, byte *src) {
OverlayColor *dst = overlay + RENDERWIDE * (s->y) + s->x;
// FIXME: These aren't the "right" colours, but look good to me.
@@ -166,7 +166,7 @@
* @param musicOut lead-out music
*/
-int32 MoviePlayer::play(const char *filename, MovieTextObject *text[], uint8 *musicOut) {
+int32 MoviePlayer::play(const char *filename, MovieTextObject *text[], byte *musicOut) {
// This happens if the user quits during the "eye" smacker
if (_vm->_quit)
return RD_OK;
@@ -178,7 +178,7 @@
uint32 flags = SoundMixer::FLAG_16BITS;
bool startNextText = false;
- uint8 oldPal[1024];
+ byte oldPal[1024];
memcpy(oldPal, _vm->_graphics->_palCopy, 1024);
AnimationState *anim = new AnimationState(_vm);
@@ -342,11 +342,11 @@
* are missing.
*/
-int32 MoviePlayer::playDummy(const char *filename, MovieTextObject *text[], uint8 *musicOut) {
+int32 MoviePlayer::playDummy(const char *filename, MovieTextObject *text[], byte *musicOut) {
int frameCounter = 0, textCounter = 0;
if (text) {
- uint8 oldPal[1024];
- uint8 tmpPal[1024];
+ byte oldPal[1024];
+ byte tmpPal[1024];
_vm->_graphics->clearScene();
@@ -357,23 +357,23 @@
memset(_vm->_graphics->_buffer, 0, _vm->_graphics->_screenWide * MENUDEEP);
- uint8 msg[] = "Cutscene - Narration Only: Press ESC to exit, or visit www.scummvm.org to download cutscene videos";
- Memory *data = _vm->_fontRenderer->makeTextSprite(msg, RENDERWIDE, 255, _vm->_speechFontId);
- FrameHeader *frame = (FrameHeader *) data->ad;
+ byte msg[] = "Cutscene - Narration Only: Press ESC to exit, or visit www.scummvm.org to download cutscene videos";
+ byte *data = _vm->_fontRenderer->makeTextSprite(msg, RENDERWIDE, 255, _vm->_speechFontId);
+ FrameHeader *frame = (FrameHeader *) data;
SpriteInfo msgSprite;
- uint8 *msgSurface;
+ byte *msgSurface;
msgSprite.x = _vm->_graphics->_screenWide / 2 - frame->width / 2;
msgSprite.y = RDMENU_MENUDEEP / 2 - frame->height / 2;
msgSprite.w = frame->width;
msgSprite.h = frame->height;
msgSprite.type = RDSPR_NOCOMPRESSION;
- msgSprite.data = data->ad + sizeof(FrameHeader);
+ msgSprite.data = data + sizeof(FrameHeader);
_vm->_graphics->createSurface(&msgSprite, &msgSurface);
_vm->_graphics->drawSurface(&msgSprite, msgSurface);
_vm->_graphics->deleteSurface(msgSurface);
- _vm->_memory->freeMemory(data);
+ _vm->_memory->memFree(data);
// In case the cutscene has a long lead-in, start just before
// the first line of text.
Index: animation.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/animation.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- animation.h 24 Mar 2004 07:29:59 -0000 1.28
+++ animation.h 23 Apr 2004 07:02:09 -0000 1.29
@@ -38,7 +38,7 @@
~AnimationState();
#ifndef BACKEND_8BIT
- void drawTextObject(SpriteInfo *s, uint8 *src);
+ void drawTextObject(SpriteInfo *s, byte *src);
#endif
void clearScreen();
@@ -63,7 +63,7 @@
SoundMixer *_snd;
OSystem *_sys;
- uint8 *_textSurface;
+ byte *_textSurface;
static struct MovieInfo _movies[];
@@ -71,11 +71,11 @@
void closeTextObject(MovieTextObject *obj);
void drawTextObject(AnimationState *anim, MovieTextObject *obj);
- int32 playDummy(const char *filename, MovieTextObject *text[], uint8 *musicOut);
+ int32 playDummy(const char *filename, MovieTextObject *text[], byte *musicOut);
public:
MoviePlayer(Sword2Engine *vm);
- int32 play(const char *filename, MovieTextObject *text[], uint8 *musicOut);
+ int32 play(const char *filename, MovieTextObject *text[], byte *musicOut);
};
} // End of namespace Sword2
Index: d_draw.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/d_draw.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- d_draw.h 24 Mar 2004 07:29:59 -0000 1.27
+++ d_draw.h 23 Apr 2004 07:02:10 -0000 1.28
@@ -91,9 +91,9 @@
bool _needFullRedraw;
- uint8 _paletteMatch[PALTABLESIZE];
+ byte _paletteMatch[PALTABLESIZE];
- uint8 _fadePalette[256][4];
+ byte _fadePalette[256][4];
uint8 _fadeStatus;
int32 _fadeStartTime;
@@ -102,7 +102,7 @@
byte _mouseData[MAX_MOUSE_W * MAX_MOUSE_H];
uint8 _mouseFrame;
- uint8 *_mouseSprite;
+ byte *_mouseSprite;
struct MouseAnim *_mouseAnim;
struct MouseAnim *_luggageAnim;
int32 *_mouseOffsets;
@@ -146,11 +146,11 @@
uint16 _xScale[SCALE_MAXWIDTH];
uint16 _yScale[SCALE_MAXHEIGHT];
- uint8 *_lightMask;
+ byte *_lightMask;
void clearIconArea(int menu, int pocket, Common::Rect *r);
- void decompressMouse(uint8 *decomp, uint8 *comp, int width, int height, int pitch, int xOff = 0, int yOff = 0);
+ void decompressMouse(byte *decomp, byte *comp, int width, int height, int pitch, int xOff = 0, int yOff = 0);
uint8 getMatch(uint8 r, uint8 g, uint8 b);
void fadeServer(void);
@@ -166,10 +166,10 @@
void blitBlockSurface(BlockSurface *s, Common::Rect *r, Common::Rect *clipRect);
- void mirrorSprite(uint8 *dst, uint8 *src, int16 w, int16 h);
- int32 decompressRLE256(uint8 *dest, uint8 *source, int32 decompSize);
- void unwindRaw16(uint8 *dest, uint8 *source, uint8 blockSize, uint8 *colTable);
- int32 decompressRLE16(uint8 *dest, uint8 *source, int32 decompSize, uint8 *colTable);
+ void mirrorSprite(byte *dst, byte *src, int16 w, int16 h);
+ int32 decompressRLE256(byte *dest, byte *source, int32 decompSize);
+ void unwindRaw16(byte *dest, byte *source, uint8 blockSize, byte *colTable);
+ int32 decompressRLE16(byte *dest, byte *source, int32 decompSize, byte *colTable);
public:
@@ -180,7 +180,7 @@
int16 _screenWide;
int16 _screenDeep;
- uint8 _palCopy[256][4];
+ byte _palCopy[256][4];
byte *getScreen(void) { return _buffer; }
@@ -192,15 +192,15 @@
void processMenu(void);
int32 showMenu(uint8 menu);
int32 hideMenu(uint8 menu);
- int32 setMenuIcon(uint8 menu, uint8 pocket, uint8 *icon);
+ int32 setMenuIcon(uint8 menu, uint8 pocket, byte *icon);
void closeMenuImmediately(void);
void updateDisplay(bool redrawScene = true);
void setWindowName(const char *windowName);
void setNeedFullRedraw(void);
- void setPalette(int16 startEntry, int16 noEntries, uint8 *palette, uint8 setNow);
- void updatePaletteMatchTable(uint8 *data);
+ void setPalette(int16 startEntry, int16 noEntries, byte *palette, uint8 setNow);
+ void updatePaletteMatchTable(byte *data);
uint8 quickMatch(uint8 r, uint8 g, uint8 b);
int32 fadeUp(float time = 0.75);
int32 fadeDown(float time = 0.75);
@@ -208,8 +208,8 @@
void dimPalette(void);
void waitForFade(void);
- int32 setMouseAnim(uint8 *ma, int32 size, int32 mouseFlash);
- int32 setLuggageAnim(uint8 *la, int32 size);
+ int32 setMouseAnim(byte *ma, int32 size, int32 mouseFlash);
+ int32 setLuggageAnim(byte *la, int32 size);
int32 animateMouse(void);
void drawMouse(void);
@@ -232,9 +232,9 @@
#endif
- int32 createSurface(SpriteInfo *s, uint8 **surface);
- void drawSurface(SpriteInfo *s, uint8 *surface, Common::Rect *clipRect = NULL);
- void deleteSurface(uint8 *surface);
+ int32 createSurface(SpriteInfo *s, byte **surface);
+ void drawSurface(SpriteInfo *s, byte *surface, Common::Rect *clipRect = NULL);
+ void deleteSurface(byte *surface);
int32 drawSprite(SpriteInfo *s);
int32 openLightMask(SpriteInfo *s);
int32 closeLightMask(void);
Index: d_sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/d_sound.cpp,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -d -r1.109 -r1.110
--- d_sound.cpp 13 Mar 2004 12:05:01 -0000 1.109
+++ d_sound.cpp 23 Apr 2004 07:02:10 -0000 1.110
@@ -251,7 +251,7 @@
* @return True if the data appears to be a WAV file, otherwise false.
*/
-bool Sound::getWavInfo(uint8 *data, WavInfo *wavInfo) {
+bool Sound::getWavInfo(byte *data, WavInfo *wavInfo) {
uint32 wavLength;
uint32 offset;
@@ -750,7 +750,7 @@
uint32 Sound::preFetchCompSpeech(const char *filename, uint32 speechid, uint16 **buf) {
uint32 i;
- uint8 *data8;
+ byte *data8;
uint32 speechPos, speechLength;
File fp;
uint32 bufferSize;
@@ -772,7 +772,7 @@
}
// Create a temporary buffer for compressed speech
- data8 = (uint8 *) malloc(speechLength);
+ data8 = (byte *) malloc(speechLength);
if (!data8) {
fp.close();
return 0;
@@ -1036,7 +1036,7 @@
* @warning Zero is not a valid id
*/
-int32 Sound::openFx(int32 id, uint8 *data) {
+int32 Sound::openFx(int32 id, byte *data) {
if (!_soundOn)
return RD_OK;
@@ -1128,7 +1128,7 @@
* @warning Zero is not a valid id
*/
-int32 Sound::playFx(int32 id, uint8 *data, uint8 vol, int8 pan, uint8 type) {
+int32 Sound::playFx(int32 id, byte *data, uint8 vol, int8 pan, uint8 type) {
if (!_soundOn)
return RD_OK;
Index: driver96.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/driver96.h,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- driver96.h 6 Jan 2004 13:44:17 -0000 1.70
+++ driver96.h 23 Apr 2004 07:02:10 -0000 1.71
@@ -214,8 +214,8 @@
uint16 scaledHeight; //
uint16 type; // mask containing 'RDSPR_' bits specifying compression type, flip, transparency, etc
uint16 blend; // holds the blending values.
- uint8 *data; // pointer to the sprite data
- uint8 *colourTable; // pointer to 16-byte colour table, only applicable to 16-col compression type
+ byte *data; // pointer to the sprite data
+ byte *colourTable; // pointer to 16-byte colour table, only applicable to 16-col compression type
};
// This is the structure which is passed to the sequence player. It includes
Index: menu.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/menu.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- menu.cpp 5 Feb 2004 14:19:07 -0000 1.25
+++ menu.cpp 23 Apr 2004 07:02:10 -0000 1.26
@@ -264,7 +264,7 @@
* @return RD_OK, or an error code
*/
-int32 Graphics::setMenuIcon(uint8 menu, uint8 pocket, uint8 *icon) {
+int32 Graphics::setMenuIcon(uint8 menu, uint8 pocket, byte *icon) {
Common::Rect r;
// Check for invalid menu parameter.
@@ -287,7 +287,7 @@
// Only put the icon in the pocket if it is not NULL
if (icon != NULL) {
_iconCount++;
- _icons[menu][pocket] = (uint8 *) malloc(RDMENU_ICONWIDE * RDMENU_ICONDEEP);
+ _icons[menu][pocket] = (byte *) malloc(RDMENU_ICONWIDE * RDMENU_ICONDEEP);
if (_icons[menu][pocket] == NULL)
return RDERR_OUTOFMEMORY;
memcpy(_icons[menu][pocket], icon, RDMENU_ICONWIDE * RDMENU_ICONDEEP);
Index: palette.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/palette.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- palette.cpp 28 Feb 2004 12:58:13 -0000 1.30
+++ palette.cpp 23 Apr 2004 07:02:10 -0000 1.31
@@ -64,10 +64,10 @@
* from the current palCopy
*/
-void Graphics::updatePaletteMatchTable(uint8 *data) {
+void Graphics::updatePaletteMatchTable(byte *data) {
if (!data) {
int16 red, green, blue;
- uint8 *p;
+ byte *p;
// Create palette match table
@@ -109,7 +109,7 @@
* @param colourTable the new colour entries
*/
-void Graphics::setPalette(int16 startEntry, int16 noEntries, uint8 *colourTable, uint8 fadeNow) {
+void Graphics::setPalette(int16 startEntry, int16 noEntries, byte *colourTable, uint8 fadeNow) {
if (noEntries) {
memcpy(&_palCopy[startEntry][0], colourTable, noEntries * 4);
if (fadeNow == RDPAL_INSTANT) {
Index: render.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/render.cpp,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- render.cpp 7 Apr 2004 12:31:32 -0000 1.60
+++ render.cpp 23 Apr 2004 07:02:10 -0000 1.61
@@ -332,7 +332,7 @@
*/
void Graphics::plotPoint(uint16 x, uint16 y, uint8 colour) {
- uint8 *buf = _buffer + 40 * RENDERWIDE;
+ byte *buf = _buffer + 40 * RENDERWIDE;
int16 newx, newy;
newx = x - _scrollX;
@@ -353,7 +353,7 @@
// Uses Bressnham's incremental algorithm!
void Graphics::drawLine(int16 x0, int16 y0, int16 x1, int16 y1, uint8 colour) {
- uint8 *buf = _buffer + 40 * RENDERWIDE;
+ byte *buf = _buffer + 40 * RENDERWIDE;
int dx, dy;
int dxmod, dymod;
int ince, incne;
@@ -700,15 +700,15 @@
*/
int32 Graphics::initialiseBackgroundLayer(Parallax *p) {
- uint8 *memchunk;
+ byte *memchunk;
uint8 zeros;
uint16 count;
uint16 i, j, k;
uint16 x;
- uint8 *data;
- uint8 *dst;
+ byte *data;
+ byte *dst;
ParallaxLine line;
- uint8 *pLine;
+ byte *pLine;
debug(2, "initialiseBackgroundLayer");
@@ -732,7 +732,7 @@
// Decode the parallax layer into a large chunk of memory
- memchunk = (uint8 *) calloc(_xBlocks[_layer] * _yBlocks[_layer], BLOCKWIDTH * BLOCKHEIGHT);
+ memchunk = (byte *) calloc(_xBlocks[_layer] * _yBlocks[_layer], BLOCKWIDTH * BLOCKHEIGHT);
if (!memchunk)
return RDERR_OUTOFMEMORY;
@@ -740,7 +740,7 @@
if (p->offset[i] == 0)
continue;
- pLine = (uint8 *) p + FROM_LE_32(p->offset[i]);
+ pLine = (byte *) p + FROM_LE_32(p->offset[i]);
line.packets = READ_LE_UINT16(pLine);
line.offset = READ_LE_UINT16(pLine + 2);
data = pLine + sizeof(ParallaxLine);
Index: sprite.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/sprite.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- sprite.cpp 5 Feb 2004 14:19:07 -0000 1.39
+++ sprite.cpp 23 Apr 2004 07:02:11 -0000 1.40
@@ -31,7 +31,7 @@
* @param h height of the sprite
*/
-void Graphics::mirrorSprite(uint8 *dst, uint8 *src, int16 w, int16 h) {
+void Graphics::mirrorSprite(byte *dst, byte *src, int16 w, int16 h) {
for (int y = 0; y < h; y++) {
for (int x = 0; x < w; x++) {
*dst++ = *(src + w - x - 1);
@@ -48,15 +48,15 @@
* @param decompSize the expected size of the decompressed sprite
*/
-int32 Graphics::decompressRLE256(uint8 *dest, uint8 *source, int32 decompSize) {
+int32 Graphics::decompressRLE256(byte *dest, byte *source, int32 decompSize) {
// PARAMETERS:
// source points to the start of the sprite data for input
// decompSize gives size of decompressed data in bytes
// dest points to start of destination buffer for decompressed
// data
- uint8 headerByte; // block header byte
- uint8 *endDest = dest + decompSize; // pointer to byte after end of decomp buffer
+ byte headerByte; // block header byte
+ byte *endDest = dest + decompSize; // pointer to byte after end of decomp buffer
int32 rv;
while(1) {
@@ -128,7 +128,7 @@
* Unwinds a run of 16-colour data into 256-colour palette data.
*/
-void Graphics::unwindRaw16(uint8 *dest, uint8 *source, uint8 blockSize, uint8 *colTable) {
+void Graphics::unwindRaw16(byte *dest, byte *source, uint8 blockSize, byte *colTable) {
// for each pair of pixels
while (blockSize > 1) {
// 1st colour = number in table at position given by upper
@@ -163,9 +163,9 @@
* @param colTable mapping from the 16 encoded colours to the current palette
*/
-int32 Graphics::decompressRLE16(uint8 *dest, uint8 *source, int32 decompSize, uint8 *colTable) {
- uint8 headerByte; // block header byte
- uint8 *endDest = dest + decompSize; // pointer to byte after end of decomp buffer
+int32 Graphics::decompressRLE16(byte *dest, byte *source, int32 decompSize, byte *colTable) {
+ byte headerByte; // block header byte
+ byte *endDest = dest + decompSize; // pointer to byte after end of decomp buffer
int32 rv;
while(1) {
@@ -243,8 +243,8 @@
* @return RD_OK, or an error code
*/
-int32 Graphics::createSurface(SpriteInfo *s, uint8 **sprite) {
- *sprite = (uint8 *) malloc(s->w * s->h);
+int32 Graphics::createSurface(SpriteInfo *s, byte **sprite) {
+ *sprite = (byte *) malloc(s->w * s->h);
if (!*sprite)
return RDERR_OUTOFMEMORY;
@@ -268,10 +268,10 @@
* @param clipRect the clipping rectangle
*/
-void Graphics::drawSurface(SpriteInfo *s, uint8 *surface, Common::Rect *clipRect) {
+void Graphics::drawSurface(SpriteInfo *s, byte *surface, Common::Rect *clipRect) {
Common::Rect rd, rs;
uint16 x, y;
- uint8 *src, *dst;
+ byte *src, *dst;
rs.left = 0;
rs.right = s->w;
@@ -327,7 +327,7 @@
* Destroys a surface.
*/
-void Graphics::deleteSurface(uint8 *surface) {
+void Graphics::deleteSurface(byte *surface) {
free(surface);
}
@@ -353,9 +353,9 @@
// mallocing here.
int32 Graphics::drawSprite(SpriteInfo *s) {
- uint8 *src, *dst;
- uint8 *sprite, *newSprite;
- uint8 *backbuf = NULL;
+ byte *src, *dst;
+ byte *sprite, *newSprite;
+ byte *backbuf = NULL;
uint16 scale;
int16 i, j;
uint16 srcPitch;
@@ -370,7 +370,7 @@
if (s->type & RDSPR_NOCOMPRESSION)
sprite = s->data;
else {
- sprite = (uint8 *) malloc(s->w * s->h);
+ sprite = (byte *) malloc(s->w * s->h);
freeSprite = true;
if (!sprite)
return RDERR_OUTOFMEMORY;
@@ -388,7 +388,7 @@
}
if (s->type & RDSPR_FLIP) {
- newSprite = (uint8 *) malloc(s->w * s->h);
+ newSprite = (byte *) malloc(s->w * s->h);
if (newSprite == NULL) {
if (freeSprite)
free(sprite);
@@ -486,7 +486,7 @@
return RDERR_NOTIMPLEMENTED;
}
- newSprite = (uint8 *) malloc(s->scaledWidth * s->scaledHeight);
+ newSprite = (byte *) malloc(s->scaledWidth * s->scaledHeight);
if (newSprite == NULL) {
if (freeSprite)
free(sprite);
@@ -519,10 +519,10 @@
// (actors, presumably) are always affected.
if ((_renderCaps & RDBLTFX_SHADOWBLEND) && _lightMask && (scale != 256 || (s->type & RDSPR_SHADOW))) {
- uint8 *lightMap;
+ byte *lightMap;
if (!freeSprite) {
- newSprite = (uint8 *) malloc(s->w * s->h);
+ newSprite = (byte *) malloc(s->w * s->h);
memcpy(newSprite, sprite, s->w * s->h);
sprite = newSprite;
freeSprite = true;
@@ -640,7 +640,7 @@
if (_lightMask)
return RDERR_NOTCLOSED;
- _lightMask = (uint8 *) malloc(s->w * s->h);
+ _lightMask = (byte *) malloc(s->w * s->h);
if (!_lightMask)
return RDERR_OUTOFMEMORY;
More information about the Scummvm-git-logs
mailing list