Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 133815
Collapse All | Expand All

(-)quadra-1.1.8-orig/skelton/include/array.h (-2 / +7 lines)
Lines 21-26 Link Here
21
#ifndef _HEADER_ARRAY
21
#ifndef _HEADER_ARRAY
22
#define _HEADER_ARRAY
22
#define _HEADER_ARRAY
23
#include <vector>
23
#include <vector>
24
#include <algorithm>
24
25
25
#ifndef max
26
#ifndef max
26
#define max(a,b) (((a) > (b)) ? (a) : (b))
27
#define max(a,b) (((a) > (b)) ? (a) : (b))
Lines 37-43 Link Here
37
		v.push_back(t);
38
		v.push_back(t);
38
	}
39
	}
39
	void add_before(const T& t, int i) {
40
	void add_before(const T& t, int i) {
40
		v.insert(&v[i], t);
41
		typename std::vector<T>::iterator iter;
42
		std::advance(iter, i);
43
		v.insert(iter, t);
41
	}
44
	}
42
	bool remove_item(const T& t) {
45
	bool remove_item(const T& t) {
43
		for(int i=0; i<size(); i++)
46
		for(int i=0; i<size(); i++)
Lines 51-57 Link Here
51
		v.pop_back();
54
		v.pop_back();
52
	}
55
	}
53
	void remove(int i) {
56
	void remove(int i) {
54
		v.erase(&v[i]);
57
		typename std::vector<T>::iterator iter;
58
		std::advance(iter, i);
59
		v.erase(iter);
55
	}
60
	}
56
	int size() const {
61
	int size() const {
57
		return v.size();
62
		return v.size();
(-)quadra-1.1.8-orig/source/net_server.cpp (-1 / +2 lines)
Lines 400-412 Link Here
400
				}
400
				}
401
			}
401
			}
402
		}
402
		}
403
		unsigned i;
403
		if(playeraccepted.accepted == 0) {
404
		if(playeraccepted.accepted == 0) {
404
			if(game->net_list.size() == MAXPLAYERS)
405
			if(game->net_list.size() == MAXPLAYERS)
405
				playeraccepted.accepted = 5; // game is full, can't join
406
				playeraccepted.accepted = 5; // game is full, can't join
406
			if(game->server_max_players && game->net_list.size() >= game->server_max_players)
407
			if(game->server_max_players && game->net_list.size() >= game->server_max_players)
407
				playeraccepted.accepted = 5; // game is full, can't join
408
				playeraccepted.accepted = 5; // game is full, can't join
408
			if(game->server_max_teams && game->net_list.count_teams() >= game->server_max_teams) {
409
			if(game->server_max_teams && game->net_list.count_teams() >= game->server_max_teams) {
409
				for(unsigned i=0; i<MAXPLAYERS; ++i) {
410
				for(i=0; i<MAXPLAYERS; ++i) {
410
					Canvas* c=game->net_list.get(i);
411
					Canvas* c=game->net_list.get(i);
411
					if(c && c->color==p->team)
412
					if(c && c->color==p->team)
412
						break;
413
						break;
(-)quadra-1.1.8-orig/source/net_stuff.cpp (+1 lines)
Lines 29-34 Link Here
29
#include "texte.h"
29
#include "texte.h"
30
#include "video.h"
30
#include "video.h"
31
#include "nglog.h"
31
#include "nglog.h"
32
#include <stdarg.h>
32
33
33
RCSID("$Id: net_stuff.cpp,v 1.9 2001/10/01 13:59:19 pphaneuf Exp $")
34
RCSID("$Id: net_stuff.cpp,v 1.9 2001/10/01 13:59:19 pphaneuf Exp $")
34
35
(-)quadra-1.1.8-orig/source/quadra.cpp (-2 / +3 lines)
Lines 65-70 Link Here
65
#include "clock.h"
65
#include "clock.h"
66
#include "net_server.h"
66
#include "net_server.h"
67
#include "quadra.h"
67
#include "quadra.h"
68
#include <exception>
68
69
69
RCSID("$Id: quadra.cpp,v 1.23 2001/10/18 19:00:42 slajoie Exp $")
70
RCSID("$Id: quadra.cpp,v 1.23 2001/10/18 19:00:42 slajoie Exp $")
70
71
Lines 2387-2393 Link Here
2387
				try {
2388
				try {
2388
					overmind.step();
2389
					overmind.step();
2389
				}
2390
				}
2390
				catch(exception *e) {
2391
				catch(std::exception *e) {
2391
					msgbox("Exception caught from overmind.step(): %s\n", e->what());
2392
					msgbox("Exception caught from overmind.step(): %s\n", e->what());
2392
				}
2393
				}
2393
				#ifdef PAINTDETECTOR2000
2394
				#ifdef PAINTDETECTOR2000
Lines 2406-2412 Link Here
2406
			try {
2407
			try {
2407
				ecran->draw_zone();
2408
				ecran->draw_zone();
2408
			}
2409
			}
2409
			catch(exception *e) {
2410
			catch(std::exception *e) {
2410
				msgbox("Exception caught from ecran->draw_zone(): %s\n", e->what());
2411
				msgbox("Exception caught from ecran->draw_zone(): %s\n", e->what());
2411
			}
2412
			}
2412
2413

Return to bug 133815