1
0
forked from 0ad/0ad
Commit Graph

60 Commits

Author SHA1 Message Date
ed62b49a74 Renderer simplification: Remove now-unused texgen stream.
This was SVN commit r9190.
2011-04-06 22:09:58 +00:00
7339a346e3 Renderer simplification: Remove fixed-function shadowing. Remove now-unused diffuse-only model lighting mode.
This was SVN commit r9187.
2011-04-06 22:07:13 +00:00
29dd635d3b Fix decals and LOS texture in Actor Viewer, by slightly reducing use of globals.
Fix particles in Actor Viewer.
Expand terrain in Actor Viewer.
Change background to black so it blends with the LOS texture more
nicely.

This was SVN commit r9172.
2011-04-05 20:32:03 +00:00
97c934ad1c Apply unit shading colour in shader renderpath.
Don't adjust the shading colour of units in FoW (the shading comes from
the LOS texture instead).

This was SVN commit r9142.
2011-04-02 12:04:19 +00:00
d295dacb9b # Add new renderer mode based on GL_ARB_fragment_program.
Change lighting model for new maps to allow better overbrightness.
Cache player colours instead of loading from scripts every time the
renderer wants them.

This was SVN commit r9123.
2011-03-26 20:17:21 +00:00
d24c93237c # Initial version of terrain decal textures.
Rejig CModel to support non-mesh-based props.
Avoid redundant recomputation for non-moving CRenderableObjects.

This was SVN commit r9055.
2011-03-13 19:22:05 +00:00
fc2c54c39f # Optimise terrain renderer.
Batch patch splats by texture match.
Use VBOs for patch indices.
Fixes #722.

This was SVN commit r9053.
2011-03-13 19:06:33 +00:00
02e7eb69ff # Add solid black sides to the map, to hide underwater terrain.
This was SVN commit r8886.
2011-02-03 14:36:54 +00:00
c710e718aa Windows fixes
This was SVN commit r8884.
2011-02-03 02:33:37 +00:00
fe21c5e023 # Rewrite fog-of-war rendering.
Disable shadows when only 2 TMUs available.
Clean up some other rendering code.

This was SVN commit r8882.
2011-02-03 01:12:24 +00:00
566bbf0fa0 Fix assertion failure when running pre-game GUI
This was SVN commit r8877.
2011-01-30 02:14:44 +00:00
03c75100ab # Fix terrain blending logic.
Add terrain priority rendering mode in Atlas.
Fix terrain painting in Atlas to be less profligate with priority
values.
Support hotloading of blend textures.
Clean up some trivial things.

This was SVN commit r8872.
2011-01-29 16:31:48 +00:00
19dbbb816d Changed all references from old CLogger API to use the new API. Removed old API. Fixes #247
This was SVN commit r8791.
2010-12-05 08:41:55 +00:00
3407983e98 remove no-longer needed (and non-reentrant) MICROLOG as per today's meeting
This was SVN commit r8542.
2010-11-06 19:11:40 +00:00
602b99c397 Fix water rendering in "reveal map" mode.
This was SVN commit r8512.
2010-10-31 22:07:57 +00:00
e1082e5adb Fix warnings
This was SVN commit r8162.
2010-09-23 12:54:16 +00:00
924d1219a7 # Add fog-of-war.
Move Vision component to C++, for more efficient FoW processing.
Disable FoW on demo maps.

This was SVN commit r8160.
2010-09-23 12:13:13 +00:00
67a94572ec # Add new texture loading system with automatic compression.
Replace almost all texture uses with calls to the new system.
Add some anistropic filtering to terrain textures.
Let Atlas load terrain texture previews partly-asynchronously by
polling.
Fix inefficient texture colour determination for minimap.
Remove unused global g_TerrainModified.
Change GUI texcoord computation to be less efficient but to cope with
dynamic texture changes.
Fix GUI renderer effects leaving bogus colour state.

This was SVN commit r8099.
2010-09-10 21:02:10 +00:00
1936acc8a8 Fix #557 (Minor improvements to non-fancy water fresnel effect), based on patch from hex539
This was SVN commit r8046.
2010-08-29 14:13:39 +00:00
6c7b82130c # Redesigned the camera control system.
Add shift+wheel (and Q/E, and ctrl+arrows, and ctrl+WASD) to rotate the
camera.
Restrict the rotation and zoom to narrow ranges. (Constraints can be
disabled in the dev overlay).
Smooth the movement and rotation.
Fix some stupid whitespace.
Fix some const correctness.

This was SVN commit r7930.
2010-08-13 13:26:29 +00:00
d2cf6ceb88 less global variables: make most uses of g_VFS explicit (required for another app that has two VFSes), g_yres is no longer required by cursor module
This was SVN commit r7686.
2010-07-04 10:15:53 +00:00
828400d82e # Support floating units in new simulation system.
Fix rendering of underwater lines.
Fix rendering of unit selection outlines in Atlas.
Remove some obsolete hotkeys.

This was SVN commit r7589.
2010-05-27 23:23:53 +00:00
cf85004f61 Windows build fixes.
Remove unused function.

This was SVN commit r7557.
2010-05-20 20:05:38 +00:00
56bb858802 # Delete a lot of obsolete simulation code.
This was SVN commit r7555.
2010-05-20 18:09:23 +00:00
e140aa7baf Avoid running the old simulation code in the background when it's not needed.
Optimise GUI updates to only occur when necessary.
Switch to more peaceful music after starting the game.

This was SVN commit r7492.
2010-05-01 16:20:58 +00:00
58e79bfdbe Force fancywater off if fragment shader extensions are not supported. See #270
This was SVN commit r7385.
2010-03-21 14:18:15 +00:00
8a52113e60 huge cleanup and conversion of most string handling (especially paths) to unicode
please note: format strings must be %hs for char* arguments and %ls for
wchar_t*

This was SVN commit r7161.
2009-11-03 21:46:35 +00:00
1743645fd3 Simplify the overly-complex CppDoc-breaking file headers
This was SVN commit r6832.
2009-04-18 17:51:05 +00:00
c9fa7f13d9 Add GPL header
This was SVN commit r6830.
2009-04-18 17:00:33 +00:00
4e32136b4c # Fixed ambient terrain lighting when shadows are disabled
This was SVN commit r6808.
2009-04-05 18:31:05 +00:00
228859da99 # Fix water-related crash on some video drivers
Detect some errors loading fancy-water fragment shader, and disable
fancy water.
Fixes crash with Mesa on 945GM (which doesn't support fragment shaders,
though it advertises the extensions).

This was SVN commit r6773.
2009-03-24 21:00:41 +00:00
3c411dd174 large batch of Dehydra static code analysis fixes
(mostly passing arguments by const reference and checking LibError
return codes)

This was SVN commit r6214.
2008-07-12 10:45:11 +00:00
c0ed950657 had to remove uint and ulong from lib/types.h due to conflict with other library.
this snowballed into a massive search+destroy of the hodgepodge of
mostly equivalent types we had in use (int, uint, unsigned, unsigned
int, i32, u32, ulong, uintN).

it is more efficient to use 64-bit types in 64-bit mode, so the
preferred default is size_t (for anything remotely resembling a size or
index). tile coordinates are ssize_t to allow more efficient conversion
to/from floating point. flags are int because we almost never need more
than 15 distinct bits, bit test/set is not slower and int is fastest to
type. finally, some data that is pretty much directly passed to OpenGL
is now typed accordingly.

after several hours, the code now requires fewer casts and less
guesswork.

other changes:
- unit and player IDs now have an "invalid id" constant in the
respective class to avoid casting and -1
- fix some endian/64-bit bugs in the map (un)packing. added a
convenience function to write/read a size_t.
- ia32: change CPUID interface to allow passing in ecx (required for
cache topology detection, which I need at work). remove some unneeded
functions from asm, replace with intrinsics where possible.

This was SVN commit r5942.
2008-05-11 18:48:32 +00:00
b755ddefda remove all author/modified by tags.
make include guards consistent.

This was SVN commit r5040.
2007-05-07 16:33:24 +00:00
73683b6109 # SwEng
. the massive renaming undertaking: camelCase functions -> PascalCase.
. add some cppdoc.
. minor additional renaming improvements: e.g. GetIsClosed -> IsClosed
. in entity code, replace constructs like "pvec = new vector; return
pvec; use *pvec; delete pvec" with a simple stack variable passed as
output parameter (avoid unnecessary dynamic allocs)
. timer: simpler handling of raw ticks vs normal timer (less #if)

This was SVN commit r5017.
2007-05-02 12:07:08 +00:00
6cfb96855a # Added initial play-testing support in the scenario editor.
Atlas: Added simulation play/pause/reset controls; automatically plays
while recording cinematics.
FFmpeg: Fixed broken output files.
MapReader: Fixed entity loading.
ObjectHandlers: Made unit preview more robust when the preview unit gets
destroyed.
Various: Replaced manual matrix construction with SetYRotation call.
Turned some more CStr8 back into CStr.
h_mgr: Optimisation - don't calculate slow debug-output strings if
they're never going to be seen (since it takes a few hundred
milliseconds).
TerrainRenderer: Made more tolerant of accidental negative times.
Entity: Fixed m_refd being out of date when deleteAll is called. Fixed
problems when doing an initializeAll...deleteAll...initializeAll
sequence.
SCN: Removed non-useful AoE3Ed code that never did anything.
SVNLog: Made output more valid and made titles more descriptive, so it
works properly in FF's live bookmarks.

This was SVN commit r4779.
2007-01-17 03:25:20 +00:00
3f017c418c Removed some header files from header files.
Changed SoundGroupTable to use the right string type for the comparison.
Also changed from CStr8 to CStr because I prefer that spelling (and it's
more consistent with most other code).

This was SVN commit r4771.
2007-01-13 22:44:42 +00:00
8f82d5ab17 Tweaked water movement speed.
This was SVN commit r4427.
2006-09-28 23:27:55 +00:00
2fac02f40a # Actor Viewer tool: added controls to toggle shadows, ground and polygon counts.
Elsewhere:
Disabled stack-trace test because it gives me assertion failures.
Fixed some uses of snprintf (which doesn't always add a \0 to the end of
the string), then got bored so there are still lots of broken ones.
Probably should replace snprintf with something more like snprintf_s
(but non-fatal) or something.
Made CLogger output valid HTML (except for the potentially dodgy
doctype). Removed its memory-logger, since we never use it and MICROLOG
can be used instead for quick execution-tracing.
Added tests to make sure CLogger handles long strings properly (which it
didn't). Made CLogger not a singleton, so it can be tested sensibly.

This was SVN commit r4424.
2006-09-28 20:41:12 +00:00
1056788a6a - Added support for translating texture coordinates in fancy water, so it can move in some direction like the non-fancy water can.
- Removed a debug assertion that could occur in windowed mode if you
moved your mouse above or to the left of the window (client x and y >=
0); instead, negative client coordinates are now clipped to 0. (The
coordinates can't actually stay negative because we are casting them to
uints, so that would give very large values.)

This was SVN commit r4323.
2006-09-11 22:35:44 +00:00
df1a779d76 # Updates to water rendering (more effects).
This was SVN commit r4318.
2006-09-10 05:31:41 +00:00
789c850049 # Updates to fog of war rendering.
This was SVN commit r4270.
2006-08-31 23:56:12 +00:00
35e91718c5 # Added tool for viewing models and animations outside the game.
Atlas: Added ActorViewer. Moved GL canvas into separate class for shared
use. Disabled message-handling callback while blocked on the game, and
stopped creating dialog boxes inside the game thread in order to avoid
deadlocks (hopefully). Support multiple Views (for independent sets of
camera/update/render code). Recalculate territory boundaries when
necessary. Changed default list of animations to match those currently
used by actors.
# Tidied up more code.
Moved some more #includes out of .h files, to minimise unnecessary
compilation.
MathUtil: Deleted unused/unuseful macros (M_PI (use PI instead), M_PI_2
(use PI/2), MAX3, ABS (use abs)).
ObjectManager: Removed some ScEd-specific things.
Unit: Moved creation out of UnitManager, so units can be created without
adding to the manager. Changed CStr8 to the more conventional CStr.
app_hooks: Removed warning for setting multiple times.
win: Restored SEH catcher.
GameSetup, GameView: Removed RenderNoCull, because it doesn't seem to do
what it says it does ("force renderer to load everything") since we're
loading-on-demand most stuff and it doesn't seem especially useful since
we'd prefer to minimise loading times (but feel free to correct me if
I'm wrong). (And because it crashes when things need to be initialised
in a different order, so it's easier to remove than to understand and
fix it.)
PatchRData, Renderer: Work sensibly when there's no game (hence no LOS
manager, water, etc).
LOSManager: Use entity position instead of actor position when possible.
TerritoryManager: Allow delayed recalculations (so Atlas can issue lots
of move+recalculate commands per frame).
Cinematic: Non-pointer wxTimer, so it doesn't leak and doesn't have to
be deleted manually.

This was SVN commit r4261.
2006-08-28 17:36:42 +00:00
3195893d1c # MacOS X compat (part 1)
- u_anim_name disambiguation
- fix implementation of finite (use our fpclassify instead of compiler's
routine)
- รค -> ae
- workaround for MAP_ANONYMOUS
- fix GLint in ogl.cpp
- add include for SIZE_MAX in string_s
- avoid PIC clobbered error and speed up rdtsc a bit
- add include for stat

This was SVN commit r4170.
2006-07-26 14:04:52 +00:00
2b0e5d0b42 # Added parameters to control water murkiness.
This was SVN commit r4013.
2006-06-22 21:11:18 +00:00
5814e10126 # complete revamp of build system in preparation for automated self tests.
* now splits everything up into independent static libraries.
* fixed a great deal of incorrect #include statements. all headers must
now be specified with their full path relative to source. exception: if
file being included and including file are in the same directory, no
path needed.
use <> when relying on the build system's include path (e.g. for system
headers and external libraries, e.g. boost), otherwise "".

* temporarily renamed maths/Vector2D to Vector2D_Maths to avoid
conflict. these should be merged.
* hacked around VC linker stupidness when building static libs; texture
codecs must now be registered manually.

This was SVN commit r3931.
2006-06-02 03:56:24 +00:00
1a8cb85e08 Some water-related bug fixes:
- Underwater tiles will be tested against the frustum with a bounding
box including the water surface, so the water gets drawn even if the
terrain is off-screen.
- Transparent objects (e.g. trees) should now interact with water
properly. I did this by rendering them twice, first before the water, so
it overlaps the underwater pieces, then after, so the above-water pieces
overlap the water (the water now writes Z as well as colour to allow
this). Before, only the first pass was done, so the tops of trees were
covered by water. There might be more efficient ways of doing this - the
best could be for the transparent objects to be drawn with a shader that
always either discards a pixel or writes alpha of 1.0 instead of using
2-pass depth write then colour write.

This was SVN commit r3904.
2006-05-29 00:49:09 +00:00
67ede785d5 Updates to water and a fix for a rendering bug with bar textures
This was SVN commit r3902.
2006-05-28 21:58:56 +00:00
f8de293512 Water manager will now load uncompressed TGA's rather than DDS'es.
This was SVN commit r3900.
2006-05-28 09:55:44 +00:00
106f59c5c7 # Added fancy water.
This was SVN commit r3897.
2006-05-28 02:13:32 +00:00