#include <stdlib.h>#include <stdio.h>#include "../src/obstacle.h"#include "../src/bolt.h"#include "../src/spectre.h"#include <algorithm>#include <math.h>Include dependency graph for stubs.cpp:

Defines | |
| #define | assert(a) |
Typedefs | |
| typedef std::pair< int, int > | IdPair |
| typedef std::pair< bool, IdPair > | CollVecPair |
| typedef std::vector< CollVecPair > | CollVecType |
Functions | |
| template<class Number> Number | minimum (Number a, Number b) |
| template<class Number> Number | maximum (Number a, Number b) |
| void | MyCollide (int id1, int id2) |
Variables | |
| CollVecType | collVec |
| int | totalbadcoll |
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||||||
|
00057 {
00058 return a>b?a:b;
00059 }
|
|
||||||||||||||||
|
00053 {
00054 return a<b?a:b;
00055 }
|
|
||||||||||||
|
00073 {
00074 // printf("%s Collided with %s\n", name.c_str(), oth->name.c_str());
00075 CollVecType::iterator iter = std::find(collVec.begin(),collVec.end(),CollVecPair(false, IdPair(id1,id2)));
00076 if (iter==collVec.end()) {
00077 iter=std::find(collVec.begin(),collVec.end(),CollVecPair(true, IdPair(id1,id2)));
00078 if (iter!=collVec.end()) {
00079 // printf("%d and %d collided twice\n", id1, id2);
00080 } else {
00081 printf("%d colliding with %d\n", id1, id2);
00082 ++totalbadcoll;
00083 }
00084 } else {
00085 (*iter).first=true;
00086 }
00087 }
|
|
|
|
|
|
|
1.2.15