Commit Graph

830 Commits

Author SHA1 Message Date
38a5e807ff # Fixed Atlas on Linux
Added call to XInitThreads, for required thread safety.
Fixed conversions between wchar_t and XMLCh strings. (Not tested much
yet.)
Fixed COLLADA too.

This was SVN commit r4964.
2007-03-20 01:06:34 +00:00
d2935684ff Collada: Integrated skeleton XML with game. Added some tests. Fixed memory leak when loading ill-formed XML.
Added TestLogger, so tests can check the right log messages were
produced.

This was SVN commit r4960.
2007-03-16 23:32:10 +00:00
fa45d214b3 # Added support for COLLADA skeletal animations.
Moved COLLADA-loading code into separate class, since it now handles
both PMD and PSA.
Desingletonised CSkeletonAnimManager, moved into CGameView.
Made Atlas load its icons with buffered IO, for possible efficiency.

This was SVN commit r4934.
2007-03-01 18:52:53 +00:00
pyrolink
a4c0ea9d07 #Cinematic changes
-Eliminated tracks, rotation is per node

This was SVN commit r4929.
2007-02-27 02:14:18 +00:00
c2b119e721 # Linux fixes.
Disabled CONFIG_USE_MMGR by default, since it seems unnecessary and it
makes debug builds slow (extremely slow under Valgrind) due to symbol
lookups when allocating memory.
Fixed minor warnings and errors.

This was SVN commit r4927.
2007-02-25 21:11:57 +00:00
bdbb2bcb16 # Updated unit animation code.
Added UnitAnimation class, to act as the interface between the entity
and actor. (Currently doesn't work very well, but it does make
animations loop smoothly and sometimes kind of makes them stay
synchronised.)
Fixed corpse animation - it now plays the final frame of the death
animation before turning static.
Fixed update/interpolate timings.
Added JS function saveProfileData.
Updated ffmpeg library.

This was SVN commit r4880.
2007-02-10 03:09:52 +00:00
7130b389db Atlas: Disable selected tool before saving, so unit-placement previews don't get saved as real units.
Misc: Removed redundant code.

This was SVN commit r4857.
2007-02-04 14:56:38 +00:00
8d0a7170f6 # Slightly tidied up string code.
CStr: Indented comments more consistently. Made some parameters
pass-by-reference, made some others not. Removed some useless methods -
Length (use length or empty), GetSubstring (use substr), LCase/UCase
(use LowerCase/UpperCase). Removed operator[] bounds-checking because
VS2005 does that anyway.
Maybe fixed noncopyable warnings on VS2003.

This was SVN commit r4828.
2007-02-01 14:46:14 +00:00
27b6ffe2d6 # housekeeping
sorry, update-workspaces + rebuild is necessary (moved boost/utility
into PCH)

- ps/ : committed additional documentation on behalf of Joe.
- lib/ : HAVE_C99 - replace with specific e.g. HAVE_NPRINTF; intended to
help with MacOSX compat (by no longer requiring us to lie about
STDC_VERSION)
- NO_COPY_CTOR -> boost::noncopyable

This was SVN commit r4825.
2007-02-01 01:34:17 +00:00
41cf5c6139 CinemaTrack: Avoided crashing in certain cases.
dll_ver: Fixed invalid free when running with OpenGL 1.1 drivers on
Vista.
GameSetup: Fixed spaces between sentences in error message.

This was SVN commit r4820.
2007-01-29 17:46:28 +00:00
adc8c64724 # General tidying.
Encryption: Deleted, just in case anyone was ever tempted to use it.
debug_warn: Removed redundant quotes around message.
oglCheck: Added error number to displayed messages, to help when
debugging errors.
Simulation: Fixed syntax confusion.
Entity: Preserve unit ID across entity-template changes (e.g. upgrades).
Atlas: Made some floating-point code less dodgy. Support number keys to
change player while placing units.

This was SVN commit r4814.
2007-01-27 02:36:33 +00:00
3573c4a4e3 # Optimisations for Linux
GCC: Don't export symbols from DSOs by default - see
http://gcc.gnu.org/wiki/Visibility

This was SVN commit r4812.
2007-01-26 18:26:45 +00:00
ee3243ff92 # Fixes for simulation speed in scenario edtior. Various code cleanups.
Game, Simulation, etc: Separated 'update' and 'interpolate', and made
'update' return whether it's going fast enough (so callers can decide to
do more updates per render). Changed some time variables to 'double' so
they have enough precision in long games.
Atlas: Added "Fast" playback button. Made simulation sometimes go at
real-time speed, if it's just slightly too slow at rendering.
VertexBuffer: Removed some non-useful glGetError calls.
Entity: Commented out redundant Tick code. Fixed syntax error in
disabled code that confused the IDE.
Aura: Changed string code again, to simply use ASCII instead of UTF-16.
(SpiderMonkey seems to handle it just as efficiently, for small
strings.)
Misc: Some more minor header-file cleanup.
SVN log: Added feed link.

This was SVN commit r4807.
2007-01-24 20:17:28 +00:00
5c8250ddb8 # Added primitive memory-allocation counting
Profiler: now shows "mem allocs" for the previous frame (only in MSVC
Debug mode).
Aura: got rid of a couple of hundred allocations per frame.

This was SVN commit r4805.
2007-01-21 03:33:52 +00:00
d618551fe8 Singleton: removed "cunning trick", because someone pointed out that it is very undefined behaviour and is completely unnecessary nowadays
This was SVN commit r4800.
2007-01-20 14:20:31 +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
38755cc589 # improvements to app_hooks
thesis pointed out more dependencies that had to be stomped on.
0ad-specific apphooks are now in pyrogenesis.
added function AH_IS_DEFINED (useful for ogl_tex, which now has its own
default version of a hook)

This was SVN commit r4765.
2007-01-13 18:37:51 +00:00
ec69bccb2c # Tidied up some code.
- Made some classes not be singletons, since there's no reason why they
should be.
 - Made them non-global too (because globals have unclear lifetimes, and
make it harder to test things, etc). They're now owned by CGameView and
CWorld, and mostly accessed via g_Game or arguments (vaguely trying to
avoid the graphics code calling into the game code).
 - Moved CGameView implementation into pimpl, so the header file isn't
so heavy.
 - Changed a few pointers into references, to indicate that they're
never NULL.

This was SVN commit r4756.
2007-01-08 01:56:46 +00:00
1926317975 # Linux/ICC fixes
- added "--icc" Premake flag, to disable PCH and set different warning
flags
 - added required headers
 - changed debug_warn to not generate constant-expression-in-conditional
warnings
 - changed FAM popup-warning into a log message, so it's not so
irritating
 - Atlas: pass around wxGLCanvas instead of wxGLContext, because the
context is sometimes just NULL

This was SVN commit r4733.
2007-01-02 18:11:00 +00:00
0bb0df5b2c # new year's cleanup (reduce dependencies, clean up headers)
- remove headers always included from PCH
- nommgr.h is only included ifdef REDEFINED_NEW (allows leaving out the
mmgr stuff)
- in lib/*.cpp, moved the corresponding include file to right behind the
PCH (catches headers that aren't compilable by themselves)
- byte_order no longer depends on SDL
- add debug_level (another means of filtering debug output; needed for
thesis)
- split posix stuff up into subdirs (lib/posix and sysdep/win/wposix).
makes including only some of the modules (e.g. sockets, time) much
easier.

This was SVN commit r4728.
2007-01-01 21:25:47 +00:00
0462336cf2 Fixed compilation on Linux
This was SVN commit r4719.
2006-12-21 16:53:51 +00:00
603401dc09 # Bug fixes.
- Fixed a crash that was happening in pathfinding on maps where some
tiles had invalid texture names (from earlier versions of the game).
- Releasing the mouse over the minimap while dragging a selection band
will no longer cause the view to move there. Unfortunately, the bandbox
still won't properly "release". The bandbox input routine should ideally
be placed at a higher priority than the GUI, separate from the other
Interact.cpp routines.

This was SVN commit r4711.
2006-12-20 05:41:54 +00:00
f6de818ea8 # Added support for automatically loading 3d models in the COLLADA format.
* CMeshManager: Changed to check for .pmd and .dae files and convert
and cache as appropriate.
 * CModelDef: Fixed misinterpreted doc comments in.
 * lib:
   * Fixed init/shutdown sequences to support multiple VFS-using tests
correctly.
   * Fixed most reported memory leaks from the new leak-reporting test
system.
   * Fixed error when trying to dump debug data about fonts after
unloading them.
 * Added sphere dae/pmd data for tests.
 * Added output buffering to DAE->PMD converter.
 * Added precompiled COLLADA converter DLLs.
 * Removed old redundant conversion script.

This was SVN commit r4709.
2006-12-20 03:22:24 +00:00
8b7d1fcfb3 * Moved command-line options list from system.cfg into readme.txt. Updated the list to reflect reality. Removed -novbo option because you can use the .cfg file instead.
* Changed log files to trigger standards mode in Firefox (to be
consistent with other browsers), by making it valid HTML5. Changed the
font and some spacing.
 * Made CLogger default to ignoring messages if it hasn't been
initialised yet, instead of crashing.
 * Added leak reporting to the unit tests.
 * Renamed mods/_tests to mods/_test.xero, since it's only used by
Xeromyces and the other tests use mods/_test.otherstuff instead.
 * Fixed Atlas compilation on Windows.
 * Moved Atlas's DLL-loading code into a separate class, so it can be
shared.

This was SVN commit r4707.
2006-12-20 03:09:21 +00:00
13f2e3ca0c Tried compiling with ICC9 on Linux, which raised various issues:
* Fixed some bugs with incorrect macro usage (SDL_BYTE_ORDER vs
SDL_BYTEORDER, {MSC,GCC}_VER vs {MSC,GCC}_VERSION, OS_WIN/OS_UNIX in
projects where they're not defined).
 * Removed some redundant declarations of g_Console.
 * Removed some unnecessary semicolons.
 * Removed some unused variables.
 * Added throw specification to operator new.

This was SVN commit r4698.
2006-12-16 01:01:15 +00:00
207d54e825 # Added command-line launching of mods.
Run with "-mod=official" for the default behaviour (same as specifying
nothing), and with "-mod=official -mod=antigravity -mod=starwars" to
load multiple mods (with the later-mentioned ones having a higher
priority than the earlier ones).
Added "_test.minimal" mod which can be used instead of "official" - it
provides just enough for the actor viewer to run, plus one unit skin.
Added test script for the COLLADA converter, which converts the models
and creates some actors in a "_test.collada" mod. Then the actor viewer
can be run with _test.minimal + _test.collada, to see if it's working
correctly.

This was SVN commit r4690.
2006-12-09 15:47:12 +00:00
cbafd43eea # Changed handling of command-line arguments.
* Added CmdLineArgs, which does the parsing then lets various pieces of
code check for whatever arguments they want.
 * Made Atlas exit out of main() cleanly, instead of calling exit()
itself.
 * Disabled the global exception-catching in unit tests, via a
entry_noSEH, so it doesn't make debugging harder.
 * Added nice printing of CStr in unit test failure messages, and added
comparison of vector vs constant array.

This was SVN commit r4688.
2006-12-09 14:39:52 +00:00
2c71c22045 # Added basic video recording.
* Included FFmpeg library for video encoding. (LGPL, dynamically
linked.)
 * Added 'record' button to cinematics - plays the selected track at a
fixed framerate, and saves the output to a video file (preferably
MPEG4). Slightly lacking in reliability and features (fixed at 640x480,
no choice of codec, probably crashes horribly if any problems occur
while encoding, etc).
 * Moved icon bitmaps out of mods directory. Added 'record' icon.

This was SVN commit r4676.
2006-12-05 02:35:00 +00:00
6ed4ad6519 Added a hotkey to toggle rendering of territory outlines. (Currently "T").
This was SVN commit r4675.
2006-12-05 02:08:52 +00:00
ea766c5663 # Made XML writer more robust.
XMLWriter:
 - Added automatic escaping of attribute values, character data and
comments to ensure well-formedness.
 - Removed choice of encoding (it's always UTF-8).
 - Removed option for DOCTYPE / DTD; changed to standalone="yes".
 - Added pretty-print toggle.
 - Fixed bug when calling XML_Text multiple times per element.
 - Added tests.
MapWriter:
 - removed some redundant braces

This was SVN commit r4673.
2006-12-03 17:13:22 +00:00
4d8133f785 # Fixes for MSVC
Use _WIN32/__WXMSW__ instead of OS_WIN.

This was SVN commit r4668.
2006-12-01 20:34:28 +00:00
835003d525 # Fixes for GCC
Renamed 'not' to 'negated', since 'not' is special in C++. Added some
includes, etc.

This was SVN commit r4665.
2006-11-29 23:37:10 +00:00
pyrolink
0d0a767fa2 #Trigger framework, terrain flattening on building placement
This was SVN commit r4648.
2006-11-24 19:45:04 +00:00
db045c330b # Made Atlas compile on linux
graphics: basic terrain passibility
atlas: lots of changes to make atlas compile under linux
unix/X: more clipboard support - copy from 0AD to other programs
unix/debug: use sys_get_executable_name instead of hard-coded paths
... and lots of other misc. changes

This was SVN commit r4640.
2006-11-12 04:02:36 +00:00
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
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
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
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
2337cb203a # Order queueing for construction.
This was SVN commit r4497.
2006-10-06 14:21:16 +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
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
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
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
ac47d2d028 Cleanup: Remove unused COverlay class
This was SVN commit r4388.
2006-09-24 12:06:36 +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
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
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
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
33ddc81871 Linux fixes.
This was SVN commit r4332.
2006-09-14 23:02:39 +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
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
c7870cfbb4 buildFileList -> buildDirEntList to emphasize that dirs can be returned. (pt2)
This was SVN commit r4310.
2006-09-08 18:41:30 +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
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
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
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
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
pyrolink
b62f53620f #Cinematic editor
This was SVN commit r4234.
2006-08-22 02:24:44 +00:00
dave
a20db60354 Variable type change from uint to size_t when calling functions in vfs
This was SVN commit r4230.
2006-08-19 20:01:26 +00:00
b6aa68b677 Reorganized some building placement code.
This was SVN commit r4208.
2006-08-08 16:00:47 +00:00
fce69aaa7f # - Housekeeping
# - Territory restriction rules for buildings.

This was SVN commit r4206.
2006-08-08 03:45:13 +00:00
44fe226dd2 # Housekeeping and pathfinder enhancements / optimization when dealing with ranged actions.
- Modified Xeromyces to no longer automatically convert element and
attribute names to lowercase, so that we can have camelCase names. We
should now be able to convert all the multi-word entity properties, like
pass_through_allies, to camelCase, like passThroughAllies, which is more
consistent with the rest of our JavaScript naming conventions. To
support the existing code that assumes lowercase element names, I made
the getElementID and getAttributeID methods (used in the EL and AT
macros) ignore case, and I changed any code that directly accessed
element names to use the right case. CEntityTemplate now converts
Names_LikeThis to names_likeThis (changing each separate "word" in the
name to camelCase). Changed the version letter in XMB filenames from A
to B to support this without requiring people to delete old XMBs.

- Enhanced the pathfinder's handling of contact paths, resulting in a
very large speedup for actions like attacking, construction, etc. The
problem was that the pathfinder used to not count a given state as the
goal unless it was exactly coincident with the target location. This is
fine when you order a unit to go exactly to a certain spot, but if
you're ordering a unit to build, gather or attack something, then the
target tile is impassable (because your target is there) and therefore
the pathfinder never declares a state final. As a result, the pathfinder
tries hundreds of extra tiles in case there is a long path that gets to
the goal, and after failing to find any path that reaches the goal, it
gives you one to the closest point it got to. To fix it, I made the
pathfinder take into account a radius around the goal in which it's OK
to be, which depends on the size of the target unit and the range of
your action.

This was SVN commit r4186.
2006-08-01 03:41:21 +00:00
554b9e537e - Changed actor selection sets to CStr8 rather than CStrW.
- Added more comments in ScriptableComplex.h/inl explaining how they are
split up and when to #include the inl.

This was SVN commit r4180.
2006-07-29 22:02:11 +00:00
dbe4451da2 # Housekeeping.
ScriptableComplex.inl is now only #included in CPP files that need it
(files that use functions from it directly), which is a total of 5
files, so recompiling after modifying it should be a lot faster.

This was SVN commit r4176.
2006-07-27 21:20:30 +00:00
1da24b9cee # housekeeping - comments+rationale for yesterday's CJSComplex cleanup
This was SVN commit r4175.
2006-07-27 12:54:47 +00:00
cc22d9b73e # Housekeeping.
- Jan and I cleaned up CJSComplex and put all the function bodies and
helper classes in ScriptableComplex.inl. This also required minor
changes to other files.
- Removed a debug message from Technology.cpp.

This was SVN commit r4173.
2006-07-27 02:42:35 +00:00
2261231ffa # Housekeeping.
Jan and I implemented a number of changes:

- Converted SClassSet to vector.
- Refactored get/set ClassSet from string into methods in CClassSet.
- Turned pass-by-value string params in getCollisionObject, CEntity
constructor and CEntityManager into pointers.
- Simplified processChooseMovement.
- Merged CalculateRun and CalculateHealth into a single, simpler
CalculateRegen + helper functions.
- Changed the way regen works so the rates read in the XML act as rates
(before, they were the number of seconds until the entity will be fully
regenned, which is a bit counterintuitive).

This was SVN commit r4167.
2006-07-24 01:33:26 +00:00
90bfaf9c99 # housekeeping + bugfix in file trace recorder
entity.cpp: fix indenting (was using space instead of tab)
replace all instance of & operator=( with NO_COPY_CTOR
trace: fix bug reported by michael: if trace file is huge, indices would
keep on being recorded but data was cut off after a certain limit,
leading to invalid pointers (into garbage data)

This was SVN commit r4158.
2006-07-21 01:11:23 +00:00
c817566222 # housekeeping
replaced all (*) CStr / CStrW by-value params with const reference. hoo
boy.

please always perform this optimization (actually standard idiom) when
writing the code - it takes little work, tells the next guy that the
string won't be modified, and makes a large performance difference.

(* where possible.. a few require other changes and will follow later)

This was SVN commit r4151.
2006-07-20 14:37:58 +00:00
8eae620b11 # More work on technologies.
Techs will now apply to units created after they are researched.

This was SVN commit r4143.
2006-07-18 23:59:48 +00:00
845b606763 # Updates to the tech system, and bug fixes.
Techs: Made a separate list of technologies for every player, rather
than array fields in CTechnology. This also involved changing the
tech-related JS functions.

Bugs:
- PS_MAX_PLAYERS should be 8 (the way it's used for array sizes, etc
indicates that it's the maximum possible number of players ever, but it
used to be 6 while the game had 8 players).
- When you changed a CJSSharedProperty that was inherited, m_Inherited
was set to false, so it was no longer inherited by subsequent entities
you created. They got initialized to garbage values as a result.

This was SVN commit r4138.
2006-07-18 04:17:46 +00:00
4630745625 # Updates to the entity bar display system by Andrew.
Bars and rank icons now scale with zoom level. I've left in the old
render functions for now, but they can be removed later.

This was SVN commit r4120.
2006-07-16 19:32:48 +00:00
85959bb073 Fixed a crash that happened for me in release mode when pressing the shift key. In Hotkey.cpp:594, there was a line like
if( !unified[(*itKey)-UNIFIED_SHIFT] ) accept = false;

This was causing an index out of bounds when the key at *itKey was
AND'ed with the HOTKEY_NEGATION_MASK and thus became greater than 65536
and way out of bounds of the array. For now I added a check that *itKey
< HOTKEY_NEGATION_MASK, but maybe this is not the intended usage.

This was SVN commit r4111.
2006-07-14 00:14:44 +00:00
ac71eefbff Removed and #include for JSI_Entity.h.
This was SVN commit r4094.
2006-07-13 19:27:02 +00:00
a56ec5bdcd Some cleanup - renamed CBaseEntity to CEntityTemplate, and removed JSInterface_BaseEntity.h and JSInterface_Entity.h (which were unused).
This was SVN commit r4091.
2006-07-13 03:29:33 +00:00
397a350e45 svn:ignore auto-generated test .cpp files.
Territories: Fixed memory leaks.
Atlas: New section-toolbar. Fixed colour of brush grid. Moved open/save
into File menu. Added 3D-ish lighting control. Added 'busy'
notifications.

This was SVN commit r4079.
2006-07-12 14:49:10 +00:00
1034a980fe Added code for placement of socketted buildings.
This was SVN commit r4073.
2006-07-09 23:12:37 +00:00
7926b3d93c # Some groundwork for territories.
Entities with traits.is_territory_centre == true will act as territory
centres, and territory areas are calculated and displayed on the
minimap. It remains to display these areas in the game view and to make
Civ Centres "socketable" so you can build them on Settlements to claim
them.

This was SVN commit r4070.
2006-07-08 22:40:01 +00:00
pyrolink
a95c72d0c1 Upgraded console (text wrap, help text), cinematic stuff
This was SVN commit r4065.
2006-07-06 03:17:44 +00:00
1f663eaf14 (fix: didn't see compiler error message, oops.)
This was SVN commit r4049.
2006-06-29 22:59:10 +00:00
600adac871 # housekeeping and bugfix in Loader queue
remove old instrumentation, fix warnings, add measured timing results
Loader: bugfix: no more memory leak whenever callback returns a warning
code. this was a loophole in the callback return value docs.

This was SVN commit r4048.
2006-06-29 22:52:50 +00:00
5586f29c5f # housekeeping
remove no longer needed timers and debug_printfs.
delete JSInterface_*Entity.cpp files because they are empty and cause
linker warnings.

This was SVN commit r4043.
2006-06-26 12:47:23 +00:00
77faccb6cb # small fixes.
add translate_free (avoids mem leak in translate API)
debug: when skipping errors but an unexpected one is raised, trigger a
warning.
test_archive_builder: properly clean up archive; decrease number of
files to speed things up.

This was SVN commit r4035.
2006-06-25 15:35:28 +00:00
7cb82ada2f # lots of housekeeping/fixes
premake: document extra_params
ogl: remove EXT_ symbols, use glext instead
adts: move cache into separate file (also remove old cache impl)
move SDL files in sysdep/win to libraries/SDL
ScopeTimerAccrue: change #ifdef spaghetti into templated policy class
app_hooks, define VOID_FUNC to FUNC(.., (void) )
look at stalk walk code; any reason not to work on Win64?
replace ERR_TEX_CODEC_CANNOT_HANDLE with INFO_* - not an error. also
ERR_SYM_SUPPRESS_OUTPUT ERR_SYM_SINGLE_SYMBOL_LIMIT
wdbg_sym: only import RtlCaptureContext once (not every walk_stack)
add sys_last_error (!GetLastError on win32); converts to text in
display_error, also show sys_last_error and errno
app_hooks: move i18n impl out (belongs in pyrogenesis)
fixes to string_s test.

refs #124

This was SVN commit r4020.
2006-06-23 17:41:55 +00:00
ee4c7965dd # merge all local changes; moving over to new SVN server
* app_hooks: add display_error; can be used by atlas to override our
dialog box
* lots of small fixes (mostly pertaining to headers)
* debug: clean up display_error, protect from reentrancy, fix a few edge
cases (e.g. error message from dtor -> exit pressed -> suppress all
subsequent errors)
* delay_load: add warning: NLSO ctors are unreliable since we're
compiling into static lib

This was SVN commit r4009.
2006-06-22 18:26:08 +00:00
92b9c07f95 Restoring SVN repository:
Greek basket texture

# New Greek vases

# housekeeping
documentation fix: trailing / in directory names is mandatory

# Atlas: Sky texture selection; save with maps

Atlas code tidying: Slightly nicer syntax for defining command handlers,
and some explanation of how it works

Automated build.

This was SVN commit r4008.
2006-06-21 22:37:31 +00:00
823c93ce47 # bugfixes (string, pthread, screenshot writing)
- CStr : early out if empty, don't deref iterator (crashes in VC8)
- init VFS In archive_builder test
- wpthread: avoid race condition when creating threads. cleanup; replace
debug_warn with error codes
- Util: file_buf_free wasn't specifying FB_FROM_HEAP ->
http://www.wildfiregames.com/forum/index.php?showtopic=10085

This was SVN commit r4006.
2006-06-11 17:16:24 +00:00
039f26f0c3 Fixed editor brokenness.
# More useful environment (water, lighting) editing
(now saved into the map files).
Fixed no-PCH a bit.

This was SVN commit r4002.
2006-06-11 07:03:59 +00:00
77c59070c1 # Various gameplay updates.
- Added per-player resource pool and modified the GUI and entity scripts
to work with it.
- Modified unit creation functions so the unit is always assigned a
player before firing its initialize event, so that this event can deduct
population, etc from the right player.
- Fixed various small bugs, like a unit not cancelling all of its queued
items when it dies, or buildings not costing anything.

This was SVN commit r3998.
2006-06-10 03:05:16 +00:00
8d06d8601b A few organization changes:
- Removed "Base" from the Technology and Formation class names (it
doesn't make sense because these don't use inheritance).
- Modified the tech methods a little so a player ID is passed to
applyEffects, not getTechnology.

Also added a game startup script which will eventually set up player
resource pools and give them their civ techs.

This was SVN commit r3996.
2006-06-09 23:07:11 +00:00
a553182f6a More header-file rejigging.
This was SVN commit r3993.
2006-06-09 18:32:00 +00:00
d39a4fac21 Premake: include precompiled.h in the project; set up dependencies for Atlas projects.
# Attempted to make compilation faster
by including as little as possible in some .h files, and moving it into
.cpp.
Fixed BaseTechCollection memory leak.

This was SVN commit r3992.
2006-06-09 16:44:16 +00:00
9542ecdd7e # boatload of fixes to get self-tests to compile+mostly run
refs #117

stub_impl_hack: defines a function otherwise provided by main.cpp

remove old self_test.h contents (e.g. TEST); superceded by cxxtestgen
TS_ASSERT etc.
only include self_test from a test (otherwise, cxxtest include dir won't
be set)
cxxtest won't run tests named only "test"; add more descriptive name

FIXES uncovered by self tests
lib: infinite loop in log2
lockfree: incorrect params

This was SVN commit r3979.
2006-06-08 19:03:43 +00:00
76cbda8713 This was SVN commit r3971. 2006-06-07 22:15:29 +00:00
40f29a8345 Some fixes for techs.
This was SVN commit r3954.
2006-06-07 01:04:41 +00:00
pyrolink
e4c40841b2 #Configurable game speed, techs, elevation attack bonus
-techs are not operational yet
-set the game speed with setSimRate() in the console or in the config
file under hotkey.speed.increase or hotkey.speed.decrease
-made a few other small fixes

This was SVN commit r3950.
2006-06-06 06:31:17 +00:00
b8c131c431 # housekeeping
* zip.h removed old test symbols
* path_util fixed bug in mixed-separating-slash handling
* renamed ERR_OK to INFO_OK; allows searching for "return ERR_" to yield
all actual errors (instead of having to filter out ERR_OK)

This was SVN commit r3945.
2006-06-04 22:27:40 +00:00
8bba11af2b remove vfs_display; greatly speeds up startup when -quickstart isn't specified, although that is strongly recommended.
This was SVN commit r3937.
2006-06-03 21:21:59 +00:00
54c1508db6 Renamed autobuilt ps.exe to pyrogenesis.exe, to match the new project layout.
Fixed Atlas project creation.
Improved VS2005 linking speed.
Added work-in-progress environment (water, sun) editing to Atlas.

This was SVN commit r3935.
2006-06-03 05:08:32 +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
5f7855f7f0 Simplification of #Include paths: relative names are used only for included files in the same directory as the including file; everything else uses the full path relative to source/.
This was SVN commit r3930.
2006-06-02 02:10:27 +00:00
9124f7266c Tidied up some include paths
This was SVN commit r3929.
2006-06-02 01:01:39 +00:00
e0dfbe719d # add boatload of self-tests
(these are the old self-tests ripped out as well as new ones)
note: have not run yet; several would surely fail if they run (can't
anyway until cxxtest is installed)

This was SVN commit r3912.
2006-05-31 04:17:45 +00:00
1ead202b24 # add CppDoc comments; prepare for automated testing
ia32: prepend CPUCap enum names and rdtsc with ia32 to avoid conflicts.
move all self tests into separate headers as required for Cxxtest.
adts: remove some dead code.

add CppDoc comments to debug, lib (with heavy cleanup), tex, tex_codec,
snd_mgr
slight improvements to path

tex: refactor; split out tex_decode and encode to allow self-test

This was SVN commit r3911.
2006-05-31 04:01:59 +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
f0615df318 # Initial work on fancy water.
Also, horizon height (skybox vertical offset) can now be set from the
console with renderer.horizonHeight.

This was SVN commit r3893.
2006-05-25 05:46:17 +00:00
e6be7e36d2 FILE_WRITE_TO_MOD is now FILE_WRITE_TO_TARGET
ERR_(FILE|PATH)_NOT_FOUND -> ERR_TNODE_NOT_FOUND, ERR_NOT_(FILE|DIR) ->
ERR_TNODE_WRONG TYPE
path_util:
- path_append: bugfix (no more extraneous /); add support for appending
slash
- path_replace: bugfix (no more warnings for expected error)
- add path_last_component, path_foreach_component
- move some defs to the header that belong there from vfs.h/path.h

file: add dir_create; move PosixFile definition here and provide
accessor for fileio
vfs: no longer automatically append slash; instead, make sure caller
does
vfs_mount:
- mount_realpath: bugfix (strip trailing /), interface improvement
- document write_target; clarify MULTIPLE_MOUNTINGS; add support for
creating real dirs
vfs_tree:
- refactor TDir::add into find, add, find_and_add
- fix TDir and TNode for dir-ends-with-slash requirement
- split up lookup into lookup_cb and path_foreach_component
- add support for inserting dirs with given mount point: tree_add_path
(needed when mounting)

wposix: get rid of weird PATH_MAX = 260 (Win32 weirdness)


TextureManager: remove no longer needed SupportedTextureFormats
GameSetup, Xeromyces: setup XMB location to data/cache/mods/official/xmb
Util: HardcodedErrorString now uses error_description_r
VFSUtil, i18n: fixes for dir slash issue

Closes #79, #80

This was SVN commit r3874.
2006-05-17 14:48:18 +00:00
18eb72a25a Added Perlin noise class, which will be useful for water.
This was SVN commit r3871.
2006-05-17 03:53:54 +00:00
275a73851c # Added sky box as well as repair, heal and trample actions.
Closes #31, #32, #37. Refs  #46.

This was SVN commit r3865.
2006-05-16 04:41:37 +00:00
6a4816a512 # avoid complaining if console history file doesn't exist
This was SVN commit r3848.
2006-05-04 15:27:06 +00:00
2a2d115f4d # Updates to construction: Added a start construction net message and made the selected units start working on a newly placed building after you place it.
This was SVN commit r3845.
2006-05-04 07:40:31 +00:00
pyrolink
39e89c406e #Fixes to flank penalty, notifications, sectors, terrain conformance. Added speed bonus based on terrain slope.
-added NOTIFY_ORDER_CHANGE, which is used for flank penalty instead of
idle.
-entity speed is now actions.move.speed_curr for the current speed, but
the original speed is still actions.move.speed.  Changes take place in
entityEventMovemen.

This was SVN commit r3840.
2006-05-04 04:14:48 +00:00
66b898dca5 # Fixed saving over archived files
This was SVN commit r3837.
2006-05-04 02:56:06 +00:00
2e1374c3ed # add cmdline param to mount a mod
syntax is -mod=NAME, where NAME is a subdirectory of data/mods/ that
contains the mod (either loose files or archives)

This was SVN commit r3820.
2006-04-26 17:08:08 +00:00
3d26549032 Fixed file properties - removed svn:executable and svn:keywords (left over from CVS conversion?) from all files; set svn:eol-style=native for *.cpp, *.h (and fixed files with inconsistent line endings)
This was SVN commit r3802.
2006-04-23 23:14:18 +00:00
2fbb899bb5 # Animate props.
tex: Reverted recent WARN_RETURN(ERR_TEX_CODEC_CANNOT_HANDLE) changes,
since (I think) it shouldn't warn about that being returned (because it
intentionally happens frequently).
XMLWriter: Trivial inconsequential optimisations (avoiding temporary
strings).

This was SVN commit r3801.
2006-04-23 22:22:18 +00:00
01700f0e9f # refactor VFS path-related functions; split into separate files
- replace all hardcoded strrchr functions (used to get extension / file
name only) with path helper functions (found a few bugs in the process)
- split VFS-independent path helper functions into lib/path_util (allows
including by other files without pulling in entire VFS)
- renamed pp_* functions path_package_*
- split remaining path helper functions into lib/res/file/path
- vfs: split should-reload logic out of vfs_reload_changed_files

- lib: add comments to rand/xrand

This was SVN commit r3796.
2006-04-22 16:26:16 +00:00
8bb97e63cd # Work around a problem in ATI's binary Linux driver
This was SVN commit r3789.
2006-04-21 03:06:57 +00:00
fd08924348 # VC2005, GCC compatibility
Used new library include paths.
Renamed ia32.asm to ia32_asm.asm, so we don't need Premake modifications
to avoid object-file conflicts with ia32.cpp.

This was SVN commit r3784.
2006-04-20 01:33:57 +00:00
6f9da5da7a # refactor vfs/file code (unify interface, dispatch between providers via virtual functions)
1) unify open/io interfaces: no longer distinguish between FileIo /
AFileIo. instead, one FileIo struct is always used; the
provider-specific data is embedded within it. this avoids the need for a
"base class", which is hard to access (f.fc.flags is ugly)
2) rename x_* redirector to xfile_* and move out of vfs_mount into
separate file
3) xfile is now implemented via "virtual functions" (avoids a lot of
boilerplate code)
4) xfile was too closely tied to vfs_mount (used internal fields);
fixed.

remaining lib/res files: made all flag parameters uint (not int) for
consistency

This was SVN commit r3776.
2006-04-19 15:19:04 +00:00
c81df59294 # Include headers for compilation without PCH
This was SVN commit r3774.
2006-04-19 05:30:02 +00:00
8a11f53011 # More consistent terrain-space coordinate names
# Removed more ancient unused code
# Partial VC2005 compatibility for Atlas editor / AoE3Ed
# Terrain overlay rendering system; used to implemented Atlas brush
display
# Renamed 'right' to 'left'

This was SVN commit r3771.
2006-04-17 20:02:51 +00:00
89c3fad6f3 # Fixed a bug with the rendering of unit rank icons.
This was SVN commit r3768.
2006-04-14 08:33:52 +00:00
6fbce9c355 # refactoring
- color: the sse codepath is now detected and activated from within
color.cpp, which avoids making ia32 dependent on the color header. it's
called from gamesetup!InitRenderer.
- move VFSUtil::EnumDirEnts to vfs.cpp!vfs_dir_enum - allows it to be
used from within lib/ without dependency on ps (annoying for other
projects)

This was SVN commit r3764.
2006-04-14 06:32:05 +00:00
68d4d6cd77 # Removed some ancient unused code
This was SVN commit r3758.
2006-04-13 21:50:44 +00:00
34637ba5dc # refactor sysdep API, split it into parts
- split up detect.cpp into snd, cpu, gfx (headers were already split)
- rename detect functions for more clarity (e.g. get_cur_vmode ->
gfx_get_video_mode)
- rename lib/res/sound/snd to snd_mgr to avoid conflict with
sysdep/snd.cpp
- waio: set errno in aio_rw (addresses bug #73)

This was SVN commit r3745.
2006-04-10 20:12:25 +00:00
pyrolink
f2e867e239 #Bar borders and angle penalty
-Changes to notifications. They take different parameters now-see
template_entity_script.js.  You can choose to destroy the notifiers
yourself in the script (useful for idle)
-Added "idle" event with registerIdle and registerDamage to assist with
the angle penalty.
-Bar border stuff
-Angle penalty is set up but untested-it just needs to use
this.getAttackDirections() to find the number of directions the entity
is being attacked from.  The penalty is specified in template_unit

There is a problem when the game exits-it attempts to destroy the
notifiers in entity.cpp's constructor, where it calls
DestroyAllNotifiers().  The problem is that the notifiers don't exist
any longer because they've been destroyed. I would fix it but I'm
leaving for vacation (Jason told me it was OK to comitt). Hope it isn't
too much of a problem.

This was SVN commit r3732.
2006-04-08 22:34:54 +00:00
6365c30098 # Fixed failure when saving maps
FilePacker: removed code that used to be in a #ifdef SCED
Changed to PSERROR system, for error-reporting consistency

This was SVN commit r3728.
2006-04-04 04:14:10 +00:00
44901d38b9 # further documentation and improvements to lib/res/file code
FILE_CACHE_BLOCK flag used more safely (copied in afile_read)
add file_sector_size (set from sysdep code)
documented and organized FileFlags
moved publically visible file_buf* decls to file.h; add FileBufFlags
file_buf_get: moved to file_io and renamed because it is not a part of
the file_buf manager itself
FILE_BLOCK_SIZE no longer exposed to users - it's an implementation
detail. for alignment purposes, you should use file_sector_size (less
wasteful)
add page_aligned allocator (mmap)
write buffers now allocated via file_buf_alloc(FB_FROM_HEAP) (avoids
wasting cache space)
append trace runs into the trace file (-> better input data for archive
ordering)
document lib_errors.h
tex_load: add provision for file_flags, used by ogl_tex_load to prevent
caching file data

simulation, entitymanager: add perf measurements

This was SVN commit r3725.
2006-04-03 21:28:10 +00:00
001e951066 Autobuilder: Notify autologger of commits.
Interact.cpp: Added category to LOG calls.
Atlas: Renamed all handler source files, so they won't conflict with
other files of the same name. (Fixes bug #77)

This was SVN commit r3721.
2006-04-03 21:08:58 +00:00
d9944f9524 # remove last occurrences of old ScEd-specific code
This was SVN commit r3719.
2006-04-02 16:27:34 +00:00
bd96a1ab7c # fix unit rank texture loading (was crashing when displaying log message)
problems: for a "vector<CStr>::iterator it", passing *it to a varargs
function taking const char* (baad because compiler cannot invoke the
operator const char* and therefore screws up the stack); incorrect
parameters to LOG().
thanks go to philip for diagnosing the problem!

This was SVN commit r3717.
2006-04-02 07:22:23 +00:00
pyrolink
3408b078b7 #Unit formations and rank textures
-Added functionality for "casting" and creating net messages (without
JS)
-Rank textures-specified in XML
-Formations-currently don't attack correctly (i.e. travel like mobs) and
don't switch to their movement formations when tasked to go somewhere
(the pathfinder doesn't give any heads up about destination reached, so
there's no way to change back to the original).  Also, base switching is
untested so no garuntees for next and prior formation things.

This was SVN commit r3710.
2006-03-31 03:30:34 +00:00
73506eb076 #Code cleanups related to renderer
Remove the OPT_NOPBUFFER and OPT_SHADOWCOLOR options and related
variables
since they weren't really used.

This was SVN commit r3694.
2006-03-26 17:46:18 +00:00
8fd256c458 #Use EXT_framebuffer_object when available
* noframebufferobject configuration in system.cfg can be used to
  disable EXT_fbo (in case drivers are flaky etc.)
* shadow texture size now honours the OpenGL maximum texture size as
reported
  by the implementation

This was SVN commit r3693.
2006-03-26 17:36:33 +00:00
f45c44ca09 Rotated various things (terrain texture UVs, default light and camera angles) by 45 degrees.
Map XML: Store camera position. Stopped using DTDs (because they make it
too hard to change the XML structure without breaking all the old XML
files).
Game.h: Include fewer files, to make compilation sometimes faster.
World: Changed some things to not be singletons, since they were
(ab)used as CWorld members.

This was SVN commit r3670.
2006-03-21 20:55:45 +00:00
2e0a312913 update load time estimates. CSimulation is quite high and in need of optimization!
This was SVN commit r3664.
2006-03-18 21:25:03 +00:00
c2f13c689e Load default player data from XML
This was SVN commit r3658.
2006-03-18 04:38:41 +00:00
d3f57744d9 Refactored actor variation system, and added support for entity-level selections (controlled by the current animation).
Avoided tooltip error message.
Avoided noisy warnings when textures fail to load.

This was SVN commit r3653.
2006-03-17 03:59:49 +00:00
8b3e5759eb Fixed GC bug (plus some potential ones that didn't seem to actually cause problems).
Added \r\n->\n conversion in JS ReadFile functions.

This was SVN commit r3644.
2006-03-16 03:45:31 +00:00
254a2df794 Console: Avoid inserting unprintable characters, e.g. when doing ctrl+c.
This was SVN commit r3640.
2006-03-15 19:19:03 +00:00
201aae41d9 file: pp_set_dir fix: safely handle case where pp.path already contains data; add TFile* member to DirEnt
vfs: add VFS_MOUNT_ARCHIVABLE flag; allow archive builder to only
include files from mount points with this set.

VFSUtil: make EnumDirEnts more efficient while at it (uses PathPackage
and filename storage)

This was SVN commit r3618.
2006-03-09 21:37:23 +00:00
e0280949fd file_cache: fix: add buf/size combo to exact_buf_oracle if file_io rounded size up.
trace: split code out of vfs_optimizer (was getting too large)
vfs_mount: expose API to unmount all (needed to be able to delete
archives after building)
vfs_optimizer: safely handle empty connection/node lists;
refactored+documented
vfs_tree: eliminate 'file in root dir' warning (can happen easily
enough)

rest: fixes/minor tweaks

This was SVN commit r3610.
2006-03-07 05:44:34 +00:00
12c2a28774 - Added getColour() to Player JS interface
- Set stamina to 0 by default for units without stamina

This was SVN commit r3590.
2006-03-03 20:57:45 +00:00
0fd85b76db automatic archive builder now functional and enabled.
- allocators.cpp: fix: make sure all pool fields are reset in
pool_free_all; correct matrix self-test
- lib: fix self-test
- lib_error: give "informational" return codes values > 100 (allows
multiplexing with percent indicator)
- archive: add clarification to afile_enum; use vfs_load when building
archive (fixes caching problem); add support for progressive archive
creation
- file: allow pp_set_dir's path to end in slash (simplifies other code);
add file_exists
- file_cache: add stats+sanity checks to allocator; improve ExtantBufMgr
find(); add ExactBufOracle to translate padded address returned by Cache
to what was actually allocated; relax infinite-loop check; fix
file_cache_reset
- file_io: refactor callback logic so it can be used by vfs (needed for
vfs_load)
- vfs: vfs_load now supports calling back (required for archive builder)
- vfs_mount: optimize path caching in afile_cb: due to atom_fn system,
string compare can be done via pointer compare
- vfs_optimizer: support auto-build of archive (progressive); improve
should-build-archive check (WIP)
- vfs_path: add util functions (also used in screenshot code)
- vfs_tree: simplify pathname storage
- wposix: mmap bugfix
- main: call progressive archive builder; skip reload when doing so
(documented)
- JSInterface_VFS+scriptglue: add archiveBuilderCancel
- ps/Util: use new vfs_path helper function for cleverer screenshot
naming (correctly handles some being deleted)

This was SVN commit r3578.
2006-03-01 22:31:11 +00:00
943f1fca16 Fixed a couple of small bugs:
- Doubleclicking a unit only selects units of that type owned by the
same player (before, it selected all units of that type).
- Stamina no longer decays when you finish running to something and
start attacking/gathering it.
- Removed the extra frame of gather/build animation that played after
you finished gathering/building something before the idle animation
kicked in.

This was SVN commit r3568.
2006-02-26 22:37:04 +00:00
192ddf9ddf Added construction logic in startPlacing and Entity and BaseEntity, as well as the Death event.
This was SVN commit r3564.
2006-02-26 09:55:20 +00:00
bc07b9ff0a file code v2 is now feature complete and works.
- adts: add basic benchmark to self-test; use fminf instead of MIN; fix
overly pessimistic invalidation in Landlord_Cached
- allocators: no longer complain if DynArray is full
- lib: warn if rand() min=max
- archive: bugfixes: plug leak, correctly handle 0-length files, carry
over flags when reading uncompressed file from archive
- file: expose file_get_sorted_dirents and implement file_enum in terms
of that
- file_cache: many bugfixes (especially related to CacheAllocator
freelist)
- vfs_optimizer: finish implementation of archive builder
- zip: correctly handle 0-length files
- tex: add tex_is_known_extension
- sysdep: add efficient fminf implementation (assumes P6+)

- config: update archive builder call site
- gamesetup: add call for delayed self tests
- entity: return JSVAL_VOID as per philip's suggestion

This was SVN commit r3553.
2006-02-23 07:55:32 +00:00
169889bcbc Small bug fix so issueCommand works for NMT_Produce.
This was SVN commit r3549.
2006-02-23 01:26:02 +00:00
7a4aeb69ed Added production queue system and associated events. It might still need some extra features but it should be functional.
This was SVN commit r3547.
2006-02-22 22:45:16 +00:00
e2a11fabe8 fix warnings (VC7)
This was SVN commit r3542.
2006-02-19 21:16:54 +00:00
9a70dee2f9 Fix a crash in CConsole history (could be triggered by pressing key down
without having pressed key up before).

This was SVN commit r3534.
2006-02-19 00:33:50 +00:00
livingaftermidnight
285d9281e0 This was SVN commit r3529. 2006-02-17 02:03:00 +00:00
36fa5ec2bf * clean up CLightEnv a bit
* add CLightEnv::m_TerrainShadowTransparency
* shadows will let a fraction of diffuse light through
* added JS LightEnv objects, so the lighting environment can be changed
  from the console
* new element TerrainShadowTransparency supported in the scenario .xml
format,
  changed cantabrian_generated with an example

This was SVN commit r3513.
2006-02-15 00:45:16 +00:00
1560a17dfb Rendering related fixes:
- explicitly enable blending in the ProfileViewer (fixes display bug)
- adjust luminance map based shadows to look roughly the same as depth
texture
  shadows (minus self-shadows, obviously)
- default depth texture path will not touch TexParameters any longer

This was SVN commit r3511.
2006-02-14 20:38:51 +00:00
7dee30e24c - Terrain self-shadows (only noticeable with a low angle of sun)
- explicitly split ambient and diffuse
- add renderer.shadowZBias to bias depths in the depth texture
  and avoid flickering artifacts caused by Z fighting
- cantabrian_generated uses new light values so that shadows aren't
pitch
  black

This was SVN commit r3508.
2006-02-13 14:18:20 +00:00
pyrolink
eede9c0f7b This was SVN commit r3505. 2006-02-13 03:31:26 +00:00
ccd43b4b49 Explicitly enable blending during console rendering.
This fixes a bug where the console wouldn't display properly unless a
unit
was selected (or some other obscure condition was true)

This was SVN commit r3496.
2006-02-11 18:53:32 +00:00
livingaftermidnight
adf7c66788 Added particle stuff.
This was SVN commit r3492.
2006-02-11 09:39:15 +00:00
21f8f8555e adts: remove_least_valuable safely handles empty cache
lib: add u32_hi/lo
archive: move archive builder logic here from vf_optimizer
file_cache: add flush() call - used when simulating cache
vfs_optimizer: WIP, not yet functional: file gatherer, 50% of TSP tour
generator

This was SVN commit r3486.
2006-02-09 05:59:33 +00:00
pyrolink
ad4fe4ae96 Queue binding
This was SVN commit r3479.
2006-02-05 03:45:23 +00:00
pyrolink
195affefee Queue hotkey-watch the test cinematic...looks good on my test map, ask if you want me to send the map to you (it actually orbits around some units on that map).
This was SVN commit r3475.
2006-02-05 02:49:33 +00:00
92fb5450bc CVFSInputSource clean-up, added headers to adts.{h,cpp}
This was SVN commit r3472.
2006-02-04 22:44:52 +00:00
7bf48e95c4 add FILE_LONG_LIVED flag when opening XML file in the process of building XMB (avoids warning)
This was SVN commit r3471.
2006-02-04 22:31:25 +00:00
987a6b7d4e fixed wchar_t issues; now correctly separates utf16, CStrW and jschar.
NOTE: wchar_t should be defined as a built-in type; no more need to
define manually or change project settings.

adts: disambiguate iterator type; add operator- as required by VC8
std::equal() implementation
precompiled: squelch stupid warning (that informs us that array members
are now actually default-initialized as called for by C++)
file_cache: remove debug variable

This was SVN commit r3464.
2006-02-03 20:36:15 +00:00
7862e79e84 adts: optimize landlord algorithm at advisor's request (only relevant if we have tons of files in cache)
trace: make note of IO size

xmlutils: fix old remnant of Handle vfs_load return type.

This was SVN commit r3456.
2006-02-02 04:11:07 +00:00
06412a7751 allocators: bugfix (wasn't setting freelist to 0)
archive: afile_read bugfix (wasn't returning byte count)
byte_order: add to_leXX, implement read_leXX in terms of that, add
write_leXX (and also big-endian versions)
compression: support 0 length buffers + minor fixes
file: no longer support passing fn_len (that didn't work anyway due to
DynHashTbl find(const char*) interface); add FILE_DONT_SET_FN
optimization that prevents cluttering name cache.
file_cache: add logic to verify load/free/load/free sequence; add
FILE_LONG_LIVED flag to specify exceptions (e.g. XMB files that don't
free their buffer immediately)
vfs_mount/vfs_tree: bugfix (was mixing up portable and VFS paths)
vfs_optimizer: small fixes; creating Zip files now works
vfs_tree: add PathName that stores pointer to path and name component
for efficiency + convenience
zip: bugfixes (wasn't endian safe; incorrect handling of cmethod; forgot
to initialize ZipArchive members)

config: add -buildarchive flag
Xeromyces.cpp, FileUnpacker.cpp: add FILE_LONG_LIVED
mapreader: bump time estimate for ReadXML

This was SVN commit r3446.
2006-01-31 03:47:52 +00:00
pyrolink
6af039def8 -CinemaTrack-refined
GameView- commented out test track in constructor, and commented out
hotkey interface
NUSpline-added bounds checking and corrections
Hotkey-added cinematic hotkey (doesn't work though (see above) )

This was SVN commit r3442.
2006-01-29 23:25:04 +00:00
fcfa746244 Linux compat changes, fix for (really old) bug in VertexBufferManager shutdown, GUI header reorganization for gcc 4.0
This was SVN commit r3437.
2006-01-29 18:23:47 +00:00
0fa0bfcb28 ConfigDB.cpp: fix vfs_load return value check
baseentity, entity: remove multiple property adds (source of
scriptablecomplex memory leak)
scriptablecomplex: add code to check for leak regression and prevent
them; add suballocator for properties, since 60k are allocated in a
short while (!) - saves time and memory

This was SVN commit r3429.
2006-01-28 22:21:54 +00:00
7838627cd2 - vfs_load now returns error code and takes FileIOBuf; that must be freed via file_buf_free. if Handle is needed, use mem_wrap.
- remove ScEd hacks and CFont et al macro rename
- fix accursed bug in VFS buffer management that was causing ReadFile to
fail without error (not allocating enough padding)
- vfs_tree: bugfix in tree_lookup
- waio: temporarily disable sector size determination (pending better
approach - need to determine if using DVD drive)

This was SVN commit r3421.
2006-01-24 08:16:29 +00:00
c4aea4eb62 Health regen fix for ranged attack.
This was SVN commit r3411.
2006-01-23 03:56:48 +00:00
pyrolink
8be78ad51c This was SVN commit r3401. 2006-01-22 11:08:46 +00:00
22d15cba2a Made console history slightly smarter: if you type something and then press up or down, it will show you only those strings in history that begin with the text you typed.
This was SVN commit r3398.
2006-01-22 09:56:12 +00:00
5ac92a3302 Advance water in sync with simulation and unit animations (so it stops when the game is paused).
Other miscellaneous tidyings.

This was SVN commit r3386.
2006-01-21 23:27:42 +00:00
pyrolink
3555c4b931 Order dispatcher ignores if mouse over minimap (minimap handles seperately)
This was SVN commit r3379.
2006-01-21 11:04:09 +00:00
c2c5e87c61 Removed references to the old attack, gather, heal and damage events (that were no longer used).
This was SVN commit r3375.
2006-01-20 21:38:58 +00:00
pyrolink
a917ffa711 Run order, secondary order support --still needs secondary cursor.
This was SVN commit r3363.
2006-01-16 10:56:12 +00:00
pyrolink
ee0227092a Defined notification codes.
This was SVN commit r3339.
2006-01-08 05:58:53 +00:00
b889826a3d Some Linux compile fixes over the place.
Create TerrainRenderer, ShadowMap and WaterManager classes to divide
CRenderer's functions into more logical units.

This was SVN commit r3332.
2006-01-07 01:04:26 +00:00
0a3e9ec537 - Added pause game functionality.
- Removed CDamageType from the engine - damage is now handled only
within the entity script (easier to mod/modify).

This was SVN commit r3325.
2006-01-02 03:07:29 +00:00
4a40baef33 Generic orders source commit. Also includes a fix to the animation bug where one frame of "idle" is played at the end of each cycle, and an enhancement to the entity script loading code to only load each script file once, which should save loading time and also allow script files to behave in a more logical way (e.g. no redeclaration errors when you have a constant).
This was SVN commit r3309.
2005-12-29 08:42:44 +00:00
pyrolink
07e630a97e Added flag for quick end of game hack (used to monitor kills).
This was SVN commit r3300.
2005-12-29 04:52:40 +00:00
2d477a09cf Profiler: Shift+F11 to save profile data into logs/profile.txt
This was SVN commit r3263.
2005-12-17 02:33:57 +00:00
2300a81070 C++ code changes for new entities (mostly referring to the right new properties or XML attributes in CEntity.cpp and CBaseEntity.cpp).
This was SVN commit r3249.
2005-12-15 21:59:48 +00:00
0e40dfc480 file: add note on pp_set_dir
CLogger: fix log file opening (now uses VFS path correctly)
ScriptingHost: fix error reporter - no longer does redundant write to
console

This was SVN commit r3246.
2005-12-14 18:32:02 +00:00
6e82e33ccf - display_msg and display_error -> debug prefix since in debug header
- debug_warn_err now takes LibError
- lib_error.cpp: revise error code -> string (only support liberror
now); add function to set errno from LibError
- unifont, CFont: parameter made a simple wchar_t from const wchar_t&
- mmap now sets errno
- Loader and VfsUtil function now return LibError as well
- Profile.cpp, ProfileViewer.cpp: fix int/uint/size_t warnings
- Renderer.cpp: fix cannot-generate-assignment-operator warning

This was SVN commit r3235.
2005-12-12 19:19:30 +00:00
pyrolink
2358540305 Added heal
This was SVN commit r3220.
2005-12-10 19:38:42 +00:00
pyrolink
bed6abeed5 Finally did the heal thing.
This was SVN commit r3219.
2005-12-10 19:37:52 +00:00