[Scummvm-cvs-logs] CVS: scummvm/sword2/driver _mouse.cpp,1.29,1.30 d_draw.cpp,1.50,1.51 d_draw.h,1.16,1.17 d_sound.cpp,1.90,1.91 d_sound.h,1.36,1.37 driver96.h,1.66,1.67 keyboard.cpp,1.14,1.15 render.cpp,1.44,1.45 render.h,1.11,1.12 sprite.cpp,1.35,1.36
Torbj?rn Andersson
eriktorbjorn at users.sourceforge.net
Sun Dec 28 07:09:01 CET 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sword1 control.cpp,1.7,1.8
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sword2 anims.cpp,1.47,1.48 build_display.cpp,1.50,1.51 console.h,1.15,1.16 controls.cpp,1.56,1.57 debug.cpp,1.32,1.33 defs.h,1.9,1.10 events.cpp,1.22,1.23 function.cpp,1.42,1.43 header.h,1.7,1.8 icons.cpp,1.28,1.29 icons.h,1.9,1.10 interpreter.cpp,1.34,1.35 layers.cpp,1.22,1.23 layers.h,1.7,1.8 logic.cpp,1.36,1.37 logic.h,1.24,1.25 maketext.cpp,1.33,1.34 maketext.h,1.9,1.10 mem_view.cpp,1.23,1.24 memory.cpp,1.19,1.20 memory.h,1.12,1.13 mouse.cpp,1.47,1.48 mouse.h,1.11,1.12 object.h,1.5,1.6 protocol.cpp,1.22,1.23 resman.cpp,1.78,1.79 resman.h,1.17,1.18 router.cpp,1.35,1.36 router.h,1.14,1.15 save_rest.cpp,1.42,1.43 sound.cpp,1.35,1.36 speech.cpp,1.54,1.55 startup.cpp,1.36,1.37 sword2.cpp,1.93,1.94 sword2.h,1.46,1.47 walker.cpp,1.30,1.31
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/sword2/driver
In directory sc8-pr-cvs1:/tmp/cvs-serv5297/driver
Modified Files:
_mouse.cpp d_draw.cpp d_draw.h d_sound.cpp d_sound.h
driver96.h keyboard.cpp render.cpp render.h sprite.cpp
Log Message:
Hopefully the last big renaming. Now the datatypes have names like
"StandardHeader" instead of "_standardHeader".
Index: _mouse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/_mouse.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- _mouse.cpp 19 Dec 2003 16:50:03 -0000 1.29
+++ _mouse.cpp 28 Dec 2003 15:08:11 -0000 1.30
@@ -48,8 +48,8 @@
* @return a pointer to the mouse event, or NULL of there is none
*/
-_mouseEvent *Input::mouseEvent(void) {
- _mouseEvent *me;
+MouseEvent *Input::mouseEvent(void) {
+ MouseEvent *me;
if (_mouseBacklog) {
me = &_mouseLog[_mouseLogPos];
@@ -211,12 +211,12 @@
else
_mouseFrame = MOUSEFLASHFRAME;
- _mouseAnim = (struct _mouseAnim *) malloc(size);
+ _mouseAnim = (MouseAnim *) malloc(size);
if (!_mouseAnim)
return RDERR_OUTOFMEMORY;
memcpy((uint8 *) _mouseAnim, ma, size);
- _mouseOffsets = (int32 *) ((uint8 *) _mouseAnim + sizeof(struct _mouseAnim));
+ _mouseOffsets = (int32 *) ((uint8 *) _mouseAnim + sizeof(MouseAnim));
animateMouse();
drawMouse();
@@ -246,12 +246,12 @@
}
if (ma) {
- _luggageAnim = (struct _mouseAnim *) malloc(size);
+ _luggageAnim = (MouseAnim *) malloc(size);
if (!_luggageAnim)
return RDERR_OUTOFMEMORY;
memcpy((uint8 *) _luggageAnim, ma, size);
- _luggageOffset = (int32 *) ((uint8 *) _luggageAnim + sizeof(struct _mouseAnim));
+ _luggageOffset = (int32 *) ((uint8 *) _luggageAnim + sizeof(MouseAnim));
animateMouse();
drawMouse();
Index: d_draw.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/d_draw.cpp,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- d_draw.cpp 24 Dec 2003 00:25:18 -0000 1.50
+++ d_draw.cpp 28 Dec 2003 15:08:11 -0000 1.51
@@ -92,19 +92,19 @@
memset(_buffer + MENUDEEP * _screenWide, 0, _screenWide * RENDERDEEP);
}
-void MoviePlayer::openTextObject(_movieTextObject *obj) {
+void MoviePlayer::openTextObject(MovieTextObject *obj) {
if (obj->textSprite)
_vm->_graphics->createSurface(obj->textSprite, &_textSurface);
}
-void MoviePlayer::closeTextObject(_movieTextObject *obj) {
+void MoviePlayer::closeTextObject(MovieTextObject *obj) {
if (_textSurface) {
_vm->_graphics->deleteSurface(_textSurface);
_textSurface = NULL;
}
}
-void MoviePlayer::drawTextObject(_movieTextObject *obj) {
+void MoviePlayer::drawTextObject(MovieTextObject *obj) {
if (obj->textSprite && _textSurface)
_vm->_graphics->drawSurface(obj->textSprite, _textSurface);
}
@@ -116,7 +116,7 @@
* @param musicOut lead-out music
*/
-int32 MoviePlayer::play(char *filename, _movieTextObject *text[], uint8 *musicOut) {
+int32 MoviePlayer::play(char *filename, MovieTextObject *text[], uint8 *musicOut) {
warning("semi-stub PlaySmacker %s", filename);
// WORKAROUND: For now, we just do the voice-over parts of the
@@ -136,9 +136,9 @@
memset(_vm->_graphics->_buffer, 0, _vm->_graphics->_screenWide * MENUDEEP);
uint8 msg[] = "Cutscene - Press ESC to exit";
- mem *data = _vm->_fontRenderer->makeTextSprite(msg, 640, 255, _vm->_speechFontId);
- _frameHeader *frame = (_frameHeader *) data->ad;
- _spriteInfo msgSprite;
+ Memory *data = _vm->_fontRenderer->makeTextSprite(msg, 640, 255, _vm->_speechFontId);
+ FrameHeader *frame = (FrameHeader *) data->ad;
+ SpriteInfo msgSprite;
uint8 *msgSurface;
msgSprite.x = _vm->_graphics->_screenWide / 2 - frame->width / 2;
@@ -146,7 +146,7 @@
msgSprite.w = frame->width;
msgSprite.h = frame->height;
msgSprite.type = RDSPR_NOCOMPRESSION;
- msgSprite.data = data->ad + sizeof(_frameHeader);
+ msgSprite.data = data->ad + sizeof(FrameHeader);
_vm->_graphics->createSurface(&msgSprite, &msgSurface);
_vm->_graphics->drawSurface(&msgSprite, msgSurface);
@@ -206,7 +206,7 @@
_vm->_graphics->updateDisplay();
- _keyboardEvent ke;
+ KeyboardEvent ke;
if (_vm->_input->readKey(&ke) == RD_OK && ke.keycode == 27) {
_vm->_mixer->stopHandle(handle);
Index: d_draw.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/d_draw.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- d_draw.h 16 Nov 2003 14:18:29 -0000 1.16
+++ d_draw.h 28 Dec 2003 15:08:11 -0000 1.17
@@ -45,7 +45,7 @@
#pragma START_PACK_STRUCTS
#endif
-struct _mouseAnim {
+struct MouseAnim {
uint8 runTimeComp; // type of runtime compression used for the
// frame data
uint8 noAnimFrames; // number of frames in the anim
@@ -64,19 +64,19 @@
Sword2Engine *_vm;
uint8 *_textSurface;
- void openTextObject(_movieTextObject *obj);
- void closeTextObject(_movieTextObject *obj);
- void drawTextObject(_movieTextObject *obj);
+ void openTextObject(MovieTextObject *obj);
+ void closeTextObject(MovieTextObject *obj);
+ void drawTextObject(MovieTextObject *obj);
public:
MoviePlayer(Sword2Engine *vm) : _vm(vm), _textSurface(NULL) {}
- int32 play(char *filename, _movieTextObject *text[], uint8 *musicOut);
+ int32 play(char *filename, MovieTextObject *text[], uint8 *musicOut);
};
-typedef struct {
+struct BlockSurface {
byte data[BLOCKWIDTH * BLOCKHEIGHT];
bool transparent;
-} BlockSurface;
+};
class Graphics {
friend class MoviePlayer;
@@ -109,8 +109,8 @@
uint8 _mouseFrame;
uint8 *_mouseSprite;
- struct _mouseAnim *_mouseAnim;
- struct _mouseAnim *_luggageAnim;
+ struct MouseAnim *_mouseAnim;
+ struct MouseAnim *_luggageAnim;
int32 *_mouseOffsets;
int32 *_luggageOffset;
@@ -222,19 +222,19 @@
void initialiseRenderCycle(void);
void startRenderCycle(void);
bool endRenderCycle(void);
- void renderParallax(_parallax *p, int16 layer);
+ void renderParallax(Parallax *p, int16 layer);
void setLocationMetrics(uint16 w, uint16 h);
- int32 initialiseBackgroundLayer(_parallax *p);
+ int32 initialiseBackgroundLayer(Parallax *p);
void closeBackgroundLayer(void);
void plotPoint(uint16 x, uint16 y, uint8 colour);
void drawLine(int16 x1, int16 y1, int16 x2, int16 y2, uint8 colour);
- int32 createSurface(_spriteInfo *s, uint8 **surface);
- void drawSurface(_spriteInfo *s, uint8 *surface, Common::Rect *clipRect = NULL);
+ int32 createSurface(SpriteInfo *s, uint8 **surface);
+ void drawSurface(SpriteInfo *s, uint8 *surface, Common::Rect *clipRect = NULL);
void deleteSurface(uint8 *surface);
- int32 drawSprite(_spriteInfo *s);
- int32 openLightMask(_spriteInfo *s);
+ 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.90
retrieving revision 1.91
diff -u -d -r1.90 -r1.91
--- d_sound.cpp 24 Dec 2003 00:25:18 -0000 1.90
+++ d_sound.cpp 28 Dec 2003 15:08:11 -0000 1.91
@@ -529,9 +529,9 @@
int32 Sound::openFx(int32 id, uint8 *data) {
int32 i, fxi;
uint32 *data32 = NULL;
- _wavHeader *wav;
+ WavHeader *wav;
- wav = (_wavHeader *) data;
+ wav = (WavHeader *) data;
if (_soundOn) {
// Check for a valid id.
Index: d_sound.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/d_sound.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- d_sound.h 24 Dec 2003 00:25:18 -0000 1.36
+++ d_sound.h 28 Dec 2003 15:08:11 -0000 1.37
@@ -33,7 +33,7 @@
extern void sword2_sound_handler(void *refCon);
-typedef struct {
+struct FxHandle {
int32 _id;
bool _paused;
int8 _volume;
@@ -42,7 +42,7 @@
uint16 *_buf;
int32 _bufSize;
PlayingSoundHandle _handle;
-} FxHandle;
+};
class MusicHandle : public AudioInputStream {
public:
Index: driver96.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/driver96.h,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- driver96.h 19 Dec 2003 16:50:03 -0000 1.66
+++ driver96.h 28 Dec 2003 15:08:11 -0000 1.67
@@ -176,21 +176,21 @@
// Structure definitions
-typedef struct {
+struct MouseEvent {
uint16 buttons;
-} _mouseEvent;
+};
-typedef struct {
+struct KeyboardEvent {
uint16 ascii;
int keycode;
int modifiers;
-} _keyboardEvent;
+};
#if !defined(__GNUC__)
#pragma START_PACK_STRUCTS
#endif
-struct _parallax {
+struct Parallax {
uint16 w;
uint16 h;
uint32 offset[2]; // 2 is arbitrary
@@ -200,11 +200,11 @@
#pragma END_PACK_STRUCTS
#endif
-// The _spriteInfo structure is used to tell the driver96 code what attributes
+// The SpriteInfo structure is used to tell the driver96 code what attributes
// are linked to a sprite for drawing. These include position, scaling and
// compression.
-typedef struct {
+struct SpriteInfo {
int16 x; // coords for top-left of sprite
int16 y;
uint16 w; // dimensions of sprite (before scaling)
@@ -216,13 +216,13 @@
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
-} _spriteInfo;
+};
// This is the format of a .WAV file. Somewhere after this header is the
// string 'DATA' followed by an int32 size which is the size of the data.
// Following the size of the data is the data itself.
- typedef struct {
+struct WavHeader {
uint32 riff;
uint32 fileLength;
uint32 wavID;
@@ -236,19 +236,19 @@
uint16 unknown1;
uint16 unknown2;
uint16 bitsPerSample;
-} _wavHeader;
+};
// This is the structure which is passed to the sequence player. It includes
// the smack to play, and any text lines which are to be displayed over the top
// of the sequence.
-typedef struct {
+struct MovieTextObject {
uint16 startFrame;
uint16 endFrame;
- _spriteInfo *textSprite;
+ SpriteInfo *textSprite;
uint32 speechBufferSize;
uint16 *speech;
-} _movieTextObject;
+};
// Input handling class
@@ -264,7 +264,7 @@
uint8 _mouseBacklog;
uint8 _mouseLogPos;
- _mouseEvent _mouseLog[MAX_MOUSE_EVENTS];
+ MouseEvent _mouseLog[MAX_MOUSE_EVENTS];
void logMouseEvent(uint16 buttons);
@@ -275,7 +275,7 @@
uint8 _keyLogPos;
// The keyboard buffer
- _keyboardEvent _keyBuffer[MAX_KEY_BUFFER];
+ KeyboardEvent _keyBuffer[MAX_KEY_BUFFER];
void writeKey(uint16 ascii, int keycode, int modifiers);
@@ -289,11 +289,11 @@
void parseEvents(void);
- _mouseEvent *mouseEvent(void);
+ MouseEvent *mouseEvent(void);
bool checkForMouseEvents(void);
bool keyWaiting(void);
- int32 readKey(_keyboardEvent *ev);
+ int32 readKey(KeyboardEvent *ev);
};
} // End of namespace Sword2
Index: keyboard.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/keyboard.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- keyboard.cpp 16 Nov 2003 14:18:29 -0000 1.14
+++ keyboard.cpp 28 Dec 2003 15:08:11 -0000 1.15
@@ -24,7 +24,7 @@
void Input::writeKey(uint16 ascii, int keycode, int modifiers) {
if (_keyBuffer && _keyBacklog < MAX_KEY_BUFFER) {
- _keyboardEvent *slot = &_keyBuffer[(_keyLogPos + _keyBacklog) % MAX_KEY_BUFFER];
+ KeyboardEvent *slot = &_keyBuffer[(_keyLogPos + _keyBacklog) % MAX_KEY_BUFFER];
slot->ascii = ascii;
slot->keycode = keycode;
@@ -46,7 +46,7 @@
* @return RD_OK, or an error code to indicate there is no key waiting.
*/
-int32 Input::readKey(_keyboardEvent *ev) {
+int32 Input::readKey(KeyboardEvent *ev) {
if (!_keyBacklog)
return RDERR_NOKEYWAITING;
Index: render.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/render.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- render.cpp 8 Dec 2003 07:30:22 -0000 1.44
+++ render.cpp 28 Dec 2003 15:08:12 -0000 1.45
@@ -526,7 +526,7 @@
* parallax can be either foreground, background or the main screen.
*/
-void Graphics::renderParallax(_parallax *p, int16 l) {
+void Graphics::renderParallax(Parallax *p, int16 l) {
int16 x, y;
Common::Rect r;
@@ -675,7 +675,7 @@
* or a NULL pointer in order of background parallax to foreground parallax.
*/
-int32 Graphics::initialiseBackgroundLayer(_parallax *p) {
+int32 Graphics::initialiseBackgroundLayer(Parallax *p) {
uint8 *memchunk;
uint8 zeros;
uint16 count;
@@ -683,7 +683,7 @@
uint16 x;
uint8 *data;
uint8 *dst;
- _parallaxLine line;
+ ParallaxLine line;
uint8 *pLine;
debug(2, "initialiseBackgroundLayer");
@@ -719,7 +719,7 @@
pLine = (uint8 *) p + FROM_LE_32(p->offset[i]);
line.packets = READ_LE_UINT16(pLine);
line.offset = READ_LE_UINT16(pLine + 2);
- data = pLine + sizeof(_parallaxLine);
+ data = pLine + sizeof(ParallaxLine);
x = line.offset;
dst = memchunk + i * p->w + x;
Index: render.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/render.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- render.h 28 Oct 2003 19:51:30 -0000 1.11
+++ render.h 28 Dec 2003 15:08:12 -0000 1.12
@@ -28,10 +28,10 @@
#define ALIGNRENDERDEEP 480
#define RENDERDEEP (ALIGNRENDERDEEP - (MENUDEEP * 2))
-typedef struct {
+struct ParallaxLine {
uint16 packets;
uint16 offset;
-} _parallaxLine;
+};
} // End of namespace Sword2
Index: sprite.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword2/driver/sprite.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- sprite.cpp 10 Dec 2003 08:01:58 -0000 1.35
+++ sprite.cpp 28 Dec 2003 15:08:12 -0000 1.36
@@ -242,7 +242,7 @@
* @return RD_OK, or an error code
*/
-int32 Graphics::createSurface(_spriteInfo *s, uint8 **sprite) {
+int32 Graphics::createSurface(SpriteInfo *s, uint8 **sprite) {
*sprite = (uint8 *) malloc(s->w * s->h);
if (!*sprite)
return RDERR_OUTOFMEMORY;
@@ -267,7 +267,7 @@
* @param clipRect the clipping rectangle
*/
-void Graphics::drawSurface(_spriteInfo *s, uint8 *surface, Common::Rect *clipRect) {
+void Graphics::drawSurface(SpriteInfo *s, uint8 *surface, Common::Rect *clipRect) {
Common::Rect rd, rs;
uint16 x, y;
uint8 *src, *dst;
@@ -352,7 +352,7 @@
// FIXME: I'm sure this could be optimized. There's plenty of data copying and
// mallocing here.
-int32 Graphics::drawSprite(_spriteInfo *s) {
+int32 Graphics::drawSprite(SpriteInfo *s) {
uint8 *src, *dst;
uint8 *sprite, *newSprite;
uint8 *backbuf = NULL;
@@ -623,7 +623,7 @@
* Opens the light masking sprite for a room.
*/
-int32 Graphics::openLightMask(_spriteInfo *s) {
+int32 Graphics::openLightMask(SpriteInfo *s) {
// FIXME: The light mask is only needed on higher graphics detail
// settings, so to save memory we could simply ignore it on lower
// settings. But then we need to figure out how to ensure that it
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sword1 control.cpp,1.7,1.8
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sword2 anims.cpp,1.47,1.48 build_display.cpp,1.50,1.51 console.h,1.15,1.16 controls.cpp,1.56,1.57 debug.cpp,1.32,1.33 defs.h,1.9,1.10 events.cpp,1.22,1.23 function.cpp,1.42,1.43 header.h,1.7,1.8 icons.cpp,1.28,1.29 icons.h,1.9,1.10 interpreter.cpp,1.34,1.35 layers.cpp,1.22,1.23 layers.h,1.7,1.8 logic.cpp,1.36,1.37 logic.h,1.24,1.25 maketext.cpp,1.33,1.34 maketext.h,1.9,1.10 mem_view.cpp,1.23,1.24 memory.cpp,1.19,1.20 memory.h,1.12,1.13 mouse.cpp,1.47,1.48 mouse.h,1.11,1.12 object.h,1.5,1.6 protocol.cpp,1.22,1.23 resman.cpp,1.78,1.79 resman.h,1.17,1.18 router.cpp,1.35,1.36 router.h,1.14,1.15 save_rest.cpp,1.42,1.43 sound.cpp,1.35,1.36 speech.cpp,1.54,1.55 startup.cpp,1.36,1.37 sword2.cpp,1.93,1.94 sword2.h,1.46,1.47 walker.cpp,1.30,1.31
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list