mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-10 10:19:58 +00:00
AmigaOS4 support by afxgroup (patch #564)
This commit is contained in:
parent
d95b5d3a47
commit
cf10cc690b
@ -31,6 +31,7 @@ Version 1.1.7+SVN:
|
||||
* new or improved sounds: elf hit, yeti hit & die, magic missiles
|
||||
* engine changes
|
||||
* added healing animations
|
||||
* AmigaOS4 support (patch #564)
|
||||
|
||||
Version 1.1.7:
|
||||
* campaigns
|
||||
|
@ -527,6 +527,7 @@ Tomasz Sikorski (Tomsik)
|
||||
Joeri Melis
|
||||
Joshua Hudson
|
||||
Paul Smedley (Creeping)
|
||||
Andrea Palmatè (afxgroup)
|
||||
"
|
||||
[/about]
|
||||
|
||||
|
@ -436,9 +436,13 @@ std::string get_user_data_dir()
|
||||
return be_path.Path();
|
||||
#else
|
||||
|
||||
#ifndef __AMIGAOS4__
|
||||
static const char* const current_dir = ".";
|
||||
|
||||
const char* home_str = getenv("HOME");
|
||||
#else
|
||||
static const char* const current_dir = " ";
|
||||
const char* home_str = "PROGDIR:";
|
||||
#endif
|
||||
if(home_str == NULL)
|
||||
home_str = current_dir;
|
||||
|
||||
@ -448,8 +452,11 @@ std::string get_user_data_dir()
|
||||
#define PREFERENCES_DIR ".wesnoth"
|
||||
#endif
|
||||
|
||||
#ifndef __AMIGAOS4__
|
||||
const std::string dir_path = home + std::string("/") + PREFERENCES_DIR;
|
||||
DIR* dir = opendir(dir_path.c_str());
|
||||
#else
|
||||
const std::string dir_path = home + PREFERENCES_DIR;
|
||||
#endif DIR* dir = opendir(dir_path.c_str());
|
||||
if(dir == NULL) {
|
||||
const int res = mkdir(dir_path.c_str(),AccessMode);
|
||||
|
||||
|
@ -81,10 +81,14 @@ namespace game_config
|
||||
|
||||
|
||||
|
||||
#ifdef __AMIGAOS4__
|
||||
std::string path = "PROGDIR:";
|
||||
#else
|
||||
#ifdef WESNOTH_PATH
|
||||
std::string path = WESNOTH_PATH;
|
||||
#else
|
||||
std::string path = "";
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void load_config(const config* cfg)
|
||||
|
@ -126,9 +126,11 @@ static void wesnoth_setlocale(int category, std::string const &slocale)
|
||||
// FIXME: add configure check for unsetenv
|
||||
#ifndef _WIN32
|
||||
#ifndef SOLARIS
|
||||
#ifndef __AMIGAOS4__
|
||||
unsetenv ("LANGUAGE"); // void so no return value to check
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __BEOS__
|
||||
if(setenv ("LANG", locale, 1) == -1)
|
||||
|
@ -192,7 +192,7 @@ manager::manager(size_t nthreads) : free_(true)
|
||||
}
|
||||
|
||||
//on Unix-based systems, set sigpipe to be ignored
|
||||
#if !(defined(_WIN32) || defined(__APPLE__))
|
||||
#if !(defined(_WIN32) || defined(__APPLE__) || defined(__AMIGAOS4__))
|
||||
WRN_NW << "ignoring SIGPIPE\n";
|
||||
signal(SIGPIPE,SIG_IGN);
|
||||
#endif
|
||||
|
@ -28,6 +28,11 @@
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
#ifdef __AMIGAOS4__
|
||||
#include <unistd.h>
|
||||
//#include <sys/clib2_net.h>
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32) || defined(__WIN32__) || defined (WIN32)
|
||||
# undef INADDR_ANY
|
||||
# undef INADDR_BROADCAST
|
||||
|
@ -600,7 +600,7 @@ utf8_string capitalize(const utf8_string& s)
|
||||
{
|
||||
if(s.size() > 0) {
|
||||
utf8_iterator itor(s);
|
||||
#ifdef __APPLE__
|
||||
#if defined(__APPLE__) || defined(__AMIGAOS4__)
|
||||
// FIXME: Should we support towupper on recent OSX platforms?
|
||||
wchar_t uchar = *itor;
|
||||
if(uchar >= 0 && uchar < 0x100)
|
||||
@ -622,7 +622,7 @@ utf8_string uppercase(const utf8_string& s)
|
||||
std::string res;
|
||||
|
||||
for(;itor != utf8_iterator::end(s); ++itor) {
|
||||
#ifdef __APPLE__
|
||||
#if defined(__APPLE__) || defined(__AMIGAOS4__)
|
||||
// FIXME: Should we support towupper on recent OSX platforms?
|
||||
wchar_t uchar = *itor;
|
||||
if(uchar >= 0 && uchar < 0x100)
|
||||
@ -645,7 +645,7 @@ utf8_string lowercase(const utf8_string& s)
|
||||
std::string res;
|
||||
|
||||
for(;itor != utf8_iterator::end(s); ++itor) {
|
||||
#if defined(__APPLE__) || defined(__OpenBSD__)
|
||||
#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__AMIGAOS4__)
|
||||
// FIXME: Should we support towupper on recent OSX platforms?
|
||||
wchar_t uchar = *itor;
|
||||
if(uchar >= 0 && uchar < 0x100)
|
||||
|
@ -74,7 +74,7 @@ unsigned int get_flags(unsigned int flags)
|
||||
{
|
||||
//SDL under Windows doesn't seem to like hardware surfaces for
|
||||
//some reason.
|
||||
#if !(defined(_WIN32) || defined(__APPLE__))
|
||||
#if !(defined(_WIN32) || defined(__APPLE__) || defined(__AMIGAOS4__))
|
||||
flags |= SDL_HWSURFACE;
|
||||
#endif
|
||||
if((flags&SDL_FULLSCREEN) == 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user