[Scummvm-cvs-logs] SF.net SVN: scummvm: [28053] scummex/branches/gsoc2007-gameresbrowser/src

zbychs at users.sourceforge.net zbychs at users.sourceforge.net
Fri Jul 13 08:07:28 CEST 2007


Revision: 28053
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28053&view=rev
Author:   zbychs
Date:     2007-07-12 23:07:28 -0700 (Thu, 12 Jul 2007)

Log Message:
-----------
Bug fix in ScummmTag.

Modified Paths:
--------------
    scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainFormCommands.cpp
    scummex/branches/gsoc2007-gameresbrowser/src/browserapp/Test2.cpp
    scummex/branches/gsoc2007-gameresbrowser/src/core/debugmem.h
    scummex/branches/gsoc2007-gameresbrowser/src/plugins/scumm/ScummTag.h
    scummex/branches/gsoc2007-gameresbrowser/src/plugins/scumm/codec47.cpp
    scummex/branches/gsoc2007-gameresbrowser/src/plugins/scumm/descumm.cpp

Modified: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainFormCommands.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainFormCommands.cpp	2007-07-13 04:50:11 UTC (rev 28052)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainFormCommands.cpp	2007-07-13 06:07:28 UTC (rev 28053)
@@ -44,6 +44,8 @@
 	PluginUtil::setMainForm(this);
 	ExplorationTree::initialize(browserTree, browserNotebook);
 	FileTypeRegistry::get()->registerPlugins();
+
+	OnTest2(wxCommandEvent());
 }
 
 void MainForm::CleanupObjects() {
@@ -251,7 +253,7 @@
 void MainForm::OnTimer(wxTimerEvent& event)
 {
 	//::wxWakeUpIdle();
-	ExplorationTree::canGet() && ExplorationTree::get()->onIdle();
+	//ExplorationTree::canGet() && ExplorationTree::get()->onIdle();
 }
 
 /////////////////////////////////////////////////////////////////////////////

Modified: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/Test2.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/browserapp/Test2.cpp	2007-07-13 04:50:11 UTC (rev 28052)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/Test2.cpp	2007-07-13 06:07:28 UTC (rev 28053)
@@ -134,6 +134,7 @@
 
 	if (dataFN.IsOk() && dataFN.DirExists() && dataFN.IsDirReadable())
 		rootDir->addSubDir(wxT("data"), dataDir);
+	//rootDir->addFile(wxT("Sam&Max"), wxT("C:\\Zbys\\gsoc\\Browser\\vc8\\data\\SAMNMAX.SM1"));
 }
 
 /////////////////////////////////////////////////////////////////////////////

Modified: scummex/branches/gsoc2007-gameresbrowser/src/core/debugmem.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/core/debugmem.h	2007-07-13 04:50:11 UTC (rev 28052)
+++ scummex/branches/gsoc2007-gameresbrowser/src/core/debugmem.h	2007-07-13 06:07:28 UTC (rev 28053)
@@ -20,6 +20,10 @@
 
 #define _CRTDBG_MAP_ALLOC
 #include <crtdbg.h>
+#define   malloc(s)             _malloc_dbg(s, _NORMAL_BLOCK, __FILE__, __LINE__)
+#define   calloc(c, s)          _calloc_dbg(c, s, _NORMAL_BLOCK, __FILE__, __LINE__)
+#define   realloc(p, s)         _realloc_dbg(p, s, _NORMAL_BLOCK, __FILE__, __LINE__)
+#define   free(p)               _free_dbg(p, _NORMAL_BLOCK)
 
 #define DEBUG_NEW         new( _CLIENT_BLOCK, __FILE__, __LINE__)
 

Modified: scummex/branches/gsoc2007-gameresbrowser/src/plugins/scumm/ScummTag.h
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/plugins/scumm/ScummTag.h	2007-07-13 04:50:11 UTC (rev 28052)
+++ scummex/branches/gsoc2007-gameresbrowser/src/plugins/scumm/ScummTag.h	2007-07-13 06:07:28 UTC (rev 28053)
@@ -19,6 +19,7 @@
 // (for old scumm file type), and FourTag (for new scumm file type).
 
 struct ScummTag {
+	virtual ~ScummTag() {}
 	virtual bool isNewTag() const = 0;
 	virtual bool read(Common::ReadStream* stream) = 0;
 	virtual bool equals(const ScummTag& other) const = 0;

Modified: scummex/branches/gsoc2007-gameresbrowser/src/plugins/scumm/codec47.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/plugins/scumm/codec47.cpp	2007-07-13 04:50:11 UTC (rev 28052)
+++ scummex/branches/gsoc2007-gameresbrowser/src/plugins/scumm/codec47.cpp	2007-07-13 06:07:28 UTC (rev 28053)
@@ -544,11 +544,11 @@
 		_deltaBufs[0] = 0;
 		_deltaBufs[1] = 0;
 	}
-	if (_tableBig == NULL) {
+	if (_tableBig != NULL) {
 		free(_tableBig);
 		_tableBig = NULL;
 	}
-	if (_tableSmall == NULL) {
+	if (_tableSmall != NULL) {
 		free(_tableSmall);
 		_tableSmall = NULL;
 	}

Modified: scummex/branches/gsoc2007-gameresbrowser/src/plugins/scumm/descumm.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/plugins/scumm/descumm.cpp	2007-07-13 04:50:11 UTC (rev 28052)
+++ scummex/branches/gsoc2007-gameresbrowser/src/plugins/scumm/descumm.cpp	2007-07-13 06:07:28 UTC (rev 28053)
@@ -2902,7 +2902,7 @@
 {
 	byte *mem, *memorg;
 	int len;
-	char *buf;
+	char *buf, *freeBuf;
 
 	scriptVersion = scummVersion;
 	switch (scriptVersion) {
@@ -2934,6 +2934,7 @@
 	size_of_code = size;
 
 	output = buf = (char *)malloc(8192);
+	freeBuf = output;
 
 	offs_of_line = 0;
 
@@ -3044,7 +3045,7 @@
 	}
 
 	free(memorg);
-
+	free(freeBuf);
 }
 
 ///////////////////////////////////////////////////////////////////////////


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