[Scummvm-cvs-logs] CVS: scummvm/scumm/smush chunk.cpp,1.11,1.12 codec1.cpp,1.9,1.10 codec37.cpp,1.18,1.19 codec47.cpp,1.47,1.48 codec47.h,1.14,1.15 imuse_channel.cpp,1.14,1.15 saud_channel.cpp,1.11,1.12 smush_font.cpp,1.1,1.2 smush_mixer.cpp,1.2,1.3 smush_mixer.h,1.1,1.2 smush_player.cpp,1.14,1.15

Max Horn fingolfin at users.sourceforge.net
Wed Apr 30 04:27:12 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm/smush
In directory sc8-pr-cvs1:/tmp/cvs-serv31370

Modified Files:
	chunk.cpp codec1.cpp codec37.cpp codec47.cpp codec47.h 
	imuse_channel.cpp saud_channel.cpp smush_font.cpp 
	smush_mixer.cpp smush_mixer.h smush_player.cpp 
Log Message:
som changes to make Palm OS happy

Index: chunk.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/chunk.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- chunk.cpp	17 Mar 2003 12:28:49 -0000	1.11
+++ chunk.cpp	30 Apr 2003 11:26:35 -0000	1.12
@@ -19,7 +19,7 @@
  *
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include "chunk.h"
 
 #include "common/engine.h"

Index: codec1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/codec1.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- codec1.cpp	17 Mar 2003 12:28:49 -0000	1.9
+++ codec1.cpp	30 Apr 2003 11:26:35 -0000	1.10
@@ -19,7 +19,7 @@
  *
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include "common/scummsys.h"
 
 void smush_decode_codec1(byte *dst, byte *src, int height) {

Index: codec37.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/codec37.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- codec37.cpp	17 Mar 2003 12:28:49 -0000	1.18
+++ codec37.cpp	30 Apr 2003 11:26:35 -0000	1.19
@@ -19,7 +19,7 @@
  *
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include "codec37.h"
 
 #include "common/engine.h"
@@ -30,8 +30,7 @@
 	_height = height;
 	_frameSize = _width * _height;
 	_deltaSize = _frameSize * 3 + 0x13600;
-	_deltaBuf = new byte[_deltaSize];
-	memset(_deltaBuf, 0, _deltaSize);
+	_deltaBuf = (byte *)calloc(_deltaSize, sizeof(byte));
 	if(_deltaBuf == 0)
 		error("unable to allocate decoder buffer");
 	_deltaBufs[0] = _deltaBuf + 0x4D80;
@@ -64,7 +63,7 @@
 		_tableLastIndex = -1;
 	}
 	if(_deltaBuf) {
-		delete []_deltaBuf;
+		free(_deltaBuf);
 		_deltaSize = 0;
 		_deltaBuf = 0;
 		_deltaBufs[0] = 0;

Index: codec47.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/codec47.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- codec47.cpp	26 Apr 2003 11:02:49 -0000	1.47
+++ codec47.cpp	30 Apr 2003 11:26:36 -0000	1.48
@@ -19,7 +19,7 @@
  *
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include "codec47.h"
 
 #include "common/engine.h"
@@ -40,6 +40,7 @@
 		(dst)[1] = (src)[1];	\
 	} while(0)
 
+
 #else /* SCUMM_NEED_ALIGNMENT */
 
 #define COPY_4X1_LINE(dst, src)			\
@@ -64,6 +65,10 @@
 		(dst)[1] = val;	\
 	} while(0)
 
+#ifdef __PALM_OS__
+static int32 *codec37_table;
+static int16 *codec47_table;
+#else
 static int32 codec37_table[] = {
        0,       1,       2,       3,       3,       3,
        3,       2,       1,       0,       0,       0,
@@ -260,6 +265,7 @@
 	 23,  36, -19,  39,  16,  40, -13,  41,   9,  42,
 	 -6,  43,   1,  43,   0,   0,   0,   0,   0,   0
 };
+#endif
 
 void Codec47Decoder::makeTables37(int32 param) {
 	int32 variable1, variable2;
@@ -669,6 +675,10 @@
 }
 
 Codec47Decoder::Codec47Decoder() {
+#ifdef __PALM_OS__
+	_tableBig = (byte *)calloc(99328, sizeof(byte));
+	_tableSmall = (byte *)calloc(32768, sizeof(byte));
+#endif
 	_deltaBuf = 0;
 }
 
@@ -685,6 +695,10 @@
 
 Codec47Decoder::~Codec47Decoder() {
 	deinit();
+#ifdef __PALM_OS__
+	free(_tableBig);
+	free(_tableSmall);
+#endif
 }
 
 bool Codec47Decoder::decode(byte *dst, const byte *src) {
@@ -748,3 +762,15 @@
 
 	return true;
 }
+
+#ifdef __PALM_OS__
+#include "scumm_globals.h" // init globals
+void Codec47_initGlobals() {
+	GSETPTR(codec37_table,	GBVARS_CODEC37TABLE_INDEX,	int32	, GBVARS_SCUMM)
+	GSETPTR(codec47_table,	GBVARS_CODEC47TABLE_INDEX,	int16	, GBVARS_SCUMM)
+}
+void Codec47_releaseGlobals() {
+	GRELEASEPTR(GBVARS_CODEC37TABLE_INDEX		, GBVARS_SCUMM)
+	GRELEASEPTR(GBVARS_CODEC47TABLE_INDEX		, GBVARS_SCUMM)
+}
+#endif
\ No newline at end of file

Index: codec47.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/codec47.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- codec47.h	17 Mar 2003 12:28:50 -0000	1.14
+++ codec47.h	30 Apr 2003 11:26:36 -0000	1.15
@@ -36,8 +36,13 @@
 	const byte *_d_src, *_paramPtr;
 	int _d_pitch;
 	int32 _offset1, _offset2;
+#ifdef __PALM_OS__
+	byte *_tableBig;
+	byte *_tableSmall;
+#else
 	byte _tableBig[99328];
 	byte _tableSmall[32768];
+#endif
 	int16 _table[256];
 	int32 _frameSize;
 	int _width, _height;

Index: imuse_channel.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/imuse_channel.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- imuse_channel.cpp	17 Mar 2003 12:28:50 -0000	1.14
+++ imuse_channel.cpp	30 Apr 2003 11:26:36 -0000	1.15
@@ -19,7 +19,7 @@
  *
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include "channel.h"
 #include "chunk.h"
 #include "chunk_type.h"

Index: saud_channel.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/saud_channel.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- saud_channel.cpp	17 Mar 2003 12:28:50 -0000	1.11
+++ saud_channel.cpp	30 Apr 2003 11:26:36 -0000	1.12
@@ -19,7 +19,7 @@
  *
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 
 #include "channel.h"
 #include "chunk.h"

Index: smush_font.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_font.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- smush_font.cpp	17 Mar 2003 12:28:50 -0000	1.1
+++ smush_font.cpp	30 Apr 2003 11:26:36 -0000	1.2
@@ -19,7 +19,7 @@
  *
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include "common/util.h"
 #include "common/engine.h"
 #include "common/file.h"
@@ -34,6 +34,8 @@
 	_original(use_original_colors) {
 	for(int i = 0; i < 256; i++)
 		_chars[i].chr = NULL;
+
+	_dataSrc = NULL;
 }
 
 SmushFont::~SmushFont() {

Index: smush_mixer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_mixer.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- smush_mixer.cpp	17 Mar 2003 13:04:54 -0000	1.2
+++ smush_mixer.cpp	30 Apr 2003 11:26:36 -0000	1.3
@@ -19,7 +19,7 @@
  *
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include "common/util.h"
 #include "smush_mixer.h"
 #include "channel.h"

Index: smush_mixer.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_mixer.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- smush_mixer.h	17 Mar 2003 12:28:50 -0000	1.1
+++ smush_mixer.h	30 Apr 2003 11:26:36 -0000	1.2
@@ -19,7 +19,7 @@
  *
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 
 #include "sound/mixer.h"
 

Index: smush_player.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/smush/smush_player.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- smush_player.cpp	26 Apr 2003 05:29:25 -0000	1.14
+++ smush_player.cpp	30 Apr 2003 11:26:36 -0000	1.15
@@ -19,7 +19,7 @@
  *
  */
 
-#include <stdafx.h>
+#include "stdafx.h"
 #include "common/file.h"
 #include "common/util.h"
 #include "common/engine.h"
@@ -384,7 +384,7 @@
 	int flags = b.getWord();
 	int unknown = b.getShort();
 	int track_flags = b.getWord();
-	
+
 	if (flags != 46)
 		return;
 	assert(flags == 46 && unknown == 0);





More information about the Scummvm-git-logs mailing list