mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Very little changes to compile under linux and other unix-like OS. Added autoconf/automake scripts to easy compile on all unix-like OS(try autoconf; automake --add-missing;./configure)
This commit is contained in:
parent
e0755aa7b3
commit
8b53778417
@ -14,7 +14,9 @@
|
||||
#include "CPlayerInterface.h"
|
||||
#include "hch/CBuildingHandler.h"
|
||||
|
||||
extern "C" {
|
||||
LUALIB_API int (luaL_error) (lua_State *L, const char *fmt, ...);
|
||||
}
|
||||
|
||||
int CCallback::lowestSpeed(CGHeroInstance * chi)
|
||||
{
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#include "StartInfo.h"
|
||||
#include "SDL.h"
|
||||
#include "CPregame.h"
|
||||
#include "CPreGame.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "stdafx.h"
|
||||
#include "stdafx.h"
|
||||
#include "CGameInterface.h"
|
||||
#include "CAdvMapInterface.h"
|
||||
#include "CAdvmapInterface.h"
|
||||
#include "CMessage.h"
|
||||
#include "mapHandler.h"
|
||||
#include "SDL_Extensions.h"
|
||||
@ -44,12 +44,12 @@ CGlobalAI * CAIHandler::getNewAI(CCallback * cb, std::string dllname)
|
||||
; //TODO: handle AI library on Linux
|
||||
#endif
|
||||
char * temp = new char[50];
|
||||
#ifndef __amigaos4__
|
||||
#if !defined(__amigaos4__) && !defined(__unix__)
|
||||
getName(temp);
|
||||
#endif
|
||||
std::cout << "Loaded .dll with AI named " << temp << std::endl;
|
||||
delete temp;
|
||||
#ifndef __amigaos4__
|
||||
#if !defined(__amigaos4__) && !defined(__unix__)
|
||||
ret = getAI();
|
||||
ret->init(cb);
|
||||
#else
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include "CGameInterface.h"
|
||||
#include "CPlayerInterface.h"
|
||||
#include <algorithm>
|
||||
#include "SDL_Thread.h"
|
||||
#include "SDL_thread.h"
|
||||
#include "SDL_Extensions.h"
|
||||
#include "CBattleInterface.h" //for CBattleHex
|
||||
#include <queue>
|
||||
|
@ -1030,7 +1030,7 @@ void LClickableArea::clickLeft(boost::logic::tribool down)
|
||||
{
|
||||
if(!down)
|
||||
{
|
||||
#ifndef __amigaos4__
|
||||
#if !defined(__amigaos4__) && !defined(__unix__)
|
||||
LOCPLINT->showInfoDialog("TEST TEST AAA", std::vector<SComponent*>());
|
||||
#else
|
||||
#warning error here!
|
||||
@ -1050,7 +1050,7 @@ void RClickableArea::clickRight(boost::logic::tribool down)
|
||||
{
|
||||
if(!down)
|
||||
{
|
||||
#ifndef __amigaos4__
|
||||
#if !defined(__amigaos4__) && !defined(__unix__)
|
||||
LOCPLINT->showInfoDialog("TEST TEST AAA", std::vector<SComponent*>());
|
||||
#else
|
||||
#warning error here!
|
||||
@ -1062,7 +1062,7 @@ void LRClickableAreaWText::clickLeft(boost::logic::tribool down)
|
||||
{
|
||||
if(!down)
|
||||
{
|
||||
#ifndef __amigaos4__
|
||||
#if !defined(__amigaos4__) && !defined(__unix__)
|
||||
LOCPLINT->showInfoDialog(text, std::vector<SComponent*>());
|
||||
#else
|
||||
#warning error here!
|
||||
@ -1110,7 +1110,7 @@ void LRClickableAreaWTextComp::clickLeft(boost::logic::tribool down)
|
||||
{
|
||||
if((!down) && pressedL)
|
||||
{
|
||||
#ifndef __amigaos4__
|
||||
#if !defined(__amigaos4__) && !defined(__unix__)
|
||||
LOCPLINT->showInfoDialog(text, std::vector<SComponent*>(1, new SComponent(SComponent::Etype(baseType), type, bonus)));
|
||||
#else
|
||||
#warning error here!
|
||||
|
2
CLua.cpp
2
CLua.cpp
@ -2,12 +2,14 @@
|
||||
#include "CLua.h"
|
||||
#include "CLuaHandler.h"
|
||||
#include "hch/CHeroHandler.h"
|
||||
extern "C" {
|
||||
#include "lua.h"
|
||||
#include "lualib.h"
|
||||
#include "lauxlib.h"
|
||||
#include "lobject.h"
|
||||
#include "lgc.h"
|
||||
#include "lapi.h"
|
||||
}
|
||||
#include "CGameInfo.h"
|
||||
#include "CGameState.h"
|
||||
#include <sstream>
|
||||
|
2
CLua.h
2
CLua.h
@ -1,6 +1,8 @@
|
||||
#pragma once
|
||||
#include "global.h"
|
||||
extern "C" {
|
||||
#include "lstate.h"
|
||||
}
|
||||
#include <set>
|
||||
#include <map>
|
||||
class CLua;
|
||||
|
@ -1,8 +1,10 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
extern "C" {
|
||||
#include "lua.h"
|
||||
#include "lualib.h"
|
||||
#include "lauxlib.h"
|
||||
#include "lauxlib.h"
|
||||
}
|
||||
//#include <luabind/luabind.hpp>
|
||||
//#include <luabind/function.hpp>
|
||||
//#include <luabind/class.hpp>
|
||||
|
2
CMT.cpp
2
CMT.cpp
@ -2,7 +2,7 @@
|
||||
//
|
||||
#include "stdafx.h"
|
||||
#include "SDL.h"
|
||||
#include "SDL_TTF.h"
|
||||
#include "SDL_ttf.h"
|
||||
#include "hch/CVideoHandler.h"
|
||||
#include "SDL_mixer.h"
|
||||
#include "hch/CBuildingHandler.h"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "stdafx.h"
|
||||
#include "CMessage.h"
|
||||
#include "SDL_TTF.h"
|
||||
#include "SDL_ttf.h"
|
||||
#include "hch/CSemiDefHandler.h"
|
||||
#include "hch/CDefHandler.h"
|
||||
#include "CGameInfo.h"
|
||||
|
@ -2,7 +2,7 @@
|
||||
#define CMESSAGE_H
|
||||
|
||||
#include "global.h"
|
||||
#include "SDL_TTF.h"
|
||||
#include "SDL_ttf.h"
|
||||
#include "SDL.h"
|
||||
#include "CPreGame.h"
|
||||
|
||||
|
@ -93,7 +93,7 @@ public:
|
||||
IntSelBut( SDL_Rect Pos, T Fun,CDefHandler* Imgs, bool Sel=false, CPoinGroup<T>* gr=NULL, int My=-1)
|
||||
: Button<T>(Pos,Fun,Imgs,Sel,gr),key(My){ourPoinGroup=gr;};
|
||||
void select(bool on=true) {(*this).Button<T>::select(on);ourPoinGroup->setYour(this);
|
||||
#ifndef __amigaos4__
|
||||
#if !defined(__amigaos4__) && !defined(__unix__)
|
||||
CPG->printRating();
|
||||
#else
|
||||
#warning not compile here
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include "stdafx.h"
|
||||
#include "SDL_Extensions.h"
|
||||
#include "SDL_TTF.h"
|
||||
#include "SDL_ttf.h"
|
||||
#include "CGameInfo.h"
|
||||
#include <iostream>
|
||||
#include <utility>
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include "CTownHandler.h"
|
||||
#include "CDefObjInfoHandler.h"
|
||||
#include "../SDL_Extensions.h"
|
||||
#include "boost\filesystem.hpp"
|
||||
#include "boost/filesystem.hpp"
|
||||
#include "../CGameState.h"
|
||||
#include "CLodHandler.h"
|
||||
#include <set>
|
||||
|
@ -114,7 +114,7 @@ struct SMKStruct
|
||||
class DLLHandler
|
||||
{
|
||||
public:
|
||||
#ifndef __amigaos4__
|
||||
#if !defined(__amigaos4__) && !defined(__unix__)
|
||||
HINSTANCE dll;
|
||||
#else
|
||||
void *dll;
|
||||
@ -131,7 +131,7 @@ class CBIKHandler
|
||||
public:
|
||||
DLLHandler ourLib;
|
||||
int newmode;
|
||||
#ifndef __amigaos4__
|
||||
#if !defined(__amigaos4__) && !defined(__unix__)
|
||||
HANDLE hBinkFile;
|
||||
#else
|
||||
void *hBinkFile;
|
||||
|
2
nodrze.h
2
nodrze.h
@ -189,7 +189,7 @@ template <typename T> void nodrze<T>::wypiszObficie(std::ostream & strum)
|
||||
template <typename T, class X> T* operator%(nodrze<T> & drzewko, X co)
|
||||
{
|
||||
CLOG ("Szukam " <<co <<std::endl);
|
||||
#ifndef __amigaos4__
|
||||
#if !defined(__amigaos4__) && !defined(__unix__)
|
||||
drzewko.wypiszObficie(*C->gl->loguj);
|
||||
#endif
|
||||
wezel<T> * w = drzewko.korzen;
|
||||
|
@ -42,6 +42,9 @@
|
||||
* NOTE: This tests _UNICODE, which is different from the UNICODE define
|
||||
* used to differentiate Win32 API calls.
|
||||
*/
|
||||
#ifdef __unix__
|
||||
#define _TCHAR char*
|
||||
#endif
|
||||
#ifdef _UNICODE
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user