Commit Graph

33 Commits (01f5d86886d66ad2a4c50252947043a0293734e2)

Author SHA1 Message Date
Cyp bdca765f06 Change connector locations and pie_TRANSLATE from floats to ints.
Probably fixes desynchs involving different projectile sources.

Hope no floats are left to affect the game state...
2010-11-20 20:44:40 +01:00
Cyp 5c431a36d1 Convert muzzle location from floats to integers. 2010-10-23 18:02:56 +02:00
Cyp 125e7ba9ab Convert pie_MatRot[XYZ] to use uint16_t instead of float. 2010-10-08 11:28:31 +02:00
Giel van Schijndel fd740148c3 piematrix: remove unused function pie_RotateTranslate3iv
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-07 16:10:34 +02:00
Giel van Schijndel 3390509fe7 piematrix: use floats instead of fixed point DEG degree values for rotations
Allow passing of degrees as floats to the pie_MatRot[XYZ] functions.

This commit further helps in getting rid of fixed point math.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11708 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:42 +02:00
Giel van Schijndel a6cb949c97 piematrix: prepare for removal of fixed point math
* Change some of the PIE matrix functions to accept floating point
   values in the API.
 * Rename the badly named constant `_MATRIX_ID` to `Identitymatrix`

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11707 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:42 +02:00
Buginator edb644a03b Fix (and add missing) headers to files.
2009  Warzone Resurrection Project -> 2010  Warzone 2100 Project

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11298 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-28 18:58:33 +02:00
i-nod c1beb1f42b Remove 256 scale value from texture matrix. Closes #1678.
PIE3 format will expect 0.0-1.0 floating points in texture coordinates values.
PIE2 and IMG(GUI textures) formats still using 8-bit integers in texture coordinates values.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10297 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-16 15:47:55 +01:00
Cyp b81d6685ce Replace all use of trigSin/trigCos/trigIntSqrt and SIN/COS with the corresponding new i* functions. Remove the old ones.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10154 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-05 14:43:36 +01:00
Buginator b60b1ad10b Fix prototype to match function's definition.
(was missing a const)


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7381 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-10 19:18:13 +02:00
Per Inge Mathisen 29a2b2fe35 Change SDL types to stdint.h defined types. Do not depend on SDL.h included system headers.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7238 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:30 +02:00
Dennis Schridde aac41748dc Bump copyright
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6617 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 18:01:48 +00:00
Dennis Schridde 1bc654f8b5 Add float variant to pie_RotateTranslate
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5118 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-14 21:15:59 +00:00
Dennis Schridde a8dc02f672 Generic cleanup, often variable initialisation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3939 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-07 15:09:03 +00:00
Dennis Schridde 411545852f Cleanup
- theSun becomes static (+setter/getter)
- normalsOnTile() doesn't use global vars anymore
- pie_SurfaceNormal3fv() now works more like the pievector.h functions
- pie_SurfaceNormal3fv() was cleaned up and became inline function in piematrix.h
- Use more pievector.h functions
- Remove unnecessary multiplications/divisions from calcTimeIllum()


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3592 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-28 01:29:20 +00:00
Per Inge Mathisen e0b92752db Constify some piematrix functions
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3576 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-27 21:05:30 +00:00
Per Inge Mathisen 895ba1c8cd Make less of piematrix.c globally exported.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3575 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-27 20:57:26 +00:00
Dennis Schridde d75b63cdb3 Cleanup water-moving:
- Remove now unnecessary offset parameter from pie_DrawTerrainTriangle
- Move GL code from display3d.c to piematrix.c


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2935 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-01 16:43:28 +00:00
Dennis Schridde 6b8e636fc3 Revisit data loading (image/texture related) and remove unecessary fVertex pietype.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2195 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-25 22:37:48 +00:00
Dennis Schridde db49a55df0 More constiness and documentation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1770 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-30 01:50:01 +00:00
Dennis Schridde 49f8259226 More cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1679 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-21 18:57:11 +00:00
Dennis Schridde b8f038d37a Cleanup IMD loader.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1677 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-21 18:25:46 +00:00
Dennis Schridde 041e086d53 - -Sint32 pie_RotateProject(SDWORD x, SDWORD y, SDWORD z, SDWORD* xs, SDWORD* ys)
+Sint32 pie_RotateProject(Vector3i *v3d, Vector2i *v2d)
  This removes the necessity of the wrapper pie_RotProj.
- Also changed a few "Vector3i null" to "zero" for less confusion.
- And removed an unused variable that hid behind an assignment.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1674 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-21 14:06:31 +00:00
Per Inge Mathisen c511ab63b6 Fix crash introduced in commit r1661 in function pie_RotateTranslate3iv,
where the y and z parameters were not switched, as they should be.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1670 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-20 21:41:48 +00:00
Dennis Schridde 009b61447c - Remove unused code
- Remove duplicated code/macros
- VECTOR3D->Vector3i
- Create float variants of normal functions to simplify Watermelon's float-PIE patch


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1661 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-20 11:05:28 +00:00
Dennis Schridde 5bd6e84852 - Change droid->direction to float, this should fix issues with vtols entering a loop around the target
- Make trigonometry tables static and remove usage of FRACT macros (trig.c)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1542 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-27 10:21:17 +00:00
Dennis Schridde 2a74242eb3 - Replaced various vectors with Vector3i and Vector3f (idea by Watermelon)
- 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
2007-03-16 16:20:16 +00:00
Per Inge Mathisen 2b416b26db Remove silly pie_ROTATE_PROJECT macro
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1159 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-21 23:02:14 +00:00
Per Inge Mathisen daaac4b5e3 Clean up redundant copy&paste code. Patch by Gerard Krol with
some stylistic and extra changes by me.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1158 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-21 22:38:52 +00:00
Dennis Schridde 49ceba7503 Add GPL notices to all sourcecode files.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1014 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-15 20:09:25 +00:00
Dennis Schridde 728b9a9913 - Commit patches "code cleanup: void" and "code cleanup: const" by Stefan Huehner
- Replace every occurence of VOID with void (and LPVOID with void*)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@703 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-13 09:09:05 +00:00
Dennis Schridde 27fadd14cf - converted the sources in src/ to use full path includes instead of just the filename.
- marked places where lib/ivis_*implementation* (eg opengl) is needed, because of incomplete lib/ivis_common.

Should improve the understanding of interfaces and code organization.



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@431 4a71c877-e1ca-e34f-864e-861f7616d084
2006-05-27 16:37:17 +00:00
No Author 5ba7ddac6b Create final repository structure.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@362 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-28 17:47:08 +00:00