1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 14:57:44 +00:00

fix 64bit build

This commit is contained in:
Tahir Akhlaq 2017-08-09 23:49:00 +01:00
parent 3db37945f4
commit 23e2bb4b7b
6 changed files with 9 additions and 10 deletions

View file

@ -7,9 +7,7 @@ before_install:
- sudo apt-get install -y software-properties-common
- sudo apt-get update
- sudo apt-get install gcc-4.9 g++-4.9 gcc-4.9-multilib g++-4.9-multilib
- sudo apt-get remove 'libboost.*'
- sudo apt-get remove 'libmysqlclient.*'
- sudo apt-get install libboost-dev:i386 libboost-all-dev:i386 libmysqlclient-dev:i386
- sudo apt-get install libboost-dev libboost-all-dev libmysqlclient-dev:i386
compiler:
- gcc

@ -1 +1 @@
Subproject commit 278556fc80472b87810348bfc2b988ae10a997c1
Subproject commit 0f6ea9ddd28f3defc69bb92413442c71db48e8b4

View file

@ -7,7 +7,7 @@ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../../libraries/external/ChaiSc
if(UNIX)
include_directories("/usr/include/mysql/")
message(STATUS "Setting GCC flags")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -m32")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
find_package(Boost ${SAPPHIRE_BOOST_VER} COMPONENTS log log_setup thread date_time filesystem system)
if(Boost_FOUND)

View file

@ -4,6 +4,7 @@
// Revised code--3/20/94
// Converted to C++ class 5/96, Jim Conger
#include <cstdint>
#include "blowfish.h"
#include "blowfish.h2" // holds the random digit tables
@ -103,7 +104,7 @@ void BlowFish::initialize (BYTE key[], int keybytes)
int v10 = keybytes;
int v9 = (int)key;
int v9 = (uintptr_t)key;
int v8 = 0;
int v11 = 0;
do {

View file

@ -15,7 +15,7 @@ set(Boost_USE_STATIC_LIBS ON)
if(UNIX)
include_directories("/usr/include/mysql/")
message(STATUS "Setting GCC flags")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 -m32")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
find_package(Boost ${SAPPHIRE_BOOST_VER} COMPONENTS log log_setup thread date_time filesystem system)
if(Boost_FOUND)

View file

@ -226,14 +226,14 @@ uint8_t Zone::getNextWeather()
{
auto zoneInfo = g_exdData.m_zoneInfoMap[ getLayoutId() ];
uint32_t unix = static_cast< uint32_t >( time( nullptr ) );
uint32_t unixTime = static_cast< uint32_t >( time( nullptr ) );
// Get Eorzea hour for weather start
uint32_t bell = unix / 175;
uint32_t bell = unixTime / 175;
// Do the magic 'cause for calculations 16:00 is 0, 00:00 is 8 and 08:00 is 16
int32_t increment = ( ( bell + 8 - ( bell % 8 ) ) ) % 24;
// Take Eorzea days since unix epoch
uint32_t totalDays = ( unix / 4200 );
uint32_t totalDays = ( unixTime / 4200 );
uint32_t calcBase = ( totalDays * 0x64 ) + increment;