stratagus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Stratagus-CVS] stratagus/src/ai ai.c ai_resource.c


From: address@hidden
Subject: [Stratagus-CVS] stratagus/src/ai ai.c ai_resource.c
Date: 3 Jan 2004 11:26:20 +1100

CVSROOT:        /home/strat
Module name:    stratagus
Changes by:      <address@hidden>       04/01/03 11:26:20

Modified files:
        src/ai         : ai.c ai_resource.c 

Log message:
        Load/Save updates

Patches:
Index: stratagus/src/ai/ai.c
diff -u stratagus/src/ai/ai.c:1.105 stratagus/src/ai/ai.c:1.106
--- stratagus/src/ai/ai.c:1.105 Fri Jan  2 08:24:02 2004
+++ stratagus/src/ai/ai.c       Sat Jan  3 11:26:19 2004
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: ai.c,v 1.105 2004/01/01 21:24:02 jsalmon3 Exp $
+//      $Id: ai.c,v 1.106 2004/01/03 00:26:19 jsalmon3 Exp $
 
 
 //@{
@@ -678,13 +678,14 @@
 */
 global void SaveAi(CLFile* file)
 {
-       CLprintf(file, "\n;;; -----------------------------------------\n");
+       CLprintf(file, "\n--- -----------------------------------------\n");
        CLprintf(file,
-               ";;; MODULE: AI $Id: ai.c,v 1.105 2004/01/01 21:24:02 jsalmon3 
Exp $\n\n");
-
+               "--- MODULE: AI $Id: ai.c,v 1.106 2004/01/03 00:26:19 jsalmon3 
Exp $\n\n");
+#if 0
        SaveAiTypesWcName(file);
        SaveAiHelper(file);
        SaveAiTypes(file);
+#endif
        SaveAiPlayers(file);
 
        DebugLevel0Fn("FIXME: Saving AI isn't supported\n");
@@ -959,7 +960,7 @@
 local void AiRemoveFromBuilded(PlayerAi* pai, const UnitType* type)
 {
        int i;
-       int equivalents[UnitTypeMax+1];
+       int equivalents[UnitTypeMax + 1];
        int equivalentsCount;
 
        if (AiRemoveFromBuilded2(pai, type)) {
Index: stratagus/src/ai/ai_resource.c
diff -u stratagus/src/ai/ai_resource.c:1.86 stratagus/src/ai/ai_resource.c:1.87
--- stratagus/src/ai/ai_resource.c:1.86 Fri Jan  2 08:24:03 2004
+++ stratagus/src/ai/ai_resource.c      Sat Jan  3 11:26:19 2004
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//      $Id: ai_resource.c,v 1.86 2004/01/01 21:24:03 jsalmon3 Exp $
+//      $Id: ai_resource.c,v 1.87 2004/01/03 00:26:19 jsalmon3 Exp $
 
 //@{
 
@@ -320,7 +320,7 @@
        //
        // Count the already made build requests.
        //
-       memset(counter, 0, sizeof (counter));
+       memset(counter, 0, sizeof(counter));
        for (queue = AiPlayer->UnitTypeBuilded; queue; queue = queue->Next) {
                counter[queue->Type->Type] += queue->Want;
        }
@@ -410,7 +410,7 @@
 **
 **  @param type  The unittype we wan't to build
 */
-global int AiCountUnitBuilders(UnitType * type)
+global int AiCountUnitBuilders(UnitType* type)
 {
        int result;
        int i;
@@ -464,7 +464,7 @@
 **
 **  @note        We must check if the dependencies are fulfilled.
 */
-local int AiMakeUnit(UnitType * type)
+local int AiMakeUnit(UnitType* type)
 {
        int i;
        int n;
@@ -472,7 +472,7 @@
        AiUnitTypeTable* const* tablep;
        const AiUnitTypeTable* table;
 
-       int usableTypes[UnitTypeMax+1];
+       int usableTypes[UnitTypeMax + 1];
        int usableTypesCount;
        int currentType;
 
@@ -482,7 +482,7 @@
        usableTypesCount = AiFindAvailableUnitTypeEquiv(type, usableTypes);
 
        // Iterate them
-       for (currentType = 0; currentType < usableTypesCount; currentType++) {
+       for (currentType = 0; currentType < usableTypesCount; ++currentType) {
 
                type = UnitTypes[usableTypes[currentType]];
 
@@ -845,7 +845,7 @@
                        return 1;
                }
                exploremask = 0;
-               for (i = 0; i <= UnitTypeMax; i++) {
+               for (i = 0; i < UnitTypeMax; ++i) {
                        if (UnitTypes[i] && UnitTypes[i]->GivesResource == 
resource) {
                                switch (UnitTypes[i]->UnitType) {
                                case UnitTypeLand:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]