1 /***************************************************************************
4 begin : Sun Oct 28 2001
5 copyright : (C) 2001 by Pete Bernert
6 email : BlackDove@addcom.de
7 ***************************************************************************/
8 /***************************************************************************
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. See also the license.txt file for *
14 * additional informations. *
16 ***************************************************************************/
20 #include "externals.h"
25 unsigned long dwCoreFlags = 0;
27 // create lists/stuff for fonts (actually there are no more lists, but I am too lazy to change the func names ;)
32 // kill existing lists/fonts
38 // DISPLAY FPS/MENU TEXT
43 int iMPos=0; // menu arrow pos
45 void DisplayText(void) // DISPLAY TEXT
49 // Build Menu buffer (== Dispbuffer without FPS)...
50 void BuildDispMenu(int iInc)
52 if(!(ulKeybits&KEY_SHOWFPS)) return; // mmm, cheater ;)
54 iMPos+=iInc; // up or down
55 if(iMPos<0) iMPos=3; // wrap around
58 strcpy(szMenuBuf," FL FS DI GF "); // main menu items
60 if(UseFrameLimit) // set marks
62 if(iFrameLimit==1) szMenuBuf[2] = '+';
63 else szMenuBuf[2] = '*';
65 if(iFastFwd) szMenuBuf[7] = '~';
67 if(UseFrameSkip) szMenuBuf[7] = '*';
69 if(iUseDither) // set marks
71 if(iUseDither==1) szMenuBuf[12] = '+';
72 else szMenuBuf[12] = '*';
75 if(dwActFixes) szMenuBuf[17] = '*';
77 if(dwCoreFlags&1) szMenuBuf[23] = 'A';
78 if(dwCoreFlags&2) szMenuBuf[23] = 'M';
80 if(dwCoreFlags&0xff00) //A/M/G/D
82 if((dwCoreFlags&0x0f00)==0x0000) // D
85 if((dwCoreFlags&0x0f00)==0x0100) // A
88 if((dwCoreFlags&0x0f00)==0x0200) // M
91 if((dwCoreFlags&0x0f00)==0x0300) // G
94 szMenuBuf[24]='0'+(char)((dwCoreFlags&0xf000)>>12); // number
98 if(lSelectedSlot) szMenuBuf[26] = '0'+(char)lSelectedSlot;
100 szMenuBuf[(iMPos+1)*5]='<'; // set arrow
104 // Some menu action...
105 void SwitchDispMenu(int iStep) // SWITCH DISP MENU
107 if(!(ulKeybits&KEY_SHOWFPS)) return; // tststs
111 case 0: // frame limit
116 if(UseFrameLimit) iType=iFrameLimit;
120 if(iType==0) UseFrameLimit=0;
129 case 1: // frame skip
133 if(!UseFrameSkip) {UseFrameSkip=1;iFastFwd = 0;}
136 if(!iFastFwd) iFastFwd=1;
137 else {UseFrameSkip=0;iFastFwd = 0;}
142 if(!UseFrameSkip) {UseFrameSkip=1;iFastFwd = 1;}
145 if(iFastFwd) iFastFwd=0;
146 else {UseFrameSkip=0;iFastFwd = 0;}
149 bSkipNextFrame=FALSE;
154 if(iUseDither<0) iUseDither=2;
155 if(iUseDither>2) iUseDither=0;
158 case 3: // special fixes
159 if(iUseFixes) {iUseFixes=0;dwActFixes=0;}
160 else {iUseFixes=1;dwActFixes=dwCfgFixes;}
162 if(iFrameLimit==2) SetAutoFrameCap();
166 BuildDispMenu(0); // update info