mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-03-01 04:55:03 +00:00
kill -sdlvis; can't even find anything about it on google. ancient code.
This commit is contained in:
@ -1,36 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>org.projectM.projectMvis</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>projectMvis</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>projectM.icns</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>projectMvis</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.95</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.95</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>projectMvis 0.95, (c)2004 projectM Team</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string>projectMvis 0.95, (c)2004 projectM Team</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright (c)2004 projectM Team</string>
|
||||
<key>LSRequiresCarbon</key>
|
||||
<false/>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
@ -1,54 +0,0 @@
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
SUBDIRS=
|
||||
RANLIB=ranlib
|
||||
INCLUDES=-I. -I.. -I../projectm -I/usr/include/xmms -I/usr/include/glib-1.2 -I/usr/lib/glib/include -DHAVE_OPENGL -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/include/SDL
|
||||
DEFINES= -DLINUX -DHAVE_OPENGL -DHAVE_CONFIG_H -D_THREAD_SAFE
|
||||
CFLAGS=-O2
|
||||
#CFLAGS=-g
|
||||
LIBRARIES= -L/usr/lib -lglib -L/usr/lib -lSDL -lGL -lGLU
|
||||
|
||||
LD_FLAGS=-lprojectM -L../projectM -L/usr/local/lib $(LIBRARIES)
|
||||
|
||||
SRCS=\
|
||||
projectMvis.cc
|
||||
OBJS=$(SRCS:.c=.o)
|
||||
|
||||
.SUFFIXES: .c
|
||||
|
||||
all: projectMvis
|
||||
|
||||
### Relinks the executable
|
||||
projectMvis: $(OBJS)
|
||||
rm -f projectMvis
|
||||
$(CC) -o projectMvis $(OBJS) $(LD_FLAGS)
|
||||
|
||||
|
||||
$(LIB_TOP):
|
||||
@( if [ ! -d $(LIB_TOP) ]; then \
|
||||
( mkdir $(LIB_TOP) ) \
|
||||
fi )
|
||||
|
||||
$(OBJS): %.o: %.c
|
||||
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $*.c -o $*.o
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f projectMvis
|
||||
|
||||
distcln: cln
|
||||
rm -f config.log
|
||||
rm -f config.cache
|
||||
rm -f config.status
|
||||
|
||||
install:
|
||||
mkdir -p /etc/projectM/fonts
|
||||
mkdir -p /etc/projectM/presets
|
||||
cp projectMvis /usr/local/bin/projectMvis
|
||||
cp -r ../../fonts /etc/projectM
|
||||
cp -r ../../presets_projectM /etc/projectM
|
||||
chmod -R 755 /etc/projectM
|
||||
chmod -R 777 /etc/projectM/presets
|
||||
|
||||
@ -1,20 +0,0 @@
|
||||
#
|
||||
# projectM -- Milkdrop-esque visualisation SDK
|
||||
# Copyright (C)2003-2007 projectM Team
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
# See 'LICENSE.txt' included within this release
|
||||
|
||||
clean:
|
||||
@ -1,79 +0,0 @@
|
||||
#
|
||||
# projectM -- Milkdrop-esque visualisation SDK
|
||||
# Copyright (C)2003-2004 projectM Team
|
||||
#
|
||||
# This library is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Lesser General Public
|
||||
# License as published by the Free Software Foundation; either
|
||||
# version 2.1 of the License, or (at your option) any later version.
|
||||
#
|
||||
# This library is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this library; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
# See 'LICENSE.txt' included within this release
|
||||
|
||||
SUBDIRS=
|
||||
RANLIB=ranlib
|
||||
|
||||
INCLUDES=-I. -I.. -I../projectM -I../include -I/usr/local/include \
|
||||
-I/System/Library/Frameworks/AGL.framework/Headers \
|
||||
-I/System/Library/Frameworks/OpenGL.framework/Headers \
|
||||
-I/Developer/Headers/FlatCarbon
|
||||
|
||||
DEFINES= -DMACOS -DHAVE_OPENGL -DHAVE_CONFIG_H -D_THREAD_SAFE -DDEBUG
|
||||
CFLAGS=-O2
|
||||
#CFLAGS=-g
|
||||
LIBRARIES= -framework QuickTime -framework IOKit -framework Cocoa -framework Carbon -framework AGL -framework OpenGL -lSDL -lSDLmain
|
||||
#LD_FLAGS=-bundle -L/usr/local/lib $(LIBRARIES)
|
||||
LD_FLAGS=-lprojectm -L../projectm -L/usr/local/lib $(LIBRARIES)
|
||||
|
||||
SRCS=\
|
||||
projectMvis.c
|
||||
OBJS=$(SRCS:.c=.o)
|
||||
|
||||
.SUFFIXES: .c
|
||||
|
||||
all: projectMvis
|
||||
|
||||
### Relinks the executable
|
||||
projectMvis: $(OBJS)
|
||||
rm -f projectMvis
|
||||
$(CC) -o projectMvis $(OBJS) $(LD_FLAGS)
|
||||
/Developer/Tools/Rez -t APPL Carbon.r -o projectMvis
|
||||
|
||||
$(LIB_TOP):
|
||||
@( if [ ! -d $(LIB_TOP) ]; then \
|
||||
( mkdir $(LIB_TOP) ) \
|
||||
fi )
|
||||
|
||||
$(OBJS): %.o: %.c
|
||||
$(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $*.c -o $*.o
|
||||
|
||||
clean:
|
||||
rm -f *.o
|
||||
rm -f projectMvis
|
||||
|
||||
distcln: cln
|
||||
rm -f config.log
|
||||
rm -f config.cache
|
||||
rm -f config.status
|
||||
|
||||
bundle: projectMvis
|
||||
rm -rf projectMvis.app
|
||||
mkdir -p projectMvis.app/Contents
|
||||
mkdir -p projectMvis.app/Contents/MacOS
|
||||
mkdir -p projectMvis.app/Contents/Resources
|
||||
cp projectMvis projectMvis.app/Contents/MacOS/projectMvis
|
||||
cp Info.plist projectMvis.app/Contents
|
||||
cp projectM.icns projectMvis.app/Contents/Resources/projectM.icns
|
||||
cp -r ../../fonts projectMvis.app/Contents/Resources
|
||||
cp -r ../../presets projectMvis.app/Contents/Resources
|
||||
|
||||
image: bundle
|
||||
rm -f projectMvis.dmg
|
||||
hdiutil create -srcfolder projectMvis.app projectMvis.dmg
|
||||
@ -1 +0,0 @@
|
||||
hvplhook
|
||||
Binary file not shown.
@ -1,293 +0,0 @@
|
||||
/**
|
||||
* projectM -- Milkdrop-esque visualisation SDK
|
||||
* Copyright (C)2003-2004 projectM Team
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* See 'LICENSE.txt' included within this release
|
||||
*
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
#include <projectM.hpp>
|
||||
#include <sdltoprojectM.hpp>
|
||||
|
||||
#ifdef DEBUG
|
||||
FILE *debugFile = NULL;
|
||||
#endif
|
||||
|
||||
projectM *globalPM = NULL;
|
||||
|
||||
int dumpFrame = 0;
|
||||
int frameNumber = 0;
|
||||
GLubyte *fbuffer = NULL;
|
||||
|
||||
extern void addPCM16(short [2][512]);
|
||||
|
||||
void renderLoop( projectM *pm ) {
|
||||
|
||||
int i;
|
||||
int x, y;
|
||||
int index;
|
||||
short pcm_data[2][512];
|
||||
|
||||
while ( 1 ) {
|
||||
projectMEvent evt;
|
||||
projectMKeycode key;
|
||||
projectMModifier mod;
|
||||
|
||||
/** Process SDL events */
|
||||
SDL_Event event;
|
||||
while ( SDL_PollEvent( &event ) ) {
|
||||
/** Translate into projectM codes and process */
|
||||
evt = sdl2pmEvent( event );
|
||||
key = sdl2pmKeycode( event.key.keysym.sym );
|
||||
mod = sdl2pmModifier( event.key.keysym.mod );
|
||||
if ( evt == PROJECTM_KEYDOWN ) {
|
||||
pm->key_handler( evt, key, mod );
|
||||
}
|
||||
}
|
||||
|
||||
/** Produce some fake PCM data to stuff into projectM */
|
||||
if ( pm->count % 5 == 0 ) {
|
||||
for ( i = 0 ; i < 512 ; i++ ) {
|
||||
pcm_data[0][i] = 0;
|
||||
pcm_data[1][i] = 0;
|
||||
}
|
||||
} else {
|
||||
for ( i = 0 ; i < 512 ; i++ ) {
|
||||
if ( i % 2 == 0 ) {
|
||||
pcm_data[0][i] = (float)( rand() / ( (float)RAND_MAX ) * (pow(2,14) ) );
|
||||
pcm_data[1][i] = (float)( rand() / ( (float)RAND_MAX ) * (pow(2,14) ) );
|
||||
} else {
|
||||
pcm_data[0][i] = (float)( rand() / ( (float)RAND_MAX ) * (pow(2,14) ) );
|
||||
pcm_data[1][i] = (float)( rand() / ( (float)RAND_MAX ) * (pow(2,14) ) );
|
||||
}
|
||||
if ( i % 2 == 1 ) {
|
||||
pcm_data[0][i] = -pcm_data[0][i];
|
||||
pcm_data[1][i] = -pcm_data[1][i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Add the waveform data */
|
||||
//addPCM16( pcm_data );
|
||||
|
||||
/** Render the new frame */
|
||||
pm->renderFrame();
|
||||
|
||||
if ( dumpFrame ) {
|
||||
char fname[1024];
|
||||
FILE *f;
|
||||
sprintf( fname, "projectM_%08d.ppm", frameNumber++ );
|
||||
f = fopen( fname, "wb" );
|
||||
fprintf( f, "P3\n#\n%d %d\n255\n", pm->wvw, pm->wvh );
|
||||
glReadPixels( 0, 0, pm->wvw, pm->wvh, GL_RGB, GL_UNSIGNED_BYTE, fbuffer );
|
||||
index = 0;
|
||||
for ( y = 0 ; y < pm->wvh ; y++ ) {
|
||||
for ( x = 0 ; x < pm->wvw ; x++ ) {
|
||||
fprintf( f, "%d %d %d ", fbuffer[index++], fbuffer[index++], fbuffer[index++] );
|
||||
}
|
||||
fprintf( f, "\n" );
|
||||
}
|
||||
fclose( f );
|
||||
}
|
||||
|
||||
SDL_GL_SwapBuffers();
|
||||
}
|
||||
|
||||
printf("Worker thread: Exiting\n");
|
||||
}
|
||||
|
||||
|
||||
int main( int argc, char *argv[] ) {
|
||||
|
||||
/** Variables */
|
||||
int fullscreen = 0;
|
||||
int width = 784,
|
||||
height = 784;
|
||||
SDL_Surface *screen;
|
||||
|
||||
#ifdef DEBUG
|
||||
int value;
|
||||
int rgb_size[3];
|
||||
#endif
|
||||
|
||||
const SDL_VideoInfo* info = NULL;
|
||||
int bpp = 0;
|
||||
/* Flags we will pass into SDL_SetVideoMode. */
|
||||
int flags = 0;
|
||||
|
||||
#ifdef DEBUG
|
||||
#ifdef WIN32
|
||||
/** Init debug */
|
||||
debugFile = fopen( "c:\\projectMvis.txt", "wb" );
|
||||
#else
|
||||
debugFile = fopen( "/tmp/projectMvis.txt", "wb" );
|
||||
#endif /** WIN32 */
|
||||
#endif /** DEBUG */
|
||||
|
||||
/** Allocate the SDL windows */
|
||||
/* Information about the current video settings. */
|
||||
/* First, initialize SDL's video subsystem. */
|
||||
if( SDL_Init( SDL_INIT_VIDEO ) < 0 ) {
|
||||
/* Failed, exit. */
|
||||
#ifdef DEBUG
|
||||
fprintf( debugFile, "Video initialization failed: %s\n",
|
||||
SDL_GetError( ) );
|
||||
#endif
|
||||
//projectM_vtable.disable_plugin (&projectM_vtable);
|
||||
return PROJECTM_ERROR;
|
||||
|
||||
}
|
||||
|
||||
/* Let's get some video information. */
|
||||
info = SDL_GetVideoInfo( );
|
||||
if( !info ) {
|
||||
/* This should probably never happen. */
|
||||
#ifdef DEBUG
|
||||
fprintf( debugFile, "Video query failed: %s\n",
|
||||
SDL_GetError( ) );
|
||||
#endif
|
||||
// projectM_vtable.disable_plugin (&projectM_vtable);
|
||||
return PROJECTM_ERROR;
|
||||
}
|
||||
|
||||
bpp = info->vfmt->BitsPerPixel;
|
||||
|
||||
// SDL_GL_SetAttribute( SDL_GL_RED_SIZE, 5 );
|
||||
// SDL_GL_SetAttribute( SDL_GL_GREEN_SIZE, 5 );
|
||||
// SDL_GL_SetAttribute( SDL_GL_BLUE_SIZE, 5 );
|
||||
|
||||
//SDL_GL_SetAttribute( SDL_GL_ACCUM_RED_SIZE, 8 );
|
||||
// SDL_GL_SetAttribute( SDL_GL_ACCUM_GREEN_SIZE, 8 );
|
||||
// SDL_GL_SetAttribute( SDL_GL_ACCUM_BLUE_SIZE, 8 );
|
||||
SDL_GL_SetAttribute( SDL_GL_ALPHA_SIZE, 8 );
|
||||
SDL_GL_SetAttribute( SDL_GL_DEPTH_SIZE, 16 );
|
||||
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );
|
||||
|
||||
if (fullscreen==0)
|
||||
flags = SDL_OPENGL | SDL_HWSURFACE;
|
||||
else flags = SDL_OPENGL | SDL_HWSURFACE |SDL_FULLSCREEN;
|
||||
|
||||
// w = 512; h = 512; bpp = 16;
|
||||
#ifdef DEBUG
|
||||
fprintf( debugFile, "pre SDL_SetVideoMode()\n" );
|
||||
#endif
|
||||
screen = SDL_SetVideoMode( width, height, bpp, flags ) ;
|
||||
#ifdef DEBUG
|
||||
fprintf( debugFile, "post SDL_SetVideoMode()\n" );
|
||||
#endif
|
||||
|
||||
|
||||
if(screen == NULL ) {
|
||||
/*
|
||||
* This could happen for a variety of reasons,
|
||||
* including DISPLAY not being set, the specified
|
||||
* resolution not being available, etc.
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
fprintf( debugFile, "Video mode set failed: %s\n",
|
||||
SDL_GetError( ) );
|
||||
#endif
|
||||
|
||||
// projectM_vtable.disable_plugin (&projectM_vtable);
|
||||
return PROJECTM_ERROR;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(debugFile, "Screen BPP: %d\n", SDL_GetVideoSurface()->format->BitsPerPixel);
|
||||
fprintf(debugFile, "\n");
|
||||
fprintf( debugFile, "Vendor : %s\n", glGetString( GL_VENDOR ) );
|
||||
fprintf( debugFile, "Renderer : %s\n", glGetString( GL_RENDERER ) );
|
||||
fprintf( debugFile, "Version : %s\n", glGetString( GL_VERSION ) );
|
||||
fprintf( debugFile, "Extensions : %s\n", glGetString( GL_EXTENSIONS ) );
|
||||
fprintf(debugFile, "\n");
|
||||
|
||||
rgb_size[0] = 8;
|
||||
rgb_size[1] = 8;
|
||||
rgb_size[2] = 8;
|
||||
SDL_GL_GetAttribute( SDL_GL_RED_SIZE, &value );
|
||||
fprintf( debugFile, "SDL_GL_RED_SIZE: requested %d, got %d\n", rgb_size[0],value);
|
||||
SDL_GL_GetAttribute( SDL_GL_GREEN_SIZE, &value );
|
||||
fprintf( debugFile, "SDL_GL_GREEN_SIZE: requested %d, got %d\n", rgb_size[1],value);
|
||||
SDL_GL_GetAttribute( SDL_GL_BLUE_SIZE, &value );
|
||||
fprintf( debugFile, "SDL_GL_BLUE_SIZE: requested %d, got %d\n", rgb_size[2],value);
|
||||
SDL_GL_GetAttribute( SDL_GL_DEPTH_SIZE, &value );
|
||||
fprintf( debugFile, "SDL_GL_DEPTH_SIZE: requested %d, got %d\n", bpp, value );
|
||||
SDL_GL_GetAttribute( SDL_GL_DOUBLEBUFFER, &value );
|
||||
fprintf( debugFile, "SDL_GL_DOUBLEBUFFER: requested 1, got %d\n", value );
|
||||
#ifdef PANTS
|
||||
if ( fsaa ) {
|
||||
SDL_GL_GetAttribute( SDL_GL_MULTISAMPLEBUFFERS, &value );
|
||||
printf( "SDL_GL_MULTISAMPLEBUFFERS: requested 1, got %d\n", value );
|
||||
SDL_GL_GetAttribute( SDL_GL_MULTISAMPLESAMPLES, &value );
|
||||
printf( "SDL_GL_MULTISAMPLESAMPLES: requested %d, got %d\n", fsaa, value );
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/** Setup some window stuff */
|
||||
SDL_WM_SetCaption( PROJECTM_TITLE, NULL );
|
||||
|
||||
/** Initialise projectM */
|
||||
globalPM = (projectM *)malloc( sizeof( projectM ) );
|
||||
globalPM->projectM_reset();
|
||||
|
||||
globalPM->fullscreen = 0;
|
||||
// globalPM->renderTarget->texsize = 1024;
|
||||
// globalPM->renderTarget->context1 = (void *)aglGetCurrentContext();
|
||||
#ifdef DEBUG22
|
||||
if ( debugFile != NULL ) {
|
||||
fprintf( debugFile, "current context: %X\n",
|
||||
globalPM->renderTarget->context1 );
|
||||
fflush( debugFile );
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
globalPM->fontURL = (char *)malloc( sizeof( char ) * 512 );
|
||||
strcpy( globalPM->fontURL, "../../fonts" );
|
||||
|
||||
globalPM->presetURL = (char *)malloc( sizeof( char ) * 512 );
|
||||
strcpy( globalPM->presetURL, "../../presets" );
|
||||
#endif
|
||||
#ifdef WIN32
|
||||
globalPM->fontURL = (char *)malloc( sizeof( char ) * 512 );
|
||||
strcpy( globalPM->fontURL, "c:\\tmp\\projectM\\fonts" );
|
||||
|
||||
globalPM->presetURL = (char *)malloc( sizeof( char ) * 512 );
|
||||
strcpy( globalPM->presetURL, "c:\\tmp\\projectM\\presets_test" );
|
||||
#endif
|
||||
#ifdef LINUX
|
||||
globalPM->fontURL = (char *)malloc( sizeof( char ) * 512 );
|
||||
strcpy( globalPM->fontURL, "/etc/projectM/fonts" );
|
||||
|
||||
globalPM->presetURL = (char *)malloc( sizeof( char ) * 512 );
|
||||
strcpy( globalPM->presetURL, "/etc/projectM/presets" );
|
||||
#endif
|
||||
globalPM->projectM_init();
|
||||
|
||||
globalPM->projectM_resetGL( width, height );
|
||||
|
||||
/** Allocate the buffer for frame dumping, if applicable */
|
||||
if ( dumpFrame ) {
|
||||
fbuffer = (GLubyte *)malloc( sizeof( GLubyte ) * globalPM->wvw * globalPM->wvh * 3 );
|
||||
}
|
||||
|
||||
/** Initialise the thread */
|
||||
renderLoop( globalPM );
|
||||
|
||||
return PROJECTM_SUCCESS;
|
||||
}
|
||||
@ -1,106 +0,0 @@
|
||||
# Microsoft Developer Studio Project File - Name="projectMvis" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=projectMvis - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "projectMvis.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "projectMvis.mak" CFG="projectMvis - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "projectMvis - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "projectMvis - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "projectMvis - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I ".." /I "c:\sdl\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib opengl32.lib glu32.lib projectM.lib sdl.lib sdlmain.lib /nologo /subsystem:windows /machine:I386 /libpath:"..\projectM\Release" /libpath:"C:\SDL\VisualC\SDL\Debug" /libpath:"C:\SDL\VisualC\SDLmain\Debug"
|
||||
|
||||
!ELSEIF "$(CFG)" == "projectMvis - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I ".." /I "c:\sdl\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "DEBUG" /YX /FD /GZ /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib opengl32.lib glu32.lib projectM.lib sdl.lib sdlmain.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept /libpath:"..\projectM\Debug" /libpath:"C:\SDL\VisualC\SDL\Debug" /libpath:"C:\SDL\VisualC\SDLmain\Debug"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "projectMvis - Win32 Release"
|
||||
# Name "projectMvis - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\projectMvis.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
@ -1,165 +0,0 @@
|
||||
/**
|
||||
* projectM -- Milkdrop-esque visualisation SDK
|
||||
* Copyright (C)2003-2007 projectM Team
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
* See 'LICENSE.txt' included within this release
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* $Id: sdltoprojectM.hpp,v 1.1 2004/10/08 00:35:28 cvs Exp $
|
||||
*
|
||||
* Translates SDL -> projectM variables
|
||||
*
|
||||
* $Log: sdltoprojectM.hpp,v $
|
||||
* Revision 1.1 2004/10/08 00:35:28 cvs
|
||||
* Moved and imported
|
||||
*
|
||||
* Revision 1.1.1.1 2004/10/04 12:56:00 cvs
|
||||
* Imported
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SDLTOPROJECTM_H
|
||||
#define _SDLTOPROJECTM_H
|
||||
|
||||
#include "event.h"
|
||||
|
||||
//#include "projectM/projectM.hpp"
|
||||
#ifdef WIN32
|
||||
#include <SDL.h>
|
||||
#else
|
||||
#include <SDL/SDL.h>
|
||||
#endif
|
||||
|
||||
projectMEvent sdl2pmEvent( SDL_Event event ) { \
|
||||
|
||||
switch ( event.type ) { \
|
||||
case SDL_VIDEORESIZE:
|
||||
return PROJECTM_VIDEORESIZE; \
|
||||
case SDL_KEYUP: \
|
||||
return PROJECTM_KEYUP; \
|
||||
case SDL_KEYDOWN: \
|
||||
return PROJECTM_KEYDOWN; \
|
||||
default:
|
||||
return PROJECTM_KEYUP; \
|
||||
} \
|
||||
} \
|
||||
|
||||
projectMKeycode sdl2pmKeycode( SDLKey keysym ) { \
|
||||
switch ( keysym ) { \
|
||||
case SDLK_F1: \
|
||||
return PROJECTM_K_F1; \
|
||||
case SDLK_F2: \
|
||||
return PROJECTM_K_F2; \
|
||||
case SDLK_F3: \
|
||||
return PROJECTM_K_F3; \
|
||||
case SDLK_F4: \
|
||||
return PROJECTM_K_F4; \
|
||||
case SDLK_F5: \
|
||||
return PROJECTM_K_F5; \
|
||||
case SDLK_F6: \
|
||||
return PROJECTM_K_F6; \
|
||||
case SDLK_F7: \
|
||||
return PROJECTM_K_F7; \
|
||||
case SDLK_F8: \
|
||||
return PROJECTM_K_F8; \
|
||||
case SDLK_F9: \
|
||||
return PROJECTM_K_F9; \
|
||||
case SDLK_F10: \
|
||||
return PROJECTM_K_F10; \
|
||||
case SDLK_F11: \
|
||||
return PROJECTM_K_F11; \
|
||||
case SDLK_F12: \
|
||||
return PROJECTM_K_F12; \
|
||||
case SDLK_ESCAPE: \
|
||||
return PROJECTM_K_ESCAPE;
|
||||
case SDLK_a:
|
||||
return PROJECTM_K_a;
|
||||
case SDLK_b:
|
||||
return PROJECTM_K_b;
|
||||
case SDLK_c:
|
||||
return PROJECTM_K_c;
|
||||
case SDLK_d:
|
||||
return PROJECTM_K_d;
|
||||
case SDLK_e:
|
||||
return PROJECTM_K_e;
|
||||
case SDLK_f:
|
||||
return PROJECTM_K_f;
|
||||
case SDLK_g:
|
||||
return PROJECTM_K_g;
|
||||
case SDLK_h:
|
||||
return PROJECTM_K_h;
|
||||
case SDLK_i:
|
||||
return PROJECTM_K_i;
|
||||
case SDLK_j:
|
||||
return PROJECTM_K_j;
|
||||
case SDLK_k:
|
||||
return PROJECTM_K_k;
|
||||
case SDLK_l:
|
||||
return PROJECTM_K_l;
|
||||
case SDLK_m:
|
||||
return PROJECTM_K_m;
|
||||
case SDLK_n:
|
||||
return PROJECTM_K_n;
|
||||
case SDLK_o:
|
||||
return PROJECTM_K_o;
|
||||
case SDLK_p:
|
||||
return PROJECTM_K_p;
|
||||
case SDLK_q:
|
||||
return PROJECTM_K_q;
|
||||
case SDLK_r:
|
||||
return PROJECTM_K_r;
|
||||
case SDLK_s:
|
||||
return PROJECTM_K_s;
|
||||
case SDLK_t:
|
||||
return PROJECTM_K_t;
|
||||
case SDLK_u:
|
||||
return PROJECTM_K_u;
|
||||
case SDLK_v:
|
||||
return PROJECTM_K_v;
|
||||
case SDLK_w:
|
||||
return PROJECTM_K_w;
|
||||
case SDLK_x:
|
||||
return PROJECTM_K_x;
|
||||
case SDLK_y:
|
||||
return PROJECTM_K_y;
|
||||
case SDLK_z:
|
||||
return PROJECTM_K_z;
|
||||
case SDLK_UP:
|
||||
return PROJECTM_K_UP;
|
||||
case SDLK_RETURN:
|
||||
return PROJECTM_K_RETURN;
|
||||
case SDLK_RIGHT:
|
||||
return PROJECTM_K_RIGHT;
|
||||
case SDLK_LEFT:
|
||||
return PROJECTM_K_LEFT;
|
||||
case SDLK_DOWN:
|
||||
return PROJECTM_K_DOWN;
|
||||
case SDLK_PAGEUP:
|
||||
return PROJECTM_K_PAGEUP;
|
||||
case SDLK_PAGEDOWN:
|
||||
return PROJECTM_K_PAGEDOWN;
|
||||
|
||||
default: \
|
||||
return PROJECTM_K_NONE; \
|
||||
} \
|
||||
} \
|
||||
|
||||
projectMModifier sdl2pmModifier( SDLMod mod ) { \
|
||||
return PROJECTM_KMOD_LSHIFT; \
|
||||
} \
|
||||
|
||||
#endif /** _SDLTOPROJECTM_H */
|
||||
Reference in New Issue
Block a user