should be safe to distribute this build
code_annotation.h: add our own noncopyable to avoid DLL base class
warning
debug: remove some unicode functions (unnecessary); minor cleanup
debug_stl: disabled
mahaf: do not warn when running as non admin
wdbg: add wdbg_printf and wdbg_assert for use in allocation hook. add
header
wdbg_heap: now feature complete.
. allows storing 3..4 frames from the call stack with 0 space overhead.
. prevents garbage file/line output.
. takes care of allocation counting (previously done by profiler)
wdbg_sym.cpp: cleanup+fixes (locking, wdbg_*)
fix: properly specify __declspec(dllimport) for certain classes
This was SVN commit r5679.
in 2008-02-09 meeting, decided to stick with a fixed-size array for
simplicity. (changing to vector would require modifying the m_refd
bitset optimization. there is a 32k handle limit due to serialization
code anyway, and no pressing need to justify changing either)
This was SVN commit r5612.
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.
The problem was incorrect logic in the start-next-segment-of-the-path
code that was added to allow multiple segments to be handled within the
same update. I'm not sure how this worked before but it seemed to give
continuous paths! Likely that's because the pathing for contact actions
is different.
Also added more sanity checks in Aura.cpp for deleted entities in the
m_Influenced queue. There was a crash caused by something here though
it's hard to reproduce.
This was SVN commit r5597.
- 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.
- use helper functions to reduce occurrences of BLOCK_SIZE and
SECTOR_SIZE
- wmi: provide for shutting it down (gets rid of its two threads); only
initialize if actually needed (costs 200ms)
- ogl_tex: don't complain if there's no gfx_card info (due to not having
used wmi)
This was SVN commit r5572.
- vfs_lookup: currentPath was of wrong type; simplified and fix create
logic
- archive_zip: fix: correctly handle filenames with /
- vfs: remove workaround for above bug
- io: temporarily disable block caching (works around problem with zip
file created by 7z)
add and use new wdbg_heap module (WIP)
remove mmgr
This was SVN commit r5571.
(see http://www.wildfiregames.com/forum/index.php?showtopic=11450&hl= )
clean up debug module
. no longer include platform-dependent header (-> less rebuilds)
. DISPLAY_ERROR -> DEBUG_DISPLAY_ERROR
. parts of config.h that don't affect all files moved to config.2 (->
fewer full rebuilds)
. remove creaky symbol cache (no longer needed for mmgr)
. remove TLS thread naming stuff (can use debugger's thread window
instead; no need for platform independence there)
wdbg: remove thread suspension and breakpoint APIs (not needed)
acpi: fix: u64 -> uintptr_t
wutil: fix WinScopedLock, use that instead of direct lock() functions
misc:
. get rid of SAFE_STRCPY, replace with strcpy_s
. remove _getcwd (shouldn't be used)
This was SVN commit r5563.
h_mgr: compile fix for windows memory tracker (see forum thread)
timer: add assert to catch incorrect behaviour as reported by philip
This was SVN commit r5544.
- 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.
fix: g_frequencyFilter is now in globals.cpp instead of in main (since
other modules access it and main.cpp isn't included in the self-test)
fix: globals.h now avoids dragging sdl.h into other projects
allocators: got rid of references to the old master header (must now
include the specific header, e.g. dynarray.h)
This was SVN commit r5534.
there are too many W4 and "potentially uninitialized", so those are
disabled by 0ad_warning_disable.h.
the silly "int x = strlen" and very dangerous "int x = (void*)p" (and
vice versa) problems are fixed.
This was SVN commit r5526.
- 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.
move all except user-specified config choices out of config.h and into
appropriate headers
CPU_IA32 -> ARCH_IA32
wsdl: disable use of ddraw (will soon be replaced by WMI)
use shared_ptr without namespace qualifier (it's in tr1)
debug_warn -> debug_assert(0)
LIB_API to allow building as DLL
smart pointers: reduce use of .get()
cache_adt: use map instead of hash_map (avoids needing a hashCompare
class). also remove spurious warning
code_annotation.h: better cassert implementation
move FPS measuring portion of timer.cpp into frequency_filter
move include of memory headers into mmgr.h (to avoid errors, we must
ensure they are included if mmgr is used)
posix_filesystem.h: move definition of mkdir to wfilesystem
stl: disable iterator checks in release mode
wmi: fix COM init bug, use smart pointers
wutil: add code to get DLL module handle (if compiled as such), add
WinScopedLock
timer: fix handling of raw ticks
This was SVN commit r5517.
TerrainOverlay: fix warnings
PathfindEngine.cpp: correct float type, mark as noncopyable
TriggerManager: explicitly construct as CStrW
This was SVN commit r5516.
se_dcdt: reduce warning spew a bit
TerrainOverlay: fix warnings
PathfindEngine.cpp: correct float type, mark as noncopyable
TriggerManager: explicitly construct as CStrW
This was SVN commit r5515.
this hopefully fixes lag problems michael is seeing because rdtsc is
being used on his 7-th gen athlon (which was falsely reported as 6th gen
by the old version of this code)
This was SVN commit r5510.
archive: ArchiveEntry now a mememto and not exposed directly
typedefs for boost::shared_ptr
fixed up dir_util to new interface
add "FileProvider" that does Load/Store and indicates Precedence
vfs: structure has changed. one RealDirectory per OS dir; vfs_tree
stores it; populate uses it to Add() stuff to vfs_tree; lookup does path
traversal and calls populate
This was SVN commit r5499.
archive: pretty much done except for trace and archive_builder
IO: io_manager still needs to be fixed/revised (especially WRT buffer
and alignment management)
posix: done
vfs: need to complete vfs_mount and tie it in to vfs.cpp
dir_util: needs further revisions (VFS interface changed since then)
This was SVN commit r5475.
factor out the "atom_fn" mechanism into lib/allocators/string_pool.cpp
factor out FAT date/time handling into lib/fat_time.cpp
path_util: replace strcpy with SAFE_STRCPY; add additional functions
that avoid passing an output buffer via StringPool
This was SVN commit r5474.
- The server will no longer send a new turn until the previous one has
been "acknowledged". (TODO: this may create lag between turns in its
current form; investigate and possibly allow executing two turns while
the third is being negotiated).
- Mutexes are now being used in NetServer and NetClient to ensure
commands go into the right batches.
- Commented out some orders in the GUI code that should not be there and
are not 100% working anyway (they were part of the follow/formation
system).
- Units that spawn or are created by scripts now have net-safe position
and orientation.
- Added a debug flag that can be turned on to print details about when
commands are received and executed (DEBUG_SYNCHRONIZATION). This is
especially useful if you diff the stdouts of two running games. There
should be no differences if everything is in synch.
This was SVN commit r5463.
wgfx: robustify gfx_get_video_mode
wfilesystem: update comments
wsnd: update comments to reflect use of readdir, not layer on top
remove test_allocators (has been replaced by tests/ in lib/allocators)
This was SVN commit r5449.
the old lib/allocators.h is now a bridge to the new headers (temporary)
make slight interface changes in lib/res/file to match new allocators
interface
This was SVN commit r5445.
- Networking no longer tries to use IPV6, ignoring the family type of
CSocketAddr. This address will be replaced when we switch to ENet
anyway.
- The name of the Atlas semaphore now also includes a timestamp, since
the RNG generated the same sequence of names for multiple runs of the
game, causing problems if the games crashed and leaked semaphores, and
making debugging painful.
- get_executable_name now also works if the game is within an app bundle
(useful for packaging it more nicely later on, and since wxWidgets
expects us to be in an app bundle).
This was SVN commit r5407.
archive_builder: move logic into a Compressor functor. avoid direct
dependency on ZLib
compression: add provision for calculating checksum
Xeromyces: remove no longer needed zlib.h
This was SVN commit r5388.
- malloc+error checking -> new
- better callback parameter name consistency (ctx -> cbData)
file_io: replace another manual malloc+free with shared_ptr
wclipboard: robustify _get as well
This was SVN commit r5372.
- 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.
cpu.cpp: avoided the need for wrapper functions by calling the
OS-specific function directly (declared in central header, implemented
in the platform's cpp file)
avoid the need for init in cpu and ia32 via if(!init) Init() pattern.
optimized memcpy now requires SSE support
remove error-prone CAS macro; replace with cpu_CAS
config: no longer require inline asm for float->int conversions
lib_error: remove special-case in CHECK_ERR for windows (no longer
needed)
This was SVN commit r5365.
- factor cursor and clipboard out of sysdep.h
- remove empty sysdep.cpp
- wcpu: remove profiler code (it's in wprofiler.cpp if we ever need it)
- robustify clipboard code
- wsysdep: move code to determine app window into wutil; it's now used
by the clipboard code
This was SVN commit r5364.
refactored sysdep code:
- avoid many #if OS_xxx.
- remove bsd.cpp, merge its contents with osx
- move linux-specific parts of unix/ into linux/
This was SVN commit r5363.
prevent using mahaf if it's going to fail anyway
module_init: add ModuleIsError (allows acpi and mahaf init routines to
pass failure notification on to their second and later callers)
counter: safer memory management
This was SVN commit r5333.
mahaf: add API to check whether physical memory mapping ought to work
acpi: no longer consider itself initialized if the above is not true
(fixes undue warning in PMT and possibly HPET about invalid ACPI table
on Win2k)
cpu: remove redundant include
This was SVN commit r5329.
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.
config: add 2 parameters to allow disabling s3tc/auto mipmap gen
wpthread: add support for named semaphores (required for macosx compat)
openal, ogghack: remove direct use of __APPLE__ macro (replace with
OS_MACOSX)
GraphicsSetupHandlers.cpp: fix incorrect usage of OS_ macros (they're
always defined, so the test should be if their value is != 0)
This was SVN commit r5316.
- Fixed some invalid member function references in wxJS code that gcc
4.0 didn't like.
- Some conversion changes.
- Don't try to construct wxSound from memory in OS X (it's not
available).
- Added dependency on zlib in AtlasUI (something there uses _compress).
- Added Mac code for finding current executable's path.
- Added dummy code for getting display size that does not use X.
- Fixed dir_get_changed_file stub to return ERR::AGAIN (end of files)
instead of INFO::OK.
This was SVN commit r5312.
Erik had reported that the PMT counter indicates a resolution > 2ms; i
cannot see a legitimate reason for this happening :S (compiler bug?
debugger bug? bad memory?)
This was SVN commit r5301.
- Decreased MP turn length to 150 ms.
- Let units move along multiple steps of a path per turn. This means
they no longer "hesitate" between tiles. Especially noticeable in MP
games or at low framerates.
- Joined segments of paths generated by the pathfinder into linear
pieces for better repathing.
This was SVN commit r5224.
simplify detect code by adding support for WMI (the "proper" way to do
things)
wutsname: fix incorrect reporting of windows version
ps/Util: add note on exception that is raised on Wow64 (Windows bug)
This was SVN commit r5213.
ia32: add note on when ia32_ApicId fails; support detecting/guessing
processor topology from number of "processors" (hopefully fixes warning
on Philip's PIII system)
This was SVN commit r5209.
ScriptableComplex: added evil hack so iteration through properties works
with the new SpiderMonkey, which fixes the GUI scripts.
This was SVN commit r5185.
mahaf: now disabled on Win2k because we can't prevent the TLB bug there.
removed the CopyPhysical API.
wutil: allow querying windows version via number
View: fix warning
This was SVN commit r5169.
aken: add provision for copying physical memory (safer than mapping)
acpi uses that to avoid problems due to nonaligned ACPI tables (bonus:
wastes less memory)
wdbg: remove unnecessary headers
wseh: add comments
wstartup: fix return type (since we're now called by _initterm_e)
This was SVN commit r5159.
Fixed linking with wxWidgets.
Enabled RTTI for non-engine packages.
Fixed wxJS for Windows.
Fixed failure to load on Windows 2000 due to IsWow64Process import.
Fixed trivial warnings.
This was SVN commit r5155.
IGUIObject: Cache the JSObject*, to prevent some frequent allocation
while running GUI scripts.
JSInterface_IGUIObject: Fixed garbage collection issues.
JSInterface_IGUIObject, ScriptGlue: Changed to the JS_THREADSAFE form of
JS_GetClass.
Util: Avoid startup warnings on Linux caused by using unimplemented
cpu_* functions that aren't needed for anything important yet.
sysdep/unix: Changed to native line endings.
This was SVN commit r5154.
move exception-specific stuff into wseh. it now grabs the entry point
and wraps it in a __try block (but only for the main EXE).
this works around issues with the previous SEH registration code
(exceptions weren't caught in release mode when not running in debugger)
This was SVN commit r5151.
wdbg: cleanup, improve exception catcher (previously potentially failed
if __try block came in non-main thread). required since wstartup no
longer commandeers the entry point.
winit, wstartup: update documentation
This was SVN commit r5141.
- Fixed outdated / buggy networking code in the GUI scripts.
- Finished the API to CNetClient so that it's possible to start a CGame
from it.
- Some enhancements for debugging networking: Enabled updates while the
game is minimized/out-of-focus if it's in a network session. Also
reduced the turn length to something slightly more manageable but still
unplayable (1 sec versus 3 sec).
- Fixed a bug where IssueCommand used to access the order it creates
after queueing it, which is bad if the order gets deleted while being
queued (e.g. in CNetClient).
This was SVN commit r5139.
found another means of doing startup/shutdown that doesn't require
hooking and allows init callbacks to use CRT functions (avoiding
problems similar to the recent rash of pre-libc bugs). also, callback
registration no longer needs ugly #pragma syntax.
remove 'Detours' (evil and no longer needed)
This was SVN commit r5137.
DllLoader: Report dlerror when dlopen fails.
AtlasObject: Avoid ICC warnings caused by 'const T' being equivalent to
'T' when 'T' is already const.
This was SVN commit r5133.
detours is configured as a static lib, which would require using the
same compiler, but we have several in action.
fix: include a stripped down version of its code in the main source tree
This was SVN commit r5126.
Don't disable PCH in AtlasUI for non-GCC builds.
Prevented some excessive warnings ("implicitly-signed bit field of
length 1").
Removed (wcs|str)nlen functions on OS_UNIX, since they were already
removed from the .h.
This was SVN commit r5125.
Properly enabled PCH in GCC.
But wx 2.8 (with anonymous namespaces) and GCC <4.2 and PCH conflict, so
PCH is disabled when building AtlasUI on broken compiler versions.
Removed media player, because it's useless and makes building harder.
Removed unnecessary wx linking.
This was SVN commit r5122.
cpu: avoid measuring cpu freq if possible
ia32: cleanup, fix #cores detection on AMD (they're incompatible,
*sigh*), add ia32_Generation
wcpu: remove IsThrottling code (clunky and not necessary - we rely on
ia32's feature bit detection instead)
counter: move whrt's counter create code here
qpc: update comment
tsc: finalize IsSafe implementation, remove per-thread stuff (since it
cannot be made to work)
whrt: cleanup, remove calibration code (no longer needed)
This was SVN commit r5121.
aken: clean up debug strings
mahaf: use checked/free version of aken depending on config. refactor to
eliminate goto.
hpet: avoid undefined unmap if HPET not found
whrt/*: make sure all counter class data is initialized
whrt: prefer QPC over PMT (it's much faster?!)
winit: add some instrumentation
wutil: win_exe_dir and win_sys_dir shouldn't end in slash. fixed.
This was SVN commit r5116.
* Removed ToJSVal<jsval> because it's treated as ToJSVal<long> and
causes minor confusion and/or compiler errors.
Changed script interface functions to return either C++ types or a
jsval_t wrapper.
* Replaced some C casts with static_cast to avoid significant confusion
and to cause compiler errors instead.
* Removed some redundant argument-checking code. Simplified some
string-generating code.
* Fixed some "dereferencing type-punned pointer will break
strict-aliasing rules" warnings (from `g++ -O3`).
This was SVN commit r5115.
. allocators: add static_calloc. also: documention was duplicated in
header; merge it.
. wdir_watch: fix last remaining static object init issues
. add rationale and explanations to lib_errors, wsdl, qpc, whrt.
. cpu/ia32: remove throttling detection (hacky); will be taken care of
by tsc.
. ia32: expose vendor
. wdbg_sym: add its own critical section (safer, less contention)
This was SVN commit r5114.
revamp module init: no more atexit and "premain" init => no longer need
to call any wstartup init function. winit section names now use group
numbers instead of letters.
delay_load -> wdll_delay_load
dll_ver -> wdll_ver
add aken build environment
cleanup wsock.cpp, have it import its functions properly
wsdl: defend against GameSetup calling SDL_Quit twice.
This was SVN commit r5108.
add update mechanism (needed to safely handle counter rollover) and
lock-free synchronization.
refactor:
. Counters now have Activate/Shutdown interface rather than throwing
exceptions from the ctor.
. whrt is responsible for caching frequency/resolution etc.
. fix counterBits handling
This was SVN commit r5105.
instead of std::map, use a linked list of static LibErrorAssociation
instances. (also simplifies the process of registering error
codes/descriptions)
module_init: remove warning (happens in normal operation)
win: add fixed InterlockedExchangePointer definition
mahaf: no longer warn if stopping the service failed because it wasn't
started
This was SVN commit r5104.
wtime: "implement" CLOCK_MONOTONIC (that's what the timer already did,
anyhow)
main: move early init to GameSetup!EarlyInit (fixes atlas problem with
timer)
This was SVN commit r5101.
cpu: accessor functions ensure what they return is valid. no longer
needs to call wtime_reset_impl (ugh). uses ModuleInitState.
ia32: add APIC ID accessor and prevent redundant init
This was SVN commit r5093.
lib: move IsSimilarMagnitude and downcasters here from single modules
where they're used
acpi: simplify by only using v1.0 or 2.0 tables
snd: add note on why OpenAL can't be used
mahaf: change prefix
wcpu: cache results, reinstate wcpu_ClockFrequency
win: add winreg.h for registry functions
wsnd: only do the DSound thing on non-vista (and delay-load to avoid
overhead)
wutil: add code to correctly detect windows version
This was SVN commit r5090.
. 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.
bits: add a few 64-bit variants
config: add OS_WIN64
snd_mgr: make error identifiers unique; cleanup
win: enable service definitions
werrno: fix error number defines to match what winsock wants
wtime_internal: slight fix, use struct tag name instead of typedef
wutil: export LibError_from_GLE
This was SVN commit r5084.
- 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.
# The engine now builds and runs on Mac OS X.
Most changes were localized to the sysdep/ folder and the build system.
This
is what porting should be like! Hopefully nothing breaks on the other
platforms though ;-)
This was SVN commit r5081.
config, compiler: remove reliance on HAVE_C99; mention it's only for
pure C mode; make a few of the HAVE_ macro defs more clear
This was SVN commit r5076.
cpu: cache CPU info to prevent calling freq measurement code several
times
config: mention e.g. fopen_s instead of only the secure string functions
ia32: exception-safe scheduler setting; no longer use absolute max
priority (risky, could hang machine if loop contains a bug)
wtime: add note on TSC safety, slight improvements
timer: try and prevent timer from returning the same value
This was SVN commit r5075.