2014-02-08 00:56:20 -03:00
|
|
|
/* Aseprite
|
2014-01-25 16:28:25 -03:00
|
|
|
* Copyright (C) 2001-2014 David Capello
|
2007-09-18 23:57:02 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 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 General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef __ASE_CONFIG_H
|
2010-04-22 19:00:22 -03:00
|
|
|
#error You cannot use config.h two times
|
2007-09-18 23:57:02 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#define __ASE_CONFIG_H
|
2012-04-07 13:12:01 -03:00
|
|
|
|
|
|
|
// In MSVC
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
// Avoid warnings about insecure standard C++ functions
|
|
|
|
#define _CRT_SECURE_NO_WARNINGS
|
|
|
|
|
|
|
|
// Disable warning C4355 in MSVC: 'this' used in base member initializer list
|
|
|
|
#pragma warning(disable:4355)
|
|
|
|
#endif
|
2007-09-18 23:57:02 +00:00
|
|
|
|
2010-04-22 19:00:22 -03:00
|
|
|
// General information
|
2013-09-30 19:57:16 -03:00
|
|
|
#define PACKAGE "Aseprite"
|
2014-06-09 22:05:19 -03:00
|
|
|
#define VERSION "1.0.1-dev"
|
2014-06-02 21:31:44 -03:00
|
|
|
#ifdef CUSTOM_WEBSITE_URL
|
|
|
|
#define WEBSITE CUSTOM_WEBSITE_URL // To test web server
|
|
|
|
#else
|
2014-05-05 21:28:58 -03:00
|
|
|
#define WEBSITE "http://www.aseprite.org/"
|
2014-06-02 21:31:44 -03:00
|
|
|
#endif
|
2014-04-10 00:33:28 -03:00
|
|
|
#define WEBSITE_DOWNLOAD WEBSITE "download/"
|
2014-04-12 12:28:34 -03:00
|
|
|
#define WEBSITE_CONTRIBUTORS WEBSITE "contributors/"
|
2014-06-02 21:31:44 -03:00
|
|
|
#define UPDATE_URL WEBSITE "update/?xml=1"
|
2014-01-25 16:28:25 -03:00
|
|
|
#define COPYRIGHT "Copyright (C) 2001-2014 David Capello"
|
2007-09-18 23:57:02 +00:00
|
|
|
|
2012-01-05 19:45:03 -03:00
|
|
|
#define PRINTF verbose_printf
|
2007-09-18 23:57:02 +00:00
|
|
|
|
2013-08-05 21:20:19 -03:00
|
|
|
// verbose_printf is defined in src/app/log.cpp and used through PRINTF macro
|
2010-04-22 19:00:22 -03:00
|
|
|
void verbose_printf(const char* format, ...);
|
2007-09-18 23:57:02 +00:00
|
|
|
|
|
|
|
#include <math.h>
|
|
|
|
#undef PI
|
|
|
|
#define PI 3.14159265358979323846
|
2007-12-11 20:05:18 +00:00
|
|
|
|
|
|
|
#include <allegro/base.h>
|
2012-01-05 19:45:03 -03:00
|
|
|
#include <allegro/debug.h> // ASSERT
|
2007-12-11 20:05:18 +00:00
|
|
|
|
2009-06-02 14:08:56 +00:00
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
// Overloaded new/delete operators to detect memory-leaks
|
|
|
|
|
2008-10-13 21:43:41 +00:00
|
|
|
#if defined __cplusplus && defined MEMLEAK
|
|
|
|
|
|
|
|
#include <new>
|
2011-01-23 19:19:18 -03:00
|
|
|
#include "base/memory.h"
|
2008-10-13 21:43:41 +00:00
|
|
|
|
|
|
|
inline void* operator new(std::size_t size)
|
|
|
|
{
|
2011-01-23 19:19:18 -03:00
|
|
|
void* ptr = base_malloc(size);
|
2008-10-13 21:43:41 +00:00
|
|
|
if (!ptr)
|
|
|
|
throw std::bad_alloc();
|
|
|
|
return ptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void operator delete(void* ptr)
|
|
|
|
{
|
|
|
|
if (!ptr)
|
|
|
|
return;
|
2011-01-23 19:19:18 -03:00
|
|
|
base_free(ptr);
|
2008-10-13 21:43:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
inline void* operator new[](std::size_t size)
|
|
|
|
{
|
2011-01-23 19:19:18 -03:00
|
|
|
void* ptr = base_malloc(size);
|
2008-10-13 21:43:41 +00:00
|
|
|
if (!ptr)
|
|
|
|
throw std::bad_alloc();
|
|
|
|
return ptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
inline void operator delete[](void* ptr)
|
|
|
|
{
|
|
|
|
if (!ptr)
|
|
|
|
return;
|
2011-01-23 19:19:18 -03:00
|
|
|
base_free(ptr);
|
2008-10-13 21:43:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|