project_files/HedgewarsMobile/Classes/GameSetup.m
changeset 3752 73c2d7d5643b
parent 3697 d5b30d6373fc
child 3779 3351a017d4ad
equal deleted inserted replaced
3751:a70c61c076ae 3752:73c2d7d5643b
   134     [schemePath release];
   134     [schemePath release];
   135     int result = 0;
   135     int result = 0;
   136     int i = 0;
   136     int i = 0;
   137 
   137 
   138     if ([[scheme objectAtIndex:i++] boolValue])
   138     if ([[scheme objectAtIndex:i++] boolValue])
   139         result |= 0x01;
   139         result |= 0x00000001;
   140     if ([[scheme objectAtIndex:i++] boolValue])
   140     if ([[scheme objectAtIndex:i++] boolValue])
   141         result |= 0x10;
   141         result |= 0x00000010;
   142     if ([[scheme objectAtIndex:i++] boolValue])
   142     if ([[scheme objectAtIndex:i++] boolValue])
   143         result |= 0x04;
   143         result |= 0x00000004;
   144     if ([[scheme objectAtIndex:i++] boolValue])
   144     if ([[scheme objectAtIndex:i++] boolValue])
   145         result |= 0x08;
   145         result |= 0x00000008;
   146     if ([[scheme objectAtIndex:i++] boolValue])
   146     if ([[scheme objectAtIndex:i++] boolValue])
   147         result |= 0x20;
   147         result |= 0x00000020;
   148     if ([[scheme objectAtIndex:i++] boolValue])
   148     if ([[scheme objectAtIndex:i++] boolValue])
   149         result |= 0x40;
   149         result |= 0x00000040;
   150     if ([[scheme objectAtIndex:i++] boolValue])
   150     if ([[scheme objectAtIndex:i++] boolValue])
   151         result |= 0x80;
   151         result |= 0x00000080;
   152     if ([[scheme objectAtIndex:i++] boolValue])
   152     if ([[scheme objectAtIndex:i++] boolValue])
   153         result |= 0x100;
   153         result |= 0x00000100;
   154     if ([[scheme objectAtIndex:i++] boolValue])
   154     if ([[scheme objectAtIndex:i++] boolValue])
   155         result |= 0x200;
   155         result |= 0x00000200;
   156     if ([[scheme objectAtIndex:i++] boolValue])
   156     if ([[scheme objectAtIndex:i++] boolValue])
   157         result |= 0x400;
   157         result |= 0x00000400;
   158     if ([[scheme objectAtIndex:i++] boolValue])
   158     if ([[scheme objectAtIndex:i++] boolValue])
   159         result |= 0x800;
   159         result |= 0x00000800;
   160     if ([[scheme objectAtIndex:i++] boolValue])
   160     if ([[scheme objectAtIndex:i++] boolValue])
   161         result |= 0x2000;
   161         result |= 0x00002000;
   162     if ([[scheme objectAtIndex:i++] boolValue])
   162     if ([[scheme objectAtIndex:i++] boolValue])
   163         result |= 0x4000;
   163         result |= 0x00004000;
   164     if ([[scheme objectAtIndex:i++] boolValue])
   164     if ([[scheme objectAtIndex:i++] boolValue])
   165         result |= 0x8000;
   165         result |= 0x00008000;
   166     if ([[scheme objectAtIndex:i++] boolValue])
   166     if ([[scheme objectAtIndex:i++] boolValue])
   167         result |= 0x10000;
   167         result |= 0x00010000;
   168     if ([[scheme objectAtIndex:i++] boolValue])
   168     if ([[scheme objectAtIndex:i++] boolValue])
   169         result |= 0x20000;
   169         result |= 0x00020000;
   170     if ([[scheme objectAtIndex:i++] boolValue])
   170     if ([[scheme objectAtIndex:i++] boolValue])
   171         result |= 0x80000;
   171         result |= 0x00080000;
       
   172     if ([[scheme objectAtIndex:i++] boolValue])
       
   173         result |= 0x00100000;
   172 
   174 
   173     NSString *flags = [[NSString alloc] initWithFormat:@"e$gmflags %d",result];
   175     NSString *flags = [[NSString alloc] initWithFormat:@"e$gmflags %d",result];
   174     [self sendToEngine:flags];
   176     [self sendToEngine:flags];
   175     [flags release];
   177     [flags release];
   176 
   178 
   198 
   200 
   199     NSString *minesNumber = [[NSString alloc] initWithFormat:@"e$landadds %d",[[scheme objectAtIndex:i++] intValue]];
   201     NSString *minesNumber = [[NSString alloc] initWithFormat:@"e$landadds %d",[[scheme objectAtIndex:i++] intValue]];
   200     [self sendToEngine:minesNumber];
   202     [self sendToEngine:minesNumber];
   201     [minesNumber release];
   203     [minesNumber release];
   202 
   204 
       
   205     
   203     NSString *dudMines = [[NSString alloc] initWithFormat:@"e$minedudpct %d",[[scheme objectAtIndex:i++] intValue]];
   206     NSString *dudMines = [[NSString alloc] initWithFormat:@"e$minedudpct %d",[[scheme objectAtIndex:i++] intValue]];
   204     [self sendToEngine:dudMines];
   207     [self sendToEngine:dudMines];
   205     [dudMines release];
   208     [dudMines release];
   206 
   209 
   207     NSString *explosives = [[NSString alloc] initWithFormat:@"e$explosives %d",[[scheme objectAtIndex:i++] intValue]];
   210     NSString *explosives = [[NSString alloc] initWithFormat:@"e$explosives %d",[[scheme objectAtIndex:i++] intValue]];