Correct number for combat energy in "Outfit Starship".

it used to divide by wait_delay, but in practice wait_delay + 1 is used.
Unfortunately, this means if you want integer numbers, you'd have to
multiply everything by gcd(5, 7, 9, 11), instead of gcd(4, 6, 8, 10).
This would be too big, so I had to use rounded numbers.
The number displayed now is the amount of energy gained per second.


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1432 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
meep-eep
2004-12-22 20:27:03 +00:00
parent 423ccea449
commit be85c3917f
2 changed files with 9 additions and 1 deletions
+1
View File
@@ -1,4 +1,5 @@
Changes towards version 0.4:
- Corrected number for combat energy when outfitting starship. - SvdB
- Added dumping planet info to uqmdebug.c - SvdB
- Check language.txt for locale, from Zap
- Make it possible to specify the config dir on the command line.
+8 -1
View File
@@ -544,7 +544,14 @@ DrawFlagshipStats (void)
wsprintf (buf, "%4u", 1 + TURN_WAIT - turn_wait);
font_DrawText (&t);
t.baseline.y += leading;
wsprintf (buf, "%4u", 240 * energy_regeneration / energy_wait);
{
unsigned int energy_per_10_sec =
(((100 * BATTLE_FRAME_RATE * energy_regeneration) /
(1 + energy_wait)) + 5) / 10;
wsprintf (buf, "%2u.%1u",
energy_per_10_sec / 10,
energy_per_10_sec % 10);
}
font_DrawText (&t);
t.baseline.y += leading;
wsprintf (buf, "%4lu", (fuel / FUEL_TANK_SCALE));