[Scummvm-cvs-logs] SF.net SVN: scummvm:[44621] scummvm/trunk/engines/sci/gui

m_kiewitz at users.sourceforge.net m_kiewitz at users.sourceforge.net
Sun Oct 4 18:42:08 CEST 2009


Revision: 44621
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44621&view=rev
Author:   m_kiewitz
Date:     2009-10-04 16:41:53 +0000 (Sun, 04 Oct 2009)

Log Message:
-----------
SCI/gui: final rename commit

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gui/gui_picture.cpp
    scummvm/trunk/engines/sci/gui/gui_picture.h
    scummvm/trunk/engines/sci/gui/gui_screen.h
    scummvm/trunk/engines/sci/gui/gui_view.cpp
    scummvm/trunk/engines/sci/gui/gui_view.h
    scummvm/trunk/engines/sci/gui/gui_windowmgr.cpp
    scummvm/trunk/engines/sci/gui/gui_windowmgr.h

Modified: scummvm/trunk/engines/sci/gui/gui_picture.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_picture.cpp	2009-10-04 16:39:46 UTC (rev 44620)
+++ scummvm/trunk/engines/sci/gui/gui_picture.cpp	2009-10-04 16:41:53 UTC (rev 44621)
@@ -32,7 +32,7 @@
 
 namespace Sci {
 
-SciGUIpicture::SciGUIpicture(EngineState *state, SciGUIgfx *gfx, SciGUIscreen *screen, sciResourceId resourceId)
+SciGUIpicture::SciGUIpicture(EngineState *state, SciGUIgfx *gfx, SciGUIscreen *screen, GUIResourceId resourceId)
 	: _s(state), _gfx(gfx), _screen(screen), _resourceId(resourceId) {
 	assert(resourceId != -1);
 	initData(resourceId);
@@ -41,14 +41,14 @@
 SciGUIpicture::~SciGUIpicture() {
 }
 
-void SciGUIpicture::initData(sciResourceId resourceId) {
+void SciGUIpicture::initData(GUIResourceId resourceId) {
 	_resource = _s->resMan->findResource(ResourceId(kResourceTypePic, resourceId), false);
 	if (!_resource) {
 		error("picture resource %d not found", resourceId);
 	}
 }
 
-sciResourceId SciGUIpicture::getResourceId() {
+GUIResourceId SciGUIpicture::getResourceId() {
 	return _resourceId;
 }
 
@@ -94,7 +94,7 @@
 	int view_rle_ptr = READ_LE_UINT16(inbuffer + view_data_ptr + 24);
 	int view_pixel_ptr = READ_LE_UINT16(inbuffer + view_data_ptr + 28);
 	byte *view = NULL;
-	sciPalette palette;
+	GUIPalette palette;
 
 	// Create palette and set it
 	_gfx->CreatePaletteFromData(inbuffer + palette_data_ptr, &palette);
@@ -302,7 +302,7 @@
 	uint16 size;
 	byte byte;
 	int i;
-	sciPalette palette;
+	GUIPalette palette;
 	int16 pattern_Code = 0, pattern_Texture = 0;
 	bool sci1 = false;
 

Modified: scummvm/trunk/engines/sci/gui/gui_picture.h
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_picture.h	2009-10-04 16:39:46 UTC (rev 44620)
+++ scummvm/trunk/engines/sci/gui/gui_picture.h	2009-10-04 16:41:53 UTC (rev 44621)
@@ -32,14 +32,14 @@
 
 class SciGUIpicture {
 public:
-	SciGUIpicture(EngineState *state, SciGUIgfx *gfx, SciGUIscreen *screen, sciResourceId resourceId);
+	SciGUIpicture(EngineState *state, SciGUIgfx *gfx, SciGUIscreen *screen, GUIResourceId resourceId);
 	~SciGUIpicture();
 
-	sciResourceId getResourceId();
+	GUIResourceId getResourceId();
 	void draw(uint16 style, bool addToFlag, int16 EGApaletteNo);
 
 private:
-	void initData(sciResourceId resourceId);
+	void initData(GUIResourceId resourceId);
 	void reset();
 	void draw11();
 	void decodeRLE(byte *rledata, byte *pixeldata, byte *outbuffer, int size);
@@ -59,7 +59,7 @@
 	int16 _resourceId;
 	Resource *_resource;
 
-	sciPort *_curPort;
+	GUIPort *_curPort;
 	uint16 _style;
 	bool _addToFlag;
 	int16 _EGApaletteNo;

Modified: scummvm/trunk/engines/sci/gui/gui_screen.h
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_screen.h	2009-10-04 16:39:46 UTC (rev 44620)
+++ scummvm/trunk/engines/sci/gui/gui_screen.h	2009-10-04 16:41:53 UTC (rev 44621)
@@ -54,7 +54,7 @@
 	void BitsSave(Common::Rect rect, byte mask, byte *memoryPtr);
 	void BitsRestore(byte *memoryPtr);
 
-	sciPalette _sysPalette;
+	GUIPalette _sysPalette;
 
 	uint16 _width;
 	uint16 _height;

Modified: scummvm/trunk/engines/sci/gui/gui_view.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_view.cpp	2009-10-04 16:39:46 UTC (rev 44620)
+++ scummvm/trunk/engines/sci/gui/gui_view.cpp	2009-10-04 16:41:53 UTC (rev 44621)
@@ -32,7 +32,7 @@
 
 namespace Sci {
 
-SciGUIview::SciGUIview(OSystem *system, EngineState *state, SciGUIgfx *gfx, SciGUIscreen *screen, sciResourceId resourceId)
+SciGUIview::SciGUIview(OSystem *system, EngineState *state, SciGUIgfx *gfx, SciGUIscreen *screen, GUIResourceId resourceId)
 	: _system(system), _s(state), _gfx(gfx), _screen(screen), _resourceId(resourceId) {
 	assert(resourceId != -1);
 	initData(resourceId);
@@ -41,7 +41,7 @@
 SciGUIview::~SciGUIview() {
 }
 
-void SciGUIview::initData(sciResourceId resourceId) {
+void SciGUIview::initData(GUIResourceId resourceId) {
 	Resource *viewResource = _s->resMan->findResource(ResourceId(kResourceTypeView, resourceId), false);
 	if (!viewResource) {
 		error("view resource %d not found", resourceId);
@@ -162,37 +162,37 @@
 	}
 }
 
-sciResourceId SciGUIview::getResourceId() {
+GUIResourceId SciGUIview::getResourceId() {
 	return _resourceId;
 }
 
-int16 SciGUIview::getWidth(uint16 loopNo, uint16 cellNo) {
+int16 SciGUIview::getWidth(GUIViewLoopNo loopNo, GUIViewCellNo cellNo) {
 	loopNo = CLIP<int16>(loopNo, 0, _loopCount -1);
 	if (cellNo >= _loop[loopNo].cellCount)
 		cellNo = 0;
 	return _loopCount ? _loop[loopNo].cell[cellNo].width : 0;
 }
 
-int16 SciGUIview::getHeight(uint16 loopNo, uint16 cellNo) {
+int16 SciGUIview::getHeight(GUIViewLoopNo loopNo, GUIViewCellNo cellNo) {
 	loopNo = CLIP<int16>(loopNo, 0, _loopCount -1);
 	if (cellNo >= _loop[loopNo].cellCount)
 		cellNo = 0;
 	return _loopCount ? _loop[loopNo].cell[cellNo].height : 0;
 }
 
-sciViewCellInfo *SciGUIview::getCellInfo(uint16 loopNo, uint16 cellNo) {
+sciViewCellInfo *SciGUIview::getCellInfo(GUIViewLoopNo loopNo, GUIViewCellNo cellNo) {
 	loopNo = CLIP<int16>(loopNo, 0, _loopCount - 1);
 	if (cellNo >= _loop[loopNo].cellCount)
 		cellNo = 0;
 	return _loopCount ? &_loop[loopNo].cell[cellNo] : NULL;
 }
 
-sciViewLoopInfo *SciGUIview::getLoopInfo(uint16 loopNo) {
+sciViewLoopInfo *SciGUIview::getLoopInfo(GUIViewLoopNo loopNo) {
 	loopNo = CLIP<int16>(loopNo, 0, _loopCount - 1);
 	return _loopCount ? &_loop[loopNo] : NULL;
 }
 
-void SciGUIview::getCellRect(uint16 loopNo, uint16 cellNo, int16 x, int16 y, int16 z, Common::Rect *outRect) {
+void SciGUIview::getCellRect(GUIViewLoopNo loopNo, GUIViewCellNo cellNo, int16 x, int16 y, int16 z, Common::Rect *outRect) {
 	sciViewCellInfo *cellInfo = getCellInfo(loopNo, cellNo);
 	if (cellInfo) {
 		outRect->left = x + cellInfo->displaceX - (cellInfo->width >> 1);
@@ -202,7 +202,7 @@
 	}
 }
 
-void SciGUIview::unpackView(uint16 loopNo, uint16 cellNo, byte *outPtr, uint16 pixelCount) {
+void SciGUIview::unpackView(GUIViewLoopNo loopNo, GUIViewCellNo cellNo, byte *outPtr, uint16 pixelCount) {
 	byte *rlePtr = _resourceData + _loop[loopNo].cell[cellNo].offsetRLE;
 	byte *literalPtr = _resourceData + _loop[loopNo].cell[cellNo].offsetLiteral;
 	uint16 pixelNo = 0, brun;
@@ -247,7 +247,7 @@
 	}
 }
 
-byte *SciGUIview::getBitmap(uint16 loopNo, uint16 cellNo) {
+byte *SciGUIview::getBitmap(GUIViewLoopNo loopNo, GUIViewCellNo cellNo) {
 	loopNo = CLIP<int16>(loopNo, 0, _loopCount -1);
 	if (cellNo >= _loop[loopNo].cellCount)
 		cellNo = 0;
@@ -277,8 +277,8 @@
 	return _loop[loopNo].cell[cellNo].rawBitmap;
 }
 
-void SciGUIview::draw(Common::Rect rect, Common::Rect clipRect, uint16 loopNo, uint16 cellNo, byte priority, uint16 paletteNo) {
-	sciPalette *palette = _embeddedPal ? &_palette : &_gfx->_sysPalette;
+void SciGUIview::draw(Common::Rect rect, Common::Rect clipRect, GUIViewLoopNo loopNo, GUIViewCellNo cellNo, byte priority, uint16 paletteNo) {
+	GUIPalette *palette = _embeddedPal ? &_palette : &_gfx->_sysPalette;
 	sciViewCellInfo *cellInfo = getCellInfo(loopNo, cellNo);
 	byte *bitmap = getBitmap(loopNo, cellNo);
 	int16 cellHeight = cellInfo->height, cellWidth = cellInfo->width;

Modified: scummvm/trunk/engines/sci/gui/gui_view.h
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_view.h	2009-10-04 16:39:46 UTC (rev 44620)
+++ scummvm/trunk/engines/sci/gui/gui_view.h	2009-10-04 16:41:53 UTC (rev 44621)
@@ -43,36 +43,36 @@
 
 class SciGUIview {
 public:
-	SciGUIview(OSystem *system, EngineState *state, SciGUIgfx *gfx, SciGUIscreen *screen, sciResourceId resourceId);
+	SciGUIview(OSystem *system, EngineState *state, SciGUIgfx *gfx, SciGUIscreen *screen, GUIResourceId resourceId);
 	~SciGUIview();
 
 	// TODO: Remove gfx reference after putting palette things into SciGUIscreen
 
-	sciResourceId getResourceId();
-	int16 getWidth(uint16 loopNo, uint16 cellNo);
-	int16 getHeight(uint16 loopNo, uint16 cellNo);
-	sciViewCellInfo *getCellInfo(uint16 loopNo, uint16 cellNo);
-	sciViewLoopInfo *getLoopInfo(uint16 loopNo);
-	void getCellRect(uint16 loopNo, uint16 cellNo, int16 x, int16 y, int16 z, Common::Rect *outRect);
-	byte *getBitmap(uint16 loopNo, uint16 cellNo);
-	void draw(Common::Rect rect, Common::Rect clipRect, uint16 loopNo, uint16 cellNo, byte priority, uint16 paletteNo);
+	GUIResourceId getResourceId();
+	int16 getWidth(GUIViewLoopNo loopNo, GUIViewCellNo cellNo);
+	int16 getHeight(GUIViewLoopNo loopNo, GUIViewCellNo cellNo);
+	sciViewCellInfo *getCellInfo(GUIViewLoopNo loopNo, GUIViewCellNo cellNo);
+	sciViewLoopInfo *getLoopInfo(GUIViewLoopNo loopNo);
+	void getCellRect(GUIViewLoopNo loopNo, GUIViewCellNo cellNo, int16 x, int16 y, int16 z, Common::Rect *outRect);
+	byte *getBitmap(GUIViewLoopNo loopNo, GUIViewCellNo cellNo);
+	void draw(Common::Rect rect, Common::Rect clipRect, GUIViewLoopNo loopNo, GUIViewCellNo cellNo, byte priority, uint16 paletteNo);
 
 private:
-	void initData(sciResourceId resourceId);
-	void unpackView(uint16 loopNo, uint16 cellNo, byte *outPtr, uint16 pixelCount);
+	void initData(GUIResourceId resourceId);
+	void unpackView(GUIViewLoopNo loopNo, GUIViewCellNo cellNo, byte *outPtr, uint16 pixelCount);
 
 	OSystem *_system;
 	EngineState *_s;
 	SciGUIgfx *_gfx;
 	SciGUIscreen *_screen;
 
-	sciResourceId _resourceId;
+	GUIResourceId _resourceId;
 	byte *_resourceData;
 
 	uint16 _loopCount;
 	sciViewLoopInfo *_loop;
 	bool _embeddedPal;
-	sciPalette _palette;
+	GUIPalette _palette;
 };
 
 } // end of namespace Sci

Modified: scummvm/trunk/engines/sci/gui/gui_windowmgr.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_windowmgr.cpp	2009-10-04 16:39:46 UTC (rev 44620)
+++ scummvm/trunk/engines/sci/gui/gui_windowmgr.cpp	2009-10-04 16:41:53 UTC (rev 44621)
@@ -53,9 +53,9 @@
 	// FIXME: remove memmgr
 	InitMem(0x320);
 
-	HEAPHANDLE wmgrPortH = heapNewPtr(sizeof(sciPort), kDataPort, "wmgrPort");
+	HEAPHANDLE wmgrPortH = heapNewPtr(sizeof(GUIPort), kDataPort, "wmgrPort");
 	heapClearPtr(wmgrPortH);
-	_wmgrPort = (sciPort *)heap2Ptr(wmgrPortH);
+	_wmgrPort = (GUIPort *)heap2Ptr(wmgrPortH);
 
 	int16 offTop = 20;
 
@@ -76,17 +76,17 @@
 SciGUIwindowMgr::~SciGUIwindowMgr() {
 }
 
-int16 SciGUIwindowMgr::isFrontWindow(sciWnd *pWnd) {
+int16 SciGUIwindowMgr::isFrontWindow(GUIWindow *pWnd) {
 	if (heap2Ptr(windowList.getLast()) == (byte *)pWnd)
 		return 1;
 	return 0;
 }
 
 void SciGUIwindowMgr::SelectWindow(HEAPHANDLE hh) {
-	sciPort *port = (sciPort *)heap2Ptr(hh);
+	GUIPort *port = (GUIPort *)heap2Ptr(hh);
 	_gfx->SetPort(port);
 	if (hh != windowList.getLast()) { // selecting not topmost window
-		sciWnd *prevwnd = (sciWnd *)heap2Ptr(port->node.prev);
+		GUIWindow *prevwnd = (GUIWindow *)heap2Ptr(port->node.prev);
 		BeginUpdate(prevwnd);
 		windowList.MoveToEnd(hh);
 		EndUpdate(prevwnd);
@@ -94,28 +94,28 @@
 	_gfx->SetPort(port);
 }
 
-void SciGUIwindowMgr::BeginUpdate(sciWnd *wnd) {
-	sciPort *oldPort = _gfx->SetPort(_wmgrPort);
-	sciWnd *node = (sciWnd *)heap2Ptr(windowList.getLast());
+void SciGUIwindowMgr::BeginUpdate(GUIWindow *wnd) {
+	GUIPort *oldPort = _gfx->SetPort(_wmgrPort);
+	GUIWindow *node = (GUIWindow *)heap2Ptr(windowList.getLast());
 	while (node != wnd) {
 		UpdateWindow(node);
-		node = (sciWnd *)heap2Ptr(node->node.prev);
+		node = (GUIWindow *)heap2Ptr(node->node.prev);
 	}
 	_gfx->SetPort(oldPort);
 }
 
-void SciGUIwindowMgr::EndUpdate(sciWnd *wnd) {
-	sciPort *oldPort = _gfx->SetPort(_wmgrPort);
-	sciWnd *last = (sciWnd *)heap2Ptr(windowList.getLast());
+void SciGUIwindowMgr::EndUpdate(GUIWindow *wnd) {
+	GUIPort *oldPort = _gfx->SetPort(_wmgrPort);
+	GUIWindow *last = (GUIWindow *)heap2Ptr(windowList.getLast());
 	while (wnd != last) {
-		wnd = (sciWnd *)heap2Ptr(wnd->node.next);
+		wnd = (GUIWindow *)heap2Ptr(wnd->node.next);
 		UpdateWindow(wnd);
 	}
 	_gfx->SetPort(oldPort);
 }
 
-sciWnd *SciGUIwindowMgr::NewWindow(const Common::Rect &dims, const Common::Rect *restoreRect, const char *title, uint16 style, uint16 arg8, uint16 argA) {
-	HEAPHANDLE hWnd = heapNewPtr(sizeof(sciWnd), kDataWindow, title);
+GUIWindow *SciGUIwindowMgr::NewWindow(const Common::Rect &dims, const Common::Rect *restoreRect, const char *title, uint16 style, uint16 arg8, uint16 argA) {
+	HEAPHANDLE hWnd = heapNewPtr(sizeof(GUIWindow), kDataWindow, title);
 	Common::Rect r;
 
 	if (!hWnd) {
@@ -127,8 +127,8 @@
 		windowList.AddToFront(hWnd);
 	else
 		windowList.AddToEnd(hWnd);
-	sciWnd *pwnd = (sciWnd *)heap2Ptr(hWnd);
-	_gfx->OpenPort((sciPort *)pwnd);
+	GUIWindow *pwnd = (GUIWindow *)heap2Ptr(hWnd);
+	_gfx->OpenPort((GUIPort *)pwnd);
 	r = dims;
 	pwnd->rect = dims;
 	if (restoreRect)
@@ -136,7 +136,7 @@
 	
 	pwnd->wndStyle = style;
 	pwnd->hSaved1 = pwnd->hSaved2 = NULL_REG;
-	pwnd->bDrawed = false;
+	pwnd->bDrawn = false;
 	if ((style & kTransparent) == 0)
 		pwnd->uSaveFlag = (arg8 == 0xFFFF ? 1 : 3);
 	
@@ -184,20 +184,20 @@
 	
 	if (argA)
 		DrawWindow(pwnd);
-	_gfx->SetPort((sciPort *)pwnd);
+	_gfx->SetPort((GUIPort *)pwnd);
 	_gfx->SetOrigin(pwnd->rect.left, pwnd->rect.top + _wmgrPort->top);
 	pwnd->rect.moveTo(0, 0);
 	return pwnd;
 }
 
-void SciGUIwindowMgr::DrawWindow(sciWnd *pWnd) {
-	if (pWnd->bDrawed)
+void SciGUIwindowMgr::DrawWindow(GUIWindow *pWnd) {
+	if (pWnd->bDrawn)
 		return;
 	Common::Rect r;
 	int16 wndStyle = pWnd->wndStyle;
 
-	pWnd->bDrawed = true;
-	sciPort *oldport = _gfx->SetPort(_wmgrPort);
+	pWnd->bDrawn = true;
+	GUIPort *oldport = _gfx->SetPort(_wmgrPort);
 	_gfx->PenColor(0);
 	if ((wndStyle & kTransparent) == 0) {
 		pWnd->hSaved1 = _gfx->SaveBits(pWnd->restoreRect, 1);
@@ -241,7 +241,7 @@
 	_gfx->SetPort(oldport);
 }
 
-void SciGUIwindowMgr::DisposeWindow(sciWnd *pWnd, int16 arg2) {
+void SciGUIwindowMgr::DisposeWindow(GUIWindow *pWnd, int16 arg2) {
 	_gfx->SetPort(_wmgrPort);
 	_gfx->RestoreBits(pWnd->hSaved1);
 	_gfx->RestoreBits(pWnd->hSaved2);
@@ -257,10 +257,10 @@
 	heapDisposePtr(hh);
 }
 
-void SciGUIwindowMgr::UpdateWindow(sciWnd *wnd) {
-	sciMemoryHandle handle;
+void SciGUIwindowMgr::UpdateWindow(GUIWindow *wnd) {
+	GUIMemoryHandle handle;
 
-	if (wnd->uSaveFlag && wnd->bDrawed) {
+	if (wnd->uSaveFlag && wnd->bDrawn) {
 		handle = _gfx->SaveBits(wnd->restoreRect, 1);
 		_gfx->RestoreBits(wnd->hSaved1);
 		wnd->hSaved1 = handle;

Modified: scummvm/trunk/engines/sci/gui/gui_windowmgr.h
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_windowmgr.h	2009-10-04 16:39:46 UTC (rev 44620)
+++ scummvm/trunk/engines/sci/gui/gui_windowmgr.h	2009-10-04 16:41:53 UTC (rev 44621)
@@ -32,20 +32,17 @@
 	SciGUIwindowMgr(EngineState *state, SciGUIgfx *gfx);
 	~SciGUIwindowMgr();
 
-	int16 isFrontWindow(sciWnd *wnd);
+	int16 isFrontWindow(GUIWindow *wnd);
 	void SelectWindow(HEAPHANDLE hh);
-	void BeginUpdate(sciWnd *wnd);
-	void EndUpdate(sciWnd *wnd);
-	SCILanguage getSCILanguage();
-	char* StrSplit(char*buff, const char*msg, const char*fmt);
-	char* getIntlString(char*buff, const char*msg, const char*fmt, SCILanguage lang, SCILanguage prop);
-	sciWnd *NewWindow(const Common::Rect &dims, const Common::Rect *restoreRect, const char *title, uint16 style, uint16 arg8, uint16 argA);
-	void DrawWindow(sciWnd *wnd);
-	void DisposeWindow(sciWnd *pWnd, int16 arg2);
-	void UpdateWindow(sciWnd *wnd);
+	void BeginUpdate(GUIWindow *wnd);
+	void EndUpdate(GUIWindow *wnd);
+	GUIWindow *NewWindow(const Common::Rect &dims, const Common::Rect *restoreRect, const char *title, uint16 style, uint16 arg8, uint16 argA);
+	void DrawWindow(GUIWindow *wnd);
+	void DisposeWindow(GUIWindow *pWnd, int16 arg2);
+	void UpdateWindow(GUIWindow *wnd);
 
-	sciPort *_wmgrPort;
-	sciWnd *_picWind;
+	GUIPort *_wmgrPort;
+	GUIWindow *_picWind;
 
 private:
 	EngineState *_s;


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