Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 676068
Collapse All | Expand All

(-)liquidwar-5.6.4/src/distor.c (-4 / +4 lines)
Lines 194-200 Link Here
194
      cycle_tmp /= 2;
194
      cycle_tmp /= 2;
195
      speed--;
195
      speed--;
196
    }
196
    }
197
  cycle_tmp = fsqrt (fsqrt (cycle_tmp)) / 2;
197
  cycle_tmp = sqrtf (sqrtf (cycle_tmp)) / 2;
198
  cycle_tmp /= SCREEN_W;
198
  cycle_tmp /= SCREEN_W;
199
  cycle_tmp *= period;
199
  cycle_tmp *= period;
200
  if (cycle_tmp <= 0)
200
  if (cycle_tmp <= 0)
Lines 203-210 Link Here
203
    }
203
    }
204
  cycle_coef = sens * 256 * (itofix (GLOBAL_TICKER % cycle_tmp) / cycle_tmp);
204
  cycle_coef = sens * 256 * (itofix (GLOBAL_TICKER % cycle_tmp) / cycle_tmp);
205
205
206
  f0 = fsin (cycle_coef + freq_coef * period2);
206
  f0 = sinf (cycle_coef + freq_coef * period2);
207
  fp0x0 = (PI_1024 * fcos (cycle_coef + freq_coef * period2)) / 1024;
207
  fp0x0 = (PI_1024 * cosf (cycle_coef + freq_coef * period2)) / 1024;
208
208
209
  alphax03 = (ampli_cst / 256) * ((fp0x0 - 2 * f0) / 256);
209
  alphax03 = (ampli_cst / 256) * ((fp0x0 - 2 * f0) / 256);
210
  betax02 = (ampli_cst / 256) * ((-fp0x0 + 3 * f0) / 256);
210
  betax02 = (ampli_cst / 256) * ((-fp0x0 + 3 * f0) / 256);
Lines 217-223 Link Here
217
    }
217
    }
218
  for (i = period2; i < real_length - period2; ++i)
218
  for (i = period2; i < real_length - period2; ++i)
219
    {
219
    {
220
      temp = ((ampli_cos) / 256) * (fcos (cycle_coef + freq_coef * i) / 256);
220
      temp = ((ampli_cos) / 256) * (cosf (cycle_coef + freq_coef * i) / 256);
221
      buffer2[i] = temp / WAVE_SIZE_SCALE;
221
      buffer2[i] = temp / WAVE_SIZE_SCALE;
222
    }
222
    }
223
223
(-)liquidwar-5.6.4/src/fighter.c (-3 / +3 lines)
Lines 335-341 Link Here
335
      coef += 256;
335
      coef += 256;
336
336
337
      attack[i] = (coef *
337
      attack[i] = (coef *
338
		   fsqrt (fsqrt (1 << (LW_CONFIG_CURRENT_RULES.fighter_attack
338
		   sqrtf (sqrtf (1 << (LW_CONFIG_CURRENT_RULES.fighter_attack
339
				       + cpu_influence[i])))) / (256 * 8);
339
				       + cpu_influence[i])))) / (256 * 8);
340
      if (attack[i] >= MAX_FIGHTER_HEALTH)
340
      if (attack[i] >= MAX_FIGHTER_HEALTH)
341
	attack[i] = MAX_FIGHTER_HEALTH - 1;
341
	attack[i] = MAX_FIGHTER_HEALTH - 1;
Lines 343-349 Link Here
343
	attack[i] = 1;
343
	attack[i] = 1;
344
344
345
      defense[i] = (coef *
345
      defense[i] = (coef *
346
		    fsqrt (fsqrt
346
		    sqrtf (sqrtf
347
			   (1 <<
347
			   (1 <<
348
			    (LW_CONFIG_CURRENT_RULES.fighter_defense +
348
			    (LW_CONFIG_CURRENT_RULES.fighter_defense +
349
			     cpu_influence[i])))) / (256 * 256);
349
			     cpu_influence[i])))) / (256 * 256);
Lines 353-359 Link Here
353
	defense[i] = 1;
353
	defense[i] = 1;
354
354
355
      new_health[i] = (coef *
355
      new_health[i] = (coef *
356
		       fsqrt (fsqrt
356
		       sqrtf (sqrtf
357
			      (1 <<
357
			      (1 <<
358
			       (LW_CONFIG_CURRENT_RULES.fighter_new_health +
358
			       (LW_CONFIG_CURRENT_RULES.fighter_new_health +
359
				cpu_influence[i])))) / (256 * 4);
359
				cpu_influence[i])))) / (256 * 4);
(-)liquidwar-5.6.4/src/palette.c (-1 / +1 lines)
Lines 88-94 Link Here
88
{
88
{
89
  int result;
89
  int result;
90
90
91
  result = fsqrt (i * 256) / 256;
91
  result = sqrtf (i * 256) / 256;
92
  if (result > 255)
92
  if (result > 255)
93
    result = 255;
93
    result = 255;
94
94

Return to bug 676068