Initial community commit

This commit is contained in:
Jef 2024-09-24 14:54:57 +02:00
parent 537bcbc862
commit fc06254474
16440 changed files with 4239995 additions and 2 deletions

View file

@ -0,0 +1,892 @@
//#define PLUGIN_NAME "Nullsoft Tiny Fullscreen"
#define PLUGIN_VERSION "v2.16"
#include <windows.h>
#include <commctrl.h>
#include <ddraw.h>
#include "resource.h"
#include "../winamp/vis.h"
#include "../winamp/wa_ipc.h"
#include "../Agave/Language/api_language.h"
#include <api/service/waServiceFactory.h>
/* global variables */
wchar_t g_title[1024]={0};
wchar_t *ini_file = 0;
HWND hwndParent = 0;
HFONT hFont = 0;
unsigned char *g_scrollbuf;
extern void do_min(HWND hwnd);
extern void do_unmin(HWND hwnd);
extern BOOL DirectMouseWheel_ProcessDialogMessage(HWND hwnd, unsigned int uMsg, WPARAM wParam, LPARAM lParam);
/* wasabi based services for localisation support */
api_service *WASABI_API_SVC = 0;
api_language *WASABI_API_LNG = 0;
HINSTANCE WASABI_API_LNG_HINST = 0, WASABI_API_ORIG_HINST = 0;
/* window procedures */
static LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
static INT_PTR CALLBACK dlgProc1(HWND hwndDlg, UINT uMsg, WPARAM wParam,LPARAM lParam);
/* winamp vis module functions */
static winampVisModule *getModule(int which);
static void config_write(struct winampVisModule *this_mod);
static void config_read(struct winampVisModule *this_mod);
static void config(struct winampVisModule *this_mod);
static int init(struct winampVisModule *this_mod);
static int render_sa_vp_mono(struct winampVisModule *this_mod);
static int render_sa(struct winampVisModule *this_mod);
static int render_osc(struct winampVisModule *this_mod);
static int render_osc_sa_mono(struct winampVisModule *this_mod);
static int render_super_vp(struct winampVisModule *this_mod);
static void quit(struct winampVisModule *this_mod);
/* uninitialized data (zeroed) */
DDBLTFX ddbfx;
HWND g_hwnd;
LPDIRECTDRAW lpDD;
LPDIRECTDRAWPALETTE ddp;
LPDIRECTDRAWSURFACE lpDDSPrim;
LPDIRECTDRAWSURFACE lpDDSBack;
unsigned char *fb_locked;
int scrpitch;
unsigned char last[4][4096];
int lpos;
int rpos;
unsigned char colpoints[2][6][3];
winampVisModule mod[4];
int hadjusted;
COLORREF custcolors[16];
/* initialized data */
wchar_t szAppName[] = L"NSFSVis";
winampVisHeader hdr = { VIS_HDRVER, 0, getModule };
unsigned char orig_colpoints[2][6][3] =
{
{
{ 200, 0, 0 },
{ 250, 0, 25 },
{ 243, 65, 5 },
{ 237, 163, 7 },
{ 250, 250, 0 },
{ 255, 255, 255 }
},{
{ 34, 29, 54 },
{ 251, 125, 0 },
{ 255, 160, 66 },
{ 242, 237, 21 },
{ 255, 255, 0 },
{ 255, 255, 255 },
}
};
struct
{
int w,h,nbands, hpercent,scope,scopesc;
int falloff;
int peak_falloff, peak_hold;
} configst={640,480,188,80,1,33,8,8,1};
/* function implimentations */
void sd_config(struct winampVisModule *this_mod);
int sd_init(struct winampVisModule *this_mod);
int sd_render(struct winampVisModule *this_mod);
void sd_quit(struct winampVisModule *this_mod);
extern "C" {
// do this so we can have the original hinstance of our vis for localisation
/*BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
if(fdwReason == DLL_PROCESS_ATTACH)
{
visDll = hinstDLL;
DisableThreadLibraryCalls(hinstDLL);
}
return TRUE;
}*/
static HINSTANCE GetMyInstance()
{
MEMORY_BASIC_INFORMATION mbi = {0};
if(VirtualQuery(GetMyInstance, &mbi, sizeof(mbi)))
return (HINSTANCE)mbi.AllocationBase;
return NULL;
}
/* this is the only exported symbol. returns our main header. */
__declspec( dllexport ) winampVisHeader* winampVisGetHeader(HWND hwndParent)
{
static char module1[96], module2[96], module3[96], module4[96];
OSVERSIONINFO version = {0};
version.dwOSVersionInfoSize = sizeof(version);
if (!GetVersionEx(&version)) ZeroMemory(&version, sizeof(OSVERSIONINFO));
if (version.dwMajorVersion < 6 ||
(version.dwMajorVersion <= 6 && version.dwMinorVersion < 2)) // Windows 8.x+
{
if(!WASABI_API_LNG_HINST)
{
// loader so that we can get the localisation service api for use
WASABI_API_SVC = (api_service*)SendMessage(hwndParent, WM_WA_IPC, 0, IPC_GET_API_SERVICE);
if (WASABI_API_SVC == (api_service*)1) WASABI_API_SVC = NULL;
waServiceFactory *sf = WASABI_API_SVC->service_getServiceByGuid(languageApiGUID);
if (sf) WASABI_API_LNG = reinterpret_cast<api_language*>(sf->getInterface());
// need to have this initialised before we try to do anything with localisation features
WASABI_API_START_LANG(GetMyInstance(),VisNFSFLangGUID);
}
static char szDescription[256];
char temp[256];
wsprintfA(szDescription,"%s %s",WASABI_API_LNGSTRING_BUF(IDS_NULLSOFT_TINY_FULLSCREEN, temp, 256), PLUGIN_VERSION);
hdr.description = szDescription;
mod[1].latencyMs=1000/60;
mod[1].delayMs=5;
mod[1].spectrumNch=
mod[1].waveformNch=1;
mod[1].Init=init;
mod[1].Config=config;
mod[1].Quit=quit;
mod[1].description=WASABI_API_LNGSTRING_BUF(IDS_SEXY_SCROLLING_VOICEPRINT,module1,96);
mod[1].Render=render_super_vp;
mod[2]=mod[1];
mod[2].description=WASABI_API_LNGSTRING_BUF(IDS_SPECTRUM_ANALYZER_VOICEPRINT,module2,96);
mod[2].waveformNch--;
mod[2].Render=render_sa_vp_mono;
mod[3]=mod[1];
mod[3].description=WASABI_API_LNGSTRING_BUF(IDS_SPECTRUM_ANALYZER_OSCILLOSCOPE,module3,96);
mod[3].Render=render_osc_sa_mono;
mod[0]=mod[1];
mod[0].description=WASABI_API_LNGSTRING_BUF(IDS_RANDOM_INTELLIGENT_VISUALIZATION,module4,96);
mod[0].spectrumNch--;
mod[0].delayMs=1;
mod[0].Init=sd_init;
mod[0].Config=sd_config;
mod[0].Render=sd_render;
mod[0].Quit=sd_quit;
return &hdr;
}
return NULL;
}
};
winampVisModule *getModule(int which)
{
OSVERSIONINFO version = {0};
version.dwOSVersionInfoSize = sizeof(version);
if (!GetVersionEx(&version)) ZeroMemory(&version, sizeof(OSVERSIONINFO));
if (version.dwMajorVersion < 6 ||
(version.dwMajorVersion <= 6 && version.dwMinorVersion < 2)) // Windows 8.x+
{
if (which < 4 && which >= 0) return mod+which;
}
return 0;
}
/* configuration. Passed this_mod, as a "this" parameter. Allows you to make one configuration
function that shares code for all your modules (you don't HAVE to use it though, you can make
config1(), config2(), etc...)
*/
void config(struct winampVisModule *this_mod)
{
config_read(this_mod);
if (WASABI_API_DIALOGBOXW(IDD_DIALOG1,this_mod->hwndParent,dlgProc1) == IDOK)
config_write(this_mod);
}
int DD_Init(int this_w, int this_h, PALETTEENTRY *palette)
{
DDSURFACEDESC DDsd;
DDSCAPS ddscaps;
DDsd.dwSize = sizeof(DDsd);
DDsd.dwFlags = DDSD_CAPS|DDSD_BACKBUFFERCOUNT;
DDsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE|DDSCAPS_COMPLEX|DDSCAPS_FLIP;
DDsd.dwBackBufferCount = 1;
ddbfx.dwSize=sizeof(ddbfx);
if (DirectDrawCreate(NULL,&lpDD,NULL) != DD_OK)
{
lpDD=0;
return 1;
}
if (IDirectDraw_SetCooperativeLevel(lpDD,g_hwnd,DDSCL_EXCLUSIVE|DDSCL_FULLSCREEN) != DD_OK ||
IDirectDraw_SetDisplayMode(lpDD,this_w,this_h,8) != DD_OK ||
IDirectDraw_CreateSurface(lpDD,&DDsd, &lpDDSPrim, NULL) != DD_OK)
{
IDirectDraw_Release(lpDD);
lpDD=0;
return 1;
}
IDirectDrawSurface_GetSurfaceDesc(lpDDSPrim,&DDsd);
scrpitch = DDsd.lPitch;
ddscaps.dwCaps = DDSCAPS_BACKBUFFER;
if (IDirectDrawSurface_GetAttachedSurface(lpDDSPrim,&ddscaps, &lpDDSBack) != DD_OK)
{
IDirectDraw_Release(lpDD);
lpDD=0;
return 1;
}
if (IDirectDraw_CreatePalette(lpDD,DDPCAPS_8BIT|DDPCAPS_ALLOW256,palette,&ddp,NULL) == DD_OK)
IDirectDrawSurface_SetPalette(lpDDSPrim,ddp);
{
RECT r1={0,0,this_w,this_h};
RECT r2=r1;
IDirectDrawSurface_Blt(lpDDSBack,&r1,NULL,NULL,DDBLT_WAIT|DDBLT_COLORFILL,&ddbfx);
IDirectDrawSurface_Blt(lpDDSPrim,&r2,NULL,NULL,DDBLT_WAIT|DDBLT_COLORFILL,&ddbfx);
}
fb_locked=0;
return 0;
}
void initwindow(struct winampVisModule *this_mod, int w, int h)
{
if (SendMessage(this_mod->hwndParent,WM_WA_IPC,0,IPC_IS_PLAYING_VIDEO)>1)
{
g_hwnd=0;
MessageBox(this_mod->hwndParent,
WASABI_API_LNGSTRING(IDS_CANNOT_GO_FULLSCREEN_WHEN_VIDEO_PLAYING),
hdr.description,MB_OK|MB_ICONINFORMATION);
return;
}
WNDCLASSW wc={0,WndProc,0,0,this_mod->hDllInstance,0,0,(HBRUSH)GetStockObject(BLACK_BRUSH),0,szAppName};
UnregisterClassW(szAppName,this_mod->hDllInstance);
RegisterClassW(&wc);
hwndParent=this_mod->hwndParent;
g_hwnd = CreateWindowEx(WS_EX_APPWINDOW|WS_EX_TOPMOST,"NSFSVis",this_mod->description,
WS_VISIBLE|WS_POPUP|WS_SYSMENU,0,0,w,h,hwndParent,NULL,
this_mod->hDllInstance,0);
SendMessage(this_mod->hwndParent, WM_WA_IPC, (WPARAM)g_hwnd, IPC_SETVISWND);
}
int init(struct winampVisModule *this_mod)
{
PALETTEENTRY palette[256];
int x,e,a;
config_read(this_mod);
initwindow(this_mod,configst.w,configst.h);
if (!g_hwnd)
{
return 1;
}
SetTimer(g_hwnd,0,1000,NULL);
{
char *t=(char*)palette;
int x=sizeof(palette);
while (x--) *t++=0;
}
palette[255].peRed=palette[255].peGreen=palette[255].peBlue=255;
palette[254].peRed=colpoints[0][5][0];
palette[254].peGreen=colpoints[0][5][1];
palette[254].peBlue=colpoints[0][5][2];
palette[253].peRed=colpoints[1][5][0];
palette[253].peGreen=colpoints[1][5][1];
palette[253].peBlue=colpoints[1][5][2];
if (this_mod == mod+1)
{
PALETTEENTRY *p=palette+1;
unsigned char *t=colpoints[1][0];
for (a = 0; a < 4; a ++)
{
int dr, dg, db;
int r=*t++;
int g=*t++;
int b=*t++;
dr=((t[0]-r)<<16)/60;
dg=((t[1]-g)<<16)/60;
db=((t[2]-b)<<16)/60;
r<<=16;
g<<=16;
b<<=16;
for (x = 0; x < 60; x ++)
{
p->peRed = r>>16;
p->peGreen = g>>16;
p->peBlue = b>>16;
r+=dr;g+=dg;b+=db;
p++;
}
}
}
else
{
PALETTEENTRY *p=palette+1;
unsigned char *t=colpoints[0][0];
for (e = 0; e < 3; e ++)
{
for (a = 0; a < 4; a ++)
{
int dr, dg, db;
int r=*t++;
int g=*t++;
int b=*t++;
dr=(t[0]-r);
dg=(t[1]-g);
db=(t[2]-b);
r<<=4;
g<<=4;
b<<=4;
for (x = 0; x < 16; x ++)
{
p->peRed = r>>4;
p->peGreen = g>>4;
p->peBlue = b>>4;
r+=dr;g+=dg;b+=db;
p++;
}
}
t+=3*2;
}
}
do_min(this_mod->hwndParent);
if (DD_Init(configst.w,configst.h,palette))
{
DestroyWindow(g_hwnd);
do_unmin(this_mod->hwndParent);
return 1;
}
char *t=(char*)last;
int y=sizeof(last);
while (y--) *t++=0;
hadjusted=((configst.h)*configst.hpercent)/100;
if (hadjusted>configst.h) hadjusted=configst.h;
if (hadjusted < 1) hadjusted=1;
if (this_mod == mod+1) g_scrollbuf = (unsigned char *)GlobalAlloc(GPTR,configst.w*hadjusted);
else g_scrollbuf = (unsigned char *)GlobalAlloc(GPTR,hadjusted);
if (!g_scrollbuf)
{
IDirectDraw_Release(lpDD);
lpDD=0;
DestroyWindow(g_hwnd);
do_unmin(this_mod->hwndParent);
return 1;
}
return 0;
}
unsigned char *DD_Enter(int l, int t, int r, int b)
{
int h;
DDSURFACEDESC d={sizeof(d),};
RECT r2={l,t,r,b};
if (fb_locked) return fb_locked;
if (l<r && t<b) IDirectDrawSurface_Blt(lpDDSBack,&r2,NULL,NULL,DDBLT_WAIT|DDBLT_COLORFILL,&ddbfx);
if ((h = IDirectDrawSurface_Lock(lpDDSBack,NULL,&d,DDLOCK_WAIT|DDLOCK_SURFACEMEMORYPTR|DDLOCK_WRITEONLY,NULL)) != DD_OK)
{
if (h == DDERR_SURFACELOST)
{
IDirectDrawSurface_Restore(lpDDSPrim);
}
return 0;
}
return (fb_locked = (unsigned char *) d.lpSurface);
}
void DD_Unlock(int w, int transparent)
{
if (fb_locked)
{
HDC hdc;
RECT r1={0,0,w,32};
RECT r3=r1;
IDirectDrawSurface_Unlock(lpDDSBack,fb_locked);
fb_locked=0;
if (!transparent) IDirectDrawSurface_Blt(lpDDSBack,&r1,NULL,NULL,DDBLT_WAIT|DDBLT_COLORFILL,&ddbfx);
if (IDirectDrawSurface_GetDC(lpDDSBack,&hdc) == DD_OK)
{
if (!transparent) SetBkColor(hdc,0);
else SetBkMode(hdc,TRANSPARENT);
SetTextColor(hdc,RGB(255,255,255));
HFONT oldfont = (HFONT)SelectObject(hdc,hFont);
DrawTextW(hdc,g_title,-1,&r3,DT_CENTER|DT_TOP|DT_SINGLELINE);
SelectObject(hdc,oldfont);
IDirectDrawSurface_ReleaseDC(lpDDSBack,hdc);
}
IDirectDrawSurface_Flip(lpDDSPrim,NULL, DDFLIP_WAIT);
}
}
void _render_analyzer(struct winampVisModule *this_mod, int hdiv)
{
int x;
int pos;
int dpos;
unsigned char *sd=this_mod->spectrumData[0];
unsigned char *sb;
int len=min(configst.w,4096);
sb=fb_locked+scrpitch*(configst.h-1);
pos=0;
dpos=(400<<16)/configst.w;
for (x = 0; x < len; x ++)
{
unsigned char *f = sb++;
int c = 2;
int lo=0;
int lv=last[0][x]-configst.falloff*2;
int ipos=(pos>>16);
int l = (((int)sd[ipos+1])*((pos&0xffff)) + ((int)sd[ipos ])*(0x10000-(pos&0xffff)))>>16;
l = l*(ipos+40)/80;
l>>=hdiv;
if (l > (128>>hdiv)-1) l = (128>>hdiv)-1;
pos+=dpos;
if (configst.peak_hold)
{
if ((int)last[2][x]+configst.peak_falloff < 255) last[2][x]+=configst.peak_falloff;
else last[2][x]=255;
if (last[3][x] < last[2][x]/32) last[3][x]=0;
else last[3][x]-=last[2][x]/32;
if (l*2 > last[3][x])
{
last[2][x]=0;
last[3][x]=l*2;
}
if (last[3][x]/2 >= l) lo=(-(int)last[3][x]/2)*scrpitch;
}
if (l < lv) l = lv;
last[0][x]= l;
while (l--)
{
f[0] = c/2;
c+=1+hdiv;
f -= scrpitch;
}
if (lo) sb[lo-1]=254;
}
}
void _render_scope(struct winampVisModule *this_mod, int hr)
{
int x;
unsigned char *wd=this_mod->waveformData[0];
int scsc;
int pos,dpos,lastv;
unsigned char *sb;
scsc=(configst.scopesc*hr)/100;
if (scsc < 1) scsc=1;
if (scsc > hr) scsc=hr;
sb=fb_locked+scrpitch*(configst.h/2-scsc/2);
lastv=-1;
pos=0;
dpos=(575<<16)/configst.w;
for (x = 0; x < configst.w; x ++)
{
int tv = (((int)wd[(pos>>16)+1]^128)*((pos&0xffff)) + ((int)wd[(pos>>16)] ^128)*(0x10000-(pos&0xffff)))>>16;
tv=(tv*scsc)>>8;
pos+=dpos;
if (lastv<0) lastv=tv;
if (tv==lastv) sb[scrpitch*lastv]=253;
else
{
while (tv < lastv) sb[scrpitch*lastv--]=253;
while (tv > lastv) sb[scrpitch*lastv++]=253;
}
sb++;
}
}
int render_super_vp(struct winampVisModule *this_mod)
{
int tb=min(configst.nbands,511);
int sy=((configst.h-hadjusted)/2);
unsigned char *src=&this_mod->spectrumData[0][tb];
unsigned char *op;
unsigned char *p1=g_scrollbuf;
unsigned char *p2=g_scrollbuf+configst.w;
unsigned int pos=0;
unsigned int dpos=(tb<<16)/hadjusted;
if (!g_scrollbuf || !DD_Enter(0,0,configst.w,min(sy,32))) return 0;
op=fb_locked+sy*scrpitch;
int y=hadjusted/2;
while (y--)
{
int x=configst.w-1;
while (x--)
{
*p1++=p1[1];
*p2++=p2[1];
}
x = (((int)src[0 - (pos>>16)])*((pos&0xffff)) + ((int)src[1 - (pos>>16)])*(0x10000-(pos&0xffff)))>>16;
pos+=dpos;
if (++x > 240) x = 240;
*p1++ = x;
x = (((int)src[0 - (pos>>16)])*((pos&0xffff)) + ((int)src[1 - (pos>>16)])*(0x10000-(pos&0xffff)))>>16;
pos+=dpos;
if (++x > 240) x = 240;
*p2++ = x;
memcpy(op,p1-configst.w,configst.w);
op+=scrpitch;
memcpy(op,p2-configst.w,configst.w);
op+=scrpitch;
p1+=configst.w;
p2+=configst.w;
}
if (configst.scope) _render_scope(this_mod,hadjusted);
DD_Unlock(configst.w,1);
return 0;
}
int render_sa_vp_mono(struct winampVisModule *this_mod)
{
int x;
unsigned char *sd=this_mod->spectrumData[0];
unsigned char *b3,*b1,*b2;
int pos=0;
int vsize=hadjusted;
int dpos=(min(configst.nbands,511)<<16)/vsize;
if (!DD_Enter(0,configst.h-64,configst.w,configst.h)) return 0;
if (vsize > configst.h-32-64) vsize=configst.h-32-64;
b1 = fb_locked + scrpitch*((configst.h-32-64)/2+32+vsize/2) + lpos;
b2 = b1+rpos-lpos;
_render_analyzer(this_mod,1);
for (x = 0; x < vsize; x ++)
{
b1[0] = g_scrollbuf[x];
b1-=scrpitch;
}
if (rpos < configst.w-2) b3 = b2+1;
else b3 = b2 - (configst.w-2);
for (x = 0; x < vsize; x++)
{
int ipos=(pos>>16);
int l = (((int)sd[ipos+1])*((pos&0xffff)) + ((int)sd[ipos]) *(0x10000-(pos&0xffff)))>>16;
l=(l*240)/1024;
pos+=dpos;
if (l > 63) l = 63;
l+=65;
b2[0]=l;
g_scrollbuf[x]=l;
b2-=scrpitch;
b3[0] = 255;
b3-=scrpitch;
}
lpos=rpos;
if (++rpos >= configst.w) rpos -= configst.w;
DD_Unlock(configst.w,0);
return 0;
}
int render_osc_sa_mono(struct winampVisModule *this_mod)
{
if (!DD_Enter(0,0,configst.w,configst.h)) return 0;
_render_analyzer(this_mod,0);
_render_scope(this_mod,configst.h);
DD_Unlock(configst.w,1);
return 0;
}
/*
cleanup (opposite of init()). Destroys the window, unregisters the window class
*/
void quit(struct winampVisModule *this_mod)
{
IDirectDrawSurface_Release(lpDDSPrim);
IDirectDraw_Release(lpDD);
DestroyWindow(g_hwnd);
if (g_scrollbuf) GlobalFree(g_scrollbuf);
g_scrollbuf=0;
UnregisterClassW(szAppName,this_mod->hDllInstance);
do_unmin(this_mod->hwndParent);
}
/*
window procedure for our window
*/
LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
if (message == WM_CREATE){
if(hFont) DeleteObject(hFont);
HDC hdc = GetDC(hwnd);
hFont = CreateFontW(-MulDiv(12, GetDeviceCaps(hdc, LOGPIXELSY), 72),
0, 0, 0, FW_BOLD, 0, 0, 0, 0, 0, 0, 0, 0, L"Arial");
ReleaseDC(hwnd,hdc);
}
else if (message == WM_PAINT)
{
PAINTSTRUCT ps = {0};
HDC hdc = BeginPaint(hwnd,&ps);
EndPaint(hwnd,&ps);
}
else if (message == WM_KEYUP || message == WM_KEYDOWN)
{
if (wParam == VK_ESCAPE) DestroyWindow(hwnd);
else
{
PostMessage(hwndParent,message,wParam,lParam);
}
}
else if (message ==WM_USER+1666)
{
if (wParam == 1 && lParam == 15)
{
DestroyWindow(hwnd);
}
return 0;
}
else if (message == WM_DESTROY)
{
SendMessage(hwndParent, WM_WA_IPC, 0, IPC_SETVISWND);
if(hFont) DeleteObject(hFont);
PostQuitMessage(0);
}
else if (message == WM_TIMER)
{
g_title[0] = 0;
GetWindowTextW(hwndParent,g_title,sizeof(g_title)-1-32);
wchar_t *p = g_title;
while (p && *p) p = CharNextW(p); p = CharPrevW(g_title,p);
while (p >= g_title)
{
if (p[0] == L'-' && p[1] == L' ' && p[2] == L'W' && p[3] == L'i') break;
p = CharPrevW(g_title,p);
}
if (p >= g_title)
{
wchar_t *e=p;
while (e && *e && *e != L'[') e = CharNextW(e);
while (p >= g_title && *p == L' ') p = CharPrevW(g_title,p);
if (p < g_title) p = CharNextW(p);
*(p = CharNextW(p)) = L' ';
*p = 0;
if (e && *e)
{
int n=29;
while (e && *e && n--)
{
*p = *e;
p = CharNextW(p);
e = CharNextW(e);
}
*p = 0;
}
}
else g_title[0]=0;
LRESULT t = (SendMessage(hwndParent,WM_USER,0,105) + 500) / 1000;
if (t)
{
p = g_title;
while (p && *p) p = CharNextW(p);
LRESULT tt = (SendMessage(hwndParent,WM_USER,1,105)*1000);
if(tt > 0){
int length = tt/=1000,
minutes = length/60,
seconds = length - (minutes*60);
wsprintfW(p,L" [%d:%02d / %d:%02d]",t/60,t%60,minutes,seconds);
}
else{
wsprintfW(p,L" [%d:%02d / %d:%02d]",t/60,t%60);
}
}
// if we did not get a time then remove the '-' on the end
else{
*(p = CharPrevW(g_title,p)) = 0;
}
}
else if (message == WM_SETCURSOR) SetCursor(NULL);
else return DefWindowProc(hwnd,message,wParam,lParam);
return 0;
}
void init_inifile(struct winampVisModule *this_mod)
{
ini_file = (wchar_t*)SendMessage(this_mod->hwndParent,WM_WA_IPC,0,IPC_GETINIFILEW);
}
static void config_read(struct winampVisModule *this_mod)
{
init_inifile(this_mod);
if (!GetPrivateProfileStructW(szAppName,L"colors",colpoints,sizeof(colpoints),ini_file))
{
int x=sizeof(colpoints);
char *i=(char*)orig_colpoints, *o=(char*)colpoints;
while (x--) *o++=*i++;
}
GetPrivateProfileStructW(szAppName,L"config",&configst,sizeof(configst),ini_file);
}
void config_write(struct winampVisModule *this_mod)
{
init_inifile(this_mod);
WritePrivateProfileStructW(szAppName,L"colors",colpoints,sizeof(colpoints),ini_file);
WritePrivateProfileStructW(szAppName,L"config",&configst,sizeof(configst),ini_file);
}
void do_vprintcol(HWND hwndDlg, unsigned char *t)
{
CHOOSECOLORW cs={sizeof(cs),hwndDlg,};
cs.hInstance = 0;
cs.rgbResult=t[0] | (t[1]<<8) | (t[2]<<16);
cs.lpCustColors = custcolors;
cs.Flags = CC_RGBINIT|CC_FULLOPEN;
if (ChooseColorW(&cs))
{
t[0] = (unsigned char) cs.rgbResult;
t[1] = (unsigned char) (cs.rgbResult>>8);
t[2] = (unsigned char) (cs.rgbResult>>16);
InvalidateRect(hwndDlg,NULL,0);
}
}
static HRESULT WINAPI _cb(LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext)
{
if (lpDDSurfaceDesc->ddpfPixelFormat.dwRGBBitCount==8)
{
wchar_t s[32] = {0};
wsprintfW(s, L"%dx%d", lpDDSurfaceDesc->dwWidth, lpDDSurfaceDesc->dwHeight);
LRESULT idx = SendMessageW((HWND)lpContext,CB_ADDSTRING,0,(LPARAM)s);
SendMessage((HWND)lpContext,CB_SETITEMDATA,idx,MAKELONG(lpDDSurfaceDesc->dwWidth,lpDDSurfaceDesc->dwHeight));
if ((int)lpDDSurfaceDesc->dwWidth == configst.w && (int)lpDDSurfaceDesc->dwHeight == configst.h)
SendMessage((HWND)lpContext,CB_SETCURSEL,idx,0);
}
return DDENUMRET_OK;
}
static INT_PTR CALLBACK dlgProc1(HWND hwndDlg, UINT uMsg, WPARAM wParam,LPARAM lParam)
{
if (uMsg == WM_DRAWITEM)
{
DRAWITEMSTRUCT *di = (DRAWITEMSTRUCT *)lParam;
unsigned char *thiscol=NULL;
if (di->CtlID >= IDC_AP1 && di->CtlID <= IDC_VP6) thiscol=colpoints[0][di->CtlID-IDC_AP1];
if (thiscol)
{
HBRUSH b, ob;
RECT r;
GetClientRect(di->hwndItem,&r);
b = CreateSolidBrush(thiscol[0] | (thiscol[1]<<8) | (thiscol[2]<<16));
ob = (HBRUSH) SelectObject(di->hDC,b);
Rectangle(di->hDC,r.left,r.top,r.right,r.bottom);
SelectObject(di->hDC,ob);
DeleteObject(b);
}
}
if (uMsg == WM_INITDIALOG)
{
SetWindowText(hwndDlg,hdr.description);
if (configst.peak_hold) CheckDlgButton(hwndDlg,IDC_CHECK1,BST_CHECKED);
SendDlgItemMessage(hwndDlg,IDC_FALLOFF,TBM_SETRANGE,0,MAKELONG(1,40));
SendDlgItemMessage(hwndDlg,IDC_FALLOFF,TBM_SETPOS,1,configst.falloff);
SendDlgItemMessage(hwndDlg,IDC_FALLOFF2,TBM_SETRANGE,0,MAKELONG(1,40));
SendDlgItemMessage(hwndDlg,IDC_FALLOFF2,TBM_SETPOS,1,configst.peak_falloff);
{
LPDIRECTDRAW dd;
if (DirectDrawCreate(NULL,&dd,NULL) == DD_OK)
{
IDirectDraw_EnumDisplayModes(dd,0,NULL,GetDlgItem(hwndDlg,IDC_MODELIST),_cb);
IDirectDraw_Release(dd);
}
SendDlgItemMessage(hwndDlg,IDC_BANDS,TBM_SETRANGE,0,MAKELONG(30,511));
SendDlgItemMessage(hwndDlg,IDC_BANDS,TBM_SETPOS,1,configst.nbands);
SendDlgItemMessage(hwndDlg,IDC_SCSCALE,TBM_SETRANGE,0,MAKELONG(1,100));
SendDlgItemMessage(hwndDlg,IDC_SCSCALE,TBM_SETPOS,1,configst.scopesc);
SendDlgItemMessage(hwndDlg,IDC_VUSE,TBM_SETRANGE,0,MAKELONG(1,100));
SendDlgItemMessage(hwndDlg,IDC_VUSE,TBM_SETPOS,1,configst.hpercent);
if (configst.scope) CheckDlgButton(hwndDlg,IDC_SCOPE,BST_CHECKED);
}
}
if (uMsg == WM_CLOSE)
{
uMsg=WM_COMMAND;
wParam=IDCANCEL;
}
if (uMsg == WM_COMMAND)
{
int w=LOWORD(wParam);
if (w == IDOK || w == IDCANCEL)
{
configst.falloff = SendDlgItemMessage(hwndDlg,IDC_FALLOFF,TBM_GETPOS,0,0);
configst.peak_falloff = SendDlgItemMessage(hwndDlg,IDC_FALLOFF2,TBM_GETPOS,0,0);
configst.peak_hold=!!IsDlgButtonChecked(hwndDlg,IDC_CHECK1);
configst.scope=IsDlgButtonChecked(hwndDlg,IDC_SCOPE)?1:0;
configst.scopesc = SendDlgItemMessage(hwndDlg,IDC_SCSCALE,TBM_GETPOS,0,0);
configst.nbands = SendDlgItemMessage(hwndDlg,IDC_BANDS,TBM_GETPOS,0,0);
configst.hpercent = SendDlgItemMessage(hwndDlg,IDC_VUSE,TBM_GETPOS,0,0);
EndDialog(hwndDlg,w);
}
if (w == IDC_MODELIST && HIWORD(wParam) == CBN_SELCHANGE)
{
DWORD n=SendDlgItemMessage(hwndDlg,IDC_MODELIST,CB_GETCURSEL,0,0);
if (n != CB_ERR)
{
n=SendDlgItemMessage(hwndDlg,IDC_MODELIST,CB_GETITEMDATA,n,0);
if (n != CB_ERR)
{
configst.w=LOWORD(n);
configst.h=HIWORD(n);
}
}
}
if (w == IDC_DEFVP || w == IDC_DEFAP)
{
int p=(w != IDC_DEFAP);
int x=sizeof(colpoints)/2;
char *i=(char*)orig_colpoints[p], *o=(char*)colpoints[p];
if (p) x-=3;
while (x--) *o++=*i++;
InvalidateRect(hwndDlg,NULL,FALSE);
}
if (w >= IDC_AP1 && w <= IDC_VP6) do_vprintcol(hwndDlg,colpoints[0][w-IDC_AP1]);
}
if (FALSE != DirectMouseWheel_ProcessDialogMessage(hwndDlg, uMsg, wParam, lParam))
{
return TRUE;
}
return 0;
}

View file

@ -0,0 +1,28 @@
#ifndef _DD_H_
#define _DD_H_
class C_DD
{
public:
C_DD();
char *open(int w, int h, HWND hwnd); // returns error string on error, or NULL on success
void close(void);
int lock(unsigned char **input, unsigned char **output);
void unlock(void);
void setpalette(unsigned char palette[768], unsigned int time_ms);
int palette_fadeleft(void); // returns how long til palette fade will be done
private:
LPDIRECTDRAWPALETTE g_ddp;
LPDIRECTDRAW g_lpDD;
LPDIRECTDRAWSURFACE g_lpDDSPrim,g_lpPrimSurfBack;
LPDIRECTDRAWSURFACE g_RenderSurface[2];
void *g_RenderSurfaceLocked[2];
unsigned char g_palette_seek[768];
unsigned char g_palette_orig[768];
unsigned char g_palette_last[768];
int g_pal_lastv;
int cursurface;
unsigned int g_palette_starttime, g_palette_endtime;
};
#endif // _DD_H_

View file

@ -0,0 +1,229 @@
#include <windows.h>
#include <ddraw.h>
#include "dd.h"
#include "../Agave/Language/api_language.h"
#include "resource.h"
extern HINSTANCE visDll;
#pragma intrinsic(memset)
C_DD::C_DD()
{
g_lpDD=NULL;
cursurface=0;
g_ddp=NULL;
g_lpDDSPrim=NULL;
g_lpPrimSurfBack=NULL;
g_RenderSurface[0]=g_RenderSurface[1]=NULL;
g_RenderSurfaceLocked[0]=g_RenderSurfaceLocked[1]=NULL;
memset(g_palette_seek,0,sizeof(g_palette_seek));
memset(g_palette_orig,0,sizeof(g_palette_orig));
memset(g_palette_last,0,sizeof(g_palette_last));
g_pal_lastv=0;
g_palette_starttime=g_palette_endtime=0;
}
int C_DD::lock(unsigned char **input, unsigned char **output)
{
DDSURFACEDESC d={sizeof(d),};
if (g_RenderSurface[cursurface]->Lock(NULL,&d,DDLOCK_WAIT,NULL) != DD_OK)
{
g_RenderSurfaceLocked[cursurface]=0;
return 0;
}
*input=(unsigned char*)(g_RenderSurfaceLocked[cursurface]=d.lpSurface);
DDSURFACEDESC e={sizeof(e),};
if (g_RenderSurface[cursurface^1]->Lock(NULL,&e,DDLOCK_WAIT,NULL) != DD_OK)
{
g_RenderSurface[cursurface]->Unlock(g_RenderSurfaceLocked[cursurface]);
g_RenderSurfaceLocked[cursurface^1]=0;
g_RenderSurfaceLocked[cursurface]=0;
return 0;
}
*output=(unsigned char*)(g_RenderSurfaceLocked[cursurface^1]=e.lpSurface);
return 1;
}
int C_DD::palette_fadeleft()
{
return g_palette_endtime-GetTickCount();
}
void C_DD::unlock(void)
{
if (g_RenderSurfaceLocked[0])
{
g_RenderSurface[0]->Unlock(g_RenderSurfaceLocked[0]);
g_RenderSurface[1]->Unlock(g_RenderSurfaceLocked[1]);
if (g_palette_starttime)
{
PALETTEENTRY palette[256] = {0};
int x = 0;
int len=g_palette_endtime-g_palette_starttime;
int pos=GetTickCount()-g_palette_starttime;
int do_it=1;
if (pos >= len || !len)
{
g_palette_starttime=0;
g_pal_lastv=-128;
memcpy(g_palette_last,g_palette_seek,768);
}
else
{
int adj=(pos<<8)/len;
int poop=(255*adj)>>8;
if (poop != g_pal_lastv)
{
g_pal_lastv=poop;
for (x = 0; x < 768; x ++)
{
int c=(((int)g_palette_seek[x])*adj + ((int)g_palette_orig[x])*(255-adj))>>8;
if (c > 255) c = 255;
g_palette_last[x]=c;
}
}
else do_it=0;
}
if (do_it)
{
int y=0;
for (x = 0; x < 256; x ++)
{
palette[x].peRed=g_palette_last[y];
palette[x].peGreen=g_palette_last[y+1];
palette[x].peBlue=g_palette_last[y+2];
palette[x].peFlags = PC_NOCOLLAPSE;
y+=3;
}
g_ddp->SetEntries(0,0,256,palette);
}
}
if (g_lpPrimSurfBack)
{
if (g_lpPrimSurfBack->Blt(NULL,g_RenderSurface[cursurface^1],NULL,DDBLT_WAIT,NULL) == DDERR_SURFACELOST)
{
g_lpDDSPrim->Restore();
g_lpPrimSurfBack->Restore();
}
else
g_lpDDSPrim->Flip(NULL,DDFLIP_WAIT);
}
else
{
if (g_lpDDSPrim->Blt(NULL,g_RenderSurface[cursurface^1],NULL,DDBLT_WAIT,NULL) == DDERR_SURFACELOST)
{
g_lpDDSPrim->Restore();
}
else g_lpDD->WaitForVerticalBlank(DDWAITVB_BLOCKBEGIN,0);
}
g_RenderSurfaceLocked[0]=0;
g_RenderSurfaceLocked[1]=0;
cursurface^=1;
}
}
char *C_DD::open(int w, int h, HWND hwnd)
{
static char errbuf[128];
if (DirectDrawCreate(NULL,&g_lpDD,NULL) != DD_OK) return WASABI_API_LNGSTRING_BUF(IDS_DIRECTDRAWCREATE_FAILED,errbuf,128);
if (g_lpDD->SetCooperativeLevel(hwnd,DDSCL_EXCLUSIVE|DDSCL_FULLSCREEN) != DD_OK)
{
g_lpDD->Release();
return WASABI_API_LNGSTRING_BUF(IDS_COULD_NOT_SET_EXCLUSIVE_FULLSCREEN,errbuf,128);
}
if (g_lpDD->SetDisplayMode(w,h,8) != DD_OK)
{
g_lpDD->Release();
return WASABI_API_LNGSTRING_BUF(IDS_COULD_NOT_SET_DISPLAY_MODE,errbuf,128);
}
DDSURFACEDESC DDsd = {0};
DDsd.dwSize = sizeof(DDsd);
DDsd.dwFlags = DDSD_CAPS|DDSD_BACKBUFFERCOUNT;
DDsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE|DDSCAPS_COMPLEX|DDSCAPS_FLIP;
DDsd.dwBackBufferCount = 1;
if (g_lpDD->CreateSurface(&DDsd, &g_lpDDSPrim, NULL) != DD_OK)
{
g_lpPrimSurfBack=NULL;
DDsd.dwSize = sizeof(DDsd);
DDsd.dwFlags = DDSD_CAPS;
DDsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
if (g_lpDD->CreateSurface(&DDsd, &g_lpDDSPrim, NULL) != DD_OK)
{
g_lpDD->Release();
return WASABI_API_LNGSTRING_BUF(IDS_COULD_NOT_CREATE_PRIMARY_SURFACE,errbuf,128);
}
}
else
{
DDSCAPS ddscaps;
ddscaps.dwCaps = DDSCAPS_BACKBUFFER;
if (g_lpDDSPrim->GetAttachedSurface(&ddscaps, &g_lpPrimSurfBack) != DD_OK) // no page flipping
g_lpPrimSurfBack=NULL;
}
DDsd.dwFlags = DDSD_CAPS|DDSD_WIDTH|DDSD_HEIGHT|DDSD_PITCH|DDSD_PIXELFORMAT;
DDsd.dwWidth=w;
DDsd.dwHeight=h;
DDsd.lPitch=w;
DDsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN|DDSCAPS_SYSTEMMEMORY;
DDsd.ddpfPixelFormat.dwSize = sizeof(DDsd.ddpfPixelFormat);
DDsd.ddpfPixelFormat.dwFlags=DDPF_PALETTEINDEXED8|DDPF_RGB;
DDsd.ddpfPixelFormat.dwRGBBitCount = 8;
if (g_lpDD->CreateSurface(&DDsd, &g_RenderSurface[0], NULL) != DD_OK ||
g_lpDD->CreateSurface(&DDsd, &g_RenderSurface[1], NULL) != DD_OK)
{
g_lpDD->Release();
return WASABI_API_LNGSTRING_BUF(IDS_COULD_NOT_CREATE_RENDER_SURFACE,errbuf,128);
}
PALETTEENTRY palette[256] = {0};
for (int x = 0; x < 256; x ++)
{
palette[x].peRed=palette[x].peGreen=palette[x].peBlue=0;
palette[x].peFlags = PC_NOCOLLAPSE;
}
if (g_lpDD->CreatePalette(DDPCAPS_8BIT|DDPCAPS_ALLOW256,palette,&g_ddp,NULL) != DD_OK)
{
g_lpDD->Release();
return WASABI_API_LNGSTRING_BUF(IDS_COULD_NOT_CREATE_PALETTE,errbuf,128);
}
if (g_lpDDSPrim->SetPalette(g_ddp) != DD_OK)
{
g_lpDD->Release();
return WASABI_API_LNGSTRING_BUF(IDS_COULD_NOT_SET_PALETTE,errbuf,128);
}
g_pal_lastv=-128;
g_palette_starttime=0;
return 0;
}
void C_DD::setpalette(unsigned char palette[768], unsigned int time_ms)
{
memcpy(g_palette_seek,palette,768);
memcpy(g_palette_orig,g_palette_last,768);
g_palette_starttime=GetTickCount();
g_palette_endtime=g_palette_starttime+time_ms;
}
void C_DD::close(void)
{
if (g_lpDD) g_lpDD->Release();
g_lpDD=0;
cursurface=0;
g_ddp=NULL;
g_lpDDSPrim=NULL;
g_lpPrimSurfBack=NULL;
g_RenderSurface[0]=g_RenderSurface[1]=NULL;
g_RenderSurfaceLocked[0]=g_RenderSurfaceLocked[1]=NULL;
memset(g_palette_seek,0,sizeof(g_palette_seek));
memset(g_palette_orig,0,sizeof(g_palette_orig));
memset(g_palette_last,0,sizeof(g_palette_last));
g_pal_lastv=0;
g_palette_starttime=g_palette_endtime=0;
}

View file

@ -0,0 +1,9 @@
Nullsoft TinyVis 2000 is Copyright (C) 2001, Nullsoft Inc.
Redistribution of this software is permitted as long as it is in the original unmodified installer form that includes this readme and license.
Use of this software for display, private or public is permitted with no restrictions, though proper credit would be appreciated.
You may not reverse engineer or otherwise disassemble this software.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE

View file

@ -0,0 +1,86 @@
#include <windows.h>
static void __inline DrawPixel(int color, unsigned char *fb)
{
int a=*fb;
a+=color;
if (a>255)a=255;
*fb=(unsigned char)a;
}
// based on abrash's wu antialiasing routine
void line(unsigned char *fb, int X0, int Y0, int X1, int Y1, int w, int h)
{
unsigned int ErrorAdj=0, ErrorAcc;
int DeltaX, DeltaY, XDir=1;
if (Y0 > Y1)
{
int t = Y0; Y0 = Y1; Y1 = t;
t = X0; X0 = X1; X1 = t;
}
DeltaY = Y1 - Y0;
DeltaX = X1 - X0;
if (DeltaX < 0)
{
XDir = -1;
DeltaX = -DeltaX;
}
if (DeltaY > DeltaX) {
ErrorAcc = (X0&0xffff);
Y0>>=16;
X0>>=16;
DeltaY += 65535;
DeltaY >>= 16;
if (DeltaY) ErrorAdj = DeltaX/DeltaY;
fb+=Y0*w+X0;
while (DeltaY-- >= 0) {
if (X0 > 0 && Y0 >= 0 && X0 < w-1 && Y0 < h)
{
int Weighting = ErrorAcc >> 10;
DrawPixel(Weighting^63,fb);
DrawPixel(Weighting,fb+XDir);
}
ErrorAcc += ErrorAdj;
if (ErrorAcc >= 65536) {
X0 += XDir;
fb += XDir;
ErrorAcc -= 65536;
}
fb+=w;
Y0++;
}
}
else
{
ErrorAcc = (Y0&0xffff);
X0>>=16;
Y0>>=16;
DeltaX += 65535;
DeltaX >>= 16;
if (DeltaX) ErrorAdj = DeltaY/DeltaX;
fb+=Y0*w+X0;
while (DeltaX-- >= 0) {
if (Y0 >= 0 && Y0 < h-1 && X0 >= 0 && X0 < w)
{
int Weighting = ErrorAcc >> 10;
DrawPixel(Weighting^63,fb);
DrawPixel(Weighting,fb+w);
}
ErrorAcc += ErrorAdj;
if (ErrorAcc >= 65536) {
Y0++;
fb+=w;
ErrorAcc-=65536;
}
fb+=XDir;
X0+=XDir;
}
}
}

View file

@ -0,0 +1,96 @@
#include <windows.h>
#include <math.h>
extern int (*warand)(void);
static double rsc[3], rv[3];
static double drand(void)
{
return (warand()%4096)/(double)4096;
}
static void startgen(void)
{
for (int x = 0; x < 3; x ++)
{
rsc[x]=drand()*256.0+256.0;
rv[x]=drand()*0.25+0.25;
}
if ((warand()&0xf)==5) rv[0]+=drand()*4.0;
if ((warand()&0xf)==2) rv[1]+=drand()*4.0;
if ((warand()&0xf)==3) rv[2]+=drand()*4.0;
}
static int getv(int i, int w)
{
double d=sin((double)i*3.14159/256.0*rv[w])*rsc[w];
int v;
__asm
{
fld d
fistp v
}
if (v<0)v=0;
if (v>0xff)v=0xff;
return v;
}
static int lreversed;
unsigned char *getnewpalette()
{
static unsigned char thispal[256][3];
int x;
startgen();
for (x = 0; x < 768; x ++)
{
thispal[x/3][x%3]=getv(x/3,x%3);
}
int lr=warand()%21;
if (lreversed)
{
if (warand()&1) lreversed=0;
lr=4;
}
else if (lr == 4)
{
lreversed=1;
}
switch (lr)
{
case 3:
for (x = 0; x < 128; x ++)
{
thispal[x][0]=thispal[x*2][0];
thispal[x][1]=thispal[x*2][1];
thispal[x][2]=thispal[x*2][2];
}
for (; x < 256; x ++)
{
thispal[x][0]=thispal[255-x][0];
thispal[x][1]=thispal[255-x][1];
thispal[x][2]=thispal[255-x][2];
}
break;
case 4:
for (x = 0; x < 128; x ++)
{
int q;
for (q = 0; q < 3; q ++)
{
unsigned char t;
t=thispal[x][q];
thispal[x][q]=thispal[255-x][q];
thispal[255-x][q]=t;
}
}
break;
}
return &thispal[0][0];
}

View file

@ -0,0 +1,609 @@
#include <windows.h>
#include <math.h>
#define M_PI 3.14159265358979323846
extern int (*warand)(void);
static int XRES=24;
static int YRES=16;
static int g_w,g_h;
static int *m_wmul;
static int *m_tab;
static int __inline myftol(double d)
{
int a;
__asm
{
fld d
fistp a
mov eax, a
}
}
static double getvis(unsigned char *visdata, int bc, int bw, int ch, int xorv)
{
int x = 0;
int accum = 0;
if (ch && ch != 1 && ch != 2) return 0.0;
if (bw < 1) bw=1;
bc-=bw/2;
if (bc < 0)
{
bw+=bc;
bc=0;
}
if (bc > 575) bc=575;
if (bc+bw > 576) bw=576-bc;
if (!ch)
{
for (x = 0; x < bw; x ++)
{
accum+=(visdata[bc]^xorv)-xorv;
accum+=(visdata[bc+576]^xorv)-xorv;
bc++;
}
return (double)accum / ((double)bw*255.0);
}
else
{
if (ch == 2) visdata+=576;
for (x = 0; x < bw; x ++) accum+=(visdata[bc++]^xorv)-xorv;
return (double)accum / ((double)bw*127.5);
}
}
static unsigned char *m_visdata;
static double getosc(double band, double bandw)
{
return getvis((unsigned char *)m_visdata,myftol(band*576.0),
myftol(bandw*576.0),0,128);
}
static double fx_gstarttime,fx_curtime;
static double ef10_sc;
static __inline double sign(double p)
{
if (p < 0.0) return -1.0;
return 1.0;
}
static __inline double my_asin(double v)
{
double tmp;
__asm {
fld qword ptr [v]
fmul qword ptr [v]
fld st(0) //Duplicate X**2 on tos.
fld1 //Compute 1-X**2.
fsubr
fdiv //Compute X**2/(1-X**2).
fsqrt //Compute sqrt(x**2/(1-X**2)).
fld1 //To compute full arctangent.
fpatan //Compute atan of the above.
fstp qword ptr [tmp]
}
return tmp;
}
//#define TEST_FX 24
#define RME(n,x) case n: x break;
static void __fxsfunc(int which, double &d, double &r)
{
double t = 0.0;
switch (which)
{
RME(0, r+=(0.1-0.2*d)*(cos(fx_curtime)); d*=0.96;)
RME(1, d*=0.99*(1.0-sin(r*3+fx_curtime*3)/32.0); r+=0.03*sin(d * M_PI * 4.0 +fx_curtime*0.5);)
RME(2, d*=0.94+(cos(r*32.0)*0.06);)
RME(3, d*=1.01+(cos(r*4.0)*0.04); r+=0.03*sin(d * M_PI * 4);)
RME(4, r+=0.1*sin(d*M_PI*5);)
RME(5, t=sin(d*M_PI); d-=8*t*t*t*t*t*0.01; )
RME(6, d*=0.95+(cos(r*5.0 - M_PI/2.50)*0.03); )
RME(7, r+=0.1*cos(fx_curtime); d*=0.96+cos(d*M_PI)*0.05; )
RME(8, t=tan(fx_curtime*0.2);
if (t < -20.0) t=-20.0;
if (t > 20.0) t=20.0;
r+=0.07*cos(d*M_PI)*t;
)
RME(9, t=d; d=d+0.05*cos(r*ef10_sc)+getosc(r,0.2)*0.5; r=r+cos(t*3.14159*ef10_sc)*0.1; )
RME(10, d=atan(d); )
RME(11, d=sin(d); )
RME(12, r=r+sin(d*3.14159*4)*0.1; d=(0.99+0.04*cos(r*32))*d; )
RME(13,d=d-0.01*(fabs(sin(d*3.14159*8))+0.1);)
RME(14,d=d*(1.0+0.5*getosc(d,0.4)); )
RME(15,d=0.3; )
RME(16,d=0.1*cos(r*4.0+fx_curtime*1.3)+d; )
RME(17,r=cos(cos(fx_curtime)*d*M_PI*17)*0.1+r; d=d*cos(r*5.0+fx_curtime)*0.1+d; )
RME(18,r+=sin(r*2.0+cos(fx_curtime*0.2)*8)*0.15; d=d*0.98; )
RME(19, t=sin(r-M_PI*0.5 + fx_curtime*0.3); if (t < 0.1) t=0.1; d=d-0.3*d*t; )
RME(20, d=0.92*d*(1.0+0.09*sin(r)); r=r+0.1*(1.0-d)*(1.0-d)*(1.0-d); )
RME(21, d=my_asin(d*0.75)*0.95/0.75;)
RME(22,r=r+(0.2*sin(r*8+fx_curtime)); d=d*0.99;)
RME(23,
r=r+sin(r*4+cos(fx_curtime)*3)*sin(d*3.14159*7+cos(fx_curtime*0.2)*7)*0.3;
d=d*(0.97+cos(r*32.7)*0.03);
)
RME(24,
r=r+cos(fx_curtime*0.3)*0.1;
t=r;
if (t < 0.0) t+=3.14159;
if (t > 3.14159) t-=3.14159;
d=atan2(d,t/2)*0.9;
)
}
}
#define NUM_FX 25
#define COMBINE_FX 4
static double fx_weight;
static int cur_fx[COMBINE_FX], last_fx[COMBINE_FX];
static double fx_offs[2][2];
static unsigned int fx_start;
static unsigned int fx_end,fx_end2;
static void fx_init(void)
{
if (GetTickCount()>=fx_end)
{
memcpy(last_fx,cur_fx,sizeof(last_fx));
fx_start=GetTickCount();
fx_end2=fx_start+400+(warand()&16383);
fx_end=fx_start + 4*(fx_end2-fx_start);
if (fx_end > fx_start+8000) fx_end=fx_start+8000;
if (fx_end2 > fx_end) fx_end2=fx_end;
int x;
for (x = 0; x < COMBINE_FX; x ++)
{
cur_fx[x]=warand()%((NUM_FX-x) + x*x*(NUM_FX/3));
if (cur_fx[x] == 15) cur_fx[x]=warand()%((NUM_FX-x) + x*x*(NUM_FX/3));
}
for (x = 1; x < COMBINE_FX; x ++)
{
if (cur_fx[x] >= NUM_FX) break;
}
for (; x < COMBINE_FX; x ++) cur_fx[x]=NUM_FX;
#if 0
static char buf[1024] = {0};
wsprintf(buf,"picked: ");
for (x = 0; x < COMBINE_FX; x ++)
{
if (cur_fx[x]>=NUM_FX) break;
wsprintf(buf+strlen(buf),"%d,",cur_fx[x]);
}
wsprintf(buf+strlen(buf),"\n");
OutputDebugString(buf);
#endif
// for testing
#ifdef TEST_FX
for (x = 1; x < COMBINE_FX; x++)
{
cur_fx[x]=NUM_FX;
}
cur_fx[0]=TEST_FX;
#endif
for (x = 0; x < 2; x ++)
{
fx_offs[1][x]=fx_offs[0][x];
if (!(warand()&7))
fx_offs[0][x]=((warand()%101) - 50)/750.0;
else fx_offs[0][x]=0;
}
static int ff;
if (!ff)
{
last_fx[0]=warand()%NUM_FX;
for (x = 1; x < COMBINE_FX; x ++)
{
last_fx[x]=NUM_FX;
}
ff++;
}
}
fx_curtime=(double)(GetTickCount()-fx_gstarttime)/1000.0;
fx_weight=(double)(GetTickCount()-fx_start)/(double)(fx_end2-fx_start);
if (fx_weight > 1.0) fx_weight=1.0;
ef10_sc=cos(fx_curtime)*2 + 3;
}
static void fx_apply(double &d, double &r) // 1 if rect
{
double d2=d, r2=r;
int x;
for (x = 0; x < COMBINE_FX; x ++)
{
if (last_fx[x] < NUM_FX)
{
__fxsfunc(last_fx[x],d2,r2);
}
if (cur_fx[x] < NUM_FX)
{
__fxsfunc(cur_fx[x],d,r);
}
}
d=d*fx_weight + d2*(1.0-fx_weight);
r=r*fx_weight + r2*(1.0-fx_weight);
}
static int mmx_fadeval[2]={1,1};
static unsigned int const mmx_blend4_revn[2]={0xff00ff,0xff00ff};
static int const mmx_blend4_zero;
////// NEW FASTER (HOPEFULLY) - THANKS FOR THE IDEA RYAN! :)
static int mask1[2]={0x0000ffff,0};
static int mask2[2]={0xffff0000,0};
static int revy[2]={0,0xff00ff};
static int mask3[2]={0xffffffff,0};
static int mask4[2]={0,0xffffffff};
static int subma=0x000000FF;
#ifdef CLOOP
static __inline unsigned char FASTMMXBLEND(unsigned char *i, unsigned int w, int xp, int yp)
{
__asm
{
movd mm1, [xp]
mov eax, i
psrlw mm1, 8 // mm1 = -0XP
mov esi, w
movd mm3, [yp]
punpcklwd mm1,mm1 // mm1=00XP-00XP
psrlw mm3, 8 // mm3 = -0YP
sub ecx, ecx
movd mm2, [subma] // mm2=0000-00FF
mov cl, [eax]
psubw mm2, mm1 // mm2=00??-00XI
mov ch, [eax+1]
punpcklwd mm3,mm3 // mm3=00YP-00YP
pand mm1, [mask2] // mm1=00XP-0000
punpckldq mm3, mm3 //mm3=00YP-00YP-00YP-00YP
shl ecx, 16
movq mm4, [revy] // mm4=0000-0000-00FF-00FF
pand mm2, [mask1] // mm2=0000-00XI
psubw mm4, mm3 // mm4=00YI-00YI-00??-00??
mov cl, [eax+esi]
pand mm3, [mask3] // mm3=0000-0000-00YP-00YP
por mm1, mm2 // mm1=00XP-00XI
pand mm4, [mask4] // mm4=00YI-00YI-0000-0000
mov ch, [eax+esi+1]
por mm3, mm4 // mm3=00YP-00YP-00YI-00YI
punpckldq mm1, mm1 //mm1=00XP-00XI-00XP-00XI
pmullw mm1, mm3
movd mm0, ecx
punpcklbw mm0, [mmx_blend4_zero]
psrlw mm1, 8
Pmaddwd mm0, mm1
// empty
// stall
// stall
psrld mm0, 8
// empty
movq mm1, mm0
// empty
psrl mm1, 32
// empty
paddusb mm0, mm1
// empty
psubusb mm0, [mmx_fadeval]
// empty
movd eax, mm0
}
}
#endif
void moveframe_init(int w, int h, int divx, int divy, int fadeval)
{
int x = 0;
XRES=divx+1;
YRES=divy+1;
if (XRES&1) XRES&=~1;
if (YRES&1) YRES&=~1;
if (XRES<2) XRES=2;
if (YRES<2) YRES=2;
if (XRES>128) XRES=128;
if (YRES>128) YRES=128;
fx_gstarttime=(double)GetTickCount();
m_wmul = (int*)GlobalAlloc(GPTR,h*sizeof(int)+(XRES*YRES*2 + XRES*4 + 4)*sizeof(int));
m_tab=m_wmul + h;
for(x = 0; x < h; x ++)
m_wmul[x]=x*w;
g_w=w;
g_h=h;
mmx_fadeval[0]=fadeval;
mmx_fadeval[1]=fadeval;
}
void moveframe_quit()
{
if (m_wmul) GlobalFree(m_wmul);
m_wmul=NULL;
}
void moveframe(unsigned char *inptr, unsigned char *outptr, unsigned char *visdata)
{
m_visdata=visdata;
int w=g_w;
int h=g_h;
int w_adj=(w-2)<<16;
int h_adj=(h-2)<<16;
fx_init();
int x = 0;
int y = 0;
int *tabptr=m_tab;
double xsc=2.0/w,ysc=2.0/h;
double dw2=((double)w*32768.0);
double dh2=((double)h*32768.0);
double max_screen_d=sqrt((double)(w*w+h*h))*0.5;
double divmax_d=1.0/max_screen_d;
max_screen_d *= 65536.0;
double xo=fx_offs[0][0]*fx_weight + fx_offs[1][0]*(1.0-fx_weight);
double yo=fx_offs[0][1]*fx_weight + fx_offs[1][1]*(1.0-fx_weight);
int yc_pos, yc_dpos, xc_pos, xc_dpos;
yc_pos=0;
xc_dpos = (w<<16)/(XRES-1);
yc_dpos = (h<<16)/(YRES-1);
for (y = 0; y < YRES; y ++)
{
xc_pos=0;
for (x = 0; x < XRES; x ++)
{
double xd = 0, yd = 0;
xd=((double)xc_pos-dw2)*(1.0/65536.0);
yd=((double)yc_pos-dh2)*(1.0/65536.0);
xc_pos+=xc_dpos;
double var_d=sqrt(xd*xd+yd*yd)*divmax_d;
double var_r=atan2(yd,xd) + M_PI*0.5;
int tmp1 = 0, tmp2 = 0;
fx_apply(var_d,var_r);
var_d *= max_screen_d;
var_r -= M_PI*0.5;
tmp1=myftol(dw2*(1.0+xo) + cos(var_r) * var_d);
tmp2=myftol(dh2*(1.0+yo) + sin(var_r) * var_d);
if (tmp1 < 0) tmp1=0;
if (tmp1 > w_adj) tmp1=w_adj;
if (tmp2 < 0) tmp2=0;
if (tmp2 > h_adj) tmp2=h_adj;
*tabptr++ = tmp1;
*tabptr++ = tmp2;
}
yc_pos+=yc_dpos;
}
// yay, the table is generated. now we do a fixed point
// interpolation of the whole thing and pray.
int *interptab=m_tab+XRES*YRES*2;
int *rdtab=m_tab;
int yseek=1;
yc_pos=0;
xc_dpos=(w<<16)/(XRES-1);
yc_dpos=(h<<16)/(YRES-1);
int lypos=0;
int yl=h;
while (yl>0)
{
yc_pos+=yc_dpos;
yseek=(yc_pos>>16)-lypos;
if (!yseek) goto done;
lypos=yc_pos>>16;
int l=XRES;
int *stab=interptab;
int xr3=XRES*2;
while (l--)
{
int tmp1, tmp2;
tmp1=rdtab[0];
tmp2=rdtab[1];
stab[0]=tmp1;
stab[1]=tmp2;
stab[2]=(rdtab[XRES*2]-tmp1)/yseek;
stab[3]=(rdtab[XRES*2+1]-tmp2)/yseek;
rdtab+=2;
stab+=4;
}
if (yseek > yl) yseek=yl;
yl-=yseek;
if (yseek > 0) while (yseek--)
{
int d_x;
int d_y;
int seek;
int *seektab=interptab;
int xp,yp;
int l=w;
int lpos=0;
int xc_pos=0;
while (l>0)
{
xc_pos+=xc_dpos;
seek=(xc_pos>>16)-lpos;
if (!seek) goto done;
lpos=xc_pos>>16;
xp=seektab[0];
yp=seektab[1];
d_x=(seektab[4]-xp)/(seek);
d_y=(seektab[5]-yp)/(seek);
seektab[0] += seektab[2];
seektab[1] += seektab[3];
seektab+=4;
if (seek>l) seek=l;
l-=seek;
if (seek>0)
{
// normal loop
#ifdef CLOOP
while (seek--)
{
*outptr++=FASTMMXBLEND(inptr+(xp>>16)+m_wmul[yp>>16],w,xp,yp);
xp+=d_x; yp+=d_y;
}
#else
__asm
{
mov edx, seek
mov edi, outptr
mov esi, w
align 16
myLoop1:
mov eax, m_wmul
mov ebx, [yp]
movd mm3, ebx
mov ecx, [xp]
shr ebx, 16
movd mm1, ecx
mov eax, [eax+ebx*4];
shr ecx, 16
psrlw mm1, 8 // mm1 = -0XP
add eax, ecx
punpcklwd mm1,mm1 // mm1=00XP-00XP
add eax, [inptr]
psrlw mm3, 8 // mm3 = -0YP
movd mm2, [subma] // mm2=0000-00FF
psubw mm2, mm1 // mm2=00??-00XI
mov cx, [eax]
punpcklwd mm3,mm3 // mm3=00YP-00YP
pand mm1, [mask2] // mm1=00XP-0000
punpckldq mm3, mm3 //mm3=00YP-00YP-00YP-00YP
shl ecx, 16
movq mm4, [revy] // mm4=0000-0000-00FF-00FF
pand mm2, [mask1] // mm2=0000-00XI
mov cx, [eax+esi]
por mm1, mm2 // mm1=00XP-00XI
psubw mm4, mm3 // mm4=00YI-00YI-00??-00??
pand mm3, [mask3] // mm3=0000-0000-00YP-00YP
pand mm4, [mask4] // mm4=00YI-00YI-0000-0000
por mm3, mm4 // mm3=00YP-00YP-00YI-00YI
punpckldq mm1, mm1 //mm1=00XP-00XI-00XP-00XI
pmullw mm1, mm3
movd mm0, ecx
// empty
// stall
punpcklbw mm0, [mmx_blend4_zero]
psrlw mm1, 8
Pmaddwd mm0, mm1
mov eax, [xp]
add eax, [d_x]
mov ebx, [yp]
mov [xp], eax
add ebx, [d_y]
psrld mm0, 8
mov [yp], ebx
movq mm1, mm0
// empty
psrl mm1, 32
// empty
paddusb mm0, mm1
// empty
psubusb mm0, [mmx_fadeval]
// empty
movd ecx, mm0
mov [edi], cl
inc edi
dec edx
jnz myLoop1
mov outptr, edi
}
#endif
}
}
// adjust final (rightmost elem) part of seektab
seektab[0] += seektab[2];
seektab[1] += seektab[3];
}
}
done:
__asm emms;
}

View file

@ -0,0 +1,147 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by SVIS.RC
//
#define IDS_NULLSOFT_TINY_FULLSCREEN 0
#define IDS_DIRECTDRAWCREATE_FAILED 1
#define IDS_COULD_NOT_SET_EXCLUSIVE_FULLSCREEN 2
#define IDS_COULD_NOT_SET_DISPLAY_MODE 3
#define IDS_COULD_NOT_CREATE_PRIMARY_SURFACE 4
#define IDS_COULD_NOT_CREATE_RENDER_SURFACE 5
#define IDS_COULD_NOT_CREATE_PALETTE 6
#define IDS_COULD_NOT_SET_PALETTE 7
#define IDS_MMX_NOT_FOUND 8
#define IDS_ERROR 9
#define IDS_DIRECTDRAW_ERROR 10
#define IDS_SEXY_SCROLLING_VOICEPRINT 11
#define IDS_SPECTRUM_ANALYZER_VOICEPRINT 12
#define IDS_SPECTRUM_ANALYZER_OSCILLOSCOPE 13
#define IDS_RANDOM_INTELLIGENT_VISUALIZATION 14
#define IDS_CANNOT_GO_FULLSCREEN_WHEN_VIDEO_PLAYING 15
#define IDD_DIALOG1 101
#define IDR_MENU1 101
#define IDD_DIALOG2 102
#define IDC_SVM 1000
#define IDC_BPP 1001
#define IDC_SPEED 1002
#define IDC_AP1 1003
#define IDC_AP2 1004
#define IDC_AP3 1005
#define IDC_AP4 1006
#define IDC_AP5 1007
#define IDC_AP6 1008
#define IDC_VP1 1009
#define IDC_VP2 1010
#define IDC_VP3 1011
#define IDC_VP4 1012
#define IDC_VP5 1013
#define IDC_VP6 1014
#define IDC_DEFVP 1015
#define IDC_FALLOFF 1016
#define IDC_FALLOFF2 1017
#define IDC_TCOL 1018
#define IDC_BANDS 1018
#define IDC_VUSE 1019
#define IDC_DEFAP 1020
#define IDC_SCSCALE 1021
#define IDC_WIDTH 1084
#define IDC_HEIGHT 1085
#define IDC_DIZ 1086
#define IDC_FN 1087
#define IDC_BROWSSE 1088
#define IDC_CRIGHT 1089
#define IDC_CHECK1 1090
#define IDC_MODELIST 1091
#define IDC_SCOPE 1092
#define IDC_EDIT1 1092
#define IDC_EDIT2 1093
#define IDC_SLIDER1 1094
#define IDC_COPYRIGHT 1095
#define IDM_WVIS 40002
#define IDM_NOFADE 40004
#define IDM_NORMALFADE 40005
#define IDM_NORMALSCOPE 40008
#define IDM_SOLIDSCOPE 40009
#define IDM_QUIT 40010
#define IDM_NORMALANALYZER 40012
#define IDM_SOLIDANALYZER 40013
#define IDM_AF_FAST 40016
#define IDM_AF_FAST2 40017
#define IDM_AF_FAST3 40018
#define IDM_REFFAST 40019
#define IDM_REFMED 40020
#define IDM_REFSLOW 40021
#define IDM_FLOWERS 40022
#define IDM_CLEARFADE 40030
#define IDM_NORMALSCOPE_COLOR 40031
#define IDM_SOLIDSCOPE_COLOR 40032
#define IDM_NORMALANALYZER_COLOR 40033
#define IDM_SOLIDANALYZER_COLOR 40034
#define IDM_FLOWERS_COLOR 40035
#define IDM_FLOWCOMP_VLOW 40036
#define IDM_FLOWCOMP_LOW 40037
#define IDM_FLOWCOMP_LOWER 40038
#define IDM_FLOWCOMP_MID 40039
#define IDM_FLOWCOMP_HIGH 40040
#define IDM_SLOWERFADE 40041
#define IDM_SLOWFADE 40042
#define IDM_FASTERFADE 40043
#define IDM_FASTFADE 40044
#define IDM_NORMALSCOPE_COLOR_R 40045
#define IDM_SOLIDSCOPE_COLOR_R 40047
#define IDM_NORMALANALYZER_COLOR_R 40049
#define IDM_SOLIDANALYZER_COLOR_R 40050
#define IDM_FLOWERS_COLOR_R 40051
#define IDM_DOCK_INWINDOW 40052
#define IDM_DOCK_BOTTOM 40053
#define IDM_DOCK_TOP 40054
#define IDM_DOCK_LEFT 40055
#define IDM_DOCK_RIGHT 40056
#define IDM_DOCK_LILVIS 40057
#define IDM_DOCK_LILVIS_2 40058
#define IDM_FADE_BLUR 40059
#define IDM_PRE_LOAD 40061
#define IDM_PRE_SAVE 40062
#define IDM_COL_BG 40063
#define IDM_SPECRADAR 40064
#define IDM_SPECRADAR_COLOR 40065
#define IDM_SPECRADAR_COLOR_R 40066
#define IDM_VUSPIN_COLOR 40067
#define IDM_VUSPIN_COLOR_R 40068
#define IDM_VUSPIN 40069
#define IDM_FADE_NONE 40070
#define IDM_FADE_BLIT 40071
#define IDM_SPIN_LINE 40072
#define IDM_SPIN_TRI 40073
#define IDM_TIME 40074
#define IDM_TIME_LEFT 40076
#define IDM_TIME_CENTER 40077
#define IDM_TIME_RIGHT 40078
#define IDM_TIME_TOP 40079
#define IDM_TIME_MIDDLE 40080
#define IDM_TIME_BOTTOM 40081
#define IDM_TIME_COLOR 40082
#define IDM_FULLSCREEN 40084
#define IDM_FULLSCREEN_320X200 40085
#define IDM_FULLSCREEN_320X240 40086
#define IDM_FULLSCREEN_512X384 40087
#define IDM_FULLSCREEN_640x400 40088
#define IDM_FULLSCREEN_640x480 40089
#define IDM_FULLSCREEN_800X600 40090
#define IDM_OSCSTAR 40091
#define IDM_OSCSTAR_COLOR 40092
#define IDM_OSCSTAR_COLOR_R 40093
#define ID_BLEND_AVG 40094
#define ID_BLEND_ADD 40095
#define ID_BLEND_MAX 40096
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 109
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1091
#define _APS_NEXT_SYMED_VALUE 105
#endif
#endif

View file

@ -0,0 +1,200 @@
#include <windows.h>
#include <math.h>
#define M_PI 3.14159265358979323846
extern int (*warand)(void);
extern void line(unsigned char *fb, int X0, int Y0, int X1, int Y1, int w, int h);
static double sc_curtime;
static unsigned int sc_starttime;
static int __inline myftol(double d)
{
int a;
__asm
{
fld d
fistp a
mov eax, a
}
}
static void __doscope(int fx, int ipos, double i, double v, double &x, double &y, double &sc_tmp)
{
double r,d;
switch (fx)
{
case 0: x=2.0*(i-0.5); y=v*0.5; return;
case 1:
x=cos(i*M_PI*3.0+sc_curtime)*(0.5+v*0.2);
y=sin(i*M_PI*6.0+sc_curtime)*(0.5+v*0.2);
return;
case 2:
r=i*M_PI*128+sc_curtime;
x=cos(r/(64.0+32.0*cos(sc_curtime*M_PI)))*0.4+sin(r)*0.05;
y=sin(r/(64.0+32.0*cos(sc_curtime*M_PI)))*0.4+cos(r)*0.05;
return;
case 3:
r=M_PI*cos(sc_curtime*0.5)*2;
x=cos(r)*0.3+cos(i*M_PI*2)*v*0.5;
y=sin(r)*0.3+sin(i*M_PI*2)*v*0.5;
return;
case 4:
r=M_PI*cos(sc_curtime*0.5)*2;
x=cos(r)*0.3+cos(i*M_PI*2)*(1.0+v)*0.23;
y=sin(r*1.5)*0.3+sin(i*M_PI*2)*(1.0+v)*0.23;
return;
case 5:
y=2.0*(i-0.5);
x=v*0.5 + 0.4*cos(sc_curtime);
return;
case 6:
d=i+v*0.2;
r=sc_curtime+i*3.14159*4;
x=cos(r)*d*0.6;
y=sin(r)*d*0.6;
return;
case 7:
x=(i-0.5)*2.0;
y=0.25-0.5*fabs(sin(i*M_PI*4 + sc_curtime)) + v*0.2;
return;
case 8:
r=i*3.14159*2;
d=sin(r*3)+v*0.5;
x=cos(sc_curtime+r)*d;
y=sin(sc_curtime-r)*d;
return;
case 9:
x=2.0*(i-0.5);
y=v*v*v*0.7;
return;
case 10:
x=cos(i*8)*0.9*sin(sc_curtime);
y=sin(i*8)*0.5*v;
return;
case 11:
d=i-0.9;
sc_tmp=sc_tmp+v*0.1;
x=cos(sc_tmp)*d+sin(sc_tmp)*v+0.3;
y=sin(sc_tmp)*d-cos(sc_tmp)*v;
return;
case 12:
r=i*8;
x=cos(r)*0.3+sin(r*(3+cos(sc_curtime*0.5+i*3.0)))*0.2;
y=sin(r)*0.3+cos(r*(2+2*cos(sc_curtime*0.5+i*3.0)))*0.2;
return;
case 13:
x=v*0.3+sin(i*4*3.14159)*cos(sc_curtime)*0.4;
y=2.0*(i-0.5);
return;
case 14:
if (!(ipos&3)) x=y=0;
else
{
x=v;
y=(ipos&8)?1.0:-1.0;
if (ipos & 4)
{
sc_tmp=y;
y=x;
x=sc_tmp;
}
}
return;
case 15:
x=(ipos&1)?-1:1;
y=(ipos&30)?0:v;
return;
case 16:
r=ipos * 3.14159 * (0.3);
x=(0.3+v*0.1)*cos(r);
y=(0.3+v*0.1)*sin(r);
return;
}
}
//#define TEST_SCOPE 14
#define NUM_SC 17
static unsigned int start;
#define INTERVAL 5000
static int curfx[2]={0,NUM_SC},lastfx[2]={0,NUM_SC}, interval_l=INTERVAL;
static double fxblend, lastfxblend;
void drawscope(unsigned char *out, int w, int h, unsigned char *visdata)
{
double tmp1=0.0;
double tmp2=0.0;
double tmp3=0.0;
double tmp4=0.0;
int x;
int lx=0;
int ly=0;
double w2=w*65536.0/2.0;
double h2=h*65536.0/2.0;
if (!sc_starttime) sc_starttime=GetTickCount();
sc_curtime=(GetTickCount()-sc_curtime)/1000.0;
if (GetTickCount()>=start+INTERVAL)
{
lastfxblend=fxblend;
lastfx[0]=curfx[0];
lastfx[1]=curfx[1];
start=GetTickCount();
curfx[0]=warand()%NUM_SC;
curfx[1]=warand()%NUM_SC;
interval_l=2500+(warand()&8191);
if (interval_l > INTERVAL) interval_l=INTERVAL;
for (x = 0; x < 2; x ++)
if (curfx[x] == 14 || curfx[x] == 15) curfx[x]=warand()%NUM_SC;
fxblend=0.25+(warand()&511)/1023.0;
#ifdef TEST_SCOPE
curfx[0]=TEST_SCOPE;
lastfx[0]=curfx[0];
curfx[1]=NUM_SC;
lastfx[1]=NUM_SC;
fxblend=lastfxblend=0.0;
#endif
}
double weight=(double)(GetTickCount()-start)*(1.0/(double)(interval_l));
if (weight > 1.0) weight=1.0;
for (x = 0; x < 576; x ++)
{
int xp;
int yp;
double xof=0.0, yof=0.0;
double ix=x/576.0;
double iy=((visdata[x]^128)-128)/127.5;
__doscope(curfx[0],x,ix,iy,xof,yof,tmp1);
{
double xof2=0.0,yof2=0.0;
__doscope(curfx[1],x,ix,iy,xof2,yof2,tmp3);
xof=xof*(1.0-fxblend) + xof2*fxblend;
yof=yof*(1.0-fxblend) + yof2*fxblend;
}
{
double xof2=0.0, yof2=0.0;
__doscope(lastfx[0],x,ix,iy,xof2,yof2,tmp2);
{
double xof3=0.0,yof3=0.0;
__doscope(lastfx[1],x,ix,iy,xof3,yof3,tmp4);
xof2=xof2*(1.0-lastfxblend) + xof3*lastfxblend;
yof2=yof2*(1.0-lastfxblend) + yof3*lastfxblend;
}
xof=xof*weight + xof2*(1.0-weight);
yof=yof*weight + yof2*(1.0-weight);
}
xp = myftol(xof * w2 + w2);
yp = myftol(yof * h2 + h2);
if (x) line(out,lx,ly,xp,yp,w,h);
lx=xp;
ly=yp;
}
}

View file

@ -0,0 +1,318 @@
#include <windows.h>
#include <commctrl.h>
#include <ddraw.h>
#include <math.h>
#include "../Winamp/wa_ipc.h"
#include "resource.h"
#include "../Agave/Language/api_language.h"
#include <api/service/waServiceFactory.h>
#include "dd.h"
#include "../winamp/vis.h"
int (*warand)(void)=0;
extern wchar_t szAppName[];
extern void init_inifile(struct winampVisModule *this_mod);
extern wchar_t *ini_file;
static int g_width=640, g_height=480;
static int g_divx=16, g_divy=12, g_fadeout=2;
static C_DD g_dd;
extern HWND g_hwnd,hwndParent;
static int running;
int g_minflag;
extern api_service *WASABI_API_SVC;
void do_min(HWND hwnd)
{
g_minflag=!IsIconic(hwnd);
if (g_minflag)
{
ShowWindow(hwnd,SW_MINIMIZE);
Sleep(100);
}
}
void do_unmin(HWND hwnd)
{
if (g_minflag)
{
g_minflag=0;
ShowWindow(hwnd,SW_RESTORE);
SetForegroundWindow(hwnd);
}
}
static void readconfig(struct winampVisModule *this_mod)
{
init_inifile(this_mod);
g_width=GetPrivateProfileIntW(szAppName, L"sdwidth", 640, ini_file);
g_height=GetPrivateProfileIntW(szAppName, L"sdheight", 480, ini_file);
g_divx=GetPrivateProfileIntW(szAppName, L"sdx", 16, ini_file);
g_divy=GetPrivateProfileIntW(szAppName, L"sdy", 12, ini_file);
g_fadeout=GetPrivateProfileIntW(szAppName, L"sdfadeout", 2, ini_file);
}
extern void drawscope(unsigned char *out, int w, int h, unsigned char *visdata);
extern unsigned char *getnewpalette();
extern void moveframe_init(int w, int h, int divx, int divy, int fadeval);
extern void moveframe(unsigned char *in, unsigned char *out, unsigned char *visdata);
extern void moveframe_quit();
static void writeInt(wchar_t *name, int value)
{
wchar_t buf[32] = {0};
wsprintfW(buf, L"%d", value);
WritePrivateProfileStringW(szAppName, name, buf, ini_file);
}
static HRESULT WINAPI _cb(LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext)
{
if (lpDDSurfaceDesc->ddpfPixelFormat.dwRGBBitCount==8)
{
wchar_t s[32] = {0};
wsprintfW(s, L"%dx%d", lpDDSurfaceDesc->dwWidth, lpDDSurfaceDesc->dwHeight);
LRESULT idx=SendMessageW((HWND)lpContext,CB_ADDSTRING,0,(LPARAM)s);
SendMessage((HWND)lpContext,CB_SETITEMDATA,idx,MAKELONG(lpDDSurfaceDesc->dwWidth,lpDDSurfaceDesc->dwHeight));
if ((int)lpDDSurfaceDesc->dwWidth == g_width && (int)lpDDSurfaceDesc->dwHeight == g_height)
SendMessage((HWND)lpContext,CB_SETCURSEL,idx,0);
}
return DDENUMRET_OK;
}
BOOL IsDirectMouseWheelMessage(const UINT uMsg)
{
static UINT WINAMP_WM_DIRECT_MOUSE_WHEEL = WM_NULL;
if (WM_NULL == WINAMP_WM_DIRECT_MOUSE_WHEEL)
{
WINAMP_WM_DIRECT_MOUSE_WHEEL = RegisterWindowMessageW(L"WINAMP_WM_DIRECT_MOUSE_WHEEL");
if (WM_NULL == WINAMP_WM_DIRECT_MOUSE_WHEEL)
return FALSE;
}
return (WINAMP_WM_DIRECT_MOUSE_WHEEL == uMsg);
}
HWND ActiveChildWindowFromPoint(HWND hwnd, POINTS cursor_s, const int *controls, size_t controlsCount)
{
POINT pt;
POINTSTOPOINT(pt, cursor_s);
while(controlsCount--)
{
RECT controlRect;
HWND controlWindow = GetDlgItem(hwnd, controls[controlsCount]);
if (NULL != controlWindow &&
FALSE != GetClientRect(controlWindow, &controlRect))
{
MapWindowPoints(controlWindow, HWND_DESKTOP, (POINT*)&controlRect, 2);
if (FALSE != PtInRect(&controlRect, pt))
{
unsigned long windowStyle;
windowStyle = (unsigned long)GetWindowLongPtrW(controlWindow, GWL_STYLE);
if(WS_VISIBLE == ((WS_VISIBLE | WS_DISABLED) & windowStyle))
return controlWindow;
break;
}
}
}
return NULL;
}
BOOL DirectMouseWheel_ProcessDialogMessage(HWND hwnd, unsigned int uMsg, WPARAM wParam, LPARAM lParam)
{
if (FALSE != IsDirectMouseWheelMessage(uMsg))
{
const int controls[] =
{
IDC_BANDS,
IDC_VUSE,
IDC_FALLOFF,
IDC_FALLOFF2,
IDC_SCSCALE,
IDC_SLIDER1,
};
HWND targetWindow = ActiveChildWindowFromPoint(hwnd, MAKEPOINTS(lParam), controls, ARRAYSIZE(controls));
if (NULL != targetWindow)
{
SendMessage(targetWindow, WM_MOUSEWHEEL, wParam, lParam);
SetWindowLongPtrW(hwnd, DWLP_MSGRESULT, (long)TRUE);
return TRUE;
}
}
return FALSE;
}
static INT_PTR CALLBACK dlgProc1(HWND hwndDlg, UINT uMsg, WPARAM wParam,LPARAM lParam)
{
if (uMsg == WM_INITDIALOG)
{
LPDIRECTDRAW dd;
if (DirectDrawCreate(NULL,&dd,NULL) == DD_OK)
{
IDirectDraw_EnumDisplayModes(dd,0,NULL,GetDlgItem(hwndDlg,IDC_MODELIST),_cb);
IDirectDraw_Release(dd);
}
SetDlgItemInt(hwndDlg,IDC_EDIT1,g_divx,0);
SetDlgItemInt(hwndDlg,IDC_EDIT2,g_divy,0);
SendDlgItemMessage(hwndDlg,IDC_SLIDER1,TBM_SETRANGE,0,MAKELONG(0,32));
SendDlgItemMessage(hwndDlg,IDC_SLIDER1,TBM_SETPOS,1,g_fadeout);
return 1;
}
if (uMsg == WM_CLOSE || (uMsg == WM_COMMAND && (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)))
{
BOOL t;
g_divx=GetDlgItemInt(hwndDlg,IDC_EDIT1,&t,0);
g_divy=GetDlgItemInt(hwndDlg,IDC_EDIT2,&t,0);
g_fadeout = SendDlgItemMessage(hwndDlg,IDC_SLIDER1,TBM_GETPOS,0,0);
EndDialog(hwndDlg,IDOK);
}
if (uMsg == WM_COMMAND)
{
if (LOWORD(wParam) == IDC_MODELIST && HIWORD(wParam) == CBN_SELCHANGE)
{
DWORD n=SendDlgItemMessage(hwndDlg,IDC_MODELIST,CB_GETCURSEL,0,0);
if (n != CB_ERR)
{
n=SendDlgItemMessage(hwndDlg,IDC_MODELIST,CB_GETITEMDATA,n,0);
if (n != CB_ERR)
{
g_width=LOWORD(n);
g_height=HIWORD(n);
}
}
}
}
if (FALSE != DirectMouseWheel_ProcessDialogMessage(hwndDlg, uMsg, wParam, lParam))
{
return TRUE;
}
return 0;
}
void sd_config(struct winampVisModule *this_mod)
{
if (running) return;
running=1;
readconfig(this_mod);
// loader so that we can get the localisation service api for use
WASABI_API_SVC = (api_service*)SendMessage(this_mod->hwndParent, WM_WA_IPC, 0, IPC_GET_API_SERVICE);
if (WASABI_API_SVC == (api_service*)1) WASABI_API_SVC = NULL;
waServiceFactory *sf = WASABI_API_SVC->service_getServiceByGuid(languageApiGUID);
if (sf) WASABI_API_LNG = reinterpret_cast<api_language*>(sf->getInterface());
// need to have this initialised before we try to do anything with localisation features
WASABI_API_START_LANG(this_mod->hDllInstance,VisNFSFLangGUID);
WASABI_API_DIALOGBOXW(IDD_DIALOG2,this_mod->hwndParent,dlgProc1);
writeInt(L"sdwidth", g_width);
writeInt(L"sdheight", g_height);
writeInt(L"sdx", g_divx);
writeInt(L"sdy", g_divy);
writeInt(L"sdfadeout", g_fadeout);
running=0;
}
static int __inline is_mmx(void) {
_asm {
sub eax, eax
sub edx, edx
inc eax
_emit 0x0f
_emit 0xa2
test eax, eax
jz noMMX
and edx, 0x800000
mov eax, edx
noMMX:
sub ebx, ebx // make sure compiler knows ebx and ecx are blown.
sub ecx, ecx
}
}
int sd_init(struct winampVisModule *this_mod)
{
if (running) return 1;
running=1;
if (!is_mmx())
{
char err[16];
running=0;
MessageBox(this_mod->hwndParent,WASABI_API_LNGSTRING(IDS_MMX_NOT_FOUND),
WASABI_API_LNGSTRING_BUF(IDS_ERROR,err,16),MB_OK);
return 1;
}
readconfig(this_mod);
warand = (int (*)())SendMessage(this_mod->hwndParent, WM_WA_IPC, 0, IPC_GET_RANDFUNC);
extern void initwindow(struct winampVisModule *this_mod,int,int);
initwindow(this_mod,g_width,g_height);
if (!g_hwnd)
{
running=0;
return 1;
}
do_min(this_mod->hwndParent);
SetForegroundWindow(g_hwnd);
char *t=g_dd.open(g_width,g_height,g_hwnd);
if (t)
{
char error[32];
DestroyWindow(g_hwnd);
g_hwnd=NULL;
do_unmin(this_mod->hwndParent);
UnregisterClassW(szAppName,this_mod->hDllInstance);
MessageBox(this_mod->hwndParent,t,WASABI_API_LNGSTRING_BUF(IDS_DIRECTDRAW_ERROR,error,32),MB_OK);
running=0;
return 1;
}
moveframe_init(g_width,g_height,g_divx,g_divy,g_fadeout);
g_dd.setpalette(getnewpalette(),5000);
return 0;
}
// render function. This draws a frame. Returns 0 if successful, 1 if visualization should end.
int sd_render(struct winampVisModule *this_mod)
{
unsigned char *in, *out;
if (g_dd.palette_fadeleft() < -500)
{
g_dd.setpalette(getnewpalette(),3500);
}
if (!g_dd.lock(&in,&out)) return 0;
moveframe(in,out,this_mod->waveformData[0]);
drawscope(out,g_width,g_height,this_mod->waveformData[0]);
g_dd.unlock();
return 0;
}
// cleanup (opposite of init()). Destroys the window, unregisters the window class
void sd_quit(struct winampVisModule *this_mod)
{
g_dd.close();
moveframe_quit();
ShowCursor(TRUE);
if (g_hwnd) DestroyWindow(g_hwnd);
g_hwnd=0;
UnregisterClassW(szAppName,this_mod->hDllInstance);
running=0;
do_unmin(this_mod->hwndParent);
}

View file

@ -0,0 +1,54 @@
Nullsoft TinyVis 2001 v2.02 - May 21, 2001
Copyright (C) 1997-2001, Nullsoft Inc.
======================================================================
TinyVis is a Winamp visualization plug-in.
Currently four different modes are available:
- Random Intelligent Visualization
Creates smooth, morphing randomized graphics.
- Sexy Scrolling Voiceprint
Scrolls a voiceprint across your screen.
- Spectrum Analyzer + Voiceprint
Creates a static voiceprint, and displays a spectrum analyzer
- Spectrum Analyzer + Oscilliscope
Displays a spectrum analyzer and oscilliscope.
TinyVis is very small (the plug-in DLL is merely 27kb).
TinyVis requires:
- Windows 95, 98, ME, NT 4.0, 2000, or later.
- DirectX 3 or later.
- Pentium Processor; Pentium II or Athlon recommended.
Note: Random Intelligent Visualization requires a processor
with MMX technology.
Random Intelligent Visualization features:
- 13 waveform renderers that morph from one to another
- 23 dynamic movement effects that are combined and morphed
- randomly generated palettes that are continually faded
- fast 8 bit per pixel MMX rendering
======================================================================
License:
Redistribution of this software is permitted as long as it is in
the original unmodified installer form that includes this readme
and license.
Use of this software for display, private or public is permitted
with no restrictions, though proper credit would be appreciated.
You may not reverse engineer or otherwise disassemble this
software.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE

View file

@ -0,0 +1,39 @@
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
#include "../../../Winamp/buildType.h"
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,16,0,0
PRODUCTVERSION WINAMP_PRODUCTVER
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "CompanyName", "Winamp SA"
VALUE "FileDescription", "Winamp Visualization Plug-in"
VALUE "FileVersion", "2,16,0,0"
VALUE "InternalName", "Nullsoft Tiny Fullscreen"
VALUE "LegalCopyright", "Copyright © 2001-2023 Winamp SA"
VALUE "LegalTrademarks", "Nullsoft and Winamp are trademarks of Winamp SA"
VALUE "OriginalFilename", "vis_nsfs.dll"
VALUE "ProductName", "Winamp"
VALUE "ProductVersion", STR_WINAMP_PRODUCTVER
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END

View file

@ -0,0 +1,194 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_DIALOG1 DIALOGEX 0, 0, 179, 231
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
GROUPBOX "Voiceprint",IDC_STATIC,7,7,164,69
CONTROL "",IDC_VP1,"Button",BS_OWNERDRAW | WS_TABSTOP,13,19,14,13
CONTROL "",IDC_VP2,"Button",BS_OWNERDRAW | WS_TABSTOP,29,19,14,13
CONTROL "",IDC_VP3,"Button",BS_OWNERDRAW | WS_TABSTOP,45,19,14,13
CONTROL "",IDC_VP4,"Button",BS_OWNERDRAW | WS_TABSTOP,61,19,14,13
CONTROL "",IDC_VP5,"Button",BS_OWNERDRAW | WS_TABSTOP,77,19,14,13
PUSHBUTTON "Defaults",IDC_DEFVP,126,19,39,13
LTEXT "Bands",IDC_STATIC,14,39,21,8
CONTROL "Slider1",IDC_BANDS,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,11,48,75,11
LTEXT "Vertical use",IDC_STATIC,92,39,38,8
CONTROL "Slider1",IDC_VUSE,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,89,47,75,11
LTEXT "40",IDC_STATIC,13,61,9,8
LTEXT "512",IDC_STATIC,72,61,13,8
LTEXT "1%",IDC_STATIC,93,61,12,8
LTEXT "100%",IDC_STATIC,146,61,20,8
GROUPBOX "Analyzer",IDC_STATIC,7,80,164,72
CONTROL "",IDC_AP1,"Button",BS_OWNERDRAW | WS_TABSTOP,13,94,14,13
CONTROL "",IDC_AP2,"Button",BS_OWNERDRAW | WS_TABSTOP,29,94,14,13
CONTROL "",IDC_AP3,"Button",BS_OWNERDRAW | WS_TABSTOP,45,94,14,13
CONTROL "",IDC_AP4,"Button",BS_OWNERDRAW | WS_TABSTOP,61,94,14,13
CONTROL "",IDC_AP5,"Button",BS_OWNERDRAW | WS_TABSTOP,77,94,14,13
CONTROL "",IDC_AP6,"Button",BS_OWNERDRAW | WS_TABSTOP,101,94,14,13
PUSHBUTTON "Defaults",IDC_DEFAP,126,94,39,13
LTEXT "Falloff",IDC_STATIC,14,114,20,8
CONTROL "Slider1",IDC_FALLOFF,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,13,124,75,11
LTEXT "Slow",IDC_STATIC,15,137,16,8
LTEXT "Fast",IDC_STATIC,71,137,14,8
CONTROL "Peak Hold",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,90,114,49,10
CONTROL "Slider1",IDC_FALLOFF2,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,94,124,75,11
LTEXT "Slow",IDC_STATIC,95,137,16,8
LTEXT "Fast",IDC_STATIC,152,137,14,8
GROUPBOX "Scope Color",IDC_STATIC,7,156,57,35
CONTROL "",IDC_VP6,"Button",BS_OWNERDRAW | WS_TABSTOP,14,170,44,13
GROUPBOX "Scope Scaling",IDC_STATIC,70,156,102,35
CONTROL "Slider1",IDC_SCSCALE,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,76,167,88,11
LTEXT "1%",IDC_STATIC,76,179,12,8
LTEXT "100%",IDC_STATIC,144,179,20,8
CONTROL "Scope on scrolling voiceprint",IDC_SCOPE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,196,107,10
DEFPUSHBUTTON "OK",IDOK,7,211,50,13
COMBOBOX IDC_MODELIST,89,211,83,139,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
END
IDD_DIALOG2 DIALOGEX 0, 0, 155, 119
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Random Intelligent Visualization"
FONT 8, "MS Shell Dlg", 0, 0, 0x0
BEGIN
LTEXT "Video mode:",IDC_STATIC,5,8,40,8
COMBOBOX IDC_MODELIST,58,6,90,139,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Interpolation grid size:",IDC_STATIC,5,26,72,8
EDITTEXT IDC_EDIT1,86,24,25,12,ES_AUTOHSCROLL
LTEXT "x",IDC_STATIC,115,26,8,8
EDITTEXT IDC_EDIT2,123,24,25,12,ES_AUTOHSCROLL
LTEXT "16x12-32x24 recommended\n16x12 is default",IDC_STATIC,5,41,143,16,WS_DISABLED
GROUPBOX "Fade Out",IDC_STATIC,5,60,143,37
CONTROL "Slider1",IDC_SLIDER1,"msctls_trackbar32",TBS_AUTOTICKS | WS_TABSTOP,12,70,129,10
LTEXT "slow",IDC_STATIC,12,83,15,8
LTEXT "fast",IDC_STATIC,129,83,12,8
DEFPUSHBUTTON "Close",IDOK,5,102,50,13
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
IDD_DIALOG1, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 172
TOPMARGIN, 7
BOTTOMMARGIN, 224
END
IDD_DIALOG2, DIALOG
BEGIN
LEFTMARGIN, 5
RIGHTMARGIN, 148
TOPMARGIN, 6
BOTTOMMARGIN, 115
END
END
#endif // APSTUDIO_INVOKED
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE
BEGIN
"#include ""version.rc2""\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// String Table
//
STRINGTABLE
BEGIN
65535 "{858FBF71-9878-4d86-BFDD-8FEA8361238C}"
END
STRINGTABLE
BEGIN
IDS_NULLSOFT_TINY_FULLSCREEN "Nullsoft Tiny Fullscreen"
IDS_DIRECTDRAWCREATE_FAILED "DirectDrawCreate() failed"
IDS_COULD_NOT_SET_EXCLUSIVE_FULLSCREEN
"Could not set exclusive fullscreen"
IDS_COULD_NOT_SET_DISPLAY_MODE "Could not set display mode"
IDS_COULD_NOT_CREATE_PRIMARY_SURFACE "Could not create primary surface"
IDS_COULD_NOT_CREATE_RENDER_SURFACE "Could not create render surfaces"
IDS_COULD_NOT_CREATE_PALETTE "Could not create palette"
IDS_COULD_NOT_SET_PALETTE "Could not set palette"
IDS_MMX_NOT_FOUND "MMX technology not found"
IDS_ERROR "Error"
IDS_DIRECTDRAW_ERROR "DirectDraw Error"
IDS_SEXY_SCROLLING_VOICEPRINT "Sexy Scrolling Voiceprint"
IDS_SPECTRUM_ANALYZER_VOICEPRINT "Spectrum Analyzer + Voiceprint"
IDS_SPECTRUM_ANALYZER_OSCILLOSCOPE "Spectrum Analyzer + Oscilliscope"
IDS_RANDOM_INTELLIGENT_VISUALIZATION "Random Intelligent Visualization"
IDS_CANNOT_GO_FULLSCREEN_WHEN_VIDEO_PLAYING
"Cannot go fullscreen when video is playing"
END
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#include "version.rc2"
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View file

@ -0,0 +1,24 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29806.167
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vis_nsfs", "vis_nsfs.vcxproj", "{B6E33AC6-F7BE-4671-9E73-38E58C653331}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B6E33AC6-F7BE-4671-9E73-38E58C653331}.Debug|Win32.ActiveCfg = Debug|Win32
{B6E33AC6-F7BE-4671-9E73-38E58C653331}.Debug|Win32.Build.0 = Debug|Win32
{B6E33AC6-F7BE-4671-9E73-38E58C653331}.Release|Win32.ActiveCfg = Release|Win32
{B6E33AC6-F7BE-4671-9E73-38E58C653331}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {65AF4E5B-4546-4E91-BC2D-54C5C9EC8346}
EndGlobalSection
EndGlobal

View file

@ -0,0 +1,372 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{B6E33AC6-F7BE-4671-9E73-38E58C653331}</ProjectGuid>
<RootNamespace>vis_nsfs</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
<IncludePath>$(IncludePath)</IncludePath>
<LibraryPath>$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<IncludePath>$(IncludePath)</IncludePath>
<LibraryPath>$(LibraryPath)</LibraryPath>
<LinkIncremental>true</LinkIncremental>
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
<IncludePath>$(IncludePath)</IncludePath>
<LibraryPath>$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<IncludePath>$(IncludePath)</IncludePath>
<LibraryPath>$(LibraryPath)</LibraryPath>
<LinkIncremental>false</LinkIncremental>
<OutDir>$(PlatformShortName)_$(Configuration)\</OutDir>
<IntDir>$(PlatformShortName)_$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Label="Vcpkg">
<VcpkgEnableManifest>true</VcpkgEnableManifest>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<VcpkgInstalledDir>..\..\..\..\external_dependencies\vcpkg</VcpkgInstalledDir>
<VcpkgUseStatic>true</VcpkgUseStatic>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<VcpkgInstalledDir>..\..\..\external_dependencies\vcpkg</VcpkgInstalledDir>
<VcpkgUseStatic>true</VcpkgUseStatic>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<VcpkgInstalledDir>..\..\..\..\external_dependencies\vcpkg</VcpkgInstalledDir>
<VcpkgUseStatic>true</VcpkgUseStatic>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<VcpkgInstalledDir>..\..\..\..\external_dependencies\vcpkg</VcpkgInstalledDir>
<VcpkgUseStatic>true</VcpkgUseStatic>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;VIS_NSFS_EXPORTS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AssemblerListingLocation>$(intDir)</AssemblerListingLocation>
<ObjectFileName>$(intDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>ddraw.lib;odbc32.lib;odbccp32.lib;vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>xcopy /Y /D $(OutDir)*.dll ..\..\..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\ </Command>
<Message>Post build event: 'xcopy /Y /D $(OutDir)*.dll ..\..\..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\'</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;VIS_NSFS_EXPORTS;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AssemblerListingLocation>$(intDir)</AssemblerListingLocation>
<ObjectFileName>$(intDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>ddraw.lib;odbc32.lib;odbccp32.lib;vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>xcopy /Y /D $(OutDir)*.dll ..\..\..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\ </Command>
<Message>Post build event: 'xcopy /Y /D $(OutDir)*.dll ..\..\..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\'</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MinSpace</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\..\..\Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;VIS_NSFS_EXPORTS;USE_VIS_HDR_HWND;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>$(intDir)</AssemblerListingLocation>
<ObjectFileName>$(intDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>ddraw.lib;odbc32.lib;odbccp32.lib;vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(IntDir)$(TargetName).map</MapFileName>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<TargetMachine>MachineX86</TargetMachine>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<GenerateDebugInformation>false</GenerateDebugInformation>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>xcopy /Y /D $(OutDir)*.dll ..\..\..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\ </Command>
<Message>Post build event: 'xcopy /Y /D $(OutDir)*.dll ..\..\..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\'</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<Optimization>MinSpace</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<OmitFramePointers>true</OmitFramePointers>
<AdditionalIncludeDirectories>..\..\..\Wasabi;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;_USRDLL;VIS_NSFS_EXPORTS;USE_VIS_HDR_HWND;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<AssemblerListingLocation>$(intDir)</AssemblerListingLocation>
<ObjectFileName>$(intDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DisableSpecificWarnings>4996;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<AdditionalDependencies>ddraw.lib;odbc32.lib;odbccp32.lib;vfw32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(TargetName).dll</OutputFile>
<ProgramDatabaseFile>$(IntDir)$(TargetName).pdb</ProgramDatabaseFile>
<GenerateMapFile>true</GenerateMapFile>
<MapFileName>$(IntDir)$(TargetName).map</MapFileName>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<ImportLibrary>$(IntDir)$(TargetName).lib</ImportLibrary>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
<GenerateDebugInformation>false</GenerateDebugInformation>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent>
<Command>xcopy /Y /D $(OutDir)*.dll ..\..\..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\ </Command>
<Message>Post build event: 'xcopy /Y /D $(OutDir)*.dll ..\..\..\..\..\Winamp_$(PlatformShortName)_$(Configuration)\Plugins\'</Message>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="ddraw.cpp">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="linedraw.cpp">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="makepal.cpp">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="moveframe.cpp">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="scope.cpp">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="shitdrop.cpp">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="Svis.cpp">
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Disabled</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Disabled</Optimization>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN32;_DEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">EnableFastChecks</BasicRuntimeChecks>
<BasicRuntimeChecks Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">EnableFastChecks</BasicRuntimeChecks>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">WIN32;NDEBUG;_WINDOWS;_MBCS;_USRDLL;VIS_NSFS_EXPORTS</PreprocessorDefinitions>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\Winamp\VIS.H" />
<ClInclude Include="dd.h" />
<ClInclude Include="RESOURCE.H" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="vis_nsfs.rc" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Wasabi\Wasabi.vcxproj">
<Project>{3e0bfa8a-b86a-42e9-a33f-ec294f823f7f}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View file

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="Svis.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="ddraw.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="linedraw.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="makepal.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="moveframe.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="scope.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="shitdrop.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="dd.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="RESOURCE.H">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\Winamp\VIS.H">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="Header Files">
<UniqueIdentifier>{6612c4d3-8cd8-41e3-a815-5ea40db20bad}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files">
<UniqueIdentifier>{401b2fd2-fdeb-45a3-9cc0-6b828bee4324}</UniqueIdentifier>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{f8cac13f-b9bd-49c4-86fe-b8f26763cf04}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="vis_nsfs.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>