diff options
| -rw-r--r-- | sword2/driver/menu.cpp | 216 | 
1 files changed, 0 insertions, 216 deletions
diff --git a/sword2/driver/menu.cpp b/sword2/driver/menu.cpp index 61eb8a001d..272020433c 100644 --- a/sword2/driver/menu.cpp +++ b/sword2/driver/menu.cpp @@ -289,222 +289,6 @@ int32 ProcessMenu(void) {  		}  	} -/* - -	uint8	menu; -	uint8	i; -	uint8	complete; -	uint8	frameCount; -//	uint8	*src, *dst; -	int32	curx, xoff; -	int32	cury, yoff; -	HRESULT	hr; -	RECT	r; -	int32	delta; -	static	int32 lastTime = 0; - -	if (lastTime == 0) -	{ -		lastTime = timeGetTime(); -		frameCount = 1; -	} -	else -	{ -		delta = timeGetTime() - lastTime; -		if (delta > 250) -		{ -			lastTime += delta; -			delta = 250; -			frameCount = 1; -		} -		else -		{ -			frameCount = (uint8) ((iconCount+8) * delta / 750); -			lastTime += frameCount * 750 / (iconCount + 8); -		} - -	} - - - -	while (frameCount-- > 0) -	{ -		for (menu = RDMENU_TOP; menu <= RDMENU_BOTTOM; menu++) -		{ -			if (menuStatus[menu] == RDMENU_OPENING) -			{ -				//	The menu is opening, so process it here -				complete = 1; - -				//	Propagate the animation from the first icon. -				for (i=RDMENU_MAXPOCKETS-1; i>0; i--) -				{ -					pocketStatus[menu][i] = pocketStatus[menu][i-1]; -					if (pocketStatus[menu][i] != MAXMENUANIMS) -					{ -						complete = 0; -					} -				} -				if (pocketStatus[menu][i] != MAXMENUANIMS) -					complete = 0; - -				//	... and animate the first icon -				if (pocketStatus[menu][0] != MAXMENUANIMS) -					pocketStatus[menu][0] += 1; - -				//	Check to see if the menu is fully open -				if (complete) -				{ -					menuStatus[menu] = RDMENU_SHOWN; -				} -			} -			else if (menuStatus[menu] == RDMENU_CLOSING) -			{ -				//	The menu is closing, so process it here -				complete = 1; - -				//	Propagate the animation from the first icon. -				for (i=RDMENU_MAXPOCKETS-1; i>0; i--) -				{ -					pocketStatus[menu][i] = pocketStatus[menu][i-1]; -					if (pocketStatus[menu][i] != 0) -					{ -						complete = 0; -					} -				} -				if (pocketStatus[menu][i] != 0) -					complete = 0; - -				//	... and animate the first icon -				if (pocketStatus[menu][0] != 0) -					pocketStatus[menu][0] -= 1; - -				//	Check to see if the menu is fully open -				if (complete) -				{ -					menuStatus[menu] = RDMENU_HIDDEN; -				} -			} -		} - -	} -	 -	//	Does the menu need to be drawn? -	for (menu = RDMENU_TOP; menu <= RDMENU_BOTTOM; menu++) -	{ -		if (menuStatus[menu] != RDMENU_HIDDEN) -		{ -			//	Draw the menu here. -			curx = RDMENU_ICONSTART + RDMENU_ICONWIDE / 2; -			cury = (MENUDEEP / 2) + (RENDERDEEP + MENUDEEP) * menu; - -			for (i=0; i<RDMENU_MAXPOCKETS; i++) -			{ -				if (lpIconSurface[menu][i]) -				{ -					if (pocketStatus[menu][i] == MAXMENUANIMS) -					{ -						xoff = (RDMENU_ICONWIDE / 2); -						r.left = curx - xoff; -						r.right = r.left + RDMENU_ICONWIDE; -						yoff = (RDMENU_ICONDEEP / 2); -						r.top = cury - yoff; -						r.bottom = r.top + RDMENU_ICONDEEP; -					} -					else -					{ -						xoff = (RDMENU_ICONWIDE / 2) * pocketStatus[menu][i] / MAXMENUANIMS; -						r.left = curx - xoff; -						r.right = curx + xoff; -						yoff = (RDMENU_ICONDEEP / 2) * pocketStatus[menu][i] / MAXMENUANIMS; -						r.top = cury - yoff; -						r.bottom = cury + yoff; -					} - -					if ((xoff != 0) && (yoff != 0)) -					{ -						hr = IDirectDrawSurface2_Blt(lpBackBuffer, &r, lpIconSurface[menu][i], NULL, DDBLT_WAIT, NULL); -						if (hr != DD_OK) -						{ -							switch (hr) -							{ -							case DDERR_GENERIC : -								hr = 0; -								break; -							case DDERR_INVALIDCLIPLIST : -								hr = 0; -								break; -							case DDERR_INVALIDOBJECT : -								hr = 0; -								break; -							case DDERR_INVALIDPARAMS : -								hr = 0; -								break; -							case DDERR_INVALIDRECT : -								hr = 0; -								break; -							case DDERR_NOALPHAHW : -								hr = 0; -								break; -							case DDERR_NOBLTHW : -								hr = 0; -								break; -							case DDERR_NOCLIPLIST : -								hr = 0; -								break; -							case DDERR_NODDROPSHW : -								hr = 0; -								break; -							case DDERR_NOMIRRORHW : -								hr = 0; -								break; -							case DDERR_NORASTEROPHW : -								hr = 0; -								break; -							case DDERR_NOROTATIONHW : -								hr = 0; -								break; -							case DDERR_NOSTRETCHHW : -								hr = 0; -								break; -							case DDERR_NOZBUFFERHW : -								hr = 0; -								break; -							case DDERR_SURFACEBUSY : -								hr = 0; -								break; -							case DDERR_SURFACELOST : -								hr = 0; -								break; -							case DDERR_UNSUPPORTED : -								hr = 0; -								break; -							default: //shit -								hr = 0; -								break; -							} -	//							if (hr == DDERR_INVALIDOBJECT) -	//							{ -								CreateIconSurface(menu, i); -								LoadIconSurface(menu, i); -								hr = IDirectDrawSurface2_Blt(lpBackBuffer, &r, lpIconSurface[menu][i], NULL, DDBLT_WAIT, NULL); -	//							} -							if (hr != DD_OK) -							{ -								if (hr != DDERR_SURFACELOST) -								{ -									DirectDrawError("Unable to blt icon", hr); -									return(hr); -								} -							} -						} -					} -				} -				curx += (RDMENU_ICONSPACING + RDMENU_ICONWIDE); -			} -		} -	} -*/  	return RD_OK;  }  | 
