tags 916037 + patch
thanks
Patch attached to fix this build error (Which I am the cause of).
/Andreas
[email protected]
--- a/src/distor.c
+++ b/src/distor.c
@@ -194,7 +194,7 @@
cycle_tmp /= 2;
speed--;
}
- cycle_tmp = fsqrt (fsqrt (cycle_tmp)) / 2;
+ cycle_tmp = fixsqrt (fixsqrt (cycle_tmp)) / 2;
cycle_tmp /= SCREEN_W;
cycle_tmp *= period;
if (cycle_tmp <= 0)
@@ -203,8 +203,8 @@
}
cycle_coef = sens * 256 * (itofix (GLOBAL_TICKER % cycle_tmp) / cycle_tmp);
- f0 = fsin (cycle_coef + freq_coef * period2);
- fp0x0 = (PI_1024 * fcos (cycle_coef + freq_coef * period2)) / 1024;
+ f0 = fixsin (cycle_coef + freq_coef * period2);
+ fp0x0 = (PI_1024 * fixcos (cycle_coef + freq_coef * period2)) / 1024;
alphax03 = (ampli_cst / 256) * ((fp0x0 - 2 * f0) / 256);
betax02 = (ampli_cst / 256) * ((-fp0x0 + 3 * f0) / 256);
@@ -217,7 +217,7 @@
}
for (i = period2; i < real_length - period2; ++i)
{
- temp = ((ampli_cos) / 256) * (fcos (cycle_coef + freq_coef * i) / 256);
+ temp = ((ampli_cos) / 256) * (fixcos (cycle_coef + freq_coef * i) / 256);
buffer2[i] = temp / WAVE_SIZE_SCALE;
}
--- a/src/fighter.c
+++ b/src/fighter.c
@@ -335,7 +335,7 @@
coef += 256;
attack[i] = (coef *
- fsqrt (fsqrt (1 << (LW_CONFIG_CURRENT_RULES.fighter_attack
+ fixsqrt (fixsqrt (1 << (LW_CONFIG_CURRENT_RULES.fighter_attack
+ cpu_influence[i])))) / (256 * 8);
if (attack[i] >= MAX_FIGHTER_HEALTH)
attack[i] = MAX_FIGHTER_HEALTH - 1;
@@ -343,7 +343,7 @@
attack[i] = 1;
defense[i] = (coef *
- fsqrt (fsqrt
+ fixsqrt (fixsqrt
(1 <<
(LW_CONFIG_CURRENT_RULES.fighter_defense +
cpu_influence[i])))) / (256 * 256);
@@ -353,7 +353,7 @@
defense[i] = 1;
new_health[i] = (coef *
- fsqrt (fsqrt
+ fixsqrt (fixsqrt
(1 <<
(LW_CONFIG_CURRENT_RULES.fighter_new_health +
cpu_influence[i])))) / (256 * 4);
--- a/src/palette.c
+++ b/src/palette.c
@@ -88,7 +88,7 @@
{
int result;
- result = fsqrt (i * 256) / 256;
+ result = fixsqrt (i * 256) / 256;
if (result > 255)
result = 255;