Merge branch 'master' of github.com:supertuxkart/stk-code

This commit is contained in:
hiker 2014-09-29 22:45:21 +10:00
commit 7c429b2a2d
4 changed files with 39 additions and 20 deletions

View File

@ -171,7 +171,7 @@ endif()
# Set some compiler options
if(UNIX)
if(UNIX OR MINGW)
add_definitions(-Wall)
endif()
@ -181,6 +181,9 @@ if(WIN32)
# And shut up about unsafe stuff
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
endif()
if(MSVC)
# VS will automatically add NDEBUG for release mode, but only _DEBUG in debug mode.
# Since STK uses DEBUG, this is added for debug compilation only:
set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG)

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?>
<particles emitter="sphere" radius="5">
<particles emitter="sphere" radius="2">
<spreading angle="45" />
<spreading angle="12" />
<velocity x="0.000"
y="0.005"
@ -18,8 +18,8 @@
max="2000" />
<!-- Size of the particles -->
<size min="4.0"
max="7.2"
<size min="2.0"
max="3.2"
x-increase-factor="2.6"
y-increase-factor="2.6" />

View File

@ -1,17 +1,17 @@
<?xml version="1.0"?>
<particles emitter="box" box_x="12.0" box_y="0.5" box_z="12.0">
<particles emitter="box" box_x="3.0" box_y="0.5" box_z="3.0">
<spreading angle="24" />
<spreading angle="45" />
<velocity x="0.000"
y="0.005"
y="0.001"
z="0.000" />
<material file="waterparticles.png" />
<!-- Amount of particles emitted per second -->
<rate min="5"
max="20" />
<rate min="1"
max="6" />
<!-- Minimal and maximal lifetime of a particle, in milliseconds. -->
<lifetime min="1000"

View File

@ -25,16 +25,11 @@
#include "utils/time.hpp"
#include <string.h>
#if defined(WIN32) && !defined(__MINGW32__)
#if defined(WIN32)
# include "Ws2tcpip.h"
# define inet_ntop InetNtop
// TODO: It's very ugly hack which allows to compile STK on windows using gcc.
// Solution would be nice seen.
#elif defined(__MINGW32__)
# include "Ws2tcpip.h"
# define inet_ntop
# if defined(InetNtop)
# define inet_ntop InetNtop
# endif
#else
# include <arpa/inet.h>
# include <errno.h>
@ -42,6 +37,27 @@
#include <pthread.h>
#include <signal.h>
#if !defined(inet_ntop)
const char* inet_ntop(int af, const void* src, char* dst, int cnt)
{
struct sockaddr_in srcaddr;
memset(&srcaddr, 0, sizeof(struct sockaddr_in));
memcpy(&(srcaddr.sin_addr), src, sizeof(srcaddr.sin_addr));
srcaddr.sin_family = af;
if (WSAAddressToString((struct sockaddr*) &srcaddr,
sizeof(struct sockaddr_in), 0, dst, (LPDWORD) &cnt) != 0)
{
DWORD rv = WSAGetLastError();
printf("WSAAddressToString() : %d\n",rv);
return NULL;
}
return dst;
}
#endif
FILE* STKHost::m_log_file = NULL;
pthread_mutex_t STKHost::m_log_mutex;
@ -98,7 +114,7 @@ STKHost::STKHost()
pthread_mutex_init(&m_log_mutex, NULL);
if (UserConfigParams::m_packets_log_filename.toString() != "")
{
std::string s =
std::string s =
file_manager->getUserConfigFile(UserConfigParams::m_packets_log_filename);
m_log_file = fopen(s.c_str(), "w+");
}