2010-11-20 10:37:14 +00:00
|
|
|
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
|
|
|
|
/* If you are missing that file, acquire a complete release at teeworlds.com. */
|
2010-05-29 07:25:38 +00:00
|
|
|
#ifndef GAME_MAPITEMS_H
|
|
|
|
#define GAME_MAPITEMS_H
|
|
|
|
|
2014-10-08 15:33:06 +00:00
|
|
|
#include <engine/shared/protocol.h>
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
// layer types
|
|
|
|
enum
|
|
|
|
{
|
2011-08-26 16:46:27 +00:00
|
|
|
// TODO(Shereef Marzouk): fix this for vanilla, make use of LAYERTYPE_GAME instead of using m_game variable in the editor.
|
2020-09-14 14:00:32 +00:00
|
|
|
LAYERTYPE_INVALID = 0,
|
2011-08-11 08:43:27 +00:00
|
|
|
LAYERTYPE_GAME,
|
2010-05-29 07:25:38 +00:00
|
|
|
LAYERTYPE_TILES,
|
|
|
|
LAYERTYPE_QUADS,
|
2011-08-13 00:12:40 +00:00
|
|
|
LAYERTYPE_FRONT,
|
|
|
|
LAYERTYPE_TELE,
|
|
|
|
LAYERTYPE_SPEEDUP,
|
|
|
|
LAYERTYPE_SWITCH,
|
2014-03-12 21:48:10 +00:00
|
|
|
LAYERTYPE_TUNE,
|
2014-11-27 15:18:15 +00:00
|
|
|
LAYERTYPE_SOUNDS_DEPRECATED, // deprecated! do not use this, this is just for compatibility reasons
|
2014-10-08 15:33:06 +00:00
|
|
|
LAYERTYPE_SOUNDS,
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2020-09-14 14:00:32 +00:00
|
|
|
MAPITEMTYPE_VERSION = 0,
|
2010-05-29 07:25:38 +00:00
|
|
|
MAPITEMTYPE_INFO,
|
|
|
|
MAPITEMTYPE_IMAGE,
|
|
|
|
MAPITEMTYPE_ENVELOPE,
|
|
|
|
MAPITEMTYPE_GROUP,
|
|
|
|
MAPITEMTYPE_LAYER,
|
|
|
|
MAPITEMTYPE_ENVPOINTS,
|
2014-10-11 11:38:08 +00:00
|
|
|
MAPITEMTYPE_SOUND,
|
2018-10-05 09:20:30 +00:00
|
|
|
// High map item type numbers suggest that they use the alternate
|
|
|
|
// format with UUIDs. See src/engine/shared/datafile.cpp for some of
|
|
|
|
// the implementation.
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2020-09-14 14:00:32 +00:00
|
|
|
CURVETYPE_STEP = 0,
|
2010-05-29 07:25:38 +00:00
|
|
|
CURVETYPE_LINEAR,
|
|
|
|
CURVETYPE_SLOW,
|
|
|
|
CURVETYPE_FAST,
|
|
|
|
CURVETYPE_SMOOTH,
|
|
|
|
NUM_CURVETYPES,
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
// game layer tiles
|
2014-03-12 21:48:10 +00:00
|
|
|
// TODO define which Layer uses which tiles (needed for mapeditor)
|
2020-09-14 14:00:32 +00:00
|
|
|
ENTITY_NULL = 0,
|
2010-05-29 07:25:38 +00:00
|
|
|
ENTITY_SPAWN,
|
|
|
|
ENTITY_SPAWN_RED,
|
|
|
|
ENTITY_SPAWN_BLUE,
|
|
|
|
ENTITY_FLAGSTAND_RED,
|
|
|
|
ENTITY_FLAGSTAND_BLUE,
|
|
|
|
ENTITY_ARMOR_1,
|
|
|
|
ENTITY_HEALTH_1,
|
|
|
|
ENTITY_WEAPON_SHOTGUN,
|
|
|
|
ENTITY_WEAPON_GRENADE,
|
|
|
|
ENTITY_POWERUP_NINJA,
|
2019-11-22 14:37:18 +00:00
|
|
|
ENTITY_WEAPON_LASER,
|
2010-08-10 04:28:17 +00:00
|
|
|
//DDRace - Main Lasers
|
|
|
|
ENTITY_LASER_FAST_CCW,
|
2019-04-08 17:39:55 +00:00
|
|
|
ENTITY_LASER_NORMAL_CCW,
|
|
|
|
ENTITY_LASER_SLOW_CCW,
|
|
|
|
ENTITY_LASER_STOP,
|
|
|
|
ENTITY_LASER_SLOW_CW,
|
|
|
|
ENTITY_LASER_NORMAL_CW,
|
|
|
|
ENTITY_LASER_FAST_CW,
|
2010-08-10 04:28:17 +00:00
|
|
|
//DDRace - Laser Modifiers
|
|
|
|
ENTITY_LASER_SHORT,
|
2010-11-13 13:22:19 +00:00
|
|
|
ENTITY_LASER_MEDIUM,
|
2010-08-10 04:28:17 +00:00
|
|
|
ENTITY_LASER_LONG,
|
|
|
|
ENTITY_LASER_C_SLOW,
|
|
|
|
ENTITY_LASER_C_NORMAL,
|
|
|
|
ENTITY_LASER_C_FAST,
|
|
|
|
ENTITY_LASER_O_SLOW,
|
|
|
|
ENTITY_LASER_O_NORMAL,
|
|
|
|
ENTITY_LASER_O_FAST,
|
2010-08-12 11:30:46 +00:00
|
|
|
//DDRace - Plasma
|
2020-09-14 14:00:32 +00:00
|
|
|
ENTITY_PLASMAE = 29,
|
2010-08-12 11:30:46 +00:00
|
|
|
ENTITY_PLASMAF,
|
2010-08-28 20:32:16 +00:00
|
|
|
ENTITY_PLASMA,
|
2010-09-11 00:01:15 +00:00
|
|
|
ENTITY_PLASMAU,
|
2010-08-10 04:28:17 +00:00
|
|
|
//DDRace - Shotgun
|
2010-11-01 01:51:17 +00:00
|
|
|
ENTITY_CRAZY_SHOTGUN_EX,
|
|
|
|
ENTITY_CRAZY_SHOTGUN,
|
2010-08-12 11:30:46 +00:00
|
|
|
//DDRace - Draggers
|
2020-09-14 14:00:32 +00:00
|
|
|
ENTITY_DRAGGER_WEAK = 42,
|
2010-08-12 11:30:46 +00:00
|
|
|
ENTITY_DRAGGER_NORMAL,
|
|
|
|
ENTITY_DRAGGER_STRONG,
|
|
|
|
//Draggers Behind Walls
|
|
|
|
ENTITY_DRAGGER_WEAK_NW,
|
|
|
|
ENTITY_DRAGGER_NORMAL_NW,
|
|
|
|
ENTITY_DRAGGER_STRONG_NW,
|
2010-11-13 13:22:19 +00:00
|
|
|
//Doors
|
2020-09-14 14:00:32 +00:00
|
|
|
ENTITY_DOOR = 49,
|
2010-08-10 04:28:17 +00:00
|
|
|
//End Of Lower Tiles
|
2010-05-29 07:25:38 +00:00
|
|
|
NUM_ENTITIES,
|
2010-08-10 04:28:17 +00:00
|
|
|
//Start From Top Left
|
|
|
|
//Tile Controllers
|
2020-09-14 14:00:32 +00:00
|
|
|
TILE_AIR = 0,
|
2010-05-29 07:25:38 +00:00
|
|
|
TILE_SOLID,
|
|
|
|
TILE_DEATH,
|
|
|
|
TILE_NOHOOK,
|
2010-08-10 04:28:17 +00:00
|
|
|
TILE_NOLASER,
|
2015-11-14 23:00:43 +00:00
|
|
|
TILE_THROUGH_CUT,
|
|
|
|
TILE_THROUGH,
|
2013-08-23 23:03:45 +00:00
|
|
|
TILE_JUMP,
|
2010-11-01 01:51:17 +00:00
|
|
|
TILE_FREEZE = 9,
|
2010-09-11 00:01:15 +00:00
|
|
|
TILE_TELEINEVIL,
|
|
|
|
TILE_UNFREEZE,
|
2011-01-14 13:37:02 +00:00
|
|
|
TILE_DFREEZE,
|
|
|
|
TILE_DUNFREEZE,
|
2013-08-13 02:59:25 +00:00
|
|
|
TILE_TELEINWEAPON,
|
|
|
|
TILE_TELEINHOOK,
|
2014-06-21 16:14:22 +00:00
|
|
|
TILE_WALLJUMP = 16,
|
2020-09-13 20:00:49 +00:00
|
|
|
TILE_EHOOK_ENABLE,
|
|
|
|
TILE_EHOOK_DISABLE,
|
|
|
|
TILE_HIT_ENABLE,
|
|
|
|
TILE_HIT_DISABLE,
|
|
|
|
TILE_SOLO_ENABLE,
|
|
|
|
TILE_SOLO_DISABLE,
|
2010-11-13 13:22:19 +00:00
|
|
|
//Switches
|
2010-11-22 20:43:22 +00:00
|
|
|
TILE_SWITCHTIMEDOPEN = 22,
|
|
|
|
TILE_SWITCHTIMEDCLOSE,
|
|
|
|
TILE_SWITCHOPEN,
|
2010-11-13 13:22:19 +00:00
|
|
|
TILE_SWITCHCLOSE,
|
|
|
|
TILE_TELEIN,
|
2010-08-10 04:28:17 +00:00
|
|
|
TILE_TELEOUT,
|
|
|
|
TILE_BOOST,
|
2011-05-17 23:12:39 +00:00
|
|
|
TILE_TELECHECK,
|
|
|
|
TILE_TELECHECKOUT,
|
|
|
|
TILE_TELECHECKIN,
|
2014-12-29 14:54:55 +00:00
|
|
|
TILE_REFILL_JUMPS = 32,
|
2020-09-13 20:00:49 +00:00
|
|
|
TILE_START,
|
|
|
|
TILE_FINISH,
|
2019-04-08 17:39:55 +00:00
|
|
|
TILE_CHECKPOINT_FIRST = 35,
|
|
|
|
TILE_CHECKPOINT_LAST = 59,
|
2010-11-01 01:51:17 +00:00
|
|
|
TILE_STOP = 60,
|
|
|
|
TILE_STOPS,
|
2010-08-30 04:45:09 +00:00
|
|
|
TILE_STOPA,
|
2015-11-12 18:46:27 +00:00
|
|
|
TILE_TELECHECKINEVIL,
|
|
|
|
TILE_CP,
|
2010-11-01 01:51:17 +00:00
|
|
|
TILE_CP_F,
|
2015-11-12 18:46:27 +00:00
|
|
|
TILE_THROUGH_ALL,
|
|
|
|
TILE_THROUGH_DIR,
|
2020-09-13 20:00:49 +00:00
|
|
|
TILE_TUNE,
|
2010-12-01 22:45:04 +00:00
|
|
|
TILE_OLDLASER = 71,
|
|
|
|
TILE_NPC,
|
2010-08-10 04:28:17 +00:00
|
|
|
TILE_EHOOK,
|
|
|
|
TILE_NOHIT,
|
2013-08-05 15:47:04 +00:00
|
|
|
TILE_NPH,
|
2016-03-07 17:04:59 +00:00
|
|
|
TILE_UNLOCK_TEAM,
|
2020-09-13 20:00:49 +00:00
|
|
|
TILE_ADD_TIME = 79,
|
|
|
|
TILE_NPC_DISABLE = 88,
|
|
|
|
TILE_UNLIMITED_JUMPS_DISABLE,
|
|
|
|
TILE_JETPACK_DISABLE,
|
|
|
|
TILE_NPH_DISABLE,
|
2021-02-01 13:55:26 +00:00
|
|
|
TILE_SUBTRACT_TIME = 95,
|
2018-02-14 15:27:26 +00:00
|
|
|
TILE_TELE_GUN_ENABLE = 96,
|
|
|
|
TILE_TELE_GUN_DISABLE = 97,
|
2018-10-26 13:55:35 +00:00
|
|
|
TILE_ALLOW_TELE_GUN = 98,
|
2018-11-02 23:02:20 +00:00
|
|
|
TILE_ALLOW_BLUE_TELE_GUN = 99,
|
2020-09-13 20:00:49 +00:00
|
|
|
TILE_NPC_ENABLE = 104,
|
|
|
|
TILE_UNLIMITED_JUMPS_ENABLE,
|
|
|
|
TILE_JETPACK_ENABLE,
|
|
|
|
TILE_NPH_ENABLE,
|
2018-02-14 15:27:26 +00:00
|
|
|
TILE_TELE_GRENADE_ENABLE = 112,
|
|
|
|
TILE_TELE_GRENADE_DISABLE = 113,
|
|
|
|
TILE_TELE_LASER_ENABLE = 128,
|
|
|
|
TILE_TELE_LASER_DISABLE = 129,
|
2019-04-08 17:39:55 +00:00
|
|
|
TILE_CREDITS_1 = 140,
|
|
|
|
TILE_CREDITS_2 = 141,
|
|
|
|
TILE_CREDITS_3 = 142,
|
|
|
|
TILE_CREDITS_4 = 143,
|
2022-01-07 15:53:40 +00:00
|
|
|
TILE_LFREEZE = 144,
|
|
|
|
TILE_LUNFREEZE = 145,
|
2019-04-08 17:39:55 +00:00
|
|
|
TILE_CREDITS_5 = 156,
|
|
|
|
TILE_CREDITS_6 = 157,
|
|
|
|
TILE_CREDITS_7 = 158,
|
|
|
|
TILE_CREDITS_8 = 159,
|
2016-04-29 14:53:19 +00:00
|
|
|
TILE_ENTITIES_OFF_1 = 190,
|
|
|
|
TILE_ENTITIES_OFF_2,
|
2010-08-10 04:28:17 +00:00
|
|
|
//End of higher tiles
|
2010-11-13 13:22:19 +00:00
|
|
|
//Layers
|
2020-09-14 14:00:32 +00:00
|
|
|
LAYER_GAME = 0,
|
2010-11-13 13:22:19 +00:00
|
|
|
LAYER_FRONT,
|
|
|
|
LAYER_TELE,
|
|
|
|
LAYER_SPEEDUP,
|
|
|
|
LAYER_SWITCH,
|
2014-03-12 21:48:10 +00:00
|
|
|
LAYER_TUNE,
|
2010-11-13 13:22:19 +00:00
|
|
|
NUM_LAYERS,
|
|
|
|
//Flags
|
2020-09-14 14:00:32 +00:00
|
|
|
TILEFLAG_VFLIP = 1,
|
|
|
|
TILEFLAG_HFLIP = 2,
|
|
|
|
TILEFLAG_OPAQUE = 4,
|
|
|
|
TILEFLAG_ROTATE = 8,
|
2010-11-13 13:22:19 +00:00
|
|
|
//Rotation
|
|
|
|
ROTATION_0 = 0,
|
|
|
|
ROTATION_90 = TILEFLAG_ROTATE,
|
2020-09-14 14:00:32 +00:00
|
|
|
ROTATION_180 = (TILEFLAG_VFLIP | TILEFLAG_HFLIP),
|
|
|
|
ROTATION_270 = (TILEFLAG_VFLIP | TILEFLAG_HFLIP | TILEFLAG_ROTATE),
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2020-09-14 14:00:32 +00:00
|
|
|
LAYERFLAG_DETAIL = 1,
|
|
|
|
TILESLAYERFLAG_GAME = 1,
|
|
|
|
TILESLAYERFLAG_TELE = 2,
|
|
|
|
TILESLAYERFLAG_SPEEDUP = 4,
|
|
|
|
TILESLAYERFLAG_FRONT = 8,
|
|
|
|
TILESLAYERFLAG_SWITCH = 16,
|
|
|
|
TILESLAYERFLAG_TUNE = 32,
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2020-09-14 14:00:32 +00:00
|
|
|
ENTITY_OFFSET = 255 - 16 * 4,
|
2010-05-29 07:25:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct CPoint
|
|
|
|
{
|
|
|
|
int x, y; // 22.10 fixed point
|
|
|
|
};
|
|
|
|
|
|
|
|
struct CColor
|
|
|
|
{
|
|
|
|
int r, g, b, a;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct CQuad
|
|
|
|
{
|
|
|
|
CPoint m_aPoints[5];
|
|
|
|
CColor m_aColors[4];
|
|
|
|
CPoint m_aTexcoords[4];
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
int m_PosEnv;
|
|
|
|
int m_PosEnvOffset;
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
int m_ColorEnv;
|
|
|
|
int m_ColorEnvOffset;
|
|
|
|
};
|
|
|
|
|
2010-07-05 18:57:07 +00:00
|
|
|
class CTile
|
2010-05-29 07:25:38 +00:00
|
|
|
{
|
2010-07-05 19:04:19 +00:00
|
|
|
public:
|
2010-05-29 07:25:38 +00:00
|
|
|
unsigned char m_Index;
|
|
|
|
unsigned char m_Flags;
|
|
|
|
unsigned char m_Skip;
|
|
|
|
unsigned char m_Reserved;
|
|
|
|
};
|
|
|
|
|
2011-07-12 21:31:39 +00:00
|
|
|
struct CMapItemInfo
|
|
|
|
{
|
|
|
|
int m_Version;
|
|
|
|
int m_Author;
|
|
|
|
int m_MapVersion;
|
|
|
|
int m_Credits;
|
|
|
|
int m_License;
|
2020-09-26 19:41:58 +00:00
|
|
|
};
|
2011-07-12 21:31:39 +00:00
|
|
|
|
2015-07-14 20:08:29 +00:00
|
|
|
struct CMapItemInfoSettings : CMapItemInfo
|
|
|
|
{
|
|
|
|
int m_Settings;
|
2020-09-26 19:41:58 +00:00
|
|
|
};
|
2015-07-14 20:08:29 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
struct CMapItemImage
|
|
|
|
{
|
|
|
|
int m_Version;
|
|
|
|
int m_Width;
|
|
|
|
int m_Height;
|
|
|
|
int m_External;
|
|
|
|
int m_ImageName;
|
|
|
|
int m_ImageData;
|
2020-09-26 19:41:58 +00:00
|
|
|
};
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
struct CMapItemGroup_v1
|
|
|
|
{
|
|
|
|
int m_Version;
|
|
|
|
int m_OffsetX;
|
|
|
|
int m_OffsetY;
|
|
|
|
int m_ParallaxX;
|
|
|
|
int m_ParallaxY;
|
|
|
|
|
|
|
|
int m_StartLayer;
|
|
|
|
int m_NumLayers;
|
2020-09-26 19:41:58 +00:00
|
|
|
};
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
struct CMapItemGroup : public CMapItemGroup_v1
|
|
|
|
{
|
2020-09-26 19:41:58 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
CURRENT_VERSION = 3
|
|
|
|
};
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
int m_UseClipping;
|
|
|
|
int m_ClipX;
|
|
|
|
int m_ClipY;
|
|
|
|
int m_ClipW;
|
|
|
|
int m_ClipH;
|
2011-07-12 01:14:46 +00:00
|
|
|
|
|
|
|
int m_aName[3];
|
2020-09-26 19:41:58 +00:00
|
|
|
};
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
struct CMapItemLayer
|
|
|
|
{
|
|
|
|
int m_Version;
|
|
|
|
int m_Type;
|
|
|
|
int m_Flags;
|
2020-09-26 19:41:58 +00:00
|
|
|
};
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
struct CMapItemLayerTilemap
|
|
|
|
{
|
|
|
|
CMapItemLayer m_Layer;
|
|
|
|
int m_Version;
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
int m_Width;
|
|
|
|
int m_Height;
|
|
|
|
int m_Flags;
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
CColor m_Color;
|
|
|
|
int m_ColorEnv;
|
|
|
|
int m_ColorEnvOffset;
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
int m_Image;
|
|
|
|
int m_Data;
|
2011-04-09 06:41:31 +00:00
|
|
|
|
2011-08-13 00:12:40 +00:00
|
|
|
int m_aName[3];
|
|
|
|
|
2011-04-09 06:41:31 +00:00
|
|
|
// DDRace
|
|
|
|
|
2010-08-10 04:28:17 +00:00
|
|
|
int m_Tele;
|
|
|
|
int m_Speedup;
|
|
|
|
int m_Front;
|
2010-08-27 23:30:50 +00:00
|
|
|
int m_Switch;
|
2014-03-12 21:48:10 +00:00
|
|
|
int m_Tune;
|
2020-09-26 19:41:58 +00:00
|
|
|
};
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
struct CMapItemLayerQuads
|
|
|
|
{
|
|
|
|
CMapItemLayer m_Layer;
|
|
|
|
int m_Version;
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
int m_NumQuads;
|
|
|
|
int m_Data;
|
|
|
|
int m_Image;
|
2011-07-12 01:14:46 +00:00
|
|
|
|
|
|
|
int m_aName[3];
|
2020-09-26 19:41:58 +00:00
|
|
|
};
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
struct CMapItemVersion
|
|
|
|
{
|
|
|
|
int m_Version;
|
2020-09-26 19:41:58 +00:00
|
|
|
};
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
struct CEnvPoint
|
|
|
|
{
|
|
|
|
int m_Time; // in ms
|
|
|
|
int m_Curvetype;
|
|
|
|
int m_aValues[4]; // 1-4 depending on envelope (22.10 fixed point)
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2020-10-08 05:28:53 +00:00
|
|
|
bool operator<(const CEnvPoint &Other) const { return m_Time < Other.m_Time; }
|
2020-09-26 19:41:58 +00:00
|
|
|
};
|
2010-05-29 07:25:38 +00:00
|
|
|
|
2011-12-04 13:34:27 +00:00
|
|
|
struct CMapItemEnvelope_v1
|
2010-05-29 07:25:38 +00:00
|
|
|
{
|
|
|
|
int m_Version;
|
|
|
|
int m_Channels;
|
|
|
|
int m_StartPoint;
|
|
|
|
int m_NumPoints;
|
2010-08-25 14:15:59 +00:00
|
|
|
int m_aName[8];
|
2020-09-26 19:41:58 +00:00
|
|
|
};
|
2010-05-29 07:25:38 +00:00
|
|
|
|
2011-12-04 13:34:27 +00:00
|
|
|
struct CMapItemEnvelope : public CMapItemEnvelope_v1
|
|
|
|
{
|
2020-09-26 19:41:58 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
CURRENT_VERSION = 2
|
|
|
|
};
|
2011-12-04 13:34:27 +00:00
|
|
|
int m_Synchronized;
|
|
|
|
};
|
|
|
|
|
2014-11-27 15:18:15 +00:00
|
|
|
struct CSoundShape
|
|
|
|
{
|
|
|
|
enum
|
|
|
|
{
|
2014-11-28 19:25:43 +00:00
|
|
|
SHAPE_RECTANGLE = 0,
|
2014-11-27 15:18:15 +00:00
|
|
|
SHAPE_CIRCLE,
|
|
|
|
NUM_SHAPES,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct CRectangle
|
|
|
|
{
|
|
|
|
int m_Width, m_Height; // fxp 22.10
|
|
|
|
};
|
|
|
|
|
|
|
|
struct CCircle
|
|
|
|
{
|
2014-11-28 19:01:25 +00:00
|
|
|
int m_Radius;
|
2014-11-27 15:18:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
int m_Type;
|
|
|
|
|
|
|
|
union
|
|
|
|
{
|
|
|
|
CRectangle m_Rectangle;
|
|
|
|
CCircle m_Circle;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2014-10-09 10:44:03 +00:00
|
|
|
struct CSoundSource
|
|
|
|
{
|
|
|
|
CPoint m_Position;
|
|
|
|
int m_Loop;
|
2014-11-30 11:23:05 +00:00
|
|
|
int m_Pan; // 0 - no panning, 1 - panning
|
2014-10-10 17:50:39 +00:00
|
|
|
int m_TimeDelay; // in s
|
2014-11-27 15:18:15 +00:00
|
|
|
int m_Falloff; // [0,255] // 0 - No falloff, 255 - full
|
2014-10-11 14:05:36 +00:00
|
|
|
|
2014-10-12 13:10:33 +00:00
|
|
|
int m_PosEnv;
|
|
|
|
int m_PosEnvOffset;
|
2014-10-11 14:05:36 +00:00
|
|
|
int m_SoundEnv;
|
2014-10-12 13:10:33 +00:00
|
|
|
int m_SoundEnvOffset;
|
|
|
|
|
2014-11-27 15:18:15 +00:00
|
|
|
CSoundShape m_Shape;
|
2014-10-09 10:44:03 +00:00
|
|
|
};
|
|
|
|
|
2014-10-09 09:28:02 +00:00
|
|
|
struct CMapItemLayerSounds
|
|
|
|
{
|
2020-09-26 19:41:58 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
CURRENT_VERSION = 2
|
|
|
|
};
|
2014-10-09 09:28:02 +00:00
|
|
|
|
|
|
|
CMapItemLayer m_Layer;
|
|
|
|
int m_Version;
|
2014-10-09 10:44:03 +00:00
|
|
|
|
|
|
|
int m_NumSources;
|
|
|
|
int m_Data;
|
2014-10-09 09:28:02 +00:00
|
|
|
int m_Sound;
|
|
|
|
|
|
|
|
int m_aName[3];
|
|
|
|
};
|
|
|
|
|
2014-10-11 11:38:08 +00:00
|
|
|
struct CMapItemSound
|
|
|
|
{
|
|
|
|
int m_Version;
|
|
|
|
|
|
|
|
int m_External;
|
|
|
|
|
|
|
|
int m_SoundName;
|
|
|
|
int m_SoundData;
|
2014-10-11 12:50:16 +00:00
|
|
|
int m_SoundDataSize;
|
2020-09-26 19:41:58 +00:00
|
|
|
};
|
2014-10-11 11:38:08 +00:00
|
|
|
|
2011-12-09 22:00:40 +00:00
|
|
|
// DDRace
|
2011-04-09 06:41:31 +00:00
|
|
|
|
|
|
|
class CTeleTile
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
unsigned char m_Number;
|
|
|
|
unsigned char m_Type;
|
|
|
|
};
|
|
|
|
|
|
|
|
class CSpeedupTile
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
unsigned char m_Force;
|
|
|
|
unsigned char m_MaxSpeed;
|
|
|
|
unsigned char m_Type;
|
|
|
|
short m_Angle;
|
|
|
|
};
|
|
|
|
|
|
|
|
class CSwitchTile
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
unsigned char m_Number;
|
|
|
|
unsigned char m_Type;
|
|
|
|
unsigned char m_Flags;
|
|
|
|
unsigned char m_Delay;
|
|
|
|
};
|
|
|
|
|
|
|
|
class CDoorTile
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
unsigned char m_Index;
|
|
|
|
unsigned char m_Flags;
|
|
|
|
int m_Number;
|
|
|
|
};
|
|
|
|
|
2014-03-12 21:48:10 +00:00
|
|
|
class CTuneTile
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
unsigned char m_Number;
|
|
|
|
unsigned char m_Type;
|
|
|
|
};
|
|
|
|
|
2016-04-29 14:53:19 +00:00
|
|
|
bool IsValidGameTile(int Index);
|
|
|
|
bool IsValidFrontTile(int Index);
|
2017-06-11 17:53:55 +00:00
|
|
|
bool IsValidTeleTile(int Index);
|
|
|
|
bool IsValidSpeedupTile(int Index);
|
|
|
|
bool IsValidSwitchTile(int Index);
|
2019-03-26 18:15:24 +00:00
|
|
|
bool IsValidTuneTile(int Index);
|
2016-04-29 14:53:19 +00:00
|
|
|
bool IsValidEntity(int Index);
|
2019-03-21 21:50:22 +00:00
|
|
|
bool IsRotatableTile(int Index);
|
2020-09-08 13:11:32 +00:00
|
|
|
bool IsCreditsTile(int TileIndex);
|
2016-04-29 14:53:19 +00:00
|
|
|
|
2011-05-17 23:12:39 +00:00
|
|
|
#endif
|