Przeglądaj źródła

build: lol-build now passes flags to configure, and configure now uses

optimisation flag -Os instead of -O3.
legacy
Sam Hocevar sam 11 lat temu
rodzic
commit
98f8246323
19 zmienionych plików z 135 dodań i 87 usunięć
  1. +3
    -3
      build/build-android
  2. +3
    -3
      build/build-html
  3. +3
    -3
      build/build-mingw
  4. +3
    -3
      build/build-mingw64
  5. +3
    -3
      build/build-nacl32
  6. +3
    -3
      build/build-nacl64
  7. +3
    -3
      build/build-ps3
  8. +3
    -3
      build/build-raspi
  9. +46
    -13
      build/lol-build
  10. +32
    -17
      configure.ac
  11. +2
    -2
      src/dict.cpp
  12. +4
    -4
      src/entity.cpp
  13. +1
    -1
      src/entity.h
  14. +4
    -4
      src/image/codec/android-image.cpp
  15. +5
    -5
      src/image/codec/gdiplus-image.cpp
  16. +1
    -1
      src/image/codec/ios-image.cpp
  17. +1
    -1
      src/image/codec/sdl-image.cpp
  18. +14
    -14
      src/ticker.cpp
  19. +1
    -1
      test/unit/build.cpp

+ 3
- 3
build/build-android Wyświetl plik

@@ -4,7 +4,7 @@
make distclean

set -e
./build/lol-build bootstrap android-arm
./build/lol-build configure android-arm
./build/lol-build build android-arm
./build/lol-build "$@" bootstrap android-arm
./build/lol-build "$@" configure android-arm
./build/lol-build "$@" build android-arm


+ 3
- 3
build/build-html Wyświetl plik

@@ -4,7 +4,7 @@
make distclean

set -e
./build/lol-build bootstrap emscripten-html
./build/lol-build configure emscripten-html
./build/lol-build build emscripten-html
./build/lol-build "$@" bootstrap emscripten-html
./build/lol-build "$@" configure emscripten-html
./build/lol-build "$@" build emscripten-html


+ 3
- 3
build/build-mingw Wyświetl plik

@@ -4,7 +4,7 @@
make distclean

set -e
./build/lol-build bootstrap windows-i386
./build/lol-build configure windows-i386
./build/lol-build build windows-i386
./build/lol-build "$@" bootstrap windows-i386
./build/lol-build "$@" configure windows-i386
./build/lol-build "$@" build windows-i386


+ 3
- 3
build/build-mingw64 Wyświetl plik

@@ -4,7 +4,7 @@
make distclean

set -e
./build/lol-build bootstrap windows-amd64
./build/lol-build configure windows-amd64
./build/lol-build build windows-amd64
./build/lol-build "$@" bootstrap windows-amd64
./build/lol-build "$@" configure windows-amd64
./build/lol-build "$@" build windows-amd64


+ 3
- 3
build/build-nacl32 Wyświetl plik

@@ -4,7 +4,7 @@
make distclean

set -e
./build/lol-build bootstrap nacl-i386
./build/lol-build configure nacl-i386
./build/lol-build build nacl-i386
./build/lol-build "$@" bootstrap nacl-i386
./build/lol-build "$@" configure nacl-i386
./build/lol-build "$@" build nacl-i386


+ 3
- 3
build/build-nacl64 Wyświetl plik

@@ -4,7 +4,7 @@
make distclean

set -e
./build/lol-build bootstrap nacl-amd64
./build/lol-build configure nacl-amd64
./build/lol-build build nacl-amd64
./build/lol-build "$@" bootstrap nacl-amd64
./build/lol-build "$@" configure nacl-amd64
./build/lol-build "$@" build nacl-amd64


+ 3
- 3
build/build-ps3 Wyświetl plik

@@ -4,7 +4,7 @@
make distclean

set -e
./build/lol-build bootstrap ps3-ppu
./build/lol-build configure ps3-ppu
./build/lol-build build ps3-ppu
./build/lol-build "$@" bootstrap ps3-ppu
./build/lol-build "$@" configure ps3-ppu
./build/lol-build "$@" build ps3-ppu


+ 3
- 3
build/build-raspi Wyświetl plik

@@ -4,7 +4,7 @@
make distclean

set -e
./build/lol-build bootstrap raspi-arm
./build/lol-build configure raspi-arm
./build/lol-build build raspi-arm
./build/lol-build "$@" bootstrap raspi-arm
./build/lol-build "$@" configure raspi-arm
./build/lol-build "$@" build raspi-arm


+ 46
- 13
build/lol-build Wyświetl plik

@@ -3,7 +3,12 @@
#
# Lol Engine build script
# Usage:
# lol-build <action> [<platform>]
# lol-build [<flags>...] <action> [<platform>]
#
# Supported flags:
# --enable-debug
# --enable-devel
# --enable-release
#
# Where <action> is one of:
# - bootstrap
@@ -30,8 +35,31 @@

set -e

action="$1"
platform="$2"
###############################################################################
# Commandline parsing
#
action=""
platform=""
configure_flags=""
while [ "$#" -gt 0 ]; do
case "$1" in
--enable-debug|--enable-devel|--enable-release)
configure_flags="${configure_flags} $1"
;;
--*)
echo "E: invalid flag $1"
exit 1
;;
*)
if [ -z "$action" ]; then
action="$1"
else
platform="$1"
fi
;;
esac
shift
done

###############################################################################
# Initialisation code
@@ -106,6 +134,11 @@ bootstrap()
esac
}

do_configure()
{
./configure ${configure_flags} "$@"
}

configure()
{
cd "$top_srcdir"
@@ -188,34 +221,34 @@ configure()
SDKROOT="$DEVROOT/SDKs/iPhoneOS$SDKVER.sdk"
CC="$XCODE/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
CXX="$XCODE/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++"
./configure --host=armv7-apple-darwin10 CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" CC="$CC" CXX="$CXX"
do_configure --host=armv7-apple-darwin10 CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" CC="$CC" CXX="$CXX"
;;
android-arm)
CPPFLAGS="$CPPFLAGS -Wno-psabi -I$ANDROID_NDK_ROOT/sources/cxx-stl/stlport/stlport -I$ANDROID_NDK_ROOT/sources/android/native_app_glue -fpic -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64"
CFLAGS="$CFLAGS -march=armv5te -mtune=xscale -msoft-float -mthumb"
CXXFLAGS="$CXXFLAGS -march=armv5te -mtune=xscale -msoft-float -mthumb -fno-rtti -fno-exceptions"
LOL_LIBS="$LOL_LIBS -L$ANDROID_NDK_ROOT/sources/cxx-stl/stlport/libs/armeabi -lstlport_shared -lm -fpic -XCClinker -shared -u ANativeActivity_onCreate"
PKG_CONFIG_PATH="$PKG_CONFIG_PATH" ./configure --host=arm-linux-androideabi ac_cv_exeext=.so CPPFLAGS="$CPPFLAGS" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" LOL_LIBS="$LOL_LIBS"
PKG_CONFIG_PATH="$PKG_CONFIG_PATH" do_configure --host=arm-linux-androideabi ac_cv_exeext=.so CPPFLAGS="$CPPFLAGS" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" LOL_LIBS="$LOL_LIBS"
# FIXME: is this needed?
# ant debug
# ant debug install
# ant clean
;;
raspi-arm)
./configure --host=arm-bcm2708hardfp-linux-gnueabi CPPFLAGS="-I$RASPI_SDK_ROOT/firmware/opt/vc/include -I$RASPI_SDK_ROOT/firmware/opt/vc/include/interface/vcos/pthreads -I$RASPI_SDK_ROOT/chroot/usr/include" LDFLAGS="-L$RASPI_SDK_ROOT/firmware/opt/vc/lib -L$RASPI_SDK_ROOT/chroot/lib/arm-linux-gnueabihf -Wl,-rpath-link -Wl,$RASPI_SDK_ROOT/chroot/lib/arm-linux-gnueabihf -L$RASPI_SDK_ROOT/chroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link -Wl,$RASPI_SDK_ROOT/chroot/usr/lib/arm-linux-gnueabihf -Wl,--unresolved-symbols=ignore-in-shared-libs"
do_configure --host=arm-bcm2708hardfp-linux-gnueabi CPPFLAGS="-I$RASPI_SDK_ROOT/firmware/opt/vc/include -I$RASPI_SDK_ROOT/firmware/opt/vc/include/interface/vcos/pthreads -I$RASPI_SDK_ROOT/chroot/usr/include" LDFLAGS="-L$RASPI_SDK_ROOT/firmware/opt/vc/lib -L$RASPI_SDK_ROOT/chroot/lib/arm-linux-gnueabihf -Wl,-rpath-link -Wl,$RASPI_SDK_ROOT/chroot/lib/arm-linux-gnueabihf -L$RASPI_SDK_ROOT/chroot/usr/lib/arm-linux-gnueabihf -Wl,-rpath-link -Wl,$RASPI_SDK_ROOT/chroot/usr/lib/arm-linux-gnueabihf -Wl,--unresolved-symbols=ignore-in-shared-libs"
;;
nacl-i386)
./configure CXX=i686-nacl-g++ CC=i686-nacl-gcc ac_cv_exeext=.32.nexe --host=i386 CPPFLAGS="-I$NACL_SDK_ROOT/include" LOL_LIBS="-lppapi -lppapi_gles2 -lppapi_cpp -u _ZN2pp12CreateModuleEv"
do_configure CXX=i686-nacl-g++ CC=i686-nacl-gcc ac_cv_exeext=.32.nexe --host=i386 CPPFLAGS="-I$NACL_SDK_ROOT/include" LOL_LIBS="-lppapi -lppapi_gles2 -lppapi_cpp -u _ZN2pp12CreateModuleEv"
;;
nacl-amd64)
./configure CXX=x86_64-nacl-g++ CC=x86_64-nacl-gcc ac_cv_exeext=.64.nexe --host=x86_64 CPPFLAGS="-I$NACL_SDK_ROOT/include" LOL_LIBS="-lppapi -lppapi_gles2 -lppapi_cpp -u _ZN2pp12CreateModuleEv"
do_configure CXX=x86_64-nacl-g++ CC=x86_64-nacl-gcc ac_cv_exeext=.64.nexe --host=x86_64 CPPFLAGS="-I$NACL_SDK_ROOT/include" LOL_LIBS="-lppapi -lppapi_gles2 -lppapi_cpp -u _ZN2pp12CreateModuleEv"
;;
osx-amd64)
# HACK: use clang++ because of a memory leak in llvm-g++.
./configure CXX=clang++ CC=clang
do_configure CXX=clang++ CC=clang
;;
ps3-ppu)
PATH="$PATH" ./configure CXX=ppu-lv2-g++ CC=ppu-lv2-gcc ac_cv_exeext=.elf --host=powerpc
PATH="$PATH" do_configure CXX=ppu-lv2-g++ CC=ppu-lv2-gcc ac_cv_exeext=.elf --host=powerpc
;;
win*-i386|win*-amd64)
CPPFLAGS="$CPPFLAGS -I$PWD/external/sdl-1.2.15/include"
@@ -239,13 +272,13 @@ configure()

CPPFLAGS="$CPPFLAGS -I$PWD/external/libcaca-0.99.beta18/include -DCACA_STATIC"

PATH="$PATH" PKG_CONFIG_PATH="$PKG_CONFIG_PATH" ./configure $HOSTFLAGS $BUILDFLAGS CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" GTK_LIBS="$GTK_LIBS"
PATH="$PATH" PKG_CONFIG_PATH="$PKG_CONFIG_PATH" do_configure $HOSTFLAGS $BUILDFLAGS CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" GTK_LIBS="$GTK_LIBS"
;;
emscripten-*)
./configure $HOSTFLAGS $BUILDFLAGS CC=emcc CXX=em++ AR=emar RANLIB=emranlib PKG_CONFIG=/bin/false SDL_CONFIG=/bin/false ac_cv_exeext=".${platform##emscripten-}"
do_configure $HOSTFLAGS $BUILDFLAGS CC=emcc CXX=em++ AR=emar RANLIB=emranlib PKG_CONFIG=/bin/false SDL_CONFIG=/bin/false ac_cv_exeext=".${platform##emscripten-}"
;;
*)
PATH="$PATH" ./configure CFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS"
PATH="$PATH" do_configure CFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS"
;;
esac
}


+ 32
- 17
configure.ac Wyświetl plik

@@ -101,26 +101,41 @@ AC_CHECK_FUNCS(getenv system tmpfile tmpnam getcwd _getcwd backtrace_symbols)
AC_CHECK_FUNCS(gettimeofday usleep)


if test "${enable_debug}" = "yes"; then
AC_DEFINE(LOL_DEBUG, 1, Define to 1 to activate debug)
OPT_CXXFLAGS="-O"
else
OPT_CXXFLAGS="-O3 -ffast-math -fomit-frame-pointer"
OPT_LDFLAGS="-fno-strength-reduce"
dnl Build mode
ac_cv_my_build_mode="devel"
if test "x${enable_release}" = "xyes"; then
ac_cv_my_build_mode="release"
CFLAGS=""
LDFLAGS=""
CXXFLAGS=""
fi
if test "x${enable_devel}" = "xyes"; then
ac_cv_my_build_mode="devel"
CFLAGS=""
LDFLAGS=""
CXXFLAGS=""
fi
if test "x${enable_debug}" = "xyes"; then
ac_cv_my_build_mode="debug"
CFLAGS=""
LDFLAGS=""
CXXFLAGS=""
fi

if test "${enable_release}" = "yes"; then
AC_DEFINE(LOL_RELEASE, 1, Define to 1 to activate final release)
REL_CXXFLAGS=""
if test "x${ac_cv_my_build_mode}" = "xdebug"; then
AC_DEFINE(LOL_BUILD_DEBUG, 1, Define to 1 to activate debug build)
BUILD_CXXFLAGS="-O -g"
elif test "x${ac_cv_my_build_mode}" = "xdevel"; then
AC_DEFINE(LOL_BUILD_DEVEL, 1, Define to 1 to activate development build)
BUILD_CXXFLAGS="-Os -g -ffast-math"
else
REL_CXXFLAGS="-g"
AC_DEFINE(LOL_BUILD_RELEASE, 1, Define to 1 to activate final release)
BUILD_CXXFLAGS="-Os -ffast-math -fomit-frame-pointer"
BUILD_LDFLAGS="-fno-strength-reduce"
fi

if test "${enable_experimental}" = "yes"; then
AC_DEFINE(LOL_EXPERIMENTAL, 1, Define to 1 to activate experimental build)
fi

# Build documentation?
dnl Build documentation?
DOXYGEN="no"
LATEX="no"
if test "${enable_doc}" != "no"; then
@@ -166,9 +181,9 @@ dnl No exceptions
LOL_TRY_CXXFLAGS(-fno-exceptions, [AM_CXXFLAGS="${AM_CXXFLAGS} -fno-exceptions"])
LOL_TRY_CXXFLAGS(-fno-rtti, [AM_CXXFLAGS="${AM_CXXFLAGS} -fno-rtti"])

dnl Optimizations
AM_CXXFLAGS="${AM_CXXFLAGS} ${REL_CXXFLAGS} ${OPT_CXXFLAGS}"
AM_LDFLAGS="${AM_LDFLAGS} ${REL_LDFLAGS} ${OPT_LDFLAGS}"
dnl Build mode specific flags
AM_CXXFLAGS="${AM_CXXFLAGS} ${BUILD_CXXFLAGS}"
AM_LDFLAGS="${AM_LDFLAGS} ${BUILD_LDFLAGS}"

dnl Debug symbols
LOL_TRY_LDFLAGS(-rdynamic, [AM_LDFLAGS="${AM_LDFLAGS} -rdynamic"])


+ 2
- 2
src/dict.cpp Wyświetl plik

@@ -43,7 +43,7 @@ public:

~DictData()
{
#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
if (nentities)
Log::Error("still %i entities in dict\n", nentities);
#endif
@@ -139,7 +139,7 @@ void Dict::RemoveSlot(Entity *entity)
return;
}

#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
Log::Error("removing unregistered entity %p (%s)\n",
entity, entity->GetName());
#endif


+ 4
- 4
src/entity.cpp Wyświetl plik

@@ -29,7 +29,7 @@ Entity::Entity() :
m_ref(0),
m_destroy(0)
{
#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
m_tickstate = STATE_IDLE;
#endif
m_gamegroup = GAMEGROUP_DEFAULT;
@@ -39,7 +39,7 @@ Entity::Entity() :

Entity::~Entity()
{
#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
if (!m_destroy)
Log::Error("entity destructor called directly\n");
#endif
@@ -53,7 +53,7 @@ char const *Entity::GetName()
void Entity::TickGame(float seconds)
{
UNUSED(seconds);
#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
if (m_tickstate != STATE_PRETICK_GAME)
Log::Error("invalid entity game tick\n");
m_tickstate = STATE_POSTTICK_GAME;
@@ -63,7 +63,7 @@ void Entity::TickGame(float seconds)
void Entity::TickDraw(float seconds)
{
(void)seconds;
#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
if (m_tickstate != STATE_PRETICK_DRAW)
Log::Error("invalid entity draw tick\n");
m_tickstate = STATE_POSTTICK_DRAW;


+ 1
- 1
src/entity.h Wyświetl plik

@@ -76,7 +76,7 @@ protected:
static int const DRAWGROUP_BEGIN = GAMEGROUP_END;
static int const ALLGROUP_END = DRAWGROUP_END;

#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
enum
{
STATE_IDLE = 0,


+ 4
- 4
src/image/codec/android-image.cpp Wyświetl plik

@@ -52,14 +52,14 @@ bool AndroidImageData::Open(char const *path)
jint res = g_vm->GetEnv((void **)&env, JNI_VERSION_1_2);
if (res < 0)
{
#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
Log::Error("JVM environment not found, trying to attach thread\n");
#endif
res = g_vm->AttachCurrentThread(&env, nullptr);
}
if (res < 0)
{
#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
Log::Error("JVM environment not found, cannot open image %s\n", path);
#endif
return false;
@@ -74,7 +74,7 @@ bool AndroidImageData::Open(char const *path)
env->DeleteLocalRef(name);
if (!bmp)
{
#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
Log::Error("could not load %s\n", path);
#endif
return false;
@@ -111,7 +111,7 @@ bool AndroidImageData::Close()
jint res = g_vm->GetEnv((void **)&env, JNI_VERSION_1_2);
if (res < 0)
{
#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
Log::Error("JVM environment not found, cannot close image\n");
#endif
return false;


+ 5
- 5
src/image/codec/gdiplus-image.cpp Wyświetl plik

@@ -56,7 +56,7 @@ bool GdiPlusImageData::Open(char const *path)
status = Gdiplus::GdiplusStartup(&token, &input, nullptr);
if (status != Gdiplus::Ok)
{
#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
Log::Error("error %d while initialising GDI+\n", status);
#endif
return false;
@@ -71,7 +71,7 @@ bool GdiPlusImageData::Open(char const *path)
wchar_t *wpath = new wchar_t[len + 1];
if (mbstowcs(wpath, pathlist[i].C(), len + 1) == (size_t)-1)
{
#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
Log::Error("invalid image name %s\n", pathlist[i].C());
#endif
delete[] wpath;
@@ -86,7 +86,7 @@ bool GdiPlusImageData::Open(char const *path)
status = m_bitmap->GetLastStatus();
if (status != Gdiplus::Ok)
{
#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
if (status != Gdiplus::InvalidParameter)
Log::Error("error %d loading %s\n",
status, pathlist[i].C());
@@ -103,7 +103,7 @@ bool GdiPlusImageData::Open(char const *path)

if (!m_bitmap)
{
#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
Log::Error("could not load %s\n", path);
#endif
return false;
@@ -116,7 +116,7 @@ bool GdiPlusImageData::Open(char const *path)
if(m_bitmap->LockBits(&rect, Gdiplus::ImageLockModeRead,
PixelFormat32bppARGB, &m_bdata) != Gdiplus::Ok)
{
#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
Log::Error("could not lock bits in %s\n", path);
#endif
delete m_bitmap;


+ 1
- 1
src/image/codec/ios-image.cpp Wyświetl plik

@@ -56,7 +56,7 @@ bool IosImageData::Open(char const *path)
UIImage *image = [[UIImage alloc] initWithData:pngdata];
if (!image)
{
#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
Log::Error("could not load %s\n", path);
#endif
return false;


+ 1
- 1
src/image/codec/sdl-image.cpp Wyświetl plik

@@ -67,7 +67,7 @@ bool SdlImageData::Open(char const *path)

if (!m_img)
{
#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
Log::Error("could not load image %s\n", path);
#endif
return false;


+ 14
- 14
src/ticker.cpp Wyświetl plik

@@ -33,7 +33,7 @@ public:
todolist(0), autolist(0),
nentities(0),
frame(0), recording(0), deltatime(0), bias(0), fps(0),
#if LOL_DEBUG
#if LOL_BUILD_DEBUG
keepalive(0),
#endif
quit(0), quitframe(0), quitdelay(20), panic(0)
@@ -46,7 +46,7 @@ public:
{
ASSERT(nentities == 0,
"still %i entities in ticker\n", nentities);
#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
if (autolist)
{
int count = 0;
@@ -76,7 +76,7 @@ private:
int frame, recording;
Timer timer;
float deltatime, bias, fps;
#if LOL_DEBUG
#if LOL_BUILD_DEBUG
float keepalive;
#endif

@@ -162,7 +162,7 @@ int Ticker::Unref(Entity *entity)
#if LOL_FEATURE_THREADS
void *TickerData::GameThreadMain(void * /* p */)
{
#if LOL_DEBUG
#if LOL_BUILD_DEBUG
Log::Info("ticker game thread initialised\n");
#endif

@@ -179,7 +179,7 @@ void *TickerData::GameThreadMain(void * /* p */)

data->drawtick.Push(0);

#if LOL_DEBUG
#if LOL_BUILD_DEBUG
Log::Info("ticker game thread terminated\n");
#endif

@@ -190,7 +190,7 @@ void *TickerData::GameThreadMain(void * /* p */)
#if LOL_FEATURE_THREADS
void *TickerData::DrawThreadMain(void * /* p */)
{
#if LOL_DEBUG
#if LOL_BUILD_DEBUG
Log::Info("ticker draw thread initialised\n");
#endif

@@ -205,7 +205,7 @@ void *TickerData::DrawThreadMain(void * /* p */)
data->gametick.Push(1);
}

#if LOL_DEBUG
#if LOL_BUILD_DEBUG
Log::Info("ticker draw thread terminated\n");
#endif

@@ -268,7 +268,7 @@ void TickerData::GameThreadTick()
data->bias = 0.f;
}

#if LOL_DEBUG
#if LOL_BUILD_DEBUG
data->keepalive += data->deltatime;
if (data->keepalive > 10.f)
{
@@ -290,14 +290,14 @@ void TickerData::GameThreadTick()
for (Entity *e = data->list[i]; e && n < data->panic; e = e->m_gamenext)
if (e->m_ref)
{
#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
Log::Error("poking %s\n", e->GetName());
#endif
e->m_ref--;
n++;
}

#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
if (n)
Log::Error("%i entities stuck after %i frames, poked %i\n",
data->nentities, data->quitdelay, n);
@@ -358,14 +358,14 @@ void TickerData::GameThreadTick()
for (Entity *e = data->list[i]; e; e = e->m_gamenext)
if (!e->m_destroy)
{
#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
if (e->m_tickstate != Entity::STATE_IDLE)
Log::Error("entity %s [%p] not idle for game tick\n",
e->GetName(), e);
e->m_tickstate = Entity::STATE_PRETICK_GAME;
#endif
e->TickGame(data->deltatime);
#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
if (e->m_tickstate != Entity::STATE_POSTTICK_GAME)
Log::Error("entity %s [%p] missed super game tick\n",
e->GetName(), e);
@@ -400,14 +400,14 @@ void TickerData::DrawThreadTick()
for (Entity *e = data->list[i]; e; e = e->m_drawnext)
if (!e->m_destroy)
{
#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
if (e->m_tickstate != Entity::STATE_IDLE)
Log::Error("entity %s [%p] not idle for draw tick\n",
e->GetName(), e);
e->m_tickstate = Entity::STATE_PRETICK_DRAW;
#endif
e->TickDraw(data->deltatime);
#if !LOL_RELEASE
#if !LOL_BUILD_RELEASE
if (e->m_tickstate != Entity::STATE_POSTTICK_DRAW)
Log::Error("entity %s [%p] missed super draw tick\n",
e->GetName(), e);


+ 1
- 1
test/unit/build.cpp Wyświetl plik

@@ -127,7 +127,7 @@ LOLUNIT_FIXTURE(BuildTest)
LOLUNIT_ASSERT_EQUAL(sizeof(u64mat4), 128);
}

#if !defined LOL_DEBUG
#if !defined LOL_BUILD_DEBUG
LOLUNIT_TEST(FastMath)
{
double x, y;


Ładowanie…
Anuluj
Zapisz