1
0
forked from 0ad/0ad
Commit Graph

56 Commits

Author SHA1 Message Date
89107d1406 Fixes grayscale PNG handling, there is no need to convert them all to RGB and 4741e896c4 broke special font texture handling. Instead, only grayscale with alpha PNGs will be converted to RGBA (they fail to load otherwise).
Removes warning about converting grayscale textures, refs #1640.

This was SVN commit r16449.
2015-03-19 03:04:01 +00:00
4741e896c4 Improves handling of PNG textures based on GdkPixbuf's setup_png_transformations. The PNG decoder should now support grayscale, RGB or indexed color; bit depth up to 16; and interlacing. Fixes #1640, refs #2823, #3082
This was SVN commit r16439.
2015-03-16 02:28:00 +00:00
b1c4e29ac8 Fixes inconsistencies in spelling of colour/color by preferring "color" (only wxWidgets remains with some API that requires "colour"), fixes #1029.
NOTE: requires update-workspaces and may require correction of some
modded actors/scenarios

This was SVN commit r16438.
2015-03-15 23:59:48 +00:00
a5e940430f Suppresses libpng warning "iCCP: known incorrect sRGB profile" by manually handling warning messages (errors still use default handler), fixes #2184
This was SVN commit r16350.
2015-02-17 10:50:19 +00:00
4c1903500b Switch to std::shared_ptr and std::weak_ptr.
This was SVN commit r16227.
2015-01-25 03:10:58 +00:00
fb0b4572ab Fix Valgrind complaint about delete vs delete[].
This was SVN commit r15267.
2014-06-01 18:46:14 +00:00
d2ecbecf32 Fixes tex_codec typo that broke BMP writing and big screenshots, fixes #2515
This was SVN commit r15107.
2014-05-04 05:49:31 +00:00
6ab578a6eb Fix out of date comments in Tex and ITexCodec, Fixes #2458.
This was SVN commit r14838.
2014-03-13 19:00:22 +00:00
ef888367aa Cleanup tex_codec, fixes #2456, patch by IronNerd.
This was SVN commit r14836.
2014-03-13 04:16:20 +00:00
a5639631ee Texture system refactoring and cleanup, fixes #2455, patch by IronNerd.
This was SVN commit r14835.
2014-03-13 02:37:05 +00:00
8799bd98b0 Support 8bpp textures
When textures.xml specifies format="alpha", the input is expected to be
an
8-bit greyscale PNG, and the output will be an 8-bit uncompressed
alpha-only DDS.

Add format override to CTextureProperties, to select between e.g.
GL_ALPHA
and GL_LUMINANCE for 8-bit textures.

This is needed so fonts can use the new texture system.

This was SVN commit r14015.
2013-10-18 15:36:31 +00:00
9f97610cb2 refactor: remove "wrapping" and "read" functionality for DynArray (in preparation for replacing it with template policies for more flexible Pool etc.)
This was SVN commit r10024.
2011-08-17 08:38:53 +00:00
be3eb579d4 fix another cast runtime error
This was SVN commit r9861.
2011-07-17 14:48:23 +00:00
5c76bc12fa refactor status code definitions: allow modules to define an array of them (more convenient+efficient).
merge ERR::NO_SYS, NOT_IMPLEMENTED into NOT_SUPPORTED
renderer: remove unnecessary ogl_shader include

This was SVN commit r9447.
2011-05-05 13:03:34 +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
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
6c915291cc cleanup (requires update-workspaces):
major refactor of wfilesystem - remove gotos and workaround for FAT file
times
replace more round_up of constants with Align<>
remove old unused allocators (STL aligned, matrix, some shared_ptr)
move allocator utils into separate headers.
remove lockfree, wterminal
avoid testing __cplusplus

This was SVN commit r9361.
2011-04-30 12:34:28 +00:00
2374caac3e major refactor of file/io and alignment code. requires update-workspaces
. completely rewrite waio - use IOCP, add several hardcore
optimizations. now outperforms the
  AS SSD and ATTO benchmarks when writing
. refactor file interface - use LIO_READ instead of 'r', allow access to
file descriptor.
. completely rewrite the IO wrapper. now much more simple, less CPU
overhead, adds
  support for pre-issue/post-completion hooks and preallocation.
  io::Run defaults to simple synchronous IO; use io::Parameters to get
asynchronous.
. add alignment.h with constants and Align() function template (more
efficient than
  round_up for compile-time constants)
. add UniqueRange - similar to C++0x unique_ptr (emulated for C++03),
plus a
  built-in size. avoids expensive thread-safe reference counting in
shared_ptr.

cleanup:
- move fat_time functions into archive_zip
- remove no longer needed io_align and block_cache
- reduce dependencies in sysdep/compiler (move parts to
code_annotation.h)
- move IOCP into separate file (reused by waio)

This was SVN commit r9350.
2011-04-29 19:10:34 +00:00
9d5539a215 fix runtime check error - see http://www.wildfiregames.com/forum/index.php?showtopic=14656&pid=218675&st=0&#entry218675
thanks to Yves for reporting this + suggesting the fix.

This was SVN commit r9339.
2011-04-28 17:13:55 +00:00
64a02932e3 refactor headers: path_util -> path, native_path -> os_path, remove where unnecessary
This was SVN commit r9108.
2011-03-23 14:43:35 +00:00
dcd192cb60 refactor path interface:
- use wrapper class instead of std::wstring (reduces mixing of
strings/paths; allows safe+easy join via operator/ and convenient
case-insensitive comparison via operator==, avoids NativePathFromString,
similar to boost::filesystem)
- NativePath -> OsPath
- add hash and To/FromJSVal for Path
- add TS_ASSERT_PATH_EQUALS
- replace _wfopen_s with sys_OpenFile
- remove obsolete SortFiles/Directories

This was SVN commit r9107.
2011-03-23 13:36:20 +00:00
6d25329412 # towards locale-independent pathnames on Linux
c.f.
http://www.wildfiregames.com/forum/index.php?showtopic=14541&st=0&p=217250&#entry217250
and 2011-03-19 meeting

This was SVN commit r9090.
2011-03-21 17:53:13 +00:00
0378500bdc Fix #712 (remove S3TC warning).
Add timer to S3TC decoder so it's still easy to determine if it was
used.

This was SVN commit r8981.
2011-02-25 01:28:46 +00:00
52851faeb6 cleanup - remove old cpu_memcpy and cpu_i64FromDouble that are no longer needed
This was SVN commit r8517.
2010-11-01 11:09:03 +00:00
b15c5c1c45 Add anisotropic filtering support to ogl_tex.
Shrink some OglTex fields so that it fits in the size limit.
Add function to efficiently read the 1x1 mipmap level's colour.
Add RGB->RGBA and BGR->RGBA transforms.
Fix DXT1a detection logic.
Fix OglTex_validate failing when ogl_max_tex_size == -1 (e.g. before
ogl_Init is called).

This was SVN commit r8097.
2010-09-10 20:37:54 +00:00
dee3cb84b5 Fix S3TC decoder bug.
Add S3TC decoder test.
Fix texture codec test to not be a no-op, then disable it since it
fails.
Add DDS mipmap removal transform.

This was SVN commit r8094.
2010-09-10 20:25:23 +00:00
1706363bab Fix #423 (Switch from CppDoc to Doxygen), based on patch from anr.
Also delete some unused declarations, and rename is_playing to
snd_is_playing.

This was SVN commit r7813.
2010-07-29 15:55:41 +00:00
8c1deecdbe C++0x compatibility (fix narrowing conversions in initialisers; avoid ambiguity with std::next)
This was SVN commit r7739.
2010-07-11 22:40:17 +00:00
4b06ebd52d Add basic help page into the main menu.
Add buttons to open the web site and IRC.
Tentatively allow Atlas to be launched from the menu.
Add some shutdown functions to support relaunching into Atlas without
having to restart the whole process.

This was SVN commit r7714.
2010-07-07 21:47:31 +00:00
d2cf6ceb88 less global variables: make most uses of g_VFS explicit (required for another app that has two VFSes), g_yres is no longer required by cursor module
This was SVN commit r7686.
2010-07-04 10:15:53 +00:00
103b60daa9 Fix use of deprecated libpng feature.
This was SVN commit r7647.
2010-06-30 21:17:39 +00:00
c5f8ca32a2 64-bit compat in BMP code
This was SVN commit r7489.
2010-05-01 09:45:58 +00:00
5bb14c7a59 Misc. unity fixes (missing includes, undefs, and other things that could be considered generic cleanup)
This was SVN commit r7328.
2010-02-18 00:06:50 +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
43d5e122ab clean up, update to newer DDS file definitions, tolerate slightly incorrect values of linearSize that are written by Bob's MacOSX DDS converter
This was SVN commit r7271.
2010-01-11 20:53:12 +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
7a4dd7b473 Set svn:eol-style=native
This was SVN commit r6828.
2009-04-18 16:14:48 +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
0f9294ce17 Fixed some strict aliasing warnings
This was SVN commit r6252.
2008-07-19 00:36:42 +00:00
8e86d29301 dehydra fixes (mostly copy-ctor warnings)
This was SVN commit r6239.
2008-07-17 14:23:51 +00:00
67eefaf733 size_t fixes
This was SVN commit r6143.
2008-06-28 18:50:32 +00:00
504ec69508 Fixed some integer type conversion warnings.
This was SVN commit r6130.
2008-06-28 01:09:45 +00:00
e943dbf44b fixes
wsdl: check handles before using, prevent bogus error message due to
stupid MapWindowPoints return value
cursor: robustify, add CppDoc

This was SVN commit r6096.
2008-06-22 11:11:59 +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
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
f4da60b0d9 timer: display clocks instead of seconds if using rdtsc (avoids needing cpu_ClockFrequency on linux, which isn't currently implemented; also avoids differing results due to CPU freq throttling)
tex: minor formatting

This was SVN commit r5547.
2008-01-13 11:25:19 +00:00