[Scummvm-cvs-logs] CVS: scummvm/sky mouse.cpp,1.1,1.2 mouse.h,1.2,1.3
Pawel Kolodziejski
aquadran at users.sourceforge.net
Sat May 31 04:54:02 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/simon charset.cpp,1.8,1.9
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm object.cpp,1.112,1.113 resource.cpp,1.94,1.95 script.cpp,1.105,1.106 scumm.h,1.230,1.231 scummvm.cpp,2.193,2.194
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv14064
Modified Files:
mouse.cpp mouse.h
Log Message:
cleanup endlines
Index: mouse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/mouse.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- mouse.cpp 5 May 2003 13:19:59 -0000 1.1
+++ mouse.cpp 31 May 2003 11:53:28 -0000 1.2
@@ -1,172 +1,168 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2003 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#include "stdafx.h"
-#include "sky/sky.h"
-
-#define MICE_FILE 60300
-#define NO_MAIN_OBJECTS 24
-#define NO_LINC_OBJECTS 21
-
-uint32 _mouseObjectList[] = {
-
- 65,
- 9,
- 66,
- 64,
- 8,
- 63,
- 10,
- 11,
- 71,
- 76,
- 37,
- 36,
- 42,
- 75,
- 79,
- 6,
- 74,
- 39,
- 49,
- 43,
- 34,
- 35,
- 77,
- 38,
-
- //Link cursors
-
- 24625,
- 24649,
- 24827,
- 24651,
- 24583,
- 24581,
- 24582,
- 24628,
- 24650,
- 24629,
- 24732,
- 24631,
- 24584,
- 24630,
- 24626,
- 24627,
- 24632,
- 24643,
- 24828,
- 24830,
- 24829
-};
-
-SkyMouse::SkyMouse(SkyDisk *skyDisk) {
-
- _skyDisk = skyDisk;
- _mouseWidth = 6;
- _mouseHeight = 6;
- _maskWidth = 6;
- _maskHeight = 6;
-
- _miceData = _skyDisk->loadFile(MICE_FILE, NULL);
- _mouseData2 = _miceData;
-
- uint16 width = FROM_LE_16(((struct dataFileHeader *)_miceData)->s_width);
- uint16 height = FROM_LE_16(((struct dataFileHeader *)_miceData)->s_height);
-
- _savedData = (byte *)malloc((width * height) + sizeof(struct dataFileHeader));
-
- //load in the object mouse file
- _objectMouseData = _skyDisk->loadFile(MICE_FILE + 1, NULL);
- _mouseWidth = 1;
- _mouseHeight = 1;
-
- //_systemFlags |= SF_MOUSE;;
-
-}
-
-SkyMouse::~SkyMouse( ){
- free (_miceData);
- free (_savedData);
- free (_objectMouseData);
-}
-
-void SkyMouse::replaceMouseCursors(uint16 fileNo) {
-
- _skyDisk->loadFile(fileNo, _objectMouseData);
-
-}
-
-uint32 SkyMouse::fnBlankMouse(void) {
-
- _mouseXOff = 0; //re-align mouse
- spriteMouse(MOUSE_BLANK, 0, 0);
-
- return 1;
-
-}
-
-void SkyMouse::lockMouse(void) {
-
- _lockMouseX = _aMouseX;
- _lockMouseY = _aMouseY;
-
-}
-
-void SkyMouse::unlockMouse(void) {
-
- _aMouseX = _lockMouseX;
- _aMouseY = _lockMouseY;
-
-}
-
-void SkyMouse::restoreMouseData(uint16 frameNum) {
- warning("Stub: SkyMouse::restoreMouseData");
-}
-
-void SkyMouse::drawNewMouse() {
- warning("Stub: SkyMouse::drawNewMouse");
- //calculateMouseValues();
- //saveMouseData();
- //drawMouse();
-}
-
-void SkyMouse::spriteMouse(uint16 frameNum, uint16 mouseX, uint16 mouseY) {
-
- //_mouseFlag |= MF_IN_INT;
- _mouseType2 = frameNum;
- _mouseOffsetX = mouseX;
- _mouseOffsetY = mouseY;
-
- restoreMouseData(frameNum);
-
- byte *mouseData = _miceData;
- uint32 pos = ((struct dataFileHeader *)mouseData)->s_sp_size * ((struct dataFileHeader *)mouseData)->s_sp_size;
- pos += sizeof(struct dataFileHeader);
- _mouseData2 = mouseData + pos;
-
- _mouseWidth = ((struct dataFileHeader *)mouseData)->s_width;
- _mouseHeight = ((struct dataFileHeader *)mouseData)->s_height;
-
- drawNewMouse();
-
- //_mouseFlag ^= (~_mouseFlag | MF_IN_INT);
-}
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2003 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#include "stdafx.h"
+#include "sky/sky.h"
+
+#define MICE_FILE 60300
+#define NO_MAIN_OBJECTS 24
+#define NO_LINC_OBJECTS 21
+
+uint32 _mouseObjectList[] = {
+ 65,
+ 9,
+ 66,
+ 64,
+ 8,
+ 63,
+ 10,
+ 11,
+ 71,
+ 76,
+ 37,
+ 36,
+ 42,
+ 75,
+ 79,
+ 6,
+ 74,
+ 39,
+ 49,
+ 43,
+ 34,
+ 35,
+ 77,
+ 38,
+
+ //Link cursors
+
+ 24625,
+ 24649,
+ 24827,
+ 24651,
+ 24583,
+ 24581,
+ 24582,
+ 24628,
+ 24650,
+ 24629,
+ 24732,
+ 24631,
+ 24584,
+ 24630,
+ 24626,
+ 24627,
+ 24632,
+ 24643,
+ 24828,
+ 24830,
+ 24829
+};
+
+SkyMouse::SkyMouse(SkyDisk *skyDisk) {
+
+ _skyDisk = skyDisk;
+ _mouseWidth = 6;
+ _mouseHeight = 6;
+ _maskWidth = 6;
+ _maskHeight = 6;
+
+
+ _miceData = _skyDisk->loadFile(MICE_FILE, NULL);
+ _mouseData2 = _miceData;
+
+ uint16 width = FROM_LE_16(((struct dataFileHeader *)_miceData)->s_width);
+ uint16 height = FROM_LE_16(((struct dataFileHeader *)_miceData)->s_height);
+
+ _savedData = (byte *)malloc((width * height) + sizeof(struct dataFileHeader));
+
+ //load in the object mouse file
+ _objectMouseData = _skyDisk->loadFile(MICE_FILE + 1, NULL);
+ _mouseWidth = 1;
+ _mouseHeight = 1;
+ //_systemFlags |= SF_MOUSE;;
+}
+
+SkyMouse::~SkyMouse( ){
+
+ free (_miceData);
+ free (_savedData);
+ free (_objectMouseData);
+}
+
+void SkyMouse::replaceMouseCursors(uint16 fileNo) {
+
+ _skyDisk->loadFile(fileNo, _objectMouseData);
+}
+
+uint32 SkyMouse::fnBlankMouse(void) {
+
+ _mouseXOff = 0; //re-align mouse
+ spriteMouse(MOUSE_BLANK, 0, 0);
+
+ return 1;
+}
+
+void SkyMouse::lockMouse(void) {
+
+ _lockMouseX = _aMouseX;
+ _lockMouseY = _aMouseY;
+}
+
+void SkyMouse::unlockMouse(void) {
+
+ _aMouseX = _lockMouseX;
+ _aMouseY = _lockMouseY;
+}
+
+void SkyMouse::restoreMouseData(uint16 frameNum) {
+
+ warning("Stub: SkyMouse::restoreMouseData");
+}
+
+void SkyMouse::drawNewMouse() {
+
+ warning("Stub: SkyMouse::drawNewMouse");
+ //calculateMouseValues();
+ //saveMouseData();
+ //drawMouse();
+}
+
+void SkyMouse::spriteMouse(uint16 frameNum, uint16 mouseX, uint16 mouseY) {
+
+ //_mouseFlag |= MF_IN_INT;
+ _mouseType2 = frameNum;
+ _mouseOffsetX = mouseX;
+ _mouseOffsetY = mouseY;
+
+ restoreMouseData(frameNum);
+ byte *mouseData = _miceData;
+ uint32 pos = ((struct dataFileHeader *)mouseData)->s_sp_size * ((struct dataFileHeader *)mouseData)->s_sp_size;
+ pos += sizeof(struct dataFileHeader);
+ _mouseData2 = mouseData + pos;
+
+ _mouseWidth = ((struct dataFileHeader *)mouseData)->s_width;
+ _mouseHeight = ((struct dataFileHeader *)mouseData)->s_height;
+
+ drawNewMouse();
+
+ //_mouseFlag ^= (~_mouseFlag | MF_IN_INT);
+}
Index: mouse.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/mouse.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- mouse.h 14 May 2003 21:25:03 -0000 1.2
+++ mouse.h 31 May 2003 11:53:28 -0000 1.3
@@ -1,84 +1,84 @@
-/* ScummVM - Scumm Interpreter
- * Copyright (C) 2003 The ScummVM project
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * $Header$
- *
- */
-
-#ifndef SKYMOUSE_H
-#define SKYMOUSE_H
-
-#include "stdafx.h"
-#include "sky/disk.h"
-#include "sky/struc.h"
-
-class SkyMouse {
-
-public:
- SkyMouse(SkyDisk *skyDisk);
- ~SkyMouse(void);
-
- void replaceMouseCursors(uint16 fileNo);
- uint32 fnBlankMouse(void);
- void lockMouse(void);
- void unlockMouse(void);
- void restoreMouseData(uint16 frameNum);
- void drawNewMouse(void);
- void spriteMouse(uint16 frameNum, uint16 mouseX, uint16 mouseY);
-
-
-protected:
- uint16 _aMouseX; //actual mouse coordinates
- uint16 _aMouseY;
-
- uint16 _lockMouseX;
- uint16 _lockMouseY;
-
- uint16 _mouseOffsetX; //for offsetting the mouse
- uint16 _mouseOffsetY; //positive offsets only, mouse moves left or up
-
- uint16 _mouseType2; //number of current mouse
- byte *_mouseData2; //pointer to mouse data
-
- uint16 _mouseWidth; //mouse width and height
- uint16 _mouseHeight;
-
- byte *_mousePosition; //current screen address of mouse
- uint16 _maskWidth; //width on screen
- uint16 _maskHeight; //height on screen
-
- byte *_savedData; //place for saved data
-
- uint32 _mouseFlag; //bit 0 set when in handler
- //bit 1 set when screen data has been saved
- //bit 2 set when we don't want to show mouse
-
- byte *_miceData; //address of mouse sprites
- byte *_objectMouseData; //address of object mouse sprites
-
- uint16 _tMouseX;
- uint16 _tMouseY;
-
- uint16 _mouseXOff;
-
- static uint32 _mouseObjectList[];
-
- SkyDisk *_skyDisk;
-
-};
-
-#endif //SKYMOUSE_H
+/* ScummVM - Scumm Interpreter
+ * Copyright (C) 2003 The ScummVM project
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * $Header$
+ *
+ */
+
+#ifndef SKYMOUSE_H
+#define SKYMOUSE_H
+
+#include "stdafx.h"
+#include "sky/disk.h"
+#include "sky/struc.h"
+
+class SkyMouse {
+
+public:
+
+ SkyMouse(SkyDisk *skyDisk);
+ ~SkyMouse(void);
+
+ void replaceMouseCursors(uint16 fileNo);
+ uint32 fnBlankMouse(void);
+ void lockMouse(void);
+ void unlockMouse(void);
+ void restoreMouseData(uint16 frameNum);
+ void drawNewMouse(void);
+ void spriteMouse(uint16 frameNum, uint16 mouseX, uint16 mouseY);
+
+protected:
+
+ uint16 _aMouseX; //actual mouse coordinates
+ uint16 _aMouseY;
+
+ uint16 _lockMouseX;
+ uint16 _lockMouseY;
+
+ uint16 _mouseOffsetX; //for offsetting the mouse
+ uint16 _mouseOffsetY; //positive offsets only, mouse moves left or up
+
+ uint16 _mouseType2; //number of current mouse
+ byte *_mouseData2; //pointer to mouse data
+
+ uint16 _mouseWidth; //mouse width and height
+ uint16 _mouseHeight;
+
+ byte *_mousePosition; //current screen address of mouse
+ uint16 _maskWidth; //width on screen
+ uint16 _maskHeight; //height on screen
+
+ byte *_savedData; //place for saved data
+
+ uint32 _mouseFlag; //bit 0 set when in handler
+ //bit 1 set when screen data has been saved
+ //bit 2 set when we don't want to show mouse
+
+ byte *_miceData; //address of mouse sprites
+ byte *_objectMouseData; //address of object mouse sprites
+
+ uint16 _tMouseX;
+ uint16 _tMouseY;
+
+ uint16 _mouseXOff;
+
+ static uint32 _mouseObjectList[];
+
+ SkyDisk *_skyDisk;
+};
+
+#endif //SKYMOUSE_H
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/simon charset.cpp,1.8,1.9
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm object.cpp,1.112,1.113 resource.cpp,1.94,1.95 script.cpp,1.105,1.106 scumm.h,1.230,1.231 scummvm.cpp,2.193,2.194
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list