diff --git a/INSTALL-iTunes-macos.txt b/INSTALL-iTunes-macos.txt index 1bbbd2b01..a8f889716 100755 --- a/INSTALL-iTunes-macos.txt +++ b/INSTALL-iTunes-macos.txt @@ -1,3 +1,5 @@ Press "r" to change to a random preset. Press "h" to bring up a help menu. The projectM-iTunes directory contains an XCode 5 project that emits an installer bundle. Use that to install it. + +Binaries are available at: https://github.com/revmischa/projectm/releases diff --git a/src/libprojectM/libprojectM.a b/src/libprojectM/libprojectM.a index 4465f7a9b..dedfa7655 100644 Binary files a/src/libprojectM/libprojectM.a and b/src/libprojectM/libprojectM.a differ diff --git a/src/libprojectM/projectM.hpp b/src/libprojectM/projectM.hpp index f01235a09..5081b66cf 100755 --- a/src/libprojectM/projectM.hpp +++ b/src/libprojectM/projectM.hpp @@ -134,7 +134,7 @@ public: bool aspectCorrection; float easterEgg; bool shuffleEnabled; - bool softCutRatingsEnabled; + bool softCutRatingsEnabled; }; projectM(std::string config_file, int flags = FLAG_NONE); diff --git a/src/projectM-emscripten/CMakeLists.txt b/src/projectM-emscripten/CMakeLists.txt index 4765e2ebe..2667a67ee 100644 --- a/src/projectM-emscripten/CMakeLists.txt +++ b/src/projectM-emscripten/CMakeLists.txt @@ -1,3 +1,5 @@ +cmake_minimum_required(VERSION 2.8.0) + INCLUDE(../cmake/CPack-projectM.cmake) PROJECT(projectEM) @@ -23,5 +25,5 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) #INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIRS}) #TARGET_LINK_LIBRARIES(projectEM ${SDL2_LIBRARIES}) -SET_TARGET_PROPERTIES(projectEM PROPERTIES LINK_FLAGS "-o build/projectEM.html --emrun") +SET_TARGET_PROPERTIES(projectEM PROPERTIES LINK_FLAGS "-o build/projectEM.html -g --emrun") #SET_TARGET_PROPERTIES(projectEM PROPERTIES LINK_FLAGS "--emrun") diff --git a/src/projectM-emscripten/build/config.inp b/src/projectM-emscripten/build/config.inp deleted file mode 100644 index 60ab122ef..000000000 --- a/src/projectM-emscripten/build/config.inp +++ /dev/null @@ -1,22 +0,0 @@ -# config.inp -# Configuration File for projectM - -Texture Size = 2048 # Size of internal rendering texture -Mesh X = 2 # Width of PerPixel Equation mesh -Mesh Y = 2 # Height of PerPixel Equation mesh -FPS = 60 # Frames Per Second -Fullscreen = false -Window Width = 512 # startup window width -Window Height = 512 # startup window height - -Smooth Transition Duration = 5 # in seconds -Preset Duration = 10 # in seconds -Easter Egg Parameter = 1 - -Hard Cut Sensitivity = 10 # Lower to make hard cuts more frequent -Aspect Correction = true # Custom Shape Aspect Correction - -Preset Path = presets - -Title Font = fonts/Vera.ttf -Menu Font = fonts/VeraMono.ttf diff --git a/src/projectM-emscripten/emprojectM.xcodeproj/project.pbxproj b/src/projectM-emscripten/emprojectM.xcodeproj/project.pbxproj index 70da5e473..40e9fb017 100644 --- a/src/projectM-emscripten/emprojectM.xcodeproj/project.pbxproj +++ b/src/projectM-emscripten/emprojectM.xcodeproj/project.pbxproj @@ -27,7 +27,6 @@ /* Begin PBXFileReference section */ C3F90678195670BC00C8DF0F /* emprojectM */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = emprojectM; sourceTree = BUILT_PRODUCTS_DIR; }; - C3F90684195670EF00C8DF0F /* emscripten_sdltoprojectM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = emscripten_sdltoprojectM.h; sourceTree = SOURCE_ROOT; }; C3F90685195670EF00C8DF0F /* projectM_SDL_emscripten.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = projectM_SDL_emscripten.cpp; sourceTree = SOURCE_ROOT; }; C3F90689195676C500C8DF0F /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; C3F9068B195676CC00C8DF0F /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = System/Library/Frameworks/GLUT.framework; sourceTree = SDKROOT; }; @@ -70,7 +69,6 @@ C3F9067A195670BC00C8DF0F /* emprojectM */ = { isa = PBXGroup; children = ( - C3F90684195670EF00C8DF0F /* emscripten_sdltoprojectM.h */, C3F90685195670EF00C8DF0F /* projectM_SDL_emscripten.cpp */, ); path = emprojectM; diff --git a/src/projectM-emscripten/projectM_SDL_emscripten.cpp b/src/projectM-emscripten/projectM_SDL_emscripten.cpp index cb2c62375..fe0ab2d78 100755 --- a/src/projectM-emscripten/projectM_SDL_emscripten.cpp +++ b/src/projectM-emscripten/projectM_SDL_emscripten.cpp @@ -16,7 +16,7 @@ #include #endif -const char *PROJECTEM_CONFIG_PATH = "build/config.inp"; +const float FPS = 60; static projectM *globalPM = NULL; static SDL_Surface *screen; @@ -25,6 +25,9 @@ static SDL_Renderer *rend; bool done = false; +// settings, yo +projectM::Settings settings; + void renderFrame() { int i; short pcm_data[2][512]; @@ -118,6 +121,10 @@ int main( int argc, char *argv[] ) { #elif SDL_MAJOR_VERSION==1 screen = SDL_SetVideoMode(width, height, 32, SDL_OPENGL | SDL_DOUBLEBUF); printf("SDL init version 1\n"); + if (! screen) { + fprintf(stderr, "Failed to create renderer with SDL_SetVideoMode(): %s\n", SDL_GetError()); + return PROJECTM_ERROR; + } #endif #ifdef PANTS @@ -129,17 +136,36 @@ int main( int argc, char *argv[] ) { } #endif + settings.meshX = 2; + settings.meshY = 2; + settings.fps = FPS; + settings.textureSize = 2048; // idk? + settings.windowWidth = width; + settings.windowHeight = height; + settings.presetURL = "./presets"; + settings.smoothPresetDuration = 5; // seconds + settings.presetDuration = 15; // seconds + settings.beatSensitivity = 0.8; + settings.aspectCorrection = 1; + settings.easterEgg = 0; // ??? + settings.shuffleEnabled = 1; + settings.softCutRatingsEnabled = 1; // ??? + // init projectM - globalPM = new projectM(PROJECTEM_CONFIG_PATH); + printf("initting\n"); + globalPM = new projectM(settings); + printf("init projectM\n"); globalPM->selectRandom(true); + printf("select random\n"); globalPM->projectM_resetGL(width, height); + printf("resetGL\n"); // mainloop. non-emscripten version here for comparison/testing #ifdef EMSCRIPTEN emscripten_set_main_loop(renderFrame, 30, 0); #else // standard main loop - const Uint32 frame_delay = 1000/60; + const Uint32 frame_delay = 1000/FPS; Uint32 last_time = SDL_GetTicks(); while (! done) { renderFrame();