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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
--- quadra-1.1.8-orig/skelton/include/array.h 2006-05-21 16:35:30.000000000 -0400
+++ quadra-1.1.8/skelton/include/array.h 2006-05-21 16:53:06.000000000 -0400
@@ -21,6 +21,7 @@
#ifndef _HEADER_ARRAY
#define _HEADER_ARRAY
#include <vector>
+#include <algorithm>
#ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b))
@@ -37,7 +38,9 @@
v.push_back(t);
}
void add_before(const T& t, int i) {
- v.insert(&v[i], t);
+ typename std::vector<T>::iterator iter = v.begin();
+ std::advance(iter, i);
+ v.insert(iter, t);
}
bool remove_item(const T& t) {
for(int i=0; i<size(); i++)
@@ -51,7 +54,9 @@
v.pop_back();
}
void remove(int i) {
- v.erase(&v[i]);
+ typename std::vector<T>::iterator iter = v.begin();
+ std::advance(iter, i);
+ v.erase(iter);
}
int size() const {
return v.size();
diff -urN quadra-1.1.8/skelton/tools/wadder/wadder.cpp quadra-1.1.8-kacsa/skelton/tools/wadder/wadder.cpp
--- quadra-1.1.8/skelton/tools/wadder/wadder.cpp Fri Oct 19 23:19:30 2001
+++ quadra-1.1.8-kacsa/skelton/tools/wadder/wadder.cpp Fri May 17 17:21:19 2002
@@ -109,12 +109,12 @@
char *usage = "usage: wadder <working directory> <output res> <input text>\n";
Resfile *wad;
-char *basename(const char* f) {
+/*char *basename(const char* f) {
char* p=(char*)(f+strlen(f));
while(*p != '/' && *p != '\\' && p>=f)
p--;
return p+1;
-}
+}*/
void addfile(const char* fname) {
Res_dos *res;
diff -urN quadra-1.1.8/source/net_stuff.cpp quadra-1.1.8-kacsa/source/net_stuff.cpp
--- quadra-1.1.8/source/net_stuff.cpp Thu Oct 11 22:35:14 2001
+++ quadra-1.1.8-kacsa/source/net_stuff.cpp Fri May 17 17:15:05 2002
@@ -18,6 +18,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include <stdarg.h>
#include "error.h"
#include "packets.h"
#include "config.h"
diff -urN quadra-1.1.8/source/quadra.cpp quadra-1.1.8-kacsa/source/quadra.cpp
--- quadra-1.1.8/source/quadra.cpp Fri Oct 19 23:19:31 2001
+++ quadra-1.1.8-kacsa/source/quadra.cpp Fri May 17 17:17:02 2002
@@ -25,6 +25,7 @@
#include <sys/types.h>
#endif
#include <stdlib.h>
+#include <exception>
#include "packet.h"
#include "types.h"
#include "net.h"
@@ -2387,7 +2387,7 @@
try {
overmind.step();
}
- catch(exception *e) {
+ catch(std::exception *e) {
msgbox("Exception caught from overmind.step(): %s\n", e->what());
}
#ifdef PAINTDETECTOR2000
@@ -2406,7 +2406,7 @@
try {
ecran->draw_zone();
}
- catch(exception *e) {
+ catch(std::exception *e) {
msgbox("Exception caught from ecran->draw_zone(): %s\n", e->what());
}
--- quadra-1.1.8/source/net_server.cpp.orig 2004-01-29 04:44:28.493992136 -0500
+++ quadra-1.1.8-herpies/source/net_server.cpp 2004-01-29 04:44:47.181151256 -0500
@@ -406,7 +406,8 @@
if(game->server_max_players && game->net_list.size() >= game->server_max_players)
playeraccepted.accepted = 5; // game is full, can't join
if(game->server_max_teams && game->net_list.count_teams() >= game->server_max_teams) {
- for(unsigned i=0; i<MAXPLAYERS; ++i) {
+ unsigned i;
+ for(i=0; i<MAXPLAYERS; ++i) {
Canvas* c=game->net_list.get(i);
if(c && c->color==p->team)
break;
|