Update Android, remove content_cso
parent
e48a6e0b7a
commit
a2a0b0ae47
|
@ -58,7 +58,6 @@ LEVELDB_DIR = $(ANDR_ROOT)/deps/leveldb
|
|||
LEVELDB_LIB = $(LEVELDB_DIR)/out-static/libleveldb.a
|
||||
LEVELDB_TIMESTAMP = $(LEVELDB_DIR)/timestamp
|
||||
LEVELDB_TIMESTAMP_INT = $(ANDR_ROOT)/deps/leveldb_timestamp
|
||||
#LEVELDB_URL_GIT = https://github.com/google/leveldb
|
||||
|
||||
#OPENAL_URL = https://github.com/MoNTE48/openal-soft/releases/download/$(OPENAL_VER)/$(OPENAL_VER).zip
|
||||
#OPENAL_VER = openal-soft-1.17.2-dev
|
||||
|
@ -141,23 +140,6 @@ ANDROID_SDK = $(shell grep '^sdk\.dir' local.properties | sed 's/^.*=[[:space:]]
|
|||
ANDROID_NDK = $(shell grep '^ndk\.dir' local.properties | sed 's/^.*=[[:space:]]*//')
|
||||
NDK_MODULE_PATH = $(ANDROID_NDK)/toolchains
|
||||
|
||||
|
||||
.PHONY : debug release reconfig delconfig \
|
||||
leveldb_download clean_leveldb leveldb\
|
||||
irrlicht_download clean_irrlicht irrlicht \
|
||||
clean_assets assets \
|
||||
freetype_download clean_freetype freetype \
|
||||
luajit_download clean_luajit luajit \
|
||||
apk clean_apk \
|
||||
clean_all clean prep_srcdir \
|
||||
install_debug install_release envpaths all \
|
||||
$(ASSETS_TIMESTAMP) $(LUAJIT_TIMESTAMP) \
|
||||
$(OPENAL_TIMESTAMP) $(VORBIS_TIMESTAMP) \
|
||||
$(IRRLICHT_TIMESTAMP) $(CURL_TIMESTAMP) \
|
||||
$(ANDR_ROOT)/jni/src/android_version.h \
|
||||
$(ANDR_ROOT)/jni/src/android_version_githash.h
|
||||
# $(OPENSSL_TIMESTAMP) \
|
||||
|
||||
debug : local.properties
|
||||
export NDEBUG=; \
|
||||
export BUILD_TYPE=debug; \
|
||||
|
@ -347,7 +329,6 @@ leveldb_download :
|
|||
echo "leveldb sources missing, downloading..."; \
|
||||
mkdir -p ${ANDR_ROOT}/deps; \
|
||||
cd ${ANDR_ROOT}/deps ; \
|
||||
# git clone ${LEVELDB_URL_GIT} || exit 1; \
|
||||
wget ${LEVELDB_URL} || exit 1; \
|
||||
unzip v${LEVELDB_VER}.zip || exit 1; \
|
||||
rm v${LEVELDB_VER}.zip || exit 1; \
|
||||
|
@ -503,7 +484,7 @@ $(ICONV_LIB) : $(ICONV_TIMESTAMP)
|
|||
$(MAKE) -s || exit 1; \
|
||||
touch ${ICONV_TIMESTAMP}; \
|
||||
touch ${ICONV_TIMESTAMP_INT}; \
|
||||
rm -rf ${TOOLCHAIN}; \
|
||||
rm -rf $${TOOLCHAIN}; \
|
||||
else \
|
||||
echo "nothing to be done for iconv"; \
|
||||
fi
|
||||
|
@ -527,43 +508,6 @@ intl_download :
|
|||
mv libintl-lite-master libintl; \
|
||||
fi
|
||||
|
||||
intl : $(INTL_LIB)
|
||||
|
||||
$(INTL_LIB) : $(INTL_TIMESTAMP)
|
||||
@REFRESH=0; \
|
||||
if [ ! -e ${INTL_TIMESTAMP_INT} ] ; then \
|
||||
REFRESH=1; \
|
||||
fi; \
|
||||
if [ ! -e ${INTL_LIB} ] ; then \
|
||||
REFRESH=1; \
|
||||
fi; \
|
||||
if [ ${INTL_TIMESTAMP} -nt ${INTL_TIMESTAMP_INT} ] ; then \
|
||||
REFRESH=1; \
|
||||
fi; \
|
||||
if [ $$REFRESH -ne 0 ] ; then \
|
||||
mkdir -p ${INTL_DIR}; \
|
||||
echo "changed timestamp for intl detected building..."; \
|
||||
cd ${INTL_DIR}; \
|
||||
export TOOLCHAIN=/tmp/ndk-${TARGET_HOST}-intl; \
|
||||
${ANDROID_NDK}/build/tools/make-standalone-toolchain.sh \
|
||||
--toolchain=${TARGET_TOOLCHAIN}-${COMPILER_VERSION} \
|
||||
--platform=${APP_PLATFORM} --install-dir=$${TOOLCHAIN}; \
|
||||
export PATH="$${TOOLCHAIN}/bin:$${PATH}"; \
|
||||
cd internal; \
|
||||
export TARGET_OS=OS_ANDROID_CROSSCOMPILE; \
|
||||
export CPPFLAGS="$${CPPFLAGS} ${TARGET_CXXFLAGS_ADDON}"; \
|
||||
export CFLAGS="$${CFLAGS} ${TARGET_CFLAGS_ADDON}"; \
|
||||
export LDFLAGS="$${LDFLAGS} ${TARGET_LDFLAGS_ADDON}"; \
|
||||
${CROSS_PREFIX}g++ -O3 -c libintl.cpp -o libintl.o || exit 1; \
|
||||
${CROSS_PREFIX}ar rs ../libintl.a libintl.o || exit 1; \
|
||||
cd ..; \
|
||||
touch ${INTL_TIMESTAMP}; \
|
||||
touch ${INTL_TIMESTAMP_INT}; \
|
||||
rm -rf ${TOOLCHAIN}; \
|
||||
else \
|
||||
echo "nothing to be done for intl"; \
|
||||
fi
|
||||
|
||||
clean_intl :
|
||||
$(RM) -rf ${INTL_DIR}
|
||||
|
||||
|
@ -739,6 +683,21 @@ $(MPIR_LIB): $(MPIR_TIMESTAMP)
|
|||
clean_mpir:
|
||||
$(RM) -R deps/mpir
|
||||
|
||||
sqlite3_download :
|
||||
@if [ ! -d ${SQLITE3_DIR} ] ; then \
|
||||
echo "libintl sources missing, downloading..."; \
|
||||
mkdir -p ${ANDR_ROOT}/deps; \
|
||||
cd ${ANDR_ROOT}/deps; \
|
||||
rm -R sqlite; \
|
||||
wget ${SQLITE3_URL}; \
|
||||
unzip sqlite-amalgamation-$(SQLITE3_VERSION).zip || exit 1; \
|
||||
rm sqlite-amalgamation-$(SQLITE3_VERSION).zip; \
|
||||
mv sqlite-amalgamation-$(SQLITE3_VERSION) sqlite; \
|
||||
fi
|
||||
|
||||
clean_sqlite3 :
|
||||
$(RM) -rf ${SQLITE3_DIR}
|
||||
|
||||
$(ASSETS_TIMESTAMP) : $(IRRLICHT_LIB)
|
||||
@mkdir -p ${ANDR_ROOT}/deps; \
|
||||
for DIRNAME in {builtin,client,doc,fonts,games,po,textures}; do \
|
||||
|
@ -875,16 +834,9 @@ clean_assets :
|
|||
|
||||
# $(MPIR_LIB)
|
||||
apk: local.properties $(ICONV_LIB) $(IRRLICHT_LIB) $(CURL_LIB) $(LEVELDB_LIB) $(LUAJIT_LIB) \
|
||||
$(OPENAL_LIB) $(VORBIS_LIB) $(INTL_LIB) prep_srcdir $(ANDR_ROOT)/jni/src/android_version.h \
|
||||
$(ANDR_ROOT)/jni/src/android_version_githash.h assets
|
||||
+@cd ${ANDR_ROOT}/deps; \
|
||||
rm -R sqlite; \
|
||||
wget ${SQLITE3_URL}; \
|
||||
unzip sqlite-amalgamation-$(SQLITE3_VERSION).zip || exit 1; \
|
||||
rm sqlite-amalgamation-$(SQLITE3_VERSION).zip; \
|
||||
mv sqlite-amalgamation-$(SQLITE3_VERSION) sqlite; \
|
||||
cd ..; \
|
||||
${ANDROID_NDK}/ndk-build NDK_MODULE_PATH=${NDK_MODULE_PATH} \
|
||||
$(OPENAL_LIB) $(VORBIS_LIB) prep_srcdir $(ANDR_ROOT)/jni/src/android_version.h \
|
||||
$(ANDR_ROOT)/jni/src/android_version_githash.h sqlite3_download intl_download assets
|
||||
+@${ANDROID_NDK}/ndk-build NDK_MODULE_PATH=${NDK_MODULE_PATH} \
|
||||
GPROF=${GPROF} APP_ABI=${TARGET_ABI} \
|
||||
APP_PLATFORM=${APP_PLATFORM} \
|
||||
NDK_TOOLCHAIN_VERSION=${COMPILER_VERSION} \
|
||||
|
@ -963,4 +915,3 @@ $(ANDR_ROOT)/jni/src/android_version.h : prep_srcdir
|
|||
fi
|
||||
|
||||
clean : clean_apk clean_assets
|
||||
|
||||
|
|
|
@ -27,11 +27,6 @@ LOCAL_MODULE := iconv
|
|||
LOCAL_SRC_FILES := deps/libiconv/lib/.libs/libiconv.a
|
||||
include $(PREBUILT_STATIC_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := intl
|
||||
LOCAL_SRC_FILES := deps/libintl/libintl.a
|
||||
include $(PREBUILT_STATIC_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := openal
|
||||
LOCAL_SRC_FILES := deps/openal-soft/android/obj/local/$(APP_ABI)/libopenal.a
|
||||
|
@ -62,15 +57,14 @@ LOCAL_CFLAGS := -D_IRR_ANDROID_PLATFORM_ \
|
|||
-DUSE_GETTEXT=1 \
|
||||
-DUSE_LEVELDB=1 \
|
||||
$(GPROF_DEF) \
|
||||
-pipe -fstrict-aliasing
|
||||
# -DUSE_GETTEXT=1
|
||||
-pipe
|
||||
|
||||
ifndef NDEBUG
|
||||
LOCAL_CFLAGS += -g -D_DEBUG -O0 -fno-omit-frame-pointer
|
||||
else
|
||||
|
||||
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
|
||||
LOCAL_CFLAGS += -mfpu=vfpv3-d16 -march=armv7-a -Ofast -fno-fast-math -funsafe-math-optimizations -fno-trapping-math -ffinite-math-only -fno-rounding-math -fno-signaling-nans -fdata-sections -ffunction-sections -fmodulo-sched -fmodulo-sched-allow-regmoves -fvisibility=hidden
|
||||
LOCAL_CFLAGS += -mfpu=vfpv3-d16 -march=armv7-a -Ofast -fno-fast-math -funsafe-math-optimizations -ffinite-math-only -fno-rounding-math -fno-signaling-nans -fcx-limited-range -fdata-sections -ffunction-sections -fmodulo-sched -fmodulo-sched-allow-regmoves -fvisibility=hidden
|
||||
LOCAL_CXXFLAGS += -mfpu=vfpv3-d16 -march=armv7-a -Ofast -fdata-sections -ffunction-sections -fmodulo-sched -fmodulo-sched-allow-regmoves -fvisibility=hidden
|
||||
LOCAL_LDFLAGS = -Wl,--no-warn-mismatch,--gc-sections
|
||||
endif
|
||||
|
@ -232,7 +226,6 @@ LOCAL_SRC_FILES := \
|
|||
jni/src/client/tile.cpp \
|
||||
jni/src/util/sha256.c \
|
||||
jni/src/gmp/mini-gmp.c
|
||||
# jni/src/content_cso.cpp
|
||||
|
||||
# Network
|
||||
LOCAL_SRC_FILES += \
|
||||
|
@ -289,6 +282,9 @@ LOCAL_SRC_FILES += jni/src/cguittfont/xCGUITTFont.cpp
|
|||
# SQLite3
|
||||
LOCAL_SRC_FILES += deps/sqlite/sqlite3.c
|
||||
|
||||
# libIntl
|
||||
LOCAL_SRC_FILES += deps/libintl/internal/libintl.cpp
|
||||
|
||||
# Threading
|
||||
LOCAL_SRC_FILES += \
|
||||
jni/src/threading/event.cpp \
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
APP_MODULES := multicraft
|
||||
APP_STL := gnustl_shared
|
||||
#APP_STL := c++_shared
|
||||
#LIBCXX_FORCE_REBUILD := true
|
||||
APP_CPPFLAGS += -fexceptions -frtti -std=c++11
|
||||
|
|
|
@ -469,7 +469,6 @@ set(client_SRCS
|
|||
clientobject.cpp
|
||||
clouds.cpp
|
||||
content_cao.cpp
|
||||
content_cso.cpp
|
||||
content_mapblock.cpp
|
||||
convert_json.cpp
|
||||
drawscene.cpp
|
||||
|
|
|
@ -37,8 +37,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "mesh.h"
|
||||
#include "itemdef.h"
|
||||
#include "tool.h"
|
||||
//disable
|
||||
//#include "content_cso.h"
|
||||
#include "sound.h"
|
||||
#include "nodedef.h"
|
||||
#include "localplayer.h"
|
||||
|
|
|
@ -1,91 +0,0 @@
|
|||
/*
|
||||
Minetest
|
||||
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 3.0 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include "content_cso.h"
|
||||
#include <IBillboardSceneNode.h>
|
||||
#include "client/tile.h"
|
||||
#include "environment.h"
|
||||
#include "gamedef.h"
|
||||
#include "log.h"
|
||||
#include "map.h"
|
||||
|
||||
/*
|
||||
static void setBillboardTextureMatrix(scene::IBillboardSceneNode *bill,
|
||||
float txs, float tys, int col, int row)
|
||||
{
|
||||
video::SMaterial& material = bill->getMaterial(0);
|
||||
core::matrix4& matrix = material.getTextureMatrix(0);
|
||||
matrix.setTextureTranslate(txs*col, tys*row);
|
||||
matrix.setTextureScale(txs, tys);
|
||||
}
|
||||
*/
|
||||
|
||||
class SmokePuffCSO: public ClientSimpleObject
|
||||
{
|
||||
float m_age;
|
||||
scene::IBillboardSceneNode *m_spritenode;
|
||||
public:
|
||||
SmokePuffCSO(scene::ISceneManager *smgr,
|
||||
ClientEnvironment *env, v3f pos, v2f size):
|
||||
m_age(0),
|
||||
m_spritenode(NULL)
|
||||
{
|
||||
infostream<<"SmokePuffCSO: constructing"<<std::endl;
|
||||
m_spritenode = smgr->addBillboardSceneNode(
|
||||
NULL, v2f(1,1), pos, -1);
|
||||
m_spritenode->setMaterialTexture(0,
|
||||
env->getGameDef()->tsrc()->getTextureForMesh("smoke_puff.png"));
|
||||
m_spritenode->setMaterialFlag(video::EMF_LIGHTING, false);
|
||||
m_spritenode->setMaterialFlag(video::EMF_BILINEAR_FILTER, false);
|
||||
//m_spritenode->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF);
|
||||
m_spritenode->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL);
|
||||
m_spritenode->setMaterialFlag(video::EMF_FOG_ENABLE, true);
|
||||
m_spritenode->setColor(video::SColor(255,0,0,0));
|
||||
m_spritenode->setVisible(true);
|
||||
m_spritenode->setSize(size);
|
||||
/* Update brightness */
|
||||
u8 light;
|
||||
bool pos_ok;
|
||||
MapNode n = env->getMap().getNodeNoEx(floatToInt(pos, BS), &pos_ok);
|
||||
light = pos_ok ? decode_light(n.getLightBlend(env->getDayNightRatio(),
|
||||
env->getGameDef()->ndef()))
|
||||
: 64;
|
||||
video::SColor color(255,light,light,light);
|
||||
m_spritenode->setColor(color);
|
||||
}
|
||||
virtual ~SmokePuffCSO()
|
||||
{
|
||||
infostream<<"SmokePuffCSO: destructing"<<std::endl;
|
||||
m_spritenode->remove();
|
||||
}
|
||||
void step(float dtime)
|
||||
{
|
||||
m_age += dtime;
|
||||
if(m_age > 1.0){
|
||||
m_to_be_removed = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
ClientSimpleObject* createSmokePuff(scene::ISceneManager *smgr,
|
||||
ClientEnvironment *env, v3f pos, v2f size)
|
||||
{
|
||||
return new SmokePuffCSO(smgr, env, pos, size);
|
||||
}
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
/*
|
||||
Minetest
|
||||
Copyright (C) 2013 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 3.0 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#ifndef CONTENT_CSO_HEADER
|
||||
#define CONTENT_CSO_HEADER
|
||||
|
||||
#include "irrlichttypes_extrabloated.h"
|
||||
#include "clientsimpleobject.h"
|
||||
|
||||
ClientSimpleObject* createSmokePuff(scene::ISceneManager *smgr,
|
||||
ClientEnvironment *env, v3f pos, v2f size);
|
||||
|
||||
#endif
|
||||
|
|
@ -520,7 +520,7 @@ void draw_load_screen(const std::wstring &text, IrrlichtDevice* device,
|
|||
driver->draw2DRectangle(video::SColor(255, 64, 64, 64), core::rect<s32> (
|
||||
barrect.UpperLeftCorner + 1,
|
||||
barrect.LowerRightCorner-1), NULL); // black inside the bar
|
||||
driver->draw2DRectangle(video::SColor(255, 128, 128, 128), core::rect<s32> (
|
||||
driver->draw2DRectangle(video::SColor(255, 255 - percent * 2, percent * 2, 48), core::rect<s32> (
|
||||
barrect.UpperLeftCorner + 1,
|
||||
core::vector2d<s32>(
|
||||
barrect.LowerRightCorner.X -
|
||||
|
|
Loading…
Reference in New Issue