#define TIME_HIST_SLOTS 128 // # of slots used if fps > 60. half this many if fps==30.
#define MAX_SONGS_PER_PAGE 40
typedefstruct
{
wchar_tszFace[256];
intnSize;// size requested @ font creation time
intbBold;
intbItalic;
intbAntiAliased;
}td_fontinfo;
typedefstruct
{
floatimm[2][3];// bass, mids, treble, no damping, for each channel (long-term average is 1)
floatavg[2][3];// bass, mids, treble, some damping, for each channel (long-term average is 1)
floatmed_avg[2][3];// bass, mids, treble, more damping, for each channel (long-term average is 1)
floatlong_avg[2][3];// bass, mids, treble, heavy damping, for each channel (long-term average is 1)
floatinfinite_avg[2][3];// bass, mids, treble: winamp's average output levels. (1)
floatfWaveform[2][576];// Not all 576 are valid! - only NUM_WAVEFORM_SAMPLES samples are valid for each channel (note: NUM_WAVEFORM_SAMPLES is declared in shell_defines.h)
floatfSpectrum[2][NUM_FREQUENCIES];// NUM_FREQUENCIES samples for each channel (note: NUM_FREQUENCIES is declared in shell_defines.h)
}td_soundinfo;// ...range is 0 Hz to 22050 Hz, evenly spaced.
intGetFrame();// returns current frame # (starts at zero)
floatGetTime();// returns current animation time (in seconds) (starts at zero) (updated once per frame)
floatGetFps();// returns current estimate of framerate (frames per second)
eScrModeGetScreenMode();// returns WINDOWED, FULLSCREEN, FAKE_FULLSCREEN, DESKTOP, or NOT_YET_KNOWN (if called before or during OverrideDefaults()).
HWNDGetWinampWindow();// returns handle to Winamp main window
HINSTANCEGetInstance();// returns handle to the plugin DLL module; used for things like loading resources (dialogs, bitmaps, icons...) that are built into the plugin.
wchar_t*GetPluginsDirPath();// usually returns 'c:\\program files\\winamp\\plugins\\'
wchar_t*GetConfigIniFile();// usually returns 'c:\\program files\\winamp\\plugins\\something.ini' - filename is determined from identifiers in 'defines.h'
char*GetConfigIniFileA();
protected:
// GET METHODS THAT ONLY WORK ONCE DIRECTX IS READY
HWNDGetPluginWindow();// returns handle to the plugin window. NOT persistent; can change!
intGetWidth();// returns width of plugin window interior, in pixels. Note: in windowed mode, this is a fudged, larger, aligned value, and on final display, it gets cropped.
intGetHeight();// returns height of plugin window interior, in pixels. Note: in windowed mode, this is a fudged, larger, aligned value, and on final display, it gets cropped.
intGetBitDepth();// returns 8, 16, 24 (rare), or 32
LPDIRECT3DDEVICE9GetDevice();// returns a pointer to the DirectX 8 Device. NOT persistent; can change!
D3DCAPS9*GetCaps();// returns a pointer to the D3DCAPS9 structer for the device. NOT persistent; can change.
D3DFORMATGetBackBufFormat();// returns the pixelformat of the back buffer (probably D3DFMT_R8G8B8, D3DFMT_A8R8G8B8, D3DFMT_X8R8G8B8, D3DFMT_R5G6B5, D3DFMT_X1R5G5B5, D3DFMT_A1R5G5B5, D3DFMT_A4R4G4B4, D3DFMT_R3G3B2, D3DFMT_A8R3G3B2, D3DFMT_X4R4G4B4, or D3DFMT_UNKNOWN)
D3DFORMATGetBackBufZFormat();// returns the pixelformat of the back buffer's Z buffer (probably D3DFMT_D16_LOCKABLE, D3DFMT_D32, D3DFMT_D15S1, D3DFMT_D24S8, D3DFMT_D16, D3DFMT_D24X8, D3DFMT_D24X4S4, or D3DFMT_UNKNOWN)
char*GetDriverFilename();// returns a text string with the filename of the current display adapter driver, such as "nv4_disp.dll"
char*GetDriverDescription();// returns a text string describing the current display adapter, such as "NVIDIA GeForce4 Ti 4200"
D3DDISPLAYMODEm_disp_mode_fs;// a D3DDISPLAYMODE struct that specifies the width, height, refresh rate, and color format to use when the plugin goes fullscreen.
// PURE VIRTUAL FUNCTIONS (...must be implemented by derived classes)
eScrModem_screenmode;// // WINDOWED, FULLSCREEN, or FAKE_FULLSCREEN (i.e. running in a full-screen-sized window)
intm_frame;// current frame #, starting at zero
floatm_time;// current animation time in seconds; starts at zero.
floatm_fps;// current estimate of frames per second
HWNDm_hWndWinamp;// handle to Winamp window
HINSTANCEm_hInstance;// handle to application instance
DXContext*m_lpDX;// pointer to DXContext object
wchar_tm_szPluginsDirPath[MAX_PATH];// usually 'c:\\program files\\winamp\\plugins\\'
wchar_tm_szConfigIniFile[MAX_PATH];// usually 'c:\\program files\\winamp\\plugins\\something.ini' - filename is determined from identifiers in 'defines.h'
charm_szConfigIniFileA[MAX_PATH];// usually 'c:\\program files\\winamp\\plugins\\something.ini' - filename is determined from identifiers in 'defines.h'
intGetCanvasMarginX();// returns the # of pixels that exist on the canvas, on each side, that the user will never see. Mainly here for windowed mode, where sometimes, up to 15 pixels get cropped at edges of the screen.
intGetCanvasMarginY();// returns the # of pixels that exist on the canvas, on each side, that the user will never see. Mainly here for windowed mode, where sometimes, up to 15 pixels get cropped at edges of the screen.
public:
voidToggleFullScreen();
voidDrawDarkTranslucentBox(RECT*pr);
protected:
voidRenderPlaylist();
voidStuffParams(DXCONTEXT_PARAMS*pParams);
voidEnforceMaxFPS();
// DESKTOP MODE FUNCTIONS (found in desktop_mode.cpp)