void ResetAutofire(int party) { int i, j, k, m; TUnit *u; AF_Reseted = TRUE; if (party == GOODLIFE) AF_from = BADLIFE, AF_to = UNITS_TOP; else AF_from = GOODLIFE, AF_to = GOODLIFE_TOP; for (i = 0; i < UNITS_TOP; i++) AF_Units[i] = FALSE; for (i = 0; i < MapSizeX * MapSizeY; i++) AF_Map[i] = 0; for (i = AF_from; i < AF_to; i++) { if ((Units[i] != NULL) && (Units[i]->Type % BADLIFE <= unSatan)) AF_Units[i] = (Units[i]->X != -1) && UnitCanShoot((TUnit*)Units[i]); } // vytvoreni tabulky strelby: for (m = 0, k = AF_from; k < AF_to; k++) if (AF_Units[k]) m++; if (m) ProgressLimit(m); else ProgressLimit(1); ProgressNull(); for (k = AF_from; k < AF_to; k++) { if (!AF_Units[k]) continue; u = (TUnit*)Units[k]; AF_AddUnit(u); ProgressInc(); ProcessMapAnim(); } ProgressNull(); }
LOCAL_C void Execute(const TDesC& aSql) { RDbIncremental inc; TInt step; test(inc.Execute(TheDatabase,aSql,step)==KErrNone); ProgressInc(inc,step); }
LOCAL_C void Recover() { RDbIncremental rec; TInt step; test(rec.Recover(TheDatabase,step)==KErrNone); ProgressInc(rec,step); test(!TheDatabase.IsDamaged()); }
int TTowers::MakeTurn () { int i, st; if (MusicOn && (!IsMusicPlaying())) JukeboxNext(); if (nofBadLife == 0) return TRUE; if (DeleteKilled () == FALSE) return FALSE; for (i = 0; i < nofBadLife; i++) { do { st = ProblemJednotky (BL[i]); if (st == FALSE) { ProgressNull (); return FALSE; } } while (st == -1); ProgressInc (); } return TRUE; }