1
0
forked from 0ad/0ad
Commit Graph

3047 Commits

Author SHA1 Message Date
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
67f8087b6f Don't hack around low RAND_MAX values when RAND_MAX is high.
This was SVN commit r3469.
2006-02-04 19:12:09 +00:00
13897010d5 Premake workspace: use native wchar_t type in VC7.1/8
This was SVN commit r3467.
2006-02-03 22:29:53 +00:00
2f438a6889 cache_allocator bugfix: do not attempt to coalesce allocations that are at start/end of committed region. fixes self-test failure.
This was SVN commit r3466.
2006-02-03 21:44:09 +00:00
debd047638 proper definition of wchar_t (if needed; currently not)
This was SVN commit r3465.
2006-02-03 20:45:36 +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
41f08eecb8 Seems we didn't have just a "plain white" terrain... so I made one.
This was SVN commit r3463.
2006-02-03 07:00:28 +00:00
1227cb2f6d adts: add RingBuf self-test. RingBuf: make entry#0 the 'head' and pop_front a no-op if empty.
allocators: allow pool_create at NLSO ctor time
lib: add rand() function based on libc rand and self-test. (this allows
easily returning a random number within a range, and avoids a number of
pitfalls - the naive rand()%range approach is baaad)
precompiled: add self_test.h, so that self tests won't be accidentally
disabled by forgetting to include the header

file_cache: add self-test; fixed 2 bugs that exposed (was incorrectly
splitting large blocks and not setting class_size bit properly). fix
weird corner case in BlockMgr (attempting to free LRU block but it is
locked).

file_io, wdbg_sym: tiny fixes

This was SVN commit r3461.
2006-02-03 04:02:53 +00:00
3e2017147d Snazzier resizing resource counters and some miscellaneous fixes.
This was SVN commit r3460.
2006-02-03 03:15:49 +00:00
8ed6965d18 fix crash that happened after editing file while game is running. vfs_tree's tree_root object was being destroyed but not recreated when rebuilding the VFs tree. fixed that as well as correctly freeing all TNode memory upon rebuild.
This was SVN commit r3458.
2006-02-02 05:20:33 +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
22be4ee0d6 temp ships with props
This was SVN commit r3455.
2006-02-01 10:53:10 +00:00
792d1d5f80 gcc implicitly makes inline functions static, so don't make those functions
inline (since they have to be linked, they cannot be inlined anyway)

This was SVN commit r3454.
2006-02-01 01:33:59 +00:00
efc45aac23 This was SVN commit r3453. 2006-02-01 00:58:17 +00:00
79767e2e1b This was SVN commit r3452. 2006-02-01 00:57:44 +00:00
f5dec3e4ab This was SVN commit r3451. 2006-02-01 00:57:19 +00:00
d11fcc8257 file_cache: bugfix in CacheAllocator
hook up file_stats; implemented stats_dump (gives somewhat detailed
report at exit)

This was SVN commit r3448.
2006-01-31 07:48:32 +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
6eb9bfa730 Reenabled shadows in system.cfg.
This was SVN commit r3445.
2006-01-29 23:54:29 +00:00
cff5dfae07 Preliminary version of player selection for Atlas. You can press any key 0-8 while the place object tool is active to place an object for that player, though the preview object will always be shown in white (Gaia) until I can figure out how to cleanly update its colour.
This was SVN commit r3444.
2006-01-29 23:38:19 +00:00
pyrolink
bbbb9e12af -hotkey for cinematic interface (not working)
This was SVN commit r3443.
2006-01-29 23:27:16 +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
7c6bac667c Apparently, there's a conflict between setjmp.h and libpng in some cases.
So don't always include setjmp.h

This was SVN commit r3440.
2006-01-29 19:46:31 +00:00
30284fc7c5 minor warning fixes: struct vs. class forward decl; size_t vs uint
This was SVN commit r3438.
2006-01-29 18:38:40 +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
90bf4ae0a7 - add CBound::Render()
- fix CBound::Transform() math
- beginnings of new shadow bound calculations

This was SVN commit r3436.
2006-01-29 17:34:45 +00:00
Aeros
6699dc11c7 This was SVN commit r3435. 2006-01-29 03:59:32 +00:00
a3f4424e35 Fixed bug in documentation of confusing feature, unless the fix is wrong too
This was SVN commit r3434.
2006-01-29 02:58:19 +00:00
ecbcc59fba bugfix: no longer make freed buffers readonly because we need to write boundary tags into them for coalescing
This was SVN commit r3432.
2006-01-28 23:02:26 +00:00
d0066d32f0 another free()
This was SVN commit r3431.
2006-01-28 22:41:22 +00:00
cda1e4c177 bitten by free() redirector macro again.. fixed
This was SVN commit r3430.
2006-01-28 22:30:28 +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
e07622b56a Cache: implement meat of landlord algorithm and add remove()
allocators: add freelist capability to Bucket; add provision for
variable XOR fixed size allocs
archive: re-tag file buffers if reading uncompressed from archive;
improve LFH fixup logic
file_cache: add cache line invalidation; lock down pages (readonly) when
IO finished
file_io: cleanup+docs; properly cut off at EOF without breaking
alignment.
file_stats: add seek accounting (WIP)
vfs_optimizer: also record file_buf_free in the trace. initial
implementation of archive builder (WIP)
zip: lfh_fixup now more efficient (does not involve buffer manager -
instead it grabs LFH from temp blocks)
tex: plug FileIOBuf leak. avoid writing to tex.hm because that is a
read-only file_buf.

This was SVN commit r3428.
2006-01-28 22:19:42 +00:00
3b4295a177 Linux build fixes
This was SVN commit r3427.
2006-01-28 22:04:09 +00:00
afe37d9fe2 fix vc8 errors reported by andrew: (thanks!)
- made file_io_wait buffer non-const (less const_casting around -
buffers are really non-const. besides which, inadvertent use will be
caught via MMU)
- zip: disambiguate abs() param

This was SVN commit r3426.
2006-01-25 07:37:20 +00:00
1ea2d25373 forgot this one..
This was SVN commit r3425.
2006-01-25 07:23:53 +00:00
4a508c6b87 all lib/res/file headers included in file_internal.h
split stats into separate file; different call mechanism; add lots of
stats (WIP)

This was SVN commit r3424.
2006-01-25 07:21:45 +00:00
83ccd72798 Tiny fix to the "unit AI" in the damage event handler to make ranged units fight back when attacked.
This was SVN commit r3423.
2006-01-24 11:08:53 +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
36cbf23c8e v2 of file/res code for thesis:
previous zip.* split up into archive, zip and compression. add O(1)
lookup via memento. add support for writing Zip archive. simplify IO by
having compression module allow queuing input buffers.

file: split up into file, file_Io, file_cache. add atom_fn that enables
string comparison via pointer compare. (stores all filenames/paths in
one place). add statistics gathering.
file_cache: landlord algorithm for caching files as well as LRU block
cache.
file_io: aio code that splits transfers into blocks revamped and made
into class.

vfs: filelist/trace code moved into new vfs_optimizer. add caching logic
to vfs_load.
vfs_optimizer: will generate zip archive (to replace current archive
builder script). not yet done
vfs_tree: major cleanup - now has nice base class rather than union
hackery.

This was SVN commit r3420.
2006-01-23 20:05:09 +00:00
72cc581c2e Renamed Decay to Corpse for all actor animations, and added extra animations to Basic Celt Infantry Spearman and Javelinist for testing purposes.
This was SVN commit r3419.
2006-01-23 16:16:59 +00:00
c29c222936 Fixed a JS error message when corpses were attacked (because they had no
armour).

This was SVN commit r3418.
2006-01-23 10:36:18 +00:00
4dbeb2ed6c Fixed a compile error (on gcc-3.3 at least): the code in adts.h used
Traits.something where Traits is a typename instead of using
tr.something where tr is an instance of Traits.

This was SVN commit r3417.
2006-01-23 10:35:24 +00:00
f8b9114b17 wdbg: fix FOURCC usage (fixes exception locus reporting)
others: fix various minor warnings

This was SVN commit r3415.
2006-01-23 08:02:08 +00:00
f06f0c8240 adts.cpp: remove DynArray, which was an array of pages. (obsoleted by DynArray/Pool allocators)
adts.h: add Cache (landlord algorithm), move DynHashTbl here from
vfs_tree; expand RingBuf and fix its iterator
allocators: minor tweaks+bugfixes; add SingleAllocator C++ wrapper
config, types: avoid stupid ICC warnings
lib: add round_down, u32_from_u16, SAFE_FREE

This was SVN commit r3414.
2006-01-23 07:59:20 +00:00
c4aea4eb62 Health regen fix for ranged attack.
This was SVN commit r3411.
2006-01-23 03:56:48 +00:00
1c541db46b Health regen fix for ranged attack.
This was SVN commit r3410.
2006-01-23 03:55:35 +00:00
cdd432ba46 updating the tips file to some latin
This was SVN commit r3409.
2006-01-23 03:38:45 +00:00
16341dd834 Fixed someone else's "fix"... The Celts don't get a wall tower, they get a wall turret, which is not the Scout Tower, which someone made it into. :) Sooooooo, I changed the actor in the entity back from the scout_tower to the wall_turret.
This was SVN commit r3408.
2006-01-23 03:20:28 +00:00
199550457d to entities that I'm adding to fix errors
This was SVN commit r3407.
2006-01-23 02:34:38 +00:00