1
0
forked from 0ad/0ad
Commit Graph

2512 Commits

Author SHA1 Message Date
871cdb6ef9 # SwEng (reduce full recompiles by splitting up master error header)
- error codes now accessed as ERR::NO_MEM, INFO::OK etc.
- no more X-macros => the above are now recognized by visual assist
- error codes are defined by the module originating them (lib_errors has
some generic ones)
  => no full rebuild when adding some
- error descriptions are now in C++ files => can be changed without full
rebuild

added AT_STARTUP in lib.h.

This was SVN commit r4374.
2006-09-22 13:19:40 +00:00
05aadf1f12 # SwEng: remove X-macros from app_hooks (confused static code analysis)
This was SVN commit r4372.
2006-09-21 12:06:56 +00:00
7ce31a1544 Hopefully fixing VS2003 (autobuilder) error ("'operator &&' is ambiguous - could be 'built-in C++ operator&&(bool, bool)' or 'built-in C++ operator&&(bool, CEntity *)' while trying to match the argument list '(bool, HEntity)'")
This was SVN commit r4358.
2006-09-18 18:38:29 +00:00
bfae07a0bc # Added more control for water shader
(Murkiness, colour, tint, reflection tint, reflection tint strength)

This was SVN commit r4357.
2006-09-18 18:09:07 +00:00
5e28c4bebf - Fixed a bug with aura rendering that was causing a crash when rendering auras that were added to a unit after its creation (initAuraData was not called on subsequent AddAura calls). This caused objects like Settlements, Mills, Farmsteads and Temples to crash when you mouseover them since they do not gain the aura until construction is complete.
- When the map contains no territories, ignore territory-related
building placement rules.

Fixes #149.

This was SVN commit r4349.
2006-09-17 02:49:29 +00:00
e4bcc1c6a3 Gameplay fixes:
- Set the default rally point to be right on top of each building
(rather than (0,0)).
- issueCommand used to send 2 copies of a command, which caused for
example units to be trained in twos (it added some entities twice to
msgEntities).

This was SVN commit r4348.
2006-09-17 02:20:20 +00:00
6b73ba0296 - Terrain conformance should now work in Atlas as well.
- Renamed Passive stance to Hold (which is what it's called in the
design doc and GUI).

This was SVN commit r4345.
2006-09-16 21:30:23 +00:00
04b9809e0b Made CTerrain::getSlopeAngleFace even more "continous" at places where the slope changes rapidly (before, it only checked elevation forward and right, now it also looks left and up).
This was SVN commit r4340.
2006-09-16 20:16:42 +00:00
0baca62d61 # Fixes to terrain conformance and movement speed bonus.
- Simplified CTerrain::getSlopeAngleFace and made it work correctly in
all cases (before, it sometimes returned NAN and used an overly
complicated method based on 8 angle sectors instead of a "continuous"
method).
- Removed the EntityMovement event - instead, movement speed modifier is
calculated in C++ for performance.

This was SVN commit r4339.
2006-09-16 20:13:40 +00:00
6e328f1c1c Linux fixes.
This was SVN commit r4335.
2006-09-14 23:04:20 +00:00
43526b061d Linux fixes.
This was SVN commit r4334.
2006-09-14 23:03:54 +00:00
8126769863 Linux fixes.
This was SVN commit r4333.
2006-09-14 23:03:16 +00:00
33ddc81871 Linux fixes.
This was SVN commit r4332.
2006-09-14 23:02:39 +00:00
09b87e84ec #Bugfix: Shadows appeared to be rendered one frame too late
close #141

The problem was that the shadow matrices were setup in BeginFrame, but
GraphicsView calls SetCamera after BeginFrame. The solution was to move
the shadow matrix setup into CRenderer::SetCamera.

This caused a second problem because RenderReflections/RenderRefractions
used SetCamera to change the OpenGL matrices. Solved this problem by
distinguishing explicitly between the camera used for the scene as a
whole and the camera used to configure OpenGL. The latter can be a
virtual camera for shadow or reflection rendering and similar
render-to-texture effects.

This was SVN commit r4330.
2006-09-14 20:06:21 +00:00
1767fe0304 close #103
Produce a more informative warning when GL_ARB_texture_env_crossbar is
missing, and disable shadows in that case.

This was SVN commit r4329.
2006-09-14 19:15:32 +00:00
faa998b8a9 # more mouse fixes (windowed mode)
note: previous fix (clamp to 0 in screen_to_client) causes spurious
messages if mouse moves outside of the window (which is bad). "client"
coords are allowed to be negative, but "idealized client coords" (which
are defended by assert >= 0 or is_in_window) aren't.
fixes #146

This was SVN commit r4324.
2006-09-11 23:30:23 +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
aa6ca7d1e8 Modified world intersection so that you can also intersect with the water plane, which is useful for making ships move around as expected when you rightclick a spot on the water.
This was SVN commit r4319.
2006-09-10 20:38:39 +00:00
df1a779d76 # Updates to water rendering (more effects).
This was SVN commit r4318.
2006-09-10 05:31:41 +00:00
aa50820d9a #Unit AI: Aggressive, defensive and stand ground stances.
Also split Entity.cpp further, moving the rendering code to
EntityRendering.cpp and the JS interface code to
EntityScriptInterface.cpp. This makes each individual file smaller
(about 1000 lines still!) and lets them be compiled independently.

This was SVN commit r4314.
2006-09-09 00:00:23 +00:00
18720c9c20 # multimonitor mouse fix (2)
hopefully found last confusion between screen/client coords (now prefix
the former with screen_*)
SDL passes around client coords in message as Uint16, int in API calls,
Window gives/takes screen space POINT (LONG x,y)

This was SVN commit r4311.
2006-09-08 20:09:26 +00:00
c7870cfbb4 buildFileList -> buildDirEntList to emphasize that dirs can be returned. (pt2)
This was SVN commit r4310.
2006-09-08 18:41:30 +00:00
f8bff91a38 Sped up territory border rendering by caching each edge segment's terrain-conformed coordinates so they don't have to be recalculated each frame.
This was SVN commit r4308.
2006-09-08 16:03:18 +00:00
6db054f7dd # Add JS variable renderer.fancyWater to enable/disable fancy water rendering at runtime
This was SVN commit r4307.
2006-09-07 22:16:15 +00:00
c183bcde1f Territory boundaries are now rendered before transparent objects, so these can properly cover them.
This was SVN commit r4306.
2006-09-06 22:26:27 +00:00
245496e201 Fixed warnings/errors/leaks related to Xerces update
This was SVN commit r4303.
2006-09-04 20:59:21 +00:00
dave
3b41b5fbd1 Moved the include of cmath out of the #ifdef
This avoids stuff like

/usr/include/c++/4.0.0/cmath:85: error: template with C linkage
/usr/include/c++/4.0.0/cmath: In function 'float std::abs(float)':
/usr/include/c++/4.0.0/cmath:92: error: declaration of C function 'float
std::abs(float)' conflicts with
/usr/include/c++/4.0.0/cmath:88: error: previous declaration 'double
std::abs(double)' here

This was SVN commit r4291.
2006-09-03 02:17:57 +00:00
8e02ec84f9 Updated OpenAL to 1.1 (which no longer includes ALUT).
Changed player-id code a bit so the entity and actor and unit should
stay in sync more often. (The entity/actor/unit mixing still looks a bit
dodgy and unreliable, though.)
Simplified console help code.
Allowed init/shutdown to be done with the simulation/world/etc parts
disabled (so the actor viewer can load faster).

This was SVN commit r4289.
2006-09-02 21:20:25 +00:00
dave
12b060d34f isfinite etc.. is now properly defined as a macro
This was SVN commit r4288.
2006-09-02 19:41:26 +00:00
dave
0ffabbc5dc Mac compat ..
This was SVN commit r4287.
2006-09-02 17:21:49 +00:00
dave
2bb1bde51e Mac gcc complains about mixing size_t, uint etc..
This was SVN commit r4285.
2006-09-01 06:59:29 +00:00
f79af31e42 Units can no longer "track" enemies that are out of the player's LOS when performing a contact action (attack, gather, etc).
This was SVN commit r4272.
2006-09-01 00:24:26 +00:00
789c850049 # Updates to fog of war rendering.
This was SVN commit r4270.
2006-08-31 23:56:12 +00:00
c4d478a690 Fixed a crash in renderTerritories when there were no Settlements.
This was SVN commit r4267.
2006-08-29 03:46:14 +00:00
973161ed1b Territory manager now ignores territory centres that have ENTF_DESTROYED, so it will work when you delete objects in Atlas.
This was SVN commit r4265.
2006-08-28 23:05:15 +00:00
a55697e2e5 # Improved territory rendering.
- Territory boundaries are now offset slightly and drawn in player
colour, so you can see whose territory you're on the border of.
- Removed some duplication in the code by modifying a loop slightly.

This was SVN commit r4264.
2006-08-28 23:01:16 +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
5205944dce Added the concept of diplomatic stance in CPlayer.
This was SVN commit r4259.
2006-08-28 03:07:48 +00:00
ad5054205c # Optimised minimap drawing
Initially saved a little bit of time by changing it to use vertex
arrays, and then realised that disabling point-smoothing saved much more
time (from 70ms per frame on cantabrian_generated down to 2ms, which is
worth any quality loss)

This was SVN commit r4256.
2006-08-27 22:51:53 +00:00
6124ebd62c add missing file from sweng/"forward declare" commit
This was SVN commit r4254.
2006-08-27 12:17:27 +00:00
c53269caac # fix for mouse handling on multimonitor systems
+ cleanup

This was SVN commit r4253.
2006-08-27 10:33:22 +00:00
bc24974496 # sweng
forward declare SDL_event. remove SDL dependency of network code.
refs #140

This was SVN commit r4252.
2006-08-26 21:52:18 +00:00
7d3d8fdbf3 # move ps/Network into top level project (and static lib).
This was SVN commit r4249.
2006-08-26 20:25:37 +00:00
855e9bce02 # macosx compat
.. by removing support for WAV. see rationale in source; in short, we
don't need it and it's not worth the minimal trouble of adding freealut
dependency.

entityhandles: remove old comment

This was SVN commit r4247.
2006-08-26 13:40:18 +00:00
9fc485c9a6 # Fixes to the line segment frustum test.
This was SVN commit r4245.
2006-08-25 19:31:01 +00:00
147d4f2bd3 # Fixed minor shadow bug
CBound operator+= updated the minimum value or the maximum value, but
never both. (I think the operator+=(CVector3D) has always been buggy
(because it assumes min<max, which isn't true of empty bounds), and I
propagated the error to operator+=(CBound) ages ago.)
Added test cases, and fixed.

This was SVN commit r4244.
2006-08-25 12:52:26 +00:00
pyrolink
50e5e9acd9 # Aura and territory rendering
-Auras now take additional parameters from XML, containing a tag for r,
g, b, and a.  No line thickness parameter yet.
-For territories, added function to frustum for determining if line
segment passes through the frustum.

This was SVN commit r4242.
2006-08-25 06:04:33 +00:00
6732af1ba9 # Updates to the order system, including shift-click queueing.
This was SVN commit r4240.
2006-08-25 04:24:06 +00:00
e53242284f # Updates to unit-testing system.
Premake: Changed to use PCH when compiling tests.
CxxTest: Got rid of /Wp64 warnings. Changed TS_ASSERT_STR_EQUALS to
print both strings on failure.
win_internal: Added the bits that CxxTest::Win32Gui needs (because
Win32Gui is now compiled with PCH and uses our sysdep headers).
Disabled test_cache_policies, because it took long enough for me to read
its name.

This was SVN commit r4237.
2006-08-22 21:38:53 +00:00
dave
bf95b26a80 int to GLint
This was SVN commit r4235.
2006-08-22 03:00:31 +00:00