1
0
forked from 0ad/0ad
Commit Graph

4355 Commits

Author SHA1 Message Date
b879e344f1 make sure winit shutdown actually happens during self-test (fixes leaks and possibly failure to unload driver)
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.
2007-05-28 15:08:33 +00:00
7fe6c3d77f add detours library for API hooking.
(update aken driver while at it)

This was SVN commit r5107.
2007-05-28 15:01:29 +00:00
29610672f4 fix warnings
This was SVN commit r5106.
2007-05-28 14:25:07 +00:00
52ae284a7e new timer code (esp. HPET) now operational. TSC still disabled pending calibration code.
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.
2007-05-28 09:25:38 +00:00
bc519cc671 prevent crash if lib_error association code is called before _cinit (happens if there's a problem with whrt init).
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.
2007-05-28 09:20:55 +00:00
843d849931 This was SVN commit r5103. 2007-05-28 02:37:38 +00:00
c9f10be090 acpi and mahaf: now set ModuleInitState to error if something fails (prevents a subsequent init from returning true and allowing its dependent to continue and crash into a wall)
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.
2007-05-26 23:29:20 +00:00
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
349d9b9afe add whrt dir, remove winmm delayload and dsound dependency
(workspace must be updated)

This was SVN commit r5095.
2007-05-26 17:17:47 +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
3386154fe3 This was SVN commit r5087. 2007-05-23 06:13:28 +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
d088e0840a kernel-mode portion of HPET driver (checked builds for xp64 and xp)
This was SVN commit r5083.
2007-05-21 19:14:44 +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
dcf253714f debug CRT from vc8sp1
This was SVN commit r5073.
2007-05-15 13:10:12 +00:00
86e6b780ea This was SVN commit r5071. 2007-05-14 00:34:18 +00:00
0e0b995c4f #New more accurate Philip of Macedon armor texture. :)
This was SVN commit r5070.
2007-05-13 20:21:28 +00:00
91e3cc4c0a This was SVN commit r5069. 2007-05-13 20:20:05 +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
bd2af78d4f hopefully final fix for vc8sp1 breakage
(we have no idea why the config file's resourceId must be 2, but filemon
shows this file is called for)

This was SVN commit r5067.
2007-05-13 02:01:08 +00:00
695ba038f1 attempt to resolve SxS versioning issue with vc80sp1
This was SVN commit r5066.
2007-05-12 19:00:31 +00:00
addf1aba46 CRT files from VC8SP1 as a further fix to michael's bug report
This was SVN commit r5064.
2007-05-11 20:10:17 +00:00
0804cf5248 when building with atlas, VC8 embeds a dependency on comctl into the manifest => add that manifest to our app dir
This was SVN commit r5063.
2007-05-11 16:51:11 +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
d69a0c52bb update OpenAL include/lib from SDK (nothing really changed in the header)
add crypto++ to libraries (will later be used for checksums)

This was SVN commit r5058.
2007-05-11 09:41:46 +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