[Scummvm-cvs-logs] SF.net SVN: scummvm:[40470] scummvm/trunk/common
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Tue May 12 09:07:17 CEST 2009
Revision: 40470
http://scummvm.svn.sourceforge.net/scummvm/?rev=40470&view=rev
Author: thebluegr
Date: 2009-05-12 07:07:17 +0000 (Tue, 12 May 2009)
Log Message:
-----------
Added a startOffset parameter to hexdump() (used by SCI's own hexdump method)
Modified Paths:
--------------
scummvm/trunk/common/util.cpp
scummvm/trunk/common/util.h
Modified: scummvm/trunk/common/util.cpp
===================================================================
--- scummvm/trunk/common/util.cpp 2009-05-11 21:05:48 UTC (rev 40469)
+++ scummvm/trunk/common/util.cpp 2009-05-12 07:07:17 UTC (rev 40470)
@@ -91,11 +91,11 @@
//
// Print hexdump of the data passed in
//
-void hexdump(const byte * data, int len, int bytesPerLine) {
+void hexdump(const byte * data, int len, int bytesPerLine, int startOffset) {
assert(1 <= bytesPerLine && bytesPerLine <= 32);
int i;
byte c;
- int offset = 0;
+ int offset = startOffset;
while (len >= bytesPerLine) {
printf("%06x: ", offset);
for (i = 0; i < bytesPerLine; i++) {
Modified: scummvm/trunk/common/util.h
===================================================================
--- scummvm/trunk/common/util.h 2009-05-11 21:05:48 UTC (rev 40469)
+++ scummvm/trunk/common/util.h 2009-05-12 07:07:17 UTC (rev 40470)
@@ -96,8 +96,9 @@
* @param data the data to be dumped
* @param len the lenght of that data
* @param bytesPerLine number of bytes to print per line (default: 16)
+ * @param startOffset shift the shown offsets by the starting offset (default: 0)
*/
-extern void hexdump(const byte * data, int len, int bytesPerLine = 16);
+extern void hexdump(const byte * data, int len, int bytesPerLine = 16, int startOffset = 0);
/**
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