diff --git a/FexTrackerSource/FexGenericFilter_BaseFloatImage.cpp b/FexTrackerSource/FexGenericFilter_BaseFloatImage.cpp index fe7fdacb7..b16a86535 100644 --- a/FexTrackerSource/FexGenericFilter_BaseFloatImage.cpp +++ b/FexTrackerSource/FexGenericFilter_BaseFloatImage.cpp @@ -89,4 +89,5 @@ void BaseFloatImage_LanczosRescale( float* in, int inSx, int inSy, float* out, i #undef FilterWidth #undef FilterWeight -} \ No newline at end of file +} + diff --git a/FexTrackerSource/FexGenericFilter_BaseFloatImageApply.h b/FexTrackerSource/FexGenericFilter_BaseFloatImageApply.h index 17809b0f8..0e9058f00 100644 --- a/FexTrackerSource/FexGenericFilter_BaseFloatImageApply.h +++ b/FexTrackerSource/FexGenericFilter_BaseFloatImageApply.h @@ -46,4 +46,5 @@ #undef PixelMin #undef PixelMax #undef ImagePlanes -} \ No newline at end of file +} + diff --git a/FexTrackerSource/FexGenericFilter_Contribution.h b/FexTrackerSource/FexGenericFilter_Contribution.h index 77ad0210e..a168eef3e 100644 --- a/FexTrackerSource/FexGenericFilter_Contribution.h +++ b/FexTrackerSource/FexGenericFilter_Contribution.h @@ -38,4 +38,5 @@ cc->Weight[n-cc->xMin] += weight; } } -} \ No newline at end of file +} + diff --git a/FexTrackerSource/FexGenericFilter_FilteringCore.h b/FexTrackerSource/FexGenericFilter_FilteringCore.h index fbdebfece..f4d3c99fc 100644 --- a/FexTrackerSource/FexGenericFilter_FilteringCore.h +++ b/FexTrackerSource/FexGenericFilter_FilteringCore.h @@ -53,4 +53,5 @@ for( int x=0;x +#endif #include #include #include +#include //#include ////////////////////////////////////////////////////////////////////// @@ -32,11 +35,26 @@ FEXTRACKER_API FexMovement* CreateMovement() return new FexMovement(); } +#ifndef WIN32 +FILE *_wfopen(const wchar_t *wname, const wchar_t *wmode) +{ + size_t namelen = wcstombs(NULL, wname, 0) + 1; + char name[namelen]; + wcstombs(name, wname, namelen); + + size_t modelen = wcstombs(NULL, wmode, 0) + 1; + char mode[modelen]; + wcstombs(mode, wmode, modelen); + + return fopen(name, mode); +} +#endif + FEXTRACKER_API void LoadMovement( FexMovement* me, const wchar_t* Filename ) { me->Frames.nVal = 0; - me->FileName = new WCHAR[ wcslen(Filename)+1 ]; + me->FileName = new wchar_t[ wcslen(Filename)+1 ]; wcscpy( me->FileName, Filename ); FILE *fi = _wfopen( Filename, L"rt" ); diff --git a/FexTrackerSource/FexMovement.h b/FexTrackerSource/FexMovement.h index e251f63b0..65eb67115 100644 --- a/FexTrackerSource/FexMovement.h +++ b/FexTrackerSource/FexMovement.h @@ -26,7 +26,7 @@ class FexMovement public: FexMovement(); ~FexMovement(); - WCHAR* FileName; + wchar_t* FileName; tenlist Frames; }; diff --git a/FexTrackerSource/Makefile.am b/FexTrackerSource/Makefile.am new file mode 100644 index 000000000..b7ba011c5 --- /dev/null +++ b/FexTrackerSource/Makefile.am @@ -0,0 +1,12 @@ +SUFFIXES = .c .cpp +noinst_LIBRARIES = libfex.a +AM_CPPFLAGS = -DAEGISUB + +libfex_a_SOURCES = \ + FexGenericFilter.cpp \ + FexGenericFilter_BaseFloatImage.cpp \ + FexImgPyramid.cpp \ + FexMovement.cpp \ + FexTracker.cpp \ + FexTrackerMovement.cpp \ + FexTrackingFeature.cpp diff --git a/FexTrackerSource/StdAfx.h b/FexTrackerSource/StdAfx.h index 6e3d2c664..dbe547e4c 100644 --- a/FexTrackerSource/StdAfx.h +++ b/FexTrackerSource/StdAfx.h @@ -17,7 +17,9 @@ // Insert your headers here #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +#ifdef WIN32 #include +#endif #include #include #include @@ -31,7 +33,7 @@ #ifdef IMAGE_DEBUGGER #include "ext/imdebug.h" #else -#define imdebug // +#define imdebug(a,b,c,d) // #endif // TODO: reference additional headers your program requires here diff --git a/Makefile.am b/Makefile.am index cedcf5acc..77d89ec68 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,5 @@ AUTOMAKE_OPTIONS = foreign -SUBDIRS = ac aegisub locale +SUBDIRS = ac FexTrackerSource aegisub locale lua51/src/liblua.a: make -C lua51/src CC=$(CXX) a diff --git a/aegisub/Makefile.am b/aegisub/Makefile.am index dcc4b2834..d27001242 100644 --- a/aegisub/Makefile.am +++ b/aegisub/Makefile.am @@ -10,8 +10,8 @@ DARCSREV := $(strip $(shell head -n 1 ../_darcs/inventory 2>/dev/null)) REVISION := $(if $(SVNREV),-DBUILD_SVN_REVISION=$(SVNREV)) $(if $(DARCSREV),-DBUILD_DARCS) BUILDINFO := -DBUILD_CREDIT="\"$(shell whoami)\"" $(REVISION) -AM_CPPFLAGS = -Iposix -include posix/defines.h $(BUILDINFO) -LDADD = posix/libposix.a ../lua51/src/liblua.a -lGL -lGLU +AM_CPPFLAGS = -DAEGISUB -Iposix -include posix/defines.h $(BUILDINFO) +LDADD = posix/libposix.a ../lua51/src/liblua.a ../FexTrackerSource/libfex.a -lGL -lGLU # auto4_ruby_assfile.cpp # auto4_ruby.cpp @@ -55,6 +55,7 @@ aegisub_SOURCES = \ dialog_colorpicker.cpp \ dialog_detached_video.cpp \ dialog_export.cpp \ + dialog_fextracker.cpp \ dialog_fonts_collector.cpp \ dialog_hotkeys.cpp \ dialog_jumpto.cpp \ @@ -123,6 +124,7 @@ aegisub_SOURCES = \ video_box.cpp \ video_context.cpp \ video_display.cpp \ + video_display_fextracker.cpp \ video_display_visual.cpp \ video_frame.cpp \ video_provider.cpp \ diff --git a/aegisub/posix/defines.h b/aegisub/posix/defines.h index 386cd820b..654b58acc 100644 --- a/aegisub/posix/defines.h +++ b/aegisub/posix/defines.h @@ -43,7 +43,7 @@ typedef uint64_t __uint64; #define USE_LAVC 0 #endif #define USE_PRS 0 -#define USE_FEXTRACKER 0 +#define USE_FEXTRACKER 1 #ifndef USE_LIBSSA #define USE_LIBSSA 0 #endif diff --git a/configure.ac b/configure.ac index d12b748e8..60e9fdd41 100644 --- a/configure.ac +++ b/configure.ac @@ -188,6 +188,7 @@ AC_OUTPUT([ Makefile ac/Makefile locale/Makefile + FexTrackerSource/Makefile aegisub/Makefile aegisub/posix/Makefile aegisub/bitmaps/Makefile