diff --git a/deploy/DATA/video/E_DMX1.ogg b/deploy/DATA/video/E_DMX1.ogg new file mode 100644 index 0000000..609402a Binary files /dev/null and b/deploy/DATA/video/E_DMX1.ogg differ diff --git a/deploy/DATA/video/E_HOWTO0.ogg b/deploy/DATA/video/E_HOWTO0.ogg new file mode 100644 index 0000000..e23a003 Binary files /dev/null and b/deploy/DATA/video/E_HOWTO0.ogg differ diff --git a/deploy/DMX.exe b/deploy/DMX.exe index 7c66391..29948b2 100644 Binary files a/deploy/DMX.exe and b/deploy/DMX.exe differ diff --git a/lib/apeg/lib/release/APEG_r.lib b/lib/apeg/lib/release/APEG_r.lib index c8e0f7f..d0b13f1 100644 Binary files a/lib/apeg/lib/release/APEG_r.lib and b/lib/apeg/lib/release/APEG_r.lib differ diff --git a/lib/apeg/lib/release/vc100.pdb b/lib/apeg/lib/release/vc100.pdb new file mode 100644 index 0000000..c0ea293 Binary files /dev/null and b/lib/apeg/lib/release/vc100.pdb differ diff --git a/lib/apeg/lib/release/vc100_apeg.pdb b/lib/apeg/lib/release/vc100_apeg.pdb new file mode 100644 index 0000000..76f09d8 Binary files /dev/null and b/lib/apeg/lib/release/vc100_apeg.pdb differ diff --git a/src/source/VideoManager.cpp b/src/source/VideoManager.cpp index 85bd3ac..1051cad 100644 --- a/src/source/VideoManager.cpp +++ b/src/source/VideoManager.cpp @@ -46,14 +46,17 @@ void VideoManager::update(UTIME dt) loadVideoAtCurrentStep(); } - if ( apeg_advance_stream(cmov, true) != APEG_OK) + if ( cmov != NULL ) { - al_trace("Problem!\r\n"); // doesn't really matter if it fails - } - - if( cmov->frame_updated > 0 && cmov->bitmap != NULL ) - { - stretch_blit(cmov->bitmap, frameData, 0, 0, cmov->w, cmov->h, 0, 0, 320, 192); + if ( apeg_advance_stream(cmov, true) != APEG_OK) + { + al_trace("Video problem! Breakpoint!\r\n"); // doesn't really matter if it fails + } + if( cmov->frame_updated > 0 && cmov->bitmap != NULL ) + { + //stretch_blit(cmov->bitmap, frameData, 0, 0, cmov->w, cmov->h, 0, 0, 320, 192); + blit(cmov->bitmap, frameData, 0, 0, 0, 0, 320, 192); + } } } @@ -118,11 +121,24 @@ void VideoManager::loadScript(const char* filename) void VideoManager::loadVideoAtCurrentStep() { - char filename[256] = "MOV/"; + char filename[256] = "DATA/video/"; strcat_s(filename, 256, script[currentStep].filename); strcat_s(filename, 256, ".ogg"); - strcpy_s(filename, 256, "MOV/N_OPUTY0.ogg"); + if ( fileExists(filename) ) + { + cmov = apeg_open_stream(filename); + if ( cmov != NULL ) + { + //al_trace("%s opened successfully\r\n", filename); + return; + } + } - cmov = apeg_open_stream(filename); + cmov = NULL; + //al_trace("Something is wrong with %s\r\n", filename); + + // default case: show a placeholder texture + clear_to_color(frameData, makecol(255,255,255)); + textprintf_centre(frameData, font, 160, 90, makecol(0,0,0), "%s", script[currentStep].filename); } \ No newline at end of file