summaryrefslogtreecommitdiff
path: root/2004/i/nono/src/ovision/group.cc
diff options
context:
space:
mode:
Diffstat (limited to '2004/i/nono/src/ovision/group.cc')
-rw-r--r--2004/i/nono/src/ovision/group.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/2004/i/nono/src/ovision/group.cc b/2004/i/nono/src/ovision/group.cc
index 603dd70..482bb93 100644
--- a/2004/i/nono/src/ovision/group.cc
+++ b/2004/i/nono/src/ovision/group.cc
@@ -7,6 +7,7 @@
#include "group.h"
#include <iostream>
#include <stdlib.h>
+#include <stdio.h>
#include <math.h>
using namespace std;
@@ -95,7 +96,7 @@ void Group::Plague(int type, unsigned char numColor, int x, int y) {
pCur = zoneListBall;
else if (type == GOAL)
{
- if (!((pLast->ymin <= 0) && (pLast->ymax >= config->width)))
+ if (!((pCur->ymin <= 0) && (pCur->ymax >= img->width)))
return;
pCur = zoneListGoal;
}
@@ -151,7 +152,7 @@ void Group::Plague(int type, unsigned char numColor, int x, int y) {
pLast->idColor = numColor;
// test si la balle est vu partiellement ou completement
- if ((pLast->xmin <= 0) || (pLast->ymin <= 0) || (pLast->xmax >= config->width) || (pLast->ymax >= config->height))
+ if ((pLast->xmin <= 0) || (pLast->ymin <= 0) || (pLast->xmax >= img->width) || (pLast->ymax >= img->height))
pLast->partial = 1;
else pLast->partial = 0;
@@ -173,7 +174,7 @@ void Group::ShowZones() {
pCur = pCur->next;
}
- ZONE *pCur = zoneListGoal;
+ pCur = zoneListGoal;
cout << "Groupes balles:" << endl;
while(pCur) {
printf("%u %i %i %i %i\n", pCur->idColor, pCur->xmin, pCur->xmax, pCur->ymin, pCur->ymax);