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

zbychs at users.sourceforge.net zbychs at users.sourceforge.net
Sat Jul 21 18:54:49 CEST 2007


Revision: 28157
          http://scummvm.svn.sourceforge.net/scummvm/?rev=28157&view=rev
Author:   zbychs
Date:     2007-07-21 09:54:49 -0700 (Sat, 21 Jul 2007)

Log Message:
-----------
Hex View now displays floats. Also fixed a resize bug.

Modified Paths:
--------------
    scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainForm.cpp
    scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/BinaryPresenter.cpp
    scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/CHexEditCtrl.cpp

Modified: scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainForm.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainForm.cpp	2007-07-21 16:28:32 UTC (rev 28156)
+++ scummex/branches/gsoc2007-gameresbrowser/src/browserapp/MainForm.cpp	2007-07-21 16:54:49 UTC (rev 28157)
@@ -61,9 +61,9 @@
 MainForm::MainForm(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
 : wxFrame(parent, id, title, position, size, style) {
 	CreateGUIControls();
-	WxSplitterWindow1->SetSashGravity(0.3);
 	WxSplitterWindow1->SetMinimumPaneSize(0);
 	WxSplitterWindow1->SetSashPosition(300);
+	WxSplitterWindow1->SetSashGravity(0.2);
 
 	InitializeObjects();
 

Modified: scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/BinaryPresenter.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/BinaryPresenter.cpp	2007-07-21 16:28:32 UTC (rev 28156)
+++ scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/BinaryPresenter.cpp	2007-07-21 16:54:49 UTC (rev 28157)
@@ -113,6 +113,7 @@
 	panel->Layout();
 
 	splitterWindow->SetSashPosition(-150);
+	splitterWindow->SetSashGravity(0.8);
 
 	_hexCtrl->Connect(_hexCtrl->GetId(), wxEVT_HEXEDIT_CHANGED,
 		wxCommandEventHandler(DumpBinaryEvtHandler::hexeditChanged), NULL, &_evtHelper);
@@ -173,20 +174,22 @@
 
 	item.SetBackgroundColour(false ? *wxWHITE : wxColour(237, 243, 254));
 	item.m_col = 0;
-	item.m_text = wxT("offset");
+	item.m_text = wxT("float32 LE");
 	idx = list->InsertItem(item);
 	item.m_itemId = idx;
 	item.m_col = 1;
-	item.m_text = strOffs;
+	item.m_text = wxT("");
+	item.m_text << *(float*)&ui32le;
 	list->SetItem(item);
 
 	item.SetBackgroundColour(true ? *wxWHITE : wxColour(237, 243, 254));
 	item.m_col = 0;
-	item.m_text = wxT("string");
+	item.m_text = wxT("float32 BE");
 	idx = list->InsertItem(item);
 	item.m_itemId = idx;
 	item.m_col = 1;
-	item.m_text = toString((const char*)&strbuf[0]);
+	item.m_text = wxT("");
+	item.m_text << *(float*)&ui32be;
 	list->SetItem(item);
 
 	item.SetBackgroundColour(false ? *wxWHITE : wxColour(237, 243, 254));
@@ -248,6 +251,24 @@
 	item.m_text << wxT("  ") << ui8;
 	item.m_text << wxT("  ") << (int8)ui8;
 	list->SetItem(item);
+
+	item.SetBackgroundColour(true ? *wxWHITE : wxColour(237, 243, 254));
+	item.m_col = 0;
+	item.m_text = wxT("string");
+	idx = list->InsertItem(item);
+	item.m_itemId = idx;
+	item.m_col = 1;
+	item.m_text = toString((const char*)&strbuf[0]);
+	list->SetItem(item);
+
+	item.SetBackgroundColour(false ? *wxWHITE : wxColour(237, 243, 254));
+	item.m_col = 0;
+	item.m_text = wxT("offset");
+	idx = list->InsertItem(item);
+	item.m_itemId = idx;
+	item.m_col = 1;
+	item.m_text = strOffs;
+	list->SetItem(item);
 }
 
 void DumpBinaryEvtHandler::absoluteCheckBoxClick(wxCommandEvent& event) {

Modified: scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/CHexEditCtrl.cpp
===================================================================
--- scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/CHexEditCtrl.cpp	2007-07-21 16:28:32 UTC (rev 28156)
+++ scummex/branches/gsoc2007-gameresbrowser/src/plugins/basic/CHexEditCtrl.cpp	2007-07-21 16:54:49 UTC (rev 28157)
@@ -1897,6 +1897,8 @@
 
 	if ( (newMax > newPage) && (newPos + newPage > newMax) )
 		newPos = m_nHorzScroll = newMax - newPage;
+	if (newMax <= newPage)
+		newPos = m_nHorzScroll = 0;
 	if (newPos != oldPos || newMax != oldMax || newPage != oldPage)
 		bRepaint = true;
 


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