Animate props much more sensibly.
Move ammo code out of CUnit.
Move animation logic out of CModel.
Launch projectiles from the correct location.
Use entity's speeds and sounds in actor viewer.
Add -nosound option to disable audio, and allow audio by default in
Atlas.
Remove some obsolete options.
This was SVN commit r7609.
Stop ignoring actor XML animation speeds.
Add decentralised registration of hotloaders.
Move player ID storage into CModel, to simplify CUnit.
Remove obsolete unit ID allocation code.
Remove some material junk.
This was SVN commit r7605.
Add short-range vertex-based pathfinder.
Integrate new pathfinder into unit motion code.
Change obstruction system to get rid of circles, and differentiate
structures from units.
Make PositionChanged messages synchronous.
Try to prevent some accidental float->int conversions.
This was SVN commit r7484.
Don't call xmlCleanupParser after parsing documents.
("This function name is somewhat misleading. It does not clean up parser
state, it cleans up memory allocated by the library itself.")
This was SVN commit r7465.
Make animations trigger sound effects.
Adjust attack animation timings to match simulation.
Simplify the animation speed settings.
This was SVN commit r7438.
Merge from 22b478ffed8d.
Pure scripted interface definitions.
Entity creation from scripts.
Improved messaging system.
Messages on entity deletion.
Basic player entities.
Player ownership.
Bug fixes.
This was SVN commit r7281.
Giant merge from
http://svn.wildfiregames.com/hg-source/file/5fb522019d5e
Infrastructure is largely complete, gameplay is largely missing
Disabled by default; use command-line flag "-sim2"
(Second attempt at commit...)
This was SVN commit r7259.
- clarify the meaning of mapSize (patchesPerSide)
- use a single ClampCoordToMap function for clamping
- add annotations to all call sites when it is sure they will succeed
- otherwise, ensure return value is checked or at least add debug_assert
fixes#311 (successfully built house and dock at top of latium map)
thanks to Heron for tracking down the cause!
This was SVN commit r7183.
refactor: simplify dir_watch_Poll interface (returns vector)
wdir_watch: major refactor: use shared_ptr for reference-counting shared
watch state
remove no longer needed path_util functions
This was SVN commit r7168.
also took the opportunity to move file_system_posix to file_system since
a further FS abstraction layer = YAGNI. also namespaced
file_system_util.
This was SVN commit r7074.
the old behavior (using directories under binaries/) can be kept by
passing -writableRoot on the command line.
the first game load will be slower than usual due to re-creation of
cached XMBs.
This was SVN commit r7065.
Added CEmitter::LoadFromXML method to load particle settings from XML
files.
Made Update code generic and moved from CDefaultEmitter child class up
into CEmitter base class.
Cleaned up code in general and removed unused member variables.
This was SVN commit r6691.
Use noncopyable instead of boost::noncopyable. (But maybe this should be
changed to the NONCOPYABLE macro instead?)
Use boost::filesystem::wpath::file_string instead of
external_file_string, since the latter varies between std::string on
Linux and std::wstring on Windows.
Use wcstombs instead of wcstombs_s.
Use rtl_AllocateAligned instead of _mm_malloc.
This was SVN commit r6574.
test_bits: add tests for all routines in bits.h
hpet: add safety check
unit.h, bits.h, DOMEvent.h: change T(~0) to ~T(0) (required when T is
64-bit)
This was SVN commit r6335.
class static const member apparently sometimes requires external linkage
and enum causes conversion warnings, so go with file-scope constants.
This was SVN commit r6161.
- topology.cpp: modify interface due to thread-safety issue. caller is
now responsible for ensuring the first _Detect call isn't reentered;
everything else is safe.
- fix thread-safety issue in wnuma; use winit mechanism to ensure it's
ready before use
- VFS now takes a cacheSize parameter (required for being able to
disable read-only file caches for the image loader at work)
- allow dynarray that isn't actually holding memory
- debug_stl: VC9 fix (disable this code except on the exact STL version
on which it was tested)
- zlib, lib_api: changes to macro used to toggle between static and
dynamic linking
- add boost filesystem header in external_libraries
- amd64: cpu_ topology functions are now provided by x86_x64
- cpu: remove cpu_ClockFrequency (dangerous, may be tempting to use
during WHRT init which would cause a crash). use x86_x64_ClockFrequency
or os_cpu_ClockFrequency instead.
- werrno: cope with newer boost versions
- wmman: follow SUSv3 in rejecting zero-length mappings
This was SVN commit r5954.
enable most of IA-32 specific code to be used in amd64 (resides in
directory lib/sysdep/x86_x64)
bits: add IsBitSet
remove mem_PageSize (use os_cpu_PageSize instead)
cpuid: change interface to allow gracefully supporting later
subfunctions that require input parameters
amd64_asm.asm: add amd64 implementation of cpuid
cpu: move functions provided by OS to sysdep/os_cpu.cpp
cpu topology: avoid trouble when process affinity is set by remapping
processor numbers to 0..PopulationCount(processAffinity)
topology.cpp: move ex-ia32 topology code here.
This was SVN commit r5945.
this snowballed into a massive search+destroy of the hodgepodge of
mostly equivalent types we had in use (int, uint, unsigned, unsigned
int, i32, u32, ulong, uintN).
it is more efficient to use 64-bit types in 64-bit mode, so the
preferred default is size_t (for anything remotely resembling a size or
index). tile coordinates are ssize_t to allow more efficient conversion
to/from floating point. flags are int because we almost never need more
than 15 distinct bits, bit test/set is not slower and int is fastest to
type. finally, some data that is pretty much directly passed to OpenGL
is now typed accordingly.
after several hours, the code now requires fewer casts and less
guesswork.
other changes:
- unit and player IDs now have an "invalid id" constant in the
respective class to avoid casting and -1
- fix some endian/64-bit bugs in the map (un)packing. added a
convenience function to write/read a size_t.
- ia32: change CPUID interface to allow passing in ecx (required for
cache topology detection, which I need at work). remove some unneeded
functions from asm, replace with intrinsics where possible.
This was SVN commit r5942.
remove ONCE(ScriptingInit) constructs, replace with direct call from
GameSetup
revised GameSetup's InitScripting (organize into groups)
JSCollection: remove #define of two concrete collection types (made
typedef, moved to their respective entity.h and player.h)
This was SVN commit r5871.
CollageManager: avoid creating zero-length files to avoid VFS compaints
test_MeshManager.h now runs correctly without errors/asserts
XMLUtils.cpp: bugfix (pointed out by Philip)
This was SVN commit r5855.
merge FilePacker and FileUnpacker into FileIo.
add CppDoc documentation
make clear what kind of 'size' is meant (file/buffer vs payload)
This was SVN commit r5599.
- Removed use of erase() in the middle of iterating through projectiles
in CProjectileManager - that was dangerous! Replaced projectiles vector
with a linked list to make it easy and efficient to delete elements in
the middle.
- Fixed animation. It seemed like a problem with updating the Y position
came up and was more apparent as we lowered the turn length.
This was SVN commit r5593.
- properly differentiate between buffer/offset alignment and length
alignment (relevant since block size has been increased to 256k)
- use VfsPath for most game paths instead of CStr
- clean up timer interface and implementation
- self-tests no longer crash
- file_cache.cpp: fix for the case where allocation fails (prevent
deleter from seeing a null pointer)
- allocators: move all shared_ptr-related stuff to its own component;
add DummySharedPtr
- codec: disable checksums (important for performance at work)
- File: made into an interface class to avoid export problems. not
entirely sure about this..
- vfs_path.h, path.h, os_path.h: proper fix for using
fs::change_extension and similar utility functions with derivatives of
basic_path
- lib_api: automatically link against import lib if building lib/ as a
DLL
- path_util: remove unused functions (this component is deprecated)
- compiler.h: add INLINE
- Xeromyces.cpp: pass PIVFS so that GetXMBPath works in self-test
(should do this mostly everywhere rather than have one singleton g_VFS)
This was SVN commit r5537.
- directoryPosix: replace most methods with boost filesystem (but not
all: the latter cannot efficiently enumerate files AND query their
size/mtime)
- AllocatorChecker: better name for member functions
- file: move the File class here
- trace: bugfix
- io: move UnalignedWriter to write_buffer.cpp (basically the same
thing)
- vfs: remove unnecessary "vfs" warts from variable names
- vfs_tree: VfsFile now stores single Name/Size/MTime fields instead of
the FileInfo record (less clunky)
- vfs_path: use boost filesystem's version of the basename/extension
functions
- lf_alloc: remove (no longer necessary, won't be finished - not worth
the trouble)
- path_util: remove path_foreach_component (replaced by better path
traversal logic) and PathPackage (obsoleted by fs::path)
! resource loading code now receives VfsPath as its filename. there is
also OsPath (native absolute path) and Path (relative to binaries/data)
- tex is now independent of file loading code; it just en/decodes
in-memory buffers
- wdll_ver: clean up, use smart pointer to simplify bailout code
- wsdl: remove nonexistent failure path from calc_gamma (cruised by here
because SDL_SetGamme is failing once after a cold boot at work)
- wsnd: simplify OpenAL DLL search, use boost::filesystem
- wutil: Wow64 redirection is now packaged in a (RAII) class
This was SVN commit r5525.
mostly straightforward except for CVSFile / Filesystem. moved the former
into the newly created latter component. removed VFSUtil entirely (that
functionality is available from lib/file/file_system_util.h)
Xeromyces.cpp: simplify buffer handling since smart pointers are now in
play. also use WriteBuffer instead of membuffer.
This was SVN commit r5519.
- callbacks now have a uintptr_t "cbData" parameter (instead of
haphazard void*/uintptr_t, cb/ctx/data)
- resource loading code now more uniformly deals with u8* pointers
instead of void*
allocators: add support for page_aligned_alloc via boost::shared_ptr.
add evil hack to avoid the need for default ctor and ensure alignment in
SingleAllocator
archive: improve Decompressor
compression:
. near complete rewrite (previous code was a poorly factored mess)
. fix bug related to buffer allocation
. no longer provide get_output API (prone to abuse)
. add call to get max. size of output buffer (for preallocation)
This was SVN commit r5370.
Removed a few global variables from Atlas.
Added call to srand(time).
Restored NotebookEvent in wxJS.
Fixed CPU-detection in Valgrind.
This was SVN commit r5318.
. update moduleInit mechanism and move it out of lib.cpp. now has a
thread-safe reference count and allows repeated init/shutdown (required
for self-tests)
. vfs now depends on h_mgr; h_mgr need therefore no longer explicitly be
shutdown (e.g. in self-tests)
. acpi: minor fixes
. cpu: AtomicAdd and CAS now take volatile variable (safer)
. mahaf: unload driver on shutdown (did this for DriverVerifier, but
it's 'cleaner' in general)
. wdbg_sym
. wfilesystem: get rid of manual declarations of deprecated functions;
implement them via trampoline instead
This was SVN commit r5086.
- deleted most old libraries/headers in codepit to avoid confusion (they
are now in SVN anyway). updated required-libraries-linux.txt accordingly
- moved rand() into separate file, out of lib.cpp
- removed CGUIScrollBarStyle.cpp to avoid empty-file warning
- wxwidgets.h: remove redundant #pragma lib and include wxw PCH
- move openal-specific stuff to external_libraries/openal.h
- cpu, bsd: macosx is-a bsd, so only test OS_BSD
This was SVN commit r5082.
improve CPU brand string detection
wposix: no more ONCE during init (not thread-safe). also remove
redundant round_up
fold string_s into secure_crt
vfs: small fixes+commenting improvements while calling VFS back into
memory
This was SVN commit r5054.
. timer, config: fix definition of ALLOW_RDTSC
. add movsx_be64 (for whirlpool), revise implementation, move to
byte_order, add test
. MAX -> std::max, remove those macros
. add timestamp to system_info as requested by philip
This was SVN commit r5050.
. major compat fixes for interoperation with wxw.
. add crashlog_sender (modified version of debgrpt wxw sample). compiles
but untested, will be changed heavily
further improvements:
. wposix no longer declares CRT functions. instead, use CRT headers..
but don't allow their (incorrect/non-POSIX) declarations to propagate to
users.
. split up win.cpp into wstartup, wutil, winit
. extern "C" -> EXTERN_C
. move sdl.* to lib/external_libraries and add png.h+zlib.h (fixes for
and include of the library)
This was SVN commit r5028.
. the massive renaming undertaking: camelCase functions -> PascalCase.
. add some cppdoc.
. minor additional renaming improvements: e.g. GetIsClosed -> IsClosed
. in entity code, replace constructs like "pvec = new vector; return
pvec; use *pvec; delete pvec" with a simple stack variable passed as
output parameter (avoid unnecessary dynamic allocs)
. timer: simpler handling of raw ticks vs normal timer (less #if)
This was SVN commit r5017.
further cleanup to sysdep.h: avoid pulling in win and ia32; split header
up into stl, compiler, and the actual sys_* API. (all but the latter are
in PCH).
timer: also avoid dragging in ia32
win: move snprintf fix to posix.h
cpu: simplify reasoning about cores, now given as logicalPerCore (not
package)
vfs_optimizer: fix if archive building is partially disabled
This was SVN commit r5008.
all cpu-related stuff is now defined in cpu.h (with cpu_ prefix and
fully encapsulated). fix quite brittle core/HT unit/package detection.
implement mkdir on VC8, where it is deprecated
add strdup on MacOSX
move ia32 code into separate subdir. functions implemented in asm are
called ia32_asm_*.
add some unix versions of sysdep functions (cannot test them)
timer: fix for amd64 linux
This was SVN commit r4995.
Made CTechnology inherit from CJSComplex, so that properties such as
resources can be added dynamically instead of being hardcoded in it.
Also removed some excessive debug output from GUI.
This was SVN commit r4980.
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.
Made CMatrix3D::Translate assume something sensible about the structure
of the matrix, so it doesn't have to do a matrix multiplication.
Added quaternion nlerp (but haven't used it anywhere).
Changed animation interpolation so it loops smoothly in the actor viewer
but (hopefully) doesn't interpolate dying units into a half-upright
pose.
This was SVN commit r4932.
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.
GameView: pushed near clipping plane out a bit (to get more precision),
rounded far plane to power of two for no real reason.
This was SVN commit r4896.
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.
Atlas: Changed video format to 640x480 and losslessly compressed. Added
most-recently-used files list. Stopped switching sidebar when selecting
tools, since it was getting annoying. Added Slow playback mode. Fixed
crash when resetting sim while projectiles exist.
Renderer: Added JS-accessible renderer.shadowMapSize to override the
size of shadow maps.
ShadowMap: Changed default depth texture bits to 24, since that seems to
go faster (see #180).
PolygonSortModelRenderer: Made more similar to other renderers, so that
the renderer.sortAllTransparent=true mode works better.
Projectile: Fixed update, so it interpolates smoothly.
Entgraph: Fixed promotion detection.
This was SVN commit r4876.
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.
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.
- Conditions were not properly converted to JavaScript (not read from
the XML file correctly either).
- Added an OrderFromTriggers function so that triggers can give orders
which ignore fog of war.
- Fixed some spelling mistakes in TriggerSpecs.xml (parameter vs.
parameters).
- Moved trigger update to CSimulation update, which is more correct.
This was SVN commit r4821.
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.
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.
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.
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.
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.
- 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.
- 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.
- 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.
* 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.
* 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.
* Skinning is done in a way that works when there's more than one bone
influencing a vertex.
* PMDs now store vertexes in world-space instead of bind-space. (The
loader converts the old-version PMDs so they still work.)
* Moved SkinPoint, SkinNormal into CModelDef so it could use them when
loading the old PMDs.
* Made the FastNormals approach non-optional, so the inverse-transpose
bone matrices could be removed. Changed the explanation of why it's a
valid approach.
* Quaternion: Made GetInverse assume that the quaternions have unit
length (which they do when they're representing 3D rotations).
* lib: Added support for DDS files that aren't a multiple of 4x4 (most
useful for 1x1, 2x2, etc that are still powers of two).
* Actor Viewer: Added white terrain texture to the minimal test mod, so
shadows are visible. Changed default so walk/run animations don't move
the unit along the ground.
* Removed some redundant repetition in doc comments.
* Removed some unnecessary #includes.
This was SVN commit r4696.
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.
is defined (defined by the premake scripts)
FileConverter.cpp: Fix wxString-through-valist (for no better reason
than being
annoyed by the warnings...)
This was SVN commit r4643.
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.
* 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.
- 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.
- 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.
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.
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.
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.
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.
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.
- 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.
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.
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.
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.
-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.
LightEnv - has byte order marks
Texture - conv from int to GLint wasn't allowed
JSConversion - to use isfinite you need the std:: namespace
(this is temporary... atm I don't know why you can't call isfinite)
ScriptableComplex - when implementing methods it did not like default
values (they were removed from the cpp file)
timer.h - simple change
This was SVN commit r4231.
- 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.
- u_anim_name disambiguation
- fix implementation of finite (use our fpclassify instead of compiler's
routine)
- ä -> ae
- workaround for MAP_ANONYMOUS
- fix GLint in ogl.cpp
- add include for SIZE_MAX in string_s
- avoid PIC clobbered error and speed up rdtsc a bit
- add include for stat
This was SVN commit r4170.
add new JSUtil, automatically included via SpiderMonkey.h.
move JS_ASSERT there and rename JSU_ASSERT.
move scriptglue's REQUIRE_PARAMS there and rename to JSU_*
replace if(argc < x) bail() code with those macros.
This was SVN commit r4169.
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.
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.
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.
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.
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.
split ia32_asm code up into memcpy, color
premake: add (windows-only so far) support for NASM include paths -
required when using %include. see rationale in vs.c
refs #124
This was SVN commit r4039.
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.
# 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.
-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.
Actor variation selection (though not saved to maps, so not very
useful).
Added more levels of complexity to the waiting-for-game-to-respond
message pump, to fix reentrancy problems.
Use number keys to assign player to selected unit.
This was SVN commit r3913.
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.
Also fixed sectorDivs so it's always initialised, since the complaints
were annoying.
Camera: Added a const.
Super cavalry: Added required(?) aura attributes.
This was SVN commit r3906.
- Underwater tiles will be tested against the frustum with a bounding
box including the water surface, so the water gets drawn even if the
terrain is off-screen.
- Transparent objects (e.g. trees) should now interact with water
properly. I did this by rendering them twice, first before the water, so
it overlaps the underwater pieces, then after, so the above-water pieces
overlap the water (the water now writes Z as well as colour to allow
this). Before, only the first pass was done, so the tops of trees were
covered by water. There might be more efficient ways of doing this - the
best could be for the transparent objects to be drawn with a shader that
always either discards a pixel or writes alpha of 1.0 instead of using
2-pass depth write then colour write.
This was SVN commit r3904.
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.
- Entity templates are now per-player, along with an unowned
"unmodified" version of each template that should be used to find the
original values of the stats. This can be accessed in the scripts as
<template>.unmodified.
- Fixed a pathfinder crash when the last path from the engine had 0
elements (just ignoring this for now).
- Units should no longer become purple when they upgrade in rank.
Refs #3.
This was SVN commit r3863.
-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.
terrain: fix unused a90 etc. warnings by commenting them out
renamed ERR_TEX_CODEC_CANNOT_HANDLE to INFO_.. (to prevent the kind of
mistake that philip just fixed)
This was SVN commit r3805.
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.
- 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.
*added CTerrain::getSlopeAngle[Face]() which returns the angle in
radians of the slope of the terrain. getSlopeAngleFace should be used
for entities because it takes into account which way the entity is
facing, which allows for negative angles.
*the max and min graphical rotation for the slope is under traits.pitch.
This is used so that you can have certain units such as infantry that
don't rotate very far go down steep slopes but not rotate too much.
*JS documentation in docs/JSReg.rtf -- I put in most of the relevant
global functions; still needs entity functions.
This was SVN commit r3794.
# 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.
- 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.
Forced variant names to lowercase. Allowed empty prop model names to
remove inherited props. Removed a little code duplication.
Entity: Changed confusing (and probably incorrect) loop/STL logic, to
use slightly more confusing syntax instead.
This was SVN commit r3761.
* mapreader: increases progress bar update interval (was calling back
10x for 1%, which is an excessive slowdown)
* lib_errors: add ERR_MEM_OVERWRITTEN
* mmgr: replace debug_assert(0) with more specific errors
This was SVN commit r3737.
-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.
and a fix for the auto-build: #define enums from EXT_framebuffer_object
* clip shadow bounds to frustum
* add CBrush, a class representing a convex object
This was SVN commit r3695.
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.
* 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.
- 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.