[Scummvm-cvs-logs] SF.net SVN: scummvm: [25881] scummvm/trunk/engines/agi/sound.h

knakos at users.sourceforge.net knakos at users.sourceforge.net
Mon Feb 26 19:34:02 CET 2007


Revision: 25881
          http://scummvm.svn.sourceforge.net/scummvm/?rev=25881&view=rev
Author:   knakos
Date:     2007-02-26 10:34:00 -0800 (Mon, 26 Feb 2007)

Log Message:
-----------
Fix alignment issues in wince port.
This patch/bug is closely related to the behavior shown in agos engine (see https://sourceforge.net/tracker/?func=detail&aid=1657436&group_id=37116&atid=418822).
Every time structs are used to extract data from a buffer, these structs have to be packed.
It is not OK to assume that the compiler does not pad the struct, or that it doesn't have alignment assumptions voodoo (see cited patch).

Modified Paths:
--------------
    scummvm/trunk/engines/agi/sound.h

Modified: scummvm/trunk/engines/agi/sound.h
===================================================================
--- scummvm/trunk/engines/agi/sound.h	2007-02-26 18:09:41 UTC (rev 25880)
+++ scummvm/trunk/engines/agi/sound.h	2007-02-26 18:34:00 UTC (rev 25881)
@@ -56,6 +56,8 @@
 	uint16 type;		/**< sound resource type */
 };
 
+#include "common/pack-start.h"
+
 /**
  * AGI sound note structure.
  */
@@ -67,6 +69,8 @@
 	uint8 vol;			/**< note volume */
 };
 
+#include "common/pack-end.h"
+
 /**
  * AGI engine sound channel structure.
  */


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list