Commit Graph

30 Commits (7361191aa51eb370050d675714ce51295d150ff1)

Author SHA1 Message Date
Dennis Schridde 9cc0a628c1 Do parts of the proposed changes in "[Warzone-dev] build issues in FreeBSD system" by Yaroslav Kolomiyets from 24.10.2006:
- SDL header includes don't use SDL/ anymore (raw Makefiles and MSVC Project adapted).


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2863 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-24 11:49:51 +00:00
Per Inge Mathisen 50e99ae933 Remove unused pietexture.c|h files and references.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2820 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-14 19:51:04 +00:00
Per Inge Mathisen 6e19e51118 Replace int x,y,z in TERRAIN_VERTEX with a Vector2i, and fix two cases of
type punned pointer casts.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2670 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-29 22:00:55 +00:00
Per Inge Mathisen b99feff92f Merge PIEVERTEX and SVMESH into TERRAIN_VERTEX and use struct assignment instead of memcpy on it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2668 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-29 21:41:38 +00:00
Per Inge Mathisen 1d2caebccd Cleanup fugly code, and add nasty hack around weird bug. See bug #9843 for more info on bug.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2644 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-27 18:16:15 +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 27f505a3f5 Some renamings and cleanups to simplify the upcoming float uv patch.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2247 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-28 13:50:16 +00:00
Dennis Schridde 7c51ddbadc - pie_MAX_POINTS became pie_MAX_VERTICES and was increased to 768 from 512. (Grim's request.)
- pie_MAX_POLYS became pie_MAX_POLYGONS.
- pie_MAX_POLY_VERTS became pie_MAX_VERTICES_PER_POLYGON and was decreased to 6 from 10. This _should_ work everywhere, I didn't see glitches. Grim recommended to even reduce it to 4, but the terrain renderer didn't like that. (When you pitched down the camera too much, the left screen side of the terrain disappeared.)
- iV_IMD_MAX_POINTS, iV_IMD_MAX_POLYS now are defined to the pie_ variants.
- scrPoints was moved into the scope of the only using function, pie_Draw3DShape2.
- aByteScale was never used, so it got removed.
- Some counters were changed from signed to unsigned.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2054 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-11 21:09:40 +00:00
Dennis Schridde 9a5fd28e0c - More generic cleanup
- Reorder debug=yes CFLAGS so the -Wno- flags are at the end
- Make skybox float-uv aware


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1890 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-19 16:51:40 +00:00
Dennis Schridde 3f2786c030 - More cleanup
- Teach for to pieblitfunc
- sed DrawTransImage to DrawImage (they were defined this way before anyway) and remove an unnecessary parameter


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1875 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-18 14:25:06 +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 25aa853f29 - Remove lots of inclusions of windows.h (and move inclusion of frame.h up)
- Remove "-%token <sval> TEXT" from audp_parser.y since it clashed with declarations in MinGW's Windows headers. It does still compile and run, but this may have harmed something anyway. Please check!
- Hack around DATADIR being defined by objbase.h in MinGW by undefining it before the inclusion of shlobj.h (incl. in main.c) This only works since the case that DATADIR is actually used on Windows is extremely rare.



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1437 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-11 14:21:45 +00:00
Gerard Krol d775cc8962 r1302 caused smoke to be nontransparent when viewed in front of the sky or fogbox. This is fixed by first drawing the sky and fogboxes and then
the terrain and other objects. (it was the other way around)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1304 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-30 19:41:44 +00:00
Gerard Krol bbd1fc594f Fix a bug introduced in r1302: Unit selection boxes were not shown or periodically disappeared.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1303 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-30 18:12:56 +00:00
Gerard Krol 290fb5ebe2 A speed up for people who are fillrate limited: 1. The stencil buffer is no longer cleared each frame when shadows are disabled. 2. The color buffer
is no longer cleared each frame, but care is taken do draw on the entire screen so that no smearing takes place. This patch gives me about +30 fps. 
(from 45 to 75)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1302 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-30 17:38:35 +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
Gerard Krol feff0ef74d Fix the skybox corners moving downwards when rotating the camera with a
factory or research menu open.
menu.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1221 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-08 19:39:00 +00:00
Per Inge Mathisen 2a14556b60 Add skybox. Patch by Gerard Krol. The maximum allowed camera tilt towards
the sky has been increased to allow easier view of the new skyline.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1179 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-24 22:53:33 +00:00
Per Inge Mathisen 78396463a7 Fixes informed by -Wextra for graphics code. Removes much redundant code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1147 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-19 17:18:50 +00:00
Per Inge Mathisen 3a1d1a6069 Clean up pieclip.c, based on patch by Gerard Krol.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1136 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-17 23:03:48 +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
Roman C 3ea3f99f73 Patch by Gerard Krol: lesswarnings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@802 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-02 20:15:08 +00:00
Per Inge Mathisen 5396324fb6 Remove lots of unused graphics code. (Did the Pumpkin guys EVER delete code?)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@686 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-03 21:33:29 +00:00
Dennis Schridde 0e288f45e7 - Replace all ASSERT(( )) with ASSERT( )
- Simplify definition of ASSERT(). Now is the same for GCC and MSVC.
  This may not work on versions older than MSVC 2005. If you experience this, please report it!

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@613 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-23 12:58:48 +00:00
Per Inge Mathisen 65175a10ca Add support for MacOSX and big endian platforms. Patch by
iamtheari@gmail.com with changes by me.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@558 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-12 10:45:49 +00:00
Per Inge Mathisen a3df2ad6c8 Another force fix. Remove more references to DirectX.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@552 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-10 13:53:26 +00:00
Dennis Schridde 194026f379 Rewritten mod loading
This patch includes:
- Strongly modified way of adding mods, maps and addons
- Make nearly everything use PhysFS (just netlog and debug stay)
- Convert several DBERRORs etc. to debug()

The new modloader works like this:
For every mod supplied on the commandline ("-mod") (maximum of MAX_MODS=100) keep it in mind (char * global_mods[]).
After initializing PhysFS do scanDataDirs(), which tries to register all possible paths, global_mods[] and maps with PhysFS. Dont check wether we succeed, only at the very end check if we got a "gamedesc.lev".

When we buildMapList(), mark "gamedesc.lev" as MOD_CAMPAIGN, "addon.lev" and every user supplied map as MOD_MULTIPLAY.

When we loadMods() modify the searchPath according to the supplied mods.
Note: T1 maps like Sk-Rush come from gamedesc.lev, are marked MOD_CAMPAIGN and thus wont load any multiplay_mods[], even if the user starts a multplayer game. Instead those maps are threated as campaignmode and will only load campaign_mods[].

This patch requires the "mp" patches to be either in ProgramDir/mp, in ProgramDir/data/mp or in ProgramDir/mp.wz
This is because one cannot add warzone.wz/mp to the search path if warzone.wz is an archive.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@436 4a71c877-e1ca-e34f-864e-861f7616d084
2006-06-16 19:10:23 +00:00
Dennis Schridde 5175535d9d Full pathname includes
Same as in r431, but now for lib/
- converted the sources in lib/ 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.

(Also fixed a double slash (//) include in src/multimenu.c)



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@432 4a71c877-e1ca-e34f-864e-861f7616d084
2006-06-02 19:34:58 +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