Commit Graph

35 Commits (eb3ac2e356f59f798a328174d644fafba99be00a)

Author SHA1 Message Date
Per Inge Mathisen a71086a039 Prune dead code, and do not bother to dynamically allocate memory to save 12 bytes per polygon.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4037 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-13 20:46:29 +00:00
Per Inge Mathisen a8f88483ac Fix bug in OpenGL lighting mode which would mess up GUI. Also do not
recalculate the surface normal for every polygon for every frame! It
is already calculated when we load the PIE model, so let's use it.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4032 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-13 19:09:44 +00:00
Dennis Schridde 76fddad000 Generic cleanup. Mostly remove struct keyword where unnecessary.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3585 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-28 00:02:28 +00:00
Giel van Schijndel 53abc0a73b * Correctly fix "clever" use of malloc __without__ introducing a memory leak in the process (r3305 introduced one)
* Make sure we use the same signdness in IMAGEDEF as we did before r3302
 * Use a correct format specifier ("%u") for printing an unsigned integer
 * Turn a bunch of UDWORDs which don't necessarily need to be UDWORD into unsigned ints as one of those __does__ need to be an unsigned int (i does, for the printf format specifier)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3398 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-06 21:21:31 +00:00
Per Inge Mathisen bfb542e69e Remove unused animation defines
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3377 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-06 12:12:26 +00:00
Per Inge Mathisen 52cca82fb2 Change the binary IMG files into CSV text files.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3302 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-01 21:33:47 +00:00
Per Inge Mathisen 53aa930d6e Turn IMD min and max dimensions into vectors.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3111 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-21 17:34:23 +00:00
Giel van Schijndel c51bd8ae10 * Get rid of a large quantity of unused parameters
* Turn some signed integers ("int" or "SDWORD") into unsigned integers where it made more sence (and signed integers caused warnings about comparing signed with unsigned integers)
 * At some places cast to an unsigned integer (where the type of the expression is a signed integer but the result of it logically _always_ is an absolute value)
 * Remove unused struct-type EVENT_INIT
 * Convert use of malloc->memcpy->free to one single realloc call (and now make sure to actually check realloc's return value, which wasn't done with the malloc call)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3037 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-10 23:15:46 +00:00
Per Inge Mathisen ce56538fba Revert commit r2258 which made texture coordinates into floating point. It
caused bug #9631, wrong team colours displayed.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2292 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-30 20:20:06 +00:00
Dennis Schridde 723f9bfaa1 Use float texture coordinates in the range 0.0-1.0.
Any fixes, if necessary, should be applied on loading.
In the image code (IMAGEDEF) this did not work, so OLD_TEXTURE_SIZE_FIX is applied during rendering.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2258 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-29 13:32:21 +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 75d5e135c5 Remove some useless comments for iIMDShape, also remove some unnecessary fields and variables.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2193 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-25 20:58:57 +00:00
Giel van Schijndel 12f21d0b0c * Replace usage of uint8_t with char for C-strings; while (u)int8_t works perfectly nice for numbers it isn't nice for text (char-array)
* To make sure we still have the guarantee that a char is 8bit I've inserted a static assertion for this (CHAR_BIT == 8)
 * Use exact length types for lobbyserver

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1821 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-05 12:01:59 +00:00
Giel van Schijndel fb8094aae2 * Use uint8_t instead of char since we depend on the precise size of this structure
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1727 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 23:48:20 +00:00
Giel van Schijndel f9783ff29f * Remove unused member Version from IMAGEHEADER
* Use PHYSFS_close after we've read from the image file

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1724 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 19:28:54 +00:00
Giel van Schijndel 575a78836a remove unused member PalID from IMAGEDEF
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1723 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 18:51:52 +00:00
Giel van Schijndel b5154ae4a3 * Remove redundant and unused string from IMG-header (PalFile)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1722 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 18:24:37 +00:00
Giel van Schijndel cdea281ca6 * now load resources of type "IMG" directly from their file rather than an intermediate memory buffer
* make definitions of IMAGEHEADER and IMAGEDEF safe for loading on systems with different sizes for datatypes
 * Allocate IMAGEDEF in a function of its own: iV_AllocImageFile (uses only one malloc call so we don't need to go and toy with lots free() calls on failure)
 * Use PHYSFS_read* functions for endian correctness (rather than the endian_*word stuff)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1719 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 15:50:56 +00:00
Dennis Schridde f29d7647f6 It's probably safer with these types... (Because of the previous commits)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1704 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-25 18:03:48 +00:00
Dennis Schridde 1014259054 This should enable floating point precision in IMD (.pie) files.
It should even render them as floats. I wasn't able to see a difference after modifying some PIE files, though.
This patch is heavily inspired by Watermelon's work. (Namely piefloat.patch)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1681 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-21 19:56:07 +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
Per Inge Mathisen 1b5cbb1c1e Remove flags from IMDShape since they were unused. Clean up IMD loader some
more. Remove unused GetLastHashName() and SetLastHashName().


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1544 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-28 10:36:21 +00:00
Per Inge Mathisen 534472ce72 Remove used but ineffectual BSP IMD code. BSP data from PIE files not yet removed.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1533 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-23 20:40:41 +00:00
Per Inge Mathisen ea932d1033 Remove more unused flags
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1531 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-23 18:45:24 +00:00
Per Inge Mathisen 9e1d57e718 Permit compilation without binary space partitioning. To test this, comment out
the #define BSPIMD line in lib/ivis_common/ivisdef.h header.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1529 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-23 17:59:13 +00:00
Stefan Huehner 9eda7db8a1 Code-Cleanup: remove a lot of type,function,variable
declarations/definitions which are not used anywhere.



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1421 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 17:01:53 +00:00
Gerard Krol a4c540f24a New shadow code, easier on the fillrate of your graphics card, but uses
more cpu time. Buildings have static shadows, the shadows of 
components/droids get recomputed every frame. Rain/bullets/other effects 
do no longer drop a shadow.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1281 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-24 22:53:18 +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
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
Giel van Schijndel 68d435097e enabled some more code to compile with a C++ compiler without -fpermissive (i.e. there should be *less* compile-time errors now)
* moved several #defines to the enums where they belong
 * changed some datatypes on declaration
 * prepended casts to malloc calls (using typeof() style)
 * changed some (void*) casts to (void**) where required
 * removed several #defines and there instances and then replaced them with their corresponding values from an enum

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@969 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-07 23:50:30 +00:00
Dennis Schridde 141a421d04 Patches by Christian Ohm:
002 - PSX removal part 2
019 - Remove PSX conditionals
020 - Remove IsPSX variable
021 - Remove unused parameter PSXSeqNumber from seq_AddSeqToList and seq_AddTextForVideo


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@861 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-26 11:20:44 +00:00
Per Inge Mathisen f52bebc31f Remove some dead playstation code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@504 4a71c877-e1ca-e34f-864e-861f7616d084
2006-07-24 17:52:24 +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