Commit Graph

88 Commits

Author SHA1 Message Date
e64a3d3946 Experiment a little with OpenGL ES
This was SVN commit r10915.
2012-01-15 23:15:31 +00:00
893cb2668e Renames our sdl.h to libsdl.h, to avoid case sensitivity errors when it includes SDL.h.
This was SVN commit r10904.
2012-01-12 23:32:27 +00:00
0ec4242962 Detect and fix printf signedness errors. Fixes #1086, #1087.
This was SVN commit r10846.
2012-01-01 16:43:10 +00:00
6ac6d4f1ec Fix #1062 (incorrect check for empty string), based on patch by Echelon9
This was SVN commit r10821.
2011-12-29 01:07:20 +00:00
7600c3862b refactor gfx detection code (interface), allow exporting from DLL (required at work)
This was SVN commit r9546.
2011-05-24 14:17:47 +00:00
7523894760 ENSURE(0) -> DEBUG_WARN_ERR(ERR::LOGIC) (a bit smaller, and more descriptive)
This was SVN commit r9423.
2011-05-04 12:10:17 +00:00
cccd6849a7 cleanup (requires update-workspaces)
lib_errors.cpp: replace with status.cpp, adapt to needs at work
wutil: fix runtime warning reported via feedback box
config: merge CONFIG_PARANOIA and !CONFIG_FINAL into
CONFIG_ENABLE_CHECKS
add openmp, pointer_typedefs.h

This was SVN commit r9410.
2011-05-03 12:38:42 +00:00
0720025073 cleanup
reduce dependency on PCH. move KiB constants to alignment, ARRAY_SIZE to
code_annotation.h.
move glext_funcs.h to external_libraries/glext_funcs.h, move part of
ogl.h to external_libraries/opengl.h
remove unused saturating arithmetic functions

This was SVN commit r9363.
2011-04-30 13:22:46 +00:00
4663ac0fe7 split debug_assert into ENSURE and ASSERT as discussed in a previous meeting.
the old debug_assert always ran and tested the expression, which slows
down release builds. wrapping them in #ifndef NDEBUG is clumsy. the new
ASSERT behaves like assert and ENSURE like the old debug_assert. Let's
change any time-critical but not-super-important ENSURE to ASSERT to
speed up release builds. (already done in bits.h and unique_range.h)

This was SVN commit r9362.
2011-04-30 13:01:45 +00:00
ecbd0ae31b Fix Windows build.
Improve compatibility with GL1.3.

This was SVN commit r9077.
2011-03-18 18:07:18 +00:00
e70fae8d80 Stop using glMultiDrawElements since it's too buggy
This was SVN commit r9064.
2011-03-14 21:57:09 +00:00
fc2c54c39f # Optimise terrain renderer.
Batch patch splats by texture match.
Use VBOs for patch indices.
Fixes #722.

This was SVN commit r9053.
2011-03-13 19:06:33 +00:00
eb163c8d24 Improve reporting of extensions promoted into GL 1.2
This was SVN commit r8996.
2011-02-27 14:25:04 +00:00
0c1e05d672 Fix typo
This was SVN commit r8972.
2011-02-22 20:15:59 +00:00
e91434a23d Extend isImplementedInCore up to GL 3.0
This was SVN commit r8950.
2011-02-20 00:52:50 +00:00
3e1f09a58f Fix missing newline in GL error reporting
This was SVN commit r8936.
2011-02-19 00:38:08 +00:00
6935a03743 remove no-longer needed GLU dependency; avoids delay-load warning.
This was SVN commit r8555.
2010-11-08 10:42:34 +00:00
3124b55cc0 Warning fixes
This was SVN commit r7821.
2010-07-29 21:04:07 +00:00
3bccfc295f Fix the GL extension fallback functions so they actually get used
This was SVN commit r7803.
2010-07-25 11:03:45 +00:00
0833d6a950 Improve OpenGL 1.1 support
This was SVN commit r7747.
2010-07-13 20:37:44 +00:00
f066daf21d update zlib, libpng; rebuild libjpg (avoids dependency on msvcr71)
update-workspaces required.

This was SVN commit r7630.
2010-06-21 11:54:15 +00:00
1861448e6c needed to split lib into separate headers and source files, which requires lots of drudgery to specify paths for each include filename (no longer relying on same-directory lookups)
also rename wchar -> utf8 to avoid conflict with <wchar.h> (requires
rebuild of workspace)
(unfortunately copying history fails to "502 bad gateway"; had to delete
old + add new independently)

This was SVN commit r7340.
2010-03-01 14:52:58 +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
03726c0b54 ICC build fixes
warning fixes
get rid of SAFE_WCSCPY and SAFE_STRCPY

This was SVN commit r7239.
2010-01-01 15:33:07 +00:00
f432d9d18b fix dehydra warnings (some of which were dangerous pass-user-string-as-format-string vulnerabilities)
This was SVN commit r7177.
2009-11-07 09:32:19 +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
cd6a926c14 Fix #293 (Lots of printf format string errors), based on patch from Cygal
This was SVN commit r7113.
2009-08-14 18:42:39 +00:00
e33f3f5e64 Use the correct names for core shader functions in GL 2.0 implementations
This was SVN commit r6985.
2009-07-14 13:34:31 +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
228859da99 # Fix water-related crash on some video drivers
Detect some errors loading fancy-water fragment shader, and disable
fancy water.
Fixes crash with Mesa on 945GM (which doesn't support fragment shaders,
though it advertises the extensions).

This was SVN commit r6773.
2009-03-24 21:00:41 +00:00
8bb535de75 GL functions have stdcall convention on windows, so that needs to be included in the cast
note that windows build is currently broken - comment out
const size_t CUnit::invalidId;
in Unit.cpp (seems to be a dark corner of the C++ standard, am currently
discussing this with simon)

This was SVN commit r6158.
2008-06-29 21:32:52 +00:00
7d18028fe2 Un-type-pun importExtensionFunctions
This was SVN commit r6151.
2008-06-29 09:54:26 +00:00
cc243f67eb fixes/improvements made at work:
- fix lots of 64-bit warnings
- round_up/down now templates
- avoid warning with definition of byte swap functions; remove
duplication of that in wsdl
- codec_zlib.cpp: avoid domination warning
- vfs/file_cache: VFS is now responsible for handling zero-length files
(no longer considered an error; just returns zero pointer and size=0)
- cpu: export all functions (thus obviating cpu_memcpy_thunk). this
required renaming asm functions and adding thunk functions that call
them
- winit: fix segment merge statement, reinstate /include (otherwise init
functions are stripped by linker)
- wstartup: VC CRT init section definitions have changed in amd64 build;
match their definition
- wsysdep.cpp: more descriptive text for osError = 0

This was SVN commit r5899.
2008-05-01 15:41:42 +00:00
2e5d9452aa part2: misc source/lib fixes/improvements
move all except user-specified config choices out of config.h and into
appropriate headers
CPU_IA32 -> ARCH_IA32
wsdl: disable use of ddraw (will soon be replaced by WMI)

use shared_ptr without namespace qualifier (it's in tr1)
debug_warn -> debug_assert(0)
LIB_API to allow building as DLL
smart pointers: reduce use of .get()
cache_adt: use map instead of hash_map (avoids needing a hashCompare
class). also remove spurious warning
code_annotation.h: better cassert implementation
move FPS measuring portion of timer.cpp into frequency_filter
move include of memory headers into mmgr.h (to avoid errors, we must
ensure they are included if mmgr is used)
posix_filesystem.h: move definition of mkdir to wfilesystem
stl: disable iterator checks in release mode
wmi: fix COM init bug, use smart pointers
wutil: add code to get DLL module handle (if compiled as such), add
WinScopedLock
timer: fix handling of raw ticks

This was SVN commit r5517.
2007-12-20 20:09:19 +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
b755ddefda remove all author/modified by tags.
make include guards consistent.

This was SVN commit r5040.
2007-05-07 16:33:24 +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
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
adc8c64724 # General tidying.
Encryption: Deleted, just in case anyone was ever tempted to use it.
debug_warn: Removed redundant quotes around message.
oglCheck: Added error number to displayed messages, to help when
debugging errors.
Simulation: Fixed syntax confusion.
Entity: Preserve unit ID across entity-template changes (e.g. upgrades).
Atlas: Made some floating-point code less dodgy. Support number keys to
change player while placing units.

This was SVN commit r4814.
2007-01-27 02:36:33 +00:00
0bb0df5b2c # new year's cleanup (reduce dependencies, clean up headers)
- remove headers always included from PCH
- nommgr.h is only included ifdef REDEFINED_NEW (allows leaving out the
mmgr stuff)
- in lib/*.cpp, moved the corresponding include file to right behind the
PCH (catches headers that aren't compilable by themselves)
- byte_order no longer depends on SDL
- add debug_level (another means of filtering debug output; needed for
thesis)
- split posix stuff up into subdirs (lib/posix and sysdep/win/wposix).
makes including only some of the modules (e.g. sockets, time) much
easier.

This was SVN commit r4728.
2007-01-01 21:25:47 +00:00
871cdb6ef9 # SwEng (reduce full recompiles by splitting up master error header)
- error codes now accessed as ERR::NO_MEM, INFO::OK etc.
- no more X-macros => the above are now recognized by visual assist
- error codes are defined by the module originating them (lib_errors has
some generic ones)
  => no full rebuild when adding some
- error descriptions are now in C++ files => can be changed without full
rebuild

added AT_STARTUP in lib.h.

This was SVN commit r4374.
2006-09-22 13:19:40 +00:00
3195893d1c # MacOS X compat (part 1)
- u_anim_name disambiguation
- fix implementation of finite (use our fpclassify instead of compiler's
routine)
- รค -> ae
- workaround for MAP_ANONYMOUS
- fix GLint in ogl.cpp
- add include for SIZE_MAX in string_s
- avoid PIC clobbered error and speed up rdtsc a bit
- add include for stat

This was SVN commit r4170.
2006-07-26 14:04:52 +00:00
b8c131c431 # housekeeping
* zip.h removed old test symbols
* path_util fixed bug in mixed-separating-slash handling
* renamed ERR_OK to INFO_OK; allows searching for "return ERR_" to yield
all actual errors (instead of having to filter out ERR_OK)

This was SVN commit r3945.
2006-06-04 22:27:40 +00:00
5f7855f7f0 Simplification of #Include paths: relative names are used only for included files in the same directory as the including file; everything else uses the full path relative to source/.
This was SVN commit r3930.
2006-06-02 02:10:27 +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
34637ba5dc # refactor sysdep API, split it into parts
- split up detect.cpp into snd, cpu, gfx (headers were already split)
- rename detect functions for more clarity (e.g. get_cur_vmode ->
gfx_get_video_mode)
- rename lib/res/sound/snd to snd_mgr to avoid conflict with
sysdep/snd.cpp
- waio: set errno in aio_rw (addresses bug #73)

This was SVN commit r3745.
2006-04-10 20:12:25 +00:00
5738bd4820 # overhauled error handling; made sure all low-level function failures are caught at the source.
* replace all "return ERR_*" with WARN_RETURN(ERR_*) - makes sure
function failures are noticed *at the cause*, not later
* LibError_from_* now take bool warn_if_failed param
* replace more debug_warns with dedicated error codes (allows localized
error reports and doesn't spam the EXE with strings)

This was SVN commit r3722.
2006-04-03 01:00:45 +00:00