[Scummvm-cvs-logs] SF.net SVN: scummvm:[35122] scummvm/trunk/engines/groovie
spookypeanut at users.sourceforge.net
spookypeanut at users.sourceforge.net
Wed Nov 19 01:37:21 CET 2008
Revision: 35122
http://scummvm.svn.sourceforge.net/scummvm/?rev=35122&view=rev
Author: spookypeanut
Date: 2008-11-19 00:37:20 +0000 (Wed, 19 Nov 2008)
Log Message:
-----------
T7G: Add framework for microscope puzzle AI
Modified Paths:
--------------
scummvm/trunk/engines/groovie/module.mk
scummvm/trunk/engines/groovie/script.cpp
scummvm/trunk/engines/groovie/script.h
Added Paths:
-----------
scummvm/trunk/engines/groovie/cell.cpp
scummvm/trunk/engines/groovie/cell.h
Added: scummvm/trunk/engines/groovie/cell.cpp
===================================================================
--- scummvm/trunk/engines/groovie/cell.cpp (rev 0)
+++ scummvm/trunk/engines/groovie/cell.cpp 2008-11-19 00:37:20 UTC (rev 35122)
@@ -0,0 +1,55 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/engines/groovie/script.cpp $
+ * $Id: script.cpp 35096 2008-11-16 20:20:31Z lordhoto $
+ *
+ */
+
+#include "groovie/cell.h"
+
+namespace Groovie {
+
+CellGame::CellGame(byte *board) :
+ _board(board) {
+
+ //printf ("*** In cellgame constructor ***");
+}
+
+byte CellGame::getStartX() {
+ return 0; // TODO: implement something here
+}
+
+byte CellGame::getStartY() {
+ return 6; // TODO: implement something here
+}
+
+byte CellGame::getEndX() {
+ return 1; // TODO: implement something here
+}
+
+byte CellGame::getEndY() {
+ return 6; // TODO: implement something here
+}
+
+CellGame::~CellGame() {
+}
+
+} // End of Groovie namespace
Property changes on: scummvm/trunk/engines/groovie/cell.cpp
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
Added: scummvm/trunk/engines/groovie/cell.h
===================================================================
--- scummvm/trunk/engines/groovie/cell.h (rev 0)
+++ scummvm/trunk/engines/groovie/cell.h 2008-11-19 00:37:20 UTC (rev 35122)
@@ -0,0 +1,51 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/trunk/engines/groovie/script.h $
+ * $Id: script.h 35095 2008-11-16 19:20:30Z spookypeanut $
+ *
+ */
+
+#ifndef GROOVIE_CELL_H
+#define GROOVIE_CELL_H
+
+#include "common/file.h"
+
+namespace Groovie {
+
+class GroovieEngine;
+class Script;
+
+class CellGame {
+public:
+ CellGame(byte *board);
+ ~CellGame();
+ byte getStartX();
+ byte getStartY();
+ byte getEndX();
+ byte getEndY();
+
+private:
+ byte *_board;
+};
+
+} // End of Groovie namespace
+
+#endif // GROOVIE_CELL_H
Property changes on: scummvm/trunk/engines/groovie/cell.h
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ native
Modified: scummvm/trunk/engines/groovie/module.mk
===================================================================
--- scummvm/trunk/engines/groovie/module.mk 2008-11-18 23:16:38 UTC (rev 35121)
+++ scummvm/trunk/engines/groovie/module.mk 2008-11-19 00:37:20 UTC (rev 35122)
@@ -1,6 +1,7 @@
MODULE := engines/groovie
MODULE_OBJS := \
+ cell.o \
cursor.o \
debug.o \
detection.o \
Modified: scummvm/trunk/engines/groovie/script.cpp
===================================================================
--- scummvm/trunk/engines/groovie/script.cpp 2008-11-18 23:16:38 UTC (rev 35121)
+++ scummvm/trunk/engines/groovie/script.cpp 2008-11-19 00:37:20 UTC (rev 35122)
@@ -27,6 +27,7 @@
#include "groovie/music.h"
#include "groovie/script.h"
#include "groovie/groovie.h"
+#include "groovie/cell.h"
#include "common/config-manager.h"
#include "common/endian.h"
@@ -1311,12 +1312,13 @@
setVariable(varnum1, _variables[varnum1] - _variables[varnum2]);
}
-void Script::o_othello() {
+void Script::o_cellmove() {
uint16 arg = readScript8bits();
byte *scriptBoard = &_variables[0x19];
byte board[7][7];
+ byte startX, startY, endX, endY;
- debugScript(1, true, "OTHELLO var[0x%02X]", arg);
+ debugScript(1, true, "CELL MOVE var[0x%02X]", arg);
// Arguments used by the original implementation: (2, arg, scriptBoard)
for (int y = 0; y < 7; y++) {
@@ -1330,12 +1332,20 @@
debugScript(1, false, "\n");
}
+ CellGame staufsMove((byte*) board);
+ startX = staufsMove.getStartX();
+ startY = staufsMove.getStartY();
+ endX = staufsMove.getEndX();
+ endY = staufsMove.getEndY();
+
+ //printf("Moving from %d,%d to %d,%d\n", startX, startY, endX, endY);
+
// Set the movement origin
- setVariable(0, 6); // y
- setVariable(1, 0); // x
+ setVariable(0, startY); // y
+ setVariable(1, startX); // x
// Set the movement destination
- setVariable(2, 6);
- setVariable(3, 1);
+ setVariable(2, endY);
+ setVariable(3, endX);
}
void Script::o_returnscript() {
@@ -1525,7 +1535,7 @@
&Script::o_loadscript,
&Script::o_setvideoorigin, // 0x40
&Script::o_sub,
- &Script::o_othello,
+ &Script::o_cellmove,
&Script::o_returnscript,
&Script::o_sethotspotright, // 0x44
&Script::o_sethotspotleft,
Modified: scummvm/trunk/engines/groovie/script.h
===================================================================
--- scummvm/trunk/engines/groovie/script.h 2008-11-18 23:16:38 UTC (rev 35121)
+++ scummvm/trunk/engines/groovie/script.h 2008-11-19 00:37:20 UTC (rev 35122)
@@ -30,6 +30,7 @@
#include "common/rect.h"
#include "groovie/font.h"
+#include "groovie/cell.h"
namespace Groovie {
@@ -193,7 +194,7 @@
void o_loadscript();
void o_setvideoorigin();
void o_sub();
- void o_othello();
+ void o_cellmove();
void o_returnscript();
void o_sethotspotright();
void o_sethotspotleft();
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