Show
Ignore:
Timestamp:
11/19/08 13:27:40 (17 years ago)
Author:
yumileroy
Message:

[svn] * Merge Temp dev SVN with Assembla.
* Changes include:

  • Implementation of w12x's Outdoor PvP and Game Event Systems.
  • Temporary removal of IRC Chat Bot (until infinite loop when disabled is fixed).
  • All mangos -> trinity (to convert your mangos_string table, please run mangos_string_to_trinity_string.sql).
  • Improved Config cleanup.
  • And many more changes.

Original author: Seline
Date: 2008-10-14 11:57:03-05:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/framework/Platform/Define.h

    r2 r44  
    11/*  
    2  * Copyright (C) 2005-2008 MaNGOS <http://www.mangosproject.org/> 
     2 * Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 
     3 * 
     4 * Thanks to the original authors: MaNGOS <http://www.mangosproject.org/> 
    35 * 
    46 * This program is free software; you can redistribute it and/or modify 
     
    911 * This program is distributed in the hope that it will be useful, 
    1012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
    1214 * GNU General Public License for more details. 
    1315 * 
    1416 * You should have received a copy of the GNU General Public License 
    1517 * along with this program; if not, write to the Free Software 
    16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
     18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
    1719 */ 
    1820 
    19 #ifndef MANGOS_DEFINE_H 
    20 #define MANGOS_DEFINE_H 
     21#ifndef TRINITY_DEFINE_H 
     22#define TRINITY_DEFINE_H 
    2123 
    2224#include "Platform/CompilerDefs.h" 
     
    8890*/ 
    8991 
    90 #define MANGOS_LITTLEENDIAN 0 
    91 #define MANGOS_BIGENDIAN    1 
    92  
    93 #if !defined(MANGOS_ENDIAN) 
     92#define TRINITY_LITTLEENDIAN 0 
     93#define TRINITY_BIGENDIAN    1 
     94 
     95#if !defined(TRINITY_ENDIAN) 
    9496#  if defined(LITTLE_ENDIAN) || defined(BIG_ENDIAN) 
    9597#    if defined(LITTLE_ENDIAN) && defined(BIG_ENDIAN) 
    9698#      if defined(BYTE_ORDER) 
    9799#        if   (BYTE_ORDER == LITTLE_ENDIAN) 
    98 #          define MANGOS_ENDIAN MANGOS_LITTLEENDIAN 
     100#          define TRINITY_ENDIAN TRINITY_LITTLEENDIAN 
    99101#        elif (BYTE_ORDER == BIG_ENDIAN) 
    100 #          define MANGOS_ENDIAN MANGOS_BIGENDIAN 
     102#          define TRINITY_ENDIAN TRINITY_BIGENDIAN 
    101103#        endif 
    102104#      endif 
    103105#    elif defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN)  
    104 #      define MANGOS_ENDIAN MANGOS_LITTLEENDIAN 
     106#      define TRINITY_ENDIAN TRINITY_LITTLEENDIAN 
    105107#    elif !defined(LITTLE_ENDIAN) && defined(BIG_ENDIAN) 
    106 #      define MANGOS_ENDIAN MANGOS_BIGENDIAN 
     108#      define TRINITY_ENDIAN TRINITY_BIGENDIAN 
    107109#    endif 
    108110#  elif defined(_LITTLE_ENDIAN) || defined(_BIG_ENDIAN) 
     
    110112#      if defined(_BYTE_ORDER) 
    111113#        if   (_BYTE_ORDER == _LITTLE_ENDIAN) 
    112 #          define MANGOS_ENDIAN MANGOS_LITTLEENDIAN 
     114#          define TRINITY_ENDIAN TRINITY_LITTLEENDIAN 
    113115#        elif (_BYTE_ORDER == _BIG_ENDIAN) 
    114 #          define MANGOS_ENDIAN MANGOS_BIGENDIAN 
     116#          define TRINITY_ENDIAN TRINITY_BIGENDIAN 
    115117#        endif 
    116118#      endif 
    117119#    elif defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)  
    118 #      define MANGOS_ENDIAN MANGOS_LITTLE_ENDIAN 
     120#      define TRINITY_ENDIAN TRINITY_LITTLE_ENDIAN 
    119121#    elif !defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN) 
    120 #      define MANGOS_ENDIAN MANGOS_BIGENDIAN 
     122#      define TRINITY_ENDIAN TRINITY_BIGENDIAN 
    121123#    endif 
    122124#  elif 0     /* **** EDIT HERE IF NECESSARY **** */ 
    123 #    define MANGOS_ENDIAN MANGOS_LITTLEENDIAN 
     125#    define TRINITY_ENDIAN TRINITY_LITTLEENDIAN 
    124126#  elif 0     /* **** EDIT HERE IF NECESSARY **** */ 
    125 #    define MANGOS_ENDIAN MANGOS_BIGENDIAN 
     127#    define TRINITY_ENDIAN TRINITY_BIGENDIAN 
    126128#  elif (('1234' >> 24) == '1') 
    127 #    define MANGOS_ENDIAN MANGOS_LITTLEENDIAN 
     129#    define TRINITY_ENDIAN TRINITY_LITTLEENDIAN 
    128130#  elif (('4321' >> 24) == '1') 
    129 #    define MANGOS_ENDIAN MANGOS_BIGENDIAN 
    130 #  else 
    131 #    define MANGOS_ENDIAN MANGOS_LITTLEENDIAN 
     131#    define TRINITY_ENDIAN TRINITY_BIGENDIAN 
     132#  else 
     133#    define TRINITY_ENDIAN TRINITY_LITTLEENDIAN 
    132134#  endif 
    133135#endif 
     
    136138 
    137139#if PLATFORM == PLATFORM_WINDOWS 
    138 #define MANGOS_EXPORT __declspec(dllexport) 
    139 #define MANGOS_LIBRARY_HANDLE HMODULE 
    140 #define MANGOS_LOAD_LIBRARY(a) LoadLibrary(a) 
    141 #define MANGOS_CLOSE_LIBRARY FreeLibrary 
    142 #define MANGOS_GET_PROC_ADDR GetProcAddress 
    143 #define MANGOS_IMPORT __cdecl 
    144 #define MANGOS_SCRIPT_EXT ".dll" 
    145 #define MANGOS_SCRIPT_NAME "TrinityScript" 
    146 #else 
    147 #define MANGOS_LIBRARY_HANDLE void* 
    148 #define MANGOS_EXPORT export 
    149 #define MANGOS_LOAD_LIBRARY(a) dlopen(a,RTLD_NOW) 
    150 #define MANGOS_CLOSE_LIBRARY dlclose 
    151 #define MANGOS_GET_PROC_ADDR dlsym 
     140#define TRINITY_EXPORT __declspec(dllexport) 
     141#define TRINITY_LIBRARY_HANDLE HMODULE 
     142#define TRINITY_LOAD_LIBRARY(a) LoadLibrary(a) 
     143#define TRINITY_CLOSE_LIBRARY FreeLibrary 
     144#define TRINITY_GET_PROC_ADDR GetProcAddress 
     145#define TRINITY_IMPORT __cdecl 
     146#define TRINITY_SCRIPT_EXT ".dll" 
     147#define TRINITY_SCRIPT_NAME "TrinityScript" 
     148#else 
     149#define TRINITY_LIBRARY_HANDLE void* 
     150#define TRINITY_EXPORT export 
     151#define TRINITY_LOAD_LIBRARY(a) dlopen(a,RTLD_NOW) 
     152#define TRINITY_CLOSE_LIBRARY dlclose 
     153#define TRINITY_GET_PROC_ADDR dlsym 
    152154 
    153155#if defined(__APPLE_CC__) && defined(BIG_ENDIAN) 
    154 #define MANGOS_IMPORT __attribute__ ((longcall)) 
    155 #else 
    156 #define MANGOS_IMPORT __attribute__ ((cdecl)) 
    157 #endif 
    158  
    159 #define MANGOS_SCRIPT_EXT ".so" 
    160 #define MANGOS_SCRIPT_NAME "libtrinityscript" 
     156#define TRINITY_IMPORT __attribute__ ((longcall)) 
     157#else 
     158#define TRINITY_IMPORT __attribute__ ((cdecl)) 
     159#endif 
     160 
     161#define TRINITY_SCRIPT_EXT ".so" 
     162#define TRINITY_SCRIPT_NAME "libtrinityscript" 
    161163#endif 
    162164 
    163165#ifdef WIN32 
    164 #ifdef MANGOS_WIN32_DLL_IMPORT 
    165  
    166 #define MANGOS_DLL_DECL __declspec(dllimport) 
    167 #else 
    168 #ifdef MANGOS_WIND_DLL_EXPORT 
    169 #define MANGOS_DLL_DECL __declspec(dllexport) 
    170 #else 
    171 #define MANGOS_DLL_DECL 
    172 #endif 
    173 #endif 
    174  
    175 #else 
    176 #define MANGOS_DLL_DECL 
     166#ifdef TRINITY_WIN32_DLL_IMPORT 
     167 
     168#define TRINITY_DLL_DECL __declspec(dllimport) 
     169#else 
     170#ifdef TRINITY_WIND_DLL_EXPORT 
     171#define TRINITY_DLL_DECL __declspec(dllexport) 
     172#else 
     173#define TRINITY_DLL_DECL 
     174#endif 
     175#endif 
     176 
     177#else 
     178#define TRINITY_DLL_DECL 
    177179#endif 
    178180 
    179181#ifndef DEBUG 
    180 #define MANGOS_INLINE inline 
    181 #else 
    182 #ifndef MANGOS_DEBUG 
    183 #define MANGOS_DEBUG 
    184 #endif 
    185 #define MANGOS_INLINE 
     182#define TRINITY_INLINE inline 
     183#else 
     184#ifndef TRINITY_DEBUG 
     185#define TRINITY_DEBUG 
     186#endif 
     187#define TRINITY_INLINE 
    186188#endif 
    187189 
     
    210212 
    211213#if PLATFORM == PLATFORM_WINDOWS 
    212 #  define MANGOS_DLL_SPEC __declspec(dllexport) 
     214#  define TRINITY_DLL_SPEC __declspec(dllexport) 
    213215#  ifndef DECLSPEC_NORETURN 
    214216#    define DECLSPEC_NORETURN __declspec(noreturn) 
    215217#  endif 
    216218#else 
    217 #  define MANGOS_DLL_SPEC 
     219#  define TRINITY_DLL_SPEC 
    218220#  define DECLSPEC_NORETURN 
    219221#endif