[Scummvm-cvs-logs] CVS: scummvm/bs2/driver menu.cpp,1.11,1.12
Torbj?rn Andersson
eriktorbjorn at users.sourceforge.net
Sun Sep 21 09:17:11 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/bs2 build_display.cpp,1.21,1.22 controls.cpp,1.15,1.16 function.cpp,1.10,1.11 interpreter.cpp,1.11,1.12 maketext.cpp,1.9,1.10 mem_view.cpp,1.6,1.7 mouse.cpp,1.15,1.16 resman.cpp,1.37,1.38 save_rest.cpp,1.16,1.17 sound.cpp,1.15,1.16 speech.cpp,1.19,1.20
- Next message: [Scummvm-cvs-logs] CVS: scummvm/bs2/driver language.cpp,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/bs2/driver
In directory sc8-pr-cvs1:/tmp/cvs-serv27133
Modified Files:
menu.cpp
Log Message:
Removed original ProcessMenu() code.
Index: menu.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/driver/menu.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- menu.cpp 16 Sep 2003 09:57:57 -0000 1.11
+++ menu.cpp 21 Sep 2003 16:16:49 -0000 1.12
@@ -289,222 +289,6 @@
}
}
-/*
-
- 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;
}
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/bs2 build_display.cpp,1.21,1.22 controls.cpp,1.15,1.16 function.cpp,1.10,1.11 interpreter.cpp,1.11,1.12 maketext.cpp,1.9,1.10 mem_view.cpp,1.6,1.7 mouse.cpp,1.15,1.16 resman.cpp,1.37,1.38 save_rest.cpp,1.16,1.17 sound.cpp,1.15,1.16 speech.cpp,1.19,1.20
- Next message: [Scummvm-cvs-logs] CVS: scummvm/bs2/driver language.cpp,1.2,1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list