2017-12-03 23:07:24 +01:00
|
|
|
/*****************************************************************************
|
2018-06-15 14:07:34 +02:00
|
|
|
* Copyright (c) 2014-2018 OpenRCT2 developers
|
2017-12-03 23:07:24 +01:00
|
|
|
*
|
2018-06-15 14:07:34 +02:00
|
|
|
* For a complete list of all authors, please refer to contributors.md
|
|
|
|
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
|
2017-12-03 23:07:24 +01:00
|
|
|
*
|
2018-06-15 14:07:34 +02:00
|
|
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
2017-12-03 23:07:24 +01:00
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef _ADDRESSES_H_
|
|
|
|
#define _ADDRESSES_H_
|
|
|
|
|
|
|
|
#include <openrct2/common.h>
|
|
|
|
|
|
|
|
#ifdef USE_MMAP
|
|
|
|
#if defined(PLATFORM_64BIT)
|
|
|
|
#define GOOD_PLACE_FOR_DATA_SEGMENT ((uintptr_t)0x200000000)
|
|
|
|
#elif defined(PLATFORM_32BIT)
|
|
|
|
#define GOOD_PLACE_FOR_DATA_SEGMENT ((uintptr_t)0x09000000)
|
|
|
|
#else
|
|
|
|
#error "Unknown platform"
|
|
|
|
#endif
|
|
|
|
#else
|
|
|
|
#define GOOD_PLACE_FOR_DATA_SEGMENT ((uintptr_t)0x8a4000)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define RCT2_ADDRESS(address, type) ((type*)(GOOD_PLACE_FOR_DATA_SEGMENT - 0x8a4000 + (address)))
|
|
|
|
#define RCT2_GLOBAL(address, type) (*((type*)(GOOD_PLACE_FOR_DATA_SEGMENT - 0x8a4000 + (address))))
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the flags register
|
|
|
|
*
|
|
|
|
* Flags register is as follows:
|
|
|
|
* 0bSZ0A_0P0C_0000_0000
|
|
|
|
* S = Signed flag
|
|
|
|
* Z = Zero flag
|
|
|
|
* C = Carry flag
|
|
|
|
* A = Adjust flag
|
|
|
|
* P = Parity flag
|
|
|
|
* All other bits are undefined.
|
|
|
|
*/
|
|
|
|
sint32 RCT2_CALLPROC_X(sint32 address, sint32 _eax, sint32 _ebx, sint32 _ecx, sint32 _edx, sint32 _esi, sint32 _edi, sint32 _ebp);
|
|
|
|
|
2018-02-01 12:28:50 +01:00
|
|
|
|
2017-12-03 23:07:24 +01:00
|
|
|
|
2017-12-04 20:49:12 +01:00
|
|
|
#endif
|