2014-10-06 18:36:58 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
* Copyright (c) 2014 Ted John
|
|
|
|
* OpenRCT2, an open source clone of Roller Coaster Tycoon 2.
|
2015-09-22 22:45:03 +02:00
|
|
|
*
|
2014-10-06 18:36:58 +02:00
|
|
|
* This file is part of OpenRCT2.
|
2015-09-22 22:45:03 +02:00
|
|
|
*
|
2014-10-06 18:36:58 +02:00
|
|
|
* OpenRCT2 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 3 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, see <http://www.gnu.org/licenses/>.
|
|
|
|
*****************************************************************************/
|
2015-09-22 22:45:03 +02:00
|
|
|
|
2014-10-06 18:36:58 +02:00
|
|
|
#ifndef _COMMON_H_
|
|
|
|
#define _COMMON_H_
|
|
|
|
|
2014-11-21 19:39:56 +01:00
|
|
|
#include "diagnostic.h"
|
2014-10-06 18:36:58 +02:00
|
|
|
#include "rct2.h"
|
|
|
|
|
2015-09-22 22:45:03 +02:00
|
|
|
#define SafeFree(x) do { free(x); (x) = NULL; } while (0)
|
2015-02-16 23:47:11 +01:00
|
|
|
|
2015-09-22 22:45:03 +02:00
|
|
|
#define SafeDelete(x) do { delete (x); (x) = nullptr; } while (0)
|
|
|
|
#define SafeDeleteArray(x) do { delete[] (x); (x) = nullptr; } while (0)
|
2015-09-05 00:27:47 +02:00
|
|
|
|
2015-09-12 19:17:25 +02:00
|
|
|
#ifndef interface
|
|
|
|
#define interface struct
|
|
|
|
#endif
|
2015-09-05 00:27:47 +02:00
|
|
|
#define abstract = 0
|
2015-08-29 03:05:21 +02:00
|
|
|
|
2016-02-20 11:12:00 +01:00
|
|
|
#ifdef __GNUC__
|
|
|
|
#define FASTCALL __attribute__((fastcall))
|
|
|
|
#elif _MSC_VER
|
|
|
|
#define FASTCALL __fastcall
|
|
|
|
#else
|
|
|
|
#pragma message "Not using fastcall calling convention, please check your compiler support"
|
|
|
|
#define FASTCALL
|
|
|
|
#endif
|
|
|
|
|
2015-09-22 22:45:03 +02:00
|
|
|
#endif
|