1
0
forked from 0ad/0ad
Commit Graph

24 Commits

Author SHA1 Message Date
4e8c305c6e sync with work - export app_hooks_update; add boost replacement FileExists and FileSize; avoid conflict with stdint.h;
remove asm rintf implementation (sse is faster); avoid the need for an
external 64-bit asm file with vc2008/vc2010; allow arbitrarily long
command line args

This was SVN commit r8985.
2011-02-25 16:31:42 +00:00
ba2a9d7af3 improvements from work: [update-workspaces required]
- split precompiled.h into several headers (simplifies reuse)
- enable additional warnings not in W4
- split ErrorReaction into ErrorReactionInternal - clarifies which
values can actually be returned by debug_DisplayError
- wsdl: slightly safer HDC usage via CS_OWNDC, avoid dipping into DC
cache via ValidateRect instead of BeginPaint; remove unused thread
create
- StdDeserializer - wasn't including byte_order => BYTE_ORDER was
undefined
- wsysdep: clean up error dialog message handling

This was SVN commit r8828.
2010-12-09 11:16:21 +00:00
c2fd939898 license change to the more permissible Expat/MIT license for lib/ (see forum thread)
This was SVN commit r7316.
2010-02-08 16:23:39 +00:00
345395375a wchar: only raise warning dialog if caller doesn't ask for a return code
update test_wchar accordingly.
app_hooks: update documentation

This was SVN commit r7190.
2009-11-10 21:07:18 +00:00
8fefedb5ae fix: native and vfs directory paths should end with '/' (more code cares about this now)
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.
2009-11-05 20:46:15 +00:00
8a52113e60 huge cleanup and conversion of most string handling (especially paths) to unicode
please note: format strings must be %hs for char* arguments and %ls for
wchar_t*

This was SVN commit r7161.
2009-11-03 21:46:35 +00:00
1743645fd3 Simplify the overly-complex CppDoc-breaking file headers
This was SVN commit r6832.
2009-04-18 17:51:05 +00:00
214b0e6683 Removed outdated licensing information
This was SVN commit r6831.
2009-04-18 17:17:34 +00:00
c9fa7f13d9 Add GPL header
This was SVN commit r6830.
2009-04-18 17:00:33 +00:00
c4654fd8fa bits: avoid sign conversion warning
debug: cleanup
ogl_tex, tex: use full-width types to avoid truncation warnings
wdbg_sym.cpp: skip __suppress and __profile symbols; add additional hex
display for floats; cleanup
wdll_ver.cpp: cppdoc+cleanup (remove non-reentrant C interface, replace
with std::string)
sysdep: add cppdoc

everything else: flag parameters are now consistently size_t instead of
int (avoids warnings, allows slightly better code on x64)

This was SVN commit r6392.
2008-09-18 11:27:55 +00:00
c0ed950657 had to remove uint and ulong from lib/types.h due to conflict with other library.
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.
2008-05-11 18:48:32 +00:00
d19a2cba65 include boost smart pointers from PCH
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.
2007-11-20 18:44:36 +00:00
b755ddefda remove all author/modified by tags.
make include guards consistent.

This was SVN commit r5040.
2007-05-07 16:33:24 +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
05aadf1f12 # SwEng: remove X-macros from app_hooks (confused static code analysis)
This was SVN commit r4372.
2006-09-21 12:06:56 +00:00
3b753a4df8 # add cppdoc
refs #122

This was SVN commit r4034.
2006-06-25 15:31:58 +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
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
836cd08d5e # add CppDoc file header to all files, along with their descriptions.
also:
- renamed wdll to delay_load, and wdll_ver to dll_ver
- removed empty wcpu

This was SVN commit r3751.
2006-04-11 23:59:08 +00:00
c4e3037e60 adts: add LL_OPT_* defines that enable optimizations (some only make sense if there are tons of files, and need to be able to disable them for thesis). realized this would be perfect application of policy template classes, which will replace this.
fix crashdumps: was failing to write out to file (underlying cause:
current directory no longer being set)
app_hooks: add get_log_dir; used by debug and wdbg_sym

minor improvements/documentation in archive+compression+file_cache+zip

main: remove dead ScEd code

This was SVN commit r3498.
2006-02-11 22:49:09 +00:00
1c1200a049 - massive overhaul of lib error code returning. int -> LibError everywhere.
- add translators from errno and GetLastError to LibError
- clarified return values of callbacks (they must return
INFO_CB_CONTINUE to continue)
- this exposed a few bugs in error handling chains (returning incorrect
values); also reduced say-nothing instances of return -1.
- move CHECK_ERR etc. macros to lib_error

This was SVN commit r3229.
2005-12-11 22:23:55 +00:00
a5a9f4b657 g++ compilation fixes.
Fix: Unix symbol resolver ignores NULL parameters like Windows resolver
instead of crashing.
Fix: Bugs and crashes in the input system, caused by wrong use of
SDL_BUTTON_* constants.

This was SVN commit r2984.
2005-10-21 18:32:16 +00:00
b17fbf003d -move app-specific stuff out of lib/ and into "hooks". see new lib/app_hooks* (note X macro goodness)
-move tex_codec stuff out of tex.cpp and into tex_codec.cpp
-tex_codec: use linked list of codecs instead of array (simplifies code
and removes limit)
-ogl_tex: add override mechanism for s3tc/automipmapgen extension detect
-tired of keeping of debug_warn text in sync with function name; now use
__func__ everywhere (and emulate that with __FUNCTION__ on MSC)
-add ONCE_NOT (opposite of ONCE)
-fix 3!! stupid bugs in ia32_control87, its caller and the header that
were canceling each other out. float exceptions now enabled except for
"inexact result" (too common). (update: nicolai had already fixed 2 of
these)

This was SVN commit r2964.
2005-10-19 03:06:54 +00:00