Fixes saving angles outside [0°; 360°].
Fixes droids failing to fire, unless the target angle was exactly divisible by 1°.
Fixes archangels missing some targets slightly, at long distances, if they managed to fire.
Possibly fixes something to do with shuffling, since moveDirDiff used to return the absolute difference, despite how it was used when shuffling.
Simpler code, 101 lines shorter.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10072 4a71c877-e1ca-e34f-864e-861f7616d084
mix of signed and floating point types. This allows us to use under and over
flow as features instead of failures. There are many conversions using DEG() and
UNDEG() in the code now - these should be read as TODO items for further work.
There is a high chance of bugs being introduced. Patch reviewed by Cyp_.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10067 4a71c877-e1ca-e34f-864e-861f7616d084
* Change dirtyHypot()'s interface to match that of hypot() (i.e. specify the coordinates relative to the origin instead of another coordinate)
* Mark dirtyHpot() as deprecated in the Doxygen documentation and suggest to use hypot() or hypotf() instead (C99 functions for which I'll provide work arounds in math-help.h soon after this commit)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6155 4a71c877-e1ca-e34f-864e-861f7616d084
* Turn some file-level comments into Doxygen comments
* Add #include guards to some headers that didn't have them yet
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4210 4a71c877-e1ca-e34f-864e-861f7616d084
- POINT -> Vector2i
- changed internalformat = getPixelFormat() to GL_RGBA in one place
- removed unused variables/functions
- proper intialisation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1792 4a71c877-e1ca-e34f-864e-861f7616d084
and reintroducing the pTile->psObject reference that was optimized
away to save memory on the PSX.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1734 4a71c877-e1ca-e34f-864e-861f7616d084
main.c : mainLoop() should now behave exactly like before the cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1659 4a71c877-e1ca-e34f-864e-861f7616d084
- Vector3i from lib/ivis also used in lib/audio, maybe want to move it to some more generic place?
- Replace iPoint with Vector2i
- Remove additional integer type declarations from pietypes.h
- Rename all iSprite to iTexture
- Various warning fixes: Unsigned/signed comparisons, uninitialized variables, declared but not defined symbols
- Replace DEBUG_BLOCK with DEBUG_MALLOC (it was virtually the same)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1245 4a71c877-e1ca-e34f-864e-861f7616d084
C macro M_PI (if available, or we will define it on our own in fractions.h).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1033 4a71c877-e1ca-e34f-864e-861f7616d084