1
0
forked from 0ad/0ad
Commit Graph

2723 Commits

Author SHA1 Message Date
2348f71aea mahaf: don't bring up a warning when starting the driver fails (expected case on non-admin accounts)
wcpu: detect values once during init (simplifies code a bit)

This was SVN commit r5100.
2007-05-26 22:42:08 +00:00
8f066e18ee Ignore non-standard mouse buttons, instead of crashing
This was SVN commit r5098.
2007-05-26 18:38:38 +00:00
f1e3c44d1b test_lockfree: eliminate GCC warning
lockfree: avoid mem leak caused by no longer necessary shutdown hack

This was SVN commit r5097.
2007-05-26 18:16:13 +00:00
4582c8f276 unbreak lockfree test, add sanity checks and timer init
lockfree: avoid potential race condition and add bounds check
whrt: sanity check
test_lockfree: fix by adding call to init/shutdown lockfree
timer: add proper init/shutdown
GameSetup: call lockfree and timer init/shutdown

This was SVN commit r5096.
2007-05-26 17:56:38 +00:00
2fee886a34 Linux compatibility
This was SVN commit r5094.
2007-05-26 17:10:28 +00:00
c45ef68a88 add work-in-progress WHRT (win high res timer). works well enough, but calibration is not yet complete nor is TSC usable.
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.
2007-05-26 16:57:39 +00:00
d478e21f2b Linux compatibility
This was SVN commit r5092.
2007-05-26 16:39:26 +00:00
4d94b4f4aa config: make HAVE_MKDIR 0 on vc7 (fixes autobuilder problem)
wsnd: fix typo

This was SVN commit r5091.
2007-05-26 15:45:34 +00:00
452d67f0b7 # vista compat (fixes wsnd issue) and improvements
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.
2007-05-26 15:34:10 +00:00
ceee6e00bd dll_ver: move redirection enable/disable to wutil. add LoadLibraryEx to diagnose cause of GetFileVersionInfoSize failure.
wposix: assert it's initialized
wsnd: cleanup

This was SVN commit r5089.
2007-05-24 12:31:16 +00:00
1814d9175a dll_ver: don't call Wow64 stuff on 32-bit vista
+minor improvements:
. move libjpeg-specific stuff to its own header

This was SVN commit r5088.
2007-05-24 02:32:53 +00:00
cded0936c5 # housekeeping
. 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.
2007-05-21 23:24:56 +00:00
b53b75b4fc WIP: driver for HPET timer (useful for WinXP, SMP systems)
can successfully read the counter.

This was SVN commit r5085.
2007-05-21 19:27:16 +00:00
bd42f083e0 minor cleanup+fixes+additions
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.
2007-05-21 19:22:55 +00:00
9d2acce9d8 # SwEng/cleanup
- 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.
2007-05-18 00:14:26 +00:00
7d4af5979b Fixes for the Mac.
# 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.
2007-05-17 03:37:49 +00:00
b01acce45f macosx compat: separate strdup and wcsdup
This was SVN commit r5080.
2007-05-16 23:56:08 +00:00
e64166360e re-add strdup, needed for MacOSX
(deja vu! can't find where that was once defined; it was still declared)

This was SVN commit r5079.
2007-05-16 23:49:55 +00:00
c8555a708a fix secure_crt (was missing tchar redirection for printf_s and fopen_s)
This was SVN commit r5078.
2007-05-16 22:33:53 +00:00
4083e1ff48 # MacOSX compat
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.
2007-05-16 16:32:12 +00:00
160bd14bb0 robustify CPU freq detection and timer code, hopefully solve lockup issue
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.
2007-05-16 15:56:47 +00:00
2e5c530c03 Modified semantics of HEntity's validity check to count handles to units that are destroyed but not deleted as still valid handles. This fixes some previous code that assumed these semantics, such as code for dealing with exhausted gather targets. It looks like the meaning was changed long ago when the entity flags were added. Also added an IsAlive method in HEntity for the old check, in case any code needs to be switched over to that.
Also removed some debug output from entity_functions.js.

This was SVN commit r5074.
2007-05-16 06:58:49 +00:00
31a60bf1d8 - debug version of xerces libs and updated headers
- update premake for wxw 2.8 and make some required fixes in
VideoRecorder.cpp

This was SVN commit r5068.
2007-05-13 10:27:48 +00:00
9809d5ace4 #bugfixes
wdbg: ignore exceptions generated during normal OutputDebugString
operation. (unclear why we are now getting them all of the sudden -
shouldn't happen!)

JS: fix strings identifying JS functions (some were inadvertently
renamed according to capitalized C++ names)

GameLoop: add code to import Atlas_ReportError

Register: fix include guard name and thus unbreak Atlas

This was SVN commit r5062.
2007-05-11 13:11:25 +00:00
45c76ce39d fix self-tests.
clarify that timestamp in system_info is UTC.

This was SVN commit r5055.
2007-05-10 21:33:56 +00:00
80057a82e5 patch, gameview: fix typos, revise according to coding convention
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.
2007-05-10 20:47:17 +00:00
christian
6fa68cd957 fixed Shadow culling: second implementation
This was SVN commit r5052.
2007-05-10 15:28:59 +00:00
a34b759720 . split up lib.h/.cpp, include the remnants from PCH, remove (pretty much universal) include of it.
. 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.
2007-05-09 21:01:11 +00:00
78d950e419 Add some missing file comments in source/lib.
win_internal -> win.h (pulls in <windows.h>, with fixes afterwards)
remove empty waio_internal and wsysdep
Move source/sound license notice into source/sound/license.txt

This was SVN commit r5044.
2007-05-08 15:11:53 +00:00
f0babca374 add license files that are now referenced from some source files (instead of direct author/copyright/license notices in the source)
This was SVN commit r5042.
2007-05-08 14:02:06 +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
christian
5cbb0b2fed This was SVN commit r5036. 2007-05-06 07:58:16 +00:00
44f5288a1d # SwEng
png.h, wxwidgets.h: automatically link against lib files
main: document and avoid potential memory leak with args
AtlasUI/ErrorReporter: move crashlog_sender.cpp here as per Philip's
suggestion. currently disabled via #if 0
stdafx: add missing header apparently required by trigger.h

This was SVN commit r5034.
2007-05-05 17:41:20 +00:00
4be0fe18a0 # SwEng
. 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.
2007-05-04 17:30:32 +00:00
a8f8c74ed2 Fixed Linux build (needed an include).
This was SVN commit r5026.
2007-05-04 06:21:21 +00:00
69af5ac8c0 fix self tests after recent renaming
This was SVN commit r5024.
2007-05-03 15:42:43 +00:00
22a01fb3ba unbreak the build :S (apparently screwed up while copying files from dev machine to internet machine)
This was SVN commit r5022.
2007-05-03 08:42:30 +00:00
a9f8a33893 remove sys_alloca (difficult to wrap in a sysdep function) and eliminate the need for it
debug: when building error message, use mmap instead of alloca
scheduler: remove reference to deleted header

This was SVN commit r5019.
2007-05-02 16:42:27 +00:00
d099084dd5 remove apparently no longer used files (contents are empty or commented out)
This was SVN commit r5018.
2007-05-02 12:13:05 +00:00
73683b6109 # SwEng
. 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.
2007-05-02 12:07:08 +00:00
5a427440d0 #SwEng
fpclassify fix
EntityManager: rename getExtant -> GetExtantAsHandles, fix its
implementation+call site to avoid dynamic alloc/auto ptr, rename extant
-> IsExtant
vsnprintf2 -> sys_vsnprintf. remove printf.h (function is declared in
sysdep header)
use SUS/posix-ish strcasecmp instead of defining that to the
windows-only stricmp
add cppdoc for ia32/cpu

This was SVN commit r5011.
2007-04-30 19:58:04 +00:00
be3f3bdbfb # SwEng / MacOSX compat
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.
2007-04-30 14:35:19 +00:00
c6649d4d19 Added #if OS_BSD around BSD-specific functions (bsd.cpp).
This was SVN commit r5003.
2007-04-28 16:36:54 +00:00
pyrolink
684dbbe9ba #Preliminary end game conditions; cinematic and trigger fixes
Cinematic editor is less clumsy.  Forward and backward buttons now move
the camera to the next and previous nodes.

This was SVN commit r5000.
2007-04-27 03:05:26 +00:00
623e649acb # big refactoring in CPU-specific code, fix for dual core vs. HT detection
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.
2007-04-25 18:19:35 +00:00
cf21949640 Fixed a few issues for Linux build:
- Quick change of _mkdir into mkdir (really, this should be done with a
library function, which Jan is working on).
- Moved CJSComplex::GetScript() implementation into its .h file from its
.inl file to avoid some link errors in release build due to inlining.

This was SVN commit r4994.
2007-04-25 03:10:56 +00:00
104118b7e0 (wasn't committed last time. contains changes related to dir_crete)
This was SVN commit r4993.
2007-04-24 21:49:26 +00:00
1cb5b79098 # Linux fixes
Make sure INT64_C is defined (since FFmpeg wants it)

This was SVN commit r4992.
2007-04-24 21:11:43 +00:00
665030adcf Fixed some CStrW's in Technology.cpp for Linux compile.
This was SVN commit r4986.
2007-04-23 03:47:33 +00:00
e8a0626248 # improvements to foundation code
(merged in from thesis project branch)

allocator: remember page-aligned size (prevent resize error)
config, sysdep, lib: add implementation of wcsdup for macosX
path_util: add path_package_copy and cleanup
file: add dir_exists, dir_create uses _mkdir (avoids mode_t param)

This was SVN commit r4984.
2007-04-22 16:43:54 +00:00