aboutsummaryrefslogtreecommitdiff
path: root/common/endian.h
AgeCommit message (Collapse)Author
2017-07-30COMMON: Migrate Various Endian Functions to Common from Engine Code.D G Turner
Thanks to N.E.C <beholdnec@gmail.com> for this.
2015-01-18COMMON: Fix strict-alignment READ_BE_UINT64 on LE and READ_LE_UINT64 on BEclone2727
2015-01-14COMMON: Fix strict-alignment READ_UINT64Willem Jan Palenstijn
2015-01-04COMMON: Implement MIPS SWAP_BYTES_64 in terms of SWAP_BYTES_32Willem Jan Palenstijn
2015-01-04COMMON: Swap order of functions to 16, 32, 64Willem Jan Palenstijn
2015-01-04COMMON: Fix return type of one READ_BE_UINT64 implementation.Johannes Schickel
This makes all unit tests pass for my on amd64 again. Thanks clone2727.
2015-01-04COMMON: Fix some syntax issues.Johannes Schickel
Not compile tested. Then again it didn't look test before either. So, yay!
2015-01-04COMMON: Put all 64-bit code under new HAVE_INT64 constantEugene Sandulenko
I regrouped all functions in order to make the code less noisy with #ifdefs
2014-09-16COMMON: Add support for endian-safe reading/writing of int64Adrian Astley
2014-06-21ALL: Remove support for MSVC8 and olderJoel Teichroeb
MSVC8 gives various compile error relating to templates that were changed back in 2008, leading me to belive that no one is using it, and that there is not point adding work arounds for a 9 year old compiler no one uses.
2014-02-18COMMON: Make GPL headers consistent in themselves.Johannes Schickel
2012-08-26COMMON: Add MKTAG16 for 16-bit multi-character constantsMatthew Hoops
2012-03-20COMMON: Add a READ_UINT24 macroMatthew Hoops
Complements READ_UINT16 and READ_UINT32
2012-03-17ALL: Use GCC_ATLEAST().Christoph Mallon
2011-05-12GIT: Clean up: Suppress SVN tags, now uselessstrangerke
2011-05-10COMMON: Always prefer GCC 4.x versions of READ_UINT*/WRITE_UINT*Max Horn
In addition, we use them if in GCC >= 3.3 if unaligned access is possible. The GCC variants of these macros also contain protection against overzealous compilers' static aliasing optimizations.
2011-05-09COMMON: Tweak some commentsMax Horn
2011-04-12COMMON: Let MKTAG always return an uint32Max Horn
2011-04-12COMMON: Use correct MKTAG definition, stupidMax Horn
2011-04-12COMMON: Replace MKID_BE by MKTAGMax Horn
MKID_BE relied on unspecified behavior of the C++ compiler, and as such was always a bit unsafe. The new MKTAG macro is slightly less elegant, but does no longer depend on the behavior of the compiler. Inspired by FFmpeg, which has an almost identical macro.
2010-09-01COMMON: changed read/write endian function to use __may_alias__ attributeYotam Barnoy
This is a better solution for the gcc aliasing problem that happens when aliasing a struct onto something else. What happens is that the compiler assumes no aliasing can happen when -O2 and -O3 are activated, and a call to READ_UINT32() followed by WRITE_UINT32() and another READ_UINT32() will be optimized to return the original read value instead of re-reading. svn-id: r52480
2010-01-25Strip trailing spaces/tabs.Johannes Schickel
svn-id: r47541
2009-09-11Slightly modified version of Patch #2838562: Improve endian.h and stream.hMax Horn
svn-id: r44027
2009-08-24reverting changes from patch 43696 that shouldnt have been committedNorbert Lange
svn-id: r43697
2009-08-24Enable alternative palettse for Amiga Monkey Island - Patch ID: 2819787Norbert Lange
use tables for palette colors instead of code with constants svn-id: r43696
2008-01-27Removed trailing spaces.Jordi Vilalta Prat
svn-id: r30664
2007-05-30Updated legal headers in source files, based on what Pidgin (the IM client ↵Max Horn
formerly knowns as Gaim) does; added new (incomplete) COPYRIGHT file; updated copyright dates in a few spots svn-id: r27024
2007-04-28Double-invert the logic on some big/little endian checks (the idea is that ↵Max Horn
we want to fallback to safe code unless we definitely know no endian/alignment issues are in the way; this way it will work even if the endianess is unknown) svn-id: r26649
2006-11-12Slighty modified Patch #1571787: "Support for Mac Broken Sword 1". sword1macdemoEugene Sandulenko
target was commented out until existence of the demo is confirmed. svn-id: r24697
2006-04-15cleanupMax Horn
svn-id: r21919
2006-02-25Removed the obsolete MKID macro; added some doxygen comments, in particular ↵Max Horn
for MKID_BE svn-id: r20873
2006-02-25Removed the (useless and confusing) PROTO_MKID_BE macroMax Horn
svn-id: r20860
2006-02-11Change CVS keywords to SVN keywordsMax Horn
svn-id: r20510
2006-01-18Update copyright noticeEugene Sandulenko
svn-id: r20088
2005-10-18Update FSF address. Eek. Actually that took place on May 1, 2005Eugene Sandulenko
svn-id: r19142
2005-10-11Added WRITE_UINT16() and WRITE_UINT32() as well.Torbjörn Andersson
svn-id: r19019
2005-10-11Added READ_UINT16(). It looks like SAGA will need it.Torbjörn Andersson
svn-id: r19018
2005-07-30Remove trailing whitespaces.Eugene Sandulenko
svn-id: r18604
2005-06-23Moved endian macros to a separate header fileMax Horn
svn-id: r18441