summaryrefslogtreecommitdiff
path: root/games/xevil/patches/patch-ac
blob: 3eec6d2db1cfa1407e0018e0e84ff863260b7dc2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
$NetBSD: patch-ac,v 1.3 2004/03/26 01:34:08 kristerw Exp $

--- game.C.orig	Tue Sep 24 02:27:18 1996
+++ game.C	Fri Mar 26 02:19:24 2004
@@ -22,6 +22,7 @@
     hardts@alum.mit.edu
     http://graphics.lcs.mit.edu/~hardts/xevil.html
 */
+using namespace std;
 
 #ifndef NO_PRAGMAS
 #pragma implementation "game.h"
@@ -34,7 +35,7 @@
 #include <stdio.h>
 }
 
-#include <strstream.h>
+#include <strstream>
 #include <iomanip.h>
 
 #include "utils.h"
@@ -386,11 +387,11 @@
   
   // Get arrays of potential weapons and potential otherItems.
   int weaponsNum;
-  PhysicalContext *weapons[A_CLASSES_NUM];
+  const PhysicalContext *weapons[A_CLASSES_NUM];
   weaponsNum = locator->filter_contexts(weapons,NULL,
 					potential_weapon_filter);
   int oItemsNum;
-  PhysicalContext *oItems[A_CLASSES_NUM];
+  const PhysicalContext *oItems[A_CLASSES_NUM];
   oItemsNum = locator->filter_contexts(oItems,NULL,
 				       potential_other_item_filter);
   
@@ -1381,7 +1382,7 @@
       // Choose class randomly.
 
       // Get list of all classes that are potential Human classes.
-      PhysicalContext *list[A_CLASSES_NUM];
+      const PhysicalContext *list[A_CLASSES_NUM];
       int size = locator.filter_contexts(list,NULL,potential_human_filter);
       assert(size);
       theContext = list[Utils::choose(size)];