1
0
forked from 0ad/0ad
Commit Graph

2557 Commits

Author SHA1 Message Date
a265a441fd # Fixed string handling for Windows/Linux compatibility.
* vsnprintf2: Made compatible between GCC and MSVC - it now always
null-terminates the buffer, and returns -1 on overflow. Fixes #158.
Added tests.
 * MeshManager: Use shared_ptr.expired() instead of checking for
bad_weak_ptr exception.
 * Xeromyces: Added tests for GetXMBPath, because it does unusual things
in sscanf which MSVC's /analyze complains about.
 * ConfigDB, ScriptGlue: Replaced some asserts with return-on-failure,
to avoid invalid array accesses when continuing after the assert (as
complained about by /analyze).
 * CStr: Removed "using namespace std". Added tests for handling of
invalid UTF-8.

This was SVN commit r4625.
2006-11-07 21:03:13 +00:00
75f2f9fd5f Avoid some warnings on GCC
This was SVN commit r4623.
2006-11-07 13:28:03 +00:00
f499676337 Changed player colour for actors to dark gray for Michael.
This was SVN commit r4619.
2006-11-07 02:48:27 +00:00
005cc8d355 Renamed ore to metal in C++.
This was SVN commit r4596.
2006-10-26 22:01:26 +00:00
fc026b6f30 # fix DLL version retrieval on Win64
fixes #125

I now have Win64, so this problem can be reproduced :D

windows is 'helpful' and transparently redirects accesses to
$winsysdir/drivers. grr. disable that on win64 to solve this problem.
thanks for the report!

This was SVN commit r4590.
2006-10-20 20:33:38 +00:00
b2b5d4aa57 test_archive_builder: fix further trouble with selftest
vfs: initialize initstate (works without, but is more clear this way)

This was SVN commit r4589.
2006-10-20 20:20:57 +00:00
abec0f17b9 # fix to VFS init called from self test
fixes #157
bitten again by the complex tree_shutdown code. now correctly pull rug
(memory) out from under the tree *after* it has emptied itself.

also add an 'am i initialized' indicator to VFS to allow multiple init
and also provide means of squelching the root-dir-set-multiple times
thing

This was SVN commit r4588.
2006-10-20 17:29:55 +00:00
1f268b17bb GCC compatibility (fixed CStr.h case, got rid of a few warnings)
This was SVN commit r4581.
2006-10-20 01:06:43 +00:00
0022eacdb8 Removed an assert that was causing lots of error messages on maps where the designer placed overlapping entities.
This was SVN commit r4572.
2006-10-17 22:34:47 +00:00
8ef17c2d04 #fixed minor bug in SoundGroups
fixed a bug regarding the indexing of soundgroups.  index is no longer
static.

This was SVN commit r4563.
2006-10-17 07:55:35 +00:00
2e392ac76e #updated sound cones.
minor update to set_snd_cone() error checking to allow for correct
values.

This was SVN commit r4562.
2006-10-17 07:53:42 +00:00
a8840ac0b4 #added soundcone functionality to sound manager.
#refs 138
added params to VSrc to hold sound cone info.
added set_snd_cone() function to snd_mgr.
updated vsrc_latch()

This was SVN commit r4549.
2006-10-12 07:33:40 +00:00
d36bc3a949 - Fixed a compile error on VS2003.
- Fixed some crashes that could occur when you end a game with units
mouseover'ed or with the building placer active (it tries to render them
after the game world is gone).

This was SVN commit r4543.
2006-10-11 13:37:13 +00:00
78382c14c9 Fixed some potential sources of errors.
This was SVN commit r4539.
2006-10-10 05:21:41 +00:00
4730ed0276 Fixed a bug that could cause corpses to "wiggle" if a unit died while moving.
This was SVN commit r4532.
2006-10-09 04:32:27 +00:00
4fb0f2ae5d Added CEventTargetExhausted, used by the unit AI for gather and build, as well as GetDistance and GetVisibleEntities JS functions in CEntity that are required by the JS code for these events.
This was SVN commit r4531.
2006-10-09 04:17:15 +00:00
fa229121ec Bug fixes and more game setup options.
- Added "Screenshot Mode" and "Fog of War" game attributes. (Screenshot
Mode causes units to be initialized to Hold stance instead of Aggress
and also forces LOS to be All Visible. Atlas turn on Screenshot Mode by
default so units don't try to kill each other in there.)
- Modified LOSManager to allow disabling fog of war.
- Removed some debug message spam.
- Enabled line antialiasing for aura rendering and fixed some bugs that
caused strange effects (color was not set properly for the center point,
and when a unit was both mouseover'ed and selected, the aura was drawn
twice).
- Modified Stand stance to allow retaliation on attacks (normally Stand
will attack any enemy in LOS, but this is useful if a neutral unit is in
LOS).
- Modified pathfinder to not take into account terrain slope, which is
an expensive calculation - we'll eventually take into account terrain
type instead.

This was SVN commit r4527.
2006-10-08 17:39:46 +00:00
985a4cc6d5 # Bug fixes.
- Fixed shutdown order so the console is shut down after the simulation
(fixes #152).
- Fixed CPlayer::JSI_GetColour to not create a copy of the colour
object, since that caused problems when the copy went out of scope and
the corresponding JSObject was deleted.

This was SVN commit r4522.
2006-10-08 04:56:30 +00:00
12f0720f31 More minimap fixes on game restart (recalculate everything because the map size might have changed).
This was SVN commit r4520.
2006-10-08 03:28:22 +00:00
ba4d30d149 Fixed a crash in snd_mgr.cpp that sometimes happen on fade(), although no function should really be calling it with hvs=0. Also made the minimap reupdate its texture when the game is restarted.
This was SVN commit r4519.
2006-10-08 03:07:54 +00:00
3c74758f5c Modified default water parameters.
This was SVN commit r4501.
2006-10-07 17:59:06 +00:00
2337cb203a # Order queueing for construction.
This was SVN commit r4497.
2006-10-06 14:21:16 +00:00
0df95f3e8f Things without a death animation will now disappear when killed.
Also removed some debug info and added some checks for passability in
pathfinding to avoid long searches when the source or destination is
impassable.

This was SVN commit r4495.
2006-10-06 05:38:57 +00:00
1036799546 # Units will now back away from enemies when below minimum range.
Also a small water specular strength tweak.

This was SVN commit r4481.
2006-10-04 04:47:58 +00:00
de0f893c18 Recompiled Premake on Windows. Added some headers so HAVE_PCH=0 works in MSVC.
This was SVN commit r4442.
2006-09-30 21:36:19 +00:00
d0dd86d0b4 # Fixed unit test build system on Linux
This was SVN commit r4441.
2006-09-30 21:09:02 +00:00
920cbe4dc3 #First submission of SoundGroup.h and SoundGroup.cpp ref #138
This was SVN commit r4440.
2006-09-30 20:13:11 +00:00
c1377256fa #changed VSrc_validate to accept values up to and including 2.0 for vs->pitch
This was SVN commit r4439.
2006-09-30 20:10:30 +00:00
a2432adad3 # GCC 4.1.1 compatibility
which is just "class C { void C::f(); }" code, which other compilers
seem to have ignored.
Also removed HAVE_PCH from GCC because our build system doesn't have
PCH. Added necessary headers to make it compile again.

This was SVN commit r4437.
2006-09-30 15:46:40 +00:00
d46122e60a # minor fix to sound pitch shift
(allowing positive pitch shift)

This was SVN commit r4430.
2006-09-29 01:04:25 +00:00
8f82d5ab17 Tweaked water movement speed.
This was SVN commit r4427.
2006-09-28 23:27:55 +00:00
d0b61a5318 As per request: media player.
This was SVN commit r4426.
2006-09-28 22:34:27 +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
cc8bf09cc5 Added 'float' flag to actors - fixes #153.
Fixed creation and selection of entities (and now actors) which float on
water.
Added ctrl+n/o/s keys to actor editor.

This was SVN commit r4417.
2006-09-28 02:05:56 +00:00
b6c1022566 # Improved actor-viewer tool (more viewing controls, support for random actor variations)
Also right-click-and-drag to rotate the camera vertically.
Fixed LookAt code (the algorithm in the gluLookAt man page seems to be
wrong).

This was SVN commit r4394.
2006-09-27 16:54:23 +00:00
2f53eea71a Actor Viewer: Added controls for wireframe, background colour, move-when-walking. Reduced CPU usage when 'playing' things with no animation.
Color: Moved SColor* structs into SColor.h, so they can be used without
indirectly including CVector[34]D.
Terrain: Added 'base colour', for the Actor Viewer to be able to
modulate the colour of normally-white terrain.
Removed some "using namespace std" (because it doesn't make the code
easier to read, and it defeats the point of namespaces, and the rest of
the code doesn't do it).

This was SVN commit r4392.
2006-09-26 01:44:20 +00:00
76e957ed78 Fixed compilation errors.
Slightly tidied Atlas code.
Removed old unused ScEd code.

This was SVN commit r4389.
2006-09-24 15:59:33 +00:00
ac47d2d028 Cleanup: Remove unused COverlay class
This was SVN commit r4388.
2006-09-24 12:06:36 +00:00
c47d1cc663 CRenderer: Cleanup some remnants of object types for which the Submit() method has been removed.
This was SVN commit r4387.
2006-09-24 11:56:11 +00:00
119f1452bf # Fix a crash during exit.
Refs #152

The issue was that the JSInterface_Console would attempt to write a
message on the console even after the g_Console object was deleted. Work
around this by:
1. resetting the g_Console pointer to 0 after deletion and
2. adding a null-pointer check

This was SVN commit r4386.
2006-09-24 11:48:24 +00:00
c14765989e # Introduce a Scene abstraction that allows the renderer to query visibility from multiple virtual camera positions.
This is the first step towards fixing #142

This was SVN commit r4385.
2006-09-24 11:25:11 +00:00
a63f49e582 Add gameView.culling and renderer.skipSubmit for debugging purposes.
This was SVN commit r4382.
2006-09-23 16:04:54 +00:00
e0b68b7f9f Use AddLocalProperty in CRenderer.
This gets rid of lots of boiler-plate code in JSI_* functions.

This was SVN commit r4380.
2006-09-23 12:48:06 +00:00
714e436e3c Made AT_STARTUP use an unnamed namespace, to avoid collisions between structs in different files that happen to have the same name (which sometimes causes the constructors to get mixed up by the linker)
This was SVN commit r4378.
2006-09-23 00:01:00 +00:00
a1a7dac59c # Integrated Actor Viewer and Actor Editor tools
ObjectManager: Removed ObjectTypes because it hasn't been used for
years.
Atlas: Fixed leak when saving with Xerces. Changed range of water
shininess slider.
Actor Editor: Relabelled "Freq" to "Ratio". Made modal dialogs use the
correct parent.

This was SVN commit r4376.
2006-09-22 17:43:00 +00:00
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