1
1
forked from 0ad/0ad
0ad/source/lib
janwas 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
..
allocators had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
external_libraries fix problems related to 64-bit compilation in lib 2008-04-19 18:10:00 +00:00
file had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
posix had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
res had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
sysdep had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
tests had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
tex had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
adts.h had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
app_hooks.cpp had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
app_hooks.h had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
base32.cpp had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
base32.h . split up lib.h/.cpp, include the remnants from PCH, remove (pretty much universal) include of it. 2007-05-09 21:01:11 +00:00
bits.cpp had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
bits.h had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
byte_order.cpp had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
byte_order.h fixes/improvements made at work: 2008-05-01 15:41:42 +00:00
cache_adt.h had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
code_annotation.h fixes/improvements made at work: 2008-05-01 15:41:42 +00:00
config2.h had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
config.h remove mmgr and macros that redefine malloc/new/free 2008-01-19 11:33:11 +00:00
debug_stl.cpp had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
debug_stl.h fix debug_stl for vc8; refactor/simplified implementation 2007-10-09 17:05:05 +00:00
debug.cpp had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
debug.h had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
fat_time.cpp had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
fat_time.h include boost smart pointers from PCH 2007-11-20 18:44:36 +00:00
fnv_hash.cpp . split up lib.h/.cpp, include the remnants from PCH, remove (pretty much universal) include of it. 2007-05-09 21:01:11 +00:00
fnv_hash.h . split up lib.h/.cpp, include the remnants from PCH, remove (pretty much universal) include of it. 2007-05-09 21:01:11 +00:00
frequency_filter.cpp part2: misc source/lib fixes/improvements 2007-12-20 20:09:19 +00:00
frequency_filter.h part2: misc source/lib fixes/improvements 2007-12-20 20:09:19 +00:00
glext_funcs.h Moved X11 stuff out of unix/ folder, added osx/ sysdep folder, corresponding premake.lua changes, and a few misc other Mac OS X-related changes 2007-09-03 12:56:45 +00:00
input.cpp had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
input.h remove all author/modified by tags. 2007-05-07 16:33:24 +00:00
lib_api.h improvements and fixes: 2008-01-07 20:03:19 +00:00
lib_errors.cpp fixes, documentation and cleanup. 2007-05-29 16:28:34 +00:00
lib_errors.h part2: misc source/lib fixes/improvements 2007-12-20 20:09:19 +00:00
lib.cpp had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
lib.h had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
license.txt add license files that are now referenced from some source files (instead of direct author/copyright/license notices in the source) 2007-05-08 14:02:06 +00:00
lockfree.cpp had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
lockfree.h had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
module_init.cpp fixes/improvements made at work: 2008-05-01 15:41:42 +00:00
module_init.h fix error path for acpi/mahaf failures (attempt#2) 2007-09-07 20:17:57 +00:00
ogl.cpp fixes/improvements made at work: 2008-05-01 15:41:42 +00:00
ogl.h fixes/improvements made at work: 2008-05-01 15:41:42 +00:00
os_path.h forgot to add this file :S 2007-12-23 12:56:40 +00:00
path_util.cpp had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
path_util.h had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
precompiled.cpp 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) 2006-04-23 23:14:18 +00:00
precompiled.h fixes/improvements made at work: 2008-05-01 15:41:42 +00:00
rand.cpp had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
rand.h had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
regex.cpp . split up lib.h/.cpp, include the remnants from PCH, remove (pretty much universal) include of it. 2007-05-09 21:01:11 +00:00
regex.h . split up lib.h/.cpp, include the remnants from PCH, remove (pretty much universal) include of it. 2007-05-09 21:01:11 +00:00
secure_crt.cpp part2: misc source/lib fixes/improvements 2007-12-20 20:09:19 +00:00
secure_crt.h additional linux fix (hopefully): "add" sscanf_s 2008-01-07 20:07:05 +00:00
self_test.cpp improvements and fixes: 2008-01-07 20:03:19 +00:00
self_test.h had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
timer.cpp had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
timer.h had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
types.h had to remove uint and ulong from lib/types.h due to conflict with other library. 2008-05-11 18:48:32 +00:00
wsecure_crt.cpp patch, gameview: fix typos, revise according to coding convention 2007-05-10 20:47:17 +00:00