[Scummvm-cvs-logs] SF.net SVN: scummvm:[38993] scummvm/trunk/engines/cruise
dreammaster at users.sourceforge.net
dreammaster at users.sourceforge.net
Sun Mar 1 03:16:44 CET 2009
Revision: 38993
http://scummvm.svn.sourceforge.net/scummvm/?rev=38993&view=rev
Author: dreammaster
Date: 2009-03-01 02:16:44 +0000 (Sun, 01 Mar 2009)
Log Message:
-----------
Moved mouse cursor definition data into staticres.cpp
Modified Paths:
--------------
scummvm/trunk/engines/cruise/mouse.cpp
scummvm/trunk/engines/cruise/mouse.h
scummvm/trunk/engines/cruise/staticres.cpp
scummvm/trunk/engines/cruise/staticres.h
Modified: scummvm/trunk/engines/cruise/mouse.cpp
===================================================================
--- scummvm/trunk/engines/cruise/mouse.cpp 2009-03-01 01:52:50 UTC (rev 38992)
+++ scummvm/trunk/engines/cruise/mouse.cpp 2009-03-01 02:16:44 UTC (rev 38993)
@@ -24,96 +24,15 @@
*/
#include "cruise/cruise_main.h"
+#include "cruise/staticres.h"
+
+#include "common/system.h"
#include "graphics/cursorman.h"
namespace Cruise {
int16 main10;
-static const byte mouseCursorNormal[] = {
- 0x00, 0x00, 0x40, 0x00, 0x60, 0x00, 0x70, 0x00,
- 0x78, 0x00, 0x7C, 0x00, 0x7E, 0x00, 0x7F, 0x00,
- 0x7F, 0x80, 0x7C, 0x00, 0x6C, 0x00, 0x46, 0x00,
- 0x06, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00,
-
- 0xC0, 0x00, 0xE0, 0x00, 0xF0, 0x00, 0xF8, 0x00,
- 0xFC, 0x00, 0xFE, 0x00, 0xFF, 0x00, 0xFF, 0x80,
- 0xFF, 0xC0, 0xFF, 0xC0, 0xFE, 0x00, 0xFF, 0x00,
- 0xCF, 0x00, 0x07, 0x80, 0x07, 0x80, 0x03, 0x80
-};
-
-static const byte mouseCursorDisk[] = {
- 0x7F, 0xFC, 0x9F, 0x12, 0x9F, 0x12, 0x9F, 0x12,
- 0x9F, 0x12, 0x9F, 0xE2, 0x80, 0x02, 0x9F, 0xF2,
- 0xA0, 0x0A, 0xA0, 0x0A, 0xA0, 0x0A, 0xA0, 0x0A,
- 0xA0, 0x0A, 0xA0, 0x0A, 0x7F, 0xFC, 0x00, 0x00,
-
- 0x7F, 0xFC, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0xFE,
- 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0xFE,
- 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0xFE,
- 0xFF, 0xFE, 0xFF, 0xFE, 0x7F, 0xFC, 0x00, 0x00
-};
-
-static const byte mouseCursorCross[] = {
- 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x7C, 0x7C,
- 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
- 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-
- 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80,
- 0x03, 0x80, 0x03, 0x80, 0xFF, 0xFE, 0xFE, 0xFE,
- 0xFF, 0xFE, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80,
- 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00
-};
-
-static const byte mouseCursorNoMouse[] = {
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-
-static const byte mouseCursorWalk[] = {
- 0x03, 0xC0, 0x03, 0xC0, 0x03, 0xC0, 0x01, 0xE0,
- 0x03, 0xF0, 0x03, 0x38, 0x1B, 0xDC, 0x1B, 0xCC,
- 0x03, 0xCC, 0x03, 0x80, 0x07, 0x00, 0x0E, 0xC0,
- 0x1C, 0xE0, 0x18, 0x70, 0x18, 0x38, 0x18, 0x18,
-
- 0x07, 0xE0, 0x07, 0xE0, 0x07, 0xE0, 0x03, 0xF0,
- 0x07, 0xF8, 0x07, 0xFC, 0x3F, 0xFE, 0x3F, 0xFE,
- 0x07, 0xFE, 0x07, 0xC0, 0x0F, 0x80, 0x1F, 0xE0,
- 0x3F, 0xF0, 0x3C, 0xF8, 0x3C, 0x7C, 0x3C, 0x3C
-};
-
-static const byte mouseCursorExit[] = {
- 0x7f, 0xf8, 0x60, 0x18, 0x60, 0x18, 0x60, 0x18,
- 0x60, 0x00, 0x60, 0x08, 0x60, 0x0c, 0x60, 0xfe,
- 0x60, 0xfe, 0x60, 0x0c, 0x60, 0x08, 0x60, 0x00,
- 0x60, 0x18, 0x60, 0x18, 0x60, 0x18, 0x7f, 0xf8,
-
- 0xff, 0xfc, 0xf0, 0x3c, 0xf0, 0x3c, 0xf0, 0x3c,
- 0xf0, 0x00, 0xf0, 0x1c, 0xf0, 0x1e, 0xf1, 0xff,
- 0xf1, 0xff, 0xf0, 0x1e, 0xf0, 0x1c, 0xf0, 0x00,
- 0xf0, 0x3c, 0xf0, 0x3c, 0xf0, 0x3c, 0xff, 0xfc
-};
-
-static const byte mouseCursorMagnifyingGlass[] = {
- 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0x02, 0x02,
- 0x02, 0x02, 0x02, 0x02, 0x00, 0x22, 0x00, 0x02,
- 0x07, 0x82, 0x03, 0x82, 0x07, 0x9e, 0xfe, 0x80,
- 0xfc, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00,
-
- 0x00, 0x00, 0x07, 0xff, 0x07, 0xff, 0x06, 0x03,
- 0x06, 0x03, 0x06, 0x03, 0x00, 0x23, 0x0f, 0xc3,
- 0x0f, 0xc3, 0x07, 0xc3, 0xff, 0xdf, 0xff, 0xdf,
- 0xfe, 0xc0, 0xfc, 0x00, 0xf8, 0x00, 0x00, 0x00
-};
-
struct MouseCursor {
int hotspotX;
int hotspotY;
@@ -163,4 +82,18 @@
}
}
+bool isMouseOn() {
+ return (currentCursor != CURSOR_NOMOUSE) && CursorMan.isVisible();
+}
+
+void mouseOff() {
+ CursorMan.showMouse(false);
+ g_system->updateScreen();
+}
+
+void mouseOn() {
+ CursorMan.showMouse(true);
+ g_system->updateScreen();
+}
+
} // End of namespace Cruise
Modified: scummvm/trunk/engines/cruise/mouse.h
===================================================================
--- scummvm/trunk/engines/cruise/mouse.h 2009-03-01 01:52:50 UTC (rev 38992)
+++ scummvm/trunk/engines/cruise/mouse.h 2009-03-01 02:16:44 UTC (rev 38993)
@@ -43,6 +43,10 @@
};
void changeCursor(CursorType eType);
+bool isMouseOn();
+void mouseOff();
+void mouseOn();
+
extern CursorType currentCursor;
} // End of namespace Cruise
Modified: scummvm/trunk/engines/cruise/staticres.cpp
===================================================================
--- scummvm/trunk/engines/cruise/staticres.cpp 2009-03-01 01:52:50 UTC (rev 38992)
+++ scummvm/trunk/engines/cruise/staticres.cpp 2009-03-01 02:16:44 UTC (rev 38993)
@@ -120,4 +120,92 @@
-1,
};
+//
+// Mouse data
+//
+
+const byte mouseCursorNormal[] = {
+ 0x00, 0x00, 0x40, 0x00, 0x60, 0x00, 0x70, 0x00,
+ 0x78, 0x00, 0x7C, 0x00, 0x7E, 0x00, 0x7F, 0x00,
+ 0x7F, 0x80, 0x7C, 0x00, 0x6C, 0x00, 0x46, 0x00,
+ 0x06, 0x00, 0x03, 0x00, 0x03, 0x00, 0x00, 0x00,
+
+ 0xC0, 0x00, 0xE0, 0x00, 0xF0, 0x00, 0xF8, 0x00,
+ 0xFC, 0x00, 0xFE, 0x00, 0xFF, 0x00, 0xFF, 0x80,
+ 0xFF, 0xC0, 0xFF, 0xC0, 0xFE, 0x00, 0xFF, 0x00,
+ 0xCF, 0x00, 0x07, 0x80, 0x07, 0x80, 0x03, 0x80
+};
+
+const byte mouseCursorDisk[] = {
+ 0x7F, 0xFC, 0x9F, 0x12, 0x9F, 0x12, 0x9F, 0x12,
+ 0x9F, 0x12, 0x9F, 0xE2, 0x80, 0x02, 0x9F, 0xF2,
+ 0xA0, 0x0A, 0xA0, 0x0A, 0xA0, 0x0A, 0xA0, 0x0A,
+ 0xA0, 0x0A, 0xA0, 0x0A, 0x7F, 0xFC, 0x00, 0x00,
+
+ 0x7F, 0xFC, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0xFE,
+ 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0xFE,
+ 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0xFE, 0xFF, 0xFE,
+ 0xFF, 0xFE, 0xFF, 0xFE, 0x7F, 0xFC, 0x00, 0x00
+};
+
+const byte mouseCursorCross[] = {
+ 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x7C, 0x7C,
+ 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
+ 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
+
+ 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80,
+ 0x03, 0x80, 0x03, 0x80, 0xFF, 0xFE, 0xFE, 0xFE,
+ 0xFF, 0xFE, 0x03, 0x80, 0x03, 0x80, 0x03, 0x80,
+ 0x03, 0x80, 0x03, 0x80, 0x03, 0x80, 0x00, 0x00
+};
+
+const byte mouseCursorNoMouse[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+const byte mouseCursorWalk[] = {
+ 0x03, 0xC0, 0x03, 0xC0, 0x03, 0xC0, 0x01, 0xE0,
+ 0x03, 0xF0, 0x03, 0x38, 0x1B, 0xDC, 0x1B, 0xCC,
+ 0x03, 0xCC, 0x03, 0x80, 0x07, 0x00, 0x0E, 0xC0,
+ 0x1C, 0xE0, 0x18, 0x70, 0x18, 0x38, 0x18, 0x18,
+
+ 0x07, 0xE0, 0x07, 0xE0, 0x07, 0xE0, 0x03, 0xF0,
+ 0x07, 0xF8, 0x07, 0xFC, 0x3F, 0xFE, 0x3F, 0xFE,
+ 0x07, 0xFE, 0x07, 0xC0, 0x0F, 0x80, 0x1F, 0xE0,
+ 0x3F, 0xF0, 0x3C, 0xF8, 0x3C, 0x7C, 0x3C, 0x3C
+};
+
+const byte mouseCursorExit[] = {
+ 0x7f, 0xf8, 0x60, 0x18, 0x60, 0x18, 0x60, 0x18,
+ 0x60, 0x00, 0x60, 0x08, 0x60, 0x0c, 0x60, 0xfe,
+ 0x60, 0xfe, 0x60, 0x0c, 0x60, 0x08, 0x60, 0x00,
+ 0x60, 0x18, 0x60, 0x18, 0x60, 0x18, 0x7f, 0xf8,
+
+ 0xff, 0xfc, 0xf0, 0x3c, 0xf0, 0x3c, 0xf0, 0x3c,
+ 0xf0, 0x00, 0xf0, 0x1c, 0xf0, 0x1e, 0xf1, 0xff,
+ 0xf1, 0xff, 0xf0, 0x1e, 0xf0, 0x1c, 0xf0, 0x00,
+ 0xf0, 0x3c, 0xf0, 0x3c, 0xf0, 0x3c, 0xff, 0xfc
+};
+
+const byte mouseCursorMagnifyingGlass[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x03, 0xfe, 0x02, 0x02,
+ 0x02, 0x02, 0x02, 0x02, 0x00, 0x22, 0x00, 0x02,
+ 0x07, 0x82, 0x03, 0x82, 0x07, 0x9e, 0xfe, 0x80,
+ 0xfc, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00,
+
+ 0x00, 0x00, 0x07, 0xff, 0x07, 0xff, 0x06, 0x03,
+ 0x06, 0x03, 0x06, 0x03, 0x00, 0x23, 0x0f, 0xc3,
+ 0x0f, 0xc3, 0x07, 0xc3, 0xff, 0xdf, 0xff, 0xdf,
+ 0xfe, 0xc0, 0xfc, 0x00, 0xf8, 0x00, 0x00, 0x00
+};
+
} // End of namespace Cruise
Modified: scummvm/trunk/engines/cruise/staticres.h
===================================================================
--- scummvm/trunk/engines/cruise/staticres.h 2009-03-01 01:52:50 UTC (rev 38992)
+++ scummvm/trunk/engines/cruise/staticres.h 2009-03-01 02:16:44 UTC (rev 38993)
@@ -26,6 +26,8 @@
#ifndef CRUISE_STATICRES_H
#define CRUISE_STATICRES_H
+#include "common/scummsys.h"
+
namespace Cruise {
extern int actor_move[][13];
@@ -38,6 +40,15 @@
extern short int fontCharacterTable[256];
+// Mouse cursor data
+extern const byte mouseCursorNormal[];
+extern const byte mouseCursorDisk[];
+extern const byte mouseCursorCross[];
+extern const byte mouseCursorNoMouse[];
+extern const byte mouseCursorWalk[];
+extern const byte mouseCursorExit[];
+extern const byte mouseCursorMagnifyingGlass[];
+
} // End of namespace Cruise
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list