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

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sun Oct 4 18:23:02 CEST 2009


Revision: 44616
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44616&view=rev
Author:   lordhoto
Date:     2009-10-04 16:22:49 +0000 (Sun, 04 Oct 2009)

Log Message:
-----------
Attempt to fix wince compilation.

Modified Paths:
--------------
    scummvm/trunk/engines/sci/gui/gui_windowmgr.cpp

Modified: scummvm/trunk/engines/sci/gui/gui_windowmgr.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_windowmgr.cpp	2009-10-04 15:55:23 UTC (rev 44615)
+++ scummvm/trunk/engines/sci/gui/gui_windowmgr.cpp	2009-10-04 16:22:49 UTC (rev 44616)
@@ -38,11 +38,11 @@
 
 // window styles
 enum {
-	TRANSPARENT = 1,
-	NOFRAME		= 2,
-	TITLE		= 4,
-	TOPMOST		= 8,
-	USER		= 0x80
+	kTransparent = (1 << 0),
+	kNoFrame     = (1 << 1),
+	kTitle       = (1 << 2),
+	kTopmost     = (1 << 3),
+	kUser        = (1 << 7)
 };
 
 SciGUIwindowMgr::SciGUIwindowMgr(EngineState *state, SciGUIgfx *gfx)
@@ -68,7 +68,7 @@
 
 	windowList.AddToFront(wmgrPortH);
 
-	_picWind = NewWindow(_picRect, 0, 0, TRANSPARENT | NOFRAME, 0, 1);
+	_picWind = NewWindow(_picRect, 0, 0, kTransparent | kNoFrame, 0, 1);
 }
 
 SciGUIwindowMgr::~SciGUIwindowMgr() {
@@ -121,7 +121,7 @@
 		return 0;
 	}
 	heapClearPtr(hWnd);
-	if (style & TOPMOST)
+	if (style & kTopmost)
 		windowList.AddToFront(hWnd);
 	else
 		windowList.AddToEnd(hWnd);
@@ -135,10 +135,10 @@
 	pwnd->wndStyle = style;
 	pwnd->hSaved1 = pwnd->hSaved2 = NULL_REG;
 	pwnd->bDrawed = false;
-	if ((style & TRANSPARENT) == 0)
+	if ((style & kTransparent) == 0)
 		pwnd->uSaveFlag = (arg8 == 0xFFFF ? 1 : 3);
 	
-	if (title && (style & TITLE)) {
+	if (title && (style & kTitle)) {
 		HEAPHANDLE hTitle = heapNewPtr((uint16)strlen(title) + 1, kDataString, title);
 		if (!hTitle) {
 			warning("Can't open window!");
@@ -149,9 +149,9 @@
 	}
 	
 	r = dims;
-	if (style == USER || (style & NOFRAME) == 0) {
+	if (style == kUser || (style & kNoFrame) == 0) {
 		r.grow(1);
-		if (style & TITLE) {
+		if (style & kTitle) {
 			r.top -= 10;
 			r.bottom++;
 		}
@@ -197,24 +197,24 @@
 	pWnd->bDrawed = true;
 	sciPort *oldport = _gfx->SetPort(_wmgrPort);
 	_gfx->PenColor(0);
-	if ((wndStyle & TRANSPARENT) == 0) {
+	if ((wndStyle & kTransparent) == 0) {
 		pWnd->hSaved1 = _gfx->SaveBits(pWnd->restoreRect, 1);
 		if (pWnd->uSaveFlag & 2) {
 			pWnd->hSaved2 = _gfx->SaveBits(pWnd->restoreRect, 2);
-			if ((wndStyle & USER) == 0)
+			if ((wndStyle & kUser) == 0)
 				_gfx->FillRect(pWnd->restoreRect, 2, 0, 0xF);
 		}
 	}
 	
 	// drawing frame,shadow and title
-	if ((wndStyle & USER) == 0) {
+	if ((wndStyle & kUser) == 0) {
 		r = pWnd->dims;
-		if ((wndStyle & NOFRAME) == 0) {
+		if ((wndStyle & kNoFrame) == 0) {
 			r.translate(1, 1);
 			_gfx->FrameRect(r);// shadow
 			r.translate(-1, -1);
 			_gfx->FrameRect(r);// window frame
-			if (wndStyle & TITLE) {
+			if (wndStyle & kTitle) {
 				_gfx->FrameRect(r);
 				r.grow(-1);
 				_gfx->FillRect(r, 1, 0);
@@ -232,7 +232,7 @@
 			r.grow(-1);
 		}
 		
-		if ((wndStyle & TRANSPARENT) == 0)
+		if ((wndStyle & kTransparent) == 0)
 			_gfx->FillRect(r, 1, pWnd->backClr);
 		_gfx->ShowBits(pWnd->dims, 1);
 	}


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