Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

master #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions data/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
INSTALL(FILES
abuse.lsp
edit.lsp
hardness.lsp
user/hardness.lsp
DESTINATION ${ASSETDIR})

# No idea what this was for
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//
// Globally required headers
//
#include <SDL_config.h>//AR (#include <SDL_config.h>)
#include <SDL2/SDL_config.h>//AR (#include <SDL_config.h>)
#include <stdio.h>

#ifdef _MSC_VER
Expand Down
1 change: 1 addition & 0 deletions src/crc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# include "config.h"
#endif

#include <stdint.h>
#include "crc.h"

uint16_t calc_crc(void *buf, size_t len)
Expand Down
2 changes: 1 addition & 1 deletion src/imlib/specs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include <stdio.h>
#include <stdlib.h>
#include <SDL_config.h>//AR (#include <SDL_config.h>)
#include <SDL2/SDL_config.h>//AR (#include <SDL_config.h>)
#include <ctype.h>
#include <fcntl.h>
#include <math.h>
Expand Down
2 changes: 1 addition & 1 deletion src/imlib/specs.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <SDL_config.h>//AR (#include <SDL_config.h>)
#include <SDL2/SDL_config.h>//AR (#include <SDL_config.h>)
#include <string.h>

#include "linked.h"
Expand Down
4 changes: 3 additions & 1 deletion src/lisp/lisp.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
#define __LISP_HPP_

#include <cstdlib>
#include <SDL_config.h>//AR (#include <SDL_config.h>)
#include <SDL2/SDL_config.h>//AR (#include <SDL_config.h>)
#include <stdint.h>


#ifdef L_PROFILE
#include "timing.h"
Expand Down
4 changes: 2 additions & 2 deletions src/sdlport/video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#ifdef WIN32
#include <windows.h>
#endif
#include "Glee.h"
#include "GLee.h"
//Abuse linker->input:
// - opengl32.lib
// - GLee.lib
Expand Down Expand Up @@ -498,4 +498,4 @@ void update_window_done()

SDL_GL_SwapWindow(window);
//
}
}
1 change: 1 addition & 0 deletions src/specache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
# include "config.h"
#endif

#include <stdint.h>
#include "specache.h"

spec_directory_cache sd_cache;
Expand Down
12 changes: 6 additions & 6 deletions src/tool/AR_SPEC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<ocv.rows;i++)
Expand Down Expand Up @@ -866,9 +866,9 @@ bool AR_SPEC::AR_CreateImage(std::vector<std::vector<int> > &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;i<ocv.rows;i++)
{
Expand Down Expand Up @@ -947,15 +947,15 @@ bool AR_SPEC::AR_SaveImage(Mat &ocv, std::string path)

if(this->image_format=="png")
{
vector<int> parameters;
std::vector<int> parameters;
parameters.push_back(CV_IMWRITE_PNG_COMPRESSION);
parameters.push_back(this->png_compression);

result = imwrite(path_fin,ocv,parameters);
}
else if(this->image_format=="jpeg" || this->image_format=="jpg" | this->image_format=="jpe" || this->image_format=="jp2")
{
vector<int> parameters;
std::vector<int> parameters;
parameters.push_back(CV_IMWRITE_JPEG_QUALITY);
parameters.push_back(this->jpeg_quality);

Expand Down
4 changes: 2 additions & 2 deletions src/tool/AR_SPEC.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
#include <fstream>
#include <sstream>

#include <cv.h>
#include <highgui.h>
#include <opencv2/opencv.hpp>
#include <opencv2/highgui.hpp>
using namespace cv;

#include "common.h"
Expand Down
1 change: 1 addition & 0 deletions src/tool/abuse-tool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#include <cstring>
#include <cstdio>
#include <cstdlib>

#include "common.h"
#include "specs.h"
Expand Down