summaryrefslogtreecommitdiff
path: root/ia.c
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2015-01-07 13:30:26 +0100
committerOlivier Gayot <duskcoder@gmail.com>2015-01-07 13:30:26 +0100
commitb91ac429108096a3de75b9b81ca2c637b27524ba (patch)
treec5fecc84faa6ed7fec01e7cff28f70107721e5c5 /ia.c
parentc10788083cc013fb8f93cc5a223aab205e6da15c (diff)
replaced function inverse() by macro
There was multiple problems with this function: void inverse(int *bool); First, we use "bool", which is actually a standard type, as the identifier. Then, we cannot pass different types to the function without cast. Then, inverse is not a meaninful name. At last, we have to pass the address of the variable we want to inverse. Fixed all these points by replacing the function by a macro : #define inverse_boolean(_b) /* impl */ Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'ia.c')
-rw-r--r--ia.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ia.c b/ia.c
index 5e74f3c..6f11cb9 100644
--- a/ia.c
+++ b/ia.c
@@ -20,7 +20,7 @@ void Factionennemi(int* Vtourennemi,SURFACES* surfaces,POSITIONS* positions, ENN
else if(*Vtourennemi==Vnbennemis)
{
*Vtourennemi=0;
- inverse(Vtour);
+ inverse_boolean(*Vtour);
}
}while(ennemis[*Vtourennemi].etat==MORT);
if(persos[target].pv<=0)