aboutsummaryrefslogtreecommitdiffstats
path: root/games/xevil
diff options
context:
space:
mode:
authorarved <arved@FreeBSD.org>2007-07-31 22:11:02 +0800
committerarved <arved@FreeBSD.org>2007-07-31 22:11:02 +0800
commit12ff7720648bf83caee2843c023a076d49d48ecb (patch)
tree0ed7c9c898ed20434939afd2c7177a6484c49802 /games/xevil
parentf3c7861d959dd4154459a2f89e2743cc0ca1ead2 (diff)
downloadfreebsd-ports-gnome-12ff7720648bf83caee2843c023a076d49d48ecb.tar.gz
freebsd-ports-gnome-12ff7720648bf83caee2843c023a076d49d48ecb.tar.zst
freebsd-ports-gnome-12ff7720648bf83caee2843c023a076d49d48ecb.zip
Fix build on 64bit CPUs
Diffstat (limited to 'games/xevil')
-rw-r--r--games/xevil/files/patch-cmn::actual.cpp13
-rw-r--r--games/xevil/files/patch-cmn::game_style.cpp13
-rw-r--r--games/xevil/files/patch-cmn::physical.cpp13
-rw-r--r--games/xevil/files/patch-cmn::utils.cpp22
-rw-r--r--games/xevil/files/patch-cmn::xetp.cpp13
-rw-r--r--games/xevil/files/patch-x11::ui.cpp121
-rw-r--r--games/xevil/files/patch-x11::viewport.cpp13
7 files changed, 194 insertions, 14 deletions
diff --git a/games/xevil/files/patch-cmn::actual.cpp b/games/xevil/files/patch-cmn::actual.cpp
index 2f765a0ec092..f4bf162ff0ad 100644
--- a/games/xevil/files/patch-cmn::actual.cpp
+++ b/games/xevil/files/patch-cmn::actual.cpp
@@ -1,5 +1,5 @@
---- cmn/actual.cpp.orig Wed Jan 19 12:54:36 2000
-+++ cmn/actual.cpp Sat Oct 25 21:39:07 2003
+--- cmn/actual.cpp.orig 2000-01-19 12:54:36.000000000 +0100
++++ cmn/actual.cpp 2007-07-31 15:47:25.000000000 +0200
@@ -32,7 +32,8 @@
// Include Files
@@ -10,3 +10,12 @@
#endif
#if WIN32
#include <strstrea.h>
+@@ -1534,7 +1535,7 @@
+ void *closure) {
+ // notThis is used to prevent transmogifying into the same class an object
+ // already is.
+- ClassId notThis = (ClassId)closure;
++ ClassId notThis = (intptr_t)closure;
+ if (pc->classId == notThis) {
+ return False;
+ }
diff --git a/games/xevil/files/patch-cmn::game_style.cpp b/games/xevil/files/patch-cmn::game_style.cpp
index 6d147c7eb7ea..4fc02cc99b8c 100644
--- a/games/xevil/files/patch-cmn::game_style.cpp
+++ b/games/xevil/files/patch-cmn::game_style.cpp
@@ -1,5 +1,5 @@
---- cmn/game_style.cpp.orig Sat Mar 22 20:47:42 2003
-+++ cmn/game_style.cpp Sat Oct 25 21:41:21 2003
+--- cmn/game_style.cpp.orig 2003-03-22 20:47:42.000000000 +0100
++++ cmn/game_style.cpp 2007-07-31 15:57:08.000000000 +0200
@@ -34,7 +34,8 @@
}
@@ -10,3 +10,12 @@
#endif
#if WIN32
+@@ -2680,7 +2681,7 @@
+ HumanP human = locator->get_human(n);
+ if (human) {
+ // previous depth
+- int depthOld = (int)human->get_data();
++ intptr_t depthOld = (intptr_t)human->get_data();
+ Id id = human->get_id();
+
+ // Get physical for intelligence
diff --git a/games/xevil/files/patch-cmn::physical.cpp b/games/xevil/files/patch-cmn::physical.cpp
index 5fac9455b1ac..30e8f28166c7 100644
--- a/games/xevil/files/patch-cmn::physical.cpp
+++ b/games/xevil/files/patch-cmn::physical.cpp
@@ -1,5 +1,5 @@
---- cmn/physical.cpp.orig Wed Jan 19 20:38:14 2000
-+++ cmn/physical.cpp Sat Oct 25 21:43:15 2003
+--- cmn/physical.cpp.orig 2000-01-19 20:38:14.000000000 +0100
++++ cmn/physical.cpp 2007-07-31 15:54:01.000000000 +0200
@@ -33,10 +33,11 @@
// Include Files
#include "xdata.h"
@@ -14,3 +14,12 @@
#endif
#if WIN32
#include <strstrea.h>
+@@ -1844,7 +1845,7 @@
+ }
+
+ // Use the pixmap resource id as the base.
+- u_int cmnBitsId = (unsigned int)mc->pixmapBits[baseDir][animNum];
++ u_int cmnBitsId = (unsigned intptr_t)mc->pixmapBits[baseDir][animNum];
+
+ // It is ok to call OneTransform::compute_key() even if there is no
+ // transformation, will just return 0x0.
diff --git a/games/xevil/files/patch-cmn::utils.cpp b/games/xevil/files/patch-cmn::utils.cpp
index 41f21d251fd1..2b05ca5cf1de 100644
--- a/games/xevil/files/patch-cmn::utils.cpp
+++ b/games/xevil/files/patch-cmn::utils.cpp
@@ -1,5 +1,5 @@
---- cmn/utils.cpp.orig Wed Mar 19 10:05:12 2003
-+++ cmn/utils.cpp Fri Oct 6 13:45:47 2006
+--- cmn/utils.cpp.orig 2003-03-19 10:05:12.000000000 +0100
++++ cmn/utils.cpp 2007-07-31 15:43:42.000000000 +0200
@@ -30,16 +30,17 @@
// Include Files
@@ -24,6 +24,15 @@
#endif
#ifdef WIN32
+@@ -605,7 +606,7 @@
+ // Not tested.
+ out->write_int(len);
+ for (int n = 0; n < len; n++) {
+- out->write_int((int)data[n]);
++ out->write_int((intptr_t)data[n]);
+ }
+ }
+
@@ -761,7 +762,7 @@
@@ -33,3 +42,12 @@
/* MODIFIES: index */
/* EFFECTS: Internal helper function. Return the Bucket containing key
or NULL if not found. Set index to the bucket list for key whether
+@@ -944,7 +945,7 @@
+ // Pretty crappy hash function, I know.
+ // Careful if bucketsNum is a power of 2.
+ int HashTable::defaultHash(void* key,int bucketsNum) {
+- return ((unsigned int)key) % bucketsNum;
++ return ((unsigned intptr_t)key) % bucketsNum;
+ }
+
+
diff --git a/games/xevil/files/patch-cmn::xetp.cpp b/games/xevil/files/patch-cmn::xetp.cpp
index 75db0573f811..f16e557e83d0 100644
--- a/games/xevil/files/patch-cmn::xetp.cpp
+++ b/games/xevil/files/patch-cmn::xetp.cpp
@@ -1,5 +1,5 @@
---- cmn/xetp.cpp.orig Wed Jan 19 12:54:30 2000
-+++ cmn/xetp.cpp Sat Oct 25 21:46:02 2003
+--- cmn/xetp.cpp.orig 2000-01-19 12:54:30.000000000 +0100
++++ cmn/xetp.cpp 2007-07-31 15:51:31.000000000 +0200
@@ -29,9 +29,10 @@
#include "stdafx.h"
@@ -13,3 +13,12 @@
#endif
#if WIN32
#include <strstrea.h>
+@@ -159,7 +160,7 @@
+ for (n = 0; n < physicals.length(); n++) {
+ PhysicalP p = (PhysicalP)physicals.get(n);
+ // computing object_length twice, but who cares.
+- _send_object(out,p,turn,(TickType)tickTypes.get(n),
++ _send_object(out,p,turn,(intptr_t)tickTypes.get(n),
+ compute_object_length(p));
+ }
+
diff --git a/games/xevil/files/patch-x11::ui.cpp b/games/xevil/files/patch-x11::ui.cpp
index 93a98af2e5ec..d9c911d27fa8 100644
--- a/games/xevil/files/patch-x11::ui.cpp
+++ b/games/xevil/files/patch-x11::ui.cpp
@@ -1,5 +1,5 @@
---- x11/ui.cpp.orig Wed Mar 19 10:05:38 2003
-+++ x11/ui.cpp Sat Oct 25 21:48:32 2003
+--- x11/ui.cpp.orig 2003-03-19 10:05:38.000000000 +0100
++++ x11/ui.cpp 2007-07-31 16:05:35.000000000 +0200
@@ -40,8 +40,9 @@
#include <X11/Xatom.h>
}
@@ -12,3 +12,120 @@
#include "coord.h"
#include "area.h"
+@@ -930,7 +931,7 @@
+ UiP ui = (UiP)closure;
+ ui->settingsChanges |= UIenemiesRefill;
+ // SGI compiler says you can't cast void* to Boolean.
+- Boolean val = (Boolean)(int)value;
++ Boolean val = (Boolean)(intptr_t)value;
+ ui->settings.enemiesRefill = val;
+ }
+
+@@ -939,7 +940,7 @@
+ void Ui::menu_controls_CB(void* value,Viewport* vPort,void* closure) {
+ UiP ui = (UiP)closure;
+ int dpyNum = vPort->get_dpy_num();
+- Boolean val = (Boolean)(int)value;
++ Boolean val = (Boolean)(intptr_t)value;
+ if (val) {
+ XMapWindow(ui->xvars.dpy[dpyNum],ui->xdata.controls[dpyNum]);
+ }
+@@ -955,7 +956,7 @@
+ Viewport* vPort,void* closure) {
+ UiP ui = (UiP)closure;
+ int dpyNum = vPort->get_dpy_num();
+- Boolean active = (Boolean)(int)value;
++ Boolean active = (Boolean)(intptr_t)value;
+
+ if (active) {
+ ui->lControls[dpyNum].input = ui->lControls[dpyNum].key =
+@@ -994,7 +995,7 @@
+
+ void Ui::menu_scenarios_CB(void* value,Viewport*,void* closure) {
+ UiP ui = (UiP)closure;
+- Boolean val = (Boolean)(int)value;
++ Boolean val = (Boolean)(intptr_t)value;
+ if (val) {
+ ui->settingsChanges |= UIstyle;
+ ui->settings.style = SCENARIOS;
+@@ -1005,7 +1006,7 @@
+
+ void Ui::menu_levels_CB(void* value,Viewport*,void* closure) {
+ UiP ui = (UiP)closure;
+- Boolean val = (Boolean)(int)value;
++ Boolean val = (Boolean)(intptr_t)value;
+ if (val) {
+ ui->settingsChanges |= UIstyle;
+ ui->settings.style = LEVELS;
+@@ -1016,7 +1017,7 @@
+
+ void Ui::menu_kill_CB(void* value,Viewport*,void* closure) {
+ UiP ui = (UiP)closure;
+- Boolean val = (Boolean)(int)value;
++ Boolean val = (Boolean)(intptr_t)value;
+ if (val) {
+ ui->settingsChanges |= UIstyle;
+ ui->settings.style = KILL;
+@@ -1027,7 +1028,7 @@
+
+ void Ui::menu_duel_CB(void* value,Viewport*,void* closure) {
+ UiP ui = (UiP)closure;
+- Boolean val = (Boolean)(int)value;
++ Boolean val = (Boolean)(intptr_t)value;
+ if (val) {
+ ui->settingsChanges |= UIstyle;
+ ui->settings.style = DUEL;
+@@ -1038,7 +1039,7 @@
+
+ void Ui::menu_extended_CB(void* value,Viewport*,void* closure) {
+ UiP ui = (UiP)closure;
+- Boolean val = (Boolean)(int)value;
++ Boolean val = (Boolean)(intptr_t)value;
+ if (val) {
+ ui->settingsChanges |= UIstyle;
+ ui->settings.style = EXTENDED;
+@@ -1049,7 +1050,7 @@
+
+ void Ui::menu_training_CB(void* value,Viewport*,void* closure) {
+ UiP ui = (UiP)closure;
+- Boolean val = (Boolean)(int)value;
++ Boolean val = (Boolean)(intptr_t)value;
+ if (val) {
+ ui->settingsChanges |= UIstyle;
+ ui->settings.style = TRAINING;
+@@ -1070,7 +1071,7 @@
+ void Ui::menu_cooperative_CB(void* value,Viewport*,void* closure) {
+ UiP ui = (UiP)closure;
+ ui->settingsChanges |= UIcooperative;
+- Boolean val = (Boolean)(int)value;
++ Boolean val = (Boolean)(intptr_t)value;
+ ui->settings.cooperative = val;
+ }
+
+@@ -1079,7 +1080,7 @@
+ void Ui::menu_help_CB(void* value,Viewport* vPort,void* closure) {
+ UiP ui = (UiP)closure;
+ int dpyNum = vPort->get_dpy_num();
+- Boolean active = (Boolean)(int)value;
++ Boolean active = (Boolean)(intptr_t)value;
+
+ if (active) {
+ XMapWindow(ui->xvars.dpy[dpyNum],ui->xdata.help[dpyNum]);
+@@ -1094,7 +1095,7 @@
+ void Ui::status_weapon_CB(void* value,Viewport* vPort,void*) {
+ // Some mouse controls.
+ // UiP ui = (UiP)closure;
+- int button = (int)value;
++ intptr_t button = (intptr_t)value;
+
+ switch (button) {
+ case Button1:
+@@ -1113,7 +1114,7 @@
+
+ void Ui::status_item_CB(void* value,Viewport* vPort,void*) {
+ // UiP ui = (UiP)closure;
+- int button = (int)value;
++ intptr_t button = (intptr_t)value;
+
+ switch (button) {
+ case Button1:
diff --git a/games/xevil/files/patch-x11::viewport.cpp b/games/xevil/files/patch-x11::viewport.cpp
index 8e6c18d80306..6aeef5d4d29f 100644
--- a/games/xevil/files/patch-x11::viewport.cpp
+++ b/games/xevil/files/patch-x11::viewport.cpp
@@ -1,5 +1,5 @@
---- x11/viewport.cpp.orig Wed Jan 19 12:54:14 2000
-+++ x11/viewport.cpp Sat Oct 25 21:49:00 2003
+--- x11/viewport.cpp.orig 2000-01-19 12:54:14.000000000 +0100
++++ x11/viewport.cpp 2007-07-31 15:59:37.000000000 +0200
@@ -44,7 +44,8 @@
#include <X11/Xos.h>
#include <X11/keysym.h>
@@ -10,3 +10,12 @@
#define TICK_BORDER_WIDTH 5 // border width big enough for a tick mark.
+@@ -1632,7 +1633,7 @@
+ // Would be much better to put the radio-button logic in the Panel classes.
+ if (pClosure->radio) {
+ // SGI compiler says you can't cast void* to Boolean.
+- Boolean bValue = (Boolean)(int)value;
++ Boolean bValue = (Boolean)(intptr_t)value;
+ if (!bValue) {
+ ((TogglePanel*)panel)->set_value(True);
+ }