aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--games/Makefile1
-rw-r--r--games/magiccube4d/Makefile32
-rw-r--r--games/magiccube4d/distinfo3
-rw-r--r--games/magiccube4d/files/patch-aa19
-rw-r--r--games/magiccube4d/files/patch-ab224
-rw-r--r--games/magiccube4d/pkg-comment1
-rw-r--r--games/magiccube4d/pkg-descr9
-rw-r--r--games/magiccube4d/pkg-plist7
8 files changed, 296 insertions, 0 deletions
diff --git a/games/Makefile b/games/Makefile
index fa79e03cc3fe..e6bebb5e4a83 100644
--- a/games/Makefile
+++ b/games/Makefile
@@ -114,6 +114,7 @@
SUBDIR += ltris
SUBDIR += madbomber
SUBDIR += maelstrom
+ SUBDIR += magiccube4d
SUBDIR += mangband
SUBDIR += merlin
SUBDIR += mindfocus
diff --git a/games/magiccube4d/Makefile b/games/magiccube4d/Makefile
new file mode 100644
index 000000000000..651759d30367
--- /dev/null
+++ b/games/magiccube4d/Makefile
@@ -0,0 +1,32 @@
+# New ports collection makefile for: Magic Cube 4D
+# Date Created: September 25, 2000
+# Whom: Jeremy <karlj000@unbc.ca>
+#
+# $FreeBSD$
+#
+
+PORTNAME= magiccube4d
+PORTVERSION= 2.1
+CATEGORIES= games
+MASTER_SITES= http://www.superliminal.com/cube/
+DISTNAME= magiccube4d-src-2_1
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= karlj000@unbc.ca
+
+USE_XLIB= yes
+USE_X_PREFIX= yes
+
+GNU_CONFIGURE= yes
+USE_GMAKE= yes
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/magiccube4d ${PREFIX}/bin
+ ${MKDIR} ${PREFIX}/share/doc/magiccube4d
+ ${INSTALL_DATA} ${WRKSRC}/ChangeLog ${PREFIX}/share/doc/magiccube4d
+ ${INSTALL_DATA} ${WRKSRC}/Intro.txt ${PREFIX}/share/doc/magiccube4d
+ ${INSTALL_DATA} ${WRKSRC}/MagicCube4D-unix.txt ${PREFIX}/share/doc/magiccube4d
+ ${INSTALL_DATA} ${WRKSRC}/ideas.txt ${PREFIX}/share/doc/magiccube4d
+ ${INSTALL_DATA} ${WRKSRC}/readme-unix.txt ${PREFIX}/share/doc/magiccube4d
+
+.include <bsd.port.mk>
diff --git a/games/magiccube4d/distinfo b/games/magiccube4d/distinfo
new file mode 100644
index 000000000000..b95c29fad830
--- /dev/null
+++ b/games/magiccube4d/distinfo
@@ -0,0 +1,3 @@
+MD5 (magiccube4d-src-2_1.tgz) = b718f635df7644e20126f2ba3c11701a
+MD5 (EventHandler.diff) = 21919eb1b3f86f28acde28dec896d795
+MD5 (MagicCube.diff) = 9fc512703f903ad3d5512f74524b7de9
diff --git a/games/magiccube4d/files/patch-aa b/games/magiccube4d/files/patch-aa
new file mode 100644
index 000000000000..679833718394
--- /dev/null
+++ b/games/magiccube4d/files/patch-aa
@@ -0,0 +1,19 @@
+*** MagicCube.h.BACKUP Mon Sep 25 19:46:07 2000
+--- MagicCube.h Mon Sep 25 19:46:39 2000
+***************
+*** 22,28 ****
+ #include <assert.h>
+ #include <math.h>
+ #include <string.h>
+! #include <malloc.h>
+ #include "Vec.h"
+
+ // Version number of this program. Must also be updated in
+--- 22,28 ----
+ #include <assert.h>
+ #include <math.h>
+ #include <string.h>
+! #include <stdlib.h>
+ #include "Vec.h"
+
+ // Version number of this program. Must also be updated in
diff --git a/games/magiccube4d/files/patch-ab b/games/magiccube4d/files/patch-ab
new file mode 100644
index 000000000000..1696624a35f0
--- /dev/null
+++ b/games/magiccube4d/files/patch-ab
@@ -0,0 +1,224 @@
+*** EventHandler.cpp.BACKUP Mon Sep 25 19:46:01 2000
+--- EventHandler.cpp Mon Sep 25 19:52:32 2000
+***************
+*** 77,127 ****
+ ("(Shift or control)-middle and dragging changes the viewing perspective.\n");
+ printf("Type 'h' for a list of key commands.\n");
+
+! widgets->addButton(Widgets::ButtonData("Undo", &undo_cb, (void*)0));
+! widgets->addButton(Widgets::ButtonData("Redo", &redo_cb, (void*)0));
+ static Widgets::ButtonData twist_items[] = {
+! Widgets::ButtonData(" 1 twist", &scramble_cb, (void *)1),
+! Widgets::ButtonData(" 2 twists", &scramble_cb, (void *)2),
+! Widgets::ButtonData(" 3 twists", &scramble_cb, (void *)3),
+! Widgets::ButtonData(" 4 twists", &scramble_cb, (void *)4),
+! Widgets::ButtonData(" 5 twists", &scramble_cb, (void *)5),
+! Widgets::ButtonData(" 6 twists", &scramble_cb, (void *)6),
+! Widgets::ButtonData(" 7 twists", &scramble_cb, (void *)7),
+! Widgets::ButtonData(" 8 twists", &scramble_cb, (void *)8),
+! Widgets::ButtonData("Full Scramble", &scramble_cb, (void *)NSCRAMBLECHEN),
+ };
+ int n_items = sizeof(twist_items) / sizeof(twist_items[0]);
+ assert(n_items == 9);
+ widgets->addMenuButton("Scramble...", n_items, twist_items);
+! widgets->addButton(Widgets::ButtonData("Solve", &cheat_cb, 0));
+! widgets->addButton(Widgets::ButtonData("Reset", &reset_cb, 0));
+ static Widgets::ButtonData new_puzzle_items[] = {
+ // widgets_button_create_data(
+ // MAXLENGTH<1 ? NULL : "1x1x1x1", new_puzzle_cb, (void *)1,
+ Widgets::ButtonData(MAXLENGTH < 2 ? 0 :
+! Widgets::ButtonData("2x2x2x2", &newPuzzle_cb,
+ (void *)2)),
+ Widgets::ButtonData(MAXLENGTH < 3 ? 0 :
+! Widgets::ButtonData("3x3x3x3", &newPuzzle_cb,
+ (void *)3)),
+ Widgets::ButtonData(MAXLENGTH < 4 ? 0 :
+! Widgets::ButtonData("4x4x4x4", &newPuzzle_cb,
+ (void *)4)),
+ Widgets::ButtonData(MAXLENGTH < 5 ? 0 :
+! Widgets::ButtonData("5x5x5x5", &newPuzzle_cb,
+ (void *)5)),
+ Widgets::ButtonData(MAXLENGTH < 6 ? 0 :
+! Widgets::ButtonData("6x6x6x6", &newPuzzle_cb,
+ (void *)6)),
+ Widgets::ButtonData(MAXLENGTH < 7 ? 0 :
+! Widgets::ButtonData("7x7x7x7", &newPuzzle_cb,
+ (void *)7)),
+ };
+ n_items = sizeof(new_puzzle_items) / sizeof(new_puzzle_items[0]);
+ widgets->addMenuButton("New Puzzle...", n_items, new_puzzle_items);
+! widgets->addButton(Widgets::ButtonData("Save", &save_cb, 0));
+! widgets->addButton(Widgets::ButtonData("Print", &print_cb, 0));
+! widgets->addButton(Widgets::ButtonData("Quit", &quit_cb, 0));
+
+ readLogfile(this->preferences.getStringProperty(M4D_LOGFILE));
+
+--- 77,127 ----
+ ("(Shift or control)-middle and dragging changes the viewing perspective.\n");
+ printf("Type 'h' for a list of key commands.\n");
+
+! widgets->addButton(Widgets::ButtonData("Undo", &EventHandler::undo_cb, (void*)0));
+! widgets->addButton(Widgets::ButtonData("Redo", &EventHandler::redo_cb, (void*)0));
+ static Widgets::ButtonData twist_items[] = {
+! Widgets::ButtonData(" 1 twist", &EventHandler::scramble_cb, (void *)1),
+! Widgets::ButtonData(" 2 twists", &EventHandler::scramble_cb, (void *)2),
+! Widgets::ButtonData(" 3 twists", &EventHandler::scramble_cb, (void *)3),
+! Widgets::ButtonData(" 4 twists", &EventHandler::scramble_cb, (void *)4),
+! Widgets::ButtonData(" 5 twists", &EventHandler::scramble_cb, (void *)5),
+! Widgets::ButtonData(" 6 twists", &EventHandler::scramble_cb, (void *)6),
+! Widgets::ButtonData(" 7 twists", &EventHandler::scramble_cb, (void *)7),
+! Widgets::ButtonData(" 8 twists", &EventHandler::scramble_cb, (void *)8),
+! Widgets::ButtonData("Full Scramble", &EventHandler::scramble_cb, (void *)NSCRAMBLECHEN),
+ };
+ int n_items = sizeof(twist_items) / sizeof(twist_items[0]);
+ assert(n_items == 9);
+ widgets->addMenuButton("Scramble...", n_items, twist_items);
+! widgets->addButton(Widgets::ButtonData("Solve", &EventHandler::cheat_cb, 0));
+! widgets->addButton(Widgets::ButtonData("Reset", &EventHandler::reset_cb, 0));
+ static Widgets::ButtonData new_puzzle_items[] = {
+ // widgets_button_create_data(
+ // MAXLENGTH<1 ? NULL : "1x1x1x1", new_puzzle_cb, (void *)1,
+ Widgets::ButtonData(MAXLENGTH < 2 ? 0 :
+! Widgets::ButtonData("2x2x2x2", &EventHandler::newPuzzle_cb,
+ (void *)2)),
+ Widgets::ButtonData(MAXLENGTH < 3 ? 0 :
+! Widgets::ButtonData("3x3x3x3", &EventHandler::newPuzzle_cb,
+ (void *)3)),
+ Widgets::ButtonData(MAXLENGTH < 4 ? 0 :
+! Widgets::ButtonData("4x4x4x4", &EventHandler::newPuzzle_cb,
+ (void *)4)),
+ Widgets::ButtonData(MAXLENGTH < 5 ? 0 :
+! Widgets::ButtonData("5x5x5x5", &EventHandler::newPuzzle_cb,
+ (void *)5)),
+ Widgets::ButtonData(MAXLENGTH < 6 ? 0 :
+! Widgets::ButtonData("6x6x6x6", &EventHandler::newPuzzle_cb,
+ (void *)6)),
+ Widgets::ButtonData(MAXLENGTH < 7 ? 0 :
+! Widgets::ButtonData("7x7x7x7", &EventHandler::newPuzzle_cb,
+ (void *)7)),
+ };
+ n_items = sizeof(new_puzzle_items) / sizeof(new_puzzle_items[0]);
+ widgets->addMenuButton("New Puzzle...", n_items, new_puzzle_items);
+! widgets->addButton(Widgets::ButtonData("Save", &EventHandler::save_cb, 0));
+! widgets->addButton(Widgets::ButtonData("Print", &EventHandler::print_cb, 0));
+! widgets->addButton(Widgets::ButtonData("Quit", &EventHandler::quit_cb, 0));
+
+ readLogfile(this->preferences.getStringProperty(M4D_LOGFILE));
+
+***************
+*** 132,143 ****
+ polymgr->getUntwistedFrame(&untwisted_frame);
+
+ /* an expose event will happen immediately */
+! machine->addEventHandler(1 << EXPOSE, &expose_handler, 0);
+! machine->addEventHandler(1 << RESIZE, &expose_handler, 0);
+! machine->addEventHandler(1 << BUTTONDOWN, &buttonDown_handler, 0);
+! machine->addEventHandler(1 << KEYPRESS, &keyPress_handler, 0);
+! machine->addEventHandler(1 << KEYRELEASE, &keyRelease_handler, 0);
+! machine->addEventHandler(1 << DRAG, &drag_handler, 0);
+ }
+
+ EventHandler::Callback*
+--- 132,143 ----
+ polymgr->getUntwistedFrame(&untwisted_frame);
+
+ /* an expose event will happen immediately */
+! machine->addEventHandler(1 << EXPOSE, &EventHandler::expose_handler, 0);
+! machine->addEventHandler(1 << RESIZE, &EventHandler::expose_handler, 0);
+! machine->addEventHandler(1 << BUTTONDOWN, &EventHandler::buttonDown_handler, 0);
+! machine->addEventHandler(1 << KEYPRESS, &EventHandler::keyPress_handler, 0);
+! machine->addEventHandler(1 << KEYRELEASE, &EventHandler::keyRelease_handler, 0);
+! machine->addEventHandler(1 << DRAG, &EventHandler::drag_handler, 0);
+ }
+
+ EventHandler::Callback*
+***************
+*** 689,700 ****
+ return;
+ }
+
+! static Widgets::ButtonData button("Cancel", &cancelApplyMacro_cb, 0);
+ widgets->createDialog("Click on three reference stickers.\n", 1, &button);
+
+ number_of_reference_stickers_needed = 3;
+ reference_stickers_needed = refs;
+! what_to_do_after_got_reference_stickers = &applyMacroCBAfterGotRefStickers;
+ }
+
+ void
+--- 689,700 ----
+ return;
+ }
+
+! static Widgets::ButtonData button("Cancel", &EventHandler::cancelApplyMacro_cb, 0);
+ widgets->createDialog("Click on three reference stickers.\n", 1, &button);
+
+ number_of_reference_stickers_needed = 3;
+ reference_stickers_needed = refs;
+! what_to_do_after_got_reference_stickers = &EventHandler::applyMacroCBAfterGotRefStickers;
+ }
+
+ void
+***************
+*** 745,756 ****
+
+ widgets->addMacro("", macromgr->getNMacros() - 1);
+
+! static Widgets::ButtonData button("Cancel", &cancelAdd_cb, 0);
+ widgets->createDialog("Click on three\nreference stickers.\n", 1, &button);
+
+ number_of_reference_stickers_needed = 3;
+ reference_stickers_needed = refs;
+! what_to_do_after_got_reference_stickers = &addCBAfterGotRefStickers;
+ }
+
+ void
+--- 745,756 ----
+
+ widgets->addMacro("", macromgr->getNMacros() - 1);
+
+! static Widgets::ButtonData button("Cancel", &EventHandler::cancelAdd_cb, 0);
+ widgets->createDialog("Click on three\nreference stickers.\n", 1, &button);
+
+ number_of_reference_stickers_needed = 3;
+ reference_stickers_needed = refs;
+! what_to_do_after_got_reference_stickers = &EventHandler::addCBAfterGotRefStickers;
+ }
+
+ void
+***************
+*** 758,765 ****
+ {
+ widgets->destroyDialog();
+ static Widgets::ButtonData make_macro[2] = {
+! Widgets::ButtonData("Done", &doneAdd_cb, 0),
+! Widgets::ButtonData("Cancel", &cancelAdd_cb, 0),
+ };
+
+ // FIX THIS-- it obscures the window!
+--- 758,765 ----
+ {
+ widgets->destroyDialog();
+ static Widgets::ButtonData make_macro[2] = {
+! Widgets::ButtonData("Done", &EventHandler::doneAdd_cb, 0),
+! Widgets::ButtonData("Cancel", &EventHandler::cancelAdd_cb, 0),
+ };
+
+ // FIX THIS-- it obscures the window!
+***************
+*** 806,812 ****
+ return;
+ }
+
+! static Widgets::ButtonData button("Cancel", &cancelDelete_cb, 0);
+ widgets->createDialog
+ ("Click on the \"Apply\" button\nof the macro you wish to delete.", 1,
+ &button);
+--- 806,812 ----
+ return;
+ }
+
+! static Widgets::ButtonData button("Cancel", &EventHandler::cancelDelete_cb, 0);
+ widgets->createDialog
+ ("Click on the \"Apply\" button\nof the macro you wish to delete.", 1,
+ &button);
diff --git a/games/magiccube4d/pkg-comment b/games/magiccube4d/pkg-comment
new file mode 100644
index 000000000000..8b54d9d8879e
--- /dev/null
+++ b/games/magiccube4d/pkg-comment
@@ -0,0 +1 @@
+MagicCube4D is a fully functional four-dimensional analog of Rubik's cube
diff --git a/games/magiccube4d/pkg-descr b/games/magiccube4d/pkg-descr
new file mode 100644
index 000000000000..8ca833bf863e
--- /dev/null
+++ b/games/magiccube4d/pkg-descr
@@ -0,0 +1,9 @@
+MagicCube4D is a four-dimensional Rubik's cube. It is an exact analogy in
+four dimensions to the original plastic three dimensional puzzle, but
+with some useful features - such as a "reset" button - which the original
+puzzle lacked.
+
+WWW: http://www.superliminal.com/cube/cube.htm
+
+- Jeremy
+karlj000@unbc.ca
diff --git a/games/magiccube4d/pkg-plist b/games/magiccube4d/pkg-plist
new file mode 100644
index 000000000000..e1f85f232166
--- /dev/null
+++ b/games/magiccube4d/pkg-plist
@@ -0,0 +1,7 @@
+bin/magiccube4d
+share/doc/magiccube4d/ChangeLog
+share/doc/magiccube4d/Intro.txt
+share/doc/magiccube4d/MagicCube4D-unix.txt
+share/doc/magiccube4d/ideas.txt
+share/doc/magiccube4d/readme-unix.txt
+@dirrm share/doc/magiccube4d