diff --git a/CMakeLists.txt b/CMakeLists.txt index a806283..d381e91 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,8 @@ set(abuse_VERSION_MAJOR 0) set(abuse_VERSION_MINOR 9) set(abuse_VERSION_PATCH 0) set(abuse_VERSION_TWEAK 0) - +find_package(OpenGL REQUIRED) +find_package(OpenCV REQUIRED) # Detect the platform, as there's quite a bit of platform variation if (WIN32) diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt index cac258c..54981d4 100644 --- a/data/CMakeLists.txt +++ b/data/CMakeLists.txt @@ -1,7 +1,7 @@ INSTALL(FILES abuse.lsp edit.lsp - hardness.lsp + user/hardness.lsp DESTINATION ${ASSETDIR}) # No idea what this was for @@ -327,7 +327,7 @@ INSTALL(FILES DESTINATION ${ASSETDIR}/addon/twist) INSTALL(FILES - defaults.prp + user/defaults.prp DESTINATION ${ASSETDIR}) # Check if we have the non-free data diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7885110..576013a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -99,7 +99,7 @@ add_executable(abuse-tool tool/AR_SPEC.cpp tool/AR_SPEC.h tool/AR_Help.cpp tool/AR_Help.h) -target_link_libraries(abuse-tool imlib) +target_link_libraries(abuse-tool imlib ${OpenCV_LIBS}) include_directories( ${abuse_SOURCE_DIR}/src diff --git a/src/common.h b/src/common.h index 1a14dd3..ee45256 100644 --- a/src/common.h +++ b/src/common.h @@ -14,7 +14,7 @@ // // Globally required headers // -#include //AR (#include ) +#include //AR (#include ) #include #ifdef _MSC_VER diff --git a/src/crc.cpp b/src/crc.cpp index c186364..d0b6f6f 100644 --- a/src/crc.cpp +++ b/src/crc.cpp @@ -12,6 +12,7 @@ # include "config.h" #endif +#include #include "crc.h" uint16_t calc_crc(void *buf, size_t len) diff --git a/src/imlib/specs.cpp b/src/imlib/specs.cpp index f242b29..fc820a9 100644 --- a/src/imlib/specs.cpp +++ b/src/imlib/specs.cpp @@ -14,7 +14,7 @@ #include #include -#include //AR (#include ) +#include //AR (#include ) #include #include #include diff --git a/src/imlib/specs.h b/src/imlib/specs.h index 585afc0..20cffaa 100644 --- a/src/imlib/specs.h +++ b/src/imlib/specs.h @@ -14,7 +14,7 @@ #include #include #include -#include //AR (#include ) +#include //AR (#include ) #include #include "linked.h" diff --git a/src/lisp/lisp.h b/src/lisp/lisp.h index 791f045..38f2b46 100644 --- a/src/lisp/lisp.h +++ b/src/lisp/lisp.h @@ -12,7 +12,9 @@ #define __LISP_HPP_ #include -#include //AR (#include ) +#include //AR (#include ) +#include + #ifdef L_PROFILE #include "timing.h" diff --git a/src/sdlport/video.cpp b/src/sdlport/video.cpp index 2c72135..b126044 100644 --- a/src/sdlport/video.cpp +++ b/src/sdlport/video.cpp @@ -27,7 +27,7 @@ #ifdef WIN32 #include #endif -#include "Glee.h" +#include "GLee.h" //Abuse linker->input: // - opengl32.lib // - GLee.lib @@ -498,4 +498,4 @@ void update_window_done() SDL_GL_SwapWindow(window); // -} \ No newline at end of file +} diff --git a/src/specache.cpp b/src/specache.cpp index e5c949c..3b20f54 100644 --- a/src/specache.cpp +++ b/src/specache.cpp @@ -12,6 +12,7 @@ # include "config.h" #endif +#include #include "specache.h" spec_directory_cache sd_cache; diff --git a/src/tool/AR_SPEC.cpp b/src/tool/AR_SPEC.cpp index cdf847c..372958e 100644 --- a/src/tool/AR_SPEC.cpp +++ b/src/tool/AR_SPEC.cpp @@ -802,9 +802,9 @@ bool AR_SPEC::AR_CreateTile(image *im, std::string path, palette *pal, palette * //only png supports this->alpha channel if(this->image_format=="png" && this->alpha==AR_OCV_COLORTOALPHA) - ocv = cvCreateImage(cvSize(im->Size().x,im->Size().y),IPL_DEPTH_8U,4); + ocv = cvarrToMat(cvCreateImage(cvSize(im->Size().x,im->Size().y),IPL_DEPTH_8U,4)); else - ocv = cvCreateImage(cvSize(im->Size().x,im->Size().y),IPL_DEPTH_8U,3); + ocv = cvarrToMat(cvCreateImage(cvSize(im->Size().x,im->Size().y),IPL_DEPTH_8U,3)); int k = 0; for(int i=0;i > &m, int w, int h, st //only png supports this->alpha channel if(this->image_format=="png" && this->alpha==AR_OCV_COLORTOALPHA) - ocv = cvCreateImage(cvSize(w,h),IPL_DEPTH_8U,4); + ocv = cvarrToMat(cvCreateImage(cvSize(w,h),IPL_DEPTH_8U,4)); else - ocv = cvCreateImage(cvSize(w,h),IPL_DEPTH_8U,3); + ocv = cvarrToMat(cvCreateImage(cvSize(w,h),IPL_DEPTH_8U,3)); for(int i=0;iimage_format=="png") { - vector parameters; + std::vector parameters; parameters.push_back(CV_IMWRITE_PNG_COMPRESSION); parameters.push_back(this->png_compression); @@ -955,7 +955,7 @@ bool AR_SPEC::AR_SaveImage(Mat &ocv, std::string path) } else if(this->image_format=="jpeg" || this->image_format=="jpg" | this->image_format=="jpe" || this->image_format=="jp2") { - vector parameters; + std::vector parameters; parameters.push_back(CV_IMWRITE_JPEG_QUALITY); parameters.push_back(this->jpeg_quality); diff --git a/src/tool/AR_SPEC.h b/src/tool/AR_SPEC.h index 663a16f..70e1d60 100644 --- a/src/tool/AR_SPEC.h +++ b/src/tool/AR_SPEC.h @@ -59,8 +59,8 @@ #include #include -#include -#include +#include +#include using namespace cv; #include "common.h" diff --git a/src/tool/abuse-tool.cpp b/src/tool/abuse-tool.cpp index bce2064..a17478c 100644 --- a/src/tool/abuse-tool.cpp +++ b/src/tool/abuse-tool.cpp @@ -16,6 +16,7 @@ #include #include +#include #include "common.h" #include "specs.h"